[FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD GPUs based on AMF SDK

Mironov, Mikhail Mikhail.Mironov at amd.com
Thu Nov 23 01:13:00 EET 2017


> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Timo Rothenpieler
> Sent: November 22, 2017 5:36 PM
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] Added HW H.264 and HEVC encoding for AMD
> GPUs based on AMF SDK
> 
> Am 17.11.2017 um 06:07 schrieb mmironov:
> >  From 454aad17fea28e8e4c5abb904341181271971bfc Mon Sep 17 00:00:00
> > 2001
> > From: mmironov <mikhail.mironov at amd.com>
> > Date: Tue, 14 Nov 2017 17:54:24 -0500
> > Subject: [PATCH] Added HW H.264 and HEVC encoding for AMD GPUs
> based on AMF
> >   SDK
> >
> > Signed-off-by: mmironov <mikhail.mironov at amd.com>
> > ---
> >   Changelog                |    1 +
> >   compat/amd/amfsdkenc.h   | 1755
> ++++++++++++++++++++++++++++++++++++++++++++++
> >   configure                |   25 +
> >   libavcodec/Makefile      |    4 +
> >   libavcodec/allcodecs.c   |    2 +
> >   libavcodec/amfenc.c      |  596 ++++++++++++++++
> >   libavcodec/amfenc.h      |  143 ++++
> >   libavcodec/amfenc_h264.c |  397 +++++++++++
> >   libavcodec/amfenc_hevc.c |  327 +++++++++
> >   9 files changed, 3250 insertions(+)
> >   create mode 100644 compat/amd/amfsdkenc.h
> >   create mode 100644 libavcodec/amfenc.c
> >   create mode 100644 libavcodec/amfenc.h
> >   create mode 100644 libavcodec/amfenc_h264.c
> >   create mode 100644 libavcodec/amfenc_hevc.c
> ...
> > diff --git a/configure b/configure
> > index 3788f26..cbec01f 100755
> > --- a/configure
> > +++ b/configure
> > @@ -303,6 +303,7 @@ External library support:
> >     --disable-zlib           disable zlib [autodetect]
> >
> >     The following libraries provide various hardware acceleration features:
> > +  --disable-amf            disable AMF video encoding code [autodetect]
> >     --disable-audiotoolbox   disable Apple AudioToolbox code [autodetect]
> >     --disable-cuda           disable dynamically linked Nvidia CUDA code
> [autodetect]
> >     --enable-cuda-sdk        enable CUDA features that require the CUDA SDK
> [no]
> > @@ -1639,6 +1640,7 @@ EXTERNAL_LIBRARY_LIST="
> >   "
> >
> >   HWACCEL_AUTODETECT_LIBRARY_LIST="
> > +    amf
> >       audiotoolbox
> >       crystalhd
> >       cuda
> > @@ -2781,12 +2783,15 @@ scale_npp_filter_deps="cuda libnpp"
> >   scale_cuda_filter_deps="cuda_sdk"
> >   thumbnail_cuda_filter_deps="cuda_sdk"
> >
> > +amf_deps_any="dlopen LoadLibrary"
> 
> This should be libdl, and not dlopen.
> Or rather just LoadLibrary, since it's Windows only? No idea how exactly
> cygwin works there.
> 

The actual code calls dlopen() and it in turn calls LoadLibrary(). 
In the future Linux support will be added. So I feel to change this to libdl but keep.
From the prev post: I will combine amf and nvidia cases.

Thanks,
Mikhail



More information about the ffmpeg-devel mailing list