[libcamera-devel] ipa: rkisp1: Add additional default values to controls
diff mbox series

Message ID 20221125154843.23486-1-robert.mader@collabora.com
State Accepted
Commit d5fc282eff47446475aa730d05513684de2840e4
Headers show
Series
  • [libcamera-devel] ipa: rkisp1: Add additional default values to controls
Related show

Commit Message

Robert Mader Nov. 25, 2022, 3:48 p.m. UTC
To make things easier for consumers.

Related: https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1450

Signed-off-by: Robert Mader <robert.mader@collabora.com>
---
 src/ipa/rkisp1/rkisp1.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Kieran Bingham Nov. 25, 2022, 4:08 p.m. UTC | #1
Quoting Robert Mader via libcamera-devel (2022-11-25 15:48:43)
> To make things easier for consumers.
> 
> Related: https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1450
> 

I think these controls should be managed by the algorithms themselves
... but that's not for this patch, and I think this is reasonable.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Robert Mader <robert.mader@collabora.com>
> ---
>  src/ipa/rkisp1/rkisp1.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
> index 52dffc09..6544c925 100644
> --- a/src/ipa/rkisp1/rkisp1.cpp
> +++ b/src/ipa/rkisp1/rkisp1.cpp
> @@ -101,9 +101,9 @@ const ControlInfoMap::Map rkisp1Controls{
>         { &controls::AeEnable, ControlInfo(false, true) },
>         { &controls::AwbEnable, ControlInfo(false, true) },
>         { &controls::ColourGains, ControlInfo(0.0f, 3.996f, 1.0f) },
> -       { &controls::Brightness, ControlInfo(-1.0f, 0.993f) },
> -       { &controls::Contrast, ControlInfo(0.0f, 1.993f) },
> -       { &controls::Saturation, ControlInfo(0.0f, 1.993f) },
> +       { &controls::Brightness, ControlInfo(-1.0f, 0.993f, 0.0f) },
> +       { &controls::Contrast, ControlInfo(0.0f, 1.993f, 1.0f) },
> +       { &controls::Saturation, ControlInfo(0.0f, 1.993f, 1.0f) },
>         { &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) },
>         { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },
>  };
> -- 
> 2.38.1
>
Jacopo Mondi Dec. 8, 2022, 5:18 p.m. UTC | #2
Hello,

On Fri, Nov 25, 2022 at 04:08:08PM +0000, Kieran Bingham via libcamera-devel wrote:
> Quoting Robert Mader via libcamera-devel (2022-11-25 15:48:43)
> > To make things easier for consumers.
> >
> > Related: https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1450
> >
>
> I think these controls should be managed by the algorithms themselves
> ... but that's not for this patch, and I think this is reasonable.
>

Likewise

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
  j

> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
> > Signed-off-by: Robert Mader <robert.mader@collabora.com>
> > ---
> >  src/ipa/rkisp1/rkisp1.cpp | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
> > index 52dffc09..6544c925 100644
> > --- a/src/ipa/rkisp1/rkisp1.cpp
> > +++ b/src/ipa/rkisp1/rkisp1.cpp
> > @@ -101,9 +101,9 @@ const ControlInfoMap::Map rkisp1Controls{
> >         { &controls::AeEnable, ControlInfo(false, true) },
> >         { &controls::AwbEnable, ControlInfo(false, true) },
> >         { &controls::ColourGains, ControlInfo(0.0f, 3.996f, 1.0f) },
> > -       { &controls::Brightness, ControlInfo(-1.0f, 0.993f) },
> > -       { &controls::Contrast, ControlInfo(0.0f, 1.993f) },
> > -       { &controls::Saturation, ControlInfo(0.0f, 1.993f) },
> > +       { &controls::Brightness, ControlInfo(-1.0f, 0.993f, 0.0f) },
> > +       { &controls::Contrast, ControlInfo(0.0f, 1.993f, 1.0f) },
> > +       { &controls::Saturation, ControlInfo(0.0f, 1.993f, 1.0f) },
> >         { &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) },
> >         { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },
> >  };
> > --
> > 2.38.1
> >

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 52dffc09..6544c925 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -101,9 +101,9 @@  const ControlInfoMap::Map rkisp1Controls{
 	{ &controls::AeEnable, ControlInfo(false, true) },
 	{ &controls::AwbEnable, ControlInfo(false, true) },
 	{ &controls::ColourGains, ControlInfo(0.0f, 3.996f, 1.0f) },
-	{ &controls::Brightness, ControlInfo(-1.0f, 0.993f) },
-	{ &controls::Contrast, ControlInfo(0.0f, 1.993f) },
-	{ &controls::Saturation, ControlInfo(0.0f, 1.993f) },
+	{ &controls::Brightness, ControlInfo(-1.0f, 0.993f, 0.0f) },
+	{ &controls::Contrast, ControlInfo(0.0f, 1.993f, 1.0f) },
+	{ &controls::Saturation, ControlInfo(0.0f, 1.993f, 1.0f) },
 	{ &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) },
 	{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },
 };