Loading lib_dec/ivas_binRenderer_internal.c +17 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ static void ivas_binRenderer_filterModule_fx( outRealRight_fx = W_shr( outRealRight_fx, shift_q ); outImagRight_fx = W_shr( outImagRight_fx, shift_q ); #ifdef FIX_1123_FASTCONV_PARAMBIN_16BIT_ROM outRealLeft_fx = W_mac_32_32( outRealLeft_fx, filterStatesLeftRealPtr_fx[tapIdx], L_shl( filterTapsLeftRealPtr_fx[tapIdx], Q_filter ) ); outRealLeft_fx = W_mac_32_32( outRealLeft_fx, L_negate( filterStatesLeftImagPtr_fx[tapIdx] ), L_shl( filterTapsLeftImagPtr_fx[tapIdx], Q_filter ) ); // Q30 + Q_filterStates[tapIdx - 1] Loading @@ -122,7 +123,19 @@ static void ivas_binRenderer_filterModule_fx( outImagRight_fx = W_mac_32_32( outImagRight_fx, filterStatesLeftRealPtr_fx[tapIdx], L_shl( filterTapsRightImagPtr_fx[tapIdx], Q_filter ) ); outImagRight_fx = W_mac_32_32( outImagRight_fx, filterStatesLeftImagPtr_fx[tapIdx], L_shl( filterTapsRightRealPtr_fx[tapIdx], Q_filter ) ); #else outRealLeft_fx = W_mac_32_32( outRealLeft_fx, filterStatesLeftRealPtr_fx[tapIdx], filterTapsLeftRealPtr_fx[tapIdx] ); outRealLeft_fx = W_mac_32_32( outRealLeft_fx, L_negate( filterStatesLeftImagPtr_fx[tapIdx] ), filterTapsLeftImagPtr_fx[tapIdx] ); // Q30 + Q_filterStates[tapIdx - 1] outImagLeft_fx = W_mac_32_32( outImagLeft_fx, filterStatesLeftRealPtr_fx[tapIdx], filterTapsLeftImagPtr_fx[tapIdx] ); outImagLeft_fx = W_mac_32_32( outImagLeft_fx, filterStatesLeftImagPtr_fx[tapIdx], filterTapsLeftRealPtr_fx[tapIdx] ); outRealRight_fx = W_mac_32_32( outRealRight_fx, filterStatesLeftRealPtr_fx[tapIdx], filterTapsRightRealPtr_fx[tapIdx] ); outRealRight_fx = W_mac_32_32( outRealRight_fx, L_negate( filterStatesLeftImagPtr_fx[tapIdx] ), filterTapsRightImagPtr_fx[tapIdx] ); outImagRight_fx = W_mac_32_32( outImagRight_fx, filterStatesLeftRealPtr_fx[tapIdx], filterTapsRightImagPtr_fx[tapIdx] ); outImagRight_fx = W_mac_32_32( outImagRight_fx, filterStatesLeftImagPtr_fx[tapIdx], filterTapsRightRealPtr_fx[tapIdx] ); #endif Q_filterStates[tapIdx] = Q_filterStates[tapIdx - 1]; move16(); } Loading Loading @@ -452,7 +465,11 @@ static ivas_error ivas_binRenderer_convModuleOpen( { FOR( chIdx = 0; chIdx < hBinRenderer->nInChannels; chIdx++ ) { #ifdef FIX_POINT_HRTF_FILE_OPTIM Word16 tmp = chIdx; #else Word16 tmp = 0; #endif move16(); IF( isLoudspeaker ) Loading lib_rend/ivas_objectRenderer_mix.c +6 −0 Original line number Diff line number Diff line Loading @@ -425,19 +425,25 @@ static ivas_error DefaultBSplineModel_fx( SWITCH( output_Fs ) { case 48000: #ifdef FIX_TDREND_HRTF_FILE_FORMAT HrFiltSet_p->factor_Q_energy_fx = defaultHRIR_Q_48kHz_fx; #endif HrFiltSet_p->lr_energy_and_iac_fx[0] = defaultHRIR_left_avg_power_48kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[1] = defaultHRIR_right_avg_power_48kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[2] = defaultHRIR_coherence_48kHz_fx; // Q23 BREAK; case 32000: #ifdef FIX_TDREND_HRTF_FILE_FORMAT HrFiltSet_p->factor_Q_energy_fx = defaultHRIR_Q_32kHz_fx; #endif HrFiltSet_p->lr_energy_and_iac_fx[0] = defaultHRIR_left_avg_power_32kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[1] = defaultHRIR_right_avg_power_32kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[2] = defaultHRIR_coherence_32kHz_fx; // Q23 BREAK; case 16000: #ifdef FIX_TDREND_HRTF_FILE_FORMAT HrFiltSet_p->factor_Q_energy_fx = defaultHRIR_Q_16kHz_fx; #endif HrFiltSet_p->lr_energy_and_iac_fx[0] = defaultHRIR_left_avg_power_16kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[1] = defaultHRIR_right_avg_power_16kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[2] = defaultHRIR_coherence_16kHz_fx; // Q23 Loading lib_rend/lib_rend.c +16 −3 Original line number Diff line number Diff line Loading @@ -6765,10 +6765,15 @@ static ivas_error renderInputSba( SWITCH( outConfig ) { case IVAS_AUDIO_CONFIG_BINAURAL: #ifdef FIX_POINT_HRTF_FILE_FORMAT case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB: #endif error = renderSbaToBinaural( sbaInput, outConfig, outAudio ); BREAK; case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR: #ifndef FIX_POINT_HRTF_FILE_FORMAT case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB: #endif error = renderSbaToBinauralRoom( sbaInput, outConfig, outAudio ); BREAK; default: Loading Loading @@ -8081,14 +8086,19 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( static ivas_error ivas_masa_ext_rend_parambin_init( input_masa *inputMasa, /* i/o: MASA external renderer structure */ input_masa *inputMasa /* i/o: MASA external renderer structure */ #ifdef FIX_POINT_HRTF_FILE_FORMAT , const RENDER_CONFIG_DATA *hRendCfg, /* i : Renderer configuration data handle */ HRTFS_STATISTICS_HANDLE hHrtfStatistics /* i : HRTF statistics */ #endif ) { DIRAC_DEC_BIN_HANDLE hDiracDecBin; #ifdef FIX_POINT_HRTF_FILE_FORMAT HRTFS_PARAMBIN_HANDLE *phHrtfParambin; #else HRTFS_PARAMBIN_HANDLE hHrtfParambin; #endif Word16 nBins; Word32 output_Fs; Loading @@ -8107,8 +8117,11 @@ static ivas_error ivas_masa_ext_rend_parambin_init( error = IVAS_ERR_OK; move32(); #ifdef FIX_POINT_HRTF_FILE_FORMAT phHrtfParambin = inputMasa->hMasaExtRend->hHrtfParambin; #else hHrtfParambin = inputMasa->hMasaExtRend->hHrtfParambin; #endif /* Set common variables and defaults */ output_Fs = *( inputMasa->base.ctx.pOutSampleRate ); move32(); Loading Loading @@ -8243,7 +8256,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init( ( *phHrtfParambin )->parametricReverberationEneCorrections_fx, ( *phHrtfParambin )->factor_Q_reverberationEneCorrections_fx ), IVAS_ERR_OK ) ) #else IF( NE_32( ( error = ivas_binaural_reverb_open_parambin( &hDiracDecBin->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, output_Fs, *phHrtfParambin ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = ivas_binaural_reverb_open_parambin( &hDiracDecBin->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, output_Fs, hHrtfParambin ) ), IVAS_ERR_OK ) ) #endif { return error; Loading Loading
lib_dec/ivas_binRenderer_internal.c +17 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ static void ivas_binRenderer_filterModule_fx( outRealRight_fx = W_shr( outRealRight_fx, shift_q ); outImagRight_fx = W_shr( outImagRight_fx, shift_q ); #ifdef FIX_1123_FASTCONV_PARAMBIN_16BIT_ROM outRealLeft_fx = W_mac_32_32( outRealLeft_fx, filterStatesLeftRealPtr_fx[tapIdx], L_shl( filterTapsLeftRealPtr_fx[tapIdx], Q_filter ) ); outRealLeft_fx = W_mac_32_32( outRealLeft_fx, L_negate( filterStatesLeftImagPtr_fx[tapIdx] ), L_shl( filterTapsLeftImagPtr_fx[tapIdx], Q_filter ) ); // Q30 + Q_filterStates[tapIdx - 1] Loading @@ -122,7 +123,19 @@ static void ivas_binRenderer_filterModule_fx( outImagRight_fx = W_mac_32_32( outImagRight_fx, filterStatesLeftRealPtr_fx[tapIdx], L_shl( filterTapsRightImagPtr_fx[tapIdx], Q_filter ) ); outImagRight_fx = W_mac_32_32( outImagRight_fx, filterStatesLeftImagPtr_fx[tapIdx], L_shl( filterTapsRightRealPtr_fx[tapIdx], Q_filter ) ); #else outRealLeft_fx = W_mac_32_32( outRealLeft_fx, filterStatesLeftRealPtr_fx[tapIdx], filterTapsLeftRealPtr_fx[tapIdx] ); outRealLeft_fx = W_mac_32_32( outRealLeft_fx, L_negate( filterStatesLeftImagPtr_fx[tapIdx] ), filterTapsLeftImagPtr_fx[tapIdx] ); // Q30 + Q_filterStates[tapIdx - 1] outImagLeft_fx = W_mac_32_32( outImagLeft_fx, filterStatesLeftRealPtr_fx[tapIdx], filterTapsLeftImagPtr_fx[tapIdx] ); outImagLeft_fx = W_mac_32_32( outImagLeft_fx, filterStatesLeftImagPtr_fx[tapIdx], filterTapsLeftRealPtr_fx[tapIdx] ); outRealRight_fx = W_mac_32_32( outRealRight_fx, filterStatesLeftRealPtr_fx[tapIdx], filterTapsRightRealPtr_fx[tapIdx] ); outRealRight_fx = W_mac_32_32( outRealRight_fx, L_negate( filterStatesLeftImagPtr_fx[tapIdx] ), filterTapsRightImagPtr_fx[tapIdx] ); outImagRight_fx = W_mac_32_32( outImagRight_fx, filterStatesLeftRealPtr_fx[tapIdx], filterTapsRightImagPtr_fx[tapIdx] ); outImagRight_fx = W_mac_32_32( outImagRight_fx, filterStatesLeftImagPtr_fx[tapIdx], filterTapsRightRealPtr_fx[tapIdx] ); #endif Q_filterStates[tapIdx] = Q_filterStates[tapIdx - 1]; move16(); } Loading Loading @@ -452,7 +465,11 @@ static ivas_error ivas_binRenderer_convModuleOpen( { FOR( chIdx = 0; chIdx < hBinRenderer->nInChannels; chIdx++ ) { #ifdef FIX_POINT_HRTF_FILE_OPTIM Word16 tmp = chIdx; #else Word16 tmp = 0; #endif move16(); IF( isLoudspeaker ) Loading
lib_rend/ivas_objectRenderer_mix.c +6 −0 Original line number Diff line number Diff line Loading @@ -425,19 +425,25 @@ static ivas_error DefaultBSplineModel_fx( SWITCH( output_Fs ) { case 48000: #ifdef FIX_TDREND_HRTF_FILE_FORMAT HrFiltSet_p->factor_Q_energy_fx = defaultHRIR_Q_48kHz_fx; #endif HrFiltSet_p->lr_energy_and_iac_fx[0] = defaultHRIR_left_avg_power_48kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[1] = defaultHRIR_right_avg_power_48kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[2] = defaultHRIR_coherence_48kHz_fx; // Q23 BREAK; case 32000: #ifdef FIX_TDREND_HRTF_FILE_FORMAT HrFiltSet_p->factor_Q_energy_fx = defaultHRIR_Q_32kHz_fx; #endif HrFiltSet_p->lr_energy_and_iac_fx[0] = defaultHRIR_left_avg_power_32kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[1] = defaultHRIR_right_avg_power_32kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[2] = defaultHRIR_coherence_32kHz_fx; // Q23 BREAK; case 16000: #ifdef FIX_TDREND_HRTF_FILE_FORMAT HrFiltSet_p->factor_Q_energy_fx = defaultHRIR_Q_16kHz_fx; #endif HrFiltSet_p->lr_energy_and_iac_fx[0] = defaultHRIR_left_avg_power_16kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[1] = defaultHRIR_right_avg_power_16kHz_fx; // Q23 HrFiltSet_p->lr_energy_and_iac_fx[2] = defaultHRIR_coherence_16kHz_fx; // Q23 Loading
lib_rend/lib_rend.c +16 −3 Original line number Diff line number Diff line Loading @@ -6765,10 +6765,15 @@ static ivas_error renderInputSba( SWITCH( outConfig ) { case IVAS_AUDIO_CONFIG_BINAURAL: #ifdef FIX_POINT_HRTF_FILE_FORMAT case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB: #endif error = renderSbaToBinaural( sbaInput, outConfig, outAudio ); BREAK; case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR: #ifndef FIX_POINT_HRTF_FILE_FORMAT case IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB: #endif error = renderSbaToBinauralRoom( sbaInput, outConfig, outAudio ); BREAK; default: Loading Loading @@ -8081,14 +8086,19 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( static ivas_error ivas_masa_ext_rend_parambin_init( input_masa *inputMasa, /* i/o: MASA external renderer structure */ input_masa *inputMasa /* i/o: MASA external renderer structure */ #ifdef FIX_POINT_HRTF_FILE_FORMAT , const RENDER_CONFIG_DATA *hRendCfg, /* i : Renderer configuration data handle */ HRTFS_STATISTICS_HANDLE hHrtfStatistics /* i : HRTF statistics */ #endif ) { DIRAC_DEC_BIN_HANDLE hDiracDecBin; #ifdef FIX_POINT_HRTF_FILE_FORMAT HRTFS_PARAMBIN_HANDLE *phHrtfParambin; #else HRTFS_PARAMBIN_HANDLE hHrtfParambin; #endif Word16 nBins; Word32 output_Fs; Loading @@ -8107,8 +8117,11 @@ static ivas_error ivas_masa_ext_rend_parambin_init( error = IVAS_ERR_OK; move32(); #ifdef FIX_POINT_HRTF_FILE_FORMAT phHrtfParambin = inputMasa->hMasaExtRend->hHrtfParambin; #else hHrtfParambin = inputMasa->hMasaExtRend->hHrtfParambin; #endif /* Set common variables and defaults */ output_Fs = *( inputMasa->base.ctx.pOutSampleRate ); move32(); Loading Loading @@ -8243,7 +8256,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init( ( *phHrtfParambin )->parametricReverberationEneCorrections_fx, ( *phHrtfParambin )->factor_Q_reverberationEneCorrections_fx ), IVAS_ERR_OK ) ) #else IF( NE_32( ( error = ivas_binaural_reverb_open_parambin( &hDiracDecBin->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, output_Fs, *phHrtfParambin ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = ivas_binaural_reverb_open_parambin( &hDiracDecBin->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, output_Fs, hHrtfParambin ) ), IVAS_ERR_OK ) ) #endif { return error; Loading