[{"id":37893,"web_url":"https://patchwork.libcamera.org/comment/37893/","msgid":"<0a24903c-29b1-41e0-8910-a117c47492ab@collabora.com>","date":"2026-01-22T17:56:21","subject":"Re: [PATCH v4 00/15] Simple pipeline IPA cleanup","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"The series seems to work well on multiple devices, including qcom ones \n(FP5, OP6, Pixel3a) and the Librem5, thanks!\n\nTested-by: Robert Mader<robert.mader@collabora.com>\n\nOn 22.01.26 17:19, Milan Zamazal wrote:\n> The simple pipeline image algorithms inappropriately mix various stuff\n> together.  For example, contrast and saturation processing is mixed with\n> CCM and LUT processing, algorithms cannot be disabled without making\n> software ISP malfunctioning and some \"algorithms\", like lookup table\n> construction, are not algorithms at all.\n>\n> This patch series introduces new algorithm Adjust for contrast,\n> saturation and gamma adjustments, moves lookup table construction to\n> debayering, separates CCM from the combined matrix (which includes white\n> balance and saturation adjustments), and cleans up some other things.\n>\n> Changes in v4:\n> - Remaining redundant <optional> include removed from adjust.h.\n> - Gamma value is reported in metadata.\n> - Contrast value is always reported in metadata.\n> - context.activeState.knobs.gamma is no longer std::optional.\n> - gpuIspEnabled removed from everywhere.\n> - Matrix comparison simplified as suggested by Barnabás.\n> - Multiple params_->combinedMatrix assignments replaced by a single one.\n> - Unused context.activeState.ccm removed.\n> - currentCcm_ wrapped by std::optional and ccmAssigned_ removed.\n> - kDefault* constants made constexpr.\n> - kDefaultContrast and kDefaultSaturation moved to adjust.cpp.\n> - Minor corrections in commit messages.\n>\n> Changes in v3:\n> - Rebased on the merged GPU ISP and adjusted for the changes there.\n> - A patch reverting enabling Ccm algorithm by GPU ISP added.\n>\n> Changes in v2:\n> - Commit message of \"Generalise tracking matrix changes\" improved a bit.\n> - correctionMatrix renamed to combinedMatrix.\n> - combinedMatrix initialisations fixed andMatrix::identity utilised.\n> - gamma made adjustable.\n> - Types of contrast, saturation, gamma set to float (from double in some\n>    places).\n> - Symbolic constants are used for contrast, saturation, gamma defaults.\n> - The gain matrix is applied directly in awb.cpp now.\n> - Lut \"algorithm\" removed; lookup tables construction moved to\n>    debayering.\n>\n> Milan Zamazal (15):\n>    libcamera: ipa: simple: Remove an unused include from awb.cpp\n>    libcamera: ipa: simple: Unwrap IPAFrameContext::ccm\n>    libcamera: ipa: simple: Generalize tracking matrix changes\n>    libcamera: ipa: simple: Rename \"ccm\" identifiers not specific to CCM\n>    libcamera: ipa: simple: Introduce a general correction matrix\n>    libcamera: ipa: simple: Initialise the general correction matrix\n>    libcamera: ipa: simple: Separate saturation from CCM\n>    libcamera: ipa: simple: Move contrast settings to adjust.cpp\n>    libcamera: ipa: simple: Make gamma adjustable\n>    libcamera: ipa: simple: Apply gain matrix in awb\n>    libcamera: ipa: simple: Use float type for adjustment controls\n>    libcamera: ipa: simple: Use symbolic constants for adjust defaults\n>    libcamera: ipa: simple: Set contrast metadata unconditionally\n>    libcamera: ipa: simple: Remove Lut algorithm\n>    libcamera: ipa: simple: Disable Ccm algorithm by default again\n>\n>   .../internal/software_isp/debayer_params.h    |  45 +----\n>   include/libcamera/ipa/soft.mojom              |   3 +-\n>   src/ipa/simple/algorithms/adjust.cpp          | 134 ++++++++++++++\n>   src/ipa/simple/algorithms/{lut.h => adjust.h} |  28 +--\n>   src/ipa/simple/algorithms/awb.cpp             |  14 +-\n>   src/ipa/simple/algorithms/ccm.cpp             |  80 ++------\n>   src/ipa/simple/algorithms/ccm.h               |  12 +-\n>   src/ipa/simple/algorithms/lut.cpp             | 174 ------------------\n>   src/ipa/simple/algorithms/meson.build         |   2 +-\n>   src/ipa/simple/data/uncalibrated.yaml         |  14 +-\n>   src/ipa/simple/ipa_context.h                  |  27 +--\n>   src/ipa/simple/soft_simple.cpp                |  13 +-\n>   src/libcamera/software_isp/debayer.cpp        | 172 +----------------\n>   src/libcamera/software_isp/debayer.h          |   8 -\n>   src/libcamera/software_isp/debayer_cpu.cpp    | 136 ++++++++++++--\n>   src/libcamera/software_isp/debayer_cpu.h      |  26 ++-\n>   src/libcamera/software_isp/debayer_egl.cpp    |  27 ++-\n>   src/libcamera/software_isp/software_isp.cpp   |  29 +--\n>   18 files changed, 370 insertions(+), 574 deletions(-)\n>   create mode 100644 src/ipa/simple/algorithms/adjust.cpp\n>   rename src/ipa/simple/algorithms/{lut.h => adjust.h} (57%)\n>   delete mode 100644 src/ipa/simple/algorithms/lut.cpp\n>","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 76766BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 17:56:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7B7D061FC9;\n\tThu, 22 Jan 2026 18:56:30 +0100 (CET)","from sender4-op-o12.zoho.com (sender4-op-o12.zoho.com\n\t[136.143.188.12])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8514761F84\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 18:56:28 +0100 (CET)","by mx.zohomail.com with SMTPS id 1769104582870334.43232380734526; \n\tThu, 22 Jan 2026 09:56:22 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"dFfJTSjL\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1769104584; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=Lf/f18uQL1VxyYGDzoe5V+cbVXUvIpZs/SS7ct6p4YoGlRczdh8Aa1mwTGdqi8Pts0oK18VtprURLkHrqHmuGwwixQpCKvPEKMzPzOrCE9x81K/Sj0NUu2LZelG0d7enuzbR3kBQ7p+KaXEsPzr4a0/keKIH7VgPZh4rxIW3JdE=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1769104584;\n\th=Content-Type:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc;\n\tbh=Af6l5UICXT0PMRfYna/aZjGE80/gny4U46DfZNnqCL4=; \n\tb=hXZDarPuSSN0IrPAnvz15/Wj4DV/EJQ3Lk0fQ9tJXwWcUK38NHveOuc2CEkW+o9tzv6npB+94849fxAi27hsNuUN0EhUlzrJH4kZN0g0epYN5odV89yJKTPonaDSSm1ow2cx7YszADw/Xl6vM2fZ2yRpxStLHYYU0fZEDuvh0Og=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1769104584;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Content-Type:Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Message-Id:Reply-To:Cc;\n\tbh=Af6l5UICXT0PMRfYna/aZjGE80/gny4U46DfZNnqCL4=;\n\tb=dFfJTSjLl1XhFtaKnrBSVGmvEmuW9Rj432Hp9kvS81jk4wA45B4vLutTGahRN/Gb\n\to3eSFHIy9HdE2WmTT/LYlAmBhStNJ15BxrB0sUjtImlGM3G8CA77li/MbqBRaU3kHZY\n\ttsWUP6WjPpBVufwwOfFkHek7E2atYmWYVY4bF8Gw=","Content-Type":"multipart/alternative;\n\tboundary=\"------------XiHKw6HNdU97YxMj0TfNhtc9\"","Message-ID":"<0a24903c-29b1-41e0-8910-a117c47492ab@collabora.com>","Date":"Thu, 22 Jan 2026 18:56:21 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 00/15] Simple pipeline IPA cleanup","To":"libcamera-devel@lists.libcamera.org","References":"<20260122161935.208562-1-mzamazal@redhat.com>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<20260122161935.208562-1-mzamazal@redhat.com>","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>"}}]