[Beignet] Use OpenCL to do video post processing for libva.
ykzhao
yakui.zhao at intel.com
Thu Oct 31 07:43:36 CET 2013
On Wed, 2013-10-30 at 02:02 -0600, Zou, Nanhai wrote:
> 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.
It is noted that the cl_branch should be used for libva/intel-driver.
The intel-driver also includes the README that describes how to use the
OpenCL for the video post-processing.
>
>
>
> 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
>
>
>
>
More information about the Beignet
mailing list