summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-06-07 15:03:14 -0400
committerVittorio Giovara <vittorio.giovara@gmail.com>2017-06-07 22:56:11 -0400
commit35c76f2e138b713928a77a8aa5734bf5c8f9368f (patch)
tree5d85cd6ee69a81d0c8af4ba5326f9c84f67c5efc
parentc8e7fc8d9ad70d6641eed1594497c87a9f9b81ff (diff)
downloadffmpeg-streaming-35c76f2e138b713928a77a8aa5734bf5c8f9368f.zip
ffmpeg-streaming-35c76f2e138b713928a77a8aa5734bf5c8f9368f.tar.gz
vf_colorspace: Add support for smpte248 color primaries
-rw-r--r--libavfilter/vf_colorspace.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index 0b1bc81..b0bc4d9 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -57,6 +57,7 @@ enum Whitepoint {
WP_D65,
WP_C,
WP_DCI,
+ WP_E,
WP_NB,
};
@@ -281,6 +282,7 @@ static const struct WhitepointCoefficients whitepoint_coefficients[WP_NB] = {
[WP_D65] = { 0.3127, 0.3290 },
[WP_C] = { 0.3100, 0.3160 },
[WP_DCI] = { 0.3140, 0.3510 },
+ [WP_E] = { 1/3.0f, 1/3.0f },
};
static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB] = {
@@ -289,6 +291,7 @@ static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB] = {
[AVCOL_PRI_BT470BG] = { WP_D65, 0.640, 0.330, 0.290, 0.600, 0.150, 0.060,},
[AVCOL_PRI_SMPTE170M] = { WP_D65, 0.630, 0.340, 0.310, 0.595, 0.155, 0.070 },
[AVCOL_PRI_SMPTE240M] = { WP_D65, 0.630, 0.340, 0.310, 0.595, 0.155, 0.070 },
+ [AVCOL_PRI_SMPTE428] = { WP_E, 0.735, 0.265, 0.274, 0.718, 0.167, 0.009 },
[AVCOL_PRI_SMPTE431] = { WP_DCI, 0.680, 0.320, 0.265, 0.690, 0.150, 0.060 },
[AVCOL_PRI_SMPTE432] = { WP_D65, 0.680, 0.320, 0.265, 0.690, 0.150, 0.060 },
[AVCOL_PRI_FILM] = { WP_C, 0.681, 0.319, 0.243, 0.692, 0.145, 0.049 },
@@ -1104,6 +1107,7 @@ static const AVOption colorspace_options[] = {
ENUM("bt470bg", AVCOL_PRI_BT470BG, "prm"),
ENUM("smpte170m", AVCOL_PRI_SMPTE170M, "prm"),
ENUM("smpte240m", AVCOL_PRI_SMPTE240M, "prm"),
+ ENUM("smpte428", AVCOL_PRI_SMPTE428, "prm"),
ENUM("film", AVCOL_PRI_FILM, "prm"),
ENUM("smpte431", AVCOL_PRI_SMPTE431, "prm"),
ENUM("smpte432", AVCOL_PRI_SMPTE432, "prm"),
OpenPOWER on IntegriCloud