[Libva] How to detect the type of memory returned...

Jean-Yves Avenard jyavenard at gmail.com
Sun Jun 22 02:06:39 PDT 2014


Hi

On 18 June 2014 13:22, Xiang, Haihao <haihao.xiang at intel.com> wrote:
>
> Yes, The buffer for vaGetImage() will be mapped to
> USWC memory too after applying the patch.
>

Ok.. here are my results.

I've timed the following procedure:

vaSyncSurface();
vaGetImage();
vaMapBuffer();
copy(dst, src);
vaUnMapBuffer();
vaDestroyImage()

This is run within MythTV, so in actual use, with an actual video.
This is how long it takes for doing so on 1000 frames, in nanoseconds:

h264 592x336 video.
original: 854922255ns (0.85ms/frame)
patched: 4389699017ns (4.38ms/frame)
5.13x slower

mpeg2 1440x1080
original: 3936736940ns (3.93ms/frame)
patched: 13202583358ns (13.20ms/frame)
3.35x slower

Without the patch, the copy routine detects that using memcpy is
faster than using SSE4 code and as such copy uses memcpy.
With the patch, copy uses SSE4 code as it's faster than memcpy. So
this indeed confirms it's USWC memory

So in all... big regression speed-wise

JY


More information about the Libva mailing list