Commit 21bd2419 authored by Manuel Jander's avatar Manuel Jander
Browse files

Merge remote-tracking branch 'origin' into...

Merge remote-tracking branch 'origin' into 2206-assert-in-stereo_switching_enc_fx-for-omasa-rate-switching-input-new-stv
parents 1063f1dc acb4374f
Loading
Loading
Loading
Loading
+719 −0

File changed.

Preview size limit exceeded, changes collapsed.

+4 −0
Original line number Diff line number Diff line
@@ -95,10 +95,13 @@
#define FIX_2480_HARM_TONALMDCT                         /* FhG: basop issue 2480: Harmonize TonalMDCTConceal_Detect_fx() and TonalMDCTConceal_Detect_ivas_fx() */
#define FIX_2479_HARM_PITCH_GAIN                        /* FhG: basop issue 2479: Harmonize tcx_ltp_pitch_search_*(), tcx_ltp_find_gain_*fx() */
#define HARMONIZE_2481_EXTEND_SHRINK                    /* FhG: basop issue 2481: Harmonize extend_frm_*fx() and shrink_frm_*fx() */
#define FIX_2485_HARMONIZE_perform_noise_estimation_enc /* FhG: harmonize perform_noise_estimation_enc and perform_noise_estimation_enc_ivas */
#define FIX_2485_HARMONIZE_minimum_statistics           /* FhG: harmonize minimum_statistics and minimum_statistics_fx */
#define FIX_FLOAT_ISSUE_1546_DEAD_CODE                  /* FhG: remove dead code reported in the issue*/
#define FIX_FLOAT_1539_G192_FORMAT_SWITCH               /* VA/Nokia: reintroduce format switching for g192 bitstreams */
#define OPTIMIZE_FFT_STACK                              /* VA: removal of intermediate FFT buffers */
#define HARMONIZE_DCT                                   /* VA: removal of duplicated DCT functions */
#define FIX_2489_HARMONIZE_FdCng_encodeSID              /* FhG: harmonize FdCng_encodeSID_fx() and FdCng_encodeSID_ivas_fx()  */

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

@@ -117,6 +120,7 @@
#define FIX_BASOP_2498_LOGIC_IN_ENC_DTX_DECISION_MTX    /* Nokia: BASOP 2498: Fix the logic */
#define FIX_BASOP_2497_MCMASA_LFE_WRONG_SF_INDEX        /* Nokia: BASOP 2497: Fix wrong subframe index in McMASA LFE synth. */
#define FIX_BASOP_2496_OMASA_OBJ_EDIT_WRONG_ASSIGN      /* Nokia: BASOP 2496: Fix wrong assignment in OMASA object edit code */
#define FIX_2495_Q_ALIGN_OSBA_RENDERER                  /* FhG: Basop issue #2495: Corrected exponent scaling of outAudio.data_fx before buffer accumulation in renderSbaToBinaural(). */

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

+28 −0
Original line number Diff line number Diff line
@@ -4620,6 +4620,33 @@ void expand_range_var_exp(
    Word16 *out_exp,
    const Word16 len );

#ifdef FIX_2485_HARMONIZE_minimum_statistics
void minimum_statistics_fx(
    Word16 len,                    /* i  : Total number of partitions (CLDFB or FFT)                   */
    Word16 lenFFT,                 /* i  : Number of FFT partitions                                  */
    Word16 *psize,                 /* i  : Partition sizes, fractional                             Q9*/
    Word16 *msPeriodog,            /* i  : Periodogram (energies)                                    */
    void *msNoiseFloor_buffer,     /* i/o: Noise floors (energies)                                Q25*/
    void *msNoiseEst_buffer,       /* i/o: Noise estimates (energies)                             Q25*/
    Word32 *msAlpha,               /* i/o: Forgetting factors                                        */
    Word16 *msPsd,                 /* i/o: Power Spectral Density (smoothed periodogram => energies) */
    Word16 *msPsdFirstMoment,      /* i/o: PSD statistics of 1st order (energy means)                */
    Word32 *msPsdSecondMoment,     /* i/o: PSD statistics of 2nd order (energy variances)            */
    Word32 *msMinBuf,              /* i/o: Buffer of minima (energies)                               */
    Word32 *msBminWin,             /* o  : Bias correction factors                                   */
    Word32 *msBminSubWin,          /* o  : Bias correction factors                                   */
    Word32 *msCurrentMin,          /* i/o: Local minima (energies)                                   */
    Word32 *msCurrentMinOut,       /* i/o: Local minima (energies)                                   */
    Word32 *msCurrentMinSubWindow, /* i/o: Local minima (energies)                                   */
    Word16 *msLocalMinFlag,        /* i  : Binary flag                                               */
    Word16 *msNewMinFlag,          /* i  : Binary flag                                               */
    Word16 *msPeriodogBuf,         /* i/o: Buffer of periodograms (energies)                         */
    Word16 *msPeriodogBufPtr,      /* i/o: Counter                                                   */
    HANDLE_FD_CNG_COM hFdCngCom,   /* i/o: FD_CNG structure containing all buffers and variables */
    const Word16 enc_dec,          /* i  : encoder/decoder indicator */
    const Word16 element_mode      /* i  : element mode type    */
);
#else
void minimum_statistics(
    Word16 len,                    /* i  : Total number of partitions (CLDFB or FFT)                   */
    Word16 lenFFT,                 /* i  : Number of FFT partitions                                  */
@@ -4669,6 +4696,7 @@ void minimum_statistics_fx(
    const Word16 enc_dec,          /* i  : encoder/decoder indicator */
    const Word16 element_mode      /* i  : IVAS element mode type    */
);
#endif

/* Apply bitrate-dependant scale */
void apply_scale(
+27 −0
Original line number Diff line number Diff line
@@ -1280,6 +1280,32 @@ void perform_noise_estimation_dec_fx(
        compress_range( hFdCngDec->msPeriodog, hFdCngDec->msPeriodog_exp, hFdCngDec->msLogPeriodog, npart );

        /* Call the minimum statistics routine for noise estimation */
#ifdef FIX_2485_HARMONIZE_minimum_statistics
        minimum_statistics_fx(
            npart,
            nFFTpart,
            psize_norm,
            hFdCngDec->msLogPeriodog,
            hFdCngDec->msNoiseFloor,
            hFdCngDec->msLogNoiseEst,
            hFdCngDec->msAlpha,
            hFdCngDec->msPsd,
            hFdCngDec->msPsdFirstMoment,
            hFdCngDec->msPsdSecondMoment,
            hFdCngDec->msMinBuf,
            hFdCngDec->msBminWin,
            hFdCngDec->msBminSubWin,
            hFdCngDec->msCurrentMin,
            hFdCngDec->msCurrentMinOut,
            hFdCngDec->msCurrentMinSubWindow,
            hFdCngDec->msLocalMinFlag,
            hFdCngDec->msNewMinFlag,
            hFdCngDec->msPeriodogBuf,
            &( hFdCngDec->msPeriodogBufPtr ),
            hFdCngDec->hFdCngCom,
            DEC,
            EVS_MONO );
#else
        minimum_statistics(
            npart,
            nFFTpart,
@@ -1302,6 +1328,7 @@ void perform_noise_estimation_dec_fx(
            hFdCngDec->msPeriodogBuf,
            &( hFdCngDec->msPeriodogBufPtr ),
            hFdCngDec->hFdCngCom );
#endif

        /* Expand MS outputs */
        expand_range( hFdCngDec->msLogNoiseEst, hFdCngDec->msNoiseEst, &hFdCngDec->msNoiseEst_exp, npart );
+8 −0
Original line number Diff line number Diff line
@@ -362,7 +362,11 @@ ivas_error acelp_core_enc_fx(
                test();
                IF( EQ_32( st->core_brate, SID_2k40 ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) )
                {
#ifdef FIX_2489_HARMONIZE_FdCng_encodeSID
                    FdCng_encodeSID_fx( st );
#else
                    FdCng_encodeSID_fx( st->hFdCngEnc, st, st->preemph_fac );
#endif
                    st->hDtxEnc->last_CNG_L_frame = st->L_frame;
                    move16();
                }
@@ -397,7 +401,11 @@ ivas_error acelp_core_enc_fx(
                test();
                IF( EQ_32( st->core_brate, SID_2k40 ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) )
                {
#ifdef FIX_2489_HARMONIZE_FdCng_encodeSID
                    FdCng_encodeSID_fx( st );
#else
                    FdCng_encodeSID_ivas_fx( st );
#endif
                    st->hDtxEnc->last_CNG_L_frame = st->L_frame;
                    move16();
                }
Loading