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:
@@ -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
|
||||
Reference in New Issue
Block a user