[FFmpeg-devel] [PATCH] avcodec/mpegvideo_enc: Remove slice structured mode from H.263 as well as the code automatically enabing it

Michael Niedermayer michaelni at gmx.at
Sun Nov 22 20:35:12 CET 2015


From: Michael Niedermayer <michael at niedermayer.cc>

There is no such thing as a slice structured mode in the original version 1  H.263,
that mode was added in H.263+ in 1998. Also the headers for slice structured mode
are not part of the older version 1 and this would result in unplayable files

An alternative to this patch would be to merge the H263 and H263P AVCodecs and use
other means to distinguish the older and newer versions.

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/mpegvideo_enc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 5c12a07..dfc0ba4 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -917,7 +917,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
     if (s->slice_context_count > 1) {
         s->rtp_mode = 1;
 
-        if (avctx->codec_id == AV_CODEC_ID_H263 || avctx->codec_id == AV_CODEC_ID_H263P)
+        if (avctx->codec_id == AV_CODEC_ID_H263P)
             s->h263_slice_structured = 1;
     }
 
@@ -4681,7 +4681,6 @@ int ff_dct_quantize_c(MpegEncContext *s,
 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 static const AVOption h263_options[] = {
     { "obmc",         "use overlapped block motion compensation.", OFFSET(obmc), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
-    { "structured_slices","Write slice start position at every GOB header instead of just GOB number.", OFFSET(h263_slice_structured), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE},
     { "mb_info",      "emit macroblock info for RFC 2190 packetization, the parameter value is the maximum payload size", OFFSET(mb_info), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
     FF_MPV_COMMON_OPTS
     { NULL },
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list