[FFmpeg-cvslog] avutil/pixdesc: Make get_color_type() aware of CIE XYZ formats

Michael Niedermayer git at videolan.org
Thu Apr 28 05:29:15 CEST 2016


ffmpeg | branch: release/2.7 | Michael Niedermayer <michael at niedermayer.cc> | Mon Feb 22 03:31:34 2016 +0100| [b8148973c59b717e9eff92e55825698a660da972] | committer: Michael Niedermayer

avutil/pixdesc: Make get_color_type() aware of CIE XYZ formats

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 1ec7a703806049265991723a8826bd61555edef4)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b8148973c59b717e9eff92e55825698a660da972
---

 libavutil/pixdesc.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 32dc4b8..29913fd 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -2208,6 +2208,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)
@@ -2223,6 +2224,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;
 



More information about the ffmpeg-cvslog mailing list