[FFmpeg-devel] [PATCH 48/57] avcodec/msmpeg4enc: Combine writing bits

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Wed Jun 12 16:48:44 EEST 2024


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/msmpeg4enc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c
index 642a0ff100..3103a73663 100644
--- a/libavcodec/msmpeg4enc.c
+++ b/libavcodec/msmpeg4enc.c
@@ -71,8 +71,7 @@ void ff_msmpeg4_code012(PutBitContext *pb, int n)
     if (n == 0) {
         put_bits(pb, 1, 0);
     } else {
-        put_bits(pb, 1, 1);
-        put_bits(pb, 1, (n >= 2));
+        put_bits(pb, 2, 2 | (n >= 2));
     }
 }
 
-- 
2.40.1



More information about the ffmpeg-devel mailing list