]> git.sesse.net Git - ffmpeg/commitdiff
Merge the 2 lpc loops.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 23 Sep 2008 23:16:48 +0000 (23:16 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 23 Sep 2008 23:16:48 +0000 (23:16 +0000)
This changes the output by (stddev:    0.21 PSNR:109.51, file:ddinterview28.ra),
the changes are due to float rounding inaccuracies and do not happen if doubles
are used.

Originally committed as revision 15394 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/ra288.c

index c56718a5212c30495588a558f3f5258f59670f24..f7e1af55a03578b01bf7fc22b4d177ca3ec99ed4 100644 (file)
@@ -103,16 +103,14 @@ static void decode(RA288Context *ractx, float gain, int cb_coef)
     gain_block[9] = 10 * log10(sum) - 32;
 
     for (i=0; i < 5; i++) {
-        block[i] = 0;
+        block[i] = buffer[i];
         for (j=0; j < 36; j++)
             block[i] -= block[i-1-j]*ractx->sp_lpc[j];
-        for (j=0; j < i; j++)
-            buffer[i] -= buffer[i-1-j]*ractx->sp_lpc[j];
     }
 
     /* output */
     for (i=0; i < 5; i++)
-        block[i] = av_clipf(block[i] + buffer[i], -4095, 4095);
+        block[i] = av_clipf(block[i], -4095, 4095);
 }
 
 static void convolve(float *tgt, const float *src, int len, int n)