diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-06-24 07:43:19 -0700 |
---|---|---|
committer | Ronald Bultje <rbultje@dhcp-172-22-79-135.mtv.corp.google.com> | 2011-06-27 18:10:41 -0700 |
commit | dff5a8353266641311827a4bbdd940f7ad08c8b6 (patch) | |
tree | 9277c2fef96f4376a00a85b919df8c6ae77ea0c8 /libswscale | |
parent | 3d3c8149370da133c2059bc2370268b4ffbc18d5 (diff) | |
download | ffmpeg-dff5a8353266641311827a4bbdd940f7ad08c8b6.tar.gz |
swscale: re-add support for non-native endianness.
This works through some non-obvious hacks in utils.c.
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 18 | ||||
-rw-r--r-- | libswscale/utils.c | 18 |
2 files changed, 24 insertions, 12 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 1fd7efdd6f..e0dce96036 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2133,20 +2133,26 @@ find_c_packed_planar_out_funcs(SwsContext *c, *yuv2packed2 = yuv2bgr24_2_c; *yuv2packedX = yuv2bgr24_X_c; break; - case PIX_FMT_RGB565: - case PIX_FMT_BGR565: + case PIX_FMT_RGB565LE: + case PIX_FMT_RGB565BE: + case PIX_FMT_BGR565LE: + case PIX_FMT_BGR565BE: *yuv2packed1 = yuv2rgb16_1_c; *yuv2packed2 = yuv2rgb16_2_c; *yuv2packedX = yuv2rgb16_X_c; break; - case PIX_FMT_RGB555: - case PIX_FMT_BGR555: + case PIX_FMT_RGB555LE: + case PIX_FMT_RGB555BE: + case PIX_FMT_BGR555LE: + case PIX_FMT_BGR555BE: *yuv2packed1 = yuv2rgb15_1_c; *yuv2packed2 = yuv2rgb15_2_c; *yuv2packedX = yuv2rgb15_X_c; break; - case PIX_FMT_RGB444: - case PIX_FMT_BGR444: + case PIX_FMT_RGB444LE: + case PIX_FMT_RGB444BE: + case PIX_FMT_BGR444LE: + case PIX_FMT_BGR444BE: *yuv2packed1 = yuv2rgb12_1_c; *yuv2packed2 = yuv2rgb12_2_c; *yuv2packedX = yuv2rgb12_X_c; diff --git a/libswscale/utils.c b/libswscale/utils.c index d048b22e24..69714183d0 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -146,12 +146,18 @@ int sws_isSupportedInput(enum PixelFormat pix_fmt) || (x)==PIX_FMT_YUVJ444P \ || 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_RGB565LE \ + || (x)==PIX_FMT_RGB565BE \ + || (x)==PIX_FMT_RGB555LE \ + || (x)==PIX_FMT_RGB555BE \ + || (x)==PIX_FMT_RGB444LE \ + || (x)==PIX_FMT_RGB444BE \ + || (x)==PIX_FMT_BGR565LE \ + || (x)==PIX_FMT_BGR565BE \ + || (x)==PIX_FMT_BGR555LE \ + || (x)==PIX_FMT_BGR555BE \ + || (x)==PIX_FMT_BGR444LE \ + || (x)==PIX_FMT_BGR444BE \ || (x)==PIX_FMT_RGB8 \ || (x)==PIX_FMT_BGR8 \ || (x)==PIX_FMT_RGB4_BYTE \ |