From patchwork Sat Sep 16 12:19:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19039 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 7F62ABD160 for ; Sat, 16 Sep 2023 12:19:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B0E82628E9; Sat, 16 Sep 2023 14:19:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1694866778; bh=V4zGHXpLJM5ymq4cAOY8npzE39Ch72mIZdfrAgQYy54=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=YW8mtVixdpXFPiU6MQ3jgw+cojUjQ2CnRMdxqsg07msrR9RJXw3OP6W4q514rtUI8 oaXZRha3B4GIF9AhCqs9USmqcvLIjyEF9MpHlrkUd2WZVjtJ/Dt4zkdSfygVliuSat 4Ed8JRcByZdJ3Y5RtznyHM1iPgrRnljPvQlrAbx5sPNvbXt8G+77A5K2ajGQUz4m6X cMMysdxnxrip7m1SeVHE0Nel4rbj6a0uSSfRNz2aAc7aWTfmNAVHgIbXPjI7uRwb1T +JwDB5J8poErjxWKtNuNapLGyzMwqFiTWTWMTKmimDqE+GGbQYVFmYASujYN16kuB6 nC3WJqywp1TKQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E10F0628E9 for ; Sat, 16 Sep 2023 14:19:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RN53SNeS"; 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 7C4B210FE; Sat, 16 Sep 2023 14:18:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1694866682; bh=V4zGHXpLJM5ymq4cAOY8npzE39Ch72mIZdfrAgQYy54=; h=From:To:Cc:Subject:Date:From; b=RN53SNeSmSEow/VxX6sjCk4ffkPrzCVB8/0jfeB0/dzUjG4eFZVenxVvOgHYy0/ZU PamsYSZGgTukhiW3W06fP6HWb25YHisMvwA43fVTQFdVFhN6pRxjQJLbUvqkvsV2qa 0JyrErnk3QMjplyeL5AE8Mo8hGANAWPqEvqAMm2Q= To: libcamera-devel@lists.libcamera.org Date: Sat, 16 Sep 2023 14:19:18 +0200 Message-ID: <20230916121930.29490-1-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 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. v3->v4: - Address Laurent's comment on documentation: - Replace images from CCS specs with custom ones - use .svg instead than .png - Describe the model before the parameters - Move part of the documentation to doxygen - Add SensorConfig::populated() to replace operator bool() 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.svg | 5053 +++++++++++++++++ Documentation/camera-sensor-model.rst | 170 + Documentation/index.rst | 1 + Documentation/meson.build | 1 + Documentation/sensor_model.svg | 4866 ++++++++++++++++ Documentation/skipping.svg | 1720 ++++++ include/libcamera/camera.h | 43 + include/libcamera/internal/camera_sensor.h | 5 + src/libcamera/camera.cpp | 183 + src/libcamera/camera_sensor.cpp | 91 + .../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, 12372 insertions(+), 183 deletions(-) create mode 100644 Documentation/binning.svg create mode 100644 Documentation/camera-sensor-model.rst create mode 100644 Documentation/sensor_model.svg create mode 100644 Documentation/skipping.svg --- 2.42.0