Add lcameraBuff Stage 2 plugin with YUV attach and unit tests.

Introduce params parsing, pixel/format decisions, capture layout, shared
YuvStimProducer per camera, and channel stimulus buffers with attach flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-14 11:03:19 -04:00
parent 809861be2b
commit e7b7a311f7
18 changed files with 1698 additions and 0 deletions
@@ -0,0 +1,44 @@
#include <yuvCaptureLayout.h>
#include <gtest/gtest.h>
namespace smo {
namespace stim_buff {
namespace lcamera_buff {
namespace {
TEST(YuvCaptureLayoutTest, PackedYuyvUsesMmapDeinterleavedBacking)
{
lcamera_dev::LcameraDevConfiguredCameraMode mode;
mode.pixelFormatName = "YUYV";
mode.isFullyPlanar = false;
mode.planeCount = 1;
EXPECT_EQ(
classifyYuvCaptureLayoutPath(mode),
YuvCaptureLayoutPath::PackedDeinterleave);
EXPECT_EQ(
getChannelBackingPlanForLayoutPath(
YuvCaptureLayoutPath::PackedDeinterleave),
YuvChannelBackingPlan::MmapDeinterleaved);
}
TEST(YuvCaptureLayoutTest, FullPlanarUsesDirectBacking)
{
lcamera_dev::LcameraDevConfiguredCameraMode mode;
mode.pixelFormatName = "YU12";
mode.isFullyPlanar = true;
mode.planeCount = 3;
EXPECT_EQ(
classifyYuvCaptureLayoutPath(mode),
YuvCaptureLayoutPath::FullPlanarDirect);
EXPECT_EQ(
getChannelBackingPlanForLayoutPath(
YuvCaptureLayoutPath::FullPlanarDirect),
YuvChannelBackingPlan::LCameraDirect);
}
} // namespace
} // namespace lcamera_buff
} // namespace stim_buff
} // namespace smo