Patch Detail
Show a patch.
GET /api/1.1/patches/17496/?format=api
{ "id": 17496, "url": "https://patchwork.libcamera.org/api/1.1/patches/17496/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17496/", "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": "<20221003083934.31629-10-naush@raspberrypi.com>", "date": "2022-10-03T08:39:35", "name": "[libcamera-devel,v1,9/9] ipa: raspberrypi: Extract line length from the embedded data parser", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "aeedbe47fe94b6416bfed5c9c1a3f9bc0904f73b", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17496/mbox/", "series": [ { "id": 3523, "url": "https://patchwork.libcamera.org/api/1.1/series/3523/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3523", "date": "2022-10-03T08:39:26", "name": "Raspberry Pi: Horizontal blanking control", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3523/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17496/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17496/checks/", "tags": {}, "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 7BBD7C3288\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 3 Oct 2022 08:40:10 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0AEF462CFA;\n\tMon, 3 Oct 2022 10:40:10 +0200 (CEST)", "from mail-wm1-x332.google.com (mail-wm1-x332.google.com\n\t[IPv6:2a00:1450:4864:20::332])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5B36362CEA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 3 Oct 2022 10:40:04 +0200 (CEST)", "by mail-wm1-x332.google.com with SMTP id\n\tr3-20020a05600c35c300b003b4b5f6c6bdso5415976wmq.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 03 Oct 2022 01:40:04 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ti13-20020a5d55cd000000b0022ae59d472esm8922787wrw.112.2022.10.03.01.40.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 03 Oct 2022 01:40:03 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664786410;\n\tbh=AaC6lAuRrIb0QPhH2liWi7eEXXWDnFn2WPH3DcoZBRk=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=xt1TX/h9YNHL83sKzxUBsfw/CB7YpWTB6eF/ykSZt0U0TnIiuElq3ndKEfmtFeDMY\n\tBuJUJU7MViViiKGKOfEkawtBrYLiT/jSchUo+3y0sKecFD12uWGp46WKjlCySDPOqe\n\tAYU1lWHz2M0S715NJ6Bm/gp7uHZRE3KcFh8zyyRQPdB35o/9DXcB5/wJJ2PBR73HKW\n\tZ67mKDWt6UkQ5/b/4JobTCRTCGjh7ez/3R2D+WaV5QZZuW8Sv03CLFtab6wUIDILKP\n\tGfrqzYvyRsydQ8PmQoUreq3TO+x/+ZZekfmQJYiT4d9QwRioIE7wm13aTK9VCkjIUj\n\tBIbYEC/ZKND6Q==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date;\n\tbh=ymnK8vfNa3P0z8WJVisbeR9rTR8rDaZY2QIaaCwwkRY=;\n\tb=aemwqF3ug8hns24q4V7K5ziC6rX/4XT1ct/Ypymgw+OlM5hTzGEIoIL6tpI+i7q3CB\n\tFJpv07ss+vCZyJUNDRRECScR5NHnqp4H6WKn00H6MtVEGlnVXnRUd00E770oWs9OySHd\n\tzIy9Abf21TyRlifp2WWtBzRVFU530fc+tUhfq7TveiH1W7swovmq1GIZP4yeGgUPjdbC\n\trJham2vMZmLtLUhvhzQ2xxhKeXZ5RphN45Uo2FBjyada7BtbQc5vOU6VV+9T3eNxnShF\n\tv4doupGq+nrOzvtu8qQ+GjgcMbPEoklaq+Y9Ke5QjcQC05dL/CDAujgx8NOXELI+N2+G\n\toABg==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"aemwqF3u\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date;\n\tbh=ymnK8vfNa3P0z8WJVisbeR9rTR8rDaZY2QIaaCwwkRY=;\n\tb=JBbjvL+kI/yj560HQQvh+jUpmA33GtAyB61ncUUOtl4aBjXlR900CUEzUv7Nnzarla\n\tufKXRJjD1YYK5XiGQC/HLNDNauIhUlOpwBZ7hv+Ze/LcLHedVEWpwcY75NAvGFugyT6b\n\tVaof6clB1TNVGaG6jUedLPyjTNJ+ZNT1tO8UV55Hu1jRZjiZGg6yd0rzmJOmHmDu9TlC\n\tU/3tFTNpao9+LUYls8SUvFPrg5EZWtIUlDGpJmjX7LTZ4HbaK2TgtznLU/ZAwgLFj76Z\n\tI0qjg3aOk4pfrKlwdArU9aAdOxPmelD5RLBxyLF3/J0hsUic6YaHmKduhgT7j+sDZ2IX\n\tAdKQ==", "X-Gm-Message-State": "ACrzQf3ChqIEBO8UGNQMZINra9uz49IwFFcCCHG+ByQLyo+8fSPe5jmH\n\toZF1iZsTyLwn7067+jCVGGTxT6Aimpb2Bg==", "X-Google-Smtp-Source": "AMsMyM5i7NLKbjZ3p4bVR7uhJ7ND9ON7zqlps2L9QFumN9CPUw8MbxaTsz6lE4cl9oEZqEWEex7l2Q==", "X-Received": "by 2002:a05:600c:4f46:b0:3b4:fed8:331e with SMTP id\n\tm6-20020a05600c4f4600b003b4fed8331emr6227992wmq.198.1664786403660; \n\tMon, 03 Oct 2022 01:40:03 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 3 Oct 2022 09:39:35 +0100", "Message-Id": "<20221003083934.31629-10-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20221003083934.31629-1-naush@raspberrypi.com>", "References": "<20221003083934.31629-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v1 9/9] ipa: raspberrypi: Extract line\n\tlength from the embedded data parser", "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>", "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Update the imx219, imx477 and imx519 parsers to extract the line length values\nfrom the embedded data stream and use these values in the deviceStatus metadata,\nreplacing the DelayedControls provided values.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/cam_helper.cpp | 3 ++-\n src/ipa/raspberrypi/cam_helper_imx219.cpp | 9 +++++++--\n src/ipa/raspberrypi/cam_helper_imx477.cpp | 9 +++++++--\n src/ipa/raspberrypi/cam_helper_imx519.cpp | 9 +++++++--\n 4 files changed, 23 insertions(+), 7 deletions(-)", "diff": "diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp\nindex f5f034ece711..1811d231ad40 100644\n--- a/src/ipa/raspberrypi/cam_helper.cpp\n+++ b/src/ipa/raspberrypi/cam_helper.cpp\n@@ -228,7 +228,7 @@ void CamHelper::parseEmbeddedData(Span<const uint8_t> buffer,\n \tmetadata.merge(parsedMetadata);\n \n \t/*\n-\t * Overwrite the exposure/gain, frame length and sensor temperature values\n+\t * Overwrite the exposure/gain, line/frame length and sensor temperature values\n \t * in the existing DeviceStatus with values from the parsed embedded buffer.\n \t * Fetch it first in case any other fields were set meaningfully.\n \t */\n@@ -242,6 +242,7 @@ void CamHelper::parseEmbeddedData(Span<const uint8_t> buffer,\n \tdeviceStatus.shutterSpeed = parsedDeviceStatus.shutterSpeed;\n \tdeviceStatus.analogueGain = parsedDeviceStatus.analogueGain;\n \tdeviceStatus.frameLength = parsedDeviceStatus.frameLength;\n+\tdeviceStatus.lineLength = parsedDeviceStatus.lineLength;\n \tif (parsedDeviceStatus.sensorTemperature)\n \t\tdeviceStatus.sensorTemperature = parsedDeviceStatus.sensorTemperature;\n \ndiff --git a/src/ipa/raspberrypi/cam_helper_imx219.cpp b/src/ipa/raspberrypi/cam_helper_imx219.cpp\nindex 98a3b31956ec..c3337ed08466 100644\n--- a/src/ipa/raspberrypi/cam_helper_imx219.cpp\n+++ b/src/ipa/raspberrypi/cam_helper_imx219.cpp\n@@ -32,8 +32,11 @@ constexpr uint32_t expHiReg = 0x15a;\n constexpr uint32_t expLoReg = 0x15b;\n constexpr uint32_t frameLengthHiReg = 0x160;\n constexpr uint32_t frameLengthLoReg = 0x161;\n+constexpr uint32_t lineLengthHiReg = 0x162;\n+constexpr uint32_t lineLengthLoReg = 0x163;\n constexpr std::initializer_list<uint32_t> registerList [[maybe_unused]]\n-\t= { expHiReg, expLoReg, gainReg, frameLengthHiReg, frameLengthLoReg };\n+\t= { expHiReg, expLoReg, gainReg, frameLengthHiReg, frameLengthLoReg,\n+\t lineLengthHiReg, lineLengthLoReg };\n \n class CamHelperImx219 : public CamHelper\n {\n@@ -94,8 +97,10 @@ void CamHelperImx219::populateMetadata(const MdParser::RegisterMap ®isters,\n {\n \tDeviceStatus deviceStatus;\n \n+\tdeviceStatus.lineLength = lineLengthPckToDuration(registers.at(lineLengthHiReg) * 256 +\n+\t\t\t\t\t\t\t registers.at(lineLengthLoReg));\n \tdeviceStatus.shutterSpeed = exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg),\n-\t\t\t\t\t mode_.minLineLength);\n+\t\t\t\t\t deviceStatus.lineLength);\n \tdeviceStatus.analogueGain = gain(registers.at(gainReg));\n \tdeviceStatus.frameLength = registers.at(frameLengthHiReg) * 256 + registers.at(frameLengthLoReg);\n \ndiff --git a/src/ipa/raspberrypi/cam_helper_imx477.cpp b/src/ipa/raspberrypi/cam_helper_imx477.cpp\nindex 19a5e471c27e..bc769ca75baa 100644\n--- a/src/ipa/raspberrypi/cam_helper_imx477.cpp\n+++ b/src/ipa/raspberrypi/cam_helper_imx477.cpp\n@@ -35,9 +35,12 @@ constexpr uint32_t gainHiReg = 0x0204;\n constexpr uint32_t gainLoReg = 0x0205;\n constexpr uint32_t frameLengthHiReg = 0x0340;\n constexpr uint32_t frameLengthLoReg = 0x0341;\n+constexpr uint32_t lineLengthHiReg = 0x0342;\n+constexpr uint32_t lineLengthLoReg = 0x0343;\n constexpr uint32_t temperatureReg = 0x013a;\n constexpr std::initializer_list<uint32_t> registerList =\n-\t{ expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg, temperatureReg };\n+\t{ expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg,\n+\t lineLengthHiReg, lineLengthLoReg, temperatureReg };\n \n class CamHelperImx477 : public CamHelper\n {\n@@ -175,8 +178,10 @@ void CamHelperImx477::populateMetadata(const MdParser::RegisterMap ®isters,\n {\n \tDeviceStatus deviceStatus;\n \n+\tdeviceStatus.lineLength = lineLengthPckToDuration(registers.at(lineLengthHiReg) * 256 +\n+\t\t\t\t\t\t\t registers.at(lineLengthLoReg));\n \tdeviceStatus.shutterSpeed = exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg),\n-\t\t\t\t\t mode_.minLineLength);\n+\t\t\t\t\t deviceStatus.lineLength);\n \tdeviceStatus.analogueGain = gain(registers.at(gainHiReg) * 256 + registers.at(gainLoReg));\n \tdeviceStatus.frameLength = registers.at(frameLengthHiReg) * 256 + registers.at(frameLengthLoReg);\n \tdeviceStatus.sensorTemperature = std::clamp<int8_t>(registers.at(temperatureReg), -20, 80);\ndiff --git a/src/ipa/raspberrypi/cam_helper_imx519.cpp b/src/ipa/raspberrypi/cam_helper_imx519.cpp\nindex d2eb171912da..c7262aa0b6e6 100644\n--- a/src/ipa/raspberrypi/cam_helper_imx519.cpp\n+++ b/src/ipa/raspberrypi/cam_helper_imx519.cpp\n@@ -36,8 +36,11 @@ constexpr uint32_t gainHiReg = 0x0204;\n constexpr uint32_t gainLoReg = 0x0205;\n constexpr uint32_t frameLengthHiReg = 0x0340;\n constexpr uint32_t frameLengthLoReg = 0x0341;\n+constexpr uint32_t lineLengthHiReg = 0x0342;\n+constexpr uint32_t lineLengthLoReg = 0x0343;\n constexpr std::initializer_list<uint32_t> registerList =\n-\t{ expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg };\n+\t{ expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg,\n+\t lineLengthHiReg, lineLengthLoReg };\n \n class CamHelperImx519 : public CamHelper\n {\n@@ -175,8 +178,10 @@ void CamHelperImx519::populateMetadata(const MdParser::RegisterMap ®isters,\n {\n \tDeviceStatus deviceStatus;\n \n+\tdeviceStatus.lineLength = lineLengthPckToDuration(registers.at(lineLengthHiReg) * 256 +\n+\t\t\t\t\t\t\t registers.at(lineLengthLoReg));\n \tdeviceStatus.shutterSpeed = exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg),\n-\t\t\t\t\t mode_.minLineLength);\n+\t\t\t\t\t deviceStatus.lineLength);\n \tdeviceStatus.analogueGain = gain(registers.at(gainHiReg) * 256 + registers.at(gainLoReg));\n \tdeviceStatus.frameLength = registers.at(frameLengthHiReg) * 256 + registers.at(frameLengthLoReg);\n \n", "prefixes": [ "libcamera-devel", "v1", "9/9" ] }