[{"id":35592,"web_url":"https://patchwork.libcamera.org/comment/35592/","msgid":"<fdvhyhomccgqqfymuvgomykmardrjvagjblwnvzazg2vh7pvhn@somnx3bemnfn>","date":"2025-08-27T15:03:53","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"On Tue, Aug 12, 2025 at 01:00:55PM +0530, Umang Jain wrote:\n> Bayer pattern on the sensor can change while configuring it with the\n> intended capture format. This is due to the transform being applied on\n> the sensor which supports [v/h]flips.\n> \n> During configure(), the simple pipeline handler does not detect any\n> bayer pattern changes that can arise due to the transformations being\n> applied via SimpleCameraData:setupFormats(). In such cases, the video\n> node will be configured in-correctly, without realising the bayer\n> pattern has changed on the sensor, for the given capture format.\n> \n> This patch detects the bayer pattern change after the sensor has\n> been configured and retrieves the corresponding V4L2 pixel format\n> to correctly configure the video node and the input to converter or\n> Soft-ISP.\n> \n> Signed-off-by: Umang Jain <uajain@igalia.com>\n\nGentle ping for some feedback ;-)\n\n> ---\n> changes in v4:\n> - Just rebase over new release v0.6.2 test and resend\n> \n> Changes in v3:\n> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n>   a global configuration file.\n> \n> Changes in v2:\n> - Pass the updated format(Bayer applied with transforms) to the\n>   converter/SoftISP input configuration as well to configure them\n>   correctly.\n> \n> ---\n>  src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n>  1 file changed, 15 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 4323472e..66606a41 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>  \tif (ret < 0)\n>  \t\treturn ret;\n>  \n> -\t/* Configure the video node. */\n> -\tV4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> +\t/* Configure the video node, taking into account any Bayer pattern change. */\n> +\tV4L2PixelFormat videoFormat;\n> +\tif (format.code == pipeConfig->code) {\n> +\t\tvideoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> +\t} else {\n> +\t\t/*\n> +\t\t * Bayer pattern has changed because of the transform that was applied on\n> +\t\t * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n> +\t\t * pattern.\n> +\t\t */\n> +\t\tBayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n> +\t\tcfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n> +\t\tvideoFormat = cfgBayer.toV4L2PixelFormat();\n> +\t}\n>  \n>  \tV4L2DeviceFormat captureFormat;\n>  \tcaptureFormat.fourcc = videoFormat;\n> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>  \t\treturn 0;\n>  \n>  \tStreamConfiguration inputCfg;\n> -\tinputCfg.pixelFormat = pipeConfig->captureFormat;\n> +\tinputCfg.pixelFormat = videoFormat.toPixelFormat();\n>  \tinputCfg.size = pipeConfig->captureSize;\n>  \tinputCfg.stride = captureFormat.planes[0].bpl;\n>  \tinputCfg.bufferCount = kNumInternalBuffers;\n> -- \n> 2.50.0\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 41C06BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Aug 2025 15:03:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DD033692E7;\n\tWed, 27 Aug 2025 17:03:42 +0200 (CEST)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 26C80613BA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Aug 2025 17:03:42 +0200 (CEST)","from [49.36.69.233] (helo=uajain)\n\tby fanzine2.igalia.com with esmtpsa \n\t(Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1urHga-002U5z-S6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Aug 2025 17:03:41 +0200"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"nhcn6JOx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:\n\tSubject:To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=W00yynuqDbEQ0kRpFmReM3vsw+NDoJQN3HEVj6x9Lzo=;\n\tb=nhcn6JOx3KgiRrVnGo62H7WvMO\n\tzf+FOkaxvUujFJMMgsYe49hiUuJEmwhtotEnrZ2Mlz08L3YPVWSnTNTy7bbKphPvo1kEy31rAOxRN\n\tJEGD4mpq2Q0LxrgK4p0Om+7qEOOh6PZn3yZjUIR1k5W3litSxNzqab2sfkzY2HHZ5hmYJEiz77BrU\n\tQR4RDCvLU7LyS3E8jm7lliUSFTa0sc/EjSllIRqdqjvuQ55lqkdJ81jOIWcf0IkXsMOF9Rng6x6SX\n\tMx9NFJQWT6Qx7e61t4nh/zrkrVM0Uu1TTZYw9zqlyeGFDz4oJvV2/4v8oCq96r2mEkHXTrEPRrtIU\n\tl9vYN2vg==;","Date":"Wed, 27 Aug 2025 20:33:53 +0530","From":"Umang Jain <uajain@igalia.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","Message-ID":"<fdvhyhomccgqqfymuvgomykmardrjvagjblwnvzazg2vh7pvhn@somnx3bemnfn>","References":"<20250812073055.5579-1-uajain@igalia.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20250812073055.5579-1-uajain@igalia.com>","User-Agent":"NeoMutt/20250510-dirty","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":35833,"web_url":"https://patchwork.libcamera.org/comment/35833/","msgid":"<85ecs78xfh.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-09-15T16:58:42","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change\n\tduring configure()","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Umang,\n\nUmang Jain <uajain@igalia.com> writes:\n\n> On Tue, Aug 12, 2025 at 01:00:55PM +0530, Umang Jain wrote:\n>> Bayer pattern on the sensor can change while configuring it with the\n>> intended capture format. This is due to the transform being applied on\n>\n>> the sensor which supports [v/h]flips.\n>> \n>> During configure(), the simple pipeline handler does not detect any\n>> bayer pattern changes that can arise due to the transformations being\n>> applied via SimpleCameraData:setupFormats(). In such cases, the video\n>> node will be configured in-correctly, without realising the bayer\n>> pattern has changed on the sensor, for the given capture format.\n>> \n>> This patch detects the bayer pattern change after the sensor has\n>> been configured and retrieves the corresponding V4L2 pixel format\n>> to correctly configure the video node and the input to converter or\n>> Soft-ISP.\n>> \n>> Signed-off-by: Umang Jain <uajain@igalia.com>\n>\n> Gentle ping for some feedback ;-)\n\nI checked that colours are correct on my rpi with software ISP now.\nShould I test it more broadly than just running `cam' with the default\nsettings?\n\nThe patch makes sense to me but somebody with a better understanding of\nall the stuff should review it.\n\n>> ---\n>> changes in v4:\n>> - Just rebase over new release v0.6.2 test and resend\n>> \n>> Changes in v3:\n>> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n>>   a global configuration file.\n>> \n>> Changes in v2:\n>> - Pass the updated format(Bayer applied with transforms) to the\n>>   converter/SoftISP input configuration as well to configure them\n>>   correctly.\n>> \n>> ---\n>>  src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n>>  1 file changed, 15 insertions(+), 3 deletions(-)\n>> \n>> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n>> index 4323472e..66606a41 100644\n>> --- a/src/libcamera/pipeline/simple/simple.cpp\n>> +++ b/src/libcamera/pipeline/simple/simple.cpp\n>> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>>  \tif (ret < 0)\n>>  \t\treturn ret;\n>>  \n>> -\t/* Configure the video node. */\n>> -\tV4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n>> +\t/* Configure the video node, taking into account any Bayer pattern change. */\n>> +\tV4L2PixelFormat videoFormat;\n>> +\tif (format.code == pipeConfig->code) {\n>> +\t\tvideoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n>> +\t} else {\n>> +\t\t/*\n>> +\t\t * Bayer pattern has changed because of the transform that was applied on\n>> +\t\t * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n>> +\t\t * pattern.\n>> +\t\t */\n>> +\t\tBayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n>> +\t\tcfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n>> +\t\tvideoFormat = cfgBayer.toV4L2PixelFormat();\n>> +\t}\n>>  \n>>  \tV4L2DeviceFormat captureFormat;\n>>  \tcaptureFormat.fourcc = videoFormat;\n>> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>>  \t\treturn 0;\n>>  \n>>  \tStreamConfiguration inputCfg;\n>> -\tinputCfg.pixelFormat = pipeConfig->captureFormat;\n>> +\tinputCfg.pixelFormat = videoFormat.toPixelFormat();\n>>  \tinputCfg.size = pipeConfig->captureSize;\n>>  \tinputCfg.stride = captureFormat.planes[0].bpl;\n>>  \tinputCfg.bufferCount = kNumInternalBuffers;\n>> -- \n>> 2.50.0\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9D2C7C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Sep 2025 16:58:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9219569369;\n\tMon, 15 Sep 2025 18:58:50 +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 09C15613A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Sep 2025 18:58:48 +0200 (CEST)","from mail-wr1-f69.google.com (mail-wr1-f69.google.com\n\t[209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-138-6SwkMJxRNqi38ByWPR4KDg-1; Mon, 15 Sep 2025 12:58:46 -0400","by mail-wr1-f69.google.com with SMTP id\n\tffacd0b85a97d-3e980eb1d3eso266298f8f.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Sep 2025 09:58:46 -0700 (PDT)","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-3eb9a95d225sm3209701f8f.54.2025.09.15.09.58.43\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 15 Sep 2025 09:58:43 -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=\"L7wt52Vj\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1757955527;\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=HsqYlAghw1XmJ15i0kMji7tyVjMLcLzWJD4FFj0i7/s=;\n\tb=L7wt52VjXtCBRDwMzQXdZN0afov61ilkohEB2ib0RJBWWpXmI7SS+0ZSCFvdoCFhDR/RPs\n\tlNTD7lCDUNOhwEcXzUluDpNMMxvwetJcVaNEELCWIHGqlLulVmrtxJPCNmlwQJy8AImkAk\n\tAodkx/csucyP20I4USRN9vXjmsU/Rd4=","X-MC-Unique":"6SwkMJxRNqi38ByWPR4KDg-1","X-Mimecast-MFC-AGG-ID":"6SwkMJxRNqi38ByWPR4KDg_1757955525","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1757955525; x=1758560325;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=HsqYlAghw1XmJ15i0kMji7tyVjMLcLzWJD4FFj0i7/s=;\n\tb=az+ED/KRejGfXkp6KSlJMw74LqCovfIugoLB01ADHKM4eLBUhQe72sW+rU/mScTBek\n\tp/a+uGl+Fx5Pj4PDIMcurNcn/5bPLXRvQgJk7GALX8zv47jiju/jZw0EVbrsmvqd0WjX\n\tzGpQz/SL0f4+ZQWK0jyG+5Z+U0y94heKdn/5gZCKoESdBEiLWu8AN8GoGRyNeLUrKowH\n\tj7UrrZPqViwfB6osOamy6mQP4yT7LRXnZhKjANDP7AdEy3hEM5n7hFKTs+R0jSCOLEbK\n\t+FW+g5C8ahfF2v10M2giBhJLojOJzt0EpYdKuPZox9DFWlR0vFqnGcXd6yQGVRvFG330\n\tfcgg==","X-Gm-Message-State":"AOJu0YzmmT/mAzD88YsdwJU5j2F9cELvOpzUka3QFuQD/3tgDw/IBGKg\n\tnQoYjNh+261ujexCwz6OHtUBmP4oMS4eRNZ9dq3OsNPfp8VrNxfr6CQfhAhFLmjar6mtRPmsSxR\n\toQAbpGyHWIxB1ZP5VaZYyuhBeaDgYxG3c8jyw7p4Bd9Je4c4ao3U+L+sk8WaMNm7QRs63zm9YAF\n\thO8G0RUuXV7yEoPH6U+yel2+CXWKSOdUE4ar4OgewX2iXZTRs2LHS/VhxWfhs=","X-Gm-Gg":"ASbGnct1EFlek+JoaQKOSf4inrX7jkc1CWWP5jUEQhYKfL9siSgVSNR8+F/Wq7KpvIt\n\tp5wGKD0Gp1k34mB3pKfsPd8hfbXFZTTSaYPn9URw1kv+iPIJAgPgrAHwKSxVxwMenuq1vq7EeFk\n\tzlYo2hA4VPgGsDbMF+kjmiCRFLJnAou7mh7NC7d1v0EFCTptX09OMKCzVD9ISouTUMk3Ya/Wb0l\n\t3IbFlYQT4TYG99dhEO6dGiVKKif3ex+H0AAPC2y0nulR1sbF60y0C42E38+VuLv9eVhHdgLfnhs\n\tfRkiUoyOynwUe+lhoEE0zcOQiCubtvPvw9xJeCJBqEIOX70izglId2aiiL2pfO0hnj802PP30Z6\n\tkACNGJzQE1CkG4+IX5w==","X-Received":["by 2002:a05:6000:2f81:b0:3d7:2284:b20 with SMTP id\n\tffacd0b85a97d-3e7657897c6mr12888466f8f.3.1757955524919; \n\tMon, 15 Sep 2025 09:58:44 -0700 (PDT)","by 2002:a05:6000:2f81:b0:3d7:2284:b20 with SMTP id\n\tffacd0b85a97d-3e7657897c6mr12888440f8f.3.1757955524351; \n\tMon, 15 Sep 2025 09:58:44 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IHf2MbpqWAEiZkTILggCoklmns1wlweAqcrcLrruxC238KTcHTo1l0lM90DDlIYvipxiLU0Iw==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Umang Jain <uajain@igalia.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change\n\tduring configure()","In-Reply-To":"<fdvhyhomccgqqfymuvgomykmardrjvagjblwnvzazg2vh7pvhn@somnx3bemnfn>\n\t(Umang Jain's message of \"Wed, 27 Aug 2025 20:33:53 +0530\")","References":"<20250812073055.5579-1-uajain@igalia.com>\n\t<fdvhyhomccgqqfymuvgomykmardrjvagjblwnvzazg2vh7pvhn@somnx3bemnfn>","Date":"Mon, 15 Sep 2025 18:58:42 +0200","Message-ID":"<85ecs78xfh.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":"d08HOKfPZFKZSFpCLJqltXxrYDjk0ttYRGliP09UNHQ_1757955525","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":35847,"web_url":"https://patchwork.libcamera.org/comment/35847/","msgid":"<k6b4mlct7zw57s37us56myi4qanqlgxwnxhrtzsdxrjqjhmzzy@sqplfhurgsc4>","date":"2025-09-17T05:53:24","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"On Mon, Sep 15, 2025 at 06:58:42PM +0200, Milan Zamazal wrote:\n> Hi Umang,\n> \n> Umang Jain <uajain@igalia.com> writes:\n> \n> > On Tue, Aug 12, 2025 at 01:00:55PM +0530, Umang Jain wrote:\n> >> Bayer pattern on the sensor can change while configuring it with the\n> >> intended capture format. This is due to the transform being applied on\n> >\n> >> the sensor which supports [v/h]flips.\n> >> \n> >> During configure(), the simple pipeline handler does not detect any\n> >> bayer pattern changes that can arise due to the transformations being\n> >> applied via SimpleCameraData:setupFormats(). In such cases, the video\n> >> node will be configured in-correctly, without realising the bayer\n> >> pattern has changed on the sensor, for the given capture format.\n> >> \n> >> This patch detects the bayer pattern change after the sensor has\n> >> been configured and retrieves the corresponding V4L2 pixel format\n> >> to correctly configure the video node and the input to converter or\n> >> Soft-ISP.\n> >> \n> >> Signed-off-by: Umang Jain <uajain@igalia.com>\n> >\n> > Gentle ping for some feedback ;-)\n> \n> I checked that colours are correct on my rpi with software ISP now.\n> Should I test it more broadly than just running `cam' with the default\n> settings?\n> \n\nThanks for testing. Not sure what additional broader testing will bring\n(maybe more edge cases are detected though like this transform one).\n\n> The patch makes sense to me but somebody with a better understanding of\n> all the stuff should review it.\n\nfwiw, the RPi pipeline handler also transforms like this in configure()\nwhich I vaguely remember.\n> \n> >> ---\n> >> changes in v4:\n> >> - Just rebase over new release v0.6.2 test and resend\n> >> \n> >> Changes in v3:\n> >> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n> >>   a global configuration file.\n> >> \n> >> Changes in v2:\n> >> - Pass the updated format(Bayer applied with transforms) to the\n> >>   converter/SoftISP input configuration as well to configure them\n> >>   correctly.\n> >> \n> >> ---\n> >>  src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n> >>  1 file changed, 15 insertions(+), 3 deletions(-)\n> >> \n> >> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> >> index 4323472e..66606a41 100644\n> >> --- a/src/libcamera/pipeline/simple/simple.cpp\n> >> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> >> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n> >>  \tif (ret < 0)\n> >>  \t\treturn ret;\n> >>  \n> >> -\t/* Configure the video node. */\n> >> -\tV4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> >> +\t/* Configure the video node, taking into account any Bayer pattern change. */\n> >> +\tV4L2PixelFormat videoFormat;\n> >> +\tif (format.code == pipeConfig->code) {\n> >> +\t\tvideoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> >> +\t} else {\n> >> +\t\t/*\n> >> +\t\t * Bayer pattern has changed because of the transform that was applied on\n> >> +\t\t * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n> >> +\t\t * pattern.\n> >> +\t\t */\n> >> +\t\tBayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n> >> +\t\tcfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n> >> +\t\tvideoFormat = cfgBayer.toV4L2PixelFormat();\n> >> +\t}\n> >>  \n> >>  \tV4L2DeviceFormat captureFormat;\n> >>  \tcaptureFormat.fourcc = videoFormat;\n> >> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n> >>  \t\treturn 0;\n> >>  \n> >>  \tStreamConfiguration inputCfg;\n> >> -\tinputCfg.pixelFormat = pipeConfig->captureFormat;\n> >> +\tinputCfg.pixelFormat = videoFormat.toPixelFormat();\n> >>  \tinputCfg.size = pipeConfig->captureSize;\n> >>  \tinputCfg.stride = captureFormat.planes[0].bpl;\n> >>  \tinputCfg.bufferCount = kNumInternalBuffers;\n> >> -- \n> >> 2.50.0\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 5A4CCBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Sep 2025 05:53:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DF7EC6936F;\n\tWed, 17 Sep 2025 07:53:13 +0200 (CEST)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 313BC62C36\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Sep 2025 07:53:10 +0200 (CEST)","from [49.36.71.223] (helo=uajain)\n\tby fanzine2.igalia.com with esmtpsa \n\t(Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1uyl6K-00CZbC-Gt; Wed, 17 Sep 2025 07:53:08 +0200"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"dH9Rf7Xn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:\n\tSubject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=dHU4ODRoP5o7ZFJwEZNY88zEMvlTKLEqsK9JTIiWbU4=;\n\tb=dH9Rf7XnaK6Ug6Rz5JZH6Wloo6\n\tjknV3OpoCYmEBKKISbsA5UPgfZ4awbGBwo6gzgla6lxH+5Z7GuhRDfbzHYV7F+0HYrgvq1iG+Kl3Q\n\tqpukc/2yb1XIyARNxzGItcn5YOqXWtFiI2Rz0oKMS0Nd6btPqiBHyY1wA7rDE+5W/MGv9d52Qp7eg\n\tjearTIenRb0bT1ji97AnAfny8lYJEMbtCxg76bfX1/VTMRKcFKbaDbA0sbx4WxjiAduSVMJPMNFyd\n\tcNJYvVAnXBUt84JwJJbV9ZB2b5HdU6MdcIUBfHrAxuiMCcLC58X0mtxpV8Ifxs83TvG+VVAFwCigW\n\t4V1kgDPQ==;","Date":"Wed, 17 Sep 2025 11:23:24 +0530","From":"Umang Jain <uajain@igalia.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","Message-ID":"<k6b4mlct7zw57s37us56myi4qanqlgxwnxhrtzsdxrjqjhmzzy@sqplfhurgsc4>","References":"<20250812073055.5579-1-uajain@igalia.com>\n\t<fdvhyhomccgqqfymuvgomykmardrjvagjblwnvzazg2vh7pvhn@somnx3bemnfn>\n\t<85ecs78xfh.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<85ecs78xfh.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"NeoMutt/20250510-dirty","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":35849,"web_url":"https://patchwork.libcamera.org/comment/35849/","msgid":"<854it1qwxg.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-09-17T08:56:43","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change\n\tduring configure()","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Umang Jain <uajain@igalia.com> writes:\n\n> On Mon, Sep 15, 2025 at 06:58:42PM +0200, Milan Zamazal wrote:\n>> Hi Umang,\n>> \n>\n>> Umang Jain <uajain@igalia.com> writes:\n>> \n>> > On Tue, Aug 12, 2025 at 01:00:55PM +0530, Umang Jain wrote:\n>> >> Bayer pattern on the sensor can change while configuring it with the\n>> >> intended capture format. This is due to the transform being applied on\n>> >\n>> >> the sensor which supports [v/h]flips.\n>> >> \n>> >> During configure(), the simple pipeline handler does not detect any\n>> >> bayer pattern changes that can arise due to the transformations being\n>> >> applied via SimpleCameraData:setupFormats(). In such cases, the video\n>> >> node will be configured in-correctly, without realising the bayer\n>> >> pattern has changed on the sensor, for the given capture format.\n>> >> \n>> >> This patch detects the bayer pattern change after the sensor has\n>> >> been configured and retrieves the corresponding V4L2 pixel format\n>> >> to correctly configure the video node and the input to converter or\n>> >> Soft-ISP.\n>> >> \n>> >> Signed-off-by: Umang Jain <uajain@igalia.com>\n>> >\n>> > Gentle ping for some feedback ;-)\n>> \n>> I checked that colours are correct on my rpi with software ISP now.\n>> Should I test it more broadly than just running `cam' with the default\n>> settings?\n>> \n>\n> Thanks for testing. Not sure what additional broader testing will bring\n> (maybe more edge cases are detected though like this transform one).\n\nOK, let's move this forward:\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nTested-by: Milan Zamazal <mzamazal@redhat.com>\n\nThis patch also permits testing and development of software ISP on (my)\nRPi (I get buffer errors without it).  It's good to have an affordable\nplatform with reasonable hardware specs and working graphics drivers for\nthe purpose.\n\n>> The patch makes sense to me but somebody with a better understanding of\n>> all the stuff should review it.\n>\n> fwiw, the RPi pipeline handler also transforms like this in configure()\n> which I vaguely remember.\n>> \n>> >> ---\n>> >> changes in v4:\n>> >> - Just rebase over new release v0.6.2 test and resend\n>> >> \n>> >> Changes in v3:\n>> >> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n>> >>   a global configuration file.\n>> >> \n>> >> Changes in v2:\n>> >> - Pass the updated format(Bayer applied with transforms) to the\n>> >>   converter/SoftISP input configuration as well to configure them\n>> >>   correctly.\n>> >> \n>> >> ---\n>> >>  src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n>> >>  1 file changed, 15 insertions(+), 3 deletions(-)\n>> >> \n>> >> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n>> >> index 4323472e..66606a41 100644\n>> >> --- a/src/libcamera/pipeline/simple/simple.cpp\n>> >> +++ b/src/libcamera/pipeline/simple/simple.cpp\n>> >> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>> >>  \tif (ret < 0)\n>> >>  \t\treturn ret;\n>> >>  \n>> >> -\t/* Configure the video node. */\n>> >> -\tV4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n>> >> +\t/* Configure the video node, taking into account any Bayer pattern change. */\n>> >> +\tV4L2PixelFormat videoFormat;\n>> >> +\tif (format.code == pipeConfig->code) {\n>> >> +\t\tvideoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n>> >> +\t} else {\n>> >> +\t\t/*\n>> >> +\t\t * Bayer pattern has changed because of the transform that was applied on\n>> >> +\t\t * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n>> >> +\t\t * pattern.\n>> >> +\t\t */\n>> >> +\t\tBayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n>> >> +\t\tcfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n>> >> +\t\tvideoFormat = cfgBayer.toV4L2PixelFormat();\n>> >> +\t}\n>> >>  \n>> >>  \tV4L2DeviceFormat captureFormat;\n>> >>  \tcaptureFormat.fourcc = videoFormat;\n>> >> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>> >>  \t\treturn 0;\n>> >>  \n>> >>  \tStreamConfiguration inputCfg;\n>> >> -\tinputCfg.pixelFormat = pipeConfig->captureFormat;\n>> >> +\tinputCfg.pixelFormat = videoFormat.toPixelFormat();\n>> >>  \tinputCfg.size = pipeConfig->captureSize;\n>> >>  \tinputCfg.stride = captureFormat.planes[0].bpl;\n>> >>  \tinputCfg.bufferCount = kNumInternalBuffers;\n>> >> -- \n>> >> 2.50.0\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 A096ABE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Sep 2025 08:56:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 42E8E62C3A;\n\tWed, 17 Sep 2025 10:56:56 +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 0212E62C3A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Sep 2025 10:56:52 +0200 (CEST)","from mail-ed1-f69.google.com (mail-ed1-f69.google.com\n\t[209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-164-UMdEUr6SO0G5p4JOPtQF4w-1; Wed, 17 Sep 2025 04:56:49 -0400","by mail-ed1-f69.google.com with SMTP id\n\t4fb4d7f45d1cf-62ed2de7ee8so5737883a12.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Sep 2025 01:56:48 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t([2a00:102a:5030:9e54:a93e:bb1f:df97:1796])\n\tby smtp.gmail.com with ESMTPSA id\n\t4fb4d7f45d1cf-62f2cb5c145sm7079064a12.45.2025.09.17.01.56.43\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 17 Sep 2025 01:56:44 -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=\"OojTobuh\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1758099411;\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=VhGZuwCAxMnzIZJvPrPAzdZ2Yp+AnPCZ4Ua2MTRgKac=;\n\tb=OojTobuh0xbvz8djJiOkTnOIg+CKp8uvCxxZke8ERYq9WVZpvchiHAjkKhM/dAaMAkqIsc\n\t2zLFfIU3brXVwJUbELrHDbftUroS5Y/svrB7gVuJ9n72odJFI9y9n5SzvUW+u7+iVFskHG\n\tIjNINkEvsDmrBOV7L+1Z82/f4LDFUBU=","X-MC-Unique":"UMdEUr6SO0G5p4JOPtQF4w-1","X-Mimecast-MFC-AGG-ID":"UMdEUr6SO0G5p4JOPtQF4w_1758099407","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1758099407; x=1758704207;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=VhGZuwCAxMnzIZJvPrPAzdZ2Yp+AnPCZ4Ua2MTRgKac=;\n\tb=C7v1DYDjuixB2aoO/HlHgmJNx3d7rjW+3XBZE1qkn5y1up5fhTRYVGGvkESV3CYee8\n\t75Onc3KdhcgltYXTIXZzYvGui0jeiRsrRiXu91xFN+nRx77tsZORUkbABk7pc3/1h9r9\n\t7OyitVm777xMPR9/Kzx3at6+BcJ2x6W6k413YNZ7A56bLyWpevC+aCgg/MuXe4oeQECq\n\tu9Dkuxw7JC7QZ+Gsgm/gkdDV9bSgwY8aDqwGXlJ0OU51CGJOIE+6pLWEdHwEk5vv/4Sw\n\t8ky3JUouInOR0I/s28opkqJLC21zIwSxs2ZJ6CCUB71PVBEh6AenR6iYi3GN90WIaDAG\n\tXJaA==","X-Gm-Message-State":"AOJu0YwMzR7E+t22KXVLRarcvG03btH9C4WDxo/xIxuiIjiIdZxXmLO2\n\t14K2PKugps9kLghkVm4ifsK91YrbG/UMlbbbIsC77PLVD+TsPSeWxUfDdOmT7K8J/mPaio8PcdG\n\tWND/AZbksmKmoTc1vtZqw8YIx81V+lJ1AQN0y8yvqQXHvCVhZOCOMsJgYfBTisEmKkZ1XG/p0ql\n\t5VPDuWaKTFKlYrv6lQ+VVZsXsfy/AL7xhLnGBY4WbH4M/kBbX0Q70bmx0I4RA=","X-Gm-Gg":"ASbGncvvkUP8GjIGQYmH5DgQMMwXi/Utp+0670+/kSqLk2kT1P4Xnc8KSEAJ7YiHOlg\n\tA2bN4u/SVKOxNIeHuePz2X8lsQYOWYv8akeOtX/yB/xU4DNfBuHQGktxk/jmPal+RFuiYe+MlCZ\n\t5VkLmpWzNcTSRK4e16zk6IAmKV3+0Uo2PyBBXHMTGnC64zjf8mVKnC2NbXXFsbtnzRKjH8P0LIe\n\tPIJpii1aM+953acgbraU8fDSIHlONLwSnUN/aS2rsn0w9pxHs+aO8be1Iy3DJExHv2L2LqZS4QB\n\t0QwP2CByokP2dt06LP6uu+/6YDROq2yiBkCHDHL7Y5oUby//cVs9eARhFpwkMjtG0hBUII5nzA=\n\t=","X-Received":["by 2002:a05:6402:1ecb:b0:62f:897e:f10c with SMTP id\n\t4fb4d7f45d1cf-62f897ef2f1mr1433850a12.35.1758099407032; \n\tWed, 17 Sep 2025 01:56:47 -0700 (PDT)","by 2002:a05:6402:1ecb:b0:62f:897e:f10c with SMTP id\n\t4fb4d7f45d1cf-62f897ef2f1mr1433786a12.35.1758099405766; \n\tWed, 17 Sep 2025 01:56:45 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IFxuLPSHSxVXpgqdlUiHF2qdFb8X3/97gDoo6xoj/9vf92gEemR6814W4Qn7hZXmKQUOuLlsg==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Umang Jain <uajain@igalia.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change\n\tduring configure()","In-Reply-To":"<k6b4mlct7zw57s37us56myi4qanqlgxwnxhrtzsdxrjqjhmzzy@sqplfhurgsc4>\n\t(Umang Jain's message of \"Wed, 17 Sep 2025 11:23:24 +0530\")","References":"<20250812073055.5579-1-uajain@igalia.com>\n\t<fdvhyhomccgqqfymuvgomykmardrjvagjblwnvzazg2vh7pvhn@somnx3bemnfn>\n\t<85ecs78xfh.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<k6b4mlct7zw57s37us56myi4qanqlgxwnxhrtzsdxrjqjhmzzy@sqplfhurgsc4>","Date":"Wed, 17 Sep 2025 10:56:43 +0200","Message-ID":"<854it1qwxg.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":"evZoEDQr3RXq8FnCRlXYsSUgP5suI_j6olbj9BrDvS4_1758099407","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":35852,"web_url":"https://patchwork.libcamera.org/comment/35852/","msgid":"<175810489891.1246375.6265407858021509745@ping.linuxembedded.co.uk>","date":"2025-09-17T10:28:18","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal (2025-09-17 09:56:43)\n> Umang Jain <uajain@igalia.com> writes:\n> \n> > On Mon, Sep 15, 2025 at 06:58:42PM +0200, Milan Zamazal wrote:\n> >> Hi Umang,\n> >> \n> >\n> >> Umang Jain <uajain@igalia.com> writes:\n> >> \n> >> > On Tue, Aug 12, 2025 at 01:00:55PM +0530, Umang Jain wrote:\n> >> >> Bayer pattern on the sensor can change while configuring it with the\n> >> >> intended capture format. This is due to the transform being applied on\n> >> >\n> >> >> the sensor which supports [v/h]flips.\n> >> >> \n> >> >> During configure(), the simple pipeline handler does not detect any\n> >> >> bayer pattern changes that can arise due to the transformations being\n> >> >> applied via SimpleCameraData:setupFormats(). In such cases, the video\n> >> >> node will be configured in-correctly, without realising the bayer\n> >> >> pattern has changed on the sensor, for the given capture format.\n> >> >> \n> >> >> This patch detects the bayer pattern change after the sensor has\n> >> >> been configured and retrieves the corresponding V4L2 pixel format\n> >> >> to correctly configure the video node and the input to converter or\n> >> >> Soft-ISP.\n> >> >> \n> >> >> Signed-off-by: Umang Jain <uajain@igalia.com>\n> >> >\n> >> > Gentle ping for some feedback ;-)\n> >> \n> >> I checked that colours are correct on my rpi with software ISP now.\n> >> Should I test it more broadly than just running `cam' with the default\n> >> settings?\n> >> \n> >\n> > Thanks for testing. Not sure what additional broader testing will bring\n> > (maybe more edge cases are detected though like this transform one).\n> \n> OK, let's move this forward:\n> \n> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n> Tested-by: Milan Zamazal <mzamazal@redhat.com>\n> \n> This patch also permits testing and development of software ISP on (my)\n> RPi (I get buffer errors without it).  It's good to have an affordable\n> platform with reasonable hardware specs and working graphics drivers for\n> the purpose.\n\nThank you - the Tested-by here means I'd be happy to merge this.\n\nThis looks like the sort of area I'd be curious if this could or should be\nhandled in a common CameraSensor code path if every platform should be\ndoing the same thing ...\n\nOtherwise I expect maybe this same change might be required on\nIPU3/RKISP1/Mali-C55... etc ?\n\nIf anyone wants to see if they can make this common (or if it actually\nshould in the first place) that can earn some internet-points...\n\n--\nKieran\n\n> \n> >> The patch makes sense to me but somebody with a better understanding of\n> >> all the stuff should review it.\n> >\n> > fwiw, the RPi pipeline handler also transforms like this in configure()\n> > which I vaguely remember.\n> >> \n> >> >> ---\n> >> >> changes in v4:\n> >> >> - Just rebase over new release v0.6.2 test and resend\n> >> >> \n> >> >> Changes in v3:\n> >> >> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n> >> >>   a global configuration file.\n> >> >> \n> >> >> Changes in v2:\n> >> >> - Pass the updated format(Bayer applied with transforms) to the\n> >> >>   converter/SoftISP input configuration as well to configure them\n> >> >>   correctly.\n> >> >> \n> >> >> ---\n> >> >>  src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n> >> >>  1 file changed, 15 insertions(+), 3 deletions(-)\n> >> >> \n> >> >> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> >> >> index 4323472e..66606a41 100644\n> >> >> --- a/src/libcamera/pipeline/simple/simple.cpp\n> >> >> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> >> >> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n> >> >>   if (ret < 0)\n> >> >>           return ret;\n> >> >>  \n> >> >> - /* Configure the video node. */\n> >> >> - V4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> >> >> + /* Configure the video node, taking into account any Bayer pattern change. */\n> >> >> + V4L2PixelFormat videoFormat;\n> >> >> + if (format.code == pipeConfig->code) {\n> >> >> +         videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> >> >> + } else {\n> >> >> +         /*\n> >> >> +          * Bayer pattern has changed because of the transform that was applied on\n> >> >> +          * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n> >> >> +          * pattern.\n> >> >> +          */\n> >> >> +         BayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n> >> >> +         cfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n> >> >> +         videoFormat = cfgBayer.toV4L2PixelFormat();\n> >> >> + }\n> >> >>  \n> >> >>   V4L2DeviceFormat captureFormat;\n> >> >>   captureFormat.fourcc = videoFormat;\n> >> >> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n> >> >>           return 0;\n> >> >>  \n> >> >>   StreamConfiguration inputCfg;\n> >> >> - inputCfg.pixelFormat = pipeConfig->captureFormat;\n> >> >> + inputCfg.pixelFormat = videoFormat.toPixelFormat();\n> >> >>   inputCfg.size = pipeConfig->captureSize;\n> >> >>   inputCfg.stride = captureFormat.planes[0].bpl;\n> >> >>   inputCfg.bufferCount = kNumInternalBuffers;\n> >> >> -- \n> >> >> 2.50.0\n> >> >> \n> >> \n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id F0E7FC328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Sep 2025 10:28:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 441F96936F;\n\tWed, 17 Sep 2025 12:28:24 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 919E769367\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Sep 2025 12:28:22 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3904A6A8;\n\tWed, 17 Sep 2025 12:27:03 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"lmffMqGZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758104823;\n\tbh=4I0EP2fhSMySXJNZ4S+9w3tcfyJtTxB2RkTLe4TqQKM=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=lmffMqGZuRCZsZGa0YcSVhxUBtba8cncCFzzMdQ/Z2GT+3tIUwnLn0CK8cLAllVKI\n\tMhlGTneGuuwCImzKRGE+xPo/vOs5Cl0S3vysHbfXgQo958F23OxpiFLpPzk0fX/JV8\n\tOnDPohHGjtlIluULaVH5noJ6ZAyeQURxDTXRn6oQ=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<854it1qwxg.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","References":"<20250812073055.5579-1-uajain@igalia.com>\n\t<fdvhyhomccgqqfymuvgomykmardrjvagjblwnvzazg2vh7pvhn@somnx3bemnfn>\n\t<85ecs78xfh.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<k6b4mlct7zw57s37us56myi4qanqlgxwnxhrtzsdxrjqjhmzzy@sqplfhurgsc4>\n\t<854it1qwxg.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Milan Zamazal <mzamazal@redhat.com>, Umang Jain <uajain@igalia.com>","Date":"Wed, 17 Sep 2025 11:28:18 +0100","Message-ID":"<175810489891.1246375.6265407858021509745@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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":36772,"web_url":"https://patchwork.libcamera.org/comment/36772/","msgid":"<f9de56291d9bfba2ce0565c583ba7dc5@igalia.com>","date":"2025-11-11T13:10:19","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"On 2025-09-17 15:58, Kieran Bingham wrote:\n> Quoting Milan Zamazal (2025-09-17 09:56:43)\n>> Umang Jain <uajain@igalia.com> writes:\n>> \n>> > On Mon, Sep 15, 2025 at 06:58:42PM +0200, Milan Zamazal wrote:\n>> >> Hi Umang,\n>> >> \n>> >\n>> >> Umang Jain <uajain@igalia.com> writes:\n>> >> \n>> >> > On Tue, Aug 12, 2025 at 01:00:55PM +0530, Umang Jain wrote:\n>> >> >> Bayer pattern on the sensor can change while configuring it with the\n>> >> >> intended capture format. This is due to the transform being applied on\n>> >> >\n>> >> >> the sensor which supports [v/h]flips.\n>> >> >> \n>> >> >> During configure(), the simple pipeline handler does not detect any\n>> >> >> bayer pattern changes that can arise due to the transformations being\n>> >> >> applied via SimpleCameraData:setupFormats(). In such cases, the video\n>> >> >> node will be configured in-correctly, without realising the bayer\n>> >> >> pattern has changed on the sensor, for the given capture format.\n>> >> >> \n>> >> >> This patch detects the bayer pattern change after the sensor has\n>> >> >> been configured and retrieves the corresponding V4L2 pixel format\n>> >> >> to correctly configure the video node and the input to converter or\n>> >> >> Soft-ISP.\n>> >> >> \n>> >> >> Signed-off-by: Umang Jain <uajain@igalia.com>\n>> >> >\n>> >> > Gentle ping for some feedback ;-)\n>> >> \n>> >> I checked that colours are correct on my rpi with software ISP now.\n>> >> Should I test it more broadly than just running `cam' with the default\n>> >> settings?\n>> >> \n>> >\n>> > Thanks for testing. Not sure what additional broader testing will bring\n>> > (maybe more edge cases are detected though like this transform one).\n>> \n>> OK, let's move this forward:\n>> \n>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n>> Tested-by: Milan Zamazal <mzamazal@redhat.com>\n>> \n>> This patch also permits testing and development of software ISP on (my)\n>> RPi (I get buffer errors without it).  It's good to have an affordable\n>> platform with reasonable hardware specs and working graphics drivers for\n>> the purpose.\n> \n> Thank you - the Tested-by here means I'd be happy to merge this.\n> \n> This looks like the sort of area I'd be curious if this could or should be\n> handled in a common CameraSensor code path if every platform should be\n> doing the same thing ...\n> \n> Otherwise I expect maybe this same change might be required on\n> IPU3/RKISP1/Mali-C55... etc ?\n> \n> If anyone wants to see if they can make this common (or if it actually\n> should in the first place) that can earn some internet-points...\n\nI support this, in fact that was what in my mind in the first place.\nIt can possibly next steps from here (we don't need to block merging\nthis),\nfrom someone possibly who has access to ideally all (or multiple)\nplatforms\nyou mentioned, for testing!\n\n> \n> --\n> Kieran\n> \n>> \n>> >> The patch makes sense to me but somebody with a better understanding of\n>> >> all the stuff should review it.\n>> >\n>> > fwiw, the RPi pipeline handler also transforms like this in configure()\n>> > which I vaguely remember.\n>> >> \n>> >> >> ---\n>> >> >> changes in v4:\n>> >> >> - Just rebase over new release v0.6.2 test and resend\n>> >> >> \n>> >> >> Changes in v3:\n>> >> >> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n>> >> >>   a global configuration file.\n>> >> >> \n>> >> >> Changes in v2:\n>> >> >> - Pass the updated format(Bayer applied with transforms) to the\n>> >> >>   converter/SoftISP input configuration as well to configure them\n>> >> >>   correctly.\n>> >> >> \n>> >> >> ---\n>> >> >>  src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n>> >> >>  1 file changed, 15 insertions(+), 3 deletions(-)\n>> >> >> \n>> >> >> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n>> >> >> index 4323472e..66606a41 100644\n>> >> >> --- a/src/libcamera/pipeline/simple/simple.cpp\n>> >> >> +++ b/src/libcamera/pipeline/simple/simple.cpp\n>> >> >> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>> >> >>   if (ret < 0)\n>> >> >>           return ret;\n>> >> >>  \n>> >> >> - /* Configure the video node. */\n>> >> >> - V4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n>> >> >> + /* Configure the video node, taking into account any Bayer pattern change. */\n>> >> >> + V4L2PixelFormat videoFormat;\n>> >> >> + if (format.code == pipeConfig->code) {\n>> >> >> +         videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n>> >> >> + } else {\n>> >> >> +         /*\n>> >> >> +          * Bayer pattern has changed because of the transform that was applied on\n>> >> >> +          * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n>> >> >> +          * pattern.\n>> >> >> +          */\n>> >> >> +         BayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n>> >> >> +         cfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n>> >> >> +         videoFormat = cfgBayer.toV4L2PixelFormat();\n>> >> >> + }\n>> >> >>  \n>> >> >>   V4L2DeviceFormat captureFormat;\n>> >> >>   captureFormat.fourcc = videoFormat;\n>> >> >> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>> >> >>           return 0;\n>> >> >>  \n>> >> >>   StreamConfiguration inputCfg;\n>> >> >> - inputCfg.pixelFormat = pipeConfig->captureFormat;\n>> >> >> + inputCfg.pixelFormat = videoFormat.toPixelFormat();\n>> >> >>   inputCfg.size = pipeConfig->captureSize;\n>> >> >>   inputCfg.stride = captureFormat.planes[0].bpl;\n>> >> >>   inputCfg.bufferCount = kNumInternalBuffers;\n>> >> >> -- \n>> >> >> 2.50.0\n>> >> >> \n>> >> \n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 919BBC3241\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Nov 2025 13:10:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C7539606D5;\n\tTue, 11 Nov 2025 14:10:28 +0100 (CET)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 69A8C606A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Nov 2025 14:10:25 +0100 (CET)","from maestria.local.igalia.com ([192.168.10.14]\n\thelo=mail.igalia.com) by fanzine2.igalia.com with esmtps \n\t(Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1vIo8b-0052Ed-PO; Tue, 11 Nov 2025 14:10:21 +0100","from webmail.service.igalia.com ([192.168.21.45])\n\tby mail.igalia.com with esmtp (Exim)\n\tid 1vIo8Z-00EvUy-HD; Tue, 11 Nov 2025 14:10:21 +0100","from localhost ([127.0.0.1] helo=webmail.igalia.com)\n\tby webmail with esmtp (Exim 4.96) (envelope-from <uajain@igalia.com>)\n\tid 1vIo8Y-0048nY-37; Tue, 11 Nov 2025 14:10:19 +0100"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"Q4joxVwe\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=Content-Transfer-Encoding:Content-Type:Message-ID:References:\n\tIn-Reply-To:Subject:Cc:To:From:Date:MIME-Version:Sender:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=Tftroyz3r1pCbjTNpYpoG11oMg4wm15DQOXlkjoLHrc=;\n\tb=Q4joxVweycixSkv3XNfrgvmw/5\n\t7Ym/keE6f+HN2LYtmBUme5smbW8QGN7FgLUzIE5g9xA07esU0v4Frx9Z6sj5tCyeqB8WK2kz9wwli\n\t0+vlp2F4hvojuhK0kjpDGSZdhA/u1D6WbVPI9wdtyCdlOaarB5IfPKR+yyhRl4kztndy5BkLltJ4E\n\t0Hc/YCz2/JY1kRSKE+W/UUe9wJlQrb2ZYsaLwLNBG34miIlJa1yPVT+KbhpfpGWhtKLzfXBcmOT4E\n\tKCHUEu1dBv3FUKB3bPeHPJRaRPt7Wra8rdN912CCHujbHATWO5TVMvf7sXzc8YTYShYgO3+bcGeAO\n\tPVAV0nUA==;","MIME-Version":"1.0","Date":"Tue, 11 Nov 2025 18:40:19 +0530","From":"Umang Jain <uajain@igalia.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","In-Reply-To":"<175810489891.1246375.6265407858021509745@ping.linuxembedded.co.uk>","References":"<20250812073055.5579-1-uajain@igalia.com>\n\t<fdvhyhomccgqqfymuvgomykmardrjvagjblwnvzazg2vh7pvhn@somnx3bemnfn>\n\t<85ecs78xfh.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<k6b4mlct7zw57s37us56myi4qanqlgxwnxhrtzsdxrjqjhmzzy@sqplfhurgsc4>\n\t<854it1qwxg.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<175810489891.1246375.6265407858021509745@ping.linuxembedded.co.uk>","Message-ID":"<f9de56291d9bfba2ce0565c583ba7dc5@igalia.com>","X-Sender":"uajain@igalia.com","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Spam-Report":"NO, Score=-3.2, Tests=ALL_TRUSTED=-3,AWL=-1.037,BAYES_50=0.8","X-Spam-Score":"-31","X-Spam-Bar":"---","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":36773,"web_url":"https://patchwork.libcamera.org/comment/36773/","msgid":"<511810ec-fe64-44af-ad5d-c589c0e72df7@ideasonboard.com>","date":"2025-11-11T13:22:06","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 08. 12. 9:30 keltezéssel, Umang Jain írta:\n> Bayer pattern on the sensor can change while configuring it with the\n> intended capture format. This is due to the transform being applied on\n> the sensor which supports [v/h]flips.\n> \n> During configure(), the simple pipeline handler does not detect any\n> bayer pattern changes that can arise due to the transformations being\n> applied via SimpleCameraData:setupFormats(). In such cases, the video\n> node will be configured in-correctly, without realising the bayer\n> pattern has changed on the sensor, for the given capture format.\n> \n> This patch detects the bayer pattern change after the sensor has\n> been configured and retrieves the corresponding V4L2 pixel format\n> to correctly configure the video node and the input to converter or\n> Soft-ISP.\n> \n> Signed-off-by: Umang Jain <uajain@igalia.com>\n> ---\n> changes in v4:\n> - Just rebase over new release v0.6.2 test and resend\n> \n> Changes in v3:\n> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n>    a global configuration file.\n> \n> Changes in v2:\n> - Pass the updated format(Bayer applied with transforms) to the\n>    converter/SoftISP input configuration as well to configure them\n>    correctly.\n> \n> ---\n>   src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n>   1 file changed, 15 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 4323472e..66606a41 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>   \tif (ret < 0)\n>   \t\treturn ret;\n>   \n> -\t/* Configure the video node. */\n> -\tV4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> +\t/* Configure the video node, taking into account any Bayer pattern change. */\n> +\tV4L2PixelFormat videoFormat;\n> +\tif (format.code == pipeConfig->code) {\n> +\t\tvideoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> +\t} else {\n> +\t\t/*\n> +\t\t * Bayer pattern has changed because of the transform that was applied on\n> +\t\t * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n> +\t\t * pattern.\n> +\t\t */\n> +\t\tBayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n> +\t\tcfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n> +\t\tvideoFormat = cfgBayer.toV4L2PixelFormat();\n\nJust a quick question. Is it not enough to do just the above unconditionally? I assume if the order\nhas not changed, then this should not change anything?\n\n\nRegards,\nBarnabás Pőcze\n\n\n> +\t}\n>   \n>   \tV4L2DeviceFormat captureFormat;\n>   \tcaptureFormat.fourcc = videoFormat;\n> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>   \t\treturn 0;\n>   \n>   \tStreamConfiguration inputCfg;\n> -\tinputCfg.pixelFormat = pipeConfig->captureFormat;\n> +\tinputCfg.pixelFormat = videoFormat.toPixelFormat();\n>   \tinputCfg.size = pipeConfig->captureSize;\n>   \tinputCfg.stride = captureFormat.planes[0].bpl;\n>   \tinputCfg.bufferCount = kNumInternalBuffers;","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 14A94C3263\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Nov 2025 13:22:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 262AE60A80;\n\tTue, 11 Nov 2025 14:22:12 +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 00938606A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Nov 2025 14:22:10 +0100 (CET)","from [192.168.33.25] (185.221.140.239.nat.pool.zt.hu\n\t[185.221.140.239])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A339FE;\n\tTue, 11 Nov 2025 14:20:11 +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=\"lSWwKm7X\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1762867212;\n\tbh=Foa5F6sTjPqpOGdbYOvF5bYcp1ghfdEJqaRRFKXkWiE=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=lSWwKm7XwCNJCEVtDd8bdWDkQJWq+FIpsRmytQt/YqFvnzbZDAac1Eg/bVItXT5Rc\n\tYRRSxjbYqn9t6/FWB9s7j0gbB2jFXoWZxJcsBqrH+embihu+YjMQ9A35zJfcv6UPz+\n\tr//H7HDQ0zM7oUJR4sl6EdVJnWKkda93BfA/GKYo=","Message-ID":"<511810ec-fe64-44af-ad5d-c589c0e72df7@ideasonboard.com>","Date":"Tue, 11 Nov 2025 14:22:06 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","To":"Umang Jain <uajain@igalia.com>, libcamera-devel@lists.libcamera.org","References":"<20250812073055.5579-1-uajain@igalia.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250812073055.5579-1-uajain@igalia.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":36774,"web_url":"https://patchwork.libcamera.org/comment/36774/","msgid":"<5a8f40714aab5ba2a8e7b9029c50de26@igalia.com>","date":"2025-11-11T14:33:54","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"On 2025-11-11 18:52, Barnabás Pőcze wrote:\n> Hi\n> \n> 2025. 08. 12. 9:30 keltezéssel, Umang Jain írta:\n>> Bayer pattern on the sensor can change while configuring it with the\n>> intended capture format. This is due to the transform being applied on\n>> the sensor which supports [v/h]flips.\n>> \n>> During configure(), the simple pipeline handler does not detect any\n>> bayer pattern changes that can arise due to the transformations being\n>> applied via SimpleCameraData:setupFormats(). In such cases, the video\n>> node will be configured in-correctly, without realising the bayer\n>> pattern has changed on the sensor, for the given capture format.\n>> \n>> This patch detects the bayer pattern change after the sensor has\n>> been configured and retrieves the corresponding V4L2 pixel format\n>> to correctly configure the video node and the input to converter or\n>> Soft-ISP.\n>> \n>> Signed-off-by: Umang Jain <uajain@igalia.com>\n>> ---\n>> changes in v4:\n>> - Just rebase over new release v0.6.2 test and resend\n>> \n>> Changes in v3:\n>> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n>>    a global configuration file.\n>> \n>> Changes in v2:\n>> - Pass the updated format(Bayer applied with transforms) to the\n>>    converter/SoftISP input configuration as well to configure them\n>>    correctly.\n>> \n>> ---\n>>   src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n>>   1 file changed, 15 insertions(+), 3 deletions(-)\n>> \n>> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n>> index 4323472e..66606a41 100644\n>> --- a/src/libcamera/pipeline/simple/simple.cpp\n>> +++ b/src/libcamera/pipeline/simple/simple.cpp\n>> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>>   \tif (ret < 0)\n>>   \t\treturn ret;\n>>   -\t/* Configure the video node. */\n>> -\tV4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n>> +\t/* Configure the video node, taking into account any Bayer pattern change. */\n>> +\tV4L2PixelFormat videoFormat;\n>> +\tif (format.code == pipeConfig->code) {\n>> +\t\tvideoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n>> +\t} else {\n>> +\t\t/*\n>> +\t\t * Bayer pattern has changed because of the transform that was applied on\n>> +\t\t * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n>> +\t\t * pattern.\n>> +\t\t */\n>> +\t\tBayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n>> +\t\tcfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n>> +\t\tvideoFormat = cfgBayer.toV4L2PixelFormat();\n> \n> Just a quick question. Is it not enough to do just the above unconditionally? I assume if the order\n> has not changed, then this should not change anything?\n> \n\nFrom a quick look, it does seem it can be done unconditionally, yes. The\nsimple pipeline handler only works RAW bayer sensors use cases, right?\n\n> \n> Regards,\n> Barnabás Pőcze\n> \n> \n>> +\t}\n>>     \tV4L2DeviceFormat captureFormat;\n>>   \tcaptureFormat.fourcc = videoFormat;\n>> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>>   \t\treturn 0;\n>>     \tStreamConfiguration inputCfg;\n>> -\tinputCfg.pixelFormat = pipeConfig->captureFormat;\n>> +\tinputCfg.pixelFormat = videoFormat.toPixelFormat();\n>>   \tinputCfg.size = pipeConfig->captureSize;\n>>   \tinputCfg.stride = captureFormat.planes[0].bpl;\n>>   \tinputCfg.bufferCount = kNumInternalBuffers;","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 E7352C3263\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Nov 2025 14:33:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2C32760A8B;\n\tTue, 11 Nov 2025 15:33:59 +0100 (CET)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D1951606A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Nov 2025 15:33:57 +0100 (CET)","from maestria.local.igalia.com ([192.168.10.14]\n\thelo=mail.igalia.com) by fanzine2.igalia.com with esmtps \n\t(Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1vIpRV-0053qw-4J; Tue, 11 Nov 2025 15:33:57 +0100","from webmail.service.igalia.com ([192.168.21.45])\n\tby mail.igalia.com with esmtp (Exim)\n\tid 1vIpRS-00F0Xs-Vk; Tue, 11 Nov 2025 15:33:56 +0100","from localhost ([127.0.0.1] helo=webmail.igalia.com)\n\tby webmail with esmtp (Exim 4.96) (envelope-from <uajain@igalia.com>)\n\tid 1vIpRS-0049cC-1K; Tue, 11 Nov 2025 15:33:54 +0100"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"F/F354Rl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=Content-Transfer-Encoding:Content-Type:Message-ID:References:\n\tIn-Reply-To:Subject:Cc:To:From:Date:MIME-Version:Sender:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=jWaOpqrHTVswBslWSLZIqiobeEULSJ/Lo61Vh3zsWtM=;\n\tb=F/F354Rlp1hP+IDPiV/GWzRbRq\n\teZF672emTVrKpS3CcJ5bu6bP0jy/FG8xoLB7x4aAoWbUbd7/D+lpJ48uDKWSmaHDt7f2GbRuNPi2T\n\tWSjx/Pe1ASuvlJChD+SqJsjHlzj603WCwYJdldzghNqqD0Ulmutbh8QhzHuWnkIQgLaUYtwA56Kbm\n\tU+/KUUbkBmQ/Nnu+BiXLzoh+WKIcfE82O9AqbHd3PDnM60wNVorlbk9iX3m3UzKH5MlmpdFB/Djnu\n\t8RXCMqdwZDTi1Tac7GqPoa6s1hZUN8ELy1HM2JpgWMhUgrLGY08XoYinKZZkO1LcKll6mmHjXz1yp\n\tgBQ9MW6A==;","MIME-Version":"1.0","Date":"Tue, 11 Nov 2025 20:03:54 +0530","From":"Umang Jain <uajain@igalia.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","In-Reply-To":"<511810ec-fe64-44af-ad5d-c589c0e72df7@ideasonboard.com>","References":"<20250812073055.5579-1-uajain@igalia.com>\n\t<511810ec-fe64-44af-ad5d-c589c0e72df7@ideasonboard.com>","Message-ID":"<5a8f40714aab5ba2a8e7b9029c50de26@igalia.com>","X-Sender":"uajain@igalia.com","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Spam-Report":"NO, Score=-2.2, Tests=ALL_TRUSTED=-3, BAYES_50=0.8,\n\tURIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001","X-Spam-Score":"-21","X-Spam-Bar":"--","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":36775,"web_url":"https://patchwork.libcamera.org/comment/36775/","msgid":"<176287481791.2141792.18083886327306722617@ping.linuxembedded.co.uk>","date":"2025-11-11T15:26:57","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Umang Jain (2025-11-11 14:33:54)\n> On 2025-11-11 18:52, Barnabás Pőcze wrote:\n> > Hi\n> > \n> > 2025. 08. 12. 9:30 keltezéssel, Umang Jain írta:\n> >> Bayer pattern on the sensor can change while configuring it with the\n> >> intended capture format. This is due to the transform being applied on\n> >> the sensor which supports [v/h]flips.\n> >> \n> >> During configure(), the simple pipeline handler does not detect any\n> >> bayer pattern changes that can arise due to the transformations being\n> >> applied via SimpleCameraData:setupFormats(). In such cases, the video\n> >> node will be configured in-correctly, without realising the bayer\n> >> pattern has changed on the sensor, for the given capture format.\n> >> \n> >> This patch detects the bayer pattern change after the sensor has\n> >> been configured and retrieves the corresponding V4L2 pixel format\n> >> to correctly configure the video node and the input to converter or\n> >> Soft-ISP.\n> >> \n> >> Signed-off-by: Umang Jain <uajain@igalia.com>\n> >> ---\n> >> changes in v4:\n> >> - Just rebase over new release v0.6.2 test and resend\n> >> \n> >> Changes in v3:\n> >> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n> >>    a global configuration file.\n> >> \n> >> Changes in v2:\n> >> - Pass the updated format(Bayer applied with transforms) to the\n> >>    converter/SoftISP input configuration as well to configure them\n> >>    correctly.\n> >> \n> >> ---\n> >>   src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n> >>   1 file changed, 15 insertions(+), 3 deletions(-)\n> >> \n> >> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> >> index 4323472e..66606a41 100644\n> >> --- a/src/libcamera/pipeline/simple/simple.cpp\n> >> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> >> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n> >>      if (ret < 0)\n> >>              return ret;\n> >>   -  /* Configure the video node. */\n> >> -    V4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> >> +    /* Configure the video node, taking into account any Bayer pattern change. */\n> >> +    V4L2PixelFormat videoFormat;\n> >> +    if (format.code == pipeConfig->code) {\n> >> +            videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> >> +    } else {\n> >> +            /*\n> >> +             * Bayer pattern has changed because of the transform that was applied on\n> >> +             * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n> >> +             * pattern.\n> >> +             */\n> >> +            BayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n> >> +            cfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n> >> +            videoFormat = cfgBayer.toV4L2PixelFormat();\n> > \n> > Just a quick question. Is it not enough to do just the above unconditionally? I assume if the order\n> > has not changed, then this should not change anything?\n> > \n> \n> From a quick look, it does seem it can be done unconditionally, yes. The\n> simple pipeline handler only works RAW bayer sensors use cases, right?\n\nNo.\n\nsimple should be able to support YUV sensors being attached too.\n\n--\nKieran\n\n> \n> > \n> > Regards,\n> > Barnabás Pőcze\n> > \n> > \n> >> +    }\n> >>      V4L2DeviceFormat captureFormat;\n> >>      captureFormat.fourcc = videoFormat;\n> >> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n> >>              return 0;\n> >>      StreamConfiguration inputCfg;\n> >> -    inputCfg.pixelFormat = pipeConfig->captureFormat;\n> >> +    inputCfg.pixelFormat = videoFormat.toPixelFormat();\n> >>      inputCfg.size = pipeConfig->captureSize;\n> >>      inputCfg.stride = captureFormat.planes[0].bpl;\n> >>      inputCfg.bufferCount = kNumInternalBuffers;","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 278EAC3263\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Nov 2025 15:27:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5086B60A80;\n\tTue, 11 Nov 2025 16:27:03 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C310F606A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Nov 2025 16:27:01 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 866401D4C;\n\tTue, 11 Nov 2025 16:25:02 +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=\"l1b9JJqn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1762874702;\n\tbh=1DtBdtqX74Jqfhj227hRZgu61jH6iRimSmZqxUxzmEg=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=l1b9JJqnOGxghDA+UxMy1g2yjY4AtJMA0CTnD57AW7HiAmtemHfffivNvRv3agv1G\n\tSo/Yb2+VsB62ijK6geay4+RBW6rHdim0swALdEuoWBcpCGmIMWrrL86Yhtz+D8mprw\n\thD42NpAZf5DHMkZ4VgKGTb+S+nh2FXYeiR5DcF6k=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<5a8f40714aab5ba2a8e7b9029c50de26@igalia.com>","References":"<20250812073055.5579-1-uajain@igalia.com>\n\t<511810ec-fe64-44af-ad5d-c589c0e72df7@ideasonboard.com>\n\t<5a8f40714aab5ba2a8e7b9029c50de26@igalia.com>","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tUmang Jain <uajain@igalia.com>","Date":"Tue, 11 Nov 2025 15:26:57 +0000","Message-ID":"<176287481791.2141792.18083886327306722617@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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":36777,"web_url":"https://patchwork.libcamera.org/comment/36777/","msgid":"<28bce8678bf31a6ea4728208c5582365@igalia.com>","date":"2025-11-12T07:57:30","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"On 2025-11-11 20:56, Kieran Bingham wrote:\n> Quoting Umang Jain (2025-11-11 14:33:54)\n>> On 2025-11-11 18:52, Barnabás Pőcze wrote:\n>> > Hi\n>> > \n>> > 2025. 08. 12. 9:30 keltezéssel, Umang Jain írta:\n>> >> Bayer pattern on the sensor can change while configuring it with the\n>> >> intended capture format. This is due to the transform being applied on\n>> >> the sensor which supports [v/h]flips.\n>> >> \n>> >> During configure(), the simple pipeline handler does not detect any\n>> >> bayer pattern changes that can arise due to the transformations being\n>> >> applied via SimpleCameraData:setupFormats(). In such cases, the video\n>> >> node will be configured in-correctly, without realising the bayer\n>> >> pattern has changed on the sensor, for the given capture format.\n>> >> \n>> >> This patch detects the bayer pattern change after the sensor has\n>> >> been configured and retrieves the corresponding V4L2 pixel format\n>> >> to correctly configure the video node and the input to converter or\n>> >> Soft-ISP.\n>> >> \n>> >> Signed-off-by: Umang Jain <uajain@igalia.com>\n>> >> ---\n>> >> changes in v4:\n>> >> - Just rebase over new release v0.6.2 test and resend\n>> >> \n>> >> Changes in v3:\n>> >> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n>> >>    a global configuration file.\n>> >> \n>> >> Changes in v2:\n>> >> - Pass the updated format(Bayer applied with transforms) to the\n>> >>    converter/SoftISP input configuration as well to configure them\n>> >>    correctly.\n>> >> \n>> >> ---\n>> >>   src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n>> >>   1 file changed, 15 insertions(+), 3 deletions(-)\n>> >> \n>> >> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n>> >> index 4323472e..66606a41 100644\n>> >> --- a/src/libcamera/pipeline/simple/simple.cpp\n>> >> +++ b/src/libcamera/pipeline/simple/simple.cpp\n>> >> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>> >>      if (ret < 0)\n>> >>              return ret;\n>> >>   -  /* Configure the video node. */\n>> >> -    V4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n>> >> +    /* Configure the video node, taking into account any Bayer pattern change. */\n>> >> +    V4L2PixelFormat videoFormat;\n>> >> +    if (format.code == pipeConfig->code) {\n>> >> +            videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n>> >> +    } else {\n>> >> +            /*\n>> >> +             * Bayer pattern has changed because of the transform that was applied on\n>> >> +             * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n>> >> +             * pattern.\n>> >> +             */\n>> >> +            BayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n>> >> +            cfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n>> >> +            videoFormat = cfgBayer.toV4L2PixelFormat();\n>> > \n>> > Just a quick question. Is it not enough to do just the above unconditionally? I assume if the order\n>> > has not changed, then this should not change anything?\n>> > \n>> \n>> From a quick look, it does seem it can be done unconditionally, yes. The\n>> simple pipeline handler only works RAW bayer sensors use cases, right?\n> \n> No.\n> \n> simple should be able to support YUV sensors being attached too.\n\n\nAh, I was wary of that, then I would say for now - it should be not done\nunconditionally and keep the previous codepath in loop.\nI wonder how the calls, data->sensor_->bayerOrder(), would look like on\nthe YUV sensors.\n\n@Barnabás I would prefer to keep it as it is, for now.\n\n> \n> --\n> Kieran\n> \n>> \n>> > \n>> > Regards,\n>> > Barnabás Pőcze\n>> > \n>> > \n>> >> +    }\n>> >>      V4L2DeviceFormat captureFormat;\n>> >>      captureFormat.fourcc = videoFormat;\n>> >> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>> >>              return 0;\n>> >>      StreamConfiguration inputCfg;\n>> >> -    inputCfg.pixelFormat = pipeConfig->captureFormat;\n>> >> +    inputCfg.pixelFormat = videoFormat.toPixelFormat();\n>> >>      inputCfg.size = pipeConfig->captureSize;\n>> >>      inputCfg.stride = captureFormat.planes[0].bpl;\n>> >>      inputCfg.bufferCount = kNumInternalBuffers;","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 F204DC3263\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Nov 2025 07:57:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E015C60A8B;\n\tWed, 12 Nov 2025 08:57:36 +0100 (CET)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BF839606D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Nov 2025 08:57:33 +0100 (CET)","from maestria.local.igalia.com ([192.168.10.14]\n\thelo=mail.igalia.com) by fanzine2.igalia.com with esmtps \n\t(Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1vJ5jQ-005SbJ-R4; Wed, 12 Nov 2025 08:57:32 +0100","from webmail.service.igalia.com ([192.168.21.45])\n\tby mail.igalia.com with esmtp (Exim)\n\tid 1vJ5jO-00Fogb-M1; Wed, 12 Nov 2025 08:57:32 +0100","from localhost ([127.0.0.1] helo=webmail.igalia.com)\n\tby webmail with esmtp (Exim 4.96) (envelope-from <uajain@igalia.com>)\n\tid 1vJ5jO-004IO7-0M; Wed, 12 Nov 2025 08:57:30 +0100"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"Pl//ENtA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=Content-Transfer-Encoding:Content-Type:Message-ID:References:\n\tIn-Reply-To:Subject:Cc:To:From:Date:MIME-Version:Sender:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=nUQNbPVNU9QwG1nAvT54c7Ptini7af6XljnK7jZsPpQ=;\n\tb=Pl//ENtACQrMMSnArRQlqOKNFn\n\tcPEWkmuEfm8oFBHeKD7o/vuwytbc3ZjzHlvZGGutRYjW1OTnl2+ipr2QilteBZzNPNEs/4qD2tE+t\n\tR3ouQy09RCUC+7n7HcTqpP0tT/Eg08P7u3MRCHcR9SUcqpyEYAtBsWddlU/FdVFBhTQ8TETd8eTbS\n\tLrVmxvKRtG+rD+vQheWFcr8CHmuBID65Y2IEu1BwMULQkpLlbFfqA/M6XPAPgDQ2jn/PuX12B8P2a\n\t2K+JMAbiT+z1tItIiW0OEyKeUV8NHullp1Ex+SiRusFR0kcAOI5L7GDDViutEBUB1qVXoosg4vrSB\n\trvKHDUug==;","MIME-Version":"1.0","Date":"Wed, 12 Nov 2025 13:27:30 +0530","From":"Umang Jain <uajain@igalia.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","In-Reply-To":"<176287481791.2141792.18083886327306722617@ping.linuxembedded.co.uk>","References":"<20250812073055.5579-1-uajain@igalia.com>\n\t<511810ec-fe64-44af-ad5d-c589c0e72df7@ideasonboard.com>\n\t<5a8f40714aab5ba2a8e7b9029c50de26@igalia.com>\n\t<176287481791.2141792.18083886327306722617@ping.linuxembedded.co.uk>","Message-ID":"<28bce8678bf31a6ea4728208c5582365@igalia.com>","X-Sender":"uajain@igalia.com","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Spam-Report":"NO, Score=-2.2, Tests=ALL_TRUSTED=-3, AWL=0.001, BAYES_50=0.8,\n\tURIBL_BLOCKED=0.001","X-Spam-Score":"-21","X-Spam-Bar":"--","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":37033,"web_url":"https://patchwork.libcamera.org/comment/37033/","msgid":"<f13f0265bd38c19421071e6a4640ed20@igalia.com>","date":"2025-11-24T15:54:20","subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"Does this need any more discussion or issues to be discussed?\n\nOn 2025-08-12 13:00, Umang Jain wrote:\n> Bayer pattern on the sensor can change while configuring it with the\n> intended capture format. This is due to the transform being applied on\n> the sensor which supports [v/h]flips.\n> \n> During configure(), the simple pipeline handler does not detect any\n> bayer pattern changes that can arise due to the transformations being\n> applied via SimpleCameraData:setupFormats(). In such cases, the video\n> node will be configured in-correctly, without realising the bayer\n> pattern has changed on the sensor, for the given capture format.\n> \n> This patch detects the bayer pattern change after the sensor has\n> been configured and retrieves the corresponding V4L2 pixel format\n> to correctly configure the video node and the input to converter or\n> Soft-ISP.\n> \n> Signed-off-by: Umang Jain <uajain@igalia.com>\n> ---\n> changes in v4:\n> - Just rebase over new release v0.6.2 test and resend\n> \n> Changes in v3:\n> - Drop addition of 'unicam' in supportedDevices[]. This could be enabled through\n>   a global configuration file.\n> \n> Changes in v2:\n> - Pass the updated format(Bayer applied with transforms) to the\n>   converter/SoftISP input configuration as well to configure them\n>   correctly.\n> \n> ---\n>  src/libcamera/pipeline/simple/simple.cpp | 18 +++++++++++++++---\n>  1 file changed, 15 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 4323472e..66606a41 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -1356,8 +1356,20 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>  \tif (ret < 0)\n>  \t\treturn ret;\n>  \n> -\t/* Configure the video node. */\n> -\tV4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> +\t/* Configure the video node, taking into account any Bayer pattern change. */\n> +\tV4L2PixelFormat videoFormat;\n> +\tif (format.code == pipeConfig->code) {\n> +\t\tvideoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);\n> +\t} else {\n> +\t\t/*\n> +\t\t * Bayer pattern has changed because of the transform that was applied on\n> +\t\t * the sensor. Get the V4L2PixelFormat corresponding to the configured Bayer\n> +\t\t * pattern.\n> +\t\t */\n> +\t\tBayerFormat cfgBayer = BayerFormat::fromPixelFormat(pipeConfig->captureFormat);\n> +\t\tcfgBayer.order = data->sensor_->bayerOrder(config->combinedTransform());\n> +\t\tvideoFormat = cfgBayer.toV4L2PixelFormat();\n> +\t}\n>  \n>  \tV4L2DeviceFormat captureFormat;\n>  \tcaptureFormat.fourcc = videoFormat;\n> @@ -1399,7 +1411,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n>  \t\treturn 0;\n>  \n>  \tStreamConfiguration inputCfg;\n> -\tinputCfg.pixelFormat = pipeConfig->captureFormat;\n> +\tinputCfg.pixelFormat = videoFormat.toPixelFormat();\n>  \tinputCfg.size = pipeConfig->captureSize;\n>  \tinputCfg.stride = captureFormat.planes[0].bpl;\n>  \tinputCfg.bufferCount = kNumInternalBuffers;","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 769E1C32EF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Nov 2025 15:54:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7C4A760A9D;\n\tMon, 24 Nov 2025 16:54:25 +0100 (CET)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A9696096B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Nov 2025 16:54:23 +0100 (CET)","from maestria.local.igalia.com ([192.168.10.14]\n\thelo=mail.igalia.com) by fanzine2.igalia.com with esmtps \n\t(Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1vNYtS-004obI-Rw\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Nov 2025 16:54:22 +0100","from webmail.service.igalia.com ([192.168.21.45])\n\tby mail.igalia.com with esmtp (Exim) id 1vNYtQ-00CXMe-Nr\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Nov 2025 16:54:22 +0100","from localhost ([127.0.0.1] helo=webmail.igalia.com)\n\tby webmail with esmtp (Exim 4.96) (envelope-from <uajain@igalia.com>)\n\tid 1vNYtQ-002GXZ-0q for libcamera-devel@lists.libcamera.org;\n\tMon, 24 Nov 2025 16:54:20 +0100"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"HoF3lMR1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=Content-Transfer-Encoding:Content-Type:Message-ID:References:\n\tIn-Reply-To:Subject:To:From:Date:MIME-Version:Sender:Reply-To:Cc:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=bQAxUsUoPP1GTKLSYTLUvfnPerkSLFf8jGwfEqTyuDE=;\n\tb=HoF3lMR1OVf39+vgZ6KUYcvnQu\n\tVXB1F5T3YudGbXkVyqDmwr0YO8DoGIGel9E8kmBSxAZFCsG2PGfpWStA5VWEK3JxJxgE6l/3WjOP0\n\tX8HKf3DDzLGLMAIpj8nPp7EABjc1OzGXUslXnQibxC+h6LIcTzyQDVCCkIjAGwF6C3GWoYptVFK9n\n\ttAkcOQx/UyhoJzrWMrkgCZC4gdFPHHKTW556G1gYmTz8w0As7Sy9xlTLo5+fTSUqWopOLUbK8Zi0r\n\t7/aF0HthbRZKAVae3xcbpkGfkiuciSpwDmtZT0QaSasvf+Q80dOuFpR64/1NixBzN7RNw9tUokMjT\n\tczS6bscQ==;","MIME-Version":"1.0","Date":"Mon, 24 Nov 2025 21:24:20 +0530","From":"Umang Jain <uajain@igalia.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4] libcamera: simple: Detect Bayer pattern change during\n\tconfigure()","In-Reply-To":"<20250812073055.5579-1-uajain@igalia.com>","References":"<20250812073055.5579-1-uajain@igalia.com>","Message-ID":"<f13f0265bd38c19421071e6a4640ed20@igalia.com>","X-Sender":"uajain@igalia.com","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Spam-Report":"NO, Score=-2.2, Tests=ALL_TRUSTED=-3,AWL=0.000,BAYES_50=0.8","X-Spam-Score":"-21","X-Spam-Bar":"--","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>"}}]