Skip to content

fix(windows): keep SDR matrix through HDR output transition - #1045

Merged
zortos293 merged 2 commits into
devfrom
capy/windows-hdr-output-metadata
Sep 24, 2026
Merged

zortos293 merged 2 commits into
devfrom
capy/windows-hdr-output-metadata

Conversation

@zortos293

@zortos293 zortos293 commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

A live Windows HEVC/P010 session decoded about 60 FPS for 40 seconds, then Media Foundation switched its output transfer to SDR and primaries to BT.709 while leaving MF_MT_YUV_MATRIX absent. OpenNOW inherited the original HDR BT.2020 matrix, rejected the mixed format, and restarted the decoder every ~250 ms, leaving black video and an apparent 4 FPS. A diagnostic-only first push confirmed negotiated=Pq/Bt2020/Bt2020 decoded=Sdr/Bt709/Bt2020 explicit=true/true/false on the affected machine.

When output explicitly becomes SDR/BT.709 and omits its matrix, choose the BT.709 matrix rather than carrying the original HDR one. Explicit contradictory matrix values still fail validation, and PQ/HLG transitions retain their BT.2020 requirements. This matches Media Foundation’s documented treatment of the unknown matrix as BT.709. A Windows-only regression test covers absent and unknown matrix values and the contradictory explicit case. Color-only values are retained in failure diagnostics without logging session data.

Full streamer workspace tests, strict Clippy, formatting and diff checks passed locally. Windows CI and a repeat live HDR session on the affected PC are pending before the draft is ready.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c10a1af6-675d-4f2b-ae95-19030807dfcb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@capy-ai capy-ai Bot changed the title diagnostics(windows): identify HDR decoder output color mismatch fix(windows): keep SDR matrix through HDR output transition Sep 24, 2026
@capy-ai
capy-ai Bot marked this pull request as ready for review September 24, 2026 14:18
@zortos293
zortos293 merged commit 02f0d00 into dev Sep 24, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant