{"id":3353,"url":"https://patchwork.libcamera.org/api/1.1/patches/3353/?format=json","web_url":"https://patchwork.libcamera.org/patch/3353/","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":"<20200326233751.341320-2-jacopo@jmondi.org>","date":"2020-03-26T23:37:50","name":"[libcamera-devel,1/2] libcamera: camera_sensor: Define CameraSensorInfo","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"89c43e9c65238d5820ec44473196a47661923588","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/3353/mbox/","series":[{"id":786,"url":"https://patchwork.libcamera.org/api/1.1/series/786/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=786","date":"2020-03-26T23:37:49","name":"WIP: Define CameraSensorInfo","version":1,"mbox":"https://patchwork.libcamera.org/series/786/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3353/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3353/checks/","tags":{},"headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5C3CC605D2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 00:34:58 +0100 (CET)","from localhost.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id 1BB0B240002\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Mar 2020 23:34:57 +0000 (UTC)"],"From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 27 Mar 2020 00:37:50 +0100","Message-Id":"<20200326233751.341320-2-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20200326233751.341320-1-jacopo@jmondi.org>","References":"<20200326233751.341320-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 1/2] libcamera: camera_sensor: Define\n\tCameraSensorInfo","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>","X-List-Received-Date":"Thu, 26 Mar 2020 23:34:58 -0000"},"content":"Define the CameraSensorInfo structure that reports the current image sensor\nconfiguration.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/camera_sensor.cpp       | 84 +++++++++++++++++++++++++++\n src/libcamera/include/camera_sensor.h | 19 ++++++\n 2 files changed, 103 insertions(+)","diff":"diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 09771fc40bbb..250ea99bfcf7 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -30,6 +30,90 @@ namespace libcamera {\n \n LOG_DEFINE_CATEGORY(CameraSensor);\n \n+/**\n+ * \\struct CameraSensorInfo\n+ * \\brief Report the image sensor characteristics\n+ *\n+ * The structure reports image sensor characteristics used by IPA modules tune\n+ * their algorithms based on the image sensor model currently in use and its\n+ * configuration.\n+ *\n+ * The here reported information describe the sensor's intrinsics\n+ * characteristics, such as its pixel array size and the sensor model name,\n+ * as well as information relative to the currently configured mode, such as\n+ * the produced image size and the bit depth of the requested image format.\n+ *\n+ * Instances of this structure are meant to be assembled by the CameraSensor\n+ * class and its specialized subclasses by inspecting the sensor static\n+ * properties as well as the currently configured sensor mode.\n+ */\n+\n+/**\n+ * \\var CameraSensorInfo::name\n+ * \\brief The image sensor name\n+ */\n+\n+/**\n+ * \\var CameraSensorInfo::bitsPerPixel\n+ * \\brief The bits per-pixel of the image format produced by the image sensor\n+ */\n+\n+/**\n+ * \\var CameraSensorInfo::activeAreaSize\n+ * \\brief The size of the active pixel array area of the sensor\n+ *\n+ * \\todo Reference the corresponding property\n+ */\n+\n+/**\n+ * \\var CameraSensorInfo::outputImage\n+ * \\brief The output image cropping rectangle, with its top-left corner\n+ * defined as the horizontal and vertical displacements from the top-left corner\n+ * of the active pixel array, and its size defined as the output image size\n+ */\n+\n+/**\n+ * \\var CameraSensorInfo::horizontalBinning\n+ * \\brief The binning factor, in the horizontal direction, of the image sensor\n+ * configuration\n+ */\n+\n+/**\n+ * \\var CameraSensorInfo::verticalBinning\n+ * \\brief The binning factor, in the vertical direction, of the image sensor\n+ * configuration\n+ */\n+\n+/**\n+ * \\var CameraSensorInfo::horizontalScaling\n+ * \\brief The horizontal scaling factor, calculated as the ratio between\n+ * the active pixel array horizontal size and the horizontal size of the\n+ * output image\n+ *\n+ * \\todo Remove this field and compute the scaling factor in the IPA\n+ */\n+\n+/**\n+ * \\var CameraSensorInfo::verticalScaling:\n+ * \\brief The vertical scaling factor, calculated as the ratio between\n+ * the active pixel array vertical size and the vertical size of the\n+ * output image\n+ *\n+ * \\todo Remove this field and compute the scaling factor in the IPA\n+ */\n+\n+/**\n+ * \\var CameraSensorInfo::noiseFactor\n+ * \\brief Scaling of the noise compared to the native sensor mode\n+ *\n+ * \\todo Improve this description\n+ */\n+\n+/**\n+ * \\var CameraSensorInfo::lineDuration\n+ * \\brief Line scan-out duration in nanoseconds\n+ */\n+\n /**\n  * \\class CameraSensor\n  * \\brief A camera sensor based on V4L2 subdevices\ndiff --git a/src/libcamera/include/camera_sensor.h b/src/libcamera/include/camera_sensor.h\nindex 6e4d2b0118bc..77b258ce63f0 100644\n--- a/src/libcamera/include/camera_sensor.h\n+++ b/src/libcamera/include/camera_sensor.h\n@@ -24,6 +24,25 @@ class V4L2Subdevice;\n \n struct V4L2SubdeviceFormat;\n \n+struct CameraSensorInfo {\n+\tstd::string name;\n+\n+\tuint32_t bitsPerPixel;\n+\n+\tSize activeAreaSize;\n+\tRectangle outputImage;\n+\n+\tuint8_t horizontalBinning;\n+\tuint8_t verticalBinning;\n+\n+\tdouble horizontalScaling;\n+\tdouble verticalScaling;\n+\n+\tdouble noiseFactor;\n+\n+\tdouble lineDuration;\n+};\n+\n class CameraSensor : protected Loggable\n {\n public:\n","prefixes":["libcamera-devel","1/2"]}