From 6c1fb0cf0f5b03c066f471ee9cb07a92a2fe5edf Mon Sep 17 00:00:00 2001 From: asahtik Date: Tue, 28 Jan 2025 13:39:52 +0100 Subject: [PATCH 1/2] Added support for converting 8uc1 frames into nv12 --- include/depthai/utility/ImageManipV2Impl.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/depthai/utility/ImageManipV2Impl.hpp b/include/depthai/utility/ImageManipV2Impl.hpp index 6beca9331..6416121c0 100644 --- a/include/depthai/utility/ImageManipV2Impl.hpp +++ b/include/depthai/utility/ImageManipV2Impl.hpp @@ -1554,6 +1554,12 @@ bool ColorChange::colorConvertToNV12( done = true; break; } + case ImgFrame::Type::RAW8: + case ImgFrame::Type::GRAY8: + std::copy(src, src + inputSize, outputFrame.data()); + memset(outputFrame.data() + dstSpecs.p2Offset, 128, dstSpecs.p2Stride * dstSpecs.height / 2); + done = true; + break; case ImgFrame::Type::YUV422i: case ImgFrame::Type::YUV444p: case ImgFrame::Type::YUV422p: @@ -1567,7 +1573,6 @@ bool ColorChange::colorConvertToNV12( case ImgFrame::Type::RAW14: case ImgFrame::Type::RAW12: case ImgFrame::Type::RAW10: - case ImgFrame::Type::RAW8: case ImgFrame::Type::PACK10: case ImgFrame::Type::PACK12: case ImgFrame::Type::YUV444i: @@ -1578,7 +1583,6 @@ bool ColorChange::colorConvertToNV12( case ImgFrame::Type::BGRF16F16F16p: case ImgFrame::Type::RGBF16F16F16i: case ImgFrame::Type::BGRF16F16F16i: - case ImgFrame::Type::GRAY8: case ImgFrame::Type::GRAYF16: case ImgFrame::Type::RAW32: case ImgFrame::Type::NONE: From e13c0238b7b6509999cef84a7400538ee6cf7d2d Mon Sep 17 00:00:00 2001 From: asahtik Date: Tue, 28 Jan 2025 13:52:24 +0100 Subject: [PATCH 2/2] RVC4 FW: implement conversion gray -> nv12 --- cmake/Depthai/DepthaiDeviceRVC4Config.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Depthai/DepthaiDeviceRVC4Config.cmake b/cmake/Depthai/DepthaiDeviceRVC4Config.cmake index 68e98cd04..0bd9cdf81 100644 --- a/cmake/Depthai/DepthaiDeviceRVC4Config.cmake +++ b/cmake/Depthai/DepthaiDeviceRVC4Config.cmake @@ -4,4 +4,4 @@ set(DEPTHAI_DEVICE_RVC4_MATURITY "snapshot") # "version if applicable" # set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+93f7b75a885aa32f44c5e9f53b74470c49d2b1af") -set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+5d1371967432dd4cf1742b56afbf4c669417bcfd") +set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+78ff040f04e86bc77b1618c87a931d645f7aa109")