Commit Graph

34 Commits

Author SHA1 Message Date
dsmudhar 6b852a3fd9 libavutil/opencl: fixed uninitialized var warning
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-23 11:28:03 +02:00
Clément Bœsch dd1d9b80c9 lavu/opencl: restore #if HAVE_THREADS
Fix regression since a8bb81a.

Spotted-by: RiCON
2015-12-07 20:28:30 +01:00
Clément Bœsch a8bb81a05c lavc, lavu: use avutil/thread.h instead of redundant conditional includes 2015-12-07 17:25:51 +01:00
Timothy Gu 17c68933f4 opencl: Use "opencl" as log context name
All other classes use lowercase names.
2015-10-17 01:16:50 -07:00
Timothy Gu 893a648182 opencl: Print compilation log
Useful when debugging.
2015-10-17 01:16:50 -07:00
Timothy Gu d2a1029724 opencl: Print error string when compilation fails 2015-10-17 01:16:50 -07:00
Timo Rothenpieler 31ee86cd98 avutil/opencl: Fix volatile pointer
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-09-26 20:28:29 +02:00
Maneesh Gupta 91305c6026 OpenCL: Fix ABI incompatibility issues
AVOpenCLDeviceNode and AVOpenCLPlatformNode used fixed static buffer for holding the device and platform name.
This patch modifies these structures to use pointers instead. The memory required to hold the names is
now dynamically allocated, the size for which is determined by querying appropriate OpenCL runtime APIs.

Signed-off-by: Maneesh Gupta <maneesh.gupta@amd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-28 12:28:53 +02:00
srikanth 730f3c49e0 OpenCL uninit bug fix - clear is_compiled flag
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-16 22:52:19 +01:00
Michael Niedermayer ebd59d271c Revert "avutil/opencl: is_compiled flag not being cleared in av_opencl_uninit"
Fixed build with opencl enabled
Found-by:  WJ Liu

This reverts commit 0f2359b869.
2015-03-07 09:59:27 +01:00
Srikanth G 0f2359b869 avutil/opencl: is_compiled flag not being cleared in av_opencl_uninit
When OpenCL kernels are compiled, is_compiled flag is being set for each
kernel. But, in opencl uninit, this flag is not being cleared.
This causes an error when an OpenCL kernel is tried on different OpenCL
devices on same platform.

Here is the patch with a fix

Reviewed-by; Wei Gao <highgod0401@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 15:20:12 +01:00
James Almer 95a064f530 avutil: remove obsolete FF_API_OLD_OPENCL cruft
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-09-15 15:50:17 -03:00
Michael Niedermayer bb29896793 avutil/opencl: use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-25 16:06:10 +02:00
Matt Oliver c6bf660bef opencl: Make init_mtx static with volatile lock
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-10 15:07:33 +02:00
Matt Oliver 5b9bb4d9ec opencl: add support for non-pthread locking
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-01 19:28:31 +02:00
Y.C. Liu cebe06a0bf avutil/opencl: fix a segmentfault in libavutil/opencl.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-25 05:29:21 +02:00
Lenny Wang 64f73acd1d cmdutils & opencl: add -opencl_bench option to test and show available OpenCL devices
Reviewed-by: Wei Gao <highgod0401@gmail.com>
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 21:21:36 +01:00
Lenny Wang 7b2534b0ea libavutil & opencl: remove opencl default device type
CL_DEVICE_TYPE_DEFAULT makes duplicated device entries for each
platform using av_opencl_get_device_list()

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Reviewed-by: highgod0401 <highgod0401@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-02 12:07:27 +01:00
Lenny Wang 6682554790 avutil/opencl: compile kernels separately
Reviewed-by: Wei Gao <highgod0401@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-05 14:29:55 +01:00
Lenny Wang 29664fab0c OpenCL: convert meaningless "device id" output to "device name"
Approved-by: Wei Gao <highgod0401@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 21:21:11 +02:00
Clément Bœsch cf6ed1f129 lavu/opencl: remove semi-colon from macro.
Fixes compilation when the macros are empty and the label above ends up
containing no statement. Also makes usage of these macro consistent
(some already have a semi colon, some others don't).

Fixes Ticket #2603
2013-05-24 12:01:02 +02:00
highgod0401 548101b553 lavu/opencl: add opencl public error API
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 13:44:29 +02:00
highgod0401 6354a6ce52 lavu/opencl: fix bug of opencl options
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-02 14:42:02 +02:00
highgod0401 6d7ec4fc2e lavu/opencl:optimize compile kernel operation
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 15:07:54 +02:00
highgod0401 8f99494c1c avutil/opencl: merge opencl env to opencl context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 23:54:40 +02:00
highgod0401 9d442b9cc0 opencl: add spec opencl device APIs 20130411
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-11 12:46:34 +02:00
highgod0401 db2de94e95 avutil/opencl: add opencl device list APIs 20130411
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-11 03:48:57 +02:00
highgod0401 99186f1fd2 fix bug of finding CPU device
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-05 20:47:21 +02:00
highgod0401 cfaffb1ab7 avutil/opencl: replace assert by check and error message in av_opencl_init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 19:27:45 +02:00
highgod0401 322428c851 avutil/opencl: check strtol for failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 19:26:16 +02:00
highgod0401 39406ea321 avutil/opencl: add check for the program number to create kernel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-04 19:25:22 +02:00
Stefano Sabatini 57d77b3963 lavu/opencl: apply misc cosmetics fixes
Split long lines, reindent code, add missing spaces between operators,
remove possibly confusing comment from av_opencl_buffer_read_image()
doxy, and use designated initializers for openclutils_class.
2013-04-01 23:54:21 +02:00
Michael Niedermayer 76071322a3 opencl: fix double ;
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-01 13:01:17 +02:00
highgod0401 189cbc1a03 opencl wrapper based on comments on 20130401
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-01 12:52:13 +02:00