Re: [linux-dvb] [PATCH] Userspace tuner

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Markus Rechberger <mrechberger@...>
Cc: Alan Cox <alan@...>, video4linux-list@redhat.com <video4linux-list@...>, linux-dvb@linuxtv.org <linux-dvb@...>, akpm@linux-foundation.org <akpm@...>, linux-kernel@vger.kernel.org <linux-kernel@...>
Date: Tuesday, September 18, 2007 - 4:19 am

Markus Rechberger wrote:

IMHO...

The reason why there is no single 'format conversion library' that
everybody uses is because of the large differences between requirements
for such a thing. The line between 'format conversion' and things such
as a video codec, or image processing is very vague. For example: Some
apps just want compressed video format output. Would video compression
be part of such a 'format conversion library'? If so, then which
compressed video formats? Proprietary ones too? If not all formats that
exist are supported, it would not be complete for some or many apps, and
maybe not even useful at all (because integrating any necessary
pixel-format conversion into the compression routines may be more
efficient than making multiple passes over the data with separate
libraries). Will the library include resizing? If so, which resampling
algorithms? Then how about rotation? Then maybe geometrical mapping
(games could want that)? Will the library be able to adjust
brightness/contrast/saturation in software? If so, then what about noise
filtering (which algorithms?), etc... perhaps the library should go all
the way, bind to port 80 and serve-up a live video stream
'youtube-style'? ok, now that would definitely go too far...

The question is: Where exactly to put the boundary?

My point is that format conversion is not a video capture driver issue.
Sure, it is convenient for apps to be able to use standard libraries
that perform certain functions with optimized code, etc, but for the
purpose of capturing video (media) it's not always necessary to convert
the output into something different before the data is useful for an app.

Certain format conversions can be done very efficiently inside video
cards, for example, and an app may prefer to use that. If a video card
has such functionality, access to it should be part of its driver.

Applications needing format conversions would benefit tremendously from
a good, powerful, flexible, efficient, etc, library that removes the
necessity for each application to choose between using a video-card
accelerator, or MMX code, or SSE code, or another method to do the work.
Maybe it should allow applications to request a 'media stream' in a
given format and container, with conversion automagically happening when
needed, as efficiently as possible (or at the requested quality level).

But that doesn't mean that that library should be an integrated part of
the video capture interface. The boundary of the 'media capture
interface' driver should be on the data, as delivered by the video
capture interface.

The reason is that the 'best' way to do format conversions depend on the
application requirements (what formats can the app use directly?), on
the available hardware (is there an accelerator that can help?), and on
the quality expectation or system issues (is the CPU the bottleneck or
is the USB bus saturated? Do we request JPEG from the webcam and
decompress into YUV, or do we request the RAW bayer from the
high-quality image sensor and convert that into YUV?). Choices, choises...

That means that IMHO, to prevent having runaway complexity plus chasing
a moving target, format conversion should definitely not be embedded in
the API to access video capture hardware, unless the hardware itself
offers format conversion functions (for example, as it does now, by
allowing choice of the output format, but only for formats that the
hardware itself supports directly).


It may make things 'easy' if it makes it easy to use existing (?) code
from other sources, but that's not a reason why such an interface is
technically superior. For example, 'ndiswrapper' makes it very easy to
use certain wireless card drivers, but that doesn't mean (by far) that
ndiswrapper's method results in the best wireless card drivers for Linux.

It sounds to me that your approach is more similar to ndiswrapper, for
practical reasons 'this is how I can make it work with less effort' than
it is similar to a full-blown Linux driver 'this is the best way to make
a reliable and efficient driver for this kind of hardware'. Linux
_users_ may need to use ndiswrapper right now, but Linux itself needs
real drivers, not a compromise.

Just my 2cts...

Jelle.



-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Wed Sep 12, 7:10 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Johannes Stezenbach, (Thu Sep 13, 9:13 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Thu Sep 13, 10:12 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Manu Abraham, (Thu Sep 13, 11:50 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Thu Sep 13, 12:08 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Steven Toth, (Thu Sep 13, 4:36 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Alan Cox, (Fri Sep 14, 8:10 am)
Re: [linux-dvb] [PATCH] Userspace tuner, hermann pitton, (Thu Sep 13, 8:49 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Thu Sep 13, 7:17 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Alan Cox, (Fri Sep 14, 9:52 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Fri Sep 14, 12:18 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Jelle Foks, (Tue Sep 18, 4:19 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Mauro Carvalho Chehab, (Tue Sep 18, 6:56 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Alan Cox, (Tue Sep 18, 7:00 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Tue Sep 18, 4:55 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Steven Toth, (Thu Sep 13, 9:03 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Fri Sep 14, 2:38 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Johannes Stezenbach, (Fri Sep 14, 7:38 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Fri Sep 14, 12:36 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Johannes Stezenbach, (Fri Sep 14, 4:43 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Fri Sep 14, 9:49 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Johannes Stezenbach, (Sat Sep 15, 9:34 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Steven Toth, (Sat Sep 15, 10:56 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Manu Abraham, (Sat Sep 15, 4:52 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Mauro Carvalho Chehab, (Fri Sep 14, 11:09 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Sat Sep 15, 8:59 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Fri Sep 14, 9:29 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Johannes Stezenbach, (Sat Sep 15, 9:16 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Sat Sep 15, 9:38 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Mauro Carvalho Chehab, (Sat Sep 15, 10:04 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Bernard Jungen, (Sat Sep 15, 12:58 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Mon Sep 17, 4:46 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Hans Verkuil, (Sun Sep 16, 7:30 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Sat Sep 15, 10:33 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Mauro Carvalho Chehab, (Sat Sep 15, 10:45 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Mauro Carvalho Chehab, (Fri Sep 14, 9:49 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Mauro Carvalho Chehab, (Fri Sep 14, 1:32 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Fri Sep 14, 1:46 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Mauro Carvalho Chehab, (Fri Sep 14, 2:29 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Michael Krufky, (Fri Sep 14, 3:20 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Aidan Thornton, (Fri Sep 14, 5:07 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Manu Abraham, (Fri Sep 14, 5:53 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Mauro Carvalho Chehab, (Fri Sep 14, 5:16 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Manu Abraham, (Fri Sep 14, 3:57 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Joerg Roedel, (Fri Sep 14, 5:15 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Manu Abraham, (Fri Sep 14, 8:00 am)
Re: [linux-dvb] [PATCH] Userspace tuner, Joerg Roedel, (Fri Sep 14, 12:13 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Manu Abraham, (Fri Sep 14, 12:56 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Joerg Roedel, (Fri Sep 14, 1:40 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Fri Sep 14, 12:09 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Alex Deucher, (Fri Sep 14, 2:52 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Fri Sep 14, 2:59 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Alex Deucher, (Fri Sep 14, 3:38 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Manu Abraham, (Thu Sep 13, 12:22 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Markus Rechberger, (Thu Sep 13, 12:32 pm)
Re: [linux-dvb] [PATCH] Userspace tuner, Manu Abraham, (Thu Sep 13, 12:52 pm)