aboutsummaryrefslogtreecommitdiff
path: root/celt/pitch.c
diff options
context:
space:
mode:
authorRalph Giles <giles@mozilla.com>2012-10-23 10:49:18 -0700
committerRalph Giles <giles@mozilla.com>2012-10-23 10:49:18 -0700
commit027ec51bfef87d7e9f2c48091a66a75bcf524152 (patch)
treecca9dbe5d02e67a069ff05cd243226b2c325177a /celt/pitch.c
parent2572c1e788318f8d765cb9cfab88c2d9f4744167 (diff)
downloadlibopus-027ec51bfef87d7e9f2c48091a66a75bcf524152.tar.gz
Fix MSVC format conversion warnings.
The Microsoft compiler warns about precision reduction from default double literals to the floats we generally use outside the fixed-point build. Avoid these by qualifying the literals as floats. Thanks to derf for review.
Diffstat (limited to 'celt/pitch.c')
-rw-r--r--celt/pitch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/celt/pitch.c b/celt/pitch.c
index d9bba1b2..c5b70e59 100644
--- a/celt/pitch.c
+++ b/celt/pitch.c
@@ -77,7 +77,7 @@ static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len,
#ifndef FIXED_POINT
/* Considering the range of xcorr16, this should avoid both underflows
and overflows (inf) when squaring xcorr16 */
- xcorr16 *= 1e-12;
+ xcorr16 *= 1e-12f;
#endif
num = MULT16_16_Q15(xcorr16,xcorr16);
if (MULT16_32_Q15(num,best_den[1]) > MULT16_32_Q15(best_num[1],Syy))
@@ -373,13 +373,13 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,
cont = HALF32(prev_gain);
else
cont = 0;
- thresh = MAX16(QCONST16(.3f,15), MULT16_16_Q15(QCONST16(.7,15),g0)-cont);
+ thresh = MAX16(QCONST16(.3f,15), MULT16_16_Q15(QCONST16(.7f,15),g0)-cont);
/* Bias against very high pitch (very short period) to avoid false-positives
due to short-term correlation */
if (T1<3*minperiod)
- thresh = MAX16(QCONST16(.4f,15), MULT16_16_Q15(QCONST16(.85,15),g0)-cont);
+ thresh = MAX16(QCONST16(.4f,15), MULT16_16_Q15(QCONST16(.85f,15),g0)-cont);
else if (T1<2*minperiod)
- thresh = MAX16(QCONST16(.5f,15), MULT16_16_Q15(QCONST16(.9,15),g0)-cont);
+ thresh = MAX16(QCONST16(.5f,15), MULT16_16_Q15(QCONST16(.9f,15),g0)-cont);
if (g1 > thresh)
{
best_xy = xy;