faster imageresampler (#1744)

This commit is contained in:
Thinner77
2024-05-24 09:13:33 +02:00
committed by GitHub
parent e6714b21f9
commit bde5d156a9
3 changed files with 147 additions and 68 deletions

View File

@@ -1079,6 +1079,22 @@ void V4L2Grabber::newThreadFrame(Image<ColorRgb> image)
}
else
emit newFrame(image);
#ifdef FRAME_BENCH
// calculate average frametime
if (_currentFrame > 1)
{
if (_currentFrame % 100 == 0)
{
Debug(_log, "%d: avg. frametime=%.02fms / %.02fms", int(_currentFrame), _frameTimer.restart()/100.0, 1000.0/_fps);
}
}
else
{
Debug(_log, "%d: frametimer started", int(_currentFrame));
_frameTimer.start();
}
#endif
}
int V4L2Grabber::xioctl(int request, void *arg)