Commit 9dd1a2a5 authored by malenov's avatar malenov
Browse files

correction of the threshold

parent e48c72bf
Loading
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -1063,19 +1063,20 @@ void swb_tbe_dec(
        prev_pow = sum2_f( shaped_shb_excitation, L_SHB_LAHEAD + 10 );
        curr_pow = sum2_f( shaped_shb_excitation + L_SHB_LAHEAD + 10, L_SHB_LAHEAD + 10 );

        if ( voice_factors[0] > 0.75f )
        {
            curr_pow *= 0.25;
        }

#ifdef NONBE_FIX_1132_THRESHOLD_POW_IN_SWB_TBE
        if ( st->element_mode > EVS_MONO )
        {
            /* prevent too low values of energy */
            prev_pow += 1.0f;
            curr_pow += 1.0f;
            prev_pow += 0.00001f;
            curr_pow += 0.00001f;
        }
#endif

        if ( voice_factors[0] > 0.75f )
        {
            curr_pow *= 0.25;
        }

        if ( prev_pow == 0 )
        {
            scale = 0;