ref: 0834ad61b171dc07c5653244a29632984643abdd
parent: 414eef55bd26f8b295c3cb42bf933cbb2d36dcaa
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Sat Feb 18 11:43:48 EST 2017
Speed up test_unit_LPC_inv_pred_gain by returning early on stable filters
--- a/silk/tests/test_unit_LPC_inv_pred_gain.c
+++ b/silk/tests/test_unit_LPC_inv_pred_gain.c
@@ -73,6 +73,16 @@
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;
}