[PATCH 2/3] dibdrv: Fix the wrong lookup table number.

Huw Davies huw at codeweavers.com
Fri Oct 12 02:19:51 CDT 2018


On Thu, Oct 11, 2018 at 10:12:13PM +0900, Byeongsik Jeon wrote:
> for ( x = 1; x < 17; x++ )
>     printf("0x%02x ", (int)( 255. * pow( (double)x / 16., 0.4315 ) + .5 ));
> for ( x = 1; x < 17; x++ )
>     printf("0x%02x ", (int)( 77.05 * pow( (double)x, 0.4315 ) + .5 ));
> 
> 0x4d 0x68 0x7c 0x8c 0x9a 0xa7 0xb2 0xbd 0xc7 0xd0 0xd9 0xe1 0xe9 0xf1 0xf8 0xff
> 0x4d 0x68 0x7c 0x8c 0x9a 0xa7 0xb2 0xbd 0xc7 0xd0 0xd9 0xe1 0xe9 0xf1 0xf8 0xff
> 
> Signed-off-by: Byeongsik Jeon <bsjeon at hanmail.net>
> ---
>  dlls/gdi32/dibdrv/primitives.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dlls/gdi32/dibdrv/primitives.c b/dlls/gdi32/dibdrv/primitives.c
> index caf2d890b5..ecdf52c7cc 100644
> --- a/dlls/gdi32/dibdrv/primitives.c
> +++ b/dlls/gdi32/dibdrv/primitives.c
> @@ -6046,7 +6046,7 @@ static const BYTE ramp[17] =
>      0,    0x4d, 0x68, 0x7c,
>      0x8c, 0x9a, 0xa7, 0xb2,
>      0xbd, 0xc7, 0xd0, 0xd9,
> -    0xe1, 0xe9, 0xf0, 0xf8,
> +    0xe1, 0xe9, 0xf1, 0xf8,
>      0xff

The original values were obtained from native, so the numbers are
'correct'.  As mentioned in the comment, the data were then to used
obtain the equation (mainly just for the sake of interest).

Huw.



More information about the wine-devel mailing list