diff options
author | Jøger Hansegård <joger.hansegard@qt.io> | 2024-05-10 10:01:56 +0200 |
---|---|---|
committer | Jøger Hansegård <joger.hansegard@qt.io> | 2024-05-23 10:10:52 +0200 |
commit | 352f08af6700f73ee099a217b631d2b25c1e99d8 (patch) | |
tree | d052de541970019a28038504c3aaa0cbee105acd /src/gsttools/qgstcodecsinfo.cpp | |
parent | 39ac1d20cc1d15189a184c46bd061a7d6e2ac11e (diff) |
QVideoFrame::toImage could cause crash and corrupt images when YUV to
RGB conversion was performed on the CPU with YUV formats. This was
caused by logic errors in the YUV to RGB conversion code.
This patch fixes this issue and adds tests to cover CPU conversion. From
the reference images, we see that CPU conversion does not match the
colors correctly, but this is a separate issue. Also, support for
cpu conversion of Format_YUV420P10 is lacking.
NOTE: QVideoFrame::toImage/qImageFromVideoFrame may still cause
crash/ASAN/D3DValidation failures when the number of rows/columns in the
QVideoFrame is 1.
Some reference images are renamed because we switched to using the
QVideoFrameFormat::pixelFormatToString function instead of maintaining
a separate list of format names in the tests. This reduces duplication.
Fixes: QTBUG-124537
Fixes: QTBUG-124534
Fixes: QTBUG-123749
Pick-to: 6.5 6.7
Change-Id: I5224e4b98a9ff5b5857e264c8907a4be3c5a9941
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Diffstat (limited to 'src/gsttools/qgstcodecsinfo.cpp')
0 files changed, 0 insertions, 0 deletions