[{"id":39201,"web_url":"https://patchwork.libcamera.org/comment/39201/","msgid":"<178199683048.2732614.17411488518816313683@ping.linuxembedded.co.uk>","date":"2026-06-20T23:07:10","subject":"Re: [PATCH 5/7] libcamera: software_isp: Fix black level handling in\n\tCPU ISP","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Kieran Bingham (2026-06-21 00:00:32)\n> From: Milan Zamazal <mzamazal@redhat.com>\n> \n> The black level handling in CPU ISP has two flaws:\n> \n> - The black level is applied after white balance rather than before.\n> \n> - It doesn't handle black levels with different values for individual\n>   colour channels.\n> \n> The flaws are in both CCM and non-CCM cases.  The wrong black level and\n> white balance application order is well visible when the white balance\n> gains are significantly different from 1.0.  Then the output differs\n> significantly from GPU ISP output, which uses the correct order.\n> \n> This patch changes the computations of the lookup tables in a way that\n> fixes both the problems.\n> \n> [Kieran: Fix indexing from Milans' suggestion, use new clamp]\n> [Kieran: Use enumerate, and div updates from Laurent's suggestion]\n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n\nAnd this of course\n\nSigned-off-by: Kieran Bingham <kieran.bingham@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 3950BC3303\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 20 Jun 2026 23:07:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 21D33656E5;\n\tSun, 21 Jun 2026 01:07:15 +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 AAF78656DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 21 Jun 2026 01:07:13 +0200 (CEST)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CC7C1B8B;\n\tSun, 21 Jun 2026 01:06:36 +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=\"ahByVllw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1781996796;\n\tbh=mx6JpuZFimW9UJmeWedPFmpOQixEWMwHKajudmQ8Wb8=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=ahByVllwVfY9ekUBpVn9Dv9s4f0+G+DTaIkEqHXKRbRnB0uEzueU+S5n/abwKv4zF\n\t4IMSUYdmPfk3yODqfLKhIV+iWwRksYUD3d0J/X3B1Id2Y1cu4kL6mC4CzXuZ4rABl7\n\tpQ7iYbTxdKD9+oYQ6jH4UvWkrnahQyzFfr6DXvMQ=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260621-kbingham-awb-saturation-v1-5-b91ea59c6cfb@ideasonboard.com>","References":"<20260621-kbingham-awb-saturation-v1-0-b91ea59c6cfb@ideasonboard.com>\n\t<20260621-kbingham-awb-saturation-v1-5-b91ea59c6cfb@ideasonboard.com>","Subject":"Re: [PATCH 5/7] libcamera: software_isp: Fix black level handling in\n\tCPU ISP","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Milan Zamazal <mzamazal@redhat.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Sun, 21 Jun 2026 00:07:10 +0100","Message-ID":"<178199683048.2732614.17411488518816313683@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]