Equivalent of export QWS_DISPLAY=LinuxFb::littleendian in QT 5.x
-
Hi All,
Any idea what is equivalent of :
@export QWS_DISPLAY=LinuxFb::littleendian@
in QT 5.x??
-
AFAIK there is no equivalent for the time being.
-
Dear agocs, thanks for the reply.
Any idea how to achieve this? I need QT libraries in little endian. I did cross compilation and got libraries in big endian. It seems QT5.2.1 dont supports -llitle endian flag during configure. -
Since you are building Qt yourself anyway, you could change the sources a bit to get the behavior of the old littleendian parameter for QWS.
In qtbase/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp you have QLinuxFbScreen::doRedraw(). You could extend it with some conversion of mScreenImage before passing it to drawImage().
As for the Qt build, the host and target architecture is detected automatically. There are no configure parameters anymore that can affect this.
-
Hi Agocs, thanks for your reply.
Are you sure we need to modify:
@QLinuxFbScreen::doRedraw()@
Actually the color conversion is taking place in the below function. I also figured out that my lcd screen depth = 16
@static QImage::Format determineFormat(const fb_var_screeninfo &info, int depth)
{
const fb_bitfield rgba[4] = { info.red, info.green, info.blue, info.transp };QImage::Format format = QImage::Format_Invalid; switch (depth) {
case 16: {
const fb_bitfield rgb565[4] = {{11, 5, 0}, {5, 6, 0},{0, 5, 0}, {0, 0, 0}};const fb_bitfield bgr565[4] = {{0, 5, 0}, {5, 6, 0}, {11, 5, 0}, {0, 0, 0}};
const fb_bitfield brg565[4] = {{0, 5, 0}, {11, 5, 0},
{5, 6, 0}, {0, 0, 0}};if (memcmp(rgba, rgb565, 3 * sizeof(fb_bitfield)) == 0) { format = QImage::Format_RGB16; qDebug()<<"Siddharth: Inside First If"; }
else if (memcmp(rgba, bgr565, 3 * sizeof(fb_bitfield)) == 0) {
qDebug()<<"Sid: Inside Second If";
format = QImage::Format_RGB16;
// pixeltype = BGRPixel;
}
break;
}@
Is there any need to touch the above function??
Let me know your views on this.
Thanks
-
Not sure how that could help you. There is nothing you can do with the format, RGB16 is pretty much the only option. The problem is that the actual order of the r, g, b components depends on the endianness. So if your framebuffer really needs bgr then the image data has to be converted. Alternatively, is there a way to swtich the framebuffer to rgb?
-
Thanks Agocs for the reply.
As of now i don't have any documentation/user manual for the lcd panel. But i will sure check them if i get across any details.