summaryrefslogtreecommitdiffstats
path: root/video/mp_image.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-01-21 13:02:36 +0100
committerNiklas Haas <git@haasn.dev>2023-01-21 13:03:33 +0100
commit8c617765fe88a5d5597fb58d4b593161049de710 (patch)
treeab022ce8704441f3d559c30751cb7d2ca729f7ab /video/mp_image.c
parent25d02e88d30aa676afb1795699fdf8c12672e616 (diff)
downloadmpv-8c617765fe88a5d5597fb58d4b593161049de710.tar.bz2
mpv-8c617765fe88a5d5597fb58d4b593161049de710.tar.xz
mp_image: fix XYZ primaries default
This was incorrectly set to BT.2020, when it should be DCI-P3 for pretty much all real-world XYZ content (which is digital cinema content).
Diffstat (limited to 'video/mp_image.c')
-rw-r--r--video/mp_image.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/video/mp_image.c b/video/mp_image.c
index 6c28a54c47..7250a261cf 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -885,11 +885,11 @@ void mp_image_params_guess_csp(struct mp_image_params *params)
// function, but this field can still be relevant for guiding gamut
// mapping optimizations, and it's also used by `mp_get_csp_matrix`
// when deciding what RGB space to map XYZ to for VOs that don't want
- // to directly ingest XYZ into their color pipeline. BT.709 would be a
- // sane default here, but it runs the risk of clipping any wide gamut
- // content, so we pick BT.2020 instead to be on the safer side.
+ // to directly ingest XYZ into their color pipeline. We pick DCI-P3
+ // because it is the colorspace most closely matching digital cinema
+ // content, and also has the correct DCI whitepoint.
if (params->color.primaries == MP_CSP_PRIM_AUTO)
- params->color.primaries = MP_CSP_PRIM_BT_2020;
+ params->color.primaries = MP_CSP_PRIM_DCI_P3;
if (params->color.gamma == MP_CSP_TRC_AUTO)
params->color.gamma = MP_CSP_TRC_LINEAR;
} else {