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

Michael Niedermayer michael at niedermayer.cc
Tue Nov 7 00:46:35 EET 2017


On Sat, Nov 04, 2017 at 10:49:44PM -0500, Mikhail Mironov wrote:
> From fc6a3f63eb9c3734f4101cee2a2f5707e063ab62 Mon Sep 17 00:00:00 2001
> From: mmironov <mikhail.mironov at amd.com>
> Date: Fri, 27 Oct 2017 13:03:15 -0400
> Subject: [PATCH] Added: HW accelerated H.264 and HEVC encoding for AMD GPUs
>  based on AMF SDK
> 
> Signed-off-by: mmironov <mikhail.mironov at amd.com>
> ---
>  Changelog                |    3 +-
>  compat/amd/amfsdkenc.h   | 1753 ++++++++++++++++++++++++++++++++++++++++++++++
>  configure                |   25 +
>  libavcodec/Makefile      |    4 +
>  libavcodec/allcodecs.c   |    2 +
>  libavcodec/amfenc.c      |  515 ++++++++++++++
>  libavcodec/amfenc.h      |  137 ++++
>  libavcodec/amfenc_h264.c |  366 ++++++++++
>  libavcodec/amfenc_hevc.c |  294 ++++++++
>  libavcodec/version.h     |    4 +-
>  10 files changed, 3100 insertions(+), 3 deletions(-)
>  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

This seems to fail building in mingw64

make
CC      libavcodec/amfenc.o
In file included from src/libavcodec/amfenc.c:22:0:
src/libavutil/hwcontext_d3d11va.h:71:5: error: unknown type name ‘ID3D11VideoDevice’
     ID3D11VideoDevice   *video_device;
     ^
src/libavutil/hwcontext_d3d11va.h:79:5: error: unknown type name ‘ID3D11VideoContext’
     ID3D11VideoContext  *video_context;
     ^
In file included from src/libavcodec/amfenc.h:24:0,
                 from src/libavcodec/amfenc.c:27:
src/compat/amd/amfsdkenc.h:191:23: error: no previous prototype for ‘AMFConstructRect’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFRect AMFConstructRect(amf_int32 left, amf_int32 top, amf_int32 right, amf_int32 bottom)
                       ^
src/compat/amd/amfsdkenc.h:203:23: error: no previous prototype for ‘AMFConstructSize’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFSize AMFConstructSize(amf_int32 width, amf_int32 height)
                       ^
src/compat/amd/amfsdkenc.h:215:24: error: no previous prototype for ‘AMFConstructPoint’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFPoint AMFConstructPoint(amf_int32 x, amf_int32 y)
                        ^
src/compat/amd/amfsdkenc.h:227:23: error: no previous prototype for ‘AMFConstructRate’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFRate AMFConstructRate(amf_uint32 num, amf_uint32 den)
                       ^
src/compat/amd/amfsdkenc.h:239:24: error: no previous prototype for ‘AMFConstructRatio’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFRatio AMFConstructRatio(amf_uint32 num, amf_uint32 den)
                        ^
In file included from src/libavcodec/amfenc.h:24:0,
                 from src/libavcodec/amfenc.c:27:
src/compat/amd/amfsdkenc.h:275:24: error: no previous prototype for ‘AMFConstructColor’ [-Werror=missing-prototypes]
 AMF_INLINE struct AMFColor AMFConstructColor(amf_uint8 r, amf_uint8 g, amf_uint8 b, amf_uint8 a)
                        ^
In file included from src/libavcodec/amfenc.h:24:0,
                 from src/libavcodec/amfenc.c:27:
src/compat/amd/amfsdkenc.h:293:45: error: no previous prototype for ‘amf_variant_alloc’ [-Werror=missing-prototypes]
     AMF_INLINE void* AMF_CDECL_CALL amf_variant_alloc(amf_size count)
                                             ^
src/compat/amd/amfsdkenc.h:297:44: error: no previous prototype for ‘amf_variant_free’ [-Werror=missing-prototypes]
     AMF_INLINE void AMF_CDECL_CALL amf_variant_free(void* ptr)
                                            ^
cc1: some warnings being treated as errors
make: *** [libavcodec/amfenc.o] Error 1


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171106/cfb0f9a1/attachment.sig>


More information about the ffmpeg-devel mailing list