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>
This commit is contained in:
Jacopo Mondi
2021-01-25 15:20:36 +01:00
parent 31a1a628cd
commit 953403288e
+5
View File
@@ -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);
}