Commit 5b380fc5 authored by emerit's avatar emerit
Browse files

bugs fix

parent e7895661
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -9734,6 +9734,15 @@ void Copy_Scale_sig_16_32_DEPREC(
    const Word16 exp0 /* i  : exponent: x = round(x << exp)   Qx ?exp  */
);
#ifdef FIX_CREND_SIMPLIFY_CODE
void Copy_Scale_sig_16_32_r(
    const Word16 x[], /* i  : signal to scale input           Qx        */
    Word32 y[],       /* o  : scaled signal output            Qx        */
    const Word16 lg,  /* i  : size of x[]                     Q0        */
    const Word16 exp0 /* i  : exponent: x = round(x << exp)   Qx ?exp  */
);
#endif
void Copy_Scale_sig_16_32_no_sat(
    const Word16 x[], /* i  : signal to scale input           Qx        */
    Word32 y[],       /* o  : scaled signal output            Qx        */
+15 −0
Original line number Diff line number Diff line
@@ -1709,6 +1709,21 @@ void Copy_Scale_sig_16_32_DEPREC(
    return;
}

#ifdef FIX_CREND_SIMPLIFY_CODE
void Copy_Scale_sig_16_32_r(
    const Word16 x[], /* i  : signal to scale input           Qx        */
    Word32 y[],       /* o  : scaled signal output            Qx        */
    const Word16 lg,  /* i  : size of x[]                     Q0        */
    const Word16 exp0 /* i  : exponent: x = round(x << exp)   Qx ?exp  */
)
{
    Word16 i;
    for ( i = 0; i < lg; i++ )
    {
        y[i] = L_shl_r( L_deposit_l( x[i] ), exp0 );
    }
}
#endif

void Copy_Scale_sig_16_32_no_sat(
    const Word16 x[], /* i  : signal to scale input           Qx        */
+65 −22
Original line number Diff line number Diff line
@@ -536,6 +536,13 @@ void ivas_init_binaural_hrtf_fx(
    move32();
    HrtfFastConv->n_channels = 0;
    move16();
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
    HrtfFastConv->FASTCONV_latency_s_Q_fx = 0;
    HrtfFastConv->FASTCONV_taps_s_Q_fx = 0;
    HrtfFastConv->FASTCONV_reverbTime_s_Q_fx = 0;
    HrtfFastConv->FASTCONV_reverbEne_s_Q_fx = 0;
#endif

#else
    HrtfFastConv->leftHRIRReal_HOA3_fx = NULL;
    HrtfFastConv->leftHRIRImag_HOA3_fx = NULL;
@@ -875,6 +882,10 @@ static ivas_error ivas_binaural_hrtf_open_fx(
        {
#ifdef FIX_CREND_SIMPLIFY_CODE
            HrtfFastConv->FASTCONV_latency_s_fx = FASTCONV_HRIR_latency_s_fx;
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
            HrtfFastConv->FASTCONV_latency_s_Q_fx = sub( Q31, FASTCONV_factor_Q_HRIR_latency_s_fx );
            HrtfFastConv->FASTCONV_taps_s_Q_fx = sub( Q15, FASTCONV_factor_Q_HRIR_fx );
#endif
            HrtfFastConv->ntaps = BINAURAL_NTAPS;
            move16();
#else
@@ -886,6 +897,11 @@ static ivas_error ivas_binaural_hrtf_open_fx(
        {
#ifdef FIX_CREND_SIMPLIFY_CODE
            HrtfFastConv->FASTCONV_latency_s_fx = FASTCONV_HOA2_latency_s_fx;
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
            HrtfFastConv->FASTCONV_latency_s_Q_fx = sub( Q31, FASTCONV_factor_Q_HOA2_latency_s_fx );
            HrtfFastConv->FASTCONV_taps_s_Q_fx = sub( Q15, FASTCONV_factor_Q_HOA2_fx );
#endif

            HrtfFastConv->ntaps = BINAURAL_NTAPS_SBA;
            move16();
#else
@@ -897,6 +913,10 @@ static ivas_error ivas_binaural_hrtf_open_fx(
        {
#ifdef FIX_CREND_SIMPLIFY_CODE
            HrtfFastConv->FASTCONV_latency_s_fx = FASTCONV_HOA3_latency_s_fx;
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
            HrtfFastConv->FASTCONV_latency_s_Q_fx = sub( Q31, FASTCONV_factor_Q_HOA3_latency_s_fx );
            HrtfFastConv->FASTCONV_taps_s_Q_fx = sub( Q15, FASTCONV_factor_Q_HOA3_fx );
#endif
            HrtfFastConv->ntaps = BINAURAL_NTAPS_SBA;
            move16();
#else
@@ -908,6 +928,10 @@ static ivas_error ivas_binaural_hrtf_open_fx(
        {
#ifdef FIX_CREND_SIMPLIFY_CODE
            HrtfFastConv->FASTCONV_latency_s_fx = FASTCONV_FOA_latency_s_fx;
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
            HrtfFastConv->FASTCONV_latency_s_Q_fx = sub( Q31, FASTCONV_factor_Q_FOA_latency_s_fx );
            HrtfFastConv->FASTCONV_taps_s_Q_fx = sub( Q15, FASTCONV_factor_Q_FOA_fx );
#endif
            HrtfFastConv->ntaps = BINAURAL_NTAPS_SBA;
            move16();
#else
@@ -920,6 +944,12 @@ static ivas_error ivas_binaural_hrtf_open_fx(
        {
#ifdef FIX_CREND_SIMPLIFY_CODE
            HrtfFastConv->FASTCONV_latency_s_fx = FASTCONV_BRIR_latency_s_fx;
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
            HrtfFastConv->FASTCONV_latency_s_Q_fx = sub( Q31, FASTCONV_factor_Q_BRIR_latency_s_fx );
            HrtfFastConv->FASTCONV_taps_s_Q_fx = sub( Q15, FASTCONV_factor_Q_BRIR_fx );
            HrtfFastConv->FASTCONV_reverbTime_s_Q_fx = sub( Q15, FASTCONV_factor_Q_reverberationTimes_fx );
            HrtfFastConv->FASTCONV_reverbEne_s_Q_fx = sub( Q15, FASTCONV_factor_Q_reverberationEneCorrections_fx );
#endif
            HrtfFastConv->ntaps = BINAURAL_NTAPS_MAX;
            move16();
#else
@@ -983,10 +1013,10 @@ static ivas_error ivas_binaural_hrtf_open_fx(
                {
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
                    Copy_Scale_sig_16_32_no_sat( leftHRIRReal_fx[i][j], HrtfFastConv->leftReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HRIR_fx );
                    Copy_Scale_sig_16_32_no_sat( leftHRIRImag_fx[i][j], HrtfFastConv->leftImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HRIR_fx );
                    Copy_Scale_sig_16_32_no_sat( rightHRIRReal_fx[i][j], HrtfFastConv->rightReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HRIR_fx );
                    Copy_Scale_sig_16_32_no_sat( rightHRIRImag_fx[i][j], HrtfFastConv->rightImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HRIR_fx );
                    Copy_Scale_sig_16_32_r( leftHRIRReal_fx[i][j], HrtfFastConv->leftReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HRIR_fx );
                    Copy_Scale_sig_16_32_r( leftHRIRImag_fx[i][j], HrtfFastConv->leftImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HRIR_fx );
                    Copy_Scale_sig_16_32_r( rightHRIRReal_fx[i][j], HrtfFastConv->rightReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HRIR_fx );
                    Copy_Scale_sig_16_32_r( rightHRIRImag_fx[i][j], HrtfFastConv->rightImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HRIR_fx );
#else
                    HrtfFastConv->leftReal_fx[i][j] = leftHRIRReal_fx[i][j];
                    HrtfFastConv->leftImag_fx[i][j] = leftHRIRImag_fx[i][j];
@@ -1011,10 +1041,10 @@ static ivas_error ivas_binaural_hrtf_open_fx(
                {
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
                    Copy_Scale_sig_16_32_no_sat( leftBRIRReal_fx[i][j], HrtfFastConv->leftReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_BRIR_fx );
                    Copy_Scale_sig_16_32_no_sat( leftBRIRImag_fx[i][j], HrtfFastConv->leftImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_BRIR_fx );
                    Copy_Scale_sig_16_32_no_sat( rightBRIRReal_fx[i][j], HrtfFastConv->rightReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_BRIR_fx );
                    Copy_Scale_sig_16_32_no_sat( rightBRIRImag_fx[i][j], HrtfFastConv->rightImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_BRIR_fx );
                    Copy_Scale_sig_16_32_r( leftBRIRReal_fx[i][j], HrtfFastConv->leftReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_BRIR_fx );
                    Copy_Scale_sig_16_32_r( leftBRIRImag_fx[i][j], HrtfFastConv->leftImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_BRIR_fx );
                    Copy_Scale_sig_16_32_r( rightBRIRReal_fx[i][j], HrtfFastConv->rightReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_BRIR_fx );
                    Copy_Scale_sig_16_32_r( rightBRIRImag_fx[i][j], HrtfFastConv->rightImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_BRIR_fx );
#else
                    HrtfFastConv->leftReal_fx[i][j] = leftBRIRReal_fx[i][j];
                    HrtfFastConv->leftImag_fx[i][j] = leftBRIRImag_fx[i][j];
@@ -1040,10 +1070,10 @@ static ivas_error ivas_binaural_hrtf_open_fx(
                {
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
                    Copy_Scale_sig_16_32_no_sat( leftHRIRReal_HOA3_fx[i][j], HrtfFastConv->leftReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA3_fx );
                    Copy_Scale_sig_16_32_no_sat( leftHRIRImag_HOA3_fx[i][j], HrtfFastConv->leftImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA3_fx );
                    Copy_Scale_sig_16_32_no_sat( rightHRIRReal_HOA3_fx[i][j], HrtfFastConv->rightReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA3_fx );
                    Copy_Scale_sig_16_32_no_sat( rightHRIRImag_HOA3_fx[i][j], HrtfFastConv->rightImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA3_fx );
                    Copy_Scale_sig_16_32_r( leftHRIRReal_HOA3_fx[i][j], HrtfFastConv->leftReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA3_fx );
                    Copy_Scale_sig_16_32_r( leftHRIRImag_HOA3_fx[i][j], HrtfFastConv->leftImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA3_fx );
                    Copy_Scale_sig_16_32_r( rightHRIRReal_HOA3_fx[i][j], HrtfFastConv->rightReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA3_fx );
                    Copy_Scale_sig_16_32_r( rightHRIRImag_HOA3_fx[i][j], HrtfFastConv->rightImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA3_fx );
#else
                    HrtfFastConv->leftReal_fx[i][j] = leftHRIRReal_HOA3_fx[i][j];
                    HrtfFastConv->leftImag_fx[i][j] = leftHRIRImag_HOA3_fx[i][j];
@@ -1071,10 +1101,10 @@ static ivas_error ivas_binaural_hrtf_open_fx(
                {
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
                    Copy_Scale_sig_16_32_no_sat( leftHRIRReal_HOA2_fx[i][j], HrtfFastConv->leftReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA2_fx );
                    Copy_Scale_sig_16_32_no_sat( leftHRIRImag_HOA2_fx[i][j], HrtfFastConv->leftImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA2_fx );
                    Copy_Scale_sig_16_32_no_sat( rightHRIRReal_HOA2_fx[i][j], HrtfFastConv->rightReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA2_fx );
                    Copy_Scale_sig_16_32_no_sat( rightHRIRImag_HOA2_fx[i][j], HrtfFastConv->rightImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA2_fx );
                    Copy_Scale_sig_16_32_r( leftHRIRReal_HOA2_fx[i][j], HrtfFastConv->leftReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA2_fx );
                    Copy_Scale_sig_16_32_r( leftHRIRImag_HOA2_fx[i][j], HrtfFastConv->leftImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA2_fx );
                    Copy_Scale_sig_16_32_r( rightHRIRReal_HOA2_fx[i][j], HrtfFastConv->rightReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA2_fx );
                    Copy_Scale_sig_16_32_r( rightHRIRImag_HOA2_fx[i][j], HrtfFastConv->rightImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_HOA2_fx );
#else
                    HrtfFastConv->leftReal_fx[i][j] = leftHRIRReal_HOA2_fx[i][j];
                    HrtfFastConv->leftImag_fx[i][j] = leftHRIRImag_HOA2_fx[i][j];
@@ -1099,10 +1129,10 @@ static ivas_error ivas_binaural_hrtf_open_fx(
                {
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
                    Copy_Scale_sig_16_32_no_sat( leftHRIRReal_FOA_fx[i][j], HrtfFastConv->leftReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_FOA_fx );
                    Copy_Scale_sig_16_32_no_sat( leftHRIRImag_FOA_fx[i][j], HrtfFastConv->leftImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_FOA_fx );
                    Copy_Scale_sig_16_32_no_sat( rightHRIRReal_FOA_fx[i][j], HrtfFastConv->rightReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_FOA_fx );
                    Copy_Scale_sig_16_32_no_sat( rightHRIRImag_FOA_fx[i][j], HrtfFastConv->rightImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_FOA_fx );
                    Copy_Scale_sig_16_32_r( leftHRIRReal_FOA_fx[i][j], HrtfFastConv->leftReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_FOA_fx );
                    Copy_Scale_sig_16_32_r( leftHRIRImag_FOA_fx[i][j], HrtfFastConv->leftImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_FOA_fx );
                    Copy_Scale_sig_16_32_r( rightHRIRReal_FOA_fx[i][j], HrtfFastConv->rightReal_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_FOA_fx );
                    Copy_Scale_sig_16_32_r( rightHRIRImag_FOA_fx[i][j], HrtfFastConv->rightImag_fx[i][j], HrtfFastConv->ntaps, Q29 - FASTCONV_factor_Q_FOA_fx );
#else
                    HrtfFastConv->leftReal_fx[i][j] = leftHRIRReal_FOA_fx[i][j];
                    HrtfFastConv->leftImag_fx[i][j] = leftHRIRImag_FOA_fx[i][j];
@@ -1119,8 +1149,8 @@ static ivas_error ivas_binaural_hrtf_open_fx(
            }
        }
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
        Copy_Scale_sig_16_32_no_sat( fastconvReverberationTimes_fx, HrtfFastConv->fastconvReverberationTimes_fx, CLDFB_NO_CHANNELS_MAX, Q26 - FASTCONV_factor_Q_reverberationTimes_fx );
        Copy_Scale_sig_16_32_no_sat( fastconvReverberationEneCorrections_fx, HrtfFastConv->fastconvReverberationEneCorrections_fx, CLDFB_NO_CHANNELS_MAX, Q31 - FASTCONV_factor_Q_reverberationTimes_fx );
        Copy_Scale_sig_16_32_r( fastconvReverberationTimes_fx, HrtfFastConv->fastconvReverberationTimes_fx, CLDFB_NO_CHANNELS_MAX, Q26 - FASTCONV_factor_Q_reverberationTimes_fx );
        Copy_Scale_sig_16_32_r( fastconvReverberationEneCorrections_fx, HrtfFastConv->fastconvReverberationEneCorrections_fx, CLDFB_NO_CHANNELS_MAX, Q31 - FASTCONV_factor_Q_reverberationTimes_fx );
#else
        Copy32( fastconvReverberationTimes_fx, HrtfFastConv->fastconvReverberationTimes_fx, CLDFB_NO_CHANNELS_MAX );
        Copy32( fastconvReverberationEneCorrections_fx, HrtfFastConv->fastconvReverberationEneCorrections_fx, CLDFB_NO_CHANNELS_MAX );
@@ -1404,7 +1434,11 @@ ivas_error ivas_rend_openCldfbRend(
    }

#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
    pCldfbRend->binaural_latency_ns = L_shr_r( Mpy_32_32_r( pCldfbRend->hHrtfFastConv->FASTCONV_latency_s_fx, (Word32) 1000000000 ), pCldfbRend->hHrtfFastConv->FASTCONV_latency_s_Q_fx );
#else
    pCldfbRend->binaural_latency_ns = Mult_32_32( pCldfbRend->hHrtfFastConv->FASTCONV_latency_s_fx, (Word32) 1000000000 );
#endif
#else
    pCldfbRend->binaural_latency_ns = (Word32) ( pCldfbRend->hHrtfFastConv->FASTCONV_HOA3_latency_s_fx * 1000000000 );
#endif
@@ -1546,7 +1580,12 @@ ivas_error ivas_binRenderer_open_fx(

        hBinRenderer->hoa_dec_mtx = st_ivas->hoa_dec_mtx;
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
        st_ivas->binaural_latency_ns = L_shr_r( Mpy_32_32_r( st_ivas->hHrtfFastConv->FASTCONV_latency_s_fx, (Word32) 1000000000 ), st_ivas->hHrtfFastConv->FASTCONV_latency_s_Q_fx );
#else
        st_ivas->binaural_latency_ns = st_ivas->hHrtfFastConv->FASTCONV_latency_s_fx;
        move32();
#endif
#else
        st_ivas->binaural_latency_ns = st_ivas->hHrtfFastConv->FASTCONV_BRIR_latency_s_fx;
#endif
@@ -1561,8 +1600,12 @@ ivas_error ivas_binRenderer_open_fx(
        }

#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef USE_FASTCONV_PARAMBIN_16BIT_ROM
        st_ivas->binaural_latency_ns = L_shr_r( Mpy_32_32_r( st_ivas->hHrtfFastConv->FASTCONV_latency_s_fx, (Word32) 1000000000 ), st_ivas->hHrtfFastConv->FASTCONV_latency_s_Q_fx );
#else
        st_ivas->binaural_latency_ns = st_ivas->hHrtfFastConv->FASTCONV_latency_s_fx;
        move32();
#endif
#else
        IF( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) )
        {
+3 −3
Original line number Diff line number Diff line
@@ -493,9 +493,9 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs_fx(
            }
        }

        Copy_Scale_sig_16_32_no_sat( parametricReverberationTimes_fx, hrtfParambin->parametricReverberationTimes_fx, CLDFB_NO_CHANNELS_MAX, Q26 - parametricReverberationTimes_factorQ_fx );                            /*Q26*/
        Copy_Scale_sig_16_32_no_sat( parametricReverberationEneCorrections_fx, hrtfParambin->parametricReverberationEneCorrections_fx, CLDFB_NO_CHANNELS_MAX, Q31 - parametricReverberationEneCorrections_factorQ_fx ); /*Q31*/
        Copy_Scale_sig_16_32_no_sat( parametricEarlyPartEneCorrection_fx, hrtfParambin->parametricEarlyPartEneCorrection_fx, CLDFB_NO_CHANNELS_MAX, Q28 - parametricEarlyPartEneCorrection_factorQ_fx );                /*Q28*/
        Copy_Scale_sig_16_32_r( parametricReverberationTimes_fx, hrtfParambin->parametricReverberationTimes_fx, CLDFB_NO_CHANNELS_MAX, Q26 - parametricReverberationTimes_factorQ_fx );                            /*Q26*/
        Copy_Scale_sig_16_32_r( parametricReverberationEneCorrections_fx, hrtfParambin->parametricReverberationEneCorrections_fx, CLDFB_NO_CHANNELS_MAX, Q31 - parametricReverberationEneCorrections_factorQ_fx ); /*Q31*/
        Copy_Scale_sig_16_32_r( parametricEarlyPartEneCorrection_fx, hrtfParambin->parametricEarlyPartEneCorrection_fx, CLDFB_NO_CHANNELS_MAX, Q28 - parametricEarlyPartEneCorrection_factorQ_fx );                /*Q28*/
#else
        FOR( i = 0; i < BINAURAL_CHANNELS; i++ )
        {
+9 −9
Original line number Diff line number Diff line
@@ -477,9 +477,9 @@ ivas_error ivas_HRTF_statistics_init(
                return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" );
            }
#ifdef USE_REVERB_16BIT_ROM
            Copy_Scale_sig_16_32_no_sat( defaultHRIR_left_avg_power_48kHz_fx, HrtfStatistics->average_energy_l_dyn, LR_IAC_LENGTH_NR_FC, Q28 - defaultHRIR_Q_48kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_no_sat( defaultHRIR_right_avg_power_48kHz_fx, HrtfStatistics->average_energy_r_dyn, LR_IAC_LENGTH_NR_FC, Q28 - defaultHRIR_Q_48kHz_fx ); /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_no_sat( defaultHRIR_coherence_48kHz_fx, HrtfStatistics->inter_aural_coherence_dyn, LR_IAC_LENGTH_NR_FC, Q26 - defaultHRIR_Q_48kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_r( defaultHRIR_left_avg_power_48kHz_fx, HrtfStatistics->average_energy_l_dyn, LR_IAC_LENGTH_NR_FC, Q28 - defaultHRIR_Q_48kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_r( defaultHRIR_right_avg_power_48kHz_fx, HrtfStatistics->average_energy_r_dyn, LR_IAC_LENGTH_NR_FC, Q28 - defaultHRIR_Q_48kHz_fx ); /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_r( defaultHRIR_coherence_48kHz_fx, HrtfStatistics->inter_aural_coherence_dyn, LR_IAC_LENGTH_NR_FC, Q26 - defaultHRIR_Q_48kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
#else
            floatToFixed_arr32( defaultHRIR_left_avg_power_48kHz_fx, HrtfStatistics->average_energy_l_dyn, Q28, LR_IAC_LENGTH_NR_FC );        /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            floatToFixed_arr32( defaultHRIR_right_avg_power_48kHz_fx, HrtfStatistics->average_energy_r_dyn, Q28, LR_IAC_LENGTH_NR_FC );       /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
@@ -506,9 +506,9 @@ ivas_error ivas_HRTF_statistics_init(
                return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" );
            }
#ifdef USE_REVERB_16BIT_ROM
            Copy_Scale_sig_16_32_no_sat( defaultHRIR_left_avg_power_32kHz_fx, HrtfStatistics->average_energy_l_dyn, LR_IAC_LENGTH_NR_FC, Q28 - defaultHRIR_Q_32kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_no_sat( defaultHRIR_right_avg_power_32kHz_fx, HrtfStatistics->average_energy_r_dyn, LR_IAC_LENGTH_NR_FC, Q28 - defaultHRIR_Q_32kHz_fx ); /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_no_sat( defaultHRIR_coherence_32kHz_fx, HrtfStatistics->inter_aural_coherence_dyn, LR_IAC_LENGTH_NR_FC, Q26 - defaultHRIR_Q_32kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_r( defaultHRIR_left_avg_power_32kHz_fx, HrtfStatistics->average_energy_l_dyn, LR_IAC_LENGTH_NR_FC, Q28 - defaultHRIR_Q_32kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_r( defaultHRIR_right_avg_power_32kHz_fx, HrtfStatistics->average_energy_r_dyn, LR_IAC_LENGTH_NR_FC, Q28 - defaultHRIR_Q_32kHz_fx ); /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_r( defaultHRIR_coherence_32kHz_fx, HrtfStatistics->inter_aural_coherence_dyn, LR_IAC_LENGTH_NR_FC, Q26 - defaultHRIR_Q_32kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
#else
            floatToFixed_arr32( defaultHRIR_left_avg_power_32kHz_fx, HrtfStatistics->average_energy_l_dyn, Q28, LR_IAC_LENGTH_NR_FC );        /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            floatToFixed_arr32( defaultHRIR_right_avg_power_32kHz_fx, HrtfStatistics->average_energy_r_dyn, Q28, LR_IAC_LENGTH_NR_FC );       /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
@@ -535,9 +535,9 @@ ivas_error ivas_HRTF_statistics_init(
                return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" );
            }
#ifdef USE_REVERB_16BIT_ROM
            Copy_Scale_sig_16_32_no_sat( defaultHRIR_left_avg_power_16kHz_fx, HrtfStatistics->average_energy_l_dyn, LR_IAC_LENGTH_NR_FC_16KHZ, Q28 - defaultHRIR_Q_16kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_no_sat( defaultHRIR_right_avg_power_16kHz_fx, HrtfStatistics->average_energy_r_dyn, LR_IAC_LENGTH_NR_FC_16KHZ, Q28 - defaultHRIR_Q_16kHz_fx ); /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_no_sat( defaultHRIR_coherence_16kHz_fx, HrtfStatistics->inter_aural_coherence_dyn, LR_IAC_LENGTH_NR_FC_16KHZ, Q26 - defaultHRIR_Q_16kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_r( defaultHRIR_left_avg_power_16kHz_fx, HrtfStatistics->average_energy_l_dyn, LR_IAC_LENGTH_NR_FC_16KHZ, Q28 - defaultHRIR_Q_16kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_r( defaultHRIR_right_avg_power_16kHz_fx, HrtfStatistics->average_energy_r_dyn, LR_IAC_LENGTH_NR_FC_16KHZ, Q28 - defaultHRIR_Q_16kHz_fx ); /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            Copy_Scale_sig_16_32_r( defaultHRIR_coherence_16kHz_fx, HrtfStatistics->inter_aural_coherence_dyn, LR_IAC_LENGTH_NR_FC_16KHZ, Q26 - defaultHRIR_Q_16kHz_fx );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
#else
            floatToFixed_arr32( defaultHRIR_left_avg_power_16kHz_fx, HrtfStatistics->average_energy_l_dyn, Q28, LR_IAC_LENGTH_NR_FC_16KHZ );  /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
            floatToFixed_arr32( defaultHRIR_right_avg_power_16kHz_fx, HrtfStatistics->average_energy_r_dyn, Q28, LR_IAC_LENGTH_NR_FC_16KHZ ); /* tables from which lr_energy_and_iac is updated has Q27 for i=2 */
Loading