[libcamera-devel] apply methods in IPARPi

Sebastian Fricke sebastian.fricke at posteo.net
Wed May 5 20:08:31 CEST 2021


Hello Naushir and David,

I am currently performing a lot of investigation and preparatory work
for a few generalizations in form of an IPAFramework class, that reuses
some of the great concepts you introduced to libcamera. Along the way I
noticed, that you have implemented the apply methods (applyAGC, applyAWB,
etc.) as part of the IPARPi class.

I was wondering if it would be possible to move those to the controller
and specific algorithm implementation, as they mostly get the status from
the algorithm, perform a few calculations with it and insert the results
of those calculations into the ISP controls.

The upside of doing so, from my point of view, would be that we could
call `apply` similar to the way we call `initialize`, `process` and
`prepare`.
That way, I would be able to generalize the whole step of applying the
algorithm status to a set of controls, which can then be used for setting
the ISP controls.
Now, the reason why I ask you is that I want to be sure, that I didn't
miss a key concept.

--

Additionally, off-topic to the topic mentioned above. While
investigating the RPiStream abstraction, I noticed the following comment
within: `rpi_stream.cpp`:116
```
  * A nullptr buffer implies an external stream, but no external
  * buffer has been supplied in the Request. So, pick one from the
  * availableBuffers_ queue.
  ```

  And within `rpi_steam.h`:139
  ```
  * A nullptr indicates any internal buffer can be used (from availableBuffers_),
  * whereas a valid pointer indicates an external buffer to be queued.
  ```

  Which confused me a little bit, could you enlighten me in this matter?
  Does a nullptr buffer imply an external stream and therefore an
  external buffer? Or does a nullptr buffer imply an internal buffer and
  therefore an internal stream?

  Greetings,
  Sebastian


More information about the libcamera-devel mailing list