summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2019-10-20 16:00:32 +0200
committerNiklas Haas <git@haasn.xyz>2019-10-20 16:00:32 +0200
commitac906fb288378af8a9de10fbae6db5bf8577052e (patch)
tree98198fdd5eb452e736875dc37100c1f1ba6fe53c /video
parentd9eac493b5ab82d61cc375ba870a65c60a7cbe11 (diff)
downloadmpv-ac906fb288378af8a9de10fbae6db5bf8577052e.tar.bz2
mpv-ac906fb288378af8a9de10fbae6db5bf8577052e.tar.xz
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`.
Diffstat (limited to 'video')
-rw-r--r--video/csputils.c6
1 files changed, 4 insertions, 2 deletions
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;