summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-10-19 16:01:26 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-10-23 16:05:58 +0300
commit250577878bff825516ea5a942aea1b3339acb15c (patch)
treed2a4c4816daecb26bf35a3f88dc078066d0e799d /include
parent568569b0815aab15096fd87d8cc4d79155cb8e93 (diff)
libcamera: transform: Add functions to convert Orientation
Add two helper functions to the transform.cpp file that allows to convert to and from an Orientation. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/transform.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libcamera/transform.h b/include/libcamera/transform.h
index 2a6838c7..14f1db0e 100644
--- a/include/libcamera/transform.h
+++ b/include/libcamera/transform.h
@@ -11,6 +11,8 @@
namespace libcamera {
+enum class Orientation;
+
enum class Transform : int {
Identity = 0,
Rot0 = Identity,
@@ -69,6 +71,8 @@ constexpr Transform operator~(Transform t)
}
Transform transformFromRotation(int angle, bool *success = nullptr);
+Transform transformFromOrientation(const Orientation &orientation);
+Orientation transformToOrientation(const Transform &transform);
const char *transformToString(Transform t);