{"id":18855,"url":"https://patchwork.libcamera.org/api/patches/18855/?format=json","web_url":"https://patchwork.libcamera.org/patch/18855/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20230720124823.14818-1-david.plowman@raspberrypi.com>","date":"2023-07-20T12:48:23","name":"[libcamera-devel] ipa: rpi: Fix the reporting of Focus FoMs","commit_ref":"baab00721cc577bcfb0d95e810202c57f35055b0","pull_url":null,"state":"accepted","archived":false,"hash":"7b2bfa096636caf94969e6d0438eed3795862a71","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/?format=json","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18855/mbox/","series":[{"id":3978,"url":"https://patchwork.libcamera.org/api/series/3978/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3978","date":"2023-07-20T12:48:23","name":"[libcamera-devel] ipa: rpi: Fix the reporting of Focus FoMs","version":1,"mbox":"https://patchwork.libcamera.org/series/3978/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18855/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18855/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 C2C14BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Jul 2023 12:48:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 21B53628BC;\n\tThu, 20 Jul 2023 14:48:29 +0200 (CEST)","from mail-wm1-x331.google.com (mail-wm1-x331.google.com\n\t[IPv6:2a00:1450:4864:20::331])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9DD3D61E2A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Jul 2023 14:48:26 +0200 (CEST)","by mail-wm1-x331.google.com with SMTP id\n\t5b1f17b1804b1-3fc0aecf107so5824425e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Jul 2023 05:48:26 -0700 (PDT)","from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:2bce:64d6:1a5c:49a2])\n\tby smtp.gmail.com with ESMTPSA id\n\td11-20020a1c730b000000b003fc00892c13sm1094618wmb.35.2023.07.20.05.48.25\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 20 Jul 2023 05:48:25 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1689857309;\n\tbh=welsnO2wYJTCtEsd3yWaXdYIFc0rUOrYP5JF4QepJUM=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=CwUF4pktB75fvip3swSwHSl/8ACSZGKIJNQXBJCzlzuh6DODg72D7hUX5TPzuQ0rP\n\tew/PMe4i0+20u4pi0Xh7cDmW0bZvPxP/gFeQXGBwT2TPHXNnfbuVUAJ0VEjXNvZjRg\n\tIIv0WyRDe5ghvY0rGXNqHcF4ywW4MmQI4NnZk+9AsTAuaJU9uu0x8i2Q7kIyKiqgL8\n\tMil7cBiDqw2wYBpF/7loUmw5LZKDCni+JynYW+das95BR4tAL+NchngjMWYj8wboRh\n\tZVVREP6FACFOhQlnUKGDk7hFADKdYijbp//tmzGLZcOz0gVqz6rn2E5LR64hKQC5Wn\n\tztvGDdThU6cEA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1689857306; x=1690462106;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=uOiKJMreUHQjfWwpc3ZuF8FFnyUWgOZnli00QKTLaPs=;\n\tb=JuFT+5WZTVmh8UuYGPOOBH+0Z/OLHxUF0TsBxiSXKr50qcpdb4T+LvfRftPxjJyOAo\n\t+g3P0ffGEYyWl+CAJE/DDMS+2VqNBAkaR6hGsMfNeTeD/lzdfV/vh65FYa0lNJAFQkHB\n\t7TRexDwqphsMcNDka2Sf2srsZMNfUf+tPblQDb/xYNCR+JiZkpL7AkktCTkfm5swa+C/\n\tsJnvH8C8w2PLYXoXoGQnzgmRbTg1+dwE03Q9siJRY2Fk1e4OELsLy9B8Tne6T9QQJbeD\n\tUEQS+nh+9Olle135DSQ/3CkAmHsu81h8EuthPVKcFM6Y8bSAWsOwc5U8SkOpiXv8Qbos\n\tiCOg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"JuFT+5WZ\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1689857306; x=1690462106;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=uOiKJMreUHQjfWwpc3ZuF8FFnyUWgOZnli00QKTLaPs=;\n\tb=U0GP8Z5wlgUH2MujqqwKLZ6AOSI8ez365zEzEQ/2fN2UTZW2hW/hI22j1mbdhWQfKS\n\tB0DRZbnsRqeCG7dWFfXSGaGitQd08YX52DQemmFsbrUdUToa532qd0x6PkPzPNooeQAc\n\tcIujkHHEjcxQ2VrLf3VaU3f5AOWoqdFC7IZ+ueCVEVWhbKZVV0Mn0pqedtbdazWOHNNH\n\t+B+9t/D72QnPIuXQbO7kKT9zsI7T/pL3G4jEvcA7tOzmSVkJf/EwrVW+gmomQhRsnYws\n\topmJlGSLPUD1vL4DozD4fippgFgWF+9cGoY8vGbALYC95xvl5scwul2nC+I8j92nwHX9\n\t+kRQ==","X-Gm-Message-State":"ABy/qLbYx/MbOO0CQ8toRn9O1gg0gacWG1+b45e2JkQ5tNJQTT4onfMN\n\tywSPrsWdvnoagb4EYpJgYy7iuq4i/w8qWPIZe+M=","X-Google-Smtp-Source":"APBJJlGClMZPx5QPukL6ng6wOTnHuYFmLeCCL1t3gpPJ8KzxVReZUSXZisxplnMdmtyHvgEWZZru1A==","X-Received":"by 2002:a05:600c:b4b:b0:3fc:9b:9e85 with SMTP id\n\tk11-20020a05600c0b4b00b003fc009b9e85mr1727532wmr.18.1689857305750; \n\tThu, 20 Jul 2023 05:48:25 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 20 Jul 2023 13:48:23 +0100","Message-Id":"<20230720124823.14818-1-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.30.2","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] ipa: rpi: Fix the reporting of Focus FoMs","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":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The FocusFom metadata was no longer being reported back because the\n\"focus.status\" metadata was never being created.\n\nAdditionally, the scaling of the focus FoMs was over-zealous, rounding\njust about everything down to zero.\n\nFixes: ac7511dc4c59 (\"ipa: raspberrypi: Generalise the focus reporting code\")\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/ipa/rpi/common/ipa_base.cpp | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)","diff":"diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex f40f2e71..2a033264 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -458,6 +458,9 @@ void IpaBase::processStats(const ProcessParams &params)\n \n \t\tRPiController::StatisticsPtr statistics = platformProcessStats(it->second.planes()[0]);\n \n+\t\t/* reportMetadata() will pick this up and set the FocusFoM metadata */\n+\t\trpiMetadata.set(\"focus.status\", statistics->focusRegions);\n+\n \t\thelper_->process(statistics, rpiMetadata);\n \t\tcontroller_.process(statistics, &rpiMetadata);\n \n@@ -1197,7 +1200,7 @@ void IpaBase::reportMetadata(unsigned int ipaContext)\n \t\t\t}\n \t\t}\n \n-\t\tuint32_t focusFoM = (sum / numRegions) >> 16;\n+\t\tuint32_t focusFoM = sum / numRegions;\n \t\tlibcameraMetadata_.set(controls::FocusFoM, focusFoM);\n \t}\n \n","prefixes":["libcamera-devel"]}