summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2020-10-02 10:08:07 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-02 16:01:21 +0100
commit0b427b8ecffdb24a5e133cf7d3b4d89fa4bad22f (patch)
tree04e4e4fb23a96779b2e28b2418c9e7e3e822c10f
parent68c55b49c4035d38981fe9540da90d9205015f0f (diff)
pipeline: raspberrypi: Sensor flips should be applied unconditionally
The code in pipeline_handler::start() that applies the flips were in a block that was conditional on the RPi::IPA_CONFIG_STAGGERED_WRITE return result. This should be applied unconditionally. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index d4d04c0d..1052bdce 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1172,19 +1172,6 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)
{ V4L2_CID_EXPOSURE, result.data[resultIdx++] } });
sensorMetadata_ = result.data[resultIdx++];
}
-
- /*
- * Configure the H/V flip controls based on the combination of
- * the sensor and user transform.
- */
- if (supportsFlips_) {
- ControlList ctrls(unicam_[Unicam::Image].dev()->controls());
- ctrls.set(V4L2_CID_HFLIP,
- static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::HFlip)));
- ctrls.set(V4L2_CID_VFLIP,
- static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::VFlip)));
- unicam_[Unicam::Image].dev()->setControls(&ctrls);
- }
}
if (result.operation & RPi::IPA_CONFIG_SENSOR) {
@@ -1198,6 +1185,19 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)
dropFrameCount_ = result.data[resultIdx++];
}
+ /*
+ * Configure the H/V flip controls based on the combination of
+ * the sensor and user transform.
+ */
+ if (supportsFlips_) {
+ ControlList ctrls(unicam_[Unicam::Image].dev()->controls());
+ ctrls.set(V4L2_CID_HFLIP,
+ static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::HFlip)));
+ ctrls.set(V4L2_CID_VFLIP,
+ static_cast<int32_t>(!!(rpiConfig->combinedTransform_ & Transform::VFlip)));
+ unicam_[Unicam::Image].dev()->setControls(&ctrls);
+ }
+
return 0;
}