summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-03-19 02:27:46 +0100
committerwm4 <wm4@nowhere>2016-03-19 14:08:01 +0100
commit5447cd033c145f4a6af4d635ac9d9b10385cdca2 (patch)
treeeb1d8e0e319129058d7f61d7176b98df9cddd58b
parentb29af6a4bda23c5a99ea4422665d8cc903db470f (diff)
downloadmpv-5447cd033c145f4a6af4d635ac9d9b10385cdca2.tar.bz2
mpv-5447cd033c145f4a6af4d635ac9d9b10385cdca2.tar.xz
csputils: add DCI-P3 colorspace
This colorspace has been historically used as a calibration target for most digital projectors and sees some involvement in the UltraHD standards, so it's a useful addition to mpv.
-rw-r--r--DOCS/man/vo.rst2
-rw-r--r--video/csputils.c9
-rw-r--r--video/csputils.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst
index 195d5ee64a..18e3f4ae64 100644
--- a/DOCS/man/vo.rst
+++ b/DOCS/man/vo.rst
@@ -887,6 +887,8 @@ Available video output drivers are:
ProPhoto RGB (ROMM)
cie1931
CIE 1931 RGB (not to be confused with CIE XYZ)
+ dci-p3
+ DCI-P3 (Digital Cinema Colorspace), SMPTE RP431-2
``target-trc=<value>``
Specifies the transfer characteristics (gamma) of the display. Video
diff --git a/video/csputils.c b/video/csputils.c
index e446d8e724..69d3b80944 100644
--- a/video/csputils.c
+++ b/video/csputils.c
@@ -64,6 +64,7 @@ const struct m_opt_choice_alternatives mp_csp_prim_names[] = {
{"adobe", MP_CSP_PRIM_ADOBE},
{"prophoto", MP_CSP_PRIM_PRO_PHOTO},
{"cie1931", MP_CSP_PRIM_CIE_1931},
+ {"dci-p3", MP_CSP_PRIM_DCI_P3},
{0}
};
@@ -403,6 +404,14 @@ struct mp_csp_primaries mp_get_csp_primaries(enum mp_csp_prim spc)
.blue = {0.1666, 0.0089},
.white = e
};
+ // From SMPTE RP 431-2
+ case MP_CSP_PRIM_DCI_P3:
+ return (struct mp_csp_primaries) {
+ .red = {0.680, 0.320},
+ .green = {0.265, 0.690},
+ .blue = {0.150, 0.060},
+ .white = d65
+ };
default:
return (struct mp_csp_primaries) {{0}};
}
diff --git a/video/csputils.h b/video/csputils.h
index d5990d242f..1d8d3b1d14 100644
--- a/video/csputils.h
+++ b/video/csputils.h
@@ -63,6 +63,7 @@ enum mp_csp_prim {
MP_CSP_PRIM_ADOBE,
MP_CSP_PRIM_PRO_PHOTO,
MP_CSP_PRIM_CIE_1931,
+ MP_CSP_PRIM_DCI_P3,
MP_CSP_PRIM_COUNT
};