Commit ab695b6d authored by Manuel Jander's avatar Manuel Jander
Browse files

Fix div_l with zero exit(-1) problem. Still need to check if the the problem...

Fix div_l with zero exit(-1) problem. Still need to check if the the problem needs to avoided in a second place (else branch of the if where it happens).
parent 3aada569
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -118,6 +118,8 @@

#define NONBE_FIX_BASOP_2233_RTPDUMP_DIFFERING_BITSTREAMS /* Nokia: fix basop issue 2233: Fix differing rtpdump streams */

#define NONBE_FIX_2237_ZERO_CURR_NOISE_PROBLEM              /* FhG: Modify sum of hTonalMDCTConc->curr_noise_nrg to avoid inaccurate zero */

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

/* #################### Start BASOP porting switches ############################ */
+12 −0
Original line number Diff line number Diff line
@@ -3098,7 +3098,19 @@ void TonalMdctConceal_create_concealment_noise_ivas_fx(
            move32();
            IF( concealment_noise[i] != 0 )
            {
#ifdef NONBE_FIX_2237_ZERO_CURR_NOISE_PROBLEM
                Word32 cnp;
                Word16 cnp_e;

                cnp_e = norm_l( concealment_noise[i] );
                cnp = L_shl( concealment_noise[i], cnp_e );
                cnp = Mpy_32_32( cnp, cnp );
                cnp_e = shl( add( cnp_e, *concealment_noise_exp ), 1 );

                hTonalMDCTConc->curr_noise_nrg = BASOP_Util_Add_Mant32Exp( hTonalMDCTConc->curr_noise_nrg, hTonalMDCTConc->curr_noise_nrg_exp, cnp, cnp_e, &temp_e ); // Q31-temp_e
#else
                hTonalMDCTConc->curr_noise_nrg = BASOP_Util_Add_Mant32Exp( hTonalMDCTConc->curr_noise_nrg, hTonalMDCTConc->curr_noise_nrg_exp, Mpy_32_32( concealment_noise[i], concealment_noise[i] ), shl( *concealment_noise_exp, 1 ), &temp_e ); // Q31-temp_e
#endif
            }
            hTonalMDCTConc->curr_noise_nrg_exp = temp_e;
            move16();