[libcamera-devel] [PATCH 00/11] libcamera: introduce Software ISP and Software IPA
Hans de Goede
hdegoede at redhat.com
Mon Dec 18 18:09:12 CET 2023
Hi,
On 12/18/23 11:05, Hans de Goede wrote:
<snip>
>> f8efb3be ("libcamera: software_isp: fix AWB algorithm not to increase luminance") makes the luminance not to change
>> due to the colour gains applied. This improves the image a bit (makes it a bit less bright), but the effect
>> is relatively small - within 10% depending on the light and the objects in the particular image. This change
>> increases the load on CPU, so I am not sure if this image improvement is worth this higher CPU utilization.
>
> Interesting since we have r g b lookup tables already the extra CPU load is only
> in generating the green table
> once per frame, the load of that should be negligible.
>
> And with the separate gamma lookup we can then also give the gamma-lookup table a bit
> more precision giving it 1024 entries. The impact of this on performance should be
> minimal.
Quick remark on this fix, I had to change the y256 type from unsigned int to unsigned long
because with a FHD sensor 256 * averagesum of ~700000 pixels does not fit in 32 bits.
I have a WIP branch with your 3 improvements (with 1024 gamma entries) squashed in
here:
https://github.com/jwrdegoede/libcamera/commits/SoftwareISP-v04
Note I regularly do forced pushes there as I keep refining things.
Regards,
Hans
>
>> f5906f15 ("[DNI] libcamera: software_isp: print colour gains to the log") prints the colour gains to the console
>> so that one could see the effect of the previous patch - without it the green gain would always be 256, and the
>> other two gains would increase in the same proportion. E.g. "gains R/G/B = 253/240/406" would become
>> "gains R/G/B = 270/256/433" without commit f8efb3be.
>
> I think we probably want something like this (but then in the IPA once the AWB calculations
> have moved there) and then using a log-level of debug. Doing a debug log once per frame
> should have no performance impact when debug logging is disabled.
>
> Regards,
>
> Hans
>
More information about the libcamera-devel
mailing list