Soft ISP TODO list (was: Re: [PATCH v6 17/18] libcamera: software_isp: Apply black level compensation)
Pavel Machek
pavel at ucw.cz
Mon Apr 22 21:28:08 CEST 2024
Hi!
> > > - Or if we add support for non-linear gains, as mentioned by Pavel.
>
> Sensors are mostly linear these days. That is, until they reach
> saturation of course. I don't think the soft ISP needs a linearization
> LUT.
That's not what Martijn measured:
https://blog.brixit.nl/fixing-the-megapixels-sensor-linearization/
Librem 5 is reasonably modern.
Basically it is linear in 0..70% range, and then it is linear again in
90%..100% range, but at different slope. Take a look, it is fun article.
> > > - If we split the processing to pre-bayer and post-bayer parts, we should
> > > probably work with uint16_t or float's, which may have impact on performance.
> > >
> > > - Pavel couldn't get a better performance by using SIMD CPU instructions for
> > > debayering. Applying a CCM matrix may be a different matter. Anyway, SIMD on
> > > CPU is hard to use and may differ on architectures, so the question is whether
> > > it's worth to invest into it.
>
> Good question :-)
Oh, so good news is you write SIMD code once with gcc intristics, and
gcc does its magic. You don't have to know assembly for that, but it
certainly helps to look at the assembly if it looks reasonable.
(Debayering needs too much of byte shuffling to work well with SIMD
extensions. Matrix multiply could be better, but I'm not sure if 3x3
matrix is big enough to get advantage).
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/20240422/8ec9ad01/attachment.sig>
More information about the libcamera-devel
mailing list