Commit 354d307b authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge remote-tracking branch 'origin/main' into 1139-fix-param-rev-coloration-short-t60

parents e64e719d c6ae2d8d
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
@@ -182,6 +182,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 */

#define FIX_1139_REV_COLORATION_SHORT_T60               /* Nokia,FhG: Fix issue 1139, prevent sound coloration artefacts at very low reverberation times */

+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++ )
+23 −9
Original line number Diff line number Diff line
@@ -50,6 +50,13 @@ if __name__ == "__main__":
        "--evs",
        action="store_true",
        help="Parse using EVS 26.444 formats",
        default=False,
    )
    parser.add_argument(
        "--diff",
        action="store_true",
        help="Use limits for diff scores",
        default=False,
    )
    args = parser.parse_args()
    csv_report = args.csv_report
@@ -62,7 +69,14 @@ if __name__ == "__main__":
    else:
        FORMATS = IVAS_FORMATS
        CATEGORIES = IVAS_CATEGORIES

    if args.diff:
        limits_per_measure = {
            "MLD": ("MLD", [-math.inf, 0, 0.1, 0.2, 0.3, 0.4, math.inf]),
            "DIFF": ("MAXIMUM ABS DIFF", [-32768, 0, 128, 256, 512, 32767]),
            "SSNR": ("MIN_SSNR", [-math.inf, -0.4, -0.3, -0.2, -0.1, 0, math.inf]),
            "ODG": ("MIN_ODG", [-5.0, -0.3, -0.2, -0.1, 0, math.inf]),
        }
    else:
        limits_per_measure = {
            "MLD": ("MLD", [0, 5, 10, math.inf]),
            "DIFF": ("MAXIMUM ABS DIFF", [0, 1024, 16384, 32769]),
@@ -89,7 +103,7 @@ if __name__ == "__main__":
            f"{str(a)} -- {str(b)}" for (a, b) in zip(limits[0:-1], limits[1:])
        ] + ["None"]
        # Zero difference is treated as a special category for MLD and MAXIMUM ABS DIFF
        if measure_label == "MLD" or measure_label == "MAXIMUM ABS DIFF":
        if (measure_label == "MLD" or measure_label == "MAXIMUM ABS DIFF") and not args.diff:
            limits_labels = ["0"] + limits_labels
        headerline = f"Format;Category;" + ";".join(limits_labels) + "\n"
        fp.write(headerline)
@@ -107,7 +121,7 @@ if __name__ == "__main__":
                    ]
                ]
                # Zero difference is treated as a special category for MLD and MAXIMUM ABS DIFF
                if measure_label == "MLD" or measure_label == "MAXIMUM ABS DIFF":
                if (measure_label == "MLD" or measure_label == "MAXIMUM ABS DIFF") and not args.diff:
                    val = [
                        float(x) for x in values if x != "None" and x != "0" and x != ""
                    ]

scripts/diff_report.py

0 → 100644
+62 −0
Original line number Diff line number Diff line
#! /usr/bin/env python3

"""
(C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
contributors to this repository. All Rights Reserved.

This software is protected by copyright law and by international treaties.
The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
contributors to this repository retain full ownership rights in their respective contributions in
the software. This notice grants no license of any kind, including but not limited to patent
license, nor is any license granted by implication, estoppel or otherwise.

Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
contributions.

This software is provided "AS IS", without any express or implied warranties. The software is in the
development stage. It is intended exclusively for experts who have experience with such software and
solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
and fitness for a particular purpose are hereby disclaimed and excluded.

Any dispute, controversy or claim arising under or in relation to providing this software shall be
submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
the United Nations Convention on Contracts on the International Sales of Goods.
"""

import pandas as pd
import argparse
import sys
import os
import pathlib

COLUMNS_TO_COMPARE = [
    "MLD",
    "MAXIMUM ABS DIFF",
    "MIN_SSNR",
    "MIN_ODG",
]

def main(args):
    df_ref = pd.read_csv(args.csv_ref, sep=";")
    df_test = pd.read_csv(args.csv_test, sep=";")

    for col in COLUMNS_TO_COMPARE:
        df_ref[col] = df_ref[col] - df_test[col]
    df_ref.to_csv(args.csv_diff, index=False, sep=";")
    return 0

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("csv_ref")
    parser.add_argument("csv_test")
    parser.add_argument("csv_diff")

    args = parser.parse_args()
    sys.exit(main(args))
Loading