Patch Detail
Show a patch.
GET /api/1.1/patches/19131/?format=api
{ "id": 19131, "url": "https://patchwork.libcamera.org/api/1.1/patches/19131/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19131/", "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": "<20231013074841.16972-8-naush@raspberrypi.com>", "date": "2023-10-13T07:48:28", "name": "[libcamera-devel,v2,07/20] ipa: rpi: Add statsInline to the Controller hardware description", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "5225f67dcc94c1e09370be40ed117aeb8dedc863", "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/19131/mbox/", "series": [ { "id": 4049, "url": "https://patchwork.libcamera.org/api/1.1/series/4049/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4049", "date": "2023-10-13T07:48:21", "name": "Raspberry Pi: Preliminary PiSP support", "version": 2, "mbox": "https://patchwork.libcamera.org/series/4049/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19131/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19131/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 3F605BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Oct 2023 07:48:59 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DB3E26299D;\n\tFri, 13 Oct 2023 09:48:58 +0200 (CEST)", "from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n\t[IPv6:2a00:1450:4864:20::32a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5E67D62989\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Oct 2023 09:48:52 +0200 (CEST)", "by mail-wm1-x32a.google.com with SMTP id\n\t5b1f17b1804b1-405524e6769so11286925e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Oct 2023 00:48:52 -0700 (PDT)", "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tm16-20020a7bca50000000b003fee6e170f9sm1791890wml.45.2023.10.13.00.48.51\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 13 Oct 2023 00:48:51 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1697183338;\n\tbh=AMtoncnlfTKf3q8Duk6hCk/4s3cQdb6NPrRw2NSrYwA=;\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:Cc:\n\tFrom;\n\tb=vyFs9PYDu468DTcmUeKtutesaz/HskmGQZFjtMKMwFPn1Wia5bkKRHw10vuQLMnAv\n\tgiWd59Y4DDro0ITELFi826osUGtS7aDXU3MEaGg7Q8znoHfawUSB0YxWpFH6sW7iJ8\n\tTS1n2mhdo+moxYu3t3Sx8MotuGwAA53AO8s6acsZQ8iiB4zfzkGeeFoZ8BJQvgqczc\n\t61WtUxXvoMabH3Qey6SuyC6m3l3dyT3WLSBKC0RfRb4rBxJm4/tw2ZgLwlei2k7nY1\n\t4zIUeFZAECD+AScDrFiBMTia2N6MF8BoSuasEb4Svo1F4wmGQGj4hg1OSnvjMxjrkW\n\tRU0CpePoT8SVA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1697183331; x=1697788131;\n\tdarn=lists.libcamera.org; \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\t:message-id:reply-to;\n\tbh=7U80zkN/M8+3OGgpgvJfple7vo+jwEOA04kNzWBIb3g=;\n\tb=nIloUCWOrFJkei4VtPMASFFPkd+vv14DGrni4kGjNddDGALKQ/IEHCr+eZx6jHg0q2\n\t937DrX919VXtajFhaeW4Fz8FSwVO9avO/0NjG+J8XGLiAt4fTMYWPFEh0nRz3k+fytyq\n\t8Xy3YAf78zYkpkQ64fGzDlD1+TueVriZwup9vNDj6Cago5ehmi1xZuhnxV8cZ8K9CBR5\n\tKgF+RytjzQ+Ws1Grvc3dMfhNeu8zOKCjUn5ak5Eey1xjL0Z4KPuCiZdY1EtEbeYrOiiV\n\tdAHS6eMOnxNhZIZn/LCG6Rse/gBjJfcKVddM9fFnxMD3Hu4KJq4rICmQAymokQF8jsiF\n\tX4wA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"nIloUCWO\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1697183331; x=1697788131;\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:message-id:reply-to;\n\tbh=7U80zkN/M8+3OGgpgvJfple7vo+jwEOA04kNzWBIb3g=;\n\tb=kiq639ehjAWO1+u0qAgr8glxm78TOO4DSI9vGwd+UZMZMAB8PDSvDDj1L/TCL13QPf\n\tQ4mOPEW7mQh8S+9NZMouulzrv2Ze+IYdwtZtYaPT2aJ3+Kjdg9T/ktJ7vZ+KUEVnFH5N\n\tEzIhQLxl6uCa97O5O6sd3rd7UENAosdq5c1ARoyaNXHQsREOKlj6OGmcdd3V+tehVnqT\n\tQkA1L8hlckAK3pUzC1x/hKZpofLgHuoXxgYZEqgWk8xlaveW2kLI/EI+hH8TS113qGXP\n\tBcvngCM0523W4yDdTwmnXj2BcI8CL5ysiRpsNYT7E+v65jb9j9awaHl0azFCzs+H4ThA\n\tyMMA==", "X-Gm-Message-State": "AOJu0YxvyBmMM/q5DXirKFnkHzztqKWb7L4RygR07oF4yUeML1aHJgIZ\n\td+DMHKCrKq345jAeoID+sfKdiTC3ufSR53G9rc3gaw==", "X-Google-Smtp-Source": "AGHT+IFJm37FHYT3+61JBQmKthTxYIK21j+jsK0yj+WB2g2w1/2+oSxMBHXQ2R4dkheSM33ia7/jhA==", "X-Received": "by 2002:a7b:c4cc:0:b0:402:f91e:df80 with SMTP id\n\tg12-20020a7bc4cc000000b00402f91edf80mr19174648wmk.3.1697183331610; \n\tFri, 13 Oct 2023 00:48:51 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 13 Oct 2023 08:48:28 +0100", "Message-Id": "<20231013074841.16972-8-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20231013074841.16972-1-naush@raspberrypi.com>", "References": "<20231013074841.16972-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 07/20] ipa: rpi: Add statsInline to the\n\tController hardware description", "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>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Add a new boolean field (statsInline) to Controller::HardwareConfigMap.\nThis field indicates where the statistics are generated in the hardware\nISP pipeline. For statsInline == true, statistics are generated before\nthe frame is processed (e.g. the PiSP case), and statsInline == false\nindicates statistics are generated after the frame is processed (e.g.\nthe VC4 case).\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/ipa/rpi/common/ipa_base.cpp | 19 ++++++++++++++-----\n src/ipa/rpi/controller/controller.cpp | 3 ++-\n src/ipa/rpi/controller/controller.h | 1 +\n 3 files changed, 17 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex 97f647a9e53e..f28eb36b7a44 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -429,11 +429,10 @@ void IpaBase::prepareIsp(const PrepareParams ¶ms)\n \t}\n \n \t/*\n-\t * If a statistics buffer has been passed in, call processStats\n-\t * directly now before prepare() since the statistics are available in-line\n-\t * with the Bayer frame.\n+\t * If the statistics are inline (i.e. already available with the Bayer\n+\t * frame), call processStats() now before prepare().\n \t */\n-\tif (params.buffers.stats)\n+\tif (controller_.getHardwareConfig().statsInline)\n \t\tprocessStats({ params.buffers, params.ipaContext });\n \n \t/* Do we need/want to call prepare? */\n@@ -445,6 +444,10 @@ void IpaBase::prepareIsp(const PrepareParams ¶ms)\n \n \tframeCount_++;\n \n+\t/* If the statistics are inline the metadata can be returned early. */\n+\tif (controller_.getHardwareConfig().statsInline)\n+\t\treportMetadata(ipaContext);\n+\n \t/* Ready to push the input buffer into the ISP. */\n \tprepareIspComplete.emit(params.buffers, false);\n }\n@@ -479,7 +482,13 @@ void IpaBase::processStats(const ProcessParams ¶ms)\n \t\t}\n \t}\n \n-\treportMetadata(ipaContext);\n+\t/*\n+\t * If the statistics are not inline the metadata must be returned now,\n+\t * before the processStatsComplete signal.\n+\t */\n+\tif (!controller_.getHardwareConfig().statsInline)\n+\t\treportMetadata(ipaContext);\n+\n \tprocessStatsComplete.emit(params.buffers);\n }\n \ndiff --git a/src/ipa/rpi/controller/controller.cpp b/src/ipa/rpi/controller/controller.cpp\nindex 14d245da2ce7..4b6f82b41916 100644\n--- a/src/ipa/rpi/controller/controller.cpp\n+++ b/src/ipa/rpi/controller/controller.cpp\n@@ -34,7 +34,8 @@ static const std::map<std::string, Controller::HardwareConfig> HardwareConfigMap\n \t\t\t.focusRegions = { 4, 3 },\n \t\t\t.numHistogramBins = 128,\n \t\t\t.numGammaPoints = 33,\n-\t\t\t.pipelineWidth = 13\n+\t\t\t.pipelineWidth = 13,\n+\t\t\t.statsInline = false,\n \t\t}\n \t},\n };\ndiff --git a/src/ipa/rpi/controller/controller.h b/src/ipa/rpi/controller/controller.h\nindex c6af5cd6c7d4..a8bc61880ab4 100644\n--- a/src/ipa/rpi/controller/controller.h\n+++ b/src/ipa/rpi/controller/controller.h\n@@ -45,6 +45,7 @@ public:\n \t\tunsigned int numHistogramBins;\n \t\tunsigned int numGammaPoints;\n \t\tunsigned int pipelineWidth;\n+\t\tbool statsInline;\n \t};\n \n \tController();\n", "prefixes": [ "libcamera-devel", "v2", "07/20" ] }