Loading lib_rend/ivas_crend.c +17 −4 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ static ivas_error ivas_hrtf_open( return IVAS_ERR_OK; } #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM /*------------------------------------------------------------------------- * ivas_hrtf_close() * Loading @@ -161,7 +161,7 @@ static void ivas_hrtf_close( return; } #endif /*------------------------------------------------------------------------- * ivas_rend_initCrend() Loading Loading @@ -203,6 +203,10 @@ static ivas_error ivas_rend_initCrend( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Encountered unsupported output type in Crend" ); } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM pCrend->hrtf_handle_reuse_flag = 0; #endif if ( hHrtf == NULL ) { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM Loading @@ -228,10 +232,14 @@ static ivas_error ivas_rend_initCrend( } #endif #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM pCrend->hrtf_handle_reuse_flag = 1; #endif hHrtf->init_from_rom = 0; } else { /* create new handle when HRTF is loaded from ROM, or external renderer is used */ if ( ( error = ivas_hrtf_openCrend( &hHrtf ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -1317,6 +1325,9 @@ ivas_error ivas_rend_initCrendWrapper( ( *pCrend )->binaural_latency_ns = 0; ( *pCrend )->hHrtfCrend = NULL; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM ( *pCrend )->hrtf_handle_reuse_flag = 0; #endif for ( pos_idx = 0; pos_idx < num_poses; pos_idx++ ) { Loading Loading @@ -1604,13 +1615,15 @@ void ivas_rend_closeCrend( return; } #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( *pCrend )->hrtf_handle_reuse_flag == 0 && ( *pCrend )->hHrtfCrend != NULL ) #else if ( ( *pCrend )->hHrtfCrend != NULL ) #endif { ivas_hrtf_close( &( *pCrend )->hHrtfCrend ); } #endif for ( pos_idx = 0; pos_idx < num_poses; pos_idx++ ) { hCrend = ( *pCrend )->hCrend[pos_idx]; Loading lib_rend/ivas_stat_rend.h +3 −0 Original line number Diff line number Diff line Loading @@ -1210,6 +1210,9 @@ typedef struct ivas_binaural_crend_wrapper_struct int32_t binaural_latency_ns; CREND_HANDLE hCrend[MAX_HEAD_ROT_POSES]; HRTFS_HANDLE hHrtfCrend; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM int16_t hrtf_handle_reuse_flag; #endif } CREND_WRAPPER, *CREND_WRAPPER_HANDLE; Loading Loading
lib_rend/ivas_crend.c +17 −4 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ static ivas_error ivas_hrtf_open( return IVAS_ERR_OK; } #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM /*------------------------------------------------------------------------- * ivas_hrtf_close() * Loading @@ -161,7 +161,7 @@ static void ivas_hrtf_close( return; } #endif /*------------------------------------------------------------------------- * ivas_rend_initCrend() Loading Loading @@ -203,6 +203,10 @@ static ivas_error ivas_rend_initCrend( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Encountered unsupported output type in Crend" ); } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM pCrend->hrtf_handle_reuse_flag = 0; #endif if ( hHrtf == NULL ) { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM Loading @@ -228,10 +232,14 @@ static ivas_error ivas_rend_initCrend( } #endif #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM pCrend->hrtf_handle_reuse_flag = 1; #endif hHrtf->init_from_rom = 0; } else { /* create new handle when HRTF is loaded from ROM, or external renderer is used */ if ( ( error = ivas_hrtf_openCrend( &hHrtf ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -1317,6 +1325,9 @@ ivas_error ivas_rend_initCrendWrapper( ( *pCrend )->binaural_latency_ns = 0; ( *pCrend )->hHrtfCrend = NULL; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM ( *pCrend )->hrtf_handle_reuse_flag = 0; #endif for ( pos_idx = 0; pos_idx < num_poses; pos_idx++ ) { Loading Loading @@ -1604,13 +1615,15 @@ void ivas_rend_closeCrend( return; } #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( *pCrend )->hrtf_handle_reuse_flag == 0 && ( *pCrend )->hHrtfCrend != NULL ) #else if ( ( *pCrend )->hHrtfCrend != NULL ) #endif { ivas_hrtf_close( &( *pCrend )->hHrtfCrend ); } #endif for ( pos_idx = 0; pos_idx < num_poses; pos_idx++ ) { hCrend = ( *pCrend )->hCrend[pos_idx]; Loading
lib_rend/ivas_stat_rend.h +3 −0 Original line number Diff line number Diff line Loading @@ -1210,6 +1210,9 @@ typedef struct ivas_binaural_crend_wrapper_struct int32_t binaural_latency_ns; CREND_HANDLE hCrend[MAX_HEAD_ROT_POSES]; HRTFS_HANDLE hHrtfCrend; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM int16_t hrtf_handle_reuse_flag; #endif } CREND_WRAPPER, *CREND_WRAPPER_HANDLE; Loading