summaryrefslogtreecommitdiffstats
path: root/wscript
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 /wscript
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 'wscript')
-rw-r--r--wscript6
1 files changed, 6 insertions, 0 deletions
diff --git a/wscript b/wscript
index e29d1ab403..9269d95b54 100644
--- a/wscript
+++ b/wscript
@@ -504,6 +504,12 @@ FFmpeg/Libav libraries. You need at least {0}. Aborting.".format(libav_versions_
'AVCOL_TRC_SMPTEST2084,'
'AVCOL_TRC_ARIB_STD_B67',
use='libav'),
+ }, {
+ 'name': 'avutil-mastering-metadata',
+ 'desc': 'libavutil mastering display metadata struct',
+ 'func': check_statement('libavutil/mastering_display_metadata.h',
+ 'AV_FRAME_DATA_MASTERING_DISPLAY_METADATA',
+ use='libav'),
}
]