Lines Matching refs:Pixel

89 #define RGB_FROM_PIXEL(Pixel, fmt, r, g, b)				\
91 r = (((Pixel&fmt->Rmask)>>fmt->Rshift)<<fmt->Rloss); \
92 g = (((Pixel&fmt->Gmask)>>fmt->Gshift)<<fmt->Gloss); \
93 b = (((Pixel&fmt->Bmask)>>fmt->Bshift)<<fmt->Bloss); \
95 #define RGB_FROM_RGB565(Pixel, r, g, b) \
97 r = (((Pixel&0xF800)>>11)<<3); \
98 g = (((Pixel&0x07E0)>>5)<<2); \
99 b = ((Pixel&0x001F)<<3); \
101 #define RGB_FROM_RGB555(Pixel, r, g, b) \
103 r = (((Pixel&0x7C00)>>10)<<3); \
104 g = (((Pixel&0x03E0)>>5)<<3); \
105 b = ((Pixel&0x001F)<<3); \
107 #define RGB_FROM_RGB888(Pixel, r, g, b) \
109 r = ((Pixel&0xFF0000)>>16); \
110 g = ((Pixel&0xFF00)>>8); \
111 b = (Pixel&0xFF); \
113 #define RETRIEVE_RGB_PIXEL(buf, bpp, Pixel) \
117 Pixel = *((Uint16 *)(buf)); \
123 Pixel = B[0] + (B[1] << 8) + (B[2] << 16); \
125 Pixel = (B[0] << 16) + (B[1] << 8) + B[2]; \
131 Pixel = *((Uint32 *)(buf)); \
135 Pixel = 0; /* appease gcc */ \
140 #define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b) \
144 Pixel = *((Uint16 *)(buf)); \
150 Pixel = B[0] + (B[1] << 8) + (B[2] << 16); \
152 Pixel = (B[0] << 16) + (B[1] << 8) + B[2]; \
158 Pixel = *((Uint32 *)(buf)); \
162 Pixel = 0; /* prevent gcc from complaining */ \
165 RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \
170 #define PIXEL_FROM_RGB(Pixel, fmt, r, g, b) \
172 Pixel = ((r>>fmt->Rloss)<<fmt->Rshift)| \
177 #define PIXEL_FROM_RGB(Pixel, fmt, r, g, b) \
179 Pixel = ((r>>fmt->Rloss)<<fmt->Rshift)| \
184 #define RGB565_FROM_RGB(Pixel, r, g, b) \
186 Pixel = ((r>>3)<<11)|((g>>2)<<5)|(b>>3); \
188 #define RGB555_FROM_RGB(Pixel, r, g, b) \
190 Pixel = ((r>>3)<<10)|((g>>3)<<5)|(b>>3); \
192 #define RGB888_FROM_RGB(Pixel, r, g, b) \
194 Pixel = (r<<16)|(g<<8)|b; \
200 Uint16 Pixel; \
202 PIXEL_FROM_RGB(Pixel, fmt, r, g, b); \
203 *((Uint16 *)(buf)) = Pixel; \
221 Uint32 Pixel; \
223 PIXEL_FROM_RGB(Pixel, fmt, r, g, b); \
224 *((Uint32 *)(buf)) = Pixel; \
234 Uint16 Pixel; \
237 PIXEL_FROM_RGB(Pixel, fmt, r, g, b); \
238 *bufp = Pixel | (*bufp & Amask); \
257 Uint32 Pixel; \
260 PIXEL_FROM_RGB(Pixel, fmt, r, g, b); \
261 *bufp = Pixel | (*bufp & Amask); \
268 #define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a) \
270 r = ((Pixel&fmt->Rmask)>>fmt->Rshift)<<fmt->Rloss; \
271 g = ((Pixel&fmt->Gmask)>>fmt->Gshift)<<fmt->Gloss; \
272 b = ((Pixel&fmt->Bmask)>>fmt->Bshift)<<fmt->Bloss; \
273 a = ((Pixel&fmt->Amask)>>fmt->Ashift)<<fmt->Aloss; \
275 #define RGBA_FROM_8888(Pixel, fmt, r, g, b, a) \
277 r = (Pixel&fmt->Rmask)>>fmt->Rshift; \
278 g = (Pixel&fmt->Gmask)>>fmt->Gshift; \
279 b = (Pixel&fmt->Bmask)>>fmt->Bshift; \
280 a = (Pixel&fmt->Amask)>>fmt->Ashift; \
282 #define RGBA_FROM_RGBA8888(Pixel, r, g, b, a) \
284 r = (Pixel>>24); \
285 g = ((Pixel>>16)&0xFF); \
286 b = ((Pixel>>8)&0xFF); \
287 a = (Pixel&0xFF); \
289 #define RGBA_FROM_ARGB8888(Pixel, r, g, b, a) \
291 r = ((Pixel>>16)&0xFF); \
292 g = ((Pixel>>8)&0xFF); \
293 b = (Pixel&0xFF); \
294 a = (Pixel>>24); \
296 #define RGBA_FROM_ABGR8888(Pixel, r, g, b, a) \
298 r = (Pixel&0xFF); \
299 g = ((Pixel>>8)&0xFF); \
300 b = ((Pixel>>16)&0xFF); \
301 a = (Pixel>>24); \
303 #define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a) \
307 Pixel = *((Uint16 *)(buf)); \
313 Pixel = b[0] + (b[1] << 8) + (b[2] << 16); \
315 Pixel = (b[0] << 16) + (b[1] << 8) + b[2]; \
321 Pixel = *((Uint32 *)(buf)); \
325 Pixel = 0; /* stop gcc complaints */ \
328 RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \
329 Pixel &= ~fmt->Amask; \
334 #define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a) \
336 Pixel = ((r>>fmt->Rloss)<<fmt->Rshift)| \
342 #define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a) \
344 Pixel = ((r>>fmt->Rloss)<<fmt->Rshift)| \
354 Uint16 Pixel; \
356 PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a); \
357 *((Uint16 *)(buf)) = Pixel; \
375 Uint32 Pixel; \
377 PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a); \
378 *((Uint32 *)(buf)) = Pixel; \