summaryrefslogtreecommitdiffstats
path: root/video/mp_image.c
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-06-26 19:28:06 +0200
committerwm4 <wm4@nowhere>2016-06-28 19:48:29 +0200
commitf3b6966d14e8cb34477474b85c83beb46e542e70 (patch)
tree23b0e2c0fd892c5d57a7b3ca73805cf31b8e6fad /video/mp_image.c
parent740fdc139fae87144deb3cfe5897649ba2571b27 (diff)
downloadmpv-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/mp_image.c')
-rw-r--r--video/mp_image.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/video/mp_image.c b/video/mp_image.c
index d5b97481e8..0b46f947bc 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -611,8 +611,13 @@ void mp_image_params_guess_csp(struct mp_image_params *params)
}
if (params->colorspace == MP_CSP_AUTO)
params->colorspace = mp_csp_guess_colorspace(params->w, params->h);
- if (params->colorlevels == MP_CSP_LEVELS_AUTO)
- params->colorlevels = MP_CSP_LEVELS_TV;
+ if (params->colorlevels == MP_CSP_LEVELS_AUTO) {
+ if (params->gamma == MP_CSP_TRC_V_LOG) {
+ params->colorlevels = MP_CSP_LEVELS_PC;
+ } else {
+ params->colorlevels = MP_CSP_LEVELS_TV;
+ }
+ }
if (params->primaries == MP_CSP_PRIM_AUTO) {
// Guess based on the colormatrix as a first priority
if (params->colorspace == MP_CSP_BT_2020_NC ||