{"id":26130,"url":"https://patchwork.libcamera.org/api/1.1/covers/26130/?format=json","web_url":"https://patchwork.libcamera.org/cover/26130/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260211131728.96413-1-mzamazal@redhat.com>","date":"2026-02-11T13:17:26","name":"[0/2] Fix black level handling in GPU ISP","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/1.1/people/177/?format=json","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"mbox":"https://patchwork.libcamera.org/cover/26130/mbox/","series":[{"id":5784,"url":"https://patchwork.libcamera.org/api/1.1/series/5784/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5784","date":"2026-02-11T13:17:26","name":"Fix black level handling in GPU ISP","version":1,"mbox":"https://patchwork.libcamera.org/series/5784/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/26130/comments/","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 D735BBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 11 Feb 2026 13:17:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ECBE7621AB;\n\tWed, 11 Feb 2026 14:17:45 +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 59CB3620C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 11 Feb 2026 14:17:44 +0100 (CET)","from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n\t(ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-589-SRLWCMWePTicnR1yMkD2RQ-1;\n\tWed, 11 Feb 2026 08:17:39 -0500","from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com\n\t(mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com\n\t[10.30.177.12])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTPS id 8C71C1956056; Wed, 11 Feb 2026 13:17:38 +0000 (UTC)","from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.45.226.74])\n\tby mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id 825B019560A3; Wed, 11 Feb 2026 13:17:36 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"dqIQlFNQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1770815863;\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\tbh=yEpTn/ox09RbEypypfNEs4L8Bf1Gb4n69pLptMJ8IJg=;\n\tb=dqIQlFNQQqYMaFPlcomI2vSn1MTfEsYUJAWxEomAcdisFFHwskM4j9Q1MYpL9K6MGAERAf\n\txbooVAknXiflnH70MBUMqOs/LIpnHjsu0ni4ZNcCdYXcKzJ1YcRvcXgq1mkvGSeyW2nj/i\n\tIMdELiVqTTWNOtK9TeUnvGuZ9pjregA=","X-MC-Unique":"SRLWCMWePTicnR1yMkD2RQ-1","X-Mimecast-MFC-AGG-ID":"SRLWCMWePTicnR1yMkD2RQ_1770815858","From":"Milan Zamazal <mzamazal@redhat.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>","Subject":"[PATCH 0/2] Fix black level handling in GPU ISP","Date":"Wed, 11 Feb 2026 14:17:26 +0100","Message-ID":"<20260211131728.96413-1-mzamazal@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.12","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"N7jXeIccf4lPKnmQuhtu3aEX6wGlhHmrjrFg007naL0_1770815858","X-Mimecast-Originator":"redhat.com","Content-Transfer-Encoding":"8bit","content-type":"text/plain; charset=\"US-ASCII\"; x-default=true","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>"},"content":"There is an omission when applying black level in GPU ISP: the black\nlevel is subtracted but the resulting pixel values are not spread back\nto the whole 0..1 range.  This prevents reaching maximum brightness with\nnon-zero black level and can also lead to pinkish bright areas or other\ncolour shifts.\n\nMilan Zamazal (2):\n  ipa: simple: Limit the black level value\n  libcamera: software_isp: Fix black level application in GPU ISP\n\n src/ipa/simple/algorithms/blc.cpp          | 7 ++++---\n src/libcamera/shaders/bayer_1x_packed.frag | 2 +-\n src/libcamera/shaders/bayer_unpacked.frag  | 2 +-\n 3 files changed, 6 insertions(+), 5 deletions(-)"}