|
|
@@ -630,7 +630,10 @@ static int autocorr_max(G723_1_Context *p, int offset, int *ccr_max, |
|
|
int i; |
|
|
int i; |
|
|
|
|
|
|
|
|
pitch_lag = FFMIN(PITCH_MAX - 3, pitch_lag); |
|
|
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++) { |
|
|
for (i = pitch_lag - 3; i <= limit; i++) { |
|
|
ccr = dot_product(buf, buf + dir * i, length, 1); |
|
|
ccr = dot_product(buf, buf + dir * i, length, 1); |
|
|
|