Unverified Commit 5b32910c authored by norvell's avatar norvell
Browse files

Merge with main

parents 1da7223f bdbd19ac
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_2235_TD_RENDERER_WORD16                     /* Eri: For float: small synch with BASOP, removing unnecessary abs. BASOP: Use Word16 in TD renderer without converting to Word32 */
#define FIX_FLOAT_1522_LTV_MSAN_QMETADATA_ENC_EC3       /* Nokia: float issue 1522: fix uninit MSAN in EC3 of qmetadata encoding */
#define FIX_FLOAT_1526_DIRAC_MEM_LEAK                   /* FhG: potential memory leak in DirAC handles in case of format switching */
#define ALIGN_ACELP_CORE                                /* VA: align ACELP core functions with BASOP */

+0 −2
Original line number Diff line number Diff line
@@ -2105,10 +2105,8 @@ static int16_t GR_bits_azimuth_context(
    int16_t real_GR_ord1;
    int16_t no_symb_local[MAX_PARAM_SPATIAL_SUBFRAMES];
    int16_t no_data = 0;
#ifdef FIX_FLOAT_1522_LTV_MSAN_QMETADATA_ENC_EC3

    *real_GR_ord = GR_order; /* Init to avoid sanitizer warnings */
#endif

    for ( i = 0; i < no_data_in; i++ )
    {
+4 −1
Original line number Diff line number Diff line
@@ -248,7 +248,8 @@ def compare(
    test_start_offset_ms: int = 0,
    ref_jbm_tf: Optional[Union[Path, str]] = None,
    test_jbm_tf: Optional[Union[Path, str]] = None,
    handle_differing_lengths: HandleDifferingLengths = "fail",
    handle_differing_lengths: HandleDifferingLengths = HandleDifferingLengths.FAIL,
    mld_playback_level: float = 92.0,
) -> dict:
    """Compare two audio arrays

@@ -390,6 +391,8 @@ def compare(
                # wav-diff return code is 1 if differences are found which
                # would cause parse_wav_diff to raise an Exception on these cases
                "--no-fail",
                "--mld-playback-level",
                f"{mld_playback_level}",
                str(tmpfile_ref),
                str(tmpfile_test),
            ]
+21 −4
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ def cmp_pcm(
    cut_jbm_tf: Optional[Path] = None,
    quiet: Optional[bool] = False,
    scalefac: int = 1,
    mld_playback_level: float = 92.0,
    split_idx: np.ndarray = np.empty(0),
) -> tuple[List[int], List[str]]:
    """
@@ -111,6 +112,7 @@ def cmp_pcm(
            ref_jbm_tf=ref_jbm_tf,
            test_jbm_tf=cut_jbm_tf,
            handle_differing_lengths=handle_differing_lengths,
            mld_playback_level=mld_playback_level,
        )

        output_differs = 0
@@ -146,7 +148,9 @@ def cmp_pcm(

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

                match_odg = re.search(ODG_PATTERN_PQEVALAUDIO, pqeval_output)
                odg = float(match_odg.groups()[0])
@@ -168,7 +172,7 @@ def cmp_pcm(
                ).astype(np.int16)

            pqeval_output = pqevalaudio_wrapper(
                odg_files[odg_input], odg_files[odg_ref], 48000
                odg_files[odg_input], odg_files[odg_ref], 48000, mld_playback_level
            )
            match_odg = re.search(ODG_PATTERN_PQEVALAUDIO, pqeval_output)
            try:
@@ -177,7 +181,7 @@ def cmp_pcm(
                raise OdgParsingFailed("Could not get Odg for ref signal")

            pqeval_output = pqevalaudio_wrapper(
                odg_files[odg_input], odg_files[odg_test], 48000
                odg_files[odg_input], odg_files[odg_test], 48000, mld_playback_level
            )
            match_odg = re.search(ODG_PATTERN_PQEVALAUDIO, pqeval_output)
            try:
@@ -208,6 +212,7 @@ def pqevalaudio_wrapper(
    ref_sig: np.ndarray,
    eval_sig: np.ndarray,
    fs: int,
    playback_level: float = 92.0,
) -> str:
    with tempfile.TemporaryDirectory() as tmp_dir:
        tmp_dir = Path(tmp_dir)
@@ -229,7 +234,13 @@ def pqevalaudio_wrapper(
        pyaudio3dtools.audiofile.writefile(tmp_file_ref, r48, 48000)
        pyaudio3dtools.audiofile.writefile(tmp_file_eval, t48, 48000)

        cmd = ["PQevalAudio", tmp_file_ref, tmp_file_eval]
        cmd = [
            "PQevalAudio",
            "--levelSPL",
            f"{playback_level}",
            tmp_file_ref,
            tmp_file_eval,
        ]

        result = subprocess.run(cmd, capture_output=True)
        if result.returncode != 0:
@@ -277,6 +288,12 @@ if __name__ == "__main__":
        dest="scalefac",
        help="Scale factor to be applied before comparing the output. Useful when input scaling has been applied.",
    )
    parser.add_argument(
        "--mld-playback-level",
        type=float,
        help="Playback level arg for MLD in wav-diff",
        default=92.0,
    )
    parser.add_argument("--quiet", action="store_true")
    args = vars(parser.parse_args())

+10 −6
Original line number Diff line number Diff line
@@ -545,7 +545,12 @@ def run_test(
                str(f).replace(dut_base_path, reference_path) for f in dut_dmx_files
            ]

            prop_results = compare_dmx_signals(ref_dmx_files, dut_dmx_files, in_sr)
            prop_results = compare_dmx_signals(
                ref_dmx_files,
                dut_dmx_files,
                in_sr,
                test_info.config.options.mld_playback_level,
            )
            for prop, val in prop_results.items():
                dut_decoder_frontend.record_property(prop, val)

@@ -639,7 +644,7 @@ def run_test(
            odg_ref=odg_ref,
            ref_jbm_tf=ref_tracefile_dec,
            cut_jbm_tf=dut_tracefile_dec,
            scalefac=test_info.config.option.scalefac,
            mld_playback_level=test_info.config.option.mld_playback_level,
            split_idx=split_idx,
        )

@@ -669,7 +674,7 @@ def run_test(
                odg_ref=odg_ref,
                ref_jbm_tf=ref_tracefile_dec,
                cut_jbm_tf=dut_tracefile_dec,
                scalefac=test_info.config.option.scalefac,
                mld_playback_level=test_info.config.option.mld_playback_level,
                split_idx=split_idx,
            )
            output_differs_parts += output_differs_splits
@@ -725,9 +730,8 @@ def run_test(
            if this_meta_differs == False:
                if dut_metadata_file.suffix == ".met":
                    this_meta_differs = check_masa_meta_diff(
                        ref=ref_metadata_file,
                        dut=dut_metadata_file,
                        print_stdout=True)
                        ref=ref_metadata_file, dut=dut_metadata_file, print_stdout=True
                    )
                else:
                    if not filecmp.cmp(dut_metadata_file, ref_metadata_file):
                        print("Output metadata differs for file: " + md_file)
Loading