[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Bit-Depth and Graphics stuff....
On 07/07/2010 08:17 PM, Peter Persson wrote:
>> No, the way to do this is to first transform the bitmaps to a generic
>> format (such a format already exists in VDI for 8 bit and less), and
>> then transform this generic format to the screen format.
>
> Is this a good idea in truecolor?
Yes. Most (all?) common image formats used today are quite similar when
decoded. Select the common format carefully, and there will be very
little work in converting the decoded jpegs/pngs to a common format.
Decoding the jpeg itself will be really heavy task.
> To be honest, it's not even a good idea in palette modes, because performance is just horrible. A chunky2planar conversion -> buffer which is then blitted to the screen is just so much faster.
> Using the Device Independent format in 8bpp chunky just means losing tons of CPU, because you'll first convert a chunky bitmap to consecutive planes, then the VDI will convert that image back to chunky.
In this specific case I agree with you.
> Since he has to add custom code for hicolor/truecolor, wouldn't it make sense to add conversion code for palette modes as well? Patrice, correct me if I'm wrong, but I'm 99.999% sure SDL does this).
If you don't use some sort of intermediate standard format, you're
looking at 30+ versions of the jpeg->screen routine.
Jo Even