[0/3] ipa: rkisp1: Honor FrameDurationLimits
mbox series

Message ID 20241014154747.2295253-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • ipa: rkisp1: Honor FrameDurationLimits
Related show

Message

Kieran Bingham Oct. 14, 2024, 3:47 p.m. UTC
The RKISP1 will presently only adhere to the 'Maximum'
FrameDurationLimit, which describes the 'slowest' frame rate allowed.

Pauls' work here in "rkisp1: Honor the FrameDurationLimits control" adds
support for ensuring that the 'Minimum' FrameDurationLimit can also be
used to specify a limit for the 'fastest' frame rate that is acceptable.

This allows for instance setting a camera to operate only between 10FPS
or 1FPS with a capture script such as :

frames:
  - 0:
      FrameDurationLimits: [ 100000, 1000000]

which is how I have tested this.

I've taken Paul's patch from a separate branch and made some
modifications here to support initialising the FrameDurationLimits in
the AGC implementation from the ControlInfoMap when constructed or
updated.

This clears out a todo in the agc.cpp (\o/) and hopefully simplifies the
vblank calculation.

An extra patch ("ipa: rkisp1: Alias lineDuration") helps make this
addition easier to parse with smaller line lengths on the repeated use
of the Line Duration calculaion.

Kieran Bingham (2):
  ipa: rkisp1: Initialise AGC from FrameDurationLimits controls
  ipa: rkisp1: Alias lineDuration

Paul Elder (1):
  rkisp1: Honor the FrameDurationLimits control

 src/ipa/rkisp1/algorithms/agc.cpp        | 68 ++++++++++++++++--------
 src/ipa/rkisp1/ipa_context.cpp           | 16 +++++-
 src/ipa/rkisp1/ipa_context.h             |  4 ++
 src/ipa/rkisp1/rkisp1.cpp                |  7 +--
 src/libcamera/pipeline/rkisp1/rkisp1.cpp |  7 +++
 5 files changed, 77 insertions(+), 25 deletions(-)