diff --git a/apps/decoder.c b/apps/decoder.c index 41089d057e230d20fb65f02c48a9db930b5ac612..444367122d1346cae0357aa20ca8b0879e4e634f 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -150,7 +150,7 @@ typedef struct hrtfFileReader *hrtfReader; char *hrtfFileName; - IVAS_DEC_HRTF_HANDLE *hHrtfTD; + IVAS_DEC_HRTF_TD_HANDLE *hHrtfTD; IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics; diff --git a/apps/renderer.c b/apps/renderer.c index cf5a7e33d251ca9cab6c8539c1db775994ce08f0..bf2587680aa9986a8a6141c20a771e7f31e2eaf5 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -682,7 +682,7 @@ int main( IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; - IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; + IVAS_DEC_HRTF_TD_HANDLE *hHrtfTD = NULL; IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL; IsmPositionProvider *positionProvider = NULL; LfeRoutingConfig *lfeRoutingConfigs[RENDERER_MAX_MC_INPUTS]; @@ -961,9 +961,9 @@ int main( if ( hrtfFileReader != NULL ) { - if ( ( error = IVAS_REND_GetHrtfHandle( hIvasRend, &hHrtfTD ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_REND_GetHrtfTdHandle( hIvasRend, &hHrtfTD ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nIVAS_REND_GetHrtfHandle failed: %s\n\n", ivas_error_to_string( error ) ); + fprintf( stderr, "\nIVAS_REND_GetHrtfTdHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } @@ -2611,7 +2611,14 @@ static CmdlnArgs defaultArgs( args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID; args.outConfig.outSetupCustom.num_spk = 0; args.outConfig.outSetupCustom.num_lfe = 0; +#ifdef FIX_HRTF_LEFTOVERS + for ( i = 0; i < RENDERER_MAX_SBA_INPUTS; ++i ) + { + args.inConfig.ambisonicsBuses[i].audioConfig = IVAS_AUDIO_CONFIG_INVALID; + } +#else args.inConfig.ambisonicsBuses->audioConfig = IVAS_AUDIO_CONFIG_INVALID; +#endif for ( i = 0; i < RENDERER_MAX_ISM_INPUTS + RENDERER_MAX_MASA_INPUTS; ++i ) { diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index f5b13c0dea05c0ffb7dec08f670352afe428112d..80c90d6b3152a5ace3ef0f0f205ac0c61784a356 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -176,7 +176,7 @@ typedef enum 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 ivas_hrtf_TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE; +typedef struct ivas_hrtf_TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_TD_HANDLE; typedef struct ivas_hrtf_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; typedef struct ivas_hrtf_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE; typedef struct ivas_hrtf_parambin_struct *IVAS_DEC_HRTF_PARAMBIN_HANDLE; diff --git a/lib_com/options.h b/lib_com/options.h index 8b761e69b28eb127ce5471ef638b7ef56c56b668..18b830f2b622f2387e2a569082431706b7a0d93e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -165,6 +165,7 @@ #define FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add split rendering support to decoder in VoIP mode */ #define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */ #define FIX_1377_HANDLE_ERROR_CODE /* Eri: Add missing error code handling from IVAS_REND_SetObjectIDs */ +#define FIX_HRTF_LEFTOVERS /* VA: HRTF updates - bring float main in line with BASOP main */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 8cda55017c4e8c4a8be270e89da91b594acade35..d6ba1e0c156076dda2d06eedb99192547f79c691 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -795,8 +795,6 @@ ivas_error ivas_rend_openCldfbRend( int16_t convBand; ivas_error error; - error = IVAS_ERR_OK; - /*-----------------------------------------------------------------* * prepare library opening *-----------------------------------------------------------------*/ @@ -866,7 +864,7 @@ ivas_error ivas_rend_openCldfbRend( pCldfbRend->hCldfbRend = hBinRenderer; - return error; + return IVAS_ERR_OK; } @@ -885,8 +883,6 @@ ivas_error ivas_binRenderer_open( ivas_error error; const IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pRoomAcoustics; - error = IVAS_ERR_OK; - /*-----------------------------------------------------------------* * prepare library opening *-----------------------------------------------------------------*/ @@ -1045,7 +1041,7 @@ ivas_error ivas_binRenderer_open( /* Copy the handles to main handle */ st_ivas->hBinRenderer = hBinRenderer; - return error; + return IVAS_ERR_OK; } diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 0f54199425b0ff849417a9ec0771a5ef7f9ea57f..95ebbcb1c7522a088c984519d4945611bdfa56e8 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2943,8 +2943,8 @@ ivas_error IVAS_DEC_FeedCustomLsData( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_GetHrtfTDrendHandle( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_DEC_HRTF_HANDLE **hHrtfTD /* o : HRTF handle */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_HRTF_TD_HANDLE **hHrtfTD /* o : HRTF handle */ ) { if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHrtfTD == NULL ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 18298954c462251bb940489845102786ab9c675f..3fff28470dc24a6c6c5198a291a13d902d4b93a6 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -457,7 +457,7 @@ ivas_error IVAS_DEC_FeedCustomLsData( /*! r: error code */ ivas_error IVAS_DEC_GetHrtfTDrendHandle( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_DEC_HRTF_HANDLE **hHrtfTD /* o : HRTF handle */ + IVAS_DEC_HRTF_TD_HANDLE **hHrtfTD /* o : HRTF handle */ ); /*! r: error code */ diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index b120fd6c6ac24a56830faed20d530b387a29c4cb..91346675023091f478cd4a637e93d0347e1d052e 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -104,15 +104,15 @@ ivas_error ivas_Crend_hrtf_init( *------------------------------------------------------------------------*/ static ivas_error ivas_hrtf_open( - HRTFS_HANDLE *hHrtf_out /* o : HRTF handle */ + HRTFS_CREND_HANDLE *hHrtf_out /* o : HRTF handle */ ) { - HRTFS_HANDLE hHrtf; + HRTFS_CREND_HANDLE hHrtf; ivas_error error; if ( *hHrtf_out == NULL ) { - if ( ( hHrtf = (HRTFS_HANDLE) malloc( sizeof( HRTFS_DATA ) ) ) == NULL ) + if ( ( hHrtf = (HRTFS_CREND_HANDLE) malloc( sizeof( HRTFS_CREND_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Crend HRTFS Handle\n" ); } @@ -140,7 +140,7 @@ static ivas_error ivas_hrtf_open( *------------------------------------------------------------------------*/ static void ivas_hrtf_close( - HRTFS_HANDLE *hHrtf /* i/o: HRTF handle */ + HRTFS_CREND_HANDLE *hHrtf /* i/o: Crend HRTF handle */ ) { if ( hHrtf == NULL || *hHrtf == NULL ) @@ -172,7 +172,7 @@ static ivas_error ivas_rend_initCrend( int16_t i, j, tmp, tmp2; int16_t nchan_in; IVAS_REND_AudioConfigType inConfigType; - HRTFS_HANDLE hHrtf; + HRTFS_CREND_HANDLE hHrtf; ivas_error error; inConfigType = getAudioConfigType( inConfig ); @@ -1158,13 +1158,11 @@ ivas_error ivas_rend_openCrend( { int16_t i, subframe_length; int32_t max_total_ir_len; - HRTFS_HANDLE hHrtf; + HRTFS_CREND_HANDLE hHrtf; CREND_HANDLE hCrend; ivas_error error; int16_t pos_idx; - error = IVAS_ERR_OK; - if ( ( error = ivas_rend_initCrendWrapper( pCrend, num_poses ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 69fcb30fb803f590f19fb50517892a98ecc97f9c..2552ef8ca101864f5e9564cfb062b4051b6d9f48 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -1182,7 +1182,7 @@ typedef struct ivas_hrtf_crend_structure uint16_t *pIndex_frequency_max_dyn[MAX_INTERN_CHANNELS][BINAURAL_CHANNELS]; uint16_t *pIndex_frequency_max_diffuse_dyn[BINAURAL_CHANNELS]; -} HRTFS_DATA, *HRTFS_HANDLE, HRTFS_CREND_DATA, *HRTFS_CREND_HANDLE; // VE: all instance of HRTFS_DATAand *HRTFS_HANDLE should be renamed to HRTFS_CREND_DATA and *HRTFS_CREND_HANDLE +} HRTFS_CREND_DATA, *HRTFS_CREND_HANDLE; /* Main Crend structure */ typedef struct ivas_crend_state_t @@ -1209,7 +1209,7 @@ typedef struct ivas_binaural_crend_wrapper_struct { int32_t binaural_latency_ns; CREND_HANDLE hCrend[MAX_HEAD_ROT_POSES]; - HRTFS_HANDLE hHrtfCrend; + HRTFS_CREND_HANDLE hHrtfCrend; } CREND_WRAPPER, *CREND_WRAPPER_HANDLE; @@ -1272,6 +1272,7 @@ typedef struct ivas_hrtf_statistics_struct float *average_energy_r_dyn; float *inter_aural_coherence_dyn; int16_t fromROM; /* Flag that indicates that the pointers point to tables in ROM (controls init/dealloc).*/ + } HRTFS_STATISTICS, *HRTFS_STATISTICS_HANDLE; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 52994cdba106a9c502fbe94d064b4a238b8cd24c..31efac60e44ced3325a4db2af8d5a415e0a797cc 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -183,10 +183,10 @@ typedef struct typedef struct hrtf_handles { - IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF; + IVAS_DEC_HRTF_CREND_HANDLE hHrtfCrend; IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv; IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin; - IVAS_DEC_HRTF_HANDLE hHrtfTD; + IVAS_DEC_HRTF_TD_HANDLE hHrtfTD; IVAS_DEC_HRTF_STATISTICS_HANDLE hHrtfStatistics; } hrtf_handles; @@ -1672,7 +1672,7 @@ static ivas_error setRendInputActiveIsm( } else if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) { - if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hrtfs->hSetOfHRTF, hrtfs->hHrtfStatistics, *rendCtx.pOutSampleRate, 1, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hrtfs->hHrtfCrend, hrtfs->hHrtfStatistics, *rendCtx.pOutSampleRate, 1, rendCtx.pSplitRendWrapper != NULL ? rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ) ) != IVAS_ERR_OK ) { return error; } @@ -2631,7 +2631,7 @@ static ivas_error setRendInputActiveMc( if ( getAudioConfigType( outConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL ) { - if ( ( error = initMcBinauralRendering( inputMc, inConfig, outConfig, hRendCfg, hrtfs->hSetOfHRTF, hrtfs->hHrtfStatistics, FALSE ) ) != IVAS_ERR_OK ) + if ( ( error = initMcBinauralRendering( inputMc, inConfig, outConfig, hRendCfg, hrtfs->hHrtfCrend, hrtfs->hHrtfStatistics, FALSE ) ) != IVAS_ERR_OK ) { return error; } @@ -2948,7 +2948,7 @@ static ivas_error setRendInputActiveSba( } } - if ( ( error = updateSbaPanGains( inputSba, outConfig, hRendCfg, hrtfs->hSetOfHRTF, hrtfs->hHrtfStatistics ) ) != IVAS_ERR_OK ) + if ( ( error = updateSbaPanGains( inputSba, outConfig, hRendCfg, hrtfs->hHrtfCrend, hrtfs->hHrtfStatistics ) ) != IVAS_ERR_OK ) { return error; } @@ -3241,7 +3241,7 @@ ivas_error IVAS_REND_Open( hIvasRend->hHrtfs.hHrtfFastConv = NULL; hIvasRend->hHrtfs.hHrtfParambin = NULL; hIvasRend->hHrtfs.hHrtfTD = NULL; - hIvasRend->hHrtfs.hSetOfHRTF = NULL; + hIvasRend->hHrtfs.hHrtfCrend = NULL; hIvasRend->hHrtfs.hHrtfStatistics = NULL; if ( asHrtfBinary ) { @@ -3249,7 +3249,7 @@ ivas_error IVAS_REND_Open( { return error; } - if ( ( error = ivas_HRTF_CRend_binary_open( &( hIvasRend->hHrtfs.hSetOfHRTF ) ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_HRTF_CRend_binary_open( &( hIvasRend->hHrtfs.hHrtfCrend ) ) ) != IVAS_ERR_OK ) { return error; } @@ -3947,7 +3947,7 @@ ivas_error IVAS_REND_ConfigureCustomInputLoudspeakerLayout( inputMc->base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig, - hIvasRend->hHrtfs.hSetOfHRTF, + hIvasRend->hHrtfs.hHrtfCrend, hIvasRend->hHrtfs.hHrtfStatistics, FALSE ) ) != IVAS_ERR_OK ) { @@ -4807,7 +4807,7 @@ ivas_error IVAS_REND_SetHeadRotation( hIvasRend->inputsMc[i].base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig, - hIvasRend->hHrtfs.hSetOfHRTF, + hIvasRend->hHrtfs.hHrtfCrend, hIvasRend->hHrtfs.hHrtfStatistics, TRUE ) ) != IVAS_ERR_OK ) { @@ -4871,7 +4871,7 @@ ivas_error IVAS_REND_DisableHeadRotation( hIvasRend->inputsMc[i].base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig, - hIvasRend->hHrtfs.hSetOfHRTF, + hIvasRend->hHrtfs.hHrtfCrend, hIvasRend->hHrtfs.hHrtfStatistics, TRUE ) ) != IVAS_ERR_OK ) { @@ -8093,7 +8093,7 @@ void IVAS_REND_Close( /* Parametric binauralizer HRTF filters */ ivas_HRTF_binary_close( &( hIvasRend->hHrtfs.hHrtfTD ) ); - ivas_HRTF_CRend_binary_close( &( hIvasRend->hHrtfs.hSetOfHRTF ) ); + ivas_HRTF_CRend_binary_close( &( hIvasRend->hHrtfs.hHrtfCrend ) ); ivas_HRTF_fastconv_binary_close( &( hIvasRend->hHrtfs.hHrtfFastConv ) ); ivas_HRTF_parambin_binary_close( &( hIvasRend->hHrtfs.hHrtfParambin ) ); ivas_HRTF_statistics_close( &( hIvasRend->hHrtfs.hHrtfStatistics ) ); @@ -8250,14 +8250,14 @@ int32_t IVAS_REND_GetCntFramesLimited( /*---------------------------------------------------------------------* - * IVAS_REND_GetHrtfHandle( ) + * IVAS_REND_GetHrtfTdHandle( ) * * *---------------------------------------------------------------------*/ -ivas_error IVAS_REND_GetHrtfHandle( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - IVAS_DEC_HRTF_HANDLE **hHrtfTD /* o : HRTF handle */ +ivas_error IVAS_REND_GetHrtfTdHandle( + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ + IVAS_DEC_HRTF_TD_HANDLE **hHrtfTD /* o : TD rend. HRTF handle */ ) { if ( hIvasRend == NULL || hIvasRend->hHrtfs.hHrtfTD == NULL ) @@ -8279,15 +8279,15 @@ ivas_error IVAS_REND_GetHrtfHandle( ivas_error IVAS_REND_GetHrtfCRendHandle( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - IVAS_DEC_HRTF_CREND_HANDLE **hSetOfHRTF /* o : Set of HRTF handle */ + IVAS_DEC_HRTF_CREND_HANDLE **hHrtfCrend /* o : Crend HRTF handle */ ) { - if ( hIvasRend == NULL || hIvasRend->hHrtfs.hSetOfHRTF == NULL ) + if ( hIvasRend == NULL || hIvasRend->hHrtfs.hHrtfCrend == NULL ) { return IVAS_ERR_WRONG_PARAMS; } - *hSetOfHRTF = &hIvasRend->hHrtfs.hSetOfHRTF; + *hHrtfCrend = &hIvasRend->hHrtfs.hHrtfCrend; return IVAS_ERR_OK; } diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index c03dd72485d2f084d9572c418236508570a58715..2e635ad4797c82b86a57f3c1a47504ac2f5a4f78 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -194,15 +194,15 @@ ivas_error IVAS_REND_GetDelay( ); /*! r: error code */ -ivas_error IVAS_REND_GetHrtfHandle( +ivas_error IVAS_REND_GetHrtfTdHandle( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS render handle */ - IVAS_DEC_HRTF_HANDLE **hHrtfTD /* o : HRTF handle */ + IVAS_DEC_HRTF_TD_HANDLE **hHrtfTD /* o : TD rend. HRTF handle */ ); /*! r: error code */ ivas_error IVAS_REND_GetHrtfCRendHandle( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - IVAS_DEC_HRTF_CREND_HANDLE **hSetOfHRTF /* o : Set of HRTF handle */ + IVAS_DEC_HRTF_CREND_HANDLE **hHrtfCrend /* o : Crend HRTF handle */ ); ivas_error IVAS_REND_GetHrtfFastConvHandle( diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index 3347a0c9ab5999930526f84ad7ae3df1465e3e4a..0affb9401c7505ecb162837c60979a18e3e5fb0f 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -436,8 +436,8 @@ static ivas_error TDREND_LoadBSplineBinaryITD( --------------------------------------------------------------------*/ static ivas_error TDREND_LoadBSplineBinary( - IVAS_DEC_HRTF_HANDLE HrFiltSet_p, /* i/o: HR filter model parameter structure */ - FILE *f_hrtf /* i : HR filter data file handle */ + IVAS_DEC_HRTF_TD_HANDLE HrFiltSet_p, /* i/o: HR filter model parameter structure */ + FILE *f_hrtf /* i : HR filter data file handle */ ) { ModelParams_t *model; @@ -816,7 +816,11 @@ static ivas_error load_reverb_from_binary( hHrtfStatistics->average_energy_r_dyn = (float *) malloc( lr_iac_len * sizeof( float ) ); hHrtfStatistics->inter_aural_coherence_dyn = (float *) malloc( lr_iac_len * sizeof( float ) ); +#ifdef FIX_HRTF_LEFTOVERS + if ( hHrtfStatistics->average_energy_l_dyn == NULL || hHrtfStatistics->average_energy_r_dyn == NULL || hHrtfStatistics->inter_aural_coherence_dyn == NULL ) +#else if ( hHrtfStatistics->average_energy_l_dyn == NULL || hHrtfStatistics->average_energy_l_dyn == NULL || hHrtfStatistics->inter_aural_coherence_dyn == NULL ) +#endif { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for hrtf data" ); } @@ -882,9 +886,9 @@ ivas_error load_reverb_binary( --------------------------------------------------------------------*/ static ivas_error TDREND_MIX_LoadHRTF( - FILE *f_hrtf, /* i/o: File pointer to HRTF file */ - const int32_t sampleRate, /* i : sample rate */ - IVAS_DEC_HRTF_HANDLE HrFiltSet_p /* o : Loaded HR filter set */ + FILE *f_hrtf, /* i/o: File pointer to HRTF file */ + const int32_t sampleRate, /* i : sample rate */ + IVAS_DEC_HRTF_TD_HANDLE HrFiltSet_p /* o : Loaded HR filter set */ ) { int16_t tmp; @@ -1006,7 +1010,7 @@ static ivas_error TDREND_MIX_LoadHRTF( *---------------------------------------------------------------------*/ ivas_error load_TDrend_HRTF_binary( - IVAS_DEC_HRTF_HANDLE hHrtf, /* i/o: HRTF handle */ + IVAS_DEC_HRTF_TD_HANDLE hHrtf, /* i/o: TD rend. HRTF handle */ const int32_t sampleRate, /* i : sample rate */ const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ ) @@ -1029,7 +1033,7 @@ ivas_error load_TDrend_HRTF_binary( *---------------------------------------------------------------------*/ void destroy_td_hrtf( - IVAS_DEC_HRTF_HANDLE *hHrtf /* i/o: HRTF handle */ + IVAS_DEC_HRTF_TD_HANDLE *hHrtf /* i/o: TD rend. HRTF handle */ ) { int16_t i; @@ -1099,8 +1103,8 @@ void destroy_td_hrtf( *---------------------------------------------------------------------*/ static ivas_error create_Crend_HRTF_from_rawdata( - HRTFS_HANDLE *hHRTF, /* i/o: HRTF CRend handle */ - char *hrtf_data /* i : pointer to binary file */ + HRTFS_CREND_HANDLE *hHRTF, /* i/o: HRTF CRend handle */ + char *hrtf_data /* i : pointer to binary file */ ) { int16_t i, j, k; @@ -1112,7 +1116,6 @@ static ivas_error create_Crend_HRTF_from_rawdata( ivas_error error; Word16 factorQ; - if ( hrtf_data == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; @@ -1254,7 +1257,6 @@ static ivas_error create_Crend_HRTF_from_rawdata( } } - /* coeff_im (the size depends on pIndex_frequency_max) */ for ( i = 0; i < ( *hHRTF )->max_num_ir; i++ ) { @@ -2095,7 +2097,6 @@ void destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ) { - if ( ( hHrtfStatistics != NULL ) && ( *hHrtfStatistics != NULL ) && ( ( *hHrtfStatistics )->fromROM == FALSE ) ) { if ( ( *hHrtfStatistics )->average_energy_l != NULL ) diff --git a/lib_util/hrtf_file_reader.h b/lib_util/hrtf_file_reader.h index 727e660dfb926c98983caff10cadee0872ee3407..938b5c1595024042c0ebc845fdfe9439d11b9c1c 100644 --- a/lib_util/hrtf_file_reader.h +++ b/lib_util/hrtf_file_reader.h @@ -99,7 +99,7 @@ void hrtfFileReader_close( *---------------------------------------------------------------------*/ ivas_error load_TDrend_HRTF_binary( - IVAS_DEC_HRTF_HANDLE hHrtf, /* i/o: HRTF handle */ + IVAS_DEC_HRTF_TD_HANDLE hHrtf, /* i/o: TD rend. HRTF handle */ const int32_t sampleRate, /* i : sample rate */ const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ ); @@ -192,7 +192,7 @@ void destroy_parambin_hrtf( *---------------------------------------------------------------------*/ void destroy_td_hrtf( - IVAS_DEC_HRTF_HANDLE *hHRTF /* i/o: HRTF handle */ + IVAS_DEC_HRTF_TD_HANDLE *hHRTF /* i/o: TD rend. HRTF handle */ ); /*---------------------------------------------------------------------*