summaryrefslogtreecommitdiff
path: root/libs/libopus/silk/float/k2a_FLP.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libopus/silk/float/k2a_FLP.c')
-rw-r--r--libs/libopus/silk/float/k2a_FLP.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libs/libopus/silk/float/k2a_FLP.c b/libs/libopus/silk/float/k2a_FLP.c
index 12af4e766..1448008db 100644
--- a/libs/libopus/silk/float/k2a_FLP.c
+++ b/libs/libopus/silk/float/k2a_FLP.c
@@ -39,15 +39,16 @@ void silk_k2a_FLP(
)
{
opus_int k, n;
- silk_float Atmp[ SILK_MAX_ORDER_LPC ];
+ silk_float rck, tmp1, tmp2;
for( k = 0; k < order; k++ ) {
- for( n = 0; n < k; n++ ) {
- Atmp[ n ] = A[ n ];
+ rck = rc[ k ];
+ for( n = 0; n < (k + 1) >> 1; n++ ) {
+ tmp1 = A[ n ];
+ tmp2 = A[ k - n - 1 ];
+ A[ n ] = tmp1 + tmp2 * rck;
+ A[ k - n - 1 ] = tmp2 + tmp1 * rck;
}
- for( n = 0; n < k; n++ ) {
- A[ n ] += Atmp[ k - n - 1 ] * rc[ k ];
- }
- A[ k ] = -rc[ k ];
+ A[ k ] = -rck;
}
}