Commit 931e20f1 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

Merge remote-tracking branch 'origin/main' into OBJ_EDITING_formal_impr

parents 833abda3 fb6b8788
Loading
Loading
Loading
Loading
Loading
+40 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ variables:
      - 'ivas-conformance'
      - 'ivas-conformance-linux'
      - 'check-float-reference'
      - 'test-branch-vs-input-passthrough'
  GIT_CLEAN_FLAGS: -ffdxq
  TESTCASE_TIMEOUT_STV_SANITIZERS: 180
  TESTCASE_TIMEOUT_LTV_SANITIZERS: 1200
@@ -69,7 +70,9 @@ workflow:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'check-float-reference'
      variables:
        IVAS_PIPELINE_NAME: 'check-float-reference: $CI_COMMIT_BRANCH'
    
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-branch-vs-input-passthrough'
      variables:
        IVAS_PIPELINE_NAME: 'Pass-through comparison vs input: $CI_COMMIT_BRANCH'

stages:
  - .pre
@@ -265,6 +268,8 @@ stages:
      when: never      
    - if: $MANUAL_PIPELINE_TYPE == 'check-float-reference'
      when: never
    - if: $MANUAL_PIPELINE_TYPE == 'test-branch-vs-input-passthrough'
      when: never
    - when: on_success

.rules-merge-request:
@@ -1639,6 +1644,40 @@ test-long-self-test:
      junit:
        - report-junit-ltv.xml

test-branch-vs-input-passthrough:
  tags:
    - ivas-linux
  stage: compare
  timeout: "30 minutes" # TBD
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'test-branch-vs-input-passthrough'
  allow_failure:
    exit_codes:
      - 123
  script:
    - *print-common-info
    - make -j

    - exit_code=0
    - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --html=report.html --self-contained-html --junit-xml=report-junit.xml --compare_to_input --mld --ssnr --odg || exit_code=$?
    - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true
    - python3 scripts/parse_xml_report.py report-junit.xml report.csv
    - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - if [ $exit_code -eq 1 ]; then echo "Differences encountered."; exit $EXIT_CODE_NON_BE; fi
    - exit 0

  artifacts:
    name: "test-branch-vs-input-passthrough--sha-$CI_COMMIT_SHORT_SHA--results"
    when: always
    expire_in: 4 mos
    paths:
      - report-junit.xml
      - report.html
      - report.csv
    expose_as: "test-branch-vs-input-passthrough results"
    reports:
      junit:
        - report-junit.xml

# ---------------------------------------------------------------
# Scheduled jobs on main
+1 −0
Original line number Diff line number Diff line
@@ -184,6 +184,7 @@


#define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR            /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */
#define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR       /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */

/* ##################### End NON-BE switches ########################### */

+6 −1
Original line number Diff line number Diff line
@@ -261,8 +261,13 @@ void TDREND_firfilt(
    /* Handle memory */
    p_signal = buffer + filterlength - 1;
    mvr2r( mem, buffer, filterlength - 1 ); /* Insert memory */
#ifdef NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR
    mvr2r( signal, p_signal, subframe_length );                                    /* Insert current frame */
    mvr2r( p_signal + subframe_length - filterlength + 1, mem, filterlength - 1 ); /* Update memory for next frame */
#else
    mvr2r( signal, buffer + filterlength - 1, subframe_length );                 /* Insert current frame */
    mvr2r( signal + subframe_length - filterlength + 1, mem, filterlength - 1 ); /* Update memory for next frame */
#endif

    /* Convolution */
    for ( i = 0; i < subframe_length; i++ )
+14 −3
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ EVS_FORMATS = {
    "EVS_JBM_dec": r"Readme_JBM_dec",
}

NO_FORMATS = {"Default": r".*"}

IVAS_CATEGORIES = {
    "Normal operation": r".*",
@@ -48,6 +49,8 @@ EVS_CATEGORIES = {
    "JBM": r"JBM",
}

NO_CATEGORIES = {"N/A": r".*"}

# Main routine
if __name__ == "__main__":
    parser = argparse.ArgumentParser(
@@ -64,15 +67,23 @@ if __name__ == "__main__":
        action="store_true",
        help="Parse using EVS 26.444 formats",
    )
    parser.add_argument(
        "--skip_formats",
        action="store_true",
        help="Parse without formats and categories. Suitable for general tests which do not match the IVAS categories.",
    )
    args = parser.parse_args()
    xml_report = args.xml_report
    csv_file = args.csv_file
    FORMATS = IVAS_FORMATS
    CATEGORIES = IVAS_CATEGORIES
    if args.evs:
        FORMATS = EVS_FORMATS
        CATEGORIES = EVS_CATEGORIES
    else:
        FORMATS = IVAS_FORMATS
        CATEGORIES = IVAS_CATEGORIES
    if args.skip_formats:
        FORMATS = NO_FORMATS
        CATEGORIES = NO_CATEGORIES

    tree = ElementTree.parse(xml_report)

    testsuite = tree.find(".//testsuite")
+19 −2
Original line number Diff line number Diff line
@@ -15,7 +15,11 @@ sys.path.append(os.path.join(os.path.dirname(THIS_PATH), "../scripts"))
import numpy as np
import pyaudio3dtools
import pyivastest
# Hack to resolve import when using from command line or from within scripts.
try:
    from .constants import ODG_PATTERN_PQEVALAUDIO
except ImportError:
    from constants import ODG_PATTERN_PQEVALAUDIO


def cmp_pcm(
@@ -59,7 +63,18 @@ def cmp_pcm(
    # In case of wav input, override the nchannels with the one from the wav header
    nchannels = s1.shape[1]

    if s1.shape != s2.shape and not allow_differing_lengths:
    # In case number of channels do not match, fail already now. Could happen in case of
    # comparison to input with for a non-passthrough mode.
    if s1.shape[1] != s2.shape[1]:
        reason = "FAIL: Number of channels differ."
        return 1, reason

    if allow_differing_lengths:
        # to allow for MLD comparison, pad shorter file
        max_len = max(s1.shape[0], s2.shape[0])
        s1 = np.pad(s1,((0,max_len - s1.shape[0]),(0,0)),mode='constant',constant_values=0)
        s2 = np.pad(s2,((0,max_len - s2.shape[0]),(0,0)),mode='constant',constant_values=0)
    elif s1.shape != s2.shape:
        print(
            f"file size in samples: file 1 = {s1.shape[0]},",
            f"file 2 = {s2.shape[0]}",
@@ -175,6 +190,8 @@ if __name__ == "__main__":
    parser.add_argument("--get_mld", action="store_true")
    parser.add_argument("--mld_lim", type=float, default=0, dest="mld_lim")
    parser.add_argument("--get_odg", action="store_true")
    parser.add_argument("--get_ssnr", action="store_true")
    parser.add_argument("--allow_differing_lengths", action="store_true")
    args = parser.parse_args()

    result, msg = cmp_pcm(**vars(args))
Loading