| Message ID | 20260621-kbingham-awb-saturation-v1-2-b91ea59c6cfb@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
On Sun, Jun 21, 2026 at 12:00:29AM +0100, Kieran Bingham wrote: > Use the newly introduced 'clamp' operation on the RGB vector type to > restrict the raw RGB means. > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/ipa/rkisp1/algorithms/awb.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp > index 5ae5b647164329573f0a233ee36d1db7b3683ef9..0eb05c2b6e1ac9e159e050bae3d5c56ec3045299 100644 > --- a/src/ipa/rkisp1/algorithms/awb.cpp > +++ b/src/ipa/rkisp1/algorithms/awb.cpp > @@ -332,7 +332,7 @@ void Awb::process(IPAContext &context, > * divisions by zero when computing the raw means in subsequent > * iterations. > */ > - awbResult.gains = awbResult.gains.max(1.0 / 256).min(1023.0 / 256); > + awbResult.gains = awbResult.gains.clamp(1.0 / 256, 1023.0 / 256); > > /* Filter the values to avoid oscillations. */ > double speed = 0.2;
diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index 5ae5b647164329573f0a233ee36d1db7b3683ef9..0eb05c2b6e1ac9e159e050bae3d5c56ec3045299 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -332,7 +332,7 @@ void Awb::process(IPAContext &context, * divisions by zero when computing the raw means in subsequent * iterations. */ - awbResult.gains = awbResult.gains.max(1.0 / 256).min(1023.0 / 256); + awbResult.gains = awbResult.gains.clamp(1.0 / 256, 1023.0 / 256); /* Filter the values to avoid oscillations. */ double speed = 0.2;
Use the newly introduced 'clamp' operation on the RGB vector type to restrict the raw RGB means. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- src/ipa/rkisp1/algorithms/awb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)