[{"id":34645,"web_url":"https://patchwork.libcamera.org/comment/34645/","msgid":"<CAEmqJPrPE7qdZ2zyL=9scfCAncG_n_g38MhVRGft1oKZF6f=2g@mail.gmail.com>","date":"2025-06-26T08:47:21","subject":"Re: [RFC PATCH v1] libcamera: pipeline: rpi: Do not clear request\n\tmetadata anymore","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Barnabás,\n\nThank you for the patch.\n\n\nOn Thu, 26 Jun 2025 at 09:22, Barnabás Pőcze\n<barnabas.pocze@ideasonboard.com> wrote:\n>\n> Since 6cf9c4d34fbda5 (\"pipeline: ipa: rpi: Split RPiCameraData::dropFrameCount_\")\n> the initial n frames are not dropped anymore. So clearing the request metadata\n> should not be necessary anymore, remove it.\n>\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  src/libcamera/pipeline/rpi/pisp/pisp.cpp | 7 +------\n>  src/libcamera/pipeline/rpi/vc4/vc4.cpp   | 7 +------\n>  2 files changed, 2 insertions(+), 12 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> index 2df91bacf..834b0e3f9 100644\n> --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> @@ -2313,16 +2313,11 @@ void PiSPCameraData::tryRunPipeline()\n>\n>         /* Take the first request from the queue and action the IPA. */\n>         Request *request = requestQueue_.front();\n> +       ASSERT(request->metadata().empty());\n\nI don't think the assert is needed here, a few lines above we check\nfor requestQueue_.empty().  Ditto for the vc4.cpp change.  Other than\nthat, looks good!\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n>\n>         /* See if a new ScalerCrop value needs to be applied. */\n>         applyScalerCrop(request->controls());\n>\n> -       /*\n> -        * Clear the request metadata and fill it with some initial non-IPA\n> -        * related controls. We clear it first because the request metadata\n> -        * may have been populated if we have dropped the previous frame.\n> -        */\n> -       request->metadata().clear();\n>         fillRequestMetadata(job.sensorControls, request);\n>\n>         /* Set our state to say the pipeline is active. */\n> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> index e99a7edf8..02e835b00 100644\n> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> @@ -927,16 +927,11 @@ void Vc4CameraData::tryRunPipeline()\n>\n>         /* Take the first request from the queue and action the IPA. */\n>         Request *request = requestQueue_.front();\n> +       ASSERT(request->metadata().empty());\n>\n>         /* See if a new ScalerCrop value needs to be applied. */\n>         applyScalerCrop(request->controls());\n>\n> -       /*\n> -        * Clear the request metadata and fill it with some initial non-IPA\n> -        * related controls. We clear it first because the request metadata\n> -        * may have been populated if we have dropped the previous frame.\n> -        */\n> -       request->metadata().clear();\n>         fillRequestMetadata(bayerFrame.controls, request);\n>\n>         /* Set our state to say the pipeline is active. */\n> --\n> 2.50.0\n>","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 42E01BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Jun 2025 08:48:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 081AC68DEC;\n\tThu, 26 Jun 2025 10:48:00 +0200 (CEST)","from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com\n\t[IPv6:2607:f8b0:4864:20::92e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5835C62C44\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Jun 2025 10:47:57 +0200 (CEST)","by mail-ua1-x92e.google.com with SMTP id\n\ta1e0cc1a2514c-87ece9c8439so17419241.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Jun 2025 01:47:57 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"jQcSP2zf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1750927676; x=1751532476;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=Jbud3B23PYw977vFq6eRUmG06EKUUpRf26rRycLpf30=;\n\tb=jQcSP2zfyAhgR9bR74pzlZzjdtfqsN2LdY3S+Ik98RXxBh8RKLxUR3EjFZgVfq99jQ\n\t8muhOy9l/H38KinGnUAjECTTK6ONMLil9xtSKR48v5zx6KY3RXFBgFN1XFroF8Rx3xzh\n\tgbZEvOkbgjcsDTdCZK7mLOjTwqNXc+1r9dS7w2ACkswOGmuR1jjGtDRYUGH+fQjHNgzQ\n\tr0n/hxobjVYJK70JWtWdA/FvbpNoluOlIWCOXKjJLrzha1wHfHLKq3POaoGe/4qglJZP\n\tdCK6TBwK1bD3NFZpzkSqbJYDVKsMTvszpmEJivbWiIeE75OPN4BJVCRUipMEtC0rXcg8\n\tq5ng==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1750927676; x=1751532476;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=Jbud3B23PYw977vFq6eRUmG06EKUUpRf26rRycLpf30=;\n\tb=v8On385KtK7tn2ZYXLFDXyyzra2T3KguQs3adrY17n3ldxVL7IKPioYLQi4yPjKGCg\n\txk0FocPNSo9fDqdi6RCN9gM0c3UrZIMDgq3ESSGwqKjbIbRpyFg2NgJ9DaUvho3JIJ/7\n\tYBEJpfT9U8+KRUu3+wIfOfnobLLh6szpDm01Y/BFkgeXnQSDjiqswzXnM3oh/gek6/5o\n\tmzuQGVv7y3LeKwLfjXzfek7nq2nS84Ep/24WVnxpfhCFhh8g8QYGiXf11vwUj3oX4oXw\n\tqar/DEe6946hmNvDItN8F9yrKW6TMWeT7FfS8SQQoRt6jC4BST0Iv0MnTFglBb9D2oJp\n\t840A==","X-Gm-Message-State":"AOJu0YwLGFpUqnEicRNVTTaojR8kByLM6DKe+5Q5fGkxz6DK2rOM0PT4\n\timI3Pskxi15e5hDZBizCEG86RtiVEcjGUpZXdXCkWLnRQvUbcLwmfRy7D+ahxolRvyDUi8ssIt7\n\tlUE7Bp6iiF5oZo9cCcyj+BKIvR1SpL1cbdO1dB+r5sw==","X-Gm-Gg":"ASbGnct2madidV5YElqQT/TR+Yu7qDH2ouqJoZz7Ch0bg9FKWcVcc3BSnhF2TDUGHOi\n\t/FgVW153FGQzrn1wKKEBpzv0hjlheilvvX0OpG8rKmjrzjoKqYOp/chnajJXYz+3sBfqHefHCBv\n\tUgGUDZRI/7JBO9dvxY0U+BC5yr7mDsi/rpW7b+9wGd2wRDIZvlFeXE+3K6HCiJhElnEZrP1+1DK\n\tkY=","X-Google-Smtp-Source":"AGHT+IGh+Xy9+QNbIWSwVHOi6eokuAYi0aHGmepVcuk2gbJYsjLHkY/2oKrvWh7Vcm4W8ccHmSCVdfeCTWDKS/QN9WY=","X-Received":"by 2002:a05:6102:3582:b0:4cd:6339:36a1 with SMTP id\n\tada2fe7eead31-4ecc63de43cmr1368864137.0.1750927675948;\n\tThu, 26 Jun 2025 01:47:55 -0700 (PDT)","MIME-Version":"1.0","References":"<20250626082235.1845316-1-barnabas.pocze@ideasonboard.com>","In-Reply-To":"<20250626082235.1845316-1-barnabas.pocze@ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Thu, 26 Jun 2025 09:47:21 +0100","X-Gm-Features":"Ac12FXzz-Ct6BkbhiNSq6xSK7vUJIZKOTC0XS_5mHR-Ih9XKkrfMhCQeOYdeuYE","Message-ID":"<CAEmqJPrPE7qdZ2zyL=9scfCAncG_n_g38MhVRGft1oKZF6f=2g@mail.gmail.com>","Subject":"Re: [RFC PATCH v1] libcamera: pipeline: rpi: Do not clear request\n\tmetadata anymore","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tDavid Plowman <david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","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>"}},{"id":34702,"web_url":"https://patchwork.libcamera.org/comment/34702/","msgid":"<53045c9c-6b09-4ff4-a6c4-23421dcf8904@ideasonboard.com>","date":"2025-06-27T14:34:58","subject":"Re: [RFC PATCH v1] libcamera: pipeline: rpi: Do not clear request\n\tmetadata anymore","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 06. 26. 10:47 keltezéssel, Naushir Patuck írta:\n> Hi Barnabás,\n> \n> Thank you for the patch.\n> \n> \n> On Thu, 26 Jun 2025 at 09:22, Barnabás Pőcze\n> <barnabas.pocze@ideasonboard.com> wrote:\n>>\n>> Since 6cf9c4d34fbda5 (\"pipeline: ipa: rpi: Split RPiCameraData::dropFrameCount_\")\n>> the initial n frames are not dropped anymore. So clearing the request metadata\n>> should not be necessary anymore, remove it.\n>>\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> ---\n>>   src/libcamera/pipeline/rpi/pisp/pisp.cpp | 7 +------\n>>   src/libcamera/pipeline/rpi/vc4/vc4.cpp   | 7 +------\n>>   2 files changed, 2 insertions(+), 12 deletions(-)\n>>\n>> diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n>> index 2df91bacf..834b0e3f9 100644\n>> --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n>> +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n>> @@ -2313,16 +2313,11 @@ void PiSPCameraData::tryRunPipeline()\n>>\n>>          /* Take the first request from the queue and action the IPA. */\n>>          Request *request = requestQueue_.front();\n>> +       ASSERT(request->metadata().empty());\n> \n> I don't think the assert is needed here, a few lines above we check\n> for requestQueue_.empty().  Ditto for the vc4.cpp change.  Other than\n> that, looks good!\n\nSorry, it's not clear to me why checking `requestQueue_.empty()` is\nimportant here? Can you clarify?\n\n\nRegards,\nBarnabás Pőcze\n\n\n> \n> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> \n>>\n>>          /* See if a new ScalerCrop value needs to be applied. */\n>>          applyScalerCrop(request->controls());\n>>\n>> -       /*\n>> -        * Clear the request metadata and fill it with some initial non-IPA\n>> -        * related controls. We clear it first because the request metadata\n>> -        * may have been populated if we have dropped the previous frame.\n>> -        */\n>> -       request->metadata().clear();\n>>          fillRequestMetadata(job.sensorControls, request);\n>>\n>>          /* Set our state to say the pipeline is active. */\n>> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n>> index e99a7edf8..02e835b00 100644\n>> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n>> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n>> @@ -927,16 +927,11 @@ void Vc4CameraData::tryRunPipeline()\n>>\n>>          /* Take the first request from the queue and action the IPA. */\n>>          Request *request = requestQueue_.front();\n>> +       ASSERT(request->metadata().empty());\n>>\n>>          /* See if a new ScalerCrop value needs to be applied. */\n>>          applyScalerCrop(request->controls());\n>>\n>> -       /*\n>> -        * Clear the request metadata and fill it with some initial non-IPA\n>> -        * related controls. We clear it first because the request metadata\n>> -        * may have been populated if we have dropped the previous frame.\n>> -        */\n>> -       request->metadata().clear();\n>>          fillRequestMetadata(bayerFrame.controls, request);\n>>\n>>          /* Set our state to say the pipeline is active. */\n>> --\n>> 2.50.0\n>>","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 DDF25BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Jun 2025 14:35:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9084768DFE;\n\tFri, 27 Jun 2025 16:35:03 +0200 (CEST)","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 2D6D168DE5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jun 2025 16:35:02 +0200 (CEST)","from [192.168.33.12] (185.221.143.107.nat.pool.zt.hu\n\t[185.221.143.107])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4BEA47E1;\n\tFri, 27 Jun 2025 16:34:42 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"YYC+Q30A\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1751034882;\n\tbh=f7kDIZRJ5vKDzj32cr71AUiBzRg4GA4BDnZReoGl7zg=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=YYC+Q30AZkLAAB4Zfrf0GdExhi3YrD7eJ2pkHwCuJ6vB3wpD0Cx59Mku1Zl25/ccK\n\tXkkfb3r+31vQfyz2qCK4NqpASDO/fXlCvEzkmVQO4pUrPsuyAy8aeg8w5Ctb6m3vj6\n\tO1QfwPNl6SNMbAY9eqvmWy5TfSSzz5EOPFpRIWq4=","Message-ID":"<53045c9c-6b09-4ff4-a6c4-23421dcf8904@ideasonboard.com>","Date":"Fri, 27 Jun 2025 16:34:58 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v1] libcamera: pipeline: rpi: Do not clear request\n\tmetadata anymore","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>","References":"<20250626082235.1845316-1-barnabas.pocze@ideasonboard.com>\n\t<CAEmqJPrPE7qdZ2zyL=9scfCAncG_n_g38MhVRGft1oKZF6f=2g@mail.gmail.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<CAEmqJPrPE7qdZ2zyL=9scfCAncG_n_g38MhVRGft1oKZF6f=2g@mail.gmail.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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>"}},{"id":34703,"web_url":"https://patchwork.libcamera.org/comment/34703/","msgid":"<CAEmqJPqz9xxb8GLFe-yJEzWiHrcexPMmQx3vXn4L-nieXp9=zA@mail.gmail.com>","date":"2025-06-27T14:51:12","subject":"Re: [RFC PATCH v1] libcamera: pipeline: rpi: Do not clear request\n\tmetadata anymore","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Barnabás,\n\nOn Fri, 27 Jun 2025, 3:35 pm Barnabás Pőcze, <\nbarnabas.pocze@ideasonboard.com> wrote:\n\n> Hi\n>\n> 2025. 06. 26. 10:47 keltezéssel, Naushir Patuck írta:\n> > Hi Barnabás,\n> >\n> > Thank you for the patch.\n> >\n> >\n> > On Thu, 26 Jun 2025 at 09:22, Barnabás Pőcze\n> > <barnabas.pocze@ideasonboard.com> wrote:\n> >>\n> >> Since 6cf9c4d34fbda5 (\"pipeline: ipa: rpi: Split\n> RPiCameraData::dropFrameCount_\")\n> >> the initial n frames are not dropped anymore. So clearing the request\n> metadata\n> >> should not be necessary anymore, remove it.\n> >>\n> >> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> >> ---\n> >>   src/libcamera/pipeline/rpi/pisp/pisp.cpp | 7 +------\n> >>   src/libcamera/pipeline/rpi/vc4/vc4.cpp   | 7 +------\n> >>   2 files changed, 2 insertions(+), 12 deletions(-)\n> >>\n> >> diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> >> index 2df91bacf..834b0e3f9 100644\n> >> --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> >> +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> >> @@ -2313,16 +2313,11 @@ void PiSPCameraData::tryRunPipeline()\n> >>\n> >>          /* Take the first request from the queue and action the IPA. */\n> >>          Request *request = requestQueue_.front();\n> >> +       ASSERT(request->metadata().empty());\n> >\n> > I don't think the assert is needed here, a few lines above we check\n> > for requestQueue_.empty().  Ditto for the vc4.cpp change.  Other than\n> > that, looks good!\n>\n> Sorry, it's not clear to me why checking `requestQueue_.empty()` is\n> important here? Can you clarify?\n>\n\nSorry my bad. I originally read that as test on the request queue, not\nrequest->metadata().\n\nNaush\n\n>\n>\n> Regards,\n> Barnabás Pőcze\n>\n>\n> >\n> > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> >\n> >>\n> >>          /* See if a new ScalerCrop value needs to be applied. */\n> >>          applyScalerCrop(request->controls());\n> >>\n> >> -       /*\n> >> -        * Clear the request metadata and fill it with some initial\n> non-IPA\n> >> -        * related controls. We clear it first because the request\n> metadata\n> >> -        * may have been populated if we have dropped the previous\n> frame.\n> >> -        */\n> >> -       request->metadata().clear();\n> >>          fillRequestMetadata(job.sensorControls, request);\n> >>\n> >>          /* Set our state to say the pipeline is active. */\n> >> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> >> index e99a7edf8..02e835b00 100644\n> >> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> >> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> >> @@ -927,16 +927,11 @@ void Vc4CameraData::tryRunPipeline()\n> >>\n> >>          /* Take the first request from the queue and action the IPA. */\n> >>          Request *request = requestQueue_.front();\n> >> +       ASSERT(request->metadata().empty());\n> >>\n> >>          /* See if a new ScalerCrop value needs to be applied. */\n> >>          applyScalerCrop(request->controls());\n> >>\n> >> -       /*\n> >> -        * Clear the request metadata and fill it with some initial\n> non-IPA\n> >> -        * related controls. We clear it first because the request\n> metadata\n> >> -        * may have been populated if we have dropped the previous\n> frame.\n> >> -        */\n> >> -       request->metadata().clear();\n> >>          fillRequestMetadata(bayerFrame.controls, request);\n> >>\n> >>          /* Set our state to say the pipeline is active. */\n> >> --\n> >> 2.50.0\n> >>\n>\n>","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 3C3ABC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Jun 2025 14:51:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2999268DE5;\n\tFri, 27 Jun 2025 16:51:26 +0200 (CEST)","from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com\n\t[IPv6:2607:f8b0:4864:20::a2a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 53A9A68DE5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jun 2025 16:51:24 +0200 (CEST)","by mail-vk1-xa2a.google.com with SMTP id\n\t71dfb90a1353d-532d07a648cso107679e0c.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jun 2025 07:51:24 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"t46Xhbs5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1751035883; x=1751640683;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=aJB203ckBNde6o06ooq/Fj5+mPS1sb2kHziV2X/ABwQ=;\n\tb=t46Xhbs5Kn7gpqMfxY/HPxRqCnopwLZ8FkixAy5WLg9//zzlPQEsvYsXl9K9XFj32p\n\tSSC/VYOJMcACMEjx0nPl5vPLMV4EwFDnBYzaxHzUTA5+ZrtpaDwZEiUNOyaxRuipDWvf\n\te9+bNFcIcRRNl78m2O+zMI5x5Q+xUbnGpWYPo4zS/UmXxD/VQ18UGY6wqFaBp2fblWp5\n\tml/OqxgsoRPXmkKWfiDTreDuHD1l8gl2b/U3uPCG8oco1TYbQGCzHOzmg0vF1qK5uwK2\n\tcTxTn/A22HxMLXLPXrizltq6UPK8oFw+PARDQ06m6nebY9Q2/uA9RQrL1X4yCvS1VUnt\n\tEErA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1751035883; x=1751640683;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=aJB203ckBNde6o06ooq/Fj5+mPS1sb2kHziV2X/ABwQ=;\n\tb=jUBH1qSq/DyAcQA2yIQwPqD8V5aI88MK9qx/PjSqJn1iXZ4npqSXvyrZ/GQfISPMpv\n\tAtaQSnYzHfbf3wcK5dp1vpJOAtNy13mhLqauF/gVgWO8jyi9CpVy247sXasSuGewPdVP\n\tqMumAcaE8WKsT0gCQ8D5uMot+dwjtBOoVkGB4tSF299LgWGg5TJa1PgQcfIY1l7tJWYN\n\tGBOkdQK0M4H7/rNLQ5h8TLecFXthL3fDDf1uMA2V4XSQE/8YCCWJYwV9xNEukMfPJ1xd\n\ty2hiuoR0SM6vYeyk1xlKtPwVZBobrepo6oynt1QYnePb3E5tyWhbFwBhm/RHItYTlqUk\n\tm6Bw==","X-Gm-Message-State":"AOJu0YxGASbP8pmCEOgTk+Xq/gepcZQEtgntr93EoKpXz2Bx9HxHM/pG\n\tTPrA6W1Avq3QIaom0aVY/yKkBn7GgEVPATe8Mj9poQdZUNhSqEjs1uvXcG1vbn1HWVidpCXM0fp\n\tfRcnnTB4Bqnz/YvtXWRwAzG+r4y1KY9VlG/xGI9cC8Q==","X-Gm-Gg":"ASbGnctWF2fZpFzXiVyms/eAtt7osfY7B6UsOclc5ySjLz3Am1DMgUuWSwGs1EPnYx2\n\t97RsiALVk8JhroypxmmUNYKcq5CStNJQ+80fjLXRDRjmVWsaD2376Lu7ACTxPx5OUjAbSbycK6P\n\tDL9vYo1GA06r0PfJP/70/WDUUQNxwXAcXm0gVYEdqk","X-Google-Smtp-Source":"AGHT+IHzSjlI5eKWXt623GaOgOCXYIlFh5PmP8RzgQxWTZCP9CvYkRYc8wE0Xb+h3Jda4XKbbAP4xwR1x0MYEPTlaV0=","X-Received":"by 2002:a05:6122:8b10:b0:531:c1d3:6384 with SMTP id\n\t71dfb90a1353d-5330bdf5ff9mr930779e0c.1.1751035883090; Fri, 27 Jun 2025\n\t07:51:23 -0700 (PDT)","MIME-Version":"1.0","References":"<20250626082235.1845316-1-barnabas.pocze@ideasonboard.com>\n\t<CAEmqJPrPE7qdZ2zyL=9scfCAncG_n_g38MhVRGft1oKZF6f=2g@mail.gmail.com>\n\t<53045c9c-6b09-4ff4-a6c4-23421dcf8904@ideasonboard.com>","In-Reply-To":"<53045c9c-6b09-4ff4-a6c4-23421dcf8904@ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Fri, 27 Jun 2025 15:51:12 +0100","X-Gm-Features":"Ac12FXzL-S2rXlbv7bTwt4ByT-Ax2YM8KGvaQaTN9PAxwFFLDd4ka-ZCRHSiRkU","Message-ID":"<CAEmqJPqz9xxb8GLFe-yJEzWiHrcexPMmQx3vXn4L-nieXp9=zA@mail.gmail.com>","Subject":"Re: [RFC PATCH v1] libcamera: pipeline: rpi: Do not clear request\n\tmetadata anymore","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>, \n\tDavid Plowman <david.plowman@raspberrypi.com>","Content-Type":"multipart/alternative; boundary=\"000000000000cd0f6e06388ecf4d\"","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>"}},{"id":34905,"web_url":"https://patchwork.libcamera.org/comment/34905/","msgid":"<bbfede1c-ed24-40e8-9ad4-a6e695da89c7@ideasonboard.com>","date":"2025-07-15T15:04:14","subject":"Re: [RFC PATCH v1] libcamera: pipeline: rpi: Do not clear request\n\tmetadata anymore","submitter":{"id":156,"url":"https://patchwork.libcamera.org/api/people/156/","name":"Dan Scally","email":"dan.scally@ideasonboard.com"},"content":"Hi Barnabás - thanks for the patch\n\nOn 26/06/2025 09:22, Barnabás Pőcze wrote:\n> Since 6cf9c4d34fbda5 (\"pipeline: ipa: rpi: Split RPiCameraData::dropFrameCount_\")\n> the initial n frames are not dropped anymore. So clearing the request metadata\n> should not be necessary anymore, remove it.\n>\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\nReviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n> ---\n>   src/libcamera/pipeline/rpi/pisp/pisp.cpp | 7 +------\n>   src/libcamera/pipeline/rpi/vc4/vc4.cpp   | 7 +------\n>   2 files changed, 2 insertions(+), 12 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> index 2df91bacf..834b0e3f9 100644\n> --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n> @@ -2313,16 +2313,11 @@ void PiSPCameraData::tryRunPipeline()\n>   \n>   \t/* Take the first request from the queue and action the IPA. */\n>   \tRequest *request = requestQueue_.front();\n> +\tASSERT(request->metadata().empty());\n>   \n>   \t/* See if a new ScalerCrop value needs to be applied. */\n>   \tapplyScalerCrop(request->controls());\n>   \n> -\t/*\n> -\t * Clear the request metadata and fill it with some initial non-IPA\n> -\t * related controls. We clear it first because the request metadata\n> -\t * may have been populated if we have dropped the previous frame.\n> -\t */\n> -\trequest->metadata().clear();\n>   \tfillRequestMetadata(job.sensorControls, request);\n>   \n>   \t/* Set our state to say the pipeline is active. */\n> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> index e99a7edf8..02e835b00 100644\n> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> @@ -927,16 +927,11 @@ void Vc4CameraData::tryRunPipeline()\n>   \n>   \t/* Take the first request from the queue and action the IPA. */\n>   \tRequest *request = requestQueue_.front();\n> +\tASSERT(request->metadata().empty());\n>   \n>   \t/* See if a new ScalerCrop value needs to be applied. */\n>   \tapplyScalerCrop(request->controls());\n>   \n> -\t/*\n> -\t * Clear the request metadata and fill it with some initial non-IPA\n> -\t * related controls. We clear it first because the request metadata\n> -\t * may have been populated if we have dropped the previous frame.\n> -\t */\n> -\trequest->metadata().clear();\n>   \tfillRequestMetadata(bayerFrame.controls, request);\n>   \n>   \t/* Set our state to say the pipeline is active. */","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 CF643C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 15 Jul 2025 15:04:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B479C6186B;\n\tTue, 15 Jul 2025 17:04:19 +0200 (CEST)","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 55BB16186B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Jul 2025 17:04:18 +0200 (CEST)","from [192.168.0.43]\n\t(cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BF8177E4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Jul 2025 17:03:45 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mWVNQdyT\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1752591825;\n\tbh=w2qmcv+pEil5goQjG2ushgh/0NCKX8qAZBfO/at7+og=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=mWVNQdyTqp/vsXo4Q5bKg5PLHhLFNyYAaSnqU2RWil7o7JfY6Ta92Mn4KRmH7YfQs\n\tKH7aE3wD/MhVCaRxUqD2ckd9Of7jraBNR81BSPPfXwgpCkQARxS8DpMp/onRymz2Y4\n\tR1ehdiKe3FgsgEWZ5Il5kSD0JRPf17A9ieEKJ3As=","Message-ID":"<bbfede1c-ed24-40e8-9ad4-a6e695da89c7@ideasonboard.com>","Date":"Tue, 15 Jul 2025 16:04:14 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v1] libcamera: pipeline: rpi: Do not clear request\n\tmetadata anymore","To":"libcamera-devel@lists.libcamera.org","References":"<20250626082235.1845316-1-barnabas.pocze@ideasonboard.com>","Content-Language":"en-US","From":"Dan Scally <dan.scally@ideasonboard.com>","Autocrypt":"addr=dan.scally@ideasonboard.com; keydata=\n\txsFNBGLydlEBEADa5O2s0AbUguprfvXOQun/0a8y2Vk6BqkQALgeD6KnXSWwaoCULp18etYW\n\tB31bfgrdphXQ5kUQibB0ADK8DERB4wrzrUb5CMxLBFE7mQty+v5NsP0OFNK9XTaAOcmD+Ove\n\teIjYvqurAaro91jrRVrS1gBRxIFqyPgNvwwL+alMZhn3/2jU2uvBmuRrgnc/e9cHKiuT3Dtq\n\tMHGPKL2m+plk+7tjMoQFfexoQ1JKugHAjxAhJfrkXh6uS6rc01bYCyo7ybzg53m1HLFJdNGX\n\tsUKR+dQpBs3SY4s66tc1sREJqdYyTsSZf80HjIeJjU/hRunRo4NjRIJwhvnK1GyjOvvuCKVU\n\tRWpY8dNjNu5OeAfdrlvFJOxIE9M8JuYCQTMULqd1NuzbpFMjc9524U3Cngs589T7qUMPb1H1\n\tNTA81LmtJ6Y+IV5/kiTUANflpzBwhu18Ok7kGyCq2a2jsOcV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\n\tFHRpGadlNzKDE3fEdoMobxHB3Lm6FDml5GyBAA8+dQYVI0oDwJ3gpZPZ0J5Vx9RbqXe8RDuR\n\tdu90hvCJkq7/tzSQ0GeD3BwXb9/R/A4dVXhaDd91Q1qQXidI+2jwhx8iqiYxbT+DoAUkQRQy\n\txBtoCM1CxH7u45URUgD//fxYr3D4B1SlonA6vdaEdHZOGwECnDpTxecENMbz/Bx7qfrmd901\n\tD+N9SjIwrbVhhSyUXYnSUb8F+9g2RDY42Sk7GcYxIeON4VzKqWM7hpkXZ47pkK0YodO+dRKM\n\tyMcoUWrTK0Uz6UzUGKoJVbxmSW/EJLEGoI5p3NWxWtScEVv8mO49gqQdrRIOheZycDmHnItt\n\t9Qjv00uFhEwv2YfiyGk6iGF2W40s2pH2t6oeuGgmiZ7g6d0MEK8Ql/4zPItvr1c1rpwpXUC1\n\tu1kQWgtnNjFHX3KiYdqjcZeRBiry1X0zY+4Y24wUU0KsEewJwjhmCKAsju1RpdlPg2kC","In-Reply-To":"<20250626082235.1845316-1-barnabas.pocze@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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>"}}]