libcamera: camera_sensor: Cache mounting orientation instead of transform

The cached rotationTransform_ value is used in computeTransform() only,
to compute the mounting orientation. Cache the mounting orientation
instead, removing the need for the intermediate conversion of the
rotation to a transform.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2023-10-20 16:58:24 +03:00
parent 4814d8f1b5
commit 7a5d4b83e5
2 changed files with 10 additions and 11 deletions

View file

@ -17,6 +17,7 @@
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
#include <libcamera/geometry.h>
#include <libcamera/orientation.h>
#include <libcamera/transform.h>
#include <libcamera/ipa/core_ipa_interface.h>
@ -114,7 +115,7 @@ private:
Rectangle activeArea_;
const BayerFormat *bayerFormat_;
bool supportFlips_;
Transform rotationTransform_;
Orientation mountingOrientation_;
ControlList properties_;