From patchwork Thu Jan 6 11:32:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 15257 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id C8D47BF415 for ; Thu, 6 Jan 2022 11:32:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DCD2E60925; Thu, 6 Jan 2022 12:32:52 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="DkDp0ylH"; dkim-atps=neutral Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F3E4360219 for ; Thu, 6 Jan 2022 12:32:50 +0100 (CET) Received: by mail-wr1-x432.google.com with SMTP id e9so2629000wra.2 for ; Thu, 06 Jan 2022 03:32:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xVAx5APxE1gjIFZIn1+gvbw5O9T0d0vTvUjiHlpoqnk=; b=DkDp0ylHyk0WCko/rIMIVpLRWwXLwY6NI6p6djkCRD/Tvwc6LxvpGcGNbuhAgu5RsC KKtYYgmWRWoUHIkaJCnmzr4REEwOkqtXkKR9DASU/QM5VhPViHfM+d+feZwnuFGccxed uPF0vJNl/S5FJTmARl5+BJ5I3iOk0ebvahIMRVh2T7BmuKIeEWMtJOc04xGdelDfwmIU /xuvjz9OrlVHytJsXWJX3FzF4cJFSLzTAaLu8ZQc2mUC0moRCPhla4k4d8RaZdKXfHe3 DZS729QQ39o4wiiMoyldvLAHVcIOobcfuL31RwEIFeYZGlEpGM6QdJ6x/3t3WZ8oyUHK 2nSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xVAx5APxE1gjIFZIn1+gvbw5O9T0d0vTvUjiHlpoqnk=; b=Xjk8GMD04TyyZ2CiHOMISEO2bGg/JoDc2jXipsdt/+3rS1nTuRrhP+JnxxyIx8bHKX TUFL502LAOMzzg1jXbnH17pCvZgGFzRMxBubVXaQPCCDPVGN8RmYokBvUAO5duTpgVVw WETRSxltT1kw3cBnlEIQrVZRrZatWC/0YA8lQrCYQFB8eCUQoyDUKcK/aevstC0F8+Au njszYthuT2VqihCahye00nUlQEOmzHSZJHJAUBDE43vXV2sKZoDg3vEy0iuCIsmyHQ88 LYqWn061Vkh+BS29WLHnwUUduyOYVut/QK+wsq/Kv8WVugWCdkG4AnHx6wDnCBnB8+Wv XjNw== X-Gm-Message-State: AOAM530BdRVdTaZbaIpV2ZUg+zhlwvTC9JJY2KdiuynKkCaaSefzIbFK f4Nn+sxbLQUrrzJ/geQ6ag335An3Dq3i8w== X-Google-Smtp-Source: ABdhPJwRC2NYip1qQqD/4anh0+FIvBw3eJHvWhAgnx677NsZ5ZG7stj+RrxkTOORHlMT0TlRBHrq6w== X-Received: by 2002:a5d:468f:: with SMTP id u15mr3067617wrq.402.1641468770357; Thu, 06 Jan 2022 03:32:50 -0800 (PST) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:f2bf:e3f6:c5a8:939b]) by smtp.gmail.com with ESMTPSA id u3sm2283370wrs.0.2022.01.06.03.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 03:32:49 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Thu, 6 Jan 2022 11:32:42 +0000 Message-Id: <20220106113242.2383324-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1] pipeline: raspberrypi: Return all ISP resolutions from generateConfiguration() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- 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); + } } }