Loading .gitlab-ci.yml +181 −78 Original line number Diff line number Diff line variables: TESTV_DIR: "/usr/local/testv" LTV_DIR: "/usr/local/ltv" BUILD_OUTPUT: "build_output.txt" EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" SANITIZER_TESTS: "CLANG1 CLANG2" Loading Loading @@ -45,6 +46,54 @@ stages: .get-previous-merge-commit-sha: &get-previous-merge-commit-sha - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) .merge_request_comparison_setup: &merge_request_comparison_setup ### build test binaries, initial clean for paranoia reasons - make clean - mkdir build - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_test - mv IVAS_dec ../IVAS_dec_test - cd .. - rm -rf build/* ### store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true # needed when depth is lower than the number of commits in the branch - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME ### compare to last target branch commit before pipeline was created - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - git checkout $target_commit ### build reference binaries - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_ref - mv IVAS_dec ../IVAS_dec_ref - cd .. # rename test binaries back - mv IVAS_cod_test IVAS_cod - mv IVAS_dec_test IVAS_dec .merge-request-comparison-check: &merge-request-comparison-check - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "Non-bitexact cases without non-BE tag encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ] && [ $non_be_flag != 0 ]; then echo "Non-bitexact cases with non-BE tag encountered"; exit $EXIT_CODE_NON_BE; fi - exit 0 .update-ltv-repo: &update-ltv-repo - cd $LTV_DIR - git pull - cd - # --------------------------------------------------------------- # Job templates Loading Loading @@ -276,7 +325,7 @@ asan-on-merge-request-linux: # compare bit exactness between target and source branch pytest-on-merge-request: ivas-pytest-on-merge-request: extends: - .test-job-linux - .rules-merge-request Loading @@ -285,85 +334,76 @@ pytest-on-merge-request: timeout: "10 minutes" script: - *print-common-info ### build test binaries, initial clean for paranoia reasons - make clean - mkdir build - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_test - mv IVAS_dec ../IVAS_dec_test - cd .. - rm -rf build/* ### store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true # needed when depth is lower than the number of commits in the branch - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME ### compare to last target branch commit before pipeline was created - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - git checkout $target_commit ### build reference binaries - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_ref - mv IVAS_dec ../IVAS_dec_ref - cd .. ### re-checkout the commit from the source branch to have up-to-date test scripts and test vectors (and actually everything) - git checkout $source_branch_commit_sha - *merge_request_comparison_setup # some helper variables - "|| true" to prevent failures from grep not finding anything - evs_non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true - expected_nonbe_1=0 - expected_nonbe_2=0 - fail_1=0 - fail_2=0 - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi ### prepare pytest # create short test vectors - python3 tests/create_short_testvectors.py # rename test binaries back - mv IVAS_cod_test IVAS_cod - mv IVAS_dec_test IVAS_dec # create references - python3 -m pytest tests -v --update_ref 1 -m create_ref - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm ### Run test using branch scripts and input - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi ### run pytest - exit_code=0 - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - if [ $zero_errors != 1 ]; then echo "Run errors in pytest"; fail_1=1; fi - *merge-request-comparison-check - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "pytest run had failures without non-BE tag encountered"; fail_1=1; fi - if [ $exit_code -eq 1 ] && [ $non_be_flag != 0 ]; then echo "pytest run had failures with non-BE tag encountered"; expected_nonbe_1=1; fi allow_failure: exit_codes: - 123 artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" when: always paths: - report-junit.xml expose_as: 'pytest ivas results' reports: junit: - report-junit.xml evs-pytest-on-merge-request: extends: - .test-job-linux - .rules-merge-request stage: compare needs: [ "build-codec-linux-cmake", "codec-smoke-test" ] timeout: "10 minutes" script: - *print-common-info - *merge_request_comparison_setup # some helper variables - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi ### prepare pytest # create references - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm ### Run test using branch scripts and input - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi ### run pytest for EVS cases - exit_code=0 - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --junit-xml=report-junit-evs.xml || exit_code=$? - zero_errors=$(cat report-junit-evs.xml | grep -c 'errors="0"') || true - if [ $zero_errors != 1 ]; then echo "Run errors in pytest for EVS"; fail_2=1; fi - if [ $exit_code -eq 1 ] && [ $evs_non_be_flag == 0 ]; then echo "Non-bitexact EVS cases without EVS-non-BE tag encountered"; fail_2=1; fi - if [ $exit_code -eq 1 ] && [ $evs_non_be_flag != 0 ]; then echo "Non-bitexact EVS cases with EVS-non-BE tag encountered"; expected_nonbe_2=1; fi # Check results from both tests - if [ $fail_1 -eq 1 ] || [ $fail_2 -eq 1 ]; then exit $EXIT_CODE_FAIL; fi - if [ $expected_nonbe_1 -eq 1 ] || [ $expected_nonbe_2 -eq 1 ]; then exit $EXIT_CODE_NON_BE; fi - exit 0 - *merge-request-comparison-check allow_failure: exit_codes: Loading @@ -372,14 +412,55 @@ pytest-on-merge-request: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" when: always paths: - report-junit.xml - report-junit-evs.xml expose_as: 'pytest results' expose_as: 'pytest evs results' reports: junit: - report-junit.xml - report-junit-evs.xml clang-format-check: extends: - .test-job-linux - .rules-merge-request variables: ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" stage: validate needs: [] timeout: "5 minutes" script: # Set up variables. This can't be done in the "variables" section because variables are not expanded properly there - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME".patch - > INSTRUCTIONS_GITLAB="To fix formatting issues:\n - download the diff patch available as artifact of this job\n - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - run: git apply $PATCH_FILE_NAME\n - commit new changes" - > INSTRUCTIONS_README="To fix formatting issues:\n - place the patch file in the root directory of your local IVAS repo\n - run: git apply $PATCH_FILE_NAME\n - commit new changes" - scripts/check-format.sh -af -p 8 || format_problems=$? - if [ $format_problems == 0 ] ; then exit 0; fi - mkdir tmp-formatting-fix - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" # Print instructions to job output - echo -e "$INSTRUCTIONS_GITLAB" # Include readme in the artifact, in case someone misses the job printout (e.g. getting the artifact via MR interface) - echo -e "$INSTRUCTIONS_README" > "tmp-formatting-fix/readme.txt" - exit $format_problems artifacts: paths: - tmp-formatting-fix/ when: on_failure name: "$ARTIFACT_BASE_NAME" expose_as: 'formatting patch' # --------------------------------------------------------------- # Test jobs for main branch Loading Loading @@ -452,11 +533,12 @@ codec-comparison-on-main-push: - mv IVAS_dec ../IVAS_dec_ref - cd .. ### re-checkout the latest commit in the main branch - git checkout $latest_commit # helper variable - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[non[ -]*be\]") || true - ref_using_main=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### re-checkout the latest commit in the main branch, if ref_using_main is not set - if [ $ref_using_main == 0 ]; then git checkout $latest_commit;fi ### prepare pytest # create short test vectors Loading @@ -468,6 +550,9 @@ codec-comparison-on-main-push: - python3 -m pytest tests -v --update_ref 1 -m create_ref - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 ### re-checkout the latest commit here, if ref_using_main is set - if [ $ref_using_main -eq 1 ]; then git checkout $latest_commit;fi ### run pytest - exit_code=0 - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? Loading @@ -493,10 +578,13 @@ codec-comparison-on-main-push: # --------------------------------------------------------------- .sanitizer-test-template: extends: # TODO: still needed since MASA ltv vectors are not there yet # when they were added, we can add a needs-ltv-dir template - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main timeout: "2 hours" artifacts: name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA" when: always Loading @@ -509,6 +597,7 @@ sanitizer-test-mono: rules: - if: $IS_SANITIZER_TEST_RUN script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS sanitizer-test-stereo: Loading @@ -516,8 +605,9 @@ sanitizer-test-stereo: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 20 minutes start_in: 1 hour script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED --tests $SANITIZER_TESTS sanitizer-test-stereodmxevs: Loading @@ -525,17 +615,19 @@ sanitizer-test-stereodmxevs: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 40 minutes start_in: 2 hours script: - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEvs mono --tests $SANITIZER_TESTS - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS sanitizer-test-ism1: extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 1 hour start_in: 3 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-ism2: Loading @@ -543,8 +635,9 @@ sanitizer-test-ism2: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 1 hour 30 minutes start_in: 4 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-ism3: Loading @@ -552,8 +645,9 @@ sanitizer-test-ism3: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 2 hours start_in: 6 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-ism4: Loading @@ -561,8 +655,9 @@ sanitizer-test-ism4: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 2 hours 30 minutes start_in: 8 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-mc-5_1: Loading @@ -570,8 +665,9 @@ sanitizer-test-mc-5_1: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 3 hours start_in: 10 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 5_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_2: Loading @@ -579,8 +675,9 @@ sanitizer-test-mc-5_1_2: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 4 hours start_in: 12 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_4: Loading @@ -588,8 +685,9 @@ sanitizer-test-mc-5_1_4: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 5 hours start_in: 14 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1: Loading @@ -597,8 +695,9 @@ sanitizer-test-mc-7_1: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 6 hours start_in: 16 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1_4: Loading @@ -606,8 +705,9 @@ sanitizer-test-mc-7_1_4: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 7 hours start_in: 18 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-masa: Loading @@ -615,8 +715,9 @@ sanitizer-test-masa: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 8 hours start_in: 20 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-sba: Loading @@ -624,8 +725,9 @@ sanitizer-test-sba: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 9 hours start_in: 22 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py SBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-planarsba: Loading @@ -633,8 +735,9 @@ sanitizer-test-planarsba: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 10 hours start_in: 24 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py PlanarSBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS # GCOV/LCOV coverage analysis of self_test suite Loading apps/encoder.c +32 −7 Original line number Diff line number Diff line Loading @@ -120,7 +120,9 @@ typedef struct const char *ca_config_file; bool mimeOutput; bool agc; #ifdef DEBUG_AGC_ENCODER_CMD_OPTION IVAS_ENC_AGC agc; #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ bool pca; #ifdef DEBUG_FOA_AGC FILE *agcBitstream; /* temporary */ Loading Loading @@ -440,11 +442,25 @@ int main( } break; case IVAS_ENC_INPUT_SBA: if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, #ifdef DEBUG_AGC_ENCODER_CMD_OPTION arg.agc, #endif arg.pca #ifdef DEBUG_SBA_AUDIO_DUMP if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, arg.agc, arg.pca, &numTransportChannels ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, arg.agc, arg.pca ) ) != IVAS_ERR_OK ) , &numTransportChannels #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_ENC_ConfigureForAmbisonics failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -870,7 +886,9 @@ static void initArgStruct( EncArguments *arg ) arg->ca_config_file = NULL; arg->mimeOutput = false; arg->agc = IVAS_DEFAULT_AGC; #ifdef DEBUG_AGC_ENCODER_CMD_OPTION arg->agc = IVAS_ENC_AGC_UNDEFINED; #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ arg->pca = false; #ifdef DEBUG_FOA_AGC arg->agcBitstream = NULL; Loading Loading @@ -1376,12 +1394,13 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.stereoToMonoDownmix = true; i++; } #ifdef DEBUG_AGC_ENCODER_CMD_OPTION else if ( strcmp( argv_to_upper, "-AGC" ) == 0 ) { i++; if ( i < argc - 4 ) { arg->agc = (int16_t) atoi( argv[i] ); arg->agc = ( atoi( argv[i] ) ) ? IVAS_ENC_AGC_ENABLED : IVAS_ENC_AGC_DISABLED; if ( argv[i] == NULL || atoi( argv[i] ) < 0 || atoi( argv[i] ) > 1 ) { fprintf( stderr, "Error: wrong adaptive gain control option specified (%d), expected 0 or 1\n\n", (int32_t) atoi( argv[i] ) ); Loading @@ -1397,6 +1416,7 @@ static bool parseCmdlIVAS_enc( return false; } } #endif else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // VE: should be renamed to "-pca" { i++; Loading Loading @@ -1636,7 +1656,12 @@ static void usage_enc( void ) #ifdef DEBUG_SBA fprintf( stdout, "-tag : Tag name for intermediate debug files\n" ); #endif fprintf( stdout, "-agc op : SBA Adaptive gain control, op = (0, 1), by default op is 0 or deactivated\n" ); #ifdef DEBUG_AGC_ENCODER_CMD_OPTION fprintf( stdout, "-agc op : SBA Adaptive gain control, op = (0, 1). \n" ); fprintf( stdout, " By default op is 1 (activated) for bitrates between 24400 and 32000,\n" ); fprintf( stdout, " otherwise it is 0 (deactivated) for all other bitrates\n" ); #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ fprintf( stdout, "-bypass mode : SBA PCA by-pass, mode = (1, 2), 1 = PCA off, 2 = signal adaptive, default is 1\n" ); #ifdef DEBUGGING fprintf( stdout, "-force T : Force specific mode, T = (speech, music, ACELP, GSC, TCX, HQ),\n" ); Loading ci/run_scheduled_sanitizer_test.py +2 −5 Original line number Diff line number Diff line Loading @@ -6,8 +6,8 @@ import subprocess import pathlib DURATION = "120" CFG = "ci_linux.json" DURATION = "30" CFG = "ci_linux_ltv.json" SUPPORTED_TESTS = ["CLANG1", "CLANG2", "CLANG3", "VALGRIND"] EP_FILE = "ep_015.g192" GENPATT_CMD = f"gen-patt -tailstat -fer -g192 -gamma 0 -rate 0.15 -tol 0.001 -reset -n {int(DURATION) * 50} {EP_FILE}" Loading Loading @@ -54,9 +54,6 @@ def get_modes(in_format: str) -> list: in_format = "MC_" + in_format + "_b" mode_list = [m for m in output.splitlines() if in_format in m] if "SBA" in in_format: # rate switching not implemented yet mode_list = [m for m in mode_list if not "_rs" in m] return mode_list Loading ci/smoke_test.sh +2 −5 Original line number Diff line number Diff line Loading @@ -8,8 +8,5 @@ fi make clean make all -j 8 # get all modes except SBA rate switching (which is broken currently) list=$(./scripts/runIvasCodec.py -l | grep -v "SBA.*rs") ./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -m $list -U 1 | tee smoke_test_output.txt ./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -m $list -U 1 -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt ./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U 1 | tee smoke_test_output.txt ./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U 1 -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt lib_com/cnst.h +5 −2 Original line number Diff line number Diff line Loading @@ -132,6 +132,9 @@ enum{ #define MAX_V_MULT_MAT 100 /* maximum array length for the function v_mult_mat() */ #define SBA_AGC_FORCE_ENABLE 1 #define SBA_AGC_FORCE_DISABLE 0 #define SBA_AGC_DEFAULT -1 /*----------------------------------------------------------------------------------* * Layers Loading Loading
.gitlab-ci.yml +181 −78 Original line number Diff line number Diff line variables: TESTV_DIR: "/usr/local/testv" LTV_DIR: "/usr/local/ltv" BUILD_OUTPUT: "build_output.txt" EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" SANITIZER_TESTS: "CLANG1 CLANG2" Loading Loading @@ -45,6 +46,54 @@ stages: .get-previous-merge-commit-sha: &get-previous-merge-commit-sha - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) .merge_request_comparison_setup: &merge_request_comparison_setup ### build test binaries, initial clean for paranoia reasons - make clean - mkdir build - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_test - mv IVAS_dec ../IVAS_dec_test - cd .. - rm -rf build/* ### store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true # needed when depth is lower than the number of commits in the branch - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME ### compare to last target branch commit before pipeline was created - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - git checkout $target_commit ### build reference binaries - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_ref - mv IVAS_dec ../IVAS_dec_ref - cd .. # rename test binaries back - mv IVAS_cod_test IVAS_cod - mv IVAS_dec_test IVAS_dec .merge-request-comparison-check: &merge-request-comparison-check - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "Non-bitexact cases without non-BE tag encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ] && [ $non_be_flag != 0 ]; then echo "Non-bitexact cases with non-BE tag encountered"; exit $EXIT_CODE_NON_BE; fi - exit 0 .update-ltv-repo: &update-ltv-repo - cd $LTV_DIR - git pull - cd - # --------------------------------------------------------------- # Job templates Loading Loading @@ -276,7 +325,7 @@ asan-on-merge-request-linux: # compare bit exactness between target and source branch pytest-on-merge-request: ivas-pytest-on-merge-request: extends: - .test-job-linux - .rules-merge-request Loading @@ -285,85 +334,76 @@ pytest-on-merge-request: timeout: "10 minutes" script: - *print-common-info ### build test binaries, initial clean for paranoia reasons - make clean - mkdir build - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_test - mv IVAS_dec ../IVAS_dec_test - cd .. - rm -rf build/* ### store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true # needed when depth is lower than the number of commits in the branch - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME ### compare to last target branch commit before pipeline was created - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - git checkout $target_commit ### build reference binaries - cd build - cmake .. - make -j - mv IVAS_cod ../IVAS_cod_ref - mv IVAS_dec ../IVAS_dec_ref - cd .. ### re-checkout the commit from the source branch to have up-to-date test scripts and test vectors (and actually everything) - git checkout $source_branch_commit_sha - *merge_request_comparison_setup # some helper variables - "|| true" to prevent failures from grep not finding anything - evs_non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true - expected_nonbe_1=0 - expected_nonbe_2=0 - fail_1=0 - fail_2=0 - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi ### prepare pytest # create short test vectors - python3 tests/create_short_testvectors.py # rename test binaries back - mv IVAS_cod_test IVAS_cod - mv IVAS_dec_test IVAS_dec # create references - python3 -m pytest tests -v --update_ref 1 -m create_ref - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm ### Run test using branch scripts and input - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi ### run pytest - exit_code=0 - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - if [ $zero_errors != 1 ]; then echo "Run errors in pytest"; fail_1=1; fi - *merge-request-comparison-check - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "pytest run had failures without non-BE tag encountered"; fail_1=1; fi - if [ $exit_code -eq 1 ] && [ $non_be_flag != 0 ]; then echo "pytest run had failures with non-BE tag encountered"; expected_nonbe_1=1; fi allow_failure: exit_codes: - 123 artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" when: always paths: - report-junit.xml expose_as: 'pytest ivas results' reports: junit: - report-junit.xml evs-pytest-on-merge-request: extends: - .test-job-linux - .rules-merge-request stage: compare needs: [ "build-codec-linux-cmake", "codec-smoke-test" ] timeout: "10 minutes" script: - *print-common-info - *merge_request_comparison_setup # some helper variables - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi ### prepare pytest # create references - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm ### Run test using branch scripts and input - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi ### run pytest for EVS cases - exit_code=0 - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --junit-xml=report-junit-evs.xml || exit_code=$? - zero_errors=$(cat report-junit-evs.xml | grep -c 'errors="0"') || true - if [ $zero_errors != 1 ]; then echo "Run errors in pytest for EVS"; fail_2=1; fi - if [ $exit_code -eq 1 ] && [ $evs_non_be_flag == 0 ]; then echo "Non-bitexact EVS cases without EVS-non-BE tag encountered"; fail_2=1; fi - if [ $exit_code -eq 1 ] && [ $evs_non_be_flag != 0 ]; then echo "Non-bitexact EVS cases with EVS-non-BE tag encountered"; expected_nonbe_2=1; fi # Check results from both tests - if [ $fail_1 -eq 1 ] || [ $fail_2 -eq 1 ]; then exit $EXIT_CODE_FAIL; fi - if [ $expected_nonbe_1 -eq 1 ] || [ $expected_nonbe_2 -eq 1 ]; then exit $EXIT_CODE_NON_BE; fi - exit 0 - *merge-request-comparison-check allow_failure: exit_codes: Loading @@ -372,14 +412,55 @@ pytest-on-merge-request: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" when: always paths: - report-junit.xml - report-junit-evs.xml expose_as: 'pytest results' expose_as: 'pytest evs results' reports: junit: - report-junit.xml - report-junit-evs.xml clang-format-check: extends: - .test-job-linux - .rules-merge-request variables: ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" stage: validate needs: [] timeout: "5 minutes" script: # Set up variables. This can't be done in the "variables" section because variables are not expanded properly there - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME".patch - > INSTRUCTIONS_GITLAB="To fix formatting issues:\n - download the diff patch available as artifact of this job\n - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - run: git apply $PATCH_FILE_NAME\n - commit new changes" - > INSTRUCTIONS_README="To fix formatting issues:\n - place the patch file in the root directory of your local IVAS repo\n - run: git apply $PATCH_FILE_NAME\n - commit new changes" - scripts/check-format.sh -af -p 8 || format_problems=$? - if [ $format_problems == 0 ] ; then exit 0; fi - mkdir tmp-formatting-fix - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" # Print instructions to job output - echo -e "$INSTRUCTIONS_GITLAB" # Include readme in the artifact, in case someone misses the job printout (e.g. getting the artifact via MR interface) - echo -e "$INSTRUCTIONS_README" > "tmp-formatting-fix/readme.txt" - exit $format_problems artifacts: paths: - tmp-formatting-fix/ when: on_failure name: "$ARTIFACT_BASE_NAME" expose_as: 'formatting patch' # --------------------------------------------------------------- # Test jobs for main branch Loading Loading @@ -452,11 +533,12 @@ codec-comparison-on-main-push: - mv IVAS_dec ../IVAS_dec_ref - cd .. ### re-checkout the latest commit in the main branch - git checkout $latest_commit # helper variable - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[non[ -]*be\]") || true - ref_using_main=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true ### re-checkout the latest commit in the main branch, if ref_using_main is not set - if [ $ref_using_main == 0 ]; then git checkout $latest_commit;fi ### prepare pytest # create short test vectors Loading @@ -468,6 +550,9 @@ codec-comparison-on-main-push: - python3 -m pytest tests -v --update_ref 1 -m create_ref - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 ### re-checkout the latest commit here, if ref_using_main is set - if [ $ref_using_main -eq 1 ]; then git checkout $latest_commit;fi ### run pytest - exit_code=0 - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? Loading @@ -493,10 +578,13 @@ codec-comparison-on-main-push: # --------------------------------------------------------------- .sanitizer-test-template: extends: # TODO: still needed since MASA ltv vectors are not there yet # when they were added, we can add a needs-ltv-dir template - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main timeout: "2 hours" artifacts: name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA" when: always Loading @@ -509,6 +597,7 @@ sanitizer-test-mono: rules: - if: $IS_SANITIZER_TEST_RUN script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS sanitizer-test-stereo: Loading @@ -516,8 +605,9 @@ sanitizer-test-stereo: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 20 minutes start_in: 1 hour script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED --tests $SANITIZER_TESTS sanitizer-test-stereodmxevs: Loading @@ -525,17 +615,19 @@ sanitizer-test-stereodmxevs: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 40 minutes start_in: 2 hours script: - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEvs mono --tests $SANITIZER_TESTS - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS sanitizer-test-ism1: extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 1 hour start_in: 3 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-ism2: Loading @@ -543,8 +635,9 @@ sanitizer-test-ism2: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 1 hour 30 minutes start_in: 4 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-ism3: Loading @@ -552,8 +645,9 @@ sanitizer-test-ism3: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 2 hours start_in: 6 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-ism4: Loading @@ -561,8 +655,9 @@ sanitizer-test-ism4: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 2 hours 30 minutes start_in: 8 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-mc-5_1: Loading @@ -570,8 +665,9 @@ sanitizer-test-mc-5_1: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 3 hours start_in: 10 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 5_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_2: Loading @@ -579,8 +675,9 @@ sanitizer-test-mc-5_1_2: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 4 hours start_in: 12 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_4: Loading @@ -588,8 +685,9 @@ sanitizer-test-mc-5_1_4: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 5 hours start_in: 14 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1: Loading @@ -597,8 +695,9 @@ sanitizer-test-mc-7_1: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 6 hours start_in: 16 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1_4: Loading @@ -606,8 +705,9 @@ sanitizer-test-mc-7_1_4: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 7 hours start_in: 18 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-masa: Loading @@ -615,8 +715,9 @@ sanitizer-test-masa: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 8 hours start_in: 20 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-sba: Loading @@ -624,8 +725,9 @@ sanitizer-test-sba: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 9 hours start_in: 22 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py SBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-planarsba: Loading @@ -633,8 +735,9 @@ sanitizer-test-planarsba: rules: - if: $IS_SANITIZER_TEST_RUN when: delayed start_in: 10 hours start_in: 24 hours script: - *update-ltv-repo - python3 ci/run_scheduled_sanitizer_test.py PlanarSBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS # GCOV/LCOV coverage analysis of self_test suite Loading
apps/encoder.c +32 −7 Original line number Diff line number Diff line Loading @@ -120,7 +120,9 @@ typedef struct const char *ca_config_file; bool mimeOutput; bool agc; #ifdef DEBUG_AGC_ENCODER_CMD_OPTION IVAS_ENC_AGC agc; #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ bool pca; #ifdef DEBUG_FOA_AGC FILE *agcBitstream; /* temporary */ Loading Loading @@ -440,11 +442,25 @@ int main( } break; case IVAS_ENC_INPUT_SBA: if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, #ifdef DEBUG_AGC_ENCODER_CMD_OPTION arg.agc, #endif arg.pca #ifdef DEBUG_SBA_AUDIO_DUMP if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, arg.agc, arg.pca, &numTransportChannels ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, arg.agc, arg.pca ) ) != IVAS_ERR_OK ) , &numTransportChannels #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_ENC_ConfigureForAmbisonics failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -870,7 +886,9 @@ static void initArgStruct( EncArguments *arg ) arg->ca_config_file = NULL; arg->mimeOutput = false; arg->agc = IVAS_DEFAULT_AGC; #ifdef DEBUG_AGC_ENCODER_CMD_OPTION arg->agc = IVAS_ENC_AGC_UNDEFINED; #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ arg->pca = false; #ifdef DEBUG_FOA_AGC arg->agcBitstream = NULL; Loading Loading @@ -1376,12 +1394,13 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.stereoToMonoDownmix = true; i++; } #ifdef DEBUG_AGC_ENCODER_CMD_OPTION else if ( strcmp( argv_to_upper, "-AGC" ) == 0 ) { i++; if ( i < argc - 4 ) { arg->agc = (int16_t) atoi( argv[i] ); arg->agc = ( atoi( argv[i] ) ) ? IVAS_ENC_AGC_ENABLED : IVAS_ENC_AGC_DISABLED; if ( argv[i] == NULL || atoi( argv[i] ) < 0 || atoi( argv[i] ) > 1 ) { fprintf( stderr, "Error: wrong adaptive gain control option specified (%d), expected 0 or 1\n\n", (int32_t) atoi( argv[i] ) ); Loading @@ -1397,6 +1416,7 @@ static bool parseCmdlIVAS_enc( return false; } } #endif else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // VE: should be renamed to "-pca" { i++; Loading Loading @@ -1636,7 +1656,12 @@ static void usage_enc( void ) #ifdef DEBUG_SBA fprintf( stdout, "-tag : Tag name for intermediate debug files\n" ); #endif fprintf( stdout, "-agc op : SBA Adaptive gain control, op = (0, 1), by default op is 0 or deactivated\n" ); #ifdef DEBUG_AGC_ENCODER_CMD_OPTION fprintf( stdout, "-agc op : SBA Adaptive gain control, op = (0, 1). \n" ); fprintf( stdout, " By default op is 1 (activated) for bitrates between 24400 and 32000,\n" ); fprintf( stdout, " otherwise it is 0 (deactivated) for all other bitrates\n" ); #endif /* DEBUG_AGC_ENCODER_CMD_OPTION */ fprintf( stdout, "-bypass mode : SBA PCA by-pass, mode = (1, 2), 1 = PCA off, 2 = signal adaptive, default is 1\n" ); #ifdef DEBUGGING fprintf( stdout, "-force T : Force specific mode, T = (speech, music, ACELP, GSC, TCX, HQ),\n" ); Loading
ci/run_scheduled_sanitizer_test.py +2 −5 Original line number Diff line number Diff line Loading @@ -6,8 +6,8 @@ import subprocess import pathlib DURATION = "120" CFG = "ci_linux.json" DURATION = "30" CFG = "ci_linux_ltv.json" SUPPORTED_TESTS = ["CLANG1", "CLANG2", "CLANG3", "VALGRIND"] EP_FILE = "ep_015.g192" GENPATT_CMD = f"gen-patt -tailstat -fer -g192 -gamma 0 -rate 0.15 -tol 0.001 -reset -n {int(DURATION) * 50} {EP_FILE}" Loading Loading @@ -54,9 +54,6 @@ def get_modes(in_format: str) -> list: in_format = "MC_" + in_format + "_b" mode_list = [m for m in output.splitlines() if in_format in m] if "SBA" in in_format: # rate switching not implemented yet mode_list = [m for m in mode_list if not "_rs" in m] return mode_list Loading
ci/smoke_test.sh +2 −5 Original line number Diff line number Diff line Loading @@ -8,8 +8,5 @@ fi make clean make all -j 8 # get all modes except SBA rate switching (which is broken currently) list=$(./scripts/runIvasCodec.py -l | grep -v "SBA.*rs") ./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -m $list -U 1 | tee smoke_test_output.txt ./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -m $list -U 1 -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt ./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U 1 | tee smoke_test_output.txt ./scripts/runIvasCodec.py -p ./scripts/config/ci_linux.json -U 1 -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt
lib_com/cnst.h +5 −2 Original line number Diff line number Diff line Loading @@ -132,6 +132,9 @@ enum{ #define MAX_V_MULT_MAT 100 /* maximum array length for the function v_mult_mat() */ #define SBA_AGC_FORCE_ENABLE 1 #define SBA_AGC_FORCE_DISABLE 0 #define SBA_AGC_DEFAULT -1 /*----------------------------------------------------------------------------------* * Layers Loading