mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
div -> mul
Originally committed as revision 10630 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
8eb1c1cd5b
commit
286127c5dd
@ -770,7 +770,7 @@ static int lpc_calc_coefs(FlacEncodeContext *s,
|
|||||||
compute_lpc_coefs(autoc, max_order, lpc, ref);
|
compute_lpc_coefs(autoc, max_order, lpc, ref);
|
||||||
}else{
|
}else{
|
||||||
LLSModel m[2];
|
LLSModel m[2];
|
||||||
double var[MAX_LPC_ORDER+1], eval, weight;
|
double var[MAX_LPC_ORDER+1], weight;
|
||||||
|
|
||||||
for(pass=0; pass<use_lpc-1; pass++){
|
for(pass=0; pass<use_lpc-1; pass++){
|
||||||
av_init_lls(&m[pass&1], max_order);
|
av_init_lls(&m[pass&1], max_order);
|
||||||
@ -781,11 +781,14 @@ static int lpc_calc_coefs(FlacEncodeContext *s,
|
|||||||
var[j]= samples[i-j];
|
var[j]= samples[i-j];
|
||||||
|
|
||||||
if(pass){
|
if(pass){
|
||||||
|
double eval, inv, rinv;
|
||||||
eval= av_evaluate_lls(&m[(pass-1)&1], var+1, max_order-1);
|
eval= av_evaluate_lls(&m[(pass-1)&1], var+1, max_order-1);
|
||||||
eval= (512>>pass) + fabs(eval - var[0]);
|
eval= (512>>pass) + fabs(eval - var[0]);
|
||||||
|
inv = 1/eval;
|
||||||
|
rinv = sqrt(inv);
|
||||||
for(j=0; j<=max_order; j++)
|
for(j=0; j<=max_order; j++)
|
||||||
var[j]/= sqrt(eval);
|
var[j] *= rinv;
|
||||||
weight += 1/eval;
|
weight += inv;
|
||||||
}else
|
}else
|
||||||
weight++;
|
weight++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user