diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-08-27 09:57:36 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-08-31 13:21:59 +0200 |
commit | 88262ca87df1054209ef6db255b521e412fd78fc (patch) | |
tree | 65624e7716e57ba6873c470380c3a5dd8f1cca31 /libavcodec/mpeg12enc.c | |
parent | 2c5e1efc093084f1cb4e55b8c06c267801828965 (diff) | |
download | ffmpeg-88262ca87df1054209ef6db255b521e412fd78fc.tar.gz |
mpeg2enc: add 'non_linear_quant' private option
Deprecate CODEC_FLAG2_NON_LINEAR_QUANT
Diffstat (limited to 'libavcodec/mpeg12enc.c')
-rw-r--r-- | libavcodec/mpeg12enc.c | 15 |
1 files changed, 12 insertions, 3 deletions
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,\ }; |