Commit efeddffa authored by multrus's avatar multrus
Browse files

small complexity improvement

parent 97ef54fd
Loading
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -104,11 +104,14 @@ void ivas_DetectTonalComponents_fx(
            pScaledMdctSpectrum[i] = L_shl( lastMDCTSpectrum[i], 16 ); /*15-lastMDCTSpectrum_exp+16 -> 31 - lastMDCTSpectrum_exp*/
            move32();
        }

#ifndef HARMONIZE_FUNC
        FOR( Word16 i = 0; i < FDNS_NPTS; i++ )
        {
            sns_int_scf_fx[i] = L_shl_sat( scaleFactors[i], add( 1, scaleFactors_exp[i] ) ); // Q16
            move32();
        }
#endif
        IF( psychParamsCurrent == NULL )
        {
            nBands = FDNS_NPTS;
@@ -119,6 +122,14 @@ void ivas_DetectTonalComponents_fx(
        }
        ELSE
        {
#ifdef HARMONIZE_FUNC
            FOR( Word16 i = 0; i < FDNS_NPTS; i++ )
            {
                sns_int_scf_fx[i] = L_shl_sat( scaleFactors[i], add( 1, scaleFactors_exp[i] ) ); // Q16
                move32();
            }
#endif

            q_pScaledMdctSpectrum = sub( 31, lastMDCTSpectrum_exp );
            sns_shape_spectrum_fx( pScaledMdctSpectrum, &q_pScaledMdctSpectrum, psychParamsCurrent, sns_int_scf_fx, 16, nSamplesCore, NULL );
            q_pScaledMdctSpectrum = add( q_pScaledMdctSpectrum, 1 );