PDA

View Full Version : Qt-4.4.2: Problem with RGB Conversion on Powerpc



arunvv
14th October 2008, 19:05
Hi

I upgraded my Qt version from 4.2.2 to 4.4.2.
When I run my application on powerpc using Qt-4.2.2 libs the application colors are perfect.
But if the same application built and ran with Qt-4.4.2 libs the application colors are junk.
Here is the output of examples/qws/framebuffer console output.

The framebuffer device was opened successfully.

Fixed screen info:
id: vgxFB
smem_start: 0x4f000000
smem_len: 8388608
type: 0
type_aux: 0
visual: 2
xpanstep: 0
ypanstep: 0
ywrapstep: 0
line_length: 2048
mmio_start: 0x4ea00000
mmio_len: 2097152
accel: 0

The framebuffer device was mapped to memory successfully.

Successfully switched to graphics mode.

Variable screen info:
xres: 1024
yres: 768
xres_virtual: 1024
yres_virtual: 768
yoffset: 0
xoffset: 0
bits_per_pixel: 16
grayscale: 0
red: offset: 11, length: 5, msb_right: 0
green: offset: 5, length: 6, msb_right: 0
blue: offset: 0, length: 5, msb_right: 0
transp: offset: 0, length: 0, msb_right: 0
nonstd: 0
activate: 0
height: -1
width: -1
accel_flags: 0x0
pixclock: 0
left_margin: 0
right_margin: 0
upper_margin: 0
lower_margin: 0
hsync_len: 0
vsync_len: 0
sync: 0
vmode: 0

Will draw 3 rectangles on the screen,
they should be colored red, green and blue (in that order).
Done.

Also I noticed the order of colored rectangles are not in order mentioned here, for me it was blue, red and green. So it seems the problem may be with RGB conversion.

How to rectify it or solve it any body has such issues, any body succeeded in solving it.
Point me in solving this problem.

Thanks & Regards,
Arun.

arunvv
20th October 2008, 18:16
I debugged and found that the problem is with endianness. Linux Frame buffer is little endian and Qt code is big-endian.
So when I gave
"export QWS_DISPLAY=LinuxFb::littleendian" , the colors and evrything is displaying properly.

So if anyone has problems with colors when using Qt-4.4.x, when working for powerpc / big-endian, export as given below.

Thanks & Regards,
Arun.

arunvv
20th October 2008, 18:34
There is a typo in my earlier message, it should be "export as given above", instead of "export as given below".

Thanks & Regards,
Arun