Loading apps/decoder.c +17 −3 Original line number Diff line number Diff line Loading @@ -160,7 +160,10 @@ typedef struct char *hrtfFileName; IVAS_DEC_HRTF_HANDLE *hHrtfTD; #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF; #endif IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics; IVAS_BIN_RENDERER_TYPE binaural_renderer; Loading Loading @@ -240,7 +243,9 @@ int main( #endif hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */ #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM hHrtfBinary.hSetOfHRTF = NULL; /* just to avoid compilation warning */ #endif hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */ splitRendBits.bits_buf = splitRendBitsBuf; Loading Loading @@ -3763,14 +3768,19 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfCrend ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfBinary->hSetOfHRTF ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); return error; } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = create_SetOfHRTF_from_binary( *hHrtfBinary->hSetOfHRTF, hHrtfBinary->hrtfReader, hHrtfBinary->hrtf_set_audio_cfg, output_Fs ) ) != IVAS_ERR_OK ) if ( ( error = load_Crend_HRTF_from_binary( *hHrtfCrend, hHrtfBinary->hrtfReader, hHrtfBinary->hrtf_set_audio_cfg, output_Fs ) ) != IVAS_ERR_OK ) #else if ( ( error = create_SetOfHRTF_from_binary( *hHrtfBinary->hSetOfHRTF, hHrtfBinary->hrtfReader, output_Fs ) ) != IVAS_ERR_OK ) #endif Loading @@ -3782,7 +3792,11 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( } else { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_crend_hrtf( hHrtfCrend ); #else destroy_SetOfHRTF( hHrtfBinary->hSetOfHRTF ); #endif } } } Loading apps/renderer.c +16 −2 Original line number Diff line number Diff line Loading @@ -665,7 +665,11 @@ int main( SplitRendBFIFileReader *splitRendBFIReader = NULL; Vector3PairFileReader *referenceVectorReader = NULL; hrtfFileReader *hrtfFileReader = NULL; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; #else IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; #endif IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; Loading Loading @@ -920,7 +924,11 @@ int main( } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hHrtfCrend ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hSetOfHRTF ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_Rend_GetHrtfCRendHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; Loading @@ -939,7 +947,7 @@ int main( hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR; } if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, hrtf_set_audio_cfg, args.sampleRate ) ) != IVAS_ERR_OK ) if ( ( error = load_Crend_HRTF_from_binary( *hHrtfCrend, hrtfFileReader, hrtf_set_audio_cfg, args.sampleRate ) ) != IVAS_ERR_OK ) #else if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK ) #endif Loading @@ -951,7 +959,11 @@ int main( } else { destroy_SetOfHRTF( hSetOfHRTF ); #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_crend_hrtf( hHrtfCrend ); #else destroy_crend_hrtf( hSetOfHRTF ); #endif } } Loading Loading @@ -1968,7 +1980,9 @@ cleanup: Vector3PairFileReader_close( &referenceVectorReader ); destroy_td_hrtf( hHrtfTD ); #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_SetOfHRTF( hSetOfHRTF ); #endif destroy_hrtf_statistics( hHrtfStatistics ); IVAS_REND_Close( &hIvasRend ); IsmPositionProvider_close( positionProvider ); Loading lib_com/common_api_types.h +4 −0 Original line number Diff line number Diff line Loading @@ -175,7 +175,11 @@ typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; typedef struct ivas_masa_decoder_ext_out_meta_struct *IVAS_MASA_DECODER_EXT_OUT_META_HANDLE; typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM typedef struct ivas_hrtf_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; #else typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; #endif typedef struct ivas_hrtfs_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE; typedef struct ivas_hrtfs_parambin_struct *IVAS_DEC_HRTF_PARAMBIN_HANDLE; typedef struct ivas_hrtfs_statistics_struct *IVAS_DEC_HRTF_STATISTICS_HANDLE; Loading lib_dec/ivas_init_dec.c +9 −1 Original line number Diff line number Diff line Loading @@ -2177,7 +2177,7 @@ ivas_error ivas_init_decoder( #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, 0, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) st_ivas->hRenderConfig, st_ivas->hHrtfCrend, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, 0, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) Loading Loading @@ -2661,7 +2661,11 @@ void ivas_initialize_handles_dec( st_ivas->hMonoDmxRenderer = NULL; st_ivas->hCrendWrapper = NULL; st_ivas->hReverb = NULL; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM st_ivas->hHrtfCrend = NULL; #else st_ivas->hSetOfHRTF = NULL; #endif st_ivas->hHrtfFastConv = NULL; st_ivas->hHrtfParambin = NULL; st_ivas->hHrtfStatistics = NULL; Loading Loading @@ -2879,7 +2883,11 @@ void ivas_destroy_dec( } /* CRend binaural renderer handle */ #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM ivas_HRTF_CRend_binary_close( &st_ivas->hHrtfCrend ); #else ivas_HRTF_CRend_binary_close( &st_ivas->hSetOfHRTF ); #endif /* Fastconv HRTF memories */ ivas_binaural_hrtf_close( &st_ivas->hHrtfFastConv ); Loading lib_dec/ivas_ism_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ static ivas_error ivas_ism_bitrate_switching_dec( /* Open Crend Binaural renderer */ #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, 0, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hRenderConfig, st_ivas->hHrtfCrend, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, 0, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #endif Loading Loading
apps/decoder.c +17 −3 Original line number Diff line number Diff line Loading @@ -160,7 +160,10 @@ typedef struct char *hrtfFileName; IVAS_DEC_HRTF_HANDLE *hHrtfTD; #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF; #endif IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics; IVAS_BIN_RENDERER_TYPE binaural_renderer; Loading Loading @@ -240,7 +243,9 @@ int main( #endif hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */ #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM hHrtfBinary.hSetOfHRTF = NULL; /* just to avoid compilation warning */ #endif hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */ splitRendBits.bits_buf = splitRendBitsBuf; Loading Loading @@ -3763,14 +3768,19 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfCrend ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfBinary->hSetOfHRTF ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); return error; } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = create_SetOfHRTF_from_binary( *hHrtfBinary->hSetOfHRTF, hHrtfBinary->hrtfReader, hHrtfBinary->hrtf_set_audio_cfg, output_Fs ) ) != IVAS_ERR_OK ) if ( ( error = load_Crend_HRTF_from_binary( *hHrtfCrend, hHrtfBinary->hrtfReader, hHrtfBinary->hrtf_set_audio_cfg, output_Fs ) ) != IVAS_ERR_OK ) #else if ( ( error = create_SetOfHRTF_from_binary( *hHrtfBinary->hSetOfHRTF, hHrtfBinary->hrtfReader, output_Fs ) ) != IVAS_ERR_OK ) #endif Loading @@ -3782,7 +3792,11 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( } else { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_crend_hrtf( hHrtfCrend ); #else destroy_SetOfHRTF( hHrtfBinary->hSetOfHRTF ); #endif } } } Loading
apps/renderer.c +16 −2 Original line number Diff line number Diff line Loading @@ -665,7 +665,11 @@ int main( SplitRendBFIFileReader *splitRendBFIReader = NULL; Vector3PairFileReader *referenceVectorReader = NULL; hrtfFileReader *hrtfFileReader = NULL; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; #else IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; #endif IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; Loading Loading @@ -920,7 +924,11 @@ int main( } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hHrtfCrend ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hSetOfHRTF ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_Rend_GetHrtfCRendHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; Loading @@ -939,7 +947,7 @@ int main( hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR; } if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, hrtf_set_audio_cfg, args.sampleRate ) ) != IVAS_ERR_OK ) if ( ( error = load_Crend_HRTF_from_binary( *hHrtfCrend, hrtfFileReader, hrtf_set_audio_cfg, args.sampleRate ) ) != IVAS_ERR_OK ) #else if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK ) #endif Loading @@ -951,7 +959,11 @@ int main( } else { destroy_SetOfHRTF( hSetOfHRTF ); #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_crend_hrtf( hHrtfCrend ); #else destroy_crend_hrtf( hSetOfHRTF ); #endif } } Loading Loading @@ -1968,7 +1980,9 @@ cleanup: Vector3PairFileReader_close( &referenceVectorReader ); destroy_td_hrtf( hHrtfTD ); #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_SetOfHRTF( hSetOfHRTF ); #endif destroy_hrtf_statistics( hHrtfStatistics ); IVAS_REND_Close( &hIvasRend ); IsmPositionProvider_close( positionProvider ); Loading
lib_com/common_api_types.h +4 −0 Original line number Diff line number Diff line Loading @@ -175,7 +175,11 @@ typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; typedef struct ivas_masa_decoder_ext_out_meta_struct *IVAS_MASA_DECODER_EXT_OUT_META_HANDLE; typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM typedef struct ivas_hrtf_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; #else typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; #endif typedef struct ivas_hrtfs_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE; typedef struct ivas_hrtfs_parambin_struct *IVAS_DEC_HRTF_PARAMBIN_HANDLE; typedef struct ivas_hrtfs_statistics_struct *IVAS_DEC_HRTF_STATISTICS_HANDLE; Loading
lib_dec/ivas_init_dec.c +9 −1 Original line number Diff line number Diff line Loading @@ -2177,7 +2177,7 @@ ivas_error ivas_init_decoder( #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, 0, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) st_ivas->hRenderConfig, st_ivas->hHrtfCrend, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, 0, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) Loading Loading @@ -2661,7 +2661,11 @@ void ivas_initialize_handles_dec( st_ivas->hMonoDmxRenderer = NULL; st_ivas->hCrendWrapper = NULL; st_ivas->hReverb = NULL; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM st_ivas->hHrtfCrend = NULL; #else st_ivas->hSetOfHRTF = NULL; #endif st_ivas->hHrtfFastConv = NULL; st_ivas->hHrtfParambin = NULL; st_ivas->hHrtfStatistics = NULL; Loading Loading @@ -2879,7 +2883,11 @@ void ivas_destroy_dec( } /* CRend binaural renderer handle */ #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM ivas_HRTF_CRend_binary_close( &st_ivas->hHrtfCrend ); #else ivas_HRTF_CRend_binary_close( &st_ivas->hSetOfHRTF ); #endif /* Fastconv HRTF memories */ ivas_binaural_hrtf_close( &st_ivas->hHrtfFastConv ); Loading
lib_dec/ivas_ism_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ static ivas_error ivas_ism_bitrate_switching_dec( /* Open Crend Binaural renderer */ #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, 0, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hRenderConfig, st_ivas->hHrtfCrend, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, 0, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, ( st_ivas->hSplitBinRend == NULL ) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses ) ) != IVAS_ERR_OK ) #endif Loading