linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	Tomasz Figa <tfiga@chromium.org>,
	linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Paweł Ościak" <posciak@chromium.org>,
	"Alexandre Courbot" <acourbot@chromium.org>,
	"Kamil Debski" <kamil@wypas.org>,
	"Andrzej Hajda" <a.hajda@samsung.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Jeongtae Park" <jtp.park@samsung.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Tiffany Lin" <tiffany.lin@mediatek.com>,
	"Andrew-CT Chen" <andrew-ct.chen@mediatek.com>,
	"Stanimir Varbanov" <stanimir.varbanov@linaro.org>,
	"Todor Tomov" <todor.tomov@linaro.org>,
	"Paul Kocialkowski" <paul.kocialkowski@bootlin.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	dave.stevenson@raspberrypi.org,
	"Ezequiel Garcia" <ezequiel@collabora.com>,
	"Maxime Jourdan" <maxi.jourdan@wanadoo.fr>
Subject: Re: [PATCH v2 1/2] media: docs-rst: Document memory-to-memory video decoder interface
Date: Sat, 17 Nov 2018 20:25:43 -0500	[thread overview]
Message-ID: <d118bf3edaa6916c3a8138f248661ef5304883d7.camel@ndufresne.ca> (raw)
In-Reply-To: <dd83d36b-c8a1-6f84-a4a2-103607897a64@xs4all.nl>

Le samedi 17 novembre 2018 à 12:43 +0100, Hans Verkuil a écrit :
> > > As far as I know all codecs have resolution/metadata in the stream.
> > 
> > Was this comment about what we currently support in V4L2 interface ? In
> 
> Yes, I was talking about all V4L2 codecs.
> 
> > real life, there is CODEC that works only with out-of-band codec data.
> > A well known one is AVC1 (and HVC1). In this mode, the AVC H264 does
> > not have start code, and the headers are not allowed in the bitstream
> > itself. This format is much more efficient to process then AVC Annex B,
> > since you can just read the NAL size and jump over instead of scanning
> > for start code. This is the format used in the very popular ISOMP4
> > container.
> 
> How would such a codec handle resolution changes? Or is that not allowed?

That's a good question. It is of course allowed, but you'd need the
request API if you want to queue this change (i.e. if you want a
resolution change using the events). Meanwhile, one can always  do
CMD_STOP, wait for the decoder to be drained, pass the new codec data,
push frames / restart streaming.

The former is the only mode implemented in GStreamer, so I'll let
Tomasz comment more on his thought how this could work.

One of the main issue with the resolution change mechanism (even
without codec data) is that you have no guaranty that the input buffer
(buffers on V4L2 OUTPUT queue) are large enough to fit a full encoded
frame of the new resolution. So userspace should have some formula to
calculate the required size, and use the CMD_STOP / drain method to be
able to re-allocate these buffers. So the newest resolution change
method, to be implemented correctly require more work (but is all
doable).

Nicolas


  reply	other threads:[~2018-11-18  1:25 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22 14:48 [PATCH v2 0/2] Document memory-to-memory video codec interfaces Tomasz Figa
2018-10-22 14:48 ` [PATCH v2 1/2] media: docs-rst: Document memory-to-memory video decoder interface Tomasz Figa
2018-10-29  9:45   ` Stanimir Varbanov
2018-10-29 10:06     ` Tomasz Figa
2018-10-29 10:07       ` Tomasz Figa
2018-11-12 11:37   ` Hans Verkuil
2019-01-22 10:02     ` Tomasz Figa
2019-01-22 14:47       ` Hans Verkuil
2019-01-23  5:27         ` Tomasz Figa
2019-01-23  8:10           ` Hans Verkuil
2019-01-24  9:06           ` Tomasz Figa
2019-01-24 19:55             ` Nicolas Dufresne
2019-01-25  3:27               ` Tomasz Figa
2019-01-30  4:02                 ` Nicolas Dufresne
2019-02-06  5:35                   ` Tomasz Figa
2019-04-09  9:47                     ` Tomasz Figa
2019-04-10  9:26                       ` Hans Verkuil
2018-11-12 15:04   ` Stanimir Varbanov
2018-11-15 14:34   ` Hans Verkuil
2018-11-17  4:31     ` Nicolas Dufresne
2018-11-17 11:43       ` Hans Verkuil
2018-11-18  1:25         ` Nicolas Dufresne [this message]
2018-10-22 14:49 ` [PATCH v2 2/2] media: docs-rst: Document memory-to-memory video encoder interface Tomasz Figa
2018-11-12 13:23   ` Hans Verkuil
2018-11-17  4:18     ` Nicolas Dufresne
2018-11-17 11:37       ` Hans Verkuil
2018-11-18  1:34         ` Nicolas Dufresne
2019-01-23 10:02           ` Tomasz Figa
2019-01-24 20:02             ` Nicolas Dufresne
2019-01-23 10:00         ` Tomasz Figa
2019-01-23 11:28           ` Hans Verkuil
2019-01-24 20:04             ` Nicolas Dufresne
2019-01-25  3:29               ` Tomasz Figa
2019-01-23  9:52     ` Tomasz Figa
2019-01-23 13:04       ` Hans Verkuil
2019-01-24 20:14         ` Nicolas Dufresne
2019-01-25  3:59           ` Tomasz Figa
2019-01-30 15:06             ` Nicolas Dufresne
2019-02-06  5:49               ` Tomasz Figa
2018-10-22 15:41 ` [PATCH v2 0/2] Document memory-to-memory video codec interfaces Hans Verkuil
2018-10-23  0:54   ` 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=d118bf3edaa6916c3a8138f248661ef5304883d7.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=a.hajda@samsung.com \
    --cc=acourbot@chromium.org \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=dave.stevenson@raspberrypi.org \
    --cc=ezequiel@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jtp.park@samsung.com \
    --cc=kamil@wypas.org \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=maxi.jourdan@wanadoo.fr \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=posciak@chromium.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=tfiga@chromium.org \
    --cc=tiffany.lin@mediatek.com \
    --cc=todor.tomov@linaro.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).