[Libva] vaPutSurface threading issue

Gwenole Beauchesne gbeauchesne at splitted-desktop.com
Tue Feb 23 08:19:45 PST 2010


Hi,

On Tue, 23 Feb 2010, Adam Strzelecki wrote:

> I tried myself to use XInitThreads to avoid crashes. And indeed it helps 
> with IEGD, but it really produces crappy performance, like 1.5FPS 
> instead smooth video on old non-locked PSB drivers from 2008.

Just to clarify: IEGD and PSB are not the same drivers. Those are two 
seperate repositories that evolve separately. i.e. IEGD is not derived 
from PSB and internally, they work differently for some things. Besides, 
PSB is not dead either. ;-)

> Moreover since VA API some functions are synchronous (Render functions) 
> the only way to play multiple streams (and fully use the hwcodec 
> potential) is to use multithreading,

I am pretty sure the render functions are asynchronous. I mean, they won't 
block you, the buffers are copied to the server. However, I am not sure if 
vaPutSurface() internally sync or if the surface is queued somehow in PSB.

> Aside of that I think VA API is not strictly related to X11 lib, and it 
> should be driver responsibility to provide valid locking around internal 
> X11 communication and thread-safe functions. XInitThreads is suppose to 
> protect X11 API calls from the user application, but VA API calls should 
> IMHO work fine regardless if I use XInitThreads or not.

You are right, the VA driver should handle locks itself.

Regards,
Gwenole.


More information about the Libva mailing list