summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/raspberrypi
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2020-09-07 08:15:56 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-09-29 11:43:05 +0100
commit15a98fab79ae71638387b3e85356550710bb643b (patch)
tree8d345069f934721c0180acbb9bb9dd61ec5ad10a /src/libcamera/pipeline/raspberrypi
parentde20d00455fbd87815a0946eaf957a9368e72a6a (diff)
libcamera: pipeline: raspberrypi: Revert "Set sensor default orientation before configure()"
This reverts commit 1e8c91b65695449c5246d17ba7dc439c8058b781. Now that we shall be implementing application-defined 2D transforms it's no longer possible to set the sensor orientation so early on. We have to wait until we have the CameraConfiguration object as that's where the application puts its choice of transform. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/raspberrypi')
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 50f07182..ea32d371 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -841,13 +841,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)
/* Initialize the camera properties. */
data->properties_ = data->sensor_->properties();
- /* Configure the H/V flip controls based on the sensor rotation. */
- ControlList ctrls(data->unicam_[Unicam::Image].dev()->controls());
- int32_t rotation = data->properties_.get(properties::Rotation);
- ctrls.set(V4L2_CID_HFLIP, static_cast<int32_t>(!!rotation));
- ctrls.set(V4L2_CID_VFLIP, static_cast<int32_t>(!!rotation));
- data->unicam_[Unicam::Image].dev()->setControls(&ctrls);
-
/*
* List the available streams an application may request. At present, we
* do not advertise Unicam Embedded and ISP Statistics streams, as there
@@ -1046,6 +1039,13 @@ int RPiCameraData::configureIPA()
{ V4L2_CID_EXPOSURE, result.data[resultIdx++] } });
sensorMetadata_ = result.data[resultIdx++];
}
+
+ /* Configure the H/V flip controls based on the sensor rotation. */
+ ControlList ctrls(unicam_[Unicam::Image].dev()->controls());
+ int32_t rotation = sensor_->properties().get(properties::Rotation);
+ ctrls.set(V4L2_CID_HFLIP, static_cast<int32_t>(!!rotation));
+ ctrls.set(V4L2_CID_VFLIP, static_cast<int32_t>(!!rotation));
+ unicam_[Unicam::Image].dev()->setControls(&ctrls);
}
if (result.operation & RPI_IPA_CONFIG_SENSOR) {