diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2021-02-01 12:56:33 +0000 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-02-05 00:05:07 +0200 |
commit | e81f9046caa26b06098eaef93b825a08bb3a5564 (patch) | |
tree | b3aad295a083b5cff13851a0f7652d418f3c9c4d | |
parent | a08b216ac4d34c6ce0ca2fedbde89e5ac0523707 (diff) |
libcamera: pipeline: raspberrypi: Always save sensor params on IPA_RESULT_SENSOR_PARAMS
Fixup logic when handling IPA_RESULT_SENSOR_PARAMS where we must always
overwrite the parameters if provided by IPA. In the current codebase,
this only happens once on startup, so there is no effective functional
difference. But this change allows the option for the IPA to request new
sensor parameters per-mode if required.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index ef96f8ca..0804a439 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -1224,17 +1224,15 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) * Setup our delayed control writer with the sensor default * gain and exposure delays. */ - if (!delayedCtrls_) { - std::unordered_map<uint32_t, unsigned int> delays = { - { V4L2_CID_ANALOGUE_GAIN, result.data[resultIdx++] }, - { V4L2_CID_EXPOSURE, result.data[resultIdx++] }, - { V4L2_CID_VBLANK, result.data[resultIdx++] } - }; + std::unordered_map<uint32_t, unsigned int> delays = { + { V4L2_CID_ANALOGUE_GAIN, result.data[resultIdx++] }, + { V4L2_CID_EXPOSURE, result.data[resultIdx++] }, + { V4L2_CID_VBLANK, result.data[resultIdx++] } + }; - delayedCtrls_ = std::make_unique<DelayedControls>(unicam_[Unicam::Image].dev(), delays); + delayedCtrls_ = std::make_unique<DelayedControls>(unicam_[Unicam::Image].dev(), delays); - sensorMetadata_ = result.data[resultIdx++]; - } + sensorMetadata_ = result.data[resultIdx++]; } if (result.operation & RPi::IPA_RESULT_SENSOR_CTRLS) { |