Is there a "best" QImage::Format for Raspberry Pi?
I'm using Qt 5.8 and QtQuick for a Raspberry Pi-based project. I've written a custom QQuickPaintedItem that renders a QImage to draw some data on the screen. Is there a preferred format for the QImage to get the best performance out of the Pi?
According to page 42 (Table 18) of https://web.archive.org/web/20160803202903/https://www.broadcom.com/docs/support/videocore/VideoCoreIV-AG100-R.pdf, page 42 (Table18) there are several texture formats supported by the Pi's GPU.
Since I'm not using transparency, would using
QImage::Format_RGBX8888in my Qt project be beneficial since it's supported by the GPU? I'm already generating the QImage in a separate thread to keep the GUI responsive, so I'm not really concerned about the performance, I'm just curious.
You should benchmark the various values that seem to fit.
Hi @StoatPatronus ,
i am afraid i can't help you. Actually i am rather curious about your solution on setting the Format. I've also written my own QtQuickPaintedItem. Now i can set the renderTarget as an Image, but i don't find a way to specify the render targets format.
Please tell me how you did that.