118 halp_meta(name,
"Video scope")
119 halp_meta(c_name,
"VideoScope")
120 halp_meta(category,
"Monitoring/Visuals")
121 halp_meta(author,
"ossia score")
122 halp_meta(manual_url,
"")
125 "Waveform, parades, vectorscope, histogram, CIE chromaticity and diamond "
126 "scopes of a texture, computed on the GPU; the scope is also a texture")
127 halp_meta(uuid,
"08283fcb-46ac-460c-b796-b3df1cb77d96")
128 halp_flag(fully_custom_item);
133 static constexpr int min_size = 128, max_size = 2048;
137 halp::gpu_texture_input<
"In"> image;
138 struct : halp::combobox_t<
"Mode", Mode>
142 std::string_view values[8]{mode_names[0], mode_names[1], mode_names[2], mode_names[3],
143 mode_names[4], mode_names[5], mode_names[6], mode_names[7]};
144 Mode init{Mode::Waveform};
147 struct : halp::combobox_t<
"Matrix", Ui::Monitor::Color::Matrix>
149 halp_meta(description,
"Luma and colour difference coefficients, and the primaries of the CIE plot")
152 std::string_view values[3]{
"Rec. 601",
"Rec. 709",
"Rec. 2020"};
153 Ui::Monitor::Color::Matrix init{Ui::Monitor::Color::Matrix::Rec709};
156 struct : halp::combobox_t<
"Transfer", Ui::Monitor::Color::Transfer>
158 halp_meta(description,
"How the signal is encoded: for the CIE plot and the nits scale")
161 std::string_view values[3]{
"SDR",
"PQ",
"HLG"};
162 Ui::Monitor::Color::Transfer init{Ui::Monitor::Color::Transfer::Sdr};
165 struct : halp::combobox_t<
"Units", Units>
169 std::string_view values[5]{
170 units_names[0], units_names[1], units_names[2], units_names[3], units_names[4]};
171 Units init{Units::Percent};
174 struct : halp::toggle<
"Legal range">
176 halp_meta(description,
"Signal in narrow range: 0% at code 16 and 100% at 235 (8-bit)")
178 struct : halp::hslider_f32<
"Intensity", halp::range{0.1, 10., 1.}>
181 struct : halp::hslider_f32<
"Persistence", halp::range{0., 0.98, 0.5}>
184 struct : halp::toggle_t<bool,
"75% targets", halp::toggle_setup{.init =
true}>
186 halp_meta(description,
"Vectorscope targets of 75% colour bars; off for 100% bars")
188 struct : halp::hslider_f32<
"Zoom", halp::range{1., 5., 1.}>
190 halp_meta(description,
"Vectorscope magnification")
199 halp::gpu_texture_output<
"Scope"> scope;
202 std::shared_ptr<ScopeMonitor> monitor = std::make_shared<ScopeMonitor>();
208 void runInitialPasses(
212 void operator()() { }
220 void allocate(
int sz);
221 bool rebuildBindings(QRhiTexture* input);
224 QRhiBuffer* m_params{};
225 QRhiBuffer* m_bins{};
227 QRhiTexture* m_out{};
229 QRhiTexture* m_overlay{};
230 int m_overlayKey{-1};
233 QRhiSampler* m_sampler{};
234 QRhiShaderResourceBindings* m_srb{};
235 QRhiComputePipeline* m_decay{};
236 std::array<QRhiComputePipeline*, score::gfx::texture_kind_count> m_accumulate{};
237 std::array<bool, score::gfx::texture_kind_count> m_accumulateFailed{};
238 QRhiComputePipeline* m_render{};
239 void* m_boundInput{};
240 Ui::Monitor::Color::Transfer m_builtTransfer{};
241 bool m_pipelinesFailed{};
void drawGraticule(QPainter &p, const QRectF &r, Mode m, Units u, bool legal, Ui::Monitor::Color::Matrix matrix, Ui::Monitor::Color::Transfer transfer, bool targets75, double zoom)
Definition VideoScope.cpp:276
Definition ProcessContext.hpp:12
Definition TextureShapeMonitor.hpp:12