summaryrefslogtreecommitdiffstats
path: root/video/csputils.c
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-06-26 19:57:29 +0200
committerwm4 <wm4@nowhere>2016-06-28 19:48:29 +0200
commit247ec0cb841c28b97a186675c0ef923a0ede2f40 (patch)
treec9fdd6787b1b6650a6f0c20504aeefcb83f040f5 /video/csputils.c
parent13a63331b67f489d547b566ea8b7b60de62192bd (diff)
downloadmpv-247ec0cb841c28b97a186675c0ef923a0ede2f40.tar.bz2
mpv-247ec0cb841c28b97a186675c0ef923a0ede2f40.tar.xz
csputils: add Panasonic V-Gamut primaries
This is actually not entirely trivial since it involves negative Yxy coordinates, so the CMM has to be capable of full floating point operation. Fortunately, LittleCMS is, so we can just blindly implement it.
Diffstat (limited to 'video/csputils.c')
-rw-r--r--video/csputils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/csputils.c b/video/csputils.c
index e9e6772ac8..b85b1f28f2 100644
--- a/video/csputils.c
+++ b/video/csputils.c
@@ -65,6 +65,7 @@ const struct m_opt_choice_alternatives mp_csp_prim_names[] = {
{"prophoto", MP_CSP_PRIM_PRO_PHOTO},
{"cie1931", MP_CSP_PRIM_CIE_1931},
{"dci-p3", MP_CSP_PRIM_DCI_P3},
+ {"v-gamut", MP_CSP_PRIM_V_GAMUT},
{0}
};
@@ -422,6 +423,14 @@ struct mp_csp_primaries mp_get_csp_primaries(enum mp_csp_prim spc)
.blue = {0.150, 0.060},
.white = d65
};
+ // From Panasonic VARICAM reference manual
+ case MP_CSP_PRIM_V_GAMUT:
+ return (struct mp_csp_primaries) {
+ .red = {0.730, 0.280},
+ .green = {0.165, 0.840},
+ .blue = {0.100, -0.03},
+ .white = d65
+ };
default:
return (struct mp_csp_primaries) {{0}};
}