diff --git a/apps/decoder.c b/apps/decoder.c index 760021ea7fc5d237e4d14b60dbd6cec29699d1fb..1e41f9054f5ee4a62f69f6518267e769535dac73 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -726,32 +726,8 @@ int main( { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { -#ifdef FIX_OLD_BINARY_FORMAT - hrtfFileReader_close( &hrtfReader ); - strcat( arg.hrtfFileName, "new" ); - - if ( hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); - goto cleanup; - } - - if ( ( error = load_HRTF_binary( *hHrtfTD, 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_td_hrtf( hHrtfTD ); - } - } -#else fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); goto cleanup; -#endif } else { @@ -797,29 +773,6 @@ int main( #ifdef NONBE_FIX_BINARY_BINAURAL_READING if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) { -#ifdef FIX_OLD_BINARY_FORMAT - cleanup_SetOfHRTF( hSetOfHRTF ); - hrtfFileReader_close( &hrtfReader ); - strcat( arg.hrtfFileName, "new" ); - - if ( hrtfFileReader_open( arg.hrtfFileName, &hrtfReader ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); - goto cleanup; - } - if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != 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_SetOfHRTF( hSetOfHRTF ); - } - } -#else if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", arg.hrtfFileName ); @@ -829,13 +782,6 @@ int main( { destroy_SetOfHRTF( hSetOfHRTF ); } -#endif - } -#else - if ( ( error = create_SetOfHRTF_from_binary( hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfFileName ); - goto cleanup; } #endif diff --git a/apps/renderer.c b/apps/renderer.c index 07222e33cdcc1b2e198d672b566e4dbe94c39efc..e230082ca8ffb5fbaca1d4363146b735cf38aca0 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1044,30 +1044,8 @@ int main( { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { -#ifdef FIX_OLD_BINARY_FORMAT - hrtfFileReader_close( &hrtfFileReader ); - strcat( args.customHrtfFilePath, "new" ); - if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); - goto cleanup; - } - if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK ) - { - if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) - { - fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); - goto cleanup; - } - else - { - destroy_td_hrtf( hHrtfTD ); - } - } -#else fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); goto cleanup; -#endif } else { @@ -1094,28 +1072,6 @@ int main( if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK ) { -#ifdef FIX_OLD_BINARY_FORMAT - cleanup_SetOfHRTF( hSetOfHRTF ); - hrtfFileReader_close( &hrtfFileReader ); - strcat( args.customHrtfFilePath, "new" ); - if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in loading HRTF binary file %s: %s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); - goto cleanup; - } - if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK ) - { - if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) - { - fprintf( stderr, "\nError in loading HRTF binary file %s:%s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); - goto cleanup; - } - else - { - destroy_SetOfHRTF( hSetOfHRTF ); - } - } -#else if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { fprintf( stderr, "\nError in loading HRTF binary file %s:%s \n\n", args.customHrtfFilePath, ivas_error_to_string( error ) ); @@ -1125,7 +1081,6 @@ int main( { destroy_SetOfHRTF( hSetOfHRTF ); } -#endif } if ( ( error = IVAS_REND_GetHrtfFastConvHandle( hIvasRend, &hHrtfFastConv ) ) != IVAS_ERR_OK ) diff --git a/lib_com/options.h b/lib_com/options.h index 820383e905426866979a7b35c7cec77558c5f3b1..77da21c095e1a0f0b7f52f73b37c027e94c163be 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -153,7 +153,6 @@ #define FIX_954_OTR_REF_VEC /* FhG: Fix forward vector direction for OTR REF VEC mode */ #define FIX_638_ENERGIE_IAC_ROM_TABLES /* Orange : Missing left/right and coherence late reverb tables in binary format*/ -#define FIX_OLD_BINARY_FORMAT /* Orange: temporary to maintain bitexactness */ #define FIX_WARNING_RENDER_CONFIG /* Orange: fix warning on windows build */ #define FIX_WARNING_SPLIT_RENDER /* Orange: fix warning on windows build vscode */ #define FIX_INV_DIFFUSE_WEIGHT /* Orange : Fix error in energy compensation in late binaural reverb*/ diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index 76a2b0351e4a0b40344c7a325d029398a282bab2..d0aff3ad2deaf8ce76c01395fa8252cce7b2b432 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -1209,18 +1209,6 @@ static ivas_error create_HRTF_from_rawdata( } #endif -#ifdef FIX_OLD_BINARY_FORMAT -#ifdef FIX_INV_DIFFUSE_WEIGHT - for ( i = 0; i < ( *hHRTF )->max_num_ir; i++ ) - { - if ( ( *hHRTF )->inv_diffuse_weight[1][i] != ( *hHRTF )->inv_diffuse_weight[0][i] ) - { - return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "HRTF binary file format not compliant (BINAURAL_CHANNELS)" ); - } - } -#endif -#endif - /* max_total_num_fsamp_per_iteration */ max_total_num_fsamp_per_iteration = *( (uint16_t *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( uint16_t ); @@ -2178,30 +2166,6 @@ static ivas_error destroy_HRTF( * * Destroy the HRTF data set. *---------------------------------------------------------------------*/ -#ifdef FIX_OLD_BINARY_FORMAT -/*---------------------------------------------------------------------* - * cleanup_SetOfHRTF() - * - * Destroy the HRTF data set. - *---------------------------------------------------------------------*/ - -void cleanup_SetOfHRTF( - HRTFS_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle */ -) -{ - if ( ( hSetOfHRTF != NULL ) && ( *hSetOfHRTF != NULL ) ) - { - destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_hrir_combined ) ); - destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_hrir_hoa3 ) ); - destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_hrir_hoa2 ) ); - destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_hrir_foa ) ); - destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_brir_combined ) ); - } - - return; -} -#endif - void destroy_SetOfHRTF( HRTFS_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle */ ) diff --git a/lib_util/hrtf_file_reader.h b/lib_util/hrtf_file_reader.h index 4befc9f2dce04e64ec6d0b3039238fbca2100c97..3299d2d6a13b5e08072ffcff134f765e21025f78 100644 --- a/lib_util/hrtf_file_reader.h +++ b/lib_util/hrtf_file_reader.h @@ -117,18 +117,6 @@ ivas_error create_SetOfHRTF_from_binary( int32_t output_Fs /* i : Output sampling frequency */ ); -#ifdef FIX_OLD_BINARY_FORMAT -/*---------------------------------------------------------------------* - * cleanup_SetOfHRTF() - * - * Destroy the HRTF data set. - *---------------------------------------------------------------------*/ - -void cleanup_SetOfHRTF( - IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle */ -); -#endif - /*---------------------------------------------------------------------* * destroy_SetOfHRTF() * diff --git a/scripts/binauralRenderer_interface/Table_Format_Converter/generate_tables_from_rom_to_bin.c b/scripts/binauralRenderer_interface/Table_Format_Converter/generate_tables_from_rom_to_bin.c index f53365a33844f62764da946bdd3f355aceac6de7..4b3faa57806ce516bf55e48462c265a8a1f1c141 100644 --- a/scripts/binauralRenderer_interface/Table_Format_Converter/generate_tables_from_rom_to_bin.c +++ b/scripts/binauralRenderer_interface/Table_Format_Converter/generate_tables_from_rom_to_bin.c @@ -55,9 +55,6 @@ #endif #define DEFAULT_INPUT_ROM_FILE "ivas_binaural" -#ifdef FIX_OLD_BINARY_FORMAT -#define DEFAULT_BIN_FILE_EXT_OUT ".binnew" -#endif #define DEFAULT_BIN_FILE_EXT ".bin" #ifdef FIX_638_ENERGIE_IAC_ROM_TABLES @@ -314,25 +311,13 @@ int main( int argc, char *argv[] ) for ( k = 0; k < nb_freq; k++ ) { -#ifdef FIX_OLD_BINARY_FORMAT - full_out_path = (char *) malloc( sizeof( char ) * ( strlen( output_path ) + 1 + strlen( output_file_name ) + 6 + strlen( DEFAULT_BIN_FILE_EXT_OUT ) + 1 ) ); -#else full_out_path = (char *) malloc( sizeof( char ) * ( strlen( output_path ) + 1 + strlen( output_file_name ) + 6 + strlen( DEFAULT_BIN_FILE_EXT ) + 1 ) ); -#endif if ( full_out_path ) { -#ifdef FIX_OLD_BINARY_FORMAT -#ifdef _WIN32 - sprintf( full_out_path, "%s\\%s_%dkHz%s", output_path, output_file_name, freq_ptr[k] / 1000, DEFAULT_BIN_FILE_EXT_OUT ); -#else - sprintf( full_out_path, "%s/%s_%dkHz%s", output_path, output_file_name, freq_ptr[k] / 1000, DEFAULT_BIN_FILE_EXT_OUT ); -#endif -#else #ifdef _WIN32 sprintf( full_out_path, "%s\\%s_%dkHz%s", output_path, output_file_name, freq_ptr[k] / 1000, DEFAULT_BIN_FILE_EXT ); #else sprintf( full_out_path, "%s/%s_%dkHz%s", output_path, output_file_name, freq_ptr[k] / 1000, DEFAULT_BIN_FILE_EXT ); -#endif #endif } else diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin index ecf077ad831255d5b9fa31c237f8c1eac3529e24..ffb4662687d6d2fa0e9cab79dd8bed54a3065ea5 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ad61e24a0be84cd5c9506b1b1b24bd9efffad1cbdedb5fb399b2599ea8b515c -size 1971738 +oid sha256:600f05865baeeb01c6435725f87c6a91e6e75e481ffae2ec3d6a7c62aba5fc7c +size 1971974 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.binnew b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.binnew deleted file mode 100644 index 1a072328c7841f63a35b8d2b1469c267e52426bd..0000000000000000000000000000000000000000 Binary files a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.binnew and /dev/null differ diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin index b8351278177a34e1f9e06336a0c9c123ca15f48a..97190b44f8bc0e595ef3d5e9e22e02893056ba0c 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3cd94b6325244546f888fd1e6a703619c8c8f952fbfc477e45ab915214504db -size 2430542 +oid sha256:cda90cc841793f0a1ed76b580e46b9989564b055b664ed6746ebfa0033a74f2b +size 2430778 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.binnew b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.binnew deleted file mode 100644 index e0a97fca3a1771ab07be982e3f8835978403743a..0000000000000000000000000000000000000000 Binary files a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.binnew and /dev/null differ diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin index 4751e031a79817feb43f96c987eba293051dd18c..e1f6981162b9f9f917b78e4f6b342e803dc8a8c4 100644 --- a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin +++ b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:879ad86ab39e789500ad973a2ae8f5e5350bd28eb57823619804e66085710fe0 -size 2673710 +oid sha256:c1654ead069a420b97af8755edbb1c358806aa3c5c07db3113789fe0942642de +size 2673946 diff --git a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.binnew b/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.binnew deleted file mode 100644 index e556de6e58f0b9b315a2be410ddc688168f9d314..0000000000000000000000000000000000000000 Binary files a/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.binnew and /dev/null differ