[{"id":28320,"web_url":"https://patchwork.libcamera.org/comment/28320/","msgid":"<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>","date":"2023-12-14T14:40:36","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 14/12/2023 12:13, Hans de Goede wrote:\n> Hi All,\n> \n> Here is a new, now non RFC because believed to be mostly ready\n> for merging, version of the Software ISP work.\n\n\nThanks for sending this out.\n\nOne thing I'm noticing when compiling is a load of warnings about \nundocumented variables.\n\nmeson setup -Dprefix=/home/deckard/Development/FireFox/libcamera-install \n-Dpipelines=simple/simple -Dipas=simple/simple build.swisp\n\nninja -j `nproc` -C build.swisp\nninja: Entering directory `build.swisp'\n[12/184] Generating src/ipa-priv-key with a custom command\n........+...+...+.+........+..................+.......+...+..+.+......+...+......+.....+....+......+.........+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*......+....+..+....+.....+......+.+...............+........+....+......+..+...............+.............+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+........+...+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n....+......+.....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+............+....................+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...............+.......+............+...+..+...+..................+.+........+.............+.........+.....+.+...+..+.......+.....+.......+.....+.+...+............+...+..+.........+.........+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n[43/184] Generating src/libcamera/ipa_pub_key_cpp with a custom command\nwriting RSA key\n[184/184] Generating Documentation/doxygen with a custom command\n/home/deckard/Development/libcamera-downstream/include/libcamera/internal/software_isp/debayer.h:30: \nwarning: Compound libcamera::Debayer is not documented.\n/home/deckard/Development/libcamera-downstream/include/libcamera/internal/software_isp/debayer_cpu.h:25: \nwarning: Compound libcamera::DebayerCpu is not documented.\n/home/deckard/Development/libcamera-downstream/include/libcamera/internal/software_isp/debayer_params.h:15: \nwarning: Compound libcamera::DebayerParams is not documented.\n/home/deckard/Development/libcamera-downstream/include/libcamera/internal/shared_mem_object.h:23: \nwarning: Compound libcamera::SharedMemObject is not documented.\n/home/deckard/Development/libcamera-downstream/include/libcamera/internal/software_isp.h:34: \nwarning: Compound libcamera::SoftwareIsp is not documented.\n\nNot sure if you or Andrey see that yourselves but one to be aware of for V2.\n\n---\nbod","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0DA59C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Dec 2023 14:40:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4BB7462B2A;\n\tThu, 14 Dec 2023 15:40:40 +0100 (CET)","from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7756661D97\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 15:40:38 +0100 (CET)","by mail-wm1-x329.google.com with SMTP id\n\t5b1f17b1804b1-40c38de1ee4so58694365e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 06:40:38 -0800 (PST)","from [192.168.100.31] ([37.228.218.3])\n\tby smtp.gmail.com with ESMTPSA id\n\tq14-20020a05600c46ce00b0040c4c9c52a3sm13259131wmo.12.2023.12.14.06.40.36\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 14 Dec 2023 06:40:37 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702564840;\n\tbh=nns4wi8mZv32byWPVxvCaZZ35PRvVYtOkZ9cBTPHIeE=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=2keNB7UHyWiIpqhT6ePyUOSaEZ0bvKRBJ2xVtDA7HLjLFzKf0zFjYuTOlsVxF/Lyt\n\tF3Iie+OphkVyMAe4N+93cfAyRRCjd785AfK2CSVMdRXyy3jTzxPeQRC/mho9tjHvnl\n\tA6xArqAwcXzMc4om3G2VS0scls+lGTzbbaN1jMYTTi4ccSIJNNXsDjQXYmBHx/f4LH\n\tHDNm9o29KFs4sKlbkgL7eJMR69qlsQ5Ey2Us8OdSyt+jQowU3iFavBMFaicGv88bto\n\tt89cu/bx5dTk2NnSmFQIWrSWRlxChWRWqsjTkwYFm3vObsBwYG6BxU5Z2rDm3qgJKy\n\t++044HwxgKK2w==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1702564838; x=1703169638;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=eRde35QP44w1NGMb1XBAnwLrRQSh7ahlhatFYm2/IyI=;\n\tb=w/u9YOgZtcmDL73FHpT1mcGQTAkkGM4diJr2mqPdhk8G3ZdfsCEm9aM5Fzl9X+Ab7Y\n\tciaco8a+ztL6FM+PU1IIQRBXws+hdD3HyRaXlKQdM2MS8unZIKIKtxcgXZFSViV48PVw\n\tD29QgguNY815n5CqhuWvLdFbcUYqnnDs5L0KAz5dCCHF5pP7x6CyW3hQ/tIHz1vCsO8X\n\ts5tZ4pi0H79gUmgNBSo6Rv5l11W+ak69J06PS1vZ8CFPGrKcD3Dc77vKjm7ufba59oal\n\tCTimMsmbShvfKDcjiNrcDje++HG5J9PVRA7wZm7ZPPUtGQ7IXdCOJzq0RD6uiJg04aNq\n\tEXPA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=linaro.org\n\theader.i=@linaro.org header.b=\"w/u9YOgZ\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702564838; x=1703169638;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=eRde35QP44w1NGMb1XBAnwLrRQSh7ahlhatFYm2/IyI=;\n\tb=XIq0q7Dly8qFJ1/dl0yzJd3v64Nn5B00hld3gvyGGYkM6At6r+KEYEMzuPCXvjqcB1\n\tlmKF7MGz2UhjgJtSywO27EOdzTreISG8UZqTj6ciQrzAsfc2yJVr5PP2cMmGTDmudbu9\n\tkfDoiybiQYoYTfMUBGMNUQorO8b9nYp5ncrQI9qOuM6ydapJnx6s9/bk3UtXrISNiJuR\n\tVuKVkbuezL94Z8o2wbBV/lNm9aZ6ShIr2ik6bFloLTAylFKLscksWItQR1k3qoe/GG77\n\t+bAUOpgmwdMRMQ5+0YDAMYsvbuc+7wrLi04pze0ERyEbP/P7mHkiSnNGmKfgBHKu34HI\n\tPD3w==","X-Gm-Message-State":"AOJu0YyBVh1Ni3qHO2Mwue6W0oP7UZyuG1fvy+Q3CSMsXIrrBzQrZuTM\n\ththDuSL6IxpqGSgnZpMighq/EA==","X-Google-Smtp-Source":"AGHT+IFFNu4yOC43zcbTZQz/KK6Gr0rRfLsthh7p/iz9pUhSfwP+CUifEqgs1RI31n5Koc/bGooR1w==","X-Received":"by 2002:a05:600c:c3:b0:40c:32e9:ef15 with SMTP id\n\tu3-20020a05600c00c300b0040c32e9ef15mr5226584wmm.106.1702564837909; \n\tThu, 14 Dec 2023 06:40:37 -0800 (PST)","Message-ID":"<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>","Date":"Thu, 14 Dec 2023 14:40:36 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Content-Language":"en-US","To":"Hans de Goede <hdegoede@redhat.com>, libcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20231214121350.206015-1-hdegoede@redhat.com>","In-Reply-To":"<20231214121350.206015-1-hdegoede@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Bryan O'Donoghue via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28321,"web_url":"https://patchwork.libcamera.org/comment/28321/","msgid":"<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>","date":"2023-12-14T14:47:28","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/people/102/","name":"Hans de Goede","email":"hdegoede@redhat.com"},"content":"Hi Bryan,\n\nOn 12/14/23 15:40, Bryan O'Donoghue wrote:\n> On 14/12/2023 12:13, Hans de Goede wrote:\n>> Hi All,\n>>\n>> Here is a new, now non RFC because believed to be mostly ready\n>> for merging, version of the Software ISP work.\n> \n> \n> Thanks for sending this out.\n\nYou're welcome.\n\n> One thing I'm noticing when compiling is a load of warnings about undocumented variables.\n<snip>\n> Not sure if you or Andrey see that yourselves but one to be aware of for V2.\n\nQuoting from the cover-letter:\n\n\"\"\"\nKnown open items:\n- The AWB red/blue gain calculations needs to be moved to the IPA\n  and IPA then needs to pass a DebayerParams struct back to the\n  SwIsp\n- Properly document all methods / attributed for doxygen\n\"\"\"\n\nSo this is a known issue.\n\nBTW I'm currently working on adding support for 10bpp unpacked\nbayer and while working on this I noticed a small bug in the swstats\ncode, you may want to squash in this fix:\n\n\n--- a/src/libcamera/software_isp/swstats_cpu.cpp\n+++ b/src/libcamera/software_isp/swstats_cpu.cpp\n@@ -139,7 +139,7 @@ int SwStatsCpu::configure(const StreamConfiguration &inputCfg)\n \t\tbpp_ = 10;\n \t\tpatternSize_.height = 2;\n \t\tpatternSize_.width = 4; /* 5 bytes per *4* pixels */\n-\t\ty_skip_mask_ = 0x0c; /* Skip every 3th and 4th line */\n+\t\ty_skip_mask_ = 0x02; /* Skip every 3th and 4th line */\n \t\tx_shift_ = 0;\n \n \t\tswitch (bayerFormat.order) {\n\n\nRegards,\n\nHans","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 0B92CBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Dec 2023 14:47:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 61AF362B32;\n\tThu, 14 Dec 2023 15:47:40 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BA08561D97\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 15:47:38 +0100 (CET)","from mail-ej1-f70.google.com (mail-ej1-f70.google.com\n\t[209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-681-mQgL-LNfMTWP2t8W9nOoqw-1; Thu, 14 Dec 2023 09:47:36 -0500","by mail-ej1-f70.google.com with SMTP id\n\ta640c23a62f3a-a1f9ab28654so228751666b.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 06:47:31 -0800 (PST)","from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec?\n\t(2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl.\n\t[2001:1c00:c32:7800:5bfa:a036:83f0:f9ec])\n\tby smtp.gmail.com with ESMTPSA id\n\ttr6-20020a170907c58600b00a1f73d6f079sm8830518ejc.84.2023.12.14.06.47.29\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 14 Dec 2023 06:47:29 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702565260;\n\tbh=loQO5AihgDXRtreqUm/5Vk/fetGXPFayECzdaa74TDU=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=cotj98C0OQX75m5iZQUQhOqL3k4k7oL1uiAb9bpx9EvX/sgGMzKtI2QsfoPr7JQTf\n\t2nT9RN03EoOodkxvhyXPQYghuOhDsWuVEer6O7Bs0TCtjMmN5H1uWwpl9Yeilz/MoA\n\td4CR3odqU2xCyakxnE6RxSd59fpLKXNyJdQmsrl22IPts2bB76U+1vczPu2QwJMXK4\n\tfpynO6TDokv+gRgGcjczBY1+lyfxz+9zM8uQRepKyUygc3cZ8MDHyLV+kHRC7cRfwK\n\ttWxbIVEtGrXdJ9eaFkc2v0g1sDZTu1Q+beW8o5DAO5McRR+t5lZKe8In6RVK5aeLdm\n\tq/RfojO30whDg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1702565257;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=mynfcU+jyXSqEFMsB68V61Je3mSylfftHEynnqxS1FU=;\n\tb=g0xyg3C2ZNCy8da23hcLfreNOYbx0xquAdI+sUWfGk4N1bFEi7Cszp8M9qsLvsVi+Tl1dB\n\tuNByOGV7FbfnAGT1wxXrTjp6/+yHk87aeP96ZsVutZBMeksOfIj0+Li4+hMTbi4VRVL3iV\n\tF4Lc1iahvYT0pTRJ+38UlSQGVNjEnLY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"g0xyg3C2\"; \n\tdkim-atps=neutral","X-MC-Unique":"mQgL-LNfMTWP2t8W9nOoqw-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702565250; x=1703170050;\n\th=content-transfer-encoding:in-reply-to:from:content-language\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=mynfcU+jyXSqEFMsB68V61Je3mSylfftHEynnqxS1FU=;\n\tb=Wih3eTD6t8hZNqsLc6dWqhcmagK6bToHUfpCg63H2TSBnGXQUK4N2L9SnCBuv93vn8\n\tTludqNGR5kqbq+AL+Jo4iyWiQhV20pLP90tR6zoe8QpY3P5Nvt8upivfeiGGpVHEFdsw\n\tzjQXUDygnfPvWuifoG0QqnyZLdSAl776Ed2roHXdVOiT346gfQ7Uq2N8akezBeygZEUh\n\tVEemUklICw4RcAdHMu+PKx9U78k6xNX86zFBNH8uUE/ptzdH/gmCg0KnTvnpAWxVhrG3\n\t4kgnViGqIyGaCs8VMespertnMuQF3LUReSP1NoitxpEg8vL8j9fjpvDp5MtaLhY8rYSq\n\tEs9g==","X-Gm-Message-State":"AOJu0YxPEBuVO8j8WdqXvJXZDMcynkJTBbJjo3A9FtJ2YXuV38lvV9Ei\n\toZ1dmTeyNleEGkYNYbs62cEgoXaP7c3gD9XmFEVIv1lPxu/2YNKvAzOooBSM4Tmn+ZfEyCEgOUS\n\tvrZOC4sbfHOGTDmfab5Hukcl9+a8XktDkAg==","X-Received":["by 2002:a17:906:14d:b0:a17:da84:a24d with SMTP id\n\t13-20020a170906014d00b00a17da84a24dmr5678916ejh.22.1702565250368; \n\tThu, 14 Dec 2023 06:47:30 -0800 (PST)","by 2002:a17:906:14d:b0:a17:da84:a24d with SMTP id\n\t13-20020a170906014d00b00a17da84a24dmr5678903ejh.22.1702565250095; \n\tThu, 14 Dec 2023 06:47:30 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IEvY7oksHX0caWkxIDAfmm71Nc7P/Ja8bamBzk0oyGQ98X+BHEvtXzsJGp69lf1NqhLpuHyjA==","Message-ID":"<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>","Date":"Thu, 14 Dec 2023 15:47:28 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>","In-Reply-To":"<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US, nl","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Hans de Goede <hdegoede@redhat.com>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28322,"web_url":"https://patchwork.libcamera.org/comment/28322/","msgid":"<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>","date":"2023-12-14T15:16:35","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 14/12/2023 14:47, Hans de Goede wrote:\n> Hi Bryan,\n> \n> On 12/14/23 15:40, Bryan O'Donoghue wrote:\n>> On 14/12/2023 12:13, Hans de Goede wrote:\n>>> Hi All,\n>>>\n>>> Here is a new, now non RFC because believed to be mostly ready\n>>> for merging, version of the Software ISP work.\n>>\n>>\n>> Thanks for sending this out.\n> \n> You're welcome.\n> \n>> One thing I'm noticing when compiling is a load of warnings about undocumented variables.\n> <snip>\n>> Not sure if you or Andrey see that yourselves but one to be aware of for V2.\n> \n> Quoting from the cover-letter:\n> \n> \"\"\"\n> Known open items:\n> - The AWB red/blue gain calculations needs to be moved to the IPA\n>    and IPA then needs to pass a DebayerParams struct back to the\n>    SwIsp\n> - Properly document all methods / attributed for doxygen\n> \"\"\"\n> \n> So this is a known issue.\n> \n> BTW I'm currently working on adding support for 10bpp unpacked\n> bayer and while working on this I noticed a small bug in the swstats\n> code, you may want to squash in this fix:\n\nApplied that change.\n\nI'm comparing to your earlier branch\n\ncommit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> \nSoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\nAuthor: Hans de Goede <hdegoede@redhat.com>\nDate:   Thu Nov 30 20:13:29 2023 +0100\n\n\nOn the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm \ngetting 18fps @ 100%.\n\nOld branch:\nhttps://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-image.jpg\n\nNew branch:\nhttps://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-posted-image.jpg\n\nSeems to be eating alot more cycles and producing a more pinkish result \non my hw.\n\n---\nbod","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id CAB1FC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Dec 2023 15:16:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3F42262B32;\n\tThu, 14 Dec 2023 16:16:42 +0100 (CET)","from mail-oo1-xc33.google.com (mail-oo1-xc33.google.com\n\t[IPv6:2607:f8b0:4864:20::c33])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 11EEE61D97\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 16:16:41 +0100 (CET)","by mail-oo1-xc33.google.com with SMTP id\n\t006d021491bc7-5918709c630so159566eaf.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 07:16:40 -0800 (PST)","from [192.168.100.31] ([37.228.218.3])\n\tby smtp.gmail.com with ESMTPSA id\n\tc13-20020a056214004d00b0067a4f49a13csm5795032qvr.127.2023.12.14.07.16.36\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 14 Dec 2023 07:16:38 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702567002;\n\tbh=l7uA15TwcmMiyilAN13ap2AImiEew7vwg2Y7vNzo1Rs=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=ryAVesDV0cB6SODbofBf8XHx4VrnX1iLjk+Mc51x96AWGjuM68oDjP3raxoCvCY2j\n\ty4BRH5tKQtFMX5J2qrYDSLKMWC4AzOrPmr9lDeVDbc9YddOEuNzGjw7EkfV3osuc9d\n\tTRaCIrDXeDmANsmKWlbr6Mj1Ebc5I1qO+UXf/vLGOFaG+Q5LZwQhen8YNq04HMMDl+\n\ty/FtaZNJDs5MNnHK4TtffwSL1vcSLiD4Lr26JXwWYR/+gisTxz0C5isvMbe8dh+96J\n\tpQAQLExAA4zzGQ1VPQFUK1CkUEwdLOZgLIzH0uNOFc4iDrgBNyjaJW8iDgRTMlanYJ\n\tresGIIHttGK6w==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1702566999; x=1703171799;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=cZ8HqbnjPi24FRilxUq4nCPi9fwAUm1dpTUYsNfuuh0=;\n\tb=Kyqg3AkE7Jry49aZMMBpOGDJQ3bnm2HEZM2NJUaq8I1NHZfmvLCVDvg2Y+TxCzM5Un\n\t2p4d9Tt0PRE6/5GJXQATV+Ujzk/J1HpHPj/V08WJMO9I72TD96JLxmsNzUVfouLL1P9B\n\t93w5kSrMxBjTH+4qAs1Oz5P2X38y69b2y6jbPfvvWzQ+uqcxE2zrbGEW/EBcX/GKziSH\n\tF35d+5WaqXscrl5EbgUocXbX4RyL/6XdSh004/b99cfTss9jLlUo7Ih/Uv5gPAqbKgCy\n\tgX2+AN38E8RqJeOa9bOWpu8xMGDI9CpBiTBxYsjc2vT4JTeBWMROCgyjNEIa178AEaPQ\n\tIz4Q=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=linaro.org\n\theader.i=@linaro.org header.b=\"Kyqg3AkE\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702566999; x=1703171799;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=cZ8HqbnjPi24FRilxUq4nCPi9fwAUm1dpTUYsNfuuh0=;\n\tb=osokAmmNlcDS7K1kvhyo7Abf/tV8sNQ3aqO8rODkZ+PgZRUL941WnBHg8MpQUp9tw/\n\tfUAnBW9Dl5r3AeWFLRSbk9JGu4MejwExNqZnmdkDL+QfjKla6EItE7/D3ancAfa0dg/Z\n\tTScgdcjwtBS2KYeeLPbGKRlub5nH0rtgnNYqLib941rYHBHN35PLTCITTb1MVWjrGs1D\n\tVz+uGyIsK6MGMJ7xP02aIp+O33rhj3SJM0ErYjj3wKZaRw7hUf1SDu7Voue+4WFfmn3a\n\t76O1j/DAFmq8K4lRTElvnfHh5B/EcamVxfr+c3rWxk/ENWB6jXZ0GZSWIRxcH3zU+Dlk\n\t1KQg==","X-Gm-Message-State":"AOJu0Yxxbk+CsI6fY7lNZ72YYaABLYTdr81HBr0/zgBLiDWTjViHVyrK\n\tPoRsyGnqe6COL13o33Uzqmwxxg==","X-Google-Smtp-Source":"AGHT+IGanNWEIOKCyilf7L6KLxDl2eeP/Iz9oTVAJaIZLNRO20j8v9L3CL6bda8JzQRgxniY74zViQ==","X-Received":"by 2002:a05:6359:ba8:b0:170:17eb:2fc0 with SMTP id\n\tgf40-20020a0563590ba800b0017017eb2fc0mr2566278rwb.57.1702566999596; \n\tThu, 14 Dec 2023 07:16:39 -0800 (PST)","Message-ID":"<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>","Date":"Thu, 14 Dec 2023 15:16:35 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Content-Language":"en-US","To":"Hans de Goede <hdegoede@redhat.com>, libcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>","In-Reply-To":"<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Bryan O'Donoghue via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28323,"web_url":"https://patchwork.libcamera.org/comment/28323/","msgid":"<0d6c1a3f-8af2-42d8-a924-066158dd87c5@redhat.com>","date":"2023-12-14T16:02:42","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/people/102/","name":"Hans de Goede","email":"hdegoede@redhat.com"},"content":"Hi Bryan,\n\nOn 12/14/23 16:16, Bryan O'Donoghue wrote:\n> On 14/12/2023 14:47, Hans de Goede wrote:\n\n<snip>\n\n>> BTW I'm currently working on adding support for 10bpp unpacked\n>> bayer and while working on this I noticed a small bug in the swstats\n>> code, you may want to squash in this fix:\n> \n> Applied that change.\n> \n> I'm comparing to your earlier branch\n> \n> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n> Author: Hans de Goede <hdegoede@redhat.com>\n> Date:   Thu Nov 30 20:13:29 2023 +0100\n> \n> \n> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n> Seems to be eating alot more cycles\n\nOk, that is no good.\n\nCan you try:\n\nhttps://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans3\n\nAnd then start with checking out:\n\n64c9bc0f55f459b9722fe78dfd35a07fb35d2a7b (\"libcamera: software_isp: Add debayer-line callbacks for bayer patterns repeating every 4 lines\")\n\nthat is basically softisp/SoftwareISP-v01-hans1 rebased on top of SoftwareISP-v02,\nso that should give you to same performance as before.\n\nFirst please check this indeed restores performance ?\n\nAnd then after that try newer commits from that branch in this order\n(I'm skipping commits which should not have a performance impact here):\n\n7136d4d59aafb2564a24a2d4be773ca220257fdc\ne3c2a5931dd825c58f626da8c12429b70d20219b (not really expecting a performance impact from this one but maybe)\nb3aa4e4f781e881746953177dacbce8c943cb5a3 (bugfix but one which is expected to have some performance impact)\nec75339a5bff8b8e9a0031b9408bd47020905a4f\nf62ed5df54850a24406bf3a762271a5fa3c0303d\n\nThe reason why I'm asking you to test these instead of do a bisect\nis since there might be a number of smaller performance regressions\nall adding up ...\n\nIf you can let me know the results of this then I'll see if I can\nrestore the old performance for you.\n\nNote that as mentioned above b3aa4e4f781e is a bug fix which\nsome potentially big performance implications but the old code\nreally was wrong there ...\n\n> and producing a more pinkish result on my hw.\n\nAs part of my work I more or less rewrote white-balancing, but I thought I fixed\nthe pinkish thing. It seems the new white-balancing is somewhat sensitive to\nover-exposure and your image does look a bit overexposed.\n\nRegards,\n\nHans","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 A970EBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Dec 2023 16:02:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E835A62B2A;\n\tThu, 14 Dec 2023 17:02:49 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0196F61D97\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 17:02:47 +0100 (CET)","from mail-ej1-f71.google.com (mail-ej1-f71.google.com\n\t[209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-407-43KmBd87M8uZRd9nzGyCIA-1; Thu, 14 Dec 2023 11:02:45 -0500","by mail-ej1-f71.google.com with SMTP id\n\ta640c23a62f3a-a22f129e5acso165432166b.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 08:02:45 -0800 (PST)","from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec?\n\t(2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl.\n\t[2001:1c00:c32:7800:5bfa:a036:83f0:f9ec])\n\tby smtp.gmail.com with ESMTPSA id\n\ttm8-20020a170907c38800b00a1e30528af3sm9478310ejc.47.2023.12.14.08.02.42\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 14 Dec 2023 08:02:43 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702569769;\n\tbh=hVeYPmpxEOACoUtL9dHtCpq45RmvWhJMJO2C9AcKihY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=Q44+swyZh3b1oI3K2Hbytrd/lks6zn8yeFdNYfwEMon1qTwsfvok1vf1IvdeKqDdR\n\ti1pWTD4iRKREuYUqAF9nhWuTLdPp2+o5RmJcRNbvDZ88hvvhgrUhUzPlpwvb1/hdSI\n\tWCZaVAg9kPlWh9deDBtd0/GnGZhQpMwZc9uTGtlLF+t8TKDDqE4D5Rt12qKHn7Lpri\n\t8NMDnAeTHX11LBgu55f2oTBhZIeg+2UVysS+n9Br91R2TR2kKNTgyWvNgUIaRs0SPG\n\tFdzA6Kihm+/7gvt0WuhlLaHM9OHJQHcF590DtQHEm53QxbxLR7HZSbp6QeUr6fa3nx\n\tF3/vLYmEssiEQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1702569767;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=uRFMvObNYS/m/i/mZYAr27oVJMfHNme7BDLjVJvJT68=;\n\tb=W/h6gnGwmh9QcaIGjHwKTVMaKO6IPF5EgYyMoJCJnHi/vZC2xQeN5kdUAENXzCrpAYa0bd\n\tZetjJdp11k2UsJqDiolBVDjWj3W/o3MBUZLkszMqX0TDCvx9LGSdMRjgTP9e38d4xJSLzI\n\t98h2UGEfRBvWRTkGMlgNAQyyQ36ZO6k="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"W/h6gnGw\"; \n\tdkim-atps=neutral","X-MC-Unique":"43KmBd87M8uZRd9nzGyCIA-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702569764; x=1703174564;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=uRFMvObNYS/m/i/mZYAr27oVJMfHNme7BDLjVJvJT68=;\n\tb=NC3X4qM6mm0IH7+0IWqzCQ1VJ0hVZ3UmWV4kXf9rkWQ9senizGFEcJ0JQ/faoK4McW\n\tTpw/uRUk+yL9U7BXCb0/8HCIwtPmrEjmCucumLt2GoOp73iIA/85g2xQootv8oEfXZPG\n\t7GVCsVnnTmPAMgFhhICUgxQu5M4NdBO930f91CEaCgf1eUca35H0wE258Rt+2vt0wazV\n\t2r0e3poXYwpqrHQ/C53z8sGzoAJW89PAA1UmYYTt8EcJmBZUweGGGY/v95nbnqN0gRMk\n\tzmsXd/aHdISb8kwAvVETNUtBs8x+yJ2c1YME8aue9Jn1ZS98S2Q95MB2dqr1eV6QsxiX\n\tZuKg==","X-Gm-Message-State":"AOJu0YzyWwHFbixaLEpTGsg5dGs3C++nHr+WqfcGsIn7HGRj820hqkhQ\n\tw//rUj9a4rMeMnbCu3nVOjs5Sb1vKriDI+2+bfBnxUtgkORiTm9oITptztk7ihibYxhzfxZ+yBd\n\tHdRbwZ7DNNmAEoqvo/jeDGqLpwTWOZ2tECQ==","X-Received":["by 2002:a17:907:940b:b0:a1d:3839:a6fc with SMTP id\n\tdk11-20020a170907940b00b00a1d3839a6fcmr6084092ejc.88.1702569764375; \n\tThu, 14 Dec 2023 08:02:44 -0800 (PST)","by 2002:a17:907:940b:b0:a1d:3839:a6fc with SMTP id\n\tdk11-20020a170907940b00b00a1d3839a6fcmr6084077ejc.88.1702569763988; \n\tThu, 14 Dec 2023 08:02:43 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IGMfZcZZzqJl8WDUwz4vZPq8QSBeAAKYdGE5Jeye0Yh98SBByurXXUY+Bmh9uyUMpCfdnHGSQ==","Message-ID":"<0d6c1a3f-8af2-42d8-a924-066158dd87c5@redhat.com>","Date":"Thu, 14 Dec 2023 17:02:42 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>","In-Reply-To":"<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US, nl","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Hans de Goede <hdegoede@redhat.com>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28326,"web_url":"https://patchwork.libcamera.org/comment/28326/","msgid":"<69815977-d534-4a62-b2c7-aafe670022e2@redhat.com>","date":"2023-12-14T16:25:16","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/people/102/","name":"Hans de Goede","email":"hdegoede@redhat.com"},"content":"Hi,\n\nOn 12/14/23 17:02, Hans de Goede wrote:\n> Hi Bryan,\n> \n> On 12/14/23 16:16, Bryan O'Donoghue wrote:\n>> On 14/12/2023 14:47, Hans de Goede wrote:\n> \n> <snip>\n> \n>>> BTW I'm currently working on adding support for 10bpp unpacked\n>>> bayer and while working on this I noticed a small bug in the swstats\n>>> code, you may want to squash in this fix:\n>>\n>> Applied that change.\n>>\n>> I'm comparing to your earlier branch\n>>\n>> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n>> Author: Hans de Goede <hdegoede@redhat.com>\n>> Date:   Thu Nov 30 20:13:29 2023 +0100\n>>\n>>\n>> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n>> Seems to be eating alot more cycles\n> \n> Ok, that is no good.\n> \n> Can you try:\n> \n> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans3\n> \n> And then start with checking out:\n> \n> 64c9bc0f55f459b9722fe78dfd35a07fb35d2a7b (\"libcamera: software_isp: Add debayer-line callbacks for bayer patterns repeating every 4 lines\")\n> \n> that is basically softisp/SoftwareISP-v01-hans1 rebased on top of SoftwareISP-v02,\n> so that should give you to same performance as before.\n> \n> First please check this indeed restores performance ?\n> \n> And then after that try newer commits from that branch in this order\n> (I'm skipping commits which should not have a performance impact here):\n> \n> 7136d4d59aafb2564a24a2d4be773ca220257fdc\n> e3c2a5931dd825c58f626da8c12429b70d20219b (not really expecting a performance impact from this one but maybe)\n> b3aa4e4f781e881746953177dacbce8c943cb5a3 (bugfix but one which is expected to have some performance impact)\n> ec75339a5bff8b8e9a0031b9408bd47020905a4f\n> f62ed5df54850a24406bf3a762271a5fa3c0303d\n> \n> The reason why I'm asking you to test these instead of do a bisect\n> is since there might be a number of smaller performance regressions\n> all adding up ...\n> \n> If you can let me know the results of this then I'll see if I can\n> restore the old performance for you.\n> \n> Note that as mentioned above b3aa4e4f781e is a bug fix which\n> some potentially big performance implications but the old code\n> really was wrong there ...\n> \n>> and producing a more pinkish result on my hw.\n> \n> As part of my work I more or less rewrote white-balancing, but I thought I fixed\n> the pinkish thing. It seems the new white-balancing is somewhat sensitive to\n> over-exposure and your image does look a bit overexposed.\n\np.s.\n\nIt would also be good to compare:\n\nhttps://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans2\nhttps://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans3\n\n(just the last commit of each)\n\nhans2 -> hans3 is mostly prep work for merging things with SoftwareISP-v03,\nbut one significant change in hans3 is that I added Pavel's code changes\nto avoid macro-use (in swstats) resp reduce code duplication (in debayer).\n\nPavel's changes rely on the compiler being smart enough to inline *all*\nthe helpers and then replace the ctxt struct with using registers for each\nof the struct members. Maybe that is not working for you and we need\nto undo Pavel's changes.\n\nRegards,\n\nHans","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 F2201C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Dec 2023 16:25:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 56BEF62B33;\n\tThu, 14 Dec 2023 17:25:23 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A848962B2A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 17:25:21 +0100 (CET)","from mail-ej1-f69.google.com (mail-ej1-f69.google.com\n\t[209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-518-fl9BAJGxMUiprNoX0a7Fjg-1; Thu, 14 Dec 2023 11:25:19 -0500","by mail-ej1-f69.google.com with SMTP id\n\ta640c23a62f3a-a1d38492da7so497732666b.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 08:25:19 -0800 (PST)","from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec?\n\t(2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl.\n\t[2001:1c00:c32:7800:5bfa:a036:83f0:f9ec])\n\tby smtp.gmail.com with ESMTPSA id\n\try9-20020a1709068d8900b009adc77fe164sm9605694ejc.66.2023.12.14.08.25.16\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 14 Dec 2023 08:25:16 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702571123;\n\tbh=O1rfYIAwVoGvvzZQXOXhJmvz3vbQXLo5OIA9NPhaMgY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=e5jmZtBbun//avmvCWB18VfkS+froCAAoSgAMqUt7d57yy9lK1OhTvF9KYAXqBscD\n\tGU4RMePehmMNL7NYjQVnvfpdqqbfrAk4LyxlkYLJFWpnP4868bi6n1mwcZiChzsD37\n\twe5uhpmk8z7QJV61khrr/HDvwdena/JnEUdm+PNFrtk9WamVuvDhCyGFppOgYUlHF6\n\tWoJNBmSdLXcooRKALx5gLaE6xTlgi0yi2eadXMgD6AjPs8/4UK0dxrgyGogqt3/SE8\n\tof8ni9QwNwmNNn2tNU1BCv5o9Soltcwgml0UUjwNXVLSk0ckqZE+tZFv4Vb+Wn05OP\n\tlMLAATUgEPWoA==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1702571120;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=7uZ9jp5PRo099enjT70CzId4Y4yKjnXK9BYX0Gqp+P8=;\n\tb=Az0h7dmWSTQHgS0t3+vFufKHXqgd5UT6o2gpkxQzQRoEFDh2tqBi1gUO4gtoocd81pUPfS\n\t6/smz7sAtDra00g5gajcImNxBDN4f8KQDRdxDqdI7i9aIq5xd/aKAiJbWlieLZ+WIOPRNN\n\t9cDszqwLeYhdA5d8dEEJD33SMrbow6k="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"Az0h7dmW\"; \n\tdkim-atps=neutral","X-MC-Unique":"fl9BAJGxMUiprNoX0a7Fjg-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702571118; x=1703175918;\n\th=content-transfer-encoding:in-reply-to:content-language:references\n\t:cc:to:from:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=7uZ9jp5PRo099enjT70CzId4Y4yKjnXK9BYX0Gqp+P8=;\n\tb=uFWjkoFrH51yp5UNgwNsoKw977irknrNv6aJDKQxYBaV5a63LmnjRsstlqS5NF+bxH\n\t5a57dFb6bT8DsWW/LIlQC5eXEiGtsxrhWlPhsKdIuvaHQlyznVkcQlzINPFa8Vmnrmum\n\t635h/hop+sC53SnzFspeRJmCB/LgV20dVjOFe5RpKwNGfxj/QeComY9EWZ2Gzh4erVgk\n\tHs5wRB8CFdWeIoQgQOLVcE/m3IvbHd8m0Wq+FSDk009cj3q6v23kKdNkm1C5Y/ngQPi1\n\t5KjgAwNtKh2/M8iP3i0/8ThdQumPX3JsX5GL4VWgtABovn8c5PAXQ0f4To5SnofyxR5G\n\t2onw==","X-Gm-Message-State":"AOJu0YxxspgYRqw1+H2IiSzGLqLE5+0ZVpPqMKKPCaSBnFpoTjsodFi+\n\tkJfdkb7Eu7+FWv3StVS7KcPn7c/9w/BhUjdTWQd44U9emgCyUVPfh+8LhQDtFUjLo6HSxljfXnz\n\t/m9HBBP0mhjF6cUEHD8VN1+po0lZlOO9gag==","X-Received":["by 2002:a17:907:9483:b0:a1e:5ea5:c5d3 with SMTP id\n\tdm3-20020a170907948300b00a1e5ea5c5d3mr3433003ejc.131.1702571118101; \n\tThu, 14 Dec 2023 08:25:18 -0800 (PST)","by 2002:a17:907:9483:b0:a1e:5ea5:c5d3 with SMTP id\n\tdm3-20020a170907948300b00a1e5ea5c5d3mr3432995ejc.131.1702571117807; \n\tThu, 14 Dec 2023 08:25:17 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IGzkpqx+rZg1i6tRDPbCCBgymcqYr8Lpy2yR0Lyac8nCVV8/WFYWDgHdyECHoHqjFKC1esgpg==","Message-ID":"<69815977-d534-4a62-b2c7-aafe670022e2@redhat.com>","Date":"Thu, 14 Dec 2023 17:25:16 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<0d6c1a3f-8af2-42d8-a924-066158dd87c5@redhat.com>","In-Reply-To":"<0d6c1a3f-8af2-42d8-a924-066158dd87c5@redhat.com>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US, nl","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Hans de Goede <hdegoede@redhat.com>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28327,"web_url":"https://patchwork.libcamera.org/comment/28327/","msgid":"<c45904b6-d7f9-4c6a-89ce-e8262c8d5890@linaro.org>","date":"2023-12-15T00:34:58","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 14/12/2023 16:25, Hans de Goede wrote:\n> Hi,\n> \n> On 12/14/23 17:02, Hans de Goede wrote:\n>> Hi Bryan,\n>>\n>> On 12/14/23 16:16, Bryan O'Donoghue wrote:\n>>> On 14/12/2023 14:47, Hans de Goede wrote:\n>>\n>> <snip>\n>>\n>>>> BTW I'm currently working on adding support for 10bpp unpacked\n>>>> bayer and while working on this I noticed a small bug in the swstats\n>>>> code, you may want to squash in this fix:\n>>>\n>>> Applied that change.\n>>>\n>>> I'm comparing to your earlier branch\n>>>\n>>> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n>>> Author: Hans de Goede <hdegoede@redhat.com>\n>>> Date:   Thu Nov 30 20:13:29 2023 +0100\n>>>\n>>>\n>>> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n>>> Seems to be eating alot more cycles\n>>\n>> Ok, that is no good.\n>>\n>> Can you try:\n>>\n>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans3\n\nSo this branch has the same performance issue 18fps, pinked-out display \nand ~ 100% on one of the cores.\n\n>>\n>> And then start with checking out:\n>>\n>> 64c9bc0f55f459b9722fe78dfd35a07fb35d2a7b (\"libcamera: software_isp: Add debayer-line callbacks for bayer patterns repeating every 4 lines\")\n\nI get 30fps here with 60-9x% cpu usage. Looks a bit dark but not pink.\n\nLooks like a reasonable baseline.\n\n>>\n>> that is basically softisp/SoftwareISP-v01-hans1 rebased on top of SoftwareISP-v02,\n>> so that should give you to same performance as before.\n>>\n>> First please check this indeed restores performance ?\n>>\n>> And then after that try newer commits from that branch in this order\n>> (I'm skipping commits which should not have a performance impact here):\n>>\n>> 7136d4d59aafb2564a24a2d4be773ca220257fdc\n\nbrighter but pink, lower cpu occupancy 40%, 30fps\n\n>> e3c2a5931dd825c58f626da8c12429b70d20219b (not really expecting a performance impact from this one but maybe)\n\n\nWay brighter - too much IMO in comparsion to the previous, occupancy \n100% fps 21.\n\nThis looks like your wayward commit to me.\n\n>> b3aa4e4f781e881746953177dacbce8c943cb5a3 (bugfix but one which is expected to have some performance impact)\n\nSame result as previous 21 fps, 100% cpu.\n\n\n>> ec75339a5bff8b8e9a0031b9408bd47020905a4f\n\n28fps, 130% cpu\n\n>> f62ed5df54850a24406bf3a762271a5fa3c0303d\n\n28fps, 100% cpu\n\n>>\n>> The reason why I'm asking you to test these instead of do a bisect\n>> is since there might be a number of smaller performance regressions\n>> all adding up ...\n>>\n>> If you can let me know the results of this then I'll see if I can\n>> restore the old performance for you.\n>>\n>> Note that as mentioned above b3aa4e4f781e is a bug fix which\n>> some potentially big performance implications but the old code\n>> really was wrong there ...\n>>\n>>> and producing a more pinkish result on my hw.\n>>\n>> As part of my work I more or less rewrote white-balancing, but I thought I fixed\n>> the pinkish thing. It seems the new white-balancing is somewhat sensitive to\n>> over-exposure and your image does look a bit overexposed.\n> \n> p.s.\n> \n> It would also be good to compare:\n> \n> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans2\n\n27fps, 100% cpu occupancy, bright and pink\n\n> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans3\n\n18fps, 100% cpu occupancy maybe less pink than previous but still \nnoticeably too red\n\n> \n> (just the last commit of each)\n> \n> hans2 -> hans3 is mostly prep work for merging things with SoftwareISP-v03,\n> but one significant change in hans3 is that I added Pavel's code changes\n> to avoid macro-use (in swstats) resp reduce code duplication (in debayer).\n\n\n> \n> Pavel's changes rely on the compiler being smart enough to inline *all*\n> the helpers and then replace the ctxt struct with using registers for each\n> of the struct members. Maybe that is not working for you and we need\n> to undo Pavel's changes.\n\nNothing special there. Stock Debian aarch64 GCC.\n\nUsing built-in specs.\nCOLLECT_GCC=gcc\nCOLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/13/lto-wrapper\nTarget: aarch64-linux-gnu\nConfigured with: ../src/configure -v --with-pkgversion='Debian 13.2.0-6' \n--with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs \n--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr \n--with-gcc-major-version-only --program-suffix=-13 \n--program-prefix=aarch64-linux-gnu- --enable-shared \n--enable-linker-build-id --libexecdir=/usr/libexec \n--without-included-gettext --enable-threads=posix --libdir=/usr/lib \n--enable-nls --enable-bootstrap --enable-clocale=gnu \n--enable-libstdcxx-debug --enable-libstdcxx-time=yes \n--with-default-libstdcxx-abi=new --enable-gnu-unique-object \n--disable-libquadmath --disable-libquadmath-support --enable-plugin \n--enable-default-pie --with-system-zlib \n--enable-libphobos-checking=release --with-target-system-zlib=auto \n--enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 \n--disable-werror --enable-checking=release --build=aarch64-linux-gnu \n--host=aarch64-linux-gnu --target=aarch64-linux-gnu \n--with-build-config=bootstrap-lto-lean --enable-link-serialization=4\nThread model: posix\nSupported LTO compression algorithms: zlib zstd\ngcc version 13.2.0 (Debian 13.2.0-6)\n\n---\nbod","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4AED6BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Dec 2023 00:35:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 70E8362B32;\n\tFri, 15 Dec 2023 01:35:03 +0100 (CET)","from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n\t[IPv6:2a00:1450:4864:20::32a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CDA1C629DF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Dec 2023 01:35:01 +0100 (CET)","by mail-wm1-x32a.google.com with SMTP id\n\t5b1f17b1804b1-40c4846847eso1533255e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 16:35:01 -0800 (PST)","from [192.168.100.113] ([37.228.218.3])\n\tby smtp.gmail.com with ESMTPSA id\n\tz14-20020a05600c0a0e00b0040b3867a297sm27138057wmp.36.2023.12.14.16.34.59\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 14 Dec 2023 16:35:00 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702600503;\n\tbh=BBubKV2jVmNlK0CB+Oh9Xg6tneDFmOE/GJm/dM3Sl40=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=V8qoRXqdtZ0PN0kd0nYIY6S9i7+OeV+2l3zZx5JnaJ5z7W53X5qFVeu35T6ok1I5n\n\tpWqugrptpdxzs6Ryxn/ybB+RVDjiJP/tMQLh0qQzIEgtOBciII4ctkPUAJAy60D6Au\n\t/qwT9o020nWjl4dY1IKpR/XCU2DasMZU22SqTgtfRYW3G46wd9WQv/sPS3Q/tvmgFx\n\tjGCkUzHSOLT7y3TFtlpLp/FQlwyT14PylHeju3NPeI3c2Dp0cOgf+r7Qk8sN6lbzw1\n\tEdgVfA/uKdAHzw8Yp1/WuQ9C4z2GYE7h1azSg0MRheZWBY2BQdJkvEzTOIT1UEX4oV\n\t7l3Dzj3n27phg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1702600501; x=1703205301;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=TfIPSVVbxcJhqDlwggF06rA/9uiO7z6aAFXkAusLLt0=;\n\tb=j+Hi1D3GkAp5s7tFUBfMgCUjOalY6gBQ9PbeRDdYo00DvgiKjxkgnL7mW5gHUB1ZCx\n\t+RrIcsCMR7Vm1YjdE510aFxPdzfTNPNPWobOh68MYqtH2pkSR60XYm+Al/HAX0Fu05te\n\t2zM8I+RDWWLzYSkuZX3F1VgbyuLjmyeaOg35Vqunk9pCSrtBFCNI04233aNKGKBhUwHt\n\t0J0OCdjAX7TtlW+mJ0ZF1mMUnwKODrXWRJz+GEmCiLdR6LDLodkuddbe7EUvqDDiUQQe\n\tu1mON1B/r++kQ6mwKDuklBwzQdqlhf7gVBGVC/4zQtClzLPQpC5zuEPP/Xcd1XujLl/6\n\tntfQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=linaro.org\n\theader.i=@linaro.org header.b=\"j+Hi1D3G\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702600501; x=1703205301;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=TfIPSVVbxcJhqDlwggF06rA/9uiO7z6aAFXkAusLLt0=;\n\tb=eCn2VJamaFReFmsOD0MDDFainFcuOKyw1MIQVkyK1uHU807wK6VwwGith+gCIGNGp7\n\tnZt2qCa8HFsqdN2/VDeL/XjYGgqOKEyK11FVKM6nL2WwlAiRjGK3dozMGXDyNxsfaWW3\n\tSLedx9VBTwOYXoav3h+MlIl6S0vhrLT50LHm8A5guL2cHO5Nk8ZoCbeAEQb5ibQNrfJr\n\tLUKDzv0+MGsl9sPnagchA/4mHN5Lq8nvPpOwDuEM/HQD0YmuS69fZ+Y0U70o8VknQayR\n\tQlM4laehYDhQZBgwvCkjJ6ttqgmpd0SO8JuVA8cgee+ycs6flAlRWLYr/Si0LhT3V6Df\n\tveAg==","X-Gm-Message-State":"AOJu0Yxg4jFhRRb070IzK9k578+DUtAQpbct61NUKeHqGlXiAdwjdAYY\n\tWiFWlUKnmDogyKKvBbr/mjnDEg==","X-Google-Smtp-Source":"AGHT+IGt/bTgpUKqwBzW4HsQTgKK+n8a7/Xggr2VcMOghfYZz5pgm0KxIOBuvrgpyewmy2ClKM9Msg==","X-Received":"by 2002:a05:600c:d9:b0:40b:5e21:e262 with SMTP id\n\tu25-20020a05600c00d900b0040b5e21e262mr5646463wmm.79.1702600501170; \n\tThu, 14 Dec 2023 16:35:01 -0800 (PST)","Message-ID":"<c45904b6-d7f9-4c6a-89ce-e8262c8d5890@linaro.org>","Date":"Fri, 15 Dec 2023 00:34:58 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Content-Language":"en-US","To":"Hans de Goede <hdegoede@redhat.com>, libcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<0d6c1a3f-8af2-42d8-a924-066158dd87c5@redhat.com>\n\t<69815977-d534-4a62-b2c7-aafe670022e2@redhat.com>","In-Reply-To":"<69815977-d534-4a62-b2c7-aafe670022e2@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Bryan O'Donoghue via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28328,"web_url":"https://patchwork.libcamera.org/comment/28328/","msgid":"<c7f2a30e-b497-4665-8d0a-a2b41c6ab8e0@linaro.org>","date":"2023-12-15T00:48:55","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 14/12/2023 16:25, Hans de Goede wrote:\n> Hi,\n> \n> On 12/14/23 17:02, Hans de Goede wrote:\n>> Hi Bryan,\n>>\n>> On 12/14/23 16:16, Bryan O'Donoghue wrote:\n>>> On 14/12/2023 14:47, Hans de Goede wrote:\n>>\n>> <snip>\n>>\n>>>> BTW I'm currently working on adding support for 10bpp unpacked\n>>>> bayer and while working on this I noticed a small bug in the swstats\n>>>> code, you may want to squash in this fix:\n>>>\n>>> Applied that change.\n>>>\n>>> I'm comparing to your earlier branch\n>>>\n>>> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n>>> Author: Hans de Goede <hdegoede@redhat.com>\n>>> Date:   Thu Nov 30 20:13:29 2023 +0100\n>>>\n>>>\n>>> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n>>> Seems to be eating alot more cycles\n>>\n>> Ok, that is no good.\n>>\n>> Can you try:\n>>\n>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans3\n>>\n>> And then start with checking out:\n>>\n>> 64c9bc0f55f459b9722fe78dfd35a07fb35d2a7b (\"libcamera: software_isp: Add debayer-line callbacks for bayer patterns repeating every 4 lines\")\n>>\n>> that is basically softisp/SoftwareISP-v01-hans1 rebased on top of SoftwareISP-v02,\n>> so that should give you to same performance as before.\n>>\n>> First please check this indeed restores performance ?\n>>\n>> And then after that try newer commits from that branch in this order\n>> (I'm skipping commits which should not have a performance impact here):\n>>\n>> 7136d4d59aafb2564a24a2d4be773ca220257fdc\n>> e3c2a5931dd825c58f626da8c12429b70d20219b (not really expecting a performance impact from this one but maybe)\n>> b3aa4e4f781e881746953177dacbce8c943cb5a3 (bugfix but one which is expected to have some performance impact)\n>> ec75339a5bff8b8e9a0031b9408bd47020905a4f\n>> f62ed5df54850a24406bf3a762271a5fa3c0303d\n>>\n>> The reason why I'm asking you to test these instead of do a bisect\n>> is since there might be a number of smaller performance regressions\n>> all adding up ...\n>>\n>> If you can let me know the results of this then I'll see if I can\n>> restore the old performance for you.\n>>\n>> Note that as mentioned above b3aa4e4f781e is a bug fix which\n>> some potentially big performance implications but the old code\n>> really was wrong there ...\n>>\n>>> and producing a more pinkish result on my hw.\n>>\n>> As part of my work I more or less rewrote white-balancing, but I thought I fixed\n>> the pinkish thing. It seems the new white-balancing is somewhat sensitive to\n>> over-exposure and your image does look a bit overexposed.\n> \n> p.s.\n> \n> It would also be good to compare:\n> \n> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans2\n> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans3\n\nPavel pointed out libcamera is -Os not -O3\n\nmeson setup -Dprefix=/home/deckard/Development/FireFox/libcamera-install \n-Dpipelines=simple/simple -Dipas=simple/simple --buildtype=release \nbuild.swisp\n\nSwitching to release brings the cpu occupancy down to 60% on the topic \nbranch for this series.\n\nWe should probably shouldn't be too concerned about performance of -Os \ncode for this case.\n\nStill looks washed out / red in comparsion to \n64c9bc0f55f459b9722fe78dfd35a07fb35d2a7b\n\nI think that warrants fixing.\n\n---\nbod","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 64621C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Dec 2023 00:48:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C21DE62B33;\n\tFri, 15 Dec 2023 01:48:58 +0100 (CET)","from mail-wm1-x330.google.com (mail-wm1-x330.google.com\n\t[IPv6:2a00:1450:4864:20::330])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9E20262B2A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Dec 2023 01:48:57 +0100 (CET)","by mail-wm1-x330.google.com with SMTP id\n\t5b1f17b1804b1-40c339d2b88so1482645e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 16:48:57 -0800 (PST)","from [192.168.100.113] ([37.228.218.3])\n\tby smtp.gmail.com with ESMTPSA id\n\te33-20020a5d5961000000b0033346fe9b9bsm17342696wri.83.2023.12.14.16.48.55\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 14 Dec 2023 16:48:56 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702601338;\n\tbh=hEzs1/G7vW3tpecGfpo8GZQPCnaqTGkJ4bbbnahixZ8=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=SUANd0EcVoCSPJUKk27Q7cCeotDJwQEk/DNlDrwY9veV3P9gRUFHPdfbWZlQleT81\n\tou3fe3GVhZCS+/q699TCLx1Ze8SO9rV1U5chUegTa9aeMp/NR2cDLCWG5+OplHq+om\n\t0jiD0RbZXErRuft1Xhw608owc1HMjj+T5iHYDgvGx+/tb5l00ffZdUN62NoePLyZlQ\n\tyFWm20JkJxYxmiGxgAYn/rXzJNSqb7SfUMMX54V3jnoaSbl3xsA9szzBFeADBJPXPw\n\teksfuJQAjAsYDUuzBn8RotVHKx/HhkWtHSCo0dAsA53AMMtCmWpNTuWbwj7ReNI7Uj\n\t9KbJCFlI6XTWg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1702601337; x=1703206137;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=ID8wYvbp8HaquZ0QeJlX3cVscrNMsaxW31E6MvQAPyk=;\n\tb=wpNQp2YN7+E6ySejpmwIkohnpX70iVZAf9k5DybXyeBFWsIY5JdA6EE+48sL2NRT1E\n\ta5LQOvz6BKN8ICSm8rEm/9YJihhBqj0aPcSyTix2JHAPFTyst+pRIuUKnf04jFInHW36\n\tly1ikZr9Hp4dfO1kN0wm+kznBJlWq1iaOcrfzRaMaYvtavEyKMD5g6XV+mt7l9YlZfJH\n\tbeYZjAet6EJf/SOfqWJX0qU2uzF/iOJqZhEXTLtqLeIOegmVPUgpYFmLfiau8pn9mo59\n\t/IZLV57D1j9mqPlNXCTaOMuTtrCEwNKjFHE9fVSE05zpbFSaid1IwYjGal+kkZJtrFc8\n\tOfCg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=linaro.org\n\theader.i=@linaro.org header.b=\"wpNQp2YN\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702601337; x=1703206137;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=ID8wYvbp8HaquZ0QeJlX3cVscrNMsaxW31E6MvQAPyk=;\n\tb=QW34ChEdnVvO2GOYKJDAu3mvI4uzkB/2ZXCF2GGErrZezNHiNXUB5rUel/EwtlspBA\n\tsadDkf+xHVJEzFkItIM/FpBz2hUu7KBWbG2Xeqtca2VPShIVK3t2ISes39lxubbBczJO\n\tRMPlgVjhOzj0dLPAtnQWQ8b4cn8BE4BbNaxYspeA1cXyPK990m5Hvi7M/wPVsZ9QEwzR\n\ty0MVmrPc7DxGnZWDqIWCy9U7zQrBoOjsYw/dO9sLRlCgltjDAfpyvp1NEg3OlMYmyeaF\n\tDIkSiDyi6u4vRMiI1ICehW1NJZY9GEwvh7Oc/EBsY+KaLRFEb1LTuyRhCIDaYIeHS8DD\n\tlYrA==","X-Gm-Message-State":"AOJu0Yxlzz416ow+6GmMuVfZxJR7JCKsD+pm93EingDxs5BW18ty/2bV\n\tUXFirDzRJ/CZVhVv/IRN8s8BBw==","X-Google-Smtp-Source":"AGHT+IELFwPE7ALvx2Y8uraDO4s/JJFQv1F2+Q9LHWvRkttPxA0yW882wZ2VFObilI9+igpdcDwyew==","X-Received":"by 2002:a05:600c:45cc:b0:40c:4bea:a933 with SMTP id\n\ts12-20020a05600c45cc00b0040c4beaa933mr3461706wmo.187.1702601337101; \n\tThu, 14 Dec 2023 16:48:57 -0800 (PST)","Message-ID":"<c7f2a30e-b497-4665-8d0a-a2b41c6ab8e0@linaro.org>","Date":"Fri, 15 Dec 2023 00:48:55 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Content-Language":"en-US","To":"Hans de Goede <hdegoede@redhat.com>, libcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<0d6c1a3f-8af2-42d8-a924-066158dd87c5@redhat.com>\n\t<69815977-d534-4a62-b2c7-aafe670022e2@redhat.com>","In-Reply-To":"<69815977-d534-4a62-b2c7-aafe670022e2@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Bryan O'Donoghue via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28334,"web_url":"https://patchwork.libcamera.org/comment/28334/","msgid":"<f218ee16-cd0a-4f54-b4c4-e8080fd7734b@redhat.com>","date":"2023-12-15T14:27:45","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/people/102/","name":"Hans de Goede","email":"hdegoede@redhat.com"},"content":"Hi,\n\nOn 12/15/23 01:48, Bryan O'Donoghue wrote:\n> On 14/12/2023 16:25, Hans de Goede wrote:\n>> Hi,\n>>\n>> On 12/14/23 17:02, Hans de Goede wrote:\n>>> Hi Bryan,\n>>>\n>>> On 12/14/23 16:16, Bryan O'Donoghue wrote:\n>>>> On 14/12/2023 14:47, Hans de Goede wrote:\n>>>\n>>> <snip>\n>>>\n>>>>> BTW I'm currently working on adding support for 10bpp unpacked\n>>>>> bayer and while working on this I noticed a small bug in the swstats\n>>>>> code, you may want to squash in this fix:\n>>>>\n>>>> Applied that change.\n>>>>\n>>>> I'm comparing to your earlier branch\n>>>>\n>>>> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n>>>> Author: Hans de Goede <hdegoede@redhat.com>\n>>>> Date:   Thu Nov 30 20:13:29 2023 +0100\n>>>>\n>>>>\n>>>> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n>>>> Seems to be eating alot more cycles\n>>>\n>>> Ok, that is no good.\n>>>\n>>> Can you try:\n>>>\n>>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans3\n>>>\n>>> And then start with checking out:\n>>>\n>>> 64c9bc0f55f459b9722fe78dfd35a07fb35d2a7b (\"libcamera: software_isp: Add debayer-line callbacks for bayer patterns repeating every 4 lines\")\n>>>\n>>> that is basically softisp/SoftwareISP-v01-hans1 rebased on top of SoftwareISP-v02,\n>>> so that should give you to same performance as before.\n>>>\n>>> First please check this indeed restores performance ?\n>>>\n>>> And then after that try newer commits from that branch in this order\n>>> (I'm skipping commits which should not have a performance impact here):\n>>>\n>>> 7136d4d59aafb2564a24a2d4be773ca220257fdc\n>>> e3c2a5931dd825c58f626da8c12429b70d20219b (not really expecting a performance impact from this one but maybe)\n>>> b3aa4e4f781e881746953177dacbce8c943cb5a3 (bugfix but one which is expected to have some performance impact)\n>>> ec75339a5bff8b8e9a0031b9408bd47020905a4f\n>>> f62ed5df54850a24406bf3a762271a5fa3c0303d\n>>>\n>>> The reason why I'm asking you to test these instead of do a bisect\n>>> is since there might be a number of smaller performance regressions\n>>> all adding up ...\n>>>\n>>> If you can let me know the results of this then I'll see if I can\n>>> restore the old performance for you.\n>>>\n>>> Note that as mentioned above b3aa4e4f781e is a bug fix which\n>>> some potentially big performance implications but the old code\n>>> really was wrong there ...\n>>>\n>>>> and producing a more pinkish result on my hw.\n>>>\n>>> As part of my work I more or less rewrote white-balancing, but I thought I fixed\n>>> the pinkish thing. It seems the new white-balancing is somewhat sensitive to\n>>> over-exposure and your image does look a bit overexposed.\n>>\n>> p.s.\n>>\n>> It would also be good to compare:\n>>\n>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans2\n>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans3\n> \n> Pavel pointed out libcamera is -Os not -O3\n> \n> meson setup -Dprefix=/home/deckard/Development/FireFox/libcamera-install -Dpipelines=simple/simple -Dipas=simple/simple --buildtype=release build.swisp\n> \n> Switching to release brings the cpu occupancy down to 60% on the topic branch for this series.\n> \n> We should probably shouldn't be too concerned about performance of -Os code for this case.\n> \n> Still looks washed out / red in comparsion to 64c9bc0f55f459b9722fe78dfd35a07fb35d2a7b\n> \n> I think that warrants fixing.\n\nAck. FWIW I'm not seeing that with my sensor. We need to investigate this.\nYesterday I finished about a 10 day libcamera sprint so for now I'm not\ngoing to touch libcamera for a few days.\n\nI plan to get back to libcamera again on Wednesday.\n\nIn the mean time can you let me know what the bayer order for your sensor is?\nI think the swstats refactor may have messed up the stats for your sensor.\n\nAnd please also do a test run with the attached patch applied and send me (part of)\nthe debug output please.\n\nRegards,\n\nHans","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 777BABD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Dec 2023 14:27:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BDE0562B33;\n\tFri, 15 Dec 2023 15:27:56 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E266D61D96\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Dec 2023 15:27:54 +0100 (CET)","from mail-ej1-f69.google.com (mail-ej1-f69.google.com\n\t[209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-581-9P1t68dOMhmsIlG39cXOJg-1; Fri, 15 Dec 2023 09:27:48 -0500","by mail-ej1-f69.google.com with SMTP id\n\ta640c23a62f3a-a19725a3a84so46858766b.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Dec 2023 06:27:48 -0800 (PST)","from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec?\n\t(2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl.\n\t[2001:1c00:c32:7800:5bfa:a036:83f0:f9ec])\n\tby smtp.gmail.com with ESMTPSA id\n\tfj8-20020a1709069c8800b00a1d5c342674sm10712693ejc.27.2023.12.15.06.27.45\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tFri, 15 Dec 2023 06:27:45 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702650476;\n\tbh=AO6k57pWvQDvhk9193WjAbXMEBtB9swTC94yhW6Amaw=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=IYlDr9Z0uinBabqlIXt4u4eGLaqM/HiR3rJKw8lVVpmX2LH51GdP0SB7+17urxEc2\n\toMdRgd+PjpT2X63H9Dibg9UHSGDnavzNcoKS3C0ODU49PLqJvNSxmrfSI6W6gNhU9h\n\tj2kmGlSUWZeCRkSa96d24NvBytZUqK49Gn287beo5kfviIMxZ7BCznWmVScmzLp345\n\tw03kgt8kW9XEs25Q3Hidix2tTg4FgdoXmyu7B03jzLBfALaoCfeTgkwxbWp4X81Py8\n\to37xU8pLpx3W9Tuf+Hln7gPWh9FVGSveJ/IMIArO4UpHvRuY68b5l9ydwQ6xwy7Sis\n\tCVZslBOi5q6OQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1702650474;\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=aILbD8Gu2ktZ6fQPGvRSaSCDn+aqDJImR47dFWJ1thg=;\n\tb=I0ZZFEWKzmUvSd+GCa3dKm/+qf7BKxO4o8zkMGx2VMuWpjr3pybpGCKEBjkjEbdBhg8CMz\n\tGEb6n860qdRXU8CRzpFQ+BAxyJ8t/ctM6IJNJIjPotP/uhxFIDrIchNmTtLunjauO7IejJ\n\togKuRSvVW5rn2CXEBGJK7yed7EOkUYg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"I0ZZFEWK\"; \n\tdkim-atps=neutral","X-MC-Unique":"9P1t68dOMhmsIlG39cXOJg-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702650467; x=1703255267;\n\th=in-reply-to:from:references:cc:to:content-language:subject\n\t:user-agent:mime-version:date:message-id:x-gm-message-state:from:to\n\t:cc:subject:date:message-id:reply-to;\n\tbh=hEER425KS4t5udJlDGik64BenspCfxNWeOHJbU59XSE=;\n\tb=MtBCpPAZQO3k0bPbaNuv1VqvsmvCZSucYfrk6tZKmRCikPLme4H1BOwnTgEy8B/5PG\n\tDI6ynu9UqnN3pwnsccTftrxujKcqDFxKxAnlRJqNw7lEVD9uYLHB0HDvFdPZZzx6JCNP\n\tI68UN30OVXuusiCi6XtQ2JPxLcDGCrpEqeHZLYn6EAOBP53Nz6iDZArOERL6ecrAiaov\n\tdoxbNlMm7LgQ4AbIzuu7803DRtXiJAqDSbvc0akxTqnyhvV0vS0BYVIVvNGXWY2qpJ0F\n\tJtuUrTAEL/VHGOkdrrT5zBymKq9L9Xue1h7j20pJRzE9lwduPESqsTNOOChToP/BoJQa\n\tT7nA==","X-Gm-Message-State":"AOJu0YyEPCx4/O9095uuTpaaEq1ex6tJjwL6syIiOpjbNcXaTOW2uZXY\n\tP+BmWz0kG2w0xXEA4Ea1uhLDqrgNcNclJS4Vn/cN6Nbm4kKOoOrFO3uANRpe0INKWxD+ip4WCyB\n\tYme25XeApo4iO9eIeKRB9ZiPJnHHdaJdycw==","X-Received":["by 2002:a17:906:738d:b0:a19:a19b:425c with SMTP id\n\tf13-20020a170906738d00b00a19a19b425cmr3736292ejl.199.1702650467450; \n\tFri, 15 Dec 2023 06:27:47 -0800 (PST)","by 2002:a17:906:738d:b0:a19:a19b:425c with SMTP id\n\tf13-20020a170906738d00b00a19a19b425cmr3736291ejl.199.1702650467134; \n\tFri, 15 Dec 2023 06:27:47 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IHQ8YhQQSCy2ktCDNrkN9bZhG/apVTC4gD8suvQFfDOaYR/pLG1X4gkvk0FXXPFPa3o9OIemw==","Message-ID":"<f218ee16-cd0a-4f54-b4c4-e8080fd7734b@redhat.com>","Date":"Fri, 15 Dec 2023 15:27:45 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<0d6c1a3f-8af2-42d8-a924-066158dd87c5@redhat.com>\n\t<69815977-d534-4a62-b2c7-aafe670022e2@redhat.com>\n\t<c7f2a30e-b497-4665-8d0a-a2b41c6ab8e0@linaro.org>","In-Reply-To":"<c7f2a30e-b497-4665-8d0a-a2b41c6ab8e0@linaro.org>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"multipart/mixed;\n\tboundary=\"------------5AjWrenpNnaUochxenFzjCuL\"","Content-Language":"en-US, nl","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Hans de Goede <hdegoede@redhat.com>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28335,"web_url":"https://patchwork.libcamera.org/comment/28335/","msgid":"<c5369630-1597-4241-bee5-bb1c80aa6a09@redhat.com>","date":"2023-12-15T14:37:31","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/people/102/","name":"Hans de Goede","email":"hdegoede@redhat.com"},"content":"Hi,\n\nOn 12/15/23 01:34, Bryan O'Donoghue wrote:\n> On 14/12/2023 16:25, Hans de Goede wrote:\n>> Hi,\n>>\n>> On 12/14/23 17:02, Hans de Goede wrote:\n>>> Hi Bryan,\n>>>\n>>> On 12/14/23 16:16, Bryan O'Donoghue wrote:\n>>>> On 14/12/2023 14:47, Hans de Goede wrote:\n>>>\n>>> <snip>\n>>>\n>>>>> BTW I'm currently working on adding support for 10bpp unpacked\n>>>>> bayer and while working on this I noticed a small bug in the swstats\n>>>>> code, you may want to squash in this fix:\n>>>>\n>>>> Applied that change.\n>>>>\n>>>> I'm comparing to your earlier branch\n>>>>\n>>>> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n>>>> Author: Hans de Goede <hdegoede@redhat.com>\n>>>> Date:   Thu Nov 30 20:13:29 2023 +0100\n>>>>\n>>>>\n>>>> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n>>>> Seems to be eating alot more cycles\n>>>\n>>> Ok, that is no good.\n>>>\n>>> Can you try:\n>>>\n>>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v02-hans3\n> \n> So this branch has the same performance issue 18fps, pinked-out display and ~ 100% on one of the cores.\n> \n>>>\n>>> And then start with checking out:\n>>>\n>>> 64c9bc0f55f459b9722fe78dfd35a07fb35d2a7b (\"libcamera: software_isp: Add debayer-line callbacks for bayer patterns repeating every 4 lines\")\n> \n> I get 30fps here with 60-9x% cpu usage. Looks a bit dark but not pink.\n> \n> Looks like a reasonable baseline.\n> \n>>>\n>>> that is basically softisp/SoftwareISP-v01-hans1 rebased on top of SoftwareISP-v02,\n>>> so that should give you to same performance as before.\n>>>\n>>> First please check this indeed restores performance ?\n>>>\n>>> And then after that try newer commits from that branch in this order\n>>> (I'm skipping commits which should not have a performance impact here):\n>>>\n>>> 7136d4d59aafb2564a24a2d4be773ca220257fdc\n> \n> brighter but pink, lower cpu occupancy 40%, 30fps\n> \n>>> e3c2a5931dd825c58f626da8c12429b70d20219b (not really expecting a performance impact from this one but maybe)\n> \n> \n> Way brighter - too much IMO in comparsion to the previous, occupancy 100% fps 21.\n\nOk, so the CPU change here is weird. I know building with -O3 helps, but it looks\nlike there is still more CPU load gain to have.\n\nCan you try adding this change on top of SoftwareISP-v04 ? :\n\ndiff --git a/include/libcamera/internal/software_isp/debayer.h b/include/libcamera/internal/software_isp/debayer.h\nindex 206bc2ac..e2a63f24 100644\n--- a/include/libcamera/internal/software_isp/debayer.h\n+++ b/include/libcamera/internal/software_isp/debayer.h\n@@ -77,10 +77,8 @@ public:\n \t\t\treturn {};\n \t\t}\n \n-\t\treturn SizeRange(Size(pattern_size.width, pattern_size.height),\n-\t\t\t\t Size((inputSize.width - 2 * pattern_size.width) & ~(pattern_size.width - 1),\n-\t\t\t\t      (inputSize.height - 2 * pattern_size.height) & ~(pattern_size.height - 1)),\n-\t\t\t\t pattern_size.width, pattern_size.height);\n+\t\treturn SizeRange(Size((inputSize.width - 2 * pattern_size.width) & ~(pattern_size.width - 1),\n+\t\t\t\t      (inputSize.height - 2 * pattern_size.height) & ~(pattern_size.height - 1)));\n \t}\n \n \tSignal<FrameBuffer *> inputBufferReady;\n\nThat basically undoes e3c2a5931dd825c58f626da8c12429b70d20219b but then\nthe SoftwareISP-v04 equivalent of it.\n\nI wonder if that will give you another CPU load drop :)\n\nAs for the way brighter that probably is the gamma correction which\nI added which I've hardcoded to 0.5 which is probably way too much.\nThis change (also in the AWB debug patch I send) disables the gamma\ncorrection:\n\ndiff --git a/src/libcamera/software_isp/swisp_simple.cpp b/src/libcamera/software_isp/swisp_simple.cpp\nindex ff05b6fe..0f9213cc 100644\n--- a/src/libcamera/software_isp/swisp_simple.cpp\n+++ b/src/libcamera/software_isp/swisp_simple.cpp\n@@ -22,7 +22,7 @@\n namespace libcamera {\n \n SwIspSimple::SwIspSimple(PipelineHandler *pipe, const ControlInfoMap &sensorControls)\n-\t: SoftwareIsp(pipe, sensorControls), debayer_(nullptr), debayerParams_{256, 256, 0.5f}\n+\t: SoftwareIsp(pipe, sensorControls), debayer_(nullptr), debayerParams_{256, 256, 1.0f}\n {\n \tstd::unique_ptr<SwStatsCpu> stats;\n \nOnce we have the purple issue fixed I wouldn't mind getting some opinions on what is\na good gamma-correction default value. Note this is not entirely linear, 0.75\ndoes much less (close to none) correction then 0.5, so you could e.g. try 0.6 0.65\nbut lets first fix the pink / purple haze issue.\n\nRegards,\n\nHans","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 D6821C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Dec 2023 14:37:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4B20762B32;\n\tFri, 15 Dec 2023 15:37:40 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 612BF61D96\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Dec 2023 15:37:39 +0100 (CET)","from mail-ej1-f69.google.com (mail-ej1-f69.google.com\n\t[209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-335-tivoV8tVMSyTvYlwcmU7PQ-1; Fri, 15 Dec 2023 09:37:34 -0500","by mail-ej1-f69.google.com with SMTP id\n\ta640c23a62f3a-a1bd7a5931eso43282666b.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Dec 2023 06:37:34 -0800 (PST)","from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec?\n\t(2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl.\n\t[2001:1c00:c32:7800:5bfa:a036:83f0:f9ec])\n\tby smtp.gmail.com with ESMTPSA id\n\ttl18-20020a170907c31200b00a1da2c9b06asm10805911ejc.42.2023.12.15.06.37.31\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tFri, 15 Dec 2023 06:37:32 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702651060;\n\tbh=MvXAffkzuaavJM/aenKcVDEBdLxMLzNdvSR6vkMuzzg=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=dEnkV9fpqG6teoAmw9MxEr0tw5zZNDUK6Fsap8/qgMLG79qZhfiRKsp/FVO1zLEQ2\n\tMoh38UjVGklQF2S8AdTJJI2y5ZbdA36DzFEXZHU9h17nMxcZfAGCEEiQ+W03M5UAu/\n\t8FepAhGRjd3U7J49JormcQ3RvZt6XkwxPPogKvfypAS4L1NT4YhwbbAe+KHtMnA1XA\n\t/XDjixiSDI3Pzqm2VkygMEPidvHL9RcjaLj3TJiwp1QUdFUZ7EUizSg2zbqkPrBZ60\n\tOH77DiW45aakkqtsdX2LPvomhv3ktPKMu9QbmCotpzzP7O7tVsn283HhKlsBPKZxo8\n\tHHgZPJJ69egrQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1702651058;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=c83QxqkSMAMOjmcsDRbs41OZd5ICXL6JW8SAYpytWHk=;\n\tb=eViY+jDG7JkHEYDDmW/KpRVJhfasbWNUq4dnSTpAKI54t5URcVAfVaLwXGA045IYds+TS4\n\tuJ6OX1A8qsu9E+8ZLTmkxsosYAN/LEFls61cv6pwy7zoPCxpQYCZWJN1f2Reu0Zw/evmnL\n\tldVqOgdgHy/DzQsuK43r2H6Di1sQN/M="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"eViY+jDG\"; \n\tdkim-atps=neutral","X-MC-Unique":"tivoV8tVMSyTvYlwcmU7PQ-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702651053; x=1703255853;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=c83QxqkSMAMOjmcsDRbs41OZd5ICXL6JW8SAYpytWHk=;\n\tb=CGYydDbdXvS0hJWdq7Rkus9sErxJNk6/ymxiyNoXWtsvlkXYVmK557EZqagXqbxVKF\n\t48DP17YhrNgAW/+DgjJbY+EYVnE4p5QZct+1xvqRzCF4BFIJ7fwlkFp1yKDB15dYwA0O\n\tQuGtvsfEJWWTL5kgG0Hp+3TPvCzaytn6bqnk0SnHZvLrpX5SNns8Dn/+hT+49M/9TwHE\n\tjk1W7sVGze605VipUU7t3UmNmxJeSQ+kJWPEBOmgJRK7x+J1D63sFpqlxKmRq+w0qJuR\n\tr6oBdkJUNFcaViGla/hYMR72xwNN4tw9jW8bxFpdPx5oFy82OinysZ1FtD0hSpO437Vu\n\tkWqA==","X-Gm-Message-State":"AOJu0YykuHFvdRBCvVwIF50cgCaHyifIwZawJgDc2ox1RPHkQGUQrNPt\n\tGODj4LjYBgyhsP5eLZopAhlrHnvQVuZCDSz8IcngbId1YjhYkBDFxtJ+JZTP8EOTFbsL6YSdTe8\n\tRH+Z41pAtGRumwRFKBI93zygv6ldLBnjiqQ==","X-Received":["by 2002:a17:907:940b:b0:a19:a19a:eac4 with SMTP id\n\tdk11-20020a170907940b00b00a19a19aeac4mr6756710ejc.125.1702651053432; \n\tFri, 15 Dec 2023 06:37:33 -0800 (PST)","by 2002:a17:907:940b:b0:a19:a19a:eac4 with SMTP id\n\tdk11-20020a170907940b00b00a19a19aeac4mr6756697ejc.125.1702651053019; \n\tFri, 15 Dec 2023 06:37:33 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IGqFlDcHdLeaZJI9f64ae9RupuhMC2uGUb3XXfBBUc7fBGvWgk4hkqzoOmeVTAKGLrohkGJEQ==","Message-ID":"<c5369630-1597-4241-bee5-bb1c80aa6a09@redhat.com>","Date":"Fri, 15 Dec 2023 15:37:31 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<0d6c1a3f-8af2-42d8-a924-066158dd87c5@redhat.com>\n\t<69815977-d534-4a62-b2c7-aafe670022e2@redhat.com>\n\t<c45904b6-d7f9-4c6a-89ce-e8262c8d5890@linaro.org>","In-Reply-To":"<c45904b6-d7f9-4c6a-89ce-e8262c8d5890@linaro.org>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US, nl","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Hans de Goede <hdegoede@redhat.com>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28338,"web_url":"https://patchwork.libcamera.org/comment/28338/","msgid":"<1a871ef7-fdbb-45e7-909d-0c6b17264f11@linaro.org>","date":"2023-12-17T20:23:56","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":25,"url":"https://patchwork.libcamera.org/api/people/25/","name":"Andrey Konovalov","email":"andrey.konovalov@linaro.org"},"content":"Hi All,\n\nOn 14.12.2023 18:16, Bryan O'Donoghue wrote:\n> On 14/12/2023 14:47, Hans de Goede wrote:\n>> Hi Bryan,\n>>\n>> On 12/14/23 15:40, Bryan O'Donoghue wrote:\n>>> On 14/12/2023 12:13, Hans de Goede wrote:\n>>>> Hi All,\n>>>>\n>>>> Here is a new, now non RFC because believed to be mostly ready\n>>>> for merging, version of the Software ISP work.\n>>>\n>>>\n>>> Thanks for sending this out.\n>>\n>> You're welcome.\n>>\n>>> One thing I'm noticing when compiling is a load of warnings about undocumented variables.\n>> <snip>\n>>> Not sure if you or Andrey see that yourselves but one to be aware of for V2.\n>>\n>> Quoting from the cover-letter:\n>>\n>> \"\"\"\n>> Known open items:\n>> - The AWB red/blue gain calculations needs to be moved to the IPA\n>>    and IPA then needs to pass a DebayerParams struct back to the\n>>    SwIsp\n>> - Properly document all methods / attributed for doxygen\n>> \"\"\"\n>>\n>> So this is a known issue.\n>>\n>> BTW I'm currently working on adding support for 10bpp unpacked\n>> bayer and while working on this I noticed a small bug in the swstats\n>> code, you may want to squash in this fix:\n> \n> Applied that change.\n> \n> I'm comparing to your earlier branch\n> \n> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n> Author: Hans de Goede <hdegoede@redhat.com>\n> Date:   Thu Nov 30 20:13:29 2023 +0100\n> \n> \n> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n> \n> Old branch:\n> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-image.jpg\n> \n> New branch:\n> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-posted-image.jpg\n> \n> Seems to be eating alot more cycles and producing a more pinkish result on my hw.\n\nRE the more pinkish result.\n\nThis is a bug in swstats_cpu.cpp, which in fact broke both AWB and AGC (the exposure/gain could only increase, and\nnever go back down).\n\nI've pushed a branch [1] with the three commits on top of SoftwareISP-v04-hans1 by Hans:\n\n6baa50e7 (\"libcamera: software_isp: fix statistics calculations\") is the fix to the \"pinkish\" image issue.\n     Needs to be included into the patch set.\nf8efb3be (\"libcamera: software_isp: fix AWB algorithm not to increase luminance\") makes the luminance not to change\n     due to the colour gains applied. This improves the image a bit (makes it a bit less bright), but the effect\n     is relatively small - within 10% depending on the light and the objects in the particular image. This change\n     increases the load on CPU, so I am not sure if this image improvement is worth this higher CPU utilization.\nf5906f15 (\"[DNI] libcamera: software_isp: print colour gains to the log\") prints the colour gains to the console\n     so that one could see the effect of the previous patch - without it the green gain would always be 256, and the\n     other two gains would increase in the same proportion. E.g. \"gains R/G/B = 253/240/406\" would become\n     \"gains R/G/B = 270/256/433\" without commit f8efb3be.\n\nThanks,\nAndrey\n\n[1] https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v04-hans1--ynk1\n\n> ---\n> bod\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 E53C5C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 17 Dec 2023 20:24:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2D04962B40;\n\tSun, 17 Dec 2023 21:24:00 +0100 (CET)","from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1985E62B30\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 17 Dec 2023 21:23:59 +0100 (CET)","by mail-wm1-x335.google.com with SMTP id\n\t5b1f17b1804b1-40c39e936b4so27752975e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 17 Dec 2023 12:23:59 -0800 (PST)","from [192.168.118.20] ([87.116.165.24])\n\tby smtp.gmail.com with ESMTPSA id\n\tbd21-20020a05600c1f1500b0040c25abd724sm42154366wmb.9.2023.12.17.12.23.57\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tSun, 17 Dec 2023 12:23:58 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702844640;\n\tbh=v5oGR/JzpGBBGAVME6iS9sHKW71W1zwJ5o+McwYnENU=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=vub3ptQ3HB2yaB7wkaZAwPnlGuoGAT3laBhOb3IBnygtYTP062BshbP98VeKYVy2o\n\tyC/Zacqdy7Qwim4/pNEw9zzYJL+dM3R9MWl7iKwtwtzolR/CzehHe0RQI0ck2MgT2R\n\tcNdySJXCL2s4si/m0OVglX1FA7JTflTtk3B54UMZzEhCuUvY+IzLKkb5UenRCcOUkH\n\tG20z20bI3FhpDMGXlPqK49ujQMFu6F9ukXcppFqXzATQpiDZleo3fguEBVyTRNNpN8\n\thKur7t4dXu3QWaoY6ptL6A/uAyH6A9tSXyjU7xAos+Kt+EWt3igPBC476d45gZ8cIu\n\ttQiKrer89amLQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1702844638; x=1703449438;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:from:content-language\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=aCtt/h3M/5AKgDGI91L6ooIa5BgYSy0PzepZ5URglRM=;\n\tb=YJJ6G4Qmp/jePU/EoS4N8sXlDP2wiotqG0xqqFq+E6dEB03yy3dpQvHR7RJyIsVTda\n\t7cubbMM75bTo7CsojFCJFAYOfwnow7j3vu3/sg9T4TMqAOD/B+npcSaJw4lTJVvesDD2\n\tn+TY9c7IZKb7ZGrUzjAvGNoJ0h6rHBO2d0fRbP3LbPU1EF9EKiR3eDmh98sN7ctxQ548\n\tFQDbRVJvC9DgBRaF6ytrTQKex/JKVslStkm8zN7SnPLf1SkeIGjDwNcOsks0xhe51NjH\n\t7a9dVXrnrnaKAl9s3Gr75+Bg7ULJzIh3eDvcWNYLLplbf3y9oABqcUsZx4njDqW4C58+\n\tvU3Q=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=linaro.org\n\theader.i=@linaro.org header.b=\"YJJ6G4Qm\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702844638; x=1703449438;\n\th=content-transfer-encoding:in-reply-to:from:content-language\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=aCtt/h3M/5AKgDGI91L6ooIa5BgYSy0PzepZ5URglRM=;\n\tb=JRZ4bFxdjDu7HB183hpoRgSmxhJacyEvI9ooW12Cu/c5jnHtrLkLRPV4kMSXU7Rtx5\n\tbcYds6QypLlQEpm6FD4F93MtR/ywijUawG71g54LVggDsi27KMNx22MToaag6Mta6da+\n\tMaEn35PtI8NuMtxHOg2VXUPBvwEpxBDYCgC+1wVUGnUvBRfO7qwPsytaY+SQtH3cGoNH\n\taIg6sfwVrmwvtoS5VYhk9jPbj6M/QggrPuDFQS52OSX0B2E7FmJMLVO2uG0obMFYV15F\n\tqDgUkN+FYgbjs5l0YDuaVNPh7uPZL+K6NpKxBhiEBO5euEceLuqfFxrEyB9Gb+ARfS2D\n\ttvxA==","X-Gm-Message-State":"AOJu0YzHlxjHaeGtpBYSNmI51sV7WYSRxRFx4LnAHStThH7ieyVLJJ+E\n\t74QmdmjajG36dhCDX/lhyVqQyQ==","X-Google-Smtp-Source":"AGHT+IE+D44zXSOJWvqJyuLBu3MfbyAtRxJIREnFlQUO+0ZmNmpTycM9M0vnGg/20qI3hZa+/ELg+w==","X-Received":"by 2002:a1c:6a0a:0:b0:40c:386e:6aa2 with SMTP id\n\tf10-20020a1c6a0a000000b0040c386e6aa2mr4337740wmc.55.1702844638453; \n\tSun, 17 Dec 2023 12:23:58 -0800 (PST)","Message-ID":"<1a871ef7-fdbb-45e7-909d-0c6b17264f11@linaro.org>","Date":"Sun, 17 Dec 2023 23:23:56 +0300","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tHans de Goede <hdegoede@redhat.com>, libcamera-devel@lists.libcamera.org","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>","Content-Language":"en-US","In-Reply-To":"<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Andrey Konovalov via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Andrey Konovalov <andrey.konovalov@linaro.org>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28341,"web_url":"https://patchwork.libcamera.org/comment/28341/","msgid":"<b5312bb7-a6d1-472e-8e74-3ab6a8ec0b3e@redhat.com>","date":"2023-12-18T10:05:52","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/people/102/","name":"Hans de Goede","email":"hdegoede@redhat.com"},"content":"Hi Andrey,\n\nOn 12/17/23 21:23, Andrey Konovalov wrote:\n> Hi All,\n> \n> On 14.12.2023 18:16, Bryan O'Donoghue wrote:\n>> On 14/12/2023 14:47, Hans de Goede wrote:\n>>> Hi Bryan,\n>>>\n>>> On 12/14/23 15:40, Bryan O'Donoghue wrote:\n>>>> On 14/12/2023 12:13, Hans de Goede wrote:\n>>>>> Hi All,\n>>>>>\n>>>>> Here is a new, now non RFC because believed to be mostly ready\n>>>>> for merging, version of the Software ISP work.\n>>>>\n>>>>\n>>>> Thanks for sending this out.\n>>>\n>>> You're welcome.\n>>>\n>>>> One thing I'm noticing when compiling is a load of warnings about undocumented variables.\n>>> <snip>\n>>>> Not sure if you or Andrey see that yourselves but one to be aware of for V2.\n>>>\n>>> Quoting from the cover-letter:\n>>>\n>>> \"\"\"\n>>> Known open items:\n>>> - The AWB red/blue gain calculations needs to be moved to the IPA\n>>>    and IPA then needs to pass a DebayerParams struct back to the\n>>>    SwIsp\n>>> - Properly document all methods / attributed for doxygen\n>>> \"\"\"\n>>>\n>>> So this is a known issue.\n>>>\n>>> BTW I'm currently working on adding support for 10bpp unpacked\n>>> bayer and while working on this I noticed a small bug in the swstats\n>>> code, you may want to squash in this fix:\n>>\n>> Applied that change.\n>>\n>> I'm comparing to your earlier branch\n>>\n>> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n>> Author: Hans de Goede <hdegoede@redhat.com>\n>> Date:   Thu Nov 30 20:13:29 2023 +0100\n>>\n>>\n>> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n>>\n>> Old branch:\n>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-image.jpg\n>>\n>> New branch:\n>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-posted-image.jpg\n>>\n>> Seems to be eating alot more cycles and producing a more pinkish result on my hw.\n> \n> RE the more pinkish result.\n> \n> This is a bug in swstats_cpu.cpp, which in fact broke both AWB and AGC (the exposure/gain could only increase, and\n> never go back down).\n> \n> I've pushed a branch [1] with the three commits on top of SoftwareISP-v04-hans1 by Hans:\n> \n> 6baa50e7 (\"libcamera: software_isp: fix statistics calculations\") is the fix to the \"pinkish\" image issue.\n>     Needs to be included into the patch set.\n\nFor those reading along, this is the fix:\n\n--- a/src/libcamera/software_isp/swstats_cpu.cpp\n+++ b/src/libcamera/software_isp/swstats_cpu.cpp\n@@ -63,7 +63,7 @@ statsBayer10P(const int width, const uint8_t *src0, const uint8_t *src1, bool bg\n \t\t\tr  = src1[x];\n \t\t\tg2 = src1[x + 1];\n \t\t}\n-\t\tg = g + g2 / 2;\n+\t\tg = ((unsigned int)g + g2) / 2;\n \n \t\tsumR += r;\n \t\tsumG += g;\n\n\nHmm, that smells like a compiler bug TBH. g and g2 are both uint8_t, so they have a range\nof 0-255 so C/C++ integer promotion says these should both be promoted to an int\n(0-255 fits in in an int) before doing the + operation:\n\nhttps://en.cppreference.com/w/cpp/language/implicit_conversion#Integral_promotion\n\nSo \"g + g2 / 2\" should be done using all int values (so no overflow) and then\nthe resulting int which is in the 0-255 range again gets stored in uint8_t g, which just\ntakes the low 8 bits which should contain the right value.\n\nI guess the compiler may be changing this to:\n\n\tg += g2;\n\tg /= 2;\n\nbut that is wrong and a compiler bug. With all that said I'm fine with adding the explicit\ncast to (unsigned int), but unless I am missing something here this really does feel\nlike a compiler bug.\n\n> f8efb3be (\"libcamera: software_isp: fix AWB algorithm not to increase luminance\") makes the luminance not to change\n>     due to the colour gains applied. This improves the image a bit (makes it a bit less bright), but the effect\n>     is relatively small - within 10% depending on the light and the objects in the particular image. This change\n>     increases the load on CPU, so I am not sure if this image improvement is worth this higher CPU utilization.\n\nInteresting since we have r g b lookup tables already the extra CPU load is only\nin generating the green table\nonce per frame, the load of that should be negligible.\n\nAnd with the separate gamma lookup we can then also give the gamma-lookup table a bit\nmore precision giving it 1024 entries. The impact of this on performance should be\nminimal.\n\n> f5906f15 (\"[DNI] libcamera: software_isp: print colour gains to the log\") prints the colour gains to the console\n>     so that one could see the effect of the previous patch - without it the green gain would always be 256, and the\n>     other two gains would increase in the same proportion. E.g. \"gains R/G/B = 253/240/406\" would become\n>     \"gains R/G/B = 270/256/433\" without commit f8efb3be.\n\nI think we probably want something like this (but then in the IPA once the AWB calculations\nhave moved there) and then using a log-level of debug. Doing a debug log once per frame\nshould have no performance impact when debug logging is disabled.\n\nRegards,\n\nHans","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 39B8DC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Dec 2023 10:06:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5C92062B40;\n\tMon, 18 Dec 2023 11:06:00 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7265262B2E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 11:05:58 +0100 (CET)","from mail-ej1-f71.google.com (mail-ej1-f71.google.com\n\t[209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-299-YkgqVHiLOme6JPjHFroU9g-1; Mon, 18 Dec 2023 05:05:55 -0500","by mail-ej1-f71.google.com with SMTP id\n\ta640c23a62f3a-a018014e8e5so147359866b.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 02:05:55 -0800 (PST)","from [10.40.98.142] ([78.108.130.194])\n\tby smtp.gmail.com with ESMTPSA id\n\tst3-20020a170907c08300b00a1c4fde4e88sm14082963ejc.18.2023.12.18.02.05.53\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 18 Dec 2023 02:05:53 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702893960;\n\tbh=23aDk67cHm9V3c8byY0v8dWQ1oAtlWmVD0HbDjFDpCk=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=V/D8QUhZrmqgHW6dS1e5IFp2E1w404fG9NRKzOQwBvAsZlSWs6CywZotJcQol0NgQ\n\thxMkAyb9y3P+AB2AgxKm6kNgOxDqoURUoUgzrxIe8N10XOWaYIQc7M9g1+YG2q4F81\n\tF3440v1eH7DWh7MSLC2R3IXD3HaWZFaLBJVm5sWYRlFf3ovQtf1u19WZClw4FFVR8d\n\tDhCKEohVoS1kU++nnAvD/R4X7N2HXsWF8RnXWBJzjAFj8E3j7sSUN3PByTLyxjI21d\n\tp1N9wSR3ee7ZT0zat+P9PYyZ688cygclnFP9tpWQvj8vepfg3murELb7JqMhuz/xZF\n\thIM9POhhOHd5w==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1702893957;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=KIbt7c4BdJZAyhyuDJs2Q6aAk06HtCmnaOX5Wl/OFk4=;\n\tb=AYugoBhdWuczHbOynvT6HFsipTlaCBaJoq7mDw+iV2iUiVUe+GywnjWy0dskYP2RpaK0Y3\n\t61lFzDfzv7ufyYRJXcQKfYtCsZTHOYz4YwwrZe+1p3yAhGfNa5ywkRtK7BxyD2lkifFff0\n\tXmjFB8EbozDdV9jqBYISxt/Vzy02ooU="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"AYugoBhd\"; \n\tdkim-atps=neutral","X-MC-Unique":"YkgqVHiLOme6JPjHFroU9g-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702893954; x=1703498754;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=KIbt7c4BdJZAyhyuDJs2Q6aAk06HtCmnaOX5Wl/OFk4=;\n\tb=XOfSSaYjVMvE0ncmXWGkOC0N4Qpb3xOuj1YgvdNTIT7XJy79D9hU0GQdlX2KLWCg+4\n\tLXbHUsedGCxdeOYYi+NGKyAqAndDkRyeQJawXZPYC31F189KCrjKGckkfl3Ssia5ZJJ3\n\tCU4hSnzKmyrjKJS8Oa1gC4yoc+Lcszle5RRtBCpUO8GPQJLjEo+WqNg8aPTHrdRmtcww\n\tFYPz1Ie/fl/Aqb4pq5a1kHpURn2tfUVrc9HVPbFMyJq/5dvvEHhhBwiG+vOHPIHE4EgX\n\tVAXrIyJ3llxdQUjrPo8bv5M2dMfgMP+Zfy/bkP9RU+NYIolmj8O6c0h88kEN9w6GzTgo\n\tHhjg==","X-Gm-Message-State":"AOJu0YzNEPqqzzqA8zDE0RLDE03FtkZ0fvykVWxE3UrxTSCx0mSOEcOx\n\t5wS2+yFTKPzPf0FyRkkTBND+Mamx29upkNWgJ6APqvtEJbzCnVHJ4/NkCs4O0tjcqWcb3thq4WI\n\taA5foMBAy4ZmJTBZO3YZbgswTIyraHXwu2g==","X-Received":["by 2002:a17:906:8404:b0:a23:3b33:e25e with SMTP id\n\tn4-20020a170906840400b00a233b33e25emr1128019ejx.82.1702893954180; \n\tMon, 18 Dec 2023 02:05:54 -0800 (PST)","by 2002:a17:906:8404:b0:a23:3b33:e25e with SMTP id\n\tn4-20020a170906840400b00a233b33e25emr1128010ejx.82.1702893953798; \n\tMon, 18 Dec 2023 02:05:53 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IFyETRiXoBeUFuxYJZ/kaoTyGKxMy1cO0k632s3gxAjw+xJfF/2KX88S2eUtiYmXQweWOIM3w==","Message-ID":"<b5312bb7-a6d1-472e-8e74-3ab6a8ec0b3e@redhat.com>","Date":"Mon, 18 Dec 2023 11:05:52 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Andrey Konovalov <andrey.konovalov@linaro.org>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<1a871ef7-fdbb-45e7-909d-0c6b17264f11@linaro.org>","In-Reply-To":"<1a871ef7-fdbb-45e7-909d-0c6b17264f11@linaro.org>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Hans de Goede <hdegoede@redhat.com>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28342,"web_url":"https://patchwork.libcamera.org/comment/28342/","msgid":"<e63c527b-ab9c-4fc8-a053-be38f0895064@linaro.org>","date":"2023-12-18T10:34:13","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":25,"url":"https://patchwork.libcamera.org/api/people/25/","name":"Andrey Konovalov","email":"andrey.konovalov@linaro.org"},"content":"Hi Hans,\n\nOn 18.12.2023 13:05, Hans de Goede wrote:\n> Hi Andrey,\n> \n> On 12/17/23 21:23, Andrey Konovalov wrote:\n>> Hi All,\n>>\n>> On 14.12.2023 18:16, Bryan O'Donoghue wrote:\n>>> On 14/12/2023 14:47, Hans de Goede wrote:\n>>>> Hi Bryan,\n>>>>\n>>>> On 12/14/23 15:40, Bryan O'Donoghue wrote:\n>>>>> On 14/12/2023 12:13, Hans de Goede wrote:\n>>>>>> Hi All,\n>>>>>>\n>>>>>> Here is a new, now non RFC because believed to be mostly ready\n>>>>>> for merging, version of the Software ISP work.\n>>>>>\n>>>>>\n>>>>> Thanks for sending this out.\n>>>>\n>>>> You're welcome.\n>>>>\n>>>>> One thing I'm noticing when compiling is a load of warnings about undocumented variables.\n>>>> <snip>\n>>>>> Not sure if you or Andrey see that yourselves but one to be aware of for V2.\n>>>>\n>>>> Quoting from the cover-letter:\n>>>>\n>>>> \"\"\"\n>>>> Known open items:\n>>>> - The AWB red/blue gain calculations needs to be moved to the IPA\n>>>>     and IPA then needs to pass a DebayerParams struct back to the\n>>>>     SwIsp\n>>>> - Properly document all methods / attributed for doxygen\n>>>> \"\"\"\n>>>>\n>>>> So this is a known issue.\n>>>>\n>>>> BTW I'm currently working on adding support for 10bpp unpacked\n>>>> bayer and while working on this I noticed a small bug in the swstats\n>>>> code, you may want to squash in this fix:\n>>>\n>>> Applied that change.\n>>>\n>>> I'm comparing to your earlier branch\n>>>\n>>> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n>>> Author: Hans de Goede <hdegoede@redhat.com>\n>>> Date:   Thu Nov 30 20:13:29 2023 +0100\n>>>\n>>>\n>>> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n>>>\n>>> Old branch:\n>>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-image.jpg\n>>>\n>>> New branch:\n>>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-posted-image.jpg\n>>>\n>>> Seems to be eating alot more cycles and producing a more pinkish result on my hw.\n>>\n>> RE the more pinkish result.\n>>\n>> This is a bug in swstats_cpu.cpp, which in fact broke both AWB and AGC (the exposure/gain could only increase, and\n>> never go back down).\n>>\n>> I've pushed a branch [1] with the three commits on top of SoftwareISP-v04-hans1 by Hans:\n>>\n>> 6baa50e7 (\"libcamera: software_isp: fix statistics calculations\") is the fix to the \"pinkish\" image issue.\n>>      Needs to be included into the patch set.\n> \n> For those reading along, this is the fix:\n> \n> --- a/src/libcamera/software_isp/swstats_cpu.cpp\n> +++ b/src/libcamera/software_isp/swstats_cpu.cpp\n> @@ -63,7 +63,7 @@ statsBayer10P(const int width, const uint8_t *src0, const uint8_t *src1, bool bg\n>   \t\t\tr  = src1[x];\n>   \t\t\tg2 = src1[x + 1];\n>   \t\t}\n> -\t\tg = g + g2 / 2;\n> +\t\tg = ((unsigned int)g + g2) / 2;\n>   \n>   \t\tsumR += r;\n>   \t\tsumG += g;\n> \n> \n> Hmm, that smells like a compiler bug TBH. g and g2 are both uint8_t, so they have a range\n> of 0-255 so C/C++ integer promotion says these should both be promoted to an int\n> (0-255 fits in in an int) before doing the + operation:\n> \n> https://en.cppreference.com/w/cpp/language/implicit_conversion#Integral_promotion\n\nAh OK, I've missed that integral promotion thing. Then the fix would be just adding the\nmissing brackets (not tested):\n\n  -\t\tg = g + g2 / 2;\n  +\t\tg = (g + g2) / 2;\n\n> So \"g + g2 / 2\" should be done using all int values (so no overflow) and then\n> the resulting int which is in the 0-255 range again gets stored in uint8_t g, which just\n> takes the low 8 bits which should contain the right value.\n> \n> I guess the compiler may be changing this to:\n> \n> \tg += g2;\n> \tg /= 2;\n> \n> but that is wrong and a compiler bug. With all that said I'm fine with adding the explicit\n> cast to (unsigned int), but unless I am missing something here this really does feel\n> like a compiler bug.\n> \n>> f8efb3be (\"libcamera: software_isp: fix AWB algorithm not to increase luminance\") makes the luminance not to change\n>>      due to the colour gains applied. This improves the image a bit (makes it a bit less bright), but the effect\n>>      is relatively small - within 10% depending on the light and the objects in the particular image. This change\n>>      increases the load on CPU, so I am not sure if this image improvement is worth this higher CPU utilization.\n> \n> Interesting since we have r g b lookup tables already the extra CPU load is only\n> in generating the green table\n> once per frame, the load of that should be negligible.\n> \n> And with the separate gamma lookup we can then also give the gamma-lookup table a bit\n> more precision giving it 1024 entries. The impact of this on performance should be\n> minimal.\n\nOK. Then we could take this commit into the patch set. Having 1024 entries in the gamma-lookup table\nwould be a nice addition too.\n\n>> f5906f15 (\"[DNI] libcamera: software_isp: print colour gains to the log\") prints the colour gains to the console\n>>      so that one could see the effect of the previous patch - without it the green gain would always be 256, and the\n>>      other two gains would increase in the same proportion. E.g. \"gains R/G/B = 253/240/406\" would become\n>>      \"gains R/G/B = 270/256/433\" without commit f8efb3be.\n> \n> I think we probably want something like this (but then in the IPA once the AWB calculations\n> have moved there) and then using a log-level of debug. Doing a debug log once per frame\n> should have no performance impact when debug logging is disabled.\n\nOK\n\nThanks,\nAndrey\n\n> Regards,\n> \n> Hans\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 D9405C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Dec 2023 10:34:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 331C062B3D;\n\tMon, 18 Dec 2023 11:34:17 +0100 (CET)","from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 865F062B2E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 11:34:15 +0100 (CET)","by mail-wm1-x32d.google.com with SMTP id\n\t5b1f17b1804b1-40c6ea99429so25674115e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 02:34:15 -0800 (PST)","from [192.168.118.20] ([87.116.165.108])\n\tby smtp.gmail.com with ESMTPSA id\n\tay35-20020a05600c1e2300b0040b2b38a1fasm41882783wmb.4.2023.12.18.02.34.14\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 18 Dec 2023 02:34:14 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702895657;\n\tbh=NGPsT/xEVVZqwHS3YGsvUA6sub2qbK0pbKPuyJ/t0ag=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=s8FEavpIl9ULcgxYyAQWc8fOqynMNZBG4ARmuS8XsahbTb0AOS4HFTUmd8C7Bhrep\n\t5F2J7o7dNS3f230RI2I/tlQ8TbNWZ8jPDPuapOo7QfqoUW97bttJ6qgbaBtw0xC5KU\n\tjj/MSxxXo+FHiyqEPb4DmOCQnbAvWX2Bx3VkeGjGHRPUPRaHdSlcBQnzJLrL7hQwNu\n\tN8oUx7MyTsRjfgY9suvJ+xPbXUEqYK4fLqi7HrIa4ZwPYqP93dn2XsV9es85U8diDC\n\tAyTnt60BOmz/oXZTLC1uN6Di3Bi0I6JdD5Y8a+65VKDpkVxo+j4y4hkSgcz5h987+7\n\t9kVJhD99443Ww==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1702895655; x=1703500455;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:from:content-language\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=b0H6WtPTIOQC0+CZTmwWlj4ZQuqd0dIACjwsoLYVIqc=;\n\tb=xSMlkxJc6kRcvjAapslU9p9ddrXxXl+kwLGymEHvTqoyAxrPzKVaB59TUutWuXjX1S\n\tNmvR7jBZ2iGndjMLZgfEnGfLnQxvG/qhCuFgUfMAimL22vckWM8f+bwrMpXsRiZr1K4S\n\t2cR9MOKusInm30KiKcfcDJ+WENyXG96EhdsFLtHZTZ2PUHRWTIfJPnufGZsvfkveUchY\n\tgsZ1g689knz6tCTJil9H39E8UzJy4rGTxYz2voVH6Lg777J4qUk9Nq6FfB3xn3emRATX\n\tRvLQNl5n1Xjilb2OFNOlQvNAkd0gPduTLBQIY8aYC36l8531vswotrjyOAVNdIGpSPw/\n\tUYDw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=linaro.org\n\theader.i=@linaro.org header.b=\"xSMlkxJc\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702895655; x=1703500455;\n\th=content-transfer-encoding:in-reply-to:from:content-language\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=b0H6WtPTIOQC0+CZTmwWlj4ZQuqd0dIACjwsoLYVIqc=;\n\tb=uN/T/Qa6OtEdff2HByET1B/kCt8ajPNq1fzX+X490TCSIyvFCFlpgmjkvKGOOvq2L3\n\tqTRTViJ8LFGvjF04UO5P1Ss3CMg9Q80IrlIC+5yEj2TCquV/sQ58zAOOayBAjwnURRbI\n\tPW0AVTjgnlkJyxHVVS0S0cp+LUPXwJN095b1nbn7C7oEWiLrsSvpQOCN7kUcZdxynjy4\n\tAA+cH6hA7SEefwqWjCi29VS5XSSVQAuOGlh8pkqVtEG9WJIVnPTWePVy2n8a/ToCHOo4\n\tUEDZKhYRL+bTlnalbDC1QptBL9KCzUI+khrf+64OS+5CwAK6M3iiPGt4JZ/Bac0tfcsv\n\tfiRg==","X-Gm-Message-State":"AOJu0YwDI99/qUw3EjHe/Aq4ydMIEp3fqDs8PZBx0itkYqBGMunW3jmN\n\t698SRHnFU3DG8roZNBP8pJ7/VA==","X-Google-Smtp-Source":"AGHT+IGXwpy4DyoDhtB+dPW8ifOjgA3tT+91Faonyx7NyjI81kH626pGdHUOKNM54xqDvjQ4IamIsw==","X-Received":"by 2002:a05:600c:1e20:b0:40c:3daf:52f4 with SMTP id\n\tay32-20020a05600c1e2000b0040c3daf52f4mr5750080wmb.185.1702895655059; \n\tMon, 18 Dec 2023 02:34:15 -0800 (PST)","Message-ID":"<e63c527b-ab9c-4fc8-a053-be38f0895064@linaro.org>","Date":"Mon, 18 Dec 2023 13:34:13 +0300","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Hans de Goede <hdegoede@redhat.com>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<1a871ef7-fdbb-45e7-909d-0c6b17264f11@linaro.org>\n\t<b5312bb7-a6d1-472e-8e74-3ab6a8ec0b3e@redhat.com>","Content-Language":"en-US","In-Reply-To":"<b5312bb7-a6d1-472e-8e74-3ab6a8ec0b3e@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Andrey Konovalov via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Andrey Konovalov <andrey.konovalov@linaro.org>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28343,"web_url":"https://patchwork.libcamera.org/comment/28343/","msgid":"<9c75ff16-cd1e-4580-9215-99ff63bac574@redhat.com>","date":"2023-12-18T10:52:33","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/people/102/","name":"Hans de Goede","email":"hdegoede@redhat.com"},"content":"Hi Andrey,\n\nOn 12/18/23 11:34, Andrey Konovalov wrote:\n> Hi Hans,\n> \n> On 18.12.2023 13:05, Hans de Goede wrote:\n>> Hi Andrey,\n>>\n>> On 12/17/23 21:23, Andrey Konovalov wrote:\n>>> Hi All,\n>>>\n>>> On 14.12.2023 18:16, Bryan O'Donoghue wrote:\n>>>> On 14/12/2023 14:47, Hans de Goede wrote:\n>>>>> Hi Bryan,\n>>>>>\n>>>>> On 12/14/23 15:40, Bryan O'Donoghue wrote:\n>>>>>> On 14/12/2023 12:13, Hans de Goede wrote:\n>>>>>>> Hi All,\n>>>>>>>\n>>>>>>> Here is a new, now non RFC because believed to be mostly ready\n>>>>>>> for merging, version of the Software ISP work.\n>>>>>>\n>>>>>>\n>>>>>> Thanks for sending this out.\n>>>>>\n>>>>> You're welcome.\n>>>>>\n>>>>>> One thing I'm noticing when compiling is a load of warnings about undocumented variables.\n>>>>> <snip>\n>>>>>> Not sure if you or Andrey see that yourselves but one to be aware of for V2.\n>>>>>\n>>>>> Quoting from the cover-letter:\n>>>>>\n>>>>> \"\"\"\n>>>>> Known open items:\n>>>>> - The AWB red/blue gain calculations needs to be moved to the IPA\n>>>>>     and IPA then needs to pass a DebayerParams struct back to the\n>>>>>     SwIsp\n>>>>> - Properly document all methods / attributed for doxygen\n>>>>> \"\"\"\n>>>>>\n>>>>> So this is a known issue.\n>>>>>\n>>>>> BTW I'm currently working on adding support for 10bpp unpacked\n>>>>> bayer and while working on this I noticed a small bug in the swstats\n>>>>> code, you may want to squash in this fix:\n>>>>\n>>>> Applied that change.\n>>>>\n>>>> I'm comparing to your earlier branch\n>>>>\n>>>> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n>>>> Author: Hans de Goede <hdegoede@redhat.com>\n>>>> Date:   Thu Nov 30 20:13:29 2023 +0100\n>>>>\n>>>>\n>>>> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n>>>>\n>>>> Old branch:\n>>>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-image.jpg\n>>>>\n>>>> New branch:\n>>>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-posted-image.jpg\n>>>>\n>>>> Seems to be eating alot more cycles and producing a more pinkish result on my hw.\n>>>\n>>> RE the more pinkish result.\n>>>\n>>> This is a bug in swstats_cpu.cpp, which in fact broke both AWB and AGC (the exposure/gain could only increase, and\n>>> never go back down).\n>>>\n>>> I've pushed a branch [1] with the three commits on top of SoftwareISP-v04-hans1 by Hans:\n>>>\n>>> 6baa50e7 (\"libcamera: software_isp: fix statistics calculations\") is the fix to the \"pinkish\" image issue.\n>>>      Needs to be included into the patch set.\n>>\n>> For those reading along, this is the fix:\n>>\n>> --- a/src/libcamera/software_isp/swstats_cpu.cpp\n>> +++ b/src/libcamera/software_isp/swstats_cpu.cpp\n>> @@ -63,7 +63,7 @@ statsBayer10P(const int width, const uint8_t *src0, const uint8_t *src1, bool bg\n>>               r  = src1[x];\n>>               g2 = src1[x + 1];\n>>           }\n>> -        g = g + g2 / 2;\n>> +        g = ((unsigned int)g + g2) / 2;\n>>             sumR += r;\n>>           sumG += g;\n>>\n>>\n>> Hmm, that smells like a compiler bug TBH. g and g2 are both uint8_t, so they have a range\n>> of 0-255 so C/C++ integer promotion says these should both be promoted to an int\n>> (0-255 fits in in an int) before doing the + operation:\n>>\n>> https://en.cppreference.com/w/cpp/language/implicit_conversion#Integral_promotion\n> \n> Ah OK, I've missed that integral promotion thing. Then the fix would be just adding the\n> missing brackets (not tested):\n> \n>  -        g = g + g2 / 2;\n>  +        g = (g + g2) / 2;\n\nAh I missed that you also added the brackets / parenthesis. Yeah the missing parenthesis\nare my bad, I'll squash a fix into the original commit for this.\n\nThank you for catching this.\n\n>> So \"g + g2 / 2\" should be done using all int values (so no overflow) and then\n>> the resulting int which is in the 0-255 range again gets stored in uint8_t g, which just\n>> takes the low 8 bits which should contain the right value.\n>>\n>> I guess the compiler may be changing this to:\n>>\n>>     g += g2;\n>>     g /= 2;\n>>\n>> but that is wrong and a compiler bug. With all that said I'm fine with adding the explicit\n>> cast to (unsigned int), but unless I am missing something here this really does feel\n>> like a compiler bug.\n>>\n>>> f8efb3be (\"libcamera: software_isp: fix AWB algorithm not to increase luminance\") makes the luminance not to change\n>>>      due to the colour gains applied. This improves the image a bit (makes it a bit less bright), but the effect\n>>>      is relatively small - within 10% depending on the light and the objects in the particular image. This change\n>>>      increases the load on CPU, so I am not sure if this image improvement is worth this higher CPU utilization.\n>>\n>> Interesting since we have r g b lookup tables already the extra CPU load is only\n>> in generating the green table\n>> once per frame, the load of that should be negligible.\n>>\n>> And with the separate gamma lookup we can then also give the gamma-lookup table a bit\n>> more precision giving it 1024 entries. The impact of this on performance should be\n>> minimal.\n> \n> OK. Then we could take this commit into the patch set. Having 1024 entries in the gamma-lookup table\n> would be a nice addition too.\n\nAgreed. I think it would be best to squash this change (including making the gamma table 1024 entries)\ninto the original commit adding debayer_cpu.cpp is that ok with you ?\n\nRegards,\n\nHans","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 EDEEBC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Dec 2023 10:52:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2F94362B40;\n\tMon, 18 Dec 2023 11:52:41 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7C0DF62B2E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 11:52:39 +0100 (CET)","from mail-ed1-f72.google.com (mail-ed1-f72.google.com\n\t[209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-208-5yf0vHdjMtyukeyddSqhZA-1; Mon, 18 Dec 2023 05:52:36 -0500","by mail-ed1-f72.google.com with SMTP id\n\t4fb4d7f45d1cf-551cf4a79efso1213056a12.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 02:52:36 -0800 (PST)","from [10.40.98.142] ([78.108.130.194])\n\tby smtp.gmail.com with ESMTPSA id\n\teg33-20020a05640228a100b0055334e2ffaesm1416220edb.74.2023.12.18.02.52.34\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 18 Dec 2023 02:52:34 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702896761;\n\tbh=n5D0Tu9+ChQVknnwe13w+yurd7NVtMwzW6SDYhd5nyo=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=jtRhjKSsXmpBjFxCCfzx3uteYxddUm8tl3egls/f5CyYk3tRQ+2hOP1iCmp3ACAve\n\tgYVA8ffZyk6xLCcOrH6vorsNrXhohgEVIz4lfGixnh+h1MJ5HVLtCi/YBAdc1KWDIx\n\tAjFn5lqrzyEeCFbQMiD0Q7fi6cy93Bc5TXJH/LWt8EIKh2ZUdG3jGYGGuMR8p2yqh9\n\t4Jqwz9uh/z1X/RFervlvvCRHYi5voox1E/uoXYgjqniCHUIZ0pgWwCG5n4Nq7qvIAQ\n\tVyRKSeyuaGP63qV5AdGFD65Fw2XIdcBcW7tZsEum5TosPxKcmd5dinnqqo+LrRKK3g\n\tZYeeD0wvNWtIg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1702896758;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=8cJ2vnuRBKJ7tlf7g1oErWGPPaQTheCFP80gqNHQD6Y=;\n\tb=GJ/GNSaXmM+c0PgPMpv6Ctx1aitqW1143xf+1VM1d2hKV7Lv49aV0Pgg+/5rDmWYV13YRe\n\tNddIssz+FTuDfVU6supg7yYDMmC78kVuThLitQug7cQfAWjjdM+lBnnpzoYn0sxZdj/ld7\n\ta/o2HYv4pbg78B23IbJVrEmo+38if/A="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"GJ/GNSaX\"; \n\tdkim-atps=neutral","X-MC-Unique":"5yf0vHdjMtyukeyddSqhZA-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702896755; x=1703501555;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=8cJ2vnuRBKJ7tlf7g1oErWGPPaQTheCFP80gqNHQD6Y=;\n\tb=fYedE/BSDvBFzGb1xrRGXTYSKgUYLtFCAvhHIrLzzwYDITah1AmWI33qtCD667lTXj\n\t0xN7Rd5w7kED7lb1g5WQXD9vTyUxL8uy0xF2V1Oz6mS4MlrJiaGGg28qsMQsrbGooAr3\n\t07mQv0ZyQOJhd/ttSL5eDmN6GWF06KsZoywzh0z85joRXehKPtbw8JgWTn5bi0JLFSVl\n\tHSxtKTOX7nsoCof/J6XHjYIsUxQ/PAx4k9AUDYZzxcSYoZ07db2amdqOsPhDByEHAQLi\n\tr+7sTHVXb4UMKOzUrXTT7wZT5KO+exfX6J8z4KU8sijUKiMrULlGk6V6neptS0lD3pkG\n\tsnBw==","X-Gm-Message-State":"AOJu0YxCU93oZaw5qJC/OJH1yhAUnJjuRPAyz6bvsDsiuhI/E+cGDS6P\n\toPUY2g3Ik0kjrtaU3aX1a1MWdP7+lFhnS+iO2I/RjhWgYJ6//tXk6UcInmlnUrOOHPJZRn7dDXW\n\tgh5miBkL35tPoQLUDcyNKnYRR97LVyEIIfg==","X-Received":["by 2002:a50:c2c9:0:b0:552:ded0:9a7d with SMTP id\n\tu9-20020a50c2c9000000b00552ded09a7dmr1840917edf.63.1702896755714; \n\tMon, 18 Dec 2023 02:52:35 -0800 (PST)","by 2002:a50:c2c9:0:b0:552:ded0:9a7d with SMTP id\n\tu9-20020a50c2c9000000b00552ded09a7dmr1840904edf.63.1702896755343; \n\tMon, 18 Dec 2023 02:52:35 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IEY4aot829oZTSwHl1IWkrka/5JQpqUnwBVIifdGaWPomR7li+gqPJ0B8Bkby9WYfo7+cPeIg==","Message-ID":"<9c75ff16-cd1e-4580-9215-99ff63bac574@redhat.com>","Date":"Mon, 18 Dec 2023 11:52:33 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Andrey Konovalov <andrey.konovalov@linaro.org>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<1a871ef7-fdbb-45e7-909d-0c6b17264f11@linaro.org>\n\t<b5312bb7-a6d1-472e-8e74-3ab6a8ec0b3e@redhat.com>\n\t<e63c527b-ab9c-4fc8-a053-be38f0895064@linaro.org>","In-Reply-To":"<e63c527b-ab9c-4fc8-a053-be38f0895064@linaro.org>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Hans de Goede <hdegoede@redhat.com>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28344,"web_url":"https://patchwork.libcamera.org/comment/28344/","msgid":"<38a24b19-1d53-4964-a023-90630c634698@linaro.org>","date":"2023-12-18T11:28:43","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":25,"url":"https://patchwork.libcamera.org/api/people/25/","name":"Andrey Konovalov","email":"andrey.konovalov@linaro.org"},"content":"Hi Hans,\n\nOn 18.12.2023 13:52, Hans de Goede wrote:\n> Hi Andrey,\n> \n> On 12/18/23 11:34, Andrey Konovalov wrote:\n>> Hi Hans,\n>>\n>> On 18.12.2023 13:05, Hans de Goede wrote:\n>>> Hi Andrey,\n>>>\n>>> On 12/17/23 21:23, Andrey Konovalov wrote:\n>>>> Hi All,\n>>>>\n>>>> On 14.12.2023 18:16, Bryan O'Donoghue wrote:\n>>>>> On 14/12/2023 14:47, Hans de Goede wrote:\n>>>>>> Hi Bryan,\n>>>>>>\n>>>>>> On 12/14/23 15:40, Bryan O'Donoghue wrote:\n>>>>>>> On 14/12/2023 12:13, Hans de Goede wrote:\n>>>>>>>> Hi All,\n>>>>>>>>\n>>>>>>>> Here is a new, now non RFC because believed to be mostly ready\n>>>>>>>> for merging, version of the Software ISP work.\n>>>>>>>\n>>>>>>>\n>>>>>>> Thanks for sending this out.\n>>>>>>\n>>>>>> You're welcome.\n>>>>>>\n>>>>>>> One thing I'm noticing when compiling is a load of warnings about undocumented variables.\n>>>>>> <snip>\n>>>>>>> Not sure if you or Andrey see that yourselves but one to be aware of for V2.\n>>>>>>\n>>>>>> Quoting from the cover-letter:\n>>>>>>\n>>>>>> \"\"\"\n>>>>>> Known open items:\n>>>>>> - The AWB red/blue gain calculations needs to be moved to the IPA\n>>>>>>      and IPA then needs to pass a DebayerParams struct back to the\n>>>>>>      SwIsp\n>>>>>> - Properly document all methods / attributed for doxygen\n>>>>>> \"\"\"\n>>>>>>\n>>>>>> So this is a known issue.\n>>>>>>\n>>>>>> BTW I'm currently working on adding support for 10bpp unpacked\n>>>>>> bayer and while working on this I noticed a small bug in the swstats\n>>>>>> code, you may want to squash in this fix:\n>>>>>\n>>>>> Applied that change.\n>>>>>\n>>>>> I'm comparing to your earlier branch\n>>>>>\n>>>>> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n>>>>> Author: Hans de Goede <hdegoede@redhat.com>\n>>>>> Date:   Thu Nov 30 20:13:29 2023 +0100\n>>>>>\n>>>>>\n>>>>> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm getting 18fps @ 100%.\n>>>>>\n>>>>> Old branch:\n>>>>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-image.jpg\n>>>>>\n>>>>> New branch:\n>>>>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-posted-image.jpg\n>>>>>\n>>>>> Seems to be eating alot more cycles and producing a more pinkish result on my hw.\n>>>>\n>>>> RE the more pinkish result.\n>>>>\n>>>> This is a bug in swstats_cpu.cpp, which in fact broke both AWB and AGC (the exposure/gain could only increase, and\n>>>> never go back down).\n>>>>\n>>>> I've pushed a branch [1] with the three commits on top of SoftwareISP-v04-hans1 by Hans:\n>>>>\n>>>> 6baa50e7 (\"libcamera: software_isp: fix statistics calculations\") is the fix to the \"pinkish\" image issue.\n>>>>       Needs to be included into the patch set.\n>>>\n>>> For those reading along, this is the fix:\n>>>\n>>> --- a/src/libcamera/software_isp/swstats_cpu.cpp\n>>> +++ b/src/libcamera/software_isp/swstats_cpu.cpp\n>>> @@ -63,7 +63,7 @@ statsBayer10P(const int width, const uint8_t *src0, const uint8_t *src1, bool bg\n>>>                r  = src1[x];\n>>>                g2 = src1[x + 1];\n>>>            }\n>>> -        g = g + g2 / 2;\n>>> +        g = ((unsigned int)g + g2) / 2;\n>>>              sumR += r;\n>>>            sumG += g;\n>>>\n>>>\n>>> Hmm, that smells like a compiler bug TBH. g and g2 are both uint8_t, so they have a range\n>>> of 0-255 so C/C++ integer promotion says these should both be promoted to an int\n>>> (0-255 fits in in an int) before doing the + operation:\n>>>\n>>> https://en.cppreference.com/w/cpp/language/implicit_conversion#Integral_promotion\n>>\n>> Ah OK, I've missed that integral promotion thing. Then the fix would be just adding the\n>> missing brackets (not tested):\n>>\n>>   -        g = g + g2 / 2;\n>>   +        g = (g + g2) / 2;\n> \n> Ah I missed that you also added the brackets / parenthesis. Yeah the missing parenthesis\n> are my bad, I'll squash a fix into the original commit for this.\n> \n> Thank you for catching this.\n> \n>>> So \"g + g2 / 2\" should be done using all int values (so no overflow) and then\n>>> the resulting int which is in the 0-255 range again gets stored in uint8_t g, which just\n>>> takes the low 8 bits which should contain the right value.\n>>>\n>>> I guess the compiler may be changing this to:\n>>>\n>>>      g += g2;\n>>>      g /= 2;\n>>>\n>>> but that is wrong and a compiler bug. With all that said I'm fine with adding the explicit\n>>> cast to (unsigned int), but unless I am missing something here this really does feel\n>>> like a compiler bug.\n>>>\n>>>> f8efb3be (\"libcamera: software_isp: fix AWB algorithm not to increase luminance\") makes the luminance not to change\n>>>>       due to the colour gains applied. This improves the image a bit (makes it a bit less bright), but the effect\n>>>>       is relatively small - within 10% depending on the light and the objects in the particular image. This change\n>>>>       increases the load on CPU, so I am not sure if this image improvement is worth this higher CPU utilization.\n>>>\n>>> Interesting since we have r g b lookup tables already the extra CPU load is only\n>>> in generating the green table\n>>> once per frame, the load of that should be negligible.\n>>>\n>>> And with the separate gamma lookup we can then also give the gamma-lookup table a bit\n>>> more precision giving it 1024 entries. The impact of this on performance should be\n>>> minimal.\n>>\n>> OK. Then we could take this commit into the patch set. Having 1024 entries in the gamma-lookup table\n>> would be a nice addition too.\n> \n> Agreed. I think it would be best to squash this change (including making the gamma table 1024 entries)\n> into the original commit adding debayer_cpu.cpp is that ok with you ?\n\nYes, I think squashing this change (including making the gamma table 1024 entries) and the missing parenthesis fix\ninto the original commit is the way to go.\n\nThanks,\nAndrey\n\n> Regards,\n> \n> Hans\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 1AD5AC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Dec 2023 11:28:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 700F362B40;\n\tMon, 18 Dec 2023 12:28:47 +0100 (CET)","from mail-wr1-x436.google.com (mail-wr1-x436.google.com\n\t[IPv6:2a00:1450:4864:20::436])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0C52D61D93\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 12:28:46 +0100 (CET)","by mail-wr1-x436.google.com with SMTP id\n\tffacd0b85a97d-336437ae847so2758347f8f.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 03:28:45 -0800 (PST)","from [192.168.118.20] ([87.116.165.108])\n\tby smtp.gmail.com with ESMTPSA id\n\ts5-20020a05600c384500b0040b632f31d2sm42427055wmr.5.2023.12.18.03.28.44\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 18 Dec 2023 03:28:44 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702898927;\n\tbh=OkuzMERK4Cr246HCjdkJQgOuQg2JP/w3wfeaxOJ1OwM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=CXYr4rALdrxlNAlxWbya3wfhDS1h09l4PbnPtk2H/iRrPLBP8g0Vf9ZlOkIgfRCoj\n\toRRxAhYr67w1tqun7PhKZo8r3qV0Vs9c1yh6f3znpJLNDd2XWEb75lSgXFG100YXQI\n\ti/S5FgGpxFwtOJ8b5DLZblx/7TVmjg4ng5d5QpStrTao96sOaWmMi+CeFZW8zzThw5\n\tZ685ctchV07nzHGvV0oTmhqkuYP9Wz96nH9iNtqLD+9QD5ErNPXBbd0W+jQsgMu9Fm\n\twrN9nMjpjWwUzwAWKffkmpfALP035H+ndBcjehx79M2sZ2LSM0ysxTQMbqojs2jAfF\n\tleIY5dqEfjULw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1702898925; x=1703503725;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=QAKi/bSs/9G6jhMu6lbpYO3Za9xd10uJI1HTT+TSHXg=;\n\tb=NepOtMGK6oodzOB5sXfNOBX05IjiVFlFHnd7RNXK3nOC/I2Enb1YJeevveabDdW0+2\n\t41+Slh1E+PWes5LfgyYLUiL3EgUoNyirtFgkNqeZY7MWwO6MsY2nS+i4N7hLbYx454iZ\n\tPrmvysyAlnZ1G4rkCO3iTcqVpv3LgBcF3Oak+smyXPtI8+ggMDSU+86WYlMWP59Zmfe/\n\t21W2BaM90j9rq18l/SEWr+xooQ8WCaVtjnqPNJTZUEvymSM9msTTW0QlmcBrMgCe/d//\n\t9k/PVJESTbJT5XSKrU5WsP2JzViVXR2PIFGxRnUMlofBhild5WDvzvZ4fv7rNEgzyf4d\n\tQwIg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=linaro.org\n\theader.i=@linaro.org header.b=\"NepOtMGK\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702898925; x=1703503725;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=QAKi/bSs/9G6jhMu6lbpYO3Za9xd10uJI1HTT+TSHXg=;\n\tb=uUl8Tm4xf8CoW3oxNGEWhYdG3fJFoyWFenvYwzWBxJmlqTMuZ3JnWHlh+f652hQm8/\n\tEHeDNlPoWbpBH/aSTjacMu6/WzDyH6qWdsHgT4OOLrGT1miFlC9UkPo74X86Di6eT0lz\n\tceTDCAeJzhT8Bx/jaqQjSOdZlecUIhVhWulzpEwpI7xsJNO2cceXzO4HT36iXRrHbzdz\n\tXJEWs5/ZEGEqLfzLXVW2yrZ60Aj+J1RFfdSsJ+IuX47V7fv3WDM7PyuzfhPmxzwQDian\n\tfYdN+7EfzQ5TzFK/36eWHjDjH+C2Ges4zT7pDAkM1IjiOsP9+WlimYwxYd2HugJOIcS2\n\tGdEg==","X-Gm-Message-State":"AOJu0YweTPmluJNPj+t6FViY0MKU99Cc+vODOYlomJZ/UJwoRYVnVD6C\n\tjeISHSDkIoKehBpgG81PSXBtnDF19Y6bvQO8XZ0Xag==","X-Google-Smtp-Source":"AGHT+IEFKWIuS0QBKBtVH1a8PwaMF4tGsCZ5CykVfL/MzzdDnbq7dhQKK3t7BdV9l75TeQY6nDF74A==","X-Received":"by 2002:a05:600c:4f4d:b0:40b:5e21:dd34 with SMTP id\n\tm13-20020a05600c4f4d00b0040b5e21dd34mr9509617wmq.98.1702898924989; \n\tMon, 18 Dec 2023 03:28:44 -0800 (PST)","Message-ID":"<38a24b19-1d53-4964-a023-90630c634698@linaro.org>","Date":"Mon, 18 Dec 2023 14:28:43 +0300","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Content-Language":"en-US","To":"Hans de Goede <hdegoede@redhat.com>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<1a871ef7-fdbb-45e7-909d-0c6b17264f11@linaro.org>\n\t<b5312bb7-a6d1-472e-8e74-3ab6a8ec0b3e@redhat.com>\n\t<e63c527b-ab9c-4fc8-a053-be38f0895064@linaro.org>\n\t<9c75ff16-cd1e-4580-9215-99ff63bac574@redhat.com>","In-Reply-To":"<9c75ff16-cd1e-4580-9215-99ff63bac574@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Andrey Konovalov via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Andrey Konovalov <andrey.konovalov@linaro.org>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28345,"web_url":"https://patchwork.libcamera.org/comment/28345/","msgid":"<218d11b8-ebf3-4922-addf-8338ab28bdaa@linaro.org>","date":"2023-12-18T12:20:16","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 17/12/2023 20:23, Andrey Konovalov wrote:\n> Hi All,\n> \n> On 14.12.2023 18:16, Bryan O'Donoghue wrote:\n>> On 14/12/2023 14:47, Hans de Goede wrote:\n>>> Hi Bryan,\n>>>\n>>> On 12/14/23 15:40, Bryan O'Donoghue wrote:\n>>>> On 14/12/2023 12:13, Hans de Goede wrote:\n>>>>> Hi All,\n>>>>>\n>>>>> Here is a new, now non RFC because believed to be mostly ready\n>>>>> for merging, version of the Software ISP work.\n>>>>\n>>>>\n>>>> Thanks for sending this out.\n>>>\n>>> You're welcome.\n>>>\n>>>> One thing I'm noticing when compiling is a load of warnings about \n>>>> undocumented variables.\n>>> <snip>\n>>>> Not sure if you or Andrey see that yourselves but one to be aware of \n>>>> for V2.\n>>>\n>>> Quoting from the cover-letter:\n>>>\n>>> \"\"\"\n>>> Known open items:\n>>> - The AWB red/blue gain calculations needs to be moved to the IPA\n>>>    and IPA then needs to pass a DebayerParams struct back to the\n>>>    SwIsp\n>>> - Properly document all methods / attributed for doxygen\n>>> \"\"\"\n>>>\n>>> So this is a known issue.\n>>>\n>>> BTW I'm currently working on adding support for 10bpp unpacked\n>>> bayer and while working on this I noticed a small bug in the swstats\n>>> code, you may want to squash in this fix:\n>>\n>> Applied that change.\n>>\n>> I'm comparing to your earlier branch\n>>\n>> commit ae92fa44991ded151c63d5d202efdacc9d640aff (HEAD -> \n>> SoftwareISP-v01-hans1, softisp/SoftwareISP-v01-hans1)\n>> Author: Hans de Goede <hdegoede@redhat.com>\n>> Date:   Thu Nov 30 20:13:29 2023 +0100\n>>\n>>\n>> On the earlier branch I get 30fps @ 68% CPU usage. On this branch I'm \n>> getting 18fps @ 100%.\n>>\n>> Old branch:\n>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-image.jpg\n>>\n>> New branch:\n>> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/blob/bod/SoftwareISP-v04-review/v1-posted-image.jpg\n>>\n>> Seems to be eating alot more cycles and producing a more pinkish \n>> result on my hw.\n> \n> RE the more pinkish result.\n> \n> This is a bug in swstats_cpu.cpp, which in fact broke both AWB and AGC \n> (the exposure/gain could only increase, and\n> never go back down).\n> \n> I've pushed a branch [1] with the three commits on top of \n> SoftwareISP-v04-hans1 by Hans:\n> \n> 6baa50e7 (\"libcamera: software_isp: fix statistics calculations\") is the \n> fix to the \"pinkish\" image issue.\n>      Needs to be included into the patch set.\n> f8efb3be (\"libcamera: software_isp: fix AWB algorithm not to increase \n> luminance\") makes the luminance not to change\n>      due to the colour gains applied. This improves the image a bit \n> (makes it a bit less bright), but the effect\n>      is relatively small - within 10% depending on the light and the \n> objects in the particular image. This change\n>      increases the load on CPU, so I am not sure if this image \n> improvement is worth this higher CPU utilization.\n> f5906f15 (\"[DNI] libcamera: software_isp: print colour gains to the \n> log\") prints the colour gains to the console\n>      so that one could see the effect of the previous patch - without it \n> the green gain would always be 256, and the\n>      other two gains would increase in the same proportion. E.g. \"gains \n> R/G/B = 253/240/406\" would become\n>      \"gains R/G/B = 270/256/433\" without commit f8efb3be.\n> \n> Thanks,\n> Andrey\n> \n> [1] \n> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/SoftwareISP-v04-hans1--ynk1\n\n\nYep, that branch fixes for me.\n\nBTW just to answer the earlier q from Hans, Bayer order is GRBG - \ndriver/media/i2c/ov5675.c\n\n---\nbod","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3C2BFC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Dec 2023 12:20:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8A9E661D93;\n\tMon, 18 Dec 2023 13:20:20 +0100 (CET)","from mail-wm1-x336.google.com (mail-wm1-x336.google.com\n\t[IPv6:2a00:1450:4864:20::336])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 013A661D93\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 13:20:18 +0100 (CET)","by mail-wm1-x336.google.com with SMTP id\n\t5b1f17b1804b1-40c29f7b068so32202435e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 04:20:18 -0800 (PST)","from [192.168.100.113] ([37.228.218.3])\n\tby smtp.gmail.com with ESMTPSA id\n\tb16-20020a05600c4e1000b0040c310abc4bsm42139259wmq.43.2023.12.18.04.20.16\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 18 Dec 2023 04:20:17 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702902020;\n\tbh=5euXwsYYBT9dyYRoQmtt8HQ29Fq1QZAZ/r2oTz/rbcY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=BCGEOo1Gdq7J5Y69MfgmBNT8s8zb1pCyQiMtw5ibWc5t3Awl9CmcLFIEhKbHiV9Qb\n\tQ+YNw7h1AsCjqpbpjsXEmbZ3a7oFLwhkWdaw0lgo2V9CY5qvUgfwkpA72Jp1jXZRF4\n\t5v42PctNCY2KW8LODsK47bv5c1Rgoq74wcS3XVtM0WcQlakb/gJF6ipmlyhi0uYGD5\n\t7cJkymRpSgkgeUFBoMdty91VV8gwbGicoB5TPByTwy0DYKAAESj05I7XuTFzH8hauH\n\t2a+2xx94QaJfbDlhUzZsd9ZZACG1QS30MeT3qEAp+zbXt31r/nqHBmu7LUofPP5fOX\n\tfCFOABs2lmCDQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1702902018; x=1703506818;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=Zp7YnHJqPd7dxTwykDjuxs8XQ/jAwd6EBq+/TLxamLk=;\n\tb=tOjcWeFSZsl6klwxMVq6Npb/Gk5+qz/RZlff9xETvjIkfNbZpj7t/ZFvrzMuE0FcdA\n\tn0olmOI8fEzpES6G20K4zsB8GfCfMfazBn8W2X+ooIFXt4eviGRCHPn9FVZMMGGb6XoN\n\tjkHO//k5WI5UJV8faFwe1ldsisAAtNuH2BkBGpeyhsvs10ZLL5xpFiAnfrN8se+NM3v+\n\tP7+BIrI52cucCH0/ZqIm8RvgFMY4MstkGo24alzj1V2OldrXOIAUODlbYaU4tosj7Cn4\n\tvX8KvDkSWHKpBZhCxWJdDamVm3Ez2cJPzly54c7Tx2m/46g9whn5dLQDtC5zT08FGX+9\n\txtgw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=linaro.org\n\theader.i=@linaro.org header.b=\"tOjcWeFS\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702902018; x=1703506818;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=Zp7YnHJqPd7dxTwykDjuxs8XQ/jAwd6EBq+/TLxamLk=;\n\tb=B+CSoH/bDS2n1YJ+xAMRyNz1CV51W3cdb+zkwGTHqNxFKJ9Oz8PrOMZ2f9GdCQ1w0S\n\tDs28n8Zzt6uHpJWXW6rKaQfnKdKsw5/sliNIhw8pSBbQYLQQi+zdec+DQS/D3RG5wbCP\n\tkTJO8v2LiPQBnqFCZJ28gVNIyTLdr4qr+fwcTT1+/zUwGbgqFvqZq3pzFIZtD5/y3pj9\n\tmA6quLsGszIfvrSPaWkGc+3wKnJha2KGzBG2M5uou8ggoBSGYH+xO8FAR57aOZsPlvK3\n\tiH+SjqL3hh6YcOOH7MLFkCXZicETlMr3kk+fNKQX4pq/qSDEhxJqunrKRqsyBnoXJvWD\n\tamLQ==","X-Gm-Message-State":"AOJu0Yyef8PNbV8ONbDKJBwRVWVO4bbOBFe1aqem9ZdwbEMh19Er4lBN\n\td7UuINRuhxV187i3zEe2tl2hEg==","X-Google-Smtp-Source":"AGHT+IF2NnosNUwqYDsjN4twtWpCh8F6HJIVVFrDYNDVMnPohvD1prtTbaKu7E29p2briX3Uh521bA==","X-Received":"by 2002:a05:600c:13ca:b0:40c:3bb2:ca5f with SMTP id\n\te10-20020a05600c13ca00b0040c3bb2ca5fmr8049193wmg.5.1702902018038; \n\tMon, 18 Dec 2023 04:20:18 -0800 (PST)","Message-ID":"<218d11b8-ebf3-4922-addf-8338ab28bdaa@linaro.org>","Date":"Mon, 18 Dec 2023 12:20:16 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Content-Language":"en-US","To":"Andrey Konovalov <andrey.konovalov@linaro.org>,\n\tHans de Goede <hdegoede@redhat.com>, libcamera-devel@lists.libcamera.org","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<1a871ef7-fdbb-45e7-909d-0c6b17264f11@linaro.org>","In-Reply-To":"<1a871ef7-fdbb-45e7-909d-0c6b17264f11@linaro.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Bryan O'Donoghue via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28346,"web_url":"https://patchwork.libcamera.org/comment/28346/","msgid":"<fe6cd733-4e54-4efd-90b4-f138d4bb2df6@redhat.com>","date":"2023-12-18T17:09:12","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/people/102/","name":"Hans de Goede","email":"hdegoede@redhat.com"},"content":"Hi,\n\nOn 12/18/23 11:05, Hans de Goede wrote:\n\n<snip>\n\n>> f8efb3be (\"libcamera: software_isp: fix AWB algorithm not to increase luminance\") makes the luminance not to change\n>>     due to the colour gains applied. This improves the image a bit (makes it a bit less bright), but the effect\n>>     is relatively small - within 10% depending on the light and the objects in the particular image. This change\n>>     increases the load on CPU, so I am not sure if this image improvement is worth this higher CPU utilization.\n> \n> Interesting since we have r g b lookup tables already the extra CPU load is only\n> in generating the green table\n> once per frame, the load of that should be negligible.\n> \n> And with the separate gamma lookup we can then also give the gamma-lookup table a bit\n> more precision giving it 1024 entries. The impact of this on performance should be\n> minimal.\n\nQuick remark on this fix, I had to change the y256 type from unsigned int to unsigned long\nbecause with a FHD sensor 256 * averagesum of ~700000 pixels does not fit in 32 bits.\n\nI have a WIP branch with your 3 improvements (with 1024 gamma entries) squashed in\nhere:\n\nhttps://github.com/jwrdegoede/libcamera/commits/SoftwareISP-v04\n\nNote I regularly do forced pushes there as I keep refining things.\n\nRegards,\n\nHans\n\n\n\n\n\n> \n>> f5906f15 (\"[DNI] libcamera: software_isp: print colour gains to the log\") prints the colour gains to the console\n>>     so that one could see the effect of the previous patch - without it the green gain would always be 256, and the\n>>     other two gains would increase in the same proportion. E.g. \"gains R/G/B = 253/240/406\" would become\n>>     \"gains R/G/B = 270/256/433\" without commit f8efb3be.\n> \n> I think we probably want something like this (but then in the IPA once the AWB calculations\n> have moved there) and then using a log-level of debug. Doing a debug log once per frame\n> should have no performance impact when debug logging is disabled.\n> \n> Regards,\n> \n> Hans\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 AC719C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Dec 2023 17:09:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E534562B40;\n\tMon, 18 Dec 2023 18:09:23 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D5D1661D93\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 18:09:21 +0100 (CET)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n\t[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-526-ute_s7dHO-akkdsrc--EHw-1; Mon, 18 Dec 2023 12:09:19 -0500","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-40c33d8dfceso31786735e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Dec 2023 09:09:18 -0800 (PST)","from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec?\n\t(2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl.\n\t[2001:1c00:c32:7800:5bfa:a036:83f0:f9ec])\n\tby smtp.gmail.com with ESMTPSA id\n\thu11-20020a170907a08b00b00a1d2a13c425sm14338787ejc.30.2023.12.18.09.09.14\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 18 Dec 2023 09:09:14 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702919364;\n\tbh=BahHdpmAmidJYMNLoJZkDFG8Xw0O0KxNNXMtzFeAFRY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=uYqI2nS0jvFsxtKL8eTmzopGv+IJyhxLUs1R/HcESQCy71kPNhyE+mp7xD9ijM297\n\tFfTD9pG+XIpltIyUQIhKXyQUMAziza+tNut2BQlUST/nQoFvcNpjxYkTaQ07NZKubR\n\tw/qgk/UDIGU+Ljzt/3XRTaWdQK7ckra78jkBLRnJufWtsSbZZCkYn2JQ98lXe7/2rA\n\tI9PzXtyRfByCT9O18HpYAjb8G0Kg9sLw7eweNQpG0Ke9ajxYbFvJKP5R+tPkcBbWwb\n\tkBw1zNvwSxc1u5hRkPU1ITPLQdFegO0u/gA9HPtZMOsYWf6TmY2+WrBltXr6+t3yrt\n\tXSH2Zubr/5KYA==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1702919360;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=uOUueJ0ba3xgQgsFo3KAlByyP/kZCfSEnFdKoGkIypc=;\n\tb=Pnj9HpgSX5WGvvew+GUkBVHMw72+E7JARZvhI1+5NqGtcjiKyoGnsiKMS03uILfyzWPr5+\n\tsJasjldKRzJGBcHRAeNQqc1EJQltYLDsSaZSW+0w4QWsIyRcgnR5uN3Quf3BKzB+mr41Dp\n\tBLR7tUdGIyMhEfeCg41ls5Xo0uHrg94="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"Pnj9HpgS\"; \n\tdkim-atps=neutral","X-MC-Unique":"ute_s7dHO-akkdsrc--EHw-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702919358; x=1703524158;\n\th=content-transfer-encoding:in-reply-to:content-language:references\n\t:cc:to:from:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=uOUueJ0ba3xgQgsFo3KAlByyP/kZCfSEnFdKoGkIypc=;\n\tb=tGWDt5BlX2pIvBEtv+AQeEt7Me8ow7SOxAnm3ZrZMoBkUo+pBhhBlh3hI5mZg0oaMq\n\tLyK1CEoung7WYfI5kQLjr+csxhURzDk5iYhqMiy3Zz+7Icb7BNwQnWSy62arsZKrH+hj\n\tSN3oRupBcc/1juiWAdWbOsex6gP9UZh78TFJpIg+zg6qjSziPvG/uqJ8S/X+6iMr34M8\n\t4UkdnZSup5ppLeRIaqUNDtN8XbH8jZeXuNARUfKup1q4V0Iv/uTLYveKxzsuCIG7nK61\n\tJhR5Bdrr9lrDHfRy+gZzXRi08RIad3wD3CeIy2W7RuJ5ABsS7/tu7SUUHGszddmVaAe/\n\tJoOg==","X-Gm-Message-State":"AOJu0YzTN2KZXwP2unlxPpjfB1/UuePD/oaS3ikZTkbGkXc8iba0giSk\n\tL3MIXM1/VCTfavssPzREklAUBNcPWyf7Z8Co1yPCXquULwm0ERhmvrNHpmBmASakF9ly6bUDABY\n\t+gBUje0nuv4Hvhc3y8RQMVYpvqZ6r3bpR8g==","X-Received":["by 2002:a7b:c388:0:b0:40b:3938:65fc with SMTP id\n\ts8-20020a7bc388000000b0040b393865fcmr8813089wmj.4.1702919357894; \n\tMon, 18 Dec 2023 09:09:17 -0800 (PST)","by 2002:a7b:c388:0:b0:40b:3938:65fc with SMTP id\n\ts8-20020a7bc388000000b0040b393865fcmr8813078wmj.4.1702919357556; \n\tMon, 18 Dec 2023 09:09:17 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IGehlsMtlV3ocudJkj87qnW5LSgaMbh+H7I5WznyoIrHZoSnp1M5mk0CeRVpnw8eElXkwd8mw==","Message-ID":"<fe6cd733-4e54-4efd-90b4-f138d4bb2df6@redhat.com>","Date":"Mon, 18 Dec 2023 18:09:12 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Andrey Konovalov <andrey.konovalov@linaro.org>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<1a871ef7-fdbb-45e7-909d-0c6b17264f11@linaro.org>\n\t<b5312bb7-a6d1-472e-8e74-3ab6a8ec0b3e@redhat.com>","In-Reply-To":"<b5312bb7-a6d1-472e-8e74-3ab6a8ec0b3e@redhat.com>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US, nl","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Hans de Goede <hdegoede@redhat.com>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28354,"web_url":"https://patchwork.libcamera.org/comment/28354/","msgid":"<2c38a0fa-1cd5-48fb-b476-5836b145583b@redhat.com>","date":"2023-12-21T20:36:44","subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","submitter":{"id":102,"url":"https://patchwork.libcamera.org/api/people/102/","name":"Hans de Goede","email":"hdegoede@redhat.com"},"content":"Hi Bryan,\n\nOn 12/15/23 15:37, Hans de Goede wrote:\n\n<snip>\n\n>>>> e3c2a5931dd825c58f626da8c12429b70d20219b (not really expecting a performance impact from this one but maybe)\n>>\n>>\n>> Way brighter - too much IMO in comparsion to the previous, occupancy 100% fps 21.\n> \n> Ok, so the CPU change here is weird. I know building with -O3 helps, but it looks\n> like there is still more CPU load gain to have.\n> \n> Can you try adding this change on top of SoftwareISP-v04 ? :\n> \n> diff --git a/include/libcamera/internal/software_isp/debayer.h b/include/libcamera/internal/software_isp/debayer.h\n> index 206bc2ac..e2a63f24 100644\n> --- a/include/libcamera/internal/software_isp/debayer.h\n> +++ b/include/libcamera/internal/software_isp/debayer.h\n> @@ -77,10 +77,8 @@ public:\n>  \t\t\treturn {};\n>  \t\t}\n>  \n> -\t\treturn SizeRange(Size(pattern_size.width, pattern_size.height),\n> -\t\t\t\t Size((inputSize.width - 2 * pattern_size.width) & ~(pattern_size.width - 1),\n> -\t\t\t\t      (inputSize.height - 2 * pattern_size.height) & ~(pattern_size.height - 1)),\n> -\t\t\t\t pattern_size.width, pattern_size.height);\n> +\t\treturn SizeRange(Size((inputSize.width - 2 * pattern_size.width) & ~(pattern_size.width - 1),\n> +\t\t\t\t      (inputSize.height - 2 * pattern_size.height) & ~(pattern_size.height - 1)));\n>  \t}\n>  \n>  \tSignal<FrameBuffer *> inputBufferReady;\n> \n> That basically undoes e3c2a5931dd825c58f626da8c12429b70d20219b but then\n> the SoftwareISP-v04 equivalent of it.\n\nThis question (the CPU increase you saw due to e3c2a5931dd825c58f626da8c12429b70d20219b\nis still relevant and the above diff to just return a single fixed size\nshould still apply to SoftwareISP-v04-hans2 .\n\nI know -O3 helps, but I'm still puzzled why the sizes() changed caused\na performance regression at all. So I wonder of if you undo the change\n(diff above) we get even better performance with -O3.\n\nRegards,\n\nHans","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 815C7C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Dec 2023 20:36:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B174762B40;\n\tThu, 21 Dec 2023 21:36:51 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 98401629E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Dec 2023 21:36:49 +0100 (CET)","from mail-ej1-f72.google.com (mail-ej1-f72.google.com\n\t[209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-66-YfgC6l1aMYWyg1pswv2CFw-1; Thu, 21 Dec 2023 15:36:47 -0500","by mail-ej1-f72.google.com with SMTP id\n\ta640c23a62f3a-a19725a3a84so64753466b.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Dec 2023 12:36:46 -0800 (PST)","from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec?\n\t(2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl.\n\t[2001:1c00:c32:7800:5bfa:a036:83f0:f9ec])\n\tby smtp.gmail.com with ESMTPSA id\n\tex17-20020a170907955100b00a269fa0d305sm1286525ejc.8.2023.12.21.12.36.44\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 21 Dec 2023 12:36:45 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1703191011;\n\tbh=BKclt82MaxE5u5BADm06tQxOdc0eRTOhyNrY3rS+DFU=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=Pc62nCSFyTIGM2qyl+8ZseJX4SnjSLqfAnmwiVKdx9diuSGNJuGVDTarCxf1nJlbf\n\tz2M2a+NcMO38ZMFAh35HcdAubdw+P4efk4QNcELoLPFOEuibvOpe7h2g+VVWd/c70C\n\tXY2jL6SNnKUvtYpgCdy1jZ6nDnh9HAyppyo1+yEeoUK7itWcM819XNy7b1fK66Hjo4\n\tvRAz+BpwgVYtZ/lrsrBV2O4LtLIx6GD5fb9EK3sHCu/9gW/2kTicq9N7hD9jzxfTru\n\tV+y/d6uy7zM0H/K7lv51noNuY0hbXw/tftkpv/s94IXc0E5d06HXK80RQJURI5a/O+\n\t3cDF87U2+RUfw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1703191008;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=oIZ6SPGvU/F4EOePFJAJZINpxaFnc0hm5/LvQzaXrag=;\n\tb=WY8IyR3fWZWbLscscNsfFSWrRTs1WQ2eBf+2tzn3pJDRJCVUStw2w0MfxtR64L8FNq3BY2\n\tRTMOxPopJZ7tRGgy4FIPu5/QO8LjR9839TmcVJ9I2shl+dg+rxflUb5DqVVYbYJc7ZYAyo\n\tJo50rlcSC2jGTflvGU0v9lQhGQKhgm8="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"WY8IyR3f\"; \n\tdkim-atps=neutral","X-MC-Unique":"YfgC6l1aMYWyg1pswv2CFw-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1703191006; x=1703795806;\n\th=content-transfer-encoding:in-reply-to:references:cc:to:from\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=oIZ6SPGvU/F4EOePFJAJZINpxaFnc0hm5/LvQzaXrag=;\n\tb=ua1I8zPZtVOvR2n6pEVbK6HX486rMRi6EA0liu5mlFBaeE8ISwB+Z7RB40iqoktzUa\n\tjSTifGfTLy91CKZhCnRq9r0LyRqFEh11s9rM1RtsXBEIlM8kk8HsCfhHQYTN2jBCcAoF\n\tbdRQW8kXLKaRJdi2rfv+lmtyg9xzSZJUBMtVQGrMrq5bmVa3QO7eT8vt2tRJEB75Xt9v\n\teuDwY3v+sXl4rNF+PdH/FLbeDMvXsjwhDrf9a2arznUV0qo3uKfXgfz0o6UeJwrkbui9\n\tRsvZHN7Pa9G4n/D/jSHTOoI7KMqB75oDGrWI7dq6fJcg0ZqGQtIcDjB7wdM9xBmInFTn\n\tD0Kg==","X-Gm-Message-State":"AOJu0YxVs/ulVE0Rm7LvEiPXsksnbWRuZadO12j/j+K1iPlwl0kUm9/V\n\t86LqKHN6myCZAud4iguf7bQbfNFx8QfN7OA8Sgasj7quMjlypnUvaWNn1ytc4P5SlQCOaIhv6Sb\n\tPTqABGXuwKpve6ZpXjRf3T2Jr6qb/Ct/XocwraK4voQ==","X-Received":["by 2002:a17:906:d511:b0:a23:645f:af3b with SMTP id\n\tcq17-20020a170906d51100b00a23645faf3bmr126349ejc.1.1703191005923; \n\tThu, 21 Dec 2023 12:36:45 -0800 (PST)","by 2002:a17:906:d511:b0:a23:645f:af3b with SMTP id\n\tcq17-20020a170906d51100b00a23645faf3bmr126343ejc.1.1703191005659; \n\tThu, 21 Dec 2023 12:36:45 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IHO+ifxQDigjqNmoIZ3GNw1b1kNmdxQVtZzVkE3i9VAcVJq2tU1/cxe2D7uGUa2J0yYK+L4FA==","Message-ID":"<2c38a0fa-1cd5-48fb-b476-5836b145583b@redhat.com>","Date":"Thu, 21 Dec 2023 21:36:44 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tlibcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20231214121350.206015-1-hdegoede@redhat.com>\n\t<8fb40af9-45d3-472c-b3a8-c33429a7855c@linaro.org>\n\t<5b4e7d4e-4ee6-4a0d-a9d6-8d8a087351fb@redhat.com>\n\t<933c119f-7864-4703-9e3b-b3e9b2f0bcbc@linaro.org>\n\t<0d6c1a3f-8af2-42d8-a924-066158dd87c5@redhat.com>\n\t<69815977-d534-4a62-b2c7-aafe670022e2@redhat.com>\n\t<c45904b6-d7f9-4c6a-89ce-e8262c8d5890@linaro.org>\n\t<c5369630-1597-4241-bee5-bb1c80aa6a09@redhat.com>","In-Reply-To":"<c5369630-1597-4241-bee5-bb1c80aa6a09@redhat.com>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US, nl","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 00/11] libcamera: introduce Software\n\tISP and Software IPA","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>","From":"Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Hans de Goede <hdegoede@redhat.com>","Cc":"Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tadmin@dennisbonke.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]