Commit b651f9bc authored by Simon Schmeißer's avatar Simon Schmeißer Committed by Jonah Brüchert

Add support for nv21 video format as found on android

Note that the same code could be used for nv12
parent 20ad86f6
Pipeline #7629 passed with stages
in 19 minutes and 52 seconds
......@@ -251,6 +251,11 @@ QImage *QrCodeVideoFrame::toGrayscaleImage()
}
}
break;
case QVideoFrame::Format_NV21:
/// nv21 format, default on android
/// image starts with a complete Y image, which we can use directly
image = new QImage(data, captureRect.targetWidth, captureRect.targetHeight, QImage::Format_Grayscale8);
break;
case QVideoFrame::Format_YUYV:
image = new QImage(captureRect.targetWidth, captureRect.targetHeight, QImage::Format_Grayscale8);
pixel = image->bits();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment