[FFmpeg-devel] [PATCH 2/2] avcodec/mpegvideo: cosmetics

Michael Niedermayer michael at niedermayer.cc
Mon May 11 19:59:15 EEST 2020


On Sun, May 10, 2020 at 11:39:30PM +0800, lance.lmwang at gmail.com wrote:
> 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;

I this this is more readable before the change


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200511/b2a121e8/attachment.sig>


More information about the ffmpeg-devel mailing list