Commit 20d46c03 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Remove alpha channel from RGB555

Originally committed as revision 7106 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 08d23410
...@@ -185,7 +185,7 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { ...@@ -185,7 +185,7 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
}, },
[PIX_FMT_RGB555] = { [PIX_FMT_RGB555] = {
.name = "rgb555", .name = "rgb555",
.nb_channels = 4, .is_alpha = 1, .nb_channels = 3,
.color_type = FF_COLOR_RGB, .color_type = FF_COLOR_RGB,
.pixel_type = FF_PIXEL_PACKED, .pixel_type = FF_PIXEL_PACKED,
.depth = 5, .depth = 5,
...@@ -1629,19 +1629,10 @@ static inline unsigned int bitcopy_n(unsigned int a, int n) ...@@ -1629,19 +1629,10 @@ static inline unsigned int bitcopy_n(unsigned int a, int n)
b = bitcopy_n(v << 3, 3);\ b = bitcopy_n(v << 3, 3);\
} }
#define RGBA_IN(r, g, b, a, s)\
{\
unsigned int v = ((const uint16_t *)(s))[0];\
r = bitcopy_n(v >> (10 - 3), 3);\
g = bitcopy_n(v >> (5 - 3), 3);\
b = bitcopy_n(v << 3, 3);\
a = (-(v >> 15)) & 0xff;\
}
#define RGBA_OUT(d, r, g, b, a)\ #define RGB_OUT(d, r, g, b)\
{\ {\
((uint16_t *)(d))[0] = ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3) | \ ((uint16_t *)(d))[0] = ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3);\
((a << 8) & 0x8000);\
} }
#define BPP 2 #define BPP 2
...@@ -2596,9 +2587,6 @@ int img_get_alpha_info(const AVPicture *src, ...@@ -2596,9 +2587,6 @@ int img_get_alpha_info(const AVPicture *src,
case PIX_FMT_RGBA32: case PIX_FMT_RGBA32:
ret = get_alpha_info_rgba32(src, width, height); ret = get_alpha_info_rgba32(src, width, height);
break; break;
case PIX_FMT_RGB555:
ret = get_alpha_info_rgb555(src, width, height);
break;
case PIX_FMT_PAL8: case PIX_FMT_PAL8:
ret = get_alpha_info_pal8(src, width, height); ret = get_alpha_info_pal8(src, width, height);
break; break;
......
...@@ -34,8 +34,8 @@ extern "C" { ...@@ -34,8 +34,8 @@ extern "C" {
#define AV_STRINGIFY(s) AV_TOSTRING(s) #define AV_STRINGIFY(s) AV_TOSTRING(s)
#define AV_TOSTRING(s) #s #define AV_TOSTRING(s) #s
#define LIBAVUTIL_VERSION_INT ((49<<16)+(0<<8)+2) #define LIBAVUTIL_VERSION_INT ((49<<16)+(1<<8)+0)
#define LIBAVUTIL_VERSION 49.0.2 #define LIBAVUTIL_VERSION 49.1.0
#define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT #define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION) #define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
...@@ -78,7 +78,7 @@ enum PixelFormat { ...@@ -78,7 +78,7 @@ enum PixelFormat {
PIX_FMT_YUV410P, ///< Planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples) PIX_FMT_YUV410P, ///< Planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
PIX_FMT_YUV411P, ///< Planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) PIX_FMT_YUV411P, ///< Planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
PIX_FMT_RGB565, ///< Packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), in cpu endianness PIX_FMT_RGB565, ///< Packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), in cpu endianness
PIX_FMT_RGB555, ///< Packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), in cpu endianness most significant bit to 1 PIX_FMT_RGB555, ///< Packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), in cpu endianness most significant bit to 0
PIX_FMT_GRAY8, ///< Y , 8bpp PIX_FMT_GRAY8, ///< Y , 8bpp
PIX_FMT_MONOWHITE, ///< Y , 1bpp, 1 is white PIX_FMT_MONOWHITE, ///< Y , 1bpp, 1 is white
PIX_FMT_MONOBLACK, ///< Y , 1bpp, 0 is black PIX_FMT_MONOBLACK, ///< Y , 1bpp, 0 is black
......
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