feat: multiple test patterns in testpattern node

V210.hpp: add fill_colorbars, fill_ire_ramp, fill_black, fill_white.
Shared fill_solid helper stamps the first line across all rows via
memcpy. Generic write_palette_line template handles both SMPTE and
IRE bar palettes. fill_frame kept as a backward-compat alias.

testpattern/main.cpp: read "pattern" from node config and dispatch
to the appropriate fill function (bars/ire/black/white).

build_graph: pass {"pattern","bars"} to testpattern node params.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
JohannesItten
2026-07-01 13:24:06 +03:00
parent 4245284382
commit 42507886fe
3 changed files with 74 additions and 11 deletions
+4 -3
View File
@@ -41,9 +41,10 @@ static dmf::FlowGraph build_graph() {
const std::string video_flow = gen_uuid();
const std::string audio_flow = gen_uuid();
g.nodes = {
{ "ndiin", "ndiin", {} },
{ "fakesink", "fakesink", {} },
{ "ndiout", "ndiout", {} },
{ "testpattern", "testpattern", {{"pattern", "bars"}} },
{ "ndiin", "ndiin", {} },
{ "fakesink", "fakesink", {} },
{ "ndiout", "ndiout", {} },
};
const nlohmann::json video_fmt = {
{"kind","video"}, {"width",1920}, {"height",1080}, {"fps_num",25}, {"fps_den",1}