summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-01-19 11:56:18 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-01-25 15:20:36 +0100
commit953403288ef17e7f332a621b9113e75564f44407 (patch)
tree74e97fb1467857aff6da621ae25752a06142c7b4
parent31a1a628cd0eea31da4d28881873b4a2d0ea5486 (diff)
libcamera: ipu3: Report ScalerCrop in metadata
Report in the Request metadata the scaler crop region as requested by application through the request controls. No actual scaling is applied in the pipeline at the moment. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index dc5307e4..db0d6b91 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -966,6 +966,11 @@ void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer)
request->metadata().set(controls::draft::PipelineDepth, 3);
/* \todo Move the ExposureTime control to the IPA. */
request->metadata().set(controls::ExposureTime, exposureTime_);
+ /* \todo Actually apply the scaler crop region to the ImgU. */
+ if (request->controls().contains(controls::ScalerCrop)) {
+ Rectangle cropRegion = request->controls().get(controls::ScalerCrop);
+ request->metadata().set(controls::ScalerCrop, cropRegion);
+ }
pipe_->completeRequest(request);
}