diff --git a/apps/decoder.c b/apps/decoder.c index a44fce5690b789d77d466ad2ce1b3bb76483ccac..6193913e17ba56289cfb088c0e77465e164770f6 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -93,10 +93,8 @@ typedef struct float FER; bool hrtfReaderEnabled; char *hrtfFileName; -#ifdef HRTF_BINARY_FILE bool hrtfCRendReaderEnabled; char *hrtfCRendFileName; -#endif IVAS_DEC_INPUT_FORMAT inputFormat; bool customLsOutputEnabled; char *customLsSetupFilename; @@ -445,7 +443,6 @@ int main( goto cleanup; } -#ifdef HRTF_BINARY_FILE IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF; IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); @@ -471,7 +468,6 @@ int main( { fprintf( stderr, "\nError in loading HRTF binary file %s for parametric binauralizer \n\n", arg.hrtfCRendFileName ); } -#endif } /*-----------------------------------------------------------------* @@ -538,12 +534,10 @@ cleanup: IVAS_DEC_HRTF_HANDLE hHrtfTD; IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); dealloc_HRTF_binary( hHrtfTD ); -#ifdef HRTF_BINARY_FILE #ifdef FIX_MEMORY_COUNTING_HRTF_BINARY_FILE IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF; IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); destroy_SetOfHRTF( hSetOfHRTF ); -#endif #endif } IVAS_DEC_Close( &hIvasDec ); @@ -706,10 +700,8 @@ static bool parseCmdlIVAS_dec( arg->hrtfReaderEnabled = false; arg->hrtfFileName = NULL; -#ifdef HRTF_BINARY_FILE arg->hrtfCRendReaderEnabled = false; arg->hrtfCRendFileName = NULL; -#endif arg->customLsOutputEnabled = false; arg->customLsSetupFilename = NULL; @@ -1147,11 +1139,7 @@ static void usage_dec( void ) fprintf( stdout, " which of the two supported formats is in use.\n" ); fprintf( stdout, " default bitstream file format is G.192\n" ); fprintf( stdout, "-T File : Head rotation specified by external trajectory File\n" ); -#ifdef HRTF_BINARY_FILE fprintf( stdout, "-hrtf File : HRTF filter File used in BINAURAL output configuration\n" ); -#else - fprintf( stdout, "-hrtf File : HRTF filter File used in ISm format and BINAURAL output configuration\n" ); -#endif #ifdef DEBUGGING fprintf( stdout, "-force_subframe_bin : Forces parametric binauralizer code to use 5 ms time resolution even when\n" ); fprintf( stdout, " output time resolution is larger.\n" ); diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index a24e03f248de30a26ddda7320f1287a19d81ccd4..2a15165be0d244dcbeb7d8c4dfbab3ff57fb1252 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -87,14 +87,10 @@ typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; typedef struct ivas_masa_qmetadata_frame_struct *IVAS_MASA_QMETADATA_HANDLE; typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE; -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; -#endif -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE; typedef struct ivas_hrtfs_parambin_struct *IVAS_DEC_HRTF_PARAMBIN_HANDLE; -#endif #ifdef DEBUGGING typedef enum diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 30fd4d97b023e70228dc86a87d6c7b932fce1bab..c6e981ef7dfd9c38324fa5148692a9f75f034d4a 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -1364,16 +1364,12 @@ typedef enum #define BINAURAL_MAXBANDS 60 /* Max number of bands */ #define BINAURAL_CONVBANDS 50 /* Bands upto which convolution is performed */ -#ifdef HRTF_BINARY_FILE #define BINAURAL_NTAPS 7 -#endif #define BINAURAL_NTAPS_MAX 96 #define HRTF_SH_ORDER 3 #define HRTF_SH_CHANNELS 16 -#ifdef HRTF_BINARY_FILE #define HRTF_LS_CHANNELS 15 -#endif #define HRTF_NUM_BINS 60 #define REVERB_PREDELAY_MAX 20 /* Max input delay for reverb module */ #define GAIN_LFE 1.88364911f /* Gain applied to LFE during renderering */ @@ -1382,7 +1378,6 @@ typedef enum #define BINAURAL_COHERENCE_DIFFERENCE_BINS 9 /* Number of bins for direction-dependent diffuse-field binaural coherence */ -#ifdef HRTF_BINARY_FILE typedef enum { BINAURAL_INPUT_AUDIO_CONFIG_INVALID, @@ -1392,7 +1387,6 @@ typedef enum } BINAURAL_INPUT_AUDIO_CONFIG; -#endif #define HEADROT_ORDER 3 #define HEADROT_SHMAT_DIM ( ( HEADROT_ORDER + 1 ) * ( HEADROT_ORDER + 1 ) ) #define HEADROT_SHMAT_DIM2 ( HEADROT_SHMAT_DIM * HEADROT_SHMAT_DIM ) @@ -1415,16 +1409,9 @@ typedef enum #define SFX_SPAT_BIN_NUM_SUBSAMPLES 64 #define ITD_MEM_LEN (MAX_ITD + SFX_SPAT_BIN_SINC_M) #define L_SUBFRAME5MS_48k (L_FRAME48k/4) -#ifdef FIX_337_TDREND_INTP #define MAX_ANGULAR_STEP (1.0f) -#else -#define MAX_ANGULAR_STEP (15.0f) -#endif #define MAX_ANGULAR_STEP_INV ( 1.0f / MAX_ANGULAR_STEP ) #define MAX_INTERPOLATION_STEPS 12 -#ifndef FIX_310_TD_REND_DELAY -#define BINAURAL_TD_LATENCY_S 0.0f /* ITD fix removes TD renderer delay -- should be cleaned out */ -#endif /* ----- Enums - TD Renderer ----- */ diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 9810ad87e0f6a8b6c497477b13d0c6c990634707..5645b8e9bf46fa6b5903314d7975da46e8f52d1f 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3333,26 +3333,18 @@ void ivas_dirac_dec( const int16_t i_sf ); -#ifdef HRTF_BINARY_FILE ivas_error ivas_dirac_dec_init_binaural_data( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : HRTF structure for rendering */ ); -#else -ivas_error ivas_dirac_dec_init_binaural_data( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ -); -#endif void ivas_dirac_dec_close_binaural_data( DIRAC_DEC_BIN_HANDLE *hBinaural /* i/o: decoder DirAC binaural data handle */ ); -#ifdef HRTF_BINARY_FILE ivas_error ivas_dirac_dec_binaural_copy_hrtfs( HRTFS_PARAMBIN_HANDLE *hHrtfParambin /* i/o: HRTF structure for rendering */ ); -#endif void ivas_dirac_dec_binaural( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ @@ -3368,11 +3360,9 @@ ivas_error ivas_binaural_reverb_open( const AUDIO_CONFIG output_config, /* i : output audio configuration */ const int32_t sampling_rate, /* i : sampling rate */ const RENDERER_TYPE renderer_type /* i : renderer type */ -#ifdef HRTF_BINARY_FILE , const HRTFS_FASTCONV_HANDLE hHrtfFastConv, /* i : FastConv HRTF handle */ const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ -#endif ); void ivas_binaural_reverb_close( @@ -4652,7 +4642,6 @@ void ivas_binaural_add_LFE( float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ ); -#ifdef HRTF_BINARY_FILE ivas_error ivas_HRTF_fastconv_binary_open( HRTFS_FASTCONV **hHrtfFastConv /* i/o: FASTCONV HRTF structure */ ); @@ -4668,7 +4657,6 @@ ivas_error ivas_HRTF_parambin_binary_open( void ivas_HRTF_parambin_binary_close( HRTFS_PARAMBIN **hHrtfParambin /* i/o: Parametric binauralizer HRTF structure */ ); -#endif void QuatToRotMat( const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ @@ -5387,7 +5375,6 @@ int16_t ivas_get_num_bands_from_bw_idx( * Crend renderer *----------------------------------------------------------------------------------*/ -#ifdef HRTF_BINARY_FILE ivas_error ivas_HRTF_CRend_binary_open( HRTFS_CREND **hSetOfHRTF /* i/o: Set of HRTF handle */ @@ -5414,7 +5401,6 @@ ivas_error destroy_SetOfHRTF( ); #endif -#endif #ifndef FIX_197_CREND_INTERFACE @@ -5452,9 +5438,7 @@ ivas_error ivas_rend_initCrend( const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ); ivas_error ivas_rend_openCrend( @@ -5463,9 +5447,7 @@ ivas_error ivas_rend_openCrend( const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, int16_t Opt_Headrotation, -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ); #ifdef FIX_197_CREND_INTERFACE @@ -5671,9 +5653,7 @@ void ivas_reverb_calc_color_levels( void ivas_reverb_prepare_cldfb_params( ivas_roomAcoustics_t *pInput_params, -#ifdef HRTF_BINARY_FILE const HRTFS_FASTCONV_HANDLE hHrtfFastConv, -#endif const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t output_Fs, diff --git a/lib_com/options.h b/lib_com/options.h index 93a53b1ecbab3a32fe373e3cf1413b604e06ce5f..93bf718c7e0fe2ff7240f0898afc88dcd83b25c6 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -147,17 +147,10 @@ #define SBA_BR_SWITCHING_RECONFIG /* Issue 114: Changes for SBA bitrate switching with reconfiguration for bitrates with different number of transport channels*/ #endif -#define FIX_FIX_I59 /* Issue 59: small fix concerning LFE delay rounding */ -#define HRTF_BINARY_FILE /* HRTF filters' binary file used for binaural rendering. */ #define FIX_197_CREND_INTERFACE -#define FIX_301_PLC /* FhG: issue 301 - fix bug of missing update of overlap buffer for DFT-stereo PLC*/ -#define FIX_337_TDREND_INTP /* Issue 337: TD renderer interpolation threshold set too low */ -#ifdef HRTF_BINARY_FILE /* HRTF filters' binary file used for binaural rendering. */ #define FIX_MEMORY_COUNTING_HRTF_BINARY_FILE -#endif -#define FIX_310_TD_REND_DELAY /* Adding HRTF delay being read from ROM/Binary file, fix rounding for delay compensation in renderer */ #define FIX_334_DEBUG_BE_STEREO_SWITCHING /* FhG: Fix non-BE issue for stereo switching when DEBUGGING is enabled */ #define FIX_198_TDREND_INTERFACE /* Issue 198: Harmonize interface for TD renderer between decoder and external renderer */ diff --git a/lib_dec/core_dec_init.c b/lib_dec/core_dec_init.c index 6787968270787e0301314f5eb564ed8e1f3d273f..1e238fb52f1603f5638fa7ece5dce5031f73a830 100644 --- a/lib_dec/core_dec_init.c +++ b/lib_dec/core_dec_init.c @@ -279,11 +279,7 @@ void open_decoder_LPD( st->last_core_bfi = ACELP_CORE; } -#ifdef FIX_301_PLC if ( ( ( st->element_mode != IVAS_CPE_DFT ) || ( st->element_mode == IVAS_CPE_DFT && st->prev_bfi ) ) && st->last_codec_mode == MODE1 && st->last_core == ACELP_CORE ) -#else - if ( st->element_mode != IVAS_CPE_DFT && st->last_codec_mode == MODE1 && st->last_core == ACELP_CORE ) -#endif { /* Switching from Mode 1 ACELP */ st->last_core_bfi = ACELP_CORE; diff --git a/lib_dec/ivas_dirac_dec_binaural_functions.c b/lib_dec/ivas_dirac_dec_binaural_functions.c index 7cdd0cc12778250979c9d1075106d3ec02ac1d1d..4d6f8e4d288c3d25e12cf0af9819260229aaa58e 100644 --- a/lib_dec/ivas_dirac_dec_binaural_functions.c +++ b/lib_dec/ivas_dirac_dec_binaural_functions.c @@ -86,16 +86,10 @@ static void matrixTransp2Mul( float Are[BINAURAL_CHANNELS][BINAURAL_CHANNELS], f * Initialize parametric binaural renderer *------------------------------------------------------------------------*/ -#ifdef HRTF_BINARY_FILE ivas_error ivas_dirac_dec_init_binaural_data( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : HRTF structure for rendering */ ) -#else -ivas_error ivas_dirac_dec_init_binaural_data( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ -) -#endif { DIRAC_DEC_BIN_HANDLE hBinaural; int16_t nBins; @@ -202,11 +196,7 @@ ivas_error ivas_dirac_dec_init_binaural_data( } else if ( renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) /* Indication of binaural rendering with room effect */ { -#ifdef HRTF_BINARY_FILE mvr2r( hHrtfParambin->parametricEarlyPartEneCorrection, hBinaural->earlyPartEneCorrection, nBins ); -#else - mvr2r( parametricEarlyPartEneCorrection, hBinaural->earlyPartEneCorrection, nBins ); -#endif /* reconfiguration needed when Reverb. parameters are changed -> close and open the handle again */ if ( hBinaural->hReverb != NULL && ( ( hBinaural->hReverb->numBins != nBins ) || @@ -220,7 +210,6 @@ ivas_error ivas_dirac_dec_init_binaural_data( { if ( hBinaural->useSubframeMode ) { -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, @@ -229,16 +218,12 @@ ivas_error ivas_dirac_dec_init_binaural_data( RENDERER_BINAURAL_PARAMETRIC_ROOM, st_ivas->hHrtfFastConv, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, st_ivas->hIntSetup.output_config, output_Fs, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) != IVAS_ERR_OK ) -#endif { return error; } } else { -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, CLDFB_NO_COL_MAX, @@ -248,9 +233,6 @@ ivas_error ivas_dirac_dec_init_binaural_data( RENDERER_BINAURAL_PARAMETRIC_ROOM, st_ivas->hHrtfFastConv, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, CLDFB_NO_COL_MAX, NULL, st_ivas->hIntSetup.output_config, output_Fs, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -330,7 +312,6 @@ void ivas_dirac_dec_close_binaural_data( return; } -#ifdef HRTF_BINARY_FILE /*------------------------------------------------------------------------- * ivas_dirac_dec_binaural_copy_hrtfs() * @@ -376,7 +357,6 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs( return IVAS_ERR_OK; } -#endif /*------------------------------------------------------------------------- * ivas_dirac_dec_binaural() diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 3acc858727161c5c1cf93c8adffe2623a121aeff..dd094892e3694f5ef90b20e6fcbc74c4f03344f5 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -614,7 +614,6 @@ ivas_error ivas_init_decoder_front( { return error; } -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_HRTF_CRend_binary_open( &( st_ivas->hSetOfHRTF ) ) ) != IVAS_ERR_OK ) { return error; @@ -629,7 +628,6 @@ ivas_error ivas_init_decoder_front( { return error; } -#endif } /*-------------------------------------------------------------------* @@ -1185,7 +1183,6 @@ ivas_error ivas_init_decoder( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef HRTF_BINARY_FILE if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) @@ -1198,12 +1195,6 @@ ivas_error ivas_init_decoder( { return error; } -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { @@ -1261,9 +1252,7 @@ ivas_error ivas_init_decoder( getRendAudioConfigFromIvasAudioConfig( st_ivas->intern_config ), getRendAudioConfigFromIvasAudioConfig( st_ivas->hDecoderConfig->output_config ), st_ivas->hRenderConfig, st_ivas->hDecoderConfig->Opt_Headrotation, -#ifdef HRTF_BINARY_FILE st_ivas->hSetOfHRTF, -#endif st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; @@ -1589,11 +1578,9 @@ void ivas_initialize_handles_dec( st_ivas->hCrend = NULL; st_ivas->hHrtf = NULL; #endif -#ifdef HRTF_BINARY_FILE st_ivas->hSetOfHRTF = NULL; st_ivas->hHrtfFastConv = NULL; st_ivas->hHrtfParambin = NULL; -#endif st_ivas->hoa_dec_mtx = NULL; st_ivas->hHeadTrackData = NULL; @@ -1801,7 +1788,6 @@ void ivas_destroy_dec( ivas_HRTF_binary_close( &st_ivas->hHrtfTD ); } -#ifdef HRTF_BINARY_FILE /* CRend binaural renderer handle */ if ( st_ivas->hSetOfHRTF != NULL ) { @@ -1822,7 +1808,6 @@ void ivas_destroy_dec( { ivas_HRTF_parambin_binary_close( &st_ivas->hHrtfParambin ); } -#endif /* Config. Renderer */ ivas_render_config_close( &( st_ivas->hRenderConfig ) ); @@ -2106,7 +2091,6 @@ static ivas_error doSanityChecks_IVAS( } #endif -#ifdef HRTF_BINARY_FILE #ifdef DEBUGGING if ( ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) ) { @@ -2114,18 +2098,6 @@ static ivas_error doSanityChecks_IVAS( } #endif -#else - -#ifdef DEBUGGING - if ( ( st_ivas->hDecoderConfig->Opt_HRTF_binary || st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) ) -#else - if ( st_ivas->hDecoderConfig->Opt_HRTF_binary && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) ) ) -#endif - { - return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration: Time Domain object renderer not supported in this configuration" ); - } - -#endif #ifdef DEBUGGING if ( ( st_ivas->hHrtfTD != NULL && st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) ) diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 2b6d0b687665f9404f4b7498dd04cd2232b16dd0..f2f008ff376d28c7ba1f4d0b3fa772df42a493b7 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1091,9 +1091,7 @@ static ivas_error ivas_ism_bitrate_switching( getRendAudioConfigFromIvasAudioConfig( st_ivas->hOutSetup.output_config ), st_ivas->hRenderConfig, st_ivas->hDecoderConfig->Opt_Headrotation, -#ifdef HRTF_BINARY_FILE st_ivas->hSetOfHRTF, -#endif st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; @@ -1115,12 +1113,8 @@ static ivas_error ivas_ism_bitrate_switching( if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL ) { /* open the parametric binaural renderer */ -#ifdef HRTF_BINARY_FILE ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ); ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ); -#else - ivas_dirac_dec_init_binaural_data( st_ivas ); -#endif /* Close the TD Binaural renderer */ if ( st_ivas->hBinRendererTd != NULL ) @@ -1146,12 +1140,8 @@ static ivas_error ivas_ism_bitrate_switching( if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM ) { /* open the parametric binaural renderer */ -#ifdef HRTF_BINARY_FILE ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ); ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ); -#else - ivas_dirac_dec_init_binaural_data( st_ivas ); -#endif /* close the crend binaural renderer */ #ifdef FIX_197_CREND_INTERFACE diff --git a/lib_dec/ivas_lfe_dec.c b/lib_dec/ivas_lfe_dec.c index 1487a279718daee3f640816a2256d1e1a0109a0a..55a68d892ba73518aaad01b8ba2e7c8ea9f569c1 100644 --- a/lib_dec/ivas_lfe_dec.c +++ b/lib_dec/ivas_lfe_dec.c @@ -437,11 +437,7 @@ ivas_error ivas_create_lfe_dec( lfe_addl_delay_s = block_offset_s - hLFE->lfe_block_delay_s; lfe_addl_delay_s = max( 0.0f, lfe_addl_delay_s ); -#ifdef FIX_FIX_I59 add_delay_sa = (int16_t) roundf( (float) binauralization_delay_ns * output_Fs / 1000000000.f ); -#else - add_delay_sa = NS2SA( output_Fs, binauralization_delay_ns + 0.5f ); -#endif hLFE->lfe_addl_delay = (int16_t) ( lfe_addl_delay_s * output_Fs ) + add_delay_sa; hLFE->lfe_block_delay_s += lfe_addl_delay_s + add_delay_sa / output_Fs; diff --git a/lib_dec/ivas_mcmasa_dec.c b/lib_dec/ivas_mcmasa_dec.c index 3af2ea2c3b3558ccd3e7b2f32b6dc4a41c5b300a..748f665dce2437936de078aeb0f238ed23a8e91a 100644 --- a/lib_dec/ivas_mcmasa_dec.c +++ b/lib_dec/ivas_mcmasa_dec.c @@ -109,7 +109,6 @@ ivas_error ivas_mcmasa_dec_reconfig( if ( st_ivas->hDiracDecBin == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) { /* open parametric binaural renderer */ -#ifdef HRTF_BINARY_FILE if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) @@ -119,9 +118,6 @@ ivas_error ivas_mcmasa_dec_reconfig( } if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -140,11 +136,7 @@ ivas_error ivas_mcmasa_dec_reconfig( { /* st_ivas->hDiracDecBin->useTdDecorr will change => close and re-open. */ ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index f05d5d1ec5845ad87f2186057d9544512589a7c6..9c8e6407841d1cf2415f332ab4a5855c76797f82 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1095,11 +1095,7 @@ static ivas_error ivas_mc_dec_reconfig( /* useTdDecorr may change => close and re-open */ ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -1116,7 +1112,6 @@ static ivas_error ivas_mc_dec_reconfig( } else if ( st_ivas->hDiracDecBin == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) ) { -#ifdef HRTF_BINARY_FILE if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) @@ -1126,9 +1121,6 @@ static ivas_error ivas_mc_dec_reconfig( } if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -1169,9 +1161,7 @@ static ivas_error ivas_mc_dec_reconfig( getRendAudioConfigFromIvasAudioConfig( st_ivas->intern_config ), getRendAudioConfigFromIvasAudioConfig( st_ivas->hDecoderConfig->output_config ), st_ivas->hRenderConfig, st_ivas->hDecoderConfig->Opt_Headrotation, -#ifdef HRTF_BINARY_FILE st_ivas->hSetOfHRTF, -#endif st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index ec6ddf039fc8f39dc40c082270d790e9fd2d7910..005aea5555f58070542db46d6fe9ebddcf6a1c8d 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -444,7 +444,6 @@ ivas_error ivas_sba_dec_reinit( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef HRTF_BINARY_FILE if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) @@ -457,12 +456,6 @@ ivas_error ivas_sba_dec_reinit( { return error; } -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { @@ -509,9 +502,7 @@ ivas_error ivas_sba_dec_reinit( getRendAudioConfigFromIvasAudioConfig( st_ivas->hDecoderConfig->output_config ), st_ivas->hRenderConfig, t_ivas->hDecoderConfig->Opt_Headrotation, -#ifdef HRTF_BINARY_FILE st_ivas->hSetOfHRTF, -#endif st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; @@ -820,7 +811,6 @@ ivas_error ivas_sba_dec_reconfigure( #endif if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef HRTF_BINARY_FILE if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) @@ -833,13 +823,6 @@ ivas_error ivas_sba_dec_reconfigure( { return error; } -#else - /* open parametric binaural renderer */ - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif } #ifdef SBA_BR_SWITCHING } diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 907ad1b04956749d535137efdc3888eea9f7012f..a78f747b6a3495be691f12e4beca64b5c0896792 100755 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1288,7 +1288,6 @@ typedef struct ivas_binaural_rendering_conv_module_struct /* Fastconv binaural data structure */ -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_fastconv_struct { float FASTCONV_HRIR_latency_s; @@ -1313,9 +1312,7 @@ typedef struct ivas_hrtfs_fastconv_struct float fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX]; } HRTFS_FASTCONV, *HRTFS_FASTCONV_HANDLE; -#endif -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_parambin_struct { float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; @@ -1326,7 +1323,6 @@ typedef struct ivas_hrtfs_parambin_struct float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX]; } HRTFS_PARAMBIN, *HRTFS_PARAMBIN_HANDLE; -#endif typedef struct ivas_binaural_rendering_struct { @@ -1796,7 +1792,6 @@ typedef struct ivas_crend_state_t } CREND_DATA, *CREND_HANDLE; -#ifdef HRTF_BINARY_FILE /* htrfs from binary files. */ @@ -1826,7 +1821,6 @@ typedef struct ivas_hrtfs_file_header_t } ivas_hrtfs_file_header_t; -#endif /*----------------------------------------------------------------------------------* * LFE decoder structure @@ -1977,11 +1971,9 @@ typedef struct Decoder_Struct CREND_HANDLE hCrend; /* Convolution mixer renderer structure */ HRTFS_HANDLE hHrtf; /* HRTFs handle */ #endif -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF; /* Set of HRTFs handle (CRend) */ HRTFS_FASTCONV_HANDLE hHrtfFastConv; /* FASTCONV HRTF tables for binaural rendering */ HRTFS_PARAMBIN_HANDLE hHrtfParambin; /* HRTF tables for parametric binauralizer */ -#endif LSSETUP_CUSTOM_HANDLE hLsSetupCustom; /* Custom LS configuration handle */ float *hoa_dec_mtx; /* Pointer to decoder matrix for SBA */ HEAD_TRACK_DATA_HANDLE hHeadTrackData; /* Head tracking data structure */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 038385033a08aeda287e805abad0b3572e62dfc1..61114b9a6b3d7739045c20da2c7d85ffaca7dca9 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -992,7 +992,6 @@ ivas_error IVAS_DEC_GetHrtfHandle( } -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * IVAS_DEC_GetHrtfCRendHandle( ) * @@ -1013,9 +1012,7 @@ ivas_error IVAS_DEC_GetHrtfCRendHandle( return IVAS_ERR_OK; } -#endif -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * IVAS_DEC_GetHrtfFastConvHandle( ) * @@ -1057,7 +1054,6 @@ ivas_error IVAS_DEC_GetHrtfParamBinHandle( return IVAS_ERR_OK; } -#endif /*---------------------------------------------------------------------* * IVAS_DEC_GetRenderConfig( ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 6761ebe6285e4cf2185f0820e536908e3d0d2559..d3035af0b57c61a6780227366e26ce5112caa76f 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -284,7 +284,6 @@ ivas_error IVAS_DEC_GetHrtfHandle( IVAS_DEC_HRTF_HANDLE *hHrtfTD /* o : HRTF handle */ ); -#ifdef HRTF_BINARY_FILE /*! r: error code */ ivas_error IVAS_DEC_GetHrtfCRendHandle( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ @@ -300,7 +299,6 @@ ivas_error IVAS_DEC_GetHrtfParamBinHandle( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin /* o : Parametric binauralizer HRTF handle */ ); -#endif /*! r: error code*/ ivas_error IVAS_DEC_GetRenderConfig( diff --git a/lib_rend/ivas_binauralRenderer.c b/lib_rend/ivas_binauralRenderer.c index d5c92353ab08c109f66c9927ae7b75cff83230f5..71db67ce2e8c85c0e0bec52fa3655652d903ae3d 100644 --- a/lib_rend/ivas_binauralRenderer.c +++ b/lib_rend/ivas_binauralRenderer.c @@ -124,12 +124,8 @@ static ivas_error ivas_binRenderer_convModuleOpen( const int16_t renderer_type, const int16_t isLoudspeaker, const AUDIO_CONFIG input_config, - const RENDER_CONFIG_DATA *hRenderConfig -#ifdef HRTF_BINARY_FILE - , - const HRTFS_FASTCONV_HANDLE hHrtf -#endif -) + const RENDER_CONFIG_DATA *hRenderConfig, + const HRTFS_FASTCONV_HANDLE hHrtf ) { int16_t bandIdx, chIdx; BINRENDERER_CONV_MODULE_HANDLE hBinRenConvModule; @@ -316,17 +312,10 @@ static ivas_error ivas_binRenderer_convModuleOpen( if ( isLoudspeaker ) { -#ifdef HRTF_BINARY_FILE hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftBRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = hHrtf->leftBRIRImag[bandIdx][tmp]; hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = hHrtf->rightBRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = hHrtf->rightBRIRImag[bandIdx][tmp]; -#else - hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = leftBRIRReal[bandIdx][tmp]; - hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = leftBRIRImag[bandIdx][tmp]; - hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = rightBRIRReal[bandIdx][tmp]; - hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = rightBRIRImag[bandIdx][tmp]; -#endif } #ifdef DEBUGGING else @@ -344,32 +333,18 @@ static ivas_error ivas_binRenderer_convModuleOpen( if ( isLoudspeaker ) { -#ifdef HRTF_BINARY_FILE hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftHRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = hHrtf->leftHRIRImag[bandIdx][tmp]; hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = hHrtf->rightHRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = hHrtf->rightHRIRImag[bandIdx][tmp]; -#else - hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = leftHRIRReal[bandIdx][tmp]; - hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = leftHRIRImag[bandIdx][tmp]; - hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = rightHRIRReal[bandIdx][tmp]; - hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = rightHRIRImag[bandIdx][tmp]; -#endif } else { /* HOA3 filter coefficients */ -#ifdef HRTF_BINARY_FILE hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftHRIRReal_HOA3[bandIdx][chIdx]; hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = hHrtf->leftHRIRImag_HOA3[bandIdx][chIdx]; hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = hHrtf->rightHRIRReal_HOA3[bandIdx][chIdx]; hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = hHrtf->rightHRIRImag_HOA3[bandIdx][chIdx]; -#else - hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = leftHRIRReal_HOA3[bandIdx][chIdx]; - hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = leftHRIRImag_HOA3[bandIdx][chIdx]; - hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = rightHRIRReal_HOA3[bandIdx][chIdx]; - hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = rightHRIRImag_HOA3[bandIdx][chIdx]; -#endif } } } @@ -380,7 +355,6 @@ static ivas_error ivas_binRenderer_convModuleOpen( return IVAS_ERR_OK; } -#ifdef HRTF_BINARY_FILE /*-------------------------------------------------------------------------* * ivas_binaural_HRTF_open() * @@ -443,7 +417,6 @@ static ivas_error ivas_binaural_hrtf_open( return IVAS_ERR_OK; } -#endif /*-------------------------------------------------------------------------* * ivas_binaural_obtain_DMX() @@ -631,26 +604,20 @@ ivas_error ivas_binRenderer_open( hBinRenderer->render_lfe = 1; } -#ifdef HRTF_BINARY_FILE /* Load HRTF tables */ ivas_binaural_hrtf_open( &st_ivas->hHrtfFastConv ); -#endif if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && ( st_ivas->hIntSetup.is_loudspeaker_setup == 0 ) ) { IVAS_OUTPUT_SETUP out_setup; /* Allocate memories and buffers needed for convolutional module in CICP19 */ -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, st_ivas->renderer_type, 1, AUDIO_CONFIG_7_1_4, st_ivas->hRenderConfig, st_ivas->hHrtfFastConv ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, st_ivas->renderer_type, 1, AUDIO_CONFIG_7_1_4, st_ivas->hRenderConfig ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -666,82 +633,42 @@ ivas_error ivas_binRenderer_open( } hBinRenderer->hoa_dec_mtx = st_ivas->hoa_dec_mtx; -#ifdef HRTF_BINARY_FILE st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_BRIR_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_BRIR_latency_s * 1000000000.f ); -#endif } else { /* Allocate memories and buffers needed for convolutional module */ -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, st_ivas->renderer_type, st_ivas->hIntSetup.is_loudspeaker_setup, st_ivas->hIntSetup.output_config, st_ivas->hRenderConfig, st_ivas->hHrtfFastConv ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, st_ivas->renderer_type, st_ivas->hIntSetup.is_loudspeaker_setup, st_ivas->hIntSetup.output_config, st_ivas->hRenderConfig ) ) != IVAS_ERR_OK ) -#endif { return error; } -#ifdef FIX_FIX_I59 if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { if ( hBinRenderer->ivas_format == MC_FORMAT ) { -#ifdef HRTF_BINARY_FILE st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HRIR_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HRIR_latency_s * 1000000000.f ); -#endif } else { -#ifdef HRTF_BINARY_FILE st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HOA3_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HOA3_latency_s * 1000000000.f ); -#endif } } else { /* same value for MC or HOA both use MC BRIR*/ -#ifdef HRTF_BINARY_FILE st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_BRIR_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_BRIR_latency_s * 1000000000.f ); -#endif - } -#else - if ( hBinRenderer->ivas_format == MC_FORMAT ) - { -#ifdef HRTF_BINARY_FILE - st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HRIR_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HRIR_latency_s * 1000000000.f ); -#endif } - else - { -#ifdef HRTF_BINARY_FILE - st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HOA3_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HOA3_latency_s * 1000000000.f ); -#endif - } -#endif } /* Allocate memories needed for reverb module */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) { -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_binaural_reverb_open( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, hBinRenderer->timeSlots, @@ -751,9 +678,6 @@ ivas_error ivas_binRenderer_open( RENDERER_BINAURAL_FASTCONV_ROOM, st_ivas->hHrtfFastConv, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binaural_reverb_open( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hIntSetup.output_config, st_ivas->hDecoderConfig->output_Fs, RENDERER_BINAURAL_FASTCONV_ROOM ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_rend/ivas_binaural_reverb.c b/lib_rend/ivas_binaural_reverb.c index 3d4c9d6fe2626565c0a9e131c3fedac9496389ae..ccff4323afb27d57b8aab0bd80d991197930b00b 100644 --- a/lib_rend/ivas_binaural_reverb.c +++ b/lib_rend/ivas_binaural_reverb.c @@ -376,11 +376,9 @@ ivas_error ivas_binaural_reverb_open( const AUDIO_CONFIG output_config, /* i : output audio configuration */ const int32_t sampling_rate, /* i : sampling rate */ const RENDERER_TYPE renderer_type /* i : renderer type */ -#ifdef HRTF_BINARY_FILE , const HRTFS_FASTCONV_HANDLE hHrtfFastConv, /* i : FastConv HRTF handle */ const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ -#endif ) { int16_t bin, chIdx, k, len; @@ -413,11 +411,7 @@ ivas_error ivas_binaural_reverb_open( { if ( !roomAcoustics->override ) { -#ifdef HRTF_BINARY_FILE revTimes = hHrtfFastConv->fastconvReverberationTimes; -#else - revTimes = fastconvReverberationTimes; -#endif } else { @@ -426,11 +420,7 @@ ivas_error ivas_binaural_reverb_open( } else { -#ifdef HRTF_BINARY_FILE revTimes = hHrtfParambin->parametricReverberationTimes; -#else - revTimes = parametricReverberationTimes; -#endif } for ( bin = 0; bin < hReverb->numBins; bin++ ) @@ -499,31 +489,19 @@ ivas_error ivas_binaural_reverb_open( { if ( !roomAcoustics->override ) { -#ifdef HRTF_BINARY_FILE ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfFastConv->fastconvReverberationTimes, hHrtfFastConv->fastconvReverberationEneCorrections ); -#else - ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, fastconvReverberationTimes, fastconvReverberationEneCorrections ); -#endif ivas_binaural_reverb_setPreDelay( hReverb, 10 ); } else { -#ifdef HRTF_BINARY_FILE ivas_reverb_prepare_cldfb_params( roomAcoustics, hHrtfFastConv, output_config, roomAcoustics->use_brir, sampling_rate, t60, ene ); -#else - ivas_reverb_prepare_cldfb_params( roomAcoustics, output_config, roomAcoustics->use_brir, sampling_rate, t60, ene ); -#endif ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, t60, ene ); ivas_binaural_reverb_setPreDelay( hReverb, (int16_t) roundf( 48000.0f * roomAcoustics->acousticPreDelay / CLDFB_NO_CHANNELS_MAX ) ); } } else { -#ifdef HRTF_BINARY_FILE ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfParambin->parametricReverberationTimes, hHrtfParambin->parametricReverberationEneCorrections ); -#else - ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, parametricReverberationTimes, parametricReverberationEneCorrections ); -#endif ivas_binaural_reverb_setPreDelay( hReverb, 10 ); } diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index e3fc82c9afd83a00dce5fb40c4f1fd4d234ba184..f3ea41f08156d92ad28ddefe55f2640feb425742 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -669,7 +669,6 @@ ivas_error ivas_crend_init_from_rom( #endif #ifndef FIX_197_CREND_INTERFACE -#ifdef HRTF_BINARY_FILE /*------------------------------------------------------------------------- * ivas_crend_init_from_hrtf_handle() * @@ -818,9 +817,7 @@ ivas_error ivas_crend_init_from_hrtf_handle( } return IVAS_ERR_OK; } -#endif -#ifdef HRTF_BINARY_FILE /*------------------------------------------------------------------------- * ivas_crend_init_from_setofhrtf() * @@ -872,7 +869,6 @@ ivas_error ivas_crend_init_from_setofhrtf( return IVAS_ERR_OK; } -#endif #endif #ifndef FIX_MEMORY_COUNTING_HRTF_BINARY_FILE @@ -931,7 +927,6 @@ static ivas_error destroy_HRTF( return IVAS_ERR_OK; } -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * destroy_SetOfHRTF() * @@ -952,7 +947,6 @@ ivas_error destroy_SetOfHRTF( return IVAS_ERR_OK; } -#endif #endif #ifndef FIX_197_CREND_INTERFACE /*------------------------------------------------------------------------- @@ -976,7 +970,6 @@ ivas_error ivas_crend_open( if ( ( st_ivas->hHrtf == NULL ) && ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) ) { -#ifdef HRTF_BINARY_FILE if ( st_ivas->hSetOfHRTF != NULL ) { if ( ( error = ivas_crend_init_from_setofhrtf( st_ivas ) ) != IVAS_ERR_OK ) @@ -991,12 +984,6 @@ ivas_error ivas_crend_open( return error; } } -#else - if ( ( error = ivas_crend_init_from_rom( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif } if ( ( hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL ) @@ -1472,9 +1459,7 @@ ivas_error ivas_rend_initCrend( const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ) { int16_t i, j, tmp; @@ -1530,10 +1515,8 @@ ivas_error ivas_rend_initCrend( return IVAS_ERR_INTERNAL_FATAL; } -#ifdef HRTF_BINARY_FILE if ( hSetOfHRTF == NULL ) { -#endif if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) { hHrtf->max_num_ir -= 1; /* subtract LFE */ @@ -1854,7 +1837,6 @@ ivas_error ivas_rend_initCrend( { return IVAS_ERROR( IVAS_ERR_INTERNAL, "Unsupported renderer type in Crend" ); } -#ifdef HRTF_BINARY_FILE } else { @@ -1980,7 +1962,6 @@ ivas_error ivas_rend_initCrend( return IVAS_ERROR( IVAS_ERR_INTERNAL, "Unsupported renderer type in Crend" ); } } -#endif pCrend->hHrtfCrend = hHrtf; @@ -2005,9 +1986,7 @@ ivas_error ivas_rend_openCrend( #ifdef FIX_197_CREND_INTERFACE int16_t Opt_Headrotation, #endif -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ) { /* TODO tmu : Based on ivas_crend_open() - could be harmonized / refactored */ @@ -2042,11 +2021,7 @@ ivas_error ivas_rend_openCrend( #ifdef FIX_197_CREND_INTERFACE if ( ( *pCrend )->hHrtfCrend == NULL ) { -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_rend_initCrend( *pCrend, inConfig, outConfig, hRendCfg, hSetOfHRTF, output_Fs ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_rend_initCrend( *pCrend, inConfig, outConfig, hRendCfg, output_Fs ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -2055,9 +2030,7 @@ ivas_error ivas_rend_openCrend( if ( pCrend->hHrtfCrend == NULL ) { if ( ( error = ivas_rend_initCrend( pCrend, inConfig, outConfig, hRendCfg, -#ifdef HRTF_BINARY_FILE hSetOfHRTF, -#endif output_Fs ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_rend/ivas_hrtf.c b/lib_rend/ivas_hrtf.c index ea4f74c2f6186f3b18ebd41d2878fc31159f7c0f..6e2483bba6c743f72fac471d2c4ad337d249760c 100644 --- a/lib_rend/ivas_hrtf.c +++ b/lib_rend/ivas_hrtf.c @@ -210,9 +210,7 @@ void DefaultBSplineModel( HRTF_model_precalc( model ); -#ifdef FIX_310_TD_REND_DELAY HrFiltSet_p->latency_s = orange53_rom_latency_s; -#endif HrFiltSet_p->SampleRate = output_Fs; HrFiltSet_p->FiltLength = HrFiltSet_p->ModelParams.K; BSplineModelEvalAlloc( &HrFiltSet_p->ModelParams, &HrFiltSet_p->ModelEval ); @@ -262,7 +260,6 @@ void ivas_HRTF_binary_close( } -#ifdef HRTF_BINARY_FILE /*-----------------------------------------------------------------------* * ivas_HRTF_CRend_binary_open() * @@ -309,9 +306,7 @@ void ivas_HRTF_CRend_binary_close( return; } -#endif -#ifdef HRTF_BINARY_FILE /*-----------------------------------------------------------------------* * ivas_HRTF_fastconv_binary_open() * @@ -349,9 +344,7 @@ void ivas_HRTF_fastconv_binary_close( return; } -#endif -#ifdef HRTF_BINARY_FILE /*-----------------------------------------------------------------------* * ivas_HRTF_parambin_binary_open() * @@ -389,4 +382,3 @@ void ivas_HRTF_parambin_binary_close( return; } -#endif diff --git a/lib_rend/ivas_lib_rend_internal.h b/lib_rend/ivas_lib_rend_internal.h index 4d36ecf7f021f085004d6770938ddeed16f1f793..60d6ed7b51694d234b9154b21f9e2fce31823b97 100644 --- a/lib_rend/ivas_lib_rend_internal.h +++ b/lib_rend/ivas_lib_rend_internal.h @@ -78,9 +78,7 @@ ivas_error ivas_rend_openCrend( const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ); ivas_error ivas_rend_initCrend( @@ -88,9 +86,7 @@ ivas_error ivas_rend_initCrend( const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ); ivas_error ivas_rend_closeCrend( diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 05c496e7bdc05f02848b523cda2d641d0e1d115e..d52c0074b44b884dbc776879f298ad21629eb5eb 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -295,18 +295,10 @@ ivas_error ivas_td_binaural_open( #ifdef FIX_198_TDREND_INTERFACE *hBinRendererTd = pBinRendTd; -#ifdef FIX_310_TD_REND_DELAY *binaural_latency_ns = (int32_t) ( ( *hBinRendererTd )->HrFiltSet_p->latency_s * 1000000000.f ); -#else - *binaural_latency_ns = (int32_t) ( BINAURAL_TD_LATENCY_S * 1000000000.f ); -#endif #else st_ivas->hBinRendererTd = hBinRendererTd; -#ifdef FIX_310_TD_REND_DELAY st_ivas->binaural_latency_ns = (int32_t) ( hBinRendererTd->HrFiltSet_p->latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( BINAURAL_TD_LATENCY_S * 1000000000.f ); -#endif #endif return error; @@ -857,11 +849,7 @@ ivas_error ivas_rend_TDObjRendOpen( pTDRend->hBinRendererTd = hBinRendererTd; -#ifdef FIX_310_TD_REND_DELAY pTDRend->binaural_latency_ns = (int32_t) ( hBinRendererTd->HrFiltSet_p->latency_s * 1000000000.f ); -#else - pTDRend->binaural_latency_ns = (int32_t) ( BINAURAL_TD_LATENCY_S * 1000000000.f ); -#endif return IVAS_ERR_OK; #endif diff --git a/lib_rend/ivas_reverb_utils.c b/lib_rend/ivas_reverb_utils.c index 20a3e2ac47b215545141867d6563bdc1a9fe6d13..565fd46ff89e2fb9451c2eed15a9bca8628b0967 100644 --- a/lib_rend/ivas_reverb_utils.c +++ b/lib_rend/ivas_reverb_utils.c @@ -69,11 +69,7 @@ typedef struct cldfb_convolver_state float filter_states_im[BINAURAL_CONVBANDS][CLDFB_CONVOLVER_NTAPS_MAX]; } cldfb_convolver_state; -#ifdef HRTF_BINARY_FILE static void ivas_reverb_get_fastconv_hrtf_set_energies( const HRTFS_FASTCONV_HANDLE hHrtfFastConv, const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t sampling_rate, float *avg_pwr_left, float *avg_pwr_right ); -#else -static void ivas_reverb_get_fastconv_hrtf_set_energies( const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t sampling_rate, float *avg_pwr_left, float *avg_pwr_right ); -#endif /*-----------------------------------------------------------------------------------------* @@ -84,9 +80,7 @@ static void ivas_reverb_get_fastconv_hrtf_set_energies( const AUDIO_CONFIG input void ivas_reverb_prepare_cldfb_params( ivas_roomAcoustics_t *pInput_params, -#ifdef HRTF_BINARY_FILE const HRTFS_FASTCONV_HANDLE hHrtfFastConv, -#endif const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t output_Fs, @@ -121,11 +115,7 @@ void ivas_reverb_prepare_cldfb_params( pOutput_ene[idx] *= expf( exp_argument ); } -#ifdef HRTF_BINARY_FILE ivas_reverb_get_fastconv_hrtf_set_energies( hHrtfFastConv, input_audio_config, use_brir, output_Fs, avg_pwr_left, avg_pwr_right ); -#else - ivas_reverb_get_fastconv_hrtf_set_energies( input_audio_config, use_brir, output_Fs, avg_pwr_left, avg_pwr_right ); -#endif for ( idx = 0; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) { @@ -209,9 +199,7 @@ static void ivas_cldfb_convolver( *-----------------------------------------------------------------------------------------*/ static void get_IR_from_filter_taps( -#ifdef HRTF_BINARY_FILE const HRTFS_FASTCONV_HANDLE hHrtfFastConv, -#endif const int16_t hrtf_idx, const AUDIO_CONFIG input_audio_config, const int16_t use_brir, @@ -242,17 +230,10 @@ static void get_IR_from_filter_taps( { for ( band_idx = 0; band_idx < BINAURAL_CONVBANDS; band_idx++ ) { -#ifdef HRTF_BINARY_FILE convolver_state.filter_taps_left_re[band_idx] = hHrtfFastConv->leftHRIRReal_HOA3[band_idx][hrtf_idx]; convolver_state.filter_taps_left_im[band_idx] = hHrtfFastConv->leftHRIRImag_HOA3[band_idx][hrtf_idx]; convolver_state.filter_taps_right_re[band_idx] = hHrtfFastConv->rightHRIRReal_HOA3[band_idx][hrtf_idx]; convolver_state.filter_taps_right_im[band_idx] = hHrtfFastConv->rightHRIRImag_HOA3[band_idx][hrtf_idx]; -#else - convolver_state.filter_taps_left_re[band_idx] = leftHRIRReal_HOA3[band_idx][hrtf_idx]; - convolver_state.filter_taps_left_im[band_idx] = leftHRIRImag_HOA3[band_idx][hrtf_idx]; - convolver_state.filter_taps_right_re[band_idx] = rightHRIRReal_HOA3[band_idx][hrtf_idx]; - convolver_state.filter_taps_right_im[band_idx] = rightHRIRImag_HOA3[band_idx][hrtf_idx]; -#endif } } else @@ -283,34 +264,20 @@ static void get_IR_from_filter_taps( { for ( band_idx = 0; band_idx < BINAURAL_CONVBANDS; band_idx++ ) { -#ifdef HRTF_BINARY_FILE convolver_state.filter_taps_left_re[band_idx] = hHrtfFastConv->leftBRIRReal[band_idx][array_idx]; convolver_state.filter_taps_left_im[band_idx] = hHrtfFastConv->leftBRIRImag[band_idx][array_idx]; convolver_state.filter_taps_right_re[band_idx] = hHrtfFastConv->rightBRIRReal[band_idx][array_idx]; convolver_state.filter_taps_right_im[band_idx] = hHrtfFastConv->rightBRIRImag[band_idx][array_idx]; -#else - convolver_state.filter_taps_left_re[band_idx] = leftBRIRReal[band_idx][array_idx]; - convolver_state.filter_taps_left_im[band_idx] = leftBRIRImag[band_idx][array_idx]; - convolver_state.filter_taps_right_re[band_idx] = rightBRIRReal[band_idx][array_idx]; - convolver_state.filter_taps_right_im[band_idx] = rightBRIRImag[band_idx][array_idx]; -#endif } } else { for ( band_idx = 0; band_idx < BINAURAL_CONVBANDS; band_idx++ ) { -#ifdef HRTF_BINARY_FILE convolver_state.filter_taps_left_re[band_idx] = hHrtfFastConv->leftHRIRReal[band_idx][array_idx]; convolver_state.filter_taps_left_im[band_idx] = hHrtfFastConv->leftHRIRImag[band_idx][array_idx]; convolver_state.filter_taps_right_re[band_idx] = hHrtfFastConv->rightHRIRReal[band_idx][array_idx]; convolver_state.filter_taps_right_im[band_idx] = hHrtfFastConv->rightHRIRImag[band_idx][array_idx]; -#else - convolver_state.filter_taps_left_re[band_idx] = leftHRIRReal[band_idx][array_idx]; - convolver_state.filter_taps_left_im[band_idx] = leftHRIRImag[band_idx][array_idx]; - convolver_state.filter_taps_right_re[band_idx] = rightHRIRReal[band_idx][array_idx]; - convolver_state.filter_taps_right_im[band_idx] = rightHRIRImag[band_idx][array_idx]; -#endif } } } @@ -386,9 +353,7 @@ static void get_IR_from_filter_taps( static void ivas_reverb_get_cldfb_hrtf_set_properties( AUDIO_CONFIG input_audio_config, -#ifdef HRTF_BINARY_FILE const HRTFS_FASTCONV_HANDLE hHrtfFastConv, -#endif const int16_t use_brir, const int32_t sampling_rate, float *avg_pwr_left, @@ -432,11 +397,7 @@ static void ivas_reverb_get_cldfb_hrtf_set_properties( Loop over all the HRTFs available */ for ( hrtf_idx = 0; hrtf_idx < hrtf_count; hrtf_idx++ ) { -#ifdef HRTF_BINARY_FILE get_IR_from_filter_taps( hHrtfFastConv, hrtf_idx, input_audio_config, use_brir, sampling_rate, IR_length, current_HRTF_data_L, current_HRTF_data_R ); -#else - get_IR_from_filter_taps( hrtf_idx, input_audio_config, use_brir, sampling_rate, IR_length, current_HRTF_data_L, current_HRTF_data_R ); -#endif /* Perform forward FFT on both L/R channels */ fft_rel( current_HRTF_data_L, (int16_t) fft_size, (int16_t) log2_fft_size ); @@ -485,9 +446,7 @@ static void ivas_reverb_get_cldfb_hrtf_set_properties( *-----------------------------------------------------------------------------------------*/ static void ivas_reverb_get_fastconv_hrtf_set_energies( -#ifdef HRTF_BINARY_FILE const HRTFS_FASTCONV_HANDLE hHrtfFastConv, -#endif const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t sampling_rate, @@ -511,11 +470,7 @@ static void ivas_reverb_get_fastconv_hrtf_set_energies( output_fc[freq_idx] = (float) ( ( 2 * freq_idx + 1 ) * cldfb_freq_halfstep ); } -#ifdef HRTF_BINARY_FILE ivas_reverb_get_cldfb_hrtf_set_properties( input_audio_config, hHrtfFastConv, use_brir, sampling_rate, avg_pwr_left_fft, avg_pwr_right_fft ); -#else - ivas_reverb_get_cldfb_hrtf_set_properties( input_audio_config, use_brir, sampling_rate, avg_pwr_left_fft, avg_pwr_right_fft ); -#endif 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 ); diff --git a/lib_rend/ivas_rom_TdBinauralRenderer.c b/lib_rend/ivas_rom_TdBinauralRenderer.c index 50de3f253b7ad0a60eca5f6bfb22ca237760b018..70daa6dff9ab5eafe41320317533c40ec1ed1ae2 100644 --- a/lib_rend/ivas_rom_TdBinauralRenderer.c +++ b/lib_rend/ivas_rom_TdBinauralRenderer.c @@ -46,9 +46,7 @@ * TD Binaural rendering related ROM tables *------------------------------------------------------------------------*/ /* TD renderer HRTF default model Orange53 */ -#ifdef FIX_310_TD_REND_DELAY const float orange53_rom_latency_s = 0.000020834f; -#endif const int16_t orange53_rom_azimDim2[18] = { 1, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 1, }; diff --git a/lib_rend/ivas_rom_TdBinauralRenderer.h b/lib_rend/ivas_rom_TdBinauralRenderer.h index bbe970869be805c343a66b4bc668de9850944bbe..ccb5362c9a4a7d691e8fe738bcd83b4a23bf2187 100644 --- a/lib_rend/ivas_rom_TdBinauralRenderer.h +++ b/lib_rend/ivas_rom_TdBinauralRenderer.h @@ -42,9 +42,7 @@ * TD Binaural rendering related ROM tables *------------------------------------------------------------------------*/ /* TD renderer HRTF default model Orange53 */ -#ifdef FIX_310_TD_REND_DELAY extern const float orange53_rom_latency_s; -#endif extern const int16_t orange53_rom_azimDim2[18]; extern const int16_t orange53_rom_azimDim3[18]; extern const int16_t orange53_rom_azim_start_idx[18]; diff --git a/lib_rend/ivas_rom_binauralRenderer.c b/lib_rend/ivas_rom_binauralRenderer.c index 9d6bbd543eb7dbca0534ce84263bd49a9649298a..763777ad288c2be764a3863d8439000c7d55b439 100644 --- a/lib_rend/ivas_rom_binauralRenderer.c +++ b/lib_rend/ivas_rom_binauralRenderer.c @@ -52,11 +52,7 @@ * Generated with Matlab version 9.3.0.713579 (R2017b) by MUXE6256 */ const float FASTCONV_HOA3_latency_s = 0.001979167f; -#ifdef HRTF_BINARY_FILE const float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= -#else -const float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= -#endif { { {-0.004181f, +0.093228f, +0.655506f, +0.048565f, -0.005834f, -0.005472f, -0.000066f}, @@ -960,11 +956,7 @@ const float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= } }; -#ifdef HRTF_BINARY_FILE const float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= -#else -const float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= -#endif { { {-0.007849f, -0.189662f, +0.310868f, +0.002657f, -0.000617f, -0.002064f, +0.000079f}, @@ -1868,11 +1860,7 @@ const float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= } }; -#ifdef HRTF_BINARY_FILE const float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= -#else -const float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= -#endif { { {-0.004181f, +0.093228f, +0.655506f, +0.048565f, -0.005834f, -0.005472f, -0.000066f}, @@ -2776,11 +2764,7 @@ const float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= } }; -#ifdef HRTF_BINARY_FILE const float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= -#else -const float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= -#endif { { {-0.007849f, -0.189662f, +0.310868f, +0.002657f, -0.000617f, -0.002064f, +0.000079f}, @@ -3685,11 +3669,7 @@ const float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= }; const float FASTCONV_HRIR_latency_s = 0.000666667f; -#ifdef HRTF_BINARY_FILE const float leftHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= -#else -const float leftHRIRReal[BINAURAL_CONVBANDS][15][7]= -#endif { { {+0.331798f, +0.500334f, +0.042057f, -0.000623f, -0.000260f}, @@ -4543,11 +4523,7 @@ const float leftHRIRReal[BINAURAL_CONVBANDS][15][7]= } }; -#ifdef HRTF_BINARY_FILE const float leftHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= -#else -const float leftHRIRImag[BINAURAL_CONVBANDS][15][7]= -#endif { { {-0.346479f, +0.553523f, -0.074098f, +0.001288f, +0.000309f}, @@ -5401,11 +5377,7 @@ const float leftHRIRImag[BINAURAL_CONVBANDS][15][7]= } }; -#ifdef HRTF_BINARY_FILE const float rightHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= -#else -const float rightHRIRReal[BINAURAL_CONVBANDS][15][7]= -#endif { { {+0.065097f, +0.755993f, -0.042308f, -0.016140f, -0.000353f}, @@ -6259,11 +6231,7 @@ const float rightHRIRReal[BINAURAL_CONVBANDS][15][7]= } }; -#ifdef HRTF_BINARY_FILE const float rightHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= -#else -const float rightHRIRImag[BINAURAL_CONVBANDS][15][7]= -#endif { { {-0.179291f, +0.196331f, +0.055128f, -0.017382f, +0.000411f}, @@ -7649,11 +7617,7 @@ const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]= /* Binaural rendering data set based on BRIRs */ /* Tables derived from Mozart IIS BRIRs.*/ const float FASTCONV_BRIR_latency_s = 0.000937500f; -#ifdef HRTF_BINARY_FILE const float leftBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= -#else -const float leftBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= -#endif { { { @@ -16757,11 +16721,7 @@ const float leftBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= } }; -#ifdef HRTF_BINARY_FILE const float leftBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= -#else -const float leftBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= -#endif { { { @@ -25865,11 +25825,7 @@ const float leftBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= } }; -#ifdef HRTF_BINARY_FILE const float rightBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= -#else -const float rightBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= -#endif { { { @@ -34973,11 +34929,7 @@ const float rightBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= } }; -#ifdef HRTF_BINARY_FILE const float rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= -#else -const float rightBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= -#endif { { { diff --git a/lib_rend/ivas_rom_binauralRenderer.h b/lib_rend/ivas_rom_binauralRenderer.h index f97883f9c37f1163fc03c79c13a9d170013709e9..939f6ef78fa76c7b82a6755f985294490a26d1c8 100644 --- a/lib_rend/ivas_rom_binauralRenderer.h +++ b/lib_rend/ivas_rom_binauralRenderer.h @@ -44,29 +44,15 @@ /* Binaural rendering data set based on HRIRs */ extern const float FASTCONV_HRIR_latency_s; -#ifdef HRTF_BINARY_FILE extern float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; extern float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; extern float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; extern float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; -#else -extern float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]; -extern float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]; -extern float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]; -extern float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]; -#endif -#ifdef HRTF_BINARY_FILE extern float leftHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; extern float leftHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; extern float rightHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; extern float rightHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; -#else -extern float leftHRIRReal[BINAURAL_CONVBANDS][15][7]; -extern float leftHRIRImag[BINAURAL_CONVBANDS][15][7]; -extern float rightHRIRReal[BINAURAL_CONVBANDS][15][7]; -extern float rightHRIRImag[BINAURAL_CONVBANDS][15][7]; -#endif extern float FASTCONV_HOA3_latency_s; extern float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; @@ -75,17 +61,10 @@ extern float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; /* Binaural rendering data set based on BRIRs */ extern const float FASTCONV_BRIR_latency_s; -#ifdef HRTF_BINARY_FILE extern float leftBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; extern float leftBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; extern float rightBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; extern float rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; -#else -extern float leftBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; -extern float leftBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; -extern float rightBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; -extern float rightBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; -#endif /* Reverberation parameters based on BRIRs for fastconv */ extern float fastconvReverberationTimes[CLDFB_NO_CHANNELS_MAX]; diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index abb0bb12a77a89206e6dfa7b1b7bf53eb8cbd43c..e57044930ec037e3743140f736e76639a17e67d5 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -758,9 +758,7 @@ typedef struct TDREND_HRFILT_FiltSet_struct ModelEval_t ModelEval; ModelParamsITD_t ModelParamsITD; TDREND_HRFILT_Method_t FilterMethod; /* HR filtering method */ -#ifdef FIX_310_TD_REND_DELAY float latency_s; -#endif } TDREND_HRFILT_FiltSet_t; @@ -912,8 +910,6 @@ typedef struct ivas_binaural_crend_wrapper_struct } CREND_WRAPPER, *CREND_WRAPPER_HANDLE; -#ifdef HRTF_BINARY_FILE - /* htrfs from binary files. */ typedef struct ivas_hrtfs_crend_structure @@ -942,9 +938,7 @@ typedef struct ivas_hrtfs_file_header_t } ivas_hrtfs_file_header_t; -#endif -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_fastconv_struct { float FASTCONV_HRIR_latency_s; @@ -969,9 +963,7 @@ typedef struct ivas_hrtfs_fastconv_struct float fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX]; } HRTFS_FASTCONV, *HRTFS_FASTCONV_HANDLE; -#endif -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_parambin_struct { float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; @@ -982,7 +974,6 @@ typedef struct ivas_hrtfs_parambin_struct float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX]; } HRTFS_PARAMBIN, *HRTFS_PARAMBIN_HANDLE; -#endif /*----------------------------------------------------------------------------------* * LFE decoder structure diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index a6fb9c7cd58a02ee913d7f96e2617012ae3990c7..ed0039296446039c96b3e4b4ece03caaa99731e0 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -1070,9 +1070,7 @@ static ivas_error setRendInputActiveIsm( #ifdef FIX_197_CREND_INTERFACE 0, #endif -#ifdef HRTF_BINARY_FILE NULL, -#endif *rendCtx.pOutSampleRate ); } if ( error != IVAS_ERR_OK ) @@ -1777,9 +1775,7 @@ static ivas_error initMcBinauralRendering( #ifdef FIX_197_CREND_INTERFACE 0, #endif -#ifdef HRTF_BINARY_FILE NULL, -#endif outSampleRate ) ) != IVAS_ERR_OK ) { return error; @@ -2052,15 +2048,11 @@ static ivas_error updateSbaPanGains( case IVAS_REND_AUDIO_CONFIG_BINAURAL: #ifdef FIX_197_CREND_INTERFACE error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, 0, -#ifdef HRTF_BINARY_FILE NULL, -#endif *rendCtx.pOutSampleRate ); #else error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, -#ifdef HRTF_BINARY_FILE NULL, -#endif *rendCtx.pOutSampleRate ); #endif break; @@ -2071,15 +2063,11 @@ static ivas_error updateSbaPanGains( } #ifdef FIX_197_CREND_INTERFACE error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, 0, -#ifdef HRTF_BINARY_FILE NULL, -#endif *rendCtx.pOutSampleRate ); #else error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, -#ifdef HRTF_BINARY_FILE NULL, -#endif *rendCtx.pOutSampleRate ); #endif break; @@ -2200,17 +2188,10 @@ static ivas_error initMasaDummyDecForMcOut( input_masa *inputMasa, IVAS_REND_Aud if ( decDummy->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_dirac_dec_init_binaural_data( decDummy, NULL ) ) != IVAS_ERR_OK ) { return error; } -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( decDummy ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif decDummy->hDiracDecBin->useSubframeMode = 0; /* Todo Nokia: This will disappear in later work but needs to be this now. */ } @@ -2356,7 +2337,6 @@ static ivas_error initMasaDummyDecForBinauralOut( input_masa *inputMasa, IVAS_RE { return error; } -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &decDummy->hHrtfParambin ) ) != IVAS_ERR_OK ) { return error; @@ -2366,12 +2346,6 @@ static ivas_error initMasaDummyDecForBinauralOut( input_masa *inputMasa, IVAS_RE { return error; } -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( decDummy ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif decDummy->hDiracDecBin->useSubframeMode = 0; /* Todo Nokia: This will disappear in later work but needs to be this now. */ @@ -3370,9 +3344,7 @@ ivas_error IVAS_REND_GetDelay( */ int16_t i; int32_t latency_ns; -#ifdef FIX_310_TD_REND_DELAY int32_t max_latency_ns; -#endif /*-----------------------------------------------------------------* * Validate function arguments @@ -3385,9 +3357,7 @@ ivas_error IVAS_REND_GetDelay( *timeScale = hIvasRend->sampleRateOut; *nSamples = 0; -#ifdef FIX_310_TD_REND_DELAY max_latency_ns = 0; -#endif /* Compute the maximum delay across all inputs */ for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; i++ ) @@ -3401,11 +3371,7 @@ ivas_error IVAS_REND_GetDelay( latency_ns = max( hIvasRend->inputsIsm[i].crendWrapper.binaural_latency_ns, hIvasRend->inputsIsm[i].tdRendWrapper.binaural_latency_ns ); #endif -#ifdef FIX_310_TD_REND_DELAY max_latency_ns = max( max_latency_ns, latency_ns ); -#else - *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); -#endif } } @@ -3420,11 +3386,7 @@ ivas_error IVAS_REND_GetDelay( latency_ns = max( hIvasRend->inputsMc[i].crendWrapper.binaural_latency_ns, hIvasRend->inputsMc[i].tdRendWrapper.binaural_latency_ns ); #endif -#ifdef FIX_310_TD_REND_DELAY max_latency_ns = max( max_latency_ns, latency_ns ); -#else - *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); -#endif } } @@ -3437,11 +3399,7 @@ ivas_error IVAS_REND_GetDelay( #else latency_ns = hIvasRend->inputsSba[i].crendWrapper.binaural_latency_ns; #endif -#ifdef FIX_310_TD_REND_DELAY max_latency_ns = max( max_latency_ns, latency_ns ); -#else - *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); -#endif } } @@ -3450,17 +3408,11 @@ ivas_error IVAS_REND_GetDelay( if ( hIvasRend->inputsMasa[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { latency_ns = NS2SA( hIvasRend->sampleRateOut, (int32_t) ( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); -#ifdef FIX_310_TD_REND_DELAY max_latency_ns = max( max_latency_ns, latency_ns ); -#else - *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); -#endif } } -#ifdef FIX_310_TD_REND_DELAY *nSamples = (int16_t) roundf( (float) max_latency_ns * *timeScale / 1000000000.f ); -#endif return IVAS_ERR_OK; } diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index 3cae190b5e8c3610b59b736fbc9df90ec0812df3..c52b06d6f0aef4831c8c9120ecf22644fa548450 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -36,9 +36,7 @@ #include "prot.h" // VE: !!!!! #include "ivas_prot.h" // VE: !!!!! -#ifdef HRTF_BINARY_FILE #include "lib_dec.h" -#endif struct hrtfFileReader { @@ -120,8 +118,6 @@ void hrtfFileReader_close( } -#ifdef HRTF_BINARY_FILE - /*-------------------------------------------------------------------* * read_and_check_hrtf_binary_file_header() * @@ -176,10 +172,8 @@ static ivas_error check_hrtf_binary_header( ivas_hrtfs_header_t *hrtf_header ) { // Check the renderer type if ( ( hrtf_header->rend_type != RENDERER_BINAURAL_MIXER_CONV ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) && -#ifdef HRTF_BINARY_FILE ( hrtf_header->rend_type != RENDERER_BINAURAL_FASTCONV ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_FASTCONV_ROOM ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_PARAMETRIC ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_PARAMETRIC_ROOM ) && -#endif ( hrtf_header->rend_type != RENDERER_BINAURAL_OBJECTS_TD ) ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Header of HRTF binary file not compliant (renderer type)" ); @@ -222,8 +216,6 @@ static ivas_error read_hrtf_binary_header( ivas_hrtfs_header_t *hrtf_header, FIL return IVAS_ERR_END_OF_FILE; } -#endif - /*-------------------------------------------------------------------* * LoadBSplineBinaryITD() @@ -298,9 +290,7 @@ static ivas_error LoadBSplineBinary( ModelParams_t *model; int16_t i, tmp; -#ifdef FIX_310_TD_REND_DELAY fread( &HrFiltSet_p->latency_s, sizeof( float ), 1, f_hrtf ); -#endif model = &( HrFiltSet_p->ModelParams ); @@ -439,7 +429,6 @@ static ivas_error TDREND_MIX_LoadHRTF( int16_t tmp; ivas_error error; -#ifdef HRTF_BINARY_FILE bool is_tdrend; ivas_error header_check_result; @@ -449,11 +438,9 @@ static ivas_error TDREND_MIX_LoadHRTF( int32_t hrtf_data_size_max; char *hrtf_data; -#endif error = IVAS_ERR_OK; -#ifdef HRTF_BINARY_FILE if ( ( header_check_result = read_and_check_hrtf_binary_file_header( &hrtfs_file_header, f_hrtf ) ) != IVAS_ERR_OK ) { @@ -501,7 +488,6 @@ static ivas_error TDREND_MIX_LoadHRTF( free( hrtf_data ); if ( is_tdrend ) -#endif { if ( fread( &tmp, 1, sizeof( int16_t ), f_hrtf ) == 0 ) { @@ -519,12 +505,10 @@ static ivas_error TDREND_MIX_LoadHRTF( error = LoadBSplineBinary( HrFiltSet_p, f_hrtf ); } } -#ifdef HRTF_BINARY_FILE else { return IVAS_ERROR( IVAS_ERR_INVALID_HRTF, "HR filter not found in binary file." ); } -#endif return error; } @@ -543,9 +527,7 @@ ivas_error load_HRTF_binary( { ivas_error error; -#ifdef HRTF_BINARY_FILE fseek( hrtfReader->file, 0, SEEK_SET ); -#endif error = TDREND_MIX_LoadHRTF( hrtfReader->file, hHrtf ); @@ -625,12 +607,10 @@ ivas_error dealloc_HRTF_binary( ivas_error error; error = IVAS_ERR_OK; -#ifdef HRTF_BINARY_FILE if ( hHrtf == NULL ) { return error; } -#endif if ( !hHrtf->ModelParams.modelROM ) { @@ -677,7 +657,6 @@ ivas_error dealloc_HRTF_binary( return error; } -#ifdef HRTF_BINARY_FILE /*------------------------------------------------------------------------- * ivas_hrtf_init() @@ -944,7 +923,6 @@ static ivas_error create_HRTF_from_rawdata( return IVAS_ERR_OK; } -#ifdef HRTF_BINARY_FILE static ivas_error init_fastconv_HRTF_handle( HRTFS_FASTCONV *hHrtf /* i/o: HRTF FastConv handle */ ) @@ -1272,10 +1250,8 @@ ivas_error load_fastconv_HRTF_from_binary( return IVAS_ERR_OK; } -#endif -#ifdef HRTF_BINARY_FILE static ivas_error create_parambin_HRTF_from_rawdata( HRTFS_PARAMBIN_HANDLE *hHRTF, /* i/o: Parametric binauralizer HRTF handle */ char *hrtf_data /* i : pointer to binary file */ @@ -1409,7 +1385,6 @@ ivas_error load_parambin_HRTF_from_binary( return IVAS_ERR_OK; } -#endif /*---------------------------------------------------------------------* @@ -1514,7 +1489,6 @@ ivas_error create_SetOfHRTF_from_binary( return IVAS_ERR_OK; } -#endif #ifdef FIX_MEMORY_COUNTING_HRTF_BINARY_FILE /*---------------------------------------------------------------------* @@ -1572,7 +1546,6 @@ static ivas_error destroy_HRTF( return IVAS_ERR_OK; } -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * destroy_SetOfHRTF() * @@ -1594,4 +1567,3 @@ ivas_error destroy_SetOfHRTF( } #endif -#endif diff --git a/lib_util/hrtf_file_reader.h b/lib_util/hrtf_file_reader.h index b4465511507b5c7afd32809479da35ec7a73b2a3..3d9a901c24fd1927f9c387a9f2813875fc3667ab 100644 --- a/lib_util/hrtf_file_reader.h +++ b/lib_util/hrtf_file_reader.h @@ -73,7 +73,6 @@ ivas_error load_HRTF_binary( const hrtfFileReader *hrtfReader /* i/o: pointer to hrtfFileReader handle */ ); -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * create_SetOfHRTF_from_binary() * @@ -96,9 +95,7 @@ ivas_error destroy_SetOfHRTF( IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ ); -#endif -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * load_fastconv_HRTF_from_binary() * @@ -122,7 +119,6 @@ ivas_error load_parambin_HRTF_from_binary( const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ ); -#endif /*---------------------------------------------------------------------* * dealloc_HRTF_binary()