diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b05d93106cd90498cc0dee349ec1c59e97c9200..7f438da8ff6afa4a48d61cb830361cc380345141 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,13 +12,15 @@ variables: LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" TEST_SUITE: "" + DISABLE_HRTF_MODEL_TESTS: "" + # DISABLE_HRTF_MODEL_TESTS: "-k not model" #enable this declaration to disable HRTF model from file tests DUT_ENCODER_PATH: "./IVAS_cod" DUT_DECODER_PATH: "./IVAS_dec" REF_ENCODER_PATH: "./IVAS_cod_ref" REF_DECODER_PATH: "./IVAS_dec_ref" LEVEL_SCALING: "1.0" IVAS_PIPELINE_NAME: '' - BASOP_CI_BRANCH_PC_REPO: "basop-ci-branch" + BASOP_CI_BRANCH_PC_REPO: "basop-ci-branch-pc" PRM_FILES: "scripts/config/self_test.prm scripts/config/self_test_ltv.prm" TESTCASE_TIMEOUT_STV: 900 TESTCASE_TIMEOUT_LTV: 2400 @@ -235,7 +237,6 @@ stages: - cd $SCRIPTS_DIR - sed -i '/fetch/d' .git/config # Remove all fetch lines to clean out dead links - git remote set-branches --add origin "$BASOP_CI_BRANCH_PC_REPO" # Add currently used branch - - git remote set-branches --add origin main # Add main to be able to load new format HRTFs - git fetch - git restore --staged . # Needed if HRTF model files were updated. - git restore . # Just as a precaution @@ -243,10 +244,6 @@ stages: - git reset --hard origin/"$BASOP_CI_BRANCH_PC_REPO" - git pull -# Restore new format of HRTF binary - - git fetch origin main - - git checkout 78154d0b3f1b2c6c8ff8a234f3f7cf865d467d35 -- scripts/binauralRenderer_interface/binaural_renderers_hrtf_data - - cd - - cp -r $SCRIPTS_DIR/ci . - cp -r $SCRIPTS_DIR/scripts . @@ -2037,7 +2034,7 @@ ivas-pytest-on-merge-request: ### prepare pytest # create references - - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 -k "not model" + - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 $DISABLE_HRTF_MODEL_TESTS ### Run test using branch scripts and input - if [ $ref_using_target == 1 ]; then git checkout $source_branch_commit_sha; fi @@ -2045,7 +2042,7 @@ ivas-pytest-on-merge-request: ### run pytest - exit_code=0 - testcase_timeout=60 - - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout -k "not model" || exit_code=$? + - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout $DISABLE_HRTF_MODEL_TESTS || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - *merge-request-comparison-check diff --git a/apps/decoder.c b/apps/decoder.c index 70a3b5f9ab135256469d11b78f45731f80e8715c..1c6d3efbb4d2125f9b7ead381d8123b3fa437e7d 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -701,32 +701,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 { @@ -753,29 +729,6 @@ int main( 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 ); @@ -785,7 +738,6 @@ int main( { destroy_SetOfHRTF( hSetOfHRTF ); } -#endif } IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; diff --git a/apps/renderer.c b/apps/renderer.c index 58b6fdbba6af3ad8ef38e989ed7d0cf4b8198400..c32c31122dc3442459aca31ea4700e6d931ed8e2 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -901,30 +901,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 { @@ -951,28 +929,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 ) ); @@ -982,7 +938,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 4cd497a76fce06cddb18aaf958d13b2a8020fd6e..7f5e532e30c669d6e1c95ae22f02ac89740309d4 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -184,15 +184,11 @@ #define FIX_960_SYN_OUTPUT /* VA: issue 960: unused function syn_output() is removed */ #define USE_NEW_HRTF_BINARY_FILE_FORMAT /* Orange: to activate when decided to change the hrtf binary file format */ -#ifdef USE_NEW_HRTF_BINARY_FILE_FORMAT -#define FIX_OLD_BINARY_FORMAT /* Orange: trick to make tests succesful when changing hrtf binary format between ref and new branch*/ //#define NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES /* Philips: Use pre-computed HRTF average L/R energies and IAC in all renderers */ -#endif //#define FIX_638_ENERGIE_IAC_ROM_TABLES /* Orange: Missing left/right and coherence late reverb tables in binary format */ #define FIX_WARNING_RENDER_CONFIG /* Orange: fix warning on windows build */ #define FIX_INV_DIFFUSE_WEIGHT /* Orange : Fix error in energy compensation in late binaural */ - #define FIX_1002_DEC_PHASE_ECU_USAN_OF_PHASE /* Eri: issue #1002, usan-value-out-of-range-for-int16, kept BE for PLC-conditions */ //#define FIX_777_COMBI_RENDER_CONFIG_FILE /* Philips: Fix for combined renderer config file support */ #define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */ diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index 80af6cfd8c471592a68805048cc916cf89c5a7ba..2522aadb88250a8b0ac8f7cf53ee633be0b914a8 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -1152,17 +1152,6 @@ static ivas_error create_HRTF_from_rawdata( #endif #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 ) ); @@ -2080,29 +2069,6 @@ static void 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 1ab193a34b3cd638ccb5463ea22886b377733178..2d0eeeb41b67e93a86a1c66bc061f70d1dd2e115 100644 --- a/lib_util/hrtf_file_reader.h +++ b/lib_util/hrtf_file_reader.h @@ -119,17 +119,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()