[FFmpeg-devel] [PATCH 25/35] avcodec/proresenc_anatoliy: shuffle declarations around in encode_dcs()
Clément Bœsch
u at pkh.me
Mon Dec 11 03:35:26 EET 2023
This makes the function closer to the same function in proresenc_kostya.
---
libavcodec/proresenc_anatoliy.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 4b72798689..56baeb9956 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -269,16 +269,15 @@ static av_always_inline int get_level(int val)
static void encode_dcs(PutBitContext *pb, int16_t *blocks,
int blocks_per_slice, int *qmat)
{
- int prev_dc, codebook;
- int i, sign, new_sign;
- int dc, delta, diff_sign, code;
+ int i;
+ int codebook = 5, code, dc, prev_dc, delta, sign, new_sign;
+ int diff_sign;
prev_dc = (blocks[0] - 0x4000) / qmat[0];
- codebook = MAKE_CODE(prev_dc);
- encode_vlc_codeword(pb, FIRST_DC_CB, codebook);
+ encode_vlc_codeword(pb, FIRST_DC_CB, MAKE_CODE(prev_dc));
+ sign = 0;
blocks += 64;
- codebook = 5; sign = 0;
for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
dc = (blocks[0] - 0x4000) / qmat[0];
delta = dc - prev_dc;
--
2.43.0
More information about the ffmpeg-devel
mailing list