From 23940f1405d4c19df69b1fa77c319e9f114c8ef7 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sun, 11 Jul 2010 16:56:20 +0000 Subject: Add AVCodecContext.lpc_type and Add AVCodecContext.lpc_passes fields. Add AVLPCType enum. Deprecate AVCodecContext.use_lpc. Originally committed as revision 24199 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/lpc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'libavcodec/lpc.c') diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c index 41d5e19255..112a78d4b9 100644 --- a/libavcodec/lpc.c +++ b/libavcodec/lpc.c @@ -165,7 +165,8 @@ static int estimate_best_order(double *ref, int min_order, int max_order) int ff_lpc_calc_coefs(DSPContext *s, 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, + int32_t coefs[][MAX_LPC_ORDER], int *shift, + enum AVLPCType lpc_type, int lpc_passes, int omethod, int max_shift, int zero_shift) { double autoc[MAX_LPC_ORDER+1]; @@ -174,20 +175,21 @@ int ff_lpc_calc_coefs(DSPContext *s, int i, j, pass; int opt_order; - assert(max_order >= MIN_LPC_ORDER && max_order <= MAX_LPC_ORDER && use_lpc > 0); + assert(max_order >= MIN_LPC_ORDER && max_order <= MAX_LPC_ORDER && + lpc_type > AV_LPC_TYPE_FIXED); - if(use_lpc == 1){ + if (lpc_type == AV_LPC_TYPE_LEVINSON) { s->lpc_compute_autocorr(samples, blocksize, max_order, autoc); compute_lpc_coefs(autoc, max_order, &lpc[0][0], MAX_LPC_ORDER, 0, 1); for(i=0; i