{"id":14530,"url":"https://patchwork.libcamera.org/api/1.1/patches/14530/?format=json","web_url":"https://patchwork.libcamera.org/patch/14530/","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":"<20211110195901.85597-3-jeanmichel.hautbois@ideasonboard.com>","date":"2021-11-10T19:58:49","name":"[libcamera-devel,v2,02/14] ipu3: ipa: Report effective sensor controls with statistics to IPA","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"d8d2f398a9d35e69125dbdcaa30c7cdd729f1cd0","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/1.1/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14530/mbox/","series":[{"id":2708,"url":"https://patchwork.libcamera.org/api/1.1/series/2708/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2708","date":"2021-11-10T19:58:47","name":"IPA: IPU3: Introduce per-frame controls","version":2,"mbox":"https://patchwork.libcamera.org/series/2708/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14530/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14530/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 3B332BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Nov 2021 19:59:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 37AD26038B;\n\tWed, 10 Nov 2021 20:59:11 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7F37E6035A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Nov 2021 20:59:06 +0100 (CET)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:7713:3465:89e6:c5cd])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 34C4E9FF;\n\tWed, 10 Nov 2021 20:59:06 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"C+qiAwxg\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1636574346;\n\tbh=zN1A2JCDmbXNy9LOEdVyYSE6rbn1dmLIfjJAeVVCjPQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=C+qiAwxgZjyjiwaKwt5HHhq1lCl3vhlyqz40M3freuFj+vIsKk5/x0/dwTClo59yi\n\tmWSzsxU/fFiVxAKOQnTMF7MLYUa1eY8d9A3ImOOSTF3fM7zing+1ymEPrHLpxgWd78\n\tabHGIH1RF1MY7F9/0BuUMvEWoNeTk0AF0RYCl5B8=","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 10 Nov 2021 20:58:49 +0100","Message-Id":"<20211110195901.85597-3-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","In-Reply-To":"<20211110195901.85597-1-jeanmichel.hautbois@ideasonboard.com>","References":"<20211110195901.85597-1-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 02/14] ipu3: ipa: Report effective\n\tsensor controls with statistics to IPA","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Han-Lin Chen <hanlinchen@chromium.org>\n\nThe Intel close sourced IPA requires the effective controls applied to\nthe sensor when the statistics are generated. Report effective sensor controls\nwith the statistics to IPA.\n\nSigned-off-by: Han-Lin Chen <hanlinchen@chromium.org>\n[Jean-Michel: Reword s/stastistics/statistics and move reset after IPA\nstart]\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n src/libcamera/pipeline/ipu3/frames.h | 4 ++++\n src/libcamera/pipeline/ipu3/ipu3.cpp | 9 +++++++++\n 2 files changed, 13 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\nindex 3ef7e445..614701e2 100644\n--- a/src/libcamera/pipeline/ipu3/frames.h\n+++ b/src/libcamera/pipeline/ipu3/frames.h\n@@ -14,6 +14,8 @@\n \n #include <libcamera/base/signal.h>\n \n+#include <libcamera/controls.h>\n+\n namespace libcamera {\n \n class FrameBuffer;\n@@ -34,6 +36,8 @@ public:\n \t\tFrameBuffer *paramBuffer;\n \t\tFrameBuffer *statBuffer;\n \n+\t\tControlList effectiveSensorControls;\n+\n \t\tbool paramDequeued;\n \t\tbool metadataProcessed;\n \t};\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 8816efc5..3fcfa777 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -767,6 +767,12 @@ int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] const ControlLis\n \tif (ret)\n \t\tgoto error;\n \n+\t/*\n+\t * Reset the delayed controls with the gain and exposure values set by\n+\t * the IPA.\n+\t */\n+\tdata->delayedCtrls_->reset();\n+\n \t/*\n \t * Start the ImgU video devices, buffers will be queued to the\n \t * ImgU output and viewfinder when requests will be queued.\n@@ -1363,6 +1369,8 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)\n \trequest->metadata().set(controls::SensorTimestamp,\n \t\t\t\tbuffer->metadata().timestamp);\n \n+\tinfo->effectiveSensorControls = delayedCtrls_->get(buffer->metadata().sequence);\n+\n \tif (request->findBuffer(&rawStream_))\n \t\tpipe()->completeBuffer(request, buffer);\n \n@@ -1419,6 +1427,7 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)\n \tev.frame = info->id;\n \tev.bufferId = info->statBuffer->cookie();\n \tev.frameTimestamp = request->metadata().get(controls::SensorTimestamp);\n+\tev.sensorControls = info->effectiveSensorControls;\n \tipa_->processEvent(ev);\n }\n \n","prefixes":["libcamera-devel","v2","02/14"]}