Mercurial > libavcodec.hg
changeset 7591:7dfb28d3ccd1 libavcodec
use limited range of lpc orders when quantizing coefficients
author | jbr |
---|---|
date | Sat, 16 Aug 2008 21:24:06 +0000 |
parents | d6126c8b57e9 |
children | 377fddcc6288 |
files | flacenc.c lpc.c lpc.h |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/flacenc.c Sat Aug 16 17:28:29 2008 +0000 +++ b/flacenc.c Sat Aug 16 21:24:06 2008 +0000 @@ -855,7 +855,7 @@ } /* LPC */ - opt_order = ff_lpc_calc_coefs(&ctx->dsp, smp, n, max_order, precision, coefs, + opt_order = ff_lpc_calc_coefs(&ctx->dsp, smp, n, min_order, max_order, precision, coefs, shift, ctx->options.use_lpc, omethod, MAX_LPC_SHIFT, 0); if(omethod == ORDER_METHOD_2LEVEL ||
--- a/lpc.c Sat Aug 16 17:28:29 2008 +0000 +++ b/lpc.c Sat Aug 16 21:24:06 2008 +0000 @@ -135,7 +135,7 @@ * 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 @@ 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); } }
--- a/lpc.h Sat Aug 16 17:28:29 2008 +0000 +++ b/lpc.h Sat Aug 16 21:24:06 2008 +0000 @@ -39,7 +39,7 @@ * 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);