| Message ID | 20201202135354.264212-1-jacopo@jmondi.org |
|---|---|
| Headers | show
Return-Path: <libcamera-devel-bounces@lists.libcamera.org> 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 8AB45BE176 for <parsemail@patchwork.libcamera.org>; Wed, 2 Dec 2020 13:53:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9E2D1635A8; Wed, 2 Dec 2020 14:53:58 +0100 (CET) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C152634A2 for <libcamera-devel@lists.libcamera.org>; Wed, 2 Dec 2020 14:53:57 +0100 (CET) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id D05D320013 for <libcamera-devel@lists.libcamera.org>; Wed, 2 Dec 2020 13:53:56 +0000 (UTC) From: Jacopo Mondi <jacopo@jmondi.org> To: libcamera-devel@lists.libcamera.org Date: Wed, 2 Dec 2020 14:53:50 +0100 Message-Id: <20201202135354.264212-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.29.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/4] libcamera: Collect pixel array properties X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <libcamera-devel.lists.libcamera.org> List-Unsubscribe: <https://lists.libcamera.org/options/libcamera-devel>, <mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe> List-Archive: <https://lists.libcamera.org/pipermail/libcamera-devel/> List-Post: <mailto:libcamera-devel@lists.libcamera.org> List-Help: <mailto:libcamera-devel-request@lists.libcamera.org?subject=help> List-Subscribe: <https://lists.libcamera.org/listinfo/libcamera-devel>, <mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" <libcamera-devel-bounces@lists.libcamera.org> |
| Series |
|
| Related |
show
|
This has been floating around for quite some time never really got to the bottom of it as it required to make V4L2, libcamera and android properties get along with each other. To summarize my understanding: V4L2: - NATIVE: size of the pixel array matrix (readable and not readable) - BOUNDS: readable pixels (valid and non valid); defined in respect to NATIVE - CROP_DEFAULT: active pixels; defined in respect to NATIVE Libcamera: - PixelArraySize: Size of the readable area - PixelArrayActiveAreas: Active areas, defined in respect to PixelArray PixelArraySize = { BOUNDS.width, BOUNDS.heigh } PixelArrayActiveAreas = { CROP_DEFAULT.x - BOUNDS.x, CROP_DEFAULT.y - BOUNDS.y, CROP_DEFAULT.width, CROP_DEFAULT.height } When it comes to map to Android : android.sensor.info.pixelArraySize = "Dimensions of the full pixel array, possibly including black calibration pixels" android.sensor.info.activeArraySize = "The area of the image sensor which corresponds to active pixels after any geometric distortion correction has been applied." -> defined in respect to pixelArarySize pixelArraySize = libcamera::properties::PixelArraySize activeAreasSize = libcamera::properties::PixelArrayActiveAreas The first patch on the series adjusts the CameraSensorInfo analog rectangle to match the V4L2 target definitions, and requires the imx219 driver to be fixed accordingly: RPi downstream: https://github.com/raspberrypi/linux/pull/3983 Linux mainline (should land in v5.11) https://patchwork.linuxtv.org/project/linux-media/patch/20200805105721.15445-5-jacopo@jmondi.org/ Currently the sensor drivers for the Soraka device do not support G_SELECTION so no properties are registered in Android for CrOS on Soraka. Thanks j Jacopo Mondi (4): libcamera: camera_sensor: Adjust CameraSensorInfo::analogCrop libcamera: camera_sensor: Break out properties initialization libcamera: camera_sensor: Initialize PixelArray properties android: camera_device: Initialize pixel array properties include/libcamera/internal/camera_sensor.h | 1 + src/android/camera_device.cpp | 33 +++++-- src/libcamera/camera_sensor.cpp | 104 ++++++++++++++------- 3 files changed, 95 insertions(+), 43 deletions(-)