I am building some hardware with a graphical user interface and my images are stored with 8 bits per pixel (bpp) in RRRGGGBB format. However, my video chip expects 30bpp pixels (10 bits for each color), which leaves me with the problem of converting each channel from 3 bits (or 2 in the blue case) to 10 bits.
Because I'm building the system from scratch, I have a lot of flexibility on implementing a solution. Some possible choices are:
- Map the original 3 bits to the 3 most significant bits of the video chip, an set the remaining bits to 0 (I suppose white would not be so white)
- Map the original 3 bits to the 3 most significant bits of the video chip, an set the remaining bits to 1 (I suppose black would not be totally black)
- Map each original bit (b1,b2,b3) to several bits on the video chip (e.g., b1,b1,b1,b1,b2,b2,b2,b,b3,b3) - I don't know if this makes any sense...
Is any of these approaches better than the others, or is there a more adequate solution?