Commit a9c47ad7 authored by vasilache's avatar vasilache
Browse files

Merge branch 'main' into basop-2492-remove-duplicates-for-decode_indexes-function

parents 699753bd ce3749b6
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -108,6 +108,10 @@
#define FIX_BASOP_2573_RF_MODE_UPDATE                   /* FhG: BASOP issue 2573: remove duplicated update of rf_mode parameters from evs_enc_fx(); was already done in updt_enc_common_fx() */
#define FIX_2570_BUF_OVFL                               /* Orange: basop issue 2570: global-buffer-overflow in lib_rend/ivas_objectRenderer_sources_fx.c */
#define FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT        /* Dolby: float issue 1550: Wrong render framesize printout */
#define HARMONIZE_2553_TonalConceal_Apply               /* FhG: Harmonize TonalMDCTConceal_Apply with its ivas derivate */
#define HARMONIZE_2553_TonalConceal_Init                /* FhG: Harmonize TonalMDCTConceal_Init with its ivas derivate */
#define HARMONIZE_2553_TonalConceal_SaveFreqSignal      /* FhG: Harmonize TonalConceal_SaveFreqSignal with its ivas derivate */
#define HARMONIZE_2553_TonalConceal_SaveTimeSignal      /* FhG: Harmonize TonalConceal_SaveTimeSignal with its ivas derivate */


/* #################### End BE switches ################################## */
@@ -148,6 +152,9 @@
/* for EVS_MONO, all is kept BE. */
#define FIX_ISSUE_1966_PHASE_DIFF                       /* FhG: Basop issue 1966: shift phase range to [-2PI..+2PI[, handle 4 quadrants */
#define FIX_ISSUE_1966_F0_32BIT                         /* FhG: Basop issue 1966: use 32-bit variables for F0 and thresholdModification */
#define FIX_BASOP_2519_TCA_LA_ZERO_EXP                  /* FhG: BASOP #2519: Exclude zero samples from exp_com calculation in tcaTargetCh_LA_fx */
#define FIX_BASOP_2519_ICBWE_DEC_Q_TRACK                /* FhG: BASOP #2519: Track Q-format of dec_2over3_mem_fx across frames in stereo_icBWE_preproc_fx */

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

/* ################## End MAINTENANCE switches ######################### */
+34 −7
Original line number Diff line number Diff line
@@ -5572,6 +5572,7 @@ void RefineTonalComponents_fx(
    const Word16 element_mode,
    const PsychoacousticParameters *psychParamsCurrent );

#ifndef HARMONIZE_2553_TonalConceal_Init
ivas_error TonalMDCTConceal_Init_fx(
    TonalMDCTConcealPtr self,
    const Word16 nSamples,
@@ -5579,16 +5580,22 @@ ivas_error TonalMDCTConceal_Init_fx(
    const Word16 nScaleFactors,
    TCX_CONFIG_HANDLE hTcxCfg /* TCX config */
);
#endif

#ifdef HARMONIZE_2553_TonalConceal_Init
ivas_error TonalMDCTConceal_Init_fx(
    Word16 element_mode,
#else
ivas_error TonalMDCTConceal_Init_ivas_fx(
#endif
    TonalMDCTConcealPtr hTonalMDCTConc,
    const UWord16 nSamples,
    const UWord16 nSamplesCore,
    const UWord16 nScaleFactors,
    TCX_CONFIG_HANDLE hTcxCfg /* TCX config */
);
    TCX_CONFIG_HANDLE hTcxCfg );

/* Must be called only when a good frame is recieved - concealment is inactive */
#ifndef HARMONIZE_2553_TonalConceal_SaveFreqSignal
void TonalMDCTConceal_SaveFreqSignal_fx(
    TonalMDCTConcealPtr self,
    const Word32 *mdctSpectrum,
@@ -5598,8 +5605,14 @@ void TonalMDCTConceal_SaveFreqSignal_fx(
    const Word16 *scaleFactors,
    const Word16 *scaleFactors_exp,
    const Word16 gain_tcx_exp );
#endif

#ifdef HARMONIZE_2553_TonalConceal_SaveFreqSignal
void TonalMDCTConceal_SaveFreqSignal_fx(
    Word16 element_mode,
#else
void TonalMDCTConceal_SaveFreqSignal_ivas_fx(
#endif
    TonalMDCTConcealPtr hTonalMDCTConc,
    const Word32 *mdctSpectrum,
    const Word16 mdctSpectrum_exp,
@@ -5617,15 +5630,22 @@ void TonalMDCTConceal_UpdateState_fx(
    const Word16 badBlock,
    const Word8 tonalConcealmentActive );


#ifndef HARMONIZE_2553_TonalConceal_Apply
void TonalMDCTConceal_Apply_fx(
    const TonalMDCTConcealPtr hTonalMDCTConc, /*IN */
    Word32 *mdctSpectrum,                     /*IN/OUT*/
    Word16 *mdctSpectrum_exp                  /*IN */
);
#endif


#ifdef HARMONIZE_2553_TonalConceal_Apply
void TonalMDCTConceal_Apply_fx(
    Word16 element_mode,
#else
void TonalMDCTConceal_Apply_ivas_fx(
    TonalMDCTConcealPtr hTonalMDCTConc, /*IN */
#endif
    const TonalMDCTConcealPtr hTonalMDCTConc, /*IN    */
    Word32 *mdctSpectrum,                     /*IN/OUT*/
    Word16 mdctSpectrum_exp,                  /*IN    */
    const PsychoacousticParameters *psychParamsCurrent );
@@ -5654,14 +5674,21 @@ void TonalMDCTConceal_InsertNoise_fx(
    Word16 crossfadeGain,
    const Word16 crossOverFreq );

#ifndef HARMONIZE_2553_TonalConceal_SaveTimeSignal
void TonalMDCTConceal_SaveTimeSignal_fx(
    TonalMDCTConcealPtr hTonalMDCTConc,
    Word16 *timeSignal,
    Word16 nNewSamples );
#endif

#ifdef HARMONIZE_2553_TonalConceal_SaveTimeSignal
void TonalMDCTConceal_SaveTimeSignal_fx(
    Word16 element_mode,
#else
void TonalMDCTConceal_SaveTimeSignal_ivas_fx(
#endif
    TonalMDCTConcealPtr hTonalMDCTConc,
    Word16 *timeSignal,
    Word16 *timeSignal, // q_timeSignal
    Word16 q_timeSignal,
    Word16 nNewSamples );

+8 −0
Original line number Diff line number Diff line
@@ -907,7 +907,11 @@ void open_decoder_LPD_fx(
        st->hTonalMDCTConc->lastBlockData.nSamples = 0;
        move16();

#ifdef HARMONIZE_2553_TonalConceal_Init
        TonalMDCTConceal_Init_fx( EVS_MONO, st->hTonalMDCTConc, hTcxDec->L_frameTCX, st->L_frame, FDNS_NPTS, st->hTcxCfg );
#else
        TonalMDCTConceal_Init_fx( st->hTonalMDCTConc, hTcxDec->L_frameTCX, st->L_frame, FDNS_NPTS, st->hTcxCfg );
#endif
    }
    st->last_tns_active = 0;
    move16();
@@ -1962,7 +1966,11 @@ void open_decoder_LPD_ivas_fx(
        move16();
        st->hTonalMDCTConc->lastBlockData.nSamples = 0;
        move16();
#ifdef HARMONIZE_2553_TonalConceal_Init
        TonalMDCTConceal_Init_fx( 1 /*signal non-EVS*/, st->hTonalMDCTConc, st->hTcxDec->L_frameTCX, st->L_frame, FDNS_NPTS, st->hTcxCfg );
#else
        TonalMDCTConceal_Init_ivas_fx( st->hTonalMDCTConc, st->hTcxDec->L_frameTCX, st->L_frame, FDNS_NPTS, st->hTcxCfg );
#endif
    }

    st->last_tns_active = 0;
+4 −0
Original line number Diff line number Diff line
@@ -800,7 +800,11 @@ void decoder_LPD_fx(

        IF( !bfi )
        {
#ifdef HARMONIZE_2553_TonalConceal_SaveTimeSignal
            TonalMDCTConceal_SaveTimeSignal_fx( st->element_mode, st->hTonalMDCTConc, synthFB, 0, L_frameTCX );
#else
            TonalMDCTConceal_SaveTimeSignal_fx( st->hTonalMDCTConc, synthFB, L_frameTCX );
#endif
        }
        decoder_tcx_post_fx( st, synth, synthFB, Aq, bfi );
        IF( EQ_16( st->core, TCX_20_CORE ) )
+16 −0
Original line number Diff line number Diff line
@@ -814,7 +814,11 @@ void decoder_tcx_fx(

    IF( bfi == 0 )
    {
#ifdef HARMONIZE_2553_TonalConceal_SaveFreqSignal
        TonalMDCTConceal_SaveFreqSignal_fx( st->element_mode, st->hTonalMDCTConc, x, x_e, L_frameTCX, L_frame, gainlpc2, gainlpc2_e, gain_tcx_e, 0 );
#else
        TonalMDCTConceal_SaveFreqSignal_fx( st->hTonalMDCTConc, x, x_e, L_frameTCX, L_frame, gainlpc2, gainlpc2_e, gain_tcx_e );
#endif
    }
    ELSE
    {
@@ -969,7 +973,11 @@ void decoder_tcx_fx(
    test();
    IF( bfi && st->tonal_mdct_plc_active )
    {
#ifdef HARMONIZE_2553_TonalConceal_Apply
        TonalMDCTConceal_Apply_fx( st->element_mode, st->hTonalMDCTConc, x, x_e, NULL );
#else
        TonalMDCTConceal_Apply_fx( st->hTonalMDCTConc, x, &x_e );
#endif
    }

    tmp32 = L_deposit_h( 0 );
@@ -4879,7 +4887,11 @@ void decoder_tcx_noisefilling_fx(
        test();
        IF( bfi == 0 && NE_16( st->element_mode, IVAS_CPE_MDCT ) )
        {
#ifdef HARMONIZE_2553_TonalConceal_SaveFreqSignal
            TonalMDCTConceal_SaveFreqSignal_fx( st->element_mode, st->hTonalMDCTConc, x, *x_e, L_frameTCX, L_frame, gainlpc2, gainlpc2_e, gain_tcx_e, infoIGFStartLine );
#else
            TonalMDCTConceal_SaveFreqSignal_ivas_fx( st->hTonalMDCTConc, x, *x_e, L_frameTCX, L_frame, gainlpc2, gainlpc2_e, gain_tcx_e, infoIGFStartLine );
#endif
        }
        ELSE IF( bfi )
        {
@@ -5200,7 +5212,11 @@ void decoder_tcx_noiseshaping_igf_fx(
    test();
    IF( bfi && st->tonal_mdct_plc_active && NE_16( st->element_mode, IVAS_CPE_MDCT ) )
    {
#ifdef HARMONIZE_2553_TonalConceal_Apply
        TonalMDCTConceal_Apply_fx( st->element_mode, st->hTonalMDCTConc, x_fx, *x_e, st->hTcxCfg->psychParamsCurrent );
#else
        TonalMDCTConceal_Apply_ivas_fx( st->hTonalMDCTConc, x_fx, *x_e, st->hTcxCfg->psychParamsCurrent );
#endif

        /* If exponent has been updated after TonalMDCTConceal_Apply, then shift the spectrum to common exponent. */
    }
Loading