Re: Interlace Noise (field swapping?) on Pinnacle PCTV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Wan Tat Chee (tcwan@xxxxxxxxx):

> > If you want it to look as good as a television (framerate wise), you
> > can try out my (unfinished) deinterlacer:
> >
> > http://www.dumbterm.net/graphics/tvtime/
> 
> I tried it on my system (Celeron 466, RH 7.1, kernel
> 2.4.17-0.12custom, XFree 4.1), and it taxes the system pretty heavily.
> The frame rate is probably about 10 fps, though the picture quality is
> much better than fbtv at full screen (800x600 @ 75 Hz), which has a
> lot of interlace noise (mismatch between odd and even fields).

  75hz will judder like mad since the input framerate of either 50fps or
59.94fps is too close.  You want to run at either exactly 50/59.94hz
(usually infeasble due to error) or you should run at like 85hz for PAL
or 100hz+ for NTSC.  I'm currently working on getting 59.94hz
refresh/framerate to work without much error but otherwise I watch TV at
800x600x135hz.

> [The same setup in Win98 + DirectX 8.0 using the supplied LifeView TV
> app doesn't have any interlace noise, but exhibits slight frame
> dropping (jerky motion), but much better than what is seen under
> Linux]

  Some of the jerking might be because of tearing, if the app/driver is
doing the interpolation but not synced to the retrace, or because of the
refresh rates not being compatible.

> I'm wondering if there's a simpler way to achieve the objective of
> deinterlacing? (I'm still rather new to TV signal decoding).
> 
> 1. Should it be done in the v4l2 driver (saa7134 in this case) or in
>    the application (fbtv, etc.)?
> 
> 2. Seems like the problem is not so obvious with a small window, I'm
>    wondering if it's an issue with AGP memory bandwidth. In that case
>    should offscreen double buffering help to solve the interlace problem?
>    (copy odd & even field to offscreen buffer1, zap buffer1 it to the
>     screen, while buffer2 is being updated with the next odd&even
>     fields...).
> 
> 3. Otherwise, can a simple anti-aliasing algorithm work?

  The problem is not obvious in a small window because you're only
seeing one of the two fields.  This is the easiest way of deinterlacing,
half the framerate, half the framesize, but no worries.  xawtv was doing
this for a while with Xv mode, but the quality is quite poor compared to
a TV.  This is probably the best choice if you want something watchable
with no CPU time lost.

  You could use the hardware video overlay surface to do a more correct
interpolation taking into account the field parity, and that would save
time.  We had some discussion on the Xpert list on how to update the
XVideo API to handle this better, and the i810 driver should support our
suggestion soon at least. :)  I keep meaning to hack it into the mga
driver. :)   Once that is done then this will speed up the full
framerate/resolution case.

  Anti-aliasing isn't really what you want here: you want to interpolate
the missing scanlines from each field.  Some people like to half the
framerate and use a good interpolation algorithm that can take advantage
of the data from fields of opposite parity as well to give a better
image, since this is pretty cheap.  Doing an expensive calculation at
half the framerate can give realtime performance.

  Try running tvtime in '4:2:0' mode (it's documented), and see if that
gives better framerates (it should but with a visible loss of colour
quality).  Still, 10fps is nowhere near 50fps or 59.94fps.  Make sure
you have XVideo support enabled. :)

-- 
Billy Biggs
vektor@xxxxxxxxxxxx





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux