From 19b9c7cc6694bc8d0042dda67f606bd0bf13783b Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Sat, 29 Sep 2007 07:43:52 +0000 Subject: was computing one more autocorrelation coefficient that was actually used Originally committed as revision 10613 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/flacenc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libavcodec/flacenc.c') diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 3b01a3ba1a..f96bc29c72 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -608,13 +608,14 @@ static void compute_autocorr(const int32_t *data, int len, int lag, double *autoc) { int i, j; - double tmp[len + lag]; + double tmp[len + lag + 1]; double *data1= tmp + lag; apply_welch_window(data, len, data1); for(j=0; j= MIN_LPC_ORDER && max_order <= MAX_LPC_ORDER); if(use_lpc == 1){ - compute_autocorr(samples, blocksize, max_order+1, autoc); + compute_autocorr(samples, blocksize, max_order, autoc); compute_lpc_coefs(autoc, max_order, lpc, ref); }else{ -- cgit v1.2.3