diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-07-26 12:06:35 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-07-26 19:49:35 -0400 |
commit | 722a66b84becd0907f0bb4f6f80d17dbc04eb5e6 (patch) | |
tree | 69bb2a713f5f823204f5a144df56c5a3d1810f69 /src/opus_multistream_encoder.c | |
parent | ac044500cc3ad39f9b0795cec08106124d705564 (diff) | |
download | opus-722a66b84becd0907f0bb4f6f80d17dbc04eb5e6.tar.gz |
Remove ambisonics experimental flag
Diffstat (limited to 'src/opus_multistream_encoder.c')
-rw-r--r-- | src/opus_multistream_encoder.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c index 09a84b2e..52fd27e2 100644 --- a/src/opus_multistream_encoder.c +++ b/src/opus_multistream_encoder.c @@ -101,7 +101,6 @@ static opus_val32 *ms_get_window_mem(OpusMSEncoder *st) return (opus_val32*)(void*)ptr; } -#ifdef ENABLE_EXPERIMENTAL_AMBISONICS static int validate_ambisonics(int nb_channels, int *nb_streams, int *nb_coupled_streams) { int order_plus_one; @@ -124,7 +123,6 @@ static int validate_ambisonics(int nb_channels, int *nb_streams, int *nb_coupled *nb_coupled_streams = nondiegetic_channels != 0; return 1; } -#endif static int validate_encoder_layout(const ChannelLayout *layout) { @@ -414,12 +412,10 @@ opus_int32 opus_multistream_surround_encoder_get_size(int channels, int mapping_ { nb_streams=channels; nb_coupled_streams=0; -#ifdef ENABLE_EXPERIMENTAL_AMBISONICS } else if (mapping_family==2) { if (!validate_ambisonics(channels, &nb_streams, &nb_coupled_streams)) return 0; -#endif } else return 0; size = opus_multistream_encoder_get_size(nb_streams, nb_coupled_streams); @@ -466,11 +462,9 @@ static int opus_multistream_encoder_init_impl( if (mapping_type == MAPPING_TYPE_SURROUND && !validate_encoder_layout(&st->layout)) return OPUS_BAD_ARG; -#ifdef ENABLE_EXPERIMENTAL_AMBISONICS if (mapping_type == MAPPING_TYPE_AMBISONICS && !validate_ambisonics(st->layout.nb_channels, NULL, NULL)) return OPUS_BAD_ARG; -#endif ptr = (char*)st + align(sizeof(OpusMSEncoder)); coupled_size = opus_encoder_get_size(2); mono_size = opus_encoder_get_size(1); @@ -562,7 +556,6 @@ int opus_multistream_surround_encoder_init( *coupled_streams=0; for(i=0;i<channels;i++) mapping[i] = i; -#ifdef ENABLE_EXPERIMENTAL_AMBISONICS } else if (mapping_family==2) { int i; @@ -572,17 +565,14 @@ int opus_multistream_surround_encoder_init( mapping[i] = i + (*coupled_streams * 2); for(i = 0; i < *coupled_streams * 2; i++) mapping[i + (*streams - *coupled_streams)] = i; -#endif } else return OPUS_UNIMPLEMENTED; if (channels>2 && mapping_family==1) { mapping_type = MAPPING_TYPE_SURROUND; -#ifdef ENABLE_EXPERIMENTAL_AMBISONICS } else if (mapping_family==2) { mapping_type = MAPPING_TYPE_AMBISONICS; -#endif } else { mapping_type = MAPPING_TYPE_NONE; @@ -743,7 +733,6 @@ static void surround_rate_allocation( } } -#ifdef ENABLE_EXPERIMENTAL_AMBISONICS static void ambisonics_rate_allocation( OpusMSEncoder *st, opus_int32 *rate, @@ -820,7 +809,6 @@ static void ambisonics_rate_allocation( } } } -#endif /* ENABLE_EXPERIMENTAL_AMBISONICS */ static opus_int32 rate_allocation( OpusMSEncoder *st, @@ -836,11 +824,9 @@ static opus_int32 rate_allocation( ptr = (char*)st + align(sizeof(OpusMSEncoder)); opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_SAMPLE_RATE(&Fs)); -#ifdef ENABLE_EXPERIMENTAL_AMBISONICS if (st->mapping_type == MAPPING_TYPE_AMBISONICS) { ambisonics_rate_allocation(st, rate, frame_size, Fs); } else -#endif { surround_rate_allocation(st, rate, frame_size, Fs); } @@ -973,11 +959,9 @@ int opus_multistream_encode_native opus_encoder_ctl(enc, OPUS_SET_FORCE_CHANNELS(2)); } } -#ifdef ENABLE_EXPERIMENTAL_AMBISONICS else if (st->mapping_type == MAPPING_TYPE_AMBISONICS) { opus_encoder_ctl(enc, OPUS_SET_FORCE_MODE(MODE_CELT_ONLY)); } -#endif } ptr = (char*)st + align(sizeof(OpusMSEncoder)); |