[FFmpeg-cvslog] avcodec/proresenc_anatoliy: rename new_code/code to code/codebook
Clément Bœsch
git at videolan.org
Wed Jan 10 15:22:12 EET 2024
ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Mon Dec 11 01:47:01 2023 +0100| [43baba4647fa6bb23d67c6c0c00da762dbac4075] | committer: Clément Bœsch
avcodec/proresenc_anatoliy: rename new_code/code to code/codebook
This makes the function closer to encode_dcs() in proresenc_kostya.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=43baba4647fa6bb23d67c6c0c00da762dbac4075
---
libavcodec/proresenc_anatoliy.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index d037efd837..691fc614c7 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -270,24 +270,24 @@ static av_always_inline int get_level(int val)
static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
int blocks_per_slice, int *qmat)
{
- int prev_dc, code;
+ int prev_dc, codebook;
int i, sign, idx;
- int new_dc, delta, diff_sign, new_code;
+ int new_dc, delta, diff_sign, code;
prev_dc = (in[0] - 0x4000) / qmat[0];
- code = TO_GOLOMB(prev_dc);
- encode_vlc_codeword(pb, FIRST_DC_CB, code);
+ codebook = TO_GOLOMB(prev_dc);
+ encode_vlc_codeword(pb, FIRST_DC_CB, codebook);
- code = 5; sign = 0; idx = 64;
+ codebook = 5; sign = 0; idx = 64;
for (i = 1; i < blocks_per_slice; i++, idx += 64) {
new_dc = (in[idx] - 0x4000) / qmat[0];
delta = new_dc - prev_dc;
diff_sign = DIFF_SIGN(delta, sign);
- new_code = TO_GOLOMB2(get_level(delta), diff_sign);
+ code = TO_GOLOMB2(get_level(delta), diff_sign);
- encode_vlc_codeword(pb, ff_prores_dc_codebook[FFMIN(code, 6)], new_code);
+ encode_vlc_codeword(pb, ff_prores_dc_codebook[FFMIN(codebook, 6)], code);
- code = new_code;
+ codebook = code;
sign = delta >> 31;
prev_dc = new_dc;
}
More information about the ffmpeg-cvslog
mailing list