Commit a14b95dc authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_1062_1068_fix' into 'main'

Fix for 3GPP issue 1062: Assertion exit in BASOP encoder (stereo_dmx) and in EVS BASOP decoder

See merge request !851
parents a51232b1 94281df3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -82,4 +82,5 @@
#define FIX_1013_CRASH_HQ_CORE_DEC /* Ittiam: Saturation added on the lines of EVS */
#define NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS /* DLB: adjust prerendering and mixing gain in OSBA encoder. This is fix to float codes*/
#define NONBE_1233_HQ_CLASSIFIER_DIV_BY_ZERO            /* Eri: issue 1233: Address possible division by zero in hf_spectrum_sparseness() */
#define FIX_ISSUE_1062_AND_1068_TON_ENE_EST_FX
#endif
+4 −0
Original line number Diff line number Diff line
@@ -2389,7 +2389,11 @@ void ton_ene_est_fx(
                exp_normn = norm_s( peak_fx[k] );

                fac_fx = div_s( shl( temp2_fx, exp_normd ), shl( peak_fx[k], exp_normn ) );
#ifdef FIX_ISSUE_1062_AND_1068_TON_ENE_EST_FX
                fac_fx = shl_sat( fac_fx, sub( add( Qss, exp_normn ), add( Qtemp2, exp_normd ) ) ); /* Qtemp2+exp_normd-(Qss+exp_normn)+15 -> 15*/
#else
                fac_fx = shl( fac_fx, sub( add( Qss, exp_normn ), add( Qtemp2, exp_normd ) ) ); /* Qtemp2+exp_normd-(Qss+exp_normn)+15 -> 15*/
#endif
            }

            ni_gain_fx[k] = mult_r( avg_pe_fx[k], fac_fx ); /* Qavg_pe[k] */