{"id":10387,"url":"https://patchwork.libcamera.org/api/1.1/covers/10387/?format=json","web_url":"https://patchwork.libcamera.org/cover/10387/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20201106154947.261132-1-jacopo@jmondi.org>","date":"2020-11-06T15:49:43","name":"[libcamera-devel,0/4] libcamera: Collect pixel array properties","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/cover/10387/mbox/","series":[{"id":1449,"url":"https://patchwork.libcamera.org/api/1.1/series/1449/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1449","date":"2020-11-06T15:49:43","name":"libcamera: Collect pixel array properties","version":1,"mbox":"https://patchwork.libcamera.org/series/1449/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/10387/comments/","headers":{"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\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 46D30BDB89\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Nov 2020 15:49:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5FF6962D30;\n\tFri,  6 Nov 2020 16:49:54 +0100 (CET)","from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AAF65622AA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Nov 2020 16:49:52 +0100 (CET)","from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 5AEB84000A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Nov 2020 15:49:52 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri,  6 Nov 2020 16:49:43 +0100","Message-Id":"<20201106154947.261132-1-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.29.1","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 0/4] libcamera: Collect pixel array\n\tproperties","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>,\n\t<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>,\n\t<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>"},"content":"This has been floating around for quite some time never really got\nto the bottom of it as it required to make V4L2, libcamera and android\nproperties get along with each other.\n\nTo summarize my understanding:\n\nV4L2:\n- NATIVE: size of the pixel array matrix (readable and not readable)\n- BOUNDS: readable pixels (valid and non valid); defined in respect to NATIVE\n- CROP_DEFAULT: active pixels; defined in respect to NATIVE\n\nLibcamera:\n- PixelArraySize: Size of the readable area\n- PixelArrayActiveAreas: Active areas, defined in respect to PixelArray\n\nPixelArraySize = { BOUNDS.width, BOUNDS.heigh }\nPixelArrayActiveAreas = {\n\tCROP_DEFAULT.x - BOUNDS.x,\n\tCROP_DEFAULT.y - BOUNDS.y,\n\tCROP_DEFAULT.width,\n\tCROP_DEFAULT.height\n}\n\nWhen it comes to map to Android :\n\nandroid.sensor.info.pixelArraySize = \"Dimensions of the full pixel array,\npossibly including black calibration pixels\"\n\nandroid.sensor.info.activeArraySize = \"The area of the image sensor which\ncorresponds to active pixels after any geometric distortion correction has been\napplied.\" -> defined in respect to pixelArarySize\n\npixelArraySize = libcamera::properties::PixelArraySize\nactiveAreasSize = libcamera::properties::PixelArrayActiveAreas\n\nThe first patch on the series adjusts the CameraSensorInfo analog rectangle\nto match the V4L2 target definitions, and requires the mainline imx219 driver\nto be fixed accordingly, and the in-work ov5647 to complete upstreaming.\n\nAs CameraSensorInfo is used by the RaspberryPi IPA, downstream kernel drivers\nshould be fixed as well.\n\nCurrently the sensor drivers for the Soraka device do not support G_SELECTION so\nno properties are registered in Android for CrOS on Soraka.\n\nAll in all, take this series with a grain of salt, as it will break a few things\nif merged :)\n\nThanks\n  j\n\n\nJacopo Mondi (4):\n  libcamera: camera_sensor: Adjust CameraSensorInfo::analogCrop\n  libcamera: camera_sensor: Break out properties initialization\n  libcamera: camera_sensor: Initialize PixelArray properties\n  android: camera_device: Initialize pixel array properties\n\n include/libcamera/internal/camera_sensor.h |   1 +\n src/android/camera_device.cpp              |  38 +++++---\n src/libcamera/camera_sensor.cpp            | 102 ++++++++++++++-------\n 3 files changed, 99 insertions(+), 42 deletions(-)\n\n--\n2.29.1"}