[FFmpeg-devel] [PATCH] libavcodec/libxvid: code cleanup (replace magic numbers)

Sean McGovern gseanmcg at gmail.com
Fri May 31 00:23:59 EEST 2024


On Thu, May 30, 2024 at 5:20 PM Ramiro Polla <ramiro.polla at gmail.com> wrote:
>
> ---
>  libavcodec/libxvid.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
> index b9ac39429d..a490f16b3f 100644
> --- a/libavcodec/libxvid.c
> +++ b/libavcodec/libxvid.c
> @@ -422,13 +422,13 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx)
>
>      /* Decide how we should decide blocks */
>      switch (avctx->mb_decision) {
> -    case 2:
> +    case FF_MB_DECISION_RD:
>          x->vop_flags |=  XVID_VOP_MODEDECISION_RD;
>          x->me_flags  |=  XVID_ME_HALFPELREFINE8_RD    |
>                           XVID_ME_QUARTERPELREFINE8_RD |
>                           XVID_ME_EXTSEARCH_RD         |
>                           XVID_ME_CHECKPREDICTION_RD;
> -    case 1:
> +    case FF_MB_DECISION_BITS:
>          if (!(x->vop_flags & XVID_VOP_MODEDECISION_RD))
>              x->vop_flags |= XVID_VOP_FAST_MODEDECISION_RD;
>          x->me_flags |= XVID_ME_HALFPELREFINE16_RD |
> --
> 2.30.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

This gets a +1 from me.

-- Sean McGover


More information about the ffmpeg-devel mailing list