libcamera, Librem 5 and autofocus
Pavel Machek
pavel at ucw.cz
Thu Apr 10 10:10:23 CEST 2025
Hi!
First, thanks for feedback.
> > I played a bit with libcamera on Librem 5, and got autofocus to work
> > (slowly!) on Librem 5. I'll be likely busy with other stuff in next
> > weeks, so I thought I'd share the results.
> >
> > The tree is at
> > https://gitlab.com/tui/libcamera/-/commits/l5?ref_type=heads . And no,
> > patches are not yet in ready to merge state.
> >
> > What might be interesting:
> >
> > ad88b0bc9d46cd825873f3c16dd81ba7979384d7 -- that's port of autofocus
> > tree to recent libcamera.
> >
> > Other "af: " patches -- original AF code expected YUV data, this ports
> > it to Bayer8. Needs more work, but if you are using bayer, this should
> > be good start.
>
> I'm curious, have you measured how much CPU time the AF statistics
> gathering takes ? And do you have an idea on how easy or difficult it
> would be to offload that computation to a GPU ?
I have little experience with GPUs, but the AF statistics is not
likely good candidate. There's a tradeoff between speed and quality
there, and I suspect we can simply collect statistics over smaller
area and still get good results. Plus, compared to debayering, it is
really quite cheap.
> On a side note, I want a universal container format to store images
> :-)
Well, that's easy... tiff is really universal with its tag/value
scheme. Unfortunately, viewers can't really support tags they don't
know. There's pam, but not as flexible and has same problem.
Other option would be to just store raw data in file called
xxx.1024x768.BRRG (or .NV12 or .ARGB8888 or ...) and have viewer parse
filenames to display that. It means limited place to store metadata,
but...
Best regards,
Pavel
--
I don't work for Nazis and criminals, and neither should you.
Boycott Putin, Trump, and Musk!
-------------- 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/20250410/100e2834/attachment.sig>
More information about the libcamera-devel
mailing list