Re: [AD] patches for color.c and graphics.c (was: Re: 4.2.1) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2006-11-30, Andrei Ellman <ae-a-alleg@xxxxxxxxxx> wrote:
> Even though there is no perceptible difference in the PNG between the
> two methods of converting 6-bit to 8-bit, I still think my patches
> should be applied for the following reasons:
>
> + With the shifting method, the progression of values will be linear.
> Using an integer-divide creates a progression of values with a slight
> curvature.
> + create_blender_table() will work faster - especially on older
> processors where multiplies and divides are expensive.
> + Using shifts will make the code consistent. _set_colorconv_palette()
> currently uses shifts, which means that there is currently an
> inconsistency in the way that Allegro converts 6-bit values to 8-bit vales.
>
> I think that the last point is particularly important, as for a given
> 6-bit input, the 8-bit result should always be the same.
Agreed. I'll commit it.
Peter