diff options
author | Clément Bœsch <u@pkh.me> | 2023-12-11 01:48:46 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2024-01-10 14:08:00 +0100 |
commit | 8e42d3aba01e901bd99a95197714fe5b96d2fea8 (patch) | |
tree | 4e0eee44c2849a0b0f16235ab0f29a3893403348 | |
parent | 43baba4647fa6bb23d67c6c0c00da762dbac4075 (diff) | |
download | ffmpeg-8e42d3aba01e901bd99a95197714fe5b96d2fea8.tar.gz |
avcodec/proresenc_anatoliy: execute codebook FFMIN() at assignment
This makes the function closer to encode_dcs() in proresenc_kostya.
-rw-r--r-- | libavcodec/proresenc_anatoliy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 691fc614c7..733b119e5f 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -285,9 +285,9 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t *in, diff_sign = DIFF_SIGN(delta, sign); code = TO_GOLOMB2(get_level(delta), diff_sign); - encode_vlc_codeword(pb, ff_prores_dc_codebook[FFMIN(codebook, 6)], code); + encode_vlc_codeword(pb, ff_prores_dc_codebook[codebook], code); - codebook = code; + codebook = FFMIN(code, 6); sign = delta >> 31; prev_dc = new_dc; } |