Commit 049c5ad5 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

Merge branch 'fix_1996_masking_noise' into 'main'

[non-BE] [split non-BE] [allow-regression] fix for masking noise issue

See merge request !2208
parents df97ba07 0ef4ad3e
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@
#define FIX_1819_EIGENVALUE_ERROR                            /* FhG: Workaround for zero eigenvalue: replace with epsilon if det != 0*/
#define FIX_1990_SANITIZER_IN_REVERB_LOAD                    /* Nokia: Fix issue part of issue 1990 by introducing missing free of structure. */
#define FIX_1995_REVERB_INIT                                 /* VA/Nokia: issue 1995: Fix use-of-uninitialized-value in ivas_binaural_reverb_init() */
#define FIX_1996_MASKING_NOISE                               /* Dlb: Heavy precision loss in ola buffers causing discontinuity*/

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

+9 −2
Original line number Diff line number Diff line
@@ -1637,12 +1637,16 @@ ivas_error acelp_core_dec_fx(
                                IF( NE_16( st->element_mode, last_element_mode ) )
                                {
                                    set16_fx( st->hFdCngDec->hFdCngCom->olapBufferSynth2, 0, st->hFdCngDec->hFdCngCom->fftlen );
#ifdef FIX_1996_MASKING_NOISE
                                    set32_fx( st->hFdCngDec->hFdCngCom->olapBufferSynth2_fx, 0, st->hFdCngDec->hFdCngCom->fftlen );
#endif
                                }

                                Word32 psyn_32_fx[L_FRAME16k];
                                Copy_Scale_sig_16_32_no_sat( psyn_fx, psyn_32_fx, st->hFdCngDec->hFdCngCom->frameSize, sub( Q6, st->Q_syn ) ); // Q6
#ifndef FIX_1996_MASKING_NOISE
                                Copy_Scale_sig_16_32_no_sat( st->hFdCngDec->hFdCngCom->olapBufferSynth2, st->hFdCngDec->hFdCngCom->olapBufferSynth2_fx, shl( st->hFdCngDec->hFdCngCom->frameSize, 1 ), Q15 ); // Q15

#endif
                                generate_masking_noise_ivas_fx( psyn_32_fx, &exp, st->hFdCngDec->hFdCngCom, st->hFdCngDec->hFdCngCom->frameSize, 0, 0, 0, st->element_mode, hStereoCng, nchan_out );

                                Copy_Scale_sig_32_16( psyn_32_fx, psyn_fx, st->hFdCngDec->hFdCngCom->frameSize, sub( st->Q_syn, exp ) );                                                                // Q = st->Q_syn
@@ -1734,6 +1738,9 @@ ivas_error acelp_core_dec_fx(
                IF( st->idchan == 0 )
                {
                    set16_fx( st->hFdCngDec->hFdCngCom->olapBufferSynth2, 0, st->hFdCngDec->hFdCngCom->fftlen );
#ifdef FIX_1996_MASKING_NOISE
                    set32_fx( st->hFdCngDec->hFdCngCom->olapBufferSynth2_fx, 0, st->hFdCngDec->hFdCngCom->fftlen );
#endif
                }
                IF( hStereoCng != NULL && ( st->idchan == 0 ) )
                {
+3 −0
Original line number Diff line number Diff line
@@ -88,6 +88,9 @@ void initFdCngDec_ivas_fx(
    hFdCngDec->hFdCngCom->olapBufferAna = hFdCngDec->olapBufferAna;
    set16_fx( hFdCngDec->olapBufferSynth2, 0, FFTLEN );
    hFdCngDec->hFdCngCom->olapBufferSynth2 = hFdCngDec->olapBufferSynth2;
#ifdef FIX_1996_MASKING_NOISE
    set32_fx( hFdCngDec->hFdCngCom->olapBufferSynth2_fx, 0, FFTLEN );
#endif

    /* Set some counters and flags */