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

Mark Thompson sw at jkqxz.net
Tue Nov 14 19:50:24 EET 2017


On 13/11/17 23:09, mmironov wrote:
> From d6f467ec7f610f21f929f9c21f03af3cabe84cf2 Mon Sep 17 00:00:00 2001
> From: mmironov <mikhail.mironov at amd.com>
> Date: Tue, 7 Nov 2017 10:57:21 -0500
> Subject: [PATCH] Added HW accelerated H.264 and HEVC encoding for AMD
> 
> 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      |  590 ++++++++++++++++
>  libavcodec/amfenc.h      |  143 ++++
>  libavcodec/amfenc_h264.c |  397 +++++++++++
>  libavcodec/amfenc_hevc.c |  328 +++++++++
>  9 files changed, 3245 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/libavcodec/amfenc_h264.c b/libavcodec/amfenc_h264.c
> new file mode 100644
> index 0000000..cb606d2
> --- /dev/null
> +++ b/libavcodec/amfenc_h264.c
> ...
> +
> +    { "insert_aud",    "Inserts AU Delimiter NAL unit",         OFFSET(insert_aud),AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
> +
> ...
> diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c
> new file mode 100644
> index 0000000..d534310
> --- /dev/null
> +++ b/libavcodec/amfenc_hevc.c
> ...
> +
> +    { "insert_aud",    "Inserts AU Delimiter NAL unit",         OFFSET(insert_aud),AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE },

Please call it just "aud" to be consistent with other encoders (libx264, nvenc, vaapi).

Thanks,

- Mark


More information about the ffmpeg-devel mailing list