Denis Oliver Kropp wrote:
> Phil Endecott wrote:
>> I'm therefore considering adding some flags to DirectFB so that the 
>> JPEG provider can be used in different fast/slow modes.  Any comments?
>
> Adding IDirectFBImageProvider::SetOptions() to be called before RenderTo()?

Here we go:

   http://chezphil.org/tmp/dfb_fast_jpeg.patch
   http://chezphil.org/tmp/++dfb_fast_jpeg.patch

Usage:

     IDirectFBImageProvider provider = dfb.CreateImageProvider(fn);
     DFBSurfaceDescription desc;
     provider.GetSurfaceDescription(&desc);
     IDirectFBSurface surface = dfb.CreateSurface(desc);
     provider.SetOptions(DIOPT_FAST);
     provider.RenderTo(surface, NULL);

It seems to be about one-third faster, but that probably depends a lot 
on your hardware and the type of images.


Phil.





_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to