summaryrefslogtreecommitdiff
path: root/src/opus_encoder.c
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2015-11-27 19:10:24 -0500
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-06-29 15:21:31 -0400
commit3240e7d98c6fce6e22ab59da69f81bded909e897 (patch)
tree4836c5f4c3331f85cce8c02d48069480f985efd3 /src/opus_encoder.c
parent28677f7e95d94fe80cfff3533391a26f51a17699 (diff)
downloadopus-3240e7d98c6fce6e22ab59da69f81bded909e897.tar.gz
Quality: Encoding music in full-band stereo from 32 kb/s
Gradual downmix now happens in the 24 kb/s to 32 kb/s range
Diffstat (limited to 'src/opus_encoder.c')
-rw-r--r--src/opus_encoder.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index 7333b718..902e60e1 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -133,12 +133,12 @@ static const opus_int32 stereo_voice_bandwidth_thresholds[8] = {
static const opus_int32 stereo_music_bandwidth_thresholds[8] = {
12000, 1000, /* NB<->MB */
18000, 2000, /* MB<->WB */
- 21000, 2000, /* WB<->SWB */
- 30000, 2000, /* SWB<->FB */
+ 20000, 2000, /* WB<->SWB */
+ 24000, 2000, /* SWB<->FB */
};
/* Threshold bit-rates for switching between mono and stereo */
-static const opus_int32 stereo_voice_threshold = 30000;
-static const opus_int32 stereo_music_threshold = 30000;
+static const opus_int32 stereo_voice_threshold = 24000;
+static const opus_int32 stereo_music_threshold = 24000;
/* Threshold bit-rate for switching between SILK/hybrid and CELT-only */
static const opus_int32 mode_thresholds[2][2] = {
@@ -1780,7 +1780,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
}
st->prev_HB_gain = HB_gain;
if (st->mode != MODE_HYBRID || st->stream_channels==1)
- st->silk_mode.stereoWidth_Q14 = IMIN((1<<14),2*IMAX(0,equiv_rate-30000));
+ st->silk_mode.stereoWidth_Q14 = IMIN((1<<14),2*IMAX(0,equiv_rate-24000));
if( !st->energy_masking && st->channels == 2 ) {
/* Apply stereo width reduction (at low bitrates) */
if( st->hybrid_stereo_width_Q14 < (1 << 14) || st->silk_mode.stereoWidth_Q14 < (1 << 14) ) {