Files
spoopyghosty0--frameport/tests/test_hevc_profile.py
T
Veticia Misumena 7128432e39 hevc: decode Main 10 in software instead of hanging on Iris
Iris on the Frame's kernel (6.18) offers HEVC Main 10 only into its
compressed Q10C capture format. The component always asks for NV12, and a
Main 10 stream in such a session returned no pictures: playback stayed at
0:00, the flush on leaving timed out (ACodec -110) and the next video hit
MediaCodec::reclaim, so every later decoder start in the app failed until it
restarted (seen in Bigscreen Beta with local files over DLNA).

- hevc_profile.h reads general_profile_idc from the parameter sets
  (CODECCONFIG or the first access unit, Annex B or hvcC); streams beyond
  Main never open Iris and decode in FFmpeg's software HEVC decoder, which
  the component already contains.
- Its 10-bit planar pictures are rounded to 8-bit planar before the existing
  outputs (no HDR tone mapping).
- The HEVC component lists Main 10 (level 5.1), so format-aware players
  select it instead of reporting NoSupport and using it anyway.
- Decoder revision 9; artifacts rebuilt with native/hevc/build.py (the same
  toolchain rebuilds revision 8 byte for byte).

Tested on a Steam Frame in Bigscreen Beta: 1080p and 4K Main 10 clips and a
real 1080p Main 10 episode play; 8-bit HEVC and H.264 afterwards play too.
FFmpeg's software HEVC decoder on the Frame's CPU, 4 threads as the
component uses: 1080p Main 10 episode 232 fps, synthetic 4K Main 10 72 fps.
2026-10-19 12:22:36 -04:00

20 lines
751 B
Python

"""HEVC Main 10 detection in the shared video codec: such streams decode in software, never on Iris's NV12 path."""
import os
import shutil
import subprocess
from pathlib import Path
import pytest
ROOT = Path(__file__).resolve().parents[1]
def test_profile_from_parameter_sets(tmp_path):
cc = shutil.which("cc") or shutil.which("gcc") or shutil.which("clang")
if not cc or os.name == "nt":
pytest.skip("needs a POSIX host C compiler")
binary = tmp_path / "hevc-profile-test"
subprocess.run([cc, "-std=c11", "-Wall", "-Wextra", "-Werror", "-I", str(ROOT / "native/hevc"),
str(ROOT / "tests/fixtures/src/hevc_profile_test.c"), "-o", str(binary)], check=True)
subprocess.run([str(binary)], check=True)