Commit 6103b473 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Remove Q_olapBufferSynth2 and adjust the exponent of hFdCngCom->olapBufferSynth2.

parent 19b6271f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ void initFdCngCom(
#ifndef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING
    set32_fx( hFdCngCom->olapBufferSynth_fx, 0, FFTLEN );
#endif
#ifndef FIX_REMOVE_SYNTH2_FX
#ifndef FIX_BASOP_REMOVE_SYNTH2_FX
    set32_fx( hFdCngCom->olapBufferSynth2_fx, 0, FFTLEN );
#endif
    set32_fx( hFdCngCom->exc_cng_32fx, 0, L_FRAME16k );
+2 −2
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@
#define HARM_2456_APPLY_SCALE                           /* FhG basop issue 2456: Harmonize apply_scale_ind(), apply_scale_ivas_fx() */
#define HARM_2454_TCX_RES_Q_SPEC                        /* FhG: harmonization of tcx_res_Q_spec_fx() and tcx_res_Q_spec_ivas_fx() */
#define FIX_FLOAT_1535_ARI_RES_Q_CLEANUP                /* FhG: remove dead code from tcx_ari_res_Q_spec() */
#define FIX_REMOVE_SYNTH2_FX                            /* FhG: Replace 32bit olapBufferSynth2_fx with 16bit olapBufferSynth2 buffer */

/* #################### End BE switches ################################## */

@@ -100,8 +99,9 @@

#define FIX_2448_RENDERER_MSAN_ERROR                    /* FhG: basop issue 2448: fix MSAN error with MSA rendering */
#define FIX_2283_ISM_MD_DELAY                           /* Dolby: Fix ISM metadata delay round-off */
#define FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING      /* FhG: basop issue 2262: correct buffer update for FD-CNG buffer in case of BR switching */
//#define FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING      /* FhG: basop issue 2262: correct buffer update for FD-CNG buffer in case of BR switching */
#define FIX_2440_AGC_PRESCALING                         /* FhG: basop issue 2440: Fix loop bounds when scaling p_output_fx before ivas_spar_dec_agc_pca_fx() */
//#define FIX_BASOP_REMOVE_SYNTH2_FX                      /* FhG: Replace 32bit olapBufferSynth2_fx with 16bit olapBufferSynth2 buffer */

/* ##################### End NON-BE switches ########################### */

+10 −2
Original line number Diff line number Diff line
@@ -7213,11 +7213,19 @@ ivas_error core_switching_pre_dec_fx(
    const Word16 nchan_out,           /* i  : number of output channels    */
    const Word16 last_element_mode,   /* i  : last_element_mode            */
    const Word32 last_element_brate,  /* i  : last element bitrate         */
#if defined( FIX_BASOP_REMOVE_SYNTH2_FX ) && defined( FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING )
    const Word16 Q_old_synthFB );
#elif defined( FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING )
    const Word16 Q_old_synthFB,
    Word16 *Q_olapBufferSynth2 );
#elif defined( FIX_BASOP_REMOVE_SYNTH2_FX )
    const Word16 Q_old_synthFB,
    Word16 *Q_olapBufferSynth );
#else
    const Word16 Q_old_synthFB,
#ifndef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING
    Word16 *Q_olapBufferSynth,
#endif
    Word16 *Q_olapBufferSynth2 );
#endif

ivas_error core_switching_post_dec_fx(
    Decoder_State *st_fx,               /* i/o: decoder state structure                                                           */
+2 −2
Original line number Diff line number Diff line
@@ -370,8 +370,8 @@ typedef struct
#ifndef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING
    Word32 olapBufferSynth_fx[FFTLEN]; /*Q_olapBufferSynth*/
#endif
#ifndef FIX_REMOVE_SYNTH2_FX
    Word32 olapBufferSynth2_fx[FFTLEN]; /*Q_olapBufferSynth2*/
#ifndef FIX_BASOP_REMOVE_SYNTH2_FX
    Word32 olapBufferSynth2_fx[FFTLEN];
#endif

    const Word32 *olapWinAna_fx; /* Q30 */
+3 −3
Original line number Diff line number Diff line
@@ -1635,7 +1635,7 @@ 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 );
#ifndef FIX_REMOVE_SYNTH2_FX
#ifndef FIX_BASOP_REMOVE_SYNTH2_FX
                                    set32_fx( st->hFdCngDec->hFdCngCom->olapBufferSynth2_fx, 0, st->hFdCngDec->hFdCngCom->fftlen );
#endif
                                }
@@ -1645,7 +1645,7 @@ ivas_error acelp_core_dec_fx(
                                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
#ifndef FIX_REMOVE_SYNTH2_FX
#ifndef FIX_BASOP_REMOVE_SYNTH2_FX
                                Copy_Scale_sig_32_16( st->hFdCngDec->hFdCngCom->olapBufferSynth2_fx, st->hFdCngDec->hFdCngCom->olapBufferSynth2, shl( st->hFdCngDec->hFdCngCom->frameSize, 1 ), -Q15 ); // Q0
#endif
                            }
@@ -1735,7 +1735,7 @@ ivas_error acelp_core_dec_fx(
                IF( st->idchan == 0 )
                {
                    set16_fx( st->hFdCngDec->hFdCngCom->olapBufferSynth2, 0, st->hFdCngDec->hFdCngCom->fftlen );
#ifndef FIX_REMOVE_SYNTH2_FX
#ifndef FIX_BASOP_REMOVE_SYNTH2_FX
                    set32_fx( st->hFdCngDec->hFdCngCom->olapBufferSynth2_fx, 0, st->hFdCngDec->hFdCngCom->fftlen );
#endif
                }
Loading