summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Add example of using cl_khr_gl_sharing to do gl buffer sharing.Chuanbo Weng2017-02-102-30/+165
| | | | | Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
* Add example to show v4l2 buffer sharing with extension clGetMemObjectFdIntel.Chuanbo Weng2015-06-192-10/+609
| | | | | | | | | | | | | | | | | This example captures yuy2 frame directly to cl buffer object by the way of dma, processed by OpenCL kernel, then convert to nv12 format and shown by libva. v2: Close cl buffer's fd by clCloseMemObjectFdIntel instead of close function. v3: Just use close function, no need of clCloseMemObjectFdIntel. v4: Some modifcation of examples/CMakeLists.txt after code rebase. Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com> Reviewed-by: Yuan, Feng <feng.yuan@intel.com>
* Fix error in CMakeLists.txt of examples.Chuanbo Weng2015-06-191-3/+3
| | | | | | | | | We check the content of thirdparty/libva by ls command to determine to clone submodule or not, so use OUTPUT_VARIABLE instead of RESULT_VARIABLE. Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
* build: use EXECUTE_PROCESS to replace the deprecated EXEC_PROGRAM.Zhigang Gong2015-05-261-6/+6
| | | | | | | | | | | | | | | I found EXEC_PROMGRAM may truncate the output variable for some case thus we may get incorrect generated unit test cases thus break the configuration some times. This patch use EXECUTE_PROCESS to replace all the deprecated EXEC_PROGRAM and it will not truncate the output variable of the command. v2: fix the error in examples/CMakeLists.txt. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Tested-by: "Meng, Mengmeng" <mengmeng.meng@intel.com>
* Add example to show libva buffer sharing with extension ↵Chuanbo Weng2015-02-063-0/+501
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clCreateImageFromLibvaIntel. This example reads a source nv12 file to a VASurface, and creates a target VASurface. Then creates corresponding cl image objects from them. After using ocl to do mirror effect post-processing on source VASurface, target VASurface is shown on screen by default. Code of loading nv12 file to VASurface are referenced from libva/test/encode/avcenc.c. v2: Delete 1920x1080.nv12 and 640x480.nv12 because of large size, add 256_128.nv12 as default test image. v3: 1. Re-org files: add libva as a submodule then use display related files. 2. Show result on screen by default instead of saving as a file. 3. Fix warnings. v4: Fix whitespace format warnings. v5: 1. Modify upload_nv12_to_surface to read a nv12 file and then upload it to an NV12 VASurface. Also modify store_surface_to_nv12. 2. Change the cl post-processing kernel from gray effect to mirror effect, which make demo cooler. 3. Minor fix of other problems. v6: Remove unnecessary OUTPUT_NV12_DEFAULT related code. Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: "Guo, Yejun" <yejun.guo@intel.com>
* Add submodule libva for examples.Zhigang Gong2015-02-061-0/+0
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>