summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-01 12:30:19 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-09 09:27:58 +0100
commitde29d482f9ee8d9cea9c58a1370ab99028adff3f (patch)
treedf54d165ee4893a898a2aef717fb9d0a591bc8f4
parent4fc4cf49315c96531a7675140502df222ae8e942 (diff)
avcodec/mpegvideo: Avoid macro/av_calloc for ordinary allocations
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/mpegvideo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index af433153f2..e9f2fb212a 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -632,9 +632,9 @@ int ff_mpv_init_context_frame(MpegEncContext *s)
if (s->out_format == FMT_H263) {
/* cbp values, cbp, ac_pred, pred_dir */
- if (!FF_ALLOCZ_TYPED_ARRAY(s->coded_block_base, y_size + (s->mb_height&1)*2*s->b8_stride) ||
- !FF_ALLOCZ_TYPED_ARRAY(s->cbp_table, mb_array_size) ||
- !FF_ALLOCZ_TYPED_ARRAY(s->pred_dir_table, mb_array_size))
+ if (!(s->coded_block_base = av_mallocz(y_size + (s->mb_height&1)*2*s->b8_stride)) ||
+ !(s->cbp_table = av_mallocz(mb_array_size)) ||
+ !(s->pred_dir_table = av_mallocz(mb_array_size)))
return AVERROR(ENOMEM);
s->coded_block = s->coded_block_base + s->b8_stride + 1;
}
@@ -652,9 +652,9 @@ int ff_mpv_init_context_frame(MpegEncContext *s)
}
/* which mb is an intra block, init macroblock skip table */
- if (!FF_ALLOC_TYPED_ARRAY(s->mbintra_table, mb_array_size) ||
+ if (!(s->mbintra_table = av_mallocz(mb_array_size)) ||
// Note the + 1 is for a quicker MPEG-4 slice_end detection
- !FF_ALLOCZ_TYPED_ARRAY(s->mbskip_table, mb_array_size + 2))
+ !(s->mbskip_table = av_mallocz(mb_array_size + 2)))
return AVERROR(ENOMEM);
memset(s->mbintra_table, 1, mb_array_size);