Skip to content

Commit bbafb74

Browse files
committed
vo_gpu_next: limit min_luma to 1000:1 contrast ratio in SDR mode
1 parent 9b1d47e commit bbafb74

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

video/out/vo_gpu_next.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,9 @@ static bool draw_frame(struct vo *vo, struct vo_frame *frame)
10941094
if (target_csp.primaries == PL_COLOR_PRIM_UNKNOWN)
10951095
target_csp.primaries = get_best_prim_container(&target_csp.hdr.prim);
10961096
if (!pl_color_transfer_is_hdr(target_csp.transfer)) {
1097+
// limit min_luma to 1000:1 contrast ratio in SDR mode
1098+
if (target_csp.hdr.min_luma > PL_COLOR_SDR_WHITE / PL_COLOR_SDR_CONTRAST)
1099+
target_csp.hdr.min_luma = 0;
10971100
// Don't use reported display peak in SDR mode. Mostly because libplacebo
10981101
// forcefully switches to PQ if hinting hdr metadata, ignoring the transfer
10991102
// set in the hint. But also because setting target peak in SDR mode is

0 commit comments

Comments
 (0)