From: "ha...@mayartech.com"
This commit adds a hardware accelerated H.264 encoder which utilizes
libVA (open source implementation of VA-API). Information about libva
is available at: https://en.wikipedia.org/wiki/Video_Acceleration_API
This encoder is only availbale on linux and supported hardware which
can be viewed at:
https://en.wikipedia.org/wiki/Video_Acceleration_API#Supported_hardware_and_drivers
The short name for encoder is "libi264". The encoder must be enablde at
configure time using the --enable-libi264 switch. By default it is
turned off.
---
Changelog |1 +
MAINTAINERS |1 +
configure |5 +-
doc/general.texi| 11 +
libavcodec/Makefile |1 +
libavcodec/allcodecs.c |1 +
libavcodec/libi264.c| 1377 +++
libavcodec/libi264.h| 111 +++
libavcodec/libi264_param_set.c | 425 +++
libavcodec/libi264_param_set.h | 81 +++
libavcodec/libi264_va_display.c | 113 +++
libavcodec/libi264_va_display.h | 86 +++
libavcodec/libi264_va_display_drm.c | 97 +++
libavcodec/libi264_va_display_x11.c | 172 +
libavcodec/version.h|2 +-
15 files changed, 2482 insertions(+), 2 deletions(-)
create mode 100644 libavcodec/libi264.c
create mode 100644 libavcodec/libi264.h
create mode 100644 libavcodec/libi264_param_set.c
create mode 100644 libavcodec/libi264_param_set.h
create mode 100644 libavcodec/libi264_va_display.c
create mode 100644 libavcodec/libi264_va_display.h
create mode 100644 libavcodec/libi264_va_display_drm.c
create mode 100644 libavcodec/libi264_va_display_x11.c
diff --git a/Changelog b/Changelog
index d9c2ea8..99acb56 100644
--- a/Changelog
+++ b/Changelog
@@ -49,6 +49,7 @@ version :
- VAAPI VP9 hwaccel
- audio high-order multiband parametric equalizer
- automatic bitstream filtering
+- H.264 hwaccelerated encoding through libVA
version 2.8:
diff --git a/MAINTAINERS b/MAINTAINERS
index 9add13d..e37cb6f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -203,6 +203,7 @@ Codecs:
libcelt_dec.c Nicolas George
libdirac* David Conrad
libgsm.c Michel Bardiaux
+ libi264* Bryan Christ
libkvazaar.c Arttu Yl??-Outinen
libopenjpeg.c Jaikrishnan Menon
libopenjpegenc.c Michael Bradshaw
diff --git a/configure b/configure
index da74ccd..d8fe713 100755
--- a/configure
+++ b/configure
@@ -265,6 +265,7 @@ External library support:
--enable-libwavpack enable wavpack encoding via libwavpack [no]
--enable-libwebp enable WebP encoding via libwebp [no]
--enable-libx264 enable H.264 encoding via x264 [no]
+ --enable-libi264 enable H.264 encoding via libva [no]
--enable-libx265 enable HEVC encoding via x265 [no]
--enable-libxavs enable AVS encoding via xavs [no]
--enable-libxcb enable X11 grabbing using XCB [autodetect]
@@ -1454,6 +1455,7 @@ EXTERNAL_LIBRARY_LIST="
libfribidi
libgme
libgsm
+libi264
libiec61883
libilbc
libkvazaar
@@ -2658,7 +2660,7 @@ libwebp_anim_encoder_deps="libwebp"
libx262_encoder_deps="libx262"
libx264_encoder_deps="libx264"
libx264rgb_encoder_deps="libx264"
-libx264rgb_encoder_select="libx264_encoder"
+libi264_encoder_deps="swscale"
libx265_encoder_deps="libx265"
libxavs_encoder_deps="libxavs"
libxvid_encoder_deps="libxvid"
@@ -5528,6 +5530,7 @@ enabled libx264 && { use_pkg_config x264
"stdint.h x264.h" x264_encode
die "ERROR: libx264 must be installed and
version must be >= 0.118."; } &&
{ check_cpp_condition x264.h "X264_MPEG2" &&
enable libx262; }
+enabled libi264 && require libva va/va.h vaInitialize -lva -lX11
-lva-x11 -lva-drm
enabled libx265 && require_pkg_config x265 x265.h x265_api_get &&
{ check_cpp_condition x265.h "X265_BUILD >= 57" ||
die "ERROR: libx265 version must be >= 57."; }
diff --git a/doc/general.texi b/doc/general.texi
index 06933ab..bca7ca0 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -131,6 +131,17 @@ x264 is under the GNU Public License Version 2 or later
details), you must upgrade FFmpeg's license to GPL in order to use it.
@end float
+@section libva
+
+FFmpeg can make use of the libva library for H.264 encoding. libva is an
+implementation of VA-API for Linux. libva can only be used for H.264 encoding
+on unix based systems and Intel GPUs which have support for hardware
accelerated
+H.264 encoding.
+
+Go to @url{http://www.freedesktop.org/wiki/Software/vaapi/} and