Commit ab57f0e2 authored by emerit's avatar emerit
Browse files

fix point hrtf binary loader ok, crend fx implementation ok, fastconv,...

fix point hrtf binary loader ok, crend fx implementation  ok, fastconv, prambin, td and reverb to do
parent 134d9254
Loading
Loading
Loading
Loading
+798 −796
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ static void calcGainc(Word16* exc, Word16 Q_exc, Word32 old_fpitch, Word16 L_sub
        tmp16 = Sqrt16( tmp16, &tmp_e ); /*Q15,norm,tmp_e*/
    }
    *lp_gainc = L_shl( L_deposit_l( tmp16 ), add( tmp_e, 1 ) ); /*15Q16*/

}

static void calcGainc2( Word16 *exc, Word16 Q_exc, Word16 L_subfr, Word32 *lp_gainc )
@@ -120,8 +119,8 @@ static void calcGainc2(Word16 *exc, Word16 Q_exc, Word16 L_subfr, Word32* lp_gai
    {
        tmp16 = Sqrt16( tmp16, &tmp_e ); /*Q15,norm,tmp_e*/
    }
    *lp_gainc = L_shl(L_deposit_l(tmp16),add(tmp_e,1)); /*15Q16*/                   move32();

    *lp_gainc = L_shl( L_deposit_l( tmp16 ), add( tmp_e, 1 ) ); /*15Q16*/
    move32();
}

/******************************************************
@@ -136,11 +135,13 @@ void con_tcx(
    Decoder_State *st,                                      /* i/o: coder memory state            */
    Word16 synth[] /* i/o:   synth[]                     */ /*Q0 */
#ifdef IVAS_CODE_CON_TCX
   ,const Word16 coh,           /* i  : coherence of stereo signal  */
    ,
    const Word16 coh,      /* i  : coherence of stereo signal  */
    Word16 *noise_seed,    /* i/o: noise seed for stereo       */
    const Word16 only_left /* i  : TD-PLC only in left channel */
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
   ,const float* A_cng          /* i  : CNG LP filter coefficients  */
    ,
    const float *A_cng /* i  : CNG LP filter coefficients  */
#endif
#endif

@@ -192,7 +193,8 @@ void con_tcx(

    noise_e = 0;
    move16();
    Q_syn = -1; /*Q format of temporary synthesis buffer syn*/                           move16();
    Q_syn = -1; /*Q format of temporary synthesis buffer syn*/
    move16();
    offset = 0;
    move16();

@@ -219,8 +221,7 @@ void con_tcx(
    c = BASOP_Util_Divide1616_Scale(
        L_frame,
        st->L_frame,
            &s
        );
        &s );

    FOR( i = 0; i < ( 2 * NB_SUBFR16k + 2 ); i++ )
    {
@@ -290,7 +291,8 @@ void con_tcx(
            tmp16 = s_max( Tc - shr( L_frame, 1 ), 0 );
            Copy_Scale_sig( hTcxDec->old_excFB_fx, &( exc[-tmp16] ), offset + tmp16, Q_exc - st->Q_exc );
        }
        ELSE {
        ELSE
        {
            Copy_Scale_sig( hTcxDec->old_excFB_fx, &( exc[-2 * L_subfr] ), 2 * L_subfr + offset, Q_exc - st->Q_exc );
        }
    }
@@ -333,10 +335,7 @@ void con_tcx(
            test();
            test();
            test();
            if (   (T0 > 0)
                    && (NE_16(T0,Tc) )
                    && (LT_32(L_deposit_h(abs_s(sub(T0,Tc)))/*Q16*/ , L_mult(4915/*.15f Q15*//*Q15*/,Tc/*Q0*/) /*Q16*/ ) )
               )
            if ( ( T0 > 0 ) && ( NE_16( T0, Tc ) ) && ( LT_32( L_deposit_h( abs_s( sub( T0, Tc ) ) ) /*Q16*/, L_mult( 4915 /*.15f Q15*/ /*Q15*/, Tc /*Q0*/ ) /*Q16*/ ) ) )
            {
                fUseExtrapolatedPitch = 1;
                move16();
@@ -357,18 +356,13 @@ void con_tcx(
                tmp16,
                st->plc_use_future_lag,
                &extrapolationFailed,
                st->nb_subfr
            );
                st->nb_subfr );

            T0 = round_fx( predPitchLag );
            test();
            test();
            test();
            if (   (T0 > 0)
            && (NE_16(T0,Tc) )
            && (LT_32(L_deposit_h(abs_s(sub(T0,Tc)))/*Q16*/ , L_mult(4915/*.15f Q15*//*Q15*/,Tc/*Q0*/) /*Q16*/ ) )
            && (extrapolationFailed == 0)
               )
            if ( ( T0 > 0 ) && ( NE_16( T0, Tc ) ) && ( LT_32( L_deposit_h( abs_s( sub( T0, Tc ) ) ) /*Q16*/, L_mult( 4915 /*.15f Q15*/ /*Q15*/, Tc /*Q0*/ ) /*Q16*/ ) ) && ( extrapolationFailed == 0 ) )
            {
                fUseExtrapolatedPitch = 1;
                move16();
@@ -534,7 +528,8 @@ void con_tcx(
        }

        gain32 = L_add( 2147483647l /*1.f Q31*/, 0 ); /*Q31*/
        gain = 32767/*1.f Q15*/;   /*Q15*/                                                   move16();
        gain = 32767 /*1.f Q15*/;                     /*Q15*/
        move16();
        if ( EQ_16( st->rf_frame_type, RF_TCXTD1 ) && EQ_16( st->use_partial_copy, 1 ) )
        {
            gain32 = 1073741824l /*0.5f Q31*/;
@@ -562,7 +557,6 @@ void con_tcx(
            move16();
            gain32 = L_sub( gain32, step32 );
#endif

        }

        /* update old exc without random part */
@@ -649,7 +643,8 @@ void con_tcx(
        tmpSeed = st->seed_acelp;
        move16();
        noise = buf;
        noise_e = 1;/*set exponent of noise to 1*/                                           move16();
        noise_e = 1; /*set exponent of noise to 1*/
        move16();

        tmp_loop = add( L_frame, L_FIR_FER2 - 1 );
        FOR( i = 0; i < tmp_loop; i++ )
@@ -714,7 +709,8 @@ void con_tcx(
            FOR( i = 0; i < tmp_loop; i++ )
            {
                Word16 j;
		L_tmp2 = 0; move32();
                L_tmp2 = 0;
                move32();
                for ( j = 11; j > 0; j-- )
                {
                    L_tmp2 = L_mac( L_tmp2, noise[i + L_FIR_FER2 - j], hp_filt[L_FIR_FER2 - j] );
@@ -788,7 +784,8 @@ void con_tcx(

    L_tmp = Mpy_32_16_1( st->Mode2_lp_gainc, alpha ) /*Q15*/;
    L_tmp2 = L_mult( sub( 16384 /*1.f Q14*/, alpha ) /*Q14*/, gainCNG /*Q15,gainCNG_e*/ );                      /*Q30,gainCNG_e*/
    st->Mode2_lp_gainc = BASOP_Util_Add_Mant32Exp(L_tmp,31-15,L_tmp2,add(gainCNG_e,31-30),&tmp_e);/*Q31*/   move32();
    st->Mode2_lp_gainc = BASOP_Util_Add_Mant32Exp( L_tmp, 31 - 15, L_tmp2, add( gainCNG_e, 31 - 30 ), &tmp_e ); /*Q31*/
    move32();
    st->Mode2_lp_gainc = L_shl( st->Mode2_lp_gainc, sub( tmp_e, 31 - 16 ) );
    move32();

@@ -837,7 +834,8 @@ void con_tcx(

    FOR( i = 0; i < L_FIR_FER2 / 2; i++ )
    {
        *pt_exc = mult_r(*pt_exc,gain_tmp);/*Q-15,noise_e+gain_inov_e-tmp_e*/              move16();
        *pt_exc = mult_r( *pt_exc, gain_tmp ); /*Q-15,noise_e+gain_inov_e-tmp_e*/
        move16();
        pt_exc++;
    }
    tmp16 = add( L_frame, L_FIR_FER2 / 2 );
@@ -870,9 +868,11 @@ void con_tcx(
        FOR( i = 0; i < tmp16; i++ )
        {
#ifdef BASOP_NOGLOB
            exc[i] = add_sat(exc[i], shl(noise[i + (L_FIR_FER2 / 2)], Q_exc + noise_e));/*Q1*/       move16();
            exc[i] = add_sat( exc[i], shl( noise[i + ( L_FIR_FER2 / 2 )], Q_exc + noise_e ) ); /*Q1*/
            move16();
#else
            exc[i] = add(exc[i] , shl(noise[i+(L_FIR_FER2/2)],Q_exc+noise_e));/*Q1*/       move16();
            exc[i] = add( exc[i], shl( noise[i + ( L_FIR_FER2 / 2 )], Q_exc + noise_e ) ); /*Q1*/
            move16();
#endif
        }
    }
@@ -885,7 +885,8 @@ void con_tcx(
        {
            lerp( exc, st->old_exc_fx, L_EXC_MEM_DEC, add( L_frame, shr( L_frame, 1 ) ) );
        }
        ELSE {
        ELSE
        {
            Copy( st->old_exc_fx + L_FRAME16k, st->old_exc_fx, L_FRAME16k / 2 );
            lerp( exc, st->old_exc_fx + L_FRAME16k / 2, L_FRAME16k, L_frame );
        }
@@ -1083,7 +1084,8 @@ void con_tcx(
#ifdef IVAS_FLOAT_FIXED
void con_tcx_ivas_fx(
    Decoder_State *st, /* i/o: coder memory state            */
    Word16 synth[],              /* i/o:   synth[]                     *//*Q0 */
    Word16 synth[],
    /* i/o:   synth[]                     */ /*Q0 */
    const Word16 coh,                        /* i  : coherence of stereo signal  */
    Word16 *noise_seed,                      /* i/o: noise seed for stereo       */
    const Word16 only_left,                  /* i  : TD-PLC only in left channel */
@@ -1136,7 +1138,8 @@ void con_tcx_ivas_fx(

    noise_e = 0;
    move16();
    Q_syn = -1; /*Q format of temporary synthesis buffer syn*/                           move16();
    Q_syn = -1; /*Q format of temporary synthesis buffer syn*/
    move16();
    offset = 0;
    move16();

@@ -1163,8 +1166,7 @@ void con_tcx_ivas_fx(
    c = BASOP_Util_Divide1616_Scale(
        L_frame,
        st->L_frame,
            &s
        );
        &s );

    FOR( i = 0; i < ( 2 * NB_SUBFR16k + 2 ); i++ )
    {
@@ -1234,7 +1236,8 @@ void con_tcx_ivas_fx(
            tmp16 = s_max( Tc - shr( L_frame, 1 ), 0 );
            Copy_Scale_sig( hTcxDec->old_excFB_fx, &( exc[-tmp16] ), offset + tmp16, Q_exc - st->Q_exc );
        }
        ELSE {
        ELSE
        {
            Copy_Scale_sig( hTcxDec->old_excFB_fx, &( exc[-2 * L_subfr] ), 2 * L_subfr + offset, Q_exc - st->Q_exc );
        }
    }
@@ -1277,10 +1280,7 @@ void con_tcx_ivas_fx(
            test();
            test();
            test();
            if (   (T0 > 0)
                    && (NE_16(T0,Tc) )
                    && (LT_32(L_deposit_h(abs_s(sub(T0,Tc)))/*Q16*/ , L_mult(4915/*.15f Q15*//*Q15*/,Tc/*Q0*/) /*Q16*/ ) )
               )
            if ( ( T0 > 0 ) && ( NE_16( T0, Tc ) ) && ( LT_32( L_deposit_h( abs_s( sub( T0, Tc ) ) ) /*Q16*/, L_mult( 4915 /*.15f Q15*/ /*Q15*/, Tc /*Q0*/ ) /*Q16*/ ) ) )
            {
                fUseExtrapolatedPitch = 1;
                move16();
@@ -1301,18 +1301,13 @@ void con_tcx_ivas_fx(
                tmp16,
                st->plc_use_future_lag,
                &extrapolationFailed,
                st->nb_subfr
            );
                st->nb_subfr );

            T0 = round_fx( predPitchLag );
            test();
            test();
            test();
            if (   (T0 > 0)
            && (NE_16(T0,Tc) )
            && (LT_32(L_deposit_h(abs_s(sub(T0,Tc)))/*Q16*/ , L_mult(4915/*.15f Q15*//*Q15*/,Tc/*Q0*/) /*Q16*/ ) )
            && (extrapolationFailed == 0)
               )
            if ( ( T0 > 0 ) && ( NE_16( T0, Tc ) ) && ( LT_32( L_deposit_h( abs_s( sub( T0, Tc ) ) ) /*Q16*/, L_mult( 4915 /*.15f Q15*/ /*Q15*/, Tc /*Q0*/ ) /*Q16*/ ) ) && ( extrapolationFailed == 0 ) )
            {
                fUseExtrapolatedPitch = 1;
                move16();
@@ -1478,7 +1473,8 @@ void con_tcx_ivas_fx(
        }

        gain32 = L_add( 2147483647l /*1.f Q31*/, 0 ); /*Q31*/
        gain = 32767/*1.f Q15*/;   /*Q15*/                                                   move16();
        gain = 32767 /*1.f Q15*/;                     /*Q15*/
        move16();
        if ( EQ_16( st->rf_frame_type, RF_TCXTD1 ) && EQ_16( st->use_partial_copy, 1 ) )
        {
            gain32 = 1073741824l /*0.5f Q31*/;
@@ -1506,7 +1502,6 @@ void con_tcx_ivas_fx(
            move16();
            gain32 = L_sub( gain32, step32 );
#endif

        }

        /* update old exc without random part */
@@ -1576,8 +1571,8 @@ void con_tcx_ivas_fx(

        FOR( i = 0; i < L_frame + L_FIR_FER2 - 1; i++ )
        {
            random1 = own_random2_fx(&tmpSeed1);
            random2 = own_random2_fx(&tmpSeed1);
            random1 = own_random2_fx( tmpSeed1 );
            random2 = own_random2_fx( tmpSeed1 );
            noise[i] = add( shr( random1, noise_e ), shr( mult( alpha_coh, random2 ), noise_e ) );
        }

@@ -1588,8 +1583,8 @@ void con_tcx_ivas_fx(

        FOR( ; i < L_frame + ( L_frame / 2 ) + 2 * L_FIR_FER2; i++ )
        {
            random1 = own_random2_fx(&tmpSeed1);
            random2 = own_random2_fx(&tmpSeed1);
            random1 = own_random2_fx( tmpSeed1 );
            random2 = own_random2_fx( tmpSeed1 );
            noise[i] = add( shr( random1, noise_e ), shr( mult( alpha_coh, random2 ), noise_e ) );
        }
    }
@@ -1599,7 +1594,8 @@ void con_tcx_ivas_fx(
        tmpSeed = st->seed_acelp;
        move16();
        noise = buf;
        noise_e = 1;/*set exponent of noise to 1*/                                           move16();
        noise_e = 1; /*set exponent of noise to 1*/
        move16();

        tmp_loop = add( L_frame, L_FIR_FER2 - 1 );
        FOR( i = 0; i < tmp_loop; i++ )
@@ -1664,7 +1660,8 @@ void con_tcx_ivas_fx(
            FOR( i = 0; i < tmp_loop; i++ )
            {
                Word16 j;
		L_tmp2 = 0; move32();
                L_tmp2 = 0;
                move32();
                for ( j = 11; j > 0; j-- )
                {
                    L_tmp2 = L_mac( L_tmp2, noise[i + L_FIR_FER2 - j], hp_filt[L_FIR_FER2 - j] );
@@ -1739,7 +1736,8 @@ void con_tcx_ivas_fx(

    L_tmp = Mpy_32_16_1( st->Mode2_lp_gainc, alpha ) /*Q15*/;
    L_tmp2 = L_mult( sub( 16384 /*1.f Q14*/, alpha ) /*Q14*/, gainCNG /*Q15,gainCNG_e*/ );                      /*Q30,gainCNG_e*/
    st->Mode2_lp_gainc = BASOP_Util_Add_Mant32Exp(L_tmp,31-15,L_tmp2,add(gainCNG_e,31-30),&tmp_e);/*Q31*/   move32();
    st->Mode2_lp_gainc = BASOP_Util_Add_Mant32Exp( L_tmp, 31 - 15, L_tmp2, add( gainCNG_e, 31 - 30 ), &tmp_e ); /*Q31*/
    move32();
    st->Mode2_lp_gainc = L_shl( st->Mode2_lp_gainc, sub( tmp_e, 31 - 16 ) );
    move32();

@@ -1795,7 +1793,8 @@ void con_tcx_ivas_fx(

    FOR( i = 0; i < L_FIR_FER2 / 2; i++ )
    {
        *pt_exc = mult_r(*pt_exc,gain_tmp);/*Q-15,noise_e+gain_inov_e-tmp_e*/              move16();
        *pt_exc = mult_r( *pt_exc, gain_tmp ); /*Q-15,noise_e+gain_inov_e-tmp_e*/
        move16();
        pt_exc++;
    }
    tmp16 = add( L_frame, L_FIR_FER2 / 2 );
@@ -1828,9 +1827,11 @@ void con_tcx_ivas_fx(
        FOR( i = 0; i < tmp16; i++ )
        {
#ifdef BASOP_NOGLOB
            exc[i] = add_sat(exc[i], shl_sat(noise[i + (L_FIR_FER2 / 2)], Q_exc + noise_e));/*Q1*/       move16();
            exc[i] = add_sat( exc[i], shl_sat( noise[i + ( L_FIR_FER2 / 2 )], Q_exc + noise_e ) ); /*Q1*/
            move16();
#else
            exc[i] = add(exc[i] , shl(noise[i+(L_FIR_FER2/2)],Q_exc+noise_e));/*Q1*/       move16();
            exc[i] = add( exc[i], shl( noise[i + ( L_FIR_FER2 / 2 )], Q_exc + noise_e ) ); /*Q1*/
            move16();
#endif
        }
    }
@@ -1843,7 +1844,8 @@ void con_tcx_ivas_fx(
        {
            lerp( exc, st->old_exc_fx, L_EXC_MEM_DEC, add( L_frame, shr( L_frame, 1 ) ) );
        }
        ELSE {
        ELSE
        {
            Copy( st->old_exc_fx + L_FRAME16k, st->old_exc_fx, L_FRAME16k / 2 );
            lerp( exc, st->old_exc_fx + L_FRAME16k / 2, L_FRAME16k, L_frame );
        }
+35 −1
Original line number Diff line number Diff line
@@ -1428,6 +1428,9 @@ static ivas_error ivas_rend_initCrend_fx(
                {
                    return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Invalid function parameters " );
                }
                hHrtf->factor_Q_latency_s_fx = hSetOfHRTF->hHRTF_brir_combined->factor_Q_latency_s_fx;
                hHrtf->factor_Q_inv_diffuse_weight_fx = hSetOfHRTF->hHRTF_brir_combined->factor_Q_inv_diffuse_weight_fx;
                hHrtf->factor_Q_pOut_to_bin_fx = hSetOfHRTF->hHRTF_brir_combined->factor_Q_pOut_to_bin_fx;
#endif
                hHrtf->latency_s_fx = hSetOfHRTF->hHRTF_brir_combined->latency_s_fx;
                hHrtf->max_num_iterations = hSetOfHRTF->hHRTF_brir_combined->max_num_iterations;
@@ -1440,6 +1443,9 @@ static ivas_error ivas_rend_initCrend_fx(
                {
                    return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Invalid function parameters " );
                }
                hHrtf->factor_Q_latency_s_fx = hSetOfHRTF->hHRTF_hrir_combined->factor_Q_latency_s_fx;
                hHrtf->factor_Q_inv_diffuse_weight_fx = hSetOfHRTF->hHRTF_hrir_combined->factor_Q_inv_diffuse_weight_fx;
                hHrtf->factor_Q_pOut_to_bin_fx = hSetOfHRTF->hHRTF_hrir_combined->factor_Q_pOut_to_bin_fx;
#endif
                hHrtf->latency_s_fx = hSetOfHRTF->hHRTF_hrir_combined->latency_s_fx;
                hHrtf->max_num_iterations = hSetOfHRTF->hHRTF_hrir_combined->max_num_iterations;
@@ -1448,7 +1454,11 @@ static ivas_error ivas_rend_initCrend_fx(
            move32();
            move16();
            move16();

#ifdef FIX_CREND_CHANGES
            move16();
            move16();
            move16();
#endif
            FOR( j = 0; j < BINAURAL_CHANNELS; j++ )
            {
                IF( EQ_16( outConfig, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) )
@@ -1569,6 +1579,14 @@ static ivas_error ivas_rend_initCrend_fx(
        {
            IF( EQ_16( inConfig, IVAS_AUDIO_CONFIG_HOA3 ) )
            {
#ifdef FIX_CREND_CHANGES
                hHrtf->factor_Q_latency_s_fx = hSetOfHRTF->hHRTF_hrir_hoa3->factor_Q_latency_s_fx;
                hHrtf->factor_Q_inv_diffuse_weight_fx = hSetOfHRTF->hHRTF_hrir_hoa3->factor_Q_inv_diffuse_weight_fx;
                hHrtf->factor_Q_pOut_to_bin_fx = hSetOfHRTF->hHRTF_hrir_hoa3->factor_Q_pOut_to_bin_fx;
                move16();
                move16();
                move16();
#endif
                hHrtf->latency_s_fx = hSetOfHRTF->hHRTF_hrir_hoa3->latency_s_fx;
                hHrtf->max_num_iterations = hSetOfHRTF->hHRTF_hrir_hoa3->max_num_iterations;
                hHrtf->index_frequency_max_diffuse = hSetOfHRTF->hHRTF_hrir_hoa3->index_frequency_max_diffuse;
@@ -1625,6 +1643,14 @@ static ivas_error ivas_rend_initCrend_fx(
            }
            ELSE IF( EQ_16( inConfig, IVAS_AUDIO_CONFIG_HOA2 ) )
            {
#ifdef FIX_CREND_CHANGES
                hHrtf->factor_Q_latency_s_fx = hSetOfHRTF->hHRTF_hrir_hoa2->factor_Q_latency_s_fx;
                hHrtf->factor_Q_inv_diffuse_weight_fx = hSetOfHRTF->hHRTF_hrir_hoa2->factor_Q_inv_diffuse_weight_fx;
                hHrtf->factor_Q_pOut_to_bin_fx = hSetOfHRTF->hHRTF_hrir_hoa2->factor_Q_pOut_to_bin_fx;
                move16();
                move16();
                move16();
#endif
                hHrtf->latency_s_fx = hSetOfHRTF->hHRTF_hrir_hoa2->latency_s_fx;
                hHrtf->max_num_iterations = hSetOfHRTF->hHRTF_hrir_hoa2->max_num_iterations;
                hHrtf->index_frequency_max_diffuse = hSetOfHRTF->hHRTF_hrir_hoa2->index_frequency_max_diffuse;
@@ -1682,6 +1708,14 @@ static ivas_error ivas_rend_initCrend_fx(
            }
            ELSE IF( EQ_16( inConfig, IVAS_AUDIO_CONFIG_FOA ) )
            {
#ifdef FIX_CREND_CHANGES
                hHrtf->factor_Q_latency_s_fx = hSetOfHRTF->hHRTF_hrir_foa->factor_Q_latency_s_fx;
                hHrtf->factor_Q_inv_diffuse_weight_fx = hSetOfHRTF->hHRTF_hrir_foa->factor_Q_inv_diffuse_weight_fx;
                hHrtf->factor_Q_pOut_to_bin_fx = hSetOfHRTF->hHRTF_hrir_foa->factor_Q_pOut_to_bin_fx;
                move16();
                move16();
                move16();
#endif
                hHrtf->latency_s_fx = hSetOfHRTF->hHRTF_hrir_foa->latency_s_fx;
                hHrtf->max_num_iterations = hSetOfHRTF->hHRTF_hrir_foa->max_num_iterations;
                hHrtf->index_frequency_max_diffuse = hSetOfHRTF->hHRTF_hrir_foa->index_frequency_max_diffuse;
+74 −13
Original line number Diff line number Diff line
@@ -725,11 +725,15 @@ typedef struct ivas_hrtfs_parambin_struct
    float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS];
    float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS];
#ifdef IVAS_FLOAT_FIXED
    Word16 hrtfShCoeffsRe_fx[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; /*Q-15*/
    Word16 hrtfShCoeffsIm_fx[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; /*Q-14*/
    Word32 parametricReverberationTimes_fx[CLDFB_NO_CHANNELS_MAX];                /*Q-31*/
    Word32 parametricReverberationEneCorrections_fx[CLDFB_NO_CHANNELS_MAX];       /*Q-31*/
    Word32 parametricEarlyPartEneCorrection_fx[CLDFB_NO_CHANNELS_MAX];            /*Q-31*/
    Word16 factor_Q_hrtfShCoeffs_fx;
    Word16 hrtfShCoeffsRe_fx[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; /*factor_Q_hrtfShCoeffs_fx*/
    Word16 hrtfShCoeffsIm_fx[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; /*factor_Q_hrtfShCoeffs_fx*/
    Word16 factor_Q_reverberationTimes_fx;
    Word32 parametricReverberationTimes_fx[CLDFB_NO_CHANNELS_MAX]; /*factor_Q_reverberationTimes_fx*/
    Word16 factor_Q_reverberationEneCorrections_fx;
    Word32 parametricReverberationEneCorrections_fx[CLDFB_NO_CHANNELS_MAX]; /*factor_Q_reverberationEneCorrections_fx*/
    Word16 factor_Q_EarlyPartEneCorrection_fx;
    Word32 parametricEarlyPartEneCorrection_fx[CLDFB_NO_CHANNELS_MAX]; /*factor_Q_EarlyPartEneCorrection_fx*/
#endif                                                                 // IVAS_FLOAT_FIXED

    float parametricReverberationTimes[CLDFB_NO_CHANNELS_MAX];
@@ -1883,6 +1887,55 @@ typedef struct ivas_hrtfs_crend_structure
/* Fastconv binaural data structure */
typedef struct ivas_hrtfs_fastconv_struct
{
#ifdef FIX_CREND_CHANGES
#ifdef IVAS_FLOAT_FIXED
    Word16 factor_Q_HOA3_latency_s_fx;
    Word32 FASTCONV_HOA3_latency_s_fx;
    Word16 factor_Q_HRIR_latency_s_fx;
    Word32 FASTCONV_HRIR_latency_s_fx;

    Word16 factor_Q_HOA3_fx;
    Word32 ***leftHRIRReal_HOA3_fx;
    Word32 ***leftHRIRImag_HOA3_fx;
    Word32 ***rightHRIRReal_HOA3_fx;
    Word32 ***rightHRIRImag_HOA3_fx;

    Word16 factor_Q_HRIR_fx;
    Word32 ***leftHRIRReal_fx;
    Word32 ***leftHRIRImag_fx;
    Word32 ***rightHRIRReal_fx;
    Word32 ***rightHRIRImag_fx;

    Word16 factor_Q_BRIR_fx;
    Word32 ***leftBRIRReal_fx;
    Word32 ***leftBRIRImag_fx;
    Word32 ***rightBRIRReal_fx;
    Word32 ***rightBRIRImag_fx;
    Word16 factor_Q_BRIR_latency_s_fx;
    Word32 FASTCONV_BRIR_latency_s_fx;

    Word16 factor_Q_HOA2_fx;
    Word32 ***leftHRIRReal_HOA2_fx;
    Word32 ***leftHRIRImag_HOA2_fx;
    Word32 ***rightHRIRReal_HOA2_fx;
    Word32 ***rightHRIRImag_HOA2_fx;
    Word16 factor_Q_HOA2_latency_s_fx;
    Word32 FASTCONV_HOA2_latency_s_fx;

    Word16 factor_Q_FOA_fx;
    Word32 ***leftHRIRReal_FOA_fx;
    Word32 ***leftHRIRImag_FOA_fx;
    Word32 ***rightHRIRReal_FOA_fx;
    Word32 ***rightHRIRImag_FOA_fx;
    Word16 factor_Q_FOA_latency_s_fx;
    Word32 FASTCONV_FOA_latency_s_fx;

    Word16 factor_Q_ReverberationTimes_fx;
    Word16 fastconvReverberationTimes_fx[CLDFB_NO_CHANNELS_MAX];
    Word16 factor_Q_ReverberationEneCorrections_fx;
    Word16 fastconvReverberationEneCorrections_fx[CLDFB_NO_CHANNELS_MAX];
#endif
#endif
    float FASTCONV_HOA3_latency_s;
    float FASTCONV_HRIR_latency_s;
    float ***leftHRIRReal_HOA3;
@@ -1923,6 +1976,14 @@ typedef struct ivas_hrtfs_fastconv_struct
#ifdef FIX_FIX_POINT_HRTF_FILE_FORMAT
typedef struct ivas_hrtfs_statistics_struct
{
#ifdef FIX_CREND_CHANGES
#ifdef IVAS_FLOAT_FIXED
    Word16 factor_Q_energy_fx;
    Word16 *average_energy_l_fx;
    Word16 *average_energy_r_fx;
    Word16 *inter_aural_coherence_fx;
#endif
#endif
    float *average_energy_l;
    float *average_energy_r;
    float *inter_aural_coherence;
+91 −117

File changed.

Preview size limit exceeded, changes collapsed.