Commit 6d4d483e authored by Ronald S. Bultje's avatar Ronald S. Bultje

swscale: de-macro'ify RGB15/16/32 input functions.

Inline functions are easier to read, maintain, modify and test,
which justifies the slightly increased source size. This patch
also adds support for non-native endianness RGB15/16 and fixes
isSupportedOutput() to no longer claim that we support writing
non-native RGB565/555/444.
parent e2babb9b
This diff is collapsed.
...@@ -75,13 +75,17 @@ const char *swscale_license(void) ...@@ -75,13 +75,17 @@ const char *swscale_license(void)
|| (x)==PIX_FMT_BGR48BE \ || (x)==PIX_FMT_BGR48BE \
|| (x)==PIX_FMT_BGR48LE \ || (x)==PIX_FMT_BGR48LE \
|| (x)==PIX_FMT_BGR24 \ || (x)==PIX_FMT_BGR24 \
|| (x)==PIX_FMT_BGR565 \ || (x)==PIX_FMT_BGR565LE \
|| (x)==PIX_FMT_BGR555 \ || (x)==PIX_FMT_BGR565BE \
|| (x)==PIX_FMT_BGR555LE \
|| (x)==PIX_FMT_BGR555BE \
|| (x)==PIX_FMT_BGR32 \ || (x)==PIX_FMT_BGR32 \
|| (x)==PIX_FMT_BGR32_1 \ || (x)==PIX_FMT_BGR32_1 \
|| (x)==PIX_FMT_RGB24 \ || (x)==PIX_FMT_RGB24 \
|| (x)==PIX_FMT_RGB565 \ || (x)==PIX_FMT_RGB565LE \
|| (x)==PIX_FMT_RGB555 \ || (x)==PIX_FMT_RGB565BE \
|| (x)==PIX_FMT_RGB555LE \
|| (x)==PIX_FMT_RGB555BE \
|| (x)==PIX_FMT_GRAY8 \ || (x)==PIX_FMT_GRAY8 \
|| (x)==PIX_FMT_Y400A \ || (x)==PIX_FMT_Y400A \
|| (x)==PIX_FMT_YUV410P \ || (x)==PIX_FMT_YUV410P \
...@@ -134,7 +138,22 @@ int sws_isSupportedInput(enum PixelFormat pix_fmt) ...@@ -134,7 +138,22 @@ int sws_isSupportedInput(enum PixelFormat pix_fmt)
|| (x)==PIX_FMT_YUVJ422P \ || (x)==PIX_FMT_YUVJ422P \
|| (x)==PIX_FMT_YUVJ440P \ || (x)==PIX_FMT_YUVJ440P \
|| (x)==PIX_FMT_YUVJ444P \ || (x)==PIX_FMT_YUVJ444P \
|| isAnyRGB(x) \ || isRGBinBytes(x) \
|| isBGRinBytes(x) \
|| (x)==PIX_FMT_RGB565 \
|| (x)==PIX_FMT_RGB555 \
|| (x)==PIX_FMT_RGB444 \
|| (x)==PIX_FMT_BGR565 \
|| (x)==PIX_FMT_BGR555 \
|| (x)==PIX_FMT_BGR444 \
|| (x)==PIX_FMT_RGB8 \
|| (x)==PIX_FMT_BGR8 \
|| (x)==PIX_FMT_RGB4_BYTE \
|| (x)==PIX_FMT_BGR4_BYTE \
|| (x)==PIX_FMT_RGB4 \
|| (x)==PIX_FMT_BGR4 \
|| (x)==PIX_FMT_MONOBLACK \
|| (x)==PIX_FMT_MONOWHITE \
|| (x)==PIX_FMT_NV12 \ || (x)==PIX_FMT_NV12 \
|| (x)==PIX_FMT_NV21 \ || (x)==PIX_FMT_NV21 \
|| (x)==PIX_FMT_GRAY16BE \ || (x)==PIX_FMT_GRAY16BE \
......
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