Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: James_Lin <Ping-lei.Lin@mediatek.com>, linux-kernel@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
	Arnd Bergmann <arnd@arndb.de>,
	Ricardo Ribalda <ribalda@chromium.org>,
	Ming Qian <ming.qian@nxp.com>,
	Andrzej Pietrasiewicz <andrzej.p@collabora.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, ping-lei.lin@mediatek.com,
	lecopzer.chen@mediatek.com, max.yan@mediatek.com,
	sherlock.chang@mediatek.com, tm.wu@mediatek.com,
	James_Lin <Ping-lei.Lin@mediatek.com>
Subject: Re: [PATCH v2 2/2] media: v4l: Add H265 pixel format
Date: Mon, 11 Apr 2022 09:12:46 +0100	[thread overview]
Message-ID: <164966476674.22830.512211103923160119@Monstersaurus> (raw)
In-Reply-To: <20220411080120.26008-3-Ping-lei.Lin@mediatek.com>

Quoting James_Lin (2022-04-11 09:01:20)
> Add H265 pixel format.
> So driver can recognize external camera devices 
> whom use h265 to describe High Efficiency Video Coding method.
> 
> Signed-off-by: James_Lin <Ping-lei.Lin@mediatek.com>
> ---
>  .../userspace-api/media/v4l/pixfmt-compressed.rst      | 10 ++++++++++
>  drivers/media/v4l2-core/v4l2-ioctl.c                   |  1 +
>  include/uapi/linux/videodev2.h                         |  1 +
>  3 files changed, 12 insertions(+)
> 
> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
> index 967fc803ef94..75292aafe2eb 100644
> --- a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
> +++ b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
> @@ -36,6 +36,16 @@ Compressed Formats
>        - MPEG multiplexed stream. The actual format is determined by
>         extended control ``V4L2_CID_MPEG_STREAM_TYPE``, see
>         :ref:`mpeg-control-id`.
> +    * .. _V4L2-PIX-FMT-H265:
> +
> +      - ``V4L2_PIX_FMT_H265``
> +      - 'H265'
> +      - H.265 Access Unit.
> +       The decoder expects one Access Unit per buffer.
> +       The encoder generates one Access Unit per buffer.
> +       If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> +       then the decoder has no requirements since it can parse all the
> +       information from the raw bytestream.
>      * .. _V4L2-PIX-FMT-H264:
>  
>        - ``V4L2_PIX_FMT_H264``
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> index 96e307fe3aab..aeaeb29307a4 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -1402,6 +1402,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>                 case V4L2_PIX_FMT_JPEG:         descr = "JFIF JPEG"; break;
>                 case V4L2_PIX_FMT_DV:           descr = "1394"; break;
>                 case V4L2_PIX_FMT_MPEG:         descr = "MPEG-1/2/4"; break;
> +               case V4L2_PIX_FMT_H265:         descr = "H.265"; break;

I'd probably expect H265 to be sorted after H264 ? But I'm not sure this
list is sorted otherwise.

>                 case V4L2_PIX_FMT_H264:         descr = "H.264"; break;
>                 case V4L2_PIX_FMT_H264_NO_SC:   descr = "H.264 (No Start Codes)"; break;
>                 case V4L2_PIX_FMT_H264_MVC:     descr = "H.264 MVC"; break;
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 3768a0a80830..636e4236bfb8 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -691,6 +691,7 @@ struct v4l2_pix_format {
>  #define V4L2_PIX_FMT_JPEG     v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG     */
>  #define V4L2_PIX_FMT_DV       v4l2_fourcc('d', 'v', 's', 'd') /* 1394          */
>  #define V4L2_PIX_FMT_MPEG     v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */
> +#define V4L2_PIX_FMT_H265     v4l2_fourcc('H', '2', '6', '5') /* H265 with start codes */

Likewise.


>  #define V4L2_PIX_FMT_H264     v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */
>  #define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */
>  #define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */
> -- 
> 2.18.0
>

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

  reply	other threads:[~2022-04-11  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  8:01 [PATCH v2 0/2] media: Add H265 pixel format James_Lin
2022-04-11  8:01 ` [PATCH v2 1/2] media: usb: uvc: " James_Lin
2022-04-11  8:11   ` Kieran Bingham
2022-04-11  8:01 ` [PATCH v2 2/2] media: v4l: " James_Lin
2022-04-11  8:12   ` Kieran Bingham [this message]
2022-04-11 13:50   ` 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=164966476674.22830.512211103923160119@Monstersaurus \
    --to=kieran.bingham@ideasonboard.com \
    --cc=Ping-lei.Lin@mediatek.com \
    --cc=andrzej.p@collabora.com \
    --cc=arnd@arndb.de \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lecopzer.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=max.yan@mediatek.com \
    --cc=mchehab@kernel.org \
    --cc=ming.qian@nxp.com \
    --cc=ribalda@chromium.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sherlock.chang@mediatek.com \
    --cc=tm.wu@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox