return est;
}
+int ff_lpc_calc_ref_coefs(LPCContext *s,
+ const int32_t *samples, int order, double *ref)
+{
+ double autoc[MAX_LPC_ORDER + 1];
+
+ s->lpc_apply_welch_window(samples, s->blocksize, s->windowed_samples);
+ s->lpc_compute_autocorr(s->windowed_samples, s->blocksize, order, autoc);
+ compute_ref_coefs(autoc, order, ref, NULL);
+
+ return order;
+}
+
/**
* Calculate LPC coefficients for multiple orders
*
double var[MAX_LPC_ORDER+1], av_uninit(weight);
for(pass=0; pass<lpc_passes; pass++){
- av_init_lls(&m[pass&1], max_order);
+ avpriv_init_lls(&m[pass&1], max_order);
weight=0;
for(i=max_order; i<blocksize; i++){
if(pass){
double eval, inv, rinv;
- eval= av_evaluate_lls(&m[(pass-1)&1], var+1, max_order-1);
+ eval= avpriv_evaluate_lls(&m[(pass-1)&1], var+1, max_order-1);
eval= (512>>pass) + fabs(eval - var[0]);
inv = 1/eval;
rinv = sqrt(inv);
}else
weight++;
- av_update_lls(&m[pass&1], var, 1.0);
+ avpriv_update_lls(&m[pass&1], var, 1.0);
}
- av_solve_lls(&m[pass&1], 0.001, 0);
+ avpriv_solve_lls(&m[pass&1], 0.001, 0);
}
for(i=0; i<max_order; i++){