Rev 3679 | Rev 3707 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3679 | Rev 3692 | ||
---|---|---|---|
Line 240... | Line 240... | ||
240 | 240 | ||
241 | /** Put pixel - 8-bit depth (3:2:3) */ |
241 | /** Put pixel - 8-bit depth (3:2:3) */ |
242 | static void |
242 | static void |
243 | rgb_byte8(void *dst, int rgb) |
243 | rgb_byte8(void *dst, int rgb) |
244 | { |
244 | { |
245 | *(uint8_t *)dst = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | BLUE(rgb, 3); |
245 | *(uint8_t *)dst = 255 - (RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | |
- | 246 | BLUE(rgb, 3)); |
|
246 | } |
247 | } |
247 | 248 | ||
248 | /** Return pixel color - 8-bit depth (3:2:3) */ |
249 | /** Return pixel color - 8-bit depth (3:2:3) */ |
249 | static int |
250 | static int |
250 | byte8_rgb(void *src) |
251 | byte8_rgb(void *src) |
251 | { |
252 | { |
252 | int color = *(uint8_t *)src; |
253 | int color = 255 - (*(uint8_t *)src); |
253 | return (((color >> 5) & 0x7) << (16 + 5)) | |
254 | return (((color >> 5) & 0x7) << (16 + 5)) | |
254 | (((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5); |
255 | (((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5); |
255 | } |
256 | } |
256 | 257 | ||
257 | /** Put pixel into viewport |
258 | /** Put pixel into viewport |
Line 563... | Line 564... | ||
563 | break; |
564 | break; |
564 | default: |
565 | default: |
565 | return false; |
566 | return false; |
566 | } |
567 | } |
567 | 568 | ||
568 | screen.fbaddress = (unsigned char *) (((uintptr_t) addr) + offset); |
569 | screen.fbaddress = (unsigned char *) (((uintptr_t) addr)); |
569 | screen.xres = xres; |
570 | screen.xres = xres; |
570 | screen.yres = yres; |
571 | screen.yres = yres; |
571 | screen.scanline = scan; |
572 | screen.scanline = scan; |
572 | screen.invert_colors = invert_colors; |
573 | screen.invert_colors = invert_colors; |
573 | 574 |