Commit 31b1fc5a authored by multrus's avatar multrus
Browse files

Merge branch...

Merge branch 'basop-2521-probable-porting-bug-in-ivas_sba_dirac_stereo_compute_td_stefi_nrgs' into 'main'

[non-BE][split-non-BE][allow-regression] Resolve "Probable porting bug in ivas_sba_dirac_stereo_compute_td_stefi_nrgs"

Closes #2521

See merge request !2937
parents 398de840 b444199a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@
#define FIX_BASOP_2531_MCT_CP_BITRATE                   /* FhG: BASOP issue 2531: Fix MCT cp_bitrate calculation; affects bitrate switching only */
#define FIX_BASOP_2541_OMASA_ENC_FIXES                  /* Nokia: BASOP issue 2541: Fix function ivas_encode_masaism_metadata_fx */
#define FIX_BASOP_2545_FIX_LTV_REGRESSION_2529          /* Nokia: BASOP issue 2545: Fix LTV regression caused by issue 2529 fix */
#define FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS         /* FhG: BASOP issue 2521: Fix wrong porting for determination of first subframe length in ivas_sba_dirac_stereo_compute_td_stefi_nrgs() */

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

+60 −0
Original line number Diff line number Diff line
@@ -688,15 +688,60 @@ static void ivas_sba_dirac_stereo_compute_td_stefi_nrgs(
    const Word16 q_hb_synth )
{
    Word16 i;
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    Word32 hb_nrg = EPSILON_FIX;
    Word16 q_hb_nrg_subr = Q31 + Q15 - Q6; /* in case IF( ( EQ_16( core, ACELP_CORE ) && !fd_cng_flag ) || EQ_16( hStereoDft->core_hist[1], ACELP_CORE ) ) is false, we want to end up with Q31, and we subtract Q15 - Q6 below; otherwise, we set it within this condition */
    Word16 q_hb_nrg = Q31;
    Word16 shift, shift_hb_nrg_subr;
    move32();
#else
    Word32 hb_nrg = EPSILON_FIX;
    move32();
    Word32 hb_nrg2 = EPSILON_FIX;
    move32();
#endif

#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    shift = L_norm_arr( hb_synth, output_frame );
    shift = sub( shift, shr( add( find_guarded_bits_fx( shr( output_frame, 1 ) ), 1 ), 1 ) );
#endif

    test();
    test();
    IF( ( EQ_16( core, ACELP_CORE ) && !fd_cng_flag ) || EQ_16( hStereoDft->core_hist[1], ACELP_CORE ) )
    {
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
        Word32 L_tmp;
        Word64 W_tmp;

        W_tmp = EPSILON_FIX;
        move64();

        FOR( i = 0; i < shr( output_frame, 1 ); i++ )
        {
            L_tmp = L_shl( hb_synth[i], shift );        /* q_hb_synth + shift */
            W_tmp = W_mac_32_32( W_tmp, L_tmp, L_tmp ); /* 2 * (q_hb_synth + shift) + 1 */
        }

        hStereoDft->hb_nrg_subr_fx[0] = W_round48_L( W_shr( W_tmp, 16 ) ); /* 2 * (q_hb_synth + shift) - 31 */
        move32();

        W_tmp = EPSILON_FIX;
        move64();
        FOR( ; i < output_frame; i++ )
        {
            L_tmp = L_shl( hb_synth[i], shift );        /* q_hb_synth + shift */
            W_tmp = W_mac_32_32( W_tmp, L_tmp, L_tmp ); /* 2 * (q_hb_synth + shift) + 1 */
        }

        hStereoDft->hb_nrg_subr_fx[1] = W_round48_L( W_shr( W_tmp, 16 ) ); /* 2 * (q_hb_synth + shift) - 31 */
        move32();
        q_hb_nrg_subr = sub( shl( add( q_hb_synth, shift ), 1 ), 31 );

        hb_nrg = L_add( L_shr( hStereoDft->hb_nrg_subr_fx[0], 1 ), L_shr( hStereoDft->hb_nrg_subr_fx[1], 1 ) ); /* 2 * (q_hb_synth + shift) - 16 - 1 */
        q_hb_nrg = sub( q_hb_nrg_subr, 1 );
        move16();
#else
        FOR( i = 0; i < shr( output_frame, 2 ); i++ )
        {
            hb_nrg2 = Madd_32_32( hb_nrg2, hb_synth[i], hb_synth[i] ); /*2*q_hb_synth-31*/
@@ -719,6 +764,7 @@ static void ivas_sba_dirac_stereo_compute_td_stefi_nrgs(
        hStereoDft->hb_nrg_subr_fx[1] = hb_nrg2; /*2*q_hb_synth-31*/
        move32();
        hb_nrg = L_add( hb_nrg, hb_nrg2 );
#endif

        IF( EQ_16( hStereoDft->q_hb_stefi_sig_fx, q_hb_synth ) )
        {
@@ -747,12 +793,26 @@ static void ivas_sba_dirac_stereo_compute_td_stefi_nrgs(
        hStereoDft->hb_nrg_subr_fx[1] = 0;
        move32();
    }
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    shift_hb_nrg_subr = s_min( norm_l( hStereoDft->hb_nrg_subr_fx[0] ), norm_l( hStereoDft->hb_nrg_subr_fx[1] ) );

    hStereoDft->hb_nrg_subr_fx[0] = ( Mpy_32_16_1( L_shl( hStereoDft->hb_nrg_subr_fx[0], shift_hb_nrg_subr ), shl( hStereoDft->NFFT, 5 ) ) ); /* shl( ., 5) is shortcut for shl( shr( hStereoDft->NFFT, 1 ), 6 ) */ /* q_hb_nrg_subr - (15 - 6) */
    move32();
    hStereoDft->hb_nrg_subr_fx[1] = ( Mpy_32_16_1( L_shl( hStereoDft->hb_nrg_subr_fx[1], shift_hb_nrg_subr ), shl( hStereoDft->NFFT, 5 ) ) ); /* shl( ., 5) is shortcut for shl( shr( hStereoDft->NFFT, 1 ), 6 ) */ /* q_hb_nrg_subr - (15 - 6) */
    move32();
    hStereoDft->q_hb_nrg_subr = sub( add( q_hb_nrg_subr, shift_hb_nrg_subr ), Q15 - Q6 );
    hStereoDft->hb_nrg_fx[0] = hb_nrg;
    move32();
    hStereoDft->q_hb_nrg[0] = q_hb_nrg;
    move16();
#else
    hStereoDft->hb_nrg_subr_fx[0] = hStereoDft->hb_nrg_subr_fx[0]; // imult3216(hStereoDft->hb_nrg_subr_fx[0] , shr(hStereoDft->NFFT, 1)); /*hStereoDft->q_hb_nrg_subr*/
    move32();
    hStereoDft->hb_nrg_subr_fx[1] = hStereoDft->hb_nrg_subr_fx[1]; // imult3216(hStereoDft->hb_nrg_subr_fx[1] , shr(hStereoDft->NFFT, 1)); /*hStereoDft->q_hb_nrg_subr*/
    move32();
    hStereoDft->hb_nrg_fx[0] = hb_nrg;
    move32();
#endif
    hStereoDft->td_gain_fx[0] = 0;
    move32();
    hStereoDft->core_hist[0] = core; /* full signal available for DTX with FD-CNG, thus apply stereo filling on full spectrum like in TCX */
+5 −0
Original line number Diff line number Diff line
@@ -199,6 +199,9 @@ typedef struct stereo_dft_dec_data_struct
    Word32 hb_nrg_fx[STEREO_DFT_CORE_HIST_MAX];                                        /* Q(q_hb_nrg) */
    Word32 hb_nrg_subr_fx[STEREO_DFT_NBDIV];                                           /* Q(q_hb_nrg_subr) */

#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    Word16 q_hb_nrg[STEREO_DFT_CORE_HIST_MAX];
#endif
    Word16 Q_nrg_subr;
    Word16 prev_Q_stefi_sig;
    Word16 q_td_gain[STEREO_DFT_CORE_HIST_MAX];
@@ -224,7 +227,9 @@ typedef struct stereo_dft_dec_data_struct
    Word32 smooth_buf_fx[SBA_DIRAC_STEREO_NUM_BANDS][SBA_DIRAC_NRG_SMOOTH_LONG + 1]; /* Q(q_smooth_buf_fx) */
    Word16 smooth_fac_fx[NB_DIV][SBA_DIRAC_STEREO_NUM_BANDS];                        /* Q15 */
    Word16 q_smooth_buf_fx;
#ifndef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    Word16 q_hb_nrg;
#endif
    Word16 q_hb_nrg_subr;
    Word16 q_res_mem;

+83 −2
Original line number Diff line number Diff line
@@ -194,6 +194,9 @@ void stereo_dft_dec_reset_fx(

    set32_fx( hStereoDft->hb_stefi_sig_fx, 0, L_FRAME48k + NS2SA( 48000, STEREO_DFT_TD_STEFI_DELAY_NS ) );
    set32_fx( hStereoDft->hb_nrg_fx, 0, STEREO_DFT_CORE_HIST_MAX );
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    set16_fx( hStereoDft->q_hb_nrg, Q31, STEREO_DFT_CORE_HIST_MAX );
#endif
    set32_fx( hStereoDft->td_gain_fx, 0, STEREO_DFT_CORE_HIST_MAX );
    set16_fx( hStereoDft->q_td_gain, 0, STEREO_DFT_CORE_HIST_MAX );
    hStereoDft->q_dft = 0;
@@ -659,7 +662,12 @@ void stereo_dft_dec_update_fx(
    }

    Copy32( hStereoDft->hb_stefi_sig_fx + output_frame, hStereoDft->hb_stefi_sig_fx, hStereoDft->hb_stefi_delay ); /* Qx */
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    Copy32( hStereoDft->hb_nrg_fx, hStereoDft->hb_nrg_fx + 1, STEREO_DFT_CORE_HIST_MAX - 1 ); /* q_hb_nrg */
    Copy( hStereoDft->q_hb_nrg, hStereoDft->q_hb_nrg + 1, STEREO_DFT_CORE_HIST_MAX - 1 );
#else
    Copy32( hStereoDft->hb_nrg_fx, hStereoDft->hb_nrg_fx + 1, STEREO_DFT_CORE_HIST_MAX - 1 ); /* Qx */
#endif
    Copy32( hStereoDft->td_gain_fx, hStereoDft->td_gain_fx + 1, STEREO_DFT_CORE_HIST_MAX - 1 ); /* q_td_gain */
    Copy( hStereoDft->q_td_gain, hStereoDft->q_td_gain + 1, STEREO_DFT_CORE_HIST_MAX - 1 );

@@ -2778,6 +2786,16 @@ static void stereo_dft_compute_td_stefi_params_fx(
    move32();
    nrg_pred_DMX = hStereoDft->hb_nrg_fx[1];
    move32();
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    IF( GT_16( hStereoDft->q_hb_nrg[0], hStereoDft->q_hb_nrg[1] ) )
    {
        nrg_DMX = L_shr( nrg_DMX, sub( hStereoDft->q_hb_nrg[0], hStereoDft->q_hb_nrg[1] ) );
    }
    ELSE
    {
        nrg_pred_DMX = L_shr( nrg_pred_DMX, sub( hStereoDft->q_hb_nrg[1], hStereoDft->q_hb_nrg[0] ) );
    }
#endif

    op1 = BASOP_Util_Divide3232_Scale( L_add( EPSILON_FIX, nrg_DMX ), L_add( EPSILON_FIX, nrg_pred_DMX ), &q_div ); /* q_div */
    q_sqrt = add( Q16, q_div );
@@ -3223,6 +3241,11 @@ void stereo_dft_generate_res_pred_fx(
        }
        ELSE IF( hStereoDft->core_hist[STEREO_DFT_STEFFI_DELAY_SHORT / 2] == ACELP_CORE )
        {
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
            Word16 q_dmx_nrg, q_diff;
            Word16 norm_dmx_nrg;
            Word32 L_temp;
#endif
            /* ACELP -> TCX/HQ core transition */
            /* calculate high band energy only */
            dmx_nrg = EPSILON_FIX;
@@ -3232,8 +3255,66 @@ void stereo_dft_generate_res_pred_fx(
                dmx_nrg = L_add( dmx_nrg, Madd_32_32( Mpy_32_32( pDFT_DMX[2 * i], pDFT_DMX[2 * i] ), pDFT_DMX[2 * i + 1], pDFT_DMX[2 * i + 1] ) ); /* 2 * q_dft - 31 */
            }

#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
            norm_dmx_nrg = norm_l( dmx_nrg );
            dmx_nrg = L_shl( dmx_nrg, norm_dmx_nrg );
            q_dmx_nrg = add( sub( shl( hStereoDft->q_dft, 1 ), 31 ), norm_dmx_nrg );

            /* dmx_nrg * 2 / hStereoDft->NFFT */
            SWITCH( hStereoDft->NFFT )
            {
                case 960:
                    L_temp = Mpy_32_16_1( dmx_nrg, 17476 /* 1 / 480 in Q8 */ );
                    L_temp = L_shr( L_temp, Q1 ); /* reserve 1 bit headroom */
                    q_dmx_nrg = add( q_dmx_nrg, Q7 );
                    BREAK;
                case 640:
                    L_temp = Mpy_32_16_1( dmx_nrg, 26214 /* 1 / 320 in Q8 */ );
                    L_temp = L_shr( L_temp, Q1 ); /* reserve 1 bit headroom */
                    q_dmx_nrg = add( q_dmx_nrg, Q7 );
                    BREAK;
                case 320:
                    L_temp = Mpy_32_16_1( dmx_nrg, 26214 /* 1 / 320 in Q7 */ );
                    L_temp = L_shr( L_temp, Q1 ); /* reserve 1 bit headroom */
                    q_dmx_nrg = add( q_dmx_nrg, Q6 );
                    BREAK;
                default:
                    L_temp = 0; /* avoid compiler warnings about uninitialized variable */
                    move32();
                    assert( 0 && "Invalid hStereoDft->NFFT" );
                    /* we support only hStereoDft->NFFT == 320, 640 and 960; a more generic expression would be: */
                    /* L_temp = BASOP_Util_Divide3232_Scale_newton( dmx_nrg, shr( hStereoDft->NFFT, 1 ), &temp_e ); */
                    /* q_dmx_nrg = add( q_dmx_nrg, sub( 31, temp_e ) ); */
                    BREAK;
            }

            /* for L_temp we have at least one bit of headroom due to the division above; check also for hStereoDft->hb_nrg_fx[0] and possibly reserve one bit*/
            test();
            IF( norm_l( hStereoDft->hb_nrg_fx[0] ) == 0 && hStereoDft->hb_nrg_fx[0] != 0 )
            {
                hStereoDft->hb_nrg_fx[0] = L_shr( hStereoDft->hb_nrg_fx[0], 1 );
                hStereoDft->q_hb_nrg[0] = sub( hStereoDft->q_hb_nrg[0], 1 );
            }

            q_diff = sub( hStereoDft->q_hb_nrg[0], q_dmx_nrg );

            IF( GT_16( q_diff, 0 ) )
            {
                hStereoDft->hb_nrg_fx[0] = L_add( L_shr( hStereoDft->hb_nrg_fx[0], q_diff ), L_temp );
                move32();
                hStereoDft->q_hb_nrg[0] = sub( hStereoDft->q_hb_nrg[0], q_diff );
                move16();
            }
            ELSE
            {
                hStereoDft->hb_nrg_fx[0] = L_add( hStereoDft->hb_nrg_fx[0], L_shl( L_temp, q_diff ) );
                move32();
                /* hStereoDft->q_hb_nrg[0] stays as is */
            }
#else
            hStereoDft->hb_nrg_fx[0] = L_add( hStereoDft->hb_nrg_fx[0], div_l( dmx_nrg, shr( hStereoDft->NFFT, 2 ) ) ); /* Q15 */
            move32();
#endif
            *stop = bin0;
            move16();
        }
+61 −1
Original line number Diff line number Diff line
@@ -138,7 +138,11 @@ void stereo_icBWE_dec_fx(
    Word16 nlMixFac_fx[NB_SUBFR16k];
    Word16 specMapping_fx;
    Word16 fb_synth_nonref_fx[L_FRAME48k];
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    Word32 prev_pow_fx, curr_pow_fx, maxVal1;
#else
    Word32 prev_pow_fx, curr_pow_fx, maxVal1, maxVal;
#endif
    Word16 scale_fx, e_scale_fx;
    Word16 alpha_fx, winSlope_fx, winLen_fx;
    Word16 prevgsMapping_fx;
@@ -146,6 +150,10 @@ void stereo_icBWE_dec_fx(
    Word16 icbweM2Ref_fx, ratio_L_fx;
    Word16 gsMapping_fx;
    Word32 hb_nrg_fx;
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
    Word16 q_hb_nrg, q_hb_nrg_subr;
    Word16 shift_hb_nrg_subr;
#endif
    Word16 Q_syn_shb;
    Word16 shift_prev_pow, synthRef_shift;
    Word32 L_tmp;
@@ -197,8 +205,17 @@ void stereo_icBWE_dec_fx(
    /* update buffers for TD stereo filling */
    IF( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) )
    {
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
        q_hb_nrg_subr = Q31 + Q15 - Q6; /* in case IF( EQ_16( st->core, ACELP_CORE ) || EQ_16( st->last_core, ACELP_CORE ) ) is flase, we want to end up with Q31, and we subtract Q15 - Q6 below;  otherwise, we set it within this condition */
        move16();
#endif
        hb_nrg_fx = 0;
        move32();
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
        q_hb_nrg = Q31;

        synthRef_shift = L_norm_arr( synthRef_fx, output_frame );
#else
        move32();
        maximum_abs_32_fx( synthRef_fx, output_frame, &maxVal );
        synthRef_shift = norm_l( maxVal );
@@ -207,10 +224,39 @@ void stereo_icBWE_dec_fx(
            synthRef_shift = 31;
            move16();
        }
#endif
        synthRef_shift = sub( synthRef_shift, shr( add( find_guarded_bits_fx( shr( output_frame, 1 ) ), 1 ), 1 ) );
        test();
        IF( EQ_16( st->core, ACELP_CORE ) || EQ_16( st->last_core, ACELP_CORE ) )
        {
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
            Word64 W_tmp = EPSILON_FIX;
            move64();

            FOR( i = 0; i < shr( output_frame, 1 ); i++ )
            {
                L_tmp = L_shl( synthRef_fx[i], synthRef_shift ); /* Qsyn + SynthRef_shift */
                W_tmp = W_mac_32_32( W_tmp, L_tmp, L_tmp );      /* 2 * (Qsyn + SynthRef_shift) + 1 */
            }
            hCPE->hStereoDft->hb_nrg_subr_fx[0] = W_round48_L( W_shr( W_tmp, 16 ) ); /* 2 * (Qsyn + SynthRef_shift) - 31 */
            move32();
            q_hb_nrg_subr = sub( shl( add( *Q_syn, synthRef_shift ), 1 ), 31 );
            move16();

            W_tmp = EPSILON_FIX;
            move64();

            FOR( ; i < output_frame; i++ )
            {
                L_tmp = L_shl( synthRef_fx[i], synthRef_shift ); /* Qsyn + SynthRef_shift */
                W_tmp = W_mac_32_32( W_tmp, L_tmp, L_tmp );      /* 2 * (Qsyn + SynthRef_shift) + 1 */
            }
            hCPE->hStereoDft->hb_nrg_subr_fx[1] = W_round48_L( W_shr( W_tmp, 16 ) ); /* 2 * (Qsyn + SynthRef_shift) - 31 */

            hb_nrg_fx = L_add( L_shr( hCPE->hStereoDft->hb_nrg_subr_fx[0], 1 ), L_shr( hCPE->hStereoDft->hb_nrg_subr_fx[1], 1 ) ); // 2 * (Qsyn + SynthRef_shift) - 31 - 1
            q_hb_nrg = sub( q_hb_nrg_subr, 1 );
            move16();
#else
            Word64 W_tmp = 0;
            move64();
            tmp = shl_sat( 1, synthRef_shift );
@@ -235,7 +281,7 @@ void stereo_icBWE_dec_fx(

            hCPE->hStereoDft->hb_nrg_subr_fx[1] = W_round48_L( W_tmp );                                    // 2 * (Qsyn + SynthRef_shift) - 45
            hb_nrg_fx = L_add( hCPE->hStereoDft->hb_nrg_subr_fx[0], hCPE->hStereoDft->hb_nrg_subr_fx[1] ); // 2 * (Qsyn + SynthRef_shift) - 45

#endif

            Copy32( synthRef_fx, hCPE->hStereoDft->hb_stefi_sig_fx + hCPE->hStereoDft->hb_stefi_delay, output_frame ); /* Qsynth */
        }
@@ -247,6 +293,19 @@ void stereo_icBWE_dec_fx(
            hCPE->hStereoDft->hb_nrg_subr_fx[1] = 0;
            move32();
        }
#ifdef FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS
        shift_hb_nrg_subr = s_min( norm_l( hCPE->hStereoDft->hb_nrg_subr_fx[0] ), norm_l( hCPE->hStereoDft->hb_nrg_subr_fx[1] ) );

        hCPE->hStereoDft->hb_nrg_subr_fx[0] = ( Mpy_32_16_1( L_shl( hCPE->hStereoDft->hb_nrg_subr_fx[0], shift_hb_nrg_subr ), shl( hCPE->hStereoDft->NFFT, 5 ) ) ); /* shl( ., 5) is shortcut for shl( shr( hStereoDft->NFFT, 1 ), 6 ) */ /* q_hb_nrg_subr + shift_hb_nrg_subr - (15 - 6) */
        move32();
        hCPE->hStereoDft->hb_nrg_subr_fx[1] = ( Mpy_32_16_1( L_shl( hCPE->hStereoDft->hb_nrg_subr_fx[1], shift_hb_nrg_subr ), shl( hCPE->hStereoDft->NFFT, 5 ) ) ); /* shl( ., 5) is shortcut for shl( shr( hStereoDft->NFFT, 1 ), 6 ) */ /* q_hb_nrg_subr + shift_hb_nrg_subr - (15 - 6) */
        move32();
        hCPE->hStereoDft->q_hb_nrg_subr = sub( add( q_hb_nrg_subr, shift_hb_nrg_subr ), Q15 - Q6 );
        hCPE->hStereoDft->hb_nrg_fx[0] = hb_nrg_fx; /* q_hb_nrg */
        move32();
        hCPE->hStereoDft->q_hb_nrg[0] = q_hb_nrg;
        move16();
#else
        hCPE->hStereoDft->hb_nrg_subr_fx[0] = ( Mpy_32_16_1( hCPE->hStereoDft->hb_nrg_subr_fx[0], shl( shr( hCPE->hStereoDft->NFFT, 1 ), 6 ) ) ); // 2 * (Qsynth + SynthRef_shift) - 40                                       // 2 * (Qx + SynthRef_shift) - 31 - 15
        move32();
        hCPE->hStereoDft->hb_nrg_subr_fx[1] = ( Mpy_32_16_1( hCPE->hStereoDft->hb_nrg_subr_fx[1], shl( shr( hCPE->hStereoDft->NFFT, 1 ), 6 ) ) ); // 2 * (Qsynth + SynthRef_shift) - 40
@@ -254,6 +313,7 @@ void stereo_icBWE_dec_fx(
        hCPE->hStereoDft->q_hb_nrg_subr = sub( shl( ( *Q_syn + synthRef_shift ), 1 ), 45 + 9 );
        hCPE->hStereoDft->hb_nrg_fx[0] = hb_nrg_fx; // 2 * (Qx + SynthRef_shift) - 31
        move32();
#endif
        hCPE->hStereoDft->td_gain_fx[0] = 0;
        move32();
        hCPE->hStereoDft->core_hist[0] = st->core;