From b417d8392e20acdc0f613a0a3f64bad83e47ea95 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Thu, 27 Jan 2011 17:19:49 -0500 Subject: [PATCH] Changing some double constants to float --- libcelt/celt.c | 2 +- libcelt/pitch.c | 2 +- libcelt/quant_bands.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libcelt/celt.c b/libcelt/celt.c index 9af7658e..180ffa0c 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -993,7 +993,7 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, i if (gain1 > QCONST16(.6f,15)) gain1 = QCONST16(.6f,15); - if (ABS16(gain1-st->prefilter_gain)prefilter_gain)prefilter_gain; #ifdef FIXED_POINT diff --git a/libcelt/pitch.c b/libcelt/pitch.c index 4c495975..476aadb0 100644 --- a/libcelt/pitch.c +++ b/libcelt/pitch.c @@ -145,7 +145,7 @@ void pitch_downsample(celt_sig * restrict x[], celt_word16 * restrict x_lp, fir(x_lp, lpc, x_lp, len>>1, 4, mem); mem[0]=0; - lpc[0]=QCONST16(.8,12); + lpc[0]=QCONST16(.8f,12); fir(x_lp, lpc, x_lp, len>>1, 1, mem); } diff --git a/libcelt/quant_bands.c b/libcelt/quant_bands.c index 61a8e870..627aa3de 100644 --- a/libcelt/quant_bands.c +++ b/libcelt/quant_bands.c @@ -198,7 +198,7 @@ static int quant_coarse_energy_impl(const CELTMode *m, int start, int end, #ifdef FIXED_POINT f = SHL32(EXTEND32(x),7) - PSHR32(MULT16_16(coef,oldE), 8) - prev[c]; /* Rounding to nearest integer here is really important! */ - qi = (f+QCONST32(.5,DB_SHIFT+7))>>(DB_SHIFT+7); + qi = (f+QCONST32(.5f,DB_SHIFT+7))>>(DB_SHIFT+7); decay_bound = EXTRACT16(MAX32(-QCONST16(28.f,DB_SHIFT), SUB32((celt_word32)oldEBands[i+c*m->nbEBands],max_decay))); #else