media-video/ffmpeg: add cuda useflag.
authorAlexis Ballier <aballier@gentoo.org>
Mon, 19 Aug 2019 14:51:19 +0000 (16:51 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 19 Aug 2019 16:40:59 +0000 (18:40 +0200)
Based on a patch by Timo Rothenpieler.

Closes: https://bugs.gentoo.org/595450

Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
media-video/ffmpeg/ffmpeg-9999.ebuild
media-video/ffmpeg/metadata.xml

index 75bc08762ecb45184f338d4b75baa30e41240a5d..ac797b13647f50f3638e352303a327254ff6814d 100644 (file)
@@ -80,7 +80,7 @@ FFMPEG_FLAG_MAP=(
                vorbis:libvorbis vpx:libvpx zvbi:libzvbi
                # libavfilter options
                appkit
-               bs2b:libbs2b chromaprint flite:libflite frei0r
+               bs2b:libbs2b chromaprint cuda:cuda-llvm flite:libflite frei0r
                fribidi:libfribidi fontconfig ladspa libass lv2 truetype:libfreetype vidstab:libvidstab
                rubberband:librubberband zeromq:libzmq zimg:libzimg
                # libswresample options
@@ -278,9 +278,10 @@ DEPEND="${RDEPEND}
 "
 BDEPEND="
        >=sys-devel/make-3.81
-       doc? ( sys-apps/texinfo )
        >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
        cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) )
+       cuda? ( >=sys-devel/clang-7[llvm_targets_NVPTX] )
+       doc? ( sys-apps/texinfo )
        test? ( net-misc/wget sys-devel/bc )
 "
 
@@ -298,6 +299,7 @@ GPL_REQUIRED_USE="
        )
 "
 REQUIRED_USE="
+       cuda? ( video_cards_nvidia )
        libv4l? ( v4l )
        fftools_cws2fws? ( zlib )
        test? ( encode )
index 556156808d6f411d0bce8abd5173cfc53ce46f02..fbc47af1d1368d9b48f12726fae5dc3ebb713b24 100644 (file)
@@ -19,6 +19,7 @@
        <flag name="chromium">Builds libffmpeg.so to enable media playback in Chromium-based browsers like Opera and Vivaldi.</flag>
        <flag name="codec2">Enables codec2 low bit rate speech codec support via <pkg>media-libs/codec2</pkg>.</flag>
        <flag name="cpudetection">Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)</flag>
+       <flag name="cuda">Enables CUDA-based acceleration. Mostly used for specific filters.</flag>
        <flag name="dav1d">Enables AV1 decoding via<pkg>media-libs/dav1d</pkg>.</flag>
        <flag name="ebur128">Enables EBU R128 loudness normalization filter via <pkg>media-libs/libebur128</pkg></flag>
        <flag name="fdk">Use external fdk-aac library for AAC encoding</flag>