[FFmpeg-cvslog] avcodec/h261enc: Inline constants

Andreas Rheinhardt git at videolan.org
Thu Jun 20 20:01:32 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Jun 15 06:53:37 2024 +0200| [bbb10f1d8342b8f8682b0594aa479fdb90387ef1] | committer: Andreas Rheinhardt

avcodec/h261enc: Inline constants

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/h261enc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index dd4419ec8c..8e08c749d1 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -133,8 +133,8 @@ static void h261_encode_motion(PutBitContext *pb, int val)
 {
     int sign, code;
     if (val == 0) {
-        code = 0;
-        put_bits(pb, ff_h261_mv_tab[code][1], ff_h261_mv_tab[code][0]);
+        // Corresponds to ff_h261_mv_tab[0]
+        put_bits(pb, 1, 1);
     } else {
         if (val > 15)
             val -= 32;
@@ -227,7 +227,7 @@ static void h261_encode_block(H261EncContext *h, int16_t *block, int n)
         }
     }
     if (last_index > -1)
-        put_bits(&s->pb, rl->table_vlc[0][1], rl->table_vlc[0][0]); // EOB
+        put_bits(&s->pb, 2, 0x2); // EOB
 }
 
 void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64],



More information about the ffmpeg-cvslog mailing list