Re: [PATCH 2/2] v4l: s5p-mfc: Limit enum_fmt to output formats of current version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kamil,

Only a small correction.

On Fri, May 16, 2014 at 5:33 PM, Kamil Debski <k.debski@xxxxxxxxxxx> wrote:
> MFC versions support a different set of formats, this specially applies
> to the raw YUV formats. This patch changes enum_fmt, so that it only
> reports formats that are supported by the used MFC version.
>
> Signed-off-by: Kamil Debski <k.debski@xxxxxxxxxxx>
> ---
>  drivers/media/platform/s5p-mfc/s5p_mfc.c        |    3 ++
>  drivers/media/platform/s5p-mfc/s5p_mfc_common.h |    7 ++++
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c    |   49 +++++++++++++---------
>  drivers/media/platform/s5p-mfc/s5p_mfc_enc.c    |   50 ++++++++++++-----------
>  4 files changed, 67 insertions(+), 42 deletions(-)
>

[snip]

> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> index d09c2e1..1ddd152 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> @@ -42,6 +42,7 @@ static struct s5p_mfc_fmt formats[] = {
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
>                 .num_planes     = 2,
> +               .versions       = MFC_V6 | MFC_V7,
>         },
>         {
>                 .name           = "4:2:0 2 Planes 64x32 Tiles",
> @@ -49,6 +50,7 @@ static struct s5p_mfc_fmt formats[] = {
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
>                 .num_planes     = 2,
> +               .versions       = MFC_V5,
>         },
>         {
>                 .name           = "4:2:0 2 Planes Y/CbCr",
> @@ -56,6 +58,7 @@ static struct s5p_mfc_fmt formats[] = {
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
>                 .num_planes     = 2,
> +               .versions       = MFC_V5 | MFC_V6 | MFC_V7,
>         },
>         {
>                 .name           = "4:2:0 2 Planes Y/CrCb",
> @@ -63,6 +66,7 @@ static struct s5p_mfc_fmt formats[] = {
>                 .codec_mode     = S5P_MFC_CODEC_NONE,
>                 .type           = MFC_FMT_RAW,
>                 .num_planes     = 2,
> +               .versions       = MFC_V5 | MFC_V6 | MFC_V7,
>         },
>         {
>                 .name           = "H264 Encoded Stream",
> @@ -70,6 +74,7 @@ static struct s5p_mfc_fmt formats[] = {
>                 .codec_mode     = S5P_MFC_CODEC_H264_ENC,
>                 .type           = MFC_FMT_ENC,
>                 .num_planes     = 1,
> +               .versions       = MFC_V5 | MFC_V6 | MFC_V7,
>         },
>         {
>                 .name           = "MPEG4 Encoded Stream",
> @@ -77,6 +82,7 @@ static struct s5p_mfc_fmt formats[] = {
>                 .codec_mode     = S5P_MFC_CODEC_MPEG4_ENC,
>                 .type           = MFC_FMT_ENC,
>                 .num_planes     = 1,
> +               .versions       = MFC_V5 | MFC_V6 | MFC_V7,
>         },
>         {
>                 .name           = "H263 Encoded Stream",
> @@ -84,6 +90,7 @@ static struct s5p_mfc_fmt formats[] = {
>                 .codec_mode     = S5P_MFC_CODEC_H263_ENC,
>                 .type           = MFC_FMT_ENC,
>                 .num_planes     = 1,
> +               .versions       = MFC_V5 | MFC_V6 | MFC_V7,
>         },
>         {
>                 .name           = "VP8 Encoded Stream",
> @@ -91,6 +98,7 @@ static struct s5p_mfc_fmt formats[] = {
>                 .codec_mode     = S5P_MFC_CODEC_VP8_ENC,
>                 .type           = MFC_FMT_ENC,
>                 .num_planes     = 1,
> +               .versions       = MFC_V6 | MFC_V7,

VP8 encodig is supported only from v7 onwards.
So you can remove MFC_V6 from this.

Otherwise looks good to me.

Regards
Arun
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux