| Message ID | 20251015012251.17508-22-bryan.odonoghue@linaro.org |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Bryan O'Donoghue (2025-10-15 02:22:33) > Populate the DebayerParams CCM table during ccm::prepare(). A copy is made > of the CCM into the DebayerParams structure. I think I would squash this down into [PATCH v3 18/39] libcamera: software_isp: debayer: Extend DebayerParams struct to hold a copy of per-frame CCM values as they are so closely related. > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > src/ipa/simple/algorithms/ccm.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/simple/algorithms/ccm.cpp b/src/ipa/simple/algorithms/ccm.cpp > index 0a98406c..cb023878 100644 > --- a/src/ipa/simple/algorithms/ccm.cpp > +++ b/src/ipa/simple/algorithms/ccm.cpp > @@ -14,6 +14,7 @@ > #include <libcamera/control_ids.h> > > #include "libcamera/internal/matrix.h" > +#include "libcamera/internal/software_isp/debayer_params.h" > > namespace { > > @@ -84,7 +85,7 @@ void Ccm::applySaturation(Matrix<float, 3, 3> &ccm, float saturation) > } > > void Ccm::prepare(IPAContext &context, const uint32_t frame, > - IPAFrameContext &frameContext, [[maybe_unused]] DebayerParams *params) > + IPAFrameContext &frameContext, DebayerParams *params) > { > auto &saturation = context.activeState.knobs.saturation; > > @@ -108,6 +109,7 @@ void Ccm::prepare(IPAContext &context, const uint32_t frame, > context.activeState.ccm.ccm = ccm; > frameContext.ccm.ccm = ccm; > frameContext.saturation = saturation; > + params->ccm = ccm; > context.activeState.ccm.changed = true; > } > > -- > 2.51.0 >
Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes: > Populate the DebayerParams CCM table during ccm::prepare(). A copy is made > of the CCM into the DebayerParams structure. > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > --- > src/ipa/simple/algorithms/ccm.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/simple/algorithms/ccm.cpp b/src/ipa/simple/algorithms/ccm.cpp > index 0a98406c..cb023878 100644 > --- a/src/ipa/simple/algorithms/ccm.cpp > +++ b/src/ipa/simple/algorithms/ccm.cpp > @@ -14,6 +14,7 @@ > #include <libcamera/control_ids.h> > > #include "libcamera/internal/matrix.h" > +#include "libcamera/internal/software_isp/debayer_params.h" > > namespace { > > @@ -84,7 +85,7 @@ void Ccm::applySaturation(Matrix<float, 3, 3> &ccm, float saturation) > } > > void Ccm::prepare(IPAContext &context, const uint32_t frame, > - IPAFrameContext &frameContext, [[maybe_unused]] DebayerParams *params) > + IPAFrameContext &frameContext, DebayerParams *params) > { > auto &saturation = context.activeState.knobs.saturation; > > @@ -108,6 +109,7 @@ void Ccm::prepare(IPAContext &context, const uint32_t frame, > context.activeState.ccm.ccm = ccm; > frameContext.ccm.ccm = ccm; > frameContext.saturation = saturation; > + params->ccm = ccm; > context.activeState.ccm.changed = true; > }
diff --git a/src/ipa/simple/algorithms/ccm.cpp b/src/ipa/simple/algorithms/ccm.cpp index 0a98406c..cb023878 100644 --- a/src/ipa/simple/algorithms/ccm.cpp +++ b/src/ipa/simple/algorithms/ccm.cpp @@ -14,6 +14,7 @@ #include <libcamera/control_ids.h> #include "libcamera/internal/matrix.h" +#include "libcamera/internal/software_isp/debayer_params.h" namespace { @@ -84,7 +85,7 @@ void Ccm::applySaturation(Matrix<float, 3, 3> &ccm, float saturation) } void Ccm::prepare(IPAContext &context, const uint32_t frame, - IPAFrameContext &frameContext, [[maybe_unused]] DebayerParams *params) + IPAFrameContext &frameContext, DebayerParams *params) { auto &saturation = context.activeState.knobs.saturation; @@ -108,6 +109,7 @@ void Ccm::prepare(IPAContext &context, const uint32_t frame, context.activeState.ccm.ccm = ccm; frameContext.ccm.ccm = ccm; frameContext.saturation = saturation; + params->ccm = ccm; context.activeState.ccm.changed = true; }
Populate the DebayerParams CCM table during ccm::prepare(). A copy is made of the CCM into the DebayerParams structure. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- src/ipa/simple/algorithms/ccm.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)