[mythtv] [exp. patch] xv xvmc merge
Daniel Kristjansson
danielk at cat.nyu.edu
Thu Mar 31 00:51:16 UTC 2005
Ok, this is a big patch.
It merges the XVideo and XvMC video output implementations.
This allows is fallback from XvMC to XVideo to X w/shared memory,
down to X without shared memory. I've added a "NO_XVMC" environment
variable to go with the "NO_XV" and "NO_SHM" environment variables,
so you can disable XvMC from the command line.
Of course, this also reduces redundancy since XvMC is just a special
case of XVideo.
There are a couple bug fixes:
1/ If we run out of frames when blending the OSD in XvMC's
ProcessFrame call we no longer deadlock, but instead
simply don't render the OSD. (and print an error message.)
2/ If you change the letterbox mode to one that clips
the frame at the top, it no longer results in extra
vigorous bobbing.
3/ If you don't have "GuiSizeForTV" set and resolution
switching is enabled, the wrong size buffers were
allocated. This has been fixed.
Some features:
A/ More fine grained locking. We now have a per-frame lock
which allows ffmpeg to call DrawSlice to send packets
to the video card, while an unrelated frame is being
shown on the screen. (This also allows removal of
"XXX Ugly hack" in the XvMC Show method).
B/ Fall back mentioned before. i.e. if you have XvMC
enabled, but no available adapter capable of it,
then MythTV will try to fall back to a less efficient
method instead of bailing.
Some possible/probable new bugs:
a/ I've not yet added locking to the Init and tear-down rutines.
This may cause problems due to InputChanged() method.
b/ Some sections aren't finished and some changes tested and
those are marked with "// TODO"
c/ I may have missed a needed lock somewhere, or added a lock in
the wrong order. (See top of videoout_xv.h for proper lock order.)
d/ In avformatdecoder, I could not reset the stream completely I
started it with a CODEC_ID_MPEG2VIDEO codec. So instead I
start it with CODEC_ID_MPEG2VIDEO_XVMC[_VLD] and reset to
the normal CODEC_ID_MPEG2VIDEO later if XVMC mode is not
requested. This results in some "bad stream" messages, but
is otherwise harmless.
e/ something else...
Some unfixed bugs
i/ Sometimes on "studder" when OSD is on screen.
Please test, especially on Epia and eith HDTV content, or if you are
currently experiencing lockups with the XvMC code in CVS.
This is a first draft, so there are probably unneeded changes, ugly
bits, etc.
-- Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xv-xvmc-merge-v1.patch.bz2
Type: application/x-bzip
Size: 25570 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050330/127c4ee1/xv-xvmc-merge-v1.patch.bin
More information about the mythtv-dev
mailing list