| Message ID | 20260114113016.25162-6-mzamazal@redhat.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
2026. 01. 14. 12:30 keltezéssel, Milan Zamazal írta: > Let's introduce IPAActiveState::combinedMatrix that is separate from > IPAActiveState::ccm and represents the overall correction matrix, not > only the sensor colour correction matrix. > > IPAActiveState::ccm still includes everything; this is changed in the > followup patch. > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Signed-off-by: Milan Zamazal <mzamazal@redhat.com> > --- Seems fine to me. Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > src/ipa/simple/algorithms/ccm.cpp | 1 + > src/ipa/simple/algorithms/lut.cpp | 2 +- > src/ipa/simple/ipa_context.h | 1 + > 3 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/simple/algorithms/ccm.cpp b/src/ipa/simple/algorithms/ccm.cpp > index e05e5bc28..a3e8cd6c4 100644 > --- a/src/ipa/simple/algorithms/ccm.cpp > +++ b/src/ipa/simple/algorithms/ccm.cpp > @@ -104,6 +104,7 @@ void Ccm::prepare(IPAContext &context, const uint32_t frame, > if (saturation) > applySaturation(ccm, saturation.value()); > > + context.activeState.combinedMatrix = ccm; > context.activeState.ccm = ccm; > frameContext.saturation = saturation; > context.activeState.matrixChanged = true; > diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp > index 5c4683fd8..141ea17fa 100644 > --- a/src/ipa/simple/algorithms/lut.cpp > +++ b/src/ipa/simple/algorithms/lut.cpp > @@ -131,7 +131,7 @@ void Lut::prepare(IPAContext &context, > Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0, > 0, gains.g(), 0, > 0, 0, gains.b() } }; > - auto matrix = context.activeState.ccm * gainMatrix; > + auto matrix = context.activeState.combinedMatrix * gainMatrix; > auto &red = params->redCcm; > auto &green = params->greenCcm; > auto &blue = params->blueCcm; > diff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h > index ea1852cd4..58dcad290 100644 > --- a/src/ipa/simple/ipa_context.h > +++ b/src/ipa/simple/ipa_context.h > @@ -63,6 +63,7 @@ struct IPAActiveState { > } gamma; > > Matrix<float, 3, 3> ccm; > + Matrix<float, 3, 3> combinedMatrix; > bool matrixChanged = false; > > struct {
diff --git a/src/ipa/simple/algorithms/ccm.cpp b/src/ipa/simple/algorithms/ccm.cpp index e05e5bc28..a3e8cd6c4 100644 --- a/src/ipa/simple/algorithms/ccm.cpp +++ b/src/ipa/simple/algorithms/ccm.cpp @@ -104,6 +104,7 @@ void Ccm::prepare(IPAContext &context, const uint32_t frame, if (saturation) applySaturation(ccm, saturation.value()); + context.activeState.combinedMatrix = ccm; context.activeState.ccm = ccm; frameContext.saturation = saturation; context.activeState.matrixChanged = true; diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp index 5c4683fd8..141ea17fa 100644 --- a/src/ipa/simple/algorithms/lut.cpp +++ b/src/ipa/simple/algorithms/lut.cpp @@ -131,7 +131,7 @@ void Lut::prepare(IPAContext &context, Matrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0, 0, gains.g(), 0, 0, 0, gains.b() } }; - auto matrix = context.activeState.ccm * gainMatrix; + auto matrix = context.activeState.combinedMatrix * gainMatrix; auto &red = params->redCcm; auto &green = params->greenCcm; auto &blue = params->blueCcm; diff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h index ea1852cd4..58dcad290 100644 --- a/src/ipa/simple/ipa_context.h +++ b/src/ipa/simple/ipa_context.h @@ -63,6 +63,7 @@ struct IPAActiveState { } gamma; Matrix<float, 3, 3> ccm; + Matrix<float, 3, 3> combinedMatrix; bool matrixChanged = false; struct {