diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-14 21:31:53 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-20 01:03:52 +0200 |
commit | 1ea365082318f06cd42a8b37dd0c7724b599c821 (patch) | |
tree | 4df48a8b9f4614803fd2a88c29ad2ff7f7070294 /libavfilter/vf_minterpolate.c | |
parent | 4b154743163ffbe3fdc50759c0c55dc854636488 (diff) |
Replace all occurences of av_mallocz_array() by av_calloc()
They do the same.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_minterpolate.c')
-rw-r--r-- | libavfilter/vf_minterpolate.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c index 33a4059042..f4e791a19e 100644 --- a/libavfilter/vf_minterpolate.c +++ b/libavfilter/vf_minterpolate.c @@ -353,7 +353,7 @@ static int config_input(AVFilterLink *inlink) for (i = 0; i < NB_FRAMES; i++) { Frame *frame = &mi_ctx->frames[i]; - frame->blocks = av_mallocz_array(mi_ctx->b_count, sizeof(Block)); + frame->blocks = av_calloc(mi_ctx->b_count, sizeof(*frame->blocks)); if (!frame->blocks) return AVERROR(ENOMEM); } @@ -373,19 +373,19 @@ static int config_input(AVFilterLink *inlink) else if (mi_ctx->me_mode == ME_MODE_BILAT) me_ctx->get_cost = &get_sbad_ob; - mi_ctx->pixel_mvs = av_mallocz_array(width * height, sizeof(PixelMVS)); - mi_ctx->pixel_weights = av_mallocz_array(width * height, sizeof(PixelWeights)); - mi_ctx->pixel_refs = av_mallocz_array(width * height, sizeof(PixelRefs)); + mi_ctx->pixel_mvs = av_calloc(width * height, sizeof(*mi_ctx->pixel_mvs)); + mi_ctx->pixel_weights = av_calloc(width * height, sizeof(*mi_ctx->pixel_weights)); + mi_ctx->pixel_refs = av_calloc(width * height, sizeof(*mi_ctx->pixel_refs)); if (!mi_ctx->pixel_mvs || !mi_ctx->pixel_weights || !mi_ctx->pixel_refs) return AVERROR(ENOMEM); if (mi_ctx->me_mode == ME_MODE_BILAT) - if (!(mi_ctx->int_blocks = av_mallocz_array(mi_ctx->b_count, sizeof(Block)))) + if (!FF_ALLOCZ_TYPED_ARRAY(mi_ctx->int_blocks, mi_ctx->b_count)) return AVERROR(ENOMEM); if (mi_ctx->me_method == AV_ME_METHOD_EPZS) { for (i = 0; i < 3; i++) { - mi_ctx->mv_table[i] = av_mallocz_array(mi_ctx->b_count, sizeof(*mi_ctx->mv_table[0])); + mi_ctx->mv_table[i] = av_calloc(mi_ctx->b_count, sizeof(*mi_ctx->mv_table[0])); if (!mi_ctx->mv_table[i]) return AVERROR(ENOMEM); } @@ -601,7 +601,7 @@ static int var_size_bme(MIContext *mi_ctx, Block *block, int x_mb, int y_mb, int } if (!block->subs) { - block->subs = av_mallocz_array(4, sizeof(Block)); + block->subs = av_mallocz(4 * sizeof(*block->subs)); if (!block->subs) return AVERROR(ENOMEM); } |