[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
>
> lookup tables are great if source or dest are 8 bit, but IMHO with for
> example 16 to 32, it's better to use shifts than a table of 64K
> entries, if using MMX you can convert 2/4/8 pixels at the same time
In the non-MMX routines I added to win/update.s, the 16-bit to truecolor
conversion code uses 2 lookup tables of 256 entries each, the first indexed by
the high byte (r5g3) and the second indexed by the low byte (g3b5). The two
resulting dwords are then added (not ORed), in order to make a nearly correct
(according to _rgb_scale_6[]) green value.
--
Eric Botcazou (ebotcazou@xxxxxxxxxx)
Web site: http://www.multimania.com/ebotcazou