I do notice some delay between the colours on TV and the Ledstrip, but this issue might be solved on the master of HyperionNG? (I read a couple of pages back you noticed the same issue).
Yes I can confirm that. The reason is that part of the code that copies byte by byte, color by color (I know that this is more complicated issue and code should be platform independent) in V4L2Grabber.cpp:
#ifdef HAVE_JPEG_DECODER
QRect rect(_cropLeft, _cropTop, imageFrame.width() - _cropLeft - _cropRight, imageFrame.height() - _cropTop - _cropBottom);
imageFrame = imageFrame.copy(rect);
imageFrame = imageFrame.scaled(imageFrame.width() / _pixelDecimation, imageFrame.height() / _pixelDecimation,Qt::KeepAspectRatio);
if ((image.width() != unsigned(imageFrame.width())) || (image.height() != unsigned(imageFrame.height())))
image.resize(imageFrame.width(), imageFrame.height());
for (int y=0; y<imageFrame.height(); ++y)
for (int x=0; x<imageFrame.width(); ++x)
{
QColor inPixel(imageFrame.pixel(x,y));
ColorRgb & outPixel = image(x,y);
outPixel.red = inPixel.red();
outPixel.green = inPixel.green();
outPixel.blue = inPixel.blue();
}
}
else
#endif
Display More
But even 640x480 and decimation==1 is too much for Rpi3 and causes very big lag.
This patch below works very fast for 1024x768 and decimation>=2. Decimation == 1 breaks the www live feed (capture works OK) for unknown to me reason, probably memory sharing:
#ifdef HAVE_JPEG_DECODER
if (_cropLeft>0 || _cropTop>0 || _cropBottom>0 || _cropRight>0)
{
QRect rect(_cropLeft, _cropTop, imageFrame.width() - _cropLeft - _cropRight, imageFrame.height() - _cropTop - _cropBottom);
imageFrame = imageFrame.copy(rect);
}
if (_pixelDecimation>1)
imageFrame = imageFrame.scaled(imageFrame.width() / _pixelDecimation, imageFrame.height() / _pixelDecimation,Qt::KeepAspectRatio);
if ((image.width() != unsigned(imageFrame.width())) || (image.height() != unsigned(imageFrame.height())))
image.resize(imageFrame.width(), imageFrame.height());
memcpy(image.memptr(),imageFrame.bits(),image.width()*image.height()*sizeof(ColorRgb));
}
else
#endif
Display More