All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <tfiga@chromium.org>
To: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Cc: Maxime Jourdan <maxi.jourdan@wanadoo.fr>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [RFC] Request API and V4L2 capabilities
Date: Wed, 22 Aug 2018 22:53:15 +0900	[thread overview]
Message-ID: <CAAFQd5Da3xSR7--79d6Z3YdrfNF6CVSDYbK78S2O3dU_1qSzFQ@mail.gmail.com> (raw)
In-Reply-To: <2ce0778a85616ea71d9ca493372b645b5858dc81.camel@bootlin.com>

On Wed, Aug 22, 2018 at 10:21 PM Paul Kocialkowski
<paul.kocialkowski@bootlin.com> wrote:
>
> Hi,
>
> [...]
>
> On Wed, 2018-08-15 at 14:51 +0200, Maxime Jourdan wrote:
> > Hi Paul, I think we need to go deeper than just exposing the supported
> > profiles/levels and also include a way to query the CAPTURE pixel
> > formats that are supported for each profile.
> >
> > Maybe HEVC Main produces yuv420p but HEVC Main10 gives you
> > yuv420p10le. Maybe H.264 HiP produces NV12 but H.264 Hi422P produces
> > YUYV while also supporting down-sampling to NV12.
>
> Well, I think we're looking at this backwards. Userspace certainly known
> what destination format is relevant for the video, so it shouldn't have
> to query the driver about it except to check that the format is indeed
> supported.

Typically the profile itself only defines the sub-sampling and sample
size, but not the exact set of formats supported by the hardware. VP9
profile 0 is expected to decode into YUV 4:2:0 8-bit, but whether that
would be NV12, YUV420, NV21 or maybe some hw-specific tiled format
(like NV12MT), is entirely up to the hardware/driver. Userspace will
definitely need to know if the decoder can decode the video into a
format, which it can later use (display).

>
> > I don't know the specifics of each platform and the only example I can
> > think of is the Amlogic HEVC decoder that can produce NV12 for Main,
> > but only outputs a compressed proprietary format for Main10.
> >
> > I unfortunately don't have an idea about how to implement that, but
> > I'll think about it.
>
> On the first generations of Allwinner platforms, we also have a vendor-
> specific format as output, that we expose with a dedicated format.
> There's no particular interfacing issue with that. Only that userspace
> has to be aware of the format and how to deal with it.
>

Typically a decode operates as a part of a pipeline with other
components. If your display doesn't let you display format X on an
overlay plane, you may want to use a post-processor hardware to
convert it to format Y. Or maybe use GPU to blit the video into the
primary plane? Or maybe you need to do both, because format X is a
decoder-specific tiled format and the GPU can't deal with it and all
the overlay planes are occupied with some other surfaces? Or maybe
it's just cheaper to do software decode rather than the conversion+GPU
blit? This is something that normally needs to be queried before the
video playback is initialized.

Best regards,
Tomasz

  reply	other threads:[~2018-08-22 17:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-04 13:50 [RFC] Request API and V4L2 capabilities Hans Verkuil
2018-08-06  8:16 ` Paul Kocialkowski
2018-08-06  8:32   ` Hans Verkuil
2018-08-06  9:13     ` Paul Kocialkowski
2018-08-06  9:23       ` Hans Verkuil
2018-08-06  9:29         ` Paul Kocialkowski
2018-08-21  8:52           ` Tomasz Figa
2018-08-22 14:10             ` Paul Kocialkowski
2018-08-22 17:33               ` Ezequiel Garcia
2018-08-23  8:05                 ` Paul Kocialkowski
2018-08-23 17:33                   ` Nicolas Dufresne
2018-08-29  4:30                     ` Tomasz Figa
2018-08-30  7:33                       ` Hans Verkuil
2018-08-29  4:25                   ` Tomasz Figa
2018-08-29  4:21               ` Tomasz Figa
2018-08-15 12:51       ` Maxime Jourdan
2018-08-22 13:21         ` Paul Kocialkowski
2018-08-22 13:53           ` Tomasz Figa [this message]
2018-08-21  9:34     ` Tomasz Figa
2018-08-15 13:57   ` Nicolas Dufresne
2018-08-22 14:52     ` Paul Kocialkowski
2018-08-22 17:53       ` Nicolas Dufresne
2018-08-15 14:03   ` Hans Verkuil
2018-08-07  4:05 ` Ezequiel Garcia
2018-08-15 12:11 ` Mauro Carvalho Chehab
2018-08-15 14:18   ` Hans Verkuil
2018-08-21  9:15     ` Tomasz Figa
2018-08-22  3:55       ` Alexandre Courbot
2018-08-15 14:37   ` Nicolas Dufresne
2018-08-15 14:27 ` Nicolas Dufresne
2018-08-23 14:31 ` Hans Verkuil
2018-08-23 17:37   ` Nicolas Dufresne
2018-08-24  7:29     ` Hans Verkuil
2018-08-24  9:00       ` Paul Kocialkowski
2018-08-29  4:31       ` 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=CAAFQd5Da3xSR7--79d6Z3YdrfNF6CVSDYbK78S2O3dU_1qSzFQ@mail.gmail.com \
    --to=tfiga@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=maxi.jourdan@wanadoo.fr \
    --cc=maxime.ripard@bootlin.com \
    --cc=mchehab@kernel.org \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=sakari.ailus@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.