summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2020-07-24 15:56:17 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-07-25 00:51:38 +0300
commit0bf1070ca8eca31d1b2ddae7e386bee848a53114 (patch)
tree6d98698de82a8b6a8a5b78d9358f6b060c0c5cbc /src/ipa/raspberrypi
parentf5b45c180e64099fbee432fa69f807d5efa8a006 (diff)
libcamera: raspberrypi: Add ColourCorrectionMatrix control
Implements, for the Raspberry Pi platform, the returning of the CCM (Colour Correction Matrix) used by the pipeline in the libcamera metadata. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi')
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 7bd04880..37472087 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -438,6 +438,14 @@ void IPARPi::reportMetadata()
int32_t focusFoM = (focusStatus->focus_measures[5] + focusStatus->focus_measures[6]) / 2;
libcameraMetadata_.set(controls::FocusFoM, focusFoM);
}
+
+ CcmStatus *ccmStatus = rpiMetadata_.GetLocked<CcmStatus>("ccm.status");
+ if (ccmStatus) {
+ float m[9];
+ for (unsigned int i = 0; i < 9; i++)
+ m[i] = ccmStatus->matrix[i];
+ libcameraMetadata_.set(controls::ColourCorrectionMatrix, m);
+ }
}
/*