Re: [AD] Color convertors

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


> > Not very elegant, but that's probably the price to pay for maximum speed
in
> > MMX code.
>
> Not elegant enough it seems. If I switch from the MMX to the non-MMX code,
> and move the mouse around, I can clearly see there is a difference of
shade
> of white in the test program.
>
This is due to the non-MMX code being slightly wrong then, surely  :)p .

If 00->00  and 3F->FF  then  1F->7D  &  20->82  which is a jump of 5 instead
of the even tempered 4.

This hardly matters for final output I suppose, but if a general purpose
conversion worked this way it would introduce 4 bands of increased contrast
which may get exaggerated by further processing.

It's cool if 0x070307 looks better, because the R,G and B values are
logarithmic, so errors in white are technically more serious than errors in
black, as well as more visible.






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