stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
	Ezequiel Garcia <ezequiel@collabora.com>,
	linux-media@vger.kernel.org
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Robert Beckett <bob.beckett@collabora.com>,
	kernel@collabora.com, stable@vger.kernel.org
Subject: Re: [PATCH 2/2] media: coda: Add more H264 levels for CODA960
Date: Fri, 17 Jul 2020 11:50:38 -0400	[thread overview]
Message-ID: <f409d4ddad0a352ca7ec84699c94a64e5dbf0407.camel@collabora.com> (raw)
In-Reply-To: <05184a7c923c7e2aacca9da2bafe338ff5a7c16d.camel@pengutronix.de>

Le vendredi 17 juillet 2020 à 09:48 +0200, Philipp Zabel a écrit :
> Hi Ezequiel, Nicolas,
> 
> On Fri, 2020-07-17 at 00:49 -0300, Ezequiel Garcia wrote:
> > From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> > 
> > This add H264 level 4.1, 4.2 and 5.0 to the list of supported formats.
> > While the hardware does not fully support these levels, it do support
> > most of them.
> 
> Could you clarify this? As far as I understand the hardware supports
> maximum frame size requirement for up to level 4.2 (8704 macroblocks),
> but not 5.0, and at least the implementation on i.MX6 does not support
> the max encoding speed requirements for levels 4.1 and higher.
> 
> I don't think the firmware ever produces any output with a level higher
> than 4.0 either, so what is the purpose of pretending otherwise?

The level is a combination of 3 contraints, frame size, raw bitrate and encoded
bitrate. We have a streams here the decode just fine, that reaches 5.0 for the
endoded bitrate, but is near 4.0 for everything else. This streams works just
fine with the 960. I think the risk with this patch is that it now allow a
stream to underperform in raw bitrate, but that can be controlled otherwise by
the frame interval, so there is no need to limit it through levels.  I could be
wrong.

But in public domain [0], Chips&Media seems to claim 4.2 decode, 4.0 encode. So
yes, claiming 5.0 is off track, we will reduce this to 4.2 in v2.

[0] https://www.chipsnmedia.com/fullhd

Considering how buggy and inconcistent this is going to be in decoder drivers,
I'm tempted to just drop that restriction in GStreamer v4l2 decoders (was added
by Philippe Normand from Igalia). Specially the bitrate limits, since it is
quite clear from testing that this limits is only related to real-time
performance, and that offline decoding should still be possible. Meanwhile, the
driver should still advertise 4.1 and 4.2 decoding. But we should check the
decoding/encoding levels are actually not the same, that I haven't checked, the
code is a bit ... kindly said ... hairy.

> 
> regards
> Philipp


  reply	other threads:[~2020-07-17 15:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17  3:49 [PATCH 1/2] media: coda: Fix reported H264 profile Ezequiel Garcia
2020-07-17  3:49 ` [PATCH 2/2] media: coda: Add more H264 levels for CODA960 Ezequiel Garcia
2020-07-17  7:48   ` Philipp Zabel
2020-07-17 15:50     ` Nicolas Dufresne [this message]
2020-07-20  8:31       ` Philipp Zabel
2020-07-20 15:36         ` Nicolas Dufresne
2020-07-20 16:09     ` Nicolas Dufresne
2020-07-20 21:43       ` Nicolas Dufresne
2020-07-21  8:14       ` Philipp Zabel
2020-07-17  8:14 ` [PATCH 1/2] media: coda: Fix reported H264 profile Philipp Zabel
2020-07-17 15:56   ` Nicolas Dufresne
2020-07-20  8:40     ` Philipp Zabel
2020-07-20 16:20       ` Nicolas Dufresne
2020-07-20 16:13   ` Nicolas Dufresne

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=f409d4ddad0a352ca7ec84699c94a64e5dbf0407.camel@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=bob.beckett@collabora.com \
    --cc=ezequiel@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=linux-media@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=stable@vger.kernel.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).