Loading apps/decoder.c +32 −9 Original line number Diff line number Diff line Loading @@ -806,18 +806,10 @@ int main( } #endif #ifndef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES #ifdef NONBE_FIX_BINARY_BINAURAL_READING #ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( *hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfStatistics, arg.output_Fs, hrtfReader ) ) != IVAS_ERR_OK ) #else if ( ( *hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -833,6 +825,7 @@ int main( } #endif #endif #endif #ifndef NONBE_FIX_BINARY_BINAURAL_READING IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; Loading Loading @@ -926,6 +919,36 @@ int main( fprintf( stderr, "\nError in loading HRTF binary file %s for parametric binauralizer \n\n", arg.hrtfFileName ); goto cleanup; } #endif #ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES #ifdef NONBE_FIX_BINARY_BINAURAL_READING if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_reverb_binary( *hHrtfStatistics, arg.output_Fs, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_hrtf_statistics( hHrtfStatistics ); } } #else if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } #endif #endif #endif } Loading apps/renderer.c +24 −9 Original line number Diff line number Diff line Loading @@ -1111,17 +1111,9 @@ int main( } } #ifndef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES #ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES if ( ( error = IVAS_REND_GetHrtfStatisticsHandle( hIvasRend, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_GetHrtfStatisticsHandle failed\n\n" ); goto cleanup; } if ( ( hHrtfStatistics != NULL ) && ( error = load_reverb_binary( *hHrtfStatistics, args.sampleRate, hrtfFileReader ) ) != IVAS_ERR_OK ) #else if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -1129,6 +1121,7 @@ int main( goto cleanup; } } #endif #endif if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hSetOfHRTF ) ) != IVAS_ERR_OK ) Loading Loading @@ -1187,6 +1180,28 @@ int main( destroy_parambin_hrtf( hHrtfParambin ); } } #ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES if ( ( error = IVAS_REND_GetHrtfStatisticsHandle( hIvasRend, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_GetHrtfStatisticsHandle failed\n\n" ); goto cleanup; } if ( ( error = load_reverb_binary( *hHrtfStatistics, args.sampleRate, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", args.customHrtfFilePath ); goto cleanup; } else { destroy_hrtf_statistics( hHrtfStatistics ); } } #endif #endif } hrtfFileReader_close( &hrtfFileReader ); Loading lib_util/hrtf_file_reader.c +2 −1 Original line number Diff line number Diff line Loading @@ -2262,12 +2262,13 @@ ivas_error destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ) { if ( hHrtfStatistics != NULL && ( *hHrtfStatistics )->fromROM == TRUE ) if ( hHrtfStatistics != NULL && ( *hHrtfStatistics )->fromROM == FALSE ) { free( ( *hHrtfStatistics )->average_energy_l ); free( ( *hHrtfStatistics )->average_energy_r ); free( ( *hHrtfStatistics )->inter_aural_coherence ); } ivas_HRTF_statistics_binary_close( hHrtfStatistics ); return IVAS_ERR_OK; } #endif Loading Loading
apps/decoder.c +32 −9 Original line number Diff line number Diff line Loading @@ -806,18 +806,10 @@ int main( } #endif #ifndef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES #ifdef NONBE_FIX_BINARY_BINAURAL_READING #ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( *hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfStatistics, arg.output_Fs, hrtfReader ) ) != IVAS_ERR_OK ) #else if ( ( *hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -833,6 +825,7 @@ int main( } #endif #endif #endif #ifndef NONBE_FIX_BINARY_BINAURAL_READING IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; Loading Loading @@ -926,6 +919,36 @@ int main( fprintf( stderr, "\nError in loading HRTF binary file %s for parametric binauralizer \n\n", arg.hrtfFileName ); goto cleanup; } #endif #ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES #ifdef NONBE_FIX_BINARY_BINAURAL_READING if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = load_reverb_binary( *hHrtfStatistics, arg.output_Fs, hrtfReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } else { destroy_hrtf_statistics( hHrtfStatistics ); } } #else if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( hHrtfTD, hrtfReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; } #endif #endif #endif } Loading
apps/renderer.c +24 −9 Original line number Diff line number Diff line Loading @@ -1111,17 +1111,9 @@ int main( } } #ifndef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES #ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES if ( ( error = IVAS_REND_GetHrtfStatisticsHandle( hIvasRend, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_GetHrtfStatisticsHandle failed\n\n" ); goto cleanup; } if ( ( hHrtfStatistics != NULL ) && ( error = load_reverb_binary( *hHrtfStatistics, args.sampleRate, hrtfFileReader ) ) != IVAS_ERR_OK ) #else if ( ( hHrtfTD != NULL ) && ( error = load_reverb_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -1129,6 +1121,7 @@ int main( goto cleanup; } } #endif #endif if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hSetOfHRTF ) ) != IVAS_ERR_OK ) Loading Loading @@ -1187,6 +1180,28 @@ int main( destroy_parambin_hrtf( hHrtfParambin ); } } #ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES if ( ( error = IVAS_REND_GetHrtfStatisticsHandle( hIvasRend, &hHrtfStatistics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_GetHrtfStatisticsHandle failed\n\n" ); goto cleanup; } if ( ( error = load_reverb_binary( *hHrtfStatistics, args.sampleRate, hrtfFileReader ) ) != IVAS_ERR_OK ) { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", args.customHrtfFilePath ); goto cleanup; } else { destroy_hrtf_statistics( hHrtfStatistics ); } } #endif #endif } hrtfFileReader_close( &hrtfFileReader ); Loading
lib_util/hrtf_file_reader.c +2 −1 Original line number Diff line number Diff line Loading @@ -2262,12 +2262,13 @@ ivas_error destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ) { if ( hHrtfStatistics != NULL && ( *hHrtfStatistics )->fromROM == TRUE ) if ( hHrtfStatistics != NULL && ( *hHrtfStatistics )->fromROM == FALSE ) { free( ( *hHrtfStatistics )->average_energy_l ); free( ( *hHrtfStatistics )->average_energy_r ); free( ( *hHrtfStatistics )->inter_aural_coherence ); } ivas_HRTF_statistics_binary_close( hHrtfStatistics ); return IVAS_ERR_OK; } #endif Loading