mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avutil/pixdesc: Make get_color_type() aware of CIE XYZ formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1ec7a70380
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8dce138510
commit
b8148973c5
@ -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_GRAY 1 /**< gray color space */
|
||||||
#define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
|
#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_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
|
||||||
|
#define FF_COLOR_XYZ 4
|
||||||
|
|
||||||
#define pixdesc_has_alpha(pixdesc) \
|
#define pixdesc_has_alpha(pixdesc) \
|
||||||
((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
|
((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))
|
if(desc->name && !strncmp(desc->name, "yuvj", 4))
|
||||||
return FF_COLOR_YUV_JPEG;
|
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)
|
if(desc->flags & AV_PIX_FMT_FLAG_RGB)
|
||||||
return FF_COLOR_RGB;
|
return FF_COLOR_RGB;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user