mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-15 16:35:06 +03:00
ipa: raspberrypi: Drop CameraHelper::GetOrientation()
The camera sensor orientation is now handled by the pipeline handler. Drop hardcoded per-sensor orientations from the IPA. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
This commit is contained in:
parent
44aa793056
commit
c0b0b7205c
5 changed files with 0 additions and 33 deletions
|
@ -106,12 +106,6 @@ unsigned int CamHelper::MistrustFramesModeSwitch() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
CamTransform CamHelper::GetOrientation() const
|
||||
{
|
||||
/* Most sensors will be mounted the "right" way up? */
|
||||
return CamTransform_IDENTITY;
|
||||
}
|
||||
|
||||
RegisterCamHelper::RegisterCamHelper(char const *cam_name,
|
||||
CamHelperCreateFunc create_func)
|
||||
{
|
||||
|
|
|
@ -58,12 +58,6 @@ namespace RPi {
|
|||
// (other than start-up), for which control algorithms should not run
|
||||
// (for example, metadata may be unreliable).
|
||||
|
||||
// Bitfield to represent the default orientation of the camera.
|
||||
typedef int CamTransform;
|
||||
static constexpr CamTransform CamTransform_IDENTITY = 0;
|
||||
static constexpr CamTransform CamTransform_HFLIP = 1;
|
||||
static constexpr CamTransform CamTransform_VFLIP = 2;
|
||||
|
||||
class CamHelper
|
||||
{
|
||||
public:
|
||||
|
@ -82,7 +76,6 @@ public:
|
|||
virtual unsigned int HideFramesModeSwitch() const;
|
||||
virtual unsigned int MistrustFramesStartup() const;
|
||||
virtual unsigned int MistrustFramesModeSwitch() const;
|
||||
virtual CamTransform GetOrientation() const;
|
||||
protected:
|
||||
MdParser *parser_;
|
||||
CameraMode mode_;
|
||||
|
|
|
@ -49,7 +49,6 @@ public:
|
|||
double Gain(uint32_t gain_code) const override;
|
||||
unsigned int MistrustFramesModeSwitch() const override;
|
||||
bool SensorEmbeddedDataPresent() const override;
|
||||
CamTransform GetOrientation() const override;
|
||||
};
|
||||
|
||||
CamHelperImx219::CamHelperImx219()
|
||||
|
@ -86,12 +85,6 @@ bool CamHelperImx219::SensorEmbeddedDataPresent() const
|
|||
return ENABLE_EMBEDDED_DATA;
|
||||
}
|
||||
|
||||
CamTransform CamHelperImx219::GetOrientation() const
|
||||
{
|
||||
/* Camera is "upside down" on this board. */
|
||||
return CamTransform_HFLIP | CamTransform_VFLIP;
|
||||
}
|
||||
|
||||
static CamHelper *Create()
|
||||
{
|
||||
return new CamHelperImx219();
|
||||
|
|
|
@ -38,7 +38,6 @@ public:
|
|||
uint32_t GainCode(double gain) const override;
|
||||
double Gain(uint32_t gain_code) const override;
|
||||
bool SensorEmbeddedDataPresent() const override;
|
||||
CamTransform GetOrientation() const override;
|
||||
};
|
||||
|
||||
CamHelperImx477::CamHelperImx477()
|
||||
|
@ -61,12 +60,6 @@ bool CamHelperImx477::SensorEmbeddedDataPresent() const
|
|||
return true;
|
||||
}
|
||||
|
||||
CamTransform CamHelperImx477::GetOrientation() const
|
||||
{
|
||||
/* Camera is "upside down" on this board. */
|
||||
return CamTransform_HFLIP | CamTransform_VFLIP;
|
||||
}
|
||||
|
||||
static CamHelper *Create()
|
||||
{
|
||||
return new CamHelperImx477();
|
||||
|
|
|
@ -216,7 +216,6 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,
|
|||
int gainDelay, exposureDelay, sensorMetadata;
|
||||
helper_->GetDelays(exposureDelay, gainDelay);
|
||||
sensorMetadata = helper_->SensorEmbeddedDataPresent();
|
||||
RPi::CamTransform orientation = helper_->GetOrientation();
|
||||
|
||||
IPAOperationData op;
|
||||
op.operation = RPI_IPA_ACTION_SET_SENSOR_CONFIG;
|
||||
|
@ -224,11 +223,6 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,
|
|||
op.data.push_back(exposureDelay);
|
||||
op.data.push_back(sensorMetadata);
|
||||
|
||||
ControlList ctrls(unicam_ctrls_);
|
||||
ctrls.set(V4L2_CID_HFLIP, (int32_t) !!(orientation & RPi::CamTransform_HFLIP));
|
||||
ctrls.set(V4L2_CID_VFLIP, (int32_t) !!(orientation & RPi::CamTransform_VFLIP));
|
||||
op.controls.push_back(ctrls);
|
||||
|
||||
queueFrameAction.emit(0, op);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue