[libcamera-devel,v3,0/3] IPAFrameContext Ring buffer
mbox series

Message ID 20220517191833.333122-1-umang.jain@ideasonboard.com
Headers show
Series
  • IPAFrameContext Ring buffer
Related show

Message

Umang Jain May 17, 2022, 7:18 p.m. UTC
Changes in v3:
- IMP: Moving away from queue to a Ring Buffer
- Patch 1/3 is largely unchanged
- Patch 2/3 is a advance preparatory patch for 3/3. Since we'll have
  a ring-buffer i.e. multiple IPAFrameContexts - Algorithm::process()
  will need to know which IPAFrameContext to use for processing.
- In 3/3, we now use a Ring buffer instead of a queue for
  frame-contexts. Also extend the IPAFrameContext structure
  to contain a ControlList (copying incoming request controls).

Changes in v2:
- Majorly change the interpretation of Frame context
  Currently, everything is stored in a single struct i.e.
  IPAFrameContext. It reflects the current state of the algorithms
  and also stores values required to prepare frame metadata.
  Split these two things in separate containters IPAActiveState
  and IPAFrameContext.
- The above design helps to rid of prevFrameContext and nextFrameContext
  concepts as they can get error=prone easily.
- Have a queue of IPAFrameContexts which is holding members per-frame
  related /only/. All algorithm current (or active) state values go in
  IPAActiveState which is independently updated by the algorithms.

Umang Jain (3):
  ipa: ipu3: Rework IPAFrameContext
  ipa: libipa: Add frame context pointer in process()
  ipa: ipu3: Put IPAFrameContext(s) in a ring buffer

 src/ipa/ipu3/algorithms/af.cpp           |  46 +++++-----
 src/ipa/ipu3/algorithms/af.h             |   3 +-
 src/ipa/ipu3/algorithms/agc.cpp          |  36 ++++----
 src/ipa/ipu3/algorithms/agc.h            |   9 +-
 src/ipa/ipu3/algorithms/algorithm.h      |   4 +-
 src/ipa/ipu3/algorithms/awb.cpp          |  19 ++--
 src/ipa/ipu3/algorithms/awb.h            |   3 +-
 src/ipa/ipu3/algorithms/tone_mapping.cpp |  13 +--
 src/ipa/ipu3/algorithms/tone_mapping.h   |   3 +-
 src/ipa/ipu3/ipa_context.cpp             | 108 +++++++++++++++--------
 src/ipa/ipu3/ipa_context.h               |  28 ++++--
 src/ipa/ipu3/ipu3.cpp                    |  33 ++++---
 src/ipa/libipa/algorithm.cpp             |   1 +
 src/ipa/libipa/algorithm.h               |   4 +-
 src/ipa/rkisp1/algorithms/agc.cpp        |   4 +-
 src/ipa/rkisp1/algorithms/agc.h          |   3 +-
 src/ipa/rkisp1/algorithms/algorithm.h    |   4 +-
 src/ipa/rkisp1/algorithms/awb.cpp        |   4 +-
 src/ipa/rkisp1/algorithms/awb.h          |   3 +-
 src/ipa/rkisp1/rkisp1.cpp                |   2 +-
 20 files changed, 203 insertions(+), 127 deletions(-)