summaryrefslogtreecommitdiff
path: root/media/libopus/silk/fixed/k2a_Q16_FIX.c
diff options
context:
space:
mode:
Diffstat (limited to 'media/libopus/silk/fixed/k2a_Q16_FIX.c')
-rw-r--r--media/libopus/silk/fixed/k2a_Q16_FIX.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/media/libopus/silk/fixed/k2a_Q16_FIX.c b/media/libopus/silk/fixed/k2a_Q16_FIX.c
index 3b03987544..1595aa6212 100644
--- a/media/libopus/silk/fixed/k2a_Q16_FIX.c
+++ b/media/libopus/silk/fixed/k2a_Q16_FIX.c
@@ -39,15 +39,16 @@ void silk_k2a_Q16(
)
{
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 ];
+ rc = rc_Q16[ k ];
+ for( n = 0; n < (k + 1) >> 1; n++ ) {
+ tmp1 = A_Q24[ n ];
+ tmp2 = A_Q24[ k - n - 1 ];
+ A_Q24[ n ] = silk_SMLAWW( tmp1, tmp2, rc );
+ A_Q24[ k - n - 1 ] = silk_SMLAWW( tmp2, tmp1, rc );
}
- for( n = 0; n < k; n++ ) {
- A_Q24[ n ] = silk_SMLAWW( A_Q24[ n ], Atmp[ k - n - 1 ], rc_Q16[ k ] );
- }
- A_Q24[ k ] = -silk_LSHIFT( rc_Q16[ k ], 8 );
+ A_Q24[ k ] = -silk_LSHIFT( rc, 8 );
}
}