Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-22 05:31:34 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-22 05:49:43 +0300
commit1ec7a703806049265991723a8826bd61555edef4 (patch)
tree2b473d5765961f17715f596ea5fdaaa12a196d87 /libavutil/pixdesc.c
parent67f8a0be54554715a93a4e288da3247c9a5d4e1c (diff)
avutil/pixdesc: Make get_color_type() aware of CIE XYZ formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/pixdesc.c')
-rw-r--r--libavutil/pixdesc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 2bca44062f..db27ab6682 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -2273,6 +2273,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
#define FF_COLOR_GRAY 1 /**< gray color space */
#define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
#define FF_COLOR_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
+#define FF_COLOR_XYZ 4
#define pixdesc_has_alpha(pixdesc) \
((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
@@ -2288,6 +2289,9 @@ static int get_color_type(const AVPixFmtDescriptor *desc) {
if(desc->name && !strncmp(desc->name, "yuvj", 4))
return FF_COLOR_YUV_JPEG;
+ if(desc->name && !strncmp(desc->name, "xyz", 3))
+ return FF_COLOR_XYZ;
+
if(desc->flags & AV_PIX_FMT_FLAG_RGB)
return FF_COLOR_RGB;