Loading .gitlab-ci.yml +13 −7 Original line number Diff line number Diff line Loading @@ -228,12 +228,12 @@ stages: - if [ $CLANG_NUM -eq 1 ]; then sanitizer_type="MemorySanitizer"; elif [ $CLANG_NUM -eq 2 ]; then sanitizer_type="AddressSanitizer"; elif [ $CLANG_NUM -eq 3 ]; then sanitizer_type="UndefinedBehaviorSanitizer"; else echo "Wrong CLANG_NUM $CLANG_NUM given!"; exit 1; fi # run encoder and decoder with 20ms renderer framesize first, use reference creation mode - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py --param_file $SELF_TEST_PRM_FILE -v --update_ref 1 --html=report-20ms.html --self-contained-html --junit-xml=report-junit-20ms.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code20=$? - python3 -m pytest tests/codec_be_on_mr_nonselection $USE_LTV --param_file $SELF_TEST_PRM_FILE -v --update_ref 1 --html=report-20ms.html --self-contained-html --junit-xml=report-junit-20ms.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code20=$? # for 10ms and 5ms renderer framesize, we only need to run the decoder part as renderer framesize is a decoder-only option # set tolerance very high do ignore any BE differences due to the different renderer framesizes, those can appear due to the limiter being active # we are only interested in runtime errors from the sanitizers and ignore the diffs - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py --param_file $SELF_TEST_PRM_FILE -v --html=report-5ms.html --self-contained-html --junit-xml=report-junit-5ms.xml --dut_fr 5 --decoder_only --abs_tol 100000 || exit_code5=$? - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py --param_file $SELF_TEST_PRM_FILE -v --html=report-10ms.html --self-contained-html --junit-xml=report-junit-10ms.xml --dut_fr 10 --decoder_only --abs_tol 100000 || exit_code10=$? - python3 -m pytest tests/codec_be_on_mr_nonselection $USE_LTV --param_file $SELF_TEST_PRM_FILE -v --html=report-5ms.html --self-contained-html --junit-xml=report-junit-5ms.xml --dut_fr 5 --decoder_only --abs_tol 100000 || exit_code5=$? - python3 -m pytest tests/codec_be_on_mr_nonselection $USE_LTV --param_file $SELF_TEST_PRM_FILE -v --html=report-10ms.html --self-contained-html --junit-xml=report-junit-10ms.xml --dut_fr 10 --decoder_only --abs_tol 100000 || exit_code10=$? - if [ $exit_code20 -ne 0 ] || [ $exit_code10 -ne 0 ] || [ $exit_code5 -ne 0 ]; then exit 1; fi Loading Loading @@ -570,6 +570,7 @@ codec-msan: - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" <<: *sanitizer-selftest-anchor # code selftest testvectors with address-sanitizer binaries Loading @@ -580,6 +581,7 @@ codec-asan: - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" <<: *sanitizer-selftest-anchor # code selftest testvectors with undefined-behaviour-sanitizer binaries Loading @@ -592,6 +594,7 @@ codec-usan: - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" <<: *sanitizer-selftest-anchor # compare bit-exactness between 5ms and 20 on the branch Loading Loading @@ -1206,7 +1209,7 @@ check-bitexactness-ext-and-transport-format: # check bitexactness to EVS windows binaries be-2-evs-windows: extends: - .rules-main-push - .rules-merge-request tags: - ivas-windows stage: test Loading Loading @@ -1612,11 +1615,11 @@ test-long-self-test: # create references - exit_code_ref=0 - testcase_timeout=300 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v --update_ref 1 --param_file scripts/config/self_test_ltv.prm --testcase_timeout=$testcase_timeout || exit_code_ref=$? - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR --use_ltv -v --update_ref 1 --param_file scripts/config/self_test_ltv.prm --testcase_timeout=$testcase_timeout || exit_code_ref=$? ### run pytest self-test using long test vectors - exit_code=0 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v --param_file scripts/config/self_test_ltv.prm --html=report-ltv.html --self-contained-html --junit-xml=report-junit-ltv.xml --testcase_timeout=$testcase_timeout || exit_code=$? - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR --use_ltv -v --param_file scripts/config/self_test_ltv.prm --html=report-ltv.html --self-contained-html --junit-xml=report-junit-ltv.xml --testcase_timeout=$testcase_timeout || exit_code=$? - zero_errors=$(cat report-junit-ltv.xml | grep -c 'errors="0"') || true - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi Loading Loading @@ -1654,6 +1657,7 @@ ltv-msan: - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" <<: *sanitizer-selftest-anchor # code selftest long testvectors with address-sanitizer binaries Loading @@ -1671,6 +1675,7 @@ ltv-asan: - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" <<: *sanitizer-selftest-anchor # code selftest long testvectors with undefined-behaviour-sanitizer binaries Loading @@ -1688,6 +1693,7 @@ ltv-usan: - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" <<: *sanitizer-selftest-anchor .sanitizer-test-template: Loading Loading @@ -2223,7 +2229,7 @@ coverage-test-on-main-scheduled: - .test-job-linux-needs-testv-dir - .rules-main-scheduled tags: - ivas-linux - ivas-linux-fast stage: test rules: # only run in scheduled pipeline that passes this env vars Loading apps/decoder.c +148 −7 Original line number Diff line number Diff line Loading @@ -54,6 +54,11 @@ #include "debug.h" #endif #include "wmc_auto.h" #ifdef OBJ_EDITING_API #ifdef OBJ_EDITING_EXAMPLE #include <math.h> #endif #endif #define WMC_TOOL_SKIP Loading Loading @@ -150,6 +155,9 @@ typedef struct AcousticEnvironmentSequence aeSequence; bool dpidEnabled; uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; #ifdef OBJ_EDITING_EXAMPLE bool objEditEnabled; #endif } DecArguments; Loading Loading @@ -400,6 +408,7 @@ int main( } } #ifndef FIX_1158_FASTCONV_REVERB_HRTF /*------------------------------------------------------------------------------------------* * Open renderer configuration reader file *------------------------------------------------------------------------------------------*/ Loading @@ -419,6 +428,7 @@ int main( goto cleanup; } } #endif /*------------------------------------------------------------------------------------------* * Configure the decoder Loading Loading @@ -606,6 +616,14 @@ int main( goto cleanup; } #ifdef FIX_1158_FASTCONV_REVERB_HRTF if ( ( error = RenderConfigReader_open( arg.renderConfigFilename, &renderConfigReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open Renderer configuration file %s \n\n", arg.renderConfigFilename ); goto cleanup; } #endif if ( RenderConfigReader_read( renderConfigReader, arg.renderConfigFilename, &renderConfig ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); Loading Loading @@ -1091,6 +1109,11 @@ static bool parseCmdlIVAS_dec( arg->directivityPatternId[i] = 65535; } #ifdef OBJ_EDITING_EXAMPLE arg->objEditEnabled = false; #endif /*-----------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ Loading Loading @@ -1544,6 +1567,14 @@ static bool parseCmdlIVAS_dec( i += tmp; } #ifdef OBJ_EDITING_EXAMPLE else if ( strcmp( argv_to_upper, "-OBJ_EDIT" ) == 0 ) { arg->objEditEnabled = true; i++; } #endif /*-----------------------------------------------------------------* * Option not recognized *-----------------------------------------------------------------*/ Loading Loading @@ -1748,6 +1779,9 @@ static void usage_dec( void ) fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); fprintf( stdout, " default is deactivated\n" ); #ifdef OMASA_OBJECT_EDITING fprintf( stdout, "-obj_edit : enable object editing\n" ); #endif #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK fprintf( stdout, "-info <folder> : specify subfolder name for debug output\n" ); Loading Loading @@ -2115,6 +2149,10 @@ static ivas_error decodeG192( return error; } #ifdef OBJ_EDITING_API IVAS_EDITABLE_PARAMETERS editableParameters; #endif IVAS_RENDER_CONFIG_DATA renderConfig; RenderConfigReader *renderConfigReader = NULL; Loading Loading @@ -2416,11 +2454,84 @@ static ivas_error decodeG192( } #endif /* Feed into decoder */ if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi #ifdef OBJ_EDITING_API , isSplitRend, splitRendBits #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef OBJ_EDITING_API #ifdef OBJ_EDITING_EXAMPLE if ( arg.objEditEnabled ) { /* Do object info editing here */ /* get object parameters */ if ( ( error = IVAS_DEC_GetEditableParameters( hIvasDec, &editableParameters ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not get the editable parameters: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } /* edit object parameters...*/ /* put the objects equally spaced at the horizontal plane */ /* and play a little bit with the gains... */ int16_t obj_idx, non_diegetic_obj_idx; int16_t num_nondiegetic_objects; num_nondiegetic_objects = 0; for ( obj_idx = 0; obj_idx < editableParameters.num_obj; obj_idx++ ) { if ( !editableParameters.ism_metadata[obj_idx].non_diegetic_flag ) { num_nondiegetic_objects++; } } if ( num_nondiegetic_objects ) { float start_angle, angle_inc; angle_inc = 360.0f / (float) num_nondiegetic_objects; start_angle = angle_inc / 2.0f; for ( obj_idx = 0, non_diegetic_obj_idx = 0; obj_idx < editableParameters.num_obj; obj_idx++ ) { if ( !editableParameters.ism_metadata[obj_idx].non_diegetic_flag ) { editableParameters.ism_metadata[obj_idx].elevation = 0.0f; editableParameters.ism_metadata[obj_idx].azimuth = start_angle + (float) non_diegetic_obj_idx * angle_inc; non_diegetic_obj_idx++; } } } /* breakover object gains */ for ( obj_idx = 0; obj_idx < editableParameters.num_obj; obj_idx++ ) { editableParameters.ism_metadata[obj_idx].gain = 0.5f + (float) ( ( frame + obj_idx * 50 ) % 250 ) / 250.0f; } editableParameters.gain_bed = 0.5f; /* set new object parameters*/ if ( ( error = IVAS_DEC_SetEditableParameters( hIvasDec, editableParameters ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not set the editable parameters: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } #endif /* Do the final preparations needed for rendering */ if ( ( error = IVAS_DEC_PrepareRenderer( hIvasDec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not prepare the renderer: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #endif } if ( isSplitRend ) Loading Loading @@ -2970,6 +3081,11 @@ static ivas_error decodeVoIP( int16_t vec_pos_update, vec_pos_len; int16_t nOutSamples = 0; #ifdef OBJ_EDITING_API bool parameterAvailableForEditing = false; uint16_t nSamplesRendered = 0; #endif vec_pos_update = 0; if ( ( error = IVAS_DEC_GetRenderFramesizeMs( hIvasDec, &systemTimeInc_ms ) ) != IVAS_ERR_OK ) { Loading Loading @@ -3086,6 +3202,9 @@ static ivas_error decodeVoIP( while ( 1 ) { #ifdef OBJ_EDITING_API nSamplesRendered = 0; #endif /* reference vector */ if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) Loading Loading @@ -3248,15 +3367,37 @@ static ivas_error decodeVoIP( /* decode and get samples */ #ifdef OBJ_EDITING_API while ( nSamplesRendered < nOutSamples ) { #endif #ifdef SUPPORT_JBM_TRACEFILE if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter #ifdef OBJ_EDITING_API , &nSamplesRendered, ¶meterAvailableForEditing #endif ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, &nSamplesRendered, ¶meterAvailableForEditing #ifdef OBJ_EDITING_API & nSamplesRendered, ¶meterAvailableForEditing #endif ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef OBJ_EDITING_API if ( parameterAvailableForEditing == true ) { /* do the object editing here */ } } /* while ( nSamplesRendered < nOutSamples ) */ #endif /* write JBM Offset file entry */ if ( jbmOffsetWriter != NULL ) Loading apps/renderer.c +0 −14 Original line number Diff line number Diff line Loading @@ -169,10 +169,8 @@ typedef struct char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; int8_t orientation_tracking; #ifdef FIX_1135_EXT_RENDERER_HANDLES int16_t Opt_Headrotation; int16_t Opt_ExternalOrientation; #endif int16_t nonDiegeticPan; float nonDiegeticPanGain; IVAS_REND_COMPLEXITY_LEVEL complexityLevel; Loading Loading @@ -886,11 +884,7 @@ int main( const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, args.Opt_Headrotation, args.Opt_ExternalOrientation, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading Loading @@ -2518,10 +2512,8 @@ static CmdlnArgs defaultArgs( clearString( args.renderConfigFilePath ); clearString( args.externalOrientationFilePath ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args.Opt_Headrotation = 0; args.Opt_ExternalOrientation = 0; #endif args.orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; args.nonDiegeticPan = 0; Loading Loading @@ -2611,9 +2603,7 @@ static void parseOption( break; case CmdLnOptionId_trajFile: assert( numOptionValues == 1 ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args->Opt_Headrotation = 1; #endif strncpy( args->headRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; case CmdLnOptionId_outputMetadata: Loading @@ -2634,9 +2624,7 @@ static void parseOption( break; case CmdLnOptionId_exteriorOrientationFile: assert( numOptionValues == 1 ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args->Opt_ExternalOrientation = 1; #endif strncpy( args->externalOrientationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; case CmdLnOptionId_customHrtfFile: Loading Loading @@ -2761,12 +2749,10 @@ static CmdlnArgs parseCmdlnArgs( exit( -1 ); /* Error printout handled by failing function */ } #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { args.Opt_Headrotation = 1; } #endif return args; } Loading ci/basop-pages/basop_index.html +5 −0 Original line number Diff line number Diff line Loading @@ -15,4 +15,9 @@ <li><a href="ivas-pytest-compare_ref-long-enc-lev+10-index.html">ivas-pytest-compare_ref-long-enc-lev+10</a></li> <li><a href="ivas-pytest-compare_ref-long-enc-lev-10-index.html">ivas-pytest-compare_ref-long-enc-lev-10</a></li> </ul> <h3>Complexity Reports</h3> {} </body> ci/basop-pages/create_report_pages.py +12 −5 Original line number Diff line number Diff line Loading @@ -199,11 +199,15 @@ def tr_from_row(row, id_current, id_previous): if float(curr) > float(prev): curr += f" {ARROW_UP}" # increase is bad -> mark in red, execpt for SNR for which it is good -> mark in green td_tmpl_curr = TD_TMPL_REDUCE if c == "MIN_SSNR" else TD_TMPL_INCREASE td_tmpl_curr = ( TD_TMPL_REDUCE if c == "MIN_SSNR" else TD_TMPL_INCREASE ) elif float(curr) < float(prev): curr += f" {ARROW_DOWN}" # reduce is good -> mark in green, execpt for SNR for which it is bad -> mark in red td_tmpl_curr = TD_TMPL_INCREASE if c == "MIN_SSNR" else TD_TMPL_REDUCE td_tmpl_curr = ( TD_TMPL_INCREASE if c == "MIN_SSNR" else TD_TMPL_REDUCE ) except ValueError: # if we land here, one of the cells is not a number, this indicates a crash # or some error in the scripts, so mark with red as well Loading Loading @@ -295,6 +299,7 @@ def merge_tables(tbl1, tbl2, suffix1, suffix2, merge_key, other_keys): for key in other_keys: new_row[f"{key}-{suffix1}"] = row1[key] found_merge_key_in_both_tbls = False for row2 in tbl2: if row1[merge_key] == row2[merge_key]: new_row[merge_key] = row1[merge_key] Loading @@ -303,14 +308,16 @@ def merge_tables(tbl1, tbl2, suffix1, suffix2, merge_key, other_keys): new_row[f"{key}-{suffix2}"] = row2[key] else: new_row[f"{key}-{suffix2}"] = "" found_merge_key_in_both_tbls = True break if found_merge_key_in_both_tbls: merged.append(new_row) return merged if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("html_out") Loading Loading
.gitlab-ci.yml +13 −7 Original line number Diff line number Diff line Loading @@ -228,12 +228,12 @@ stages: - if [ $CLANG_NUM -eq 1 ]; then sanitizer_type="MemorySanitizer"; elif [ $CLANG_NUM -eq 2 ]; then sanitizer_type="AddressSanitizer"; elif [ $CLANG_NUM -eq 3 ]; then sanitizer_type="UndefinedBehaviorSanitizer"; else echo "Wrong CLANG_NUM $CLANG_NUM given!"; exit 1; fi # run encoder and decoder with 20ms renderer framesize first, use reference creation mode - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py --param_file $SELF_TEST_PRM_FILE -v --update_ref 1 --html=report-20ms.html --self-contained-html --junit-xml=report-junit-20ms.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code20=$? - python3 -m pytest tests/codec_be_on_mr_nonselection $USE_LTV --param_file $SELF_TEST_PRM_FILE -v --update_ref 1 --html=report-20ms.html --self-contained-html --junit-xml=report-junit-20ms.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code20=$? # for 10ms and 5ms renderer framesize, we only need to run the decoder part as renderer framesize is a decoder-only option # set tolerance very high do ignore any BE differences due to the different renderer framesizes, those can appear due to the limiter being active # we are only interested in runtime errors from the sanitizers and ignore the diffs - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py --param_file $SELF_TEST_PRM_FILE -v --html=report-5ms.html --self-contained-html --junit-xml=report-junit-5ms.xml --dut_fr 5 --decoder_only --abs_tol 100000 || exit_code5=$? - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py --param_file $SELF_TEST_PRM_FILE -v --html=report-10ms.html --self-contained-html --junit-xml=report-junit-10ms.xml --dut_fr 10 --decoder_only --abs_tol 100000 || exit_code10=$? - python3 -m pytest tests/codec_be_on_mr_nonselection $USE_LTV --param_file $SELF_TEST_PRM_FILE -v --html=report-5ms.html --self-contained-html --junit-xml=report-junit-5ms.xml --dut_fr 5 --decoder_only --abs_tol 100000 || exit_code5=$? - python3 -m pytest tests/codec_be_on_mr_nonselection $USE_LTV --param_file $SELF_TEST_PRM_FILE -v --html=report-10ms.html --self-contained-html --junit-xml=report-junit-10ms.xml --dut_fr 10 --decoder_only --abs_tol 100000 || exit_code10=$? - if [ $exit_code20 -ne 0 ] || [ $exit_code10 -ne 0 ] || [ $exit_code5 -ne 0 ]; then exit 1; fi Loading Loading @@ -570,6 +570,7 @@ codec-msan: - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" <<: *sanitizer-selftest-anchor # code selftest testvectors with address-sanitizer binaries Loading @@ -580,6 +581,7 @@ codec-asan: - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" <<: *sanitizer-selftest-anchor # code selftest testvectors with undefined-behaviour-sanitizer binaries Loading @@ -592,6 +594,7 @@ codec-usan: - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" <<: *sanitizer-selftest-anchor # compare bit-exactness between 5ms and 20 on the branch Loading Loading @@ -1206,7 +1209,7 @@ check-bitexactness-ext-and-transport-format: # check bitexactness to EVS windows binaries be-2-evs-windows: extends: - .rules-main-push - .rules-merge-request tags: - ivas-windows stage: test Loading Loading @@ -1612,11 +1615,11 @@ test-long-self-test: # create references - exit_code_ref=0 - testcase_timeout=300 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v --update_ref 1 --param_file scripts/config/self_test_ltv.prm --testcase_timeout=$testcase_timeout || exit_code_ref=$? - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR --use_ltv -v --update_ref 1 --param_file scripts/config/self_test_ltv.prm --testcase_timeout=$testcase_timeout || exit_code_ref=$? ### run pytest self-test using long test vectors - exit_code=0 - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v --param_file scripts/config/self_test_ltv.prm --html=report-ltv.html --self-contained-html --junit-xml=report-junit-ltv.xml --testcase_timeout=$testcase_timeout || exit_code=$? - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR --use_ltv -v --param_file scripts/config/self_test_ltv.prm --html=report-ltv.html --self-contained-html --junit-xml=report-junit-ltv.xml --testcase_timeout=$testcase_timeout || exit_code=$? - zero_errors=$(cat report-junit-ltv.xml | grep -c 'errors="0"') || true - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi Loading Loading @@ -1654,6 +1657,7 @@ ltv-msan: - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" <<: *sanitizer-selftest-anchor # code selftest long testvectors with address-sanitizer binaries Loading @@ -1671,6 +1675,7 @@ ltv-asan: - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" <<: *sanitizer-selftest-anchor # code selftest long testvectors with undefined-behaviour-sanitizer binaries Loading @@ -1688,6 +1693,7 @@ ltv-usan: - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" <<: *sanitizer-selftest-anchor .sanitizer-test-template: Loading Loading @@ -2223,7 +2229,7 @@ coverage-test-on-main-scheduled: - .test-job-linux-needs-testv-dir - .rules-main-scheduled tags: - ivas-linux - ivas-linux-fast stage: test rules: # only run in scheduled pipeline that passes this env vars Loading
apps/decoder.c +148 −7 Original line number Diff line number Diff line Loading @@ -54,6 +54,11 @@ #include "debug.h" #endif #include "wmc_auto.h" #ifdef OBJ_EDITING_API #ifdef OBJ_EDITING_EXAMPLE #include <math.h> #endif #endif #define WMC_TOOL_SKIP Loading Loading @@ -150,6 +155,9 @@ typedef struct AcousticEnvironmentSequence aeSequence; bool dpidEnabled; uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; #ifdef OBJ_EDITING_EXAMPLE bool objEditEnabled; #endif } DecArguments; Loading Loading @@ -400,6 +408,7 @@ int main( } } #ifndef FIX_1158_FASTCONV_REVERB_HRTF /*------------------------------------------------------------------------------------------* * Open renderer configuration reader file *------------------------------------------------------------------------------------------*/ Loading @@ -419,6 +428,7 @@ int main( goto cleanup; } } #endif /*------------------------------------------------------------------------------------------* * Configure the decoder Loading Loading @@ -606,6 +616,14 @@ int main( goto cleanup; } #ifdef FIX_1158_FASTCONV_REVERB_HRTF if ( ( error = RenderConfigReader_open( arg.renderConfigFilename, &renderConfigReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open Renderer configuration file %s \n\n", arg.renderConfigFilename ); goto cleanup; } #endif if ( RenderConfigReader_read( renderConfigReader, arg.renderConfigFilename, &renderConfig ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); Loading Loading @@ -1091,6 +1109,11 @@ static bool parseCmdlIVAS_dec( arg->directivityPatternId[i] = 65535; } #ifdef OBJ_EDITING_EXAMPLE arg->objEditEnabled = false; #endif /*-----------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ Loading Loading @@ -1544,6 +1567,14 @@ static bool parseCmdlIVAS_dec( i += tmp; } #ifdef OBJ_EDITING_EXAMPLE else if ( strcmp( argv_to_upper, "-OBJ_EDIT" ) == 0 ) { arg->objEditEnabled = true; i++; } #endif /*-----------------------------------------------------------------* * Option not recognized *-----------------------------------------------------------------*/ Loading Loading @@ -1748,6 +1779,9 @@ static void usage_dec( void ) fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); fprintf( stdout, " default is deactivated\n" ); #ifdef OMASA_OBJECT_EDITING fprintf( stdout, "-obj_edit : enable object editing\n" ); #endif #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK fprintf( stdout, "-info <folder> : specify subfolder name for debug output\n" ); Loading Loading @@ -2115,6 +2149,10 @@ static ivas_error decodeG192( return error; } #ifdef OBJ_EDITING_API IVAS_EDITABLE_PARAMETERS editableParameters; #endif IVAS_RENDER_CONFIG_DATA renderConfig; RenderConfigReader *renderConfigReader = NULL; Loading Loading @@ -2416,11 +2454,84 @@ static ivas_error decodeG192( } #endif /* Feed into decoder */ if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi #ifdef OBJ_EDITING_API , isSplitRend, splitRendBits #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef OBJ_EDITING_API #ifdef OBJ_EDITING_EXAMPLE if ( arg.objEditEnabled ) { /* Do object info editing here */ /* get object parameters */ if ( ( error = IVAS_DEC_GetEditableParameters( hIvasDec, &editableParameters ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not get the editable parameters: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } /* edit object parameters...*/ /* put the objects equally spaced at the horizontal plane */ /* and play a little bit with the gains... */ int16_t obj_idx, non_diegetic_obj_idx; int16_t num_nondiegetic_objects; num_nondiegetic_objects = 0; for ( obj_idx = 0; obj_idx < editableParameters.num_obj; obj_idx++ ) { if ( !editableParameters.ism_metadata[obj_idx].non_diegetic_flag ) { num_nondiegetic_objects++; } } if ( num_nondiegetic_objects ) { float start_angle, angle_inc; angle_inc = 360.0f / (float) num_nondiegetic_objects; start_angle = angle_inc / 2.0f; for ( obj_idx = 0, non_diegetic_obj_idx = 0; obj_idx < editableParameters.num_obj; obj_idx++ ) { if ( !editableParameters.ism_metadata[obj_idx].non_diegetic_flag ) { editableParameters.ism_metadata[obj_idx].elevation = 0.0f; editableParameters.ism_metadata[obj_idx].azimuth = start_angle + (float) non_diegetic_obj_idx * angle_inc; non_diegetic_obj_idx++; } } } /* breakover object gains */ for ( obj_idx = 0; obj_idx < editableParameters.num_obj; obj_idx++ ) { editableParameters.ism_metadata[obj_idx].gain = 0.5f + (float) ( ( frame + obj_idx * 50 ) % 250 ) / 250.0f; } editableParameters.gain_bed = 0.5f; /* set new object parameters*/ if ( ( error = IVAS_DEC_SetEditableParameters( hIvasDec, editableParameters ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not set the editable parameters: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } #endif /* Do the final preparations needed for rendering */ if ( ( error = IVAS_DEC_PrepareRenderer( hIvasDec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not prepare the renderer: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #endif } if ( isSplitRend ) Loading Loading @@ -2970,6 +3081,11 @@ static ivas_error decodeVoIP( int16_t vec_pos_update, vec_pos_len; int16_t nOutSamples = 0; #ifdef OBJ_EDITING_API bool parameterAvailableForEditing = false; uint16_t nSamplesRendered = 0; #endif vec_pos_update = 0; if ( ( error = IVAS_DEC_GetRenderFramesizeMs( hIvasDec, &systemTimeInc_ms ) ) != IVAS_ERR_OK ) { Loading Loading @@ -3086,6 +3202,9 @@ static ivas_error decodeVoIP( while ( 1 ) { #ifdef OBJ_EDITING_API nSamplesRendered = 0; #endif /* reference vector */ if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) Loading Loading @@ -3248,15 +3367,37 @@ static ivas_error decodeVoIP( /* decode and get samples */ #ifdef OBJ_EDITING_API while ( nSamplesRendered < nOutSamples ) { #endif #ifdef SUPPORT_JBM_TRACEFILE if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter #ifdef OBJ_EDITING_API , &nSamplesRendered, ¶meterAvailableForEditing #endif ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, &nSamplesRendered, ¶meterAvailableForEditing #ifdef OBJ_EDITING_API & nSamplesRendered, ¶meterAvailableForEditing #endif ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef OBJ_EDITING_API if ( parameterAvailableForEditing == true ) { /* do the object editing here */ } } /* while ( nSamplesRendered < nOutSamples ) */ #endif /* write JBM Offset file entry */ if ( jbmOffsetWriter != NULL ) Loading
apps/renderer.c +0 −14 Original line number Diff line number Diff line Loading @@ -169,10 +169,8 @@ typedef struct char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; int8_t orientation_tracking; #ifdef FIX_1135_EXT_RENDERER_HANDLES int16_t Opt_Headrotation; int16_t Opt_ExternalOrientation; #endif int16_t nonDiegeticPan; float nonDiegeticPanGain; IVAS_REND_COMPLEXITY_LEVEL complexityLevel; Loading Loading @@ -886,11 +884,7 @@ int main( const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, args.Opt_Headrotation, args.Opt_ExternalOrientation, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading Loading @@ -2518,10 +2512,8 @@ static CmdlnArgs defaultArgs( clearString( args.renderConfigFilePath ); clearString( args.externalOrientationFilePath ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args.Opt_Headrotation = 0; args.Opt_ExternalOrientation = 0; #endif args.orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; args.nonDiegeticPan = 0; Loading Loading @@ -2611,9 +2603,7 @@ static void parseOption( break; case CmdLnOptionId_trajFile: assert( numOptionValues == 1 ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args->Opt_Headrotation = 1; #endif strncpy( args->headRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; case CmdLnOptionId_outputMetadata: Loading @@ -2634,9 +2624,7 @@ static void parseOption( break; case CmdLnOptionId_exteriorOrientationFile: assert( numOptionValues == 1 ); #ifdef FIX_1135_EXT_RENDERER_HANDLES args->Opt_ExternalOrientation = 1; #endif strncpy( args->externalOrientationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; case CmdLnOptionId_customHrtfFile: Loading Loading @@ -2761,12 +2749,10 @@ static CmdlnArgs parseCmdlnArgs( exit( -1 ); /* Error printout handled by failing function */ } #ifdef FIX_1135_EXT_RENDERER_HANDLES if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { args.Opt_Headrotation = 1; } #endif return args; } Loading
ci/basop-pages/basop_index.html +5 −0 Original line number Diff line number Diff line Loading @@ -15,4 +15,9 @@ <li><a href="ivas-pytest-compare_ref-long-enc-lev+10-index.html">ivas-pytest-compare_ref-long-enc-lev+10</a></li> <li><a href="ivas-pytest-compare_ref-long-enc-lev-10-index.html">ivas-pytest-compare_ref-long-enc-lev-10</a></li> </ul> <h3>Complexity Reports</h3> {} </body>
ci/basop-pages/create_report_pages.py +12 −5 Original line number Diff line number Diff line Loading @@ -199,11 +199,15 @@ def tr_from_row(row, id_current, id_previous): if float(curr) > float(prev): curr += f" {ARROW_UP}" # increase is bad -> mark in red, execpt for SNR for which it is good -> mark in green td_tmpl_curr = TD_TMPL_REDUCE if c == "MIN_SSNR" else TD_TMPL_INCREASE td_tmpl_curr = ( TD_TMPL_REDUCE if c == "MIN_SSNR" else TD_TMPL_INCREASE ) elif float(curr) < float(prev): curr += f" {ARROW_DOWN}" # reduce is good -> mark in green, execpt for SNR for which it is bad -> mark in red td_tmpl_curr = TD_TMPL_INCREASE if c == "MIN_SSNR" else TD_TMPL_REDUCE td_tmpl_curr = ( TD_TMPL_INCREASE if c == "MIN_SSNR" else TD_TMPL_REDUCE ) except ValueError: # if we land here, one of the cells is not a number, this indicates a crash # or some error in the scripts, so mark with red as well Loading Loading @@ -295,6 +299,7 @@ def merge_tables(tbl1, tbl2, suffix1, suffix2, merge_key, other_keys): for key in other_keys: new_row[f"{key}-{suffix1}"] = row1[key] found_merge_key_in_both_tbls = False for row2 in tbl2: if row1[merge_key] == row2[merge_key]: new_row[merge_key] = row1[merge_key] Loading @@ -303,14 +308,16 @@ def merge_tables(tbl1, tbl2, suffix1, suffix2, merge_key, other_keys): new_row[f"{key}-{suffix2}"] = row2[key] else: new_row[f"{key}-{suffix2}"] = "" found_merge_key_in_both_tbls = True break if found_merge_key_in_both_tbls: merged.append(new_row) return merged if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("html_out") Loading