Changing some double constants to float
authorJean-Marc Valin <jean-marc.valin@octasic.com>
Thu, 27 Jan 2011 22:19:49 +0000 (17:19 -0500)
committerJean-Marc Valin <jean-marc.valin@octasic.com>
Thu, 27 Jan 2011 22:19:49 +0000 (17:19 -0500)
libcelt/celt.c
libcelt/pitch.c
libcelt/quant_bands.c

index 9af7658..180ffa0 100644 (file)
@@ -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)<QCONST16(.1,15))
+         if (ABS16(gain1-st->prefilter_gain)<QCONST16(.1f,15))
             gain1=st->prefilter_gain;
 
 #ifdef FIXED_POINT
index 4c49597..476aadb 100644 (file)
@@ -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);
 
 }
index 61a8e87..627aa3d 100644 (file)
@@ -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