diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-02-22 22:10:55 +0100 |
---|---|---|
committer | Niklas Haas <github-daiK1o@haasn.dev> | 2023-02-23 10:14:53 +0100 |
commit | 84f6d7a97eda8a303cfbb4553fa736c67c19280d (patch) | |
tree | bda9b3387bc2ddd758eefebdf7d15fe8037c830d /video/out | |
parent | 985a253f8444a3661131c0e0fbbfad49b5d88360 (diff) | |
download | mpv-84f6d7a97eda8a303cfbb4553fa736c67c19280d.tar.bz2 mpv-84f6d7a97eda8a303cfbb4553fa736c67c19280d.tar.xz |
vo_gpu_next: fix color space hint with target peak override
Fixes: #11339
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/vo_gpu_next.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 060b17a80b..fee22e5141 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -819,7 +819,8 @@ static void apply_target_options(struct priv *p, struct pl_frame *target) target->color.primaries = mp_prim_to_pl(opts->target_prim); if (opts->target_trc) target->color.transfer = mp_trc_to_pl(opts->target_trc); - if (opts->target_peak) + // If swapchain returned a value use this, override is used in hint + if (opts->target_peak && !target->color.hdr.max_luma) target->color.hdr.max_luma = opts->target_peak; if (opts->dither_depth > 0) { struct pl_bit_encoding *tbits = &target->repr.bits; @@ -895,6 +896,8 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) hint.primaries = mp_prim_to_pl(opts->target_prim); if (opts->target_trc) hint.transfer = mp_trc_to_pl(opts->target_trc); + if (opts->target_peak) + hint.hdr.max_luma = opts->target_peak; pl_swapchain_colorspace_hint(p->sw, &hint); } else if (!p->target_hint) { pl_swapchain_colorspace_hint(p->sw, NULL); |