summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2023-06-05 09:26:04 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-06-05 11:40:25 +0300
commit54340ef70f7ece5354dd4b62cecf833da400fdd9 (patch)
tree44a679285343262c9d77105fd0fa6f2960d562fd /src
parentf44df6f4fa2051c3058ff2d4aa01cba5e69c7a95 (diff)
camera_sensor: ipa: core: Add CFA pattern to IPACameraSensorInfo
Add a new cfaPattern field to the IPACameraSensorInfo to pass the CFA/Bayer pattern for the current sensor configuration to the IPA. This field takes a value from properties::draft::ColorFilterArrangementEnum. Populate cfaPattern in CameraSensor::sensorInfo(), called by the pipeline handler before it calls ipa->init() and ipa->config(). Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/camera_sensor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
index 06f31521..60bf87b4 100644
--- a/src/libcamera/camera_sensor.cpp
+++ b/src/libcamera/camera_sensor.cpp
@@ -956,6 +956,9 @@ int CameraSensor::sensorInfo(IPACameraSensorInfo *info) const
info->bitsPerPixel = format.bitsPerPixel();
info->outputSize = format.size;
+ std::optional<int32_t> cfa = properties_.get(properties::draft::ColorFilterArrangement);
+ info->cfaPattern = cfa ? *cfa : properties::draft::RGB;
+
/*
* Retrieve the pixel rate, line length and minimum/maximum frame
* duration through V4L2 controls. Support for the V4L2_CID_PIXEL_RATE,