diff options
author | Niklas Haas <git@nand.wakku.to> | 2014-03-31 04:51:47 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-22 19:02:06 +0200 |
commit | 7f3ea1280228175664241ba5b8edaee48fd33439 (patch) | |
tree | 5871bc9e91fbf9f2ff7a9aae28518d7295d536d5 /video/mp_image.c | |
parent | 17762a1919947db0e66e025bd2084de896eaa3fa (diff) | |
download | mpv-7f3ea1280228175664241ba5b8edaee48fd33439.tar.bz2 mpv-7f3ea1280228175664241ba5b8edaee48fd33439.tar.xz |
video: Better support for XYZ input
With this change, XYZ input is directly converted to the output
colorspace wherever possible, and to the colorspace specified by the
tags and/or --primaries option, otherwise.
This commit also restructures some of the CMS code in gl_video.c to
hopefully make it clearer which decision is being done where and why.
Diffstat (limited to 'video/mp_image.c')
-rw-r--r-- | video/mp_image.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/video/mp_image.c b/video/mp_image.c index 521b3d8e90..eb754499d1 100644 --- a/video/mp_image.c +++ b/video/mp_image.c @@ -566,7 +566,10 @@ void mp_image_params_guess_csp(struct mp_image_params *params) // since that's the most likely scenario. Proper VOs should ignore // this field as well as the matrix and treat XYZ input as absolute, // but for VOs which use the matrix (and hence, consult this field) - // this is the correct parameter. + // this is the correct parameter. This doubles as a reasonable output + // gamut for VOs which *do* use the specialized XYZ matrix but don't + // know any better output gamut other than whatever the source is + // tagged with. if (params->primaries == MP_CSP_PRIM_AUTO) params->primaries = MP_CSP_PRIM_BT_709; } else { |