Re: 8 bit to 18 bit per pixel lookup palette
- From: authorwjf <authorwjf@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 24 Mar 2006 12:05:01 -0800
Thanks for the tips. I believe I am making some headway now. I have my
buffers set up for 8-bpp. This means my PXA LCD controller needs to be set
up for 8bpp as well correct? I still have left the LCD_PAL_FOR in register 4
set to b10, and the PDFOR in register 3 is set to b11.
I am loading a generic palette I found called "syspal.h". This works okay
for my 16-bit STN LCD running @ 8-bpp so I think its valid. This also means
I can say with some confidence the frame buffer and pallete are both being
created correctly.
My cursor functions need some work as they seem to be hardcoded for 16-bpp
LCDs. When I run in 8-bpp they become twice the normal size and slightly
distorted. This I see how to fix, I just haven't got around to it yet.
The problem is my palette is still not right on the 18-bpp. The colors look
similar to the old 4 color CGA days of DOS. I think you hit the nail on the
head when you said I need to make sure I am storing the bits correctly inside
of my "SetPalette" function. Any chance you could give me some idea of what
you are doing here?
Currently the code is set up to store the data as 5R,6G,5B. I tried
changing the mask to 6R,6G,6B to no avail. If you have time, please let me
know what you think. Either way, I am in your debt. My display has come a
long way in just one day with your help.
Guess I'll get back to it. Thanks again!
Bill
"Voidcoder" wrote:
Well, here are some tips to enable this mode:.
1. Correct the frame buffer size to be (Width x Height x 1),
ie. 8-bpp. A properly written driver will calculate
frame size automatically depending on the BPP.
2. Among the main video buffer in RAM, allocate one
more buffer for the palette memory. You will need also
to setup one more DMA descriptor for it, which has
PAL bit (26) set in the LDCMD field.
3. In your GPE::SetPalette(const PALETTEENTRY * source, ...)
method store "source" entries to the pallete buffer in RAM.
Note you have to pack the entries properly, depending on the
pixel format (see PXA documentation) and the actual LCD
connection.
4. Make sure you are using 8-bpp format in the following places:
- When creating your primary DDGPESurf surface.
- When returning the mode info in your GPE::GetModeInfo().
- Drawing primitives and cursor functions.
"voidcoder" <voidcoder@xxxxxxxxx> wrote in message news:u5rixvsTGHA.2816@xxxxxxxxxxxxxxxxxxxxxxx
Sorry, don't have my sources close at hand
right now. I can give you some tips tomorrow.
"authorwjf" <authorwjf@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:07951CCB-EB95-4AFA-80FE-A975DA3BF6D9@xxxxxxxxxxxxxxxx
Thanks voidcoder. I honestly don't have a problem with 8 to 18 bit lookup.
I just have no idea how to go about it. Is there some reference you could
maybe point me to that explains the basics of implementing palette lookups?
"voidcoder" wrote:
There is nothing to do about it. 8 to 18 lookup palette is the only
possible solution on PXA. I'm using it too in several xscale projects.
The GDI does not support 18bpp. The only supported pixel formats
are 1, 2, 4, 8, 16, 24, 32.
"authorwjf" <authorwjf@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D162F489-0093-4B73-BE34-1FCB9B8AD764@xxxxxxxxxxxxxxxx
Hi All,
I am hoping someone out there can point me in the right direction. I have
found several posts discussing this issue but none of them give me a good
idea of where to start. I have an 18-bpp panel connected to an XSCALE 270
design based on the MAINSTONE reference. I am supporting 3 panels: an 8,
16,
and 18bpp. The first two came along nicely but the last looks awful. I
have
come to believe I must confiugre the controller for 8-bpp, and then use
some
kind of look up palette to correct the color issues. Has anyone out there
got any suggestions for me on where to start? I'd very much appreciate
any
clues. I am hoping its just a matter of modifying syspal.h, but even if
that
is the case I have no idea what sort of modifications I'd be making.
Thanks in advance to anyone who might have some suggestions for me.
Bill
- References:
- Re: 8 bit to 18 bit per pixel lookup palette
- From: voidcoder
- Re: 8 bit to 18 bit per pixel lookup palette
- From: Voidcoder
- Re: 8 bit to 18 bit per pixel lookup palette
- Prev by Date: Re: Windows XP Embeded - Development Problem
- Next by Date: Re: problem in building headless device
- Previous by thread: Re: 8 bit to 18 bit per pixel lookup palette
- Next by thread: Re: 8 bit to 18 bit per pixel lookup palette
- Index(es):
Relevant Pages
|