1. Only for fixed point on x86 platform (32bit and 64bit, uses SIMD
intrinsics up to SSE4.2)
2. Use "configure --enable-fixed-point --enable-intrinsics" to enable
optimization, default is disabled.
3. Official test cases are verified and passed.
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
- Bug fix: the CNG synthesis filter output consisted of only the prediction
values, now added the input to that.
- CNG excitation level now takes into account the level from the PLC (since
both PLC and CNG can be active at the same time).
- CNG is now called before PLC_glue() to smoothen the transition out of CNG.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
This allows the decoder to be compiled with
NONTHREADSAFE_PSEUDOSTACK to move the memory for large buffers off
the stack for devices where it is very limited.
This patch only attempts to do this for the decoder.
The encoder still requires more than 10 kB of stack.
Neither the encoder nor decoder were incrementing the side-channel
index for a mid-only frame.
Unfortunately, they used that index to index the VAD flags and LBRR
flags.
This made the VAD flags for the side channel particularly useless,
as you couldn't tell which frame a flag belonged to without
decoding most of the packet.
It also desynched the LBRR information, as look at the wrong LBRR
flags to decide when it had to code a mid-only flag.
If some frames were skipped in the side channel, then the last few
VAD flags and LBRR flags would be garbage, but still get encoded.
This patch fixes this by continuing to increment nFramesDecoded or
nFramesEncoded, even when skipping a frame in the side channel.
This makes the side-channel VAD and LBRR flags correspond to the
correct time periods for frames greater than 20 ms.
It also fixes a bug where if DTX was not used on the packet where
the side channel got turned off, it would never get used again
until the encoder attempted to encode something in the side
channel again.
b24e5746 introduced changes to LastGainIndex which broke
conditional coding for side frames after a mid-only frame (i.e.,
in a 60 ms frame where the side is coded, not coded, then coded
again).
These rules were a mess in general, however, because the side
channel state kept a different nFramesDecoded count from the mid
channel state, and had no way to tell if the prior side frame was
coded.
This patch attempts to rationalize them by moving the conditional
coding decision up to the top level, where all this information is
available.
The first coded side frame after an uncoded side frame now always
uses independent coding.
If such a frame is also not the first side frame in an Opus frame,
then it doesn't include an LTP scaling parameter (because the LTP
state is well-defined).