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

Speed up silk_warped_autocorrelation_FLP()

Reducing the dependency chain between tmp1 and tmp2 at the
cost of an extra multiply.
parent b2cfd877
No related branches found
No related tags found
No related merge requests found
Pipeline #4226 failed
......@@ -54,11 +54,13 @@ void silk_warped_autocorrelation_FLP(
/* Loop over allpass sections */
for( i = 0; i < order; i += 2 ) {
/* Output of allpass section */
tmp2 = state[ i ] + warping * ( state[ i + 1 ] - tmp1 );
/* We voluntarily use two multiples instead of factoring the expression to
reduce the length of the dependency chain (tmp1->tmp2->tmp1... ). */
tmp2 = state[ i ] + warping * state[ i + 1 ] - warping * tmp1;
state[ i ] = tmp1;
C[ i ] += state[ 0 ] * tmp1;
/* Output of allpass section */
tmp1 = state[ i + 1 ] + warping * ( state[ i + 2 ] - tmp2 );
tmp1 = state[ i + 1 ] + warping * state[ i + 2 ] - warping * tmp2;
state[ i + 1 ] = tmp2;
C[ i + 1 ] += state[ 0 ] * tmp2;
}
......
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