[SDL] IMG_Load performance was Problem combining sw_scale with blit operations on surface
masonwheeler at yahoo.com
Thu Apr 9 08:03:25 PDT 2009
>----- Original Message ----
>From: Sami Näätänen <sn.ml at keijukammari.fi>
>Subject: Re: [SDL] IMG_Load performance was Problem combining sw_scale with blit operations on surface
>> On my machine, the command line ffmpeg program can process 180 frames per
>> second into an mp4, but IMG_Load takes 15-30mS to load one image to a
>> surface. All the other SDL calls I make to create the alpha blended text
>> layer take a total of 5mS on my machine. Any ideas why is IMG_Load so slow
>> or what I can do about it?
>Maybe this a related bug to the PNG loading bug, where the code opened and
>closed the PNG library for every image loaded. For JPEG loading I would
>imagine the speed loss being relatively higher than for PNG loading.
It's not exactly a bug, just a missing feature. Try adding my IMG_Init patch.
It affects PNGs, JPEGs and TIFFs, and ought to speed up the loading by
a bit. Just run
before you load up any JPEG files, and see if that doesn't help things...
More information about the SDL