[libcamera-devel] "Software ISP" -- where to put it, neccessary hooks

Kieran Bingham kieran.bingham at ideasonboard.com
Wed Jul 5 19:05:55 CEST 2023


Quoting Pavel Machek via libcamera-devel (2023-06-30 14:25:18)
> Hi!
> 
> I'm looking for guidance. I have software-only auto-exposure code, but
> it is in wrong places. Code is at
> 
> https://gitlab.com/tui/libcamera/-/tree/hacks-ae?ref_type=heads
> 
> I tried to move the code to src/ipa/libipa/simple_ae.cpp , but I could
> not get the result to link if I did that.
> 
> Currently code is called from SimpleCameraData::bufferReady , is that
> okay thing to do?

So the tricky thing here is that you are trying to call libipa from a
pipeline handler - that's not quite right.

So we likely need to determine if the simple-pipeline handler should
(optionally?) instantiate an IPA module which can then incorporate the
software ISP implementation. I expect this would only instantiate and
use the IPA when a RAW sensor is connected.

I suspect we would have a new IPA under src/ipa/softisp/ which would do
the implementation of 3a using a CPU/GPU depending on resource
availability.

>From there any helpers that might be shared across IPA modules could
live in libipa, but anything that is specific to the new 'softisp' would
be under src/ipa/softisp/ ... so you would have
src/ipa/softisp/algorithms/cpu_ae.cpp perhaps.

> 
> My divideUpExposure code has origins in rapsberry pi code; I could not
> find a way to share it nicely so I cut&pasted. If there's a better way
> (or better code to reuse), I'd like to know.
> 

I believe code reuse from the RPi code is fine, but you would need to
ensure that the new code file matches the RPi IPA licence which is BSD I
believe.

--
Regards

Kieran


> Best regards,
>                                                                 Pavel
> -- 
> People of Russia, stop Putin before his war on Ukraine escalates.


More information about the libcamera-devel mailing list