1 diff -ur fbv-1.0b/fb_display.c fbv-1.0b-avr32/fb_display.c
2 --- fbv-1.0b/fb_display.c 2004-09-07 14:09:43.000000000 +0200
3 +++ fbv-1.0b-avr32/fb_display.c 2006-05-04 13:30:25.000000000 +0200
5 for(i = 0; i < yc; i++, fbptr += scr_xs * cpp, imptr += pic_xs * cpp)
6 memcpy(fbptr, imptr, xc * cpp);
9 - set8map(fh, &map_back);
11 munmap(fb, scr_xs * scr_ys * cpp);
15 inline static unsigned short make15color(unsigned char r, unsigned char g, unsigned char b)
18 - (((r >> 3) & 31) << 10) |
20 (((g >> 3) & 31) << 5) |
22 + ((b >> 3) & 31) << 10);
25 inline static unsigned short make16color(unsigned char r, unsigned char g, unsigned char b)
28 - (((r >> 3) & 31) << 11) |
29 - (((g >> 2) & 63) << 5) |
32 + (((g >> 3) & 31) << 5) |
33 + ((b >> 3) & 31) << 10);
36 void* convertRGB2FB(int fh, unsigned char *rgbbuff, unsigned long count, int bpp, int *cpp)
39 i_fbbuff = (unsigned int *) malloc(count * sizeof(unsigned int));
40 for(i = 0; i < count ; i++)
41 - i_fbbuff[i] = ((rgbbuff[i*3] << 16) & 0xFF0000) |
42 + i_fbbuff[i] = ((rgbbuff[i*3+2] << 16) & 0xFF0000) |
43 ((rgbbuff[i*3+1] << 8) & 0xFF00) |
44 - (rgbbuff[i*3+2] & 0xFF);
45 + (rgbbuff[i*3] & 0xFF);
46 fbbuff = (void *) i_fbbuff;