{"id":24488,"url":"https://patchwork.libcamera.org/api/1.1/covers/24488/?format=json","web_url":"https://patchwork.libcamera.org/cover/24488/","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":"<20250929201924.45019-1-mzamazal@redhat.com>","date":"2025-09-29T20:19:17","name":"[v5,0/7] Fix stats related problems in software 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/24488/mbox/","series":[{"id":5466,"url":"https://patchwork.libcamera.org/api/1.1/series/5466/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5466","date":"2025-09-29T20:19:17","name":"Fix stats related problems in software ISP","version":5,"mbox":"https://patchwork.libcamera.org/series/5466/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/24488/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 B3189C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 29 Sep 2025 20:19:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7D5F06B5F9;\n\tMon, 29 Sep 2025 22:19:39 +0200 (CEST)","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 1E5FB6B599\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Sep 2025 22:19:37 +0200 (CEST)","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-157-irDkd9NRPPuZze8zC2eMRg-1;\n\tMon, 29 Sep 2025 16:19:34 -0400","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 51AB1195609E; Mon, 29 Sep 2025 20:19:32 +0000 (UTC)","from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.44.32.35])\n\tby mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id 79E7F19560B4; Mon, 29 Sep 2025 20:19:29 +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=\"GXn1LIak\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1759177176;\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=19eNsRmCnbxhvyKAGijUd+SkiKPIZAeJs0Z87EEchMg=;\n\tb=GXn1LIakMBaW3o7ip87e7ACP6MkkE11EzfYmlLwKc9bUVps5bsvKjx+m+lW7VA1wxPiJpU\n\ts/CWHNlFrqXNm1d49aY/OWi+TZ/0Vj0O6tDXTJoofdi1PHBForxLUYKuLTIGQwylaSp0XH\n\tBbJ/badg2JxikfONclz/JOnbGs0rwFA=","X-MC-Unique":"irDkd9NRPPuZze8zC2eMRg-1","X-Mimecast-MFC-AGG-ID":"irDkd9NRPPuZze8zC2eMRg_1759177173","From":"Milan Zamazal <mzamazal@redhat.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>, pobrn@protonmail.com,\n\tmail@maciej.szmigiero.name, hansg@kernel.org,\n\tRobert Mader <robert.mader@collabora.com>","Subject":"[PATCH v5 0/7] Fix stats related problems in software ISP","Date":"Mon, 29 Sep 2025 22:19:17 +0200","Message-ID":"<20250929201924.45019-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":"PrOjRD4WUoWeUB4H-4kqFtkb53qZ1GroZR10r-SSUjE_1759177173","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=UTF-8","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>"},"content":"Fixes of https://bugs.libcamera.org/show_bug.cgi?id=280 and the related\nproblems discussed there.\n\nTested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>\nTested-by: Robert Mader <robert.mader@collabora.com>\n\nChanges in v5:\n- Docstring changes as suggested by Barnabás.\n- Assertion on non-negative window corner values in\n  SwStatsCpu::setWindow() added.\n- Cosmetic code changes in debayer_cpu.cpp suggested by Hans.\n- “Check processed window size alignment” patch dropped (the requirement\n  is already enforced elsewhere.)\n- Minor code change in awb.cpp suggested by Barnabás.\n- New patch fixing the initial value type in std::accumulate().\n\nChanges in v4:\n- unsigned int underflow in SwStatsCpu::setWindow eliminated.\n- Window adjustment clarified in SwStatsCpu::setWindow.\n\nChanges in v3:\n- Possible uint64_t underflow eliminated.\n\nChanges in v2:\n- An extra semicolon removed.\n- A note about the debayering alignment being an implementation\n  limitation added.\n- A check for division by zero in AGC added.\n\nMilan Zamazal (7):\n  libcamera: software_isp: Fix width adjustment in SwStatsCpu::setWindow\n  libcamera: software_isp: Clarify SwStatsCpu::setWindow use\n  libcamera: software_isp: Pass correct y-coordinate to stats\n  ipa: simple: awb: Avoid incorrect arithmetic in AWB\n  ipa: simple: awb: Use correct type in std::accumulate\n  ipa: simple: blc: Prevent division by zero in BLC\n  ipa: simple: agc: Prevent division by zero in AGC\n\n src/ipa/simple/algorithms/agc.cpp          |  6 +++++\n src/ipa/simple/algorithms/awb.cpp          | 10 +++++----\n src/ipa/simple/algorithms/blc.cpp          |  5 +++++\n src/libcamera/software_isp/debayer_cpu.cpp | 18 ++++++++++-----\n src/libcamera/software_isp/swstats_cpu.cpp | 26 +++++++++++++++++++++-\n 5 files changed, 54 insertions(+), 11 deletions(-)"}