[libcamera-devel] [PATCH 0/4] Raspberrypi: FrameDurations control refinements

Naushir Patuck naush at raspberrypi.com
Thu Jan 21 12:58:45 CET 2021


Hi,

I'm sure you all have had enough fatigue with frame rate patches from me, so just to make your day even better, here are some more :-)

This set of patches address feedback points raised for the previous patch set. As discussed, these changes have been in my back pocket for a while, I just wanted to wait for the previous series to be merged before introducing them.

Some further details:
Patch 1/4 fixes a small issue where we get a warning log point when the control values get initialised.

Patch 2/4 clamps application provided frame duration with what the sensor mode can support.  It also addresses the \todo to return out the clamped values in metadata.

Patch 3/4 links the maximum frame duration with AGC.  The AGC now knows what the maximum allowable shutter speed is, so it can do the relevant calculations more optimally.

Patch 4/4 might need a bit more context.  It works around the problem of setting VBLANK and EXPOSURE through V4L2 at the same time.  Of course, StaggeredCtrl is going to be deprecated, but it does provide an idea of what to do in DelayedCtrl to fix the problem.  Depending on how things go, DelayedCtrl may be merged before this.  In this case, patch 4/4 does not need merging, and the functionality in this change should eventually be ported across.  Either way, there is no hard restriction on DelayedCtrl to have this in place straight away, as the Raspberry Pi will just about cope without it to start with - you may notice ever so slight AGC oscillations if you look for them.

As always, any and all feedback is appreciated.

Many thanks,
Naush

Naushir Patuck (4):
  raspberrypi: Add the correct integer const postfix for FrameDurations
  ipa: raspberrypi: Limit the calculated vblank based on the sensor mode
  ipa: raspberrypi: Pass the maximum allowable shutter speed into the
    AGC
  pipeline: raspberrypi: Add notion of immediate write to StaggeredCtrl

 include/libcamera/ipa/raspberrypi.h           |  2 +-
 src/ipa/raspberrypi/cam_helper.cpp            | 16 ++---
 src/ipa/raspberrypi/cam_helper.hpp            |  5 +-
 src/ipa/raspberrypi/cam_helper_imx219.cpp     |  6 +-
 src/ipa/raspberrypi/cam_helper_imx477.cpp     |  4 +-
 src/ipa/raspberrypi/cam_helper_ov5647.cpp     |  4 +-
 .../raspberrypi/controller/agc_algorithm.hpp  |  1 +
 src/ipa/raspberrypi/controller/camera_mode.h  |  2 +
 src/ipa/raspberrypi/controller/rpi/agc.cpp    | 49 +++++++++----
 src/ipa/raspberrypi/controller/rpi/agc.hpp    |  2 +
 src/ipa/raspberrypi/raspberrypi.cpp           | 68 ++++++++++++++-----
 .../pipeline/raspberrypi/raspberrypi.cpp      | 11 ++-
 .../pipeline/raspberrypi/staggered_ctrl.cpp   | 39 ++++++++---
 .../pipeline/raspberrypi/staggered_ctrl.h     |  3 +-
 14 files changed, 142 insertions(+), 70 deletions(-)

-- 
2.25.1



More information about the libcamera-devel mailing list