diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2006-11-16 20:46:36 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2006-11-16 20:46:36 +0000 |
commit | 20d46c038a11ff099671ec90fe0cd9e14d71c952 (patch) | |
tree | 22bbbf944e0a4620aaecbbbb20dc7c9f43086b64 /libavcodec/imgconvert.c | |
parent | 08d23410ea054e0a0ac3ff4c1e3da381aa552dcd (diff) | |
download | ffmpeg-20d46c038a11ff099671ec90fe0cd9e14d71c952.tar.gz |
Remove alpha channel from RGB555
Originally committed as revision 7106 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/imgconvert.c')
-rw-r--r-- | libavcodec/imgconvert.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 4a5e72ba90..d5b4cdca0c 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -185,7 +185,7 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { }, [PIX_FMT_RGB555] = { .name = "rgb555", - .nb_channels = 4, .is_alpha = 1, + .nb_channels = 3, .color_type = FF_COLOR_RGB, .pixel_type = FF_PIXEL_PACKED, .depth = 5, @@ -1629,19 +1629,10 @@ static inline unsigned int bitcopy_n(unsigned int a, int n) 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) | \ - ((a << 8) & 0x8000);\ + ((uint16_t *)(d))[0] = ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3);\ } #define BPP 2 @@ -2596,9 +2587,6 @@ int img_get_alpha_info(const AVPicture *src, case PIX_FMT_RGBA32: ret = get_alpha_info_rgba32(src, width, height); break; - case PIX_FMT_RGB555: - ret = get_alpha_info_rgb555(src, width, height); - break; case PIX_FMT_PAL8: ret = get_alpha_info_pal8(src, width, height); break; |