[{"id":35678,"web_url":"https://patchwork.libcamera.org/comment/35678/","msgid":"<20250901145746.GE1705@pendragon.ideasonboard.com>","date":"2025-09-01T14:57:46","subject":"Re: [PATCH v2 1/1] apps: cam: Support PPM output for other RGB\n\tformats","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Milan,\n\nThank you for the patch.\n\nOn Mon, Sep 01, 2025 at 04:16:42PM +0200, Milan Zamazal wrote:\n> GPU ISP can produce only 32-bit output.  Let's add support to the PPM\n> writer for all the common RGB image formats so that we can store GPU ISP\n> output as PPM files.  Contingent alpha values are ignored as there is no\n> support for the alpha channel in PPM.\n> \n> There is no obvious performance penalty in my environment compared to\n> output in the raw format.\n> \n> Co-developed-by: Pavel Machek <pavel@ucw.cz>\n\nYou need a SoB line from Pavel here.\n\n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/apps/common/ppm_writer.cpp | 66 ++++++++++++++++++++++++++++++++--\n>  1 file changed, 63 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/apps/common/ppm_writer.cpp b/src/apps/common/ppm_writer.cpp\n> index 368de8bf6..9ba0216a0 100644\n> --- a/src/apps/common/ppm_writer.cpp\n> +++ b/src/apps/common/ppm_writer.cpp\n> @@ -10,6 +10,8 @@\n>  #include <errno.h>\n>  #include <fstream>\n>  #include <iostream>\n> +#include <stddef.h>\n> +#include <vector>\n>  \n>  #include <libcamera/formats.h>\n>  #include <libcamera/pixel_format.h>\n> @@ -20,8 +22,56 @@ int PPMWriter::write(const char *filename,\n>  \t\t     const StreamConfiguration &config,\n>  \t\t     const Span<uint8_t> &data)\n>  {\n> -\tif (config.pixelFormat != formats::BGR888) {\n> -\t\tstd::cerr << \"Only BGR888 output pixel format is supported (\"\n> +\tsize_t rPos, gPos, bPos, bytesPerPixel;\n> +\tswitch (config.pixelFormat) {\n> +\tcase libcamera::formats::R8:\n> +\t\trPos = 0;\n> +\t\tgPos = 0;\n> +\t\tbPos = 0;\n> +\t\tbytesPerPixel = 1;\n> +\t\tbreak;\n> +\tcase libcamera::formats::RGB888:\n> +\t\trPos = 2;\n> +\t\tgPos = 1;\n> +\t\tbPos = 0;\n> +\t\tbytesPerPixel = 3;\n> +\t\tbreak;\n> +\tcase libcamera::formats::BGR888:\n> +\t\trPos = 0;\n> +\t\tgPos = 1;\n> +\t\tbPos = 2;\n> +\t\tbytesPerPixel = 3;\n> +\t\tbreak;\n> +\tcase libcamera::formats::ARGB8888:\n> +\tcase libcamera::formats::XRGB8888:\n> +\t\trPos = 2;\n> +\t\tgPos = 1;\n> +\t\tbPos = 0;\n> +\t\tbytesPerPixel = 4;\n> +\t\tbreak;\n> +\tcase libcamera::formats::RGBA8888:\n> +\tcase libcamera::formats::RGBX8888:\n> +\t\trPos = 3;\n> +\t\tgPos = 2;\n> +\t\tbPos = 1;\n> +\t\tbytesPerPixel = 4;\n> +\t\tbreak;\n> +\tcase libcamera::formats::ABGR8888:\n> +\tcase libcamera::formats::XBGR8888:\n> +\t\trPos = 0;\n> +\t\tgPos = 1;\n> +\t\tbPos = 2;\n> +\t\tbytesPerPixel = 4;\n> +\t\tbreak;\n> +\tcase libcamera::formats::BGRA8888:\n> +\tcase libcamera::formats::BGRX8888:\n> +\t\trPos = 1;\n> +\t\tgPos = 2;\n> +\t\tbPos = 3;\n> +\t\tbytesPerPixel = 4;\n> +\t\tbreak;\n\nHow about a static const map indexed by format ? Something like\n\n\tstruct FormatTransformation {\n\t\tunsigned int rPos;\n\t\tunsigned int gPos;\n\t\tunsigned int bPos;\n\t\tunsigned int bytesPerPixel;\n\t};\n\n\tstatic const std::map<libcamera::PixelFormat> transforms = {\n\t\t{ libcamera::formats::R8, { 0, 0, 0, 1 } },\n\t\t...\n\t};\n\n> +\tdefault:\n> +\t\tstd::cerr << \"Only RGB output pixel formats are supported (\"\n>  \t\t\t  << config.pixelFormat << \" requested)\" << std::endl;\n>  \t\treturn -EINVAL;\n>  \t}\n> @@ -42,8 +92,18 @@ int PPMWriter::write(const char *filename,\n>  \n>  \tconst unsigned int rowLength = config.size.width * 3;\n>  \tconst char *row = reinterpret_cast<const char *>(data.data());\n> +\tconst bool transform = config.pixelFormat != formats::BGR888;\n> +\tstd::vector<char> transformedRow(transform ? rowLength : 0);\n> +\n>  \tfor (unsigned int y = 0; y < config.size.height; y++, row += config.stride) {\n> -\t\toutput.write(row, rowLength);\n> +\t\tif (transform)\n> +\t\t\tfor (unsigned int x = 0; x < config.size.width; x++) {\n> +\t\t\t\ttransformedRow[x * 3] = row[x * bytesPerPixel + rPos];\n> +\t\t\t\ttransformedRow[x * 3 + 1] = row[x * bytesPerPixel + gPos];\n> +\t\t\t\ttransformedRow[x * 3 + 2] = row[x * bytesPerPixel + bPos];\n> +\t\t\t}\n\nMissing outer curly brackets.\n\n> +\n> +\t\toutput.write((transform ? transformedRow.data() : row), rowLength);\n\nNo need for inner parentheses :-)\n\n>  \t\tif (!output) {\n>  \t\t\tstd::cerr << \"Failed to write image data at row \" << y << std::endl;\n>  \t\t\treturn -EIO;","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 14E44BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Sep 2025 14:58:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A7C2C69332;\n\tMon,  1 Sep 2025 16:58:08 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 575EB69323\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Sep 2025 16:58:07 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(230.215-178-91.adsl-dyn.isp.belgacom.be [91.178.215.230])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id AB84BD77;\n\tMon,  1 Sep 2025 16:56:59 +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=\"XuGtHRJs\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1756738619;\n\tbh=vJwn6Qsu8b+UhglgZ8ytpiOi+IXbkhlZTsO5U42UHEM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=XuGtHRJsop2GYyLEhC2TGEmhsmcWED8VefoYEk9kb183aO+OYC8ATOQbXQA8yJaXA\n\tZ1gowQ7vSCClKja04jRh+uaucUYuNad9eKYfo3aVn5OHutE/gggPwzssUE5Ct/MQ60\n\tqrP90AHPvRqybPCBR4GuSsgXhofcP4F17o2ujIt0=","Date":"Mon, 1 Sep 2025 16:57:46 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tPavel Machek <pavel@ucw.cz>","Subject":"Re: [PATCH v2 1/1] apps: cam: Support PPM output for other RGB\n\tformats","Message-ID":"<20250901145746.GE1705@pendragon.ideasonboard.com>","References":"<20250901141643.29136-1-mzamazal@redhat.com>\n\t<20250901141643.29136-2-mzamazal@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250901141643.29136-2-mzamazal@redhat.com>","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":35683,"web_url":"https://patchwork.libcamera.org/comment/35683/","msgid":"<85bjnu2m1c.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-09-01T16:08:15","subject":"Re: [PATCH v2 1/1] apps: cam: Support PPM output for other RGB\n\tformats","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Laurent,\n\nthank you for review.\n\nLaurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n\n> Hi Milan,\n>\n> Thank you for the patch.\n>\n> On Mon, Sep 01, 2025 at 04:16:42PM +0200, Milan Zamazal wrote:\n>> GPU ISP can produce only 32-bit output.  Let's add support to the PPM\n>> writer for all the common RGB image formats so that we can store GPU ISP\n>> output as PPM files.  Contingent alpha values are ignored as there is no\n>> support for the alpha channel in PPM.\n>> \n>> There is no obvious performance penalty in my environment compared to\n>> output in the raw format.\n>> \n>> Co-developed-by: Pavel Machek <pavel@ucw.cz>\n>\n> You need a SoB line from Pavel here.\n\nPavel, can you provide one?\n\n(Or can I take the one from https://patchwork.libcamera.org/patch/23177/ ?)\n\n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> ---\n>>  src/apps/common/ppm_writer.cpp | 66 ++++++++++++++++++++++++++++++++--\n>>  1 file changed, 63 insertions(+), 3 deletions(-)\n>> \n>> diff --git a/src/apps/common/ppm_writer.cpp b/src/apps/common/ppm_writer.cpp\n>> index 368de8bf6..9ba0216a0 100644\n>> --- a/src/apps/common/ppm_writer.cpp\n>> +++ b/src/apps/common/ppm_writer.cpp\n>> @@ -10,6 +10,8 @@\n>>  #include <errno.h>\n>>  #include <fstream>\n>>  #include <iostream>\n>> +#include <stddef.h>\n>> +#include <vector>\n>>  \n>>  #include <libcamera/formats.h>\n>>  #include <libcamera/pixel_format.h>\n>> @@ -20,8 +22,56 @@ int PPMWriter::write(const char *filename,\n>>  \t\t     const StreamConfiguration &config,\n>>  \t\t     const Span<uint8_t> &data)\n>>  {\n>> -\tif (config.pixelFormat != formats::BGR888) {\n>> -\t\tstd::cerr << \"Only BGR888 output pixel format is supported (\"\n>> +\tsize_t rPos, gPos, bPos, bytesPerPixel;\n>> +\tswitch (config.pixelFormat) {\n>> +\tcase libcamera::formats::R8:\n>> +\t\trPos = 0;\n>> +\t\tgPos = 0;\n>> +\t\tbPos = 0;\n>> +\t\tbytesPerPixel = 1;\n>> +\t\tbreak;\n>> +\tcase libcamera::formats::RGB888:\n>> +\t\trPos = 2;\n>> +\t\tgPos = 1;\n>> +\t\tbPos = 0;\n>> +\t\tbytesPerPixel = 3;\n>> +\t\tbreak;\n>> +\tcase libcamera::formats::BGR888:\n>> +\t\trPos = 0;\n>> +\t\tgPos = 1;\n>> +\t\tbPos = 2;\n>> +\t\tbytesPerPixel = 3;\n>> +\t\tbreak;\n>> +\tcase libcamera::formats::ARGB8888:\n>> +\tcase libcamera::formats::XRGB8888:\n>> +\t\trPos = 2;\n>> +\t\tgPos = 1;\n>> +\t\tbPos = 0;\n>> +\t\tbytesPerPixel = 4;\n>> +\t\tbreak;\n>> +\tcase libcamera::formats::RGBA8888:\n>> +\tcase libcamera::formats::RGBX8888:\n>> +\t\trPos = 3;\n>> +\t\tgPos = 2;\n>> +\t\tbPos = 1;\n>> +\t\tbytesPerPixel = 4;\n>> +\t\tbreak;\n>> +\tcase libcamera::formats::ABGR8888:\n>> +\tcase libcamera::formats::XBGR8888:\n>> +\t\trPos = 0;\n>> +\t\tgPos = 1;\n>> +\t\tbPos = 2;\n>> +\t\tbytesPerPixel = 4;\n>> +\t\tbreak;\n>> +\tcase libcamera::formats::BGRA8888:\n>> +\tcase libcamera::formats::BGRX8888:\n>> +\t\trPos = 1;\n>> +\t\tgPos = 2;\n>> +\t\tbPos = 3;\n>> +\t\tbytesPerPixel = 4;\n>> +\t\tbreak;\n>\n> How about a static const map indexed by format ? Something like\n>\n> \tstruct FormatTransformation {\n> \t\tunsigned int rPos;\n> \t\tunsigned int gPos;\n> \t\tunsigned int bPos;\n> \t\tunsigned int bytesPerPixel;\n> \t};\n>\n> \tstatic const std::map<libcamera::PixelFormat> transforms = {\n> \t\t{ libcamera::formats::R8, { 0, 0, 0, 1 } },\n> \t\t...\n> \t};\n\nYes, looks better, I'll change it in v3.\n\n>> +\tdefault:\n>> +\t\tstd::cerr << \"Only RGB output pixel formats are supported (\"\n>>  \t\t\t  << config.pixelFormat << \" requested)\" << std::endl;\n>>  \t\treturn -EINVAL;\n>>  \t}\n>> @@ -42,8 +92,18 @@ int PPMWriter::write(const char *filename,\n>>  \n>>  \tconst unsigned int rowLength = config.size.width * 3;\n>>  \tconst char *row = reinterpret_cast<const char *>(data.data());\n>> +\tconst bool transform = config.pixelFormat != formats::BGR888;\n>> +\tstd::vector<char> transformedRow(transform ? rowLength : 0);\n>> +\n>>  \tfor (unsigned int y = 0; y < config.size.height; y++, row += config.stride) {\n>> -\t\toutput.write(row, rowLength);\n>> +\t\tif (transform)\n>> +\t\t\tfor (unsigned int x = 0; x < config.size.width; x++) {\n>> +\t\t\t\ttransformedRow[x * 3] = row[x * bytesPerPixel + rPos];\n>> +\t\t\t\ttransformedRow[x * 3 + 1] = row[x * bytesPerPixel + gPos];\n>> +\t\t\t\ttransformedRow[x * 3 + 2] = row[x * bytesPerPixel + bPos];\n>> +\t\t\t}\n>\n> Missing outer curly brackets.\n\nOK.\n\n>> +\n>> +\t\toutput.write((transform ? transformedRow.data() : row), rowLength);\n>\n> No need for inner parentheses :-)\n\nDamned infix languages. :-)\n\n>>  \t\tif (!output) {\n>>  \t\t\tstd::cerr << \"Failed to write image data at row \" << y << std::endl;\n>>  \t\t\treturn -EIO;","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 36123BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Sep 2025 16:08:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EE8F869324;\n\tMon,  1 Sep 2025 18:08:26 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F059469323\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Sep 2025 18:08:24 +0200 (CEST)","from mail-qv1-f72.google.com (mail-qv1-f72.google.com\n\t[209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-623-f1ndUVgbO-ifalVJruVz1w-1; Mon, 01 Sep 2025 12:08:20 -0400","by mail-qv1-f72.google.com with SMTP id\n\t6a1803df08f44-70dd6d25992so87314146d6.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 01 Sep 2025 09:08:20 -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\t6a1803df08f44-70fb28b93a4sm41997176d6.66.2025.09.01.09.08.17\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 01 Sep 2025 09:08:18 -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=\"iVOM/8dK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1756742903;\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=vahdeziq6TBykzAaeHroIgoFPmiDsMkd4cEPzG8TPPE=;\n\tb=iVOM/8dKbVXZk4jdkT2t5Ou9Vlg3SsW4xhxp2stKyIhkJuIPY5qNKzuDLs2vgiDr12KNc7\n\tpyiLVk+LL2wvqe/MlMUhtkOw9Ou5CkLauR666yGNsM8JKP2talKaZeeadVNfmsCRWJ931v\n\tbQ821aNRKhYHhnzVXTOqdt1hTRPaSB4=","X-MC-Unique":"f1ndUVgbO-ifalVJruVz1w-1","X-Mimecast-MFC-AGG-ID":"f1ndUVgbO-ifalVJruVz1w_1756742900","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1756742900; x=1757347700;\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=vahdeziq6TBykzAaeHroIgoFPmiDsMkd4cEPzG8TPPE=;\n\tb=aIT60kAFRoXlAvNcpuv2N4DytmbeI+F2XhFVP3ktslx9bl6GcQubd+aaPB1efaaMYA\n\t6TJi9nLoY8gS7M8IFLBIMnKL11QDkEG4YXxlskzWH++oTrENqc6NgIHmfcHwBC10wnmD\n\tr5+VencK99epyaHFtLlpTuelpsUqNCfYv44E7TUzdjHGq8s9a5bLckmbicOWWF3uNMOK\n\t8R0kRx0rrk4gS5EVKaiUDd54xd3K+0XNlmjozsYHgwjLCaieZYclobWAeOd6jv4e/5Xb\n\tlSmBEzd/zhkt+ZYpqX0SIIb/FBle8hKWrcCj95ut0DJxCOK2Nhscd2ck2kjAG1CDLEE0\n\tPORQ==","X-Gm-Message-State":"AOJu0YwUkIuFJ0hyEFuGrsfUiJuce/NYuLSU2btAwQ7fyQUS6T33shYo\n\t+8Yg3iHloxg1fAxxonsSb3y9WpNb0IilGJ5wNNwoA/fK1WbgMKuKpTqjaPywv7tZRvKK8srNMds\n\t3lIHnaC3HxpXceTIwIEzawec2TPPRWOW0D6BIXl8/UpswAX7dAAlOlyi1a08ousQnyRFEl5nWND\n\ts=","X-Gm-Gg":"ASbGncttb5Oto2sovbqmWERYHtzPEG8eBP5Bbvx/rwt5udKg0x0EesHAffAvOCFlday\n\tKYwF1RJOOe4nlUWvsqwsGzS3BH+mdx2RsjgsSNkN3ZrOWTjdDbLPqi5A8fa+uolpT3c6tydwcOk\n\tK8D53xk47UlLYJ95rWi/JkCVshXwlEBZKHH345thHQK3NGOuMTYJzKGetdMAOTuRlrYtiegDDMo\n\tHTWtsGUqB1CJixkKWHjYqoTQuux3Lo8CMPuSLi9pisng/996d+woZ95WxmXnIOpQSdTLJfwE1Zu\n\tq0VQTi9/JifjjaqoNIgiB/ELMDgYbcfgyAFluyxjETIZxkiLiolAXlMm3v4QyIL5QZLsSWR72tM\n\tqOAyTabZ3LKBL3wfcyQ==","X-Received":["by 2002:a05:6214:f2e:b0:71b:912:eb with SMTP id\n\t6a1803df08f44-71b093fc95dmr27143506d6.24.1756742899672; \n\tMon, 01 Sep 2025 09:08:19 -0700 (PDT)","by 2002:a05:6214:f2e:b0:71b:912:eb with SMTP id\n\t6a1803df08f44-71b093fc95dmr27142786d6.24.1756742898971; \n\tMon, 01 Sep 2025 09:08:18 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IGprRcfwk3NtQjjPkqfVCVTGkWQwUVZDsUWPEy2Dgjoo0tOGjb0BOx46tpHEs4nNxUsX/aljQ==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,  Bryan O'Donoghue\n\t<bryan.odonoghue@linaro.org>,  Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>,  Pavel Machek <pavel@ucw.cz>","Subject":"Re: [PATCH v2 1/1] apps: cam: Support PPM output for other RGB\n\tformats","In-Reply-To":"<20250901145746.GE1705@pendragon.ideasonboard.com> (Laurent\n\tPinchart's message of \"Mon, 1 Sep 2025 16:57:46 +0200\")","References":"<20250901141643.29136-1-mzamazal@redhat.com>\n\t<20250901141643.29136-2-mzamazal@redhat.com>\n\t<20250901145746.GE1705@pendragon.ideasonboard.com>","Date":"Mon, 01 Sep 2025 18:08:15 +0200","Message-ID":"<85bjnu2m1c.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":"F_yLN51Z6pBNA5zaygnLJHJt2TVIVv_hBwBPrKC1gi8_1756742900","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":35684,"web_url":"https://patchwork.libcamera.org/comment/35684/","msgid":"<aLXFVgFr27MevaOA@duo.ucw.cz>","date":"2025-09-01T16:09:58","subject":"Re: [PATCH v2 1/1] apps: cam: Support PPM output for other RGB\n\tformats","submitter":{"id":49,"url":"https://patchwork.libcamera.org/api/people/49/","name":"Pavel Machek","email":"pavel@ucw.cz"},"content":"Hi!\n\n> > Thank you for the patch.\n> >\n> > On Mon, Sep 01, 2025 at 04:16:42PM +0200, Milan Zamazal wrote:\n> >> GPU ISP can produce only 32-bit output.  Let's add support to the PPM\n> >> writer for all the common RGB image formats so that we can store GPU ISP\n> >> output as PPM files.  Contingent alpha values are ignored as there is no\n> >> support for the alpha channel in PPM.\n> >> \n> >> There is no obvious performance penalty in my environment compared to\n> >> output in the raw format.\n> >> \n> >> Co-developed-by: Pavel Machek <pavel@ucw.cz>\n> >\n> > You need a SoB line from Pavel here.\n\nI believe it should not be needed, since this is different from my code,\n\n> Pavel, can you provide one?\n> \n> (Or can I take the one from https://patchwork.libcamera.org/patch/23177/ ?)\n\nbut I don't care deeply.\n\nSigned-off-by: Pavel Machek <pavel@ucw.cz>\n\nAnd... thanks for taking this forward!\n\nBest regards,\n\t\t\t\t\t\t\t\tPavel","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 3BA39BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Sep 2025 16:10:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D712569324;\n\tMon,  1 Sep 2025 18:10:00 +0200 (CEST)","from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5FC2069323\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Sep 2025 18:09:59 +0200 (CEST)","by jabberwock.ucw.cz (Postfix, from userid 1017)\n\tid 0291A1C01C0; Mon,  1 Sep 2025 18:09:59 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ucw.cz header.i=@ucw.cz header.b=\"jOldXcCY\";\n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1;\n\tt=1756742999;\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=9iZh2iT2Cwa7nV0/BVj0pF+YLJV7cxfwSCRfJJorY48=;\n\tb=jOldXcCYgWse3EyOgMqS1yftZSuaC6SblP3Q8M+H8zCo74Ay9LrgtfpNyLdEQ8Xm47AlJx\n\tl0YQrEg9alRj1uBl8B1FnfFionjof356XVphEUfOufHe6DuSot+B64Lz8C5rZXbJ3nyE1c\n\te5QK0QM4m66J+B0Ey25zDmgRCiqDQk0=","Date":"Mon, 1 Sep 2025 18:09:58 +0200","From":"Pavel Machek <pavel@ucw.cz>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"Re: [PATCH v2 1/1] apps: cam: Support PPM output for other RGB\n\tformats","Message-ID":"<aLXFVgFr27MevaOA@duo.ucw.cz>","References":"<20250901141643.29136-1-mzamazal@redhat.com>\n\t<20250901141643.29136-2-mzamazal@redhat.com>\n\t<20250901145746.GE1705@pendragon.ideasonboard.com>\n\t<85bjnu2m1c.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha1;\n\tprotocol=\"application/pgp-signature\"; boundary=\"S2t0p/AFtYfGdHA+\"","Content-Disposition":"inline","In-Reply-To":"<85bjnu2m1c.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","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>"}}]