From: Mark Jackson <mpfj@mimc.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] Add 16bpp BMP support
Date: Thu, 29 Jan 2009 10:01:25 +0000 [thread overview]
Message-ID: <49817E75.7060907@mimc.co.uk> (raw)
In-Reply-To: <20090128211134.A88C2832E416@gemini.denx.de>
Wolfgang Denk wrote:
> Dear Mark Jackson,
>
> In message <497F1732.6050901@mimc.co.uk> you 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@mimc.co.uk>
>> ---
>>
>> common/lcd.c | 49 +++++++++++++++++++++++++++++++++++++++----------
>> 1 files changed, 39 insertions(+), 10 deletions(-)
>>
>> diff --git a/common/lcd.c b/common/lcd.c
>> index ae79051..16d6f2a 100644
>> --- a/common/lcd.c
>> +++ b/common/lcd.c
<snip>
>> + bmap += (padded_line - width) * 2;
>> + fb -= (width * 2 + lcd_line_length);
>
> Is it intentional that you reverse padded_line and width here, i.e.
> you are sure it's not
>
> bmap += (width - padded_line) * 2;
> ?
The "bmap += ..." line is to step forward to the start of the next line of bmp
data, taking into account any padding bytes.
If I read the code correct, padded_line is defined as ...
padded_line = (width&0x3) ? ((width&~0x3)+4) : (width);
... so it will always be >= width. Correct ?
If so, then ...
bmap += (width - padded_line) * 2;
... will be <= 0, and so will actually step bmap back into the data you've
just used, whereas ...
bmap += (padded_line - width) * 2;
... will be >= 0, and will step forward to the start of the next line as required.
Or have I misunderstood the bmp format and the existing code ?
Regards
Mark
next prev parent reply other threads:[~2009-01-29 10:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-27 14:16 [U-Boot] [PATCH v3] Add 16bpp BMP support Mark Jackson
2009-01-28 21:11 ` Wolfgang Denk
2009-01-29 10:01 ` Mark Jackson [this message]
2009-01-29 10:56 ` Wolfgang Denk
2009-01-30 11:57 ` Mark Jackson
2009-01-30 21:23 ` Guennadi Liakhovetski
2009-01-30 22:13 ` Wolfgang Denk
2009-01-30 22:56 ` Guennadi Liakhovetski
2009-02-01 19:28 ` Mark Jackson
2009-02-02 8:01 ` Haavard Skinnemoen
2009-02-02 14:17 ` Mark Jackson
2009-02-23 10:26 ` Haavard Skinnemoen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49817E75.7060907@mimc.co.uk \
--to=mpfj@mimc.co.uk \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.