From f3b6966d14e8cb34477474b85c83beb46e542e70 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sun, 26 Jun 2016 19:28:06 +0200 Subject: 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. --- video/mp_image.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'video/mp_image.c') 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 || -- cgit v1.2.3