SIGN IN SIGN UP

vo_gpu_next: fix image subtitle hdr peak

704afb89681bc6d7fb87cce0a389444de3fac2a0 assumed that HDR image
subtitles target SDR white. However, this is incorrect according to
UHD BD spec version 3.2:

> CLUTs of Presentation Graphics streams and Interactive Graphics streams
> are prepared by content author according to dynamic range property of
> the Primary video stream.
> If a Primary video stream is HDR, the Graphics streams have CLUTs
> expressed in BT.2020 color space primaries and ST2084 EOTF.
> If a Primary video stream is SDR, the Graphics streams have CLUTs
> expressed in BT.709 color space primaries and BT.1886 EOTF.

This means that PGS subtitles always have the same colorspace and HDR
dynamic range as the video, so the target peak should also be the same.

This is also supported by the BD-J spec (which displays PGS graphics):

> However the BD-ROM player does not support color space conversion nor
> dynamic range conversion of Java graphics and Background plane when
> mixing with video plane.

The Graphics model spec further states:

> The composited image on the graphics plane is transformed to full color
> and transparency by the CLUT module and then overlaid on the video
> image.

These sentences indicate that BD-ROM players simply overlay the decoded
graphics onto the video without any kind of conversion.

Change the default of image-subs-hdr-peak to 1000 to fix this.
This accommodates most HDR videos with a peak brightness of 1000 nits
and some bad HDR videos with 10000 nits peak brightness due to reencoding
and mixed with unmodified subtitles.
If there are compatibility issues, the option can be manually
set to sdr or video.

Fixes: 704afb89681bc6d7fb87cce0a389444de3fac2a0
N
nanahi committed
7f81e1ec8cb1fbb572078b7ce90979e567ea808e
Parent: 74d3c80
Committed by Kacper Michajłow <kasper93@gmail.com> on 4/17/2026, 5:44:15 PM