interlaced video question for you XV experts
Benjamin Herrenschmidt
benh at kernel.crashing.org
Thu Mar 17 16:40:53 PST 2005
On Thu, 2005-03-17 at 15:46 -0600, Billy Biggs wrote:
> Jon Smirl (jonsmirl at gmail.com):
>
> > A standard TV signal requires interlaced video. How does XV maintain
> > sync when playing a video file? For example say I am playing an
> > interlaced file to TV out. How is the framebuffer set up, is there one
> > full screen progressive buffer that is updated at 30Hz and then
> > scanned out interlaced at 60Hz, or is it a half size buffer that is
> > updated at 60Hz? If there is an half sized buffer what happens when
> > playing interlaced video to a non-interlaced display?
>
> My understanding (as an application author) is that XVIDEO has no
> native support for interlaced video. When writing to a TV output, you
> have no idea. Rumor had it that the NVIDIA driver was always
> top-field-first when you gave it interlaced frames to play on its TV,
> and you had to write at 30 Hz to keep up. Reports of weirdness, loss of
> quality, or stutter have been heard.
>
> There was some talk a while back for having like an XV attribute to
> indicate whether the image you just uploaded was a top or bottom field,
> but there was never any support added for something like this in the
> drivers AFAICT.
Doing that properly usually requires to have at least the 2 next fields
in advance in memory and the driver trigger the switch on the vblank irq
to get perfectly sync'd, with the ability for the driver to "drop" a
frame if it notices that it missed a field in order to never cause a
field inversion. So the driver must know which field is contained in
which buffer and which field will be displayed at next interrupt.
Which field comes first in a frame is different between PAL and NTSC if
my memory is correct.
Damn, I've done a bunch of real time interlaced video stuff in the past,
I'm not sure I really want to unbury those memories though :)
Ben.
More information about the xorg
mailing list