@@ -33,6 +33,22 @@ LOG_DEFINE_CATEGORY(Lux)
namespace ipa {
+/**
+ * \struct lux::ActiveState
+ * \brief Active lux estimation state shared across frames
+ *
+ * \var lux::ActiveState::lux
+ * \brief The most recently estimated lux value
+ */
+
+/**
+ * \struct lux::FrameContext
+ * \brief Per-frame lux estimation context
+ *
+ * \var lux::FrameContext::lux
+ * \brief The lux value estimation used for processing the frame
+ */
+
/**
* \class Lux
* \brief Class that implements lux estimation
@@ -16,6 +16,18 @@ class YamlObject;
namespace ipa {
+namespace lux {
+
+struct ActiveState {
+ double lux;
+};
+
+struct FrameContext {
+ double lux;
+};
+
+} /* namespace lux */
+
class Histogram;
class Lux
@@ -28,6 +28,7 @@
#include "libipa/camera_sensor_helper.h"
#include "libipa/fc_queue.h"
#include "libipa/fixedpoint.h"
+#include "libipa/lux.h"
namespace libcamera {
@@ -78,6 +79,8 @@ struct IPASessionConfiguration {
};
struct IPAActiveState {
+ ipa::lux::ActiveState lux;
+
struct {
struct {
uint32_t exposure;
@@ -137,10 +140,6 @@ struct IPAActiveState {
double gamma;
} goc;
- struct {
- double lux;
- } lux;
-
struct {
controls::WdrModeEnum mode;
AgcMeanLuminance::AgcConstraint constraint;
@@ -154,6 +153,8 @@ struct IPAActiveState {
};
struct IPAFrameContext : public FrameContext {
+ ipa::lux::FrameContext lux;
+
struct {
uint32_t exposure;
double gain;
@@ -219,10 +220,6 @@ struct IPAFrameContext : public FrameContext {
Matrix<float, 3, 3> ccm;
} ccm;
- struct {
- double lux;
- } lux;
-
struct {
controls::WdrModeEnum mode;
double strength;
Move the ActiveState and FrameContext as used by the RKISP1 lux to be exposed by the libipa implementation for re-use. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- src/ipa/libipa/lux.cpp | 16 ++++++++++++++++ src/ipa/libipa/lux.h | 12 ++++++++++++ src/ipa/rkisp1/ipa_context.h | 13 +++++-------- 3 files changed, 33 insertions(+), 8 deletions(-)