The Chromakeyed OSD

This changes the Xv and XvMC display methods from using a blended YUV overlay to using the chromakey window behind the video. This removes the OSD processing from the timing-critical code where you're trying to stay on a strict schedule for frame rendering, and I have found it tremendously helped eliminate delays in frame rendering which I believe cause the "prebuffering pause" problem when the OSD is displaying.

It also prevents us from having to render and alpha-blend the OSD for every single frame. Because the chromakey window is persistant, the OSD rendering only needs to do hard work when the OSD changes. This also means that, if the video is not filling the screen (i.e. letterbox-ing or pillar-ing), we can (and do) still use the full screen for the OSD.

Lastly, you get full color for the OSD of course. :-)

The results are surprisingly good. I initially did some experimentation with putting text and images on the chromakey background window, and was sufficiently encouraged by the results to go ahead and do this full-fledged proof of concept implementation.

Drawbacks

Like I said, it's a proof of concept - not a glossy finished product. This is intended to stimulate discussion, and to find out if others benefit as much as I have from moving the OSD processing out of the frame rendering loop.

There is the patch itself (last updated 4/20/05) and an example OSD theme (last updated 3/23/05) that, despite my complete lack of artistic skilz, attempts to show what the chromakey OSD can do. Let's just call it (ahem) minimally artistic. :-)

I have been using both patches for several weeks now on my nforce2 system with built-in graphics (which has to be some sort of worst case since it's using main memory), and have found that I can now view 1080i content with near perfect results. I still encounter the "jumpies" and "old-framies" with 720p content, but I think that's a different problem.

Notes: