Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2013-05-28 04:47:47 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2013-05-28 04:47:47 +0400
commit58d80ab9ea3b2d54042debb445c08bf490758fce (patch)
treea633e46db7b58d556c429e48cb4cab45cf58dc97
parentfcecd29abf32164326e568acdcdf7d8e877b33b1 (diff)
Disables all the surround mode forcing for mono/stereo
-rw-r--r--src/opus_multistream_encoder.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c
index 89844cbc..d9380ec3 100644
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -189,7 +189,7 @@ static int opus_multistream_encoder_init_impl(
if(ret!=OPUS_OK)return ret;
ptr += align(mono_size);
}
- if (surround && st->layout.nb_channels>2)
+ if (surround)
{
OpusEncoder *downmix_enc;
downmix_enc = (OpusEncoder*)ptr;
@@ -258,7 +258,8 @@ int opus_multistream_surround_encoder_init(
mapping[i] = i;
} else
return OPUS_UNIMPLEMENTED;
- opus_multistream_encoder_init_impl(st, Fs, channels, *streams, *coupled_streams, mapping, application, 1);
+ opus_multistream_encoder_init_impl(st, Fs, channels, *streams, *coupled_streams,
+ mapping, application, channels>2&&mapping_family==1);
return OPUS_OK;
}
@@ -496,7 +497,7 @@ static int opus_multistream_encode_native
coupled_size = opus_encoder_get_size(2);
mono_size = opus_encoder_get_size(1);
- if (st->surround && st->layout.nb_channels>2)
+ if (st->surround)
{
int i;
unsigned char dummy[512];