Commit 8c3e3f9f authored by emerit's avatar emerit
Browse files

Merge branch 'main' into 1963_basop_portFltMR-1568-1471-1690

parents 3dddbd81 74867d7d
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@
#define FIX_ISSUE_2013_MDCT_STEREO_FER_DISCONTINUITIES       /* Eri/FhG: Issue 2013 fix for FER discontinuities */
#define FIX_2000_NON_LINEARITY_OVERSHOOT                     /* Eri: Issue 2000: SWB TBE energy overshoot in non-linearity. Aligns with float */
#define FIX_2010_PREP_TBE_EXC                                /* FhG: fix issues with varying Q-values for code_preQ_fx[] */
#define FIX_2025_FDCNG_MULT                                  /* Nokia, FhG: Fix LB FDCNG noise introduced by changing mult to i_mult */

/* #################### Start BASOP porting switches ############################ */

+12 −0
Original line number Diff line number Diff line
@@ -4996,17 +4996,29 @@ void generate_masking_noise_lb_dirac_fx(
           overwriting it with the synthesis in case of shared tc and synth channel memory, i.e. non-TSM mode */
        slot_size_cng = shr( hFdCngCom->frameSize, 4 /* DEFAULT_JBM_CLDFB_TIMESLOTS */ );
        /* move start indices forward to the end of the last subframe */
#ifdef FIX_2025_FDCNG_MULT
        cur_subframe_start_outfs = i_mult( nCldfbTs, hSpatParamRendCom->slot_size );
        cur_subframe_start_cngfs = i_mult( nCldfbTs, slot_size_cng );
#else
        cur_subframe_start_outfs = mult( nCldfbTs, hSpatParamRendCom->slot_size );
        cur_subframe_start_cngfs = mult( nCldfbTs, slot_size_cng );
#endif

        /* go from the last subframe back and move the LB noise */
        FOR( cur_subframe = sub( hSpatParamRendCom->nb_subframes, 1 ); cur_subframe >= 0; cur_subframe-- )
        {
            Word16 move_size, subframe_size_outfs;
#ifdef FIX_2025_FDCNG_MULT
            move_size = i_mult( slot_size_cng, hSpatParamRendCom->subframe_nbslots[cur_subframe] );
            subframe_size_outfs = i_mult( hSpatParamRendCom->subframe_nbslots[cur_subframe], hSpatParamRendCom->slot_size );
            cur_subframe_start_outfs = sub( cur_subframe_start_outfs, i_mult( hSpatParamRendCom->subframe_nbslots[cur_subframe], hSpatParamRendCom->slot_size ) );
            cur_subframe_start_cngfs = sub( cur_subframe_start_cngfs, i_mult( hSpatParamRendCom->subframe_nbslots[cur_subframe], slot_size_cng ) );
#else
            move_size = mult( slot_size_cng, hSpatParamRendCom->subframe_nbslots[cur_subframe] );
            subframe_size_outfs = mult( hSpatParamRendCom->subframe_nbslots[cur_subframe], hSpatParamRendCom->slot_size );
            cur_subframe_start_outfs = sub( cur_subframe_start_outfs, mult( hSpatParamRendCom->subframe_nbslots[cur_subframe], hSpatParamRendCom->slot_size ) );
            cur_subframe_start_cngfs = sub( cur_subframe_start_cngfs, mult( hSpatParamRendCom->subframe_nbslots[cur_subframe], slot_size_cng ) );
#endif
            /* move cna */
            Copy32( tdBuffer + cur_subframe_start_cngfs, tdBuffer + cur_subframe_start_outfs, move_size );