[{"id":16714,"web_url":"https://patchwork.libcamera.org/comment/16714/","msgid":"<YIz2tdzcOjAekuio@oden.dyn.berto.se>","date":"2021-05-01T06:35:33","subject":"Re: [libcamera-devel] [PATCH v4 12/16] libcamera: raspberrypi: Do\n\tnot over-write metadata","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your work.\n\nOn 2021-04-30 18:00:22 +0200, Jacopo Mondi wrote:\n> When a Request is completed upon receiving the IPA produced metadata,\n> the metadata associated with the Request are over-written, deleting\n> the information set at output buffer completion, such as the\n> SensorTimestamp.\n> \n> This commit applies to the RaspberryPi pipeline handler the same change\n> applied to IPU3 in commit 13a7ed7b1f1f (\"libcamera: ipu3: Do not\n> over-write metadata\") but compared to that commit it uses the newly\n> introduced ControlList::merge() function.\n> \n> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 9 +++++++--\n>  1 file changed, 7 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 2a917455500f..46f418aa8d73 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -1312,9 +1312,14 @@ void RPiCameraData::statsMetadataComplete(uint32_t bufferId, const ControlList &\n>  \n>  \thandleStreamBuffer(buffer, &isp_[Isp::Stats]);\n>  \n> -\t/* Fill the Request metadata buffer with what the IPA has provided */\n> +\t/*\n> +\t * Add to the Request metadata buffer what the IPA has provided.\n> +\t *\n> +\t * Do not overwrite controls set by the pipeline handler, for example\n> +\t * SensorTimestamp.\n> +\t */\n\nThe comment reads more like it belongs in the commit message then in the \ncode. With the comment left unchanged,\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n>  \tRequest *request = requestQueue_.front();\n> -\trequest->metadata() = controls;\n> +\trequest->metadata().merge(controls);\n>  \n>  \t/*\n>  \t * Also update the ScalerCrop in the metadata with what we actually\n> -- \n> 2.31.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 5B097BDE6A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  1 May 2021 06:35:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DC83C60511;\n\tSat,  1 May 2021 08:35:36 +0200 (CEST)","from mail-lf1-x132.google.com (mail-lf1-x132.google.com\n\t[IPv6:2a00:1450:4864:20::132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4B6ED602BF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  1 May 2021 08:35:35 +0200 (CEST)","by mail-lf1-x132.google.com with SMTP id 2so420877lft.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Apr 2021 23:35:35 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tc13sm461062ljf.120.2021.04.30.23.35.34\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 30 Apr 2021 23:35:34 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"r2OhY307\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=rBIqOHqs/hW5ZRpj3MxvFgNsAn4ONwZrsnuBD56Z6sQ=;\n\tb=r2OhY3077TJ/nvOUFNrjic4cL/Zo8Ne+7nIirHTNMLqv0S9G6BBtlgj0nv4pWKc4cK\n\t8jgEM81iTseTW84MO//JUpxXZ8Y08uGKK05Zw+K2TbOAx2UgmvSiVwNo6B5UOojU59VN\n\tCHudxl2KESCEXCv/mIFl+qfVUtvZWB1n34uPOey/EGlLVpDsgCitibFFHYFV1TdGmUoc\n\taFaUto8vC/wfCibL9nM8KNH/Lk/sAefJNhpyZYeBR3o2Jv+3ZplQpnd7r9RRqrziEp/K\n\t4eEkeUomh67RZvEjy9DC6X9/JpW7ch0VfoFdFUmHMGDs+bRMu745iBf2tj96MCX8/svt\n\t7nZA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=rBIqOHqs/hW5ZRpj3MxvFgNsAn4ONwZrsnuBD56Z6sQ=;\n\tb=SM2NFOiODiARuA6LIrQaSNl2n7aKqbMQIQiLQA6bNVs5744dfk/7hHUBQQl3ecFRB4\n\te6EsLuh8Iz71dnSuu2yapKRU3+tVoMYmxBvA+r6JBpahCydxO6r9W9mWArsbo2sZ2qZg\n\tdmouxmojaA4Nlo9nWvcrkQZAXlCrYiU6Eg9A3gVZ6fKh2As0k0ws46jfI+EPoTy2IOkT\n\tUamMbyCTPbzxGaQVVpAj7WKndvXST9TigKz6TZm3Pq7eTkwLbndn5uZuchcmJv5h8CGI\n\tO2/49PTpneVaWCSxxCcAbYfCCuQGoYooqPsNUwp8zLmC5uZbTKt4AnFGTJdys/cGTUKu\n\tNpog==","X-Gm-Message-State":"AOAM531pCPO8NPCthieo8KiMKOmDsVI1dMGybSp/+5c6VBZEL9RHu52Y\n\tHbWYPQ70MUpV3oFWiYmo64J/gbeukjnmDg==","X-Google-Smtp-Source":"ABdhPJwzwVOffMuaFWrNpEuaxfaQVP7ZLL2+/ucCqq08ZelphyEnHlZS00dxWnhYDUDf7h+fI/qV1w==","X-Received":"by 2002:a05:6512:358c:: with SMTP id\n\tm12mr2460414lfr.289.1619850934791; \n\tFri, 30 Apr 2021 23:35:34 -0700 (PDT)","Date":"Sat, 1 May 2021 08:35:33 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YIz2tdzcOjAekuio@oden.dyn.berto.se>","References":"<20210430160026.190724-1-jacopo@jmondi.org>\n\t<20210430160026.190724-13-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210430160026.190724-13-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v4 12/16] libcamera: raspberrypi: Do\n\tnot over-write metadata","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]