linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: dikshita@codeaurora.org, Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, stanimir.varbanov@linaro.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	vgarodia@codeaurora.org, majja@codeaurora.org,
	jdas@codeaurora.org, linux-media-owner@vger.kernel.org
Subject: Re: [RFC] METADATA design using V4l2 Request API
Date: Fri, 05 Jun 2020 13:43:12 -0400	[thread overview]
Message-ID: <edbae7a96fb6cc2d017d947fbeedc86a7540302a.camel@ndufresne.ca> (raw)
In-Reply-To: <5356c146a340d951b8d492373f349199@codeaurora.org>

Le vendredi 05 juin 2020 à 12:32 +0530, dikshita@codeaurora.org a écrit :
> Hi Hans, Nicolas,
> 
> On 2020-05-29 13:01, Hans Verkuil wrote:
> > On 29/05/2020 04:18, Nicolas Dufresne wrote:
> > > Le jeudi 28 mai 2020 à 16:18 +0530, dikshita@codeaurora.org a écrit :
> > > > > not allowed. So I need to know more about this.
> > > > > Regards,
> > > > >        Hans
> > > > 
> > > > we need this for use cases like HDR10+ where metadata info is part of
> > > > the bitstream.
> > > > 
> > > > To handle such frame specific data, support for request api on 
> > > > capture
> > > > plane would be needed.
> > > 
> > > I have a bit of a mixed impression here. Considering how large the 
> > > ioctl
> > > interface overhead is, relying on HW parser to extract this medata 
> > > woud be the
> > > last thing I would consider.
> > > 
> > > Instead, I'm quite convince we can achieve greater and likely 
> > > zero-copy
> > > perfromance by locating this header in userspace. So everytime I see 
> > > this kind
> > > of API, were the HW is *needed* to parse a trivial bit of bistream, I 
> > > ended
> > > thinking that we simply craft this API to expose this because the HW 
> > > can do it,
> > > but no further logical thinking or higher level design seems to have 
> > > been
> > > applied.
> > > 
> > > I'm sorry for this open critic, but are we designing this because the 
> > > HW
> > > designer exposed that feature? This is so low complexity to extract in
> > > userspace, with the bonus that we are not forced into expanding the
> > > representation to another form immediatly, as maybe the display will 
> > > be able to
> > > handle that form directly (where converting to a C structure and then 
> > > back to
> > > some binary format to satisfy DRM property seems very sub-optimal).
> > > 
> > > Nicolas
> > > 
> > 
> > Nicolas raises good questions: it would help if you can give more
> > detailed information
> > about the hardware. We had similar discussions with Xilinx about
> > HDR10+ (see this
> > thread: https://www.spinics.net/lists/linux-media/msg163297.html).
> > 
> > There is no clear answer at the moment on how to handle dynamic HDR 
> > metadata.
> > It will help if we have some more information how different SoCs handle 
> > this
> > in hardware.
> > 
> > Regards,
> > 
> > 	Hans
> 
> As per Widevine Level 1 requirement, it needs “Hardware Protected Video 
> Path”.
> Hence, in case of secure bitstream decoding, we need decoder metadata 
> delivered from HW.
> CPU cannot parse secure bitstream and extract them.
> Apart from this, there are other metadata like "histogram" which is not 
> part of the bitstream
> and generated by hardware

(I'm ignoring the bit about camera data + histogram, this was about
CODEC, and it also does not make much sense to me)

We extract this data from the bitstream, before the decoder. The
bitstream is not subject to secure buffer, because it's encrypted. Be
aware that the implementation does not encrypt all NALs, PPS/SPS SEIs,
are in clear, and NAL headers are most of the time in clear.

Going with full bitstream encryption would have required rewriting a
lot more HW, since you would not be able to handle the
depayload/demuxing in userspace or you'd need all this multimedia stuff
to be placed on in your secure firmware. Multimedia software these
days, ffmpeg, gstreamer, chromium internal stack etc. needs a lot of
information from the bitstream that would be very hard to pass
properly.

regards,
Nicolas


      reply	other threads:[~2020-06-05 17:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  6:21 [RFC] METADATA design using V4l2 Request API Dikshita Agarwal
2020-05-08  6:21 ` [RFC PATCH 1/3] Register for media device Dikshita Agarwal
2020-05-08  6:21 ` [RFC PATCH 2/3] Enable Request API for output buffers Dikshita Agarwal
2020-05-08  6:21 ` [PATCH 3/3] Enable Request API for Capture Buffers Dikshita Agarwal
2020-05-26  6:31 ` [RFC PATCH 0/3] METADATA design using V4l2 Request API dikshita
2020-05-26  7:03   ` Hans Verkuil
2020-05-26 10:57 ` [RFC] " Hans Verkuil
2020-05-28 10:48   ` dikshita
2020-05-28 11:24     ` Hans Verkuil
2020-05-29  2:08       ` Nicolas Dufresne
2020-06-11 15:06         ` Nicolas Dufresne
2020-06-12 10:05           ` Hans Verkuil
2020-06-12 16:37             ` Nicolas Dufresne
2020-06-16 13:00               ` dikshita
2020-06-23 12:47                 ` dikshita
2020-07-02  6:33                   ` dikshita
2020-08-03 11:32                 ` Hans Verkuil
2020-09-14 10:21                   ` dikshita
2020-09-14 10:31                     ` Hans Verkuil
2020-05-29  2:18     ` Nicolas Dufresne
2020-05-29  7:31       ` Hans Verkuil
2020-06-05  7:02         ` dikshita
2020-06-05 17:43           ` Nicolas Dufresne [this message]

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=edbae7a96fb6cc2d017d947fbeedc86a7540302a.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=dikshita@codeaurora.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jdas@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media-owner@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=majja@codeaurora.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=vgarodia@codeaurora.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).