Skip to content

Commit 755ee24

Browse files
committed
vo_gpu_next: disable auto reference white on onlder libplacebo version
To avoid forcing by default values that may be problematic in some cases, especially with ICC profiles.
1 parent de4db9a commit 755ee24

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

DOCS/man/options.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7542,7 +7542,8 @@ them.
75427542

75437543
In ``auto`` mode (default), the reference white luminance is queried from
75447544
the system. This is currently only supported on Windows. If the system does
7545-
not provide a value, 203 cd/m² is assumed.
7545+
not provide a value, 203 cd/m² is assumed. (``auto`` mode works only
7546+
with libplacebo >= 371)
75467547

75477548
.. note::
75487549

video/out/vo_gpu_next.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,10 +775,15 @@ static float get_ref_luma(struct priv *p)
775775
if (opts->hdr_reference_white)
776776
return opts->hdr_reference_white;
777777

778+
#if PL_API_VER >= 371
778779
// auto: follow the system reference white, if available
780+
// Use auto mode only on libplacebo >= 371, to avoid luminance mismatches,
781+
// on SDR->SDR in some corner cases. User override is still respected, to
782+
// preserve previous behavior.
779783
struct ra_swapchain *sw = p->ra_ctx->swapchain;
780784
if (sw->fns->target_ref_luma)
781785
return sw->fns->target_ref_luma(sw);
786+
#endif
782787

783788
return 0;
784789
}

0 commit comments

Comments
 (0)