[{"id":29595,"web_url":"https://patchwork.libcamera.org/comment/29595/","msgid":"<134d9836-8fb6-40b2-8035-21b110a0f216@gmail.com>","date":"2024-05-22T09:50:09","subject":"Re: [PATCH v2 4/5] libcamera: software_isp: Remove\n\tDebayerParams::kGain10","submitter":{"id":179,"url":"https://patchwork.libcamera.org/api/people/179/","name":"Andrei Konovalov","email":"andrey.konovalov.ynk@gmail.com"},"content":"Hi Milan,\n\nThank you for the patch!\n\nReviewed-by: Andrei Konovalov <andrey.konovalov.ynk@gmail.com>\n\nOn 30.04.2024 20:34, Milan Zamazal wrote:\n> The constant is used in a single place internally and doesn't belong to\n> DebayerParams anymore.  Let's use 256 directly.\n> \n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>   include/libcamera/internal/software_isp/debayer_params.h | 1 -\n>   src/ipa/simple/soft_simple.cpp                           | 3 +--\n>   src/libcamera/software_isp/debayer.cpp                   | 5 -----\n>   3 files changed, 1 insertion(+), 8 deletions(-)\n> \n> diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\n> index 09f4ff00..6aaa7d4c 100644\n> --- a/include/libcamera/internal/software_isp/debayer_params.h\n> +++ b/include/libcamera/internal/software_isp/debayer_params.h\n> @@ -16,7 +16,6 @@\n>   namespace libcamera {\n>   \n>   struct DebayerParams {\n> -\tstatic constexpr unsigned int kGain10 = 256;\n>   \tstatic constexpr unsigned int kRGBLookupSize = 256;\n>   \n>   \tusing ColorLookupTable = std::array<uint8_t, kRGBLookupSize>;\n> diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\n> index 981e1ae0..0af23ee7 100644\n> --- a/src/ipa/simple/soft_simple.cpp\n> +++ b/src/ipa/simple/soft_simple.cpp\n> @@ -290,8 +290,7 @@ void IPASoftSimple::processStats(const ControlList &sensorControls)\n>   \n>   \tfor (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {\n>   \t\tconstexpr unsigned int div =\n> -\t\t\tDebayerParams::kRGBLookupSize * DebayerParams::kGain10 /\n> -\t\t\tkGammaLookupSize;\n> +\t\t\tDebayerParams::kRGBLookupSize * 256 / kGammaLookupSize;\n>   \t\tunsigned int idx;\n>   \n>   \t\t/* Apply gamma after gain! */\n> diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\n> index ac438a33..548c2ccd 100644\n> --- a/src/libcamera/software_isp/debayer.cpp\n> +++ b/src/libcamera/software_isp/debayer.cpp\n> @@ -18,11 +18,6 @@ namespace libcamera {\n>    * \\brief Struct to hold the debayer parameters.\n>    */\n>   \n> -/**\n> - * \\var DebayerParams::kGain10\n> - * \\brief const value for 1.0 gain\n> - */\n> -\n>   /**\n>    * \\var DebayerParams::kRGBLookupSize\n>    * \\brief Size of a color lookup table","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 2548ABDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 22 May 2024 09:50:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DCCE863492;\n\tWed, 22 May 2024 11:50:12 +0200 (CEST)","from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com\n\t[IPv6:2a00:1450:4864:20::42f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6F07861A50\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 22 May 2024 11:50:11 +0200 (CEST)","by mail-wr1-x42f.google.com with SMTP id\n\tffacd0b85a97d-354e0d4db6cso218716f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 22 May 2024 02:50:11 -0700 (PDT)","from [192.168.118.26] ([87.116.162.89])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-354cda490e8sm4351076f8f.28.2024.05.22.02.50.10\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tWed, 22 May 2024 02:50:10 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Qg83fcoR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20230601; t=1716371411; x=1716976211;\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=U2vilU4BSCHuKC7YGNKeGiuD7+sSpSO0FTRMyYl+PF8=;\n\tb=Qg83fcoRmSgJmo5WXS1iWpfpdJSH+xMvds3jDdXh9ADuOTkyYjKX0NfjGbBFu7lH97\n\tmMVZ68+3ZBhxIr61ojaPtryaI3yeI73+ZC+SSdBoPGZv4HlS/UEAAgGUP63qFeBLkFhM\n\tVZhWNhcyMxqog3wOoPp0ZGK/gm1MUrqzvpIKyisKGGKUYJqH8stMw0BOwd2lF5e/7E4t\n\tdvdxKuygcTNFIBmJkW/tVtmF3uh9eFNdzXvfG6SVRH2FNk2QHH8GObrkFe+13mkpZtet\n\tyTSXpyLbZ9O5/HZtPSpt2fsLDW+YgTG8uccELyBEWblUxlchlTcX+4jexERThZxzvh4t\n\t7hSQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1716371411; x=1716976211;\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=U2vilU4BSCHuKC7YGNKeGiuD7+sSpSO0FTRMyYl+PF8=;\n\tb=CayWR8q1moz+IIiuERJrBmLBkJeJlilor9dnt8zzhVGm3eYS2Susp8fR12ojLCS6Jl\n\tCGWsPp/Dd53CEHmOqNiPGykS9TgwYuTzHPmtzXiDwSzYXi1upoGLYVCn1l1GgihBHefd\n\tokyuVhtSLbzQFKv2rHXvxOulN5su60jtH/gtDMtmc0iSWrr7cuJf6oJ5pfoVN4nSIP5a\n\tRO6UqZMkvbVzlwJtkW5oXpRcwqcZtnA9uoiHkdWY6+1STB/JAQ5wQEsmgzpYOkPGTeCC\n\tMjCHXhJTvcdy1puc/B9ZeBk9yq1zmc5MHqeFKUoKIvt7PAkzZVQK+ZB0OuWZbXo5WrEI\n\ttYQQ==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCVdqU3UA0r1YvSE19nZNIWQ8YWM8t1oJC0sqvAJkBCyInPqizN+iQwb91+p+fLU1JE1OwnLc2GfBNXjzxa1FSlFoGUVKB/0x3RQaCNj7JUwBldbFw==","X-Gm-Message-State":"AOJu0Yzo6tisi8CKVwVOqGScM5epA4Io8hh3t4sQ9pxE5AKNW/BDk4N3\n\tdRKnAOzWYGSyOEVHNgI3lmeSYukiYNDTqkBlwm5AOr/me22NhaWwwWhfTRJY","X-Google-Smtp-Source":"AGHT+IFx3lwH1vJneqNPyRYBkIM3Z1NMNJmRc8lJL3T5hf8+SOc9vgHKYN5zgcV8AyI66OpJXxtKnQ==","X-Received":"by 2002:adf:ebc8:0:b0:351:d9a1:4f1 with SMTP id\n\tffacd0b85a97d-354b9068e46mr9481341f8f.32.1716371410800; \n\tWed, 22 May 2024 02:50:10 -0700 (PDT)","Message-ID":"<134d9836-8fb6-40b2-8035-21b110a0f216@gmail.com>","Date":"Wed, 22 May 2024 12:50:09 +0300","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 4/5] libcamera: software_isp: Remove\n\tDebayerParams::kGain10","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20240430173430.200392-1-mzamazal@redhat.com>\n\t<20240430173430.200392-5-mzamazal@redhat.com>","Content-Language":"en-US","From":"Andrei Konovalov <andrey.konovalov.ynk@gmail.com>","In-Reply-To":"<20240430173430.200392-5-mzamazal@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]