From 88262ca87df1054209ef6db255b521e412fd78fc Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 27 Aug 2011 09:57:36 +0200 Subject: mpeg2enc: add 'non_linear_quant' private option Deprecate CODEC_FLAG2_NON_LINEAR_QUANT --- libavcodec/mpeg12enc.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'libavcodec/mpeg12enc.c') diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index dd433215f3..30afa2eb46 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -934,9 +934,18 @@ static void mpeg1_encode_block(MpegEncContext *s, #define OFFSET(x) offsetof(MpegEncContext, x) #define VE AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM -static const AVOption options[] = { - { "intra_vlc", "Use MPEG-2 intra VLC table.", OFFSET(intra_vlc_format), FF_OPT_TYPE_INT, { 0 }, 0, 1, VE }, +#define COMMON_OPTS\ + { "intra_vlc", "Use MPEG-2 intra VLC table.", OFFSET(intra_vlc_format), FF_OPT_TYPE_INT, { 0 }, 0, 1, VE },\ { "drop_frame_timecode", "Timecode is in drop frame format.", OFFSET(drop_frame_timecode), FF_OPT_TYPE_INT, { 0 }, 0, 1, VE}, + +static const AVOption mpeg1_options[] = { + COMMON_OPTS + { NULL }, +}; + +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 }, { NULL }, }; @@ -944,7 +953,7 @@ static const AVOption options[] = { static const AVClass mpeg## x ##_class = {\ .class_name = "mpeg" #x "video encoder",\ .item_name = av_default_item_name,\ - .option = options,\ + .option = mpeg## x ##_options,\ .version = LIBAVUTIL_VERSION_INT,\ }; -- cgit v1.2.3