aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-03-23 22:51:15 +0100
committerClément Bœsch <u@pkh.me>2017-03-24 00:06:35 +0100
commitbc7308aae82053ad371bed1e1dd3298f0c07ec35 (patch)
tree08cc3ae91ae281940b5f6b198f17de22b42a0ca6
parentdc39ccdc3b88e9ec3b4aa3581798c30660d94d07 (diff)
downloadffmpeg-bc7308aae82053ad371bed1e1dd3298f0c07ec35.tar.gz
sws: make is{RGB,BGR}inInt functions
-rw-r--r--libswscale/swscale_internal.h82
1 files changed, 43 insertions, 39 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 1e1d5fa300..84d5bee5ff 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -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)
{