summaryrefslogtreecommitdiff
path: root/src/opus_encoder.c
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-04-20 13:27:06 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-09-01 01:23:06 -0400
commit18a380a7c209b482f63adeb19f5d398dcb1c10bd (patch)
treea1e39f2e7e961e12132adcd48e9415ec6438c1be /src/opus_encoder.c
parent6db0908db3378c79c554a863bb4033465be7bc4a (diff)
downloadopus-18a380a7c209b482f63adeb19f5d398dcb1c10bd.tar.gz
Make it possible to ignore inverted phase stereo for downmix purposesexp_bitstream7
Diffstat (limited to 'src/opus_encoder.c')
-rw-r--r--src/opus_encoder.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index f484b0a4..ef464fc5 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -2781,6 +2781,26 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...)
*value = st->silk_mode.reducedDependency;
}
break;
+ case OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST:
+ {
+ opus_int32 value = va_arg(ap, opus_int32);
+ if(value<0 || value>1)
+ {
+ goto bad_arg;
+ }
+ celt_encoder_ctl(celt_enc, OPUS_SET_PHASE_INVERSION_DISABLED(value));
+ }
+ break;
+ case OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST:
+ {
+ opus_int32 *value = va_arg(ap, opus_int32*);
+ if (!value)
+ {
+ goto bad_arg;
+ }
+ celt_encoder_ctl(celt_enc, OPUS_GET_PHASE_INVERSION_DISABLED(value));
+ }
+ break;
case OPUS_RESET_STATE:
{
void *silk_enc;