diff options
Diffstat (limited to 'src/libcamera/pipeline/raspberrypi/raspberrypi.cpp')
-rw-r--r-- | src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 77e860ab..c0dd9551 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -832,13 +832,14 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config) } } - /* First calculate the best sensor mode we can use based on the user request. */ + /* + * Calculate the best sensor mode we can use based on the user's + * request, and apply it to the sensor with the cached transform, if + * any. + */ V4L2SubdeviceFormat sensorFormat = findBestFormat(data->sensorFormats_, rawStream ? sensorSize : maxSize, bitDepth); - /* Apply any cached transform. */ const RPiCameraConfiguration *rpiConfig = static_cast<const RPiCameraConfiguration *>(config); - sensorFormat.transform = rpiConfig->combinedTransform_; - /* Finally apply the format on the sensor. */ - ret = data->sensor_->setFormat(&sensorFormat); + ret = data->sensor_->setFormat(&sensorFormat, rpiConfig->combinedTransform_); if (ret) return ret; |