From patchwork Tue Mar 7 11:48:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 18350 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 3EC40BDE17 for ; Tue, 7 Mar 2023 11:48:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7D614626A7; Tue, 7 Mar 2023 12:48:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1678189700; bh=gPbj4tNie2V0t8inWSQQ8KZQI/ggj3xjYG89FO0VtAQ=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=fPk2JMte/SwcDeNpiISviLGR6SLUYoWtGkvwRb0+59a6NZJhE2LJ2ebBWaa+oLWcg OCoo52pRktg7eD445tl94kiiDV2XgvuyhNasj73G3Tk58M6dP59Tj2BO6rIbf6s6q/ WTUx1hsxTiRJXmK5mU45c9Is5F5NTAWu79ngJTBrHx1OsrJ9CvgY21ldUnBaV/xBib Qb4teZeT8PD0dRPkajqp5HUDH6QGPOuToGYvZ5jaQxq6oTF54PnOEfBkdOcYrPnnny EcWseBw5Gm6F1C13gjZJ3VuAr5LgZPbbRMX1396OSfEuIF5pbXx9d4LA0FtQUKrG0m QNaUBdNmkv9Ag== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CBDC46265E for ; Tue, 7 Mar 2023 12:48:18 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="rJ5LSZuZ"; dkim-atps=neutral Received: from uno.homenet.telecomitalia.it (host-79-47-54-87.retail.telecomitalia.it [79.47.54.87]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 014514AD; Tue, 7 Mar 2023 12:48:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1678189698; bh=gPbj4tNie2V0t8inWSQQ8KZQI/ggj3xjYG89FO0VtAQ=; h=From:To:Cc:Subject:Date:From; b=rJ5LSZuZanpSlhgpthrqgn9CeN1dVg8phFuuzqwUqCGwvITzvhpS1Glo0JlnohVpF wSeqxJhG4MbSFJcXpbK7dep37AzFjIdi/hi6edWPEhvGhnYmz8nThSp9VUisJsC45x TMfa+JXkDxyYE7cPVxpE3DpggHhsHIGoSpAFdGnM= To: libcamera-devel@lists.libcamera.org Date: Tue, 7 Mar 2023 12:48:00 +0100 Message-Id: <20230307114804.42291-1-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/4] libcamera: rkisp1: Fix 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: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Cc: Jacopo Mondi , libcamera@luigi311.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The series started with bug 180: https://bugs.libcamera.org/show_bug.cgi?id=180 which reports how using the self-path for generating a configuration for a single stream results in only StreamFormats up to 1920x1920 to be produced. I have then noticed how the current implementation of RkISP1Path::generateConfiguration() could produce unusual sizes, such as 1920x1432 in case the sensor's resolution is larger than the maximum supported 1920x1920 output. Finally, if StillCapture is requested, make sure it is assigned to the main path in RkISP1::generateConfiguration() to make sure it can produce images in full resolution. Tested on Pinephone Pro with imx258 camera. Updated branch jmondi/pinephonepro-af on https://git.libcamera.org/libcamera/jmondi/libcamera.git v2->v3: - Add review tags - Improve 3/4 as suggested by Paul v1->v2: - Enumerate StreamFormats for all the available size and not limited to the current output size. This allows to enumerate higher resolutions even if the desired role has a smaller resolution. In example: gst-launch-1.0 libcamerasrc camera-name="/base/i2c\@ff110000/camera\@1a" ! 'video/x-raw,format=NV12,width=4208,height=3120' ! glimagesink which used to fail now works correctly - Enumerate all the RAW sizes the sensor can produce but only if the requested role is StreamRole::Raw Jacopo Mondi (4): libcamera: rkisp1: Generate config using main path libcamera: rkisp1: Assign sizes to roles libcamera: rkisp1: Reserve main path for StillCapture libcamera: rkisp1: Fix enumeration of RAW formats src/libcamera/pipeline/rkisp1/rkisp1.cpp | 30 ++++++++++++------- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 29 +++++++++++++++--- src/libcamera/pipeline/rkisp1/rkisp1_path.h | 1 + 3 files changed, 46 insertions(+), 14 deletions(-) --- 2.39.0