[Libva] Concurrent decoding/rendering in the same va context?

Pawel Osciak posciak at google.com
Tue Oct 2 07:56:50 PDT 2012


Hi,
I'm experimenting with decode parallelization on one VA context. What I'm
trying to do is overlapping below sequences on two threads:

Thread 1:
Decode()
{
    vaBeginPicture()
    vaRenderPicture() a few times
    vaEndPicture()
    NotifyThread2ToRun();
}

Thread 2 (gets fired after Decode() finishes on thread 1):
Render()
{
    vaSyncSurface()
    vaPutSurface() // (to an XPixmap)
}

The overlap happens in a way that it is possible for Decode() for frame n
on thread 1 to begin while Render() is still running for frame n-1. Thus,
it's possible for a surface that is being vaPutSurface() from to be used as
reference in Decode() on the other thread, but it's not possible for two
Decode() calls or two Render() calls to run concurrently.

Should this work? Has anyone got a similar setup to run successfully?

Thanks,
Pawel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libva/attachments/20121002/5406318b/attachment.html>


More information about the Libva mailing list