libcamera: ipu3: Always report crop region
Report the crop region for every completed request. The crop region is initialized as the sensor's analogue crop rectangle and updated when a Request with a new region completes. Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
9690d082ec
commit
d77233be82
1 changed files with 8 additions and 4 deletions
|
@ -73,6 +73,7 @@ public:
|
||||||
Stream rawStream_;
|
Stream rawStream_;
|
||||||
|
|
||||||
uint32_t exposureTime_;
|
uint32_t exposureTime_;
|
||||||
|
Rectangle cropRegion_;
|
||||||
std::unique_ptr<DelayedControls> delayedCtrls_;
|
std::unique_ptr<DelayedControls> delayedCtrls_;
|
||||||
IPU3Frames frameInfos_;
|
IPU3Frames frameInfos_;
|
||||||
|
|
||||||
|
@ -487,6 +488,10 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
CameraSensorInfo sensorInfo;
|
||||||
|
cio2->sensor()->sensorInfo(&sensorInfo);
|
||||||
|
data->cropRegion_ = sensorInfo.analogCrop;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the ImgU gets configured, its driver seems to expect that
|
* If the ImgU gets configured, its driver seems to expect that
|
||||||
* buffers will be queued to its outputs, as otherwise the next
|
* buffers will be queued to its outputs, as otherwise the next
|
||||||
|
@ -1121,10 +1126,9 @@ void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer)
|
||||||
/* \todo Move the ExposureTime control to the IPA. */
|
/* \todo Move the ExposureTime control to the IPA. */
|
||||||
request->metadata().set(controls::ExposureTime, exposureTime_);
|
request->metadata().set(controls::ExposureTime, exposureTime_);
|
||||||
/* \todo Actually apply the scaler crop region to the ImgU. */
|
/* \todo Actually apply the scaler crop region to the ImgU. */
|
||||||
if (request->controls().contains(controls::ScalerCrop)) {
|
if (request->controls().contains(controls::ScalerCrop))
|
||||||
Rectangle cropRegion = request->controls().get(controls::ScalerCrop);
|
cropRegion_ = request->controls().get(controls::ScalerCrop);
|
||||||
request->metadata().set(controls::ScalerCrop, cropRegion);
|
request->metadata().set(controls::ScalerCrop, cropRegion_);
|
||||||
}
|
|
||||||
|
|
||||||
if (buffer->metadata().status == FrameMetadata::FrameCancelled)
|
if (buffer->metadata().status == FrameMetadata::FrameCancelled)
|
||||||
info->metadataProcessed = true;
|
info->metadataProcessed = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue