[FFmpeg-cvslog] celp filters: Do not read earlier than the start of the 'out' vector.

Alex Converse git at videolan.org
Mon Jun 4 12:51:30 CEST 2012


ffmpeg | branch: release/0.6 | Alex Converse <alex.converse at gmail.com> | Fri May  4 10:27:03 2012 -0700| [bf0ec375ef7df1d154f07a820de90f6393d22363] | committer: Reinhard Tartler

celp filters: Do not read earlier than the start of the 'out' vector.

CC: libav-stable at libav.org
(cherry picked from commit 37ddd3833219fa7b913fff3f5cccc6878b047e6b)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>
(cherry picked from commit 9ea94c44b1b414ab3bc6e9220ebb77621423ca38)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>
(cherry picked from commit 08c81f7365af96c1655767e68d6ec85bea50600c)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bf0ec375ef7df1d154f07a820de90f6393d22363
---

 libavcodec/celp_filters.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/celp_filters.c b/libavcodec/celp_filters.c
index 26a62ee..0f8e071 100644
--- a/libavcodec/celp_filters.c
+++ b/libavcodec/celp_filters.c
@@ -133,9 +133,8 @@ void ff_celp_lp_synthesis_filterf(float *out, const float *filter_coeffs,
         out2 -= val * old_out2;
         out3 -= val * old_out3;
 
-        old_out3 = out[-5];
-
         for (i = 5; i <= filter_length; i += 2) {
+            old_out3 = out[-i];
             val = filter_coeffs[i-1];
 
             out0 -= val * old_out3;
@@ -154,7 +153,6 @@ void ff_celp_lp_synthesis_filterf(float *out, const float *filter_coeffs,
 
             FFSWAP(float, old_out0, old_out2);
             old_out1 = old_out3;
-            old_out3 = out[-i-2];
         }
 
         tmp0 = out0;



More information about the ffmpeg-cvslog mailing list