diff options
author | David Plowman <david.plowman@raspberrypi.com> | 2020-09-07 08:16:02 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-09-29 11:43:07 +0100 |
commit | 5c32a0daf5c3ce59491b043bd2e3efd1f7a7d224 (patch) | |
tree | f24b147bf8ff981c98ee404d9106b8b74ab3ce02 /src/libcamera | |
parent | 4cff3937e1af979ad69d64d7658695950d1c1864 (diff) |
libcamera: raspberrypi: Plumb user transform through to IPA
This commit plumbs the user transform from the Raspberry Pi pipeline
handler through to the IPA. Note that the transform is actually
handled in the sensor (by setting the h/v flip bits), so the IPAs need
to understand the orientation of the image they receive.
Once in the IPA we add it to the CameraMode description, so that it
becomes automatically available to all the individual control
algorithms.
The IPA configure method has to be reordered just a little so as to
fill in the transform in the camera mode before calling SwitchMode.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/libcamera')
-rw-r--r-- | src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 60f25864..8bdafd8b 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -1133,6 +1133,9 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) entityControls.emplace(0, unicam_[Unicam::Image].dev()->controls()); entityControls.emplace(1, isp_[Isp::Input].dev()->controls()); + /* Always send the user transform to the IPA. */ + ipaConfig.data = { static_cast<unsigned int>(config->transform) }; + /* Allocate the lens shading table via dmaHeap and pass to the IPA. */ if (!lsTable_.isValid()) { lsTable_ = dmaHeap_.alloc("ls_grid", MAX_LS_GRID_SIZE); @@ -1141,7 +1144,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) /* Allow the IPA to mmap the LS table via the file descriptor. */ ipaConfig.operation = RPI_IPA_CONFIG_LS_TABLE; - ipaConfig.data = { static_cast<unsigned int>(lsTable_.fd()) }; + ipaConfig.data.push_back(static_cast<unsigned int>(lsTable_.fd())); } CameraSensorInfo sensorInfo = {}; |