Message ID | 20240913075750.35115-9-stefan.klug@ideasonboard.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Quoting Stefan Klug (2024-09-13 08:57:26) > For the LSC algorithm to dynamically calculate the LSC tables based on > the sensor size and the crop rectangle it needs access to that data. > Provide access to it by adding the sensorInfo object to the context. > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > --- > src/ipa/rkisp1/ipa_context.h | 2 ++ > src/ipa/rkisp1/rkisp1.cpp | 4 +++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h > index 3af2774a7fc8..e274d9b01e1c 100644 > --- a/src/ipa/rkisp1/ipa_context.h > +++ b/src/ipa/rkisp1/ipa_context.h > @@ -17,6 +17,7 @@ > #include <libcamera/control_ids.h> > #include <libcamera/controls.h> > #include <libcamera/geometry.h> > +#include <libcamera/ipa/core_ipa_interface.h> > > #include <libipa/camera_sensor_helper.h> > #include <libipa/fc_queue.h> > @@ -180,6 +181,7 @@ struct IPAFrameContext : public FrameContext { > > struct IPAContext { > const IPAHwSettings *hw; > + IPACameraSensorInfo sensorInfo; > IPASessionConfiguration configuration; > IPAActiveState activeState; > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp > index 78d2c375d6dc..9e161cabdea4 100644 > --- a/src/ipa/rkisp1/rkisp1.cpp > +++ b/src/ipa/rkisp1/rkisp1.cpp > @@ -124,7 +124,7 @@ const ControlInfoMap::Map rkisp1Controls{ > } /* namespace */ > > IPARkISP1::IPARkISP1() > - : context_({ {}, {}, {}, { kMaxFrameContexts }, {}, {} }) > + : context_({ {}, {}, {}, {}, { kMaxFrameContexts }, {}, {} }) > { > } > > @@ -158,6 +158,8 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision, > > LOG(IPARkISP1, Debug) << "Hardware revision is " << hwRevision; > > + context_.sensorInfo = sensorInfo; > + > context_.camHelper = CameraSensorHelperFactoryBase::create(settings.sensorModel); > if (!context_.camHelper) { > LOG(IPARkISP1, Error) > -- > 2.43.0 >
On Fri, Sep 13, 2024 at 09:57:26AM +0200, Stefan Klug wrote: > For the LSC algorithm to dynamically calculate the LSC tables based on > the sensor size and the crop rectangle it needs access to that data. > Provide access to it by adding the sensorInfo object to the context. > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> > --- > src/ipa/rkisp1/ipa_context.h | 2 ++ > src/ipa/rkisp1/rkisp1.cpp | 4 +++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h > index 3af2774a7fc8..e274d9b01e1c 100644 > --- a/src/ipa/rkisp1/ipa_context.h > +++ b/src/ipa/rkisp1/ipa_context.h > @@ -17,6 +17,7 @@ > #include <libcamera/control_ids.h> > #include <libcamera/controls.h> > #include <libcamera/geometry.h> > +#include <libcamera/ipa/core_ipa_interface.h> > > #include <libipa/camera_sensor_helper.h> > #include <libipa/fc_queue.h> > @@ -180,6 +181,7 @@ struct IPAFrameContext : public FrameContext { > > struct IPAContext { > const IPAHwSettings *hw; > + IPACameraSensorInfo sensorInfo; > IPASessionConfiguration configuration; > IPAActiveState activeState; > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp > index 78d2c375d6dc..9e161cabdea4 100644 > --- a/src/ipa/rkisp1/rkisp1.cpp > +++ b/src/ipa/rkisp1/rkisp1.cpp > @@ -124,7 +124,7 @@ const ControlInfoMap::Map rkisp1Controls{ > } /* namespace */ > > IPARkISP1::IPARkISP1() > - : context_({ {}, {}, {}, { kMaxFrameContexts }, {}, {} }) > + : context_({ {}, {}, {}, {}, { kMaxFrameContexts }, {}, {} }) > { > } > > @@ -158,6 +158,8 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision, > > LOG(IPARkISP1, Debug) << "Hardware revision is " << hwRevision; > > + context_.sensorInfo = sensorInfo; > + > context_.camHelper = CameraSensorHelperFactoryBase::create(settings.sensorModel); > if (!context_.camHelper) { > LOG(IPARkISP1, Error) > -- > 2.43.0 >
On Fri, Sep 13, 2024 at 09:57:26AM +0200, Stefan Klug wrote: > For the LSC algorithm to dynamically calculate the LSC tables based on > the sensor size and the crop rectangle it needs access to that data. > Provide access to it by adding the sensorInfo object to the context. > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > --- > src/ipa/rkisp1/ipa_context.h | 2 ++ You probably need to write documentation for this... Paul > src/ipa/rkisp1/rkisp1.cpp | 4 +++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h > index 3af2774a7fc8..e274d9b01e1c 100644 > --- a/src/ipa/rkisp1/ipa_context.h > +++ b/src/ipa/rkisp1/ipa_context.h > @@ -17,6 +17,7 @@ > #include <libcamera/control_ids.h> > #include <libcamera/controls.h> > #include <libcamera/geometry.h> > +#include <libcamera/ipa/core_ipa_interface.h> > > #include <libipa/camera_sensor_helper.h> > #include <libipa/fc_queue.h> > @@ -180,6 +181,7 @@ struct IPAFrameContext : public FrameContext { > > struct IPAContext { > const IPAHwSettings *hw; > + IPACameraSensorInfo sensorInfo; > IPASessionConfiguration configuration; > IPAActiveState activeState; > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp > index 78d2c375d6dc..9e161cabdea4 100644 > --- a/src/ipa/rkisp1/rkisp1.cpp > +++ b/src/ipa/rkisp1/rkisp1.cpp > @@ -124,7 +124,7 @@ const ControlInfoMap::Map rkisp1Controls{ > } /* namespace */ > > IPARkISP1::IPARkISP1() > - : context_({ {}, {}, {}, { kMaxFrameContexts }, {}, {} }) > + : context_({ {}, {}, {}, {}, { kMaxFrameContexts }, {}, {} }) > { > } > > @@ -158,6 +158,8 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision, > > LOG(IPARkISP1, Debug) << "Hardware revision is " << hwRevision; > > + context_.sensorInfo = sensorInfo; > + > context_.camHelper = CameraSensorHelperFactoryBase::create(settings.sensorModel); > if (!context_.camHelper) { > LOG(IPARkISP1, Error) > -- > 2.43.0 >
diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h index 3af2774a7fc8..e274d9b01e1c 100644 --- a/src/ipa/rkisp1/ipa_context.h +++ b/src/ipa/rkisp1/ipa_context.h @@ -17,6 +17,7 @@ #include <libcamera/control_ids.h> #include <libcamera/controls.h> #include <libcamera/geometry.h> +#include <libcamera/ipa/core_ipa_interface.h> #include <libipa/camera_sensor_helper.h> #include <libipa/fc_queue.h> @@ -180,6 +181,7 @@ struct IPAFrameContext : public FrameContext { struct IPAContext { const IPAHwSettings *hw; + IPACameraSensorInfo sensorInfo; IPASessionConfiguration configuration; IPAActiveState activeState; diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 78d2c375d6dc..9e161cabdea4 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -124,7 +124,7 @@ const ControlInfoMap::Map rkisp1Controls{ } /* namespace */ IPARkISP1::IPARkISP1() - : context_({ {}, {}, {}, { kMaxFrameContexts }, {}, {} }) + : context_({ {}, {}, {}, {}, { kMaxFrameContexts }, {}, {} }) { } @@ -158,6 +158,8 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision, LOG(IPARkISP1, Debug) << "Hardware revision is " << hwRevision; + context_.sensorInfo = sensorInfo; + context_.camHelper = CameraSensorHelperFactoryBase::create(settings.sensorModel); if (!context_.camHelper) { LOG(IPARkISP1, Error)
For the LSC algorithm to dynamically calculate the LSC tables based on the sensor size and the crop rectangle it needs access to that data. Provide access to it by adding the sensorInfo object to the context. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- src/ipa/rkisp1/ipa_context.h | 2 ++ src/ipa/rkisp1/rkisp1.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-)