[libcamera-devel] [PATCH v2 08/11] libcamera: ipu3: Report ScalerCrop in metadata

Jacopo Mondi jacopo at jmondi.org
Tue Jan 19 15:37:08 CET 2021


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.

Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index fc5592f33032..329b9d51cf1b 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -968,6 +968,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 Handle the scaler crop region for each request. */
+	if (request->controls().contains(controls::ScalerCrop)) {
+		Rectangle cropRegion = request->controls().get(controls::ScalerCrop);
+		request->metadata().set(controls::ScalerCrop, cropRegion);
+	}
 	pipe_->completeRequest(request);
 }
 
-- 
2.29.2



More information about the libcamera-devel mailing list