[libcamera-devel,v5,17/19] libcamera: ipu3: Use NV12 as default image format

Message ID 20190326083902.26121-18-jacopo@jmondi.org
State Superseded
Headers show
Series
  • libcamera: ipu3: Add ImgU support
Related show

Commit Message

Jacopo Mondi March 26, 2019, 8:39 a.m. UTC
Now that images come from the ImgU output, hardcode NV12 as default
output format.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Niklas Söderlund April 2, 2019, 11:40 a.m. UTC | #1
Hi Jacopo,

Thanks for your work.

On 2019-03-26 09:39:00 +0100, Jacopo Mondi wrote:
> Now that images come from the ImgU output, hardcode NV12 as default
> output format.
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

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

> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 7a5e715458ae..7b7baa5ac5fb 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -253,13 +253,13 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera,
>  
>  	config->width = maxRange.maxWidth;
>  	config->height = maxRange.maxHeight;
> -	config->pixelFormat = cio2->maxSizes_.first;
> +	config->pixelFormat = V4L2_PIX_FMT_NV12;
>  	config->bufferCount = IPU3_BUFFER_COUNT;
>  
>  	LOG(IPU3, Debug)
>  		<< "Stream format set to: " << config->width << "x"
>  		<< config->height << "-0x" << std::hex << std::setfill('0')
> -		<< std::setw(4) << config->pixelFormat;
> +		<< std::setw(8) << config->pixelFormat;
>  
>  	return configs;
>  }
> -- 
> 2.21.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/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 7a5e715458ae..7b7baa5ac5fb 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -253,13 +253,13 @@  PipelineHandlerIPU3::streamConfiguration(Camera *camera,
 
 	config->width = maxRange.maxWidth;
 	config->height = maxRange.maxHeight;
-	config->pixelFormat = cio2->maxSizes_.first;
+	config->pixelFormat = V4L2_PIX_FMT_NV12;
 	config->bufferCount = IPU3_BUFFER_COUNT;
 
 	LOG(IPU3, Debug)
 		<< "Stream format set to: " << config->width << "x"
 		<< config->height << "-0x" << std::hex << std::setfill('0')
-		<< std::setw(4) << config->pixelFormat;
+		<< std::setw(8) << config->pixelFormat;
 
 	return configs;
 }