[libcamera-devel] libcamera on Librem 5, phase detection auto focus

Pavel Machek pavel at ucw.cz
Mon Nov 21 17:04:21 CET 2022


Hi!

> > I'm playing with camera on Librem 5. So far I added af/ae/awb support
> > to millipixels done completely in software, but I guess libcamera
> > would be more suitable place for it. If you have some hints/example
> > where to look at, it would be nice.
> 
> The area you are looking at is essentially doing the role of a software
> based ISP processor. It would be a component that a pipeline handler
> could choose to instantiate, to support any algorithms that use the data
> you produce. It can be difficult to produce 'generic' data that any IPA
> (where the algorithms would reside) could consume, so I think it would
> end up with a paired 'software ISP' and corresponding implementation in
> an IPA...

> But how that would fit in the libcamera design would need further
> consideration ... falling back to software ISP ... should really be
> avoided ... but perhaps there's benefits for early bring up - or simply
> being able to manage a simple way of getting AWB/AE for raw streams,
> without an ISP (as we have on the RKISP1), so I think it has some
> value.

> Ideally - we shouldn't rely on the CPU where possible though, and that's
> why several people have been looking at a GPU/OpenGL based option. I
> could imagine a software fallback would be a part of that pairing of
> SoftwareISP component.

I view ISP processors as special purpose hardware accelerators. I
agree they have some advantages (lower power, for example), but I
believe reference implementation on CPU will be useful. (More
flexible, easy to understand, works w/o drivers, ...)

I'm not sure if GPU is good option. It is certainly not good for me,
as I can't program them. More important, I believe ISP tasks are (or
can be, depending on quality) not that computationaly intensive, CPU
is going to be limited by memory bandwidth and GPU is not going to
help much.

For higher-quality debayer (etc), yes, maybe GPU makes sense. What I'd
really like to see is JPEG or MP4 encoding on GPU -- that looks
like too much computation for CPUs in phones (for 1080p 30fps).

> I think that requires support from the sensor vendor.

:-(.

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/20221121/1ff44da7/attachment.sig>


More information about the libcamera-devel mailing list