From 1a09f151e2b8998af522db463780d5bf7e50ca89 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sun, 10 May 2015 17:12:00 +1000 Subject: [PATCH] Fix to LLD driver color conversions. --- src/gdisp/gdisp_driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gdisp/gdisp_driver.h b/src/gdisp/gdisp_driver.h index 7c4cafe8..a6983793 100644 --- a/src/gdisp/gdisp_driver.h +++ b/src/gdisp/gdisp_driver.h @@ -872,7 +872,7 @@ typedef struct GDISPVMT { #define LLDRGB2COLOR_G(g) (((LLDCOLOR_TYPE)((g) & (0xFF & ~((1<<(8-LLDCOLOR_BITS_G))-1)))) << (LLDCOLOR_BITS_G+LLDCOLOR_SHIFT_G-8)) #else // LLDCOLOR_BITS_G + LLDCOLOR_SHIFT_G < 8 #define LLDGREEN_OF(c) (((c) & (((1<> (8-(LLDCOLOR_BITS_LLDG+COLOR_SHIFT_G))) + #define LLDRGB2COLOR_G(g) (((LLDCOLOR_TYPE)((g) & (0xFF & ~((1<<(8-LLDCOLOR_BITS_G))-1)))) >> (8-(LLDCOLOR_BITS_G+LLDCOLOR_SHIFT_G))) #endif #if LLDCOLOR_BITS_B + LLDCOLOR_SHIFT_B == 8 #define LLDBLUE_OF(c) ((c) & (((1<> (8-(LLDCOLOR_BITS_B+LLDCOLOR_SHIFT_B))) + #define LLDRGB2COLOR_B(b) (((LLDCOLOR_TYPE)((b) & (0xFF & ~((1<<(8-LLDCOLOR_BITS_B))-1)))) >> (8-(LLDCOLOR_BITS_B+LLDCOLOR_SHIFT_B))) #endif #define LLDLUMA_OF(c) ((LLDRED_OF(c)+((uint16_t)LLDGREEN_OF(c)<<1)+LLDBLUE_OF(c))>>2) #define LLDEXACT_RED_OF(c) (((uint16_t)(((c)>>LLDCOLOR_SHIFT_R)&((1<