linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Boris Brezillon <boris.brezillon@collabora.com>,
	Alexandre Courbot <acourbot@chromium.org>,
	Tomasz Figa <tfiga@chromium.org>,
	Ezequiel Garcia <ezequiel@collabora.com>,
	Daniel Gomez <daniel@qtec.com>,
	Peter Griffin <peter.griffin@linaro.org>,
	Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	Helen Koike <helen.koike@collabora.com>,
	Jan Schmidt <jan@centricular.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.org>,
	Michael Tretter <m.tretter@pengutronix.de>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	Matthew Waters <matthew@centricular.com>
Subject: Recap of: VP9 Stateless Support (follow up of [ANN] Report of Media Summit: Codecs)
Date: Fri, 15 Nov 2019 09:52:33 -0500	[thread overview]
Message-ID: <4b0b35017d89b0caf989d69887ed939eb2f4a511.camel@ndufresne.ca> (raw)
In-Reply-To: <f948c7918ea24ea2686fff72bcf813f340d55e45.camel@ndufresne.ca>

Hi All,

So Hans, Boris and I participated to the chat. As consider that it's
important to get this CODEC stuff read in a realistic time frame, the
first and most realistic proposal was picked. So here's a summary of
that will be needed.

## Introduce a VIDIOC_DELETE_BUF

As discussed, this will create wholes in the indexes of the buffers in
the queue. VIDIOC_CREATE_BUFS has a start index, so it is left to
userspace to fill the wholes. We are not going to lift the 32 buffers
limit just yet, that's why it is important to make sure that wholes can
be filled. Typical strategy should be to first discard buffers before
creating new one.

## Workflow

Upon a resolution change, userspace can start allocating frames for the
new resolution at any time (that's the nature of CREATE_BUFS). It can
also discard no-longer referenced buffers using DELETE_BUFS. Assuming
userspace make use of DMABuf, that can happen independently. This could
benefit many other drivers, since it will reduce the number actions
that must be done during the STREAMOFF period.

In order to operate the resolution change, the process remains the
same. With the exception that REQBUFS is no longer needed. The
framework should already validate properly the buffer size (to be
verified please).

 - STREAMOFF(Capture)
 - S_FMT(Capture)
 - QBUF(Capture) *
 - STREAMON(Capture)

Stream ON/OFF operation must be made independent between CAPTURE and
OUTPUT queues if it's not already the case.

## Driver specific bits

Drivers that support mixed size references will likely extend the
structure that stores buffer in vb2, and save the format used at QBUF
time. This avoids the need for an extra control later. This also avoid
having a lot of per-driver validation.

regards,
Nicolas


  parent reply	other threads:[~2019-11-15 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-02 12:50 [ANN] Report of Media Summit: Codecs Hans Verkuil
2019-11-14 18:15 ` VP9 Stateless Support (follow up of [ANN] Report of Media Summit: Codecs) Nicolas Dufresne
2019-11-15  6:12   ` Boris Brezillon
2019-11-15 14:52   ` Nicolas Dufresne [this message]
2019-11-19 14:18 ` [ANN] Report of Media Summit: Codecs Hans Verkuil
2019-12-03  7:08   ` Tomasz Figa
2019-12-03  6:56 ` Tomasz Figa

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=4b0b35017d89b0caf989d69887ed939eb2f4a511.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=acourbot@chromium.org \
    --cc=boris.brezillon@collabora.com \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=daniel@qtec.com \
    --cc=dave.stevenson@raspberrypi.org \
    --cc=ezequiel@collabora.com \
    --cc=helen.koike@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jan@centricular.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.tretter@pengutronix.de \
    --cc=matthew@centricular.com \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=peter.griffin@linaro.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=tfiga@chromium.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;
as well as URLs for NNTP newsgroup(s).