From 11747fa60a64ffe913c26ee52c40b40c8dcdef52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Tue, 29 Aug 2023 10:18:55 +0200 Subject: [PATCH] csputils: add mp_hdr_metadata --- video/csputils.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/video/csputils.h b/video/csputils.h index a1459e9512..1338625072 100644 --- a/video/csputils.h +++ b/video/csputils.h @@ -139,6 +139,24 @@ extern const struct m_opt_choice_alternatives mp_stereo3d_names[]; #define MP_STEREO3D_NAME_DEF(x, def) \ (MP_STEREO3D_NAME(x) ? MP_STEREO3D_NAME(x) : (def)) +struct mp_hdr_metadata { + // HDR10 + // Mastering display metadata + float min_luma, max_luma; // min/max luminance (in cd/m²) + + // Content light level + float max_cll; // max content light level (in cd/m²) + float max_fall; // max frame average light level (in cd/m²) + + // HDR10+ + float scene_max[3]; // maxRGB in cd/m² per component (RGB) + float scene_avg; // average of maxRGB in cd/m² + + // CIE Y + float max_pq_y; // maximum PQ luminance (in PQ, 0-1) + float avg_pq_y; // averaged PQ luminance (in PQ, 0-1) +}; + struct mp_colorspace { enum mp_csp space; enum mp_csp_levels levels;