diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2017-05-23 03:32:18 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2017-05-23 03:32:18 -0400 |
commit | 0d2ba55ab1978bc7abdbacdd140d34066cc81bb0 (patch) | |
tree | e622c8342ac63b15ab4f5ba08ddb7749ee22ae31 /src | |
parent | 43db56225b5716b61c16a3275f65b8d3d3ea5343 (diff) | |
download | opus-0d2ba55ab1978bc7abdbacdd140d34066cc81bb0.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/opus_multistream_encoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c index e82a57a1..e56ad7fb 100644 --- a/src/opus_multistream_encoder.c +++ b/src/opus_multistream_encoder.c @@ -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; |