{"id":24640,"url":"https://patchwork.libcamera.org/api/1.1/covers/24640/?format=json","web_url":"https://patchwork.libcamera.org/cover/24640/","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":"<20251014142427.3107490-1-stefan.klug@ideasonboard.com>","date":"2025-10-14T14:24:15","name":"[v1,0/4] libipa: agc: Fix constraints yTarget handling and add PWL support","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/1.1/people/184/?format=json","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/24640/mbox/","series":[{"id":5502,"url":"https://patchwork.libcamera.org/api/1.1/series/5502/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5502","date":"2025-10-14T14:24:15","name":"libipa: agc: Fix constraints yTarget handling and add PWL support","version":1,"mbox":"https://patchwork.libcamera.org/series/5502/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/24640/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 E7FBBBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 14 Oct 2025 14:24:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 19684605F8;\n\tTue, 14 Oct 2025 16:24:34 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 12358605DF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Oct 2025 16:24:32 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:61fb:8e55:ff1e:be62])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 9A664741;\n\tTue, 14 Oct 2025 16:22:53 +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=\"tdP8Fv5r\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760451773;\n\tbh=J00LNuZDCG1mnww8Bb52KG2EfgICTeTylX+4r88SfdE=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=tdP8Fv5rjEssSrVHpGjBqwQhTPO6I53pkHolwKiKm/Eze2LqmgRs0xrzvrnqyiQK1\n\t3omjNOtYJY7yepO/TsfisbKD67PUK+gx7NMWjmvczQOQMscECsSk6+scWVArxzHVdv\n\tD0greeeIy4HlFE11X5qr582jAzAJkuejvh0JVi8o=","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","Subject":"[PATCH v1 0/4] libipa: agc: Fix constraints yTarget handling and add\n\tPWL support","Date":"Tue, 14 Oct 2025 16:24:15 +0200","Message-ID":"<20251014142427.3107490-1-stefan.klug@ideasonboard.com>","X-Mailer":"git-send-email 2.48.1","MIME-Version":"1.0","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":"Hi all,\n\nThis series introduces support for specifying the\nrelativeLuminanceTarget based on the current lux level by using a PWL\nfor the mapping. The typical use case is to ensure that images in a\nbright environment are regulated a tad brighter than images taken in a\ndark environment. This is a very subjective setting and should thereofre\nleft for the customer. Mainlining this feature was already tried here\n[1] but got rejected at that time because there was no direct user of\nit.  Meanwhile the lux algorithm got upstreamed and we have customers\nthat actually miss that feature. So I start another try of upstreaming\nit (Patches 1-2).\n\nDuring implementation it turned out that the yTarget of AGC constraints\nnever worked at all. So patches 3-4 fix that and also add PWL support\nfor the constraints which is sensible to do if we support it for the\nrelativeLuminanceTarget.\n\nBest regards,\nStefan\n\nStefan Klug (4):\n  ipa: libipa: pwl: Add swap() function\n  ipa: libipa: agc_mean_luminance: Change luminance target to piecewise\n    linear function\n  ipa: libipa: pwl: Add construction from initializer_list\n  ipa: libipa: agc_mean_luminance: Fix yTarget handling in constraints\n\n src/ipa/libipa/agc_mean_luminance.cpp | 113 ++++++++++++++++++++++----\n src/ipa/libipa/agc_mean_luminance.h   |  16 ++--\n src/ipa/libipa/pwl.cpp                |  25 ++++++\n src/ipa/libipa/pwl.h                  |   2 +\n src/ipa/rkisp1/algorithms/agc.cpp     |   1 +\n src/ipa/rkisp1/algorithms/wdr.cpp     |   3 +-\n 6 files changed, 136 insertions(+), 24 deletions(-)"}