From patchwork Fri Sep 15 13:06:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19020 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 61C91BD160 for ; Fri, 15 Sep 2023 13:07:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 691B16291C; Fri, 15 Sep 2023 15:07:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1694783229; bh=meeieWl6UvM16hQkFsZv8kayWO9VinmZorsdw5/qHUE=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=VyKZq/fQHr6uBpDyT1BZB27fm6Dmyxzg8zArScU8Pat8CTacUcY+I1BMM5e1+l6uS x1Y++CpWv43aZICUBIdKGNijPGXxgXrmk5VAqo4cfWWaLJgte4eZEMklsp/n3TiZy9 bgtqcXKsDjd1pZgcS2sybaElORiGv6qSFw7nqOc2KnKThtG6+TE5RLY/QyMNPZZW2O vRk4rj41U0z6+/gaySrVOEL7+UfZ/Wq4hyVYfSAAC++hEYWMB6APe5MBLGssgf/Vy8 0moB2TgQz07CA/Q3fckBw7FVAVu+RkzEgc+60hRDNrPUYOilx4QHmKsrxoUECIUi82 jEHUKRBPYeK+g== 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 E1C64628EC for ; Fri, 15 Sep 2023 15:07:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="dO3uHjEB"; dkim-atps=neutral Received: from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5799A9A8; Fri, 15 Sep 2023 15:05:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1694783134; bh=meeieWl6UvM16hQkFsZv8kayWO9VinmZorsdw5/qHUE=; h=From:To:Cc:Subject:Date:From; b=dO3uHjEByJcHArAtaylF7A3jbiyOaiZVnXVyostKTnAXQwnYN5bHKaURNYXjWWapY y2MXaBMJikzJn09KOWTdEevZBdJnKqYc8i8aGeMJWYfYlNxyKr2oDFZqguWaeN5yaq UaJNJTmBsijSLnFbpiDFqvbIfjnq3Dykpi+Tsihc= To: libcamera-devel@lists.libcamera.org Date: Fri, 15 Sep 2023 15:06:38 +0200 Message-ID: <20230915130650.35691-1-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 00/12] libcamera: Introduce SensorConfiguration 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 Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, the series introduces a slightly more formally defined camera sensor model used to model a SensorConfiguration class, an instance of which is added to the CameraConfiguration class. The newly introduced class allows to control the sensor configuration without abusing the RAW stream configuration, reason being some platforms do not allow to capture RAW frames as they get produced by the sensor. Introduce a model for the SensorConfiguration class and implement its handling on the RaspberryPi pipeline handler as a proof of concept. Tested with an imx219, configured to capture frames with different sensor configurations, without using any RAW stream. On top of the previously sent patches a series from Naush that simplifies the RaspberryPi validatation and configuration code. v2->v3: - Address Kieran's comments on documentation - Add Naush's patches on top v1->v2: - Fix spelling in 2/4 as suggested by Naush - Add Naush's tags Jacopo Mondi (5): documentation: Introduce Camera Sensor Model libcamera: camera: Introduce SensorConfiguration libcamera: camera_sensor: Support SensorConfiguration libcamera: rpi: Handle SensorConfiguration libcamera: rpi: Fix wrong comment indentation Naushir Patuck (7): libcamera: rpi: Allow platformValidate() to adjust format strides libcamera: rpi: Make isRaw/isYuv/isRgb static functions libcamera: rpi: Cache rawStreams and outStreams libcamera: rpi: Add some helpers to PipelineHandlerBase libcamera: rpi: Simplify validate() and configure() for RAW streams libcamera: rpi: Change default stream formats libcamera: rpi: Simplify validate() and configure() for YUV/RGB streams Documentation/binning.png | Bin 0 -> 66004 bytes Documentation/camera-sensor-model.png | Bin 0 -> 74270 bytes Documentation/camera-sensor-model.rst | 198 ++++++++++++ Documentation/index.rst | 1 + Documentation/meson.build | 1 + Documentation/skipping.png | Bin 0 -> 67218 bytes include/libcamera/camera.h | 43 +++ include/libcamera/internal/camera_sensor.h | 5 + src/libcamera/camera.cpp | 185 ++++++++++++ src/libcamera/camera_sensor.cpp | 86 ++++++ .../pipeline/rpi/common/pipeline_base.cpp | 281 ++++++++++-------- .../pipeline/rpi/common/pipeline_base.h | 55 ++-- src/libcamera/pipeline/rpi/vc4/vc4.cpp | 86 +++--- 13 files changed, 758 insertions(+), 183 deletions(-) create mode 100644 Documentation/binning.png create mode 100644 Documentation/camera-sensor-model.png create mode 100644 Documentation/camera-sensor-model.rst create mode 100644 Documentation/skipping.png --- 2.42.0