[libcamera-devel] [PATCH v1] pipeline: raspberrypi: Return all ISP resolutions from generateConfiguration()
Naushir Patuck
naush at raspberrypi.com
Thu Jan 6 12:32:42 CET 2022
The libcamerasrc gstreamer component does seem to not allow stream resolutions
that are not advertised by PipelineHandler::generateConfiguration(). This has
been raised in a bug report [1].
Fix this behavior by advertising a SizeRange from the minimum ISP resolution, up
to the sensor resolution from PipelineHandlerRPi::generateConfiguration().
[1] https://bugs.libcamera.org/show_bug.cgi?id=105
Fixes: f16acb275c85 ("pipeline: raspberrypi: Restrict the advertised maximum ISP output resolution")
Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
---
src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index b5c687da467f..220a5749c0d9 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -639,8 +639,11 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,
*/
for (const auto &format : fmts) {
PixelFormat pf = format.first.toPixelFormat();
- if (pf.isValid())
- deviceFormats[pf].emplace_back(sensorSize);
+ if (pf.isValid()) {
+ const SizeRange &ispSizes = format.second[0];
+ deviceFormats[pf].emplace_back(ispSizes.min, sensorSize,
+ ispSizes.hStep, ispSizes.vStep);
+ }
}
}
--
2.25.1
More information about the libcamera-devel
mailing list