summaryrefslogtreecommitdiff
path: root/libavcodec/lpc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-08-16 21:24:06 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-08-16 21:24:06 +0000
commit56c07e298914d0533a74bb4ba4be4abc8ea6b245 (patch)
tree6ef6ae0a9296a54ef6f1aac807336360e71fddff /libavcodec/lpc.c
parente748e34dd6427271b779978a61156e47bfab3c8e (diff)
use limited range of lpc orders when quantizing coefficients
Originally committed as revision 14794 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lpc.c')
-rw-r--r--libavcodec/lpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c
index bdea026542..792abe4d1c 100644
--- a/libavcodec/lpc.c
+++ b/libavcodec/lpc.c
@@ -135,7 +135,7 @@ static int estimate_best_order(double *ref, int max_order)
* Calculate LPC coefficients for multiple orders
*/
int ff_lpc_calc_coefs(DSPContext *s,
- const int32_t *samples, int blocksize, int max_order,
+ const int32_t *samples, int blocksize, int min_order, int max_order,
int precision, int32_t coefs[][MAX_LPC_ORDER],
int *shift, int use_lpc, int omethod, int max_shift, int zero_shift)
{
@@ -195,7 +195,7 @@ int ff_lpc_calc_coefs(DSPContext *s,
i = opt_order-1;
quantize_lpc_coefs(lpc[i], i+1, precision, coefs[i], &shift[i], max_shift, zero_shift);
} else {
- for(i=0; i<max_order; i++) {
+ for(i=min_order-1; i<max_order; i++) {
quantize_lpc_coefs(lpc[i], i+1, precision, coefs[i], &shift[i], max_shift, zero_shift);
}
}