Commit e015255f authored by Manuel Jander's avatar Manuel Jander
Browse files

Cleanup some unneeded changes, reduce diff to main branch. Add alternative to...

Cleanup some unneeded changes, reduce diff to main branch. Add alternative to NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_SWB_fenv_fx with much less changes.
parent 28620421
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -89,7 +89,9 @@
#define NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT             /* FhG: Dynamic scale of shb_speech buffers */
// #define NONBE_FIX_ISSUE_2206_DO_NOT_FLUSH_TO_ZERO       /* FhG: Do not right shift flush to zero in Copy_Scale_sig_nosat */
#define NONBE_FIX_ISSUE_2206_TD_CHANNEL_EXTRAPOLATION   /* FhG: Use different scale to avoid saturation of LPC coefficient in TD Stereo signal extrapolation. */
#define NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_SWB_fenv_fx /* FhG: Avoid overflow of SWB_fenv_fx in SWB_BWE_encoding_fx because of very small energies. */
// #define NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_SWB_fenv_fx /* FhG: Avoid overflow of SWB_fenv_fx in SWB_BWE_encoding_fx because of very small energies. */
// #define NONBE_FIX_ISSUE_2206_CLEAR_TRAILING_OLD_WTDA  /* FhG: clear trailing samples in wtda buffer. apparently no effect. */
#define NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_SWB_fenv_fx2 /* FhG: Alternative: Avoid overflow of SWB_fenv_fx in SWB_BWE_encoding_fx because of very small energies. */
#define HARM_HQ_CORE_KEEP_BE                            /* hack to keep all BE after HQ core functions harmonization; pending resolving issues #2450, #2451, #2452 */
#define FIX_2452_HQ_CORE_PEAQ_AVR_RATIO_HARM            /* Eri: Basop issue 2453: Fix alignment of peak_avrg_ratio_fx */
#define FIX_2480_HARM_TONALMDCT                         /* FhG: basop issue 2480: Harmonize TonalMDCTConceal_Detect_fx() and TonalMDCTConceal_Detect_ivas_fx() */
+2 −1
Original line number Diff line number Diff line
@@ -433,7 +433,7 @@ ivas_error ivas_core_enc_fx(
                FOR( n = 0; n < n_CoreChannels; n++ )
                {
                    st = sts[n];
#ifdef NONBE_FIX_ISSUE_2206_NOTYET
#ifndef NONBE_FIX_ISSUE_2206
                    Scale_sig( old_inp_16k_fx[n], L_INP, sub( Q1, Q_new[n] ) ); // Q0
#endif
                    IF( NE_16( st->element_mode, IVAS_CPE_DFT ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) )
@@ -699,6 +699,7 @@ ivas_error ivas_core_enc_fx(
         * SWB(FB) TBE encoding
         * SWB(FB) BWE encoding
         *---------------------------------------------------------------------*/

#ifdef NONBE_FIX_ISSUE_2206
        test();
        IF( GE_32( input_Fs, 32000 ) && st->hBWE_TD != NULL )
+0 −2
Original line number Diff line number Diff line
@@ -1273,10 +1273,8 @@ void ivas_mdct_core_whitening_enc_fx(

        tcx_ltp_encode_ivas_fx( st, st->hTcxEnc->tcxMode, L_FRAME, old_wsp_fx[ch] + L_WSP_MEM + L_LOOK_12k8, NULL, old_wsp_fx[ch] + L_WSP_MEM + L_LOOK_12k8, T_op[ch], &param_core[ch][1 + NOISE_FILL_RANGES], &ltpBits[ch], NULL, 0, IVAS_CPE_MDCT );

#ifndef NONBE_FIX_ISSUE_2206_NOTYET
        Q_new = 0;
        move16();
#endif

        core_signal_analysis_high_bitrate_ivas_fx( new_samples_fx[ch] + L_INP_MEM, T_op[ch], NULL, NULL, st, tnsSize[ch], tnsBits[ch], param_core[ch], &ltpBits[ch], windowedSignal_fx[ch], st->L_frame, st->hTcxEnc->L_frameTCX, hCPE->last_element_mode, 0, mdst_spectrum_fx[ch], mdst_spectrum_e[ch], &Q_new, &q_windowedSignal[ch] );

+2 −0
Original line number Diff line number Diff line
@@ -702,6 +702,7 @@ void stereo_switching_enc_fx(
        hCPE->hStereoDft->output_mem_dmx_32k_q = Q31;
        move16();
#endif

        stereo_dft_enc_reset_fx( hCPE->hStereoDft );

        /* update ITD parameters */
@@ -726,6 +727,7 @@ void stereo_switching_enc_fx(
        /* do not allow differential coding of DFT side parameters */
        hCPE->hStereoDft->res_pred_counter = STEREO_DFT_FEC_THRESHOLD;
        move16();

#ifdef NONBE_FIX_ISSUE_2206
        /* update DFT synthesis overlap memory @12.8kHz */
        FOR( i = 0; i < STEREO_DFT_OVL_12k8; i++ )
+1 −0
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@ Word16 stereo_tdm_ener_analysis_fx(
    /*----------------------------------------------------------------*
     * Compute L and R energy and Long term RMS of each channel
     *----------------------------------------------------------------*/

    Get_LR_rms_fx( sts[0]->input_fx, sts[1]->input_fx, input_frame, &rms_L_fx, &q_rms_L, &rms_R_fx, &q_rms_R );

#ifdef NONBE_FIX_ISSUE_2206
Loading