[libcamera-devel,RFC,1/6] libcamera: stream: Add StillCaptureRaw role

Message ID 20200316024146.2474424-2-niklas.soderlund@ragnatech.se
State Accepted
Headers show
Series
  • libcamera: Add support for a RAW still capture stream
Related show

Commit Message

Niklas Söderlund March 16, 2020, 2:41 a.m. UTC
Add role to be used for streams capturing frames in a raw format for
still capture in a low frame rate.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 include/libcamera/stream.h | 1 +
 src/libcamera/stream.cpp   | 4 ++++
 2 files changed, 5 insertions(+)

Comments

Laurent Pinchart March 23, 2020, 10:26 a.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Mon, Mar 16, 2020 at 03:41:41AM +0100, Niklas Söderlund wrote:
> Add role to be used for streams capturing frames in a raw format for
> still capture in a low frame rate.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> ---
>  include/libcamera/stream.h | 1 +
>  src/libcamera/stream.cpp   | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
> index 29a8030dff71d58f..c4c0241ec9f34727 100644
> --- a/include/libcamera/stream.h
> +++ b/include/libcamera/stream.h
> @@ -58,6 +58,7 @@ private:
>  
>  enum StreamRole {
>  	StillCapture,
> +	StillCaptureRaw,
>  	VideoRecording,
>  	Viewfinder,
>  };
> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
> index f34ea08de03b744e..571bf41e072d00c1 100644
> --- a/src/libcamera/stream.cpp
> +++ b/src/libcamera/stream.cpp
> @@ -363,6 +363,10 @@ std::string StreamConfiguration::toString() const
>   * \var StillCapture
>   * The stream is intended to capture high-resolution, high-quality still images
>   * with low frame rate. The captured frames may be exposed with flash.
> + * \var StillCaptureRaw
> + * The stream is intended to capture high-resolution, high-quality still images
> + * with low frame rate in a raw format. The captured frames may be exposed with
> + * flash.

I would write "high-resolution, raw still images with low frame rate."
(or s/raw/RAW/) as the concept of quality probably doesn't apply the
same way to RAW. Not sure about the flash, especially given that we
don't support that yet, I think we could just drop that sentence.

We'll need to detail this more, but that's a comment that applies to all
roles, so it's not blocking. With the above changes,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>   * \var VideoRecording
>   * The stream is intended to capture video for the purpose of recording or
>   * streaming. The video stream may produce a high frame rate and may be
Jacopo Mondi March 25, 2020, 10:59 a.m. UTC | #2
Hi Niklas,

On Mon, Mar 23, 2020 at 12:26:51PM +0200, Laurent Pinchart wrote:
> Hi Niklas,
>
> Thank you for the patch.
>
> On Mon, Mar 16, 2020 at 03:41:41AM +0100, Niklas Söderlund wrote:
> > Add role to be used for streams capturing frames in a raw format for
> > still capture in a low frame rate.

nit:

Add a role for capturing high resolution, low frame rate, still images
in RAW format.

> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> > ---
> >  include/libcamera/stream.h | 1 +
> >  src/libcamera/stream.cpp   | 4 ++++
> >  2 files changed, 5 insertions(+)
> >
> > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
> > index 29a8030dff71d58f..c4c0241ec9f34727 100644
> > --- a/include/libcamera/stream.h
> > +++ b/include/libcamera/stream.h
> > @@ -58,6 +58,7 @@ private:
> >
> >  enum StreamRole {
> >  	StillCapture,
> > +	StillCaptureRaw,
> >  	VideoRecording,
> >  	Viewfinder,
> >  };
> > diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
> > index f34ea08de03b744e..571bf41e072d00c1 100644
> > --- a/src/libcamera/stream.cpp
> > +++ b/src/libcamera/stream.cpp
> > @@ -363,6 +363,10 @@ std::string StreamConfiguration::toString() const
> >   * \var StillCapture
> >   * The stream is intended to capture high-resolution, high-quality still images
> >   * with low frame rate. The captured frames may be exposed with flash.
> > + * \var StillCaptureRaw
> > + * The stream is intended to capture high-resolution, high-quality still images
> > + * with low frame rate in a raw format. The captured frames may be exposed with
> > + * flash.
>
> I would write "high-resolution, raw still images with low frame rate."
> (or s/raw/RAW/) as the concept of quality probably doesn't apply the
> same way to RAW. Not sure about the flash, especially given that we
> don't support that yet, I think we could just drop that sentence.

Agred

with this

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

>
> We'll need to detail this more, but that's a comment that applies to all
> roles, so it's not blocking. With the above changes,
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> >   * \var VideoRecording
> >   * The stream is intended to capture video for the purpose of recording or
> >   * streaming. The video stream may produce a high frame rate and may be
>
> --
> Regards,
>
> Laurent Pinchart
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
index 29a8030dff71d58f..c4c0241ec9f34727 100644
--- a/include/libcamera/stream.h
+++ b/include/libcamera/stream.h
@@ -58,6 +58,7 @@  private:
 
 enum StreamRole {
 	StillCapture,
+	StillCaptureRaw,
 	VideoRecording,
 	Viewfinder,
 };
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index f34ea08de03b744e..571bf41e072d00c1 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -363,6 +363,10 @@  std::string StreamConfiguration::toString() const
  * \var StillCapture
  * The stream is intended to capture high-resolution, high-quality still images
  * with low frame rate. The captured frames may be exposed with flash.
+ * \var StillCaptureRaw
+ * The stream is intended to capture high-resolution, high-quality still images
+ * with low frame rate in a raw format. The captured frames may be exposed with
+ * flash.
  * \var VideoRecording
  * The stream is intended to capture video for the purpose of recording or
  * streaming. The video stream may produce a high frame rate and may be