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

swscale: use a function for isBayer

parent 9c2436e1
...@@ -760,20 +760,12 @@ static av_always_inline int isGray(enum AVPixelFormat pix_fmt) ...@@ -760,20 +760,12 @@ static av_always_inline int isGray(enum AVPixelFormat pix_fmt)
|| (x) == AV_PIX_FMT_BGR24 \ || (x) == AV_PIX_FMT_BGR24 \
) )
#define isBayer(x) ( \ static av_always_inline int isBayer(enum AVPixelFormat pix_fmt)
(x)==AV_PIX_FMT_BAYER_BGGR8 \ {
|| (x)==AV_PIX_FMT_BAYER_BGGR16LE \ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
|| (x)==AV_PIX_FMT_BAYER_BGGR16BE \ av_assert0(desc);
|| (x)==AV_PIX_FMT_BAYER_RGGB8 \ return !!(desc->flags & AV_PIX_FMT_FLAG_BAYER);
|| (x)==AV_PIX_FMT_BAYER_RGGB16LE \ }
|| (x)==AV_PIX_FMT_BAYER_RGGB16BE \
|| (x)==AV_PIX_FMT_BAYER_GBRG8 \
|| (x)==AV_PIX_FMT_BAYER_GBRG16LE \
|| (x)==AV_PIX_FMT_BAYER_GBRG16BE \
|| (x)==AV_PIX_FMT_BAYER_GRBG8 \
|| (x)==AV_PIX_FMT_BAYER_GRBG16LE \
|| (x)==AV_PIX_FMT_BAYER_GRBG16BE \
)
#define isAnyRGB(x) \ #define isAnyRGB(x) \
( \ ( \
......
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