Repository navigation
fix(sycl): score 4:0:0 input in psnr_hvs_sycl and psnr_hvs_hip - #1692
Merged
Merged
Conversation
lusoris
force-pushed
the
fix/psnr-hvs-sycl-hip-exact-sum
branch
from
October 1, 2026 12:53
af99885 to
05a2421
Compare
9 tasks done
lusoris
force-pushed
the
fix/psnr-hvs-sycl-hip-exact-sum
branch
from
October 1, 2026 13:28
05a2421 to
d329d18
Compare
lusoris
force-pushed
the
fix/psnr-hvs-sycl-hip-exact-sum
branch
3 times, most recently
from
October 1, 2026 14:39
fa073b5 to
33df23d
Compare
lusoris
force-pushed
the
fix/psnr-hvs-sycl-hip-yuv400
branch
from
October 1, 2026 15:02
ac813f1 to
f0e255e
Compare
psnr_hvs_sycl and psnr_hvs_hip refused 4:0:0 pictures at init()
("YUV400P unsupported"). The CPU extractor and psnr_hvs_cuda score the
luma plane of such input and emit psnr_hvs_y and psnr_hvs. Both twins now
do the same.
- SYCL: validate_hvs_input() no longer rejects the format;
configure_hvs_geometry() sets one active plane for 4:0:0 or
enable_chroma=false, as third_party/xiph/psnr_hvs.c::init does.
- HIP: the twin always dispatched three planes and had no enable_chroma
option. It gains the CPU extractor's option (default true) and a plane
count that its allocation, staging, uploads, kernel arguments and
scores follow.
- core/test/psnr_hvs_twin_parity.h compares 4:0:0 for every twin and adds
an enable_chroma=false case; the CUDA, SYCL and HIP tests run it.
Measured on an Arc A380 (also at forced SIMD32), a gfx1036 and an RTX
4090: psnr_hvs_y and psnr_hvs are bit-identical to the CPU for 4:0:0 and
for enable_chroma=false. On the previous twins the SYCL and HIP tests
fail at the 4:0:0 case (the frame is refused). CPU scores are unchanged.
Closes T-SYCL-HIP-PSNR-HVS-YUV400-REFUSED-2026-10-01.
lusoris
force-pushed
the
fix/psnr-hvs-sycl-hip-yuv400
branch
from
October 1, 2026 15:23
f0e255e to
cc255b9
Compare
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
psnr_hvs_syclandpsnr_hvs_hiprefused 4:0:0 pictures atinit()(YUV400P unsupported). The CPU extractor andpsnr_hvs_cudascore the luma plane of such input and emitpsnr_hvs_yandpsnr_hvs; both twins now do the same. The HIP twin always dispatched three planes and had noenable_chromaoption, so it gains the CPU extractor's option (defaulttrue) and a plane count. ClosesT-SYCL-HIP-PSNR-HVS-YUV400-REFUSED-2026-10-01, found while writing #1689.Stacked on #1689 (
fix/psnr-hvs-sycl-hip-exact-sum, open when this was written): the PR base is that branch, because the change extends its shared test headercore/test/psnr_hvs_twin_parity.hand closes a row it opens. Retarget tomasteronce #1689 has merged.Type
feat— new featurefix— bug fixperf— performance improvementrefactor— no behavior changedocs— documentation onlytest— test-onlybuild/ci— tooling / infraport— cherry-pick from upstream Netflix/vmafsycl/cuda/simd— backend-specificChecklist
make format && make lintis green locally. The pre-commit hook set passed on the whole diff. The clang-tidy ratchet was measured on the touched translation units in their lanes (--only):integer_psnr_hvs_sycl.cppandtest_sycl_psnr_hvs_parity.c(SYCL),integer_psnr_hvs_hip.candtest_hip_psnr_hvs_parity.c(HIP),test_cuda_psnr_hvs_parity.c(CUDA), withpsnr_hvs_twin_parity.hthrough them: 0 findings in the touched files, no baseline change. The whole-tree lint was not run.python3 scripts/ci/run_meson_test.py -- -C build --suite=faston a CPU build and on a CPU + CUDA build (RTX 4090); on the SYCL build (Arc A380)test_sycl_psnr_hvs_parity,_simd32,_large,test_sycl_shared_planes,test_sycl_twin_option_parity,test_sycl_kernel_scratch; on the HIP build (gfx1036)test_hip_psnr_hvs_parity,_large,test_hip_twin_option_parity. On a HIP build without device kernels (-Denable_hipcc=false)test_hip_psnr_hvs_parityskips (exit 77)./cross-backend-diffand the worst ULP is ≤ 2. The worst difference is 0: the parity tests compare every output bit for bit..c/.cpp/.cu/.h/.hpp, it has the appropriate license header (seeCONTRIBUTING.md). No new source file.!orBREAKING CHANGE:and the migration path is documented below.docs/adr/_index_fragments/<NNNN-slug>.mdand the slug is appended todocs/adr/_index_fragments/_order.txt. No ADR: the behaviour is the CPU extractor's and the CUDA twin's.Bug-status hygiene (ADR-0165)
docs/state.mdupdated in this PR:T-SYCL-HIP-PSNR-HVS-YUV400-REFUSED-2026-10-01moved to Recently closed.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.No CPU extractor code changes.
Cross-backend numerical results
test_{cuda,sycl,hip}_psnr_hvs_paritycompare the twin with the CPU extractor of the same binary, bit for bit, onpsnr_hvs_y,psnr_hvs_cb,psnr_hvs_crandpsnr_hvs. New cases, all identical on an Arc A380 (compiler's SIMD16 and forced SIMD32), a gfx1036 and an RTX 4090:The existing cases (8 to 12 bits, 4:2:0 / 4:2:2 / 4:4:4, 3840x2160) stay identical.
Deep-dive deliverables (ADR-0108)
third_party/xiph/psnr_hvs.c::initand ofpsnr_hvs_cuda; nothing was investigated beyond reading them. The finding is recorded in Research-1401 §6.AGENTS.mdinvariant note —core/src/feature/hip/AGENTS.mdandcore/src/feature/sycl/AGENTS.md(the plane count and what follows it).changelog.d/fixed/sycl-hip-psnr-hvs-yuv400.md.docs/rebase-notes.md, "psnr_hvs_sycl and psnr_hvs_hip score 4:0:0; psnr_hvs_hip takes enable_chroma".Reproducer
On the previous twins both fail in
test_psnr_hvs_every_layout_identicalwithread: the 4:0:0 frame is refused.Known follow-ups
vmafCLI rejects--pixel_format 400for raw input, so 4:0:0 reaches the twins through the library API (and through y4m input, which was not tried here).Breaking changes / migration
None. One new extractor option:
psnr_hvs_hiptakesenable_chroma(defaulttrue), documented indocs/metrics/psnr-hvs.md.