Commit a17e51f9 authored by multrus's avatar multrus
Browse files

Merge branch '2086-fix-enable-hp20_fx_32_opt-for-encoder' into 'main'

[non-BE][split-non-BE][allow-regression] Resolve "Enable hp20_fx_32_opt() for Encoder"

Closes #2086

See merge request !2494
parents 608f1fab e775d769
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -316,8 +316,12 @@ void hp20_fx_32_opt(
    prescale = s_min( prescale, diff );

    prescale = sub( 1 + HP20_FX_COEFF_SCALE, prescale );

#ifdef FIX_2086_ENABLE_HP20_OPT_FOR_ENC
    if ( EQ_16( prescale_current_frame, 1 + HP20_FX_COEFF_SCALE - 31 ) || // signal_fx buffer contains only zeros, so use the mem_fx scale_factor instead
         LT_16( prescale_current_frame, prescale ) )                      // To avoid overflow in the subsequent shr() scaling for W_y1, W_y2, x2, and x1 calculations before the for loop.
#else
    if ( EQ_16( prescale_current_frame, 1 + HP20_FX_COEFF_SCALE - 31 ) ) // signal_fx buffer contains only zeros, so use the mem_fx scale_factor instead
#endif
    {
        prescale_current_frame = prescale;
    }
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@
#define FIX_BASOP_ASSERT_IN_TONAL_MDCT_PLC                   /* FhG: fix for issue 2165 - using saturating addition in tonal MDCT PLC function */
#define OPT_2146_BASOP_UTIL_ADD_MANT32EXP                    /* Dlb: optimized version of BASOP_Util_Add_Mant32Exp() */
#define FIX_2166_ASSERT_OSBA_PLC_STEREO_OUT                  /* FhG: fix for issue 2166 - add missing averaging factor 0.5 in for the sum of energies in function stereo_dft_dmx_swb_nrg_fx()*/

#define FIX_2086_ENABLE_HP20_OPT_FOR_ENC                     /* FhG: Enable hp20_fx_32_opt() for Encoder */
#define FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE                /* FhG: Use dynamic Q factor for synth_fx and synthFB_fx to prevent overflow */
#define FIX_2170_ASSERT_IN_FFT3                              /* Eri: Assert in fft3_fx from EVS, adding _sat */
#define FIX_2082_FP_LEFTOVERS_OMASA_DEC                      /* Nokia: fix for issue 2082, cleaning remaining floating point code */
+8 −0
Original line number Diff line number Diff line
@@ -158,11 +158,19 @@ ivas_error ivas_enc_fx(
        test();
        IF( ( EQ_32( ivas_format, SBA_FORMAT ) ) && !( GT_16( st_ivas->sba_analysis_order, 1 ) ) )
        {
#ifdef FIX_2086_ENABLE_HP20_OPT_FOR_ENC
            hp20_fx_32_opt( data_fx[HOA_keep_ind[st_ivas->hSpar->hMdEnc->HOA_md_ind[i]]], input_frame, st_ivas->mem_hp20_in_fx[i], input_Fs );
#else
            hp20_fx_32( data_fx[HOA_keep_ind[st_ivas->hSpar->hMdEnc->HOA_md_ind[i]]], input_frame, st_ivas->mem_hp20_in_fx[i], input_Fs );
#endif
        }
        ELSE IF( !( EQ_32( ivas_format, MC_FORMAT ) && EQ_16( i, LFE_CHANNEL ) ) )
        {
#ifdef FIX_2086_ENABLE_HP20_OPT_FOR_ENC
            hp20_fx_32_opt( data_fx[i], input_frame, st_ivas->mem_hp20_in_fx[i], input_Fs );
#else
            hp20_fx_32( data_fx[i], input_frame, st_ivas->mem_hp20_in_fx[i], input_Fs );
#endif
        }
    }