[pvrusb2] hi! && cx25840-scaling

Hans Verkuil hverkuil at xs4all.nl
Sun Nov 19 16:06:29 CST 2006


On Sunday 19 November 2006 22:21, Mike Isely wrote:
> On Sat, 18 Nov 2006, usleepless at gmail.com wrote:
> > Hi List,
> >
> > i am adapting the freebsd-hauppauge-pvr250 driver to support
> > pvr150/500s. i have been experiencing the same scaling problems
> > with the cx25840 as pvrusb2 ( no horizontal scaling ).
> >
> > i dived into it, and found 2 things needed to enable horizontal
> > scaling: - setup the HSCALE and VSCALE registers ( obvious! )
> >  - call: ( this is ivtv-0.4.6 sourcecode ) when configuring the
> > device struct v4l2_format vbi_in;

Always zero this struct first!

> >                 vbi_in.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
> >                 cx25840_command(sc->iicbus, VIDIOC_S_FMT, &vbi_in);
> >
> > check cx25840-vbi.c from ivtv/linux to see what this does. (
> > ivtv-0.4.6 still includes cx25840-vbi.c )
>
> Oh this is terrific.  I had suspected all along that there was
> something about how I was setting up the cx25840 chip level driver
> within pvrusb2.  I will implement this and test.  Thanks!
>
> One wonder why I would have to do something with VBI setup in order
> to get video scaling to work, but hey whatever...

Yikes. This means that some of the raw VBI setup is also needed for the 
normal setup. Ivtv always sets the VBI formatting so it always worked 
for me :-)

The cx25840 scaling code is clearly not perfect. In fact, I also noticed 
this weekend that scaling + sliced VBI capturing causes bad video and 
bad VBI. That's one combination you have to avoid.

And to confuse everyone a chunk of code to do with general video setup 
ended up in cx25840-vbi.c. It has nothing to do with VBI, but it 
somehow managed to get in there.

Regards,

	Hans


More information about the pvrusb2 mailing list