Message ID | 20210119143711.153517-9-jacopo@jmondi.org |
---|---|
State | Accepted |
Delegated to: | Jacopo Mondi |
Headers | show |
Series |
|
Related | show |
Hi Jacopo, Thank you for the patch. On Tue, Jan 19, 2021 at 03:37:08PM +0100, Jacopo Mondi wrote: > 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@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. */ Maybe "Actually apply the scaler crop region to the ImgU" ? Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > + if (request->controls().contains(controls::ScalerCrop)) { > + Rectangle cropRegion = request->controls().get(controls::ScalerCrop); > + request->metadata().set(controls::ScalerCrop, cropRegion); > + } > pipe_->completeRequest(request); > } >
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); }
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@jmondi.org> --- src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +++++ 1 file changed, 5 insertions(+)