MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / newFrame

Method newFrame

sources/utils/VideoBenchmark.cpp:75–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void VideoBenchmark::newFrame(const Image<ColorRgb>& image)
76{
77 if (_benchmarkStatus >= 0)
78 {
79 ColorRgb pixel = image(image.width() / 2, image.height() / 2);
80 if ((_benchmarkMessage == "white" && pixel.red > 120 && pixel.green > 120 && pixel.blue > 120) ||
81 (_benchmarkMessage == "red" && pixel.red > 120 && pixel.green < 30 && pixel.blue < 30) ||
82 (_benchmarkMessage == "green" && pixel.red < 30 && pixel.green > 120 && pixel.blue < 30) ||
83 (_benchmarkMessage == "blue" && pixel.red < 30 && pixel.green < 40 && pixel.blue > 120) ||
84 (_benchmarkMessage == "black" && pixel.red < 30 && pixel.green < 30 && pixel.blue < 30))
85
86 {
87 emit SignalBenchmarkUpdate(_benchmarkStatus, _benchmarkMessage);
88 _benchmarkStatus = -1;
89 _benchmarkMessage = "";
90 }
91 }
92}

Callers

nothing calls this directly

Calls 2

widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected