diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-01-21 00:11:44 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-01-21 19:58:59 +0000 |
commit | 56f8952b252f85281317ecd3e0b04c4cae93fd72 (patch) | |
tree | a6c8fa8727be01daa6c9200b9dee20ba261b2c05 /libavcodec/lpc.h | |
parent | 50196a982bf7c8be9b41053fa0975473c217e709 (diff) | |
download | ffmpeg-56f8952b252f85281317ecd3e0b04c4cae93fd72.tar.gz |
Move lpc_compute_autocorr() from DSPContext to a new struct LPCContext.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/lpc.h')
-rw-r--r-- | libavcodec/lpc.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/libavcodec/lpc.h b/libavcodec/lpc.h index 1c595f6b9a..a307793374 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 |