Commit 005ceceb authored by Nicolas Roussin's avatar Nicolas Roussin
Browse files

Merge branch 'main' into 2239-optimize-ivas_filter_process_fx

parents 49860cd7 5051b2aa
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -115,6 +115,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 ############################ */
+24 −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( sub( *concealment_noise_exp, cnp_e ), 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();
@@ -3118,7 +3130,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( sub( *concealment_noise_exp, cnp_e ), 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();