[v5,21/36] ipa: libipa: lsc: Introduce lsc::ActiveState
diff mbox series

Message ID 20260708-libipa-algorithms-v5-21-0759d0359f52@ideasonboard.com
State Superseded
Headers show
Series
  • ipa: libipa: Introduce libipa algorithms
Related show

Commit Message

Jacopo Mondi July 8, 2026, 3:51 p.m. UTC
Introduce the lsc.h and lsc.cpp files with the definition of the
Lsc algorithm active state.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
 src/ipa/libipa/lsc.cpp     | 33 +++++++++++++++++++++++++++++++++
 src/ipa/libipa/lsc.h       | 24 ++++++++++++++++++++++++
 src/ipa/libipa/meson.build |  2 ++
 3 files changed, 59 insertions(+)

Comments

Stefan Klug July 13, 2026, 2:46 p.m. UTC | #1
Hi Jacopo,

Quoting Jacopo Mondi (2026-07-08 17:51:03)
> Introduce the lsc.h and lsc.cpp files with the definition of the
> Lsc algorithm active state.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

This could maybe merged with the next patch.

As you prefer.

Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>

Best regards,
Stefan


> ---
>  src/ipa/libipa/lsc.cpp     | 33 +++++++++++++++++++++++++++++++++
>  src/ipa/libipa/lsc.h       | 24 ++++++++++++++++++++++++
>  src/ipa/libipa/meson.build |  2 ++
>  3 files changed, 59 insertions(+)
> 
> diff --git a/src/ipa/libipa/lsc.cpp b/src/ipa/libipa/lsc.cpp
> new file mode 100644
> index 000000000000..437666855354
> --- /dev/null
> +++ b/src/ipa/libipa/lsc.cpp
> @@ -0,0 +1,33 @@
> +/* SPDX-License-Identifier: LGPL-2.1-or-later */
> +/*
> + * Copyright (C) 2026 Ideas on Board Oy
> + *
> + * libIPA Lsc algorithms
> + */
> +
> +#include "lsc.h"
> +
> +/**
> + * \file lsc.h
> + * \brief libipa LSC algorithm
> + */
> +
> +namespace libcamera {
> +
> +namespace ipa {
> +
> +namespace lsc {
> +
> +/**
> + * \struct ActiveState
> + * \brief The LSC active state
> + *
> + * \var ActiveState::enabled
> + * \brief Boolean flag for the LscAlgorithm enable status
> + */
> +
> +} /* namespace lsc */
> +
> +} /* namespace ipa */
> +
> +} /* namespace libcamera */
> diff --git a/src/ipa/libipa/lsc.h b/src/ipa/libipa/lsc.h
> new file mode 100644
> index 000000000000..18c9fa25e53a
> --- /dev/null
> +++ b/src/ipa/libipa/lsc.h
> @@ -0,0 +1,24 @@
> +/* SPDX-License-Identifier: LGPL-2.1-or-later */
> +/*
> + * Copyright (C) 2026 Ideas on Board Oy
> + *
> + * libIPA Lsc algorithm
> + */
> +
> +#pragma once
> +
> +namespace libcamera {
> +
> +namespace ipa {
> +
> +namespace lsc {
> +
> +struct ActiveState {
> +       bool enabled;
> +};
> +
> +} /* namespace lsc */
> +
> +} /* namespace ipa */
> +
> +} /* namespace libcamera */
> diff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build
> index 95d398d99fd6..42f89d9820fa 100644
> --- a/src/ipa/libipa/meson.build
> +++ b/src/ipa/libipa/meson.build
> @@ -14,6 +14,7 @@ libipa_headers = files([
>      'fixedpoint.h',
>      'histogram.h',
>      'interpolator.h',
> +    'lsc.h',
>      'lsc_base.h',
>      'lsc_polynomial.h',
>      'lsc_table.h',
> @@ -38,6 +39,7 @@ libipa_sources = files([
>      'fixedpoint.cpp',
>      'histogram.cpp',
>      'interpolator.cpp',
> +    'lsc.cpp',
>      'lsc_base.cpp',
>      'lsc_polynomial.cpp',
>      'lsc_table.cpp',
> 
> -- 
> 2.54.0
>
Kieran Bingham July 14, 2026, 4:54 p.m. UTC | #2
Quoting Stefan Klug (2026-07-13 15:46:22)
> Hi Jacopo,
> 
> Quoting Jacopo Mondi (2026-07-08 17:51:03)
> > Introduce the lsc.h and lsc.cpp files with the definition of the
> > Lsc algorithm active state.
> > 
> > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> 
> This could maybe merged with the next patch.

Oh and this one too, but I'd roll both of them into the implementation
in patch 23.

But either way if you wish:

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> 
> As you prefer.
> 
> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
> 
> Best regards,
> Stefan
> 
> 
> > ---
> >  src/ipa/libipa/lsc.cpp     | 33 +++++++++++++++++++++++++++++++++
> >  src/ipa/libipa/lsc.h       | 24 ++++++++++++++++++++++++
> >  src/ipa/libipa/meson.build |  2 ++
> >  3 files changed, 59 insertions(+)
> > 
> > diff --git a/src/ipa/libipa/lsc.cpp b/src/ipa/libipa/lsc.cpp
> > new file mode 100644
> > index 000000000000..437666855354
> > --- /dev/null
> > +++ b/src/ipa/libipa/lsc.cpp
> > @@ -0,0 +1,33 @@
> > +/* SPDX-License-Identifier: LGPL-2.1-or-later */
> > +/*
> > + * Copyright (C) 2026 Ideas on Board Oy
> > + *
> > + * libIPA Lsc algorithms
> > + */
> > +
> > +#include "lsc.h"
> > +
> > +/**
> > + * \file lsc.h
> > + * \brief libipa LSC algorithm
> > + */
> > +
> > +namespace libcamera {
> > +
> > +namespace ipa {
> > +
> > +namespace lsc {
> > +
> > +/**
> > + * \struct ActiveState
> > + * \brief The LSC active state
> > + *
> > + * \var ActiveState::enabled
> > + * \brief Boolean flag for the LscAlgorithm enable status
> > + */
> > +
> > +} /* namespace lsc */
> > +
> > +} /* namespace ipa */
> > +
> > +} /* namespace libcamera */
> > diff --git a/src/ipa/libipa/lsc.h b/src/ipa/libipa/lsc.h
> > new file mode 100644
> > index 000000000000..18c9fa25e53a
> > --- /dev/null
> > +++ b/src/ipa/libipa/lsc.h
> > @@ -0,0 +1,24 @@
> > +/* SPDX-License-Identifier: LGPL-2.1-or-later */
> > +/*
> > + * Copyright (C) 2026 Ideas on Board Oy
> > + *
> > + * libIPA Lsc algorithm
> > + */
> > +
> > +#pragma once
> > +
> > +namespace libcamera {
> > +
> > +namespace ipa {
> > +
> > +namespace lsc {
> > +
> > +struct ActiveState {
> > +       bool enabled;
> > +};
> > +
> > +} /* namespace lsc */
> > +
> > +} /* namespace ipa */
> > +
> > +} /* namespace libcamera */
> > diff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build
> > index 95d398d99fd6..42f89d9820fa 100644
> > --- a/src/ipa/libipa/meson.build
> > +++ b/src/ipa/libipa/meson.build
> > @@ -14,6 +14,7 @@ libipa_headers = files([
> >      'fixedpoint.h',
> >      'histogram.h',
> >      'interpolator.h',
> > +    'lsc.h',
> >      'lsc_base.h',
> >      'lsc_polynomial.h',
> >      'lsc_table.h',
> > @@ -38,6 +39,7 @@ libipa_sources = files([
> >      'fixedpoint.cpp',
> >      'histogram.cpp',
> >      'interpolator.cpp',
> > +    'lsc.cpp',
> >      'lsc_base.cpp',
> >      'lsc_polynomial.cpp',
> >      'lsc_table.cpp',
> > 
> > -- 
> > 2.54.0
> >

Patch
diff mbox series

diff --git a/src/ipa/libipa/lsc.cpp b/src/ipa/libipa/lsc.cpp
new file mode 100644
index 000000000000..437666855354
--- /dev/null
+++ b/src/ipa/libipa/lsc.cpp
@@ -0,0 +1,33 @@ 
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2026 Ideas on Board Oy
+ *
+ * libIPA Lsc algorithms
+ */
+
+#include "lsc.h"
+
+/**
+ * \file lsc.h
+ * \brief libipa LSC algorithm
+ */
+
+namespace libcamera {
+
+namespace ipa {
+
+namespace lsc {
+
+/**
+ * \struct ActiveState
+ * \brief The LSC active state
+ *
+ * \var ActiveState::enabled
+ * \brief Boolean flag for the LscAlgorithm enable status
+ */
+
+} /* namespace lsc */
+
+} /* namespace ipa */
+
+} /* namespace libcamera */
diff --git a/src/ipa/libipa/lsc.h b/src/ipa/libipa/lsc.h
new file mode 100644
index 000000000000..18c9fa25e53a
--- /dev/null
+++ b/src/ipa/libipa/lsc.h
@@ -0,0 +1,24 @@ 
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2026 Ideas on Board Oy
+ *
+ * libIPA Lsc algorithm
+ */
+
+#pragma once
+
+namespace libcamera {
+
+namespace ipa {
+
+namespace lsc {
+
+struct ActiveState {
+	bool enabled;
+};
+
+} /* namespace lsc */
+
+} /* namespace ipa */
+
+} /* namespace libcamera */
diff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build
index 95d398d99fd6..42f89d9820fa 100644
--- a/src/ipa/libipa/meson.build
+++ b/src/ipa/libipa/meson.build
@@ -14,6 +14,7 @@  libipa_headers = files([
     'fixedpoint.h',
     'histogram.h',
     'interpolator.h',
+    'lsc.h',
     'lsc_base.h',
     'lsc_polynomial.h',
     'lsc_table.h',
@@ -38,6 +39,7 @@  libipa_sources = files([
     'fixedpoint.cpp',
     'histogram.cpp',
     'interpolator.cpp',
+    'lsc.cpp',
     'lsc_base.cpp',
     'lsc_polynomial.cpp',
     'lsc_table.cpp',