diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2021-02-20 15:18:07 +0300 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-04-12 20:20:14 +0000 |
commit | 51282e083d7a1c06309cf7f2fc216f6203b4fbb2 (patch) | |
tree | 9cb5258f46df360f8582209687d8ddcb2fa604dc | |
parent | 5298dcaa5d07410128594d7f37124f7d93d5dc86 (diff) |
tst_qvideoframe: Increase buffer sizes used in image() tests
YUV420P and YV12 formats use three planes which need 18432 bytes in
total:
- height × bytesPerLine = 64 × 256 = 16384 bytes;
- height/2 × width/2 × uvPixelStride = 32 × 32 × 1 = 1024 bytes;
- height/2 × width/2 × uvPixelStride = 32 × 32 × 1 = 1024 bytes.
NV12 and NV21 formats use two planes which need 24576 bytes in total:
- height × bytesPerLine = 64 × 256 = 16384 bytes;
- height/2 × bytesPerLine = 32 × 256 = 8192 bytes.
Fixes https://bugs.debian.org/982973.
Change-Id: I68433dbb5370a6e4cdd2a85e2a9554fab642f5b6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 1c2a8655ac3dd5f8de5294a77ac5e585add82229)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | tests/auto/unit/qvideoframe/tst_qvideoframe.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp b/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp index 402ddf334..1b597a241 100644 --- a/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp +++ b/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp @@ -1244,14 +1244,14 @@ void tst_QVideoFrame::image_data() QTest::newRow("64x64 YUV420P") << QSize(64, 64) << QVideoFrame::Format_YUV420P - << 13288 + << 18432 << 256 << QImage::Format_ARGB32; QTest::newRow("64x64 YV12") << QSize(64, 64) << QVideoFrame::Format_YV12 - << 16384 + << 18432 << 256 << QImage::Format_ARGB32; @@ -1272,14 +1272,14 @@ void tst_QVideoFrame::image_data() QTest::newRow("64x64 NV12") << QSize(64, 64) << QVideoFrame::Format_NV12 - << 16384 + << 24576 << 256 << QImage::Format_ARGB32; QTest::newRow("64x64 NV21") << QSize(64, 64) << QVideoFrame::Format_NV21 - << 16384 + << 24576 << 256 << QImage::Format_ARGB32; #endif |