Commit 6281a9ab authored by Dmitry Kovalev's avatar Dmitry Kovalev

Adding type casts to remove C++ compiler errors.

Change-Id: I224e49955ad6c833d204feb8efc4056e37d206be
parent 29beeff1
......@@ -101,22 +101,24 @@ int vp9_resize_frame_buffers(VP9_COMMON *cm, int width, int height) {
mi_size = cm->mode_info_stride * (cm->mi_rows + MI_BLOCK_SIZE);
vpx_free(cm->mip);
cm->mip = vpx_calloc(mi_size, sizeof(MODE_INFO));
cm->mip = (MODE_INFO *)vpx_calloc(mi_size, sizeof(MODE_INFO));
if (!cm->mip)
goto fail;
vpx_free(cm->prev_mip);
cm->prev_mip = vpx_calloc(mi_size, sizeof(MODE_INFO));
cm->prev_mip = (MODE_INFO *)vpx_calloc(mi_size, sizeof(MODE_INFO));
if (!cm->prev_mip)
goto fail;
vpx_free(cm->mi_grid_base);
cm->mi_grid_base = vpx_calloc(mi_size, sizeof(*cm->mi_grid_base));
cm->mi_grid_base =
(MODE_INFO **)vpx_calloc(mi_size, sizeof(*cm->mi_grid_base));
if (!cm->mi_grid_base)
goto fail;
vpx_free(cm->prev_mi_grid_base);
cm->prev_mi_grid_base = vpx_calloc(mi_size, sizeof(*cm->prev_mi_grid_base));
cm->prev_mi_grid_base =
(MODE_INFO **)vpx_calloc(mi_size, sizeof(*cm->prev_mi_grid_base));
if (!cm->prev_mi_grid_base)
goto fail;
......@@ -124,7 +126,7 @@ int vp9_resize_frame_buffers(VP9_COMMON *cm, int width, int height) {
// Create the segmentation map structure and set to 0.
vpx_free(cm->last_frame_seg_map);
cm->last_frame_seg_map = vpx_calloc(cm->mi_rows * cm->mi_cols, 1);
cm->last_frame_seg_map = (uint8_t *)vpx_calloc(cm->mi_rows * cm->mi_cols, 1);
if (!cm->last_frame_seg_map)
goto fail;
......@@ -170,26 +172,28 @@ int vp9_alloc_frame_buffers(VP9_COMMON *cm, int width, int height) {
// Allocation
mi_size = cm->mode_info_stride * (cm->mi_rows + MI_BLOCK_SIZE);
cm->mip = vpx_calloc(mi_size, sizeof(MODE_INFO));
cm->mip = (MODE_INFO *)vpx_calloc(mi_size, sizeof(MODE_INFO));
if (!cm->mip)
goto fail;
cm->prev_mip = vpx_calloc(mi_size, sizeof(MODE_INFO));
cm->prev_mip = (MODE_INFO *)vpx_calloc(mi_size, sizeof(MODE_INFO));
if (!cm->prev_mip)
goto fail;
cm->mi_grid_base = vpx_calloc(mi_size, sizeof(*cm->mi_grid_base));
cm->mi_grid_base =
(MODE_INFO **)vpx_calloc(mi_size, sizeof(*cm->mi_grid_base));
if (!cm->mi_grid_base)
goto fail;
cm->prev_mi_grid_base = vpx_calloc(mi_size, sizeof(*cm->prev_mi_grid_base));
cm->prev_mi_grid_base =
(MODE_INFO **)vpx_calloc(mi_size, sizeof(*cm->prev_mi_grid_base));
if (!cm->prev_mi_grid_base)
goto fail;
setup_mi(cm);
// Create the segmentation map structure and set to 0.
cm->last_frame_seg_map = vpx_calloc(cm->mi_rows * cm->mi_cols, 1);
cm->last_frame_seg_map = (uint8_t *)vpx_calloc(cm->mi_rows * cm->mi_cols, 1);
if (!cm->last_frame_seg_map)
goto fail;
......
......@@ -19,8 +19,9 @@ int vp9_alloc_internal_frame_buffers(InternalFrameBufferList *list) {
list->num_internal_frame_buffers =
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
list->int_fb = vpx_calloc(list->num_internal_frame_buffers,
sizeof(*list->int_fb));
list->int_fb =
(InternalFrameBuffer *)vpx_calloc(list->num_internal_frame_buffers,
sizeof(*list->int_fb));
return (list->int_fb == NULL);
}
......
......@@ -394,7 +394,7 @@ const vpx_codec_cx_pkt_t *vpx_codec_pkt_list_get(struct vpx_codec_pkt_list *list
*iter = list->pkts;
}
pkt = (const void *) * iter;
pkt = (const vpx_codec_cx_pkt_t *)*iter;
if ((size_t)(pkt - list->pkts) < list->cnt)
*iter = pkt + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment