RE: [AD] small bug in 15 and 16 bit asm color converters

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


At 08:46 AM 24/10/2004, you wrote:
On Sat, 2004-10-23 at 11:09 -0700, Robert Ohannessian wrote:
> You'd normally do:
>
>       Red8 = (red5 << 3) | (red5 >> 2);
>
> This will replicate the upper bits of red5 into the bottom of red8. This
> effectively makes 31 map to 255 and 0 map to 0.
>

Ah, yes. Quite simple. And probably faster than a LUT. But it definitely
will be slower than a single POR.  So, before implementing it, is there
really a problem with having 7/3/7 as black? It feels wrong of course
(same as having 248/251/248 as white, like Allegro currently does) - but
the former doesn't look wrong, while the latter does (on my monitor).


i use black as a masking colour for overlaying video.. so it does effect the way my software works.
i would prefer to always have black as 0,0,0.
i also consider that slight performace hit (for black=0,0,0,white=255,255,255) to be justified.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/