diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-09-23 23:16:48 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-09-23 23:16:48 +0000 |
commit | 645a6be1e763441ee38ecc1b55b8d0408ef8f04f (patch) | |
tree | c1bf96d189cd9c9230428cdd0d3d4cb44174ae65 /libavcodec/ra288.c | |
parent | 571bbaf81490997218cb74eb0a0e69ae24cbe85e (diff) | |
download | ffmpeg-645a6be1e763441ee38ecc1b55b8d0408ef8f04f.tar.gz |
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.
Originally committed as revision 15394 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ra288.c')
-rw-r--r-- | libavcodec/ra288.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c index c56718a521..f7e1af55a0 100644 --- a/libavcodec/ra288.c +++ b/libavcodec/ra288.c @@ -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) |