From 7b84a17e213891f9c32b4b3d258c1c8343fc9c8a Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Thu, 6 Jan 2022 11:32:42 +0000 Subject: pipeline: raspberrypi: Return all ISP resolutions from generateConfiguration() 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 Reviewed-by: David Plowman Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- 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 79cb75c6..583ee798 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -653,8 +653,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); + } } } -- cgit v1.2.1