[FFmpeg-cvslog] r15088 - trunk/libavcodec/lpc.c

vitor subversion
Sun Aug 31 04:31:05 CEST 2008


Author: vitor
Date: Sun Aug 31 04:31:05 2008
New Revision: 15088

Log:
Merge declaration and initialization of a few vars in compute_lpc_coefs()

Modified:
   trunk/libavcodec/lpc.c

Modified: trunk/libavcodec/lpc.c
==============================================================================
--- trunk/libavcodec/lpc.c	(original)
+++ trunk/libavcodec/lpc.c	Sun Aug 31 04:31:05 2008
@@ -32,13 +32,11 @@ static void compute_lpc_coefs(const doub
                               double lpc[][MAX_LPC_ORDER], double *ref)
 {
     int i, j, i2;
-    double r, err, tmp;
+    double err = autoc[0];
     double lpc_tmp[MAX_LPC_ORDER];
 
-    err = autoc[0];
-
     for(i=0; i<max_order; i++) {
-        r = -autoc[i+1];
+        double r = -autoc[i+1];
         for(j=0; j<i; j++) {
             r -= lpc_tmp[j] * autoc[i-j];
         }
@@ -50,7 +48,7 @@ static void compute_lpc_coefs(const doub
         i2 = (i >> 1);
         lpc_tmp[i] = r;
         for(j=0; j<i2; j++) {
-            tmp = lpc_tmp[j];
+            double tmp = lpc_tmp[j];
             lpc_tmp[j] += r * lpc_tmp[i-1-j];
             lpc_tmp[i-1-j] += r * tmp;
         }




More information about the ffmpeg-cvslog mailing list