[FFmpeg-cvslog] avcodec/proresenc_anatoliy: rename new_dc to dc

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


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Mon Dec 11 01:57:37 2023 +0100| [9c7f6d89fdff7f9fc6f36f6f86b657092dafff92] | committer: Clément Bœsch

avcodec/proresenc_anatoliy: rename new_dc to dc

This makes the function closer to encode_dcs() in proresenc_kostya.

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

 libavcodec/proresenc_anatoliy.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 0d1b84face..5a63620b18 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -272,7 +272,7 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 {
     int prev_dc, codebook;
     int i, sign, new_sign;
-    int new_dc, delta, diff_sign, code;
+    int dc, delta, diff_sign, code;
 
     prev_dc = (blocks[0] - 0x4000) / qmat[0];
     codebook = TO_GOLOMB(prev_dc);
@@ -281,8 +281,8 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 
     codebook = 5; sign = 0;
     for (i = 1; i < blocks_per_slice; i++, blocks += 64) {
-        new_dc    = (blocks[0] - 0x4000) / qmat[0];
-        delta     = new_dc - prev_dc;
+        dc        = (blocks[0] - 0x4000) / qmat[0];
+        delta     = dc - prev_dc;
         new_sign  = GET_SIGN(delta);
         diff_sign = new_sign ^ sign;
         code      = TO_GOLOMB2(get_level(delta), diff_sign);
@@ -291,7 +291,7 @@ static void encode_dcs(PutBitContext *pb, int16_t *blocks,
 
         codebook  = FFMIN(code, 6);
         sign      = new_sign;
-        prev_dc   = new_dc;
+        prev_dc   = dc;
     }
 }
 



More information about the ffmpeg-cvslog mailing list