From 51282e083d7a1c06309cf7f2fc216f6203b4fbb2 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Sat, 20 Feb 2021 15:18:07 +0300 Subject: tst_qvideoframe: Increase buffer sizes used in image() tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 1c2a8655ac3dd5f8de5294a77ac5e585add82229) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/unit/qvideoframe/tst_qvideoframe.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto') 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 -- cgit v1.2.3