[mythtv] IVTV VBI reading

Hans Verkuil hverkuil at xs4all.nl
Fri Jan 19 11:21:43 UTC 2007


On Friday 19 January 2007 01:40, Isaac Richards wrote:
> On Thursday 18 January 2007 7:23 pm, Robin Gilks wrote:
> > > In a quick test, this doesn't seem to affect the driver.
> > >
> > > I stopped the MBE, ran mythtv-setup and set "VBI format:" to
> > > "None", saved the restarted. I set a record rule with the
> > > preferred input for my ivtv card which is last because it is
> > > so lame compared to well tuned bttv recording.
> > >
> > > "Top" shows that the ivtv-enc-vbi thread is running (and there
> > > are still broken frame but I don't yet know if they are related).
> > > Pressing "T" reports "No captions". I stopped, reset to NTSC
> > > Closed Caption and restarted the MBE. Now "T" shows the captions
> > > from the recording made while it was set to "None".
> >
> > I had the same result - the ivtv-enc-vbi thread is still running 
during
> > recording after a restart of the backend having set VBI format to 
None. I
> > haven't tried unloading the ivtv driver and starting it fresh 
though...
> 
> It may be cached in the driver (we don't explicitly _disable_ vbi 
> encapsulation if it's set to None), or they just run that thread all 
the 
> time.

It's cached by the driver (it's a persistent setting), so it needs to be 
explicitly turned off.

Note regarding ivtv VBI support: it is flaky in all current ivtv 
versions. Basically when VBI capturing is on it is possible for MPEG or 
VBI data to turn up in the wrong stream. This is a firmware bug for 
which only the current ivtv subversion trunk code contains a 
workaround. This code will become available Real Soon Now for kernels 
2.6.18 and up. It is extremely unlikely that it will ever be backported 
to older kernels since it required a huge interrupt/DMA rewrite in 
ivtv.

Due to these problems I would recommend that for ivtv VBI is turned off 
by default in MythTV if possible.

Another cause of problems in MythTV is the default resolution of 480x480 
instead of 720x480/576. The MPEG encoder introduces a small amount of 
ghosting when it has to scale. I also do not understand why MythTV 
would want to scale when capturing MPEG, it can only degrade picture 
quality since MPEG encoders are generally optimized for full resolution 
captures. Scaling will also break VBI capturing on a PVR150/500 for 
which no easy solution exists. It would be nice if MythTV would default 
to full resolution if possible.

It would also be very nice if the ivtv header included in MythTV would 
replace the very old incorrect ioctls with the correct ones:

#ifdef __FreeBSD__
#define IVTV_IOC_G_CODEC        _IOR  ('V', 73, struct ivtv_ioctl_codec)
#define IVTV_IOC_S_CODEC        _IOWR ('V', 74, struct ivtv_ioctl_codec)
#else
#define IVTV_IOC_G_CODEC        0xFFEE7703
#define IVTV_IOC_S_CODEC        0xFFEE7704
#endif

The bit under __FreeBSD__ should be the default as well for linux. In 
fact, all IVTV ioctls that are just a hex number should be replaced 
with the correct _IO defines. Only drivers < 0.2.0 still need these and 
those drivers are ANCIENT. The problem is that with newer drivers I 
still need to check for these old ioctls to prevent them from being 
(mis)handled by the v4l2 subsystem. These checks WILL disappear once 
ivtv enters the kernel. So I would appreciate it very much if this 
header could be updated.

Thanks!

Regards,

	Hans


More information about the mythtv-dev mailing list