Patch Detail
Show a patch.
GET /api/1.1/patches/2441/?format=api
{ "id": 2441, "url": "https://patchwork.libcamera.org/api/1.1/patches/2441/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2441/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20191218145001.22283-6-jacopo@jmondi.org>", "date": "2019-12-18T14:49:59", "name": "[libcamera-devel,RFC,5/7] libcamera: sensor: ov5670: Register pixel array properties", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "204e0db2614624eb37097d9dbf86353a34d2ca8f", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": { "id": 15, "url": "https://patchwork.libcamera.org/api/1.1/users/15/?format=api", "username": "jmondi", "first_name": "Jacopo", "last_name": "Mondi", "email": "jacopo@jmondi.org" }, "mbox": "https://patchwork.libcamera.org/patch/2441/mbox/", "series": [ { "id": 591, "url": "https://patchwork.libcamera.org/api/1.1/series/591/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=591", "date": "2019-12-18T14:49:54", "name": "Define and register 'sensor' and 'lens' properties", "version": 1, "mbox": "https://patchwork.libcamera.org/series/591/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2441/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2441/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D3C5605D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Dec 2019 15:47:56 +0100 (CET)", "from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 975E860008;\n\tWed, 18 Dec 2019 14:47:54 +0000 (UTC)" ], "X-Originating-IP": "93.34.114.233", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 18 Dec 2019 15:49:59 +0100", "Message-Id": "<20191218145001.22283-6-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.24.0", "In-Reply-To": "<20191218145001.22283-1-jacopo@jmondi.org>", "References": "<20191218145001.22283-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC 5/7] libcamera: sensor: ov5670: Register\n\tpixel 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>,\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": "Wed, 18 Dec 2019 14:47:56 -0000" }, "content": "Implement sensor specific pixel array properties initialization for the\nOV5670 sensor driver by overriding CameraSensor::initProperties()\nmethod.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/sensor/ov5670.cpp | 19 +++++++++++++++++++\n src/libcamera/sensor/ov5670.h | 3 +++\n 2 files changed, 22 insertions(+)", "diff": "diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp\nindex ca9f3c1d544f..c2d996785717 100644\n--- a/src/libcamera/sensor/ov5670.cpp\n+++ b/src/libcamera/sensor/ov5670.cpp\n@@ -6,6 +6,10 @@\n */\n \n #include \"ov5670.h\"\n+\n+#include <libcamera/controls.h>\n+#include <libcamera/property_ids.h>\n+\n #include \"camera_sensor.h\"\n \n namespace libcamera {\n@@ -15,4 +19,19 @@ OV5670CameraSensor::OV5670CameraSensor(const MediaEntity *entity)\n {\n }\n \n+int OV5670CameraSensor::initProperties(const ControlInfoMap &controlMap)\n+{\n+\t/* Pixel Array Properties. */\n+\tproperties_.set(properties::PixelArraySize, { 2.9f, 1.18f });\n+\tproperties_.set(properties::PixelArrayBounds, { 2592, 1944 });\n+\tproperties_.set(properties::PixelArrays, { 2592, 1944 });\n+\tproperties_.set(properties::ActiveAreaSize, { 16, 6, 2560, 1920 });\n+\tint32_t bayerFilter = properties::BayerFilterGRBG;\n+\tproperties_.set(properties::BayerFilterArrangement, bayerFilter);\n+\tproperties_.set(properties::ISOSensitivityRange, { 50, 800 });\n+\n+\treturn CameraSensor::initProperties(controlMap);\n+}\n+\n }; /* namespace libcamera */\n+\ndiff --git a/src/libcamera/sensor/ov5670.h b/src/libcamera/sensor/ov5670.h\nindex f84239c8411d..564a4546d69b 100644\n--- a/src/libcamera/sensor/ov5670.h\n+++ b/src/libcamera/sensor/ov5670.h\n@@ -11,8 +11,11 @@\n \n namespace libcamera {\n \n+class ControlInfoMap;\n class OV5670CameraSensor final : public CameraSensor\n {\n+\tint initProperties(const ControlInfoMap &controlMap);\n+\n private:\n \tOV5670CameraSensor(const MediaEntity *entity);\n \tfriend CameraSensorFactory;\n", "prefixes": [ "libcamera-devel", "RFC", "5/7" ] }