diff options
author | Michael Niedermayer <[email protected]> | 2016-02-22 03:31:34 +0100 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2016-02-22 03:50:51 +0100 |
commit | 23ef5996a589cc4968d2e5508a445bcfda61a830 (patch) | |
tree | 4da7b541f2885ce1bc89069f861e9852800864bc | |
parent | b3a64fc0397a7df8261e933cc562166ba980a911 (diff) |
avutil/pixdesc: Make get_color_type() aware of CIE XYZ formats
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 1ec7a703806049265991723a8826bd61555edef4)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavutil/pixdesc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index eb52113745..2baa0bed7c 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -2247,6 +2247,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) @@ -2262,6 +2263,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; |