From 2758b2ff44fa41e982a4754f010901a5458e2c5e Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 30 Jan 2025 13:02:07 +0100 Subject: [PATCH 01/11] changes for eaasier debugging --- .gitlab-ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f62acb284..b73c26c61 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -291,6 +291,7 @@ stages: SUMMARY_HTML_ARTIFACT_NAME: "summary_$CI_JOB_NAME.html" IMAGES_ARTIFACT_NAME: "images_$CI_JOB_NAME" script: + - set -euxo pipefail - *print-common-info - *update-scripts-repo - if [ $USE_LTV -eq 1 ]; then @@ -302,15 +303,19 @@ stages: - fi - python3 ci/remove_unsupported_testcases.py $PRM_FILES - - if [ $LEVEL_SCALING != "1.0" ];then + - if [ $LEVEL_SCALING != "1.0" ]; then - *apply-testv-scaling - fi - - if [ "$ENCODER_TEST" = "true" ]; then BUILD_WITH_DEBUG_MODE_INFO="true"; fi + - if [ "$ENCODER_TEST" = "true" ]; then + - BUILD_WITH_DEBUG_MODE_INFO="true" + - fi - *build-and-create-reference-outputs - comp_args="--mld --ssnr --odg" - - if [ "$ENCODER_TEST" = "true" ]; then comp_args="${comp_args} --enc_stats"; fi + - if [ "$ENCODER_TEST" = "true" ]; then + - comp_args="${comp_args} --enc_stats" + - fi - echo "$comp_args" ### run pytest -- GitLab From 2b6c98a54bef36c15a0d77674845d129d78d363e Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 30 Jan 2025 15:03:46 +0100 Subject: [PATCH 02/11] add manual job for encoder downmix comparison --- .gitlab-ci.yml | 59 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b73c26c61..60568840f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,12 +32,14 @@ variables: INSTR_DIR: "scripts/c-code_instrument" BUILD_WITH_DEBUG_MODE_INFO: "" ENCODER_TEST: "" + COMPARE_DMX: "" MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'pytest-compare' to run comparison test against reference float codec." value: 'default' options: - 'default' - 'pytest-compare' + - 'pytest-compare-dmx' - 'pytest-compare-long' - 'pytest-compare-to-input' - 'pytest-saturation-smoke-test' @@ -222,6 +224,14 @@ stages: - if: $CI_PIPELINE_SOURCE == 'schedule' when: never +.rules-pytest-to-ref-enc-sort-dmx: + rules: + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-dmx" + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + - if: $CI_PIPELINE_SOURCE == 'schedule' + when: never + .rules-pytest-to-main-short: rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main @@ -316,6 +326,11 @@ stages: - if [ "$ENCODER_TEST" = "true" ]; then - comp_args="${comp_args} --enc_stats" - fi + + # DMX comparison only in manual job with no other metrics + - if [ "$COMPARE_DMX" = "true" ]; then + - comp_args="--compare_enc_dmx" + - fi - echo "$comp_args" ### run pytest @@ -825,7 +840,7 @@ ivas-pytest-compare_to_ref-short-enc-lev-10: extends: #- .rules-pytest-to-ref-short - .rules-pytest-to-ref-enc-short-temp - - .test-job-linux + - .test-job-linux before_script: - USE_LTV=0 - ENCODER_TEST="true" @@ -838,10 +853,50 @@ ivas-pytest-compare_to_ref-short-enc-lev+10: extends: #- .rules-pytest-to-ref-short - .rules-pytest-to-ref-enc-short-temp - - .test-job-linux + - .test-job-linux + before_script: + - USE_LTV=0 + - ENCODER_TEST="true" + - DUT_DECODER_PATH=./$REF_DECODER_PATH + - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER" + - LEVEL_SCALING=3.162 + <<: *ivas-pytest-anchor + +# encoder dmx comparison jobs +ivas-pytest-compare_to_ref-dmx-short-enc: + extends: + - .rules-pytest-to-ref-enc-sort-dmx + - .test-job-linux + before_script: + - USE_LTV=0 + - ENCODER_TEST="true" + - COMPARE_DMX="true + - DUT_DECODER_PATH=./$REF_DECODER_PATH + - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER" + - LEVEL_SCALING=1.0 + <<: *ivas-pytest-anchor + +ivas-pytest-compare_to_ref-dmx-short-enc-lev-10: + extends: + - .rules-pytest-to-ref-enc-sort-dmx + - .test-job-linux + before_script: + - USE_LTV=0 + - ENCODER_TEST="true" + - COMPARE_DMX="true + - DUT_DECODER_PATH=./$REF_DECODER_PATH + - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER" + - LEVEL_SCALING=0.3162 + <<: *ivas-pytest-anchor + +ivas-pytest-compare_to_ref-dmx-short-enc-lev+10: + extends: + - .rules-pytest-to-ref-enc-sort-dmx + - .test-job-linux before_script: - USE_LTV=0 - ENCODER_TEST="true" + - COMPARE_DMX="true - DUT_DECODER_PATH=./$REF_DECODER_PATH - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER" - LEVEL_SCALING=3.162 -- GitLab From 6d7f0d619e3d0d4f8ba31fb6ea0605df17d1930e Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 30 Jan 2025 15:05:53 +0100 Subject: [PATCH 03/11] fix workflow rules --- .gitlab-ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 60568840f..babe65e8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,7 +39,7 @@ variables: options: - 'default' - 'pytest-compare' - - 'pytest-compare-dmx' + - 'pytest-compare-enc-dmx' - 'pytest-compare-long' - 'pytest-compare-to-input' - 'pytest-saturation-smoke-test' @@ -73,6 +73,9 @@ workflow: - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare' variables: IVAS_PIPELINE_NAME: 'Run comparison tools against float ref: $CI_COMMIT_BRANCH' + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-enc-dmx' + variables: + IVAS_PIPELINE_NAME: 'Run encoder dmx comparison against float ref: $CI_COMMIT_BRANCH' - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-long' variables: IVAS_PIPELINE_NAME: 'Run comparison tools against float ref (long test vectors): $CI_COMMIT_BRANCH' @@ -226,7 +229,7 @@ stages: .rules-pytest-to-ref-enc-sort-dmx: rules: - - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-dmx" + - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "pytest-compare-enc-dmx" - if: $CI_PIPELINE_SOURCE == 'push' when: never - if: $CI_PIPELINE_SOURCE == 'schedule' -- GitLab From 2462b2d8ce47286d7b39b9baf0f719089c547860 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 30 Jan 2025 15:12:24 +0100 Subject: [PATCH 04/11] fix missing "s --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index babe65e8e..bdc433d8b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -873,7 +873,7 @@ ivas-pytest-compare_to_ref-dmx-short-enc: before_script: - USE_LTV=0 - ENCODER_TEST="true" - - COMPARE_DMX="true + - COMPARE_DMX="true" - DUT_DECODER_PATH=./$REF_DECODER_PATH - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER" - LEVEL_SCALING=1.0 @@ -886,7 +886,7 @@ ivas-pytest-compare_to_ref-dmx-short-enc-lev-10: before_script: - USE_LTV=0 - ENCODER_TEST="true" - - COMPARE_DMX="true + - COMPARE_DMX="true" - DUT_DECODER_PATH=./$REF_DECODER_PATH - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER" - LEVEL_SCALING=0.3162 @@ -899,7 +899,7 @@ ivas-pytest-compare_to_ref-dmx-short-enc-lev+10: before_script: - USE_LTV=0 - ENCODER_TEST="true" - - COMPARE_DMX="true + - COMPARE_DMX="true" - DUT_DECODER_PATH=./$REF_DECODER_PATH - TEST_SUITE="$SHORT_TEST_SUITE_ENCODER" - LEVEL_SCALING=3.162 -- GitLab From 77781045aeca10f4b0b1c90f4204cf7e6e326281 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 30 Jan 2025 17:19:23 +0100 Subject: [PATCH 05/11] add debug printout --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bdc433d8b..1330d7e29 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -138,6 +138,7 @@ stages: - git checkout $REFERENCE_BRANCH - git pull - *activate-debug-mode-info-if-set + - cat lib_com/options.h - make clean - make -j - mv ./IVAS_cod ./$REF_ENCODER_PATH -- GitLab From f6ad23ea84c45f070d617269004d294764302b36 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 31 Jan 2025 11:06:11 +0100 Subject: [PATCH 06/11] add even more debug printouts --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1330d7e29..eddf0a574 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -168,6 +168,8 @@ stages: - enc_stats_arg="" - if [ "$ENCODER_TEST" = "true" ]; then enc_stats_arg="--enc_stats"; fi - python3 -m pytest $TEST_SUITE -v --update_ref 1 $enc_stats_arg --create_ref -n auto --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH || exit_code=$? + - ls tests/ref/param_file/enc/ + - ls tests/ref/sba_bs/pkt/ .update-scripts-repo: &update-scripts-repo - cd $SCRIPTS_DIR -- GitLab From d12f883389f2aec74b2f6aecba85a6121e7ce15b Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 31 Jan 2025 11:14:03 +0100 Subject: [PATCH 07/11] add --compare_enc_dmx arg to ref run too --- .gitlab-ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eddf0a574..cf2b9268b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -165,11 +165,19 @@ stages: - python3 tests/create_short_testvectors.py # create references - exit_code=0 + - enc_stats_arg="" - - if [ "$ENCODER_TEST" = "true" ]; then enc_stats_arg="--enc_stats"; fi - - python3 -m pytest $TEST_SUITE -v --update_ref 1 $enc_stats_arg --create_ref -n auto --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH || exit_code=$? + - if [ "$ENCODER_TEST" = "true" ]; then + - enc_stats_arg="--enc_stats" + - fi + + - enc_dmx_arg="" + - if [ "$COMPARE_DMX" = "true" ]; then + - enc_dmx_arg="--compare_enc_dmx" + - fi + + - python3 -m pytest $TEST_SUITE -v --update_ref 1 $enc_stats_arg §enc_dmx_arg --create_ref -n auto --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH || exit_code=$? - ls tests/ref/param_file/enc/ - - ls tests/ref/sba_bs/pkt/ .update-scripts-repo: &update-scripts-repo - cd $SCRIPTS_DIR -- GitLab From 5132325643709bb1e5adaf2db3c97f1a0eed60ef Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 31 Jan 2025 17:32:30 +0100 Subject: [PATCH 08/11] fix typo --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cf2b9268b..5d03662d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -176,7 +176,7 @@ stages: - enc_dmx_arg="--compare_enc_dmx" - fi - - python3 -m pytest $TEST_SUITE -v --update_ref 1 $enc_stats_arg §enc_dmx_arg --create_ref -n auto --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH || exit_code=$? + - python3 -m pytest $TEST_SUITE -v --update_ref 1 $enc_stats_arg $enc_dmx_arg --create_ref -n auto --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH || exit_code=$? - ls tests/ref/param_file/enc/ .update-scripts-repo: &update-scripts-repo -- GitLab From 2b20dd87187e06d436b193e89268f883397d7567 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 3 Feb 2025 10:25:11 +0100 Subject: [PATCH 09/11] add dmx dump for stereo dmx evs mode --- lib_enc/lib_enc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index c78fbe107..319ebdf87 100644 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -1749,6 +1749,9 @@ ivas_error IVAS_ENC_EncodeFrameToSerial( } ELSE { +#ifdef DEBUG_MODE_INFO + dbgwrite( inputBuffer, sizeof( int16_t ), inputBufferSize, 1, strcat( fname( debug_dir, "ivas_input_dmx", 0, 1, ENC ), ".pcm" ) ); +#endif hCoreCoder->input_frame_fx = inputBufferSize; move32(); IF( NE_32( ( error = evs_enc_fx( hCoreCoder, inputBuffer, hCoreCoder->mem_hp20_in_fx, inputBufferSize ) ), IVAS_ERR_OK ) ) -- GitLab From ad130d5c18055c51c217a1928d77e098cb3667d4 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 3 Feb 2025 14:48:29 +0100 Subject: [PATCH 10/11] correct if condition for building with DEBUG_MODE_INFO --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d03662d0..632afd64f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -331,7 +331,7 @@ stages: - *apply-testv-scaling - fi - - if [ "$ENCODER_TEST" = "true" ]; then + - if [ "$COMPARE_DMX" = "true" ] || [ "$ENCODER_TEST" = "true" ]; then - BUILD_WITH_DEBUG_MODE_INFO="true" - fi - *build-and-create-reference-outputs -- GitLab From 459882db93dcc282eaf957f0d08de2e4d3bb0625 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 4 Feb 2025 09:21:00 +0100 Subject: [PATCH 11/11] remove dbg output --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c1e19fe5..c97b8c711 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -184,7 +184,6 @@ stages: - fi - python3 -m pytest $TEST_SUITE -v --update_ref 1 $enc_stats_arg $enc_dmx_arg --create_ref -n auto --ref_encoder_path $REF_ENCODER_PATH --ref_decoder_path $REF_DECODER_PATH --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH || exit_code=$? - - ls tests/ref/param_file/enc/ .update-scripts-repo: &update-scripts-repo - cd $SCRIPTS_DIR -- GitLab