2010-10-18, 10:28
I'm having some issues while using VA-API with ATI igp (hd3200) which produce jumpy playback. I'm referring to this forum thread where user hal2100 is seeing the same problem.
I've managed to resolve the problem to VAAPI.cpp file and specific to the EnsureContext function. That function checkes the video streams reference frame count and based on that calculation a suitable surfaces count is reserved. The problem is, when reference frame count is for example 3 and the function reserves frame count + 2 surfaces, it doesn't work anymore and the result is video which jumps randomly back and forth between new and old frames. A quick fix was to reserve reference frame count * 2 surfaces. I'm not sure if that is the correct or optimized way to solve it, but the mplayer way to implement this is to always create 21 surfaces for h.264 videos, so I'm guessing it should be ok.
I've managed to resolve the problem to VAAPI.cpp file and specific to the EnsureContext function. That function checkes the video streams reference frame count and based on that calculation a suitable surfaces count is reserved. The problem is, when reference frame count is for example 3 and the function reserves frame count + 2 surfaces, it doesn't work anymore and the result is video which jumps randomly back and forth between new and old frames. A quick fix was to reserve reference frame count * 2 surfaces. I'm not sure if that is the correct or optimized way to solve it, but the mplayer way to implement this is to always create 21 surfaces for h.264 videos, so I'm guessing it should be ok.