[Beignet] Use OpenCL to do video post processing for libva.

Lan, Hai hai.lan at intel.com
Mon Nov 4 16:20:23 PST 2013


Is it possible to support Bay Trail since its graphics is similar with HD4000? Thanks.

Hai

From: libva-bounces at lists.freedesktop.org [mailto:libva-bounces at lists.freedesktop.org] On Behalf Of Zou, Nanhai
Sent: Wednesday, October 30, 2013 4:03 PM
To: libva at lists.freedesktop.org; beignet at lists.freedesktop.org
Cc: Lu, Guanqun
Subject: [Libva] Use OpenCL to do video post processing for libva.

In the previous versions of libva intel-driver, video post processing features are mostly developed by GEN assembly.
Those assembly are extremely hard to write/debug and understand, could not be reused across different GEN platform.
This limited developers to develop their video processing algorithm over libva.

Now we have setup an experimental branch in libva to use OpenCL as the video post processing language.
This branch can share video buffer with beignet driver as bo, then call OpenCL to process the video buffer as an image object.
So that people develop high performance VPP with high level language on GPU with zero copy. (in current stage, beignet only support HD4000).

For those who are interested in develop their own VPP algorithm, you may try it and give feedback to us.
We have put 4 example post processing kernels in that branch.


1.      Make and Install Beignet from git://anongit.freedesktop.org/beignet with opencl-1.2 branch.

2.      Install ocl-icd driver
3  Make and Install libva driver and libva intel-driver from
         git://people.freedesktop.org/~yakuiz/libva
git://people.freedesktop.org/~yakuiz/intel-driver

Please add  --enable-opencl when configuring libva intel-driver.



export INTEL_OCL="gray" to specify which opencl kernel to use.

We have put 4 sample opencl kernels in the branch, "gray", "blur", "mirror" and "pixelated".



Use a vaapi enabled mplayer to playback a video.

mplayer -vo vaapi:scaling=fast -va vaapi  <your-mp4-video-file>

Then you will see the post processing effect.

TODOs.
Extend the API to a more flexible version, so that OpenCL can handle more than 1 reference buffer or used in other video processing function.
E.g. video-encoding processing and camera pipeline.

Expose more ways to access video buffer, to access video buffer as raw data or with other pixel format.
Expose the hardware media sampler function to OCL as built-in.

Thanks
Zou Nanhai

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/beignet/attachments/20131105/0bbe7f3d/attachment.html>


More information about the Beignet mailing list