dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Hsia-Jun Li <Randy.Li@synaptics.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	sebastian.hesselbarth@gmail.com, airlied@linux.ie,
	linux-kernel@vger.kernel.org, ribalda@chromium.org,
	linux-media@vger.kernel.org, Tomasz Figa <tfiga@chromium.org>,
	dri-devel@lists.freedesktop.org, tzimmermann@suse.de,
	sakari.ailus@linux.intel.com, hverkuil-cisco@xs4all.nl,
	mchehab@kernel.org, jszhang@kernel.org,
	ezequiel@vanguardiasur.com.ar
Subject: Re: [PATCH 2/2] [WIP]: media: Add Synaptics compressed tiled format
Date: Tue, 23 Aug 2022 09:44:22 -0400	[thread overview]
Message-ID: <ede840d10677041d2c8d0a07b81b3cd55a6c92ba.camel@ndufresne.ca> (raw)
In-Reply-To: <2f3c8f6d-fc01-353e-fb74-b7f9af1ed2c4@synaptics.com>

Le mardi 23 août 2022 à 15:40 +0800, Hsia-Jun Li a écrit :
> > In current state, If your driver can support it, userland does not strictly
> > need
> > to re-allocate if the resolution is changed to smaller. In most SVC
> > scenarios,
> > the largest resolution is known in advance, so pre-allocation can happen to
> > the
> When you play a video from Youtube, you may notice that starting 
> resolution is low, then after it received more data knowning the 
> bandwidth is enough, it would switch to a higher resolution. I don't 
> think it would inform the codecs2 or OMX there is a higher target 
> resolution.
> 
> Besides, for the case of SVC in a conference system, the remote(gatway) 
> would not tell you there is a higer resolution or frame rate because you 
> can't receive it in negotiate stage, it could be permanently(device 
> capability) or just bandwidth problem. Whether we know there is a higher 
> requirement video depends on the transport protocols used here.
> 
> The basic idea of SVC is that the low layer didn't depends on the upper 
> layer, we can't tell how the bitstream usually.

I'm not saying against the fact the for drivers without IOMMU (hitting directly
into the CMA allocator), allocation latency is massive challenge, and a
mechanism to smoothly reallocate (rather then mass-reallocation) is needed in
the long run. This is what I'm referring to when saying that folks have
considered extending CREATE_BUFS() with a DELETE_BUFS() ioctl.

Note that there is tones of software trickery you can use to mitigate this. The
most simple one is to use CREATE_BUFS() instead of REQBUFS(). Instead of
reallocating all the buffers you need in one go, you would allocate them one by
one. This will distribute allocation latency. For stateful CODEC, most OMX
focused firmware needs to be modified for that, since they stick with the old
OMX spec which did not allow run-time allocation.

Another trick is to use a second codec session. Both stateful/stateless CODEC
have support for concurrent decoding. On the MSE requirement, is that the stream
transition happens only on keyframe boundary. Meaning, there is no need to reuse
the same session, you can create a new decoder in parallel, and that before the
drain is complete (after the event, before the last buffer). This will compress
the "setup" latency, to the cost of some extra memory usage. Specially in the
MSE case, this is nearly always possible since browsers do require support for
more then 1 concurrent decode. This method also works with OMX style CODEC
without any modification.

regards,
Nicolas




  reply	other threads:[~2022-08-23 13:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08 16:27 [PATCH 0/2] Add pixel formats used in Synatpics SoC Hsia-Jun Li
2022-08-08 16:27 ` [PATCH 1/2] drm/fourcc: Add Synaptics VideoSmart tiled modifiers Hsia-Jun Li
2022-08-18  6:07   ` Tomasz Figa
2022-08-18  6:49     ` Hsia-Jun Li
2022-08-18 23:16   ` Laurent Pinchart
2022-08-18 23:37     ` Hsia-Jun Li
2022-08-08 16:27 ` [PATCH 2/2] [WIP]: media: Add Synaptics compressed tiled format Hsia-Jun Li
2022-08-18  6:06   ` Tomasz Figa
2022-08-18  6:33     ` Hsia-Jun Li
2022-08-18 23:13       ` Laurent Pinchart
2022-08-18 23:51         ` Hsia-Jun Li
2022-08-19 15:28         ` Nicolas Dufresne
2022-08-19 15:44           ` Hsia-Jun Li
2022-08-19 19:17             ` Nicolas Dufresne
2022-08-20  0:10               ` Hsia-Jun Li
2022-08-22 14:15                 ` Nicolas Dufresne
2022-08-23  7:40                   ` Hsia-Jun Li
2022-08-23 13:44                     ` Nicolas Dufresne [this message]
2022-08-23  6:05             ` Tomasz Figa
2022-08-23  7:03               ` Hsia-Jun Li
2022-08-23 14:02                 ` Nicolas Dufresne
2022-08-19 15:26       ` Nicolas Dufresne
2022-08-18 23:08 ` [PATCH 0/2] Add pixel formats used in Synatpics SoC Laurent Pinchart
2022-08-18 23:28   ` Hsia-Jun Li

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=ede840d10677041d2c8d0a07b81b3cd55a6c92ba.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=Randy.Li@synaptics.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jszhang@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tfiga@chromium.org \
    --cc=tzimmermann@suse.de \
    /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).