qvideoframe

How to convert 'QVideoFrame' with YUV data to 'QVideoframe' with RGBA32 data in Qt?

眉间皱痕 提交于 2019-12-30 11:10:38
问题 I receive QVideoFrames from webcam, and they contain image data in YUV format ( QVideoFrame::Format_YUV420P ). How can I convert one such frame to one with QVideoFrame::Format_ARGB32 or QVideoFrame::Format_RGBA32 ? Can I do it without going low level, using just existing functionality in Qt5 ? Example: QVideoFrame convertFormat(const QVideoFrame &inputframe, QVideoFrame::PixelFormat outputFormat) { // What comes here? } //Usage QVideoFrame converted = convertFormat(mySourceFrame, QVideoFrame:

How to convert 'QVideoFrame' with YUV data to 'QVideoframe' with RGBA32 data in Qt?

隐身守侯 提交于 2019-12-01 11:08:01
I receive QVideoFrames from webcam, and they contain image data in YUV format ( QVideoFrame::Format_YUV420P ). How can I convert one such frame to one with QVideoFrame::Format_ARGB32 or QVideoFrame::Format_RGBA32 ? Can I do it without going low level, using just existing functionality in Qt5 ? Example: QVideoFrame convertFormat(const QVideoFrame &inputframe, QVideoFrame::PixelFormat outputFormat) { // What comes here? } //Usage QVideoFrame converted = convertFormat(mySourceFrame, QVideoFrame::Format_RGB32); I found a solution that is built into Qt5 , but UNSUPPORTED BY Qt . Here is how to go