ref: ea8fbf46d5a88fb6b7f3748135d5a573f7106314
parent: c983bb471a5a8247e88363cca90021963067c7ea
author: Jean-Marc Valin <[email protected]>
date: Fri Mar 18 12:41:40 EDT 2011
Simplifying PLC switching to have an overlap of 2.5 ms too
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -298,13 +298,10 @@
}
if (transition)
{
- int plc_length, overlap;
- plc_length = IMIN(audiosize, 10+F2_5);
- for (i=0;i<plc_length;i++)
+ for (i=0;i<F2_5;i++)
pcm[i] = pcm_transition[i];
-
- overlap = IMIN(F2_5, IMAX(0, audiosize-plc_length));
- smooth_fade(pcm_transition+plc_length, pcm+plc_length, pcm+plc_length, overlap, st->channels);
+ if (audiosize >= F5)
+ smooth_fade(pcm_transition+F2_5, pcm+F2_5, pcm+F2_5, F2_5, st->channels);
}
#if OPUS_TEST_RANGE_CODER_STATE
st->rangeFinal = dec.rng;