aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/lpc.h
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-01-21 00:11:44 +0000
committerMichael Niedermayer <michaelni@gmx.at>2011-01-23 19:32:06 +0100
commit0d8837bdda4cad7e6c280d2648cef8077e54947b (patch)
treedc589b85ee75d3debf012d8a95f18258dc5ba25f /libavcodec/lpc.h
parentd3058be6eefefe552f3b03820cc949bfa4e4f487 (diff)
downloadffmpeg-0d8837bdda4cad7e6c280d2648cef8077e54947b.tar.gz
Move lpc_compute_autocorr() from DSPContext to a new struct LPCContext.
Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 56f8952b252f85281317ecd3e0b04c4cae93fd72)
Diffstat (limited to 'libavcodec/lpc.h')
-rw-r--r--libavcodec/lpc.h24
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