diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-06-09 13:59:21 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-06-09 16:47:45 -0400 |
commit | 6d4d483eee04d78ba021e84aec2ff75d9fc3a236 (patch) | |
tree | 945967acc375f6938e073c2c2145427641024e7e /libswscale/utils.c | |
parent | e2babb9b47072ca586b4414680b8d7abf85a16e5 (diff) | |
download | ffmpeg-6d4d483eee04d78ba021e84aec2ff75d9fc3a236.tar.gz |
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.
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 827abc66d2..d552330ec5 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -75,13 +75,17 @@ const char *swscale_license(void) || (x)==PIX_FMT_BGR48BE \ || (x)==PIX_FMT_BGR48LE \ || (x)==PIX_FMT_BGR24 \ - || (x)==PIX_FMT_BGR565 \ - || (x)==PIX_FMT_BGR555 \ + || (x)==PIX_FMT_BGR565LE \ + || (x)==PIX_FMT_BGR565BE \ + || (x)==PIX_FMT_BGR555LE \ + || (x)==PIX_FMT_BGR555BE \ || (x)==PIX_FMT_BGR32 \ || (x)==PIX_FMT_BGR32_1 \ || (x)==PIX_FMT_RGB24 \ - || (x)==PIX_FMT_RGB565 \ - || (x)==PIX_FMT_RGB555 \ + || (x)==PIX_FMT_RGB565LE \ + || (x)==PIX_FMT_RGB565BE \ + || (x)==PIX_FMT_RGB555LE \ + || (x)==PIX_FMT_RGB555BE \ || (x)==PIX_FMT_GRAY8 \ || (x)==PIX_FMT_Y400A \ || (x)==PIX_FMT_YUV410P \ @@ -134,7 +138,22 @@ int sws_isSupportedInput(enum PixelFormat pix_fmt) || (x)==PIX_FMT_YUVJ422P \ || (x)==PIX_FMT_YUVJ440P \ || (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_NV21 \ || (x)==PIX_FMT_GRAY16BE \ |