summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2022-11-24 13:12:19 +0100
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-01-30 12:04:03 +0100
commit517017c49aac9b6841bf490a01c650c29afeb665 (patch)
tree4924e936607780daa9aec5a912825c6616e7cba1 /src
parent6f6e1bf704feec3a9bcfc1f5490ae82fe8d63065 (diff)
libcamera: rkisp1: Add support for Transform
Add support for Transform to the RkISP1 pipeline handler. The pipeline rotates using the sensor's V/H flips, hence use the CameraSensor helpers to handle transformation requests from applications. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 5bdb4d25..5f22a29d 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -25,6 +25,7 @@
#include <libcamera/framebuffer.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
+#include <libcamera/transform.h>
#include <libcamera/ipa/core_ipa_interface.h>
#include <libcamera/ipa/rkisp1_ipa_interface.h>
@@ -470,17 +471,17 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()
status = validateColorSpaces(ColorSpaceFlag::StreamsShareColorSpace);
- if (transform != Transform::Identity) {
- transform = Transform::Identity;
- status = Adjusted;
- }
-
/* Cap the number of entries to the available streams. */
if (config_.size() > pathCount) {
config_.resize(pathCount);
status = Adjusted;
}
+ Transform requestedTransform = transform;
+ Transform combined = sensor->validateTransform(&transform);
+ if (transform != requestedTransform)
+ status = Adjusted;
+
/*
* Simultaneous capture of raw and processed streams isn't possible. If
* there is any raw stream, cap the number of streams to one.
@@ -590,6 +591,8 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()
if (sensorFormat_.size.isNull())
sensorFormat_.size = sensor->resolution();
+ sensorFormat_.transform = combined;
+
return status;
}