diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-09-05 16:42:44 +0200 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-09-05 16:42:44 +0200 |
commit | b27ddffbfb29f456d43c2f155eef5230b940a48b (patch) | |
tree | 85b29b1913c026ca408711e253f42a8e34a0d320 | |
parent | 144fb06806664d4f3bc681ed1408383baeb515f4 (diff) | |
parent | dc70c19476e76f1118df73b5d97cc76f0e5f6f6c (diff) | |
download | ffmpeg-b27ddffbfb29f456d43c2f155eef5230b940a48b.tar.gz |
Merge commit 'dc70c19476e76f1118df73b5d97cc76f0e5f6f6c'
* commit 'dc70c19476e76f1118df73b5d97cc76f0e5f6f6c':
lavc: Drop deprecated request_channels related functions
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r-- | libavcodec/aac_ac3_parser.c | 8 | ||||
-rw-r--r-- | libavcodec/ac3dec.c | 8 | ||||
-rw-r--r-- | libavcodec/avcodec.h | 10 | ||||
-rw-r--r-- | libavcodec/dcadec.c | 37 | ||||
-rw-r--r-- | libavcodec/mlp_parser.c | 24 | ||||
-rw-r--r-- | libavcodec/mlpdec.c | 13 | ||||
-rw-r--r-- | libavcodec/options_table.h | 3 | ||||
-rw-r--r-- | libavcodec/version.h | 3 |
8 files changed, 1 insertions, 105 deletions
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c index 7fefda5ce9..2f7d56807c 100644 --- a/libavcodec/aac_ac3_parser.c +++ b/libavcodec/aac_ac3_parser.c @@ -84,14 +84,6 @@ get_next: avctx->sample_rate = s->sample_rate; /* (E-)AC-3: allow downmixing to stereo or mono */ -#if FF_API_REQUEST_CHANNELS -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->request_channels == 1) - avctx->request_channel_layout = AV_CH_LAYOUT_MONO; - else if (avctx->request_channels == 2) - avctx->request_channel_layout = AV_CH_LAYOUT_STEREO; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (s->channels > 1 && avctx->request_channel_layout == AV_CH_LAYOUT_MONO) { avctx->channels = 1; diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 398224753f..6df697e855 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -208,14 +208,6 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx) avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; /* allow downmixing to stereo or mono */ -#if FF_API_REQUEST_CHANNELS -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->request_channels == 1) - avctx->request_channel_layout = AV_CH_LAYOUT_MONO; - else if (avctx->request_channels == 2) - avctx->request_channel_layout = AV_CH_LAYOUT_STEREO; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (avctx->channels > 1 && avctx->request_channel_layout == AV_CH_LAYOUT_MONO) avctx->channels = 1; diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 9d38b591c9..a471575098 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2305,16 +2305,6 @@ typedef struct AVCodecContext { */ int cutoff; -#if FF_API_REQUEST_CHANNELS - /** - * Decoder should decode to this many channels if it can (0 for default) - * - encoding: unused - * - decoding: Set by user. - * @deprecated Deprecated in favor of request_channel_layout. - */ - attribute_deprecated int request_channels; -#endif - /** * Audio channel layout. * - encoding: set by user. diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index eae6c44844..741f2f766d 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -1669,17 +1669,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data, /* If we have XXCH then the channel layout is managed differently */ /* note that XLL will also have another way to do things */ -#if FF_API_REQUEST_CHANNELS -FF_DISABLE_DEPRECATION_WARNINGS - if (!(s->core_ext_mask & DCA_EXT_XXCH) - || (s->core_ext_mask & DCA_EXT_XXCH && avctx->request_channels > 0 - && avctx->request_channels - < num_core_channels + !!s->lfe + s->xxch_chset_nch[0])) - { -FF_ENABLE_DEPRECATION_WARNINGS -#else if (!(s->core_ext_mask & DCA_EXT_XXCH)) { -#endif /* xxx should also do MA extensions */ if (s->amode < 16) { avctx->channel_layout = ff_dca_core_channel_layout[s->amode]; @@ -1694,15 +1684,7 @@ FF_ENABLE_DEPRECATION_WARNINGS s->xch_disable = 1; } -#if FF_API_REQUEST_CHANNELS -FF_DISABLE_DEPRECATION_WARNINGS - if (s->xch_present && !s->xch_disable && - (!avctx->request_channels || - avctx->request_channels > num_core_channels + !!s->lfe)) { -FF_ENABLE_DEPRECATION_WARNINGS -#else if (s->xch_present && !s->xch_disable) { -#endif if (avctx->channel_layout & AV_CH_BACK_CENTER) { avpriv_request_sample(avctx, "XCh with Back center channel"); return AVERROR_INVALIDDATA; @@ -1757,19 +1739,6 @@ FF_ENABLE_DEPRECATION_WARNINGS /* we only get here if an XXCH channel set can be added to the mix */ channel_mask = s->xxch_core_spkmask; -#if FF_API_REQUEST_CHANNELS -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->request_channels > 0 - && avctx->request_channels < s->prim_channels) { - channels = num_core_channels + !!s->lfe; - for (i = 0; i < s->xxch_chset && channels + s->xxch_chset_nch[i] - <= avctx->request_channels; i++) { - channels += s->xxch_chset_nch[i]; - channel_mask |= s->xxch_spk_masks[i]; - } -FF_ENABLE_DEPRECATION_WARNINGS - } else -#endif { channels = s->prim_channels + !!s->lfe; for (i = 0; i < s->xxch_chset; i++) { @@ -2012,12 +1981,6 @@ static av_cold int dca_decode_init(AVCodecContext *avctx) avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; /* allow downmixing to stereo */ -#if FF_API_REQUEST_CHANNELS -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->request_channels == 2) - avctx->request_channel_layout = AV_CH_LAYOUT_STEREO; -FF_ENABLE_DEPRECATION_WARNINGS -#endif if (avctx->channels > 2 && avctx->request_channel_layout == AV_CH_LAYOUT_STEREO) avctx->channels = 2; diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c index deaa844fc0..23601c8633 100644 --- a/libavcodec/mlp_parser.c +++ b/libavcodec/mlp_parser.c @@ -357,15 +357,6 @@ static int mlp_parse(AVCodecParserContext *s, if(!avctx->channels || !avctx->channel_layout) { if (mh.stream_type == 0xbb) { /* MLP stream */ -#if FF_API_REQUEST_CHANNELS -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->request_channels > 0 && avctx->request_channels <= 2 && - mh.num_substreams > 1) { - avctx->channels = 2; - avctx->channel_layout = AV_CH_LAYOUT_STEREO; -FF_ENABLE_DEPRECATION_WARNINGS - } else -#endif if (avctx->request_channel_layout && (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) == avctx->request_channel_layout && @@ -378,20 +369,7 @@ FF_ENABLE_DEPRECATION_WARNINGS } } else { /* mh.stream_type == 0xba */ /* TrueHD stream */ -#if FF_API_REQUEST_CHANNELS -FF_DISABLE_DEPRECATION_WARNINGS - if (avctx->request_channels > 0 && avctx->request_channels <= 2 && - mh.num_substreams > 1) { - avctx->channels = 2; - avctx->channel_layout = AV_CH_LAYOUT_STEREO; - } else if (avctx->request_channels > 0 && - avctx->request_channels <= mh.channels_thd_stream1) { - avctx->channels = mh.channels_thd_stream1; - avctx->channel_layout = mh.channel_layout_thd_stream1; -FF_ENABLE_DEPRECATION_WARNINGS - } else -#endif - if (avctx->request_channel_layout && + if (avctx->request_channel_layout && (avctx->request_channel_layout & AV_CH_LAYOUT_STEREO) == avctx->request_channel_layout && mh.num_substreams > 1) { diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 1687ce80b7..b2d1e2f715 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -533,19 +533,6 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, s->max_channel = max_channel; s->max_matrix_channel = max_matrix_channel; -#if FF_API_REQUEST_CHANNELS -FF_DISABLE_DEPRECATION_WARNINGS - if (m->avctx->request_channels > 0 && - m->avctx->request_channels <= s->max_channel + 1 && - m->max_decoded_substream > substr) { - av_log(m->avctx, AV_LOG_DEBUG, - "Extracting %d-channel downmix from substream %d. " - "Further substreams will be skipped.\n", - s->max_channel + 1, substr); - m->max_decoded_substream = substr; -FF_ENABLE_DEPRECATION_WARNINGS - } else -#endif if (m->avctx->request_channel_layout && (s->ch_layout & m->avctx->request_channel_layout) == m->avctx->request_channel_layout && m->max_decoded_substream > substr) { av_log(m->avctx, AV_LOG_DEBUG, diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 93d4f779a4..c18bd85b94 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -411,9 +411,6 @@ static const AVOption avcodec_options[] = { {"min_prediction_order", NULL, OFFSET(min_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E}, {"max_prediction_order", NULL, OFFSET(max_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E}, {"timecode_frame_start", "GOP timecode frame start number, in non-drop-frame format", OFFSET(timecode_frame_start), AV_OPT_TYPE_INT64, {.i64 = -1 }, -1, INT64_MAX, V|E}, -#if FF_API_REQUEST_CHANNELS -{"request_channels", "set desired number of audio channels", OFFSET(request_channels), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D}, -#endif {"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, {"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT64_MAX, A|E|D, "channel_layout"}, {"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT64_MAX, A|D, "request_channel_layout"}, diff --git a/libavcodec/version.h b/libavcodec/version.h index 6dbeeff083..00347c958e 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -55,9 +55,6 @@ #ifndef FF_API_VIMA_DECODER #define FF_API_VIMA_DECODER (LIBAVCODEC_VERSION_MAJOR < 57) #endif -#ifndef FF_API_REQUEST_CHANNELS -#define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 57) -#endif #ifndef FF_API_OLD_DECODE_AUDIO #define FF_API_OLD_DECODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 57) #endif |