Commit 9e7d28e3 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into 1161-unused-heap-in-omasa

parents d5b48dc4 7c280717
Loading
Loading
Loading
Loading
Loading
+30 −38
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ 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 -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 --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
@@ -441,25 +441,22 @@ check-compatibility-with-basop-reference-branch:
    - python3 tests/create_short_testvectors.py
    - exit_code1=0
    - exit_code2=0
    - python3 -m pytest tests/codec_be_on_mr_nonselection -v --update_ref 1 -m create_ref --html=report1.html --self-contained-html --junit-xml=report-junit1.xml || exit_code1=$?
    - python3 -m pytest tests/codec_be_on_mr_nonselection -v --update_ref 1 -m create_ref_part2 --html=report2.html --self-contained-html --junit-xml=report-junit2.xml || exit_code2=$?
    - zero_errors=$(cat report-junit1.xml report-junit2.xml | grep -c 'errors="0"') || true
    - if [ $zero_errors != 2 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - python3 -m pytest tests/codec_be_on_mr_nonselection -v --update_ref 1 --html=report.html --self-contained-html --junit-xml=report-junit.xml || exit_code1=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true
    - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - exit 0
  artifacts:
    name: "check-float-reference--sha-$CI_COMMIT_SHORT_SHA--results"
    when: always
    expire_in: 1 month
    paths:
      - report-junit1.xml
      - report-junit2.xml
      - report1.html
      - report2.html
      - report-junit.xml
      - report.html

    expose_as: "check-float-reference results"
    reports:
      junit:
        - report-junit1.xml
        - report-junit2.xml
        - report-junit.xml

# ---------------------------------------------------------------
# Build jobs
@@ -613,8 +610,7 @@ pytest-compare-20ms-and-5ms-rendering:
    - cp IVAS_cod IVAS_cod_ref
    - cp IVAS_dec IVAS_dec_ref
    # create references
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 -m create_ref
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 -m create_ref_part2
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1
    ### run pytest
    - exit_code=0
    - exit_code5=0
@@ -925,8 +921,7 @@ ivas-pytest-on-merge-request:

    ### prepare pytest
    # create references
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 -m create_ref
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 -m create_ref_part2
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1

    ### Run test using branch scripts and input
    - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi
@@ -983,12 +978,11 @@ ivas-interop-on-merge-request:
    - exit_code2=0
    # set timeout for individual testcase runs to 60 seconds
    - testcase_timeout=60
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec_ref --testcase_timeout=$testcase_timeout || exit_code=$?
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report2.html --self-contained-html --junit-xml=report2-junit.xml --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec_ref --testcase_timeout=$testcase_timeout || exit_code2=$?
    - zero_failures=$(cat report-junit.xml report2-junit.xml | grep -c 'failures="0"') || true
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --update_ref 1 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec_ref --testcase_timeout=$testcase_timeout || exit_code=$?
    - zero_failures=$(cat report-junit.xml | grep -c 'failures="0"') || true

    - if [ $zero_failures != 2 ] && [ $non_interop_flag == 0 ]; then echo "Non-interop cases without non-interop flag encountered!"; exit $EXIT_CODE_FAIL; fi
    - if [ $zero_failures != 2 ] && [ $non_interop_flag == 1 ]; then echo "Non-interop cases with non-interop flag encountered"; exit $EXIT_CODE_NON_BE; fi
    - if [ $zero_failures != 1 ] && [ $non_interop_flag == 0 ]; then echo "Non-interop cases without non-interop flag encountered!"; exit $EXIT_CODE_FAIL; fi
    - if [ $zero_failures != 1 ] && [ $non_interop_flag == 1 ]; then echo "Non-interop cases with non-interop flag encountered"; exit $EXIT_CODE_NON_BE; fi
    - exit 0

  allow_failure:
@@ -1001,8 +995,6 @@ ivas-interop-on-merge-request:
    paths:
      - report-junit.xml
      - report.html
      - report2-junit.xml
      - report2.html
    expose_as: "interop test results"
    reports:
      junit:
@@ -1033,7 +1025,7 @@ evs-pytest-on-merge-request:
    ### prepare pytest
    # create references
    - testcase_timeout=60
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --testcase_timeout=$testcase_timeout
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v --update_ref 1 --param_file scripts/config/self_test_evs.prm --testcase_timeout=$testcase_timeout

    ### Run test using branch scripts and input
    - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi
@@ -1317,8 +1309,7 @@ codec-comparison-on-main-push:
    - mv IVAS_dec_test IVAS_dec
    # create references
    - testcase_timeout=60
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 -m create_ref --testcase_timeout=$testcase_timeout
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 -m create_ref_part2 --testcase_timeout=$testcase_timeout
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 --testcase_timeout=$testcase_timeout

    ### re-checkout the latest commit here, if ref_using_main is set
    - if [ $ref_using_main -eq 1 ]; then git checkout $latest_commit;fi
@@ -1397,8 +1388,7 @@ ivas-conformance:
    # Reference creation
    - python scripts/prepare_combined_format_inputs.py
    - $TEST_SET = "tests/codec_be_on_mr_nonselection", "tests/renderer/test_renderer.py", "tests/split_rendering/test_split_rendering.py"
    - python -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref --create_ref --keep_files
    - python -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref_part2 --keep_files
    - python -m pytest $TEST_SET -v -n auto --update_ref 1 --create_ref --keep_files

    # Output creation
    - python -m pytest $TEST_SET -v -n auto --keep_files --create_cut --html=report_cmd.html --self-contained-html
@@ -1490,8 +1480,7 @@ ivas-conformance-linux:
    # Reference creation
    - python3 scripts/prepare_combined_format_inputs.py
    - TEST_SET="tests/codec_be_on_mr_nonselection tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py"
    - python3 -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref --create_ref --keep_files
    - python3 -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref_part2 --keep_files
    - python3 -m pytest $TEST_SET -v -n auto --update_ref 1 --create_ref --keep_files

    # Output creation
    - python3 -m pytest $TEST_SET -v -n auto --keep_files --create_cut --html=report_cmd.html --self-contained-html
@@ -1623,7 +1612,7 @@ 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 -m create_ref --param_file scripts/config/self_test_ltv.prm --testcase_timeout=$testcase_timeout || exit_code_ref=$?
    - 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=$?

    ### run pytest self-test using long test vectors
    - exit_code=0
@@ -2246,24 +2235,27 @@ coverage-test-on-main-scheduled:
    - *copy-ltv-files-to-testv-dir
    - make GCOV=1 -j
    - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec --use_ltv
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec --use_ltv

    # -- Run short test vector suite to check coverage of that first
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v -n auto --update_ref 1 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec

    # need to ignore non-zero exit codes as limiter is active and thus the different framesiszes will not be BE in all cases
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 5 --decoder_only || true
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 10 --decoder_only || true
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 5 --decoder_only --use_ltv || true
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 10 --decoder_only --use_ltv || true
    - python3 -m pytest -q -n auto tests/renderer/test_renderer.py --create_ref
    - python3 -m pytest -q -n auto tests/renderer/test_renderer.py --create_cut    
    - lcov -c -d obj -o coverage_stv.info # extract coverage of short test vectors here
    # remove apps and lib_util files from coverage
    - lcov -r coverage_stv.info "*apps*" -o coverage_stv.info
    - lcov -r coverage_stv.info "*lib_util*" -o coverage_stv.info
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v -n auto --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec

    # -- Add extended coverage of EVS test and long test vectors
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v -n auto --update_ref 1 --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - bash ci/smoke_test.sh coverage
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v -n auto --update_ref 1 -m create_ref --param_file scripts/config/self_test_ltv.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_param_file.py -v -n auto --update_ref 1 --param_file scripts/config/self_test_ltv.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_sba.py -v -n auto --update_ref 1 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec --use_ltv
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_sba.py -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 5 --decoder_only --use_ltv || true
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR/test_sba.py -v --dut_encoder_path ./IVAS_cod --dut_decoder_path ./IVAS_dec --dut_fr 10 --decoder_only --use_ltv || true    
    - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py
    - lcov -c -d obj -o coverage.info
    # remove apps and lib_util files from coverage
+0 −1
Original line number Diff line number Diff line
@@ -128,7 +128,6 @@ def convert_test_string_to_tag(test_string):
    return tag_str


@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])
+70 −80
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@ def check_and_makedir(dir_path):
                raise  # raises the error again


@pytest.mark.create_ref
@pytest.mark.parametrize("tag", tag_list)
@pytest.mark.parametrize("fs", sample_rate_list)
def test_pca_enc(
@@ -185,7 +184,6 @@ def test_pca_enc(
    )


@pytest.mark.create_ref
@pytest.mark.parametrize("ivas_br", ivas_br_FOA)
@pytest.mark.parametrize("dtx", dtx_set)
@pytest.mark.parametrize("tag", tag_list)
@@ -276,7 +274,6 @@ def test_sba_enc_system(
            gain_flag,
            keep_files,
            cut_gain=cut_gain,
            create_dutenc=True,
            cut_testv=cut_testv,
        )

@@ -307,7 +304,6 @@ def test_sba_enc_system(
    )


@pytest.mark.create_ref
@pytest.mark.parametrize("ivas_br", ivas_br_HOA2)
@pytest.mark.parametrize("tag", tag_list_HOA2)
def test_spar_hoa2_enc_system(
@@ -394,7 +390,6 @@ def test_spar_hoa2_enc_system(
    )


@pytest.mark.create_ref
@pytest.mark.parametrize("ivas_br", ivas_br_HOA3)
@pytest.mark.parametrize("tag", tag_list_HOA3)
def test_spar_hoa3_enc_system(
@@ -481,7 +476,6 @@ def test_spar_hoa3_enc_system(
    )


@pytest.mark.create_ref
@pytest.mark.parametrize("ivas_br", ivas_br_FOA)
@pytest.mark.parametrize("dtx", dtx_set)
@pytest.mark.parametrize("tag", tag_list_bw_force)
@@ -579,13 +573,6 @@ def test_sba_enc_BWforce_system(
    )


# assumption:
# - the needed reference bitstreams are created by test_sba_enc_system
# -> reference bitstreams are not any longer created as part of this test
# -> the parameters of this test (except additional parameter plc_pattern) need to be a subset of the parameters in test_sba_enc_system
# -> the reference generation for this test (reference decoder output) needs to be done after completion of test_sba_enc_system
#    -> therefore the marker create_ref_part2
@pytest.mark.create_ref_part2
@pytest.mark.parametrize("ivas_br", ivas_br_plc)
@pytest.mark.parametrize("dtx", dtx_set)
@pytest.mark.parametrize("tag", tag_list)
@@ -595,11 +582,14 @@ def test_sba_enc_BWforce_system(
def test_sba_plc_system(
    record_property,
    props_to_record,
    dut_encoder_frontend: EncoderFrontend,
    dut_decoder_frontend: DecoderFrontend,
    ref_decoder_frontend,
    test_vector_path,
    reference_path,
    dut_base_path,
    ref_decoder_path,
    ref_encoder_frontend,
    ref_decoder_frontend,
    br_switch_file_path,
    update_ref,
    keep_files,
    ivas_br,
@@ -632,11 +622,45 @@ def test_sba_plc_system(
        pytest.skip()
    if "ltv" in tag:
        tag = f"ltv{fs}_FOA"
        cut_testv = False
    elif "stv" in tag:
        tag = tag + fs + "c"
        cut_testv = True
    else:
        assert 0 

    # added enc call
    max_bw = "FB"
    sba_order = "+1"
    if gain_flag == 1:
        cut_gain = "16.0"
    elif dtx == "1":
        cut_gain = ".004"
    else:
        cut_gain = "1.0"

    sba_enc(
        dut_encoder_frontend,
        test_vector_path,
        ref_encoder_frontend,
        reference_path,
        dut_base_path,
        br_switch_file_path,
        tag,
        fs,
        ivas_br,
        dtx,
        SID,
        max_bw,
        sba_order,
        update_ref,
        gain_flag,
        keep_files,
        cut_gain=cut_gain,
        cut_testv=cut_testv,
        plc_pattern=plc_pattern,
    )

    # dec
    sba_dec(
        record_property,
@@ -685,9 +709,9 @@ def sba_enc(
    gain_flag,
    keep_files=False,
    cut_gain="1.0",
    create_dutenc=False,
    cut_testv=False,
    pca=False,
    plc_pattern=None,
):
    # ------------  run cmd  ------------
    dut_out_dir = f"{dut_base_path}/sba_bs/pkt"
@@ -707,28 +731,22 @@ def sba_enc(
    tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}"
    if ivas_br == "sw_24k4_256k.bin":
        ivas_br = f"{br_switch_file_path}/sw_24k4_256k.bin"
    short_tag_ext = ""
    if gain_flag != -1:
        short_tag_ext += f"_Gain{gain_flag}"
    if SID == 1:
        short_tag_ext += "_SID"
    if pca:
        short_tag_ext += "_pca"

    # to avoid conflicting names in case of parallel test execution, differentiate all cases
    long_tag_ext = ""
    tag_ext = ""
    if pca:
        tag_ext += "_pca"
    if gain_flag != -1:
        long_tag_ext += f"_Gain{gain_flag}"
        tag_ext += f"_Gain{gain_flag}"
    if SID == 1:
        long_tag_ext += "_SID"
    dut_pkt_file = f"{dut_out_dir}/{tag_out}{long_tag_ext}.192"
    ref_pkt_file = f"{ref_out_dir}/{tag_out}{short_tag_ext}.192"
    ref_pkt_file_dutenc = f"{ref_out_dir}/{tag_out}{short_tag_ext}_dutenc.192"
        tag_ext += "_SID"
    if plc_pattern is not None:
        tag_ext += "_" + plc_pattern
    dut_pkt_file = f"{dut_out_dir}/{tag_out}{tag_ext}.192"
    ref_pkt_file = f"{ref_out_dir}/{tag_out}{tag_ext}.192"
    if SID == 1:
        dut_pkt_file_cut = f"{dut_out_dir}/{tag_out}{long_tag_ext}_cut.192"
        ref_pkt_file_cut = f"{ref_out_dir}/{tag_out}{short_tag_ext}_cut.192"
        ref_pkt_file_dutenc_cut = (
            f"{ref_out_dir}/{tag_out}{short_tag_ext}_dutenc_cut.192"
        )
        dut_pkt_file_cut = f"{dut_out_dir}/{tag_out}{tag_ext}_cut.192"
        ref_pkt_file_cut = f"{ref_out_dir}/{tag_out}{tag_ext}_cut.192"
    input_path = f"{test_vector_path}/{tag_in}{in_extension}"
    dtx_mode = dtx == "1"

@@ -742,7 +760,7 @@ def sba_enc(

        input_path = cut_file

    if ref_encoder_frontend:
    if update_ref == 1:
        # call REF encoder
        ref_encoder_frontend.run(
            ivas_br,
@@ -754,18 +772,6 @@ def sba_enc(
            pca=pca,
            dtx_mode=dtx_mode,
        )
        if create_dutenc:
            # for PLC decoder tests, create bitstream using DUT encoder
            encoder_frontend.run(
                ivas_br,
                sampling_rate,
                input_path,
                ref_pkt_file_dutenc,
                sba_order=sba_order,
                max_band=ivas_max_bw,
                pca=pca,
                dtx_mode=dtx_mode,
            )

    if update_ref == 0:
        # call DUT encoder
@@ -781,16 +787,12 @@ def sba_enc(
        )

    if SID == 1:
        if ref_encoder_frontend:
        if update_ref == 1:
            with open(ref_pkt_file, "rb") as fp_in:
                with open(ref_pkt_file_cut, "wb") as fp_out:
                    fr_cnt, cut_cnt = cut_from_start(fp_in, fp_out, 0, True)
            with open(ref_pkt_file_dutenc, "rb") as fp_in:
                with open(ref_pkt_file_dutenc_cut, "wb") as fp_out:
                    fr_cnt, cut_cnt = cut_from_start(fp_in, fp_out, 0, True)
            if not keep_files:
                os.remove(ref_pkt_file)
                os.remove(ref_pkt_file_dutenc)
        if update_ref == 0:
            with open(dut_pkt_file, "rb") as fp_in:
                with open(dut_pkt_file_cut, "wb") as fp_out:
@@ -833,48 +835,36 @@ def sba_dec(

    tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}"

    short_tag_ext = ""
    if gain_flag != -1:
        short_tag_ext += f"_Gain{gain_flag}"
    if pca:
        short_tag_ext += "_pca"
    if SID == 1:
        short_tag_ext += "_SID_cut"
    # to avoid conflicting names in case of parallel test execution, differentiate all cases
    long_tag_ext = ""
    tag_ext = ""
    if pca:
        tag_ext += "_pca"
    if gain_flag != -1:
        long_tag_ext += f"_Gain{gain_flag}"
        tag_ext += f"_Gain{gain_flag}"
    if SID == 1:
        long_tag_ext += "_SID_cut"
        tag_ext += "_SID"
    if plc_pattern is not None:
        tag_ext += "_" + plc_pattern
    if SID == 1:
        tag_ext += "_cut"

    dut_out_dir = f"{dut_base_path}/sba_bs/raw"
    ref_out_dir = f"{reference_path}/sba_bs/raw"

    dut_in_pkt = f"{dut_base_path}/sba_bs/pkt/{tag_out}{long_tag_ext}.192"
    ref_in_pkt = f"{reference_path}/sba_bs/pkt/{tag_out}{short_tag_ext}.192"
    ref_in_pkt_dutenc = (
        f"{reference_path}/sba_bs/pkt/{tag_out}{short_tag_ext}_dutenc.192"
    )
    if SID == 1:
        if gain_flag != -1:
            ref_in_pkt_dutenc = f"{reference_path}/sba_bs/pkt/{tag_out}_Gain{gain_flag}_SID_dutenc_cut.192"
        else:
            ref_in_pkt_dutenc = (
                f"{reference_path}/sba_bs/pkt/{tag_out}_SID_dutenc_cut.192"
            )
    dut_in_pkt = f"{dut_base_path}/sba_bs/pkt/{tag_out}{tag_ext}.192"
    ref_in_pkt = f"{reference_path}/sba_bs/pkt/{tag_out}{tag_ext}.192"

    plc_file = None
    if plc_pattern is not None:
        plc_file = f"{TESTV_DIR}/{plc_pattern}.g192"
        long_tag_ext = f"{long_tag_ext}_{plc_pattern}"
        short_tag_ext = f"{short_tag_ext}_{plc_pattern}"

    dut_out_raw = f"{dut_out_dir}/{tag_out}{long_tag_ext}.wav"
    ref_out_raw = f"{ref_out_dir}/{tag_out}{short_tag_ext}.wav"
    dut_out_raw = f"{dut_out_dir}/{tag_out}{tag_ext}.wav"
    ref_out_raw = f"{ref_out_dir}/{tag_out}{tag_ext}.wav"

    check_and_makedir(dut_out_dir)
    check_and_makedir(ref_out_dir)

    if ref_decoder_frontend:
    if update_ref == 1:
        # call REF decoder
        ref_decoder_frontend.run(
            output_config,
@@ -886,7 +876,7 @@ def sba_dec(

    if update_ref == 0:
        if plc_file is not None:
            dut_in_pkt = ref_in_pkt_dutenc
            dut_in_pkt = dut_in_pkt
        elif decoder_only:
            dut_in_pkt = ref_in_pkt

+1 −3
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ from .constants import (
)


@pytest.mark.create_ref
@pytest.mark.parametrize("experiment,bitrate,dtx,fer,testset", P800_PARAMS_UNIFIED)
@pytest.mark.parametrize("category", P800_CATEGORIES)
def test_p800(
@@ -71,7 +70,6 @@ def test_p800(
    )


@pytest.mark.create_ref
@pytest.mark.parametrize("experiment,bitrate,dtx,fer,testset", BS1534_PARAMS_UNIFIED)
@pytest.mark.parametrize("input_file_num", range(1, 1 + BS1534_N_FILES))
def test_bs1534_no_masa(
@@ -104,7 +102,7 @@ def test_bs1534_no_masa(
    )


@pytest.mark.create_ref

@pytest.mark.parametrize(
    "experiment,bitrate,dtx,fer,testset,category,input_file_num",
    BS1534_MASA_PARAMS_UNIFIED,
+1 −8
Original line number Diff line number Diff line
@@ -564,7 +564,7 @@ class DecoderFrontend:

            eid_command = [eid_path]
            eid_command.extend(["-fer", "-vbr", "-bs", "g192", "-ep", "g192"])
            eid_output_suffix = "." + os.path.basename(plc_file) + ".fer"
            eid_output_suffix = ".fer"
            eid_command += [
                str(input_bitstream_path),
                str(plc_file),
@@ -824,13 +824,6 @@ def decoder_only(request) -> bool:

def pytest_configure(config):
    config.addinivalue_line("markers", "serial: mark test to run only in serial")
    config.addinivalue_line(
        "markers", "create_ref: mark test capable of producing references"
    )
    config.addinivalue_line(
        "markers",
        "create_ref_part2: reference creation test that depends on create_ref references",
    )
    if config.option.param_file:
        testconfig.PARAM_FILE = config.option.param_file
    if config.option.use_ltv:
Loading