From patchwork Wed Feb 22 15:19:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 18294 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 96D6EBE080 for ; Wed, 22 Feb 2023 15:19:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 777A962658; Wed, 22 Feb 2023 16:19:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1677079170; bh=ueHlOpp6h8NsopwJABxiFroeiGbFN4Hxzl0wFNUnusg=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=rt16BFV1q4WTy3idBheAkvabFEkoIoPoqo3HIu9ti4GIla/kZlAbzqXUyvGUHmXWo Jd7GC9G+ZIOw+LwfTHwdMLX6ihGvBZsxOVq7kjJ/oa1ap+TzYpyS/Xg2+mzC5GdZB/ qXtwISbtxsmmP31dacOWpFOkJzMFC+HMmAF/TFlagaZn3GdobZiQAbYyMvToHbxTRh vICBmR+KhDyS9iExI/HD5chq9CaR+IOIZO09bfN0/HbinLgIhFEz2AUjjf0DCnP4+Q IB0y76oou7eBm34RKunFSLMX5dAa5WKKE4XYlzhLywESauQwhc1KFYDYKW2vetNHLn DOg9zUpBbu7Fw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D9D161EE3 for ; Wed, 22 Feb 2023 16:19:29 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="eVrmdNaj"; dkim-atps=neutral Received: from uno.homenet.telecomitalia.it (host-87-16-53-160.retail.telecomitalia.it [87.16.53.160]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5DA5B4B0; Wed, 22 Feb 2023 16:19:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1677079168; bh=ueHlOpp6h8NsopwJABxiFroeiGbFN4Hxzl0wFNUnusg=; h=From:To:Cc:Subject:Date:From; b=eVrmdNaj6ZIDN0PpJuhXOX7v6WIH3LSq036uU+Ds0hf3h9dlv01y1sQUra9SCg8UZ 1/sEoL0lo3H1NFxJOpDQwaE30kazOr8FihhIV9QtR8R7YwwkQOI/vzgWKeCGKVfxEG Utq49OKY35xX6jm+5c4CtTxBSfrm+XmcGXfZV5j8= To: libcamera-devel@lists.libcamera.org Date: Wed, 22 Feb 2023 16:19:13 +0100 Message-Id: <20230222151917.669526-1-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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 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 | 36 +++++++++++++------ src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 29 ++++++++++++--- src/libcamera/pipeline/rkisp1/rkisp1_path.h | 1 + 3 files changed, 52 insertions(+), 14 deletions(-) --- 2.39.0