diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-11-28 23:53:51 +0000 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-11-28 23:53:51 +0000 |
commit | cf283f2dfbbf8b4c59d4f32f4308ede851613257 (patch) | |
tree | 0ee08413d6b3aa5eb114a8bef0f4d74915aa45a6 /libavcodec/libopusenc.c | |
parent | 4cd6f08d2005c20a03ccd53a0a6f8a115c5ebe2e (diff) | |
download | ffmpeg-cf283f2dfbbf8b4c59d4f32f4308ede851613257.tar.gz |
Revert "avcodec/libopusenc: Fix warning when encoding ambisonics with channel mapping 2"
This reverts commit 4cd6f08d2005c20a03ccd53a0a6f8a115c5ebe2e.
Diffstat (limited to 'libavcodec/libopusenc.c')
-rw-r--r-- | libavcodec/libopusenc.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c index 50d843ebc5..7c025a66d7 100644 --- a/libavcodec/libopusenc.c +++ b/libavcodec/libopusenc.c @@ -27,7 +27,6 @@ #include "bytestream.h" #include "internal.h" #include "libopus.h" -#include "mathops.h" #include "vorbis.h" #include "audio_frame_queue.h" @@ -201,21 +200,6 @@ static int libopus_check_vorbis_layout(AVCodecContext *avctx, int mapping_family return 0; } -static int libopus_check_ambisonics_channels(AVCodecContext *avctx) { - int channels = avctx->channels; - int ambisonic_order = ff_sqrt(channels) - 1; - if (channels != ((ambisonic_order + 1) * (ambisonic_order + 1)) && - channels != ((ambisonic_order + 1) * (ambisonic_order + 1) + 2)) { - av_log(avctx, AV_LOG_ERROR, - "Ambisonics coding is only specified for channel counts" - " which can be written as (n + 1)^2 or (n + 1)^2 + 2" - " for nonnegative integer n\n"); - return AVERROR_INVALIDDATA; - } - - return 0; -} - static int libopus_validate_layout_and_get_channel_map( AVCodecContext *avctx, int mapping_family, @@ -247,12 +231,6 @@ static int libopus_validate_layout_and_get_channel_map( channel_map = ff_vorbis_channel_layout_offsets[avctx->channels - 1]; } break; - case 2: - ret = libopus_check_max_channels(avctx, 227); - if (ret == 0) { - ret = libopus_check_ambisonics_channels(avctx); - } - break; case 255: ret = libopus_check_max_channels(avctx, 254); break; |