Skip to content
Snippets Groups Projects
Verified Commit 0834ad61 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Speed up test_unit_LPC_inv_pred_gain by returning early on stable filters

parent 414eef55
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,16 @@ int check_stability(opus_int16 *A_Q12, int order) {
if( !(y[ 0 ] < 10000 && y[ 0 ] > -10000) ) {
return 0;
}
/* Test every 8 sample for low amplitude. */
if( ( i & 0x7 ) == 0 ) {
double amp = 0;
for( j = 0; j < order; j++ ) {
amp += fabs(y[0]);
}
if( amp < 0.00001 ) {
return 1;
}
}
}
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment