fix(vaapi): use FFmpeg bt2020nc matrix name #16

Merged
enricobuehler merged 1 commits from sassycrown/fix-vaapi-bt2020nc AGit into main 2026-07-28 22:34:28 +00:00
Member

Scope

This is a correctness fix for the libav VAAPI fallback. On supported AMD/Intel hardware, Punktfunk
prefers its Vulkan Video backend for HEVC/AV1; that path does not use this filter.

Problem

The VAAPI filter passes out_color_matrix=bt2020. FFmpeg rejects that value with
Invalid colour_matrix and -22, preventing the fallback HDR graph from opening.

Fix

Use FFmpeg's canonical bt2020nc name for non-constant-luminance BT.2020. This matches the existing
AVCOL_SPC_BT2020_NCL encoder VUI. The focused test and explanatory comment are updated with it.

Verification

cargo fmt --all -- --check
cargo test -p pf-encode vaapi::tests::vui_and_scale_args_agree_per_depth
cargo check -p pf-encode
git diff --check

End-to-end fallback validation used a development host built without vulkan-encode. On an RX 9070
XT, it opened the P010/HEVC Main10 VAAPI graph from a Gamescope BT.2020/PQ capture and streamed HDR
to a Steam Deck OLED at 1280×800@90.

AI assistance

OpenAI Codex assisted with investigation and drafting. I reviewed the final change and validation
results and take responsibility for the submission.

## Scope This is a correctness fix for the libav VAAPI fallback. On supported AMD/Intel hardware, Punktfunk prefers its Vulkan Video backend for HEVC/AV1; that path does not use this filter. ## Problem The VAAPI filter passes `out_color_matrix=bt2020`. FFmpeg rejects that value with `Invalid colour_matrix` and `-22`, preventing the fallback HDR graph from opening. ## Fix Use FFmpeg's canonical `bt2020nc` name for non-constant-luminance BT.2020. This matches the existing `AVCOL_SPC_BT2020_NCL` encoder VUI. The focused test and explanatory comment are updated with it. ## Verification ```text cargo fmt --all -- --check cargo test -p pf-encode vaapi::tests::vui_and_scale_args_agree_per_depth cargo check -p pf-encode git diff --check ``` End-to-end fallback validation used a development host built without `vulkan-encode`. On an RX 9070 XT, it opened the P010/HEVC Main10 VAAPI graph from a Gamescope BT.2020/PQ capture and streamed HDR to a Steam Deck OLED at 1280×800@90. ## AI assistance OpenAI Codex assisted with investigation and drafting. I reviewed the final change and validation results and take responsibility for the submission.
sassycrown added 1 commit 2026-07-28 22:27:13 +00:00
fix(vaapi): use FFmpeg bt2020nc matrix name
ci / rust (pull_request) Canceled after 0s
ci / rust-arm64 (pull_request) Canceled after 0s
ci / web (pull_request) Canceled after 0s
ci / docs-site (pull_request) Canceled after 0s
ci / bench (pull_request) Canceled after 0s
apple / swift (pull_request) Canceled after 0s
apple / screenshots (pull_request) Canceled after 0s
android / android (pull_request) Canceled after 0s
22936bbc89
FFmpeg rejects bt2020 as an out_color_matrix value. Use its canonical bt2020nc name for non-constant-luminance BT.2020, matching the existing AVCOL_SPC_BT2020_NCL encoder VUI.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
sassycrown force-pushed sassycrown/fix-vaapi-bt2020nc from 978f459770 to 22936bbc89 2026-07-28 22:27:13 +00:00 Compare
enricobuehler merged commit e2fd1c586b into main 2026-07-28 22:34:28 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unom/punktfunk#16