[FFmpeg-cvslog] avcodec/mpeg12enc: Combine put_bits()

Andreas Rheinhardt git at videolan.org
Wed May 21 04:27:30 EEST 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat May 17 02:36:37 2025 +0200| [0b3dae6c636d8409279fb06ee0e294704a62533b] | committer: Andreas Rheinhardt

avcodec/mpeg12enc: Combine put_bits()

This is a 16bit field in the spec, so using a single
put_bits() to write it is more natural.

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

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

 libavcodec/mpeg12enc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 9d0a8e4170..231740bcc8 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -454,8 +454,7 @@ static int mpeg1_encode_picture_header(MPVMainEncContext *const m)
 
             put_bits(&s->pb, 1, 1);     // reserved_bit
             put_bits(&s->pb, 7, fpa_type); // S3D_video_format_type
-            put_bits(&s->pb, 8, 0x04);  // reserved_data[0]
-            put_bits(&s->pb, 8, 0xFF);  // reserved_data[1]
+            put_bits(&s->pb, 16, 0x04FF);  // reserved_data
         }
     }
 



More information about the ffmpeg-cvslog mailing list