| Message ID | 20260616-ipu3-libipa-rework-v1-2-d4448b54f1d8@ideasonboard.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
2026. 06. 16. 8:41 keltezéssel, Daniel Scally írta: > The IPU3 AWB algorithm currently defines a CCM matrix that is just > a no-op. Remove the settings entirely; they need really to go in to > a dedicated CCM algorithm. > > Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> > --- I presume no transformation is done by the hardware after this change? Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > src/ipa/ipu3/algorithms/awb.cpp | 10 ---------- > 1 file changed, 10 deletions(-) > > diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp > index 6b4418aa6f3add0a41cae77000c1f5f67897111a..613bdbbf51cd127e03906571813260a6857067dc 100644 > --- a/src/ipa/ipu3/algorithms/awb.cpp > +++ b/src/ipa/ipu3/algorithms/awb.cpp > @@ -112,13 +112,6 @@ static const struct ipu3_uapi_bnr_static_config imguCssBnrDefaults = { > .opt_center_sqr = { 419904, 133956 }, > }; > > -/* Default color correction matrix defined as an identity matrix */ > -static const struct ipu3_uapi_ccm_mat_config imguCssCcmDefault = { > - 8191, 0, 0, 0, > - 0, 8191, 0, 0, > - 0, 0, 8191, 0 > -}; > - > /** > * \class Awb > * \brief A Grey world white balance correction algorithm > @@ -293,12 +286,9 @@ void Awb::prepare(IPAContext &context, > > LOG(IPU3Awb, Debug) << "Color temperature estimated: " << asyncResults_.temperatureK; > > - /* The CCM matrix may change when color temperature will be used */ > - params->acc_param.ccm = imguCssCcmDefault; > > params->use.acc_awb = 1; > params->use.acc_bnr = 1; > - params->use.acc_ccm = 1; > } > > /* Generate an RGB vector with the average values for each zone */ > > -- > 2.43.0 >
Hi Barnabas On 16/06/2026 09:29, Pőcze Barnabás wrote: > 2026. 06. 16. 8:41 keltezéssel, Daniel Scally írta: >> The IPU3 AWB algorithm currently defines a CCM matrix that is just >> a no-op. Remove the settings entirely; they need really to go in to >> a dedicated CCM algorithm. >> >> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> >> --- > > I presume no transformation is done by the hardware after this change? Hm no actually it will revert to using the driver defined matrix [1], which is not an identity matrix: const struct ipu3_uapi_ccm_mat_config imgu_css_ccm_defaults = { 9775, -2671, 1087, 0, -1071, 8303, 815, 0, -23, -7887, 16103, 0 }; [1] https://elixir.bootlin.com/linux/v7.1/source/drivers/staging/media/ipu3/ipu3-tables.c#L9334 > > Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > > >> src/ipa/ipu3/algorithms/awb.cpp | 10 ---------- >> 1 file changed, 10 deletions(-) >> >> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp >> index 6b4418aa6f3add0a41cae77000c1f5f67897111a..613bdbbf51cd127e03906571813260a6857067dc 100644 >> --- a/src/ipa/ipu3/algorithms/awb.cpp >> +++ b/src/ipa/ipu3/algorithms/awb.cpp >> @@ -112,13 +112,6 @@ static const struct ipu3_uapi_bnr_static_config imguCssBnrDefaults = { >> .opt_center_sqr = { 419904, 133956 }, >> }; >> >> -/* Default color correction matrix defined as an identity matrix */ >> -static const struct ipu3_uapi_ccm_mat_config imguCssCcmDefault = { >> - 8191, 0, 0, 0, >> - 0, 8191, 0, 0, >> - 0, 0, 8191, 0 >> -}; >> - >> /** >> * \class Awb >> * \brief A Grey world white balance correction algorithm >> @@ -293,12 +286,9 @@ void Awb::prepare(IPAContext &context, >> >> LOG(IPU3Awb, Debug) << "Color temperature estimated: " << asyncResults_.temperatureK; >> >> - /* The CCM matrix may change when color temperature will be used */ >> - params->acc_param.ccm = imguCssCcmDefault; >> >> params->use.acc_awb = 1; >> params->use.acc_bnr = 1; >> - params->use.acc_ccm = 1; >> } >> >> /* Generate an RGB vector with the average values for each zone */ >> >> -- >> 2.43.0 >> > >
2026. 06. 16. 10:41 keltezéssel, Dan Scally írta: > Hi Barnabas > > On 16/06/2026 09:29, Pőcze Barnabás wrote: >> 2026. 06. 16. 8:41 keltezéssel, Daniel Scally írta: >>> The IPU3 AWB algorithm currently defines a CCM matrix that is just >>> a no-op. Remove the settings entirely; they need really to go in to >>> a dedicated CCM algorithm. >>> >>> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> >>> --- >> >> I presume no transformation is done by the hardware after this change? > > Hm no actually it will revert to using the driver defined matrix [1], which is not an identity matrix: > > const struct ipu3_uapi_ccm_mat_config imgu_css_ccm_defaults = { > 9775, -2671, 1087, 0, > -1071, 8303, 815, 0, > -23, -7887, 16103, 0 > }; > Ahh, I see, I suppose it's fine because later changes will set the CCM matrix. > > [1] https://elixir.bootlin.com/linux/v7.1/source/drivers/staging/media/ipu3/ipu3-tables.c#L9334 >> >> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> >> >> >>> src/ipa/ipu3/algorithms/awb.cpp | 10 ---------- >>> 1 file changed, 10 deletions(-) >>> >>> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp >>> index 6b4418aa6f3add0a41cae77000c1f5f67897111a..613bdbbf51cd127e03906571813260a6857067dc 100644 >>> --- a/src/ipa/ipu3/algorithms/awb.cpp >>> +++ b/src/ipa/ipu3/algorithms/awb.cpp >>> @@ -112,13 +112,6 @@ static const struct ipu3_uapi_bnr_static_config imguCssBnrDefaults = { >>> .opt_center_sqr = { 419904, 133956 }, >>> }; >>> >>> -/* Default color correction matrix defined as an identity matrix */ >>> -static const struct ipu3_uapi_ccm_mat_config imguCssCcmDefault = { >>> - 8191, 0, 0, 0, >>> - 0, 8191, 0, 0, >>> - 0, 0, 8191, 0 >>> -}; >>> - >>> /** >>> * \class Awb >>> * \brief A Grey world white balance correction algorithm >>> @@ -293,12 +286,9 @@ void Awb::prepare(IPAContext &context, >>> >>> LOG(IPU3Awb, Debug) << "Color temperature estimated: " << asyncResults_.temperatureK; >>> >>> - /* The CCM matrix may change when color temperature will be used */ >>> - params->acc_param.ccm = imguCssCcmDefault; >>> >>> params->use.acc_awb = 1; >>> params->use.acc_bnr = 1; >>> - params->use.acc_ccm = 1; >>> } >>> >>> /* Generate an RGB vector with the average values for each zone */ >>> >>> -- >>> 2.43.0 >>> >> >> >
diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp index 6b4418aa6f3add0a41cae77000c1f5f67897111a..613bdbbf51cd127e03906571813260a6857067dc 100644 --- a/src/ipa/ipu3/algorithms/awb.cpp +++ b/src/ipa/ipu3/algorithms/awb.cpp @@ -112,13 +112,6 @@ static const struct ipu3_uapi_bnr_static_config imguCssBnrDefaults = { .opt_center_sqr = { 419904, 133956 }, }; -/* Default color correction matrix defined as an identity matrix */ -static const struct ipu3_uapi_ccm_mat_config imguCssCcmDefault = { - 8191, 0, 0, 0, - 0, 8191, 0, 0, - 0, 0, 8191, 0 -}; - /** * \class Awb * \brief A Grey world white balance correction algorithm @@ -293,12 +286,9 @@ void Awb::prepare(IPAContext &context, LOG(IPU3Awb, Debug) << "Color temperature estimated: " << asyncResults_.temperatureK; - /* The CCM matrix may change when color temperature will be used */ - params->acc_param.ccm = imguCssCcmDefault; params->use.acc_awb = 1; params->use.acc_bnr = 1; - params->use.acc_ccm = 1; } /* Generate an RGB vector with the average values for each zone */
The IPU3 AWB algorithm currently defines a CCM matrix that is just a no-op. Remove the settings entirely; they need really to go in to a dedicated CCM algorithm. Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> --- src/ipa/ipu3/algorithms/awb.cpp | 10 ---------- 1 file changed, 10 deletions(-)