Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qvideoframetestutils_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QVIDEOFRAMETESTUTILS_P_H
5#define QVIDEOFRAMETESTUTILS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qbytearray.h>
19#include <QtCore/qbytearrayview.h>
20#include <QtCore/qstring.h>
21#include <QtCore/qtypes.h>
22#include <QtCore/private/qexpected_p.h>
23
24#include <initializer_list>
25
26namespace QtMultimediaTest {
27
28// Builds an owned byte pattern from a brace-init list of byte values, e.g. a multi-byte texel:
29// makeBytes({ 0x12, 0x34 }).
30QByteArray makeBytes(std::initializer_list<uchar> bytes);
31
32// Fills "height" rows of "width" texels each, starting at "data" and advancing by "stride" bytes
33// per row, by repeating "texel". Used to build known-content planar image data (e.g. a video
34// frame plane) independently of how that data is ultimately produced (CPU buffer, GPU readback,
35// FFmpeg AVFrame plane).
36void fillPlaneRows(uchar *data, qsizetype stride, int width, int height, QByteArrayView texel);
37
38// Compares "height" rows of "width" texels each, starting at "data" and advancing by "stride"
39// bytes per row, against a repetition of "texel". Returns an error describing the first
40// mismatch, if any.
41q23::expected<void, QString> comparePlaneRows(const uchar *data, qsizetype stride, int width,
42 int height, QByteArrayView texel);
43
44} // namespace QtMultimediaTest
45
46#endif // QVIDEOFRAMETESTUTILS_P_H
q23::expected< void, QString > comparePlaneRows(const uchar *data, qsizetype stride, int width, int height, QByteArrayView texel)
QByteArray makeBytes(std::initializer_list< uchar > bytes)
void fillPlaneRows(uchar *data, qsizetype stride, int width, int height, QByteArrayView texel)