ToolX 1.11.1 [e3f477f]
A GUI debug tool chain for diagnosing GVA systems
Loading...
Searching...
No Matches
test_pattern.h
Go to the documentation of this file.
1//
2// Copyright (c) 2026, Astute Systems PTY LTD
3//
4// This file is part of the VivoeX project developed by Astute Systems.
5//
6// License. See the LICENSE file in the project root for full license details.
7//
12
13#ifndef STREAMS_TEST_PATTERN_H
14#define STREAMS_TEST_PATTERN_H
15
16#include <cstdint>
17
18#include <QStringList>
19
20#include "rtp/rtp.h"
21#include "rtp/rtp_utils.h"
22
23namespace toolx::streams {
24
26constexpr int kWebcamPattern = 20;
27
29constexpr int kElitePattern = 21;
30
32constexpr int kEliteShipPatternBase = 22;
33
39QStringList testPatternNames();
40
47QString testPatternName(int pattern);
48
58int testPatternIndex(const QString &name, int fallback = 0);
59
66bool isAnimatedPattern(int pattern);
67
80void renderTestPattern(uint8_t *data, uint32_t width, uint32_t height,
81 mediax::rtp::ColourspaceType encoding, int pattern,
82 mediax::rtp::TestCardState &state);
83
84} // namespace toolx::streams
85
86#endif // STREAMS_TEST_PATTERN_H
QStringList testPatternNames()
The test pattern names in index order (same order as the RTP transmit table).
Definition test_pattern.cpp:59
QString testPatternName(int pattern)
The name of a test pattern, as stored in configuration files.
Definition test_pattern.cpp:69
void renderTestPattern(uint8_t *data, uint32_t width, uint32_t height, mediax::rtp::ColourspaceType encoding, int pattern, mediax::rtp::TestCardState &state)
Render a test pattern into a buffer.
Definition test_pattern.cpp:101
bool isAnimatedPattern(int pattern)
Check if a pattern changes from frame to frame.
Definition test_pattern.cpp:81
int testPatternIndex(const QString &name, int fallback)
The index of the test pattern with a name.
Definition test_pattern.cpp:75
constexpr int kEliteShipPatternBase
Pattern index of the first Elite ship shown on its own, the rest follow in ship order.
Definition test_pattern.h:32
constexpr int kElitePattern
Pattern index of the Elite ships, which cycle through the 13 ships of the game every 30 seconds.
Definition test_pattern.h:29
constexpr int kWebcamPattern
Pattern index of the webcam source (frames are supplied by WebcamCapture, RGB24 only).
Definition test_pattern.h:26