From 41578f70cf8aec8e7565fba1ca7e07f3dc46c3d2 Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Tue, 18 Jun 2013 21:30:41 +0000 Subject: lpc: use function pointers, in preparation for asm Signed-off-by: Luca Barbato --- libavutil/lls.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'libavutil/lls.h') diff --git a/libavutil/lls.h b/libavutil/lls.h index 9c71cf9e6e..81834402f7 100644 --- a/libavutil/lls.h +++ b/libavutil/lls.h @@ -37,12 +37,23 @@ typedef struct LLSModel { double coeff[MAX_VARS][MAX_VARS]; double variance[MAX_VARS]; int indep_count; + /** + * Take the outer-product of var[] with itself, and add to the covariance matrix. + * @param m this context + * @param var training samples, starting with the value to be predicted + */ + void (*update_lls)(struct LLSModel *m, double *var); + /** + * Inner product of var[] and the LPC coefs. + * @param m this context + * @param var training samples, excluding the value to be predicted + * @param order lpc order + */ + double (*evaluate_lls)(struct LLSModel *m, double *var, int order); } LLSModel; void avpriv_init_lls(LLSModel *m, int indep_count); -void avpriv_update_lls(LLSModel *m, double *param); void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order); -double avpriv_evaluate_lls(LLSModel *m, double *param, int order); #if FF_API_LLS_PRIVATE void av_init_lls(LLSModel *m, int indep_count); -- cgit v1.2.3