summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-07-04 02:21:26 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-07-17 02:13:40 +0300
commitc0b0b7205c7e59ad754b5cf2c79d661e5676eb73 (patch)
tree019bfa3efcc514815cde2ba33391c9a1be0ed75e /src
parent44aa793056f196bff386429d280d568c8a8313cc (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/ipa/raspberrypi/cam_helper.cpp6
-rw-r--r--src/ipa/raspberrypi/cam_helper.hpp7
-rw-r--r--src/ipa/raspberrypi/cam_helper_imx219.cpp7
-rw-r--r--src/ipa/raspberrypi/cam_helper_imx477.cpp7
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp6
5 files changed, 0 insertions, 33 deletions
diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp
index a0c73f99..b1343eb2 100644
--- a/src/ipa/raspberrypi/cam_helper.cpp
+++ b/src/ipa/raspberrypi/cam_helper.cpp
@@ -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)
{
diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp
index 6877f473..97ce3e92 100644
--- a/src/ipa/raspberrypi/cam_helper.hpp
+++ b/src/ipa/raspberrypi/cam_helper.hpp
@@ -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_;
diff --git a/src/ipa/raspberrypi/cam_helper_imx219.cpp b/src/ipa/raspberrypi/cam_helper_imx219.cpp
index 35c6597c..1b9ce382 100644
--- a/src/ipa/raspberrypi/cam_helper_imx219.cpp
+++ b/src/ipa/raspberrypi/cam_helper_imx219.cpp
@@ -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();
diff --git a/src/ipa/raspberrypi/cam_helper_imx477.cpp b/src/ipa/raspberrypi/cam_helper_imx477.cpp
index 69544456..a53b47c0 100644
--- a/src/ipa/raspberrypi/cam_helper_imx477.cpp
+++ b/src/ipa/raspberrypi/cam_helper_imx477.cpp
@@ -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();
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 569f7380..851597f0 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -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);
}