[v8,23/26] ipa: software_isp: Call createSelfEnumeratingAlgorithm() to statically instantiate CCM algo
diff mbox series

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

Commit Message

Bryan O'Donoghue Dec. 12, 2025, 12:29 a.m. UTC
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 src/ipa/simple/soft_simple.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Milan Zamazal Dec. 12, 2025, 3:40 p.m. UTC | #1
Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes:

> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  src/ipa/simple/soft_simple.cpp | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp
> index 2bbe271d9..d5474bb7a 100644
> --- a/src/ipa/simple/soft_simple.cpp
> +++ b/src/ipa/simple/soft_simple.cpp
> @@ -137,6 +137,12 @@ int IPASoftSimple::init(const IPASettings &settings,
>  	if (ret)
>  		return ret;
>  
> +	if (context_.gpuIspEnabled && !data->contains("ccm")) {
> +		ret = createSelfEnumeratingAlgorithm(context_, std::string("Ccm"));
> +		if (ret)
> +			return ret;
> +	}

CCM doesn't work; the condition above is wrong.  The following works for
me:

  if (context_.gpuIspEnabled) {
  	const auto &list = (*data)["algorithms"].asList();
  	if (std::none_of(list.begin(), list.end(),
  			 [](const YamlObject &algorithm) { return algorithm.contains("Ccm"); })) {
  		ret = createSelfEnumeratingAlgorithm(context_, std::string("Ccm"));
  		if (ret)
  			return ret;
  	}
  }

> +
>  	*ccmEnabled = context_.ccmEnabled;
>  
>  	params_ = nullptr;
Bryan O'Donoghue Dec. 12, 2025, 4:18 p.m. UTC | #2
On 12/12/2025 15:40, Milan Zamazal wrote:
> CCM doesn't work; the condition above is wrong.  The following works for
> me:
> 

No, how.

I don't understand how that could have broken. Let me investigate.

---
bod
Bryan O'Donoghue Dec. 12, 2025, 4:19 p.m. UTC | #3
On 12/12/2025 16:18, Bryan O'Donoghue wrote:
> On 12/12/2025 15:40, Milan Zamazal wrote:
>> CCM doesn't work; the condition above is wrong.  The following works for
>> me:
>>
> 
> No, how.
> 
> I don't understand how that could have broken. Let me investigate.
> 
> ---
> bod

Pardon, you mean for using a YAML based CCM not an automatically 
generated identity CCM right ?

---
bod
Milan Zamazal Dec. 12, 2025, 5:47 p.m. UTC | #4
Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes:

> On 12/12/2025 16:18, Bryan O'Donoghue wrote:
>> On 12/12/2025 15:40, Milan Zamazal wrote:
>>> CCM doesn't work; the condition above is wrong.  The following works for
>>> me:
>>>
>> No, how.
>> I don't understand how that could have broken. Let me investigate.
>> ---
>> bod
>
> Pardon, you mean for using a YAML based CCM not an automatically generated identity CCM right ?

Right, when I want to use my CCM specified in uncalibrated.yaml with the
original patch, it doesn't work and the default matrix is used instead.

Patch
diff mbox series

diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp
index 2bbe271d9..d5474bb7a 100644
--- a/src/ipa/simple/soft_simple.cpp
+++ b/src/ipa/simple/soft_simple.cpp
@@ -137,6 +137,12 @@  int IPASoftSimple::init(const IPASettings &settings,
 	if (ret)
 		return ret;
 
+	if (context_.gpuIspEnabled && !data->contains("ccm")) {
+		ret = createSelfEnumeratingAlgorithm(context_, std::string("Ccm"));
+		if (ret)
+			return ret;
+	}
+
 	*ccmEnabled = context_.ccmEnabled;
 
 	params_ = nullptr;