All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Nicolas Dufresne <nicolas@ndufresne.ca>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	LMML <linux-media@vger.kernel.org>,
	Wim Taymans <wtaymans@redhat.com>,
	schaller@redhat.com
Subject: Re: [ANN] Meeting to discuss improvements to support MC-based cameras on generic apps
Date: Fri, 18 May 2018 18:19:18 +0300	[thread overview]
Message-ID: <2499458.KJkn9g4ItI@avalon> (raw)
In-Reply-To: <f2d8be6e6a1754afc253be816a0307f46c957b59.camel@ndufresne.ca>

Hi Nicolas,

On Friday, 18 May 2018 17:22:47 EEST Nicolas Dufresne wrote:
> Le vendredi 18 mai 2018 à 11:15 +0300, Laurent Pinchart a écrit :
> >> I need to clarify a little bit on why we disabled libv4l2 in GStreamer,
> >> as it's not only for performance reason, there is couple of major issues
> >> in the libv4l2 implementation that get's in way. Just a short
> >> list:
> > 
> > Do you see any point in that list that couldn't be fixed in libv4l ?
> 
> Sure, most of it is features being added into the kernel uAPI but not
> added to the emulation layer. But appart from that, libv4l will only
> offer legacy use case, we need to think how generic userspace will be
> able to access these camera, and leverage the per request controls,
> multi-stream, etc. features. This is mostly what Android Camera HAL2
> does (and it does it well), but it won't try and ensure this stays Open
> Source in any ways. I would not mind if Android Camera HAL2 leads the
> way, and a facilitator (something that does 90% of the work if you have
> a proper Open Source driver) would lead the way in getting more OSS
> drivers submitted.

There are a few issues with the Android camera HAL that make implementations 
very painful. If we were to model a camera stack on such an API, we should at 
least fix those. The biggest issue in my opinion is that the HAL mandates that 
a request captures to a specific buffer, making implementations very complex, 
and requiring memcpy() from time to time when losing race conditions. It would 
be much simpler to instead require capture to any buffer from a given pool.

> >>    - Crash when CREATE_BUFS is being used
> 
> This is a side effect of CREATE_BUFS being passed-through, implementing
> emulation for this should be straightforward.
> 
> >>    - Crash in the jpeg decoder (when frames are corrupted)
> 
> A minimalist framing parser would detect just enough of this, and would
> fix it.
> 
> >>    - App exporting DMABuf need to be aware of emulation, otherwise the
> >>      DMABuf exported are in the orignal format
> 
> libv4l2 can return ENOTTY to expbufs calls in
> 
> >>    - RW emulation only initialize the queue on first read (causing
> >>      userspace poll() to fail)
> 
> This is not fixable, only place it would be fixed is by moving this
> emulation into VideoBuf2. That would assume someone do care about RW
> (even though it could be nicer uAPI when dealing with muxed or byte-
> stream type of data).

I personally don't care much about R/W. I have heard that the recent 
implementation of mmap'ed buffer support in DVB showed impressive performance 
improvements, so a R/W API isn't something I'd prioritize.

> > >    - Signature of v4l2_mmap does not match mmap() (minor)
> > >    - The colorimetry does not seem emulated when conversion
> 
> This one is probably tricky, special is the converter plugin API is
> considered stable. Maybe just resetting everything to DEFAULT would
> work ?

I'd actually like to rework that API. The conversion code should be moved to a 
separate library that would allow its usage without a V4L2 device.

> > >    - Sub-optimal locking (at least deadlocks were fixed)
> 
> Need more investigation really, and proper measurement.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2018-05-18 15:18 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 19:07 [ANN] Meeting to discuss improvements to support MC-based cameras on generic apps Mauro Carvalho Chehab
2018-05-17 21:38 ` Nicolas Dufresne
2018-05-18  8:15   ` Laurent Pinchart
2018-05-18 11:24     ` Mauro Carvalho Chehab
2018-05-18 12:38       ` Laurent Pinchart
2018-05-18 15:15         ` Nicolas Dufresne
2018-05-18 15:41           ` Tomasz Figa
2018-05-19  5:17           ` Laurent Pinchart
2018-05-23 16:19       ` Hans Verkuil
2018-05-23 19:35         ` Laurent Pinchart
2018-05-18 14:22     ` Nicolas Dufresne
2018-05-18 15:19       ` Laurent Pinchart [this message]
2018-05-18 12:27 ` Laurent Pinchart
2018-05-18 15:05   ` Mauro Carvalho Chehab
2018-05-18 15:31     ` Laurent Pinchart
2018-05-18 15:37     ` Dave Stevenson
2018-05-18 18:23       ` Nicolas Dufresne
2018-05-19  7:04       ` Laurent Pinchart
2018-05-21 12:16         ` Dave Stevenson
2018-05-21 13:04           ` Laurent Pinchart
2018-05-18 15:37 ` Tomasz Figa
2018-05-25  2:40   ` Zheng, Jian Xu
2018-06-13 14:36   ` Sakari Ailus
2018-06-14  1:06     ` Tomasz Figa
2018-05-28 13:43 ` Mauro Carvalho Chehab
2018-05-28 14:21   ` Niklas Söderlund
2018-05-31 13:22   ` Mauro Carvalho Chehab
2018-05-31 13:46     ` Kieran Bingham
2018-05-31 13:54     ` Laurent Pinchart
2018-05-31 13:58     ` Hans Verkuil
2018-05-31 14:18       ` Tomasz Figa
2018-05-31 15:15         ` Mauro Carvalho Chehab
2018-05-31 14:19       ` Hans Verkuil
2018-06-01  7:31         ` Javier Martinez Canillas

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=2499458.KJkn9g4ItI@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=schaller@redhat.com \
    --cc=wtaymans@redhat.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.