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

sws: make is{RGB,BGR}inInt functions

parent dc39ccdc
......@@ -698,45 +698,49 @@ static av_always_inline int isGray(enum AVPixelFormat pix_fmt)
pix_fmt != AV_PIX_FMT_MONOWHITE;
}
#define isRGBinInt(x) \
((x) == AV_PIX_FMT_RGB48BE || \
(x) == AV_PIX_FMT_RGB48LE || \
(x) == AV_PIX_FMT_RGB32 || \
(x) == AV_PIX_FMT_RGB32_1 || \
(x) == AV_PIX_FMT_RGB24 || \
(x) == AV_PIX_FMT_RGB565BE || \
(x) == AV_PIX_FMT_RGB565LE || \
(x) == AV_PIX_FMT_RGB555BE || \
(x) == AV_PIX_FMT_RGB555LE || \
(x) == AV_PIX_FMT_RGB444BE || \
(x) == AV_PIX_FMT_RGB444LE || \
(x) == AV_PIX_FMT_RGB8 || \
(x) == AV_PIX_FMT_RGB4 || \
(x) == AV_PIX_FMT_RGB4_BYTE || \
(x) == AV_PIX_FMT_RGBA64BE || \
(x) == AV_PIX_FMT_RGBA64LE || \
(x) == AV_PIX_FMT_MONOBLACK || \
(x) == AV_PIX_FMT_MONOWHITE)
#define isBGRinInt(x) \
((x) == AV_PIX_FMT_BGR48BE || \
(x) == AV_PIX_FMT_BGR48LE || \
(x) == AV_PIX_FMT_BGR32 || \
(x) == AV_PIX_FMT_BGR32_1 || \
(x) == AV_PIX_FMT_BGR24 || \
(x) == AV_PIX_FMT_BGR565BE || \
(x) == AV_PIX_FMT_BGR565LE || \
(x) == AV_PIX_FMT_BGR555BE || \
(x) == AV_PIX_FMT_BGR555LE || \
(x) == AV_PIX_FMT_BGR444BE || \
(x) == AV_PIX_FMT_BGR444LE || \
(x) == AV_PIX_FMT_BGR8 || \
(x) == AV_PIX_FMT_BGR4 || \
(x) == AV_PIX_FMT_BGR4_BYTE || \
(x) == AV_PIX_FMT_BGRA64BE || \
(x) == AV_PIX_FMT_BGRA64LE || \
(x) == AV_PIX_FMT_MONOBLACK || \
(x) == AV_PIX_FMT_MONOWHITE)
static av_always_inline int isRGBinInt(enum AVPixelFormat pix_fmt)
{
return pix_fmt == AV_PIX_FMT_RGB48BE ||
pix_fmt == AV_PIX_FMT_RGB48LE ||
pix_fmt == AV_PIX_FMT_RGB32 ||
pix_fmt == AV_PIX_FMT_RGB32_1 ||
pix_fmt == AV_PIX_FMT_RGB24 ||
pix_fmt == AV_PIX_FMT_RGB565BE ||
pix_fmt == AV_PIX_FMT_RGB565LE ||
pix_fmt == AV_PIX_FMT_RGB555BE ||
pix_fmt == AV_PIX_FMT_RGB555LE ||
pix_fmt == AV_PIX_FMT_RGB444BE ||
pix_fmt == AV_PIX_FMT_RGB444LE ||
pix_fmt == AV_PIX_FMT_RGB8 ||
pix_fmt == AV_PIX_FMT_RGB4 ||
pix_fmt == AV_PIX_FMT_RGB4_BYTE ||
pix_fmt == AV_PIX_FMT_RGBA64BE ||
pix_fmt == AV_PIX_FMT_RGBA64LE ||
pix_fmt == AV_PIX_FMT_MONOBLACK ||
pix_fmt == AV_PIX_FMT_MONOWHITE;
}
static av_always_inline int isBGRinInt(enum AVPixelFormat pix_fmt)
{
return pix_fmt == AV_PIX_FMT_BGR48BE ||
pix_fmt == AV_PIX_FMT_BGR48LE ||
pix_fmt == AV_PIX_FMT_BGR32 ||
pix_fmt == AV_PIX_FMT_BGR32_1 ||
pix_fmt == AV_PIX_FMT_BGR24 ||
pix_fmt == AV_PIX_FMT_BGR565BE ||
pix_fmt == AV_PIX_FMT_BGR565LE ||
pix_fmt == AV_PIX_FMT_BGR555BE ||
pix_fmt == AV_PIX_FMT_BGR555LE ||
pix_fmt == AV_PIX_FMT_BGR444BE ||
pix_fmt == AV_PIX_FMT_BGR444LE ||
pix_fmt == AV_PIX_FMT_BGR8 ||
pix_fmt == AV_PIX_FMT_BGR4 ||
pix_fmt == AV_PIX_FMT_BGR4_BYTE ||
pix_fmt == AV_PIX_FMT_BGRA64BE ||
pix_fmt == AV_PIX_FMT_BGRA64LE ||
pix_fmt == AV_PIX_FMT_MONOBLACK ||
pix_fmt == AV_PIX_FMT_MONOWHITE;
}
static av_always_inline int isBayer(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