[mythtv-users] XvMC Question

Robert Johnston anaerin at gmail.com
Tue Aug 2 15:59:25 UTC 2005


Oops, let's try again.

On 02/08/05, John Freer <john_freer at yahoo.com> wrote:
> Gents,
> 
> Sorry to but into the conversation, but I have a question that I
> wasn't able to easily answer with a search.
> 
> Is there a difinitive cause for the flickering / stuttering when
> using XvMC and any OSD piece is on-screen?
> 
> I do understand the B/W issue, but not the flickering one.
> 
> Thanks for your time.

In essence, what happens with showing the OSD on XvMC (As I understand it) is:

* The portion of the MPEG where the OSD is to be shown is decoded in software
* The OSD image is Alpha-mixed into the decoded frame (In Black/White,
as it's faster to apply a uniform AND across all the channels, rather
than doing a YUV->RGB->YUV conversion)
* The OSD-Mixed portion is then re-encoded, and mixed back into the
original MPEG Stream.
* The "Complete" frame is sent to XvMC to be decoded in Hardware.

As you can imagine, this is a lot more CPU and Frame-intensive than
simply decoding direct, and occasionally the CPU fails to do all these
tasks before the frame needs to be rendered, which causes a stutter.

The XvMC Decoder DOES use as many hardware buffers as it can allocate
for each frame, to pre-render and minimise stuttering, but even that
is only so effective.

There IS an alternative in the works (Called a "ChromaKey OSD") which
simply writes directly to the screen in the same manner that Subtitles
are written, though this will mean no Alpha-Mixing (Or at least, not
as much Alpha-Mixing).

However, this is only my understanding of what goes on, and may be
totally wrong.

Just as another thought, is it not possible to use XvMC with OpenGL.
If so, could the "Movie" be put on an OGL Texture (A simple flat
surface), and the OSD added using a second object over the top (Using
a 32-bit RGBA texture for Alpha-Mixing), or Multitexturing...

Just an idea.
-- 
Robert "Anaerin" Johnston


More information about the mythtv-users mailing list