[FFmpeg-soc] [soc]: r5141 - amr/amrnbdec.c

cmcq subversion at mplayerhq.hu
Sat Aug 15 22:10:29 CEST 2009


Author: cmcq
Date: Sat Aug 15 22:10:29 2009
New Revision: 5141

Log:
Reorder arithmetic to allow constant folding

Modified:
   amr/amrnbdec.c

Modified: amr/amrnbdec.c
==============================================================================
--- amr/amrnbdec.c	Sat Aug 15 22:09:08 2009	(r5140)
+++ amr/amrnbdec.c	Sat Aug 15 22:10:29 2009	(r5141)
@@ -188,7 +188,7 @@ static void lsf2lsp(float *lsf, float *l
     int i;
 
     for (i = 0; i < LP_FILTER_ORDER; i++)
-        lsp[i] = cos(lsf[i] * 2.0 * M_PI / 8000.0);
+        lsp[i] = cos(2.0 * M_PI / 8000.0 * lsf[i]);
 }
 
 /**
@@ -204,7 +204,7 @@ static void interpolate_lsf(float lsf_q[
 
     for (i = 0; i < 4; i++)
         ff_weighted_vector_sumf(lsf_q[i], lsf_q[3], lsf_new,
-                                0.25 * (3 - i), 0.25 * (i + 1) / 8000.0,
+                                0.25 * (3 - i), 0.25 / 8000.0 * (i + 1),
                                 LP_FILTER_ORDER);
 }
 


More information about the FFmpeg-soc mailing list