Which Userland Interface for USB Video Class Driver?

Stefan Ehmann shoesoft at gmx.net
Fri Sep 26 07:26:56 UTC 2008

On Thursday 25 September 2008 12:34:25 Dieter wrote:
> > <snip>
> >
> > > As a driver writer, the AV encoding standard concerns me. For,
> > > the driver must be able to decode compressed frame into plain bitmap
> > > if the chip cannot decode frame on its own. Of course, the Chinese
> > > standard is so cheap that many hardware vendors are willing to
> > > integrate decoder into chips, I believe.
> > >=20
> >
> > I'm not sure this is necessarily true anymore. From a European view
> > point, the vast majority of DVB-{S,T,C} cards on the market are 'budget'
> > cards; they simply demodulate an MPEG-2 Program Stream from the signal.
> > Certainly, under linux, neither of my DVB-T tuners (pci saa based, usb
> > dibcom), nor my DVB-S card (also pci saa based) can decode a single
> > frame of actual video data.
> >
> > Even when the actual video is not MPEG-2, like HD streams encoded in
> > MPEG-4 AVC, it is contained in an MPEG-2 PS. All the drivers do is to
> > setup and tune the device to the appropriate channel, and provide a
> > device to read the PS from. It is up to whatever userland program which
> > is using the device to decode the data, if that is even required. I
> > certainly wouldn't like a driver to decode high bitrate MPEG-4 AVC if
> > all I am trying to do is record a show to disk.
> >
> > As far as I can tell, ATSC tuners do precisely the same thing.
> I suspect you mean MPEG-2 TS (transport stream), not MPEG-2 PS
> (program stream)?
> Yes, ATSC is the same way, at least in the US.  The "tuner" provides
> a mpeg2 ts.  You can write this to disk and/or decode it and view it.
> You don't *want* the tuner to decode it, because the decoded video
> is gigantic and would quickly fill your disks.  And a PCI bus isn't
> fast enough for a single stream of uncompressed HD video.  The
> compressed version eats enough disk space as it is.
> Decoding is a bit of a problem.  To decode HD in real time, you need a
> recent fast CPU (and PCIe), or a GPU that supports Xv and XvMC, or some
> hardware decoder.  As far as I know, *BSD has no support for hardware
> decoders.  There are Ethernet to TV bridges, but they seem to all have
> significant limitations (counterexamples welcome).  ATI may have released
> enough documentation to allow using some models of their GPUs for decoding,
> but no one has written the code yet.  They have not released docs for the
> UVD/UVD2 on the R600/R700 yet, and might never release it.  Supposedly VIA
> Chrome GPUs have open source Xv and XvMC support, does this work on *BSD?

mplayer supports xvmc:
The post also lists other cards supporting xvmc, but it's probably outdated.

I got this working with my old graphic card + nvidia binary driver. While the 
speedup was noticeable it was rather disappointing. IIRC for videos needing 
about 40% CPU, with xvmc it was maybe 30%.

More information about the freebsd-multimedia mailing list