Commit 45c49362 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

cleanup

parent 24f64f6a
Loading
Loading
Loading
Loading
+4 −18
Original line number Diff line number Diff line
@@ -4428,16 +4428,9 @@ void ivas_lfe_synth_with_filters_fx(
            lfeGain_fx_exp = add( sub( hMasaLfeSynth->transportEneSmooth_q, hMasaLfeSynth->targetEneLfeSmooth_q ), lfeGain_fx_exp );
            lfeGain_fx = Sqrt16( lfeGain_fx, &lfeGain_fx_exp ); // Q15-lfeGain_fx_exp
#ifdef ISSUE_1751_replace_shl_ro
            // assert( lfeGain_fx_exp >= 0 ); FAILS
            assert( lfeGain_fx_exp <= 0 );
            if ( lfeGain_fx_exp >= 0 )
            {
                lfeGain_fx = shl_sat( lfeGain_fx, lfeGain_fx_exp ); // Q15
            }
            else
            {
            /*if assert is thrown, shl_sat can handle the left shift*/
            lfeGain_fx = shr_r( lfeGain_fx, negate( lfeGain_fx_exp ) ); // Q15
            }
#else
            Flag Overflow;
            lfeGain_fx = shl_ro( lfeGain_fx, lfeGain_fx_exp & Overflow ); // Q15
@@ -4454,16 +4447,9 @@ void ivas_lfe_synth_with_filters_fx(
            transportGain_fx_exp = add( sub( hMasaLfeSynth->transportEneSmooth_q, hMasaLfeSynth->targetEneTransSmooth_q ), transportGain_fx_exp );
            transportGain_fx = Sqrt16( transportGain_fx, &transportGain_fx_exp ); // q15-transportGain_fx_exp
#ifdef ISSUE_1751_replace_shl_ro
            // assert( transportGain_fx_exp >= 0 ); FAILS
            assert( transportGain_fx_exp <= 0 );
            if ( transportGain_fx_exp >= 0 )
            {
                transportGain_fx = shl_sat( transportGain_fx, transportGain_fx_exp ); // Q15
            }
            else
            {
            /*if assert is thrown, shl_sat can handle the left shift*/
            transportGain_fx = shr_r( transportGain_fx, negate( transportGain_fx_exp ) ); // Q15
            }
#else
            Flag Overflow;
            transportGain_fx = shl_ro( transportGain_fx, transportGain_fx_exp & Overflow ); // Q15