Commit b6f1843f authored by norvell's avatar norvell
Browse files

Merge branch 'ci/bring-back-per-channel-odg' into 'main'

[CI] Restore per-channel ODG

See merge request !1984
parents e1e3bfb5 4156600a
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ import argparse

from create_report_pages import SUBPAGE_TMPL_CSS, FORMATS

MEASURES = ["MLD","DIFF","SSNR","ODG"]
MEASURES = ["MLD","DIFF","SSNR","ODG","DELTA_ODG"]

SUMMARY_PAGE_TMPL_HTML = """

+17 −0
Original line number Diff line number Diff line
@@ -66,6 +66,23 @@ TESTCASES = [
    "MASA 1TC at 256kbps, 48kHz in, 48 kHz out, BINAURAL_ROOM_REVERB out custom configuration",
    "MASA 1TC at 256 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out, HR custom configuration",
    "OMASA 2TC 4ISM at br sw techs 13.2 to 512 kbps start 80 kbps, 48kHz in, 48kHz out, EXT out",
    "OMASA 2Dir2TC 4ISM at 80 kbps, 48kHz in, 48kHz out, BINAURAL out, default object editing, 1SEP-PARAM",
    "OMASA 2Dir2TC 4ISM at 256 kbps, 48kHz in, 48kHz out, BINAURAL out, object editing, JBM Prof 5, DISC",
    "OMASA 2Dir2TC 2ISM at 96 kbps, 48kHz in, 48kHz out, FOA out, object editing, JBM Prof 5, DISC",
    "OMASA 2Dir2TC 2ISM br sw techs 13.2 to 512 kbps start 48 kbps, 48kHz in, 48kHz out, BINAURAL out, object editing",
    "OSBA 3OA 4ISM at 256 kbps, 48kHz in, 48kHz out, BINAURAL out, object editing, DISC",
    "OSBA 2OA 3ISM at 128 kbps, 48kHz in, 48kHz out, FOA out, object editing, JBM Prof 5, DISC",
    "OSBA 2OA 3ISM at bitrate switching 13.2 to 512 kbps, 48kHz in, 48kHz out, BINAURAL out, object editing",
    "4 ISM with metadata at 32 kbps, 48 kHz in, 48 kHz out, BINAURAL out, object editing, PARAM_ISM",
    "4 ISM with metadata at 128 kbps, 48 kHz in, 48 kHz out, BINAURAL out, object editing, DISC",
    "3 ISM with metadata at 24.4 kbps, 48 kHz in, 48 kHz out, FOA out, object editing, JBM Prof 5, PARAM_ISM",
    "3 ISM with metadata at 384 kbps, 48 kHz in, 48 kHz out, FOA out, object editing, JBM Prof 5, DISC",
    "4 ISM with metadata bitrate switching from 32 kbps to 48 kbps, 48 kHz in, 48 kHz out, BINAURAL_ROOM_IR out, object editing",
    "4 ISM with metadata bitrate switching from 48 kbps to 32 kbps, 48 kHz in, 48 kHz out, BINAURAL out, object editing, JBM Prof 5",
    "OMASA 2TC 4ISM at 80 kbps, 48kHz in, 48kHz out, BINAURAL out, default object editing, 1SEP-PARAM",
    "OMASA 2TC 4ISM at 256 kbps, 48kHz in, 48kHz out, BINAURAL out, object editing, JBM Prof 5, DISC",
    "OMASA 2TC 2ISM at 96 kbps, 48kHz in, 48kHz out, FOA out, object editing, JBM Prof 5, DISC",
    "OMASA 2TC 2ISM br sw techs 13.2 to 512 kbps start 48 kbps, 48kHz in, 48kHz out, BINAURAL out, object editing",
]


+2 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ if __name__ == "__main__":
            "DIFF": ("MAXIMUM ABS DIFF", None),
            "SSNR": ("MIN_SSNR", None),
            "ODG": ("MIN_ODG", None),
            "DELTA_ODG": ("DELTA_ODG", None),
        }
    else:
        limits_per_measure = {
@@ -82,6 +83,7 @@ if __name__ == "__main__":
            "DIFF": ("MAXIMUM ABS DIFF", [0, 16, 256, 1024, 2048, 4096, 8192, 16384, 32769]),
            "SSNR": ("MIN_SSNR", [-math.inf, 0, 10, 20, 30, 40, 40, 50, 60, 100]),
            "ODG": ("MIN_ODG", [-5, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5]),
            "DELTA_ODG": ("DELTA_ODG", [-5, -2, -1, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.5]),
        }
    (measure_label, limits) = limits_per_measure[measure]

+7 −0
Original line number Diff line number Diff line
@@ -72,6 +72,11 @@ if __name__ == "__main__":
        action="store_true",
        help="Extract clipping information. Available if encoder has been run with DEBUGGING active.",
    )
    parser.add_argument(
        "--delta_odg",
        action="store_true",
        help="Extract Delta ODG information.",
    )
    parser.add_argument(
        "--skip_formats",
        action="store_true",
@@ -90,6 +95,8 @@ if __name__ == "__main__":
        CATEGORIES = IVAS_CATEGORIES
    if args.clipping:
        PROPERTIES += ["ENC_CORE_OVL","MAX_OVL","MIN_OVL"]
    if args.delta_odg:
        PROPERTIES += ["DELTA_ODG"]
    if args.skip_formats:
        FORMATS = NO_FORMATS
        CATEGORIES = NO_CATEGORIES
+12 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ def cmp_pcm(
    abs_tol=0,
    get_ssnr=False,
    get_odg=False,
    get_odg_bin=False,
    odg_input=None,
    odg_test=None,
    odg_ref=None,
@@ -133,6 +134,16 @@ def cmp_pcm(
            reason += msg + " - "

    if get_odg:
        for n in range(nchannels):
            pqeval_output = pqevalaudio_wrapper(s1[:, n], s2[:, n], fs)

            match_odg = re.search(ODG_PATTERN_PQEVALAUDIO, pqeval_output)
            odg = float(match_odg.groups()[0])
            msg = f"Channel {n} ODG: {odg}"
            reason += " - " + msg
            print(msg)

    if get_odg_bin:
        odg_files = {}
        for f in [odg_input, odg_test, odg_ref]:
            # Load PEAQ test files and ensure 48 kHz sampling rate
@@ -165,7 +176,7 @@ def cmp_pcm(

        odg = odg_test - odg_ref  # Todo: store both rather than difference?

        msg = f"ODG: {odg}"
        msg = f"Delta-ODG: {odg}"
        reason += " - " + msg
        print(msg, file=output_target)

Loading