Commit 78154d0b authored by sbsarac's avatar sbsarac
Browse files

Merge branch 'main' into 922-use-precomputed-HRTF-average-LR-energies-and-IAC-in-all-renderers

parents 9a67eeee 430c803b
Loading
Loading
Loading
Loading
Loading
+30 −18
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ build-codec-windows-msbuild:
    - *print-common-info-windows
    - *activate-WX-windows
    - py .\scripts\strip_split_rendering.py
    - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug
    - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug

# ---------------------------------------------------------------
# Test jobs for merge requests
@@ -449,17 +449,21 @@ codec-msan:
    - *print-common-info
    - make clean
    - make -j CLANG=1
    - python3 scripts/self_test.py -z console --create | tee test_output.txt
    - run_errors=$(cat test_output.txt | grep -ic "run errors") || true
    - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang memory-sanitizer"; exit 1; fi
    - testcase_timeout=180
    - exit_code=0
    - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py -v --update_ref 1 -m create_ref --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code=$?
    - if [ $exit_code != 0 ] ; then echo "Run errors found by Clang memory-sanitizer"; exit 1; fi
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - scripts/ref/logs/
      - test_output.txt
      - report-junit.xml
      - report.html
    expose_as: "msan selftest results"
    reports:
      junit:
        - report-junit.xml

# code selftest testvectors with address-sanitizer binaries
codec-asan:
@@ -472,17 +476,21 @@ codec-asan:
    - *print-common-info
    - make clean
    - make -j CLANG=2
    - python3 scripts/self_test.py -z console --create | tee test_output.txt
    - run_errors=$(cat test_output.txt | grep -ic "run errors") || true
    - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang address-sanitizer"; exit 1; fi
    - testcase_timeout=180
    - exit_code=0
    - python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py -v --update_ref 1 -m create_ref --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code=$?
    - if [ $exit_code != 0 ] ; then echo "Run errors found by Clang address-sanitizer"; exit 1; fi
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - scripts/ref/logs/
      - test_output.txt
      - report-junit.xml
      - report.html
    expose_as: "asan selftest results"
    reports:
      junit:
        - report-junit.xml

# code selftest testvectors with address-sanitizer binaries
codec-usan:
@@ -495,17 +503,21 @@ codec-usan:
    - *print-common-info
    - make clean
    - make -j CLANG=3
    - UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1 python3 scripts/self_test.py -z console --create
    - grep_exit_code=0
    - grep UndefinedBehaviorSanitizer scripts/ref/logs/* || grep_exit_code=$?
    - if [ $grep_exit_code != 1 ] ; then echo "Run errors in self_test.py with Clang undefined-behavior-sanitizer"; exit 1; fi
    - testcase_timeout=180
    - exit_code=0
    - UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1 python3 -m pytest tests/codec_be_on_mr_nonselection/test_param_file.py -v --update_ref 1 -m create_ref --html=report.html --self-contained-html --junit-xml=report-junit.xml --testcase_timeout=$testcase_timeout --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec || exit_code=$?
    - if [ $exit_code != 0 ] ; then echo "Run errors found by Clang undefined-behavior-sanitizer"; exit 1; fi
  artifacts:
    name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results"
    expire_in: 1 week
    when: always
    paths:
      - scripts/ref/logs/
      - report-junit.xml
      - report.html
    expose_as: "usan selftest results"
    reports:
      junit:
        - report-junit.xml

# test renderer executable
renderer-smoke-test:
@@ -1046,7 +1058,7 @@ be-2-evs-windows:
    - *print-common-info-windows

    - $winoutdata = $null
    - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Release | tee -variable winoutdata
    - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Release | tee -variable winoutdata
    - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8

    # copy over to never change the testvector dir
@@ -1183,7 +1195,7 @@ test-be-to-release:
  script:

    - echo "$CI_COMMIT_BRANCH"
    - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug /p:Platform=win32 /m | tee -variable winoutdata
    - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug /p:Platform=win32 /m | tee -variable winoutdata

    # path to release candidate refs defined in config.toml

+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ dly_profile=./scripts/dly_error_profiles/dly_error_profile_10.dat
ism_md_cmd="--ism_metadata_files /usr/local/ltv/ltvISM1.csv /usr/local/ltv/ltvISM2.csv /usr/local/ltv/ltvISM3.csv /usr/local/ltv/ltvISM4.csv"
duration_arg="-U 1:2"
verbosity_cmd="-z console"
timeout_cmd="--timeout 5"
timeout_cmd="--timeout 20"
ep_file="ci/complexity_measurements/ep_10pct_fer.g192"

if [ $BUILD -eq 1 ];then
+10 −8
Original line number Diff line number Diff line
@@ -25,11 +25,13 @@ if __name__ == '__main__':

    with open(csv_file,'w') as outfile:
        for testcase in testcases:
            if testcase.find('.//skipped') == None:
                if testcase.get('file') == None:
                    fulltestname = testcase.get('classname').replace('.','/') + ".py::" + testcase.get('name')
                else:
                    fulltestname = testcase.get('file') + "::" + testcase.get('name')
            system_out = testcase.find(".//system-out")
                if testcase.find('.//property') == None:
                    mld_val = None
            if system_out is not None:
                for line in system_out.text.split('\n'):
                    if line.startswith('MLD:'):
                        mld_val = float(line.split()[1])
                else:
                    mld_val = testcase.find('.//property').get('value') # Currently MLD is the only set property. If more are added updates are needed here.
                outfile.write(fulltestname + ';' + str(mld_val)+'\n')
+8 −3
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ import pyivastest
import numpy as np


def cmp_pcm(file1, file2, out_config, fs, get_mld = False) -> (int, str):
def cmp_pcm(file1, file2, out_config, fs, get_mld = False, mld_lim = 0) -> (int, str):
    """
    Compare 2 PCM files for bitexactness
    """
@@ -55,7 +55,11 @@ def cmp_pcm(file1, file2, out_config, fs, get_mld = False) -> (int, str):
        if get_mld:
            mld_msg = f"MLD: {cmp_result['MLD']}"
            print(mld_msg)
        return 1, "FAIL: Files have different content"
            if cmp_result['MLD'] <= mld_lim:
                return 0, f"MLD: {cmp_result['MLD']} <= {mld_lim}"
            else:    
                return 1, f"MLD: {cmp_result['MLD']} > {mld_lim}"
        return 1, "Non-BE"


if __name__ == "__main__":
@@ -71,6 +75,7 @@ if __name__ == "__main__":
    )
    parser.add_argument("-s", "--sampling_rate", type=int, default=48000, dest="fs")
    parser.add_argument("--get_mld", action="store_true")
    parser.add_argument("--mld_lim", type=float, default=0, dest="mld_lim")
    args = parser.parse_args()

    result, msg = cmp_pcm(**vars(args))
+18 −3
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ def check_and_makedir(dir_path):
    masa_metadata_audio_ndir_ntransportch_dtx_list,
)
def test_masa_enc_dec(
    record_property,
    dut_encoder_frontend: EncoderFrontend,
    dut_decoder_frontend: DecoderFrontend,
    ref_encoder_frontend: EncoderFrontend,
@@ -106,6 +107,7 @@ def test_masa_enc_dec(
    test_vector_path,
    output_mode,
    get_mld,
    get_mld_lim,
):
    # Input parameters
    in_fs = 48
@@ -201,8 +203,13 @@ def test_masa_enc_dec(

            # Compare audio outputs
            pcmcmp_res, reason = cmp_pcm(
                dec_output_dut, dec_output_ref, output_mode, int(out_fs * 1000), get_mld=get_mld
                dec_output_dut, dec_output_ref, output_mode, int(out_fs * 1000), get_mld=get_mld, mld_lim=get_mld_lim
            )
            if get_mld:
                mld = 0
                if "MLD" in reason:
                    mld = float(reason.split(':')[1].split()[0])
                record_property("MLD",mld)

            # Fail if compare fails compare result
            if metacmp_res == False and pcmcmp_res != 0:
@@ -219,11 +226,19 @@ def test_masa_enc_dec(
            filecmp_res = cmp(dec_output_ref, dec_output_dut)
            if filecmp_res == False:
                cmp_result, reason = cmp_pcm(
                    dec_output_dut, dec_output_ref, output_mode, int(out_fs * 1000), get_mld=get_mld
                    dec_output_dut, dec_output_ref, output_mode, int(out_fs * 1000), get_mld=get_mld, mld_lim=get_mld_lim
                )
                if get_mld:
                    mld = 0
                    if "MLD" in reason:
                        mld = float(reason.split(':')[1].split()[0])
                    record_property("MLD",mld)
                # Report compare result
                assert cmp_result == 0, reason
                if cmp_result != 0:
                    pytest.fail(reason)                
            else:
                if get_mld:
                    record_property("MLD","0")
                print("Comparison bit exact")

        # remove_output(
Loading