On Fri, Feb 6, 2015 at 11:09 AM, Gupta, Maneesh <maneesh.gu...@amd.com> wrote: > Hi All, > > There are several issues with the way ffmpeg compilation works when OpenCL is > enabled using --enable-opencl. Chief among them are: > 1. One needs to also use --extra-cflags, --extra-ldflags & -extra-libs to > specify the path to the OpenCL header and library files. Otherwise configure > fails. > 2. ffmpeg currently requires OpenCL 1.2, but the build system may have > another version installed (such as the newer OpenCL 2.0 which has deprecated > some 1.2 APIs). > > There are a couple of ways to address this. > > * One way is the x264 approach which is to bundle cl.h, cl_platform.h and a > wrapper c file which relies on dynamically loading OpenCL rather than using > static linking. This requires modifications to the entire OpenCL based code > since we cannot use the OpenCL APIs directly. > * Another approach taken by LibreOffice and Blender for example is to use > clew (i.e. The OpenCL Extension Wrangler Library). This has the advantage of > letting us use the OpenCL APIs directly yet at the same time relying on > dynamically loading OpenCL. The clew project is hosted at > https://github.com/OpenCLWrangler/clew. This is maintained by two people > (Sergey and Martijn). > Usage of clew in Libreoffice can be seen @ > http://cgit.freedesktop.org/libreoffice/core/tree/clew/source and in Blender > @ > https://git.blender.org/gitweb/gitweb.cgi/blender.git/tree/HEAD:/extern/clew. > > This patch is for adding clew to the ffmpeg tree. The subsequent patches > switch the OpenCL code in ffmpeg from using cl.h to using clew. >
Using such a library is fine, if its deemed the best solution available, but flat-out importing its code into avutil is not. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel