Commit 660c4129 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch...

Merge branch '790-improper-output-with-floating-point-ivas-decoder-for-10db-test_sba_plc_system-1-32' into 'ivas-float-update'

[non-BE] [split-non-be] Resolve "Improper output with floating point IVAS decoder for 10dB test_sba_plc_system[1-32-PLperc40mblen50-stvFOA-0-32000] test case"

See merge request !453
parents 698188f8 f520e60f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@
#define NONBE_MDCT_ST_DTX_SKIP_DEWHITENING_OF_NOISE_SHAPES_ON_SID_FRAMES /* FhG: issue 1133: skip de-whitening of bg noise shape after frameloss period if the first good frame is an SID */
#define NONBE_MDCT_ST_PLC_DO_NOT_SCALE_OLD_OUT_IF_FIRST_GOOD_IS_SID /* FhG: issue 1133: in TCX PLC, don't scale hHQ_core->old_out after applying fade to noise in burst frame error */
#define NON_BE_FIX_1137_GSC_IVAS_FXFLT_DECODING         /* VA: Add fix point bit allocation for special GSC mode such that float and fixed point have the same final bit allocation */
#define NONBE_FIX_1132_THRESHOLD_POW_IN_SWB_TBE         /* VA: issue 1132: prevent division by extremely low energy value in SWB TBE */

/* #################### End FIXES switches ############################ */

+18 −0
Original line number Diff line number Diff line
@@ -325,6 +325,15 @@ void wb_tbe_dec(
        prev_pow = sum2_f( shaped_wb_excitation, L_SHB_LAHEAD / 4 );
        curr_pow = sum2_f( shaped_wb_excitation + L_SHB_LAHEAD / 4, L_SHB_LAHEAD / 4 );

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

        if ( voice_factors[0] > 0.75f )
        {
            curr_pow *= 0.25;
@@ -1059,6 +1068,15 @@ 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 );

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

        if ( voice_factors[0] > 0.75f )
        {
            curr_pow *= 0.25;
+18 −0
Original line number Diff line number Diff line
@@ -373,6 +373,15 @@ void wb_tbe_enc(
    prev_pow = sum2_f( shaped_wb_excitation, L_SHB_LAHEAD / 4 );
    curr_pow = sum2_f( shaped_wb_excitation + L_SHB_LAHEAD / 4, L_SHB_LAHEAD / 4 );

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

    if ( voice_factors[0] > 0.75f )
    {
        curr_pow = (float) ( curr_pow * 0.25 );
@@ -1050,6 +1059,15 @@ void swb_tbe_enc(
        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 );

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

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