summaryrefslogtreecommitdiffstats
path: root/video/csputils.h
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-05-15 20:16:12 +0200
committerNiklas Haas <git@nand.wakku.to>2016-05-16 02:45:39 +0200
commitf81f486c68ca55c1e6175e41b0473d9568a6fe5b (patch)
tree647dcc25bdcc21e6b47ced6509470f827357e0c0 /video/csputils.h
parent965031ccd5acb04dcff2bbbfea0ac35a3c035ecb (diff)
downloadmpv-f81f486c68ca55c1e6175e41b0473d9568a6fe5b.tar.bz2
mpv-f81f486c68ca55c1e6175e41b0473d9568a6fe5b.tar.xz
vo_opengl: implement HDR (SMPTE ST2084)
Currently, this relies on the user manually entering their display brightness (since we have no way to detect this at runtime or from ICC metadata). The default value of 250 was picked by looking at ~10 reviews on tftcentral.co.uk and realizing they all come with around 250 cd/m^2 out of the box. (In addition, ITU-R Rec. BT.2022 supports this) Since there is no metadata in FFmpeg to indicate usage of this TRC, the only way to actually play HDR content currently is to set ``--vf=format=gamma=st2084``. (It could be guessed based on SEI, but this is not implemented yet) Incidentally, since SEI is ignored, it's currently assumed that all content is scaled to 10,000 cd/m^2 (and hard-clipped where out of range). I don't see this assumption changing much, though. As an unfortunate consequence of the fact that we don't know the display brightness, mixed with the fact that LittleCMS' parametric tone curves are not flexible enough to support PQ, we have to build the 3DLUT against gamma 2.2 if it's used. This might be a good thing, though, consdering the PQ source space is probably not fantastic for interpolation either way. Partially addresses #2572.
Diffstat (limited to 'video/csputils.h')
-rw-r--r--video/csputils.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/csputils.h b/video/csputils.h
index 1d8d3b1d14..19dd88f145 100644
--- a/video/csputils.h
+++ b/video/csputils.h
@@ -78,6 +78,7 @@ enum mp_csp_trc {
MP_CSP_TRC_GAMMA22,
MP_CSP_TRC_GAMMA28,
MP_CSP_TRC_PRO_PHOTO,
+ MP_CSP_TRC_SMPTE_ST2084,
MP_CSP_TRC_COUNT
};