Commit 958d6e8b authored by vaclav's avatar vaclav
Browse files
parents a2bcf7c1 9e6e9e18
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ SUBPAGE_TMPL_CSS = """
.tbase .tleft{text-align:left;horizontal-align:bottom}
.tbase .tincrease{text-align:left;background-color:#ff5500;border-color:inherit;font-weight:bold;}
.tbase .treduce{text-align:left;background-color:#acff00;border-color:inherit;font-weight:bold;}

thead {position:sticky;top:0;background-color:#ffffffd0}
.arrowup {font-weight:bold;font-size:200%;}
.arrowdown {font-weight:bold;font-size:200%;}
</style>
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ if __name__ == "__main__":
            "MLD": ("MLD", [0, 1, 2, 3, 4, 5, 10, 20, math.inf]),
            "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, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]),
            "ODG": ("MIN_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]

+45 −1
Original line number Diff line number Diff line
@@ -315,6 +315,47 @@ def run_renderer(
        # CUT creation mode will run a comparison with REF
        out_file_ref = str(OUTPUT_PATH_REF.joinpath(out_file_stem))

        # Check if we need to render to mono, stereo or binaural for PEAQ comparison
        odg_input = None
        odg_test = None
        odg_ref = None
        if get_odg:
            odg_input = out_file_ref[0:-4] + ".INPUT.BINAURAL.wav"
            odg_test = str(out_file)[0:-4] + ".BINAURAL.wav"
            odg_ref = out_file_ref[0:-4] + ".BINAURAL.wav"

            if out_fmt not in PEAQ_SUPPORTED_FMT:
                    # Render test to BINAURAL
                    cmd2 = RENDERER_CMD[:]
                    cmd2[2] = str(out_file)  # in_file
                    cmd2[4] = str(out_fmt)   # in_fmt
                    cmd2[6] = odg_test       # out_file
                    cmd2[8] = "BINAURAL"     # out_fmt
                    cmd2[10] = str(sr)
                    cmd2[0] += BIN_SUFFIX_MERGETARGET # Use IVAS_rend_ref for re-rendering
                    cmd2[0] += binary_suffix
                    run_cmd(cmd2, env)

                    # Render ref to BINAURAL with same settings as test
                    cmd2[2] = str(out_file_ref)  # in_file
                    cmd2[6] = odg_ref            # out_file
                    run_cmd(cmd2, env)
                    out_fmt_bin = "BINAURAL"
            else:
                out_fmt_bin = out_fmt
                odg_test = out_file
                odg_ref = out_file_ref

            if out_fmt_bin != in_fmt:
                # Render input to match out_fmt_bin using same config as input, but with IVAS_rend_ref
                cmd[0] += BIN_SUFFIX_MERGETARGET
                cmd[0] += binary_suffix
                cmd[6] = odg_input       # out_file
                cmd[8] = out_fmt_bin     # out_fmt
                run_cmd(cmd, env)
            else:
                odg_input = in_file

        # see constants.py
        ref_fs = int(cmd[10]) * 1000
        output_differs, reason = cmp_pcm(
@@ -326,7 +367,10 @@ def run_renderer(
            mld_lim=get_mld_lim,
            abs_tol=abs_tol,
            get_ssnr=get_ssnr,
            get_odg=get_ssnr,
            get_odg=get_odg,
            odg_input=odg_input,
            odg_test=odg_test,
            odg_ref=odg_ref,            
        )

        props = parse_properties(reason, output_differs, props_to_record)