Index: [thread] [date] [subject] [author]
  From: Andrew Apted <ajapted@netspace.net.au>
  To  : ggi-develop@eskimo.com
  Date: Sat, 3 Jul 1999 13:21:10 +1000

Re: Got to be a faster way.

Club Neon writes:

>  The rounding errors from mapping 16-16-16 bit triplets to something like
>  3-2-3 even if I keep the 16 alpha channel, there can be almost no color
>  variation

Yeah 3-2-3 (only 2 bits of green ? Or did you mean 3-3-2 ?) makes a
pretty non-optimal emulation of truecolor.  Dithering helps, but can
look bad sometimes (especially at low resolution).

In my experience, using a custom palette produces better results than
3-3-2 schemes.  There are ways of computing an optimal palette.  But at
the end of the day, there is a limit to how good 8 bit mode can look.

>  So what I need is a fast way to get these 48 bit colors mapped down into a
>  buffer that can be put into the display visual.  I think low-order
>  truncation of bits might be accurate enough for the map down.

For 15/16/24/32 bit modes, sure.  For 8 bit mode, a 32*32*32 lookup
table against an optimal palette will produce best results.

>  So it seems that they only way to do
>  anything that still slightly resembles using libggi is the put functions
>  from a raw buffer that isn't get'ed, but just written to.

That is the fastest portable way, and my preferred way.  Is it so bad ??

Cheers,
___________________________________________________
                                               \  /
  Andrew Apted   <ajapted@netspace.net.au>      \/
 

Index: [thread] [date] [subject] [author]