[{"id":37872,"web_url":"https://patchwork.libcamera.org/comment/37872/","msgid":"<857bt9wyzs.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-01-22T13:36:23","subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Barnabás,\n\nthank you for the patch.\n\nBarnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n\n> When calling `Debayer::process()` from `SoftwareIsp::process()`, the\n> `DebayerParams` object is copied multiple time:\n>\n>   (1) call of `BoundMethodMember<...>::activate()`\n>       inside `Object::invokeMethod()`\n>   (2) constructor of `BoundMethodArgs<...>`\n>       inside `BoundMethodMember<...>::activate()`\n>   (3) call of `BoundMethodMember<...>::invoke()`\n>       inside `BoundMethodArgs::invokePack()`\n>   (4) call of the actual pointer to member function\n>       inside `BoundMethodMember::invoke()`\n>\n> Given that the type has a size of 5696 bytes at the moment on x86-64,\n> while the size is expected to shrink considerably and compilers might\n> avoid one or two of the above copies, this is still not ideal. By making\n> `Debayer::process()` take the parameter object by const lvalue reference,\n> only the copy in the `BoundMethodArgs` constructor remains. So do that.\n\nWhy RFC?  Looks like harmless cleanup.\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  src/libcamera/software_isp/debayer.cpp     | 2 +-\n>  src/libcamera/software_isp/debayer.h       | 4 ++--\n>  src/libcamera/software_isp/debayer_cpu.cpp | 2 +-\n>  src/libcamera/software_isp/debayer_cpu.h   | 2 +-\n>  src/libcamera/software_isp/debayer_egl.cpp | 6 +++---\n>  src/libcamera/software_isp/debayer_egl.h   | 6 +++---\n>  6 files changed, 11 insertions(+), 11 deletions(-)\n>\n> diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\n> index 65a1762dd..3e7702525 100644\n> --- a/src/libcamera/software_isp/debayer.cpp\n> +++ b/src/libcamera/software_isp/debayer.cpp\n> @@ -401,7 +401,7 @@ Debayer::~Debayer()\n>   * \\brief Select the bayer params to use for the next frame debayer\n>   * \\param[in] params The parameters to be used in debayering\n>   */\n> -void Debayer::setParams(DebayerParams &params)\n> +void Debayer::setParams(const DebayerParams &params)\n>  {\n>  \tgreen_ = params.green;\n>  \tgreenCcm_ = params.greenCcm;\n> diff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\n> index cd2db9930..99e22ed85 100644\n> --- a/src/libcamera/software_isp/debayer.h\n> +++ b/src/libcamera/software_isp/debayer.h\n> @@ -47,7 +47,7 @@ public:\n>  \tvirtual std::tuple<unsigned int, unsigned int>\n>  \tstrideAndFrameSize(const PixelFormat &outputFormat, const Size &size) = 0;\n>  \n> -\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params) = 0;\n> +\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params) = 0;\n>  \tvirtual int start() { return 0; }\n>  \tvirtual void stop() {}\n>  \n> @@ -92,7 +92,7 @@ private:\n>  \tvirtual Size patternSize(PixelFormat inputFormat) = 0;\n>  \n>  protected:\n> -\tvoid setParams(DebayerParams &params);\n> +\tvoid setParams(const DebayerParams &params);\n>  \tvoid dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *input, FrameBuffer *output);\n>  \tstatic bool isStandardBayerOrder(BayerFormat::Order order);\n>  };\n> diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\n> index 00738c56b..b52f4d5c7 100644\n> --- a/src/libcamera/software_isp/debayer_cpu.cpp\n> +++ b/src/libcamera/software_isp/debayer_cpu.cpp\n> @@ -740,7 +740,7 @@ void DebayerCpu::process4(uint32_t frame, const uint8_t *src, uint8_t *dst)\n>  \t}\n>  }\n>  \n> -void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params)\n> +void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params)\n>  {\n>  \tbench_.startFrame();\n>  \n> diff --git a/src/libcamera/software_isp/debayer_cpu.h b/src/libcamera/software_isp/debayer_cpu.h\n> index 67df2b93a..27eff021d 100644\n> --- a/src/libcamera/software_isp/debayer_cpu.h\n> +++ b/src/libcamera/software_isp/debayer_cpu.h\n> @@ -37,7 +37,7 @@ public:\n>  \tstd::vector<PixelFormat> formats(PixelFormat input);\n>  \tstd::tuple<unsigned int, unsigned int>\n>  \tstrideAndFrameSize(const PixelFormat &outputFormat, const Size &size);\n> -\tvoid process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params);\n> +\tvoid process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params);\n>  \tSizeRange sizes(PixelFormat inputFormat, const Size &inputSize);\n>  \tconst SharedFD &getStatsFD() { return stats_->getStatsFD(); }\n>  \n> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\n> index 9693d7252..1ac162427 100644\n> --- a/src/libcamera/software_isp/debayer_egl.cpp\n> +++ b/src/libcamera/software_isp/debayer_egl.cpp\n> @@ -386,7 +386,7 @@ DebayerEGL::strideAndFrameSize(const PixelFormat &outputFormat, const Size &size\n>  \treturn std::make_tuple(stride, stride * size.height);\n>  }\n>  \n> -void DebayerEGL::setShaderVariableValues(DebayerParams &params)\n> +void DebayerEGL::setShaderVariableValues(const DebayerParams &params)\n>  {\n>  \t/*\n>  \t * Raw Bayer 8-bit, and packed raw Bayer 10-bit/12-bit formats\n> @@ -509,7 +509,7 @@ void DebayerEGL::setShaderVariableValues(DebayerParams &params)\n>  \treturn;\n>  }\n>  \n> -int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, DebayerParams &params)\n> +int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, const DebayerParams &params)\n>  {\n>  \t/* eGL context switch */\n>  \tegl_.makeCurrent();\n> @@ -536,7 +536,7 @@ int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, DebayerParams &par\n>  \treturn 0;\n>  }\n>  \n> -void DebayerEGL::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params)\n> +void DebayerEGL::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params)\n>  {\n>  \tbench_.startFrame();\n>  \n> diff --git a/src/libcamera/software_isp/debayer_egl.h b/src/libcamera/software_isp/debayer_egl.h\n> index a5033bc63..790348249 100644\n> --- a/src/libcamera/software_isp/debayer_egl.h\n> +++ b/src/libcamera/software_isp/debayer_egl.h\n> @@ -50,7 +50,7 @@ public:\n>  \tstd::vector<PixelFormat> formats(PixelFormat input);\n>  \tstd::tuple<unsigned int, unsigned int> strideAndFrameSize(const PixelFormat &outputFormat, const Size &size);\n>  \n> -\tvoid process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params);\n> +\tvoid process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params);\n>  \tint start();\n>  \tvoid stop();\n>  \n> @@ -72,9 +72,9 @@ private:\n>  \t\t\t\t std::vector<std::string> shaderEnv);\n>  \tint linkShaderProgram(void);\n>  \tint getShaderVariableLocations();\n> -\tvoid setShaderVariableValues(DebayerParams &params);\n> +\tvoid setShaderVariableValues(const DebayerParams &params);\n>  \tvoid configureTexture(GLuint &texture);\n> -\tint debayerGPU(MappedFrameBuffer &in, int out_fd, DebayerParams &params);\n> +\tint debayerGPU(MappedFrameBuffer &in, int out_fd, const DebayerParams &params);\n>  \n>  \t/* Shader program identifiers */\n>  \tGLuint vertexShaderId_ = 0;","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 0BB98C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 13:36:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3CD0F61FC7;\n\tThu, 22 Jan 2026 14:36:31 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C1E4C61F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 14:36:29 +0100 (CET)","from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n\t[209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-127-STZP8dpFPweJC2PE6ZYIhQ-1; Thu, 22 Jan 2026 08:36:27 -0500","by mail-wm1-f72.google.com with SMTP id\n\t5b1f17b1804b1-4801e9e7159so10579815e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 05:36:27 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-480470401cbsm71365045e9.4.2026.01.22.05.36.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 22 Jan 2026 05:36:24 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"Ds3u3+ZV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1769088988;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=5o1lqnFQJzcJWqGuIKQt3yJOVznZkTakGgbpkCMiLtg=;\n\tb=Ds3u3+ZVaipSzR443SncJo1aRZlfKBOW77i+kMbbjlwRs8g4O2pIPqnZPHhPGjB8L479G/\n\tWrtBZC398Dp+w317h8ovU/IInihMipvBcFq68SdN6gbyT1v2AagHJAIG5V4f+JUbjx3+wo\n\tvuY3GQMFaaFfExJRJVO5lZ5PhF7bxgk=","X-MC-Unique":"STZP8dpFPweJC2PE6ZYIhQ-1","X-Mimecast-MFC-AGG-ID":"STZP8dpFPweJC2PE6ZYIhQ_1769088986","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1769088985; x=1769693785;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=xcAgbn05coVvuoLiJRrjh8RD1WI6tyh2OPVBbCGOj5Q=;\n\tb=rZ0raSIDeJC0Z/9d1XMc1QK5znmyx4AesvBILgr250UeARieKrgY3IkjI7SFNCrV4d\n\tx+12rfMH+X8QCP59cCfiJ36KjU/zxaY9KxGPKYIeeZBEvbq7KQk+IYfLlyCqilaYc6V1\n\tsKadmb7kgf7lYODcJPVTofVkhIX49fpn/Df3/GUeqEbjNoOGnSn61Mm6LzRVYPybwtkQ\n\tiqFJkET7NalN1oDd12kPefru8GuH30V+bUbcP88kd2prT+jZv93TEUb0s8/TQs35onQd\n\tWs4YnR3CB/Qqv6e89AEBRuTwbYIX72Ckevtn/sikvj+xXFgzJaon7UDr+FEXCh11sPFt\n\tANaA==","X-Gm-Message-State":"AOJu0Yyfr0015+1GNrjD+56r2/FhjqE+yI32WVaMtbH8zonnKRGugIKD\n\tt3qBN1uWeZpgiB+BzySUhmtu4JoxRHNRyWGYBJVnB0yY3DU0oaUVtz6O32p9fRwPraBg4V+Yn0i\n\trL7+8T2a82lRJg6t33hkHjZVHltPDtb1vR2kARuEtqjWVUP7psTEhsdeVv+MUizYrKw+5AjnsSo\n\tK1wlEoFyFnZK6uqQXhW1AkNDsbEFi9eOBGw/L25ysL9MGBICxNrjT/pM2+s90=","X-Gm-Gg":"AZuq6aIGEOmvyvDnCnOaMdSc4bDtlHJQF1hxSgKDZFwkxo9HA+gXMADeXYR7y8LCNCm\n\tzwSU+uiyf3D2p1XwmZ/jzig2wkJjUlJwQ+rZu5bgstNqTR2LtfrvP3CUP9JlDYHIod7gptMf8+b\n\tZ4zmn5G8MgVV3vDsuvF8zVMLg+ys0QsniXR6baE0HsA6hm79IvELCprbB5UnxtK8AONyG1DX+R7\n\tZq+7IsL9ZduJZl0+25eZSEtSv3J5TKJccVlpVwvfr/OlwkVNKyQFxUULrHxXScnGMgxZ8ME+qUR\n\tFa72v6X9wpQRt4vo4O3zXDdTHriL9mo+SSjJT2g+ax5YIZyPZbW1eZG5S3b4swwTRHmaCKUCcHX\n\t3wzUWllV9dw544V4+m5oeVkfzs0HcvXjbnPyKtwCzFx3p9G2+ALCrYR33CqfC+ag=","X-Received":["by 2002:a05:600c:3b90:b0:471:700:f281 with SMTP id\n\t5b1f17b1804b1-4803e7f0d72mr144023435e9.25.1769088985373; \n\tThu, 22 Jan 2026 05:36:25 -0800 (PST)","by 2002:a05:600c:3b90:b0:471:700:f281 with SMTP id\n\t5b1f17b1804b1-4803e7f0d72mr144022935e9.25.1769088984858; \n\tThu, 22 Jan 2026 05:36:24 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","In-Reply-To":"<20260120170701.400944-1-barnabas.pocze@ideasonboard.com> (\n\t=?utf-8?b?IkJhcm5hYsOhcyBQxZFjemUiJ3M=?= message of \"Tue,\n\t20 Jan 2026  18:07:01 +0100\")","References":"<20260120170701.400944-1-barnabas.pocze@ideasonboard.com>","Date":"Thu, 22 Jan 2026 14:36:23 +0100","Message-ID":"<857bt9wyzs.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"-MPSHYxhaLhP2GXfq9FJNREm04UKYYKNBtpu1gLNd3E_1769088986","X-Mimecast-Originator":"redhat.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":37874,"web_url":"https://patchwork.libcamera.org/comment/37874/","msgid":"<85343xwyil.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-01-22T13:46:42","subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Milan Zamazal <mzamazal@redhat.com> writes:\n\n> Hi Barnabás,\n>\n> thank you for the patch.\n>\n> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n>\n>> When calling `Debayer::process()` from `SoftwareIsp::process()`, the\n>> `DebayerParams` object is copied multiple time:\n>>\n>>   (1) call of `BoundMethodMember<...>::activate()`\n>>       inside `Object::invokeMethod()`\n>>   (2) constructor of `BoundMethodArgs<...>`\n>>       inside `BoundMethodMember<...>::activate()`\n>>   (3) call of `BoundMethodMember<...>::invoke()`\n>>       inside `BoundMethodArgs::invokePack()`\n>>   (4) call of the actual pointer to member function\n>>       inside `BoundMethodMember::invoke()`\n>>\n>> Given that the type has a size of 5696 bytes at the moment on x86-64,\n>> while the size is expected to shrink considerably and compilers might\n>> avoid one or two of the above copies, this is still not ideal. By making\n>> `Debayer::process()` take the parameter object by const lvalue reference,\n>> only the copy in the `BoundMethodArgs` constructor remains. So do that.\n>\n> Why RFC?  Looks like harmless cleanup.\n>\n> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n>\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> ---\n>>  src/libcamera/software_isp/debayer.cpp     | 2 +-\n>>  src/libcamera/software_isp/debayer.h       | 4 ++--\n>>  src/libcamera/software_isp/debayer_cpu.cpp | 2 +-\n>>  src/libcamera/software_isp/debayer_cpu.h   | 2 +-\n>>  src/libcamera/software_isp/debayer_egl.cpp | 6 +++---\n>>  src/libcamera/software_isp/debayer_egl.h   | 6 +++---\n>>  6 files changed, 11 insertions(+), 11 deletions(-)\n>>\n>> diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\n>> index 65a1762dd..3e7702525 100644\n>> --- a/src/libcamera/software_isp/debayer.cpp\n>> +++ b/src/libcamera/software_isp/debayer.cpp\n>> @@ -401,7 +401,7 @@ Debayer::~Debayer()\n>>   * \\brief Select the bayer params to use for the next frame debayer\n>>   * \\param[in] params The parameters to be used in debayering\n>>   */\n>> -void Debayer::setParams(DebayerParams &params)\n>> +void Debayer::setParams(const DebayerParams &params)\n>>  {\n>>  \tgreen_ = params.green;\n>>  \tgreenCcm_ = params.greenCcm;\n>> diff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\n>> index cd2db9930..99e22ed85 100644\n>> --- a/src/libcamera/software_isp/debayer.h\n>> +++ b/src/libcamera/software_isp/debayer.h\n>> @@ -47,7 +47,7 @@ public:\n>>  \tvirtual std::tuple<unsigned int, unsigned int>\n>>  \tstrideAndFrameSize(const PixelFormat &outputFormat, const Size &size) = 0;\n>>  \n>> -\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params) = 0;\n>> +\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params) = 0;\n\nWell, this looks risky and I think it's better to avoid.\n\n>>  \tvirtual int start() { return 0; }\n>>  \tvirtual void stop() {}\n>>  \n>> @@ -92,7 +92,7 @@ private:\n>>  \tvirtual Size patternSize(PixelFormat inputFormat) = 0;\n>>  \n>>  protected:\n>> -\tvoid setParams(DebayerParams &params);\n>> +\tvoid setParams(const DebayerParams &params);\n>>  \tvoid dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *input, FrameBuffer *output);\n>>  \tstatic bool isStandardBayerOrder(BayerFormat::Order order);\n>>  };\n>> diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\n>> index 00738c56b..b52f4d5c7 100644\n>> --- a/src/libcamera/software_isp/debayer_cpu.cpp\n>> +++ b/src/libcamera/software_isp/debayer_cpu.cpp\n>> @@ -740,7 +740,7 @@ void DebayerCpu::process4(uint32_t frame, const uint8_t *src, uint8_t *dst)\n>>  \t}\n>>  }\n>>  \n>> -void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params)\n>> +void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params)\n>>  {\n>>  \tbench_.startFrame();\n>>  \n>> diff --git a/src/libcamera/software_isp/debayer_cpu.h b/src/libcamera/software_isp/debayer_cpu.h\n>> index 67df2b93a..27eff021d 100644\n>> --- a/src/libcamera/software_isp/debayer_cpu.h\n>> +++ b/src/libcamera/software_isp/debayer_cpu.h\n>> @@ -37,7 +37,7 @@ public:\n>>  \tstd::vector<PixelFormat> formats(PixelFormat input);\n>>  \tstd::tuple<unsigned int, unsigned int>\n>>  \tstrideAndFrameSize(const PixelFormat &outputFormat, const Size &size);\n>> -\tvoid process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params);\n>> +\tvoid process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params);\n>>  \tSizeRange sizes(PixelFormat inputFormat, const Size &inputSize);\n>>  \tconst SharedFD &getStatsFD() { return stats_->getStatsFD(); }\n>>  \n>> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\n>> index 9693d7252..1ac162427 100644\n>> --- a/src/libcamera/software_isp/debayer_egl.cpp\n>> +++ b/src/libcamera/software_isp/debayer_egl.cpp\n>> @@ -386,7 +386,7 @@ DebayerEGL::strideAndFrameSize(const PixelFormat &outputFormat, const Size &size\n>>  \treturn std::make_tuple(stride, stride * size.height);\n>>  }\n>>  \n>> -void DebayerEGL::setShaderVariableValues(DebayerParams &params)\n>> +void DebayerEGL::setShaderVariableValues(const DebayerParams &params)\n>>  {\n>>  \t/*\n>>  \t * Raw Bayer 8-bit, and packed raw Bayer 10-bit/12-bit formats\n>> @@ -509,7 +509,7 @@ void DebayerEGL::setShaderVariableValues(DebayerParams &params)\n>>  \treturn;\n>>  }\n>>  \n>> -int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, DebayerParams &params)\n>> +int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, const DebayerParams &params)\n>>  {\n>>  \t/* eGL context switch */\n>>  \tegl_.makeCurrent();\n>> @@ -536,7 +536,7 @@ int DebayerEGL::debayerGPU(MappedFrameBuffer &in, int out_fd, DebayerParams &par\n>>  \treturn 0;\n>>  }\n>>  \n>> -void DebayerEGL::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params)\n>> +void DebayerEGL::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params)\n>>  {\n>>  \tbench_.startFrame();\n>>  \n>> diff --git a/src/libcamera/software_isp/debayer_egl.h b/src/libcamera/software_isp/debayer_egl.h\n>> index a5033bc63..790348249 100644\n>> --- a/src/libcamera/software_isp/debayer_egl.h\n>> +++ b/src/libcamera/software_isp/debayer_egl.h\n>> @@ -50,7 +50,7 @@ public:\n>>  \tstd::vector<PixelFormat> formats(PixelFormat input);\n>>  \tstd::tuple<unsigned int, unsigned int> strideAndFrameSize(const PixelFormat &outputFormat, const Size &size);\n>>  \n>> -\tvoid process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params);\n>> +\tvoid process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params);\n>>  \tint start();\n>>  \tvoid stop();\n>>  \n>> @@ -72,9 +72,9 @@ private:\n>>  \t\t\t\t std::vector<std::string> shaderEnv);\n>>  \tint linkShaderProgram(void);\n>>  \tint getShaderVariableLocations();\n>> -\tvoid setShaderVariableValues(DebayerParams &params);\n>> +\tvoid setShaderVariableValues(const DebayerParams &params);\n>>  \tvoid configureTexture(GLuint &texture);\n>> -\tint debayerGPU(MappedFrameBuffer &in, int out_fd, DebayerParams &params);\n>> +\tint debayerGPU(MappedFrameBuffer &in, int out_fd, const DebayerParams &params);\n>>  \n>>  \t/* Shader program identifiers */\n>>  \tGLuint vertexShaderId_ = 0;","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 B2820BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 13:46:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E41AD61FC4;\n\tThu, 22 Jan 2026 14:46:48 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D3F8661F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 14:46:47 +0100 (CET)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n\t[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-468-s5RHat1OPjqzFgvP7wgvMA-1; Thu, 22 Jan 2026 08:46:45 -0500","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-47ee432070aso7816315e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 05:46:45 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-48042453863sm58315345e9.0.2026.01.22.05.46.42\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 22 Jan 2026 05:46:43 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"ibTl4FXR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1769089606;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=q6cw5hvAQzivSL1+eVk4fVvDlqD4LJ03bd4JXyTXpZ0=;\n\tb=ibTl4FXRr7PNkSmx5iBFM5+TJQYAS3w9D/yhgIp72V7s1iEgctyzRqqSw5mnbz/3KJDIJs\n\tlBesbIiLnVJJheqe0yyjQmDtvkJrcdxBDzCvJmKWq3xLeUK16PHzVpIoiXWcm1cnnmaQae\n\txQEC6ZiyKfYBLVfLRZuS8CRm1z6q0oo=","X-MC-Unique":"s5RHat1OPjqzFgvP7wgvMA-1","X-Mimecast-MFC-AGG-ID":"s5RHat1OPjqzFgvP7wgvMA_1769089604","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1769089604; x=1769694404;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=0wf41s6FjahP9rsr5PK4xU0EKFe5V661o+gPo1JBjTQ=;\n\tb=r3XU0/GU5spo+pI3kBfN/3FRwLMWJLcAuXL6d1sCS7uK4Wx9dXiFN8SdH2jE6Iqqak\n\tLjigNHiE8/Ksr7d5cDTSbOlimqwUY4dpO0Ks/o+FHhaviNyeulCEXst6Cjs9VAyJ9qhI\n\t7N5RrhVSY/JbJe9KB0egTG956JCkIgl5eXl4faEJOYkVPvgzNPLUCH3TxH95IPyOkbz8\n\tbGlCxEb5MXVGQR0hpt2yvA4NLaze+yS198D5wsP4a5jaVuxsmy7BAINKMlZUAejd4L19\n\tmqWfu9n/a1rckD6Kzq+M9bpcZA8zvDodhJN1UwWvun+/liSeaE6otS3xhfHktmEWygy/\n\tn6Jg==","X-Gm-Message-State":"AOJu0YzMW4AjHNofG+xc6NtoUCkTBdKtYswIWGu2XtzQKHlFYh4JA3aw\n\tQoIXhWxjQMmi8vwVoRGkrWhpX/ny+OGoMpgiah60tK1LqQZGwBox4OBgZniGhGyX48FUln07cwd\n\tx+OidpvowQoMxyVM3rWEFhKR44wLF5JJm9tOlS60lgGut49vbk1DXPUFUL2/Vo8qRfaArtfQXJd\n\t1tmriQLydMnTJ0n8VOeYdMnugdKQ6RhHfuCFlhrZG5NnQDv7ImXZULvbV89V4=","X-Gm-Gg":"AZuq6aK4525GVGNDpb5RIv7wYWWEuq/0G7QaTd/T5aArrZ7FRcYe3EGt/i9/FWqunRw\n\tpVbsb8VXhkna0KZRGEz/OPLtJisUbCZm9XYDN4A9SsNuZ0ybQwg14SJu16swSSo1lu76/kdhprO\n\tWS2pQArkTWAz82SP+hUASkRfB8aH8IwrFj5FiriTtBt4sCJC8kRMaGkCvIPed+oVfOlhU4RxUyr\n\tAvZ0Mj00VgxIGBXINIM0xKuMzEoCqTnTqgV2iGhGMkQWHVnwZZAbdFPRobl9DgMtfUfhUp7g4dW\n\tYckwoKCTdEakDIgmeA+/LNgB34ktBm0M8wRPgDk50DF8k0fKzQ0r+Kal9AFAdKQENNzTnmeFcIS\n\tiPV9xwwx0gCuwXJvV98hawhAFfn52C4APADYibeRdP1JGIKlkQS5D48BHr373VAI=","X-Received":["by 2002:a05:600c:34d6:b0:47e:e20e:bbb7 with SMTP id\n\t5b1f17b1804b1-4801eb1080amr316889535e9.25.1769089604149; \n\tThu, 22 Jan 2026 05:46:44 -0800 (PST)","by 2002:a05:600c:34d6:b0:47e:e20e:bbb7 with SMTP id\n\t5b1f17b1804b1-4801eb1080amr316889045e9.25.1769089603605; \n\tThu, 22 Jan 2026 05:46:43 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","In-Reply-To":"<857bt9wyzs.fsf@mzamazal-thinkpadp1gen7.tpbc.csb> (Milan\n\tZamazal's message of \"Thu, 22 Jan 2026 14:36:23 +0100\")","References":"<20260120170701.400944-1-barnabas.pocze@ideasonboard.com>\n\t<857bt9wyzs.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Date":"Thu, 22 Jan 2026 14:46:42 +0100","Message-ID":"<85343xwyil.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"6gcijef6Rzpph_QMcc4PI4jfONjBZilwSWycE1qb0cU_1769089604","X-Mimecast-Originator":"redhat.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":37875,"web_url":"https://patchwork.libcamera.org/comment/37875/","msgid":"<2c06803e-1a0c-43d8-bddc-65eecc42e533@ideasonboard.com>","date":"2026-01-22T13:49:33","subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 01. 22. 14:46 keltezéssel, Milan Zamazal írta:\n> Milan Zamazal <mzamazal@redhat.com> writes:\n> \n>> Hi Barnabás,\n>>\n>> thank you for the patch.\n>>\n>> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n>>\n>>> When calling `Debayer::process()` from `SoftwareIsp::process()`, the\n>>> `DebayerParams` object is copied multiple time:\n>>>\n>>>    (1) call of `BoundMethodMember<...>::activate()`\n>>>        inside `Object::invokeMethod()`\n>>>    (2) constructor of `BoundMethodArgs<...>`\n>>>        inside `BoundMethodMember<...>::activate()`\n>>>    (3) call of `BoundMethodMember<...>::invoke()`\n>>>        inside `BoundMethodArgs::invokePack()`\n>>>    (4) call of the actual pointer to member function\n>>>        inside `BoundMethodMember::invoke()`\n>>>\n>>> Given that the type has a size of 5696 bytes at the moment on x86-64,\n>>> while the size is expected to shrink considerably and compilers might\n>>> avoid one or two of the above copies, this is still not ideal. By making\n>>> `Debayer::process()` take the parameter object by const lvalue reference,\n>>> only the copy in the `BoundMethodArgs` constructor remains. So do that.\n>>\n>> Why RFC?  Looks like harmless cleanup.\n>>\n>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n>>\n>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>>> ---\n>>>   src/libcamera/software_isp/debayer.cpp     | 2 +-\n>>>   src/libcamera/software_isp/debayer.h       | 4 ++--\n>>>   src/libcamera/software_isp/debayer_cpu.cpp | 2 +-\n>>>   src/libcamera/software_isp/debayer_cpu.h   | 2 +-\n>>>   src/libcamera/software_isp/debayer_egl.cpp | 6 +++---\n>>>   src/libcamera/software_isp/debayer_egl.h   | 6 +++---\n>>>   6 files changed, 11 insertions(+), 11 deletions(-)\n>>>\n>>> diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\n>>> index 65a1762dd..3e7702525 100644\n>>> --- a/src/libcamera/software_isp/debayer.cpp\n>>> +++ b/src/libcamera/software_isp/debayer.cpp\n>>> @@ -401,7 +401,7 @@ Debayer::~Debayer()\n>>>    * \\brief Select the bayer params to use for the next frame debayer\n>>>    * \\param[in] params The parameters to be used in debayering\n>>>    */\n>>> -void Debayer::setParams(DebayerParams &params)\n>>> +void Debayer::setParams(const DebayerParams &params)\n>>>   {\n>>>   \tgreen_ = params.green;\n>>>   \tgreenCcm_ = params.greenCcm;\n>>> diff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\n>>> index cd2db9930..99e22ed85 100644\n>>> --- a/src/libcamera/software_isp/debayer.h\n>>> +++ b/src/libcamera/software_isp/debayer.h\n>>> @@ -47,7 +47,7 @@ public:\n>>>   \tvirtual std::tuple<unsigned int, unsigned int>\n>>>   \tstrideAndFrameSize(const PixelFormat &outputFormat, const Size &size) = 0;\n>>>   \n>>> -\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params) = 0;\n>>> +\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params) = 0;\n> \n> Well, this looks risky and I think it's better to avoid.\n\nHow so?\n\n\n> \n>>>   \tvirtual int start() { return 0; }\n>>>   \tvirtual void stop() {}\n>>>   \n>>> @@ -92,7 +92,7 @@ private:\n>>>   \tvirtual Size patternSize(PixelFormat inputFormat) = 0;\n>>>   \n>>>   protected:\n>>> -\tvoid setParams(DebayerParams &params);\n>>> +\tvoid setParams(const DebayerParams &params);\n>>>   \tvoid dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *input, FrameBuffer *output);\n>>>   \tstatic bool isStandardBayerOrder(BayerFormat::Order order);\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 DA3A0C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 13:49:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3933961FC4;\n\tThu, 22 Jan 2026 14:49:37 +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 6B49D61F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 14:49:36 +0100 (CET)","from [192.168.33.25] (185.221.143.114.nat.pool.zt.hu\n\t[185.221.143.114])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B4D90460;\n\tThu, 22 Jan 2026 14:49:03 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"UsNdZ8fI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769089743;\n\tbh=7nayz8E+7x6MLMxkMQAd8v1ieYqdSHsP7nb2caEepsc=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=UsNdZ8fIhsMrOuXRP+22lSvB6wtiYkGsxYuz2xTIkumA8R7RyHquimsjyzfbGHVb2\n\t5n9QoZb6Z3DY1sRjqlm3SmD1+NVLoLERWZaLJ7A8jjIE9OE9W/4B06DofgRTRSJrkm\n\tEGfyVGWhyT6JSAruvbuAWWvMaucM5XCqNz/KQ9/E=","Message-ID":"<2c06803e-1a0c-43d8-bddc-65eecc42e533@ideasonboard.com>","Date":"Thu, 22 Jan 2026 14:49:33 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260120170701.400944-1-barnabas.pocze@ideasonboard.com>\n\t<857bt9wyzs.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<85343xwyil.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<85343xwyil.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","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":37879,"web_url":"https://patchwork.libcamera.org/comment/37879/","msgid":"<85pl71vg3n.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-01-22T15:09:48","subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n\n> 2026. 01. 22. 14:46 keltezéssel, Milan Zamazal írta:\n>> Milan Zamazal <mzamazal@redhat.com> writes:\n>> \n>\n>>> Hi Barnabás,\n>>>\n>>> thank you for the patch.\n>>>\n>>> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n>>>\n>>>> When calling `Debayer::process()` from `SoftwareIsp::process()`, the\n>>>> `DebayerParams` object is copied multiple time:\n>>>>\n>>>>    (1) call of `BoundMethodMember<...>::activate()`\n>>>>        inside `Object::invokeMethod()`\n>>>>    (2) constructor of `BoundMethodArgs<...>`\n>>>>        inside `BoundMethodMember<...>::activate()`\n>>>>    (3) call of `BoundMethodMember<...>::invoke()`\n>>>>        inside `BoundMethodArgs::invokePack()`\n>>>>    (4) call of the actual pointer to member function\n>>>>        inside `BoundMethodMember::invoke()`\n>>>>\n>>>> Given that the type has a size of 5696 bytes at the moment on x86-64,\n>>>> while the size is expected to shrink considerably and compilers might\n>>>> avoid one or two of the above copies, this is still not ideal. By making\n>>>> `Debayer::process()` take the parameter object by const lvalue reference,\n>>>> only the copy in the `BoundMethodArgs` constructor remains. So do that.\n>>>\n>>> Why RFC?  Looks like harmless cleanup.\n>>>\n>>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n>>>\n>>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>>>> ---\n>>>>   src/libcamera/software_isp/debayer.cpp     | 2 +-\n>>>>   src/libcamera/software_isp/debayer.h       | 4 ++--\n>>>>   src/libcamera/software_isp/debayer_cpu.cpp | 2 +-\n>>>>   src/libcamera/software_isp/debayer_cpu.h   | 2 +-\n>>>>   src/libcamera/software_isp/debayer_egl.cpp | 6 +++---\n>>>>   src/libcamera/software_isp/debayer_egl.h   | 6 +++---\n>>>>   6 files changed, 11 insertions(+), 11 deletions(-)\n>>>>\n>>>> diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\n>>>> index 65a1762dd..3e7702525 100644\n>>>> --- a/src/libcamera/software_isp/debayer.cpp\n>>>> +++ b/src/libcamera/software_isp/debayer.cpp\n>>>> @@ -401,7 +401,7 @@ Debayer::~Debayer()\n>>>>    * \\brief Select the bayer params to use for the next frame debayer\n>>>>    * \\param[in] params The parameters to be used in debayering\n>>>>    */\n>>>> -void Debayer::setParams(DebayerParams &params)\n>>>> +void Debayer::setParams(const DebayerParams &params)\n>>>>   {\n>>>>   \tgreen_ = params.green;\n>>>>   \tgreenCcm_ = params.greenCcm;\n>>>> diff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\n>>>> index cd2db9930..99e22ed85 100644\n>>>> --- a/src/libcamera/software_isp/debayer.h\n>>>> +++ b/src/libcamera/software_isp/debayer.h\n>>>> @@ -47,7 +47,7 @@ public:\n>>>>   \tvirtual std::tuple<unsigned int, unsigned int>\n>>>>   \tstrideAndFrameSize(const PixelFormat &outputFormat, const Size &size) = 0;\n>>>>   -\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams\n>>>> params) = 0;\n>>>> +\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params) = 0;\n>> Well, this looks risky and I think it's better to avoid.\n>\n> How so?\n\nIf debayering and algorithms run asynchronously and we don't have clear\nguarantees that params don't change while debayering can still consume\nthem, we can get a subtle bug.  Saving the copying wouldn't be worth the\nrisk.\n\n>> \n>>>>   \tvirtual int start() { return 0; }\n>>>>   \tvirtual void stop() {}\n>>>>   @@ -92,7 +92,7 @@ private:\n>>>>   \tvirtual Size patternSize(PixelFormat inputFormat) = 0;\n>>>>     protected:\n>>>> -\tvoid setParams(DebayerParams &params);\n>>>> +\tvoid setParams(const DebayerParams &params);\n>>>>   \tvoid dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *input, FrameBuffer *output);\n>>>>   \tstatic bool isStandardBayerOrder(BayerFormat::Order order);\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 48F5DBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 15:09:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 63DEF61FC9;\n\tThu, 22 Jan 2026 16:09:56 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 150B961F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 16:09:54 +0100 (CET)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n\t[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-376-XNAFxKggN_m3iNYVZB7Ozw-1; Thu, 22 Jan 2026 10:09:51 -0500","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-47d3c9b8c56so19446445e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 07:09:51 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-480470403d3sm76014005e9.5.2026.01.22.07.09.48\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 22 Jan 2026 07:09:48 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"DyhGxNrN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1769094593;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=NS3Wfj9YXw8ptJJHitZxDU/e4GSWy+u7WlOwj0R5DuM=;\n\tb=DyhGxNrNbScUU6refDAcdsGZa/AFu3ouP4lCDELwuNhvs0L7kUzDzcrFXB7qcjlmxJiz9A\n\tnc7Qg0rrfA3mlDWhyhKZ+VzNb3Sl+mSRN+xZnCJArRMCRwcUFHJ/kZtFut/9zCbQqTl17+\n\tt6S5258hak3AWhRAtu18m7r1tVBUm2k=","X-MC-Unique":"XNAFxKggN_m3iNYVZB7Ozw-1","X-Mimecast-MFC-AGG-ID":"XNAFxKggN_m3iNYVZB7Ozw_1769094591","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1769094590; x=1769699390;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=DK7GzV0vjRO3xL8ASFLXxYtF3L+ktYjB5MlpsS+bGKQ=;\n\tb=c+cBWM2q63y/RKog2k4GVYyOB0E+mj5HR+3wafMvda4myHRpbvqWeIRFAVBcDgl7qm\n\t5ecmiHlKMKOug8w2cOxivTY+TJkgF7JG9ToLAi6NjTk8Yc0IffrAHAVR8kpmsU1vN+qJ\n\tikFZng2Y/t7QXXeHeA2wy+1cKu4d0NPEjCXcLbaVC+obevvOmFd2DgdCtmlsZuB6yCmZ\n\tY7laTJIBAD1X0d4JYThCticnJzL0btsaQi+Gs4/NcQl7b0Nw029OQT9T9RLtWA+Euq5q\n\tUpF1J1CgJxADs0tS5xQUl+rBbxKyyCLQ/LO6FUxm3+n6/zRIzBUJ9vExV5yT1qq5TYU9\n\tZmTw==","X-Gm-Message-State":"AOJu0YyrXhjUHfJtYOw9+fbvzbyMrW1vSeTB1Rk2apWwlkQRiFh3gMhh\n\t1wD8e9oZLWDLgZxmYbN1DDNXxT3949KkC0detlNWAdujbuDtQzOrsrYr4A4288qGHlI0c9nmT/7\n\tRaExI1wqLOadnXbLjNN0f1MJLuaPuymWfOZWQ2JsIIkhmx6JNmjkEMvFhw+Z5XE/aVvxmiiOf+W\n\tWy9hGX5dZ9lq3j7TwCUBptLRvhVDzC4zXtlj1eVeRUvOm7wreLNcCi68VROy8=","X-Gm-Gg":"AZuq6aK31CfFHEOxpTb0bKdLzn2rAAdDun+5VhlAGE29XmD7AN4d9j1q7lj71Jot0I3\n\tUFwWAJ/WONIpbKuY3VfllRRZWFQIWOPM9MkqgE3BcSs68D9ED61Jl1NNmcYM5wA0d5yZk/9l7Aj\n\tBKNko+zshwahg74d3v/sPxg4bFG3EbZC840487p15wsbBpCpIkiFB5sz+TaWwr1o6zHC5rj+ENS\n\tSLw2LbV4eT+OTSk/nXTr8HivIFhBDcEodN/I4qD7Rrxjvp2mkRUOB0kJ5I+1KZ7PlsqRaH4srmz\n\tc9+5CWgNXR/rCEy9h8wNbPwrQiKKkgmC4aZYFnu3S8BaS99MKZgVy+6To7ojnkphPQJIqU0WtZU\n\tAPvJZ51TgvWpSzPTq/HN9H0TqTHpFXaVSIaeu4tqFEDOAwe0CmGNDLbyGEbyvGx4=","X-Received":["by 2002:a05:600c:37c8:b0:477:af07:dd21 with SMTP id\n\t5b1f17b1804b1-4801eb0d71cmr288184725e9.25.1769094589954; \n\tThu, 22 Jan 2026 07:09:49 -0800 (PST)","by 2002:a05:600c:37c8:b0:477:af07:dd21 with SMTP id\n\t5b1f17b1804b1-4801eb0d71cmr288184125e9.25.1769094589422; \n\tThu, 22 Jan 2026 07:09:49 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","In-Reply-To":"<2c06803e-1a0c-43d8-bddc-65eecc42e533@ideasonboard.com> (\n\t=?utf-8?b?IkJhcm5hYsOhcyBQxZFjemUiJ3M=?= message of \"Thu,\n\t22 Jan 2026  14:49:33 +0100\")","References":"<20260120170701.400944-1-barnabas.pocze@ideasonboard.com>\n\t<857bt9wyzs.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<85343xwyil.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<2c06803e-1a0c-43d8-bddc-65eecc42e533@ideasonboard.com>","Date":"Thu, 22 Jan 2026 16:09:48 +0100","Message-ID":"<85pl71vg3n.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"EzuD5WY1D6BLbsvQmRGmuzUPGfTcOFrWK-bxB4ZT3PE_1769094591","X-Mimecast-Originator":"redhat.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":37880,"web_url":"https://patchwork.libcamera.org/comment/37880/","msgid":"<8bd7148d-df10-4bbe-95a1-adc80b842e18@ideasonboard.com>","date":"2026-01-22T15:18:35","subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 01. 22. 16:09 keltezéssel, Milan Zamazal írta:\n> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n> \n>> 2026. 01. 22. 14:46 keltezéssel, Milan Zamazal írta:\n>>> Milan Zamazal <mzamazal@redhat.com> writes:\n>>>\n>>\n>>>> Hi Barnabás,\n>>>>\n>>>> thank you for the patch.\n>>>>\n>>>> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n>>>>\n>>>>> When calling `Debayer::process()` from `SoftwareIsp::process()`, the\n>>>>> `DebayerParams` object is copied multiple time:\n>>>>>\n>>>>>     (1) call of `BoundMethodMember<...>::activate()`\n>>>>>         inside `Object::invokeMethod()`\n>>>>>     (2) constructor of `BoundMethodArgs<...>`\n>>>>>         inside `BoundMethodMember<...>::activate()`\n>>>>>     (3) call of `BoundMethodMember<...>::invoke()`\n>>>>>         inside `BoundMethodArgs::invokePack()`\n>>>>>     (4) call of the actual pointer to member function\n>>>>>         inside `BoundMethodMember::invoke()`\n>>>>>\n>>>>> Given that the type has a size of 5696 bytes at the moment on x86-64,\n>>>>> while the size is expected to shrink considerably and compilers might\n>>>>> avoid one or two of the above copies, this is still not ideal. By making\n>>>>> `Debayer::process()` take the parameter object by const lvalue reference,\n>>>>> only the copy in the `BoundMethodArgs` constructor remains. So do that.\n>>>>\n>>>> Why RFC?  Looks like harmless cleanup.\n>>>>\n>>>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n>>>>\n>>>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>>>>> ---\n>>>>>    src/libcamera/software_isp/debayer.cpp     | 2 +-\n>>>>>    src/libcamera/software_isp/debayer.h       | 4 ++--\n>>>>>    src/libcamera/software_isp/debayer_cpu.cpp | 2 +-\n>>>>>    src/libcamera/software_isp/debayer_cpu.h   | 2 +-\n>>>>>    src/libcamera/software_isp/debayer_egl.cpp | 6 +++---\n>>>>>    src/libcamera/software_isp/debayer_egl.h   | 6 +++---\n>>>>>    6 files changed, 11 insertions(+), 11 deletions(-)\n>>>>>\n>>>>> diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\n>>>>> index 65a1762dd..3e7702525 100644\n>>>>> --- a/src/libcamera/software_isp/debayer.cpp\n>>>>> +++ b/src/libcamera/software_isp/debayer.cpp\n>>>>> @@ -401,7 +401,7 @@ Debayer::~Debayer()\n>>>>>     * \\brief Select the bayer params to use for the next frame debayer\n>>>>>     * \\param[in] params The parameters to be used in debayering\n>>>>>     */\n>>>>> -void Debayer::setParams(DebayerParams &params)\n>>>>> +void Debayer::setParams(const DebayerParams &params)\n>>>>>    {\n>>>>>    \tgreen_ = params.green;\n>>>>>    \tgreenCcm_ = params.greenCcm;\n>>>>> diff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\n>>>>> index cd2db9930..99e22ed85 100644\n>>>>> --- a/src/libcamera/software_isp/debayer.h\n>>>>> +++ b/src/libcamera/software_isp/debayer.h\n>>>>> @@ -47,7 +47,7 @@ public:\n>>>>>    \tvirtual std::tuple<unsigned int, unsigned int>\n>>>>>    \tstrideAndFrameSize(const PixelFormat &outputFormat, const Size &size) = 0;\n>>>>>    -\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams\n>>>>> params) = 0;\n>>>>> +\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params) = 0;\n>>> Well, this looks risky and I think it's better to avoid.\n>>\n>> How so?\n> \n> If debayering and algorithms run asynchronously and we don't have clear\n> guarantees that params don't change while debayering can still consume\n> them, we can get a subtle bug.  Saving the copying wouldn't be worth the\n> risk.\n\nOne copy still remains.\n\nvoid SoftwareIsp::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output)\n{\n\tipa_->computeParams(frame);\n\tdebayer_->invokeMethod(&Debayer::process,\n\t\t\t       ConnectionTypeQueued, frame, input, output, debayerParams_);\n}\n\nhere `Object::invokeMethod()` will make a copy of the `DebayerParams` object:\n\n  * Arguments \\a args passed by value or reference are copied, while pointers\n  * are passed untouched. The caller shall ensure that any pointer argument\n  * remains valid until the method is invoked.\n\nso I am fairly certain this should cause no issues. It mostly gets\nrid of the copies that happen inside the cross-thread calling mechanism.\nBut there will still be one copy inside `invokeMethod()`.\n\n\n> \n>>>\n>>>>>    \tvirtual int start() { return 0; }\n>>>>>    \tvirtual void stop() {}\n>>>>>    @@ -92,7 +92,7 @@ private:\n>>>>>    \tvirtual Size patternSize(PixelFormat inputFormat) = 0;\n>>>>>      protected:\n>>>>> -\tvoid setParams(DebayerParams &params);\n>>>>> +\tvoid setParams(const DebayerParams &params);\n>>>>>    \tvoid dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *input, FrameBuffer *output);\n>>>>>    \tstatic bool isStandardBayerOrder(BayerFormat::Order order);\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 901A0C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 15:18:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AA0AD61FC4;\n\tThu, 22 Jan 2026 16:18:40 +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 0937561F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 16:18:40 +0100 (CET)","from [192.168.33.25] (185.221.143.114.nat.pool.zt.hu\n\t[185.221.143.114])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B421F460;\n\tThu, 22 Jan 2026 16:18:06 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"rqyjcNuG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769095087;\n\tbh=/NY2jc7lTury638QlvSfKKYvOSeV4a/e2EL1uGVH4Rw=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=rqyjcNuGKe5MQ825Zgqlj4rZ2MXoi32AjIiM0CozIHx5MsCcoZrFY8MIx/gFiaz+8\n\t5Sz4uWLjbA5QAx0tQsfpM1Lw4m9vMNvbtcL/8elahHRdYYKWt6o9YWsKiO2eiIzZUw\n\th6te8N26RXnGPEUKSxpv1zEj66uFgZxMpyU742cE=","Message-ID":"<8bd7148d-df10-4bbe-95a1-adc80b842e18@ideasonboard.com>","Date":"Thu, 22 Jan 2026 16:18:35 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260120170701.400944-1-barnabas.pocze@ideasonboard.com>\n\t<857bt9wyzs.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<85343xwyil.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<2c06803e-1a0c-43d8-bddc-65eecc42e533@ideasonboard.com>\n\t<85pl71vg3n.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<85pl71vg3n.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","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":37881,"web_url":"https://patchwork.libcamera.org/comment/37881/","msgid":"<85ldhpvfa4.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-01-22T15:27:31","subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n\n> 2026. 01. 22. 16:09 keltezéssel, Milan Zamazal írta:\n>> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n>> \n>\n>>> 2026. 01. 22. 14:46 keltezéssel, Milan Zamazal írta:\n>>>> Milan Zamazal <mzamazal@redhat.com> writes:\n>>>>\n>>>\n>>>>> Hi Barnabás,\n>>>>>\n>>>>> thank you for the patch.\n>>>>>\n>>>>> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n>>>>>\n>>>>>> When calling `Debayer::process()` from `SoftwareIsp::process()`, the\n>>>>>> `DebayerParams` object is copied multiple time:\n>>>>>>\n>>>>>>     (1) call of `BoundMethodMember<...>::activate()`\n>>>>>>         inside `Object::invokeMethod()`\n>>>>>>     (2) constructor of `BoundMethodArgs<...>`\n>>>>>>         inside `BoundMethodMember<...>::activate()`\n>>>>>>     (3) call of `BoundMethodMember<...>::invoke()`\n>>>>>>         inside `BoundMethodArgs::invokePack()`\n>>>>>>     (4) call of the actual pointer to member function\n>>>>>>         inside `BoundMethodMember::invoke()`\n>>>>>>\n>>>>>> Given that the type has a size of 5696 bytes at the moment on x86-64,\n>>>>>> while the size is expected to shrink considerably and compilers might\n>>>>>> avoid one or two of the above copies, this is still not ideal. By making\n>>>>>> `Debayer::process()` take the parameter object by const lvalue reference,\n>>>>>> only the copy in the `BoundMethodArgs` constructor remains. So do that.\n>>>>>\n>>>>> Why RFC?  Looks like harmless cleanup.\n>>>>>\n>>>>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n>>>>>\n>>>>>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>>>>>> ---\n>>>>>>    src/libcamera/software_isp/debayer.cpp     | 2 +-\n>>>>>>    src/libcamera/software_isp/debayer.h       | 4 ++--\n>>>>>>    src/libcamera/software_isp/debayer_cpu.cpp | 2 +-\n>>>>>>    src/libcamera/software_isp/debayer_cpu.h   | 2 +-\n>>>>>>    src/libcamera/software_isp/debayer_egl.cpp | 6 +++---\n>>>>>>    src/libcamera/software_isp/debayer_egl.h   | 6 +++---\n>>>>>>    6 files changed, 11 insertions(+), 11 deletions(-)\n>>>>>>\n>>>>>> diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\n>>>>>> index 65a1762dd..3e7702525 100644\n>>>>>> --- a/src/libcamera/software_isp/debayer.cpp\n>>>>>> +++ b/src/libcamera/software_isp/debayer.cpp\n>>>>>> @@ -401,7 +401,7 @@ Debayer::~Debayer()\n>>>>>>     * \\brief Select the bayer params to use for the next frame debayer\n>>>>>>     * \\param[in] params The parameters to be used in debayering\n>>>>>>     */\n>>>>>> -void Debayer::setParams(DebayerParams &params)\n>>>>>> +void Debayer::setParams(const DebayerParams &params)\n>>>>>>    {\n>>>>>>    \tgreen_ = params.green;\n>>>>>>    \tgreenCcm_ = params.greenCcm;\n>>>>>> diff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\n>>>>>> index cd2db9930..99e22ed85 100644\n>>>>>> --- a/src/libcamera/software_isp/debayer.h\n>>>>>> +++ b/src/libcamera/software_isp/debayer.h\n>>>>>> @@ -47,7 +47,7 @@ public:\n>>>>>>    \tvirtual std::tuple<unsigned int, unsigned int>\n>>>>>>    \tstrideAndFrameSize(const PixelFormat &outputFormat, const Size &size) = 0;\n>>>>>>    -\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams\n>>>>>> params) = 0;\n>>>>>> +\tvirtual void process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, const DebayerParams &params) = 0;\n>>>> Well, this looks risky and I think it's better to avoid.\n>>>\n>>> How so?\n>> If debayering and algorithms run asynchronously and we don't have clear\n>> guarantees that params don't change while debayering can still consume\n>> them, we can get a subtle bug.  Saving the copying wouldn't be worth the\n>> risk.\n>\n> One copy still remains.\n>\n> void SoftwareIsp::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output)\n> {\n> \tipa_->computeParams(frame);\n> \tdebayer_->invokeMethod(&Debayer::process,\n> \t\t\t       ConnectionTypeQueued, frame, input, output, debayerParams_);\n> }\n>\n> here `Object::invokeMethod()` will make a copy of the `DebayerParams` object:\n>\n>  * Arguments \\a args passed by value or reference are copied, while pointers\n>  * are passed untouched. The caller shall ensure that any pointer argument\n>  * remains valid until the method is invoked.\n>\n> so I am fairly certain this should cause no issues. It mostly gets\n> rid of the copies that happen inside the cross-thread calling mechanism.\n> But there will still be one copy inside `invokeMethod()`.\n\nAh, right, thank you for clarification.  Sorry for the noise and not\nreading the commit message carefully enough.\n\n>> \n>>>>\n>>>>>>    \tvirtual int start() { return 0; }\n>>>>>>    \tvirtual void stop() {}\n>>>>>>    @@ -92,7 +92,7 @@ private:\n>>>>>>    \tvirtual Size patternSize(PixelFormat inputFormat) = 0;\n>>>>>>      protected:\n>>>>>> -\tvoid setParams(DebayerParams &params);\n>>>>>> +\tvoid setParams(const DebayerParams &params);\n>>>>>>    \tvoid dmaSyncBegin(std::vector<DmaSyncer> &dmaSyncers, FrameBuffer *input, FrameBuffer *output);\n>>>>>>    \tstatic bool isStandardBayerOrder(BayerFormat::Order order);\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 AA9ACBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 15:27:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EDD6561F84;\n\tThu, 22 Jan 2026 16:27:39 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E101F61F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 16:27:37 +0100 (CET)","from mail-wm1-f69.google.com (mail-wm1-f69.google.com\n\t[209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-373-MCATC1OKO2eQEkan2dVzuw-1; Thu, 22 Jan 2026 10:27:35 -0500","by mail-wm1-f69.google.com with SMTP id\n\t5b1f17b1804b1-47edee0b11cso6459645e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 07:27:35 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-435ab458d85sm5710007f8f.26.2026.01.22.07.27.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 22 Jan 2026 07:27:32 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"HKsAJOEQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1769095656;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=nzxEt9IY+PVLKOQ5wF8ETLUIy68qs9tkslzG8u5cMtA=;\n\tb=HKsAJOEQqedcqzN2MJrVvGqc3goJSwKm8WI2QtWOA/Ro2CTby1CJzDNxD7IDccwcOhcvZY\n\tiPOPzI4qPPq1j4la3wk5H6A8YuIzo5IE9irFKes/qD6bowAbxAdjq+BIPDvo5I2iz2Giw7\n\tGoeIacz3Qvg04xKZAD8EBiMNVggnPNM=","X-MC-Unique":"MCATC1OKO2eQEkan2dVzuw-1","X-Mimecast-MFC-AGG-ID":"MCATC1OKO2eQEkan2dVzuw_1769095654","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1769095654; x=1769700454;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=CrkYHcj5Q6X6ztfmwZb+RmJLj8gKEK8r75VDjK6ymh0=;\n\tb=M2o3GFSldHU2YozSIcELc8mMYYvK/a/iGQ9WKHlC2LF0CcrRDzyYKMZoNeEZ34W+g3\n\tZPHFuNmn/JiWKlMyeTwd09gAPOuR3+rm2cPWPXGA3ogbPSE93DzYEeD1Mlwfslflyzj3\n\tcSph52rnNP8VtlwTy7R57OGvS05PCbBIuQp5yL3BS4tzfEOrsMjHJpg1FxcPQhIwjQo+\n\tVqbWOJ8UuYVo4Vz1B9LgNlE7zJ+QKr9zuHCoiCcFkmr3EEg2u9U8eeiMPmZjTqrL1mvf\n\tejBbNXxJkQYX9zlV1DYZ8gtexqDRRFVbozI4D5RYD1JJkRLZLOXZJ7ZJT86FKLLejpsX\n\tzc2g==","X-Gm-Message-State":"AOJu0YzXgYtHSteZuyu+V4ZMZuT+LAxb1sZIT6ETZo6tztoUQ87mIkZ7\n\txjfG3l2Ld0K3Su3JW87wdxY920HRAlNtOduIN8tOVnz6rojWReZ+2fheUMFDpAd86tYr9Qwue87\n\tLmN+8MlBjBhqTy9nOYJ05rVTFAD6g0ugiQkoLfXoJIHL5uEsxsEa7mh8wz6eIhJLEdOkNUmeybD\n\tS9QLHLZe3fReByHHufbLruwlNjZ67YW0s7QfZ8WNcxGEitZmmnIRI/gl+t9v8=","X-Gm-Gg":"AZuq6aJlmPtiLY/7mhAoTmL/R337kPYDoD9EetAds5/+Ty7CcrO+d7Z/o19QA3n6Zuk\n\tMYm0qHqw1aQeohRINjbDDFdyQteSNqzY6969h/c5zpSzKnN7bTnY+kB+ov8WwTwm7JDC26T7bsZ\n\t30Jt9shuoo8wVQndd5ia4/8sZ8DRNhGWNE7Ir5frn3SYD4235QvxwkOW+9LyBCVIKcm2KiE6QEd\n\tIZ9edpL6Lgtf2SdWKKbPOO2a5GsxnOk5fSvIrlcpNiAxgQ567M6NME9T37Va5cfThfokrrlz9ta\n\t7PCyWfKLQshWCQba/Kj+hRkxxtxKFB8+Ei2gGUDbCKMNqljNzdvyOuE0NN23mJSVOrsYvLD7WLH\n\t4JrQ6Q6fUDIgMwtk5vY/EkFcuNApkPYk0jYgS6iQCY6XwDnwQ702no6YQyGso5cw=","X-Received":["by 2002:a05:600c:c16b:b0:47e:e78a:c831 with SMTP id\n\t5b1f17b1804b1-4801eb14ff0mr294650415e9.36.1769095653722; \n\tThu, 22 Jan 2026 07:27:33 -0800 (PST)","by 2002:a05:600c:c16b:b0:47e:e78a:c831 with SMTP id\n\t5b1f17b1804b1-4801eb14ff0mr294649885e9.36.1769095653243; \n\tThu, 22 Jan 2026 07:27:33 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","In-Reply-To":"<8bd7148d-df10-4bbe-95a1-adc80b842e18@ideasonboard.com> (\n\t=?utf-8?b?IkJhcm5hYsOhcyBQxZFjemUiJ3M=?= message of \"Thu,\n\t22 Jan 2026  16:18:35 +0100\")","References":"<20260120170701.400944-1-barnabas.pocze@ideasonboard.com>\n\t<857bt9wyzs.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<85343xwyil.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<2c06803e-1a0c-43d8-bddc-65eecc42e533@ideasonboard.com>\n\t<85pl71vg3n.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<8bd7148d-df10-4bbe-95a1-adc80b842e18@ideasonboard.com>","Date":"Thu, 22 Jan 2026 16:27:31 +0100","Message-ID":"<85ldhpvfa4.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"2rBk0BdIs_uw_prxSdpYzfHYUlLnhOYSK_HOwl-6L8M_1769095654","X-Mimecast-Originator":"redhat.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":37882,"web_url":"https://patchwork.libcamera.org/comment/37882/","msgid":"<2e9f5167-79f4-40bf-a5a8-7ce77ef4a23d@linaro.org>","date":"2026-01-22T15:54:45","subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 22/01/2026 15:18, Barnabás Pőcze wrote:\n> One copy still remains.\n> \n> void SoftwareIsp::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output)\n> {\n> \tipa_->computeParams(frame);\n> \tdebayer_->invokeMethod(&Debayer::process,\n> \t\t\t       ConnectionTypeQueued, frame, input, output, debayerParams_);\n> }\n\nWe should really have code we know to be thread-safe - or not - whatever \nthe case may be.\n\nA copy is a low-intervention version of thread synchronisation though.\n\nAssuming you've tested this with gpuisp.\n\nReviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n\n---\nbod","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 3E889C3220\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 15:54:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 698AF61FC4;\n\tThu, 22 Jan 2026 16:54:51 +0100 (CET)","from mail-wm1-x332.google.com (mail-wm1-x332.google.com\n\t[IPv6:2a00:1450:4864:20::332])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6CD8661F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 16:54:50 +0100 (CET)","by mail-wm1-x332.google.com with SMTP id\n\t5b1f17b1804b1-47edd6111b4so12778155e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 07:54:50 -0800 (PST)","from [192.168.0.40] (188-141-3-146.dynamic.upc.ie. [188.141.3.146])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4804703b59esm76872395e9.4.2026.01.22.07.54.48\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 22 Jan 2026 07:54:49 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"WoUnQfOi\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1769097290; x=1769702090;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=6FFU+Socn1ex8Tcf4j/6y67M3/Dubl9x1v4aeKNewQ0=;\n\tb=WoUnQfOifSTBUUF0wVnXTDT/72YmzuF+ytkinCnZIyLUXI+e2peuaDJ9KMR6qvpv+a\n\tA3l3cGtUhLkFAGmBdnVq7li56IgsGhyey2mgVoOLXSlbycxe0KX1xkpPQQkogpccFu7Y\n\tRKVdlfNZBO9/HR/RPrdwWLPzzz53IzYSbKHVs7eMw33k7FXJpw4qzKVWZWalHbHMR3Tj\n\tEj2q7EGHQ7PdKi9Jp+zU3BrerQsFsR/dprQdGrCe+QCpS7wXO5q/O2QfRgb8f5V1/chu\n\tnXn2txE4OBmvkbP6oTVV0lWzy1ZG2P06SoTbdhQ1KC1Jljav8iCtPRxezOXxT5IF0J9L\n\tScmQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1769097290; x=1769702090;\n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=6FFU+Socn1ex8Tcf4j/6y67M3/Dubl9x1v4aeKNewQ0=;\n\tb=WW1tB4K2PT3nFWhvOFyaPbcaa3mDpMokAA8gqy9fypxxiHXtA4Y/oqnpS+gCs3vUeM\n\tx9a4XHnCVerRzmuaZt6eS8fzUGL38/3a+9ZWTxhlSypLpjnwDgtfFv2b9NES3z2hAp0p\n\t6KPkQY+rAnkG9Fa3aNPVdCtFTiyGa8N/sgNY9lN03QdhyaYZl3kGmQVj2EzNkvSMuIVj\n\tyjdiWnp53A0l//86m6L9afoj9J2kBBwlokX2oUI5CEhugpUDu2RFdP/KsjvjGGZ+rRow\n\tbb2LBGzn8K0jBjgL+Nzn9WVP8QetHUymjH3UHvt3jHYuhEIwH6c/0iaen78CeR6//Ifb\n\tay5A==","X-Gm-Message-State":"AOJu0YwV5MN/ctSzvH8LN1K/PqKyZX1T2Ak5bMeyq6OHYxFTg2y3r5Hx\n\t25yiW2C6Zq6weIPLKMGmlOmP9UMs3gJdu4Vi5QiQHJPMG3tR/X3uQMDoE19oQ9UGUVUYPvneR4t\n\trtTe4","X-Gm-Gg":"AZuq6aKnVD9nz6ByjgQRF8A/7AXuo2uPeIz8YXk67LJJtv+oioxcabcW6hqNVU5qg+v\n\tfaNyNkB0WaQetoOelgrTT/XWA7s/4Rt2vMgzgSVEv3anIDPs4hBZrY+s0S9JZlmklAlUUwOw1KB\n\tBrh59FZVy0Cfv3ZaSEGyXW3L+OzsJ1+BmOD/QyCKRhuVXSTh2XUKmM62OuwWRDWI/L5+yPppoLC\n\t5fjcawLMNB15Pd7WDgiy/sjdTbmY2P48HanCFNZF046Hnrec0nJzKinoYArrOBtWZDZmNqOYOC/\n\tp6tmD4I5KLdw/LduHHIfqgyuxoABLMHcROlH2uHX32HPqwfWxCeBdRuDAXd7z1LyA/ajGflC8P8\n\tkJh/kxOhcPFgLiBXnyXzZtmH5y9RJmJ1yQ+LIW5qXGVOOz9/nErB+VlCIQ4gj9tVBMQELThPe0H\n\tP6KKTC2Bz1vVEv6WQJmKECKjVzcwW6QsQA6GO05ozExjmSGpct8GZ7","X-Received":"by 2002:a05:600c:3b20:b0:477:63b5:7148 with SMTP id\n\t5b1f17b1804b1-4804c94c3f3mr1452805e9.6.1769097289828; \n\tThu, 22 Jan 2026 07:54:49 -0800 (PST)","Message-ID":"<2e9f5167-79f4-40bf-a5a8-7ce77ef4a23d@linaro.org>","Date":"Thu, 22 Jan 2026 15:54:45 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v1] libcamera: software_isp: debayer: Take\n\t`DebayerParams` by ref","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tMilan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260120170701.400944-1-barnabas.pocze@ideasonboard.com>\n\t<857bt9wyzs.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<85343xwyil.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<2c06803e-1a0c-43d8-bddc-65eecc42e533@ideasonboard.com>\n\t<85pl71vg3n.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<R0I9njoFSmbS6fu9KIBh3U9LTI-10LnEe8N7eNKTFnYMD3FlG3jXlMxgHOagnjZQ3UUnQoDsn5c2JLWz2HWsrA==@protonmail.internalid>\n\t<8bd7148d-df10-4bbe-95a1-adc80b842e18@ideasonboard.com>","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Content-Language":"en-US","In-Reply-To":"<8bd7148d-df10-4bbe-95a1-adc80b842e18@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>"}}]