diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2017-05-23 10:32:18 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2017-05-23 22:48:03 +0300 |
commit | 8d02afe05b80097f5a09361bb75e2950cb3ea6e2 (patch) | |
tree | ae2ce083c0eb37bd14fc51f93896538e9d346a55 | |
parent | 901c24328de6e07ebea8aa341433085cc39c59f9 (diff) |
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.
-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 e722e31a..1698223a 100644 --- a/src/opus_multistream_encoder.c +++ b/src/opus_multistream_encoder.c @@ -277,7 +277,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; |