From 0d8837bdda4cad7e6c280d2648cef8077e54947b Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Fri, 21 Jan 2011 00:11:44 +0000 Subject: Move lpc_compute_autocorr() from DSPContext to a new struct LPCContext. Signed-off-by: Mans Rullgard (cherry picked from commit 56f8952b252f85281317ecd3e0b04c4cae93fd72) --- libavcodec/lpc.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'libavcodec/lpc.h') diff --git a/libavcodec/lpc.h b/libavcodec/lpc.h index 1c595f6..a307793 100644 --- a/libavcodec/lpc.h +++ b/libavcodec/lpc.h @@ -36,18 +36,36 @@ #define MAX_LPC_ORDER 32 +typedef struct LPCContext { + /** + * Perform autocorrelation on input samples with delay of 0 to lag. + * @param data input samples. + * no alignment needed. + * @param len number of input samples to process + * @param lag maximum delay to calculate + * @param autoc output autocorrelation coefficients. + * constraints: array size must be at least lag+1. + */ + void (*lpc_compute_autocorr)(const int32_t *data, int len, int lag, + double *autoc); +} LPCContext; + + /** * Calculate LPC coefficients for multiple orders */ -int ff_lpc_calc_coefs(DSPContext *s, +int ff_lpc_calc_coefs(LPCContext *s, const int32_t *samples, int blocksize, int min_order, int max_order, int precision, int32_t coefs[][MAX_LPC_ORDER], int *shift, enum AVLPCType lpc_type, int lpc_passes, int omethod, int max_shift, int zero_shift); -void ff_lpc_compute_autocorr(const int32_t *data, int len, int lag, - double *autoc); +/** + * Initialize LPCContext. + */ +void ff_lpc_init(LPCContext *s); +void ff_lpc_init_x86(LPCContext *s); #ifdef LPC_USE_DOUBLE #define LPC_TYPE double -- cgit v1.1