Commit 2b9a52bc authored by Clément Bœsch's avatar Clément Bœsch

swscale: use a function for isAnyRGB

parent c30875e8
...@@ -767,13 +767,13 @@ static av_always_inline int isBayer(enum AVPixelFormat pix_fmt) ...@@ -767,13 +767,13 @@ static av_always_inline int isBayer(enum AVPixelFormat pix_fmt)
return !!(desc->flags & AV_PIX_FMT_FLAG_BAYER); return !!(desc->flags & AV_PIX_FMT_FLAG_BAYER);
} }
#define isAnyRGB(x) \ static av_always_inline int isAnyRGB(enum AVPixelFormat pix_fmt)
( \ {
isBayer(x) || \ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
isRGBinInt(x) || \ av_assert0(desc);
isBGRinInt(x) || \ return (desc->flags & AV_PIX_FMT_FLAG_RGB) ||
isRGB(x) \ pix_fmt == AV_PIX_FMT_MONOBLACK || pix_fmt == AV_PIX_FMT_MONOWHITE;
) }
static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt) static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment