{"id":25122,"url":"https://patchwork.libcamera.org/api/patches/25122/?format=json","web_url":"https://patchwork.libcamera.org/patch/25122/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20251120232019.3590-22-bryan.odonoghue@linaro.org>","date":"2025-11-20T23:20:18","name":"[21/22] libcamera: software_isp: lut: Make gamma from lut.cpp available in debayer params","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"e307ee87de5639625c65fc3d0510b5f057652826","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25122/mbox/","series":[{"id":5599,"url":"https://patchwork.libcamera.org/api/series/5599/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5599","date":"2025-11-20T23:19:57","name":"GPUISP precursor series","version":1,"mbox":"https://patchwork.libcamera.org/series/5599/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25122/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25122/checks/","tags":{},"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 58F28C3330\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Nov 2025 23:21:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1663E60ABB;\n\tFri, 21 Nov 2025 00:21:06 +0100 (CET)","from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9348F60ABD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 00:21:01 +0100 (CET)","by mail-wm1-x32d.google.com with SMTP id\n\t5b1f17b1804b1-47774d3536dso11139105e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Nov 2025 15:21:01 -0800 (PST)","from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-477bf3af0ecsm11618415e9.9.2025.11.20.15.20.59\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 20 Nov 2025 15:20:59 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"jrO4mKcL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1763680861; x=1764285661;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=DnTn9MIz19IX9mj9lajM91BQDHALRtnXvR7P8cLPuio=;\n\tb=jrO4mKcLQFwyr8TTZTt/m1zoHG4oPOC/xfAS+O9IicGbngTcWzOe4XiPBvdoxvnC1n\n\tkdKS8Yt3Ji4iKslJ6vNH906rwqzhKmiRuGADnH9Z9BxzEi4E4PNHZVKa6yPezeHpijLG\n\tMJPALcVdEWp3W51Jesr8VtuzrQw7z5ar5vKdwDIfkDjOk/CD446KKzLenAzBKDwgUzbP\n\tmTycJfewVriYRrLNSsjsqPH25qufK5EDpYCDWtwMwpoTQeqG1JI8QG8OBEzqf//t6xc3\n\tsTsKSrRB8NPF15jnNsvu+Hrd9qSUKx4OG1SFdJOYFpsK3qs0smy1RqSWDo3hSJdp9Baa\n\talSw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1763680861; x=1764285661;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=DnTn9MIz19IX9mj9lajM91BQDHALRtnXvR7P8cLPuio=;\n\tb=JGiWlJ4r8pzpBO7kCBhE5qY0nJ2Rb8AeGPK6mf+QWSjCGUViLDpmEIXtQ92ek92kRH\n\tPOT4DJj0C+lC39CYGW1HbE5en3FXJz6LV775sIXoVddTSiRuuBEPe/OzkfY3BBtcMfDh\n\t4StpivcM0Fhy7+CBmBZxwPXI7jZh9thqqJrWbknsr5cEwMqQJDMmUlGddtAySO8tUD3x\n\t6oZLpK4nD1DpR5FmiqIcIiVDRKr0dt3LS6emzhXxWpsQPCLDtcXkX9ANZrq1f56X/tqW\n\tCIrIWsESxtwmZJpDym2sTp/cgn+qdC30Hbi/yTBz1xQk1Upw4NUj0087rQO3E0niWVxq\n\tZASA==","X-Gm-Message-State":"AOJu0YzBUuGZArb9KX2wvSupfqsCOtUOW1kacbLnFBxEBOMWITHRdKSr\n\tiEuofZyxRb1LnxeXAu/QGDgJi6Tw5oTWYjlbVy/OT9+MJjD7LwM1PtYmTis0HCllJ6IbksE52C0\n\t0LIA3AUs=","X-Gm-Gg":"ASbGncvpXUgD1uCI1GZZyYuozyAsBr/0gZ8CyVI8P5GOqp3TxDnTIsDqHnBjZEg0/Y5\n\tkyx/AOpgCfjJ5kLFsWPOmQpNQ6sLbch4dxqj7cd//4whZM2sQPX7KlsYUzUECkGMB4uisQj9eB1\n\tgsNEY9ix6PVg/xtLkKWprq/f4I3PV1w2pBdoc242H+zQgJ1bpXbS5rR2ljQ9e+XnsaWjFSmEIKO\n\taji3Pc0DP/EYZzhD7IS9I6HHHIjvxujra2mnuuHH+WWVqcU2MQ9Ptw/VwD5zBDf3/LtI3QGQUuY\n\tW/Yt1ElLuxYjtJ/3lSoLgvXc1d3rG5/zB5uuNiaV/WHJG34ibeidOBJjcOmmqNzspDK2vmnUFtZ\n\tMOnKItprDkc8FMG18jA3CeeW7J4fECTFEwYV3veKfBJ7/101eEp9aOd+QOuPpzHGf0xveb0Fy+D\n\tzFmrvB3sB/MejjafRBRMcA7aSeZxLCUa4SAZkXOsEhRAH145SrAT3NnW8StLTB1o2ecyW8bPn4G\n\tLnNAA==","X-Google-Smtp-Source":"AGHT+IE54obcrC+Moe3y9r3lQaz+IxsTfaJoGEJ6kIA5RVi9TZvnrvDGzc6cfT8X6onDUlk2lHcBHw==","X-Received":"by 2002:a05:600c:4685:b0:475:ddad:c3a9 with SMTP id\n\t5b1f17b1804b1-477c052f04bmr2491925e9.13.1763680860764; \n\tThu, 20 Nov 2025 15:21:00 -0800 (PST)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>","Subject":"[PATCH 21/22] libcamera: software_isp: lut: Make gamma from lut.cpp\n\tavailable in debayer params","Date":"Thu, 20 Nov 2025 23:20:18 +0000","Message-ID":"<20251120232019.3590-22-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.51.2","In-Reply-To":"<20251120232019.3590-1-bryan.odonoghue@linaro.org>","References":"<20251120232019.3590-1-bryan.odonoghue@linaro.org>","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":"Provide the gamma used in IPA to Bayer parameters. We will pass Gamma into\nthe shader via a uniform and can then tweak that value from outside at\nwill.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n include/libcamera/internal/software_isp/debayer_params.h | 5 +++++\n src/ipa/simple/algorithms/lut.cpp                        | 2 ++\n 2 files changed, 7 insertions(+)","diff":"diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h\nindex 1a319833c..5f340a7a6 100644\n--- a/include/libcamera/internal/software_isp/debayer_params.h\n+++ b/include/libcamera/internal/software_isp/debayer_params.h\n@@ -62,6 +62,11 @@ struct DebayerParams {\n \t * Per frame blacklevel gains calculated by the IPA\n \t */\n \tRGB<float> blackLevel;\t\t/**< Blacklevel gains for GPUISP */\n+\n+\t/*\n+\t * Gamma value as provided by the IPA\n+\t */\n+\tfloat gamma;\t\t\t/**< Gamma for GPUISP */\n };\n \n } /* namespace libcamera */\ndiff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\nindex 49482d711..ea5a86b20 100644\n--- a/src/ipa/simple/algorithms/lut.cpp\n+++ b/src/ipa/simple/algorithms/lut.cpp\n@@ -147,6 +147,8 @@ void Lut::prepare(IPAContext &context,\n \t\t\tparams->gammaLut[i] = gammaTable[i / div];\n \t\t}\n \t}\n+\n+\tparams->gamma = context.configuration.gamma;\n }\n \n void Lut::process([[maybe_unused]] IPAContext &context,\n","prefixes":["21/22"]}