Commit 552def96 authored by emerit's avatar emerit
Browse files

fix masa

parent 9fdbd693
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1562,7 +1562,7 @@ ivas_error ivas_binRenderer_open_fx(
    IF( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) && EQ_32( st_ivas->hIntSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) )
    {
#ifdef FIX_POINT_HRTF_FILE_FORMAT_REVERB
        IF( NE_32( error = ivas_binaural_reverb_init_fx( &( hBinRenderer->hReverb ), st_ivas->hHrtfStatistics, hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hDecoderConfig->output_Fs, st_ivas->hHrtfFastConv->fastconvReverberationTimes_fx, st_ivas->hHrtfFastConv->fastconvReverberationEneCorrections_fx ), IVAS_ERR_OK ) )
        IF( NE_32( error = ivas_binaural_reverb_init_fx( &( hBinRenderer->hReverb ), st_ivas->hHrtfStatistics, hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hDecoderConfig->output_Fs, st_ivas->hHrtfFastConv->fastconvReverberationTimes_fx, st_ivas->hHrtfFastConv->factor_Q_ReverberationTimes_fx, st_ivas->hHrtfFastConv->fastconvReverberationEneCorrections_fx, st_ivas->hHrtfFastConv->factor_Q_ReverberationEneCorrections_fx ), IVAS_ERR_OK ) )
#else
        IF( NE_32( ( error = ivas_binaural_reverb_open_fastconv_fx( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hIntSetup.output_config, st_ivas->hDecoderConfig->output_Fs, st_ivas->hHrtfFastConv ) ), IVAS_ERR_OK ) )
#endif
+3 −3
Original line number Diff line number Diff line
@@ -476,8 +476,8 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs_fx(
        {
            FOR( j = 0; j < HRTF_SH_CHANNELS; j++ )
            {
                Copy( hrtfShCoeffsRe_fx[i][j], hrtfParambin->hrtfShCoeffsRe_fx[i][j], HRTF_NUM_BINS );
                Copy( hrtfShCoeffsIm_fx[i][j], hrtfParambin->hrtfShCoeffsIm_fx[i][j], HRTF_NUM_BINS );
                Copy( hrtfShCoeffsRe_fx[i][j], hrtfParambin->hrtfShCoeffsRe_fx[i][j], HRTF_NUM_BINS ); /*Q14*/
                Copy( hrtfShCoeffsIm_fx[i][j], hrtfParambin->hrtfShCoeffsIm_fx[i][j], HRTF_NUM_BINS ); /*Q14*/
            }
        }
#ifdef FIX_1123_FASTCONV_PARAMBIN_16BIT_ROM
@@ -1485,7 +1485,7 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric
            }

#ifdef FIX_POINT_HRTF_FILE_FORMAT
            getDirectPartGains_fx( bin, aziDeg, eleDeg, &lRealp_fx, &lImagp_fx, &rRealp_fx, &rImagp_fx, hDiracDecBin->renderStereoOutputInsteadOfBinaural, Rmat_fx, &gainCache[gainCacheBaseIndex], isHeadtracked, *( hDiracDecBin->phHrtfParambin ) );
            getDirectPartGains_fx( bin, aziDeg, eleDeg, &lRealp_fx, &lImagp_fx, &rRealp_fx, &rImagp_fx, hDiracDecBin->renderStereoOutputInsteadOfBinaural, Rmat_fx, &gainCache[gainCacheBaseIndex], isHeadtracked, *hDiracDecBin->phHrtfParambin );
#else
            getDirectPartGains_fx( bin, aziDeg, eleDeg, &lRealp_fx, &lImagp_fx, &rRealp_fx, &rImagp_fx, hDiracDecBin->renderStereoOutputInsteadOfBinaural, Rmat_fx, &gainCache[gainCacheBaseIndex], isHeadtracked );
#endif
+3 −1
Original line number Diff line number Diff line
@@ -1370,7 +1370,9 @@ ivas_error ivas_binaural_reverb_init_fx(
    const int32_t sampling_rate,                          /* i  : sampling rate                        */
#ifdef FIX_1123_FASTCONV_PARAMBIN_16BIT_ROM
    const int16_t *defaultTimes,                            /* i  : default reverberation times          */
    const int16_t *defaultEne
    const int16_t factor_Q_reverbTimes,
    const int16_t *defaultEne,
    const int16_t factor_Q_enerComp
#else
    const int32_t *defaultTimes,                            /* i  : default reverberation times          */
    const int32_t *defaultEne
+7 −5
Original line number Diff line number Diff line
@@ -2494,7 +2494,9 @@ ivas_error ivas_binaural_reverb_init_fx(
    const int32_t sampling_rate,                          /* i  : sampling rate                        */
#ifdef FIX_1123_FASTCONV_PARAMBIN_16BIT_ROM
    const int16_t *defaultTimes, /* i  : default reverberation times          */
    const int16_t *defaultEne    /* i  : default reverberation energies       */
    const int16_t factor_Q_reverbTimes,
    const int16_t *defaultEne, /* i  : default reverberation energies       */
    const int16_t factor_Q_enerComp
#else
    const int32_t *defaultTimes, /* i  : default reverberation times          */
    const int32_t *defaultEne    /* i  : default reverberation energies       */
@@ -2531,8 +2533,8 @@ ivas_error ivas_binaural_reverb_init_fx(
#ifdef FIX_1123_FASTCONV_PARAMBIN_16BIT_ROM
        revTimes = t60;
        revEne = ene;
        Copy_Scale_sig_16_32_no_sat( defaultTimes, t60, CLDFB_NO_CHANNELS_MAX, 16 );
        Copy_Scale_sig_16_32_no_sat( defaultEne, ene, CLDFB_NO_CHANNELS_MAX, 16 );
        Copy_Scale_sig_16_32_no_sat( defaultTimes, t60, CLDFB_NO_CHANNELS_MAX, Q16 + ( Q15 - factor_Q_reverbTimes ) );
        Copy_Scale_sig_16_32_no_sat( defaultEne, ene, CLDFB_NO_CHANNELS_MAX, Q16 + ( Q15 - factor_Q_enerComp ) );
#else
        revTimes = defaultTimes;
        revEne = defaultEne;
@@ -2603,8 +2605,8 @@ ivas_error ivas_binaural_reverb_open_fastconv_fx(
#ifdef FIX_1123_FASTCONV_PARAMBIN_16BIT_ROM
        revTimes = t60;
        revEne = ene;
        Copy_Scale_sig_16_32_no_sat( hHrtfFastConv->fastconvReverberationTimes_fx, t60, CLDFB_NO_CHANNELS_MAX, 16 );
        Copy_Scale_sig_16_32_no_sat( hHrtfFastConv->fastconvReverberationEneCorrections_fx, ene, CLDFB_NO_CHANNELS_MAX, 16 );
        Copy_Scale_sig_16_32_no_sat( hHrtfFastConv->fastconvReverberationTimes_fx, t60, CLDFB_NO_CHANNELS_MAX, Q16 + ( Q15 - hHrtfFastConv->factor_Q_ReverberationTimes_fx ) );
        Copy_Scale_sig_16_32_no_sat( hHrtfFastConv->fastconvReverberationEneCorrections_fx, ene, CLDFB_NO_CHANNELS_MAX, Q16 + ( Q15 - hHrtfFastConv->factor_Q_ReverberationEneCorrections_fx ) );
#else
        revTimes = hHrtfFastConv->fastconvReverberationTimes_fx;        /*Q31*/
        revEne = hHrtfFastConv->fastconvReverberationEneCorrections_fx; /*Q31*/
+2 −6
Original line number Diff line number Diff line
@@ -195,7 +195,6 @@ static void ivas_reverb_set_energies(
        output_fc[freq_idx] = (float) ( ( 2 * freq_idx + 1 ) * cldfb_freq_halfstep );
    }

#ifdef IVAS_FLOAT_FIXED
    Word32 *input_fc_fx = (Word32 *) malloc( 60 * sizeof( Word32 * ) );
    Word32 *avg_pwr_left_fft_fx = (Word32 *) malloc( 60 * sizeof( Word32 * ) );
    Word32 *avg_pwr_right_fft_fx = (Word32 *) malloc( 60 * sizeof( Word32 * ) );
@@ -209,8 +208,8 @@ static void ivas_reverb_set_energies(
    for ( int i = 0; i < 60; i++ )
    {
        input_fc_fx[i] = (Word32) input_fc[i] * ( 1 << 16 );
        avg_pwr_left_fft_fx[i] = (Word32) ( avg_pwr_left_fft[i] ) * ONE_IN_Q26;
        avg_pwr_right_fft_fx[i] = (Word32) avg_pwr_right_fft[i] * ONE_IN_Q30;
        avg_pwr_left_fft_fx[i] = (Word32) ( L_shl( avg_pwr_left_fft[i], Q16 - ( Q15 - scalingFactor ) ) );
        avg_pwr_right_fft_fx[i] = (Word32) ( L_shl( avg_pwr_right_fft[i], Q16 - ( Q15 - scalingFactor ) ) );
    }

    for ( int i = 0; i < 257; i++ )
@@ -233,9 +232,6 @@ static void ivas_reverb_set_energies(
    free( avg_pwr_left_e );
    free( avg_pwr_right_fx );
    free( avg_pwr_right_e );
#else
    ivas_reverb_interpolate_acoustic_data( FFT_SPECTRUM_SIZE, input_fc, avg_pwr_left_fft, avg_pwr_right_fft, CLDFB_NO_CHANNELS_MAX, output_fc, avg_pwr_left, avg_pwr_right );
#endif
    return;
}
#else