[libcamera-devel,v1,0/2] Raspberry Pi vendor controls
mbox series

Message ID 20231204161901.6632-1-naush@raspberrypi.com
Headers show
Series
  • Raspberry Pi vendor controls
Related show

Message

Naushir Patuck Dec. 4, 2023, 4:18 p.m. UTC
Hi,

This patch series adds Raspberry Pi specific vendor controls, initially for
returning hardware generated statistics out in Request metdata.  This comes from
a user request at https://github.com/raspberrypi/libcamera/issues/90.

Thanks,
Naush

Naushir Patuck (2):
  build: controls: Add Raspberry Pi vendor specific controls
  ipa: vc4: Implement the StatsOutputEnable vendor control

 include/libcamera/meson.build      |  1 +
 src/ipa/rpi/common/ipa_base.cpp    | 12 +++++++++---
 src/ipa/rpi/common/ipa_base.h      |  3 ++-
 src/ipa/rpi/vc4/vc4.cpp            |  6 ++++++
 src/libcamera/control_ids_rpi.yaml | 29 +++++++++++++++++++++++++++++
 5 files changed, 47 insertions(+), 4 deletions(-)
 create mode 100644 src/libcamera/control_ids_rpi.yaml

Comments

David Plowman Dec. 6, 2023, 5:04 p.m. UTC | #1
Hi Naush

I think this is all great. The only thing I'd like to consider is how
we can make this available to Python applications, which is where many
(probably most) of our users are.

Do we need to put some "vendor specific stuff" into the libcamera
Python bindings to help interpret these structures?

Arguably we could leave all that to Picamera2 but then it doesn't
necessarily help every Python user. And also someone needs to do it!

Any thoughts, anyone?

David

On Mon, 4 Dec 2023 at 16:18, Naushir Patuck via libcamera-devel
<libcamera-devel@lists.libcamera.org> wrote:
>
> Hi,
>
> This patch series adds Raspberry Pi specific vendor controls, initially for
> returning hardware generated statistics out in Request metdata.  This comes from
> a user request at https://github.com/raspberrypi/libcamera/issues/90.
>
> Thanks,
> Naush
>
> Naushir Patuck (2):
>   build: controls: Add Raspberry Pi vendor specific controls
>   ipa: vc4: Implement the StatsOutputEnable vendor control
>
>  include/libcamera/meson.build      |  1 +
>  src/ipa/rpi/common/ipa_base.cpp    | 12 +++++++++---
>  src/ipa/rpi/common/ipa_base.h      |  3 ++-
>  src/ipa/rpi/vc4/vc4.cpp            |  6 ++++++
>  src/libcamera/control_ids_rpi.yaml | 29 +++++++++++++++++++++++++++++
>  5 files changed, 47 insertions(+), 4 deletions(-)
>  create mode 100644 src/libcamera/control_ids_rpi.yaml
>
> --
> 2.34.1
>
Naushir Patuck Dec. 7, 2023, 8:54 a.m. UTC | #2
Hi David,

That's a good point, python will receive a binary blob which will need
interpreting.

Given this is a RPi vendor specific structure, I don't know if it's
appropriate (or indeed if it can even be done) to translate this in
the pybind11 wrapping thingy.  But this should be possible to do
somewhere in picamera2.

Regards,
Naush

On Wed, 6 Dec 2023 at 17:04, David Plowman
<david.plowman@raspberrypi.com> wrote:
>
> Hi Naush
>
> I think this is all great. The only thing I'd like to consider is how
> we can make this available to Python applications, which is where many
> (probably most) of our users are.
>
> Do we need to put some "vendor specific stuff" into the libcamera
> Python bindings to help interpret these structures?
>
> Arguably we could leave all that to Picamera2 but then it doesn't
> necessarily help every Python user. And also someone needs to do it!
>
> Any thoughts, anyone?
>
> David
>
> On Mon, 4 Dec 2023 at 16:18, Naushir Patuck via libcamera-devel
> <libcamera-devel@lists.libcamera.org> wrote:
> >
> > Hi,
> >
> > This patch series adds Raspberry Pi specific vendor controls, initially for
> > returning hardware generated statistics out in Request metdata.  This comes from
> > a user request at https://github.com/raspberrypi/libcamera/issues/90.
> >
> > Thanks,
> > Naush
> >
> > Naushir Patuck (2):
> >   build: controls: Add Raspberry Pi vendor specific controls
> >   ipa: vc4: Implement the StatsOutputEnable vendor control
> >
> >  include/libcamera/meson.build      |  1 +
> >  src/ipa/rpi/common/ipa_base.cpp    | 12 +++++++++---
> >  src/ipa/rpi/common/ipa_base.h      |  3 ++-
> >  src/ipa/rpi/vc4/vc4.cpp            |  6 ++++++
> >  src/libcamera/control_ids_rpi.yaml | 29 +++++++++++++++++++++++++++++
> >  5 files changed, 47 insertions(+), 4 deletions(-)
> >  create mode 100644 src/libcamera/control_ids_rpi.yaml
> >
> > --
> > 2.34.1
> >
Naushir Patuck Dec. 19, 2023, 1:47 p.m. UTC | #3
Hi all,

Any further comments on this series, or can we merge it as-is?

Regards,
Naush

On Mon, 4 Dec 2023 at 16:18, Naushir Patuck <naush@raspberrypi.com> wrote:
>
> Hi,
>
> This patch series adds Raspberry Pi specific vendor controls, initially for
> returning hardware generated statistics out in Request metdata.  This comes from
> a user request at https://github.com/raspberrypi/libcamera/issues/90.
>
> Thanks,
> Naush
>
> Naushir Patuck (2):
>   build: controls: Add Raspberry Pi vendor specific controls
>   ipa: vc4: Implement the StatsOutputEnable vendor control
>
>  include/libcamera/meson.build      |  1 +
>  src/ipa/rpi/common/ipa_base.cpp    | 12 +++++++++---
>  src/ipa/rpi/common/ipa_base.h      |  3 ++-
>  src/ipa/rpi/vc4/vc4.cpp            |  6 ++++++
>  src/libcamera/control_ids_rpi.yaml | 29 +++++++++++++++++++++++++++++
>  5 files changed, 47 insertions(+), 4 deletions(-)
>  create mode 100644 src/libcamera/control_ids_rpi.yaml
>
> --
> 2.34.1
>
Kieran Bingham Jan. 8, 2024, 5:44 p.m. UTC | #4
Quoting Naushir Patuck via libcamera-devel (2023-12-07 08:54:35)
> Hi David,
> 
> That's a good point, python will receive a binary blob which will need
> interpreting.
> 
> Given this is a RPi vendor specific structure, I don't know if it's
> appropriate (or indeed if it can even be done) to translate this in
> the pybind11 wrapping thingy.  But this should be possible to do
> somewhere in picamera2.

Agreed, it wouldn't be likely to be parsed specfically at the libcamera
python binding layer. Something with knowledge of the specific vendor
control should handle it.

--
Kieran


> 
> Regards,
> Naush
> 
> On Wed, 6 Dec 2023 at 17:04, David Plowman
> <david.plowman@raspberrypi.com> wrote:
> >
> > Hi Naush
> >
> > I think this is all great. The only thing I'd like to consider is how
> > we can make this available to Python applications, which is where many
> > (probably most) of our users are.
> >
> > Do we need to put some "vendor specific stuff" into the libcamera
> > Python bindings to help interpret these structures?
> >
> > Arguably we could leave all that to Picamera2 but then it doesn't
> > necessarily help every Python user. And also someone needs to do it!
> >
> > Any thoughts, anyone?
> >
> > David
> >
> > On Mon, 4 Dec 2023 at 16:18, Naushir Patuck via libcamera-devel
> > <libcamera-devel@lists.libcamera.org> wrote:
> > >
> > > Hi,
> > >
> > > This patch series adds Raspberry Pi specific vendor controls, initially for
> > > returning hardware generated statistics out in Request metdata.  This comes from
> > > a user request at https://github.com/raspberrypi/libcamera/issues/90.
> > >
> > > Thanks,
> > > Naush
> > >
> > > Naushir Patuck (2):
> > >   build: controls: Add Raspberry Pi vendor specific controls
> > >   ipa: vc4: Implement the StatsOutputEnable vendor control
> > >
> > >  include/libcamera/meson.build      |  1 +
> > >  src/ipa/rpi/common/ipa_base.cpp    | 12 +++++++++---
> > >  src/ipa/rpi/common/ipa_base.h      |  3 ++-
> > >  src/ipa/rpi/vc4/vc4.cpp            |  6 ++++++
> > >  src/libcamera/control_ids_rpi.yaml | 29 +++++++++++++++++++++++++++++
> > >  5 files changed, 47 insertions(+), 4 deletions(-)
> > >  create mode 100644 src/libcamera/control_ids_rpi.yaml
> > >
> > > --
> > > 2.34.1
> > >