[libcamera-devel,12/15] libcamera: ipu3: add ImgUDevice::Pipe

Message ID 20200701123036.51922-13-jacopo@jmondi.org
State Superseded, archived
Delegated to: Jacopo Mondi
Headers show
Series
  • libcamera: ipu3: Rework streams configuration
Related show

Commit Message

Jacopo Mondi July 1, 2020, 12:30 p.m. UTC
Add a structure that describes the ImgU pipe configuration.

The new structure reports the size of the ImgU input frame, the
desired main output size and desired viewfinder size.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/pipeline/ipu3/imgu.cpp | 19 +++++++++++++++++++
 src/libcamera/pipeline/ipu3/imgu.h   |  6 ++++++
 2 files changed, 25 insertions(+)

Comments

Niklas Söderlund July 1, 2020, 4:50 p.m. UTC | #1
Hi Jacopo,

Thanks for your patch.

On 2020-07-01 14:30:33 +0200, Jacopo Mondi wrote:
> Add a structure that describes the ImgU pipe configuration.
> 
> The new structure reports the size of the ImgU input frame, the
> desired main output size and desired viewfinder size.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/libcamera/pipeline/ipu3/imgu.cpp | 19 +++++++++++++++++++
>  src/libcamera/pipeline/ipu3/imgu.h   |  6 ++++++
>  2 files changed, 25 insertions(+)
> 
> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
> index d7f4173d3607..7e9047cc8dc1 100644
> --- a/src/libcamera/pipeline/ipu3/imgu.cpp
> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp
> @@ -19,6 +19,25 @@ namespace libcamera {
>  
>  LOG_DECLARE_CATEGORY(IPU3)
>  
> +/**
> + * \struct Pipe
> + * \brief Describe the ImgU requested configuration
> + *
> + * The ImgU unit processes images through several components, which have
> + * to be properly configured inspecting the input image size and the desired
> + * output sizes. This structure collects the ImgU input configuration and the
> + * requested main output and viewfinder configurations.
> + *
> + * \var Pipe::input
> + * \brief The input image size
> + *
> + * \var Pipe::output
> + * \brief The requested main output size
> + *
> + * \var Pipe::viewfinder
> + * \brief The requested viewfinder size
> + */
> +
>  /**
>   * \brief Initialize components of the ImgU instance
>   * \param[in] mediaDevice The ImgU instance media device
> diff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h
> index 5c124af2e9fe..8fb271fb8350 100644
> --- a/src/libcamera/pipeline/ipu3/imgu.h
> +++ b/src/libcamera/pipeline/ipu3/imgu.h
> @@ -23,6 +23,12 @@ struct StreamConfiguration;
>  class ImgUDevice
>  {
>  public:
> +	struct Pipe {
> +		Size input;
> +		Size output;
> +		Size viewfinder;
> +	};
> +
>  	int init(MediaDevice *media, unsigned int index);
>  
>  	int configureInput(const Size &size, V4L2DeviceFormat *inputFormat);
> -- 
> 2.27.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
index d7f4173d3607..7e9047cc8dc1 100644
--- a/src/libcamera/pipeline/ipu3/imgu.cpp
+++ b/src/libcamera/pipeline/ipu3/imgu.cpp
@@ -19,6 +19,25 @@  namespace libcamera {
 
 LOG_DECLARE_CATEGORY(IPU3)
 
+/**
+ * \struct Pipe
+ * \brief Describe the ImgU requested configuration
+ *
+ * The ImgU unit processes images through several components, which have
+ * to be properly configured inspecting the input image size and the desired
+ * output sizes. This structure collects the ImgU input configuration and the
+ * requested main output and viewfinder configurations.
+ *
+ * \var Pipe::input
+ * \brief The input image size
+ *
+ * \var Pipe::output
+ * \brief The requested main output size
+ *
+ * \var Pipe::viewfinder
+ * \brief The requested viewfinder size
+ */
+
 /**
  * \brief Initialize components of the ImgU instance
  * \param[in] mediaDevice The ImgU instance media device
diff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h
index 5c124af2e9fe..8fb271fb8350 100644
--- a/src/libcamera/pipeline/ipu3/imgu.h
+++ b/src/libcamera/pipeline/ipu3/imgu.h
@@ -23,6 +23,12 @@  struct StreamConfiguration;
 class ImgUDevice
 {
 public:
+	struct Pipe {
+		Size input;
+		Size output;
+		Size viewfinder;
+	};
+
 	int init(MediaDevice *media, unsigned int index);
 
 	int configureInput(const Size &size, V4L2DeviceFormat *inputFormat);