mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
avcodec: Set flags2 default value depending on availability
This makes the code compile when FF_API_X264_GLOBAL_OPTS or FF_API_LAME_GLOBAL_OPTS is 0. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
76718f3fb7
commit
adc85ce20b
@ -351,7 +351,17 @@ static const AVOption options[]={
|
||||
{"nr", "noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
|
||||
{"rc_init_occupancy", "number of bits which should be loaded into the rc buffer before decoding starts", OFFSET(rc_initial_buffer_occupancy), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
|
||||
{"inter_threshold", NULL, OFFSET(inter_threshold), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
|
||||
{"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.dbl = CODEC_FLAG2_FASTPSKIP|CODEC_FLAG2_BIT_RESERVOIR|CODEC_FLAG2_PSY|CODEC_FLAG2_MBTREE }, 0, UINT_MAX, V|A|E|D, "flags2"},
|
||||
#if FF_API_X264_GLOBAL_OPTS
|
||||
#define X264_DEFAULTS CODEC_FLAG2_FASTPSKIP|CODEC_FLAG2_PSY|CODEC_FLAG2_MBTREE
|
||||
#else
|
||||
#define X264_DEFAULTS 0
|
||||
#endif
|
||||
#if FF_API_LAME_GLOBAL_OPTS
|
||||
#define LAME_DEFAULTS CODEC_FLAG2_BIT_RESERVOIR
|
||||
#else
|
||||
#define LAME_DEFAULTS 0
|
||||
#endif
|
||||
{"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.dbl = X264_DEFAULTS|LAME_DEFAULTS }, 0, UINT_MAX, V|A|E|D, "flags2"},
|
||||
{"error", NULL, OFFSET(error_rate), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
|
||||
#if FF_API_ANTIALIAS_ALGO
|
||||
{"antialias", "MP3 antialias algorithm", OFFSET(antialias_algo), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|D, "aa"},
|
||||
|
Loading…
Reference in New Issue
Block a user