MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
EncodeOptions::HdrInfo Struct Reference

HDR output options. More...

#include <MXWrite/mxwrite.hpp>

Public Attributes

int color_primaries = 0
 AVColorPrimaries value.
int color_range = 0
 AVColorRange value. Raw AVMasteringDisplayMetadata side-data bytes, or empty.
int color_space = 0
 AVColorSpace value.
int color_trc = 0
 AVColorTransferCharacteristic value.
std::vector< uint8_t > content_light
 Raw AVContentLightMetadata side-data bytes, or empty.
bool enabled = false
 Enables the HDR output path.
std::vector< uint8_t > mastering_display

Detailed Description

HDR output options.

When HdrInfo::enabled is true, the writer switches to a dedicated HEVC Main10 + BT.2020 output path that:

  • Encodes with libx265 at 10-bit (AV_PIX_FMT_YUV420P10LE).
  • Tags the stream with BT.2020 primaries, BT.2020 non-constant luminance matrix, and SMPTE ST.2084 (PQ) transfer.
  • Converts incoming 8-bit sRGB RGBA shader output into PQ-encoded 10-bit YUV, placing SDR-range content at the 100-nit reference level inside the PQ signal (SDR-in-HDR-container).
  • Copies mastering_display and content_light side data from the input stream when provided, so player HDR metadata is preserved.

This mode is intended for use when the input video is HDR; the 8-bit GL pipeline cannot reconstruct the original highlight precision, but the resulting file is a correctly-tagged HDR container.

Definition at line 82 of file mxwrite.hpp.

Member Data Documentation

◆ color_primaries

int EncodeOptions::HdrInfo::color_primaries = 0

AVColorPrimaries value.

Definition at line 84 of file mxwrite.hpp.

◆ color_range

int EncodeOptions::HdrInfo::color_range = 0

AVColorRange value. Raw AVMasteringDisplayMetadata side-data bytes, or empty.

Definition at line 87 of file mxwrite.hpp.

◆ color_space

int EncodeOptions::HdrInfo::color_space = 0

AVColorSpace value.

Definition at line 86 of file mxwrite.hpp.

◆ color_trc

int EncodeOptions::HdrInfo::color_trc = 0

AVColorTransferCharacteristic value.

Definition at line 85 of file mxwrite.hpp.

◆ content_light

std::vector<uint8_t> EncodeOptions::HdrInfo::content_light

Raw AVContentLightMetadata side-data bytes, or empty.

Definition at line 91 of file mxwrite.hpp.

◆ enabled

bool EncodeOptions::HdrInfo::enabled = false

Enables the HDR output path.

Definition at line 83 of file mxwrite.hpp.

◆ mastering_display

std::vector<uint8_t> EncodeOptions::HdrInfo::mastering_display

Definition at line 89 of file mxwrite.hpp.


The documentation for this struct was generated from the following file: