Attached is a patch for DirectFB based on tip commit: 3a9360cb003f605be22134b54eeeee1858d727bd. DSPF_LUT8 pixel format is not correctly handling in update_screen in system/x11/primary.c. And this caused error message "[unsupported format]***[convert.c:987 in dfb_convert_to_rgb32()]" when running demos such as df_fire.
---- *^_^* Many thanks & Best Regards Juan Zhao
--- DirectFB.git/systems/x11/primary.c 2010-03-14 12:46:27.000000000 +0800 +++ DirectFB.git.submit/systems/x11/primary.c 2010-03-25 11:59:25.018386929 +0800 @@ -668,8 +668,27 @@ update_screen( DFBX11 *x11, const DFBRec break; case 24: - dfb_convert_to_rgb32( surface->config.format, src, lock->pitch, - surface->config.size.h, dst, ximage->bytes_per_line, rect.w, rect.h ); + if (surface->config.format == DSPF_LUT8) { + int width = rect.w; int height = rect.h; + const u8 *src8 = src; + u32 *dst32 = dst; + CorePalette *palette = surface->palette; + int x; + while (height--) { + + for (x=0; x<width; x++) { + DFBColor color = palette->entries[src8[x]]; + dst32[x] = PIXEL_RGB32( color.r, color.g, color.b ); + } + + src8 += lock->pitch; + dst32 += ximage->bytes_per_line / 4; + } + } + else { + dfb_convert_to_rgb32( surface->config.format, src, lock->pitch, + surface->config.size.h, dst, ximage->bytes_per_line, rect.w, rect.h ); + } break; case 16:
_______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev