summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_format.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-11-04 00:52:14 +0100
committersfan5 <sfan5@live.de>2023-11-05 18:57:36 +0100
commit73fbe09a49d3ed00c6e19fdcc658802f28974ae2 (patch)
tree8a39d61582d5e951547a6ce97638929c5f342e84 /video/filter/vf_format.c
parentd9a483cb17cf5239546fec2462b4c2ccca579723 (diff)
downloadmpv-73fbe09a49d3ed00c6e19fdcc658802f28974ae2.tar.bz2
mpv-73fbe09a49d3ed00c6e19fdcc658802f28974ae2.tar.xz
ALL: use pl_hdr_metadata and nuke sig_peak
This commit replaces all uses of sig_peak and maps all HDR metadata. Form notable changes mixed usage of maxCLL and max_luma is resolved and not always max_luma is used which makes vo_gpu and vo_gpu_next behave the same way.
Diffstat (limited to 'video/filter/vf_format.c')
-rw-r--r--video/filter/vf_format.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/video/filter/vf_format.c b/video/filter/vf_format.c
index c0ec11d0b8..4997d6f173 100644
--- a/video/filter/vf_format.c
+++ b/video/filter/vf_format.c
@@ -77,14 +77,12 @@ static void set_params(struct vf_format_opts *p, struct mp_image_params *out,
// When changing the gamma function explicitly, also reset stuff
// related to the gamma function since that information will almost
// surely be false now and have to be re-inferred
- out->color.sig_peak = 0.0;
+ out->color.hdr = (struct pl_hdr_metadata){0};
out->color.light = MP_CSP_LIGHT_AUTO;
}
}
- if (p->sig_peak) {
- out->color.sig_peak = p->sig_peak;
- out->color.hdr.max_cll = p->sig_peak;
- }
+ if (p->sig_peak)
+ out->color.hdr = (struct pl_hdr_metadata){ .max_luma = p->sig_peak * MP_REF_WHITE };
if (p->light)
out->color.light = p->light;
if (p->chroma_location)