mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-29 06:45:47 +00:00
avcodec/lpc: account for odd len values
Reviewed-by: Rémi Denis-Courmont <remi@remlab.net> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
2f184aa89b
commit
e0db1f51d6
@ -120,9 +120,8 @@ static void lpc_compute_autocorr_c(const double *data, ptrdiff_t len, int lag,
|
||||
|
||||
if(j==lag){
|
||||
double sum = 1.0;
|
||||
for(i=j-1; i<len; i+=2){
|
||||
sum += data[i ] * data[i-j ]
|
||||
+ data[i+1] * data[i-j+1];
|
||||
for(i=j-1; i<len; i++){
|
||||
sum += data[i] * data[i-j];
|
||||
}
|
||||
autoc[j] = sum;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user