summaryrefslogtreecommitdiff
path: root/media/libopus/silk/fixed/k2a_FIX.c
diff options
context:
space:
mode:
Diffstat (limited to 'media/libopus/silk/fixed/k2a_FIX.c')
-rw-r--r--media/libopus/silk/fixed/k2a_FIX.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/media/libopus/silk/fixed/k2a_FIX.c b/media/libopus/silk/fixed/k2a_FIX.c
index 5fee599bcb..549f6eadaa 100644
--- a/media/libopus/silk/fixed/k2a_FIX.c
+++ b/media/libopus/silk/fixed/k2a_FIX.c
@@ -39,14 +39,15 @@ void silk_k2a(
)
{
opus_int k, n;
- opus_int32 Atmp[ SILK_MAX_ORDER_LPC ];
+ opus_int32 rc, tmp1, tmp2;
for( k = 0; k < order; k++ ) {
- for( n = 0; n < k; n++ ) {
- Atmp[ n ] = A_Q24[ n ];
- }
- for( n = 0; n < k; n++ ) {
- A_Q24[ n ] = silk_SMLAWB( A_Q24[ n ], silk_LSHIFT( Atmp[ k - n - 1 ], 1 ), rc_Q15[ k ] );
+ rc = rc_Q15[ k ];
+ for( n = 0; n < (k + 1) >> 1; n++ ) {
+ tmp1 = A_Q24[ n ];
+ tmp2 = A_Q24[ k - n - 1 ];
+ A_Q24[ n ] = silk_SMLAWB( tmp1, silk_LSHIFT( tmp2, 1 ), rc );
+ A_Q24[ k - n - 1 ] = silk_SMLAWB( tmp2, silk_LSHIFT( tmp1, 1 ), rc );
}
A_Q24[ k ] = -silk_LSHIFT( (opus_int32)rc_Q15[ k ], 9 );
}