[FFmpeg-devel] [PATCH 28/35] avcodec/proresenc_anatoliy: cosmetics to make encode_dcs() identical to the one in Kostya encoder

Stefano Sabatini stefasab at gmail.com
Sun Dec 24 01:46:21 EET 2023


On date Monday 2023-12-11 02:35:29 +0100, Clément Bœsch wrote:
> ---
>  libavcodec/proresenc_anatoliy.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
> index aed5c68b1b..0318379461 100644
> --- a/libavcodec/proresenc_anatoliy.c
> +++ b/libavcodec/proresenc_anatoliy.c
> @@ -277,17 +277,15 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
>      blocks  += 64;
>  
>      for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
> -        dc        = (blocks[0] - 0x4000) / scale;
> -        delta     = dc - prev_dc;
> -        new_sign  = GET_SIGN(delta);
> -        delta     = (delta ^ sign) - sign;
> -        code      = MAKE_CODE(delta);
> -
> +        dc       = (blocks[0] - 0x4000) / scale;
> +        delta    = dc - prev_dc;
> +        new_sign = GET_SIGN(delta);
> +        delta    = (delta ^ sign) - sign;
> +        code     = MAKE_CODE(delta);
>          encode_vlc_codeword(pb, ff_prores_dc_codebook[codebook], code);
> -
> -        codebook  = FFMIN(code, 6);
> -        sign      = new_sign;
> -        prev_dc   = dc;
> +        codebook = FFMIN(code, 6);
> +        sign     = new_sign;
> +        prev_dc  = dc;

LGTM.


More information about the ffmpeg-devel mailing list