Re: [PATCHv2 04/12] media: s5p_mfc_dec: set flags for OUTPUT coded formats

2019-08-16 Thread Tomasz Figa
Hi Marek,

On Fri, Aug 16, 2019 at 8:37 PM Marek Szyprowski
 wrote:
>
> Hi Tomasz,
>
> On 2019-08-15 12:14, Tomasz Figa wrote:
> > Hi Hans,
> >
> > On Mon, Aug 12, 2019 at 8:05 PM Hans Verkuil  
> > wrote:
> >> From: Maxime Jourdan 
> >>
> >> Tag all the coded formats where the s5p_mfc decoder supports dynamic
> >> resolution switching or has a bytestream parser.
> >>
> > I believe it depends on the MFC hardware version. v5 might have some
> > additional restrictions.
> >
> > Let me add some more folks to figure out.
>
> IIRC MFC v5 also supported resolution change.
>

Right, I'm not worried about that part, but rather the
CONTINUOUS_BYTESTREAM flag. I know that the MFC on daisy and peach
indeed handled H.264 in that manner, but not sure about the earlier
revisions.

Best regards,
Tomasz

> >> Signed-off-by: Maxime Jourdan 
> >> Signed-off-by: Hans Verkuil 
> >> [hverkuil-ci...@xs4all.nl: added CONTINUOUS_BYTESTREAM]
> >> ---
> >>   .../media/platform/s5p-mfc/s5p_mfc_common.h|  1 +
> >>   drivers/media/platform/s5p-mfc/s5p_mfc_dec.c   | 18 ++
> >>   2 files changed, 19 insertions(+)
> >>
> >> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h 
> >> b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> >> index 96d1ecd1521b..31b133af91eb 100644
> >> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> >> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> >> @@ -723,6 +723,7 @@ struct s5p_mfc_fmt {
> >>  enum s5p_mfc_fmt_type type;
> >>  u32 num_planes;
> >>  u32 versions;
> >> +   u32 flags;
> >>   };
> >>
> >>   /**
> >> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
> >> b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> >> index 61e144a35201..1423c33c70cb 100644
> >> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> >> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> >> @@ -62,6 +62,8 @@ static struct s5p_mfc_fmt formats[] = {
> >>  .type   = MFC_FMT_DEC,
> >>  .num_planes = 1,
> >>  .versions   = MFC_V5PLUS_BITS,
> >> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> >> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
> >>  },
> >>  {
> >>  .fourcc = V4L2_PIX_FMT_H264_MVC,
> >> @@ -69,6 +71,8 @@ static struct s5p_mfc_fmt formats[] = {
> >>  .type   = MFC_FMT_DEC,
> >>  .num_planes = 1,
> >>  .versions   = MFC_V6PLUS_BITS,
> >> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> >> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
> >>  },
> >>  {
> >>  .fourcc = V4L2_PIX_FMT_H263,
> >> @@ -76,6 +80,7 @@ static struct s5p_mfc_fmt formats[] = {
> >>  .type   = MFC_FMT_DEC,
> >>  .num_planes = 1,
> >>  .versions   = MFC_V5PLUS_BITS,
> >> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
> >>  },
> >>  {
> >>  .fourcc = V4L2_PIX_FMT_MPEG1,
> >> @@ -83,6 +88,8 @@ static struct s5p_mfc_fmt formats[] = {
> >>  .type   = MFC_FMT_DEC,
> >>  .num_planes = 1,
> >>  .versions   = MFC_V5PLUS_BITS,
> >> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> >> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
> >>  },
> >>  {
> >>  .fourcc = V4L2_PIX_FMT_MPEG2,
> >> @@ -90,6 +97,8 @@ static struct s5p_mfc_fmt formats[] = {
> >>  .type   = MFC_FMT_DEC,
> >>  .num_planes = 1,
> >>  .versions   = MFC_V5PLUS_BITS,
> >> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> >> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
> >>  },
> >>  {
> >>  .fourcc = V4L2_PIX_FMT_MPEG4,
> >> @@ -97,6 +106,8 @@ static struct s5p_mfc_fmt formats[] = {
> >>  .type   = MFC_FMT_DEC,
> >>  .num_planes = 1,
> >>  .versions   = MFC_V5PLUS_BITS,
> >> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> >> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
> >>  },
> >>  {
> >>  .fourcc = V4L2_PIX_FMT_XVID,
> >> @@ -104,6 +115,7 @@ static struct s5p_mfc_fmt formats[] = {
> >>  .type   = MFC_FMT_DEC,
> >>  .num_planes = 1,
> >>  .versions   = MFC_V5PLUS_BITS,
> >> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
> >>  },
> >>  {
> >>  .fourcc = V4L2_PIX_FMT_VC1_ANNEX_G,
> >> @@ -111,6 +123,7 @@ static struct s5p_mfc_fmt formats[] = {
> >>  

Re: [PATCHv2 04/12] media: s5p_mfc_dec: set flags for OUTPUT coded formats

2019-08-16 Thread Marek Szyprowski
Hi Tomasz,

On 2019-08-15 12:14, Tomasz Figa wrote:
> Hi Hans,
>
> On Mon, Aug 12, 2019 at 8:05 PM Hans Verkuil  wrote:
>> From: Maxime Jourdan 
>>
>> Tag all the coded formats where the s5p_mfc decoder supports dynamic
>> resolution switching or has a bytestream parser.
>>
> I believe it depends on the MFC hardware version. v5 might have some
> additional restrictions.
>
> Let me add some more folks to figure out.

IIRC MFC v5 also supported resolution change.

>> Signed-off-by: Maxime Jourdan 
>> Signed-off-by: Hans Verkuil 
>> [hverkuil-ci...@xs4all.nl: added CONTINUOUS_BYTESTREAM]
>> ---
>>   .../media/platform/s5p-mfc/s5p_mfc_common.h|  1 +
>>   drivers/media/platform/s5p-mfc/s5p_mfc_dec.c   | 18 ++
>>   2 files changed, 19 insertions(+)
>>
>> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h 
>> b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
>> index 96d1ecd1521b..31b133af91eb 100644
>> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
>> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
>> @@ -723,6 +723,7 @@ struct s5p_mfc_fmt {
>>  enum s5p_mfc_fmt_type type;
>>  u32 num_planes;
>>  u32 versions;
>> +   u32 flags;
>>   };
>>
>>   /**
>> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
>> b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
>> index 61e144a35201..1423c33c70cb 100644
>> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
>> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
>> @@ -62,6 +62,8 @@ static struct s5p_mfc_fmt formats[] = {
>>  .type   = MFC_FMT_DEC,
>>  .num_planes = 1,
>>  .versions   = MFC_V5PLUS_BITS,
>> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
>> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>>  },
>>  {
>>  .fourcc = V4L2_PIX_FMT_H264_MVC,
>> @@ -69,6 +71,8 @@ static struct s5p_mfc_fmt formats[] = {
>>  .type   = MFC_FMT_DEC,
>>  .num_planes = 1,
>>  .versions   = MFC_V6PLUS_BITS,
>> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
>> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>>  },
>>  {
>>  .fourcc = V4L2_PIX_FMT_H263,
>> @@ -76,6 +80,7 @@ static struct s5p_mfc_fmt formats[] = {
>>  .type   = MFC_FMT_DEC,
>>  .num_planes = 1,
>>  .versions   = MFC_V5PLUS_BITS,
>> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>>  },
>>  {
>>  .fourcc = V4L2_PIX_FMT_MPEG1,
>> @@ -83,6 +88,8 @@ static struct s5p_mfc_fmt formats[] = {
>>  .type   = MFC_FMT_DEC,
>>  .num_planes = 1,
>>  .versions   = MFC_V5PLUS_BITS,
>> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
>> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>>  },
>>  {
>>  .fourcc = V4L2_PIX_FMT_MPEG2,
>> @@ -90,6 +97,8 @@ static struct s5p_mfc_fmt formats[] = {
>>  .type   = MFC_FMT_DEC,
>>  .num_planes = 1,
>>  .versions   = MFC_V5PLUS_BITS,
>> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
>> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>>  },
>>  {
>>  .fourcc = V4L2_PIX_FMT_MPEG4,
>> @@ -97,6 +106,8 @@ static struct s5p_mfc_fmt formats[] = {
>>  .type   = MFC_FMT_DEC,
>>  .num_planes = 1,
>>  .versions   = MFC_V5PLUS_BITS,
>> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
>> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>>  },
>>  {
>>  .fourcc = V4L2_PIX_FMT_XVID,
>> @@ -104,6 +115,7 @@ static struct s5p_mfc_fmt formats[] = {
>>  .type   = MFC_FMT_DEC,
>>  .num_planes = 1,
>>  .versions   = MFC_V5PLUS_BITS,
>> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>>  },
>>  {
>>  .fourcc = V4L2_PIX_FMT_VC1_ANNEX_G,
>> @@ -111,6 +123,7 @@ static struct s5p_mfc_fmt formats[] = {
>>  .type   = MFC_FMT_DEC,
>>  .num_planes = 1,
>>  .versions   = MFC_V5PLUS_BITS,
>> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>>  },
>>  {
>>  .fourcc = V4L2_PIX_FMT_VC1_ANNEX_L,
>> @@ -118,6 +131,7 @@ static struct s5p_mfc_fmt formats[] = {
>>  .type   = MFC_FMT_DEC,
>>  .num_planes = 1,
>>  .versions   = MFC_V5PLUS_BITS,
>> +  

Re: [PATCHv2 04/12] media: s5p_mfc_dec: set flags for OUTPUT coded formats

2019-08-15 Thread Tomasz Figa
Hi Hans,

On Mon, Aug 12, 2019 at 8:05 PM Hans Verkuil  wrote:
>
> From: Maxime Jourdan 
>
> Tag all the coded formats where the s5p_mfc decoder supports dynamic
> resolution switching or has a bytestream parser.
>

I believe it depends on the MFC hardware version. v5 might have some
additional restrictions.

Let me add some more folks to figure out.

> Signed-off-by: Maxime Jourdan 
> Signed-off-by: Hans Verkuil 
> [hverkuil-ci...@xs4all.nl: added CONTINUOUS_BYTESTREAM]
> ---
>  .../media/platform/s5p-mfc/s5p_mfc_common.h|  1 +
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c   | 18 ++
>  2 files changed, 19 insertions(+)
>
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h 
> b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> index 96d1ecd1521b..31b133af91eb 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> @@ -723,6 +723,7 @@ struct s5p_mfc_fmt {
> enum s5p_mfc_fmt_type type;
> u32 num_planes;
> u32 versions;
> +   u32 flags;
>  };
>
>  /**
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
> b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> index 61e144a35201..1423c33c70cb 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> @@ -62,6 +62,8 @@ static struct s5p_mfc_fmt formats[] = {
> .type   = MFC_FMT_DEC,
> .num_planes = 1,
> .versions   = MFC_V5PLUS_BITS,
> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
> },
> {
> .fourcc = V4L2_PIX_FMT_H264_MVC,
> @@ -69,6 +71,8 @@ static struct s5p_mfc_fmt formats[] = {
> .type   = MFC_FMT_DEC,
> .num_planes = 1,
> .versions   = MFC_V6PLUS_BITS,
> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
> },
> {
> .fourcc = V4L2_PIX_FMT_H263,
> @@ -76,6 +80,7 @@ static struct s5p_mfc_fmt formats[] = {
> .type   = MFC_FMT_DEC,
> .num_planes = 1,
> .versions   = MFC_V5PLUS_BITS,
> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
> },
> {
> .fourcc = V4L2_PIX_FMT_MPEG1,
> @@ -83,6 +88,8 @@ static struct s5p_mfc_fmt formats[] = {
> .type   = MFC_FMT_DEC,
> .num_planes = 1,
> .versions   = MFC_V5PLUS_BITS,
> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
> },
> {
> .fourcc = V4L2_PIX_FMT_MPEG2,
> @@ -90,6 +97,8 @@ static struct s5p_mfc_fmt formats[] = {
> .type   = MFC_FMT_DEC,
> .num_planes = 1,
> .versions   = MFC_V5PLUS_BITS,
> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
> },
> {
> .fourcc = V4L2_PIX_FMT_MPEG4,
> @@ -97,6 +106,8 @@ static struct s5p_mfc_fmt formats[] = {
> .type   = MFC_FMT_DEC,
> .num_planes = 1,
> .versions   = MFC_V5PLUS_BITS,
> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> + V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
> },
> {
> .fourcc = V4L2_PIX_FMT_XVID,
> @@ -104,6 +115,7 @@ static struct s5p_mfc_fmt formats[] = {
> .type   = MFC_FMT_DEC,
> .num_planes = 1,
> .versions   = MFC_V5PLUS_BITS,
> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
> },
> {
> .fourcc = V4L2_PIX_FMT_VC1_ANNEX_G,
> @@ -111,6 +123,7 @@ static struct s5p_mfc_fmt formats[] = {
> .type   = MFC_FMT_DEC,
> .num_planes = 1,
> .versions   = MFC_V5PLUS_BITS,
> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
> },
> {
> .fourcc = V4L2_PIX_FMT_VC1_ANNEX_L,
> @@ -118,6 +131,7 @@ static struct s5p_mfc_fmt formats[] = {
> .type   = MFC_FMT_DEC,
> .num_planes = 1,
> .versions   = MFC_V5PLUS_BITS,
> +   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
> },
> {
> .fourcc = V4L2_PIX_FMT_VP8,
> @@ -125,6 +139,7 @@ static struct s5p_mfc_fmt formats[] = {
> .type   = MFC_FMT_DEC,
> .nu

Re: [PATCHv2 04/12] media: s5p_mfc_dec: set flags for OUTPUT coded formats

2019-08-14 Thread Paul Kocialkowski
Hi,

On Mon 12 Aug 19, 13:05, Hans Verkuil wrote:
> From: Maxime Jourdan 
> 
> Tag all the coded formats where the s5p_mfc decoder supports dynamic
> resolution switching or has a bytestream parser.

Looks good to me, despite lacking knowledge of whether this matches what the
hardware really supports.

Reviewed-by: Paul Kocialkowski 

Cheers,

Paul

> Signed-off-by: Maxime Jourdan 
> Signed-off-by: Hans Verkuil 
> [hverkuil-ci...@xs4all.nl: added CONTINUOUS_BYTESTREAM]
> ---
>  .../media/platform/s5p-mfc/s5p_mfc_common.h|  1 +
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c   | 18 ++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h 
> b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> index 96d1ecd1521b..31b133af91eb 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> @@ -723,6 +723,7 @@ struct s5p_mfc_fmt {
>   enum s5p_mfc_fmt_type type;
>   u32 num_planes;
>   u32 versions;
> + u32 flags;
>  };
>  
>  /**
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
> b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> index 61e144a35201..1423c33c70cb 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> @@ -62,6 +62,8 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +   V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_H264_MVC,
> @@ -69,6 +71,8 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V6PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +   V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_H263,
> @@ -76,6 +80,7 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_MPEG1,
> @@ -83,6 +88,8 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +   V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_MPEG2,
> @@ -90,6 +97,8 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +   V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_MPEG4,
> @@ -97,6 +106,8 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
> +   V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_XVID,
> @@ -104,6 +115,7 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_VC1_ANNEX_G,
> @@ -111,6 +123,7 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_VC1_ANNEX_L,
> @@ -118,6 +131,7 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V5PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>   {
>   .fourcc = V4L2_PIX_FMT_VP8,
> @@ -125,6 +139,7 @@ static struct s5p_mfc_fmt formats[] = {
>   .type   = MFC_FMT_DEC,
>   .num_planes = 1,
>   .versions   = MFC_V6PLUS_BITS,
> + .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
>   },
>  

[PATCHv2 04/12] media: s5p_mfc_dec: set flags for OUTPUT coded formats

2019-08-12 Thread Hans Verkuil
From: Maxime Jourdan 

Tag all the coded formats where the s5p_mfc decoder supports dynamic
resolution switching or has a bytestream parser.

Signed-off-by: Maxime Jourdan 
Signed-off-by: Hans Verkuil 
[hverkuil-ci...@xs4all.nl: added CONTINUOUS_BYTESTREAM]
---
 .../media/platform/s5p-mfc/s5p_mfc_common.h|  1 +
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c   | 18 ++
 2 files changed, 19 insertions(+)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h 
b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
index 96d1ecd1521b..31b133af91eb 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
@@ -723,6 +723,7 @@ struct s5p_mfc_fmt {
enum s5p_mfc_fmt_type type;
u32 num_planes;
u32 versions;
+   u32 flags;
 };
 
 /**
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 61e144a35201..1423c33c70cb 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -62,6 +62,8 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V5PLUS_BITS,
+   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
+ V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
},
{
.fourcc = V4L2_PIX_FMT_H264_MVC,
@@ -69,6 +71,8 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V6PLUS_BITS,
+   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
+ V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
},
{
.fourcc = V4L2_PIX_FMT_H263,
@@ -76,6 +80,7 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V5PLUS_BITS,
+   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
},
{
.fourcc = V4L2_PIX_FMT_MPEG1,
@@ -83,6 +88,8 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V5PLUS_BITS,
+   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
+ V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
},
{
.fourcc = V4L2_PIX_FMT_MPEG2,
@@ -90,6 +97,8 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V5PLUS_BITS,
+   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
+ V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
},
{
.fourcc = V4L2_PIX_FMT_MPEG4,
@@ -97,6 +106,8 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V5PLUS_BITS,
+   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION |
+ V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM,
},
{
.fourcc = V4L2_PIX_FMT_XVID,
@@ -104,6 +115,7 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V5PLUS_BITS,
+   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
},
{
.fourcc = V4L2_PIX_FMT_VC1_ANNEX_G,
@@ -111,6 +123,7 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V5PLUS_BITS,
+   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
},
{
.fourcc = V4L2_PIX_FMT_VC1_ANNEX_L,
@@ -118,6 +131,7 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V5PLUS_BITS,
+   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
},
{
.fourcc = V4L2_PIX_FMT_VP8,
@@ -125,6 +139,7 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V6PLUS_BITS,
+   .flags  = V4L2_FMT_FLAG_DYN_RESOLUTION,
},
{
.fourcc = V4L2_PIX_FMT_HEVC,
@@ -132,6 +147,8 @@ static struct s5p_mfc_fmt formats[] = {
.type   = MFC_FMT_DEC,
.num_planes = 1,
.versions   = MFC_V10_BIT,
+   .flags