[FFmpeg-devel] [PATCH 2/2] avcodec/mpegvideo: cosmetics
lance.lmwang at gmail.com
lance.lmwang at gmail.com
Sun May 10 18:39:30 EEST 2020
From: Limin Wang <lance.lmwang at gmail.com>
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
libavcodec/mpegvideo.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 561062f..b993813 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -725,12 +725,18 @@ static int init_context_frame(MpegEncContext *s)
if (s->encoding) {
/* Allocate MV tables */
- FF_ALLOCZ_OR_GOTO(s->avctx, s->p_mv_table_base, mv_table_size * 2 * sizeof(*s->p_mv_table_base), fail)
- FF_ALLOCZ_OR_GOTO(s->avctx, s->b_forw_mv_table_base, mv_table_size * 2 * sizeof(*s->b_forw_mv_table_base), fail)
- FF_ALLOCZ_OR_GOTO(s->avctx, s->b_back_mv_table_base, mv_table_size * 2 * sizeof(*s->b_back_mv_table_base), fail)
- FF_ALLOCZ_OR_GOTO(s->avctx, s->b_bidir_forw_mv_table_base, mv_table_size * 2 * sizeof(*s->b_bidir_forw_mv_table_base), fail)
- FF_ALLOCZ_OR_GOTO(s->avctx, s->b_bidir_back_mv_table_base, mv_table_size * 2 * sizeof(*s->b_bidir_back_mv_table_base), fail)
- FF_ALLOCZ_OR_GOTO(s->avctx, s->b_direct_mv_table_base, mv_table_size * 2 * sizeof(*s->b_direct_mv_table_base), fail)
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->p_mv_table_base,
+ mv_table_size * 2 * sizeof(*s->p_mv_table_base), fail)
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->b_forw_mv_table_base,
+ mv_table_size * 2 * sizeof(*s->b_forw_mv_table_base), fail)
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->b_back_mv_table_base,
+ mv_table_size * 2 * sizeof(*s->b_back_mv_table_base), fail)
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->b_bidir_forw_mv_table_base,
+ mv_table_size * 2 * sizeof(*s->b_bidir_forw_mv_table_base), fail)
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->b_bidir_back_mv_table_base,
+ mv_table_size * 2 * sizeof(*s->b_bidir_back_mv_table_base), fail)
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->b_direct_mv_table_base,
+ mv_table_size * 2 * sizeof(*s->b_direct_mv_table_base), fail)
s->p_mv_table = s->p_mv_table_base + s->mb_stride + 1;
s->b_forw_mv_table = s->b_forw_mv_table_base + s->mb_stride + 1;
s->b_back_mv_table = s->b_back_mv_table_base + s->mb_stride + 1;
@@ -764,11 +770,14 @@ static int init_context_frame(MpegEncContext *s)
s->b_field_mv_table[i][j][k] = s->b_field_mv_table_base[i][j][k] +
s->mb_stride + 1;
}
- FF_ALLOCZ_OR_GOTO(s->avctx, s->b_field_select_table [i][j], mb_array_size * 2 * sizeof(*s->b_field_select_table [i][j]), fail)
- FF_ALLOCZ_OR_GOTO(s->avctx, s->p_field_mv_table_base[i][j], mv_table_size * 2 * sizeof(*s->p_field_mv_table_base[i][j]), fail)
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->b_field_select_table [i][j],
+ mb_array_size * 2 * sizeof(*s->b_field_select_table [i][j]), fail)
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->p_field_mv_table_base[i][j],
+ mv_table_size * 2 * sizeof(*s->p_field_mv_table_base[i][j]), fail)
s->p_field_mv_table[i][j] = s->p_field_mv_table_base[i][j] + s->mb_stride + 1;
}
- FF_ALLOCZ_OR_GOTO(s->avctx, s->p_field_select_table[i], mb_array_size * 2 * sizeof(*s->p_field_select_table[i]), fail)
+ FF_ALLOCZ_OR_GOTO(s->avctx, s->p_field_select_table[i],
+ mb_array_size * 2 * sizeof(*s->p_field_select_table[i]), fail)
}
}
if (s->out_format == FMT_H263) {
--
1.8.3.1
More information about the ffmpeg-devel
mailing list