View Single Post
Old 06-08-2004, 11:26 AM   #6 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
no. your shifting is right, your masks are a little off. here's what's being evaluated right now:

Code:
#define RGB12_TO_RGB16(pixel)  \
((((pixel) & 0x0F00) << 4) | \
 (((pixel) & 0x00E0) << 3) | \
 (((pixel) & 0x001F) << 1) )

#define RGB12_TO_RGB16(0000RRRRGGGGBBBB)  \
(((0000RRRR00000000) << 4) | \
 ((00000000GGG00000) << 3) | \
 ((00000000000GBBBB) << 1) )
joe_bruin is offline   Reply With Quote