Commit 6779a9ce authored by TYAGIRIS's avatar TYAGIRIS
Browse files

Merge branch 'main' into formatting_ISAR

parents 4e2e483b c72b24f2
Loading
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -227,12 +227,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 $SELF_TEST_PRM_FILE -v --update_ref 1 -m create_ref --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/test_param_file.py --param_file $SELF_TEST_PRM_FILE -v --update_ref 1 -m create_ref --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 $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 $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/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=$?

    - if [ $exit_code20 -ne 0 ] || [ $exit_code10 -ne 0 ] || [ $exit_code5 -ne 0 ]; then exit 1; fi

@@ -561,7 +561,7 @@ codec-msan:
  before_script:
    - CLANG_NUM=1
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/codec_be_on_mr_nonselection/test_param_file.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test.prm"
  <<: *sanitizer-selftest-anchor

# code selftest testvectors with address-sanitizer binaries
@@ -571,7 +571,7 @@ codec-asan:
  before_script:
    - CLANG_NUM=2
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/codec_be_on_mr_nonselection/test_param_file.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test.prm"
  <<: *sanitizer-selftest-anchor

# code selftest testvectors with undefined-behaviour-sanitizer binaries
@@ -583,7 +583,7 @@ codec-usan:
  before_script:
    - CLANG_NUM=3
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/codec_be_on_mr_nonselection/test_param_file.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test.prm"
  <<: *sanitizer-selftest-anchor

# compare bit-exactness between 5ms and 20 on the branch
@@ -1661,13 +1661,13 @@ ltv-msan:
    - .sanitizer-selftest-ltv
  rules:
    - if: $SANITIZER_SCHEDULE_E
  timeout: 3 hour
  timeout: 4 hour
  tags:
    - ivas-linux-fast
  before_script:
    - CLANG_NUM=1
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/test_param_file_ltv.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm"
  <<: *sanitizer-selftest-anchor

# code selftest long testvectors with address-sanitizer binaries
@@ -1677,14 +1677,14 @@ ltv-asan:
  rules:
    - if: $SANITIZER_SCHEDULE_E
      when: delayed
      start_in: 3 hours
      start_in: 4 hours
  tags:
    - ivas-linux-fast
  timeout: 3 hour
  before_script:
    - CLANG_NUM=2
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/test_param_file_ltv.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm"
  <<: *sanitizer-selftest-anchor

# code selftest long testvectors with undefined-behaviour-sanitizer binaries
@@ -1694,14 +1694,14 @@ ltv-usan:
  rules:
    - if: $SANITIZER_SCHEDULE_E
      when: delayed
      start_in: 6 hours
      start_in: 7 hours
  tags:
    - ivas-linux-fast
  timeout: 3 hour
  before_script:
    - CLANG_NUM=3
    - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS
    - SELF_TEST_PRM_FILE="tests/test_param_file_ltv.py"
    - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm"
  <<: *sanitizer-selftest-anchor

.sanitizer-test-template:
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@
#define NONBE_FIX_1087_OOB_SBA_DTX_RS                   /* VA: issue 1087: Extend the length of the buffer for MCT decoding to avoid out-of-bound writing in SBA SID bitrate switching decoding */
#define NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS            /* FhG: fix for #1091, fix limit calculation for the regularized inverse of Kx to avoid bursts in very low signals */
#define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR            /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */
#define NONBE_FIX_1096_NAN_VALUES_IN_DIRAC_TO_STEREO    /* FhG: avoid sidegain DFT-Stereo param to be larger than 1 when converting from Dirac parameters */
/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+13 −0
Original line number Diff line number Diff line
@@ -395,10 +395,23 @@ static void map_params_dirac_to_stereo(
                }
            }

#ifdef NONBE_FIX_1096_NAN_VALUES_IN_DIRAC_TO_STEREO
            /* Clamp values here. [-1, 1] is the allowed range, but due to precision issues they can be slightly off which can cause problems later. */
            side_gain[b] *= sqrtf( 1.f - diffuseness[b] );
            side_gain[b] = max( min( side_gain[b], 1 ), -1 );
            side_gain[b + STEREO_DFT_BAND_MAX] *= sqrtf( 1.f - diffuseness[b] );
            side_gain[b + STEREO_DFT_BAND_MAX] = max( min( side_gain[b + STEREO_DFT_BAND_MAX], 1 ), -1 );
            /* for residual prediction gain, allowed range is [0, 1]*/
            res_pred_gain[b] = diffuseness[b] * ( 1.0f - surrCoh[b] );
            res_pred_gain[b] = max( min( res_pred_gain[b], 1 ), 0 );
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = diffuseness[b] * ( 1.0f - surrCoh[b] );
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = max( min( res_pred_gain[b + STEREO_DFT_BAND_MAX], 1 ), 0 );
#else
            side_gain[b] *= sqrtf( 1.f - diffuseness[b] );
            side_gain[b + STEREO_DFT_BAND_MAX] *= sqrtf( 1.f - diffuseness[b] );
            res_pred_gain[b] = diffuseness[b] * ( 1.0f - surrCoh[b] );
            res_pred_gain[b + STEREO_DFT_BAND_MAX] = diffuseness[b] * ( 1.0f - surrCoh[b] );
#endif
        }
    }

+5 −0
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ VALID_DEC_OUTPUT_CONF = [
    "EXT",
]

PARAM_FILE_ID = "stv" if PARAM_FILE.stem == "self_test" else PARAM_FILE.stem.replace("self_test_", "")

param_file_test_dict = {}
with open(PARAM_FILE, "r", encoding="UTF-8") as fp:
    data = fp.read()
@@ -125,6 +127,8 @@ def convert_test_string_to_tag(test_string):

@pytest.mark.create_ref
@pytest.mark.parametrize("test_tag", list(param_file_test_dict.keys()))
# hack to have stv/ltv/evs in the test name
@pytest.mark.parametrize("param_file_id", [PARAM_FILE_ID])
def test_param_file_tests(
    record_property,
    decoder_only,
@@ -139,6 +143,7 @@ def test_param_file_tests(
    rootdir,
    keep_files,
    test_tag,
    param_file_id,
    get_mld,
    get_mld_lim,
    abs_tol,
+1 −0
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ def pytest_addoption(parser):
    parser.addoption(
        "--param_file",
        action="store",
        type=Path,
        help="If specified, use given param file in test_param_file.",
    )

Loading