[PATCH v2 1/2] libcamera rkisp1: Reduce scope of sensor max resolution variable
Umang Jain
umang.jain at ideasonboard.com
Thu Oct 3 15:57:39 CEST 2024
Reduce the scope of sensor's max resolution variable in
RkISP1Path::validate(), as it is only required to constraint the
maximum and minimum resolution bounds on the non-RAW code path.
No functional changes intended in this patch.
Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
---
src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
index cb6117b9..e7f1f12a 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
@@ -254,7 +254,6 @@ CameraConfiguration::Status RkISP1Path::validate(const CameraSensor *sensor,
StreamConfiguration *cfg)
{
const std::vector<unsigned int> &mbusCodes = sensor->mbusCodes();
- Size resolution = filterSensorResolution(sensor);
const StreamConfiguration reqCfg = *cfg;
CameraConfiguration::Status status = CameraConfiguration::Valid;
@@ -322,6 +321,8 @@ CameraConfiguration::Status RkISP1Path::validate(const CameraSensor *sensor,
minResolution = sensorFormat.size;
maxResolution = sensorFormat.size;
} else {
+ Size resolution = filterSensorResolution(sensor);
+
/*
* Adjust the size based on the sensor resolution and absolute
* limits of the ISP.
--
2.45.2
More information about the libcamera-devel
mailing list