[FFmpeg-cvslog] r14794 - in trunk/libavcodec: flacenc.c lpc.c lpc.h
jbr
subversion
Sat Aug 16 23:24:06 CEST 2008
Author: jbr
Date: Sat Aug 16 23:24:06 2008
New Revision: 14794
Log:
use limited range of lpc orders when quantizing coefficients
Modified:
trunk/libavcodec/flacenc.c
trunk/libavcodec/lpc.c
trunk/libavcodec/lpc.h
Modified: trunk/libavcodec/flacenc.c
==============================================================================
--- trunk/libavcodec/flacenc.c (original)
+++ trunk/libavcodec/flacenc.c Sat Aug 16 23:24:06 2008
@@ -855,7 +855,7 @@ static int encode_residual(FlacEncodeCon
}
/* 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 ||
Modified: trunk/libavcodec/lpc.c
==============================================================================
--- trunk/libavcodec/lpc.c (original)
+++ trunk/libavcodec/lpc.c Sat Aug 16 23:24:06 2008
@@ -135,7 +135,7 @@ static int estimate_best_order(double *r
* 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);
}
}
Modified: trunk/libavcodec/lpc.h
==============================================================================
--- trunk/libavcodec/lpc.h (original)
+++ trunk/libavcodec/lpc.h Sat Aug 16 23:24:06 2008
@@ -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);
More information about the ffmpeg-cvslog
mailing list