mpeg12enc/mpeg4videoenc: add 'alternate_scan' private option.

Deprecate CODEC_FLAG_ALT_SCAN
This commit is contained in:
Anton Khirnov 2011-08-27 10:16:14 +02:00
parent 1f0c7020a1
commit 0e5d37309f
5 changed files with 7 additions and 1 deletions

View File

@ -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 */

View File

@ -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 },
};

View File

@ -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 },
};

View File

@ -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

View File

@ -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"},