[U-Boot] [PATCH v3] Add 16bpp BMP support
Guennadi Liakhovetski
lg at denx.de
Fri Jan 30 22:23:39 CET 2009
On Tue, 27 Jan 2009, Mark Jackson wrote:
> This patch adds 16bpp BMP support to the common lcd code.
>
> Use CONFIG_BMP_16BPP and set LCD_BPP to LCD_COLOR16 to enable the code.
>
> At the moment it's only been tested on the MIMC200 AVR32 board, but extending
> this to other platforms should be a simple task !!
>
> Signed-off-by: Mark Jackson <mpfj at mimc.co.uk>
It is a pity I didn't notice these patches earlier, and I didn't notice
them, because it's only today that I realized that I needed to change this
code too. But - for the other case 8 bit bmp on a 16 bit lcd without a
colourmap support. I have implemented that, it works now, a patch will
follow, but while working on it I noticed how this generic code is
difficult to work with due to all the ifdefs and especially
platform-specific types and code. So, looking at this your patch - do we
really need the one more CONFIG_ define for CONFIG_BMP_16BPP? What are the
drawbacks of adding your code unconditionally? extra 100 bytes for all
configurations using LCD?
Another question - do you really need 16bpp bmp? I saw a discussion on
this list, that other picture formats should not be added to U-Boot - you
can easily convert any format to bmp. Are 256 colours really not enough
for you? I used a real photo today as a test image, converted to an 8-bit
bmp. It looked well enough on my qvga. And normally you use this lcd code
to display a splashscreen, which is usually a computer-generated image, so
256 colours should suffice? Although, I am not an expert in graphical
desing.
If we really add more bmp formats, we also get more combinations like of
bmp / lcd:
BMP LCD
1-bit 1-bit
8-bit 1-bit
16-bit 1-bit
1-bit 8-bit
...
if we really want to go that way, maybe better break this code into
several functions for different format conversions?
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
More information about the U-Boot
mailing list