Loading apps/renderer.c +4 −3 Original line number Diff line number Diff line Loading @@ -1009,11 +1009,12 @@ int main( } const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); Word32 nonDiegeticPanGain_fx = ( args.nonDiegeticPanGain == 1.0f ) ? ONE_IN_Q31 : ( args.nonDiegeticPanGain == -1.0f ) ? L_negate( ONE_IN_Q31 ) : (Word32) ( args.nonDiegeticPanGain * ( 1LL << Q31 ) ); #ifdef NONBE_FIX_BINARY_BINAURAL_READING if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, nonDiegeticPanGain_fx, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, nonDiegeticPanGain_fx, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); Loading lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ #define NONBE_FIX_949_MC_5MS_FRAMING /*Dlb: Issue 949: fix for 5ms framing/rendering in MC mode */ //#define SPLIT_REND_WITH_HEAD_ROT_NEW /* Orange: split rendering code differ between branchs main-pc and float-pc, do not know what to do/ #define NONBE_FIX_BINARY_BINAURAL_READING /* Orange: Add support for reading binaural binary file */ //#define NONBE_FIX_BINARY_BINAURAL_READING /* Orange: Add support for reading binaural binary file */ //#define USE_NEW_HRTF_BINARY_FILE_FORMAT /* Orange: to activate when decided to change the hrtf binary file format */ #ifdef USE_NEW_HRTF_BINARY_FILE_FORMAT #define FIX_638_ENERGIE_IAC_ROM_TABLES /* Orange: Missing left/right and coherence late reverb tables in binary format*/ Loading lib_rend/lib_rend.c +3 −3 Original line number Diff line number Diff line Loading @@ -1540,7 +1540,7 @@ static ivas_error setRendInputActiveIsm( #ifdef NONBE_FIX_BINARY_BINAURAL_READING IF( NE_32( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hrtfs->hSetOfHRTF, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ), IVAS_ERR_OK ) ) #else IF( NE_32( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ), IVAS_ERR_OK ) ) #endif #else #ifdef NONBE_FIX_BINARY_BINAURAL_READING Loading Loading @@ -2914,7 +2914,7 @@ static ivas_error setRendInputActiveMc( #ifdef NONBE_FIX_BINARY_BINAURAL_READING if ( hrtfs->hHrtfTD ) { inputMc->tdRendWrapper.binaural_latency_ns = (int32_t) ( hrtfs->hHrtfTD->latency_s_fx * 1000000000.f ); inputMc->tdRendWrapper.binaural_latency_ns = Mult_32_32( hrtfs->hHrtfTD->latency_s_fx, 1000000000 ); } inputMc->tdRendWrapper.hHrtfTD = &hrtfs->hHrtfTD; #else Loading Loading @@ -2945,7 +2945,7 @@ static ivas_error setRendInputActiveMc( #ifdef NONBE_FIX_BINARY_BINAURAL_READING if ( hrtfs->hHrtfTD ) { inputMc->splitTdRendWrappers[i].binaural_latency_ns = (int32_t) ( hrtfs->hHrtfTD->latency_s_fx * 1000000000.f ); inputMc->splitTdRendWrappers[i].binaural_latency_ns = Mult_32_32( hrtfs->hHrtfTD->latency_s_fx, 1000000000 ); } inputMc->splitTdRendWrappers[i].hHrtfTD = &hrtfs->hHrtfTD; #else Loading lib_util/hrtf_file_reader.c +31 −5 Original line number Diff line number Diff line Loading @@ -1144,6 +1144,18 @@ void destroy_td_hrtf( free( ( *hHrtf )->lr_energy_and_iac_dyn_fx[i] ); } } #ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB else { for ( i = 0; i < 3; i++ ) { if ( ( *hHrtf )->lr_energy_and_iac_dyn_fx[i] ) { free( ( *hHrtf )->lr_energy_and_iac_dyn_fx[i] ); } } } #endif ivas_HRTF_binary_close_fx( hHrtf ); Loading Loading @@ -1214,6 +1226,18 @@ ivas_error dealloc_HRTF_binary( free( hHrtf->lr_energy_and_iac_dyn_fx[i] ); } } #ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB else { for ( i = 0; i < 3; i++ ) { if ( ( *hHrtf )->lr_energy_and_iac_dyn_fx[i] ) { free( ( *hHrtf )->lr_energy_and_iac_dyn_fx[i] ); } } } #endif return error; } Loading Loading @@ -1690,11 +1714,6 @@ static ivas_error create_fastconv_HRTF_from_rawdata( f_tmp = *( (float *) ( hrtf_data_rptr ) ); ( *hHRTF )->FASTCONV_HOA2_latency_s_fx = (Word32) ( f_tmp * 1000000000 ); hrtf_data_rptr += sizeof( float ); if ( HOA2_CHANNELS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (HOA2_CHANNELS)" ); } hrtf_data_rptr += sizeof( uint16_t ); #if defined NONBE_FIX_BINARY_BINAURAL_READING && defined USE_NEW_HRTF_BINARY_FILE_FORMAT if ( BINAURAL_CONVBANDS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) Loading @@ -1703,6 +1722,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata( } hrtf_data_rptr += sizeof( uint16_t ); #endif if ( HOA2_CHANNELS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (HOA2_CHANNELS)" ); } hrtf_data_rptr += sizeof( uint16_t ); if ( BINAURAL_NTAPS_SBA != *( (uint16_t *) ( hrtf_data_rptr ) ) ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (BINAURAL_NTAPS_SBA)" ); Loading Loading
apps/renderer.c +4 −3 Original line number Diff line number Diff line Loading @@ -1009,11 +1009,12 @@ int main( } const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); Word32 nonDiegeticPanGain_fx = ( args.nonDiegeticPanGain == 1.0f ) ? ONE_IN_Q31 : ( args.nonDiegeticPanGain == -1.0f ) ? L_negate( ONE_IN_Q31 ) : (Word32) ( args.nonDiegeticPanGain * ( 1LL << Q31 ) ); #ifdef NONBE_FIX_BINARY_BINAURAL_READING if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, nonDiegeticPanGain_fx, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, nonDiegeticPanGain_fx, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); Loading
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ #define NONBE_FIX_949_MC_5MS_FRAMING /*Dlb: Issue 949: fix for 5ms framing/rendering in MC mode */ //#define SPLIT_REND_WITH_HEAD_ROT_NEW /* Orange: split rendering code differ between branchs main-pc and float-pc, do not know what to do/ #define NONBE_FIX_BINARY_BINAURAL_READING /* Orange: Add support for reading binaural binary file */ //#define NONBE_FIX_BINARY_BINAURAL_READING /* Orange: Add support for reading binaural binary file */ //#define USE_NEW_HRTF_BINARY_FILE_FORMAT /* Orange: to activate when decided to change the hrtf binary file format */ #ifdef USE_NEW_HRTF_BINARY_FILE_FORMAT #define FIX_638_ENERGIE_IAC_ROM_TABLES /* Orange: Missing left/right and coherence late reverb tables in binary format*/ Loading
lib_rend/lib_rend.c +3 −3 Original line number Diff line number Diff line Loading @@ -1540,7 +1540,7 @@ static ivas_error setRendInputActiveIsm( #ifdef NONBE_FIX_BINARY_BINAURAL_READING IF( NE_32( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hrtfs->hSetOfHRTF, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ), IVAS_ERR_OK ) ) #else IF( NE_32( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ), IVAS_ERR_OK ) ) #endif #else #ifdef NONBE_FIX_BINARY_BINAURAL_READING Loading Loading @@ -2914,7 +2914,7 @@ static ivas_error setRendInputActiveMc( #ifdef NONBE_FIX_BINARY_BINAURAL_READING if ( hrtfs->hHrtfTD ) { inputMc->tdRendWrapper.binaural_latency_ns = (int32_t) ( hrtfs->hHrtfTD->latency_s_fx * 1000000000.f ); inputMc->tdRendWrapper.binaural_latency_ns = Mult_32_32( hrtfs->hHrtfTD->latency_s_fx, 1000000000 ); } inputMc->tdRendWrapper.hHrtfTD = &hrtfs->hHrtfTD; #else Loading Loading @@ -2945,7 +2945,7 @@ static ivas_error setRendInputActiveMc( #ifdef NONBE_FIX_BINARY_BINAURAL_READING if ( hrtfs->hHrtfTD ) { inputMc->splitTdRendWrappers[i].binaural_latency_ns = (int32_t) ( hrtfs->hHrtfTD->latency_s_fx * 1000000000.f ); inputMc->splitTdRendWrappers[i].binaural_latency_ns = Mult_32_32( hrtfs->hHrtfTD->latency_s_fx, 1000000000 ); } inputMc->splitTdRendWrappers[i].hHrtfTD = &hrtfs->hHrtfTD; #else Loading
lib_util/hrtf_file_reader.c +31 −5 Original line number Diff line number Diff line Loading @@ -1144,6 +1144,18 @@ void destroy_td_hrtf( free( ( *hHrtf )->lr_energy_and_iac_dyn_fx[i] ); } } #ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB else { for ( i = 0; i < 3; i++ ) { if ( ( *hHrtf )->lr_energy_and_iac_dyn_fx[i] ) { free( ( *hHrtf )->lr_energy_and_iac_dyn_fx[i] ); } } } #endif ivas_HRTF_binary_close_fx( hHrtf ); Loading Loading @@ -1214,6 +1226,18 @@ ivas_error dealloc_HRTF_binary( free( hHrtf->lr_energy_and_iac_dyn_fx[i] ); } } #ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB else { for ( i = 0; i < 3; i++ ) { if ( ( *hHrtf )->lr_energy_and_iac_dyn_fx[i] ) { free( ( *hHrtf )->lr_energy_and_iac_dyn_fx[i] ); } } } #endif return error; } Loading Loading @@ -1690,11 +1714,6 @@ static ivas_error create_fastconv_HRTF_from_rawdata( f_tmp = *( (float *) ( hrtf_data_rptr ) ); ( *hHRTF )->FASTCONV_HOA2_latency_s_fx = (Word32) ( f_tmp * 1000000000 ); hrtf_data_rptr += sizeof( float ); if ( HOA2_CHANNELS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (HOA2_CHANNELS)" ); } hrtf_data_rptr += sizeof( uint16_t ); #if defined NONBE_FIX_BINARY_BINAURAL_READING && defined USE_NEW_HRTF_BINARY_FILE_FORMAT if ( BINAURAL_CONVBANDS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) Loading @@ -1703,6 +1722,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata( } hrtf_data_rptr += sizeof( uint16_t ); #endif if ( HOA2_CHANNELS != *( (uint16_t *) ( hrtf_data_rptr ) ) ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (HOA2_CHANNELS)" ); } hrtf_data_rptr += sizeof( uint16_t ); if ( BINAURAL_NTAPS_SBA != *( (uint16_t *) ( hrtf_data_rptr ) ) ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file not compliant (BINAURAL_NTAPS_SBA)" ); Loading