changeset 4208:45e0102824fb libavcodec

Remove alpha channel from RGB555
author alex
date Thu, 16 Nov 2006 20:46:36 +0000
parents bc9de4875ebd
children ec6d49d9c19d
files imgconvert.c
diffstat 1 files changed, 4 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/imgconvert.c	Thu Nov 16 20:43:29 2006 +0000
+++ b/imgconvert.c	Thu Nov 16 20:46:36 2006 +0000
@@ -185,7 +185,7 @@
     },
     [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 @@
     b = bitcopy_n(v << 3, 3);\
 }
 
-#define RGBA_IN(r, g, b, a, s)\
+
+#define RGB_OUT(d, r, g, b)\
 {\
-    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)\
-{\
-    ((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 @@
     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;