Message ID | 20251003121821.659081-4-naush@raspberrypi.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
HI Naush Thanks for the patch. On Fri, 3 Oct 2025 at 13:18, Naushir Patuck <naush@raspberrypi.com> wrote: > > The decompand algorithm implementation will subclass the > DecompandAlgorithm class. This will be needed for setting the initial > decompand values in a future commit. > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com> > Tested-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Thanks! David > --- > src/ipa/rpi/controller/decompand_algorithm.h | 24 ++++++++++++++++++++ > src/ipa/rpi/controller/rpi/decompand.cpp | 2 +- > src/ipa/rpi/controller/rpi/decompand.h | 5 ++-- > 3 files changed, 27 insertions(+), 4 deletions(-) > create mode 100644 src/ipa/rpi/controller/decompand_algorithm.h > > diff --git a/src/ipa/rpi/controller/decompand_algorithm.h b/src/ipa/rpi/controller/decompand_algorithm.h > new file mode 100644 > index 000000000000..f19f8c109323 > --- /dev/null > +++ b/src/ipa/rpi/controller/decompand_algorithm.h > @@ -0,0 +1,24 @@ > +/* SPDX-License-Identifier: BSD-2-Clause */ > +/* > + * Copyright (C) 2025, Raspberry Pi Ltd > + * > + * Decompand control algorithm interface > + */ > +#pragma once > + > +#include "libipa/pwl.h" > + > +#include "algorithm.h" > + > +namespace RPiController { > + > +class DecompandAlgorithm : public Algorithm > +{ > +public: > + DecompandAlgorithm(Controller *controller = NULL) > + : Algorithm(controller) > + { > + } > +}; > + > +} /* namespace RPiController */ > diff --git a/src/ipa/rpi/controller/rpi/decompand.cpp b/src/ipa/rpi/controller/rpi/decompand.cpp > index 2036750f82f4..5b4c2e5524af 100644 > --- a/src/ipa/rpi/controller/rpi/decompand.cpp > +++ b/src/ipa/rpi/controller/rpi/decompand.cpp > @@ -13,7 +13,7 @@ LOG_DEFINE_CATEGORY(RPiDecompand) > #define NAME "rpi.decompand" > > Decompand::Decompand(Controller *controller) > - : Algorithm(controller) > + : DecompandAlgorithm(controller) > { > } > > diff --git a/src/ipa/rpi/controller/rpi/decompand.h b/src/ipa/rpi/controller/rpi/decompand.h > index 38b26a21e6d5..0f2a9b3bbdc4 100644 > --- a/src/ipa/rpi/controller/rpi/decompand.h > +++ b/src/ipa/rpi/controller/rpi/decompand.h > @@ -2,10 +2,9 @@ > > #include <libipa/pwl.h> > > +#include "../decompand_algorithm.h" > #include "../decompand_status.h" > > -#include "algorithm.h" > - > namespace RPiController { > > struct DecompandConfig { > @@ -13,7 +12,7 @@ struct DecompandConfig { > libcamera::ipa::Pwl decompandCurve; > }; > > -class Decompand : public Algorithm > +class Decompand : public DecompandAlgorithm > { > public: > Decompand(Controller *controller = nullptr); > -- > 2.43.0 >
diff --git a/src/ipa/rpi/controller/decompand_algorithm.h b/src/ipa/rpi/controller/decompand_algorithm.h new file mode 100644 index 000000000000..f19f8c109323 --- /dev/null +++ b/src/ipa/rpi/controller/decompand_algorithm.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ +/* + * Copyright (C) 2025, Raspberry Pi Ltd + * + * Decompand control algorithm interface + */ +#pragma once + +#include "libipa/pwl.h" + +#include "algorithm.h" + +namespace RPiController { + +class DecompandAlgorithm : public Algorithm +{ +public: + DecompandAlgorithm(Controller *controller = NULL) + : Algorithm(controller) + { + } +}; + +} /* namespace RPiController */ diff --git a/src/ipa/rpi/controller/rpi/decompand.cpp b/src/ipa/rpi/controller/rpi/decompand.cpp index 2036750f82f4..5b4c2e5524af 100644 --- a/src/ipa/rpi/controller/rpi/decompand.cpp +++ b/src/ipa/rpi/controller/rpi/decompand.cpp @@ -13,7 +13,7 @@ LOG_DEFINE_CATEGORY(RPiDecompand) #define NAME "rpi.decompand" Decompand::Decompand(Controller *controller) - : Algorithm(controller) + : DecompandAlgorithm(controller) { } diff --git a/src/ipa/rpi/controller/rpi/decompand.h b/src/ipa/rpi/controller/rpi/decompand.h index 38b26a21e6d5..0f2a9b3bbdc4 100644 --- a/src/ipa/rpi/controller/rpi/decompand.h +++ b/src/ipa/rpi/controller/rpi/decompand.h @@ -2,10 +2,9 @@ #include <libipa/pwl.h> +#include "../decompand_algorithm.h" #include "../decompand_status.h" -#include "algorithm.h" - namespace RPiController { struct DecompandConfig { @@ -13,7 +12,7 @@ struct DecompandConfig { libcamera::ipa::Pwl decompandCurve; }; -class Decompand : public Algorithm +class Decompand : public DecompandAlgorithm { public: Decompand(Controller *controller = nullptr);