[mythtv] thoughts: using XvMC as a generic mpeg2 decoder?
danielk at cuymedia.net
Tue Apr 24 13:46:06 UTC 2007
On Tue, 2007-04-24 at 00:23 -0700, Ben Osheroff wrote:
> I've been itching to write some filter plugins for myth, things like
> trying to get a good auto-crop filter going, and maybe trying my hand at
> a "smart bob" deinterlacer, stuff like that. However, I watch a good
> deal of HD content, and in general really need to use XvMC on my
> relatively low-powered little box, so the filters I've been thinking of
> writing would be fairly useless.
> I've been thinking of writing a little test program that tries to dive
> down into the private_data XvMC pointer and pull out the decoded MPEG-2
> content before the nvidia driver pushes it to the screen. If it worked,
> it'd be effectively offloading content decoding to the card, and you'd
> be able to apply filters and all that good stuff before actually drawing
> to the screen using XV.
> I have no idea if this will work. I suspect not, and if anyone has
> already tried this and failed, please let me know before I embark on a
> fool's errand.
When you enable the xvmc opengl output method it copies data
from the xvmc surface to an OpenGL texture, which you can then
process using OpenGL fragment programs to do filtering. Trying
to copy the data from video card memory to system memory won't
work, the AGP/PCI bus is too slow and memory protections will
get in the way of any user space program doing this as well.
More information about the mythtv-dev