[FFmpeg-cvslog] h261: Set 'still image mode off' in picture header

Stian Selnes git at videolan.org
Thu Jul 9 00:40:43 CEST 2015


ffmpeg | branch: master | Stian Selnes <stian at pexip.com> | Fri Dec 12 16:08:19 2014 +0100| [dc1de0b958836545339611e9c050a1d4fdded263] | committer: Luca Barbato

h261: Set 'still image mode off' in picture header

Ref H.261 recommendation section 4.2.1.3, setting the still image flag
to 1 disables still image mode. Some decoders require this in order to
decode the bitstream as normal video.

Fixes H.261 calls to Cisco E20.

Also, reserved (aka spare) bits should be set to 1 unless specified
otherwise.

Bug-Id: 872
CC: libav-stable at libav.org

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

 libavcodec/h261enc.c          |    4 ++--
 tests/ref/vsynth/vsynth1-h261 |    2 +-
 tests/ref/vsynth/vsynth2-h261 |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index db81f83..30ba137 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -70,8 +70,8 @@ void ff_h261_encode_picture_header(MpegEncContext *s, int picture_number)
 
     put_bits(&s->pb, 1, format); /* 0 == QCIF, 1 == CIF */
 
-    put_bits(&s->pb, 1, 0); /* still image mode */
-    put_bits(&s->pb, 1, 0); /* reserved */
+    put_bits(&s->pb, 1, 1); /* still image mode */
+    put_bits(&s->pb, 1, 1); /* reserved */
 
     put_bits(&s->pb, 1, 0); /* no PEI */
     if (format == 0)
diff --git a/tests/ref/vsynth/vsynth1-h261 b/tests/ref/vsynth/vsynth1-h261
index b350e6f..4526f57 100644
--- a/tests/ref/vsynth/vsynth1-h261
+++ b/tests/ref/vsynth/vsynth1-h261
@@ -1,4 +1,4 @@
-d3397557ad8a02d28cb5feeb0b51e5c8 *tests/data/fate/vsynth1-h261.avi
+34263080870c91c5e6c3c7dca799c50d *tests/data/fate/vsynth1-h261.avi
 707576 tests/data/fate/vsynth1-h261.avi
 716e83cb51afb1246bfaa80967df48ea *tests/data/fate/vsynth1-h261.out.rawvideo
 stddev:    9.11 PSNR: 28.93 MAXDIFF:  113 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-h261 b/tests/ref/vsynth/vsynth2-h261
index 2c3d99b..611da55 100644
--- a/tests/ref/vsynth/vsynth2-h261
+++ b/tests/ref/vsynth/vsynth2-h261
@@ -1,4 +1,4 @@
-b5187bd5be8b422ff220f297de90fbcb *tests/data/fate/vsynth2-h261.avi
+70e9342de71456cd6fbe9a771cceefd5 *tests/data/fate/vsynth2-h261.avi
 257928 tests/data/fate/vsynth2-h261.avi
 1a9bb0d52bd24cb62162c5e3c2aed317 *tests/data/fate/vsynth2-h261.out.rawvideo
 stddev:    7.21 PSNR: 30.97 MAXDIFF:   96 bytes:  7603200/  7603200



More information about the ffmpeg-cvslog mailing list