summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2019-09-25 01:16:16 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2019-10-13 15:13:28 -0400
commit2894074c27f797eb6cc4e94bb8a0533fab1639e0 (patch)
treebb3b76e6c60e7c1eb02eb3e267949316ccc635da
parenteb89d7d1b4b07cf34a26b6f9d246b728373e9b04 (diff)
downloadopus-exp_waveform_matching3.tar.gz
Use new waveform matching option on ambisonicsexp_waveform_matching3
Should reduce phase-related problems at low bitrate
-rw-r--r--src/opus_multistream_encoder.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c
index 93204a14..302ffe86 100644
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -475,6 +475,8 @@ static int opus_multistream_encoder_init_impl(
if(ret!=OPUS_OK)return ret;
if (i==st->lfe_stream)
opus_encoder_ctl((OpusEncoder*)ptr, OPUS_SET_LFE(1));
+ if (mapping_type == MAPPING_TYPE_AMBISONICS)
+ opus_encoder_ctl((OpusEncoder*)ptr, OPUS_SET_WAVEFORM_MATCHING(1));
ptr += align(coupled_size);
}
for (;i<st->layout.nb_streams;i++)
@@ -482,6 +484,8 @@ static int opus_multistream_encoder_init_impl(
ret = opus_encoder_init((OpusEncoder*)ptr, Fs, 1, application);
if (i==st->lfe_stream)
opus_encoder_ctl((OpusEncoder*)ptr, OPUS_SET_LFE(1));
+ if (mapping_type == MAPPING_TYPE_AMBISONICS)
+ opus_encoder_ctl((OpusEncoder*)ptr, OPUS_SET_WAVEFORM_MATCHING(1));
if(ret!=OPUS_OK)return ret;
ptr += align(mono_size);
}