From: Boris Brezillon <boris.brezillon@collabora.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: Nicolas Dufresne <nicolas@ndufresne.ca>,
Thierry Reding <thierry.reding@gmail.com>,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Alexandre Courbot <acourbot@chromium.org>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Jernej Skrabec <jernej.skrabec@siol.net>,
Ezequiel Garcia <ezequiel@collabora.com>,
Jonas Karlman <jonas@kwiboo.se>
Subject: Re: Proposed updates and guidelines for MPEG-2, H.264 and H.265 stateless support
Date: Wed, 22 May 2019 10:20:55 +0200 [thread overview]
Message-ID: <20190522102055.53933998@collabora.com> (raw)
In-Reply-To: <20190522092924.116b212e@collabora.com>
On Wed, 22 May 2019 09:29:24 +0200
Boris Brezillon <boris.brezillon@collabora.com> wrote:
> On Wed, 22 May 2019 15:39:37 +0900
> Tomasz Figa <tfiga@chromium.org> wrote:
>
> > > It would be premature to state that we are excluding. We are just
> > > trying to find one format to get things upstream, and make sure we have
> > > a plan how to extend it. Trying to support everything on the first try
> > > is not going to work so well.
> > >
> > > What is interesting to provide is how does you IP achieve multi-slice
> > > decoding per frame. That's what we are studying on the RK/Hantro chip.
> > > Typical questions are:
> > >
> > > 1. Do all slices have to be contiguous in memory
> > > 2. If 1., do you place start-code, AVC header or pass a seperate index to let the HW locate the start of each NAL ?
> > > 3. Does the HW do support single interrupt per frame (RK3288 as an example does not, but RK3399 do)
> >
> > AFAICT, the bit about RK3288 isn't true. At least in our downstream
> > driver that was created mostly by RK themselves, we've been assuming
> > that the interrupt is for the complete frame, without any problems.
>
> I confirm that's what happens when all slices forming a frame are packed
> in a single output buffer: you only get one interrupt at the end of the
> decoding process (in that case, when the frame is decoded). Of course,
> if you split things up and do per-slice decoding instead (one slice per
> buffer) you get an interrupt per slice, though I didn't manage to make
> that work.
> I get a DEC_BUFFER interrupt (AKA, "buffer is empty but frame is not
> fully decoded") on the first slice and an ASO (Arbitrary Slice Ordering)
> interrupt on the second slice, which makes me think some states are
> reset between the 2 operations leading the engine to think that the
> second slice is part of a new frame.
>
> Anyway, it doesn't sound like a crazy idea to support both per-slice
> and per-frame decoding and maybe have a way to expose what a
> specific codec can do (through an extra cap mechanism).
> The other option would be to support only per-slice decoding with a
> mandatory START_FRAME/END_FRAME sequence to let drivers for HW that
> only support per-frame decoding know when they should trigger the
> decoding operation.
Just to clarify, we can use Hans' V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF
work to identify start/end frame boundaries, the only problem I see is
that users are not required to clear the flag on the last slice of a
frame, so there's no way for the driver to know when it should trigger
the decode-frame operation. I guess we could trigger this decode
operation when v4l2_m2m_release_capture_buf() returns true, but I
wonder if it's not too late to do that.
> The downside is that it implies having a bounce
> buffer where the driver can pack slices to be decoded on the END_FRAME
> event.
>
next prev parent reply other threads:[~2019-05-22 8:21 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 10:09 Proposed updates and guidelines for MPEG-2, H.264 and H.265 stateless support Paul Kocialkowski
2019-05-15 14:42 ` Nicolas Dufresne
2019-05-15 17:42 ` Paul Kocialkowski
2019-05-15 18:54 ` Nicolas Dufresne
2019-05-15 20:59 ` Paul Kocialkowski
2019-05-16 18:24 ` Nicolas Dufresne
2019-05-16 18:45 ` Paul Kocialkowski
2019-05-17 20:43 ` Nicolas Dufresne
2019-05-18 9:50 ` Paul Kocialkowski
2019-05-18 10:04 ` Jernej Škrabec
2019-05-18 10:29 ` Paul Kocialkowski
2019-05-18 14:09 ` Nicolas Dufresne
2019-05-22 6:48 ` Tomasz Figa
2019-05-22 8:26 ` Paul Kocialkowski
2019-05-22 10:42 ` Thierry Reding
2019-05-22 10:55 ` Hans Verkuil
2019-05-22 11:55 ` Thierry Reding
2019-06-07 6:11 ` Tomasz Figa
2019-06-07 6:45 ` Hans Verkuil
2019-06-07 8:23 ` Hans Verkuil
2019-05-21 10:27 ` Tomasz Figa
2019-05-21 11:44 ` Paul Kocialkowski
2019-05-21 15:09 ` Thierry Reding
2019-05-21 16:07 ` Nicolas Dufresne
2019-05-22 8:08 ` Thierry Reding
2019-05-22 6:01 ` Tomasz Figa
2019-05-22 18:15 ` Nicolas Dufresne
2019-05-21 15:43 ` Thierry Reding
2019-05-21 16:23 ` Nicolas Dufresne
2019-05-22 6:39 ` Tomasz Figa
2019-05-22 7:29 ` Boris Brezillon
2019-05-22 8:20 ` Boris Brezillon [this message]
2019-05-22 18:18 ` Nicolas Dufresne
2019-05-22 8:32 ` Thierry Reding
2019-05-22 9:29 ` Paul Kocialkowski
2019-05-22 11:39 ` Thierry Reding
2019-05-22 18:31 ` Nicolas Dufresne
2019-05-22 18:26 ` Nicolas Dufresne
2019-05-22 10:08 ` Thierry Reding
2019-05-22 18:37 ` Nicolas Dufresne
2019-05-23 21:04 ` Jonas Karlman
2019-06-03 11:24 ` Thierry Reding
2019-06-03 18:52 ` Nicolas Dufresne
2019-06-03 19:41 ` Boris Brezillon
2019-06-04 8:31 ` Thierry Reding
2019-06-04 8:49 ` Boris Brezillon
2019-06-04 9:06 ` Thierry Reding
2019-06-04 9:15 ` Jonas Karlman
2019-06-04 9:28 ` Paul Kocialkowski
2019-06-04 9:38 ` Boris Brezillon
2019-06-04 10:49 ` Jonas Karlman
2019-06-04 8:50 ` Thierry Reding
2019-06-04 8:55 ` Thierry Reding
2019-06-04 9:05 ` Boris Brezillon
2019-06-04 9:09 ` Paul Kocialkowski
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=20190522102055.53933998@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=acourbot@chromium.org \
--cc=ezequiel@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jernej.skrabec@siol.net \
--cc=jonas@kwiboo.se \
--cc=linux-media@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=nicolas@ndufresne.ca \
--cc=paul.kocialkowski@bootlin.com \
--cc=tfiga@chromium.org \
--cc=thierry.reding@gmail.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;
as well as URLs for NNTP newsgroup(s).