ref: 6281a9abbb800afed44ed0810c6cdaabed29528c
parent: 29beeff11dd957af3f28d52fea9433ec43603bc7
author: Dmitry Kovalev <[email protected]>
date: Mon Mar 10 10:53:30 EDT 2014
Adding type casts to remove C++ compiler errors. Change-Id: I224e49955ad6c833d204feb8efc4056e37d206be
--- a/vp9/common/vp9_alloccommon.c
+++ b/vp9/common/vp9_alloccommon.c
@@ -101,22 +101,24 @@
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 @@
// 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,19 +172,21 @@
// 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;
@@ -189,7 +193,7 @@
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;
--- a/vp9/common/vp9_frame_buffers.c
+++ b/vp9/common/vp9_frame_buffers.c
@@ -19,8 +19,9 @@
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);
}
--- a/vpx/src/vpx_encoder.c
+++ b/vpx/src/vpx_encoder.c
@@ -394,7 +394,7 @@
*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;