[libcamera-devel] [PATCH v2 0/4] Switch RaspberryPi IPA to use std::chrono::duration

Naushir Patuck naush at raspberrypi.com
Thu May 20 17:17:10 CEST 2021


Hi,

Here is version 2 of the std::chrono::duration conversion patch.

Changes since v1:

- Added a helper Duration class in utils.h that provide the functionality needed
from std::chrono::duration.  I have named this class libcamera::utils::Duration.
However, there is an existing libcamera::utils::duration typedef which seems a
bit close for comfort.  I cannot think of a more suitable name (IpaDuration?),
so any suggestions would be helpful.

- Fixed all the minors pointed out by David's review.  David, I have removed
your tags for 1/4 and 4/4 since the changes from v1 are not entirely trivial.

Regards,
Naush

Naushir Patuck (4):
  libcamera: utils: Add helper class for std::chrono::duration
  ipa: raspberrypi: Switch ipa and cam_helper to use utils::Duration
  ipa: raspberrypi: Switch AgcAlgorithm API to use utils::Duration
  ipa: raspberrypi: Switch the AGC/Lux code to use utils::Duration

 include/libcamera/internal/utils.h            | 42 +++++++++
 src/ipa/raspberrypi/cam_helper.cpp            | 17 ++--
 src/ipa/raspberrypi/cam_helper.hpp            | 12 ++-
 .../raspberrypi/controller/agc_algorithm.hpp  |  9 +-
 src/ipa/raspberrypi/controller/agc_status.h   | 14 +--
 src/ipa/raspberrypi/controller/camera_mode.h  |  6 +-
 .../raspberrypi/controller/device_status.h    |  6 +-
 src/ipa/raspberrypi/controller/rpi/agc.cpp    | 88 +++++++++++--------
 src/ipa/raspberrypi/controller/rpi/agc.hpp    | 34 +++----
 src/ipa/raspberrypi/controller/rpi/lux.cpp    | 17 ++--
 src/ipa/raspberrypi/controller/rpi/lux.hpp    |  4 +-
 src/ipa/raspberrypi/raspberrypi.cpp           | 69 ++++++++-------
 src/libcamera/utils.cpp                       | 41 +++++++++
 13 files changed, 239 insertions(+), 120 deletions(-)

-- 
2.25.1



More information about the libcamera-devel mailing list