summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-11 01:25:27 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-13 20:37:57 +0300
commitce739e616c42105e5c6f22bf4df5dc19b5e8c8f9 (patch)
tree5eff6f85c263a21249bce6600afbc1f5d4be3fcf /src
parent343978af0b491002dd198b6465d2e3a5fae4e407 (diff)
libcamera: ipa: Merge controls and v4l2controls in IPAOperationData
Now that the V4L2ControlList is merely a helper to construct a ControlList for V4L2 controls, without any data member, all controls can be transferred between pipeline handlers and IPAs using ControlList only. Remove the v4l2controls member for IPAOperationData and use the control member instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src')
-rw-r--r--src/ipa/rkisp1/rkisp1.cpp2
-rw-r--r--src/libcamera/ipa_interface.cpp8
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp6
3 files changed, 4 insertions, 12 deletions
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 69ced840..13059d99 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -215,7 +215,7 @@ void IPARkISP1::setControls(unsigned int frame)
V4L2ControlList ctrls(ctrls_);
ctrls.set(V4L2_CID_EXPOSURE, static_cast<int32_t>(exposure_));
ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast<int32_t>(gain_));
- op.v4l2controls.push_back(ctrls);
+ op.controls.push_back(ctrls);
queueFrameAction.emit(frame, op);
}
diff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp
index 4fb17829..0571b8e6 100644
--- a/src/libcamera/ipa_interface.cpp
+++ b/src/libcamera/ipa_interface.cpp
@@ -121,14 +121,6 @@ namespace libcamera {
*/
/**
- * \var IPAOperationData::v4l2controls
- * \brief Operation V4L2 controls data
- *
- * The interpretation and position of different values in the array are defined
- * by the IPA protocol.
- */
-
-/**
* \class IPAInterface
* \brief Interface for IPA implementation
*
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 32b02373..9b19bde8 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -324,7 +324,7 @@ RkISP1FrameInfo *RkISP1Frames::find(Request *request)
class RkISP1ActionSetSensor : public FrameAction
{
public:
- RkISP1ActionSetSensor(unsigned int frame, CameraSensor *sensor, V4L2ControlList controls)
+ RkISP1ActionSetSensor(unsigned int frame, CameraSensor *sensor, const ControlList &controls)
: FrameAction(frame, SetSensor), sensor_(sensor), controls_(controls) {}
protected:
@@ -335,7 +335,7 @@ protected:
private:
CameraSensor *sensor_;
- V4L2ControlList controls_;
+ ControlList controls_;
};
class RkISP1ActionQueueBuffers : public FrameAction
@@ -387,7 +387,7 @@ void RkISP1CameraData::queueFrameAction(unsigned int frame,
{
switch (action.operation) {
case RKISP1_IPA_ACTION_V4L2_SET: {
- V4L2ControlList controls = action.v4l2controls[0];
+ const ControlList &controls = action.controls[0];
timeline_.scheduleAction(utils::make_unique<RkISP1ActionSetSensor>(frame,
sensor_,
controls));