|
Roadmap |
Site sponsored by
IGEL
|
||
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [directfb-dev] Re: BGR16 and BGR15 colourspace
Hello,
Sorry for the late response.
> this sounds interesting. Is it related to a project at Philips?
> I haven't heard much about the Philips MHP implementation for quite
> some time. Are these embedded platforms in any way related to it?
No, I'm afraid not (Philips is a huge company :-) ). This is for prototyping
some mobile audio/video platforms.
> Do you have a hybrid endian system, i.e. RGB16 but byte swapped?
> Or do you really have BGR16 as in BBBB BGGG GGGR RRRR ?
Actually it is worse; It is both, but I didn't want to complicate my mail,
since the solution is essentially the same.
I have BGR15, BGR16 and BGR16 with mixed endian depending on which display
device I hook on.
> Adding another pixel format is quite simple. You implement ~13 tiny
> span functions in "src/gfx/generic/generic.c" and all possible
> combinations of blitting flags, destination/source formats etc. are
> supported. Apart from
> the DFBSurfacePixelFormat enum, there are some places where the pixel
> format has to be added (mostly switch statements). Searching all
> source files for RGB16 should be sufficient.
Ok, that's what I did. Unfortunately, our test-system decided to fail right
during testing, so I have to wait to get it repaired to give the final
results ... ;-(
I only have a question about the file src/gfx/convert.c
DFBSurfacePixelFormat
dfb_pixelformat_for_depth( int depth )
{
switch (depth) {
case 8:
return DSPF_LUT8;
case 15:
return DSPF_ARGB1555;
case 16:
return DSPF_RGB16;
case 24:
return DSPF_RGB24;
case 32:
return DSPF_RGB32;
}
return DSPF_UNKNOWN;
}
I now just replaced the RGB16/ARGB1555 by BGR16/BGR15, but that doesn't make
me feel too well, since it makes usage of RGB16/ARGB1555 with the same
binary/code impossible. (For instance in fbdev.c the function is being used
when initialising the primairy layer.) I may want to come up with a more
flexible way.
Regards,
Armin
--
Info: To unsubscribe send a mail to ecartis@directfb.org with
"unsubscribe directfb-dev" as subject.
|
|
| directfb.org |
|
Development |
|
Old Archives |