Commit 5a193486 authored by norvell's avatar norvell
Browse files

Merge branch 'main' into ci/test-clipping

parents ef5eb1fc c6ae2d8d
Loading
Loading
Loading
Loading
Loading
+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 */

/* ##################### 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++ )
+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))
+5 −1
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(