summaryrefslogtreecommitdiffstats
path: root/video/decode/lavc.h
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-06-29 09:43:55 +0200
committerwm4 <wm4@nowhere>2016-07-03 19:42:52 +0200
commit5b6cce2b735951f82b707c3d3625f99bc6d6da09 (patch)
tree945223846d8aeb60b3ddfb175e14dd1c3c7bc9ff /video/decode/lavc.h
parent923e3c7b20f0a238062b0ac538a751c6c363a8cb (diff)
downloadmpv-5b6cce2b735951f82b707c3d3625f99bc6d6da09.tar.bz2
mpv-5b6cce2b735951f82b707c3d3625f99bc6d6da09.tar.xz
vd_lavc: expose mastering display side data reference peak
This greatly improves the result when decoding typical (ST.2084) HDR content, since the job of tone mapping gets significantly easier when you're only mapping from 1000 to 250, rather than 10000 to 250. The difference is so drastic that we can now even reasonably use `hdr-tone-mapping=linear` and get a very perceptually uniform result that is only slightly darker than normal. (To compensate for the extra dynamic range) Due to weird implementation details, this only seems to be present on keyframes (or something like that), so we have to cache the last seen value for the frames in between. Also, in some files the metadata is just completely broken / nonsensical, so I decided to apply a simple heuristic to detect completely broken metadata.
Diffstat (limited to 'video/decode/lavc.h')
-rw-r--r--video/decode/lavc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/decode/lavc.h b/video/decode/lavc.h
index e76dff50bc..993c3ec437 100644
--- a/video/decode/lavc.h
+++ b/video/decode/lavc.h
@@ -26,7 +26,7 @@ typedef struct lavc_ctx {
bool hwdec_notified;
// For HDR side-data caching
- int cached_hdr_peak;
+ double cached_hdr_peak;
struct mp_image **delay_queue;
int num_delay_queue;