[PATCH v6 17/18] libcamera: software_isp: Apply black level compensation

Pavel Machek pavel at ucw.cz
Sun Apr 21 23:33:05 CEST 2024


Hi!

> If we apply the per color lookup table (which does black-level compensation +
> color-gain + gamma-curve in 1 step) to the raw bayer data then we either need to
> do this on some extra copy before debayering or we need to do it multiple times
> per pixel before averaging the surrounding pixels, neither one of which is ideal.
> 
> I guess we could make the memcpy to temp buffer behavior done to deal with
> uncached mem mandatory (so always do this) and then first apply the rgb lookups
> to a just copied raw line before debayering, then we still only need to do
> this once per color. And this could also help wrt cache behavior of
> the

I believe that doing extra memcpy will hurt (but black-level during
memcpy will be free)

OTOH doing the pass at convenient time when data is already in L1
cache should be free, too.

Anyway, point to consider. If we are talking about correcting gammas
etc, we'll probably need to switch processing to 16-bit values. Those
sensors are pretty non-linear...

https://blog.brixit.nl/fixing-the-megapixels-sensor-linearization/

Anyway there's ton of work, and it would be good to get the basics
merged, first. For example, for digital photography, it is important
to do statistics and AAA algorithms, but not debayer...

Best regards,
								Pavel
-- 
People of Russia, stop Putin before his war on Ukraine escalates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20240421/62bb92c0/attachment.sig>


More information about the libcamera-devel mailing list