Skip to content

Commit

Permalink
Merge pull request #1224 from luxonis/imagemanipv2_gray_to_nv12
Browse files Browse the repository at this point in the history
ImageManipV2 add GRAY8 to NV12 conversion
  • Loading branch information
asahtik authored Jan 29, 2025
2 parents a6e4d5a + e13c023 commit e99a9b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/Depthai/DepthaiDeviceRVC4Config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
8 changes: 6 additions & 2 deletions include/depthai/utility/ImageManipV2Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,12 @@ bool ColorChange<ImageManipBuffer, ImageManipData>::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:
Expand All @@ -1567,7 +1573,6 @@ bool ColorChange<ImageManipBuffer, ImageManipData>::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:
Expand All @@ -1578,7 +1583,6 @@ bool ColorChange<ImageManipBuffer, ImageManipData>::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:
Expand Down

0 comments on commit e99a9b9

Please sign in to comment.