All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Qian <ming.qian@nxp.com>
To: Nicolas Dufresne <nicolas@ndufresne.ca>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>
Cc: "shawnguo@kernel.org" <shawnguo@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"X.H. Bao" <xiahong.bao@nxp.com>, Eagle Zhou <eagle.zhou@nxp.com>,
	Tao Jiang <tao.jiang_2@nxp.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [EXT] Re: [PATCH v2 2/2] media: amphion: support to decode sorenson spark video
Date: Fri, 20 Jan 2023 09:59:08 +0000	[thread overview]
Message-ID: <AM6PR04MB6341EEFACA1BAD7DC4E82B71E7C59@AM6PR04MB6341.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <bb9fb55bf81b978041e44e04d619adf43488f467.camel@ndufresne.ca>

>From: Nicolas Dufresne <nicolas@ndufresne.ca>
>Sent: 2023年1月20日 4:41
>To: Ming Qian <ming.qian@nxp.com>; mchehab@kernel.org; hverkuil-
>cisco@xs4all.nl
>Cc: shawnguo@kernel.org; robh+dt@kernel.org; s.hauer@pengutronix.de;
>kernel@pengutronix.de; festevam@gmail.com; dl-linux-imx <linux-
>imx@nxp.com>; X.H. Bao <xiahong.bao@nxp.com>; Eagle Zhou
><eagle.zhou@nxp.com>; Tao Jiang <tao.jiang_2@nxp.com>; linux-
>media@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm-
>kernel@lists.infradead.org
>Subject: [EXT] Re: [PATCH v2 2/2] media: amphion: support to decode
>sorenson spark video
>
>Caution: EXT Email
>
>Le jeudi 12 janvier 2023 à 17:04 +0800, Ming Qian a écrit :
>> Sorenson Spark is an implementation of H.263 for use in Flash Video
>> and Adobe Flash files.
>> amphion decoder can support it by insert some startcode before
>> sequence and picture.
>
>Its historical codec, but I'm surprise it does not also support H263 (and
>possibly H263+). Note a review comment of course, just a curiosity.
>

Hi Nicolas,
    The decoder does support H263, but for sorenson spark, the vpu requires extra startcode, but H263 doesn't.
So driver can't reuse H263 for format spark, as driver need to insert the startcode for format spark.

Ming

>>
>> Signed-off-by: Ming Qian <ming.qian@nxp.com>
>> ---
>>  drivers/media/platform/amphion/vdec.c       |  7 +++++++
>>  drivers/media/platform/amphion/vpu_malone.c | 18 ++++++++++++++++++
>>  2 files changed, 25 insertions(+)
>>
>> diff --git a/drivers/media/platform/amphion/vdec.c
>> b/drivers/media/platform/amphion/vdec.c
>> index 87f9f8e90ab1..09304b96f40d 100644
>> --- a/drivers/media/platform/amphion/vdec.c
>> +++ b/drivers/media/platform/amphion/vdec.c
>> @@ -165,6 +165,13 @@ static const struct vpu_format vdec_formats[] = {
>>               .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
>>               .flags = V4L2_FMT_FLAG_DYN_RESOLUTION |
>V4L2_FMT_FLAG_COMPRESSED
>>       },
>> +     {
>> +             .pixfmt = V4L2_PIX_FMT_SPK,
>> +             .mem_planes = 1,
>> +             .comp_planes = 1,
>> +             .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
>> +             .flags = V4L2_FMT_FLAG_DYN_RESOLUTION |
>V4L2_FMT_FLAG_COMPRESSED
>> +     },
>>       {0, 0, 0, 0},
>>  };
>>
>> diff --git a/drivers/media/platform/amphion/vpu_malone.c
>> b/drivers/media/platform/amphion/vpu_malone.c
>> index 2c9bfc6a5a72..67ba637c4c7f 100644
>> --- a/drivers/media/platform/amphion/vpu_malone.c
>> +++ b/drivers/media/platform/amphion/vpu_malone.c
>> @@ -562,6 +562,7 @@ static struct malone_fmt_mapping fmt_mappings[] =
>{
>>       {V4L2_PIX_FMT_H263,        MALONE_FMT_ASP},
>>       {V4L2_PIX_FMT_JPEG,        MALONE_FMT_JPG},
>>       {V4L2_PIX_FMT_VP8,         MALONE_FMT_VP8},
>> +     {V4L2_PIX_FMT_SPK,         MALONE_FMT_SPK},
>>  };
>>
>>  static enum vpu_malone_format vpu_malone_format_remap(u32
>> pixelformat) @@ -987,6 +988,7 @@ static const struct
>malone_padding_scode padding_scodes[] = {
>>       {SCODE_PADDING_EOS,      V4L2_PIX_FMT_XVID,        {0xb1010000, 0x0}},
>>       {SCODE_PADDING_EOS,      V4L2_PIX_FMT_H263,        {0xb1010000, 0x0}},
>>       {SCODE_PADDING_EOS,      V4L2_PIX_FMT_VP8,         {0x34010000, 0x0}},
>> +     {SCODE_PADDING_EOS,      V4L2_PIX_FMT_SPK,         {0x34010000, 0x0}},
>>       {SCODE_PADDING_EOS,      V4L2_PIX_FMT_JPEG,        {0xefff0000, 0x0}},
>>       {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_H264,        {0x0B010000, 0}},
>>       {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_H264_MVC,    {0x0B010000,
>0}},
>> @@ -998,6 +1000,7 @@ static const struct malone_padding_scode
>padding_scodes[] = {
>>       {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_XVID,        {0xb1010000,
>0x0}},
>>       {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_H263,        {0xb1010000,
>0x0}},
>>       {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_VP8,         {0x34010000,
>0x0}},
>> +     {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_SPK,         {0x34010000,
>0x0}},
>>       {SCODE_PADDING_EOS,      V4L2_PIX_FMT_JPEG,        {0x0, 0x0}},
>>       {SCODE_PADDING_BUFFLUSH, V4L2_PIX_FMT_H264,        {0x15010000,
>0x0}},
>>       {SCODE_PADDING_BUFFLUSH, V4L2_PIX_FMT_H264_MVC,
>{0x15010000, 0x0}},
>> @@ -1411,6 +1414,16 @@ static int
>vpu_malone_insert_scode_vp8_pic(struct malone_scode_t *scode)
>>       return size;
>>  }
>>
>> +static int vpu_malone_insert_scode_spk_seq(struct malone_scode_t
>> +*scode) {
>> +     return vpu_malone_insert_scode_seq(scode, MALONE_CODEC_ID_SPK,
>> +0); }
>> +
>> +static int vpu_malone_insert_scode_spk_pic(struct malone_scode_t
>> +*scode) {
>> +     return vpu_malone_insert_scode_pic(scode, MALONE_CODEC_ID_SPK,
>> +0); }
>> +
>>  static const struct malone_scode_handler scode_handlers[] = {
>>       {
>>               /* fix me, need to swap return operation after gstreamer
>> swap */ @@ -1427,6 +1440,11 @@ static const struct
>malone_scode_handler scode_handlers[] = {
>>               .insert_scode_seq = vpu_malone_insert_scode_vp8_seq,
>>               .insert_scode_pic = vpu_malone_insert_scode_vp8_pic,
>>       },
>> +     {
>> +             .pixelformat = V4L2_PIX_FMT_SPK,
>> +             .insert_scode_seq = vpu_malone_insert_scode_spk_seq,
>> +             .insert_scode_pic = vpu_malone_insert_scode_spk_pic,
>> +     },
>>  };
>>
>>  static const struct malone_scode_handler *get_scode_handler(u32
>> pixelformat)


WARNING: multiple messages have this Message-ID (diff)
From: Ming Qian <ming.qian@nxp.com>
To: Nicolas Dufresne <nicolas@ndufresne.ca>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>
Cc: "shawnguo@kernel.org" <shawnguo@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"X.H. Bao" <xiahong.bao@nxp.com>, Eagle Zhou <eagle.zhou@nxp.com>,
	Tao Jiang <tao.jiang_2@nxp.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [EXT] Re: [PATCH v2 2/2] media: amphion: support to decode sorenson spark video
Date: Fri, 20 Jan 2023 09:59:08 +0000	[thread overview]
Message-ID: <AM6PR04MB6341EEFACA1BAD7DC4E82B71E7C59@AM6PR04MB6341.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <bb9fb55bf81b978041e44e04d619adf43488f467.camel@ndufresne.ca>

>From: Nicolas Dufresne <nicolas@ndufresne.ca>
>Sent: 2023年1月20日 4:41
>To: Ming Qian <ming.qian@nxp.com>; mchehab@kernel.org; hverkuil-
>cisco@xs4all.nl
>Cc: shawnguo@kernel.org; robh+dt@kernel.org; s.hauer@pengutronix.de;
>kernel@pengutronix.de; festevam@gmail.com; dl-linux-imx <linux-
>imx@nxp.com>; X.H. Bao <xiahong.bao@nxp.com>; Eagle Zhou
><eagle.zhou@nxp.com>; Tao Jiang <tao.jiang_2@nxp.com>; linux-
>media@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm-
>kernel@lists.infradead.org
>Subject: [EXT] Re: [PATCH v2 2/2] media: amphion: support to decode
>sorenson spark video
>
>Caution: EXT Email
>
>Le jeudi 12 janvier 2023 à 17:04 +0800, Ming Qian a écrit :
>> Sorenson Spark is an implementation of H.263 for use in Flash Video
>> and Adobe Flash files.
>> amphion decoder can support it by insert some startcode before
>> sequence and picture.
>
>Its historical codec, but I'm surprise it does not also support H263 (and
>possibly H263+). Note a review comment of course, just a curiosity.
>

Hi Nicolas,
    The decoder does support H263, but for sorenson spark, the vpu requires extra startcode, but H263 doesn't.
So driver can't reuse H263 for format spark, as driver need to insert the startcode for format spark.

Ming

>>
>> Signed-off-by: Ming Qian <ming.qian@nxp.com>
>> ---
>>  drivers/media/platform/amphion/vdec.c       |  7 +++++++
>>  drivers/media/platform/amphion/vpu_malone.c | 18 ++++++++++++++++++
>>  2 files changed, 25 insertions(+)
>>
>> diff --git a/drivers/media/platform/amphion/vdec.c
>> b/drivers/media/platform/amphion/vdec.c
>> index 87f9f8e90ab1..09304b96f40d 100644
>> --- a/drivers/media/platform/amphion/vdec.c
>> +++ b/drivers/media/platform/amphion/vdec.c
>> @@ -165,6 +165,13 @@ static const struct vpu_format vdec_formats[] = {
>>               .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
>>               .flags = V4L2_FMT_FLAG_DYN_RESOLUTION |
>V4L2_FMT_FLAG_COMPRESSED
>>       },
>> +     {
>> +             .pixfmt = V4L2_PIX_FMT_SPK,
>> +             .mem_planes = 1,
>> +             .comp_planes = 1,
>> +             .type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,
>> +             .flags = V4L2_FMT_FLAG_DYN_RESOLUTION |
>V4L2_FMT_FLAG_COMPRESSED
>> +     },
>>       {0, 0, 0, 0},
>>  };
>>
>> diff --git a/drivers/media/platform/amphion/vpu_malone.c
>> b/drivers/media/platform/amphion/vpu_malone.c
>> index 2c9bfc6a5a72..67ba637c4c7f 100644
>> --- a/drivers/media/platform/amphion/vpu_malone.c
>> +++ b/drivers/media/platform/amphion/vpu_malone.c
>> @@ -562,6 +562,7 @@ static struct malone_fmt_mapping fmt_mappings[] =
>{
>>       {V4L2_PIX_FMT_H263,        MALONE_FMT_ASP},
>>       {V4L2_PIX_FMT_JPEG,        MALONE_FMT_JPG},
>>       {V4L2_PIX_FMT_VP8,         MALONE_FMT_VP8},
>> +     {V4L2_PIX_FMT_SPK,         MALONE_FMT_SPK},
>>  };
>>
>>  static enum vpu_malone_format vpu_malone_format_remap(u32
>> pixelformat) @@ -987,6 +988,7 @@ static const struct
>malone_padding_scode padding_scodes[] = {
>>       {SCODE_PADDING_EOS,      V4L2_PIX_FMT_XVID,        {0xb1010000, 0x0}},
>>       {SCODE_PADDING_EOS,      V4L2_PIX_FMT_H263,        {0xb1010000, 0x0}},
>>       {SCODE_PADDING_EOS,      V4L2_PIX_FMT_VP8,         {0x34010000, 0x0}},
>> +     {SCODE_PADDING_EOS,      V4L2_PIX_FMT_SPK,         {0x34010000, 0x0}},
>>       {SCODE_PADDING_EOS,      V4L2_PIX_FMT_JPEG,        {0xefff0000, 0x0}},
>>       {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_H264,        {0x0B010000, 0}},
>>       {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_H264_MVC,    {0x0B010000,
>0}},
>> @@ -998,6 +1000,7 @@ static const struct malone_padding_scode
>padding_scodes[] = {
>>       {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_XVID,        {0xb1010000,
>0x0}},
>>       {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_H263,        {0xb1010000,
>0x0}},
>>       {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_VP8,         {0x34010000,
>0x0}},
>> +     {SCODE_PADDING_ABORT,    V4L2_PIX_FMT_SPK,         {0x34010000,
>0x0}},
>>       {SCODE_PADDING_EOS,      V4L2_PIX_FMT_JPEG,        {0x0, 0x0}},
>>       {SCODE_PADDING_BUFFLUSH, V4L2_PIX_FMT_H264,        {0x15010000,
>0x0}},
>>       {SCODE_PADDING_BUFFLUSH, V4L2_PIX_FMT_H264_MVC,
>{0x15010000, 0x0}},
>> @@ -1411,6 +1414,16 @@ static int
>vpu_malone_insert_scode_vp8_pic(struct malone_scode_t *scode)
>>       return size;
>>  }
>>
>> +static int vpu_malone_insert_scode_spk_seq(struct malone_scode_t
>> +*scode) {
>> +     return vpu_malone_insert_scode_seq(scode, MALONE_CODEC_ID_SPK,
>> +0); }
>> +
>> +static int vpu_malone_insert_scode_spk_pic(struct malone_scode_t
>> +*scode) {
>> +     return vpu_malone_insert_scode_pic(scode, MALONE_CODEC_ID_SPK,
>> +0); }
>> +
>>  static const struct malone_scode_handler scode_handlers[] = {
>>       {
>>               /* fix me, need to swap return operation after gstreamer
>> swap */ @@ -1427,6 +1440,11 @@ static const struct
>malone_scode_handler scode_handlers[] = {
>>               .insert_scode_seq = vpu_malone_insert_scode_vp8_seq,
>>               .insert_scode_pic = vpu_malone_insert_scode_vp8_pic,
>>       },
>> +     {
>> +             .pixelformat = V4L2_PIX_FMT_SPK,
>> +             .insert_scode_seq = vpu_malone_insert_scode_spk_seq,
>> +             .insert_scode_pic = vpu_malone_insert_scode_spk_pic,
>> +     },
>>  };
>>
>>  static const struct malone_scode_handler *get_scode_handler(u32
>> pixelformat)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-01-20  9:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12  9:04 [PATCH v2 0/2] media: amphion: decoder add support to sorenson spark format Ming Qian
2023-01-12  9:04 ` Ming Qian
2023-01-12  9:04 ` [PATCH v2 1/2] media: add Sorenson Spark video format Ming Qian
2023-01-12  9:04   ` Ming Qian
2023-01-19 20:40   ` Nicolas Dufresne
2023-01-19 20:40     ` Nicolas Dufresne
2023-01-12  9:04 ` [PATCH v2 2/2] media: amphion: support to decode sorenson spark video Ming Qian
2023-01-12  9:04   ` Ming Qian
2023-01-19 20:41   ` Nicolas Dufresne
2023-01-19 20:41     ` Nicolas Dufresne
2023-01-20  9:59     ` Ming Qian [this message]
2023-01-20  9:59       ` [EXT] " Ming Qian
2023-01-23 19:46       ` Nicolas Dufresne
2023-01-23 19:46         ` Nicolas Dufresne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR04MB6341EEFACA1BAD7DC4E82B71E7C59@AM6PR04MB6341.eurprd04.prod.outlook.com \
    --to=ming.qian@nxp.com \
    --cc=eagle.zhou@nxp.com \
    --cc=festevam@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tao.jiang_2@nxp.com \
    --cc=xiahong.bao@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.