[FFmpeg-cvslog] avcodec/h261dec: Inline constant

Andreas Rheinhardt git at videolan.org
Tue Mar 4 14:35:11 EET 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Jul  7 00:10:37 2024 +0200| [3474475e5853c2c109d90b95a299ffc380dd2b24] | committer: Andreas Rheinhardt

avcodec/h261dec: Inline constant

The value here has been set in ff_set_qscale() from
ff_mpeg1_dc_scale_table, all of whose entries are 8.

Reviewed-by: Ramiro Polla <ramiro.polla at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/h261dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 50ac53167d..116f1d43b2 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -262,7 +262,7 @@ static int h261_decode_block(H261DecContext *h, int16_t *block, int n, int coded
          * being coded as 1111 1111. */
         if (level == 255)
             level = 128;
-        block[0] = level * s->y_dc_scale;
+        block[0] = level * 8;
         i        = 1;
     } else if (coded) {
         // Run  Level   Code



More information about the ffmpeg-cvslog mailing list