Fixes a surround bug on loud signal

The constant was copied from the analysis code which uses +/-1 as float
scaling, but surround_analysis() uses +/-32767.
This commit is contained in:
Jean-Marc Valin 2017-05-23 03:32:18 -04:00
parent 43db56225b
commit 0d2ba55ab1
No known key found for this signature in database
GPG key ID: 5E5DD9A36F9189C8

View file

@ -304,7 +304,7 @@ void surround_analysis(const CELTMode *celt_mode, const void *pcm, opus_val16 *b
sum = celt_inner_prod(in, in, frame_size+overlap, 0);
/* This should filter out both NaNs and ridiculous signals that could
cause NaNs further down. */
if (!(sum < 1e9f) || celt_isnan(sum))
if (!(sum < 1e18f) || celt_isnan(sum))
{
OPUS_CLEAR(in, frame_size+overlap);
preemph_mem[c] = 0;