fixed-point: removed the last float op in celt.c
authorJean-Marc Valin <Jean-Marc.Valin@csiro.au>
Fri, 7 Mar 2008 06:33:58 +0000 (17:33 +1100)
committerJean-Marc Valin <Jean-Marc.Valin@csiro.au>
Fri, 7 Mar 2008 06:33:58 +0000 (17:33 +1100)
libcelt/celt.c

index 16983d4..0e32431 100644 (file)
@@ -324,7 +324,7 @@ int celt_encode(CELTEncoder *st, celt_int16_t *pcm, unsigned char *compressed, i
    }
 
    /* Check if we can safely use the pitch (i.e. effective gain isn't too high) */
-   if (curr_power + 1e5f*(1.f/SHL16(1,8)) < 10.f*pitch_power)
+   if (MULT16_32_Q15(QCONST16(.1f, 15),curr_power) + SHR16(10000,8) < pitch_power)
    {
       /* Normalise the pitch vector as well (discard the energies) */
       VARDECL(celt_ener_t *bandEp);