Complete VIDEO-001 through VIDEO-004 software video studies
This commit is contained in:
24
tests/test_video004_pipeline.py
Normal file
24
tests/test_video004_pipeline.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""Полный доступный путь символы → CRC → стирания → видеокадр."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
pytest.importorskip("numba")
|
||||
|
||||
from tools.video004_pipeline_benchmark import MANIFEST, SIGNAL, decode
|
||||
|
||||
|
||||
def test_four_frames_exact_after_four_packet_erasures() -> None:
|
||||
manifest = json.loads(MANIFEST.read_text(encoding="utf-8"))
|
||||
received = np.load(SIGNAL, allow_pickle=False)
|
||||
assert hashlib.sha256(received.tobytes()).hexdigest() == manifest["signal_sha256"]
|
||||
result = decode(received, "numba")
|
||||
assert result["packet_sha256"] == manifest["expected_packet_sha256"]
|
||||
assert result["frame_sha256"] == manifest["expected_frame_sha256"]
|
||||
assert result["parity_recoveries"] == 4
|
||||
assert result["unrecoverable_blocks"] == 0
|
||||
Reference in New Issue
Block a user