[FFmpeg-cvslog] g723_1: fix upper bound parameter from inverse maximum autocorrelation
Kostya Shishkov
git at videolan.org
Fri Aug 3 23:30:30 CEST 2012
ffmpeg | branch: master | Kostya Shishkov <kostya.shishkov at gmail.com> | Thu Aug 2 07:54:16 2012 +0200| [802bcdcb2f177b84cdf8e0197338a808fc26fbff] | committer: Kostya Shishkov
g723_1: fix upper bound parameter from inverse maximum autocorrelation
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=802bcdcb2f177b84cdf8e0197338a808fc26fbff
---
libavcodec/g723_1.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index 4ad74f4..883c949 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -630,7 +630,10 @@ static int autocorr_max(G723_1_Context *p, int offset, int *ccr_max,
int i;
pitch_lag = FFMIN(PITCH_MAX - 3, pitch_lag);
- limit = FFMIN(FRAME_LEN + PITCH_MAX - offset - length, pitch_lag + 3);
+ if (dir > 0)
+ limit = FFMIN(FRAME_LEN + PITCH_MAX - offset - length, pitch_lag + 3);
+ else
+ limit = pitch_lag + 3;
for (i = pitch_lag - 3; i <= limit; i++) {
ccr = dot_product(buf, buf + dir * i, length, 1);
More information about the ffmpeg-cvslog
mailing list