35 for (i = 0; i < 100; i++) {
39 var[0] = (
av_lfg_get(&lfg) / (double) UINT_MAX - 0.5) * 2;
40 var[1] = var[0] +
av_lfg_get(&lfg) / (double) UINT_MAX - 0.5;
41 var[2] = var[1] +
av_lfg_get(&lfg) / (double) UINT_MAX - 0.5;
42 var[3] = var[2] +
av_lfg_get(&lfg) / (double) UINT_MAX - 0.5;
45 for (order = 0; order < 3; order++) {
47 printf(
"real:%9f order:%d pred:%9f var:%f coeffs:%f %9f %9f\n",
48 var[0], order, eval, sqrt(m.
variance[order] / (i + 1)),
Linear least squares model.
double variance[MAX_VARS]
av_cold void avpriv_init_lls(LLSModel *m, int indep_count)
common internal API header
void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order)
double(* evaluate_lls)(struct LLSModel *m, const double *var, int order)
Inner product of var[] and the LPC coefs.
static unsigned int av_lfg_get(AVLFG *c)
Get the next random unsigned 32-bit number using an ALFG.
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
#define LOCAL_ALIGNED(a, t, v,...)
void(* update_lls)(struct LLSModel *m, const double *var)
Take the outer-product of var[] with itself, and add to the covariance matrix.