mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 07:19:45 +03:00
pipeline: rpi: Pass crop rectangle as a parameter to platformSetIspCrop()
This will be required when we program separate crop values to each ISP output in a future commit. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
fb23268105
commit
6bb278c20c
3 changed files with 6 additions and 5 deletions
|
@ -1314,7 +1314,7 @@ void CameraData::applyScalerCrop(const ControlList &controls)
|
||||||
|
|
||||||
if (ispCrop != ispCrop_) {
|
if (ispCrop != ispCrop_) {
|
||||||
ispCrop_ = ispCrop;
|
ispCrop_ = ispCrop;
|
||||||
platformSetIspCrop();
|
platformSetIspCrop(ispCrop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public:
|
||||||
|
|
||||||
Rectangle scaleIspCrop(const Rectangle &ispCrop) const;
|
Rectangle scaleIspCrop(const Rectangle &ispCrop) const;
|
||||||
void applyScalerCrop(const ControlList &controls);
|
void applyScalerCrop(const ControlList &controls);
|
||||||
virtual void platformSetIspCrop() = 0;
|
virtual void platformSetIspCrop(const Rectangle &ispCrop) = 0;
|
||||||
|
|
||||||
void cameraTimeout();
|
void cameraTimeout();
|
||||||
void frameStarted(uint32_t sequence);
|
void frameStarted(uint32_t sequence);
|
||||||
|
|
|
@ -109,9 +109,10 @@ public:
|
||||||
Config config_;
|
Config config_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void platformSetIspCrop() override
|
void platformSetIspCrop(const Rectangle &ispCrop) override
|
||||||
{
|
{
|
||||||
isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &ispCrop_);
|
Rectangle crop = ispCrop;
|
||||||
|
isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);
|
||||||
}
|
}
|
||||||
|
|
||||||
int platformConfigure(const RPi::RPiCameraConfiguration *rpiConfig) override;
|
int platformConfigure(const RPi::RPiCameraConfiguration *rpiConfig) override;
|
||||||
|
@ -707,7 +708,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi
|
||||||
Size size = unicamFormat.size.boundedToAspectRatio(maxSize);
|
Size size = unicamFormat.size.boundedToAspectRatio(maxSize);
|
||||||
ispCrop_ = size.centeredTo(Rectangle(unicamFormat.size).center());
|
ispCrop_ = size.centeredTo(Rectangle(unicamFormat.size).center());
|
||||||
|
|
||||||
platformSetIspCrop();
|
platformSetIspCrop(ispCrop_);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue