[libcamera-devel,v4,1/3] libcamera: controls: Add frame duration control
diff mbox series

Message ID 20201209102630.5562-2-naush@raspberrypi.com
State Superseded
Headers show
Series
  • raspberrypi: FPS control
Related show

Commit Message

Naushir Patuck Dec. 9, 2020, 10:26 a.m. UTC
Add a float array control (controls::FrameDurations) to specify the
minimum and maximum (in that order) frame duration to be used by the
camera sensor.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/libcamera/control_ids.yaml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

David Plowman Dec. 10, 2020, 8:44 a.m. UTC | #1
Hi Naush

Thanks for the patch, I have been eagerly awaiting this set!

On Wed, 9 Dec 2020 at 10:26, Naushir Patuck <naush@raspberrypi.com> wrote:
>
> Add a float array control (controls::FrameDurations) to specify the
> minimum and maximum (in that order) frame duration to be used by the
> camera sensor.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> ---
>  src/libcamera/control_ids.yaml | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
> index 6d6f0fee..cd44a620 100644
> --- a/src/libcamera/control_ids.yaml
> +++ b/src/libcamera/control_ids.yaml
> @@ -554,4 +554,17 @@ controls:
>          detection, additional format conversions etc) count as an additional
>          pipeline stage.
>
> +  - FrameDurations:
> +      type: float
> +      description: |
> +        Specifies the minimum and maximum (in that order) allowable frame
> +        duration, in micro-seconds, for the sensor to use. This could also limit
> +        the largest exposure times the sensor can use. For example, if a maximum
> +        frame duration of 33ms is requested (corresponding to 30 frames per
> +        second), the sensor will not be able raise the exposure time above 33ms.
> +        Note that the sensor may not always be able to provide the requested
> +        frame duration limits depending on its mode configuration.

Is it worth remarking that they can be set to the same values to give
a fixed fps mode of operations? Or is that too obvious to mention?

Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Tested-by: David Plowman <david.plowman@raspberrypi.com>

Best regards
David

> +
> +        \sa ExposureTime
> +      size: [2]
>  ...
> --
> 2.25.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
Naushir Patuck Dec. 10, 2020, 9:21 a.m. UTC | #2
Hi David,

Thank you for your review comments.

On Thu, 10 Dec 2020 at 08:45, David Plowman <david.plowman@raspberrypi.com>
wrote:

> Hi Naush
>
> Thanks for the patch, I have been eagerly awaiting this set!
>
> On Wed, 9 Dec 2020 at 10:26, Naushir Patuck <naush@raspberrypi.com> wrote:
> >
> > Add a float array control (controls::FrameDurations) to specify the
> > minimum and maximum (in that order) frame duration to be used by the
> > camera sensor.
> >
> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> > ---
> >  src/libcamera/control_ids.yaml | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/src/libcamera/control_ids.yaml
> b/src/libcamera/control_ids.yaml
> > index 6d6f0fee..cd44a620 100644
> > --- a/src/libcamera/control_ids.yaml
> > +++ b/src/libcamera/control_ids.yaml
> > @@ -554,4 +554,17 @@ controls:
> >          detection, additional format conversions etc) count as an
> additional
> >          pipeline stage.
> >
> > +  - FrameDurations:
> > +      type: float
> > +      description: |
> > +        Specifies the minimum and maximum (in that order) allowable
> frame
> > +        duration, in micro-seconds, for the sensor to use. This could
> also limit
> > +        the largest exposure times the sensor can use. For example, if
> a maximum
> > +        frame duration of 33ms is requested (corresponding to 30 frames
> per
> > +        second), the sensor will not be able raise the exposure time
> above 33ms.
> > +        Note that the sensor may not always be able to provide the
> requested
> > +        frame duration limits depending on its mode configuration.
>
> Is it worth remarking that they can be set to the same values to give
> a fixed fps mode of operations? Or is that too obvious to mention?
>

No harm in adding it I suppose.  Will make the change and post an update.

Regards,
Naush


>
> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
> Tested-by: David Plowman <david.plowman@raspberrypi.com>
>
> Best regards
> David
>
> > +
> > +        \sa ExposureTime
> > +      size: [2]
> >  ...
> > --
> > 2.25.1
> >
> > _______________________________________________
> > libcamera-devel mailing list
> > libcamera-devel@lists.libcamera.org
> > https://lists.libcamera.org/listinfo/libcamera-devel
>

Patch
diff mbox series

diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
index 6d6f0fee..cd44a620 100644
--- a/src/libcamera/control_ids.yaml
+++ b/src/libcamera/control_ids.yaml
@@ -554,4 +554,17 @@  controls:
         detection, additional format conversions etc) count as an additional
         pipeline stage.
 
+  - FrameDurations:
+      type: float
+      description: |
+        Specifies the minimum and maximum (in that order) allowable frame
+        duration, in micro-seconds, for the sensor to use. This could also limit
+        the largest exposure times the sensor can use. For example, if a maximum
+        frame duration of 33ms is requested (corresponding to 30 frames per
+        second), the sensor will not be able raise the exposure time above 33ms.
+        Note that the sensor may not always be able to provide the requested
+        frame duration limits depending on its mode configuration.
+
+        \sa ExposureTime
+      size: [2]
 ...