[FFmpeg-cvslog] r15394 - trunk/libavcodec/ra288.c

michael subversion
Wed Sep 24 01:16:48 CEST 2008


Author: michael
Date: Wed Sep 24 01:16:48 2008
New Revision: 15394

Log:
Merge the 2 lpc loops.
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.


Modified:
   trunk/libavcodec/ra288.c

Modified: trunk/libavcodec/ra288.c
==============================================================================
--- trunk/libavcodec/ra288.c	(original)
+++ trunk/libavcodec/ra288.c	Wed Sep 24 01:16:48 2008
@@ -103,16 +103,14 @@ static void decode(RA288Context *ractx, 
     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)




More information about the ffmpeg-cvslog mailing list