Originally committed as revision 25275 to svn://svn.ffmpeg.org/ffmpeg/trunktags/n0.8
@@ -66,6 +66,9 @@ | |||||
#ifndef FF_API_SUBTITLE_OLD | #ifndef FF_API_SUBTITLE_OLD | ||||
#define FF_API_SUBTITLE_OLD (LIBAVCODEC_VERSION_MAJOR < 53) | #define FF_API_SUBTITLE_OLD (LIBAVCODEC_VERSION_MAJOR < 53) | ||||
#endif | #endif | ||||
#ifndef FF_API_USE_LPC | |||||
#define FF_API_USE_LPC (LIBAVCODEC_VERSION_MAJOR < 53) | |||||
#endif | |||||
#define AV_NOPTS_VALUE INT64_C(0x8000000000000000) | #define AV_NOPTS_VALUE INT64_C(0x8000000000000000) | ||||
#define AV_TIME_BASE 1000000 | #define AV_TIME_BASE 1000000 | ||||
@@ -2453,7 +2456,7 @@ typedef struct AVCodecContext { | |||||
int compression_level; | int compression_level; | ||||
#define FF_COMPRESSION_DEFAULT -1 | #define FF_COMPRESSION_DEFAULT -1 | ||||
#if LIBAVCODEC_VERSION_MAJOR < 53 | |||||
#if FF_API_USE_LPC | |||||
/** | /** | ||||
* Sets whether to use LPC mode - used by FLAC encoder. | * Sets whether to use LPC mode - used by FLAC encoder. | ||||
* - encoding: Set by user. | * - encoding: Set by user. | ||||
@@ -288,7 +288,7 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) | |||||
s->options.max_partition_order = ((int[]){ 2, 2, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8})[level]; | s->options.max_partition_order = ((int[]){ 2, 2, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8})[level]; | ||||
/* set compression option overrides from AVCodecContext */ | /* set compression option overrides from AVCodecContext */ | ||||
#if LIBAVCODEC_VERSION_MAJOR < 53 | |||||
#if FF_API_USE_LPC | |||||
/* for compatibility with deprecated AVCodecContext.use_lpc */ | /* for compatibility with deprecated AVCodecContext.use_lpc */ | ||||
if (avctx->use_lpc == 0) { | if (avctx->use_lpc == 0) { | ||||
s->options.lpc_type = AV_LPC_TYPE_FIXED; | s->options.lpc_type = AV_LPC_TYPE_FIXED; | ||||
@@ -382,7 +382,7 @@ static const AVOption options[]={ | |||||
{"ivlc", "intra vlc table", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_INTRA_VLC, INT_MIN, INT_MAX, V|E, "flags2"}, | {"ivlc", "intra vlc table", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_INTRA_VLC, INT_MIN, INT_MAX, V|E, "flags2"}, | ||||
{"b_sensitivity", "adjusts sensitivity of b_frame_strategy 1", OFFSET(b_sensitivity), FF_OPT_TYPE_INT, 40, 1, INT_MAX, V|E}, | {"b_sensitivity", "adjusts sensitivity of b_frame_strategy 1", OFFSET(b_sensitivity), FF_OPT_TYPE_INT, 40, 1, INT_MAX, V|E}, | ||||
{"compression_level", NULL, OFFSET(compression_level), FF_OPT_TYPE_INT, FF_COMPRESSION_DEFAULT, INT_MIN, INT_MAX, V|A|E}, | {"compression_level", NULL, OFFSET(compression_level), FF_OPT_TYPE_INT, FF_COMPRESSION_DEFAULT, INT_MIN, INT_MAX, V|A|E}, | ||||
#if LIBAVCODEC_VERSION_MAJOR < 53 | |||||
#if FF_API_USE_LPC | |||||
{"use_lpc", "sets whether to use LPC mode (FLAC)", OFFSET(use_lpc), FF_OPT_TYPE_INT, -1, INT_MIN, INT_MAX, A|E}, | {"use_lpc", "sets whether to use LPC mode (FLAC)", OFFSET(use_lpc), FF_OPT_TYPE_INT, -1, INT_MIN, INT_MAX, A|E}, | ||||
#endif | #endif | ||||
{"lpc_coeff_precision", "LPC coefficient precision (FLAC)", OFFSET(lpc_coeff_precision), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, A|E}, | {"lpc_coeff_precision", "LPC coefficient precision (FLAC)", OFFSET(lpc_coeff_precision), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, A|E}, | ||||