[FFmpeg-cvslog] mpeg12enc/mpeg4videoenc: add 'alternate_scan' private option.
Anton Khirnov
git at videolan.org
Thu Sep 1 00:03:07 CEST 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Aug 27 10:16:14 2011 +0200| [0e5d37309f54f4377ec1f1a7ca41ea06d4ade923] | committer: Anton Khirnov
mpeg12enc/mpeg4videoenc: add 'alternate_scan' private option.
Deprecate CODEC_FLAG_ALT_SCAN
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e5d37309f54f4377ec1f1a7ca41ea06d4ade923
---
libavcodec/avcodec.h | 2 ++
libavcodec/mpeg12enc.c | 1 +
libavcodec/mpeg4videoenc.c | 1 +
libavcodec/mpegvideo_enc.c | 2 +-
libavcodec/options.c | 2 ++
5 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f65c14d..ce862b6 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -592,7 +592,9 @@ typedef struct RcOverride{
#define CODEC_FLAG_NORMALIZE_AQP 0x00020000 ///< Normalize adaptive quantization.
#define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< Use interlaced DCT.
#define CODEC_FLAG_LOW_DELAY 0x00080000 ///< Force low delay.
+#if FF_API_MPEGVIDEO_GLOBAL_OPTS
#define CODEC_FLAG_ALT_SCAN 0x00100000 ///< Use alternate scan.
+#endif
#define CODEC_FLAG_GLOBAL_HEADER 0x00400000 ///< Place global headers in extradata instead of every keyframe.
#define CODEC_FLAG_BITEXACT 0x00800000 ///< Use only bitexact stuff (except (I)DCT).
/* Fx : Flag for h263+ extra options */
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 30afa2e..a612501 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -946,6 +946,7 @@ static const AVOption mpeg1_options[] = {
static const AVOption mpeg2_options[] = {
COMMON_OPTS
{ "non_linear_quant", "Use nonlinear quantizer.", OFFSET(q_scale_type), FF_OPT_TYPE_INT, { 0 }, 0, 1, VE },
+ { "alternate_scan", "Enable alternate scantable.", OFFSET(alternate_scan), FF_OPT_TYPE_INT, { 0 }, 0, 1, VE },
{ NULL },
};
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index ad3e604..b86d505 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -1280,6 +1280,7 @@ void ff_mpeg4_encode_video_packet_header(MpegEncContext *s)
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = {
{ "data_partitioning", "Use data partitioning.", OFFSET(data_partitioning), FF_OPT_TYPE_INT, { 0 }, 0, 1, VE },
+ { "alternate_scan", "Enable alternate scantable.", OFFSET(alternate_scan), FF_OPT_TYPE_INT, { 0 }, 0, 1, VE },
{ NULL },
};
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 47f431c..042b91d 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -338,8 +338,8 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
s->obmc= !!(s->flags & CODEC_FLAG_OBMC);
s->loop_filter= !!(s->flags & CODEC_FLAG_LOOP_FILTER);
- s->alternate_scan= !!(s->flags & CODEC_FLAG_ALT_SCAN);
#if FF_API_MPEGVIDEO_GLOBAL_OPTS
+ s->alternate_scan= !!(s->flags & CODEC_FLAG_ALT_SCAN);
s->intra_vlc_format= !!(s->flags2 & CODEC_FLAG2_INTRA_VLC);
s->q_scale_type= !!(s->flags2 & CODEC_FLAG2_NON_LINEAR_QUANT);
#endif
diff --git a/libavcodec/options.c b/libavcodec/options.c
index 843064f..74ff07c 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -97,7 +97,9 @@ static const AVOption options[]={
{"naq", "normalize adaptive quantization", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_NORMALIZE_AQP }, INT_MIN, INT_MAX, V|E, "flags"},
{"ildct", "use interlaced dct", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_INTERLACED_DCT }, INT_MIN, INT_MAX, V|E, "flags"},
{"low_delay", "force low delay", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_LOW_DELAY }, INT_MIN, INT_MAX, V|D|E, "flags"},
+#if FF_API_MPEGVIDEO_GLOBAL_OPTS
{"alt", "enable alternate scantable (mpeg2/mpeg4)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_ALT_SCAN }, INT_MIN, INT_MAX, V|E, "flags"},
+#endif
{"global_header", "place global headers in extradata instead of every keyframe", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_GLOBAL_HEADER }, INT_MIN, INT_MAX, V|A|E, "flags"},
{"bitexact", "use only bitexact stuff (except (i)dct)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_BITEXACT }, INT_MIN, INT_MAX, A|V|S|D|E, "flags"},
{"aic", "h263 advanced intra coding / mpeg4 ac prediction", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_AC_PRED }, INT_MIN, INT_MAX, V|E, "flags"},
More information about the ffmpeg-cvslog
mailing list