Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520736 - media-video/ffmpeg-2* - add opencl support
Summary: media-video/ffmpeg-2* - add opencl support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-24 05:10 UTC by om3i
Modified: 2018-03-28 08:12 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ffmpeg config.log (config.log,236.40 KB, text/plain)
2014-08-29 23:00 UTC, om3i
Details

Note You need to log in before you can comment on or make changes to this bug.
Description om3i 2014-08-24 05:10:47 UTC
http://ffmpeg.org/archive.html

>July 10, 2013, FFmpeg 2.0
>We have made a new major release (2.0) It contains all features and bugfixes
>of the git master branch from 10th July. A partial list of new stuff is below:
>...
>- OpenCL support

Reproducible: Always
Comment 1 Alexis Ballier gentoo-dev 2014-08-29 19:18:35 UTC
did you manage to get it working ? with nvidia opencl drivers, I get this error at configure:

 ERROR: opencl must be installed and version must be 1.2 or compatible
Comment 2 om3i 2014-08-29 22:58:57 UTC
Yep, headers in /usr/include/CL point to /usr/lib64/OpenCL/global/include/CL-1.1/*, whilst app-admin/eselect-opencl have CL-1.2 includes, i just did:

rm /usr/include/CL/*
for i in /usr/lib64/OpenCL/global/include/CL-1.2/*;do ln -s $i /usr/include/CL;done

and it builds:
$ readelf -d ffmpeg |grep CL
 0x0000000000000001 (NEEDED)             Shared library: [libOpenCL.so.1]

seems some interesting lore is in app-admin/eselect-opencl ChangeLog:

*eselect-opencl-1.1.0-r3 (14 Jul 2014)
14 Jul 2014; Patrick Lauer <patrick@gentoo.org>
+eselect-opencl-1.1.0-r3.ebuild:
Revert switch to opencl-1.2 headers, needs proper switching logic. Fixes #512680
...
*eselect-opencl-1.1.0-r2 (04 Jun 2014)
04 Jun 2014; Patrick Lauer <patrick@gentoo.org>
+eselect-opencl-1.1.0-r2.ebuild:
Bump of OpenCL headers for #496418, not keyworded as it may need more testing
Comment 3 om3i 2014-08-29 23:00:11 UTC
Created attachment 383936 [details]
ffmpeg config.log
Comment 4 om3i 2014-08-29 23:01:16 UTC
Forgot to mention, thats with nvidia drivers too.
Comment 5 Alexis Ballier gentoo-dev 2014-08-30 08:31:58 UTC
well, thanks, but then we'll need proper eselect-opencl support before adding this support in ffmpeg
Comment 6 Patrick Lauer gentoo-dev 2014-09-03 09:31:24 UTC
(In reply to nzqr from comment #4)
> Forgot to mention, thats with nvidia drivers too.

nvidia won't support opencl-1.2, so this does not do what you expect.
Comment 7 om3i 2014-09-03 18:57:32 UTC
It works:

$ time ./ffmpeg -y -ss 120 -i test.mkv -filter:v unsharp=7:7:2.5:7:7:2.5:opencl=0 -t 60 -f rawvideo /dev/null

real    0m26.976s
real    0m26.978s
real    0m26.990s
real    0m27.000s

opencl=1

real    0m7.398s
real    0m7.420s
real    0m7.467s
real    0m8.900s

$ nvidia-smi --list-gpus
GPU 0: GeForce GTS 450 (UUID: GPU-3b832cc9-ab20-30e7-0d3e-1dd371d85d68)
Comment 8 Larry the Git Cow gentoo-dev 2018-03-28 08:12:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f252f9161c8ee5c1facfb676a7d83657ef5aa50

commit 8f252f9161c8ee5c1facfb676a7d83657ef5aa50
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2018-03-27 02:28:03 +0000
Commit:     Alexis Ballier <aballier@gentoo.org>
CommitDate: 2018-03-28 08:02:27 +0000

    media-video/ffmpeg: add opencl use flag
    
    Closes: https://bugs.gentoo.org/520736
    
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 media-video/ffmpeg/ffmpeg-3.4.2-r1.ebuild | 492 ++++++++++++++++++++++++++++++
 media-video/ffmpeg/ffmpeg-9999.ebuild     |   3 +-
 media-video/ffmpeg/metadata.xml           |   1 +
 3 files changed, 495 insertions(+), 1 deletion(-)