[v4,4/4] media: amphion: encoder add support for contiguous planes

Message ID c375506c02e6664580a2eb1cac559ab8dfd02552.1660027440.git.ming.qian@nxp.com (mailing list archive)
State Superseded
Delegated to: Hans Verkuil
Headers
Series media: amphion: add support for contiguous format |

Commit Message

Ming Qian Aug. 9, 2022, 6:50 a.m. UTC
  encoder add support for contiguous formats NV12

Signed-off-by: Ming Qian <ming.qian@nxp.com>
---
 drivers/media/platform/amphion/venc.c | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Tommaso Merciai Aug. 22, 2022, 11:31 a.m. UTC | #1
Hi Ming,

On Tue, Aug 09, 2022 at 02:50:41PM +0800, Ming Qian wrote:
> encoder add support for contiguous formats NV12
> 
> Signed-off-by: Ming Qian <ming.qian@nxp.com>
> ---
>  drivers/media/platform/amphion/venc.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/media/platform/amphion/venc.c b/drivers/media/platform/amphion/venc.c
> index 060a1ee78b17..3cbe8ce637e5 100644
> --- a/drivers/media/platform/amphion/venc.c
> +++ b/drivers/media/platform/amphion/venc.c
> @@ -72,6 +72,14 @@ static const struct vpu_format venc_formats[] = {
>  		.mem_planes = 2,
>  		.comp_planes = 2,
>  		.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> +		.sibling = V4L2_PIX_FMT_NV12,
> +	},
> +	{
> +		.pixfmt = V4L2_PIX_FMT_NV12,
> +		.mem_planes = 1,
> +		.comp_planes = 2,
> +		.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
> +		.sibling = V4L2_PIX_FMT_NV12M,
>  	},
>  	{
>  		.pixfmt = V4L2_PIX_FMT_H264,
> -- 
> 2.37.1
> 

Looks good.

Reviewed-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
  

Patch

diff --git a/drivers/media/platform/amphion/venc.c b/drivers/media/platform/amphion/venc.c
index 060a1ee78b17..3cbe8ce637e5 100644
--- a/drivers/media/platform/amphion/venc.c
+++ b/drivers/media/platform/amphion/venc.c
@@ -72,6 +72,14 @@  static const struct vpu_format venc_formats[] = {
 		.mem_planes = 2,
 		.comp_planes = 2,
 		.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
+		.sibling = V4L2_PIX_FMT_NV12,
+	},
+	{
+		.pixfmt = V4L2_PIX_FMT_NV12,
+		.mem_planes = 1,
+		.comp_planes = 2,
+		.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
+		.sibling = V4L2_PIX_FMT_NV12M,
 	},
 	{
 		.pixfmt = V4L2_PIX_FMT_H264,