Fixes a stereo SILK->CELT switching bug

Making sure not to abruptly "de-collapse" the stereo for such transitions
This commit is contained in:
Jean-Marc Valin 2011-10-09 00:29:26 -04:00
parent 6d5af483be
commit ebece63373

View file

@ -895,7 +895,7 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
if (st->mode != MODE_HYBRID || st->stream_channels==1)
st->hybrid_stereo_width_Q14 = st->silk_mode.stereoWidth_Q14 = 1<<14;
st->silk_mode.stereoWidth_Q14 = 1<<14;
if( 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) ) {