[{"id":36444,"web_url":"https://patchwork.libcamera.org/comment/36444/","msgid":"<1c303f53-a8fc-4020-a710-4c05238182f7@ideasonboard.com>","date":"2025-10-24T16:11:45","subject":"Re: [PATCH v1 04/12] ipa: rkisp1: lsc: Rename res to positions","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2025. 10. 14. 9:52 keltezéssel, Stefan Klug írta:\n> Rename the res variable to positions which better describes the intent.\n> This was commented in review after being merged.\n> \n> While at it, improve the documentation a bit.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>   src/ipa/rkisp1/algorithms/lsc.cpp | 18 ++++++++++--------\n>   1 file changed, 10 insertions(+), 8 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\n> index c581e6441853..bb58386ae646 100644\n> --- a/src/ipa/rkisp1/algorithms/lsc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n> @@ -132,9 +132,11 @@ public:\n>   \n>   private:\n>   \t/*\n> -\t * The lsc grid has custom spacing defined on half the range (see\n> -\t * parseSizes() for details). For easier handling this function converts\n> -\t * the spaces vector to positions and mirrors them. E.g.:\n> +\t * The rkisp1 LSC grid spacing is defined by the cell sizes on the first\n> +\t * half of the grid. This is then mirrored in hardware to the other\n> +\t * half. See parseSizes() for further details. For easier handling, this\n> +\t * function converts the cell sizes of half the grid to a list of\n> +\t * position of the whole grid (on one axis). Example:\n>   \t *\n>   \t * input:   | 0.2 | 0.3 |\n>   \t * output: 0.0   0.2   0.5   0.8   1.0\n> @@ -142,17 +144,17 @@ private:\n>   \tstd::vector<double> sizesListToPositions(const std::vector<double> &sizes)\n>   \t{\n>   \t\tconst int half = sizes.size();\n> -\t\tstd::vector<double> res(half * 2 + 1);\n> +\t\tstd::vector<double> positions(half * 2 + 1);\n>   \t\tdouble x = 0.0;\n>   \n> -\t\tres[half] = 0.5;\n> +\t\tpositions[half] = 0.5;\n>   \t\tfor (int i = 1; i <= half; i++) {\n>   \t\t\tx += sizes[half - i];\n> -\t\t\tres[half - i] = 0.5 - x;\n> -\t\t\tres[half + i] = 0.5 + x;\n> +\t\t\tpositions[half - i] = 0.5 - x;\n> +\t\t\tpositions[half + i] = 0.5 + x;\n>   \t\t}\n>   \n> -\t\treturn res;\n> +\t\treturn positions;\n>   \t}\n>   \n>   \tstd::vector<uint16_t> samplePolynomial(const LscPolynomial &poly)","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 0F63ABE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Oct 2025 16:11:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 50345609AF;\n\tFri, 24 Oct 2025 18:11:52 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0CD29608DC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Oct 2025 18:11:50 +0200 (CEST)","from [192.168.33.13] (185.221.141.231.nat.pool.zt.hu\n\t[185.221.141.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 359D0EFF;\n\tFri, 24 Oct 2025 18:10:03 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"j2XzZEfn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761322204;\n\tbh=pE4KRq5sPi8sxtlhBXLSzcwwkXPM4GERveo+5q94+Uw=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=j2XzZEfnSDshR44OX+q7hXkbWoaGeaZyKNL9F459/s6yzEc4g4dLkcxKSywEPniLU\n\tNxYDye9AsPvVxSwohw2nlBt+TPC5rhr+WQxW+RKUM5yJZNKPAWAby1ALeKqEMAROT4\n\tFyBQrTH9VcP3KNp+1tBMrG2icOP4o8unW5868Xmc=","Message-ID":"<1c303f53-a8fc-4020-a710-4c05238182f7@ideasonboard.com>","Date":"Fri, 24 Oct 2025 18:11:45 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1 04/12] ipa: rkisp1: lsc: Rename res to positions","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20251014075252.2876485-1-stefan.klug@ideasonboard.com>\n\t<20251014075252.2876485-5-stefan.klug@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20251014075252.2876485-5-stefan.klug@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":36470,"web_url":"https://patchwork.libcamera.org/comment/36470/","msgid":"<c70ddadf-5ded-4932-a6fc-1352207bd178@ideasonboard.com>","date":"2025-10-25T14:16:29","subject":"Re: [PATCH v1 04/12] ipa: rkisp1: lsc: Rename res to positions","submitter":{"id":241,"url":"https://patchwork.libcamera.org/api/people/241/","name":"Rui Wang","email":"rui.wang@ideasonboard.com"},"content":"On 2025-10-14 03:52, Stefan Klug wrote:\n> Rename the res variable to positions which better describes the intent.\n> This was commented in review after being merged.\n>\n> While at it, improve the documentation a bit.\n>\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>   src/ipa/rkisp1/algorithms/lsc.cpp | 18 ++++++++++--------\n>   1 file changed, 10 insertions(+), 8 deletions(-)\n>\n> diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\n> index c581e6441853..bb58386ae646 100644\n> --- a/src/ipa/rkisp1/algorithms/lsc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n> @@ -132,9 +132,11 @@ public:\n>   \n>   private:\n>   \t/*\n> -\t * The lsc grid has custom spacing defined on half the range (see\n> -\t * parseSizes() for details). For easier handling this function converts\n> -\t * the spaces vector to positions and mirrors them. E.g.:\n> +\t * The rkisp1 LSC grid spacing is defined by the cell sizes on the first\n> +\t * half of the grid. This is then mirrored in hardware to the other\n> +\t * half. See parseSizes() for further details. For easier handling, this\n> +\t * function converts the cell sizes of half the grid to a list of\n> +\t * position of the whole grid (on one axis). Example:\n>   \t *\n>   \t * input:   | 0.2 | 0.3 |\n>   \t * output: 0.0   0.2   0.5   0.8   1.0\n> @@ -142,17 +144,17 @@ private:\n>   \tstd::vector<double> sizesListToPositions(const std::vector<double> &sizes)\n>   \t{\n>   \t\tconst int half = sizes.size();\n> -\t\tstd::vector<double> res(half * 2 + 1);\n> +\t\tstd::vector<double> positions(half * 2 + 1);\n>   \t\tdouble x = 0.0;\n>   \n> -\t\tres[half] = 0.5;\n> +\t\tpositions[half] = 0.5;\n>   \t\tfor (int i = 1; i <= half; i++) {\n>   \t\t\tx += sizes[half - i];\n> -\t\t\tres[half - i] = 0.5 - x;\n> -\t\t\tres[half + i] = 0.5 + x;\n> +\t\t\tpositions[half - i] = 0.5 - x;\n> +\t\t\tpositions[half + i] = 0.5 + x;\n>   \t\t}\n>   \n> -\t\treturn res;\n> +\t\treturn positions;\n>   \t}\n>   \n>   \tstd::vector<uint16_t> samplePolynomial(const LscPolynomial &poly)\n\nReviewed by Rui Wang","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 5590BC3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 25 Oct 2025 14:16:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 893F2606D8;\n\tSat, 25 Oct 2025 16:16:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D9B6160697\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 25 Oct 2025 16:16:42 +0200 (CEST)","from [192.168.31.114] (unknown [209.216.122.90])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3C3CC5B3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 25 Oct 2025 16:14:56 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"YgFGelPZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761401696;\n\tbh=Jphxpk1Gn7VbdCOdvpNIodL0xExEerxhXOSc8ZwNjII=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=YgFGelPZIb+Os5gLXQOmBO/zA2X3nhcOwfEDa5OxhvqJ56v3z76vmDD9cdr5ch77S\n\tR7FOYoysxTdSv/oXzFfP1dtSr09gV+fmjLpUrnIcmpPrVDd0VqM79VoQdP0BEnIUdf\n\trwJnvq+l8gFSgO2Sy+clIK61pxmvqwbvxm47twoo=","Message-ID":"<c70ddadf-5ded-4932-a6fc-1352207bd178@ideasonboard.com>","Date":"Sat, 25 Oct 2025 10:16:29 -0400","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1 04/12] ipa: rkisp1: lsc: Rename res to positions","To":"libcamera-devel@lists.libcamera.org","References":"<20251014075252.2876485-1-stefan.klug@ideasonboard.com>\n\t<20251014075252.2876485-5-stefan.klug@ideasonboard.com>","Content-Language":"en-US","From":"rui wang <rui.wang@ideasonboard.com>","In-Reply-To":"<20251014075252.2876485-5-stefan.klug@ideasonboard.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>"}},{"id":36500,"web_url":"https://patchwork.libcamera.org/comment/36500/","msgid":"<5c8a4ff7-dc51-4395-81be-727c70c84883@ideasonboard.com>","date":"2025-10-27T20:59:49","subject":"Re: [PATCH v1 04/12] ipa: rkisp1: lsc: Rename res to positions","submitter":{"id":241,"url":"https://patchwork.libcamera.org/api/people/241/","name":"Rui Wang","email":"rui.wang@ideasonboard.com"},"content":"On 2025-10-14 03:52, Stefan Klug wrote:\n> Rename the res variable to positions which better describes the intent.\n> This was commented in review after being merged.\n>\n> While at it, improve the documentation a bit.\n>\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>   src/ipa/rkisp1/algorithms/lsc.cpp | 18 ++++++++++--------\n>   1 file changed, 10 insertions(+), 8 deletions(-)\n>\n> diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\n> index c581e6441853..bb58386ae646 100644\n> --- a/src/ipa/rkisp1/algorithms/lsc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n> @@ -132,9 +132,11 @@ public:\n>   \n>   private:\n>   \t/*\n> -\t * The lsc grid has custom spacing defined on half the range (see\n> -\t * parseSizes() for details). For easier handling this function converts\n> -\t * the spaces vector to positions and mirrors them. E.g.:\n> +\t * The rkisp1 LSC grid spacing is defined by the cell sizes on the first\n> +\t * half of the grid. This is then mirrored in hardware to the other\n> +\t * half. See parseSizes() for further details. For easier handling, this\n> +\t * function converts the cell sizes of half the grid to a list of\n> +\t * position of the whole grid (on one axis). Example:\n>   \t *\n>   \t * input:   | 0.2 | 0.3 |\n>   \t * output: 0.0   0.2   0.5   0.8   1.0\n> @@ -142,17 +144,17 @@ private:\n>   \tstd::vector<double> sizesListToPositions(const std::vector<double> &sizes)\n>   \t{\n>   \t\tconst int half = sizes.size();\n> -\t\tstd::vector<double> res(half * 2 + 1);\n> +\t\tstd::vector<double> positions(half * 2 + 1);\n>   \t\tdouble x = 0.0;\n>   \n> -\t\tres[half] = 0.5;\n> +\t\tpositions[half] = 0.5;\n>   \t\tfor (int i = 1; i <= half; i++) {\n>   \t\t\tx += sizes[half - i];\n> -\t\t\tres[half - i] = 0.5 - x;\n> -\t\t\tres[half + i] = 0.5 + x;\n> +\t\t\tpositions[half - i] = 0.5 - x;\n> +\t\t\tpositions[half + i] = 0.5 + x;\n>   \t\t}\n>   \n> -\t\treturn res;\n> +\t\treturn positions;\n>   \t}\n>   \n>   \tstd::vector<uint16_t> samplePolynomial(const LscPolynomial &poly)\n\nReviewed-by: Rui Wang <rui.wang@ideasonboard.com>","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 D46CAC3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Oct 2025 21:00:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8D2AF6078C;\n\tMon, 27 Oct 2025 22:00:03 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D50EA6069A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Oct 2025 22:00:01 +0100 (CET)","from [192.168.31.114] (unknown [209.216.122.90])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C0F78E9B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Oct 2025 21:58:13 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"o7EPHvO2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761598694;\n\tbh=u/2003MMsnGQrsVQpWAT9bbYhZpSNmVr89nFkJniA7w=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=o7EPHvO2N/yiOvlXj3LXEoT31eC/rXlkAKF0HznI3PnJzckM8JAkjxNHswImHf5pI\n\tDackyPGxoeC6YE28IqnxugcD/rKTJckWXCJSb/cit9YvfRA9oT0FhPqeH2utjgdVCu\n\tmpKJrMjugfI+Bg/TcWfX+hA26fGWneo4obTq8Oxo=","Message-ID":"<5c8a4ff7-dc51-4395-81be-727c70c84883@ideasonboard.com>","Date":"Mon, 27 Oct 2025 16:59:49 -0400","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1 04/12] ipa: rkisp1: lsc: Rename res to positions","To":"libcamera-devel@lists.libcamera.org","References":"<20251014075252.2876485-1-stefan.klug@ideasonboard.com>\n\t<20251014075252.2876485-5-stefan.klug@ideasonboard.com>","Content-Language":"en-US","From":"rui wang <rui.wang@ideasonboard.com>","In-Reply-To":"<20251014075252.2876485-5-stefan.klug@ideasonboard.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>"}}]