public inbox for virtio-dev@lists.linux.dev
 help / color / mirror / Atom feed
From: Alexander Gordeev <alexander.gordeev@opensynergy.com>
To: "Alexandre Courbot" <acourbot@chromium.org>,
	virtio-dev@lists.oasis-open.org,
	"Keiichi Watanabe" <keiichiw@chromium.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Cc: "Marcin Wojtas" <mwojtas@google.com>,
	"Matti Möll" <Matti.Moell@opensynergy.com>,
	"Andrew Gazizov" <andrew.gazizov@opensynergy.com>,
	"Enrico Granata" <egranata@google.com>,
	"Gustavo Padovan" <gustavo.padovan@collabora.com>,
	"Peter Griffin" <peter.griffin@linaro.org>,
	"Bartłomiej Grzesik" <bag@semihalf.com>,
	"Tomasz Figa" <tfiga@chromium.org>
Subject: [virtio-dev] Re: [RFC PATCH v6] virtio-video: Add virtio video device specification
Date: Wed, 11 Jan 2023 18:04:10 +0100	[thread overview]
Message-ID: <a20adf2d-6a2b-bfdf-d86f-c8c5972ab39e@opensynergy.com> (raw)
In-Reply-To: <20221208072325.2259940-1-acourbot@chromium.org>

Hello,

Sorry for the delay. I'm still gathering data in the old emails...

On 08.12.22 08:23, Alexandre Courbot wrote:
> Add the specification of the video decoder and encoder devices, which
> can be used to provide host-accelerated video operations to the guest.
>
> Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
> Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
> --
> Here is the long-overdue new revision of the virtio-video RFC. This
> version reorganizes the specification quite a bit and tries to simplify
> the protocol further. Nonetheless, it still results in a rather long (17
> pages) specification for just these devices, even though the spec is not
> fully complete (I want to rethink the formats descriptions, and some
> parameters need to be added for the encoder device).
>
> I would like to get some high-level feedback on this version and maybe
> propose to do things a bit differently before people invest too much
> time reviewing this in depth. While rewriting this document, it became
> more and more obvious that this is just a different, and maybe a bit
> simpler, reimplementation of the V4L2 stateless decoder protocol [1]. I
> am now wondering whether it would not make more sense to rewrite this
> specification as just a way to transport V4L2 requests over virtio,
> similarly to how virtio-fs does with the FUSE protocol [2].
>
> At the time we started writing this implementation, the V4L2 protocols
> for decoders and encoders were not set in stone yet, but now that they
> are it might make sense to reconsider. Switching to this solution would
> greatly shorten the virtio-video device spec, and also provide a way to
> support other kind of V4L2 devices like cameras or image processors at
> no extra cost.
>
> Note that doing so would not require that either the host or guest uses
> V4L2 - the virtio video device would just emulate a V4L2 device over
> virtio. A few adaptations would need to be done regarding how memory
> types work, but otherwise I believe most of V4L2 could be used as-is.
>
> Please share your thoughts about this, and I will either explore this
> idea further with a prototype, or keep moving the present spec forward,
> hopefully at a faster pace.
>
> Due to the RFC state of this patch I have refrained from referencing the
> normative statements in conformance.tex - I will do that as a final step
> once the spec is mostly agreed on.
>
> [1] https://ddec1-0-en-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fdocs.kernel.org%2fuserspace%2dapi%2fmedia%2fv4l%2fdev%2dstateless%2ddecoder.html&umid=8ec8d8c9-b83c-40de-9337-a377056fe2af&auth=53c7c7de28b92dfd96e93d9dd61a23e634d2fbec-e98508782bc1c9aa6b2e4a9df9d4dd170f9a5ffa
> [2] https://github.com/oasis-tcs/virtio-spec/blob/master/virtio-fs.tex
>
> Full PDF:
> https://ddec1-0-en-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fdrive.google.com%2ffile%2fd%2f1HRVDiDdo50%2dS9X5tWgzmT90FJRHoB1dN%2fview%3fusp%3dsharing&umid=8ec8d8c9-b83c-40de-9337-a377056fe2af&auth=53c7c7de28b92dfd96e93d9dd61a23e634d2fbec-e315af79a067165e908bf1d803441eb181e2f375
>
> PDF of video section only:
> https://ddec1-0-en-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fdrive.google.com%2ffile%2fd%2f1Sm6LSqvKqQiwYmDE9BXZ0po3XTKnKYlD%2fview%3fusp%3dsharing&umid=8ec8d8c9-b83c-40de-9337-a377056fe2af&auth=53c7c7de28b92dfd96e93d9dd61a23e634d2fbec-b5c45bb4b6ccc5b73ea2a54e26f151d61722d0df
> ---
>   content.tex      |    1 +
>   virtio-video.tex | 1420 ++++++++++++++++++++++++++++++++++++++++++++++
>   2 files changed, 1421 insertions(+)
>   create mode 100644 virtio-video.tex
>
> ...snip...
>
> +\subsection{Supported formats}\label{sec:Device Types / Video Device / Supported formats}
> +
> +Bitstream and image formats are identified by their fourcc code, which
> +is a four-bytes ASCII sequence uniquely identifying the format and its
> +properties.
> +
> +\subsubsection{Bitstream formats}\label{sec:Device Types / Video Device / Supported formats / Bitstream formats}
> +
> +The fourcc code of each supported bitstream format is given, as well as
> +the unit of data requested in each input resource for the decoder, or
> +produced in each output resource for the encoder.
> +
> +\begin{description}
> +\item[\field{MPG2}]
> +MPEG2 encoded stream. One Access Unit per resource.
> +\item[\field{H264}]
> +H.264 encoded stream. One NAL unit per resource.
> +\item[\field{HEVC}]
> +HEVC encoded stream. One NAL unit per resource.
> +\item[\field{VP80}]
> +VP8 encoded stream. One frame per resource.
> +\item[\field{VP90}]
> +VP9 encoded stream. One frame per resource.
> +\end{description}
> +

Actually I'm not sure where do these fourcc codes for bitstream formats
come from.

In one of the old comments I found a reference to
https://www.rfc-editor.org/rfc/rfc2361

But it doesn't define MPG2, HEVC, VP80, VP90.

Also there is this comment to virtio-video v1 from Tomasz Figa and the
related discussion:
https://markmail.org/message/gc6h25acct22niut#query:+page:1+mid:et4l3ni7qjqhiygo+state:results

He wrote that it is not worth it because there are so many conflicting
sets of fourcc codes.

I can see that fourcc codes were not used in virtio-video spec draft
versions 1 to 5. So now it looks quite weird to see them here. Probably
this is because you'd like to mimic v4l2 interface more closely?

> +\subsubsection{Image formats}\label{sec:Device Types / Video Device / Supported formats / Image formats}
> +
> +The fourcc code of each supported image format is given, as well as its
> +number of planes, physical buffers, and eventual subsampling.
> +
> +\begin{description}
> +\item[\field{RGB3}]
> +one RGB plane where each component takes one byte, i.e.~3 bytes per
> +pixel.
> +\item[\field{NV12}]
> +one Y plane followed by interleaved U and V data, in a single buffer.
> +4:2:0 subsampling.
> +\item[\field{NV12}]
> +same as \field{NV12} but using two separate buffers for the Y and UV
> +planes.
> +\item[\field{YU12}]
> +one Y plane followed by one Cb plane, followed by one Cr plane, in a
> +single buffer. 4:2:0 subsampling.
> +\item[\field{YM12}]
> +same as \field{YU12} but using three separate buffers for the Y, U and V
> +planes.
> +\end{description}

--
Alexander Gordeev
Senior Software Engineer

OpenSynergy GmbH
Rotherstr. 20, 10245 Berlin

Phone: +49 30 60 98 54 0 - 88
Fax: +49 (30) 60 98 54 0 - 99
EMail: alexander.gordeev@opensynergy.com

www.opensynergy.com

Handelsregister/Commercial Registry: Amtsgericht Charlottenburg, HRB 108616B
Geschäftsführer/Managing Director: Régis Adjamah


Please mind our privacy notice<https://www.opensynergy.com/datenschutzerklaerung/privacy-notice-for-business-partners-pursuant-to-article-13-of-the-general-data-protection-regulation-gdpr/> pursuant to Art. 13 GDPR. // Unsere Hinweise zum Datenschutz gem. Art. 13 DSGVO finden Sie hier.<https://www.opensynergy.com/de/datenschutzerklaerung/datenschutzhinweise-fuer-geschaeftspartner-gem-art-13-dsgvo/>

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  parent reply	other threads:[~2023-01-11 17:04 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08  7:23 [virtio-dev] [RFC PATCH v6] virtio-video: Add virtio video device specification Alexandre Courbot
2022-12-08 15:00 ` Cornelia Huck
2022-12-27  5:38   ` Alexandre Courbot
2023-01-11  8:45     ` Cornelia Huck
2023-01-12  6:32       ` Alexandre Courbot
2023-01-12 15:23         ` Cornelia Huck
2022-12-19 16:59 ` [virtio-dev] " Alexander Gordeev
2022-12-20  9:51   ` Cornelia Huck
2022-12-20 10:35     ` Alexander Gordeev
2022-12-20 17:39       ` Cornelia Huck
2022-12-21 14:56         ` Alexander Gordeev
2022-12-27  7:31   ` Alexandre Courbot
2023-01-11 18:42     ` Alexander Gordeev
2023-01-11 20:13       ` Alex Bennée
2023-01-12  6:40         ` Alexandre Courbot
2023-01-12  6:39       ` Alexandre Courbot
2023-01-18 23:06         ` Alexander Gordeev
2023-02-06 14:12           ` Cornelia Huck
2023-02-07  6:16             ` Alexandre Courbot
2023-02-07 13:59               ` Cornelia Huck
2023-03-10 10:50                 ` Cornelia Huck
2023-03-10 13:19                   ` Alexandre Courbot
2023-03-10 14:20                     ` Cornelia Huck
2023-03-14  5:06                       ` Alexandre Courbot
2023-03-16 10:12                         ` Alexander Gordeev
2023-03-17  7:24                           ` Alexandre Courbot
2023-04-17 12:51                             ` Alexander Gordeev
2023-04-17 14:43                               ` Cornelia Huck
2023-04-19  7:39                                 ` Alexander Gordeev
2023-04-19 21:34                                   ` Enrico Granata
2023-04-21 14:48                                     ` Alexander Gordeev
2023-04-21  4:02                                   ` Alexandre Courbot
2023-04-21 16:01                                     ` Alexander Gordeev
2023-04-24  7:52                                       ` Alexander Gordeev
2023-04-25 16:04                                         ` Cornelia Huck
2023-04-26  6:29                                           ` Alexandre Courbot
2023-04-27 14:10                                           ` Alexander Gordeev
2023-04-28  4:02                                             ` Alexandre Courbot
2023-04-28  8:54                                               ` Alexander Gordeev
2023-05-02  1:07                                                 ` Alexandre Courbot
2023-05-02 11:12                                                   ` Alexander Gordeev
2023-04-26  5:52                                         ` Alexandre Courbot
2023-04-27 14:20                                           ` Alexander Gordeev
2023-04-28  3:22                                             ` Alexandre Courbot
2023-04-28  8:22                                               ` Alexander Gordeev
2023-04-26 15:52                                     ` Alexander Gordeev
2023-04-27 13:23                                       ` Alexandre Courbot
2023-04-27 15:12                                         ` Alexander Gordeev
2023-04-28  3:24                                           ` Alexandre Courbot
2023-04-28  8:31                                             ` Alexander Gordeev
     [not found]                                     ` <CALgKJBqKWng508cB_F_uD2fy9EAvQ36rYR3fRb57sFd3ihpUFw@mail.gmail.com>
2023-04-26 16:00                                       ` Alexander Gordeev
2023-04-27 10:13                                         ` Bartłomiej Grzesik
2023-04-27 14:34                                           ` Alexander Gordeev
2023-04-28  3:22                                             ` Alexandre Courbot
2023-04-28  7:57                                               ` Alexander Gordeev
2023-04-21  4:02                               ` Alexandre Courbot
2023-04-26 15:11                                 ` Alexander Gordeev
2023-04-27 13:16                                   ` Alexandre Courbot
2023-04-28  7:47                                     ` Alexander Gordeev
2023-05-03 14:04                                       ` Cornelia Huck
2023-05-03 15:11                                         ` Alex Bennée
2023-05-03 15:53                                           ` Cornelia Huck
2023-05-05  9:57                                             ` Alexander Gordeev
     [not found]                                               ` <168329085253.1880445.14002473591422425775@Monstersaurus>
2023-05-05 15:55                                                 ` Alex Bennée
2023-05-16 12:57                                                   ` Alexander Gordeev
     [not found]                                                   ` <20230506081229.GA8114@pendragon.ideasonboard.com>
     [not found]                                                     ` <20230506081633.GB8114@pendragon.ideasonboard.com>
2023-05-08  8:00                                                       ` [virtio-dev] Re: [libcamera-devel] " Alexandre Courbot
2023-05-16 13:50                                                       ` Alexander Gordeev
2023-05-17  3:58                                                     ` Tomasz Figa
2023-05-05 12:28                                           ` Alexander Gordeev
2023-05-05 11:54                                         ` Alexander Gordeev
2023-05-08  4:55                                           ` Alexandre Courbot
2023-05-11  8:50                                             ` Alexander Gordeev
2023-05-11  9:00                                               ` Alexander Gordeev
2023-05-12  4:15                                                 ` Alexandre Courbot
2023-05-17  7:35                                                   ` Alexander Gordeev
2023-05-12  4:09                                               ` Alexandre Courbot
2023-05-16 14:53                                                 ` Alexander Gordeev
2023-05-17 16:28                                                   ` Cornelia Huck
2023-05-18  6:29                                                     ` Alexander Gordeev
2023-05-18 19:35                                                     ` Michael S. Tsirkin
2023-05-17 11:04                                                 ` Alexander Gordeev
2023-03-27 13:00                         ` Albert Esteve
2023-04-15  5:58                           ` Alexandre Courbot
2023-04-17 12:56                             ` Cornelia Huck
2023-04-17 13:13                               ` Alexander Gordeev
2023-04-17 13:22                                 ` Cornelia Huck
2023-02-07 11:11             ` Alexander Gordeev
2023-02-07  6:51           ` Alexandre Courbot
2023-02-07 10:57             ` Alexander Gordeev
2023-01-11 17:04 ` Alexander Gordeev [this message]
2023-01-12  6:32   ` Alexandre Courbot
2023-01-12 22:24     ` Alexander Gordeev
2023-01-11 18:45 ` Alexander Gordeev

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=a20adf2d-6a2b-bfdf-d86f-c8c5972ab39e@opensynergy.com \
    --to=alexander.gordeev@opensynergy.com \
    --cc=Matti.Moell@opensynergy.com \
    --cc=acourbot@chromium.org \
    --cc=alex.bennee@linaro.org \
    --cc=andrew.gazizov@opensynergy.com \
    --cc=bag@semihalf.com \
    --cc=egranata@google.com \
    --cc=gustavo.padovan@collabora.com \
    --cc=keiichiw@chromium.org \
    --cc=mwojtas@google.com \
    --cc=peter.griffin@linaro.org \
    --cc=tfiga@chromium.org \
    --cc=virtio-dev@lists.oasis-open.org \
    /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