Loading lib_enc/fd_cng_enc_fx.c +3 −5 Original line number Diff line number Diff line Loading @@ -2107,16 +2107,17 @@ void FdCng_encodeSID_fx( } /* Compute gain */ gain_fx = 0; move32(); #ifdef FIX_2489_HARMONIZE_FdCng_encodeSID_IVASHP IF( element_mode == 0 ) #endif { Word16 normShiftN = BASOP_util_norm_s_bands2shift( N ); Word16 normFacN = getNormReciprocalWord16( N ); /*Q9.23 format */ gain_fx = 0; FOR( i = 0; i < N; i++ ) { /*Q9.23 format */ gain_fx = L_add( gain_fx, L_shr( v_fx[i], normShiftN ) ); } gain_fx = L_sub( e_fx, L_shl( Mpy_32_16_1( gain_fx, shl( normFacN, sub( normShiftN, 1 ) ) ), 1 ) ); Loading @@ -2125,8 +2126,6 @@ void FdCng_encodeSID_fx( ELSE { Word16 v_e = sub( 31, sub( 20, find_guarded_bits_fx( N ) ) ); gain_fx = 0; move32(); FOR( i = 0; i < N; i++ ) { gain_fx = L_add( gain_fx, v_fx[i] ); // Q = 31 - v_e Loading Loading @@ -2198,7 +2197,6 @@ void FdCng_encodeSID_fx( maxVal = L_add( maxVal, gain_fx ); maxVal = L_shl( Mpy_32_16_1( maxVal, 21771 /*0.66438561897 Q15*/ ), 1 ); move16(); WHILE( maxVal >= 0 ) { maxVal = L_sub( maxVal, 33554432l /*0.015625 Q31*/ ); Loading Loading
lib_enc/fd_cng_enc_fx.c +3 −5 Original line number Diff line number Diff line Loading @@ -2107,16 +2107,17 @@ void FdCng_encodeSID_fx( } /* Compute gain */ gain_fx = 0; move32(); #ifdef FIX_2489_HARMONIZE_FdCng_encodeSID_IVASHP IF( element_mode == 0 ) #endif { Word16 normShiftN = BASOP_util_norm_s_bands2shift( N ); Word16 normFacN = getNormReciprocalWord16( N ); /*Q9.23 format */ gain_fx = 0; FOR( i = 0; i < N; i++ ) { /*Q9.23 format */ gain_fx = L_add( gain_fx, L_shr( v_fx[i], normShiftN ) ); } gain_fx = L_sub( e_fx, L_shl( Mpy_32_16_1( gain_fx, shl( normFacN, sub( normShiftN, 1 ) ) ), 1 ) ); Loading @@ -2125,8 +2126,6 @@ void FdCng_encodeSID_fx( ELSE { Word16 v_e = sub( 31, sub( 20, find_guarded_bits_fx( N ) ) ); gain_fx = 0; move32(); FOR( i = 0; i < N; i++ ) { gain_fx = L_add( gain_fx, v_fx[i] ); // Q = 31 - v_e Loading Loading @@ -2198,7 +2197,6 @@ void FdCng_encodeSID_fx( maxVal = L_add( maxVal, gain_fx ); maxVal = L_shl( Mpy_32_16_1( maxVal, 21771 /*0.66438561897 Q15*/ ), 1 ); move16(); WHILE( maxVal >= 0 ) { maxVal = L_sub( maxVal, 33554432l /*0.015625 Q31*/ ); Loading