Commit f24cc328 authored by Jan Kiene's avatar Jan Kiene
Browse files

add todos and cleanup in jbm be test script

parent 5dc849b9
Loading
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ DTX_ON = "DTX_ON"
DTX_OFF = "DTX_OFF"


# TODO: Clarify if this should also be tested with DTX, see #1122
TESTCASES = [
    # stereo
    ["stereo", 32000, "EXT", "DTX_OFF"],
@@ -187,17 +188,14 @@ def test_be_for_jbm_neutral_dly_profile(
        x_jbm, _ = audiofile.readfile(output_jbm)

        # strip jbm delay
        # TODO: this may need to be adapted to handle variable offsets based on outcome of #1122
        delay_samples = JBM_NEUTRAL_DELAY_MS * sampling_rate_khz
        x_jbm = x_jbm[delay_samples:, :]
        # TODO: if #1122 results in the JBM output always being longer,
        # then this should be removed and a length check with failure otherwise added
        min_len = min(len(x), len(x_jbm))

        cmp_result = audioarray.compare(
            x[:min_len, :],
            x_jbm[:min_len, :],
            x,
            x_jbm,
            fs=sampling_rate_khz * 1000,
            per_frame=False,
            test_start_offset_ms=delay_samples,
        )
        if not cmp_result["bitexact"]:
            pytest.fail("Difference between no jbm and zero-delay jbm decoding!")