OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ddadea
)
g723_1: fix upper bound parameter from inverse maximum autocorrelation
author
Kostya Shishkov
<kostya.shishkov@gmail.com>
Thu, 2 Aug 2012 05:54:16 +0000
(07:54 +0200)
committer
Kostya Shishkov
<kostya.shishkov@gmail.com>
Fri, 3 Aug 2012 05:07:07 +0000
(07:07 +0200)
libavcodec/g723_1.c
patch
|
blob
|
history
diff --git
a/libavcodec/g723_1.c
b/libavcodec/g723_1.c
index
4ad74f4
..
883c949
100644
(file)
--- 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);