Commit dbacf728 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Exclude zero samples from exp_com calculation in tcaTargetCh_LA_fx.

parent a0a3fc64
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@
#define FIX_FLOAT_1578_OMASA_REND_SPIKES                /* Nokia: Float issue 1578: Fix spikes and collapsed perception in OMASA/MASA rendering to FOA/HOA */
#define FIX_1521_SBA_LOUDNESS_STEREO                    /* FhG: issue 1521: Fix loudness for SBA to stereo rendering */
#define FIX_1559                                        /* Eri/FhG: fix for Issue 1559 in FD CNG with bitrate/bw switching */
#define FIX_BASOP_2519_TCA_LA_ZERO_EXP                  /* FhG: BASOP #2519: Exclude zero samples from exp_com calculation in tcaTargetCh_LA_fx */

/* ##################### End NON-BE switches ########################### */

+14 −0
Original line number Diff line number Diff line
@@ -171,7 +171,14 @@ static void tcaTargetCh_LA_fx(
        move32();
        target_exp_temp[i + currentNCShift] = temp;
        move16();
#ifdef FIX_BASOP_2519_TCA_LA_ZERO_EXP
        IF( NE_32( target[i + currentNCShift], 0 ) )
        {
            exp_com = s_max( exp_com, temp );
        }
#else
        exp_com = s_max( exp_com, temp );
#endif
    }

    FOR( ; i < input_frame; i++ )
@@ -180,7 +187,14 @@ static void tcaTargetCh_LA_fx(
        move32();
        target_exp_temp[i + currentNCShift] = add( gAdj_exp, ref_exp );
        move16();
#ifdef FIX_BASOP_2519_TCA_LA_ZERO_EXP
        IF( NE_32( target[i + currentNCShift], 0 ) )
        {
            exp_com = s_max( exp_com, target_exp_temp[i + currentNCShift] );
        }
#else
        exp_com = s_max( exp_com, target_exp_temp[i + currentNCShift] );
#endif
    }

    FOR( i = 0; i < input_frame + currentNCShift; i++ )