Loading lib_rend/ivas_crend.c +77 −0 Original line number Diff line number Diff line Loading @@ -2721,3 +2721,80 @@ ivas_error ivas_rend_crendConvolver( } #endif // VE2AT: moved here to avoid Linux build error; but should it be put somewhere else? /*---------------------------------------------------------------------* * destroy_HRTF() * * Destroy the HRTF CRend handle *---------------------------------------------------------------------*/ static ivas_error destroy_HRTF( HRTFS_HANDLE *hHRTF /* i/o: HRTF CRend handle */ ) { uint16_t i, j; if ( *hHRTF != NULL && hHRTF != NULL ) { for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) { for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { if ( ( *hHRTF )->pIndex_frequency_max[i][j] != NULL ) { free( ( *hHRTF )->pIndex_frequency_max[i][j] ); } if ( ( *hHRTF )->pOut_to_bin_re[i][j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_re[i][j] ); } if ( ( *hHRTF )->pOut_to_bin_im[i][j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_im[i][j] ); } } } for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { if ( ( *hHRTF )->pIndex_frequency_max_diffuse[j] != NULL ) { free( ( *hHRTF )->pIndex_frequency_max_diffuse[j] ); } if ( ( *hHRTF )->pOut_to_bin_diffuse_re[j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_diffuse_re[j] ); } if ( ( *hHRTF )->pOut_to_bin_diffuse_im[j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_diffuse_im[j] ); } } free( *hHRTF ); *hHRTF = NULL; } return IVAS_ERR_OK; } /*---------------------------------------------------------------------* * destroy_SetOfHRTF() * * Destroy the HRTF data set. *---------------------------------------------------------------------*/ void destroy_SetOfHRTF( HRTFS_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ ) { if ( hSetOfHRTF != NULL ) { destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_combined ) ); destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_hoa3 ) ); destroy_HRTF( &( hSetOfHRTF->hHRTF_brir_combined ) ); } return; } lib_rend/ivas_hrtf.c +0 −79 Original line number Diff line number Diff line Loading @@ -126,87 +126,8 @@ void ivas_HRTF_CRend_binary_close( return; } #endif /*---------------------------------------------------------------------* * destroy_HRTF() * * Destroy the HRTF CRend handle *---------------------------------------------------------------------*/ static ivas_error destroy_HRTF( HRTFS_HANDLE *hHRTF /* i/o: HRTF CRend handle */ ) { uint16_t i, j; if ( *hHRTF != NULL && hHRTF != NULL ) { for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) { for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { if ( ( *hHRTF )->pIndex_frequency_max[i][j] != NULL ) { free( ( *hHRTF )->pIndex_frequency_max[i][j] ); } if ( ( *hHRTF )->pOut_to_bin_re[i][j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_re[i][j] ); } if ( ( *hHRTF )->pOut_to_bin_im[i][j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_im[i][j] ); } } } for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { if ( ( *hHRTF )->pIndex_frequency_max_diffuse[j] != NULL ) { free( ( *hHRTF )->pIndex_frequency_max_diffuse[j] ); } if ( ( *hHRTF )->pOut_to_bin_diffuse_re[j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_diffuse_re[j] ); } if ( ( *hHRTF )->pOut_to_bin_diffuse_im[j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_diffuse_im[j] ); } } free( *hHRTF ); *hHRTF = NULL; } return IVAS_ERR_OK; } /*---------------------------------------------------------------------* * destroy_SetOfHRTF() * * Destroy the HRTF data set. *---------------------------------------------------------------------*/ void destroy_SetOfHRTF( HRTFS_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ ) { if ( hSetOfHRTF != NULL ) { destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_combined ) ); destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_hoa3 ) ); destroy_HRTF( &( hSetOfHRTF->hHRTF_brir_combined ) ); } return; } #ifdef HRTF_BINARY_FILE /*-----------------------------------------------------------------------* * ivas_HRTF_fastconv_binary_open() * Loading lib_rend/ivas_objectRenderer_hrFilt.c +8 −7 Original line number Diff line number Diff line Loading @@ -496,10 +496,10 @@ void HRTF_model_precalc( maximum_s( model->azimDim3, model->elevDim3, &model->azimDim3Max ); return; } /*-------------------------------------------------------------------* * BSplineModelEvalDealloc() * Loading @@ -513,6 +513,7 @@ void BSplineModelEvalDealloc( { /* Allocated in LoadBSplineBinary() */ int16_t i; if ( model->modelROM ) { free( (void *) model->azimBsShape ); /* void* cast needed to please both gcc and Visual studio compilers. Deallocating const float** should be fine and gcc agrees, but Visual studio complains. */ Loading lib_util/hrtf_file_reader.c +1 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ #include <stdio.h> #include <string.h> #include "prot.h" #include "ivas_prot.h" //#include "ivas_prot.h" #include "ivas_prot_rend.h" #ifdef HRTF_BINARY_FILE //#include "lib_dec.h" Loading Loading @@ -1559,7 +1559,6 @@ ivas_error create_SetOfHRTF_from_binary( if ( ( ( *hSetOfHRTF ).hHRTF_hrir_combined == NULL ) || ( ( *hSetOfHRTF ).hHRTF_brir_combined == NULL ) || ( ( *hSetOfHRTF ).hHRTF_hrir_hoa3 == NULL ) ) { // VE2AT: Makefile build returns "undefined reference to `destroy_SetOfHRTF'"; MSCV is happy... destroy_SetOfHRTF( hSetOfHRTF ); return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Could not create all the HRTF from binary file" ); } Loading lib_util/hrtf_file_reader.h +0 −2 Original line number Diff line number Diff line Loading @@ -84,10 +84,8 @@ ivas_error create_SetOfHRTF_from_binary( const hrtfFileReader *hrtfReader, /* i: pointer to hrtfFileReader handle */ int32_t output_Fs /* i: Output sampling frequency */ ); #endif #ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * load_fastconv_HRTF_from_binary() * Loading Loading
lib_rend/ivas_crend.c +77 −0 Original line number Diff line number Diff line Loading @@ -2721,3 +2721,80 @@ ivas_error ivas_rend_crendConvolver( } #endif // VE2AT: moved here to avoid Linux build error; but should it be put somewhere else? /*---------------------------------------------------------------------* * destroy_HRTF() * * Destroy the HRTF CRend handle *---------------------------------------------------------------------*/ static ivas_error destroy_HRTF( HRTFS_HANDLE *hHRTF /* i/o: HRTF CRend handle */ ) { uint16_t i, j; if ( *hHRTF != NULL && hHRTF != NULL ) { for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) { for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { if ( ( *hHRTF )->pIndex_frequency_max[i][j] != NULL ) { free( ( *hHRTF )->pIndex_frequency_max[i][j] ); } if ( ( *hHRTF )->pOut_to_bin_re[i][j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_re[i][j] ); } if ( ( *hHRTF )->pOut_to_bin_im[i][j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_im[i][j] ); } } } for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { if ( ( *hHRTF )->pIndex_frequency_max_diffuse[j] != NULL ) { free( ( *hHRTF )->pIndex_frequency_max_diffuse[j] ); } if ( ( *hHRTF )->pOut_to_bin_diffuse_re[j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_diffuse_re[j] ); } if ( ( *hHRTF )->pOut_to_bin_diffuse_im[j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_diffuse_im[j] ); } } free( *hHRTF ); *hHRTF = NULL; } return IVAS_ERR_OK; } /*---------------------------------------------------------------------* * destroy_SetOfHRTF() * * Destroy the HRTF data set. *---------------------------------------------------------------------*/ void destroy_SetOfHRTF( HRTFS_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ ) { if ( hSetOfHRTF != NULL ) { destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_combined ) ); destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_hoa3 ) ); destroy_HRTF( &( hSetOfHRTF->hHRTF_brir_combined ) ); } return; }
lib_rend/ivas_hrtf.c +0 −79 Original line number Diff line number Diff line Loading @@ -126,87 +126,8 @@ void ivas_HRTF_CRend_binary_close( return; } #endif /*---------------------------------------------------------------------* * destroy_HRTF() * * Destroy the HRTF CRend handle *---------------------------------------------------------------------*/ static ivas_error destroy_HRTF( HRTFS_HANDLE *hHRTF /* i/o: HRTF CRend handle */ ) { uint16_t i, j; if ( *hHRTF != NULL && hHRTF != NULL ) { for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) { for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { if ( ( *hHRTF )->pIndex_frequency_max[i][j] != NULL ) { free( ( *hHRTF )->pIndex_frequency_max[i][j] ); } if ( ( *hHRTF )->pOut_to_bin_re[i][j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_re[i][j] ); } if ( ( *hHRTF )->pOut_to_bin_im[i][j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_im[i][j] ); } } } for ( j = 0; j < BINAURAL_CHANNELS; j++ ) { if ( ( *hHRTF )->pIndex_frequency_max_diffuse[j] != NULL ) { free( ( *hHRTF )->pIndex_frequency_max_diffuse[j] ); } if ( ( *hHRTF )->pOut_to_bin_diffuse_re[j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_diffuse_re[j] ); } if ( ( *hHRTF )->pOut_to_bin_diffuse_im[j] != NULL ) { free( ( *hHRTF )->pOut_to_bin_diffuse_im[j] ); } } free( *hHRTF ); *hHRTF = NULL; } return IVAS_ERR_OK; } /*---------------------------------------------------------------------* * destroy_SetOfHRTF() * * Destroy the HRTF data set. *---------------------------------------------------------------------*/ void destroy_SetOfHRTF( HRTFS_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ ) { if ( hSetOfHRTF != NULL ) { destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_combined ) ); destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_hoa3 ) ); destroy_HRTF( &( hSetOfHRTF->hHRTF_brir_combined ) ); } return; } #ifdef HRTF_BINARY_FILE /*-----------------------------------------------------------------------* * ivas_HRTF_fastconv_binary_open() * Loading
lib_rend/ivas_objectRenderer_hrFilt.c +8 −7 Original line number Diff line number Diff line Loading @@ -496,10 +496,10 @@ void HRTF_model_precalc( maximum_s( model->azimDim3, model->elevDim3, &model->azimDim3Max ); return; } /*-------------------------------------------------------------------* * BSplineModelEvalDealloc() * Loading @@ -513,6 +513,7 @@ void BSplineModelEvalDealloc( { /* Allocated in LoadBSplineBinary() */ int16_t i; if ( model->modelROM ) { free( (void *) model->azimBsShape ); /* void* cast needed to please both gcc and Visual studio compilers. Deallocating const float** should be fine and gcc agrees, but Visual studio complains. */ Loading
lib_util/hrtf_file_reader.c +1 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ #include <stdio.h> #include <string.h> #include "prot.h" #include "ivas_prot.h" //#include "ivas_prot.h" #include "ivas_prot_rend.h" #ifdef HRTF_BINARY_FILE //#include "lib_dec.h" Loading Loading @@ -1559,7 +1559,6 @@ ivas_error create_SetOfHRTF_from_binary( if ( ( ( *hSetOfHRTF ).hHRTF_hrir_combined == NULL ) || ( ( *hSetOfHRTF ).hHRTF_brir_combined == NULL ) || ( ( *hSetOfHRTF ).hHRTF_hrir_hoa3 == NULL ) ) { // VE2AT: Makefile build returns "undefined reference to `destroy_SetOfHRTF'"; MSCV is happy... destroy_SetOfHRTF( hSetOfHRTF ); return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Could not create all the HRTF from binary file" ); } Loading
lib_util/hrtf_file_reader.h +0 −2 Original line number Diff line number Diff line Loading @@ -84,10 +84,8 @@ ivas_error create_SetOfHRTF_from_binary( const hrtfFileReader *hrtfReader, /* i: pointer to hrtfFileReader handle */ int32_t output_Fs /* i: Output sampling frequency */ ); #endif #ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * load_fastconv_HRTF_from_binary() * Loading