diff options
author | jbeich <jbeich@FreeBSD.org> | 2016-09-23 21:14:10 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2016-09-23 21:14:10 +0800 |
commit | 4c812de681123e3b1a80e47a7284788175a58f57 (patch) | |
tree | af62327f760dc3cd377e778434cfbac418260fe6 /multimedia/x264 | |
parent | 264008488afeaaff29482120f380f475b987c0c8 (diff) | |
download | freebsd-ports-gnome-4c812de681123e3b1a80e47a7284788175a58f57.tar.gz freebsd-ports-gnome-4c812de681123e3b1a80e47a7284788175a58f57.tar.zst freebsd-ports-gnome-4c812de681123e3b1a80e47a7284788175a58f57.zip |
multimedia/x264: add OPENCL option, enabled by default
Before OpenCL can be used for lookahead install at least one
implementation: devel/freeocl, devel/pocl, lang/beignet or lang/clover.
$ x264 --fullhelp | fgrep opencl
--opencl Enable use of OpenCL
--opencl-clbin <string> Specify path of compiled OpenCL kernel cache
--opencl-device <integer> Specify OpenCL device ordinal
where the options also work in other apps e.g.,
$ ffmpeg -i <input-file> -codec:v libx264 -x264opts opencl:opencl-device=1 <output-file>
$ mpv --ovc libx264 --ovcopts-add x264opts=opencl:opencl-device=1 -o <output-file> <input-file>
Differential Revision: https://reviews.freebsd.org/D7958
Approved by: koobs (maintainer)
Diffstat (limited to 'multimedia/x264')
-rw-r--r-- | multimedia/x264/Makefile | 3 | ||||
-rw-r--r-- | multimedia/x264/files/patch-configure | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/multimedia/x264/Makefile b/multimedia/x264/Makefile index 2a6024456d55..2e8406704925 100644 --- a/multimedia/x264/Makefile +++ b/multimedia/x264/Makefile @@ -103,8 +103,7 @@ SWSCALE_LIB_DEPENDS= libavutil.so:multimedia/ffmpeg \ CONFIGURE_ARGS?= --system-libx264 CONFIGURE_ARGS+= --prefix="${PREFIX}" \ --extra-cflags="${CPPFLAGS} ${CFLAGS}" \ - --extra-ldflags="${LDFLAGS}" \ - --disable-opencl \ + --extra-ldflags="${LDFLAGS}" CFLAGS_armv6+= -mcpu=arm1136jf-s diff --git a/multimedia/x264/files/patch-configure b/multimedia/x264/files/patch-configure index 100545e7c280..02d7738a9a5a 100644 --- a/multimedia/x264/files/patch-configure +++ b/multimedia/x264/files/patch-configure @@ -51,3 +51,13 @@ if [ $compiler = ICC -o $compiler = ICL ] ; then if cc_check 'extras/intel_dispatcher.h' '' 'x264_intel_dispatcher_override();' ; then define HAVE_INTEL_DISPATCHER +@@ -1128,6 +1118,9 @@ if [ "$opencl" = "yes" ]; then + opencl="yes" + define HAVE_OPENCL + libdl="-ldl" ++ else ++ opencl="yes" ++ define HAVE_OPENCL + fi + LDFLAGS="$LDFLAGS $libdl" + fi |