[v2,4/4] software_isp: debayer_cpu: Log input config from configure()
diff mbox series

Message ID 20260223160930.27913-5-johannes.goede@oss.qualcomm.com
State Superseded
Headers show
Series
  • software_isp: debayer_cpu: Add multi-threading support
Related show

Commit Message

Hans de Goede Feb. 23, 2026, 4:09 p.m. UTC
As shown by commit 94d32fdc55a3 ("pipeline: simple: Consider output sizes
when choosing pipe config"), the extra pixel columns CPU debayering
requires on the input side makes resolution selection non trivial.

Add logging of the selected input config on a successful configure() so
that the logs clearly show which sensor mode has been selected.

Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
---
 src/libcamera/software_isp/debayer_cpu.cpp | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Milan Zamazal Feb. 24, 2026, 10:42 a.m. UTC | #1
Hans de Goede <johannes.goede@oss.qualcomm.com> writes:

> As shown by commit 94d32fdc55a3 ("pipeline: simple: Consider output sizes
> when choosing pipe config"), the extra pixel columns CPU debayering
> requires on the input side makes resolution selection non trivial.
>
> Add logging of the selected input config on a successful configure() so
> that the logs clearly show which sensor mode has been selected.

Reviewed-by: Milan Zamazal <mzamazal@redhat.com>

I wonder whether it would be useful to have something similar in
debayer_egl.cpp.

> Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> ---
>  src/libcamera/software_isp/debayer_cpu.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp
> index ea1b17c1f..7c32c30d4 100644
> --- a/src/libcamera/software_isp/debayer_cpu.cpp
> +++ b/src/libcamera/software_isp/debayer_cpu.cpp
> @@ -603,6 +603,11 @@ int DebayerCpu::configure(const StreamConfiguration &inputCfg,
>  	}
>  	threads_[i]->configure(yStart, window_.height);
>  
> +	LOG(Debayer, Info)
> +		<< "Input " << inputCfg.size
> +		<< "-" << BayerFormat::fromPixelFormat(inputCfg.pixelFormat)
> +		<< " stride " << inputCfg.stride;
> +
>  	return 0;
>  }
Hans de Goede Feb. 24, 2026, 1:17 p.m. UTC | #2
Hi,

On 24-Feb-26 11:42, Milan Zamazal wrote:
> Hans de Goede <johannes.goede@oss.qualcomm.com> writes:
> 
>> As shown by commit 94d32fdc55a3 ("pipeline: simple: Consider output sizes
>> when choosing pipe config"), the extra pixel columns CPU debayering
>> requires on the input side makes resolution selection non trivial.
>>
>> Add logging of the selected input config on a successful configure() so
>> that the logs clearly show which sensor mode has been selected.
> 
> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
> 
> I wonder whether it would be useful to have something similar in
> debayer_egl.cpp.

That is a good point. I'll modify this for v3 to also add similar
logging to debayer_egl.cpp .

Regards,

Hans



>> Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
>> ---
>>  src/libcamera/software_isp/debayer_cpu.cpp | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp
>> index ea1b17c1f..7c32c30d4 100644
>> --- a/src/libcamera/software_isp/debayer_cpu.cpp
>> +++ b/src/libcamera/software_isp/debayer_cpu.cpp
>> @@ -603,6 +603,11 @@ int DebayerCpu::configure(const StreamConfiguration &inputCfg,
>>  	}
>>  	threads_[i]->configure(yStart, window_.height);
>>  
>> +	LOG(Debayer, Info)
>> +		<< "Input " << inputCfg.size
>> +		<< "-" << BayerFormat::fromPixelFormat(inputCfg.pixelFormat)
>> +		<< " stride " << inputCfg.stride;
>> +
>>  	return 0;
>>  }
>
Barnabás Pőcze Feb. 24, 2026, 1:19 p.m. UTC | #3
2026. 02. 24. 14:17 keltezéssel, Hans de Goede írta:
> Hi,
> 
> On 24-Feb-26 11:42, Milan Zamazal wrote:
>> Hans de Goede <johannes.goede@oss.qualcomm.com> writes:
>>
>>> As shown by commit 94d32fdc55a3 ("pipeline: simple: Consider output sizes
>>> when choosing pipe config"), the extra pixel columns CPU debayering
>>> requires on the input side makes resolution selection non trivial.
>>>
>>> Add logging of the selected input config on a successful configure() so
>>> that the logs clearly show which sensor mode has been selected.
>>
>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
>>
>> I wonder whether it would be useful to have something similar in
>> debayer_egl.cpp.
> 
> That is a good point. I'll modify this for v3 to also add similar
> logging to debayer_egl.cpp .

Would it not be better to add it in `SoftwareIsp::configure()`?
I have not checked the details, but I believe it should work.


> 
> Regards,
> 
> Hans
> 
> 
> 
>>> Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
>>> ---
>>>   src/libcamera/software_isp/debayer_cpu.cpp | 5 +++++
>>>   1 file changed, 5 insertions(+)
>>>
>>> diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp
>>> index ea1b17c1f..7c32c30d4 100644
>>> --- a/src/libcamera/software_isp/debayer_cpu.cpp
>>> +++ b/src/libcamera/software_isp/debayer_cpu.cpp
>>> @@ -603,6 +603,11 @@ int DebayerCpu::configure(const StreamConfiguration &inputCfg,
>>>   	}
>>>   	threads_[i]->configure(yStart, window_.height);
>>>   
>>> +	LOG(Debayer, Info)
>>> +		<< "Input " << inputCfg.size
>>> +		<< "-" << BayerFormat::fromPixelFormat(inputCfg.pixelFormat)
>>> +		<< " stride " << inputCfg.stride;
>>> +
>>>   	return 0;
>>>   }
>>
>
Hans de Goede Feb. 24, 2026, 6:43 p.m. UTC | #4
Hi,

On 24-Feb-26 14:19, Barnabás Pőcze wrote:
> 2026. 02. 24. 14:17 keltezéssel, Hans de Goede írta:
>> Hi,
>>
>> On 24-Feb-26 11:42, Milan Zamazal wrote:
>>> Hans de Goede <johannes.goede@oss.qualcomm.com> writes:
>>>
>>>> As shown by commit 94d32fdc55a3 ("pipeline: simple: Consider output sizes
>>>> when choosing pipe config"), the extra pixel columns CPU debayering
>>>> requires on the input side makes resolution selection non trivial.
>>>>
>>>> Add logging of the selected input config on a successful configure() so
>>>> that the logs clearly show which sensor mode has been selected.
>>>
>>> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
>>>
>>> I wonder whether it would be useful to have something similar in
>>> debayer_egl.cpp.
>>
>> That is a good point. I'll modify this for v3 to also add similar
>> logging to debayer_egl.cpp .
> 
> Would it not be better to add it in `SoftwareIsp::configure()`?
> I have not checked the details, but I believe it should work.

Ack, good idea and just in time while I'm putting the finishing
touches in place for v3 :)

Regards,

Hans





>>>> Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
>>>> ---
>>>>   src/libcamera/software_isp/debayer_cpu.cpp | 5 +++++
>>>>   1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp
>>>> index ea1b17c1f..7c32c30d4 100644
>>>> --- a/src/libcamera/software_isp/debayer_cpu.cpp
>>>> +++ b/src/libcamera/software_isp/debayer_cpu.cpp
>>>> @@ -603,6 +603,11 @@ int DebayerCpu::configure(const StreamConfiguration &inputCfg,
>>>>       }
>>>>       threads_[i]->configure(yStart, window_.height);
>>>>   +    LOG(Debayer, Info)
>>>> +        << "Input " << inputCfg.size
>>>> +        << "-" << BayerFormat::fromPixelFormat(inputCfg.pixelFormat)
>>>> +        << " stride " << inputCfg.stride;
>>>> +
>>>>       return 0;
>>>>   }
>>>
>>
>

Patch
diff mbox series

diff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp
index ea1b17c1f..7c32c30d4 100644
--- a/src/libcamera/software_isp/debayer_cpu.cpp
+++ b/src/libcamera/software_isp/debayer_cpu.cpp
@@ -603,6 +603,11 @@  int DebayerCpu::configure(const StreamConfiguration &inputCfg,
 	}
 	threads_[i]->configure(yStart, window_.height);
 
+	LOG(Debayer, Info)
+		<< "Input " << inputCfg.size
+		<< "-" << BayerFormat::fromPixelFormat(inputCfg.pixelFormat)
+		<< " stride " << inputCfg.stride;
+
 	return 0;
 }