Skip to content

Add experimental support for HDR.#4

Merged
hgaiser merged 2 commits intomainfrom
hdr-support
Mar 2, 2026
Merged

Add experimental support for HDR.#4
hgaiser merged 2 commits intomainfrom
hdr-support

Conversation

@hgaiser
Copy link
Owner

@hgaiser hgaiser commented Mar 2, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds experimental HDR-oriented plumbing by extending the RGB→YUV conversion pipeline with BT.709/BT.2020 matrix selection and adding encoder-side color/VUI signaling hooks, alongside more verbose Vulkan device selection diagnostics.

Changes:

  • Add ColorSpace + new RGB input formats (ABGR2101010, RGBA16F) and pass color_space via push constants to the converter shader.
  • Introduce ColorDescription and plumb optional color signaling into H.264/H.265/AV1 session parameter initialization.
  • Improve Vulkan physical device selection logging and error messaging when no suitable Vulkan Video device is found.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/vulkan.rs Adds detailed per-device skip logging and expands the “no suitable device” error message.
src/lib.rs Re-exports newly introduced color-related types from converter and encoder.
src/encoder/mod.rs Introduces ColorDescription and adds EncodeConfig::color_description + builder method.
src/encoder/h265/init.rs Wires optional VUI presence + fields into H.265 SPS creation.
src/encoder/h264/init.rs Uses EncodeConfig::color_description to populate H.264 VUI color fields.
src/encoder/av1/init.rs Maps ColorDescription into AV1 color config enums and flags.
src/converter/shader.rs Updates shader to support BT.709/BT.2020 matrices and adds RGBA16F→PQ handling.
src/converter/pipeline.rs Increases push constant range size to include color_space.
src/converter/mod.rs Adds ColorSpace, new InputFormats, vk_format(), and pushes color_space to the shader.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hgaiser hgaiser merged commit 7987696 into main Mar 2, 2026
6 checks passed
@hgaiser hgaiser deleted the hdr-support branch March 2, 2026 11:50
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.

2 participants