[FFmpeg-cvslog] avcodec/proresenc_anatoliy: shuffle declarations around in encode_dcs()

Clément Bœsch git at videolan.org
Wed Jan 10 15:22:33 EET 2024


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Mon Dec 11 02:07:48 2023 +0100| [1aa7d504ecd90c37687a06480c5915b99970ccb6] | committer: Clément Bœsch

avcodec/proresenc_anatoliy: shuffle declarations around in encode_dcs()

This makes the function closer to the same function in proresenc_kostya.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1aa7d504ecd90c37687a06480c5915b99970ccb6
---

 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 5a0e8234f0..203136e574 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;



More information about the ffmpeg-cvslog mailing list