if (!cm->prev_mip) return 1;
cm->mi_alloc_size = mi_size;
- cm->mi_grid_base = (MODE_INFO **)vpx_calloc(mi_size, sizeof(MODE_INFO *));
+ cm->mi_grid_base =
+ (MODE_INFO **)vpx_calloc(mi_size, sizeof(*cm->mi_grid_base));
if (!cm->mi_grid_base) return 1;
cm->prev_mi_grid_base =
- (MODE_INFO **)vpx_calloc(mi_size, sizeof(MODE_INFO *));
+ (MODE_INFO **)vpx_calloc(mi_size, sizeof(*cm->prev_mi_grid_base));
if (!cm->prev_mi_grid_base) return 1;
return 0;
vpx_free(cpi->skin_map);
CHECK_MEM_ERROR(
&cm->error, cpi->skin_map,
- vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(cpi->skin_map[0])));
+ vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(*cpi->skin_map)));
free_copy_partition_data(cpi);
alloc_copy_partition_data(cpi);
VP9_COMP *vp9_create_compressor(const VP9EncoderConfig *oxcf,
BufferPool *const pool) {
unsigned int i;
- VP9_COMP *volatile const cpi = vpx_memalign(32, sizeof(VP9_COMP));
+ VP9_COMP *volatile const cpi = vpx_memalign(32, sizeof(*cpi));
VP9_COMMON *volatile const cm = cpi != NULL ? &cpi->common : NULL;
if (!cm) return NULL;
CHECK_MEM_ERROR(
&cm->error, cpi->skin_map,
- vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(cpi->skin_map[0])));
+ vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(*cpi->skin_map)));
#if !CONFIG_REALTIME_ONLY
CHECK_MEM_ERROR(&cm->error, cpi->alt_ref_aq, vp9_alt_ref_aq_create());