avcodec/proresenc_anatoliy: execute codebook FFMIN() at assignment

This makes the function closer to encode_dcs() in proresenc_kostya.
This commit is contained in:
Clément Bœsch 2023-12-11 01:48:46 +01:00
parent 43baba4647
commit 8e42d3aba0
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}