From patchwork Thu Sep 21 16:55:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19065 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 5CEE8BE080 for ; Thu, 21 Sep 2023 16:56:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8548962948; Thu, 21 Sep 2023 18:56:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1695315363; bh=iYayj+kA3sVFnTa0nUEbQLYQ28qwbkFkmOKC2WF5w8M=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=VcCCDDq8R88HTwRb5FbAsHWUCQcd/hje4TB85kmy55B3vsStWYDLMRkMBS5V0cN5J jETOuC2T9QGl/SYGBYrGKJplnwj73txLku6iXKWIID+qwPdcmnDEs3l6n+wBksfHFH 5XpCX6WQgJX1W4XwUiKvF9P3R0D5RPABNw7v16rki6z8mY3IGwBVQeCjoiop8gdmA7 jJmVjBlTtGqeSmnGZylC57Rs8aNhQj4NkjD6MrH2ZeMsPsYY6+5mUS9X+jTbsOy9ih cpFJx+4X31kGE9Ft0M/PqynD0e6ooMIbRxIceTOA9QuddSy9Va9C8IWjdM3KGVYSkh Z3j/UqBa1qdPA== 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 8EF2F628D8 for ; Thu, 21 Sep 2023 18:56:01 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="C3SXK5hq"; dkim-atps=neutral Received: from uno.lan (93-46-82-201.ip106.fastwebnet.it [93.46.82.201]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EA1241102; Thu, 21 Sep 2023 18:54:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1695315264; bh=iYayj+kA3sVFnTa0nUEbQLYQ28qwbkFkmOKC2WF5w8M=; h=From:To:Cc:Subject:Date:From; b=C3SXK5hqwOn/KsCxph1OhF+kNhC9wIZP0Nt/shjLQNXgFJDtIcNJHEaWd2qgXTUWy Ed0I5DSUZ5QAjM4pnp+ecYQ3L8YYXOSIM+ixmhmr6TzRi3KfoD/3aM1GhF7nEwEwiy 6bGudLIIgOjI9LJg8sGuThGgwGLFxfK/xyvK+2QY= To: libcamera-devel@lists.libcamera.org Date: Thu, 21 Sep 2023 18:55:37 +0200 Message-ID: <20230921165550.50956-1-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 00/13] 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. v4->v5: - Address Laurent's comment on documentation - Use std::optional<> for CameraConfiguration::sensorConfig - Add a patch for the cam test application to allow setting a sensor configuration 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 (6): documentation: Introduce Camera Sensor Model libcamera: camera: Introduce SensorConfiguration libcamera: camera_sensor: Support SensorConfiguration libcamera: rpi: Handle SensorConfiguration libcamera: rpi: Fix wrong comment indentation apps: cam: Add option to configure sensor 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 .reuse/dep5 | 6 + Documentation/binning.svg | 5053 +++++++++++++++++ Documentation/camera-sensor-model.rst | 174 + Documentation/index.rst | 1 + Documentation/meson.build | 1 + Documentation/sensor_model.svg | 4870 ++++++++++++++++ Documentation/skipping.svg | 1720 ++++++ include/libcamera/camera.h | 27 + include/libcamera/internal/camera_sensor.h | 5 + src/apps/cam/camera_session.cpp | 7 + src/apps/cam/main.cpp | 4 + src/apps/cam/main.h | 1 + src/apps/common/stream_options.cpp | 42 + src/apps/common/stream_options.h | 8 + src/libcamera/camera.cpp | 144 + src/libcamera/camera_sensor.cpp | 86 + .../pipeline/rpi/common/pipeline_base.cpp | 285 +- .../pipeline/rpi/common/pipeline_base.h | 55 +- src/libcamera/pipeline/rpi/vc4/vc4.cpp | 86 +- 19 files changed, 12392 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