[{"id":39780,"web_url":"https://patchwork.libcamera.org/comment/39780/","msgid":"<85qzkwuxpc.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-07-21T16:14:23","subject":"Re: [PATCH v2] libcamera: debayer: Use helpers for strides and\n\tframe sizes","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Robert,\n\nthank you for the cleanup.\n\nRobert Mader <robert.mader@collabora.com> writes:\n\n> Clean up some open-coded logic, making the code shorter, more generic\n> and easier to follow.\n>\n> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n>\n> ---\n>\n> Changes in v2:\n>  - remove bpp docs to fix CI\n> ---\n>  src/libcamera/software_isp/debayer.cpp     |  3 ---\n>  src/libcamera/software_isp/debayer.h       |  1 -\n>  src/libcamera/software_isp/debayer_cpu.cpp | 29 +++-------------------\n>  src/libcamera/software_isp/debayer_cpu.h   |  1 -\n>  src/libcamera/software_isp/debayer_egl.cpp | 24 ++----------------\n>  src/libcamera/software_isp/debayer_egl.h   |  1 -\n>  6 files changed, 5 insertions(+), 54 deletions(-)\n>\n> diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\n> index 56446f55d..a4854e51b 100644\n> --- a/src/libcamera/software_isp/debayer.cpp\n> +++ b/src/libcamera/software_isp/debayer.cpp\n> @@ -192,9 +192,6 @@ Debayer::~Debayer()\n>   * Defines how the output of the debayer process is laid out in memory.\n>   * It includes per-pixel size, stride, and total frame size.\n>   *\n> - * \\var Debayer::DebayerOutputConfig::bpp\n> - * Bytes used per pixel in the output format.\n> - *\n>   * \\var Debayer::DebayerOutputConfig::stride\n>   * Line stride in bytes for the output frame.\n>   *\n> diff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\n> index 28f1b857b..556852260 100644\n> --- a/src/libcamera/software_isp/debayer.h\n> +++ b/src/libcamera/software_isp/debayer.h\n> @@ -69,7 +69,6 @@ public:\n>  \t};\n>  \n>  \tstruct DebayerOutputConfig {\n> -\t\tunsigned int bpp;\n>  \t\tunsigned int stride;\n>  \t\tunsigned int frameSize;\n>  \t};\n> diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\n> index 49382b4c2..25e9830c8 100644\n> --- a/src/libcamera/software_isp/debayer_cpu.cpp\n> +++ b/src/libcamera/software_isp/debayer_cpu.cpp\n> @@ -24,6 +24,7 @@\n>  \n>  #include \"libcamera/internal/bayer_format.h\"\n>  #include \"libcamera/internal/camera_manager.h\"\n> +#include \"libcamera/internal/formats.h\"\n>  #include \"libcamera/internal/framebuffer.h\"\n>  #include \"libcamera/internal/global_configuration.h\"\n>  #include \"libcamera/internal/mapped_framebuffer.h\"\n> @@ -474,24 +475,6 @@ int DebayerCpu::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf\n>  \treturn -EINVAL;\n>  }\n>  \n> -int DebayerCpu::getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config)\n> -{\n> -\tif (outputFormat == formats::RGB888 || outputFormat == formats::BGR888) {\n> -\t\tconfig.bpp = 24;\n> -\t\treturn 0;\n> -\t}\n> -\n> -\tif (outputFormat == formats::XRGB8888 || outputFormat == formats::ARGB8888 ||\n> -\t    outputFormat == formats::XBGR8888 || outputFormat == formats::ABGR8888) {\n> -\t\tconfig.bpp = 32;\n> -\t\treturn 0;\n> -\t}\n> -\n> -\tLOG(Debayer, Info)\n> -\t\t<< \"Unsupported output format \" << outputFormat.toString();\n> -\treturn -EINVAL;\n\nWhat to do about unsupported formats now?  I don't think this was\nhandled correctly in the original case.  But can we do better now?  Or\nsafely assume that anything that reaches debayering is a supported\nformat?\n\n> -}\n> -\n>  /*\n>   * Check for standard Bayer orders and set xShift_ and swap debayer0/1, so that\n>   * a single pair of BGGR debayer functions can be used for all 4 standard orders.\n> @@ -776,15 +759,9 @@ std::vector<PixelFormat> DebayerCpu::formats(PixelFormat inputFormat)\n>  std::tuple<unsigned int, unsigned int>\n>  DebayerCpu::strideAndFrameSize(const PixelFormat &outputFormat, const Size &size)\n>  {\n> -\tDebayerCpu::DebayerOutputConfig config;\n> -\n> -\tif (getOutputConfig(outputFormat, config) != 0)\n> -\t\treturn std::make_tuple(0, 0);\n> -\n>  \t/* round up to multiple of 8 for 64 bits alignment */\n> -\tunsigned int stride = (size.width * config.bpp / 8 + 7) & ~7;\n> -\n> -\treturn std::make_tuple(stride, stride * size.height);\n> +\tconst PixelFormatInfo &info = PixelFormatInfo::info(outputFormat);\n> +\treturn std::make_tuple(info.stride(size.width, 0, 8), info.frameSize(size, 8));\n>  }\n>  \n>  void DebayerCpuThread::setupInputMemcpy(const uint8_t *linePointers[])\n> diff --git a/src/libcamera/software_isp/debayer_cpu.h b/src/libcamera/software_isp/debayer_cpu.h\n> index 5281c65cb..2c88c9e1a 100644\n> --- a/src/libcamera/software_isp/debayer_cpu.h\n> +++ b/src/libcamera/software_isp/debayer_cpu.h\n> @@ -121,7 +121,6 @@ private:\n>  \tvoid debayer12P_RGRG_BGR888(uint8_t *dst, const uint8_t *src[]);\n>  \n>  \tstatic int getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config);\n> -\tstatic int getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config);\n>  \tint setupStandardBayerOrder(BayerFormat::Order order);\n>  \tint setDebayerFunctions(PixelFormat inputFormat,\n>  \t\t\t\tPixelFormat outputFormat,\n> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\n> index 02651fe87..24faf480d 100644\n> --- a/src/libcamera/software_isp/debayer_egl.cpp\n> +++ b/src/libcamera/software_isp/debayer_egl.cpp\n> @@ -96,20 +96,6 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf\n>  \treturn -EINVAL;\n>  }\n>  \n> -int DebayerEGL::getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config)\n> -{\n> -\tif (outputFormat == formats::XRGB8888 || outputFormat == formats::ARGB8888 ||\n> -\t    outputFormat == formats::XBGR8888 || outputFormat == formats::ABGR8888) {\n> -\t\tconfig.bpp = 32;\n> -\t\treturn 0;\n> -\t}\n> -\n> -\tLOG(Debayer, Info)\n> -\t\t<< \"Unsupported output format \" << outputFormat;\n> -\n> -\treturn -EINVAL;\n> -}\n> -\n>  int DebayerEGL::getShaderVariableLocations(void)\n>  {\n>  \tattributeVertex_ = glGetAttribLocation(programId_, \"vertexIn\");\n> @@ -374,15 +360,9 @@ std::vector<PixelFormat> DebayerEGL::formats(PixelFormat inputFormat)\n>  std::tuple<unsigned int, unsigned int>\n>  DebayerEGL::strideAndFrameSize(const PixelFormat &outputFormat, const Size &size)\n>  {\n> -\tDebayerEGL::DebayerOutputConfig config;\n> -\n> -\tif (getOutputConfig(outputFormat, config) != 0)\n> -\t\treturn std::make_tuple(0, 0);\n> -\n>  \t/* Align stride to 256 bytes as a generic GPU memory access alignment */\n> -\tunsigned int stride = libcamera::utils::alignUp(size.width * config.bpp / 8, 256);\n> -\n> -\treturn std::make_tuple(stride, stride * size.height);\n> +\tconst PixelFormatInfo &info = PixelFormatInfo::info(outputFormat);\n> +\treturn std::make_tuple(info.stride(size.width, 0, 256), info.frameSize(size, 256));\n>  }\n>  \n>  uint32_t DebayerEGL::preferredInputStride(const PixelFormat &inputFormat, const Size &size)\n> diff --git a/src/libcamera/software_isp/debayer_egl.h b/src/libcamera/software_isp/debayer_egl.h\n> index d6223f3a9..e613639f5 100644\n> --- a/src/libcamera/software_isp/debayer_egl.h\n> +++ b/src/libcamera/software_isp/debayer_egl.h\n> @@ -63,7 +63,6 @@ public:\n>  \n>  private:\n>  \tstatic int getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config);\n> -\tstatic int getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config);\n>  \tint initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat);\n>  \tint getShaderVariableLocations();\n>  \tvoid setShaderVariableValues(eGLImage &eGLImageIn, const DebayerParams &params);","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 96E28BDE4C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Jul 2026 16:14:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B128C67E7F;\n\tTue, 21 Jul 2026 18:14:31 +0200 (CEST)","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 13B146601C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Jul 2026 18:14:29 +0200 (CEST)","from mail-wr1-f71.google.com (mail-wr1-f71.google.com\n\t[209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-170--zKsyHDKMUKSMjMUq82XBQ-1; Tue, 21 Jul 2026 12:14:27 -0400","by mail-wr1-f71.google.com with SMTP id\n\tffacd0b85a97d-47eaa4006a1so2688615f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Jul 2026 09:14:27 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-4.net.vodafone.cz. [77.48.47.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-47f63e496afsm42058501f8f.1.2026.07.21.09.14.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 21 Jul 2026 09:14:24 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"bruDRWNi\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1784650469;\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\tin-reply-to:in-reply-to:references:references;\n\tbh=bDJE06iN03S3z3THzhz3jaKm+ggvEXNezaTU3qm2byk=;\n\tb=bruDRWNiU8lCmlZj3wP1FNImotCccoOLtOpn7SBiSMXGvWa1IUnsMpb0Qt0SGmt8oBpW59\n\t2F0w/WycDX9qt0c4nXTnDe7NuXH/TNUnoqdV+sKPPUsSxuO6t2vQUiRGWftr27CiesPo/e\n\t7gRwkAfu9qEIIQWsTSMQIcXyoiOdOu4=","X-MC-Unique":"-zKsyHDKMUKSMjMUq82XBQ-1","X-Mimecast-MFC-AGG-ID":"-zKsyHDKMUKSMjMUq82XBQ_1784650466","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1784650466; x=1785255266;\n\th=content-type:mime-version:user-agent:message-id:date:references\n\t:in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to\n\t:cc:subject:date:message-id:reply-to:content-type;\n\tbh=bDJE06iN03S3z3THzhz3jaKm+ggvEXNezaTU3qm2byk=;\n\tb=XwbSrUZpVy55KGQwquRdf2TJsnTOu0ldWmPtO9JE/M6ODi7495g+83QBhVZJDi7EFF\n\thClWP2z13WsDwfIRf3ekVlGwXvRjUvxdC7oIE/4T7p5SA7JTLgk3MXQEqC0AiAF0N+SO\n\tR38UTCeUn7z8AR6cmbTFEh16o8NR9oDQz/wXnHsZvwoOeolq66FG+VC1O6mDj6xNzQFh\n\tf1pvLSgw05DCGFKoOCN+BLevKN4ILxZY2/KCyoHOg4Q/QXdfJ55sPzQY9EpuD6gkiraY\n\tmiDOsL8eal7Qc06nd/P3RU2K6iNQxtw98fSiUPJXFjzqC3V0v94BLq4hG/JoCjHE2Tl0\n\t2vKQ==","X-Gm-Message-State":"AOJu0Yx9UmiwMpA0MyW1bkneOmdS7bo3CeZzZt1xIGSwiP4i7ZMY/yZy\n\tgXcG7DyOyHimcqHRYaYX53B0dMLToqOSuREWP2oxx8RNmvDkl5Iy8rGzg40hXstoKsntvBgjsdf\n\tXK7nrzgmFPT+dfqW+IlDtsF+CYQ6KbTQBz04VC06FsnkpsJbfrOkz5zBNmtEkVYx0bwUX0XLWr+\n\tMUS4lDhTb49TMDUmHU0tH0kDFkay5DwDv1R3g01Ny9S9O3ifhm//W/Znz5moo=","X-Gm-Gg":"AR+sD12wHQmxG4WucuRGbVGGvE4SATkNw71lcpfXmy5bXCDfLT/oevOILlqFzffrXiA\n\tkek2HdoS7gcO0WzGiu/ctu20PrrvWc69aRzPMyCLRmIDLA2ih7sjrkkTD7ADmrlOVMu6aBM9l+j\n\tn3N+07Firv+bAPqHUrCiNnBTcft6iKn6EVEYN6HEliVtq6k2lfmjdlRZQalqeomQgHsKaqz41dw\n\tCWrLWDF+i2pyj15x+pTQCDVxBRBl6Bk7DKw6kL/Sc0aWBTntL4ktS0UNS3mHeDRJCX4qko4Vr+a\n\tyAenPw3bslwpGGXuTXPS3txyxc8wlpULNWNmK3r8YPyao4mwrAXHnedvMsphayX6x9UxaRqZFkk\n\tggh2FQ/TojVBfA5yiZALDRnr5YmdxCZb/SIrHzb7bHMnVAOl8l+Qjgg==","X-Received":["by 2002:a5d:64e4:0:b0:475:f0c2:75b4 with SMTP id\n\tffacd0b85a97d-47f840d5732mr365667f8f.31.1784650465954; \n\tTue, 21 Jul 2026 09:14:25 -0700 (PDT)","by 2002:a5d:64e4:0:b0:475:f0c2:75b4 with SMTP id\n\tffacd0b85a97d-47f840d5732mr365585f8f.31.1784650465270; \n\tTue, 21 Jul 2026 09:14:25 -0700 (PDT)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] libcamera: debayer: Use helpers for strides and\n\tframe sizes","In-Reply-To":"<20260720113935.52936-1-robert.mader@collabora.com> (Robert\n\tMader's message of \"Mon, 20 Jul 2026 13:39:35 +0200\")","References":"<20260720113935.52936-1-robert.mader@collabora.com>","Date":"Tue, 21 Jul 2026 18:14:23 +0200","Message-ID":"<85qzkwuxpc.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":"eCqIBF0GoenSn-Xq_K8wCoQXY1Dg0SXM7qM8oC_4cbM_1784650466","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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":39781,"web_url":"https://patchwork.libcamera.org/comment/39781/","msgid":"<e414abc1-bced-402c-8792-ca987d3ccb7b@collabora.com>","date":"2026-07-21T16:41:51","subject":"Re: [PATCH v2] libcamera: debayer: Use helpers for strides and frame\n\tsizes","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Hi Milan, thanks for the feedback!\n\nOn 21.07.26 18:14, Milan Zamazal wrote:\n> Hi Robert,\n>\n> thank you for the cleanup.\n>\n> Robert Mader <robert.mader@collabora.com> writes:\n>\n>> Clean up some open-coded logic, making the code shorter, more generic\n>> and easier to follow.\n>>\n>> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n>>\n>> ---\n>>\n>> Changes in v2:\n>>   - remove bpp docs to fix CI\n>> ---\n>>   src/libcamera/software_isp/debayer.cpp     |  3 ---\n>>   src/libcamera/software_isp/debayer.h       |  1 -\n>>   src/libcamera/software_isp/debayer_cpu.cpp | 29 +++-------------------\n>>   src/libcamera/software_isp/debayer_cpu.h   |  1 -\n>>   src/libcamera/software_isp/debayer_egl.cpp | 24 ++----------------\n>>   src/libcamera/software_isp/debayer_egl.h   |  1 -\n>>   6 files changed, 5 insertions(+), 54 deletions(-)\n>>\n>> diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\n>> index 56446f55d..a4854e51b 100644\n>> --- a/src/libcamera/software_isp/debayer.cpp\n>> +++ b/src/libcamera/software_isp/debayer.cpp\n>> @@ -192,9 +192,6 @@ Debayer::~Debayer()\n>>    * Defines how the output of the debayer process is laid out in memory.\n>>    * It includes per-pixel size, stride, and total frame size.\n>>    *\n>> - * \\var Debayer::DebayerOutputConfig::bpp\n>> - * Bytes used per pixel in the output format.\n>> - *\n>>    * \\var Debayer::DebayerOutputConfig::stride\n>>    * Line stride in bytes for the output frame.\n>>    *\n>> diff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\n>> index 28f1b857b..556852260 100644\n>> --- a/src/libcamera/software_isp/debayer.h\n>> +++ b/src/libcamera/software_isp/debayer.h\n>> @@ -69,7 +69,6 @@ public:\n>>   \t};\n>>   \n>>   \tstruct DebayerOutputConfig {\n>> -\t\tunsigned int bpp;\n>>   \t\tunsigned int stride;\n>>   \t\tunsigned int frameSize;\n>>   \t};\n>> diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\n>> index 49382b4c2..25e9830c8 100644\n>> --- a/src/libcamera/software_isp/debayer_cpu.cpp\n>> +++ b/src/libcamera/software_isp/debayer_cpu.cpp\n>> @@ -24,6 +24,7 @@\n>>   \n>>   #include \"libcamera/internal/bayer_format.h\"\n>>   #include \"libcamera/internal/camera_manager.h\"\n>> +#include \"libcamera/internal/formats.h\"\n>>   #include \"libcamera/internal/framebuffer.h\"\n>>   #include \"libcamera/internal/global_configuration.h\"\n>>   #include \"libcamera/internal/mapped_framebuffer.h\"\n>> @@ -474,24 +475,6 @@ int DebayerCpu::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf\n>>   \treturn -EINVAL;\n>>   }\n>>   \n>> -int DebayerCpu::getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config)\n>> -{\n>> -\tif (outputFormat == formats::RGB888 || outputFormat == formats::BGR888) {\n>> -\t\tconfig.bpp = 24;\n>> -\t\treturn 0;\n>> -\t}\n>> -\n>> -\tif (outputFormat == formats::XRGB8888 || outputFormat == formats::ARGB8888 ||\n>> -\t    outputFormat == formats::XBGR8888 || outputFormat == formats::ABGR8888) {\n>> -\t\tconfig.bpp = 32;\n>> -\t\treturn 0;\n>> -\t}\n>> -\n>> -\tLOG(Debayer, Info)\n>> -\t\t<< \"Unsupported output format \" << outputFormat.toString();\n>> -\treturn -EINVAL;\n> What to do about unsupported formats now?  I don't think this was\n> handled correctly in the original case.  But can we do better now?  Or\n> safely assume that anything that reaches debayering is a supported\n> format?\n\nFirst of all that would require a pretty broken pipeline handler - in \nsimple.cpp we have\n\nconfig.outputFormats = swIsp_->formats(pixelFormat);\n\nensuring that only supported formats are set for an output config (AFAICS).\n\nSecondly we'd still fail in DebayerCpu::setDebayerFunctions() (called in \nconfigure(), just like strideAndFrameSize()) and \nDebayerEGL::initBayerShaders() (called in start() - i.e. slightly later \n/ not in configure()).\n\nSo a broken pipeline handler would fail slightly later in the GPU path. \nIf we want to be extra sure we could add a dedicated check in \nDebayerEGL::configure(), checking that outputCfg.pixelFormat is present \nin inputConfig_.outputFormats. I'm not fully convinced it's worth it, \nbut it's small and easy to add if you prefer.\n\nRegards\n\nRobert\n\n>> -}\n>> -\n>>   /*\n>>    * Check for standard Bayer orders and set xShift_ and swap debayer0/1, so that\n>>    * a single pair of BGGR debayer functions can be used for all 4 standard orders.\n>> @@ -776,15 +759,9 @@ std::vector<PixelFormat> DebayerCpu::formats(PixelFormat inputFormat)\n>>   std::tuple<unsigned int, unsigned int>\n>>   DebayerCpu::strideAndFrameSize(const PixelFormat &outputFormat, const Size &size)\n>>   {\n>> -\tDebayerCpu::DebayerOutputConfig config;\n>> -\n>> -\tif (getOutputConfig(outputFormat, config) != 0)\n>> -\t\treturn std::make_tuple(0, 0);\n>> -\n>>   \t/* round up to multiple of 8 for 64 bits alignment */\n>> -\tunsigned int stride = (size.width * config.bpp / 8 + 7) & ~7;\n>> -\n>> -\treturn std::make_tuple(stride, stride * size.height);\n>> +\tconst PixelFormatInfo &info = PixelFormatInfo::info(outputFormat);\n>> +\treturn std::make_tuple(info.stride(size.width, 0, 8), info.frameSize(size, 8));\n>>   }\n>>   \n>>   void DebayerCpuThread::setupInputMemcpy(const uint8_t *linePointers[])\n>> diff --git a/src/libcamera/software_isp/debayer_cpu.h b/src/libcamera/software_isp/debayer_cpu.h\n>> index 5281c65cb..2c88c9e1a 100644\n>> --- a/src/libcamera/software_isp/debayer_cpu.h\n>> +++ b/src/libcamera/software_isp/debayer_cpu.h\n>> @@ -121,7 +121,6 @@ private:\n>>   \tvoid debayer12P_RGRG_BGR888(uint8_t *dst, const uint8_t *src[]);\n>>   \n>>   \tstatic int getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config);\n>> -\tstatic int getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config);\n>>   \tint setupStandardBayerOrder(BayerFormat::Order order);\n>>   \tint setDebayerFunctions(PixelFormat inputFormat,\n>>   \t\t\t\tPixelFormat outputFormat,\n>> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\n>> index 02651fe87..24faf480d 100644\n>> --- a/src/libcamera/software_isp/debayer_egl.cpp\n>> +++ b/src/libcamera/software_isp/debayer_egl.cpp\n>> @@ -96,20 +96,6 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf\n>>   \treturn -EINVAL;\n>>   }\n>>   \n>> -int DebayerEGL::getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config)\n>> -{\n>> -\tif (outputFormat == formats::XRGB8888 || outputFormat == formats::ARGB8888 ||\n>> -\t    outputFormat == formats::XBGR8888 || outputFormat == formats::ABGR8888) {\n>> -\t\tconfig.bpp = 32;\n>> -\t\treturn 0;\n>> -\t}\n>> -\n>> -\tLOG(Debayer, Info)\n>> -\t\t<< \"Unsupported output format \" << outputFormat;\n>> -\n>> -\treturn -EINVAL;\n>> -}\n>> -\n>>   int DebayerEGL::getShaderVariableLocations(void)\n>>   {\n>>   \tattributeVertex_ = glGetAttribLocation(programId_, \"vertexIn\");\n>> @@ -374,15 +360,9 @@ std::vector<PixelFormat> DebayerEGL::formats(PixelFormat inputFormat)\n>>   std::tuple<unsigned int, unsigned int>\n>>   DebayerEGL::strideAndFrameSize(const PixelFormat &outputFormat, const Size &size)\n>>   {\n>> -\tDebayerEGL::DebayerOutputConfig config;\n>> -\n>> -\tif (getOutputConfig(outputFormat, config) != 0)\n>> -\t\treturn std::make_tuple(0, 0);\n>> -\n>>   \t/* Align stride to 256 bytes as a generic GPU memory access alignment */\n>> -\tunsigned int stride = libcamera::utils::alignUp(size.width * config.bpp / 8, 256);\n>> -\n>> -\treturn std::make_tuple(stride, stride * size.height);\n>> +\tconst PixelFormatInfo &info = PixelFormatInfo::info(outputFormat);\n>> +\treturn std::make_tuple(info.stride(size.width, 0, 256), info.frameSize(size, 256));\n>>   }\n>>   \n>>   uint32_t DebayerEGL::preferredInputStride(const PixelFormat &inputFormat, const Size &size)\n>> diff --git a/src/libcamera/software_isp/debayer_egl.h b/src/libcamera/software_isp/debayer_egl.h\n>> index d6223f3a9..e613639f5 100644\n>> --- a/src/libcamera/software_isp/debayer_egl.h\n>> +++ b/src/libcamera/software_isp/debayer_egl.h\n>> @@ -63,7 +63,6 @@ public:\n>>   \n>>   private:\n>>   \tstatic int getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config);\n>> -\tstatic int getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config);\n>>   \tint initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat);\n>>   \tint getShaderVariableLocations();\n>>   \tvoid setShaderVariableValues(eGLImage &eGLImageIn, const DebayerParams &params);","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 4D6FABDE17\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Jul 2026 16:42:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 598E167E72;\n\tTue, 21 Jul 2026 18:42:01 +0200 (CEST)","from sender4-op-o11.zoho.com (sender4-op-o11.zoho.com\n\t[136.143.188.11])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A07736601C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Jul 2026 18:41:59 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1784652114172126.42806134063585; \n\tTue, 21 Jul 2026 09:41:54 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"Fi0Zb2c5\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1784652116; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=e5gDHyfF6XdK3B4vZrkEWoXGcXmmwrN63oZB+WfXgXm9H0iY7U70tatCfcedeV0yOV2BClnwI4lToeANcTVkVHO2AQG6IOCHPiNctIDtyToME196X1G7dmtc3SzJ1Re6zCQY+pbNOKrYTGEnsLeofeInlQAlxd3VixrOddcnX2M=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1784652116;\n\th=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=iVesG6T+xTzLKrmq5JI5QyBZjWP7cVgezRf8ohMJE/o=; \n\tb=KmB+PYMfSBIzMMXlUx6aWZ8jHA5vO5qqls52EQ/7XcKi264LmetDjEqmV65DqXPWusYF8c7XX9/0YZxdv9ljt0mluO4Vtm9HbFcAU6PVvrHF01iLy/aynPY1G/zR7Empn+HjI8Ciuh645awMprDQnlcdII1jjYyStJR08Spe2Uc=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1784652116;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To;\n\tbh=iVesG6T+xTzLKrmq5JI5QyBZjWP7cVgezRf8ohMJE/o=;\n\tb=Fi0Zb2c5mOx4xBbSNPYf+1aQyfQvvLNPRoh6gblnlP3tuJvcp1v8o/6MBtN5ouVx\n\tS2VVpcT7xvXguD73Aw7hHIYDBCiSke8pSCAD9wBNl27i73u/YLqAXGq/2Ch9gfxSPV7\n\tb7wYuOdx8AN2KHiB6VHc0vlf58Jd2LhZhy6KSJ+w=","Message-ID":"<e414abc1-bced-402c-8792-ca987d3ccb7b@collabora.com>","Date":"Tue, 21 Jul 2026 18:41:51 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2] libcamera: debayer: Use helpers for strides and frame\n\tsizes","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20260720113935.52936-1-robert.mader@collabora.com>\n\t<85qzkwuxpc.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<85qzkwuxpc.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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":39782,"web_url":"https://patchwork.libcamera.org/comment/39782/","msgid":"<85mrvkulu3.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-07-21T20:30:44","subject":"Re: [PATCH v2] libcamera: debayer: Use helpers for strides and\n\tframe sizes","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Robert Mader <robert.mader@collabora.com> writes:\n\n> Hi Milan, thanks for the feedback!\n>\n> On 21.07.26 18:14, Milan Zamazal wrote:\n>> Hi Robert,\n>>\n>> thank you for the cleanup.\n>>\n>> Robert Mader <robert.mader@collabora.com> writes:\n>>\n>>> Clean up some open-coded logic, making the code shorter, more generic\n>>> and easier to follow.\n>>>\n>>> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n>>>\n>>> ---\n>>>\n>>> Changes in v2:\n>>>   - remove bpp docs to fix CI\n>>> ---\n>>>   src/libcamera/software_isp/debayer.cpp     |  3 ---\n>>>   src/libcamera/software_isp/debayer.h       |  1 -\n>>>   src/libcamera/software_isp/debayer_cpu.cpp | 29 +++-------------------\n>>>   src/libcamera/software_isp/debayer_cpu.h   |  1 -\n>>>   src/libcamera/software_isp/debayer_egl.cpp | 24 ++----------------\n>>>   src/libcamera/software_isp/debayer_egl.h   |  1 -\n>>>   6 files changed, 5 insertions(+), 54 deletions(-)\n>>>\n>>> diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\n>>> index 56446f55d..a4854e51b 100644\n>>> --- a/src/libcamera/software_isp/debayer.cpp\n>>> +++ b/src/libcamera/software_isp/debayer.cpp\n>>> @@ -192,9 +192,6 @@ Debayer::~Debayer()\n>>>    * Defines how the output of the debayer process is laid out in memory.\n>>>    * It includes per-pixel size, stride, and total frame size.\n>>>    *\n>>> - * \\var Debayer::DebayerOutputConfig::bpp\n>>> - * Bytes used per pixel in the output format.\n>>> - *\n>>>    * \\var Debayer::DebayerOutputConfig::stride\n>>>    * Line stride in bytes for the output frame.\n>>>    *\n>>> diff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\n>>> index 28f1b857b..556852260 100644\n>>> --- a/src/libcamera/software_isp/debayer.h\n>>> +++ b/src/libcamera/software_isp/debayer.h\n>>> @@ -69,7 +69,6 @@ public:\n>>>   \t};\n>>>     \tstruct DebayerOutputConfig {\n>>> -\t\tunsigned int bpp;\n>>>   \t\tunsigned int stride;\n>>>   \t\tunsigned int frameSize;\n>>>   \t};\n>>> diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\n>>> index 49382b4c2..25e9830c8 100644\n>>> --- a/src/libcamera/software_isp/debayer_cpu.cpp\n>>> +++ b/src/libcamera/software_isp/debayer_cpu.cpp\n>>> @@ -24,6 +24,7 @@\n>>>     #include \"libcamera/internal/bayer_format.h\"\n>>>   #include \"libcamera/internal/camera_manager.h\"\n>>> +#include \"libcamera/internal/formats.h\"\n>>>   #include \"libcamera/internal/framebuffer.h\"\n>>>   #include \"libcamera/internal/global_configuration.h\"\n>>>   #include \"libcamera/internal/mapped_framebuffer.h\"\n>>> @@ -474,24 +475,6 @@ int DebayerCpu::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf\n>>>   \treturn -EINVAL;\n>>>   }\n>>>   -int DebayerCpu::getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config)\n>>> -{\n>>> -\tif (outputFormat == formats::RGB888 || outputFormat == formats::BGR888) {\n>>> -\t\tconfig.bpp = 24;\n>>> -\t\treturn 0;\n>>> -\t}\n>>> -\n>>> -\tif (outputFormat == formats::XRGB8888 || outputFormat == formats::ARGB8888 ||\n>>> -\t    outputFormat == formats::XBGR8888 || outputFormat == formats::ABGR8888) {\n>>> -\t\tconfig.bpp = 32;\n>>> -\t\treturn 0;\n>>> -\t}\n>>> -\n>>> -\tLOG(Debayer, Info)\n>>> -\t\t<< \"Unsupported output format \" << outputFormat.toString();\n>>> -\treturn -EINVAL;\n>> What to do about unsupported formats now?  I don't think this was\n>> handled correctly in the original case.  But can we do better now?  Or\n>> safely assume that anything that reaches debayering is a supported\n>> format?\n>\n> First of all that would require a pretty broken pipeline handler - in simple.cpp we have\n>\n> config.outputFormats = swIsp_->formats(pixelFormat);\n>\n> ensuring that only supported formats are set for an output config (AFAICS).\n>\n> Secondly we'd still fail in DebayerCpu::setDebayerFunctions() (called in configure(), just like\n> strideAndFrameSize()) and DebayerEGL::initBayerShaders() (called in start() - i.e. slightly later / not in\n> configure()).\n>\n> So a broken pipeline handler would fail slightly later in the GPU path. If we want to be extra sure we\n> could add a dedicated check in DebayerEGL::configure(), checking that outputCfg.pixelFormat is present in\n> inputConfig_.outputFormats. I'm not fully convinced it's worth it, but it's small and easy to add if you\n> prefer.\n\nThank you for clarification.  I think the current measures are\nsufficient.\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> Regards\n>\n> Robert\n>\n>>> -}\n>>> -\n>>>   /*\n>>>    * Check for standard Bayer orders and set xShift_ and swap debayer0/1, so that\n>>>    * a single pair of BGGR debayer functions can be used for all 4 standard orders.\n>>> @@ -776,15 +759,9 @@ std::vector<PixelFormat> DebayerCpu::formats(PixelFormat inputFormat)\n>>>   std::tuple<unsigned int, unsigned int>\n>>>   DebayerCpu::strideAndFrameSize(const PixelFormat &outputFormat, const Size &size)\n>>>   {\n>>> -\tDebayerCpu::DebayerOutputConfig config;\n>>> -\n>>> -\tif (getOutputConfig(outputFormat, config) != 0)\n>>> -\t\treturn std::make_tuple(0, 0);\n>>> -\n>>>   \t/* round up to multiple of 8 for 64 bits alignment */\n>>> -\tunsigned int stride = (size.width * config.bpp / 8 + 7) & ~7;\n>>> -\n>>> -\treturn std::make_tuple(stride, stride * size.height);\n>>> +\tconst PixelFormatInfo &info = PixelFormatInfo::info(outputFormat);\n>>> +\treturn std::make_tuple(info.stride(size.width, 0, 8), info.frameSize(size, 8));\n>>>   }\n>>>     void DebayerCpuThread::setupInputMemcpy(const uint8_t *linePointers[])\n>>> diff --git a/src/libcamera/software_isp/debayer_cpu.h b/src/libcamera/software_isp/debayer_cpu.h\n>>> index 5281c65cb..2c88c9e1a 100644\n>>> --- a/src/libcamera/software_isp/debayer_cpu.h\n>>> +++ b/src/libcamera/software_isp/debayer_cpu.h\n>>> @@ -121,7 +121,6 @@ private:\n>>>   \tvoid debayer12P_RGRG_BGR888(uint8_t *dst, const uint8_t *src[]);\n>>>     \tstatic int getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config);\n>>> -\tstatic int getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config);\n>>>   \tint setupStandardBayerOrder(BayerFormat::Order order);\n>>>   \tint setDebayerFunctions(PixelFormat inputFormat,\n>>>   \t\t\t\tPixelFormat outputFormat,\n>>> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp\n>>> index 02651fe87..24faf480d 100644\n>>> --- a/src/libcamera/software_isp/debayer_egl.cpp\n>>> +++ b/src/libcamera/software_isp/debayer_egl.cpp\n>>> @@ -96,20 +96,6 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf\n>>>   \treturn -EINVAL;\n>>>   }\n>>>   -int DebayerEGL::getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config)\n>>> -{\n>>> -\tif (outputFormat == formats::XRGB8888 || outputFormat == formats::ARGB8888 ||\n>>> -\t    outputFormat == formats::XBGR8888 || outputFormat == formats::ABGR8888) {\n>>> -\t\tconfig.bpp = 32;\n>>> -\t\treturn 0;\n>>> -\t}\n>>> -\n>>> -\tLOG(Debayer, Info)\n>>> -\t\t<< \"Unsupported output format \" << outputFormat;\n>>> -\n>>> -\treturn -EINVAL;\n>>> -}\n>>> -\n>>>   int DebayerEGL::getShaderVariableLocations(void)\n>>>   {\n>>>   \tattributeVertex_ = glGetAttribLocation(programId_, \"vertexIn\");\n>>> @@ -374,15 +360,9 @@ std::vector<PixelFormat> DebayerEGL::formats(PixelFormat inputFormat)\n>>>   std::tuple<unsigned int, unsigned int>\n>>>   DebayerEGL::strideAndFrameSize(const PixelFormat &outputFormat, const Size &size)\n>>>   {\n>>> -\tDebayerEGL::DebayerOutputConfig config;\n>>> -\n>>> -\tif (getOutputConfig(outputFormat, config) != 0)\n>>> -\t\treturn std::make_tuple(0, 0);\n>>> -\n>>>   \t/* Align stride to 256 bytes as a generic GPU memory access alignment */\n>>> -\tunsigned int stride = libcamera::utils::alignUp(size.width * config.bpp / 8, 256);\n>>> -\n>>> -\treturn std::make_tuple(stride, stride * size.height);\n>>> +\tconst PixelFormatInfo &info = PixelFormatInfo::info(outputFormat);\n>>> +\treturn std::make_tuple(info.stride(size.width, 0, 256), info.frameSize(size, 256));\n>>>   }\n>>>     uint32_t DebayerEGL::preferredInputStride(const PixelFormat &inputFormat, const Size &size)\n>>> diff --git a/src/libcamera/software_isp/debayer_egl.h b/src/libcamera/software_isp/debayer_egl.h\n>>> index d6223f3a9..e613639f5 100644\n>>> --- a/src/libcamera/software_isp/debayer_egl.h\n>>> +++ b/src/libcamera/software_isp/debayer_egl.h\n>>> @@ -63,7 +63,6 @@ public:\n>>>     private:\n>>>   \tstatic int getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config);\n>>> -\tstatic int getOutputConfig(PixelFormat outputFormat, DebayerOutputConfig &config);\n>>>   \tint initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat);\n>>>   \tint getShaderVariableLocations();\n>>>   \tvoid setShaderVariableValues(eGLImage &eGLImageIn, const DebayerParams &params);","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 C4D8ABDE17\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Jul 2026 20:30:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EFA2767E78;\n\tTue, 21 Jul 2026 22:30:53 +0200 (CEST)","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 929F76601C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Jul 2026 22:30:51 +0200 (CEST)","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-686-C2EwKKORNxWmPnVyUd3k7A-1; Tue, 21 Jul 2026 16:30:48 -0400","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-493fa6e28a7so108116055e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Jul 2026 13:30:48 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-4.net.vodafone.cz. [77.48.47.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-47f63e49acesm40054212f8f.6.2026.07.21.13.30.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 21 Jul 2026 13:30:45 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"A+6SOK5y\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1784665850;\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\tin-reply-to:in-reply-to:references:references;\n\tbh=f36DGGloX+aGLwwLVJDEqM0hk+xpapssNremu6P3/VA=;\n\tb=A+6SOK5y9M92ITcmCJGYcHPXI+S4WbLZuwCLnnoLFbN+j+Lq2G9H8nMeko8sYBeci03uN0\n\t0gnIQw0o5rrR3eHQzqfQFK/VzJ2xkvAkYsMw45q+bzuP8XYBxBdyJ8WVwMRF5qnVdnxF6/\n\tHmpY3ilw12rXttwBHHbF2LdJRBqy6YE=","X-MC-Unique":"C2EwKKORNxWmPnVyUd3k7A-1","X-Mimecast-MFC-AGG-ID":"C2EwKKORNxWmPnVyUd3k7A_1784665847","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1784665847; x=1785270647;\n\th=content-type:mime-version:user-agent:message-id:date:references\n\t:in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to\n\t:cc:subject:date:message-id:reply-to:content-type;\n\tbh=f36DGGloX+aGLwwLVJDEqM0hk+xpapssNremu6P3/VA=;\n\tb=AlQYvSTnrv9bUggaFJ3kuDzYQa3J3uiw5bpGv1ymUo6KxX44OH9WHGRyMyeCTdgQTG\n\tc2hY/esqZULBkpKTk9upD84zyhN3lP06ZAxATZ878VEPsST48bBjhe5+/FufS5tWfxFb\n\tsgLO45nNxL+1eDjPLn0AegHO2/E5MfnOgj6NsOBwtCrYbv64xB+xdRKfcqluHaLqyX2f\n\t57Ehv2iyCk6a/hZumxMra1BpkHXN0IY0s6GSPbLCNTMylVKS9jhIiMjwfc7vPsWlYeIQ\n\t8g0WAu7le5wf0lUV2/kbLNBQeD5j+j/H6qZzRdhLEKlJTNbKM6pWFiYurRDHCzXRnkjm\n\tLvUQ==","X-Gm-Message-State":"AOJu0Yy1wN2PncGNCJffGmazGqc+Sq7Z0FNM31fKkvUaX8PFTawSU5Gg\n\t93bBqoB+/Gkw0K6mt3m95onF1FiJLvY2uGkBOb8IjdvtrYwo/WpcmRthX/5K6843Blc4L2PltGp\n\t1lV5XjGZuGu7ErHJQW/1HPOCC/IIJQwxNw4EOExCn6HqXJau9R269spv0E9lGKW0ewiqBlm0ddO\n\t0XyZN88JNohSf7GjpJIYGrd4jMxvXN5R4oIXDLU8AaUy69W9yEZMSbCJ+//xE=","X-Gm-Gg":"AfdE7cnfybOYxIlOrq7Uz5V5WE4s3pQ7a/fmTL5XVjVlcareB/8Ma12+BKlv71ilU74\n\tR/QQvusAE6zqCuGdor2ZJIYIKML3kSb94S1Rryt4JGIbDy3WUOA+C1JSmXNzIcsk2Gm1BSWgOb6\n\tClTrRz+d4CltBv5TO7pnyLphNaerFPD4lt4er0thlONMnEuE7GnR7gvaqga15HorT8AY5PlZljy\n\tNKSFY21dym2o5j5ij9JKwAsrUGFQhbk58fvfORZ/K6R/NX7JJ4MMvxnKiO3UKQSxMcr0/VvHFnG\n\tAh2l4Q/nMM6BYoLsDDPy+XkKMEiiqBZwQHXjhuCYS5lmA+5fGrEKFUfNu79DIPiseHO2DYxrwna\n\trOpkTh4NVbSNFLaVWe1QbMOQePz9etwGG2uQ+kB8dLjwu58fAT3Lasg==","X-Received":["by 2002:a05:600c:c84:b0:495:4689:1e98 with SMTP id\n\t5b1f17b1804b1-4954a3ed426mr218359175e9.10.1784665847248; \n\tTue, 21 Jul 2026 13:30:47 -0700 (PDT)","by 2002:a05:600c:c84:b0:495:4689:1e98 with SMTP id\n\t5b1f17b1804b1-4954a3ed426mr218358855e9.10.1784665846726; \n\tTue, 21 Jul 2026 13:30:46 -0700 (PDT)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] libcamera: debayer: Use helpers for strides and\n\tframe sizes","In-Reply-To":"<e414abc1-bced-402c-8792-ca987d3ccb7b@collabora.com> (Robert\n\tMader's message of \"Tue, 21 Jul 2026 18:41:51 +0200\")","References":"<20260720113935.52936-1-robert.mader@collabora.com>\n\t<85qzkwuxpc.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<e414abc1-bced-402c-8792-ca987d3ccb7b@collabora.com>","Date":"Tue, 21 Jul 2026 22:30:44 +0200","Message-ID":"<85mrvkulu3.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":"1uqNVEDHw9tvkGtmOuUPu9MYWuN8rzZ27VDdCic0jKY_1784665847","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}}]