Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-04-22 22:10:13 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-04-22 22:11:48 +0300
commit4d3decfe4da706a7045236b02b8c4e08da22489f (patch)
tree056800171216683a15b1b7cb1751ec4af250bc1c
parent6e9617371f7cf3f669a60d9540723a01f1128fc8 (diff)
Fixes floating-point bug introduced in be9e747bcc542c277d30f6c78a57b0940e0c5b5e
The effect was to always set HB_gain to 1.
-rw-r--r--src/opus_encoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index 24d8f89a..e7b2f931 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -1513,7 +1513,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
celt_rate = total_bitRate - st->silk_mode.bitRate;
HB_gain_ref = (curr_bandwidth == OPUS_BANDWIDTH_SUPERWIDEBAND) ? 3000 : 3600;
HB_gain = SHL32((opus_val32)celt_rate, 9) / SHR32((opus_val32)celt_rate + st->stream_channels * HB_gain_ref, 6);
- HB_gain = HB_gain < (opus_int32)Q15ONE*6/7 ? HB_gain + Q15ONE/7 : Q15ONE;
+ HB_gain = HB_gain < (opus_val32)Q15ONE*6/7 ? HB_gain + Q15ONE/7 : Q15ONE;
}
} else {
/* SILK gets all bits */