[v3,23/39] libcamera: software_isp: lut: Make gain corrected CCM in lut.cpp available in debayer params
diff mbox series

Message ID 20251015012251.17508-24-bryan.odonoghue@linaro.org
State New
Headers show
Series
  • Add GLES 2.0 GPUISP to libcamera
Related show

Commit Message

Bryan O'Donoghue Oct. 15, 2025, 1:22 a.m. UTC
There is another CCM calculated in this algorithm callback, this time based
on the LUT.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 src/ipa/simple/algorithms/lut.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Kieran Bingham Oct. 15, 2025, 10:49 p.m. UTC | #1
Quoting Bryan O'Donoghue (2025-10-15 02:22:35)
> There is another CCM calculated in this algorithm callback, this time based
> on the LUT.
> 

Please squash this into patch 
[PATCH v3 18/39] libcamera: software_isp: debayer: Extend DebayerParams struct to hold a copy of per-frame CCM values

as well so we can see the handling of the params->ccm altogether to
better understand the whole usage and implications.

> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  src/ipa/simple/algorithms/lut.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp
> index d1d5f727..a161adb1 100644
> --- a/src/ipa/simple/algorithms/lut.cpp
> +++ b/src/ipa/simple/algorithms/lut.cpp
> @@ -126,6 +126,7 @@ void Lut::prepare(IPAContext &context,
>                 auto &red = params->redCcm;
>                 auto &green = params->greenCcm;
>                 auto &blue = params->blueCcm;
> +               params->ccm = ccm;
>                 for (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {
>                         red[i].r = ccmValue(i, ccm[0][0]);
>                         red[i].g = ccmValue(i, ccm[1][0]);
> -- 
> 2.51.0
>
Milan Zamazal Oct. 16, 2025, 11:34 a.m. UTC | #2
Kieran Bingham <kieran.bingham@ideasonboard.com> writes:

> Quoting Bryan O'Donoghue (2025-10-15 02:22:35)
>> There is another CCM calculated in this algorithm callback, this time based
>> on the LUT.
>> 
>
> Please squash this into patch 
> [PATCH v3 18/39] libcamera: software_isp: debayer: Extend DebayerParams struct to hold a copy of per-frame CCM
> values
>
> as well so we can see the handling of the params->ccm altogether to
> better understand the whole usage and implications.

+1

>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> ---
>>  src/ipa/simple/algorithms/lut.cpp | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp
>> index d1d5f727..a161adb1 100644
>> --- a/src/ipa/simple/algorithms/lut.cpp
>> +++ b/src/ipa/simple/algorithms/lut.cpp
>> @@ -126,6 +126,7 @@ void Lut::prepare(IPAContext &context,
>>                 auto &red = params->redCcm;
>>                 auto &green = params->greenCcm;
>>                 auto &blue = params->blueCcm;
>> +               params->ccm = ccm;
>>                 for (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {
>>                         red[i].r = ccmValue(i, ccm[0][0]);
>>                         red[i].g = ccmValue(i, ccm[1][0]);
>> -- 
>> 2.51.0
>>

Patch
diff mbox series

diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp
index d1d5f727..a161adb1 100644
--- a/src/ipa/simple/algorithms/lut.cpp
+++ b/src/ipa/simple/algorithms/lut.cpp
@@ -126,6 +126,7 @@  void Lut::prepare(IPAContext &context,
 		auto &red = params->redCcm;
 		auto &green = params->greenCcm;
 		auto &blue = params->blueCcm;
+		params->ccm = ccm;
 		for (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {
 			red[i].r = ccmValue(i, ccm[0][0]);
 			red[i].g = ccmValue(i, ccm[1][0]);