From 29d1369a796580c952e7512ca24541966e0498c4 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin <jmvalin@jmvalin.ca> Date: Tue, 5 Jul 2016 12:07:02 -0400 Subject: [PATCH] Replace another useless 32x16 multiply with 16x16 --- silk/process_NLSFs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/silk/process_NLSFs.c b/silk/process_NLSFs.c index 248000bc0..0ab71f016 100644 --- a/silk/process_NLSFs.c +++ b/silk/process_NLSFs.c @@ -41,7 +41,7 @@ void silk_process_NLSFs( { opus_int i, doInterpolate; opus_int NLSF_mu_Q20; - opus_int32 i_sqr_Q15; + opus_int16 i_sqr_Q15; opus_int16 pNLSF0_temp_Q15[ MAX_LPC_ORDER ]; opus_int16 pNLSFW_QW[ MAX_LPC_ORDER ]; opus_int16 pNLSFW0_temp_QW[ MAX_LPC_ORDER ]; @@ -79,7 +79,8 @@ void silk_process_NLSFs( /* Update NLSF weights with contribution from first half */ i_sqr_Q15 = silk_LSHIFT( silk_SMULBB( psEncC->indices.NLSFInterpCoef_Q2, psEncC->indices.NLSFInterpCoef_Q2 ), 11 ); for( i = 0; i < psEncC->predictLPCOrder; i++ ) { - pNLSFW_QW[ i ] = silk_SMLAWB( silk_RSHIFT( pNLSFW_QW[ i ], 1 ), (opus_int32)pNLSFW0_temp_QW[ i ], i_sqr_Q15 ); + pNLSFW_QW[ i ] = silk_ADD16( silk_RSHIFT( pNLSFW_QW[ i ], 1 ), silk_RSHIFT( + silk_SMULBB( pNLSFW0_temp_QW[ i ], i_sqr_Q15 ), 16) ); silk_assert( pNLSFW_QW[ i ] >= 1 ); } } -- GitLab