summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/csputils.h20
-rw-r--r--video/out/vo.h2
-rw-r--r--video/out/vo_gpu_next.c15
3 files changed, 5 insertions, 32 deletions
diff --git a/video/csputils.h b/video/csputils.h
index 1338625072..ab5d9792e0 100644
--- a/video/csputils.h
+++ b/video/csputils.h
@@ -21,6 +21,8 @@
#include <stdbool.h>
#include <stdint.h>
+#include <libplacebo/colorspace.h>
+
#include "options/m_option.h"
/* NOTE: the csp and levels AUTO values are converted to specific ones
@@ -139,24 +141,6 @@ 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;
diff --git a/video/out/vo.h b/video/out/vo.h
index 6efc6ef63f..6b832b28e8 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -123,7 +123,7 @@ enum mp_voctrl {
/* private to vo_gpu and vo_gpu_next */
VOCTRL_EXTERNAL_RESIZE,
- VOCTRL_HDR_METADATA, // struct mp_hdr_metadata*
+ VOCTRL_HDR_METADATA, // struct pl_hdr_metadata*
};
// Helper to expose what kind of content is currently playing to the VO.
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index eb6f6c2e68..9db649e785 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -1436,20 +1436,9 @@ static int control(struct vo *vo, uint32_t request, void *data)
return true;
}
- case VOCTRL_HDR_METADATA: {
- struct mp_hdr_metadata *hdr = data;
- hdr->min_luma = p->last_hdr_metadata.min_luma;
- hdr->max_luma = p->last_hdr_metadata.max_luma;
- hdr->max_cll = p->last_hdr_metadata.max_cll;
- hdr->max_fall = p->last_hdr_metadata.max_fall;
- hdr->scene_max[0] = p->last_hdr_metadata.scene_max[0];
- hdr->scene_max[1] = p->last_hdr_metadata.scene_max[1];
- hdr->scene_max[2] = p->last_hdr_metadata.scene_max[2];
- hdr->scene_avg = p->last_hdr_metadata.scene_avg;
- hdr->max_pq_y = p->last_hdr_metadata.max_pq_y;
- hdr->avg_pq_y = p->last_hdr_metadata.avg_pq_y;
+ case VOCTRL_HDR_METADATA:
+ *(struct pl_hdr_metadata *) data = p->last_hdr_metadata;
return true;
- }
case VOCTRL_SCREENSHOT:
video_screenshot(vo, data);