diff options
author | Niklas Haas <git@nand.wakku.to> | 2016-06-26 19:28:06 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-06-28 19:48:29 +0200 |
commit | f3b6966d14e8cb34477474b85c83beb46e542e70 (patch) | |
tree | 23b0e2c0fd892c5d57a7b3ca73805cf31b8e6fad /video/out/opengl/video.c | |
parent | 740fdc139fae87144deb3cfe5897649ba2571b27 (diff) | |
download | mpv-f3b6966d14e8cb34477474b85c83beb46e542e70.tar.bz2 mpv-f3b6966d14e8cb34477474b85c83beb46e542e70.tar.xz |
vo_opengl: implement the Panasonic V-Log function
User request and not that hard. Closes #3157.
Note that FFmpeg doesn't support this and there's no signalling in HEVC
etc., so the only way users can access it is by using vf_format
manually.
Mind: This encoding uses full range values, not TV range.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r-- | video/out/opengl/video.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 6fd92ddb29..a870fe0e4f 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -2177,7 +2177,8 @@ static void pass_colormanage(struct gl_video *p, float peak_src, // We could pick any value we want here, the difference is just coding // efficiency. if (trc_orig == MP_CSP_TRC_SMPTE_ST2084 || - trc_orig == MP_CSP_TRC_ARIB_STD_B67) + trc_orig == MP_CSP_TRC_ARIB_STD_B67 || + trc_orig == MP_CSP_TRC_V_LOG) { trc_orig = MP_CSP_TRC_GAMMA22; } @@ -2224,6 +2225,10 @@ static void pass_colormanage(struct gl_video *p, float peak_src, // target's reference peak if (trc_src == MP_CSP_TRC_ARIB_STD_B67) peak_src = 12 * peak_dst; + + // Similar deal for V-Log + if (trc_src == MP_CSP_TRC_V_LOG) + peak_src = 46.0855 * peak_dst; } // All operations from here on require linear light as a starting point, |