summaryrefslogtreecommitdiff
path: root/media/libopus/silk/float/k2a_FLP.c
diff options
context:
space:
mode:
Diffstat (limited to 'media/libopus/silk/float/k2a_FLP.c')
-rw-r--r--media/libopus/silk/float/k2a_FLP.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/media/libopus/silk/float/k2a_FLP.c b/media/libopus/silk/float/k2a_FLP.c
index 12af4e7669..1448008dbb 100644
--- a/media/libopus/silk/float/k2a_FLP.c
+++ b/media/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;
}
}