From ac906fb288378af8a9de10fbae6db5bf8577052e Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sun, 20 Oct 2019 16:00:32 +0200 Subject: csputils: fix outdated comment This no longer hard-codes BT.709, it converts to whatever primaries are tagged in the same metadata struct. The actual BT.709 defaulting comes from `mp_image_params_guess_csp`. --- video/csputils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/csputils.c b/video/csputils.c index 6f88fe30b2..98c5c96c39 100644 --- a/video/csputils.c +++ b/video/csputils.c @@ -711,8 +711,10 @@ void mp_get_csp_matrix(struct mp_csp_params *params, struct mp_cmat *m) } case MP_CSP_XYZ: { // The vo should probably not be using a matrix generated by this - // function for XYZ sources, but if it does, let's just assume it - // wants BT.709 with D65 white point (virtually all other content). + // function for XYZ sources, but if it does, let's just convert it to + // an equivalent RGB space based on the colorimetry metadata it + // provided in mp_csp_params. (At the risk of clipping, if the + // chosen primaries are too small to fit the actual data) mp_get_xyz2rgb_coeffs(params, MP_INTENT_RELATIVE_COLORIMETRIC, m); levels_in = -1; break; -- cgit v1.2.3