summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhding3 <haitao.ding@intel.com>2012-06-11 21:10:54 +0800
committerbuildbot <buildbot@intel.com>2012-06-15 10:31:23 -0700
commit4b672db6ee89c9846451bbab23cf18e93c4260b2 (patch)
tree8ac0fb6d1cd3dcbe07f9430a23b2e0c0c7c106c1
parent166c85d0cdc279aa572e0e59f335eaf85e6be699 (diff)
downloadandroid_hardware_intel_common_libva-4b672db6ee89c9846451bbab23cf18e93c4260b2.tar.gz
android_hardware_intel_common_libva-4b672db6ee89c9846451bbab23cf18e93c4260b2.tar.bz2
android_hardware_intel_common_libva-4b672db6ee89c9846451bbab23cf18e93c4260b2.zip
[video-libva] porting MRFL branch to ICS mainline
BZ: 35390 porting MRFL branch to ICS mainline. version 2. Change-Id: Id43eec231b107dee635693ad500fc4cea7416fc6 Signed-off-by: hding3 <haitao.ding@intel.com> Reviewed-on: http://android.intel.com:8080/52338 Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
-rw-r--r--Makefile.am34
-rw-r--r--NEWS32
-rw-r--r--build/gen_version.sh22
-rw-r--r--config.h81
-rw-r--r--configure.ac210
-rw-r--r--debian.upstream/Makefile.am33
-rw-r--r--debian.upstream/README.Debian (renamed from debian/README.Debian)0
-rw-r--r--debian.upstream/changelog.in5
-rw-r--r--debian.upstream/compat (renamed from debian/compat)0
-rw-r--r--debian.upstream/control.in61
-rw-r--r--debian.upstream/copyright (renamed from debian/copyright)0
-rw-r--r--debian.upstream/libva-dev.dirs (renamed from debian/libva-dev.dirs)0
-rw-r--r--debian.upstream/libva-dev.install3
-rw-r--r--debian.upstream/libva1.dirs (renamed from debian/libva1.dirs)0
-rw-r--r--debian.upstream/libva1.install2
-rw-r--r--debian.upstream/rules14
-rw-r--r--debian.upstream/vainfo.install1
-rw-r--r--debian/changelog27
-rw-r--r--debian/control36
-rw-r--r--debian/dirs2
-rw-r--r--debian/files2
-rw-r--r--debian/libva-dev.install8
-rw-r--r--debian/libva-dev.substvars1
-rw-r--r--debian/libva1.install2
-rw-r--r--debian/libva1.substvars1
-rwxr-xr-xdebian/rules114
-rw-r--r--doc/Doxyfile1679
-rw-r--r--doc/Makefile.am57
-rw-r--r--doc/va_footer.html4
-rw-r--r--dummy_drv_video/Makefile.am2
-rw-r--r--pkgconfig/Makefile.am47
-rw-r--r--pkgconfig/libva-egl.pc.in (renamed from libva-egl.pc.in)2
-rw-r--r--pkgconfig/libva-glx.pc.in (renamed from libva-glx.pc.in)2
-rw-r--r--pkgconfig/libva-tpi.pc.in (renamed from libva-tpi.pc.in)2
-rw-r--r--pkgconfig/libva-x11.pc.in (renamed from libva-x11.pc.in)2
-rw-r--r--pkgconfig/libva.pc.in (renamed from libva.pc.in)2
-rw-r--r--test/Makefile.am4
-rw-r--r--test/android_winsys.cpp8
-rw-r--r--test/basic/test_08.c2
-rw-r--r--test/basic/test_10.c2
-rw-r--r--test/basic/test_11.c2
-rw-r--r--test/basic/test_common.c5
-rw-r--r--test/decode/mpeg2vldemo.cpp8
-rw-r--r--test/encode/avcenc.c1167
-rw-r--r--test/encode/h264encode_android.cpp4
-rw-r--r--test/encode/h264encode_common.c256
-rw-r--r--test/encode/h264encode_x11.c7
-rw-r--r--test/loadsurface.h32
-rw-r--r--test/putsurface/putsurface_common.c8
-rw-r--r--test/transcode/Makefile.am35
-rw-r--r--test/transcode/mpeg2transcode.cpp3488
-rw-r--r--test/vainfo/Makefile.am7
-rw-r--r--test/vainfo/vainfo.c15
-rwxr-xr-xva/Android.mk21
-rw-r--r--va/Makefile.am16
-rw-r--r--va/android/va_android.cpp29
-rw-r--r--va/libva.syms16
-rwxr-xr-xva/va.c221
-rwxr-xr-xva/va.h676
-rwxr-xr-xva/va_backend.h47
-rw-r--r--va/va_backend_tpi.h103
-rw-r--r--va/va_backend_vpp.h71
-rw-r--r--va/va_compat.c43
-rw-r--r--va/va_compat.h116
-rw-r--r--va/va_dec_jpeg.h194
-rw-r--r--va/va_dec_vp8.h209
-rw-r--r--va/va_enc.h184
-rw-r--r--va/va_enc_h264.h697
-rw-r--r--va/va_fool.c4
-rw-r--r--va/va_tpi.c130
-rw-r--r--va/va_tpi.h110
-rwxr-xr-xva/va_trace.c225
-rwxr-xr-xva/va_trace.h10
-rw-r--r--va/va_version.h87
-rw-r--r--va/va_version.h.in28
-rw-r--r--va/va_vpp.h782
-rw-r--r--va/x11/dri2_util.c1
-rw-r--r--va/x11/va_fglrx.c43
78 files changed, 10170 insertions, 1433 deletions
diff --git a/Makefile.am b/Makefile.am
index f0223e0..1425b0f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,24 +22,24 @@
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = va test
-if BUILD_DUMMY_DRIVER
-SUBDIRS += dummy_drv_video
-endif
+SUBDIRS = va dummy_drv_video pkgconfig test debian.upstream doc
-pcfiles = libva.pc libva-tpi.pc
-pcfiles += libva-x11.pc
-if USE_GLX
-pcfiles += libva-glx.pc
-endif
+# Extra clean files so that maintainer-clean removes *everything*
+MAINTAINERCLEANFILES = \
+ aclocal.m4 compile config.guess config.sub \
+ configure depcomp install-sh ltmain.sh \
+ Makefile.in missing
-if USE_EGL
-pcfiles += libva-egl.pc
-endif
+DEB_BUILDDIR = debian.build
-pkgconfigdir = @pkgconfigdir@
-pkgconfig_DATA = $(pcfiles)
+deb:
+ @[ -d debian ] || ln -s debian.upstream debian
+ dpkg-buildpackage -rfakeroot -uc -us
-EXTRA_DIST = libva.pc.in libva-tpi.pc.in libva-x11.pc.in libva-glx.pc.in libva-egl.pc.in
-
-CLEANFILES = $(pcfiles)
+deb.upstream: dist
+ -mkdir -p $(DEB_BUILDDIR)
+ cd $(DEB_BUILDDIR) && \
+ rm -rf $(PACKAGE)-$(VERSION) && \
+ tar zxvf ../$(PACKAGE)-$(VERSION).tar.gz && \
+ cd $(PACKAGE)-$(VERSION) && \
+ $(MAKE) deb -f Makefile.am
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..80d5f7e
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,32 @@
+libva NEWS -- summary of user visible changes. 2011-10-28
+Copyright (C) 2009-2011 Intel Corporation
+
+Version 1.0.15 - 28.Oct.2011
+* API: make {Top,Bottom}FieldOrderCnt signed (Yi Wang)
+* Add auto-generated Debian packaging
+* Refine VA trace & VA fool utilities
+* Move i965 driver to a specific repository (vaapi/intel-driver)
+* Fix DSO link issue in tests
+* Fix fglrx driver name detection
+* Fix API vs. DSO vs. package versioning
+
+Version 1.0.14 - 28.Jul.2011
+* API: rename VA_DECODE_ERROR_TYPE to VADecodeErrorType
+* Fix memory leaks (Edgar Hucek)
+* Fix VA trace logs (Alexander Osin)
+* Fix vaTerminate() with some applications, e.g. GStreamer
+
+Version 1.0.13 - 30.May.2011
+* API: fix VA_ROTATION_270 definition
+* Add a simple H.264 encoder "avcenc" (Chang Zhou)
+* Fix VA tracer (Alexander Osin)
+* Fix vaBufferInfo() interface (Alexander Osin)
+
+Version 1.0.12 - 01.Apr.2011
+* API: add VARenderMode interface to select overlay or GPU rendering mode
+* API: add VARenderDevice interface to allow rendering to an external device
+* API: add VADisplayAttribOverlay{ColorKey,AutoPaintColorKey} interface
+* Fix build issues on Android 2.3
+
+Changes for older versions can be found in git log or previously
+released packages.
diff --git a/build/gen_version.sh b/build/gen_version.sh
index dd01d95..f594ddd 100644
--- a/build/gen_version.sh
+++ b/build/gen_version.sh
@@ -12,21 +12,21 @@ parse_configure() {
}
if test -f "${libva_topdir}/configure.ac"; then
- libva_major_version=`parse_configure_ac libva_major_version`
- libva_minor_version=`parse_configure_ac libva_minor_version`
- libva_micro_version=`parse_configure_ac libva_micro_version`
+ va_api_major_version=`parse_configure_ac va_api_major_version`
+ va_api_minor_version=`parse_configure_ac va_api_minor_version`
+ va_api_micro_version=`parse_configure_ac va_api_micro_version`
elif test -f "${libva_topdir}/configure"; then
- libva_major_version=`parse_configure LIBVA_MAJOR_VERSION`
- libva_minor_version=`parse_configure LIBVA_MINOR_VERSION`
- libva_micro_version=`parse_configure LIBVA_MICRO_VERSION`
+ va_api_major_version=`parse_configure VA_API_MAJOR_VERSION`
+ va_api_minor_version=`parse_configure VA_API_MINOR_VERSION`
+ va_api_micro_version=`parse_configure VA_API_MICRO_VERSION`
else
echo "ERROR: configure or configure.ac file not found in $libva_topdir/"
exit 1
fi
-libva_version="$libva_major_version.$libva_minor_version.$libva_micro_version"
+va_api_version="$va_api_major_version.$va_api_minor_version.$va_api_micro_version"
-sed -e "s/@LIBVA_MAJOR_VERSION@/${libva_major_version}/" \
- -e "s/@LIBVA_MINOR_VERSION@/${libva_minor_version}/" \
- -e "s/@LIBVA_MICRO_VERSION@/${libva_micro_version}/" \
- -e "s/@LIBVA_VERSION@/${libva_version}/" \
+sed -e "s/@VA_API_MAJOR_VERSION@/${va_api_major_version}/" \
+ -e "s/@VA_API_MINOR_VERSION@/${va_api_minor_version}/" \
+ -e "s/@VA_API_MICRO_VERSION@/${va_api_micro_version}/" \
+ -e "s/@VA_API_VERSION@/${va_api_version}/" \
$version_h_in
diff --git a/config.h b/config.h
deleted file mode 100644
index 943469d..0000000
--- a/config.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <GL/glx.h> header file. */
-#define HAVE_GL_GLX_H 1
-
-/* Define to 1 if you have the <GL/gl.h> header file. */
-#define HAVE_GL_GL_H 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libva"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "waldo.bastian@intel.com"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "libva"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libva 0.32.0"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "libva"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.32.0"
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Defined to the versioned __vaDriverInit function name */
-#define VA_DRIVER_INIT_FUNC __vaDriverInit_0_32
-
-/* Defined to the versioned __vaDriverInit function name (in string form) */
-#define VA_DRIVER_INIT_FUNC_S "__vaDriverInit_0_32"
-
-/* Version number of package */
-#define VERSION "0.32.0"
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#define _FILE_OFFSET_BITS 64
-
-/* Define for large files, on AIX-style hosts. */
-/* #undef _LARGE_FILES */
diff --git a/configure.ac b/configure.ac
index 08249f7..4b50912 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,21 +20,62 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+# VA-API version
+# - increment major for any ABI change (which shall not occur!)
+# - increment minor for any interface change (e.g. new/modified function)
+# - increment micro for any other change (new flag, new codec definition, etc.)
+# - reset micro version to zero when minor version is incremented
+# - reset minor version to zero when major version is incremented
+m4_define([va_api_major_version], [0])
+m4_define([va_api_minor_version], [34])
+m4_define([va_api_micro_version], [0])
+
+m4_define([va_api_version],
+ [va_api_major_version.va_api_minor_version.va_api_micro_version])
+
# libva package version number, (as distinct from shared library version)
-m4_define([libva_major_version], [0])
-m4_define([libva_minor_version], [32])
+# XXX: we want the package version to remain at 1.0.x for VA-API 0.32.y
+#
+# - major version is automatically generated from VA-API major version
+# - minor version is automatically generated from VA-API minor version
+# - increment micro for any library release
+# - reset micro version to zero when VA-API major or minor version is changed
+m4_define([libva_major_version], [m4_eval(va_api_major_version + 1)])
+m4_define([libva_minor_version], [m4_eval(va_api_minor_version - 32)])
m4_define([libva_micro_version], [0])
+m4_define([libva_pre_version], [1])
m4_define([libva_version],
[libva_major_version.libva_minor_version.libva_micro_version])
+m4_if(libva_pre_version, [0], [], [
+m4_append([libva_version], libva_pre_version, [.pre])
+])
-# if the library source code has changed, increment revision
-m4_define([libva_lt_revision], [14])
-# if any interface was added/removed/changed, then inc current, reset revision
-m4_define([libva_lt_current], [1])
-# if any interface was added since last public release, then increment age
-# if any interface was removed since last public release, then set age to 0
-m4_define([libva_lt_age], [0])
+# libva library version number (generated, do not change)
+# XXX: we want the SONAME to remain at libva.so.1 for VA-API major == 0
+#
+# The library name is generated libva.<x>.<y>.0 where
+# <x> = VA-API major version + 1
+# <y> = 100 * VA-API minor version + VA-API micro version
+#
+# For example:
+# VA-API 0.32.0 generates libva.so.1.3200.0
+# VA-API 0.34.1 generates libva.so.1.3401.0
+# VA-API 1.2.13 generates libva.so.2.213.0
+m4_define([libva_interface_bias], [m4_eval(va_api_major_version + 1)])
+m4_define([libva_interface_age], [0])
+m4_define([libva_binary_age],
+ [m4_eval(100 * va_api_minor_version + va_api_micro_version - libva_interface_age)])
+
+m4_define([libva_lt_current],
+ [m4_eval(100 * va_api_minor_version + va_api_micro_version + libva_interface_bias)])
+m4_define([libva_lt_revision],
+ [m4_eval(libva_interface_age)])
+m4_define([libva_lt_age],
+ [m4_eval(libva_binary_age - libva_interface_age)])
+
+# libdrm minimun version requirement
+m4_define([libdrm_version], [2.4])
AC_PREREQ(2.57)
AC_INIT([libva], [libva_version], [waldo.bastian@intel.com], libva)
@@ -44,6 +85,15 @@ AM_INIT_AUTOMAKE([dist-bzip2])
AM_CONFIG_HEADER([config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+VA_API_MAJOR_VERSION=va_api_major_version
+VA_API_MINOR_VERSION=va_api_minor_version
+VA_API_MICRO_VERSION=va_api_micro_version
+VA_API_VERSION=va_api_version
+AC_SUBST(VA_API_MAJOR_VERSION)
+AC_SUBST(VA_API_MINOR_VERSION)
+AC_SUBST(VA_API_MICRO_VERSION)
+AC_SUBST(VA_API_VERSION)
+
LIBVA_MAJOR_VERSION=libva_major_version
LIBVA_MINOR_VERSION=libva_minor_version
LIBVA_MICRO_VERSION=libva_micro_version
@@ -61,25 +111,36 @@ LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION"
AC_SUBST(LIBVA_LT_VERSION)
AC_SUBST(LIBVA_LT_LDFLAGS)
+AC_ARG_ENABLE(docs,
+ [AC_HELP_STRING([--enable-docs],
+ [build Doxygen documentation @<:@default=no@:>@])],
+ [], [enable_docs="no"])
+
AC_ARG_ENABLE(glx,
- [AC_HELP_STRING([--enable-glx],
- [build with OpenGL for X11 support])],
- [], [enable_glx=no])
+ [AC_HELP_STRING([--enable-glx],
+ [build with GLX support @<:@default=yes@:>@])],
+ [], [enable_glx="yes"])
+
+AC_ARG_ENABLE(egl,
+ [AC_HELP_STRING([--enable-egl],
+ [build with EGL support @<:@default=yes@:>@])],
+ [], [enable_egl="yes"])
AC_ARG_ENABLE(dummy-driver,
- [AC_HELP_STRING([--enable-dummy-driver],
- [build dummy video driver])],
- [], [enable_dummy_driver=yes])
+ [AC_HELP_STRING([--enable-dummy-driver],
+ [build dummy video driver @<:@default=yes@:>@])],
+ [], [enable_dummy_driver="yes"])
AM_CONDITIONAL(BUILD_DUMMY_DRIVER, test x$enable_dummy_driver = xyes)
AC_ARG_ENABLE(dummy-backend,
- [AC_HELP_STRING([--enable-dummy-backend],
- [build dummy libva backend])],
- [], [enable_dummy_backend=no])
+ [AC_HELP_STRING([--enable-dummy-backend],
+ [build dummy libva backend])],
+ [], [enable_dummy_backend="no"])
AC_ARG_WITH(drivers-path,
- [AC_HELP_STRING([--with-drivers-path=[[path]]], [drivers path])],,
- [with_drivers_path="$libdir/dri"])
+ [AC_HELP_STRING([--with-drivers-path=[[path]]],
+ [drivers path])],
+ [], [with_drivers_path="$libdir/dri"])
LIBVA_DRIVERS_PATH="$with_drivers_path"
AC_SUBST(LIBVA_DRIVERS_PATH)
@@ -95,10 +156,17 @@ AC_SYS_LARGEFILE
PKG_CHECK_MODULES([X11], [x11])
PKG_CHECK_MODULES([XEXT],[xext])
PKG_CHECK_MODULES([XFIXES], [xfixes])
-PKG_CHECK_MODULES([DRM], [libdrm])
-PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no])
-AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
+# Check for Doxygen
+if test "$enable_docs" = "yes"; then
+ AC_CHECK_TOOL([DOXYGEN], [doxygen], [enable_docs="no"])
+fi
+AM_CONDITIONAL(ENABLE_DOCS, test "$enable_docs" = "yes")
+
+# Check for recent enough DRM
+LIBDRM_VERSION=libdrm_version
+PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION])
+AC_SUBST(LIBDRM_VERSION)
if test x$enable_dummy_backend = xyes; then
PKG_CHECK_MODULES([UDEV], [libudev], [libudev=yes], [libudev=no])
@@ -108,7 +176,7 @@ if test x$libudev = xno; then
fi
AM_CONDITIONAL(BUILD_DUMMY_BACKEND, test x$enable_dummy_backend = xyes)
-# Check for OpenGL (X11)
+# Check for GLX
USE_GLX="no"
GL_DEPS_CFLAGS=""
GL_DEPS_LIBS=""
@@ -124,18 +192,21 @@ AC_SUBST(GL_DEPS_CFLAGS)
AC_SUBST(GL_DEPS_LIBS)
AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes")
-# TBD: Check for EGL
-USE_EGL="yes"
+# Check for EGL
+USE_EGL="no"
+EGL_DEPS_CFLAGS=""
+EGL_DEPS_LIBS=""
+if test "$enable_egl" = "yes"; then
+ AC_CHECK_HEADERS([EGL/egl.h])
+ AC_CHECK_LIB(EGL, eglGetDisplay, [
+ USE_EGL="yes"
+ EGL_DEPS_LIBS="-lEGL"
+ ])
+fi
+AC_SUBST(EGL_DEPS_CFLAGS)
+AC_SUBST(EGL_DEPS_LIBS)
AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes")
-
-# Make sure drivers use the correctly versioned __vaDriverInit*() function name
-VA_DRIVER_INIT_FUNC="__vaDriverInit_${LIBVA_MAJOR_VERSION}_${LIBVA_MINOR_VERSION}"
-AC_DEFINE_UNQUOTED([VA_DRIVER_INIT_FUNC], [$VA_DRIVER_INIT_FUNC],
- [Defined to the versioned __vaDriverInit function name])
-AC_DEFINE_UNQUOTED([VA_DRIVER_INIT_FUNC_S], ["$VA_DRIVER_INIT_FUNC"],
- [Defined to the versioned __vaDriverInit function name (in string form)])
-
# We only need the headers, we don't link against the DRM libraries
LIBVA_CFLAGS="$DRM_CFLAGS"
AC_SUBST(LIBVA_CFLAGS)
@@ -151,47 +222,42 @@ AC_SUBST([libvacorelib])
AC_SUBST([libvabackendlib])
AC_OUTPUT([
- Makefile
- va/Makefile
- va/va_version.h
- va/x11/Makefile
- va/glx/Makefile
- va/egl/Makefile
- va/dummy/Makefile
- dummy_drv_video/Makefile
- test/Makefile
- test/basic/Makefile
- test/decode/Makefile
- test/putsurface/Makefile
- test/encode/Makefile
- test/vainfo/Makefile
- libva.pc
- libva-x11.pc
- libva-glx.pc
- libva-egl.pc
- libva-tpi.pc
+ Makefile
+ debian.upstream/Makefile
+ doc/Makefile
+ dummy_drv_video/Makefile
+ pkgconfig/Makefile
+ pkgconfig/libva-egl.pc
+ pkgconfig/libva-glx.pc
+ pkgconfig/libva-tpi.pc
+ pkgconfig/libva-x11.pc
+ pkgconfig/libva.pc
+ test/Makefile
+ test/basic/Makefile
+ test/decode/Makefile
+ test/encode/Makefile
+ test/putsurface/Makefile
+ test/transcode/Makefile
+ test/vainfo/Makefile
+ va/Makefile
+ va/dummy/Makefile
+ va/egl/Makefile
+ va/glx/Makefile
+ va/va_version.h
+ va/x11/Makefile
])
# Print a small summary
-
-echo ""
-echo "libva - ${LIBVA_VERSION}"
-echo ""
-
-echo " • Global :"
-echo " Prefix: ${prefix}"
-echo ""
-
-AS_IF([test x$enable_dummy_driver = xyes], [DRIVERS="dummy $DRIVERS"])
-
-echo " • Drivers: ${DRIVERS}"
-
AS_IF([test x$USE_GLX = xyes], [BACKENDS="glx $BACKENDS"])
AS_IF([test x$USE_EGL = xyes], [BACKENDS="egl $BACKENDS"])
-BACKENDS="x11 $BACKENDS"
-AS_IF([test x$enable_dummy_backend = xyes], [BACKENDS="dummy
-$BACKENDS"])
-
-echo " • Winsys : ${BACKENDS}"
-
+echo
+echo "libva - ${LIBVA_VERSION} (VA-API ${VA_API_VERSION})"
+echo
+echo Installation prefix .............. : $prefix
+echo Default driver path .............. : $LIBVA_DRIVERS_PATH
+echo Extra window systems ............. : $BACKENDS
+echo build dummy backend .............. : $enable_dummy_backend
+echo Build dummy driver ............... : $enable_dummy_driver
+echo Build documentation .............. : $enable_docs
+echo
diff --git a/debian.upstream/Makefile.am b/debian.upstream/Makefile.am
new file mode 100644
index 0000000..87a571a
--- /dev/null
+++ b/debian.upstream/Makefile.am
@@ -0,0 +1,33 @@
+DEBIANFILES = \
+ README.Debian \
+ changelog.in \
+ compat \
+ control.in \
+ copyright \
+ libva-dev.dirs \
+ libva-dev.install \
+ libva1.dirs \
+ libva1.install \
+ rules \
+ vainfo.install \
+ $(NULL)
+
+DEBIANGENFILES = \
+ changelog \
+ control \
+ $(NULL)
+
+EXTRA_DIST = $(DEBIANFILES)
+
+dist_noinst_DATA = $(DEBIANGENFILES)
+
+# Extra clean files so that maintainer-clean removes *everything*
+MAINTAINERCLEANFILES = Makefile.in $(DEBIANGENFILES)
+
+$(DEBIANGENFILES): %: %.in Makefile
+ -sed \
+ -e 's|\@DATE\@|'"`LC_ALL=C date +'%a, %d %b %Y %X %z'`"'|' \
+ -e 's|\@LIBDRM_VERSION\@|$(LIBDRM_VERSION)|' \
+ -e 's|\@LIBVA_PACKAGE_VERSION\@|$(LIBVA_PACKAGE_VERSION)|' \
+ -e 's|\@PACKAGE_VERSION\@|$(PACKAGE_VERSION)|' \
+ $< > $@
diff --git a/debian/README.Debian b/debian.upstream/README.Debian
index d10d702..d10d702 100644
--- a/debian/README.Debian
+++ b/debian.upstream/README.Debian
diff --git a/debian.upstream/changelog.in b/debian.upstream/changelog.in
new file mode 100644
index 0000000..397b5eb
--- /dev/null
+++ b/debian.upstream/changelog.in
@@ -0,0 +1,5 @@
+libva (@PACKAGE_VERSION@-1) unstable; urgency=low
+
+ * Autogenerated package, see NEWS file for ChangeLog.
+
+ -- Gwenole Beauchesne <gwenole.beauchesne@intel.com> @DATE@
diff --git a/debian/compat b/debian.upstream/compat
index 7ed6ff8..7ed6ff8 100644
--- a/debian/compat
+++ b/debian.upstream/compat
diff --git a/debian.upstream/control.in b/debian.upstream/control.in
new file mode 100644
index 0000000..78de060
--- /dev/null
+++ b/debian.upstream/control.in
@@ -0,0 +1,61 @@
+Source: libva
+Priority: extra
+Maintainer: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+Build-Depends: automake,
+ autotools-dev,
+ cdbs,
+ debhelper (>= 5),
+ libdrm-dev (>= @LIBDRM_VERSION@),
+ libgl-dev,
+ libtool,
+ libxext-dev,
+ libxfixes-dev,
+ pkg-config,
+ x11proto-xext-dev
+Standards-Version: 3.7.2
+Section: libs
+
+Package: libva-dev
+Section: libdevel
+Architecture: any
+Depends: libva1 (= ${binary:Version}),
+ libdrm-dev (>= @LIBDRM_VERSION@),
+ libgl-dev,
+ pkg-config
+Conflicts: libva-0.29-dev
+Replaces: libva-0.29-dev
+Description: Video Acceleration (VA) API for Linux -- development files
+ The libva library implements the Video Acceleration (VA) API for Linux.
+ The library loads a hardware dependendent driver.
+ .
+ This package provides the development environment for libva.
+
+Package: libva1
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Conflicts: libva-0.29-0
+Replaces: libva-0.29-0
+Provides: libva-0.29-0
+Description: Video Acceleration (VA) API for Linux -- runtime
+ The libva library implements the Video Acceleration (VA) API for Linux.
+ The library loads a hardware dependendent driver.
+
+Package: libva1-dbg
+Section: libdevel
+Architecture: any
+Depends: libva1 (= ${Source-Version})
+Description: Video Acceleration (VA) API for Linux -- runtime
+ The libva library implements the Video Acceleration (VA) API for Linux.
+ The library loads a hardware dependendent driver.
+ .
+ This package contains the debug files.
+
+Package: vainfo
+Architecture: any
+Depends: libva1 (= ${Source-Version})
+Description: Video Acceleration (VA) API for Linux -- info program
+ The libva library implements the Video Acceleration (VA) API for Linux.
+ The library loads a hardware dependendent driver.
+ .
+ This package contains the `vainfo' program.
diff --git a/debian/copyright b/debian.upstream/copyright
index 38b60ef..38b60ef 100644
--- a/debian/copyright
+++ b/debian.upstream/copyright
diff --git a/debian/libva-dev.dirs b/debian.upstream/libva-dev.dirs
index 4418816..4418816 100644
--- a/debian/libva-dev.dirs
+++ b/debian.upstream/libva-dev.dirs
diff --git a/debian.upstream/libva-dev.install b/debian.upstream/libva-dev.install
new file mode 100644
index 0000000..2611cdb
--- /dev/null
+++ b/debian.upstream/libva-dev.install
@@ -0,0 +1,3 @@
+debian/tmp/usr/include/va/va*.h
+debian/tmp/usr/lib/libva*.so
+debian/tmp/usr/lib/pkgconfig/libva*.pc
diff --git a/debian/libva1.dirs b/debian.upstream/libva1.dirs
index 6845771..6845771 100644
--- a/debian/libva1.dirs
+++ b/debian.upstream/libva1.dirs
diff --git a/debian.upstream/libva1.install b/debian.upstream/libva1.install
new file mode 100644
index 0000000..ddfd8ed
--- /dev/null
+++ b/debian.upstream/libva1.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/libva.so.*
+debian/tmp/usr/lib/libva-*.so.*
diff --git a/debian.upstream/rules b/debian.upstream/rules
new file mode 100644
index 0000000..40b76be
--- /dev/null
+++ b/debian.upstream/rules
@@ -0,0 +1,14 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/utils.mk
+
+# Allow SMP build
+ifeq ($(DEBIAN_BUILD_NCPUS),)
+ DEBIAN_BUILD_NCPUS = $(shell /usr/bin/getconf _NPROCESSORS_ONLN)
+endif
+ifneq ($(DEBIAN_BUILD_NCPUS),)
+ EXTRA_MAKE_FLAGS += -j$(DEBIAN_BUILD_NCPUS)
+endif
+MAKE += $(EXTRA_MAKE_FLAGS)
diff --git a/debian.upstream/vainfo.install b/debian.upstream/vainfo.install
new file mode 100644
index 0000000..8ef46a0
--- /dev/null
+++ b/debian.upstream/vainfo.install
@@ -0,0 +1 @@
+debian/tmp/usr/bin/vainfo \ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 1f60620..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,27 +0,0 @@
-libva (0.24-1) unstable; urgency=low
-
- * Updated to v0.24
- * Display attributes added
- * H264 parameter fixes
- * Swapped vaGetConfigAttributes and vaQueryConfigAttributes
-
- -- Waldo Bastian <waldo.bastian@intel.com> Thu, 20 Sep 2007 15:08:04 -0700
-
- * Updated to v0.22
- * VAImage and VASubpicture added
-
- -- Waldo Bastian <waldo.bastian@intel.com> Fri, 07 Sep 2007 04:32:28 -0700
-
- * Updated to v0.20
- * Clean up & exporting DRI interface
-
- -- Waldo Bastian <waldo.bastian@intel.com> Thu, 09 Aug 2007 11:49:43 -0700
-
- * Add VA_INVALID_SURFACE
-
- -- Waldo Bastian <waldo.bastian@intel.com> Wed, 11 Jul 2007 17:24:10 -0700
-
- * Initial release of libva
-
- -- Waldo Bastian <waldo.bastian@intel.com> Mon, 18 Jun 2007 21:35:31 -0700
-
diff --git a/debian/control b/debian/control
deleted file mode 100644
index 7ad39bc..0000000
--- a/debian/control
+++ /dev/null
@@ -1,36 +0,0 @@
-Source: libva
-Priority: extra
-Maintainer: Waldo Bastian <waldo.bastian@intel.com>
-Build-Depends: debhelper (>= 5),
- autotools-dev,
- libdrm-dev (>= 2.3.0),
- mesa-common-dev,
- x11proto-gl-dev,
- x11proto-xext-dev,
- libxext-dev,
- pkg-config
-Standards-Version: 3.7.2
-Section: libs
-
-Package: libva-dev
-Section: libdevel
-Architecture: any
-Depends: libva1 (= ${binary:Version}),
- libdrm-dev (>= 2.3.0),
- pkg-config
-Description: Video Acceleration (VA) API for Linux -- development files
- The libva library implements the Video Acceleration (VA) API for Linux.
- The library loads a hardware dependendent driver.
- .
- This package provides the development environment for libva.
-
-Package: libva1
-Section: libs
-Architecture: any
-Depends: libx11-6,
- libxext6,
- libdrm2 (>= 2.3.0)
-Description: Video Acceleration (VA) API for Linux -- runtime
- The libva library implements the Video Acceleration (VA) API for Linux.
- The library loads a hardware dependendent driver.
-
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index ca882bb..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/sbin
diff --git a/debian/files b/debian/files
deleted file mode 100644
index bbaff89..0000000
--- a/debian/files
+++ /dev/null
@@ -1,2 +0,0 @@
-libva-dev_0.24-1_i386.deb libdevel extra
-libva1_0.24-1_i386.deb libs extra
diff --git a/debian/libva-dev.install b/debian/libva-dev.install
deleted file mode 100644
index d86b3bf..0000000
--- a/debian/libva-dev.install
+++ /dev/null
@@ -1,8 +0,0 @@
-debian/tmp/usr/include/va.h
-debian/tmp/usr/include/va_x11.h
-debian/tmp/usr/include/va_backend.h
-debian/tmp/usr/include/va_dri.h
-debian/tmp/usr/X11R6/lib/modules/dri/dummy_drv_video.*
-debian/tmp/usr/lib/libva.la
-debian/tmp/usr/lib/libva.so
-debian/tmp/usr/lib/pkgconfig/libva.pc
diff --git a/debian/libva-dev.substvars b/debian/libva-dev.substvars
deleted file mode 100644
index 17c2baa..0000000
--- a/debian/libva-dev.substvars
+++ /dev/null
@@ -1 +0,0 @@
-shlibs:Depends=libc6 (>= 2.6-1)
diff --git a/debian/libva1.install b/debian/libva1.install
deleted file mode 100644
index 499e94b..0000000
--- a/debian/libva1.install
+++ /dev/null
@@ -1,2 +0,0 @@
-debian/tmp/usr/lib/libva.so.*
-debian/tmp/usr/bin/vainfo
diff --git a/debian/libva1.substvars b/debian/libva1.substvars
deleted file mode 100644
index 9e3d1d8..0000000
--- a/debian/libva1.substvars
+++ /dev/null
@@ -1 +0,0 @@
-shlibs:Depends=libc6 (>= 2.6-1), libx11-6, libxext6
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 60fbc95..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-# shared library versions, option 1
-#version=2.0.5
-#major=2
-# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
-version=`ls src/.libs/lib*.so.* | \
- awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
-#major=`ls src/.libs/lib*.so.* | \
-# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
-
-config.status: configure
- dh_testdir
- # Add here commands to configure the package.
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
- cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
- cp -f /usr/share/misc/config.guess config.guess
-endif
- ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
-
-
-build: build-stamp
-build-stamp: config.status
- dh_testdir
-
- # Add here commands to compile the package.
- $(MAKE)
-
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- # Add here commands to clean up after the build process.
- -$(MAKE) distclean
- rm -f config.sub config.guess
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Add here commands to install the package into debian/tmp
- $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
- dh_install
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_installinit
-# dh_installcron
-# dh_installinfo
- dh_installman
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
-# dh_perl
-# dh_python
-# dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
diff --git a/doc/Doxyfile b/doc/Doxyfile
new file mode 100644
index 0000000..920dd3f
--- /dev/null
+++ b/doc/Doxyfile
@@ -0,0 +1,1679 @@
+# Doxyfile 1.7.3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = VA-API
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is
+# included in the documentation. The maximum height of the logo should not
+# exceed 55 pixels and the maximum width should not exceed 200 pixels.
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH = $(VA_HEADER_DIR)
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful if your file system
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also makes the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = YES
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penalty.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will roughly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespaces are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = YES
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper type resolution of all parameters of a function it will reject a
+# match between the prototype and the implementation of a member function even if there is only one candidate or it is obvious which candidate to choose by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
+# will still accept a match between prototype and implementation in such cases.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or macro consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and macros in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = $(VA_HEADER_FILES)
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
+# *.f90 *.f *.for *.vhd *.vhdl
+
+FILE_PATTERNS = *.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS = */test/*
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty or if
+# non of the patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
+# and it is also possible to disable source filtering for a specific pattern
+# using *.ext= (so without naming a filter). This option only has effect when
+# FILTER_SOURCE_FILES is enabled.
+
+FILTER_SOURCE_PATTERNS =
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html-out
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER = $(VA_HTML_FOOTER)
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [0,1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+# Note that a value of 0 will completely suppress the enum values from appearing in the overview section.
+
+ENUM_VALUES_PER_LINE = 1
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
+# (see http://www.mathjax.org) which uses client side Javascript for the
+# rendering instead of using prerendered bitmaps. Use this if you do not
+# have LaTeX installed or if you want to formulas look prettier in the HTML
+# output. When enabled you also need to install MathJax separately and
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you need to specify the location relative to the
+# HTML output directory using the MATHJAX_RELPATH option. The destination
+# directory should contain the MathJax.js script. For instance, if the mathjax
+# directory is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the mathjax.org site, so you can quickly see the result without installing
+# MathJax, but it is strongly recommended to install a local copy of MathJax
+# before deployment.
+
+MATHJAX_RELPATH = http://www.mathjax.org/mathjax
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvantages are that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition that overrules the definition found in the source code.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all references to function-like macros
+# that are alone on a line, have an all uppercase name, and do not end with a
+# semicolon, because these will confuse the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option also works with HAVE_DOT disabled, but it is recommended to
+# install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS = 0
+
+# By default doxygen will write a font called Helvetica to the output
+# directory and reference it in all dot files that doxygen generates.
+# When you want a differently looking font you can specify the font name
+# using DOT_FONTNAME. You need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will generate a graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, svg, gif or svg.
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the
+# \mscfile command).
+
+MSCFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = YES
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..2770ecb
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,57 @@
+# Copyright (c) 2007-2011 Intel Corporation. All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sub license, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice (including the
+# next paragraph) shall be included in all copies or substantial portions
+# of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+all: html
+install-data-local: install-html
+
+EXTRA_DIST = \
+ Doxyfile \
+ $(NULL)
+
+VA_HEADER_DIR = $(top_srcdir)/va
+VA_HEADER_FILES = \
+ $(VA_HEADER_DIR)/va.h \
+ $(VA_HEADER_DIR)/va_enc.h \
+ $(VA_HEADER_DIR)/va_enc_h264.h \
+ $(VA_HEADER_DIR)/va_vpp.h \
+ $(NULL)
+
+VA_HTML_FOOTER = va_footer.html
+VA_HTML_FRAGMENTS = $(VA_HTML_FOOTER)
+
+export VA_HEADER_DIR
+export VA_HEADER_FILES
+export VA_HTML_FOOTER
+html-out/index.html: Doxyfile $(VA_HEADER_FILES) $(VA_HTML_FRAGMENTS)
+ $(DOXYGEN) $<
+
+if ENABLE_DOCS
+html: html-out/index.html
+install-html-local:
+ install -d $(DESTDIR)$(docdir)/html
+ install -m 0644 html-out/* $(DESTDIR)$(docdir)/html
+uninstall-local:
+ rm -rf $(DESTDIR)$(docdir)/html
+endif
+
+# Extra clean files so that maintainer-clean removes *everything*
+MAINTAINERCLEANFILES = Makefile.in
diff --git a/doc/va_footer.html b/doc/va_footer.html
new file mode 100644
index 0000000..9f1875c
--- /dev/null
+++ b/doc/va_footer.html
@@ -0,0 +1,4 @@
+<hr class="footer"/><address class="footer"><small>
+Generated for $projectname by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion</small></address>
+</body>
+</html>
diff --git a/dummy_drv_video/Makefile.am b/dummy_drv_video/Makefile.am
index 2ca506c..245e6e8 100644
--- a/dummy_drv_video/Makefile.am
+++ b/dummy_drv_video/Makefile.am
@@ -22,6 +22,7 @@
INCLUDES = -I$(top_srcdir)
+if BUILD_DUMMY_DRIVER
dummy_drv_video_la_LTLIBRARIES = dummy_drv_video.la
dummy_drv_video_ladir = $(LIBVA_DRIVERS_PATH)
dummy_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined
@@ -29,3 +30,4 @@ dummy_drv_video_la_LIBADD = $(top_builddir)/va/$(libvabackendlib)
dummy_drv_video_la_DEPENDENCIES = $(top_builddir)/va/$(libvabackendlib)
dummy_drv_video_la_SOURCES = dummy_drv_video.c object_heap.c
noinst_HEADERS = dummy_drv_video.h object_heap.h
+endif
diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am
new file mode 100644
index 0000000..f595413
--- /dev/null
+++ b/pkgconfig/Makefile.am
@@ -0,0 +1,47 @@
+# Copyright (c) 2007 Intel Corporation. All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sub license, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice (including the
+# next paragraph) shall be included in all copies or substantial portions
+# of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+pcfiles = libva.pc
+pcfiles += libva-tpi.pc
+pcfiles += libva-x11.pc
+if USE_GLX
+pcfiles += libva-glx.pc
+endif
+if USE_EGL
+pcfiles += libva-egl.pc
+endif
+
+all_pcfiles_in = libva.pc.in
+all_pcfiles_in += libva-tpi.pc.in
+all_pcfiles_in += libva-x11.pc.in
+all_pcfiles_in += libva-glx.pc.in
+all_pcfiles_in += libva-egl.pc.in
+
+pkgconfigdir = @pkgconfigdir@
+pkgconfig_DATA = $(pcfiles)
+
+EXTRA_DIST = $(all_pcfiles_in)
+
+DISTCLEANFILES = $(pcfiles)
+
+# Extra clean files so that maintainer-clean removes *everything*
+MAINTAINERCLEANFILES = Makefile.in
diff --git a/libva-egl.pc.in b/pkgconfig/libva-egl.pc.in
index 3d621b2..d80fcc8 100644
--- a/libva-egl.pc.in
+++ b/pkgconfig/libva-egl.pc.in
@@ -7,7 +7,7 @@ display=egl
Name: libva-${display}
Description: Userspace Video Acceleration (VA) ${display} interface
Requires: libva
-Version: @PACKAGE_VERSION@
+Version: @VA_API_VERSION@
Libs: -L${libdir} -lva-${display}
Cflags: -I${includedir}
diff --git a/libva-glx.pc.in b/pkgconfig/libva-glx.pc.in
index 2019915..8599866 100644
--- a/libva-glx.pc.in
+++ b/pkgconfig/libva-glx.pc.in
@@ -7,6 +7,6 @@ display=glx
Name: libva-${display}
Description: Userspace Video Acceleration (VA) ${display} interface
Requires: libva
-Version: @PACKAGE_VERSION@
+Version: @VA_API_VERSION@
Libs: -L${libdir} -lva-${display}
Cflags: -I${includedir}
diff --git a/libva-tpi.pc.in b/pkgconfig/libva-tpi.pc.in
index 43616c0..bc7fdd7 100644
--- a/libva-tpi.pc.in
+++ b/pkgconfig/libva-tpi.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
Name: libva-tpi
Description: Userspace Video Acceleration (VA) 3rd party interface
Requires: libva
-Version: @PACKAGE_VERSION@
+Version: @VA_API_VERSION@
Libs: -L${libdir} -lva-tpi
Cflags: -I${includedir}
diff --git a/libva-x11.pc.in b/pkgconfig/libva-x11.pc.in
index 6dde07f..4e7330c 100644
--- a/libva-x11.pc.in
+++ b/pkgconfig/libva-x11.pc.in
@@ -7,6 +7,6 @@ display=x11
Name: libva-${display}
Description: Userspace Video Acceleration (VA) ${display} interface
Requires: libva
-Version: @PACKAGE_VERSION@
+Version: @VA_API_VERSION@
Libs: -L${libdir} -lva-${display}
Cflags: -I${includedir}
diff --git a/libva.pc.in b/pkgconfig/libva.pc.in
index 60f1483..8b03f98 100644
--- a/libva.pc.in
+++ b/pkgconfig/libva.pc.in
@@ -6,6 +6,6 @@ driverdir=@LIBVA_DRIVERS_PATH@
Name: libva
Description: Userspace Video Acceleration (VA) core interface
-Version: @PACKAGE_VERSION@
+Version: @VA_API_VERSION@
Libs: -L${libdir} -lva
Cflags: -I${includedir}
diff --git a/test/Makefile.am b/test/Makefile.am
index c55f6cb..ad95136 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -23,6 +23,6 @@
AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/test/basic -I$(top_srcdir)/src/x11
-SUBDIRS = basic decode encode putsurface vainfo
+SUBDIRS = basic decode encode putsurface vainfo transcode
-EXTRA_DIST = loadsurface.h loadsurface_yuv.h \ No newline at end of file
+EXTRA_DIST = loadsurface.h loadsurface_yuv.h
diff --git a/test/android_winsys.cpp b/test/android_winsys.cpp
index ba75bdf..897d936 100644
--- a/test/android_winsys.cpp
+++ b/test/android_winsys.cpp
@@ -1,13 +1,5 @@
#include <ui/DisplayInfo.h>
-namespace android {
- class Test {
- public:
- static const sp<ISurface>& getISurface(const sp<Surface>& s) {
- return s->getISurface();
- }
- };
-};
#define min(a,b) (a<b?a:b)
#define SURFACE_CREATE(client,surface_ctrl,android_surface, android_isurface, x, y, win_width, win_height) \
diff --git a/test/basic/test_08.c b/test/basic/test_08.c
index c4276f0..a5b3ecf 100644
--- a/test/basic/test_08.c
+++ b/test/basic/test_08.c
@@ -66,7 +66,7 @@ test_size_t test_sizes[] = {
void test()
{
VASurfaceID surfaces[NUM_SIZES+1];
- int i;
+ unsigned int i;
memset(surfaces, 0xff, sizeof(surfaces));
diff --git a/test/basic/test_10.c b/test/basic/test_10.c
index fefffe8..cc7bd8d 100644
--- a/test/basic/test_10.c
+++ b/test/basic/test_10.c
@@ -103,7 +103,7 @@ unsigned int buffer_sizes[] =
void test()
{
VABufferID buffer_ids[NUM_BUFFER_TYPES+1];
- int i;
+ unsigned int i;
memset(buffer_ids, 0xff, sizeof(buffer_ids));
for(i=0; i < NUM_BUFFER_TYPES; i++)
{
diff --git a/test/basic/test_11.c b/test/basic/test_11.c
index afb5e15..c9da4f8 100644
--- a/test/basic/test_11.c
+++ b/test/basic/test_11.c
@@ -104,7 +104,7 @@ void test()
{
VABufferID buffer_ids[NUM_BUFFER_TYPES+1];
uint32_t *input_data[NUM_BUFFER_TYPES];
- int i, j;
+ unsigned int i, j;
memset(buffer_ids, 0xff, sizeof(buffer_ids));
for(i=0; i < NUM_BUFFER_TYPES; i++)
{
diff --git a/test/basic/test_common.c b/test/basic/test_common.c
index ae730a4..5f93c25 100644
--- a/test/basic/test_common.c
+++ b/test/basic/test_common.c
@@ -96,12 +96,15 @@ const char *profile2string(VAProfile profile)
PROFILE(MPEG4Simple)
PROFILE(MPEG4AdvancedSimple)
PROFILE(MPEG4Main)
+ PROFILE(H263Baseline)
PROFILE(H264Baseline)
PROFILE(H264Main)
PROFILE(H264High)
+ PROFILE(H264ConstrainedBaseline)
PROFILE(VC1Simple)
PROFILE(VC1Main)
PROFILE(VC1Advanced)
+ PROFILE(JPEGBaseline)
}
ASSERT(0);
return "Unknown";
@@ -118,6 +121,8 @@ const char *entrypoint2string(VAEntrypoint entrypoint)
ENTRYPOINT(IDCT)
ENTRYPOINT(MoComp)
ENTRYPOINT(Deblocking)
+ ENTRYPOINT(EncSlice)
+ ENTRYPOINT(EncPicture)
}
ASSERT(0);
return "Unknown";
diff --git a/test/decode/mpeg2vldemo.cpp b/test/decode/mpeg2vldemo.cpp
index d0019a5..9246dfe 100644
--- a/test/decode/mpeg2vldemo.cpp
+++ b/test/decode/mpeg2vldemo.cpp
@@ -220,8 +220,12 @@ int main(int argc,char **argv)
&attrib, 1,&config_id);
CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints");
- va_status = vaCreateSurfaces(va_dpy,CLIP_WIDTH,CLIP_HEIGHT,
- VA_RT_FORMAT_YUV420, 1, &surface_id, NULL, 0);
+ va_status = vaCreateSurfaces(
+ va_dpy,
+ VA_RT_FORMAT_YUV420, CLIP_WIDTH, CLIP_HEIGHT,
+ &surface_id, 1,
+ NULL, 0
+ );
CHECK_VASTATUS(va_status, "vaCreateSurfaces");
/* Create a context for this decode pipe */
diff --git a/test/encode/avcenc.c b/test/encode/avcenc.c
index 17411d8..71c0644 100644
--- a/test/encode/avcenc.c
+++ b/test/encode/avcenc.c
@@ -13,13 +13,17 @@
#include <unistd.h>
+#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <assert.h>
#include <time.h>
+#include <pthread.h>
+
#include <va/va.h>
+#include <va/va_enc_h264.h>
#include <va/va_x11.h>
#define NAL_REF_IDC_NONE 0
@@ -51,23 +55,61 @@
static Display *x11_display;
static VADisplay va_dpy;
-static VAContextID context_id;
-static VAConfigID config_id;
static int picture_width, picture_width_in_mbs;
static int picture_height, picture_height_in_mbs;
static int frame_size;
static unsigned char *newImageBuffer = 0;
-static int codedbuf_size;
static int qp_value = 26;
-static int log2_max_frame_num_minus4 = 0;
-static int pic_order_cnt_type = 0;
-static int log2_max_pic_order_cnt_lsb_minus4 = 0;
-static int entropy_coding_mode_flag = ENTROPY_MODE_CABAC;
-static int deblocking_filter_control_present_flag = 1;
-static int frame_mbs_only_flag = 1;
+static int intra_period = 30;
+static int pb_period = 5;
+static int frame_bit_rate = -1;
+
+#define MAX_SLICES 32
+
+static int
+build_packed_pic_buffer(unsigned char **header_buffer);
+
+static int
+build_packed_seq_buffer(unsigned char **header_buffer);
+
+struct upload_thread_param
+{
+ FILE *yuv_fp;
+ VASurfaceID surface_id;
+};
+
+static void
+upload_yuv_to_surface(FILE *yuv_fp, VASurfaceID surface_id);
+
+static struct {
+ VAProfile profile;
+ VAEncSequenceParameterBufferH264 seq_param;
+ VAEncPictureParameterBufferH264 pic_param;
+ VAEncSliceParameterBufferH264 slice_param[MAX_SLICES];
+ VAContextID context_id;
+ VAConfigID config_id;
+ VABufferID seq_param_buf_id; /* Sequence level parameter */
+ VABufferID pic_param_buf_id; /* Picture level parameter */
+ VABufferID slice_param_buf_id[MAX_SLICES]; /* Slice level parameter, multil slices */
+ VABufferID codedbuf_buf_id; /* Output buffer, compressed data */
+ VABufferID packed_seq_header_param_buf_id;
+ VABufferID packed_seq_buf_id;
+ VABufferID packed_pic_header_param_buf_id;
+ VABufferID packed_pic_buf_id;
+ VABufferID misc_parameter_hrd_buf_id;
+
+ int num_slices;
+ int codedbuf_i_size;
+ int codedbuf_pb_size;
+ int current_input_surface;
+ int rate_control_method;
+ struct upload_thread_param upload_thread_param;
+ pthread_t upload_thread_id;
+ int upload_thread_value;
+} avcenc_context;
static void create_encode_pipe()
{
@@ -84,7 +126,7 @@ static void create_encode_pipe()
va_status = vaInitialize(va_dpy, &major_ver, &minor_ver);
CHECK_VASTATUS(va_status, "vaInitialize");
- vaQueryConfigEntrypoints(va_dpy, VAProfileH264Baseline, entrypoints,
+ vaQueryConfigEntrypoints(va_dpy, avcenc_context.profile, entrypoints,
&num_entrypoints);
for (slice_entrypoint = 0; slice_entrypoint < num_entrypoints; slice_entrypoint++) {
@@ -100,7 +142,7 @@ static void create_encode_pipe()
/* find out the format for the render target, and rate control mode */
attrib[0].type = VAConfigAttribRTFormat;
attrib[1].type = VAConfigAttribRateControl;
- vaGetConfigAttributes(va_dpy, VAProfileH264Baseline, VAEntrypointEncSlice,
+ vaGetConfigAttributes(va_dpy, avcenc_context.profile, VAEntrypointEncSlice,
&attrib[0], 2);
if ((attrib[0].value & VA_RT_FORMAT_YUV420) == 0) {
@@ -108,32 +150,32 @@ static void create_encode_pipe()
assert(0);
}
- if ((attrib[1].value & VA_RC_VBR) == 0) {
+ if ((attrib[1].value & avcenc_context.rate_control_method) == 0) {
/* Can't find matched RC mode */
- printf("VBR mode doesn't found, exit\n");
+ printf("Can't find the desired RC mode, exit\n");
assert(0);
}
attrib[0].value = VA_RT_FORMAT_YUV420; /* set to desired RT format */
- attrib[1].value = VA_RC_VBR; /* set to desired RC mode */
+ attrib[1].value = avcenc_context.rate_control_method; /* set to desired RC mode */
- va_status = vaCreateConfig(va_dpy, VAProfileH264Baseline, VAEntrypointEncSlice,
- &attrib[0], 2,&config_id);
+ va_status = vaCreateConfig(va_dpy, avcenc_context.profile, VAEntrypointEncSlice,
+ &attrib[0], 2,&avcenc_context.config_id);
CHECK_VASTATUS(va_status, "vaCreateConfig");
/* Create a context for this decode pipe */
- va_status = vaCreateContext(va_dpy, config_id,
+ va_status = vaCreateContext(va_dpy, avcenc_context.config_id,
picture_width, picture_height,
VA_PROGRESSIVE,
0, 0,
- &context_id);
+ &avcenc_context.context_id);
CHECK_VASTATUS(va_status, "vaCreateContext");
}
static void destory_encode_pipe()
{
- vaDestroyContext(va_dpy,context_id);
- vaDestroyConfig(va_dpy,config_id);
+ vaDestroyContext(va_dpy,avcenc_context.context_id);
+ vaDestroyConfig(va_dpy,avcenc_context.config_id);
vaTerminate(va_dpy);
XCloseDisplay(x11_display);
}
@@ -143,83 +185,94 @@ static void destory_encode_pipe()
* The encode pipe resource define
*
***************************************************/
-static VABufferID seq_parameter = VA_INVALID_ID; /*Sequence level parameter*/
-static VABufferID pic_parameter = VA_INVALID_ID; /*Picture level parameter*/
-static VABufferID slice_parameter = VA_INVALID_ID; /*Slice level parameter, multil slices*/
-
-static VABufferID coded_buf; /*Output buffer, compressed data*/
-
-#define SID_NUMBER 3
-#define SID_INPUT_PICTURE 0
-#define SID_REFERENCE_PICTURE 1
-#define SID_RECON_PICTURE 2
+#define SID_INPUT_PICTURE_0 0
+#define SID_INPUT_PICTURE_1 1
+#define SID_REFERENCE_PICTURE_L0 2
+#define SID_REFERENCE_PICTURE_L1 3
+#define SID_RECON_PICTURE 4
+#define SID_NUMBER SID_RECON_PICTURE + 1
static VASurfaceID surface_ids[SID_NUMBER];
+static int frame_number;
+static int enc_frame_number;
+
/***************************************************/
-static void alloc_encode_resource()
+static void *
+upload_thread_function(void *data)
{
- VAStatus va_status;
-
- seq_parameter = VA_INVALID_ID;
- pic_parameter = VA_INVALID_ID;
- slice_parameter = VA_INVALID_ID;
+ struct upload_thread_param *param = data;
- //1. Create sequence parameter set
- {
- VAEncSequenceParameterBufferH264 seq_h264 = {0};
+ upload_yuv_to_surface(param->yuv_fp, param->surface_id);
- seq_h264.level_idc = 30;
- seq_h264.picture_width_in_mbs = picture_width_in_mbs;
- seq_h264.picture_height_in_mbs = picture_height_in_mbs;
+ return NULL;
+}
- seq_h264.bits_per_second = 384*1000;
- seq_h264.initial_qp = qp_value;
- seq_h264.min_qp = 3;
+static void alloc_encode_resource(FILE *yuv_fp)
+{
+ VAStatus va_status;
- va_status = vaCreateBuffer(va_dpy, context_id,
- VAEncSequenceParameterBufferType,
- sizeof(seq_h264),1,&seq_h264,&seq_parameter);
- CHECK_VASTATUS(va_status,"vaCreateBuffer");;
- }
+ // Create surface
+ va_status = vaCreateSurfaces(
+ va_dpy,
+ VA_RT_FORMAT_YUV420, picture_width, picture_height,
+ &surface_ids[0], SID_NUMBER,
+ NULL, 0
+ );
- //2. Create surface
- va_status = vaCreateSurfaces(va_dpy, picture_width, picture_height,
- VA_RT_FORMAT_YUV420, SID_NUMBER, &surface_ids[0]);
CHECK_VASTATUS(va_status, "vaCreateSurfaces");
- //3. Create coded buffer
- {
- va_status = vaCreateBuffer(va_dpy,context_id,VAEncCodedBufferType,
- codedbuf_size, 1, NULL, &coded_buf);
+ newImageBuffer = (unsigned char *)malloc(frame_size);
- CHECK_VASTATUS(va_status,"vaBeginPicture");
- }
+ /* firstly upload YUV data to SID_INPUT_PICTURE_1 */
+ avcenc_context.upload_thread_param.yuv_fp = yuv_fp;
+ avcenc_context.upload_thread_param.surface_id = surface_ids[SID_INPUT_PICTURE_1];
- newImageBuffer = (unsigned char *)malloc(frame_size);
+ avcenc_context.upload_thread_value = pthread_create(&avcenc_context.upload_thread_id,
+ NULL,
+ upload_thread_function,
+ (void*)&avcenc_context.upload_thread_param);
}
static void release_encode_resource()
{
+ pthread_join(avcenc_context.upload_thread_id, NULL);
free(newImageBuffer);
- //-3 Relese coded buffer
- vaDestroyBuffer(va_dpy, coded_buf);
-
- //-2 Release all the surfaces resource
+ // Release all the surfaces resource
vaDestroySurfaces(va_dpy, &surface_ids[0], SID_NUMBER);
-
- //-1 Destory the sequence level parameter
- vaDestroyBuffer(va_dpy, seq_parameter);
}
-static void begin_picture()
+static void avcenc_update_picture_parameter(int slice_type, int frame_num, int display_num, int is_idr)
{
+ VAEncPictureParameterBufferH264 *pic_param;
VAStatus va_status;
- va_status = vaBeginPicture(va_dpy, context_id, surface_ids[SID_INPUT_PICTURE]);
- CHECK_VASTATUS(va_status,"vaBeginPicture");
+
+ // Picture level
+ pic_param = &avcenc_context.pic_param;
+ pic_param->CurrPic.picture_id = surface_ids[SID_RECON_PICTURE];
+ pic_param->CurrPic.TopFieldOrderCnt = display_num * 2;
+ pic_param->ReferenceFrames[0].picture_id = surface_ids[SID_REFERENCE_PICTURE_L0];
+ pic_param->ReferenceFrames[1].picture_id = surface_ids[SID_REFERENCE_PICTURE_L1];
+ pic_param->ReferenceFrames[2].picture_id = VA_INVALID_ID;
+ assert(avcenc_context.codedbuf_buf_id != VA_INVALID_ID);
+ pic_param->coded_buf = avcenc_context.codedbuf_buf_id;
+ pic_param->frame_num = frame_num;
+ pic_param->pic_fields.bits.idr_pic_flag = !!is_idr;
+ pic_param->pic_fields.bits.reference_pic_flag = (slice_type != SLICE_TYPE_B);
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncPictureParameterBufferType,
+ sizeof(*pic_param), 1, pic_param,
+ &avcenc_context.pic_param_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
}
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+
static void upload_yuv_to_surface(FILE *yuv_fp, VASurfaceID surface_id)
{
VAImage surface_image;
@@ -268,80 +321,303 @@ static void upload_yuv_to_surface(FILE *yuv_fp, VASurfaceID surface_id)
u_src += (picture_width / 2);
v_src += (picture_width / 2);
}
- } else {
- /* FIXME: fix this later */
- assert(0);
+ } else if (surface_image.format.fourcc == VA_FOURCC_YV12 ||
+ surface_image.format.fourcc == VA_FOURCC_I420) {
+ const int U = surface_image.format.fourcc == VA_FOURCC_I420 ? 1 : 2;
+ const int V = surface_image.format.fourcc == VA_FOURCC_I420 ? 2 : 1;
+
+ u_dst = surface_p + surface_image.offsets[U];
+ v_dst = surface_p + surface_image.offsets[V];
+
+ for (row = 0; row < surface_image.height / 2; row++) {
+ memcpy(u_dst, u_src, surface_image.width / 2);
+ memcpy(v_dst, v_src, surface_image.width / 2);
+ u_dst += surface_image.pitches[U];
+ v_dst += surface_image.pitches[V];
+ u_src += (picture_width / 2);
+ v_src += (picture_width / 2);
+ }
}
vaUnmapBuffer(va_dpy, surface_image.buf);
vaDestroyImage(va_dpy, surface_image.image_id);
}
-static void prepare_input(FILE * yuv_fp, int intra_slice)
+static void avcenc_update_slice_parameter(int slice_type)
{
- static VAEncPictureParameterBufferH264 pic_h264;
- static VAEncSliceParameterBuffer slice_h264;
+ VAEncSliceParameterBufferH264 *slice_param;
VAStatus va_status;
- VABufferID tempID;
- VACodedBufferSegment *coded_buffer_segment = NULL;
- unsigned char *coded_mem;
+ int i;
- // Sequence level
- va_status = vaRenderPicture(va_dpy, context_id, &seq_parameter, 1);
- CHECK_VASTATUS(va_status,"vaRenderPicture");;
+ // Slice level
+ i = 0;
+ slice_param = &avcenc_context.slice_param[i];
+ slice_param->macroblock_address = 0;
+ slice_param->num_macroblocks = picture_height_in_mbs * picture_width_in_mbs;
+ slice_param->pic_parameter_set_id = 0;
+ slice_param->slice_type = slice_type;
+ slice_param->direct_spatial_mv_pred_flag = 0;
+ slice_param->num_ref_idx_l0_active_minus1 = 0; /* FIXME: ??? */
+ slice_param->num_ref_idx_l1_active_minus1 = 0;
+ slice_param->cabac_init_idc = 0;
+ slice_param->slice_qp_delta = 0;
+ slice_param->disable_deblocking_filter_idc = 0;
+ slice_param->slice_alpha_c0_offset_div2 = 2;
+ slice_param->slice_beta_offset_div2 = 2;
+ slice_param->idr_pic_id = 0;
+
+ /* FIXME: fill other fields */
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncSliceParameterBufferType,
+ sizeof(*slice_param), 1, slice_param,
+ &avcenc_context.slice_param_buf_id[i]);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");;
+ i++;
+
+#if 0
+ slice_param = &avcenc_context.slice_param[i];
+ slice_param->macroblock_address = picture_height_in_mbs * picture_width_in_mbs / 2;
+ slice_param->num_macroblocks = picture_height_in_mbs * picture_width_in_mbs / 2;
+ slice_param->pic_parameter_set_id = 0;
+ slice_param->slice_type = slice_type;
+ slice_param->direct_spatial_mv_pred_flag = 0;
+ slice_param->num_ref_idx_l0_active_minus1 = 0; /* FIXME: ??? */
+ slice_param->num_ref_idx_l1_active_minus1 = 0;
+ slice_param->cabac_init_idc = 0;
+ slice_param->slice_qp_delta = 0;
+ slice_param->disable_deblocking_filter_idc = 0;
+ slice_param->slice_alpha_c0_offset_div2 = 2;
+ slice_param->slice_beta_offset_div2 = 2;
+ slice_param->idr_pic_id = 0;
+
+ /* FIXME: fill other fields */
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncSliceParameterBufferType,
+ sizeof(*slice_param), 1, slice_param,
+ &avcenc_context.slice_param_buf_id[i]);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");;
+ i++;
+#endif
- // Copy Image to target surface according input YUV data.
- upload_yuv_to_surface(yuv_fp, surface_ids[SID_INPUT_PICTURE]);
+ avcenc_context.num_slices = i;
+}
- // Picture level
- pic_h264.reference_picture = surface_ids[SID_REFERENCE_PICTURE];
- pic_h264.reconstructed_picture = surface_ids[SID_RECON_PICTURE];
- pic_h264.coded_buf = coded_buf;
- pic_h264.picture_width = picture_width;
- pic_h264.picture_height = picture_height;
- pic_h264.last_picture = 0;
- if (pic_parameter != VA_INVALID_ID) {
- vaDestroyBuffer(va_dpy, pic_parameter);
- }
- va_status = vaCreateBuffer(va_dpy, context_id,VAEncPictureParameterBufferType,
- sizeof(pic_h264),1,&pic_h264,&pic_parameter);
+static int begin_picture(FILE *yuv_fp, int frame_num, int display_num, int slice_type, int is_idr)
+{
+ VAStatus va_status;
+
+ if (avcenc_context.upload_thread_value != 0) {
+ fprintf(stderr, "FATAL error!!!\n");
+ exit(1);
+ }
+
+ pthread_join(avcenc_context.upload_thread_id, NULL);
+
+ avcenc_context.upload_thread_value = -1;
+
+ if (avcenc_context.current_input_surface == SID_INPUT_PICTURE_0)
+ avcenc_context.current_input_surface = SID_INPUT_PICTURE_1;
+ else
+ avcenc_context.current_input_surface = SID_INPUT_PICTURE_0;
+
+ if (frame_num == 0) {
+ VAEncPackedHeaderParameterBuffer packed_header_param_buffer;
+ unsigned int length_in_bits, offset_in_bytes;
+ unsigned char *packed_seq_buffer = NULL, *packed_pic_buffer = NULL;
+
+ assert(slice_type == SLICE_TYPE_I);
+ length_in_bits = build_packed_seq_buffer(&packed_seq_buffer);
+ offset_in_bytes = 0;
+ packed_header_param_buffer.type = VAEncPackedHeaderSequence;
+ packed_header_param_buffer.bit_length = length_in_bits;
+ packed_header_param_buffer.has_emulation_bytes = 0;
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncPackedHeaderParameterBufferType,
+ sizeof(packed_header_param_buffer), 1, &packed_header_param_buffer,
+ &avcenc_context.packed_seq_header_param_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncPackedHeaderDataBufferType,
+ (length_in_bits + 7) / 8, 1, packed_seq_buffer,
+ &avcenc_context.packed_seq_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+
+ length_in_bits = build_packed_pic_buffer(&packed_pic_buffer);
+ offset_in_bytes = 0;
+ packed_header_param_buffer.type = VAEncPackedHeaderPicture;
+ packed_header_param_buffer.bit_length = length_in_bits;
+ packed_header_param_buffer.has_emulation_bytes = 0;
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncPackedHeaderParameterBufferType,
+ sizeof(packed_header_param_buffer), 1, &packed_header_param_buffer,
+ &avcenc_context.packed_pic_header_param_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncPackedHeaderDataBufferType,
+ (length_in_bits + 7) / 8, 1, packed_pic_buffer,
+ &avcenc_context.packed_pic_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+
+ free(packed_seq_buffer);
+ free(packed_pic_buffer);
+ }
+
+ /* sequence parameter set */
+ VAEncSequenceParameterBufferH264 *seq_param = &avcenc_context.seq_param;
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncSequenceParameterBufferType,
+ sizeof(*seq_param), 1, seq_param,
+ &avcenc_context.seq_param_buf_id);
CHECK_VASTATUS(va_status,"vaCreateBuffer");
- va_status = vaRenderPicture(va_dpy,context_id, &pic_parameter, 1);
- CHECK_VASTATUS(va_status,"vaRenderPicture");
-
- // clean old memory
- va_status = vaMapBuffer(va_dpy,coded_buf,(void **)(&coded_buffer_segment));
- CHECK_VASTATUS(va_status,"vaMapBuffer");
- coded_mem = coded_buffer_segment->buf;
- memset(coded_mem, 0, coded_buffer_segment->size);
- vaUnmapBuffer(va_dpy, coded_buf);
-
- // Slice level
- slice_h264.start_row_number = 0;
- slice_h264.slice_height = picture_height/16; /* Measured by MB */
- slice_h264.slice_flags.bits.is_intra = intra_slice;
- slice_h264.slice_flags.bits.disable_deblocking_filter_idc = 0;
- if ( slice_parameter != VA_INVALID_ID){
- vaDestroyBuffer(va_dpy, slice_parameter);
- }
- va_status = vaCreateBuffer(va_dpy,context_id,VAEncSliceParameterBufferType,
- sizeof(slice_h264),1,&slice_h264,&slice_parameter);
- CHECK_VASTATUS(va_status,"vaCreateBuffer");;
- va_status = vaRenderPicture(va_dpy,context_id, &slice_parameter, 1);
- CHECK_VASTATUS(va_status,"vaRenderPicture");
- // Prepare for next picture
- tempID = surface_ids[SID_RECON_PICTURE];
- surface_ids[SID_RECON_PICTURE] = surface_ids[SID_REFERENCE_PICTURE];
- surface_ids[SID_REFERENCE_PICTURE] = tempID;
+
+ /* hrd parameter */
+ VAEncMiscParameterBuffer *misc_param;
+ VAEncMiscParameterHRD *misc_hrd_param;
+ vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncMiscParameterBufferType,
+ sizeof(VAEncMiscParameterBuffer) + sizeof(VAEncMiscParameterRateControl),
+ 1,
+ NULL,
+ &avcenc_context.misc_parameter_hrd_buf_id);
+ CHECK_VASTATUS(va_status, "vaCreateBuffer");
+
+ vaMapBuffer(va_dpy,
+ avcenc_context.misc_parameter_hrd_buf_id,
+ (void **)&misc_param);
+ misc_param->type = VAEncMiscParameterTypeHRD;
+ misc_hrd_param = (VAEncMiscParameterHRD *)misc_param->data;
+
+ if (frame_bit_rate > 0) {
+ misc_hrd_param->initial_buffer_fullness = frame_bit_rate * 1024 * 4;
+ misc_hrd_param->buffer_size = frame_bit_rate * 1024 * 8;
+ } else {
+ misc_hrd_param->initial_buffer_fullness = 0;
+ misc_hrd_param->buffer_size = 0;
+ }
+
+ vaUnmapBuffer(va_dpy, avcenc_context.misc_parameter_hrd_buf_id);
+
+ /* slice parameter */
+ avcenc_update_slice_parameter(slice_type);
+
+ return 0;
}
-static void end_picture()
-{
+int avcenc_render_picture()
+{
VAStatus va_status;
+ VABufferID va_buffers[8];
+ unsigned int num_va_buffers = 0;
+ int i;
+
+ va_buffers[num_va_buffers++] = avcenc_context.seq_param_buf_id;
+ va_buffers[num_va_buffers++] = avcenc_context.pic_param_buf_id;
+
+ if (avcenc_context.packed_seq_header_param_buf_id != VA_INVALID_ID)
+ va_buffers[num_va_buffers++] = avcenc_context.packed_seq_header_param_buf_id;
+
+ if (avcenc_context.packed_seq_buf_id != VA_INVALID_ID)
+ va_buffers[num_va_buffers++] = avcenc_context.packed_seq_buf_id;
+
+ if (avcenc_context.packed_pic_header_param_buf_id != VA_INVALID_ID)
+ va_buffers[num_va_buffers++] = avcenc_context.packed_pic_header_param_buf_id;
+
+ if (avcenc_context.packed_pic_buf_id != VA_INVALID_ID)
+ va_buffers[num_va_buffers++] = avcenc_context.packed_pic_buf_id;
+
+ if (avcenc_context.misc_parameter_hrd_buf_id != VA_INVALID_ID)
+ va_buffers[num_va_buffers++] = avcenc_context.misc_parameter_hrd_buf_id;
- va_status = vaEndPicture(va_dpy,context_id);
+ va_status = vaBeginPicture(va_dpy,
+ avcenc_context.context_id,
+ surface_ids[avcenc_context.current_input_surface]);
+ CHECK_VASTATUS(va_status,"vaBeginPicture");
+
+ va_status = vaRenderPicture(va_dpy,
+ avcenc_context.context_id,
+ va_buffers,
+ num_va_buffers);
CHECK_VASTATUS(va_status,"vaRenderPicture");
+
+ for(i = 0; i < avcenc_context.num_slices; i++) {
+ va_status = vaRenderPicture(va_dpy,
+ avcenc_context.context_id,
+ &avcenc_context.slice_param_buf_id[i],
+ 1);
+ CHECK_VASTATUS(va_status,"vaRenderPicture");
+ }
+
+ va_status = vaEndPicture(va_dpy, avcenc_context.context_id);
+ CHECK_VASTATUS(va_status,"vaEndPicture");
+
+ return 0;
+}
+
+static int avcenc_destroy_buffers(VABufferID *va_buffers, unsigned int num_va_buffers)
+{
+ VAStatus va_status;
+ unsigned int i;
+
+ for (i = 0; i < num_va_buffers; i++) {
+ if (va_buffers[i] != VA_INVALID_ID) {
+ va_status = vaDestroyBuffer(va_dpy, va_buffers[i]);
+ CHECK_VASTATUS(va_status,"vaDestroyBuffer");
+ va_buffers[i] = VA_INVALID_ID;
+ }
+ }
+
+ return 0;
+}
+
+static void end_picture(int slice_type, int next_is_bpic)
+{
+ VABufferID tempID;
+
+ /* Prepare for next picture */
+ tempID = surface_ids[SID_RECON_PICTURE];
+
+ if (slice_type != SLICE_TYPE_B) {
+ if (next_is_bpic) {
+ surface_ids[SID_RECON_PICTURE] = surface_ids[SID_REFERENCE_PICTURE_L1];
+ surface_ids[SID_REFERENCE_PICTURE_L1] = tempID;
+ } else {
+ surface_ids[SID_RECON_PICTURE] = surface_ids[SID_REFERENCE_PICTURE_L0];
+ surface_ids[SID_REFERENCE_PICTURE_L0] = tempID;
+ }
+ } else {
+ if (!next_is_bpic) {
+ surface_ids[SID_RECON_PICTURE] = surface_ids[SID_REFERENCE_PICTURE_L0];
+ surface_ids[SID_REFERENCE_PICTURE_L0] = surface_ids[SID_REFERENCE_PICTURE_L1];
+ surface_ids[SID_REFERENCE_PICTURE_L1] = tempID;
+ }
+ }
+
+ avcenc_destroy_buffers(&avcenc_context.seq_param_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.pic_param_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.packed_seq_header_param_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.packed_seq_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.packed_pic_header_param_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.packed_pic_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.slice_param_buf_id[0], avcenc_context.num_slices);
+ avcenc_destroy_buffers(&avcenc_context.codedbuf_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.misc_parameter_hrd_buf_id, 1);
+
+ memset(avcenc_context.slice_param, 0, sizeof(avcenc_context.slice_param));
+ avcenc_context.num_slices = 0;
}
#define BITSTREAM_ALLOCATE_STEPPING 4096
@@ -354,18 +630,23 @@ struct __bitstream {
typedef struct __bitstream bitstream;
+#if 0
static int
get_coded_bitsteam_length(unsigned char *buffer, int buffer_length)
{
int i;
- for (i = buffer_length - 1; i >= 0; i--) {
- if (buffer[i])
+ for (i = 0; i < buffer_length - 3; i++) {
+ if (!buffer[i] &&
+ !buffer[i + 1] &&
+ !buffer[i + 2] &&
+ !buffer[i + 3])
break;
}
- return i + 1;
+ return i;
}
+#endif
static unsigned int
swap32(unsigned int val)
@@ -387,23 +668,15 @@ bitstream_start(bitstream *bs)
}
static void
-bitstream_end(bitstream *bs, FILE *avc_fp)
+bitstream_end(bitstream *bs)
{
int pos = (bs->bit_offset >> 5);
int bit_offset = (bs->bit_offset & 0x1f);
int bit_left = 32 - bit_offset;
- int length = (bs->bit_offset + 7) >> 3;
- size_t w_items;
if (bit_offset) {
bs->buffer[pos] = swap32((bs->buffer[pos] << bit_left));
}
-
- do {
- w_items = fwrite(bs->buffer, length, 1, avc_fp);
- } while (w_items != 1);
-
- free(bs->buffer);
}
static void
@@ -503,19 +776,13 @@ static void nal_header(bitstream *bs, int nal_ref_idc, int nal_unit_type)
static void sps_rbsp(bitstream *bs)
{
- int mb_width, mb_height;
- int frame_cropping_flag = 0;
- int frame_crop_bottom_offset = 0;
- int profile_idc = PROFILE_IDC_MAIN;
-
- mb_width = picture_width_in_mbs;
- mb_height = picture_height_in_mbs;
+ VAEncSequenceParameterBufferH264 *seq_param = &avcenc_context.seq_param;
+ int profile_idc = PROFILE_IDC_BASELINE;
- if (mb_height * 16 - picture_height) {
- frame_cropping_flag = 1;
- frame_crop_bottom_offset =
- (mb_height * 16 - picture_height) / (2 * (!frame_mbs_only_flag + 1));
- }
+ if (avcenc_context.profile == VAProfileH264High)
+ profile_idc = PROFILE_IDC_HIGH;
+ else if (avcenc_context.profile == VAProfileH264Main)
+ profile_idc = PROFILE_IDC_MAIN;
bitstream_put_ui(bs, profile_idc, 8); /* profile_idc */
bitstream_put_ui(bs, 0, 1); /* constraint_set0_flag */
@@ -523,48 +790,88 @@ static void sps_rbsp(bitstream *bs)
bitstream_put_ui(bs, 0, 1); /* constraint_set2_flag */
bitstream_put_ui(bs, 0, 1); /* constraint_set3_flag */
bitstream_put_ui(bs, 0, 4); /* reserved_zero_4bits */
- bitstream_put_ui(bs, 41, 8); /* level_idc */
- bitstream_put_ue(bs, 0); /* seq_parameter_set_id */
-
- if (profile_idc >= 100) {
- /* FIXME: fix for high profile */
- assert(0);
+ bitstream_put_ui(bs, seq_param->level_idc, 8); /* level_idc */
+ bitstream_put_ue(bs, seq_param->seq_parameter_set_id); /* seq_parameter_set_id */
+
+ if ( profile_idc == PROFILE_IDC_HIGH) {
+ bitstream_put_ue(bs, 1); /* chroma_format_idc = 1, 4:2:0 */
+ bitstream_put_ue(bs, 0); /* bit_depth_luma_minus8 */
+ bitstream_put_ue(bs, 0); /* bit_depth_chroma_minus8 */
+ bitstream_put_ui(bs, 0, 1); /* qpprime_y_zero_transform_bypass_flag */
+ bitstream_put_ui(bs, 0, 1); /* seq_scaling_matrix_present_flag */
}
- bitstream_put_ue(bs, log2_max_frame_num_minus4); /* log2_max_frame_num_minus4 */
- bitstream_put_ue(bs, pic_order_cnt_type); /* pic_order_cnt_type */
+ bitstream_put_ue(bs, seq_param->seq_fields.bits.log2_max_frame_num_minus4); /* log2_max_frame_num_minus4 */
+ bitstream_put_ue(bs, seq_param->seq_fields.bits.pic_order_cnt_type); /* pic_order_cnt_type */
- if (pic_order_cnt_type == 0)
- bitstream_put_ue(bs, log2_max_pic_order_cnt_lsb_minus4); /* log2_max_pic_order_cnt_lsb_minus4 */
+ if (seq_param->seq_fields.bits.pic_order_cnt_type == 0)
+ bitstream_put_ue(bs, seq_param->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4); /* log2_max_pic_order_cnt_lsb_minus4 */
else {
assert(0);
}
- bitstream_put_ue(bs, 1); /* num_ref_frames */
- bitstream_put_ui(bs, 0, 1); /* gaps_in_frame_num_value_allowed_flag */
+ bitstream_put_ue(bs, seq_param->max_num_ref_frames); /* num_ref_frames */
+ bitstream_put_ui(bs, 0, 1); /* gaps_in_frame_num_value_allowed_flag */
- bitstream_put_ue(bs, mb_width - 1); /* pic_width_in_mbs_minus1 */
- bitstream_put_ue(bs, mb_height - 1); /* pic_height_in_map_units_minus1 */
- bitstream_put_ui(bs, frame_mbs_only_flag, 1); /* frame_mbs_only_flag */
+ bitstream_put_ue(bs, seq_param->picture_width_in_mbs - 1); /* pic_width_in_mbs_minus1 */
+ bitstream_put_ue(bs, seq_param->picture_height_in_mbs - 1); /* pic_height_in_map_units_minus1 */
+ bitstream_put_ui(bs, seq_param->seq_fields.bits.frame_mbs_only_flag, 1); /* frame_mbs_only_flag */
- if (!frame_mbs_only_flag) {
+ if (!seq_param->seq_fields.bits.frame_mbs_only_flag) {
assert(0);
}
- bitstream_put_ui(bs, 0, 1); /* direct_8x8_inference_flag */
- bitstream_put_ui(bs, frame_cropping_flag, 1); /* frame_cropping_flag */
+ bitstream_put_ui(bs, seq_param->seq_fields.bits.direct_8x8_inference_flag, 1); /* direct_8x8_inference_flag */
+ bitstream_put_ui(bs, seq_param->frame_cropping_flag, 1); /* frame_cropping_flag */
- if (frame_cropping_flag) {
- bitstream_put_ue(bs, 0); /* frame_crop_left_offset */
- bitstream_put_ue(bs, 0); /* frame_crop_right_offset */
- bitstream_put_ue(bs, 0); /* frame_crop_top_offset */
- bitstream_put_ue(bs, frame_crop_bottom_offset); /* frame_crop_bottom_offset */
+ if (seq_param->frame_cropping_flag) {
+ bitstream_put_ue(bs, seq_param->frame_crop_left_offset); /* frame_crop_left_offset */
+ bitstream_put_ue(bs, seq_param->frame_crop_right_offset); /* frame_crop_right_offset */
+ bitstream_put_ue(bs, seq_param->frame_crop_top_offset); /* frame_crop_top_offset */
+ bitstream_put_ue(bs, seq_param->frame_crop_bottom_offset); /* frame_crop_bottom_offset */
+ }
+
+ if ( frame_bit_rate < 0 ) {
+ bitstream_put_ui(bs, 0, 1); /* vui_parameters_present_flag */
+ } else {
+ bitstream_put_ui(bs, 1, 1); /* vui_parameters_present_flag */
+ bitstream_put_ui(bs, 0, 1); /* aspect_ratio_info_present_flag */
+ bitstream_put_ui(bs, 0, 1); /* overscan_info_present_flag */
+ bitstream_put_ui(bs, 0, 1); /* video_signal_type_present_flag */
+ bitstream_put_ui(bs, 0, 1); /* chroma_loc_info_present_flag */
+ bitstream_put_ui(bs, 1, 1); /* timing_info_present_flag */
+ {
+ bitstream_put_ui(bs, 15, 32);
+ bitstream_put_ui(bs, 900, 32);
+ bitstream_put_ui(bs, 1, 1);
+ }
+ bitstream_put_ui(bs, 1, 1); /* nal_hrd_parameters_present_flag */
+ {
+ // hrd_parameters
+ bitstream_put_ue(bs, 0); /* cpb_cnt_minus1 */
+ bitstream_put_ui(bs, 4, 4); /* bit_rate_scale */
+ bitstream_put_ui(bs, 6, 4); /* cpb_size_scale */
+
+ bitstream_put_ue(bs, frame_bit_rate - 1); /* bit_rate_value_minus1[0] */
+ bitstream_put_ue(bs, frame_bit_rate*8 - 1); /* cpb_size_value_minus1[0] */
+ bitstream_put_ui(bs, 1, 1); /* cbr_flag[0] */
+
+ bitstream_put_ui(bs, 23, 5); /* initial_cpb_removal_delay_length_minus1 */
+ bitstream_put_ui(bs, 23, 5); /* cpb_removal_delay_length_minus1 */
+ bitstream_put_ui(bs, 23, 5); /* dpb_output_delay_length_minus1 */
+ bitstream_put_ui(bs, 23, 5); /* time_offset_length */
+ }
+ bitstream_put_ui(bs, 0, 1); /* vcl_hrd_parameters_present_flag */
+ bitstream_put_ui(bs, 0, 1); /* low_delay_hrd_flag */
+
+ bitstream_put_ui(bs, 0, 1); /* pic_struct_present_flag */
+ bitstream_put_ui(bs, 0, 1); /* bitstream_restriction_flag */
}
- bitstream_put_ui(bs, 0, 1); /* vui_parameters_present_flag */
- rbsp_trailing_bits(bs); /* rbsp_trailing_bits */
+ rbsp_trailing_bits(bs); /* rbsp_trailing_bits */
}
+#if 0
static void build_nal_sps(FILE *avc_fp)
{
bitstream bs;
@@ -575,35 +882,44 @@ static void build_nal_sps(FILE *avc_fp)
sps_rbsp(&bs);
bitstream_end(&bs, avc_fp);
}
+#endif
static void pps_rbsp(bitstream *bs)
{
- bitstream_put_ue(bs, 0); /* pic_parameter_set_id */
- bitstream_put_ue(bs, 0); /* seq_parameter_set_id */
+ VAEncPictureParameterBufferH264 *pic_param = &avcenc_context.pic_param;
+
+ bitstream_put_ue(bs, pic_param->pic_parameter_set_id); /* pic_parameter_set_id */
+ bitstream_put_ue(bs, pic_param->seq_parameter_set_id); /* seq_parameter_set_id */
- bitstream_put_ui(bs, entropy_coding_mode_flag, 1); /* entropy_coding_mode_flag */
+ bitstream_put_ui(bs, pic_param->pic_fields.bits.entropy_coding_mode_flag, 1); /* entropy_coding_mode_flag */
bitstream_put_ui(bs, 0, 1); /* pic_order_present_flag: 0 */
bitstream_put_ue(bs, 0); /* num_slice_groups_minus1 */
- bitstream_put_ue(bs, 0); /* num_ref_idx_l0_active_minus1 */
- bitstream_put_ue(bs, 0); /* num_ref_idx_l1_active_minus1 1 */
+ bitstream_put_ue(bs, pic_param->num_ref_idx_l0_active_minus1); /* num_ref_idx_l0_active_minus1 */
+ bitstream_put_ue(bs, pic_param->num_ref_idx_l1_active_minus1); /* num_ref_idx_l1_active_minus1 1 */
- bitstream_put_ui(bs, 0, 1); /* weighted_pred_flag: 0 */
- bitstream_put_ui(bs, 0, 2); /* weighted_bipred_idc: 0 */
+ bitstream_put_ui(bs, pic_param->pic_fields.bits.weighted_pred_flag, 1); /* weighted_pred_flag: 0 */
+ bitstream_put_ui(bs, pic_param->pic_fields.bits.weighted_bipred_idc, 2); /* weighted_bipred_idc: 0 */
- bitstream_put_se(bs, 0); /* pic_init_qp_minus26 */
+ bitstream_put_se(bs, pic_param->pic_init_qp - 26); /* pic_init_qp_minus26 */
bitstream_put_se(bs, 0); /* pic_init_qs_minus26 */
bitstream_put_se(bs, 0); /* chroma_qp_index_offset */
- bitstream_put_ui(bs, 1, 1); /* deblocking_filter_control_present_flag */
+ bitstream_put_ui(bs, pic_param->pic_fields.bits.deblocking_filter_control_present_flag, 1); /* deblocking_filter_control_present_flag */
bitstream_put_ui(bs, 0, 1); /* constrained_intra_pred_flag */
bitstream_put_ui(bs, 0, 1); /* redundant_pic_cnt_present_flag */
+
+ /* more_rbsp_data */
+ bitstream_put_ui(bs, pic_param->pic_fields.bits.transform_8x8_mode_flag, 1); /*transform_8x8_mode_flag */
+ bitstream_put_ui(bs, 0, 1); /* pic_scaling_matrix_present_flag */
+ bitstream_put_se(bs, pic_param->second_chroma_qp_index_offset ); /*second_chroma_qp_index_offset */
rbsp_trailing_bits(bs);
}
+#if 0
static void build_nal_pps(FILE *avc_fp)
{
bitstream bs;
@@ -621,20 +937,54 @@ build_header(FILE *avc_fp)
build_nal_sps(avc_fp);
build_nal_pps(avc_fp);
}
+#endif
+
+static int
+build_packed_pic_buffer(unsigned char **header_buffer)
+{
+ bitstream bs;
+
+ bitstream_start(&bs);
+ nal_start_code_prefix(&bs);
+ nal_header(&bs, NAL_REF_IDC_HIGH, NAL_PPS);
+ pps_rbsp(&bs);
+ bitstream_end(&bs);
+
+ *header_buffer = (unsigned char *)bs.buffer;
+ return bs.bit_offset;
+}
+static int
+build_packed_seq_buffer(unsigned char **header_buffer)
+{
+ bitstream bs;
+ bitstream_start(&bs);
+ nal_start_code_prefix(&bs);
+ nal_header(&bs, NAL_REF_IDC_HIGH, NAL_SPS);
+ sps_rbsp(&bs);
+ bitstream_end(&bs);
+
+ *header_buffer = (unsigned char *)bs.buffer;
+ return bs.bit_offset;
+}
+
+
+#if 0
static void
-slice_header(bitstream *bs, int frame_num, int slice_type, int is_idr)
-{
- int is_cabac = (entropy_coding_mode_flag == ENTROPY_MODE_CABAC);
+slice_header(bitstream *bs, int frame_num, int display_frame, int slice_type, int nal_ref_idc, int is_idr)
+{
+ VAEncSequenceParameterBufferH264 *seq_param = &avcenc_context.seq_param;
+ VAEncPictureParameterBufferH264 *pic_param = &avcenc_context.pic_param;
+ int is_cabac = (pic_param->pic_fields.bits.entropy_coding_mode_flag == ENTROPY_MODE_CABAC);
bitstream_put_ue(bs, 0); /* first_mb_in_slice: 0 */
bitstream_put_ue(bs, slice_type); /* slice_type */
bitstream_put_ue(bs, 0); /* pic_parameter_set_id: 0 */
- bitstream_put_ui(bs, frame_num & 0x0F, log2_max_frame_num_minus4 + 4); /* frame_num */
+ bitstream_put_ui(bs, frame_num & 0x0F, seq_param->seq_fields.bits.log2_max_frame_num_minus4 + 4); /* frame_num */
/* frame_mbs_only_flag == 1 */
- if (!frame_mbs_only_flag) {
+ if (!seq_param->seq_fields.bits.frame_mbs_only_flag) {
/* FIXME: */
assert(0);
}
@@ -642,8 +992,8 @@ slice_header(bitstream *bs, int frame_num, int slice_type, int is_idr)
if (is_idr)
bitstream_put_ue(bs, 0); /* idr_pic_id: 0 */
- if (pic_order_cnt_type == 0) {
- bitstream_put_ui(bs, (frame_num * 2) & 0x0F, log2_max_pic_order_cnt_lsb_minus4 + 4);
+ if (seq_param->seq_fields.bits.pic_order_cnt_type == 0) {
+ bitstream_put_ui(bs, (display_frame*2) & 0x3F, seq_param->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4 + 4);
/* only support frame */
} else {
/* FIXME: */
@@ -658,18 +1008,23 @@ slice_header(bitstream *bs, int frame_num, int slice_type, int is_idr)
/* ref_pic_list_reordering */
bitstream_put_ui(bs, 0, 1); /* ref_pic_list_reordering_flag_l0: 0 */
} else if (slice_type == SLICE_TYPE_B) {
- /* FIXME */
- assert(0);
- }
+ bitstream_put_ui(bs, 1, 1); /* direct_spatial_mv_pred: 1 */
+ bitstream_put_ui(bs, 0, 1); /* num_ref_idx_active_override_flag: 0 */
+ /* ref_pic_list_reordering */
+ bitstream_put_ui(bs, 0, 1); /* ref_pic_list_reordering_flag_l0: 0 */
+ bitstream_put_ui(bs, 0, 1); /* ref_pic_list_reordering_flag_l1: 0 */
+ }
/* weighted_pred_flag == 0 */
/* dec_ref_pic_marking */
- if (is_idr) {
- bitstream_put_ui(bs, 0, 1); /* no_output_of_prior_pics_flag: 0 */
- bitstream_put_ui(bs, 0, 1); /* long_term_reference_flag: 0 */
- } else {
- bitstream_put_ui(bs, 0, 1); /* adaptive_ref_pic_marking_mode_flag: 0 */
+ if (nal_ref_idc != 0) {
+ if ( is_idr) {
+ bitstream_put_ui(bs, 0, 1); /* no_output_of_prior_pics_flag: 0 */
+ bitstream_put_ui(bs, 0, 1); /* long_term_reference_flag: 0 */
+ } else {
+ bitstream_put_ui(bs, 0, 1); /* adaptive_ref_pic_marking_mode_flag: 0 */
+ }
}
if (is_cabac && (slice_type != SLICE_TYPE_I))
@@ -677,7 +1032,7 @@ slice_header(bitstream *bs, int frame_num, int slice_type, int is_idr)
bitstream_put_se(bs, 0); /* slice_qp_delta: 0 */
- if (deblocking_filter_control_present_flag == 1) {
+ if (pic_param->pic_fields.bits.deblocking_filter_control_present_flag == 1) {
bitstream_put_ue(bs, 0); /* disable_deblocking_filter_idc: 0 */
bitstream_put_se(bs, 2); /* slice_alpha_c0_offset_div2: 2 */
bitstream_put_se(bs, 2); /* slice_beta_offset_div2: 2 */
@@ -692,52 +1047,290 @@ slice_data(bitstream *bs)
int i, slice_data_length;
VAStatus va_status;
VASurfaceStatus surface_status;
- int is_cabac = (entropy_coding_mode_flag == ENTROPY_MODE_CABAC);
- va_status = vaSyncSurface(va_dpy, surface_ids[SID_INPUT_PICTURE]);
+ va_status = vaSyncSurface(va_dpy, surface_ids[avcenc_context.current_input_surface]);
CHECK_VASTATUS(va_status,"vaSyncSurface");
surface_status = 0;
- va_status = vaQuerySurfaceStatus(va_dpy, surface_ids[SID_INPUT_PICTURE], &surface_status);
+ va_status = vaQuerySurfaceStatus(va_dpy, surface_ids[avcenc_context.current_input_surface], &surface_status);
CHECK_VASTATUS(va_status,"vaQuerySurfaceStatus");
- va_status = vaMapBuffer(va_dpy, coded_buf, (void **)(&coded_buffer_segment));
+ va_status = vaMapBuffer(va_dpy, avcenc_context.codedbuf_buf_id, (void **)(&coded_buffer_segment));
CHECK_VASTATUS(va_status,"vaMapBuffer");
coded_mem = coded_buffer_segment->buf;
- if (is_cabac) {
- bitstream_byte_aligning(bs, 1);
- slice_data_length = get_coded_bitsteam_length(coded_mem, codedbuf_size);
+ slice_data_length = get_coded_bitsteam_length(coded_mem, codedbuf_size);
- for (i = 0; i < slice_data_length; i++) {
- bitstream_put_ui(bs, *coded_mem, 8);
- coded_mem++;
- }
- } else {
- /* FIXME */
- assert(0);
+ for (i = 0; i < slice_data_length; i++) {
+ bitstream_put_ui(bs, *coded_mem, 8);
+ coded_mem++;
}
- vaUnmapBuffer(va_dpy, coded_buf);
+ vaUnmapBuffer(va_dpy, avcenc_context.codedbuf_buf_id);
}
static void
-build_nal_slice(FILE *avc_fp, int frame_num, int slice_type, int is_idr)
+build_nal_slice(FILE *avc_fp, int frame_num, int display_frame, int slice_type, int is_idr)
{
bitstream bs;
bitstream_start(&bs);
- nal_start_code_prefix(&bs);
- nal_header(&bs, NAL_REF_IDC_HIGH, is_idr ? NAL_IDR : NAL_NON_IDR);
- slice_header(&bs, frame_num, slice_type, is_idr);
slice_data(&bs);
bitstream_end(&bs, avc_fp);
}
-static void
-store_coded_buffer(FILE *avc_fp, int frame_num, int is_intra, int is_idr)
+#endif
+
+static int
+store_coded_buffer(FILE *avc_fp, int slice_type)
+{
+ VACodedBufferSegment *coded_buffer_segment;
+ unsigned char *coded_mem;
+ int slice_data_length;
+ VAStatus va_status;
+ VASurfaceStatus surface_status;
+ size_t w_items;
+
+ va_status = vaSyncSurface(va_dpy, surface_ids[avcenc_context.current_input_surface]);
+ CHECK_VASTATUS(va_status,"vaSyncSurface");
+
+ surface_status = 0;
+ va_status = vaQuerySurfaceStatus(va_dpy, surface_ids[avcenc_context.current_input_surface], &surface_status);
+ CHECK_VASTATUS(va_status,"vaQuerySurfaceStatus");
+
+ va_status = vaMapBuffer(va_dpy, avcenc_context.codedbuf_buf_id, (void **)(&coded_buffer_segment));
+ CHECK_VASTATUS(va_status,"vaMapBuffer");
+ coded_mem = coded_buffer_segment->buf;
+
+ if (coded_buffer_segment->status & VA_CODED_BUF_STATUS_SLICE_OVERFLOW_MASK) {
+ if (slice_type == SLICE_TYPE_I)
+ avcenc_context.codedbuf_i_size *= 2;
+ else
+ avcenc_context.codedbuf_pb_size *= 2;
+
+ vaUnmapBuffer(va_dpy, avcenc_context.codedbuf_buf_id);
+ return -1;
+ }
+
+ slice_data_length = coded_buffer_segment->size;
+
+ do {
+ w_items = fwrite(coded_mem, slice_data_length, 1, avc_fp);
+ } while (w_items != 1);
+
+ if (slice_type == SLICE_TYPE_I) {
+ if (avcenc_context.codedbuf_i_size > slice_data_length * 3 / 2) {
+ avcenc_context.codedbuf_i_size = slice_data_length * 3 / 2;
+ }
+
+ if (avcenc_context.codedbuf_pb_size < slice_data_length) {
+ avcenc_context.codedbuf_pb_size = slice_data_length;
+ }
+ } else {
+ if (avcenc_context.codedbuf_pb_size > slice_data_length * 3 / 2) {
+ avcenc_context.codedbuf_pb_size = slice_data_length * 3 / 2;
+ }
+ }
+
+ vaUnmapBuffer(va_dpy, avcenc_context.codedbuf_buf_id);
+
+ return 0;
+}
+
+static void
+encode_picture(FILE *yuv_fp, FILE *avc_fp,
+ int frame_num, int display_num,
+ int is_idr,
+ int slice_type, int next_is_bpic,
+ int next_display_num)
+{
+ VAStatus va_status;
+ int ret = 0, codedbuf_size;
+
+ begin_picture(yuv_fp, frame_num, display_num, slice_type, is_idr);
+
+ //if (next_display_num < frame_number) {
+ if (1) {
+ int index;
+
+ /* prepare for next frame */
+ if (avcenc_context.current_input_surface == SID_INPUT_PICTURE_0)
+ index = SID_INPUT_PICTURE_1;
+ else
+ index = SID_INPUT_PICTURE_0;
+ if ( next_display_num >= frame_number )
+ next_display_num = frame_number - 1;
+ fseek(yuv_fp, frame_size * next_display_num, SEEK_SET);
+
+ avcenc_context.upload_thread_param.yuv_fp = yuv_fp;
+ avcenc_context.upload_thread_param.surface_id = surface_ids[index];
+
+ avcenc_context.upload_thread_value = pthread_create(&avcenc_context.upload_thread_id,
+ NULL,
+ upload_thread_function,
+ (void*)&avcenc_context.upload_thread_param);
+ }
+
+ do {
+ avcenc_destroy_buffers(&avcenc_context.codedbuf_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.pic_param_buf_id, 1);
+
+
+ if (SLICE_TYPE_I == slice_type) {
+ codedbuf_size = avcenc_context.codedbuf_i_size;
+ } else {
+ codedbuf_size = avcenc_context.codedbuf_pb_size;
+ }
+
+ /* coded buffer */
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncCodedBufferType,
+ codedbuf_size, 1, NULL,
+ &avcenc_context.codedbuf_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+
+ /* picture parameter set */
+ avcenc_update_picture_parameter(slice_type, frame_num, display_num, is_idr);
+
+ avcenc_render_picture();
+
+ ret = store_coded_buffer(avc_fp, slice_type);
+ } while (ret);
+
+ end_picture(slice_type, next_is_bpic);
+}
+
+static void encode_pb_pictures(FILE *yuv_fp, FILE *avc_fp, int f, int nbframes, int next_f)
+{
+ int i;
+ encode_picture(yuv_fp, avc_fp,
+ enc_frame_number, f + nbframes,
+ 0,
+ SLICE_TYPE_P, 1, f);
+
+ for( i = 0; i < nbframes - 1; i++) {
+ encode_picture(yuv_fp, avc_fp,
+ enc_frame_number + 1, f + i,
+ 0,
+ SLICE_TYPE_B, 1, f + i + 1);
+ }
+
+ encode_picture(yuv_fp, avc_fp,
+ enc_frame_number + 1, f + nbframes - 1,
+ 0,
+ SLICE_TYPE_B, 0, next_f);
+}
+
+static void show_help()
+{
+ printf("Usage: avnenc <width> <height> <input_yuvfile> <output_avcfile> [qp=qpvalue|fb=framebitrate] [mode=0(I frames only)/1(I and P frames)/2(I, P and B frames)\n");
+}
+
+static void avcenc_context_seq_param_init(VAEncSequenceParameterBufferH264 *seq_param,
+ int width, int height)
+
+{
+ int width_in_mbs = (width + 15) / 16;
+ int height_in_mbs = (height + 15) / 16;
+ int frame_cropping_flag = 0;
+ int frame_crop_bottom_offset = 0;
+
+ seq_param->seq_parameter_set_id = 0;
+ seq_param->level_idc = 41;
+ seq_param->intra_period = intra_period;
+ seq_param->ip_period = 0; /* FIXME: ??? */
+ seq_param->max_num_ref_frames = 4;
+ seq_param->picture_width_in_mbs = width_in_mbs;
+ seq_param->picture_height_in_mbs = height_in_mbs;
+ seq_param->seq_fields.bits.frame_mbs_only_flag = 1;
+
+ if (frame_bit_rate > 0)
+ seq_param->bits_per_second = 1024 * frame_bit_rate; /* use kbps as input */
+ else
+ seq_param->bits_per_second = 0;
+
+ seq_param->time_scale = 900;
+ seq_param->num_units_in_tick = 15; /* Tc = num_units_in_tick / time_sacle */
+
+ if (height_in_mbs * 16 - height) {
+ frame_cropping_flag = 1;
+ frame_crop_bottom_offset =
+ (height_in_mbs * 16 - height) / (2 * (!seq_param->seq_fields.bits.frame_mbs_only_flag + 1));
+ }
+
+ seq_param->frame_cropping_flag = frame_cropping_flag;
+ seq_param->frame_crop_left_offset = 0;
+ seq_param->frame_crop_right_offset = 0;
+ seq_param->frame_crop_top_offset = 0;
+ seq_param->frame_crop_bottom_offset = frame_crop_bottom_offset;
+
+ seq_param->seq_fields.bits.pic_order_cnt_type = 0;
+ seq_param->seq_fields.bits.direct_8x8_inference_flag = 0;
+
+ seq_param->seq_fields.bits.log2_max_frame_num_minus4 = 0;
+ seq_param->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4 = 2;
+
+ if (frame_bit_rate > 0)
+ seq_param->vui_parameters_present_flag = 1; //HRD info located in vui
+ else
+ seq_param->vui_parameters_present_flag = 0;
+}
+
+static void avcenc_context_pic_param_init(VAEncPictureParameterBufferH264 *pic_param)
{
- build_nal_slice(avc_fp, frame_num, is_intra ? SLICE_TYPE_I : SLICE_TYPE_P, is_idr);
+ pic_param->seq_parameter_set_id = 0;
+ pic_param->pic_parameter_set_id = 0;
+
+ pic_param->last_picture = 0;
+ pic_param->frame_num = 0;
+
+ pic_param->pic_init_qp = (qp_value >= 0 ? qp_value : 26);
+ pic_param->num_ref_idx_l0_active_minus1 = 0;
+ pic_param->num_ref_idx_l1_active_minus1 = 0;
+
+ pic_param->pic_fields.bits.idr_pic_flag = 0;
+ pic_param->pic_fields.bits.reference_pic_flag = 0;
+ pic_param->pic_fields.bits.entropy_coding_mode_flag = ENTROPY_MODE_CABAC;
+ pic_param->pic_fields.bits.weighted_pred_flag = 0;
+ pic_param->pic_fields.bits.weighted_bipred_idc = 0;
+ pic_param->pic_fields.bits.transform_8x8_mode_flag = 1;
+ pic_param->pic_fields.bits.deblocking_filter_control_present_flag = 1;
+}
+
+static void avcenc_context_init(int width, int height)
+{
+ int i;
+ memset(&avcenc_context, 0, sizeof(avcenc_context));
+ avcenc_context.profile = VAProfileH264Main;
+ avcenc_context.seq_param_buf_id = VA_INVALID_ID;
+ avcenc_context.pic_param_buf_id = VA_INVALID_ID;
+ avcenc_context.packed_seq_header_param_buf_id = VA_INVALID_ID;
+ avcenc_context.packed_seq_buf_id = VA_INVALID_ID;
+ avcenc_context.packed_pic_header_param_buf_id = VA_INVALID_ID;
+ avcenc_context.packed_pic_buf_id = VA_INVALID_ID;
+ avcenc_context.codedbuf_buf_id = VA_INVALID_ID;
+ avcenc_context.misc_parameter_hrd_buf_id = VA_INVALID_ID;
+ avcenc_context.codedbuf_i_size = width * height;
+ avcenc_context.codedbuf_pb_size = 0;
+ avcenc_context.current_input_surface = SID_INPUT_PICTURE_0;
+ avcenc_context.upload_thread_value = -1;
+
+ if (qp_value == -1)
+ avcenc_context.rate_control_method = VA_RC_CBR;
+ else if (qp_value == -2)
+ avcenc_context.rate_control_method = VA_RC_VBR;
+ else {
+ assert(qp_value >= 0 && qp_value <= 51);
+ avcenc_context.rate_control_method = VA_RC_CQP;
+ }
+
+ for (i = 0; i < MAX_SLICES; i++) {
+ avcenc_context.slice_param_buf_id[i] = VA_INVALID_ID;
+ }
+
+ avcenc_context_seq_param_init(&avcenc_context.seq_param, width, height);
+ avcenc_context_pic_param_init(&avcenc_context.pic_param);
}
int main(int argc, char *argv[])
@@ -745,13 +1338,14 @@ int main(int argc, char *argv[])
int f;
FILE *yuv_fp;
FILE *avc_fp;
- int frame_number;
long file_size;
- clock_t start_clock, end_clock;
- float encoding_time;
-
- if(argc != 5 && argc != 6) {
- printf("Usage: %s <width> <height> <input_yuvfile> <output_avcfile> [qp]\n", argv[0]);
+ int i_frame_only=0,i_p_frame_only=1;
+ int mode_value;
+ struct timeval tpstart,tpend;
+ float timeuse;
+ //TODO may be we should using option analytics library
+ if(argc != 5 && argc != 6 && argc != 7) {
+ show_help();
return -1;
}
@@ -760,10 +1354,44 @@ int main(int argc, char *argv[])
picture_width_in_mbs = (picture_width + 15) / 16;
picture_height_in_mbs = (picture_height + 15) / 16;
- if (argc == 6)
- qp_value = atoi(argv[5]);
- else
- qp_value = 26;
+ if (argc == 6 || argc == 7) {
+ qp_value = -1;
+ sscanf(argv[5], "qp=%d", &qp_value);
+ if ( qp_value == -1 ) {
+ frame_bit_rate = -1;
+ sscanf(argv[5], "fb=%d", &frame_bit_rate);
+ if ( frame_bit_rate == -1 ) {
+ show_help();
+ return -1;
+ }
+ } else if (qp_value > 51) {
+ qp_value = 51;
+ } else if (qp_value < 0) {
+ qp_value = 0;
+ }
+ } else
+ qp_value = 28; //default const QP mode
+
+ if (argc == 7) {
+ sscanf(argv[6], "mode=%d", &mode_value);
+ if ( mode_value == 0 ) {
+ i_frame_only = 1;
+ i_p_frame_only = 0;
+ }
+ else if ( mode_value == 1) {
+ i_frame_only = 0;
+ i_p_frame_only = 1;
+ }
+ else if ( mode_value == 2 ) {
+ i_frame_only = 0;
+ i_p_frame_only = 0;
+ }
+ else {
+ printf("mode_value=%d\n",mode_value);
+ show_help();
+ return -1;
+ }
+ }
yuv_fp = fopen(argv[3],"rb");
if ( yuv_fp == NULL){
@@ -773,9 +1401,9 @@ int main(int argc, char *argv[])
fseek(yuv_fp,0l, SEEK_END);
file_size = ftell(yuv_fp);
frame_size = picture_width * picture_height + ((picture_width * picture_height) >> 1) ;
- codedbuf_size = picture_width * picture_height * 1.5;
if ( (file_size < frame_size) || (file_size % frame_size) ) {
+ fclose(yuv_fp);
printf("The YUV file's size is not correct\n");
return -1;
}
@@ -784,35 +1412,72 @@ int main(int argc, char *argv[])
avc_fp = fopen(argv[4], "wb");
if ( avc_fp == NULL) {
+ fclose(yuv_fp);
printf("Can't open output avc file\n");
return -1;
}
- start_clock = clock();
- build_header(avc_fp);
-
+ gettimeofday(&tpstart,NULL);
+ avcenc_context_init(picture_width, picture_height);
create_encode_pipe();
- alloc_encode_resource();
-
- for ( f = 0; f < frame_number; f++ ) { //picture level loop
- int is_intra = (f % 30 == 0);
- int is_idr = (f == 0);
-
- begin_picture();
- prepare_input(yuv_fp, is_intra);
- end_picture();
- store_coded_buffer(avc_fp, f, is_intra, is_idr);
-
+ alloc_encode_resource(yuv_fp);
+
+ enc_frame_number = 0;
+ for ( f = 0; f < frame_number; ) { //picture level loop
+ static int const frame_type_pattern[][2] = { {SLICE_TYPE_I,1},
+ {SLICE_TYPE_P,3}, {SLICE_TYPE_P,3},{SLICE_TYPE_P,3},
+ {SLICE_TYPE_P,3}, {SLICE_TYPE_P,3},{SLICE_TYPE_P,3},
+ {SLICE_TYPE_P,3}, {SLICE_TYPE_P,3},{SLICE_TYPE_P,3},
+ {SLICE_TYPE_P,2} };
+
+ if ( i_frame_only ) {
+ encode_picture(yuv_fp, avc_fp,enc_frame_number, f, f==0, SLICE_TYPE_I, 0, f+1);
+ f++;
+ enc_frame_number++;
+ } else if ( i_p_frame_only ) {
+ if ( (f % intra_period) == 0 ) {
+ encode_picture(yuv_fp, avc_fp,enc_frame_number, f, f==0, SLICE_TYPE_I, 0, f+1);
+ f++;
+ enc_frame_number++;
+ } else {
+ encode_picture(yuv_fp, avc_fp,enc_frame_number, f, f==0, SLICE_TYPE_P, 0, f+1);
+ f++;
+ enc_frame_number++;
+ }
+ } else { // follow the i,p,b pattern
+ static int fcurrent = 0;
+ int fnext;
+
+ fcurrent = fcurrent % (sizeof(frame_type_pattern)/sizeof(int[2]));
+ fnext = (fcurrent+1) % (sizeof(frame_type_pattern)/sizeof(int[2]));
+
+ if ( frame_type_pattern[fcurrent][0] == SLICE_TYPE_I ) {
+ encode_picture(yuv_fp, avc_fp,enc_frame_number, f, f==0, SLICE_TYPE_I, 0,
+ f+frame_type_pattern[fnext][1]);
+ f++;
+ enc_frame_number++;
+ } else {
+ encode_pb_pictures(yuv_fp, avc_fp, f, frame_type_pattern[fcurrent][1]-1,
+ f + frame_type_pattern[fcurrent][1] + frame_type_pattern[fnext][1] -1 );
+ f += frame_type_pattern[fcurrent][1];
+ enc_frame_number++;
+ }
+
+ fcurrent++;
+ }
printf("\r %d/%d ...", f+1, frame_number);
fflush(stdout);
}
- end_clock = clock();
+ gettimeofday(&tpend,NULL);
+ timeuse=1000000*(tpend.tv_sec-tpstart.tv_sec)+ tpend.tv_usec-tpstart.tv_usec;
+ timeuse/=1000000;
printf("\ndone!\n");
- encoding_time = (float)(end_clock-start_clock)/CLOCKS_PER_SEC;
- printf("encode %d frames in %f secondes, FPS is %.1f\n",frame_number, encoding_time, frame_number/encoding_time);
-
+ printf("encode %d frames in %f secondes, FPS is %.1f\n",frame_number, timeuse, frame_number/timeuse);
release_encode_resource();
destory_encode_pipe();
+ fclose(yuv_fp);
+ fclose(avc_fp);
+
return 0;
}
diff --git a/test/encode/h264encode_android.cpp b/test/encode/h264encode_android.cpp
index 84b315b..a3f4db4 100644
--- a/test/encode/h264encode_android.cpp
+++ b/test/encode/h264encode_android.cpp
@@ -49,7 +49,7 @@ sp<SurfaceComposerClient> client;
sp<Surface> android_surface;
sp<ISurface> android_isurface;
sp<SurfaceControl> surface_ctrl;
-
+#if 0
static int display_surface(int frame_id, int *exit_encode)
{
VAStatus va_status;
@@ -67,4 +67,4 @@ static int display_surface(int frame_id, int *exit_encode)
*exit_encode = 0;
return 0;
}
-
+#endif
diff --git a/test/encode/h264encode_common.c b/test/encode/h264encode_common.c
index 7e8c1ad..a3d3c8f 100644
--- a/test/encode/h264encode_common.c
+++ b/test/encode/h264encode_common.c
@@ -25,10 +25,8 @@
/*
* it is a real program to show how VAAPI encoding work,
* It does H264 element stream level encoding on auto-generated YUV data
- *
* gcc -o h264encode h264encode -lva -lva-x11
* ./h264encode -w <width> -h <height> -n <frame_num>
- *
*/
#include <stdio.h>
#include <string.h>
@@ -40,6 +38,8 @@
#include <fcntl.h>
#include <assert.h>
#include <va/va.h>
+#include <va/va_tpi.h>
+#include <va/va_enc_h264.h>
#ifdef ANDROID
#include <va/va_android.h>
#else
@@ -47,10 +47,10 @@
#endif
#define CHECK_VASTATUS(va_status,func) \
-if (va_status != VA_STATUS_SUCCESS) { \
- fprintf(stderr,"%s:%s (%d) failed,exit\n", __func__, func, __LINE__); \
- exit(1); \
-}
+ if (va_status != VA_STATUS_SUCCESS) { \
+ fprintf(stderr,"%s:%s (%d) failed,exit\n", __func__, func, __LINE__); \
+ exit(1); \
+ }
#include "../loadsurface.h"
#define SURFACE_NUM 18 /* 16 surfaces for src, 2 surface for reconstructed/reference */
@@ -62,7 +62,7 @@ static VAContextID context_id;
static Display *x11_display;
static int coded_fd;
static char coded_file[256];
-static int frame_width, frame_height;
+static int frame_width=320, frame_height=240;
static int win_width;
static int win_height;
static int frame_display = 0; /* display the frame during encoding */
@@ -72,7 +72,9 @@ static int intra_count = 30;
static int frame_bitrate = 8000000; /* 8M */
static int initial_qp = 15;
static int minimal_qp = 0;
+VASurfaceAttributeTPI * vaSurfaceAttrib;
+#define SURFACE_ATTRIB 0
static int display_surface(int frame_id, int *exit_encode);
static int upload_source_YUV_once_for_all()
@@ -82,11 +84,14 @@ static int upload_source_YUV_once_for_all()
int box_width=8;
int row_shift=0;
int i;
-
+
for (i=0; i<SURFACE_NUM-2; i++) {
printf("\rLoading data into surface %d.....", i);
+#ifndef SURFACE_ATTRIB
upload_surface(va_dpy, surface_id[i], box_width, row_shift, 0);
-
+#else
+ upload_surface_attrib(va_dpy, surface_id[i], box_width, row_shift, 0, (unsigned int *)vaSurfaceAttrib->buffers[i]);
+#endif
row_shift++;
if (row_shift==(2*box_width)) row_shift= 0;
}
@@ -102,7 +107,7 @@ static int save_coded_buf(VABufferID coded_buf, int current_frame, int frame_ski
VACodedBufferSegment *buf_list = NULL;
VAStatus va_status;
unsigned int coded_size = 0;
-
+
va_status = vaMapBuffer(va_dpy,coded_buf,(void **)(&buf_list));
CHECK_VASTATUS(va_status,"vaMapBuffer");
while (buf_list != NULL) {
@@ -132,7 +137,7 @@ static int save_coded_buf(VABufferID coded_buf, int current_frame, int frame_ski
printf("(I)");
else
printf("(P)");
-
+
printf("(%06d bytes coded)",coded_size);
if (frame_skipped)
printf("(SKipped)");
@@ -166,14 +171,9 @@ static int do_h264_encoding(void)
int frame_skipped = 0;
int i;
-
- va_status = vaCreateSurfaces(va_dpy,frame_width, frame_height,
- VA_RT_FORMAT_YUV420, SURFACE_NUM, &surface_id[0]);
- CHECK_VASTATUS(va_status, "vaCreateSurfaces");
-
/* upload RAW YUV data into all surfaces */
upload_source_YUV_once_for_all();
-
+
codedbuf_size = (frame_width * frame_height * 400) / (16*16);
for (i = 0; i < CODEDBUF_NUM; i++) {
@@ -184,52 +184,66 @@ static int do_h264_encoding(void)
* so VA won't maintain the coded buffer
*/
va_status = vaCreateBuffer(va_dpy,context_id,VAEncCodedBufferType,
- codedbuf_size, 1, NULL, &coded_buf[i]);
- CHECK_VASTATUS(va_status,"vaBeginPicture");
+ codedbuf_size, 1, NULL, &coded_buf[i]);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
}
src_surface = 0;
/* the last two frames are reference/reconstructed frame */
dst_surface = SURFACE_NUM - 1;
ref_surface = SURFACE_NUM - 2;
-
+
for (i = 0; i < frame_count; i++) {
va_status = vaBeginPicture(va_dpy, context_id, surface_id[src_surface]);
CHECK_VASTATUS(va_status,"vaBeginPicture");
if (i == 0) {
- VAEncSequenceParameterBufferH264 seq_h264 = {0};
- VABufferID seq_param_buf;
+ VAEncSequenceParameterBufferH264 seq_h264;
+ VAEncMiscParameterRateControl *rc_h264;
+ VAEncMiscParameterBuffer *miscEncRCParamBuf;
+ VABufferID seq_param_buf, rc_param_buf;
+
+ va_status = vaCreateBuffer(va_dpy, context_id,
+ VAEncMiscParameterBufferType,
+ sizeof (VAEncMiscParameterBuffer) + sizeof (VAEncMiscParameterRateControl),
+ 1, NULL,
+ &rc_param_buf);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+ va_status = vaMapBuffer(va_dpy, rc_param_buf, (void **)&miscEncRCParamBuf);
+ CHECK_VASTATUS(va_status,"vaMapBuffer");
+ miscEncRCParamBuf->type = VAEncMiscParameterTypeRateControl;
+ rc_h264 = (VAEncMiscParameterRateControl *)miscEncRCParamBuf->data;
+ rc_h264->initial_qp = initial_qp;
+ rc_h264->min_qp = minimal_qp;
+ rc_h264->window_size = 500;
+ rc_h264->basic_unit_size = 0;
+ va_status = vaUnmapBuffer(va_dpy, rc_param_buf);
+ CHECK_VASTATUS(va_status,"vaUnmapBuffer");
seq_h264.level_idc = SH_LEVEL_3;
seq_h264.picture_width_in_mbs = frame_width / 16;
seq_h264.picture_height_in_mbs = frame_height / 16;
seq_h264.bits_per_second = frame_bitrate;
- seq_h264.frame_rate = frame_rate;
- seq_h264.initial_qp = initial_qp;
- seq_h264.min_qp = minimal_qp;
- seq_h264.basic_unit_size = 0;
seq_h264.intra_period = intra_count;
-
va_status = vaCreateBuffer(va_dpy, context_id,
- VAEncSequenceParameterBufferType,
- sizeof(seq_h264),1,&seq_h264,&seq_param_buf);
- CHECK_VASTATUS(va_status,"vaCreateBuffer");;
+ VAEncSequenceParameterBufferType,
+ sizeof(seq_h264),1,&seq_h264,&seq_param_buf);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+ va_status = vaRenderPicture(va_dpy,context_id, &rc_param_buf, 1);
+ CHECK_VASTATUS(va_status,"vaRenderPicture");;
va_status = vaRenderPicture(va_dpy,context_id, &seq_param_buf, 1);
CHECK_VASTATUS(va_status,"vaRenderPicture");;
}
- pic_h264.reference_picture = surface_id[ref_surface];
- pic_h264.reconstructed_picture= surface_id[dst_surface];
+ pic_h264.ReferenceFrames[0].picture_id= surface_id[ref_surface];
+ pic_h264.CurrPic.picture_id= surface_id[dst_surface];
pic_h264.coded_buf = coded_buf[codedbuf_idx];
- pic_h264.picture_width = frame_width;
- pic_h264.picture_height = frame_height;
pic_h264.last_picture = (i==frame_count);
-
+
va_status = vaCreateBuffer(va_dpy, context_id,VAEncPictureParameterBufferType,
- sizeof(pic_h264),1,&pic_h264,&pic_param_buf);
+ sizeof(pic_h264),1,&pic_h264,&pic_param_buf);
CHECK_VASTATUS(va_status,"vaCreateBuffer");;
va_status = vaRenderPicture(va_dpy,context_id, &pic_param_buf, 1);
@@ -241,12 +255,12 @@ static int do_h264_encoding(void)
slice_h264.slice_flags.bits.is_intra = ((i % intra_count) == 0);
slice_h264.slice_flags.bits.disable_deblocking_filter_idc = 0;
va_status = vaCreateBuffer(va_dpy,context_id,VAEncSliceParameterBufferType,
- sizeof(slice_h264),1,&slice_h264,&slice_param_buf);
+ sizeof(slice_h264),1,&slice_h264,&slice_param_buf);
CHECK_VASTATUS(va_status,"vaCreateBuffer");;
-
+
va_status = vaRenderPicture(va_dpy,context_id, &slice_param_buf, 1);
CHECK_VASTATUS(va_status,"vaRenderPicture");
-
+
va_status = vaEndPicture(va_dpy,context_id);
CHECK_VASTATUS(va_status,"vaEndPicture");;
@@ -258,7 +272,7 @@ static int do_h264_encoding(void)
frame_skipped = (surface_status & VASurfaceSkipped);
save_coded_buf(coded_buf[codedbuf_idx], i, frame_skipped);
-
+#if 0
/* should display reconstructed frame, but just diplay source frame */
if (frame_display) {
int exit_encode = 0;
@@ -267,7 +281,7 @@ static int do_h264_encoding(void)
if (exit_encode)
frame_count = i;
}
-
+#endif
/* use next surface */
src_surface++;
if (src_surface == (SURFACE_NUM - 2))
@@ -277,7 +291,7 @@ static int do_h264_encoding(void)
codedbuf_idx++;
if (codedbuf_idx == (CODEDBUF_NUM - 1))
codedbuf_idx = 0;
-
+
/* if a frame is skipped, current frame still use last reference frame */
if (frame_skipped == 0) {
/* swap ref/dst */
@@ -300,55 +314,55 @@ int main(int argc,char **argv)
VAStatus va_status;
char c;
- strcpy(coded_file, "/tmp/demo.264");
+ strcpy(coded_file, "/sdcard/1.264");
while ((c =getopt(argc,argv,"w:h:n:p:f:r:q:s:o:d?") ) != EOF) {
switch (c) {
- case 'w':
- frame_width = atoi(optarg);
- break;
- case 'h':
- frame_height = atoi(optarg);
- break;
- case 'n':
- frame_count = atoi(optarg);
- break;
- case 'p':
- intra_count = atoi(optarg);
- break;
- case 'f':
- frame_rate = atoi(optarg);
- break;
- case 'b':
- frame_bitrate = atoi(optarg);
- break;
- case 'q':
- initial_qp = atoi(optarg);
- break;
- case 's':
- minimal_qp = atoi(optarg);
- break;
- case 'd':
- frame_display = 1;
- break;
- case 'o':
- strcpy(coded_file, optarg);
- break;
- case ':':
- case '?':
- printf("./h264encode <options>\n");
- printf(" -w -h: resolution\n");
- printf(" -n frame number\n");
- printf(" -d display the source frame\n");
- printf(" -p P frame count between two I frames\n");
- printf(" -f frame rate\n");
- printf(" -r bit rate\n");
- printf(" -q initial QP\n");
- printf(" -s maximum QP\n");
- printf(" -o coded file\n");
- exit(0);
+ case 'w':
+ frame_width = atoi(optarg);
+ break;
+ case 'h':
+ frame_height = atoi(optarg);
+ break;
+ case 'n':
+ frame_count = atoi(optarg);
+ break;
+ case 'p':
+ intra_count = atoi(optarg);
+ break;
+ case 'f':
+ frame_rate = atoi(optarg);
+ break;
+ case 'b':
+ frame_bitrate = atoi(optarg);
+ break;
+ case 'q':
+ initial_qp = atoi(optarg);
+ break;
+ case 's':
+ minimal_qp = atoi(optarg);
+ break;
+ case 'd':
+ frame_display = 1;
+ break;
+ case 'o':
+ strcpy(coded_file, optarg);
+ break;
+ case ':':
+ case '?':
+ printf("./h264encode <options>\n");
+ printf(" -w -h: resolution\n");
+ printf(" -n frame number\n");
+ printf(" -d display the source frame\n");
+ printf(" -p P frame count between two I frames\n");
+ printf(" -f frame rate\n");
+ printf(" -r bit rate\n");
+ printf(" -q initial QP\n");
+ printf(" -s maximum QP\n");
+ printf(" -o coded file\n");
+ exit(0);
}
}
-
+
#ifdef ANDROID
x11_display = (Display*)malloc(sizeof(Display));
*(x11_display) = 0x18c34078;
@@ -362,7 +376,7 @@ int main(int argc,char **argv)
CHECK_VASTATUS(va_status, "vaInitialize");
vaQueryConfigEntrypoints(va_dpy, VAProfileH264Baseline, entrypoints,
- &num_entrypoints);
+ &num_entrypoints);
for (slice_entrypoint = 0; slice_entrypoint < num_entrypoints; slice_entrypoint++) {
if (entrypoints[slice_entrypoint] == VAEntrypointEncSlice)
break;
@@ -376,7 +390,7 @@ int main(int argc,char **argv)
attrib[0].type = VAConfigAttribRTFormat;
attrib[1].type = VAConfigAttribRateControl;
vaGetConfigAttributes(va_dpy, VAProfileH264Baseline, VAEntrypointEncSlice,
- &attrib[0], 2);
+ &attrib[0], 2);
if ((attrib[0].value & VA_RT_FORMAT_YUV420) == 0) {
/* not find desired YUV420 RT format */
assert(0);
@@ -388,19 +402,57 @@ int main(int argc,char **argv)
}
attrib[0].value = VA_RT_FORMAT_YUV420; /* set to desired RT format */
attrib[1].value = VA_RC_VBR; /* set to desired RC mode */
-
+
va_status = vaCreateConfig(va_dpy, VAProfileH264Baseline, VAEntrypointEncSlice,
- &attrib[0], 2,&config_id);
+ &attrib[0], 2,&config_id);
CHECK_VASTATUS(va_status, "vaCreateConfig");
-
- va_status = vaCreateSurfaces(va_dpy,frame_width, frame_height,
- VA_RT_FORMAT_YUV420, SURFACE_NUM, &surface_id[0]);
+
+#ifndef SURFACE_ATTRIB
+ va_status = vaCreateSurfaces(
+ va_dpy,
+ VA_RT_FORMAT_YUV420, frame_width, frame_height,
+ &surface_id[0], SURFACE_NUM,
+ NULL, 0
+ );
CHECK_VASTATUS(va_status, "vaCreateSurfaces");
-
+#else
+ int index;
+ vaSurfaceAttrib = (VASurfaceAttributeTPI *)malloc(sizeof(VASurfaceAttributeTPI));
+ if (vaSurfaceAttrib == NULL) {
+ printf("Failed to allocate VASurfaceAttrib\n");
+ return -1;
+ }
+
+ vaSurfaceAttrib->buffers = (unsigned int *)malloc(SURFACE_NUM *sizeof(unsigned int));
+ if (vaSurfaceAttrib->buffers == NULL) {
+ printf("Failed to allocate buffers for vaSurfaceAttrib\n");
+ return -1;
+ }
+
+ vaSurfaceAttrib->count = SURFACE_NUM;
+ vaSurfaceAttrib->luma_stride = frame_width;
+ vaSurfaceAttrib->pixel_format = VA_FOURCC_NV12;
+ vaSurfaceAttrib->width = frame_width;
+ vaSurfaceAttrib->height = frame_height;
+ vaSurfaceAttrib->type = VAExternalMemoryUserPointer;
+ for(index = 0; index < SURFACE_NUM; index++) {
+ vaSurfaceAttrib->buffers[index] = (unsigned int)calloc(1, frame_width*frame_height*3/2);
+ }
+ va_status = vaCreateSurfacesWithAttribute(
+ va_dpy,
+ frame_width,
+ frame_height,
+ VA_RT_FORMAT_YUV420,
+ SURFACE_NUM,
+ &surface_id[0],
+ vaSurfaceAttrib);
+ CHECK_VASTATUS(va_status, "vaCreateSurfacesWithAttribute");
+#endif
+
/* Create a context for this decode pipe */
va_status = vaCreateContext(va_dpy, config_id,
- frame_width, ((frame_height+15)/16)*16,
- VA_PROGRESSIVE,&surface_id[0],SURFACE_NUM,&context_id);
+ frame_width, ((frame_height+15)/16)*16,
+ VA_PROGRESSIVE,&surface_id[0],SURFACE_NUM,&context_id);
CHECK_VASTATUS(va_status, "vaCreateContext");
/* store coded data into a file */
@@ -411,22 +463,22 @@ int main(int argc,char **argv)
}
printf("Coded %d frames, %dx%d, save the coded file into %s\n",
- frame_count, frame_width, frame_height, coded_file);
+ frame_count, frame_width, frame_height, coded_file);
do_h264_encoding();
printf("\n\n");
-
+
vaDestroySurfaces(va_dpy,&surface_id[0],SURFACE_NUM);
vaDestroyContext(va_dpy,context_id);
vaDestroyConfig(va_dpy,config_id);
-
+
vaTerminate(va_dpy);
-
+
#ifdef ANDROID
free(x11_display);
#else
XCloseDisplay(x11_display);
#endif
-
+
return 0;
}
diff --git a/test/encode/h264encode_x11.c b/test/encode/h264encode_x11.c
index 7f9494c..3f7aff2 100644
--- a/test/encode/h264encode_x11.c
+++ b/test/encode/h264encode_x11.c
@@ -51,7 +51,11 @@ static VASurfaceID surface_id[SURFACE_NUM];
static Window display_win = 0;
static int win_width;
static int win_height;
-static int frame_width=352, frame_height=288;
+
+static int display_surface(int frame_id, int *exit_encode);
+
+#include "h264encode_common.c"
+
static int display_surface(int frame_id, int *exit_encode)
{
@@ -96,4 +100,3 @@ static int display_surface(int frame_id, int *exit_encode)
return 0;
}
-#include "h264encode_common.c"
diff --git a/test/loadsurface.h b/test/loadsurface.h
index 2cd09c3..ce2f630 100644
--- a/test/loadsurface.h
+++ b/test/loadsurface.h
@@ -244,3 +244,35 @@ static int upload_surface(VADisplay va_dpy, VASurfaceID surface_id,
return 0;
}
+
+
+static int upload_surface_attrib(VADisplay va_dpy, VASurfaceID surface_id,
+ int box_width, int row_shift,
+ int field, unsigned int *addr)
+{
+ VAImage surface_image;
+ void *surface_p=NULL, *U_start,*V_start;
+ VAStatus va_status;
+
+ va_status = vaDeriveImage(va_dpy,surface_id,&surface_image);
+ CHECK_VASTATUS(va_status,"vaDeriveImage");
+
+ surface_p = addr;
+ U_start = (char *)surface_p + surface_image.offsets[1];
+ V_start = (char *)surface_p + surface_image.offsets[2];
+
+ /* assume surface is planar format */
+ yuvgen_planar(surface_image.width, surface_image.height,
+ (unsigned char *)surface_p, surface_image.pitches[0],
+ (unsigned char *)U_start, surface_image.pitches[1],
+ (unsigned char *)V_start, surface_image.pitches[2],
+ (surface_image.format.fourcc==VA_FOURCC_NV12),
+ box_width, row_shift, field);
+
+ vaUnmapBuffer(va_dpy,surface_image.buf);
+
+ vaDestroyImage(va_dpy,surface_image.image_id);
+
+ return 0;
+}
+
diff --git a/test/putsurface/putsurface_common.c b/test/putsurface/putsurface_common.c
index 06f394f..54ae8d3 100644
--- a/test/putsurface/putsurface_common.c
+++ b/test/putsurface/putsurface_common.c
@@ -337,8 +337,12 @@ int main(int argc,char **argv)
va_status = vaInitialize(va_dpy, &major_ver, &minor_ver);
CHECK_VASTATUS(va_status, "vaInitialize");
- va_status = vaCreateSurfaces(va_dpy,surface_width, surface_height,
- VA_RT_FORMAT_YUV420, SURFACE_NUM, &surface_id[0]);
+ va_status = vaCreateSurfaces(
+ va_dpy,
+ VA_RT_FORMAT_YUV420, surface_width, surface_height,
+ &surface_id[0], SURFACE_NUM,
+ NULL, 0
+ );
CHECK_VASTATUS(va_status, "vaCreateSurfaces");
if (multi_thread == 0) /* upload the content for all surfaces */
upload_source_YUV_once_for_all();
diff --git a/test/transcode/Makefile.am b/test/transcode/Makefile.am
new file mode 100644
index 0000000..a721381
--- /dev/null
+++ b/test/transcode/Makefile.am
@@ -0,0 +1,35 @@
+# Copyright (c) 2007 Intel Corporation. All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sub license, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice (including the
+# next paragraph) shall be included in all copies or substantial portions
+# of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+bin_PROGRAMS = mpeg2transcode
+
+INCLUDES = -I$(top_srcdir)
+
+TEST_LIBS = $(top_builddir)/va/$(libvacorelib) $(top_builddir)/va/$(libvabackendlib) -lX11
+
+mpeg2transcode_LDADD = $(TEST_LIBS)
+mpeg2transcode_SOURCES = mpeg2transcode.cpp
+
+valgrind: $(bin_PROGRAMS)
+ for a in $(bin_PROGRAMS); do \
+ valgrind --leak-check=full --show-reachable=yes .libs/$$a; \
+ done
diff --git a/test/transcode/mpeg2transcode.cpp b/test/transcode/mpeg2transcode.cpp
new file mode 100644
index 0000000..fb2e06f
--- /dev/null
+++ b/test/transcode/mpeg2transcode.cpp
@@ -0,0 +1,3488 @@
+/*
+ * Copyright (c) 2007-2011 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * it is a real program to show how VAAPI transcode work,
+ * It will decode a simple mpeg2 clip(320x240) and scale it to 1280x960,
+ * then it will encode it to a 264 file(test.264).
+ *
+ * ./mpeg2transcode : only do decode
+ * ./mpeg2transcode <any parameter >: decode+vpp+encode
+ *
+ */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <getopt.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <va/va.h>
+#include <va/va_enc_h264.h>
+#include <va/va_vpp.h>
+#include <va/va_compat.h>
+#include <pthread.h>
+#include <time.h>
+#include <sys/time.h>
+
+#ifdef ANDROID
+#include <va/va_android.h>
+#include <binder/IPCThreadState.h>
+#include <binder/ProcessState.h>
+#include <binder/IServiceManager.h>
+#include <utils/Log.h>
+#include <surfaceflinger/ISurfaceComposer.h>
+#include <surfaceflinger/Surface.h>
+#include <surfaceflinger/ISurface.h>
+#include <surfaceflinger/SurfaceComposerClient.h>
+#include <binder/MemoryHeapBase.h>
+#define Display unsigned int
+
+using namespace android;
+sp<SurfaceComposerClient> client;
+sp<Surface> android_surface;
+sp<ISurface> android_isurface;
+sp<SurfaceControl> surface_ctrl;
+#include "../android_winsys.cpp"
+#else
+#include <va/va_x11.h>
+#include <X11/Xlib.h>
+#endif
+
+#define CHECK_VASTATUS(va_status,func) \
+if (va_status != VA_STATUS_SUCCESS) { \
+ fprintf(stderr,"%s:%s (%d) failed,exit\n", __func__, func, __LINE__); \
+ exit(1); \
+}
+
+/* Data dump of a 320x240 MPEG-2 video clip (mpeg2.m2v), it has a single frame */
+#define MPEG2_CLIP_DATA_SIZE 19311
+static unsigned char mpeg2_clip[MPEG2_CLIP_DATA_SIZE] = {
+ 0x00, 0x00, 0x01, 0xb3, 0x14, 0x00, 0xf0, 0x12, 0x07, 0x53, 0x23, 0x80,
+ 0x00, 0x00, 0x01, 0xb5, 0x14, 0x8a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0xb5, 0x2b, 0x02, 0x02, 0x02, 0x05, 0x02, 0x07, 0x80, 0x00, 0x00,
+ 0x01, 0xb8, 0x00, 0x08, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0f,
+ 0xff, 0xf8, 0x00, 0x00, 0x01, 0xb5, 0x8f, 0xff, 0xf7, 0x5d, 0x80, 0x00,
+ 0x00, 0x01, 0x01, 0x43, 0xf8, 0x90, 0x03, 0xee, 0x36, 0xd4, 0x92, 0x85,
+ 0x86, 0x37, 0x48, 0x01, 0xb3, 0xf7, 0x9a, 0x1d, 0x5c, 0x38, 0xb1, 0x95,
+ 0xb9, 0x42, 0x43, 0xb2, 0xc2, 0x51, 0x24, 0x31, 0xb2, 0xed, 0x20, 0x73,
+ 0xd9, 0x08, 0xcc, 0x5b, 0xe2, 0x39, 0xbc, 0xdb, 0x12, 0xb7, 0x8c, 0x31,
+ 0xbf, 0x6c, 0x00, 0xc3, 0xeb, 0xc3, 0xd0, 0x6c, 0x3e, 0x16, 0xde, 0xa8,
+ 0x89, 0xf3, 0xc1, 0x17, 0xda, 0x5a, 0x4f, 0xca, 0xb0, 0x6b, 0x7c, 0x07,
+ 0xbb, 0x6c, 0x95, 0x8f, 0x74, 0x35, 0xaa, 0x45, 0x65, 0x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e2, 0xee, 0xcb, 0x55, 0x15, 0x46, 0xb7, 0xe6,
+ 0x71, 0x1e, 0xcf, 0xf8, 0x00, 0x71, 0xd7, 0xb6, 0x3d, 0x60, 0xd0, 0x42,
+ 0x00, 0x69, 0x69, 0x48, 0x51, 0x61, 0xf6, 0xac, 0x85, 0x1e, 0x5b, 0x7d,
+ 0xcf, 0xe4, 0x89, 0xc0, 0x03, 0x0e, 0xe3, 0x9f, 0xb2, 0x29, 0xab, 0xc0,
+ 0x01, 0xec, 0x27, 0xe6, 0xeb, 0xcf, 0x44, 0xb0, 0xb8, 0x91, 0x1b, 0xd7,
+ 0xfd, 0xfd, 0xde, 0x00, 0xdf, 0xe6, 0x13, 0xd7, 0xf5, 0x09, 0xde, 0x46,
+ 0xd3, 0x2d, 0x2f, 0x7f, 0x6a, 0x64, 0x50, 0xe3, 0x8b, 0x6e, 0x9b, 0x2f,
+ 0x2f, 0xc3, 0x28, 0x00, 0xd0, 0xf5, 0x6e, 0x8a, 0x54, 0x95, 0x58, 0x00,
+ 0x00, 0x01, 0xb7
+};
+
+/* hardcoded here without a bitstream parser helper
+ * please see picture mpeg2-I.jpg for bitstream details
+ */
+static VAPictureParameterBufferMPEG2 pic_param={
+ horizontal_size:320,
+ vertical_size:240,
+ forward_reference_picture:0xffffffff,
+ backward_reference_picture:0xffffffff,
+ picture_coding_type:1,
+ f_code:0xffff,
+ {
+ {
+ intra_dc_precision:1,
+ picture_structure:3,
+ top_field_first:0,
+ frame_pred_frame_dct:1,
+ concealment_motion_vectors:0,
+ q_scale_type:1,
+ intra_vlc_format:1,
+ alternate_scan:1,
+ repeat_first_field:0,
+ progressive_frame:1 ,
+ is_first_field:1
+ },
+ }
+};
+
+/* see MPEG2 spec65 for the defines of matrix */
+static VAIQMatrixBufferMPEG2 iq_matrix = {
+ load_intra_quantiser_matrix:1,
+ load_non_intra_quantiser_matrix:1,
+ load_chroma_intra_quantiser_matrix:0,
+ load_chroma_non_intra_quantiser_matrix:0,
+ intra_quantiser_matrix:{
+ 8, 16, 16, 19, 16, 19, 22, 22,
+ 22, 22, 22, 22, 26, 24, 26, 27,
+ 27, 27, 26, 26, 26, 26, 27, 27,
+ 27, 29, 29, 29, 34, 34, 34, 29,
+ 29, 29, 27, 27, 29, 29, 32, 32,
+ 34, 34, 37, 38, 37, 35, 35, 34,
+ 35, 38, 38, 40, 40, 40, 48, 48,
+ 46, 46, 56, 56, 58, 69, 69, 83
+ },
+ non_intra_quantiser_matrix:{16},
+ chroma_intra_quantiser_matrix:{0},
+ chroma_non_intra_quantiser_matrix:{0}
+};
+
+#if 1
+static VASliceParameterBufferMPEG2 slice_param[15]={
+{
+ slice_data_size:1047,
+ slice_data_offset:0,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:0,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1032,
+ slice_data_offset:1047,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:1,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1136,
+ slice_data_offset:2079,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:2,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1333,
+ slice_data_offset:3215,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:3,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1286,
+ slice_data_offset:4548,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:4,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1026,
+ slice_data_offset:5834,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:5,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1257,
+ slice_data_offset:6860,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:6,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1374,
+ slice_data_offset:8117,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:7,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1386,
+ slice_data_offset:9491,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:8,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1290,
+ slice_data_offset:10877,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:9,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1213,
+ slice_data_offset:12167,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:10,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1346,
+ slice_data_offset:13380,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:11,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1439,
+ slice_data_offset:14726,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:12,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1466,
+ slice_data_offset:16165,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:13,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+},
+{
+ slice_data_size:1621,
+ slice_data_offset:17631,
+ slice_data_flag:0,
+ macroblock_offset:38, /* 4byte + 6bits=38bits */
+ slice_horizontal_position:0,
+ slice_vertical_position:14,
+ quantiser_scale_code:8,
+ intra_slice_flag:0
+}
+};
+#endif
+
+#define CLIP_WIDTH 320
+#define CLIP_HEIGHT 240
+
+#define WIN_WIDTH (CLIP_WIDTH * 4)
+#define WIN_HEIGHT (CLIP_HEIGHT * 4)
+
+#define NAL_REF_IDC_NONE 0
+#define NAL_REF_IDC_LOW 1
+#define NAL_REF_IDC_MEDIUM 2
+#define NAL_REF_IDC_HIGH 3
+
+#define NAL_NON_IDR 1
+#define NAL_IDR 5
+#define NAL_SPS 7
+#define NAL_PPS 8
+
+#define SLICE_TYPE_P 0
+#define SLICE_TYPE_B 1
+#define SLICE_TYPE_I 2
+
+#define ENTROPY_MODE_CAVLC 0
+#define ENTROPY_MODE_CABAC 1
+
+#define PROFILE_IDC_BASELINE 66
+#define PROFILE_IDC_MAIN 77
+#define PROFILE_IDC_HIGH 100
+
+static void *drawable_thread0, *drawable_thread1;
+static int surface_width = CLIP_WIDTH, surface_height = CLIP_HEIGHT;
+static int win_width=WIN_WIDTH, win_height=WIN_HEIGHT;
+static unsigned long long frame_num_total = ~0;
+static int check_event = 1;
+static int put_pixmap = 0;
+static int test_clip = 0;
+static int display_field = VA_FRAME_PICTURE;
+static pthread_mutex_t gmutex;
+static int box_width = 32;
+static int multi_thread = 0;
+static int verbose = 0;
+static int zoom_out = 4;
+static VASurfaceID zoom_surface_id = VA_INVALID_SURFACE;
+
+static Display *x11_display;
+static VADisplay va_dpy;
+
+static int picture_width = 1280, picture_width_in_mbs = 80;
+static int picture_height = 960, picture_height_in_mbs = 60;
+static int frame_size = picture_width * picture_height + ((picture_width * picture_height) >> 1) ;
+static unsigned char *newImageBuffer = 0;
+
+static int qp_value = 26;
+
+static int intra_period = 30;
+static int pb_period = 5;
+static int frame_bit_rate = -1;
+
+#define BR_CBR 0
+#define BR_VBR 1
+#define BR_CQP 2
+
+#define MAX_SLICES 32
+
+static int
+build_packed_pic_buffer(unsigned char **header_buffer);
+
+static int
+build_packed_seq_buffer(unsigned char **header_buffer);
+
+struct upload_thread_param
+{
+ FILE *yuv_fp;
+ VASurfaceID surface_id;
+};
+
+static void
+upload_yuv_to_surface(FILE *yuv_fp, VASurfaceID surface_id);
+
+static struct {
+ VAProfile profile;
+ VAEncSequenceParameterBufferH264 seq_param;
+ VAEncPictureParameterBufferH264 pic_param;
+ VAEncSliceParameterBufferH264 slice_param[MAX_SLICES];
+ VAContextID context_id;
+ VAConfigID config_id;
+ VABufferID seq_param_buf_id; /* Sequence level parameter */
+ VABufferID pic_param_buf_id; /* Picture level parameter */
+ VABufferID slice_param_buf_id[MAX_SLICES]; /* Slice level parameter, multil slices */
+ VABufferID codedbuf_buf_id; /* Output buffer, compressed data */
+ VABufferID packed_seq_header_param_buf_id;
+ VABufferID packed_seq_buf_id;
+ VABufferID packed_pic_header_param_buf_id;
+ VABufferID packed_pic_buf_id;
+ int num_slices;
+ int codedbuf_i_size;
+ int codedbuf_pb_size;
+ int current_input_surface;
+ struct upload_thread_param upload_thread_param;
+ pthread_t upload_thread_id;
+ int upload_thread_value;
+} avcenc_context;
+
+static void create_encode_pipe()
+{
+ VAEntrypoint entrypoints[5];
+ int num_entrypoints,slice_entrypoint;
+ VAConfigAttrib attrib[2];
+ int major_ver, minor_ver;
+ VAStatus va_status;
+#if 0
+ x11_display = XOpenDisplay(":0.0");
+ assert(x11_display);
+
+ va_dpy = vaGetDisplay(x11_display);
+ va_status = vaInitialize(va_dpy, &major_ver, &minor_ver);
+ CHECK_VASTATUS(va_status, "vaInitialize");
+#endif
+ vaQueryConfigEntrypoints(va_dpy, avcenc_context.profile, entrypoints,
+ &num_entrypoints);
+
+ for (slice_entrypoint = 0; slice_entrypoint < num_entrypoints; slice_entrypoint++) {
+ if (entrypoints[slice_entrypoint] == VAEntrypointEncSlice)
+ break;
+ }
+
+ if (slice_entrypoint == num_entrypoints) {
+ /* not find Slice entry point */
+ assert(0);
+ }
+
+ /* find out the format for the render target, and rate control mode */
+ attrib[0].type = VAConfigAttribRTFormat;
+ attrib[1].type = VAConfigAttribRateControl;
+ vaGetConfigAttributes(va_dpy, avcenc_context.profile, VAEntrypointEncSlice,
+ &attrib[0], 2);
+
+ if ((attrib[0].value & VA_RT_FORMAT_YUV420) == 0) {
+ /* not find desired YUV420 RT format */
+ assert(0);
+ }
+
+ if ((attrib[1].value & VA_RC_CQP) == 0) {
+ /* Can't find matched RC mode */
+ printf("Can't find the desired RC mode, exit\n");
+ assert(0);
+ }
+
+ attrib[0].value = VA_RT_FORMAT_YUV420; /* set to desired RT format */
+ attrib[1].value = VA_RC_CQP; /* set to desired RC mode */
+
+ va_status = vaCreateConfig(va_dpy, avcenc_context.profile, VAEntrypointEncSlice,
+ &attrib[0], 2,&avcenc_context.config_id);
+ CHECK_VASTATUS(va_status, "vaCreateConfig");
+
+ /* Create a context for this decode pipe */
+ va_status = vaCreateContext(va_dpy, avcenc_context.config_id,
+ picture_width, picture_height,
+ VA_PROGRESSIVE,
+ 0, 0,
+ &avcenc_context.context_id);
+ CHECK_VASTATUS(va_status, "vaCreateContext");
+}
+
+static void destory_encode_pipe()
+{
+ vaDestroyContext(va_dpy,avcenc_context.context_id);
+ vaDestroyConfig(va_dpy,avcenc_context.config_id);
+ vaTerminate(va_dpy);
+ XCloseDisplay(x11_display);
+}
+
+/***************************************************
+ *
+ * The encode pipe resource define
+ *
+ ***************************************************/
+#define SID_INPUT_PICTURE_0 0
+#define SID_INPUT_PICTURE_1 1
+#define SID_REFERENCE_PICTURE_L0 2
+#define SID_REFERENCE_PICTURE_L1 3
+#define SID_RECON_PICTURE 4
+#define SID_NUMBER SID_RECON_PICTURE + 1
+static VASurfaceID surface_ids[SID_NUMBER];
+
+static int frame_number;
+static int enc_frame_number;
+
+/***************************************************/
+
+static void *
+upload_thread_function(void *data)
+{
+ struct upload_thread_param *param = (upload_thread_param*)data;
+
+ upload_yuv_to_surface(param->yuv_fp, param->surface_id);
+
+ return NULL;
+}
+
+static void alloc_encode_resource(FILE *yuv_fp)
+{
+ VAStatus va_status;
+
+ // Create surface
+ va_status = vaCreateSurfaces(va_dpy,
+ picture_width, picture_height,
+ VA_RT_FORMAT_YUV420, SID_NUMBER,
+ &surface_ids[0]);
+ CHECK_VASTATUS(va_status, "vaCreateSurfaces");
+
+ newImageBuffer = (unsigned char *)malloc(frame_size);
+
+ /* firstly upload YUV data to SID_INPUT_PICTURE_1 */
+ avcenc_context.upload_thread_param.yuv_fp = yuv_fp;
+ avcenc_context.upload_thread_param.surface_id = surface_ids[SID_INPUT_PICTURE_1];
+#if 0
+ avcenc_context.upload_thread_value = pthread_create(&avcenc_context.upload_thread_id,
+ NULL,
+ upload_thread_function,
+ (void*)&avcenc_context.upload_thread_param);
+#endif
+upload_yuv_to_surface(yuv_fp, surface_ids[SID_INPUT_PICTURE_1]);
+}
+
+static void release_encode_resource()
+{
+ //pthread_join(avcenc_context.upload_thread_id, NULL);
+ free(newImageBuffer);
+
+ // Release all the surfaces resource
+ vaDestroySurfaces(va_dpy, &surface_ids[0], SID_NUMBER);
+}
+
+static void avcenc_update_picture_parameter(int slice_type, int frame_num, int display_num, int is_idr)
+{
+ VAEncPictureParameterBufferH264 *pic_param;
+ VAStatus va_status;
+
+ // Picture level
+ pic_param = &avcenc_context.pic_param;
+ pic_param->CurrPic.picture_id = surface_ids[SID_RECON_PICTURE];
+ pic_param->CurrPic.TopFieldOrderCnt = display_num * 2;
+ pic_param->ReferenceFrames[0].picture_id = surface_ids[SID_REFERENCE_PICTURE_L0];
+ pic_param->ReferenceFrames[1].picture_id = surface_ids[SID_REFERENCE_PICTURE_L1];
+ pic_param->ReferenceFrames[2].picture_id = VA_INVALID_ID;
+ assert(avcenc_context.codedbuf_buf_id != VA_INVALID_ID);
+ pic_param->coded_buf = avcenc_context.codedbuf_buf_id;
+ pic_param->frame_num = frame_num;
+ pic_param->pic_fields.bits.idr_pic_flag = !!is_idr;
+ pic_param->pic_fields.bits.reference_pic_flag = (slice_type != SLICE_TYPE_B);
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncPictureParameterBufferType,
+ sizeof(*pic_param), 1, pic_param,
+ &avcenc_context.pic_param_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+}
+
+static void upload_yuv_to_surface(FILE *yuv_fp, VASurfaceID surface_id)
+{
+ VAImage surface_image;
+ VAStatus va_status;
+ void *surface_p = NULL;
+ unsigned char *y_src, *u_src, *v_src;
+ unsigned char *y_dst, *u_dst, *v_dst;
+ int y_size = picture_width * picture_height;
+ int u_size = (picture_width >> 1) * (picture_height >> 1);
+ int row, col;
+ size_t n_items;
+ static int flag=1;
+ do {
+ if(flag == 0) break;
+ n_items = fread(newImageBuffer, frame_size, 1, yuv_fp);
+ flag = 0;
+ } while (n_items != 1);
+ va_status = vaDeriveImage(va_dpy, surface_id, &surface_image);
+ CHECK_VASTATUS(va_status,"vaDeriveImage");
+
+ vaMapBuffer(va_dpy, surface_image.buf, &surface_p);
+ assert(VA_STATUS_SUCCESS == va_status);
+
+ y_src = newImageBuffer;
+ u_src = newImageBuffer + y_size; /* UV offset for NV12 */
+ v_src = newImageBuffer + y_size + u_size;
+
+ y_dst = (unsigned char *)(surface_p + surface_image.offsets[0]);
+ u_dst = (unsigned char *)(surface_p + surface_image.offsets[1]); /* UV offset for NV12 */
+ v_dst = (unsigned char *)(surface_p + surface_image.offsets[2]);
+
+ /* Y plane */
+ for (row = 0; row < surface_image.height; row++) {
+ memcpy(y_dst, y_src, surface_image.width);
+ y_dst += surface_image.pitches[0];
+ y_src += picture_width;
+ }
+
+ /* UV plane */
+ memcpy(u_dst, u_src, picture_width*picture_height/2);
+
+#if 0
+ if (surface_image.format.fourcc == VA_FOURCC_NV12) { /* UV plane */
+ for (row = 0; row < surface_image.height / 2; row++) {
+ for (col = 0; col < surface_image.width / 2; col++) {
+ u_dst[col * 2] = u_src[col];
+ u_dst[col * 2 + 1] = v_src[col];
+ }
+
+ u_dst += surface_image.pitches[1];
+ u_src += (picture_width / 2);
+ v_src += (picture_width / 2);
+ }
+ } else {
+ /* FIXME: fix this later */
+ assert(0);
+ }
+#endif
+ vaUnmapBuffer(va_dpy, surface_image.buf);
+ vaDestroyImage(va_dpy, surface_image.image_id);
+}
+
+static void avcenc_update_slice_parameter(int slice_type)
+{
+ VAEncSliceParameterBufferH264 *slice_param;
+ VAStatus va_status;
+ int i;
+
+ // Slice level
+ i = 0;
+ slice_param = &avcenc_context.slice_param[i];
+ slice_param->macroblock_address = 0;
+ slice_param->num_macroblocks = picture_height_in_mbs * picture_width_in_mbs;
+ slice_param->pic_parameter_set_id = 0;
+ slice_param->slice_type = slice_type;
+ slice_param->direct_spatial_mv_pred_flag = 0;
+ slice_param->num_ref_idx_l0_active_minus1 = 0; /* FIXME: ??? */
+ slice_param->num_ref_idx_l1_active_minus1 = 0;
+ slice_param->cabac_init_idc = 0;
+ slice_param->slice_qp_delta = 0;
+ slice_param->disable_deblocking_filter_idc = 0;
+ slice_param->slice_alpha_c0_offset_div2 = 2;
+ slice_param->slice_beta_offset_div2 = 2;
+ slice_param->idr_pic_id = 0;
+
+ /* FIXME: fill other fields */
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncSliceParameterBufferType,
+ sizeof(*slice_param), 1, slice_param,
+ &avcenc_context.slice_param_buf_id[i]);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");;
+
+ i++;
+
+ avcenc_context.num_slices = i;
+}
+
+static int begin_picture(FILE *yuv_fp, int frame_num, int display_num, int slice_type, int is_idr)
+{
+ VAStatus va_status;
+#if 0
+ if (avcenc_context.upload_thread_value != 0) {
+ fprintf(stderr, "FATAL error!!!\n");
+ exit(1);
+ }
+#endif
+ //pthread_join(avcenc_context.upload_thread_id, NULL);
+
+ avcenc_context.upload_thread_value = -1;
+
+ if (avcenc_context.current_input_surface == SID_INPUT_PICTURE_0)
+ avcenc_context.current_input_surface = SID_INPUT_PICTURE_1;
+ else
+ avcenc_context.current_input_surface = SID_INPUT_PICTURE_0;
+
+ if (frame_num == 0) {
+ VAEncPackedHeaderParameterBuffer packed_header_param_buffer;
+ unsigned int length_in_bits, offset_in_bytes;
+ unsigned char *packed_seq_buffer = NULL, *packed_pic_buffer = NULL;
+
+ assert(slice_type == SLICE_TYPE_I);
+ length_in_bits = build_packed_seq_buffer(&packed_seq_buffer);
+ offset_in_bytes = 0;
+ packed_header_param_buffer.type = VAEncPackedHeaderSequence;
+ packed_header_param_buffer.has_emulation_bytes = 0;
+ packed_header_param_buffer.bit_length = length_in_bits;
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncPackedHeaderParameterBufferType,
+ sizeof(packed_header_param_buffer), 1, &packed_header_param_buffer,
+ &avcenc_context.packed_seq_header_param_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncPackedHeaderDataBufferType,
+ (length_in_bits + 7) / 8, 1, packed_seq_buffer,
+ &avcenc_context.packed_seq_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+
+ length_in_bits = build_packed_pic_buffer(&packed_pic_buffer);
+ offset_in_bytes = 0;
+ packed_header_param_buffer.type = VAEncPackedHeaderPicture;
+ packed_header_param_buffer.has_emulation_bytes = 0;
+ packed_header_param_buffer.bit_length = length_in_bits;
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncPackedHeaderParameterBufferType,
+ sizeof(packed_header_param_buffer), 1, &packed_header_param_buffer,
+ &avcenc_context.packed_pic_header_param_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncPackedHeaderDataBufferType,
+ (length_in_bits + 7) / 8, 1, packed_pic_buffer,
+ &avcenc_context.packed_pic_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+
+ free(packed_seq_buffer);
+ free(packed_pic_buffer);
+ }
+
+ /* sequence parameter set */
+ VAEncSequenceParameterBufferH264 *seq_param = &avcenc_context.seq_param;
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncSequenceParameterBufferType,
+ sizeof(*seq_param), 1, seq_param,
+ &avcenc_context.seq_param_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");;
+
+ /* slice parameter */
+ avcenc_update_slice_parameter(slice_type);
+
+ return 0;
+}
+
+int avcenc_render_picture()
+{
+ VAStatus va_status;
+ VABufferID va_buffers[8];
+ unsigned int num_va_buffers = 0;
+
+ va_buffers[num_va_buffers++] = avcenc_context.seq_param_buf_id;
+ va_buffers[num_va_buffers++] = avcenc_context.pic_param_buf_id;
+
+ if (avcenc_context.packed_seq_header_param_buf_id != VA_INVALID_ID)
+ va_buffers[num_va_buffers++] = avcenc_context.packed_seq_header_param_buf_id;
+
+ if (avcenc_context.packed_seq_buf_id != VA_INVALID_ID)
+ va_buffers[num_va_buffers++] = avcenc_context.packed_seq_buf_id;
+
+ if (avcenc_context.packed_pic_header_param_buf_id != VA_INVALID_ID)
+ va_buffers[num_va_buffers++] = avcenc_context.packed_pic_header_param_buf_id;
+
+ if (avcenc_context.packed_pic_buf_id != VA_INVALID_ID)
+ va_buffers[num_va_buffers++] = avcenc_context.packed_pic_buf_id;
+
+ va_status = vaBeginPicture(va_dpy,
+ avcenc_context.context_id,
+ surface_ids[avcenc_context.current_input_surface]);
+ CHECK_VASTATUS(va_status,"vaBeginPicture");
+
+ va_status = vaRenderPicture(va_dpy,
+ avcenc_context.context_id,
+ va_buffers,
+ num_va_buffers);
+ CHECK_VASTATUS(va_status,"vaRenderPicture");
+
+ va_status = vaRenderPicture(va_dpy,
+ avcenc_context.context_id,
+ &avcenc_context.slice_param_buf_id[0],
+ avcenc_context.num_slices);
+ CHECK_VASTATUS(va_status,"vaRenderPicture");
+
+ va_status = vaEndPicture(va_dpy, avcenc_context.context_id);
+ CHECK_VASTATUS(va_status,"vaEndPicture");
+
+ return 0;
+}
+
+static int avcenc_destroy_buffers(VABufferID *va_buffers, unsigned int num_va_buffers)
+{
+ VAStatus va_status;
+ unsigned int i;
+
+ for (i = 0; i < num_va_buffers; i++) {
+ if (va_buffers[i] != VA_INVALID_ID) {
+ va_status = vaDestroyBuffer(va_dpy, va_buffers[i]);
+ CHECK_VASTATUS(va_status,"vaDestroyBuffer");
+ va_buffers[i] = VA_INVALID_ID;
+ }
+ }
+
+ return 0;
+}
+
+static void end_picture(int slice_type, int next_is_bpic)
+{
+ VABufferID tempID;
+
+ /* Prepare for next picture */
+ tempID = surface_ids[SID_RECON_PICTURE];
+
+ if (slice_type != SLICE_TYPE_B) {
+ if (next_is_bpic) {
+ surface_ids[SID_RECON_PICTURE] = surface_ids[SID_REFERENCE_PICTURE_L1];
+ surface_ids[SID_REFERENCE_PICTURE_L1] = tempID;
+ } else {
+ surface_ids[SID_RECON_PICTURE] = surface_ids[SID_REFERENCE_PICTURE_L0];
+ surface_ids[SID_REFERENCE_PICTURE_L0] = tempID;
+ }
+ } else {
+ if (!next_is_bpic) {
+ surface_ids[SID_RECON_PICTURE] = surface_ids[SID_REFERENCE_PICTURE_L0];
+ surface_ids[SID_REFERENCE_PICTURE_L0] = surface_ids[SID_REFERENCE_PICTURE_L1];
+ surface_ids[SID_REFERENCE_PICTURE_L1] = tempID;
+ }
+ }
+
+ avcenc_destroy_buffers(&avcenc_context.seq_param_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.pic_param_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.packed_seq_header_param_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.packed_seq_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.packed_pic_header_param_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.packed_pic_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.slice_param_buf_id[0], avcenc_context.num_slices);
+ avcenc_destroy_buffers(&avcenc_context.codedbuf_buf_id, 1);
+ memset(avcenc_context.slice_param, 0, sizeof(avcenc_context.slice_param));
+ avcenc_context.num_slices = 0;
+}
+
+#define BITSTREAM_ALLOCATE_STEPPING 4096
+
+struct __bitstream {
+ unsigned int *buffer;
+ int bit_offset;
+ int max_size_in_dword;
+};
+
+typedef struct __bitstream bitstream;
+
+#if 0
+static int
+get_coded_bitsteam_length(unsigned char *buffer, int buffer_length)
+{
+ int i;
+
+ for (i = 0; i < buffer_length - 3; i++) {
+ if (!buffer[i] &&
+ !buffer[i + 1] &&
+ !buffer[i + 2] &&
+ !buffer[i + 3])
+ break;
+ }
+
+ return i;
+}
+#endif
+
+static unsigned int
+swap32(unsigned int val)
+{
+ unsigned char *pval = (unsigned char *)&val;
+
+ return ((pval[0] << 24) |
+ (pval[1] << 16) |
+ (pval[2] << 8) |
+ (pval[3] << 0));
+}
+
+static void
+bitstream_start(bitstream *bs)
+{
+ bs->max_size_in_dword = BITSTREAM_ALLOCATE_STEPPING;
+ bs->buffer = (unsigned int *)calloc(bs->max_size_in_dword * sizeof(int), 1);
+ bs->bit_offset = 0;
+}
+
+static void
+bitstream_end(bitstream *bs)
+{
+ int pos = (bs->bit_offset >> 5);
+ int bit_offset = (bs->bit_offset & 0x1f);
+ int bit_left = 32 - bit_offset;
+
+ if (bit_offset) {
+ bs->buffer[pos] = swap32((bs->buffer[pos] << bit_left));
+ }
+}
+
+static void
+bitstream_put_ui(bitstream *bs, unsigned int val, int size_in_bits)
+{
+ int pos = (bs->bit_offset >> 5);
+ int bit_offset = (bs->bit_offset & 0x1f);
+ int bit_left = 32 - bit_offset;
+
+ if (!size_in_bits)
+ return;
+
+ bs->bit_offset += size_in_bits;
+
+ if (bit_left > size_in_bits) {
+ bs->buffer[pos] = (bs->buffer[pos] << size_in_bits | val);
+ } else {
+ size_in_bits -= bit_left;
+ bs->buffer[pos] = (bs->buffer[pos] << bit_left) | (val >> size_in_bits);
+ bs->buffer[pos] = swap32(bs->buffer[pos]);
+
+ if (pos + 1 == bs->max_size_in_dword) {
+ bs->max_size_in_dword += BITSTREAM_ALLOCATE_STEPPING;
+ bs->buffer = (unsigned int *)realloc(bs->buffer, bs->max_size_in_dword * sizeof(unsigned int));
+ }
+
+ bs->buffer[pos + 1] = val;
+ }
+}
+
+static void
+bitstream_put_ue(bitstream *bs, unsigned int val)
+{
+ int size_in_bits = 0;
+ int tmp_val = ++val;
+
+ while (tmp_val) {
+ tmp_val >>= 1;
+ size_in_bits++;
+ }
+
+ bitstream_put_ui(bs, 0, size_in_bits - 1); // leading zero
+ bitstream_put_ui(bs, val, size_in_bits);
+}
+
+static void
+bitstream_put_se(bitstream *bs, int val)
+{
+ unsigned int new_val;
+
+ if (val <= 0)
+ new_val = -2 * val;
+ else
+ new_val = 2 * val - 1;
+
+ bitstream_put_ue(bs, new_val);
+}
+
+static void
+bitstream_byte_aligning(bitstream *bs, int bit)
+{
+ int bit_offset = (bs->bit_offset & 0x7);
+ int bit_left = 8 - bit_offset;
+ int new_val;
+
+ if (!bit_offset)
+ return;
+
+ assert(bit == 0 || bit == 1);
+
+ if (bit)
+ new_val = (1 << bit_left) - 1;
+ else
+ new_val = 0;
+
+ bitstream_put_ui(bs, new_val, bit_left);
+}
+
+static void
+rbsp_trailing_bits(bitstream *bs)
+{
+ bitstream_put_ui(bs, 1, 1);
+ bitstream_byte_aligning(bs, 0);
+}
+
+static void nal_start_code_prefix(bitstream *bs)
+{
+ bitstream_put_ui(bs, 0x00000001, 32);
+}
+
+static void nal_header(bitstream *bs, int nal_ref_idc, int nal_unit_type)
+{
+ bitstream_put_ui(bs, 0, 1); /* forbidden_zero_bit: 0 */
+ bitstream_put_ui(bs, nal_ref_idc, 2);
+ bitstream_put_ui(bs, nal_unit_type, 5);
+}
+
+static void sps_rbsp(bitstream *bs)
+{
+ VAEncSequenceParameterBufferH264 *seq_param = &avcenc_context.seq_param;
+ int profile_idc = PROFILE_IDC_BASELINE;
+
+ if (avcenc_context.profile == VAProfileH264High)
+ profile_idc = PROFILE_IDC_HIGH;
+ else if (avcenc_context.profile == VAProfileH264Main)
+ profile_idc = PROFILE_IDC_MAIN;
+
+ bitstream_put_ui(bs, profile_idc, 8); /* profile_idc */
+ bitstream_put_ui(bs, 0, 1); /* constraint_set0_flag */
+ bitstream_put_ui(bs, 1, 1); /* constraint_set1_flag */
+ bitstream_put_ui(bs, 0, 1); /* constraint_set2_flag */
+ bitstream_put_ui(bs, 0, 1); /* constraint_set3_flag */
+ bitstream_put_ui(bs, 0, 4); /* reserved_zero_4bits */
+ bitstream_put_ui(bs, seq_param->level_idc, 8); /* level_idc */
+ bitstream_put_ue(bs, seq_param->seq_parameter_set_id); /* seq_parameter_set_id */
+
+ bitstream_put_ue(bs, seq_param->seq_fields.bits.log2_max_frame_num_minus4); /* log2_max_frame_num_minus4 */
+ bitstream_put_ue(bs, seq_param->seq_fields.bits.pic_order_cnt_type); /* pic_order_cnt_type */
+
+ if (seq_param->seq_fields.bits.pic_order_cnt_type == 0)
+ bitstream_put_ue(bs, seq_param->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4); /* log2_max_pic_order_cnt_lsb_minus4 */
+ else {
+ assert(0);
+ }
+
+ bitstream_put_ue(bs, seq_param->max_num_ref_frames); /* num_ref_frames */
+ bitstream_put_ui(bs, 0, 1); /* gaps_in_frame_num_value_allowed_flag */
+
+ bitstream_put_ue(bs, seq_param->picture_width_in_mbs - 1); /* pic_width_in_mbs_minus1 */
+ bitstream_put_ue(bs, seq_param->picture_height_in_mbs - 1); /* pic_height_in_map_units_minus1 */
+ bitstream_put_ui(bs, seq_param->seq_fields.bits.frame_mbs_only_flag, 1); /* frame_mbs_only_flag */
+
+ if (!seq_param->seq_fields.bits.frame_mbs_only_flag) {
+ assert(0);
+ }
+
+ bitstream_put_ui(bs, seq_param->seq_fields.bits.direct_8x8_inference_flag, 1); /* direct_8x8_inference_flag */
+ bitstream_put_ui(bs, seq_param->frame_cropping_flag, 1); /* frame_cropping_flag */
+
+ if (seq_param->frame_cropping_flag) {
+ bitstream_put_ue(bs, seq_param->frame_crop_left_offset); /* frame_crop_left_offset */
+ bitstream_put_ue(bs, seq_param->frame_crop_right_offset); /* frame_crop_right_offset */
+ bitstream_put_ue(bs, seq_param->frame_crop_top_offset); /* frame_crop_top_offset */
+ bitstream_put_ue(bs, seq_param->frame_crop_bottom_offset); /* frame_crop_bottom_offset */
+ }
+
+ bitstream_put_ui(bs, 0, 1); /* vui_parameters_present_flag */
+ rbsp_trailing_bits(bs); /* rbsp_trailing_bits */
+}
+
+#if 0
+static void build_nal_sps(FILE *avc_fp)
+{
+ bitstream bs;
+
+ bitstream_start(&bs);
+ nal_start_code_prefix(&bs);
+ nal_header(&bs, NAL_REF_IDC_HIGH, NAL_SPS);
+ sps_rbsp(&bs);
+ bitstream_end(&bs, avc_fp);
+}
+#endif
+
+static void pps_rbsp(bitstream *bs)
+{
+ VAEncPictureParameterBufferH264 *pic_param = &avcenc_context.pic_param;
+
+ bitstream_put_ue(bs, pic_param->pic_parameter_set_id); /* pic_parameter_set_id */
+ bitstream_put_ue(bs, pic_param->seq_parameter_set_id); /* seq_parameter_set_id */
+
+ bitstream_put_ui(bs, pic_param->pic_fields.bits.entropy_coding_mode_flag, 1); /* entropy_coding_mode_flag */
+
+ bitstream_put_ui(bs, 0, 1); /* pic_order_present_flag: 0 */
+
+ bitstream_put_ue(bs, 0); /* num_slice_groups_minus1 */
+
+ bitstream_put_ue(bs, pic_param->num_ref_idx_l0_active_minus1); /* num_ref_idx_l0_active_minus1 */
+ bitstream_put_ue(bs, pic_param->num_ref_idx_l1_active_minus1); /* num_ref_idx_l1_active_minus1 1 */
+
+ bitstream_put_ui(bs, pic_param->pic_fields.bits.weighted_pred_flag, 1); /* weighted_pred_flag: 0 */
+ bitstream_put_ui(bs, pic_param->pic_fields.bits.weighted_bipred_idc, 2); /* weighted_bipred_idc: 0 */
+
+ bitstream_put_se(bs, pic_param->pic_init_qp - 26); /* pic_init_qp_minus26 */
+ bitstream_put_se(bs, 0); /* pic_init_qs_minus26 */
+ bitstream_put_se(bs, 0); /* chroma_qp_index_offset */
+
+ bitstream_put_ui(bs, pic_param->pic_fields.bits.deblocking_filter_control_present_flag, 1); /* deblocking_filter_control_present_flag */
+ bitstream_put_ui(bs, 0, 1); /* constrained_intra_pred_flag */
+ bitstream_put_ui(bs, 0, 1); /* redundant_pic_cnt_present_flag */
+
+ rbsp_trailing_bits(bs);
+}
+
+#if 0
+static void build_nal_pps(FILE *avc_fp)
+{
+ bitstream bs;
+
+ bitstream_start(&bs);
+ nal_start_code_prefix(&bs);
+ nal_header(&bs, NAL_REF_IDC_HIGH, NAL_PPS);
+ pps_rbsp(&bs);
+ bitstream_end(&bs, avc_fp);
+}
+
+static void
+build_header(FILE *avc_fp)
+{
+ build_nal_sps(avc_fp);
+ build_nal_pps(avc_fp);
+}
+#endif
+
+static int
+build_packed_pic_buffer(unsigned char **header_buffer)
+{
+ bitstream bs;
+
+ bitstream_start(&bs);
+ nal_start_code_prefix(&bs);
+ nal_header(&bs, NAL_REF_IDC_HIGH, NAL_PPS);
+ pps_rbsp(&bs);
+ bitstream_end(&bs);
+
+ *header_buffer = (unsigned char *)bs.buffer;
+ return bs.bit_offset;
+}
+
+static int
+build_packed_seq_buffer(unsigned char **header_buffer)
+{
+ bitstream bs;
+
+ bitstream_start(&bs);
+ nal_start_code_prefix(&bs);
+ nal_header(&bs, NAL_REF_IDC_HIGH, NAL_SPS);
+ sps_rbsp(&bs);
+ bitstream_end(&bs);
+
+ *header_buffer = (unsigned char *)bs.buffer;
+ return bs.bit_offset;
+}
+
+
+#if 0
+static void
+slice_header(bitstream *bs, int frame_num, int display_frame, int slice_type, int nal_ref_idc, int is_idr)
+{
+ VAEncSequenceParameterBufferH264 *seq_param = &avcenc_context.seq_param;
+ VAEncPictureParameterBufferH264 *pic_param = &avcenc_context.pic_param;
+ int is_cabac = (pic_param->pic_fields.bits.entropy_coding_mode_flag == ENTROPY_MODE_CABAC);
+
+ bitstream_put_ue(bs, 0); /* first_mb_in_slice: 0 */
+ bitstream_put_ue(bs, slice_type); /* slice_type */
+ bitstream_put_ue(bs, 0); /* pic_parameter_set_id: 0 */
+ bitstream_put_ui(bs, frame_num & 0x0F, seq_param->seq_fields.bits.log2_max_frame_num_minus4 + 4); /* frame_num */
+
+ /* frame_mbs_only_flag == 1 */
+ if (!seq_param->seq_fields.bits.frame_mbs_only_flag) {
+ /* FIXME: */
+ assert(0);
+ }
+
+ if (is_idr)
+ bitstream_put_ue(bs, 0); /* idr_pic_id: 0 */
+
+ if (seq_param->seq_fields.bits.pic_order_cnt_type == 0) {
+ bitstream_put_ui(bs, (display_frame*2) & 0x3F, seq_param->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4 + 4);
+ /* only support frame */
+ } else {
+ /* FIXME: */
+ assert(0);
+ }
+
+ /* redundant_pic_cnt_present_flag == 0 */
+
+ /* slice type */
+ if (slice_type == SLICE_TYPE_P) {
+ bitstream_put_ui(bs, 0, 1); /* num_ref_idx_active_override_flag: 0 */
+ /* ref_pic_list_reordering */
+ bitstream_put_ui(bs, 0, 1); /* ref_pic_list_reordering_flag_l0: 0 */
+ } else if (slice_type == SLICE_TYPE_B) {
+ bitstream_put_ui(bs, 1, 1); /* direct_spatial_mv_pred: 1 */
+ bitstream_put_ui(bs, 0, 1); /* num_ref_idx_active_override_flag: 0 */
+ /* ref_pic_list_reordering */
+ bitstream_put_ui(bs, 0, 1); /* ref_pic_list_reordering_flag_l0: 0 */
+ bitstream_put_ui(bs, 0, 1); /* ref_pic_list_reordering_flag_l1: 0 */
+ }
+
+ /* weighted_pred_flag == 0 */
+
+ /* dec_ref_pic_marking */
+ if (nal_ref_idc != 0) {
+ if ( is_idr) {
+ bitstream_put_ui(bs, 0, 1); /* no_output_of_prior_pics_flag: 0 */
+ bitstream_put_ui(bs, 0, 1); /* long_term_reference_flag: 0 */
+ } else {
+ bitstream_put_ui(bs, 0, 1); /* adaptive_ref_pic_marking_mode_flag: 0 */
+ }
+ }
+
+ if (is_cabac && (slice_type != SLICE_TYPE_I))
+ bitstream_put_ue(bs, 0); /* cabac_init_idc: 0 */
+
+ bitstream_put_se(bs, 0); /* slice_qp_delta: 0 */
+
+ if (pic_param->pic_fields.bits.deblocking_filter_control_present_flag == 1) {
+ bitstream_put_ue(bs, 0); /* disable_deblocking_filter_idc: 0 */
+ bitstream_put_se(bs, 2); /* slice_alpha_c0_offset_div2: 2 */
+ bitstream_put_se(bs, 2); /* slice_beta_offset_div2: 2 */
+ }
+}
+
+static void
+slice_data(bitstream *bs)
+{
+ VACodedBufferSegment *coded_buffer_segment;
+ unsigned char *coded_mem;
+ int i, slice_data_length;
+ VAStatus va_status;
+ VASurfaceStatus surface_status;
+
+ va_status = vaSyncSurface(va_dpy, surface_ids[avcenc_context.current_input_surface]);
+ CHECK_VASTATUS(va_status,"vaSyncSurface");
+
+ surface_status = 0;
+ va_status = vaQuerySurfaceStatus(va_dpy, surface_ids[avcenc_context.current_input_surface], &surface_status);
+ CHECK_VASTATUS(va_status,"vaQuerySurfaceStatus");
+
+ va_status = vaMapBuffer(va_dpy, avcenc_context.codedbuf_buf_id, (void **)(&coded_buffer_segment));
+ CHECK_VASTATUS(va_status,"vaMapBuffer");
+ coded_mem = coded_buffer_segment->buf;
+
+ slice_data_length = get_coded_bitsteam_length(coded_mem, codedbuf_size);
+
+ for (i = 0; i < slice_data_length; i++) {
+ bitstream_put_ui(bs, *coded_mem, 8);
+ coded_mem++;
+ }
+
+ vaUnmapBuffer(va_dpy, avcenc_context.codedbuf_buf_id);
+}
+
+static void
+build_nal_slice(FILE *avc_fp, int frame_num, int display_frame, int slice_type, int is_idr)
+{
+ bitstream bs;
+
+ bitstream_start(&bs);
+ slice_data(&bs);
+ bitstream_end(&bs, avc_fp);
+}
+
+#endif
+
+static int
+store_coded_buffer(FILE *avc_fp, int slice_type)
+{
+ VACodedBufferSegment *coded_buffer_segment;
+ unsigned char *coded_mem;
+ int slice_data_length;
+ VAStatus va_status;
+ VASurfaceStatus surface_status;
+ size_t w_items;
+
+ va_status = vaSyncSurface(va_dpy, surface_ids[avcenc_context.current_input_surface]);
+ CHECK_VASTATUS(va_status,"vaSyncSurface");
+
+ surface_status = (VASurfaceStatus)0;
+ va_status = vaQuerySurfaceStatus(va_dpy, surface_ids[avcenc_context.current_input_surface], &surface_status);
+ CHECK_VASTATUS(va_status,"vaQuerySurfaceStatus");
+
+ va_status = vaMapBuffer(va_dpy, avcenc_context.codedbuf_buf_id, (void **)(&coded_buffer_segment));
+ CHECK_VASTATUS(va_status,"vaMapBuffer");
+ coded_mem = (unsigned char *)coded_buffer_segment->buf;
+
+ if (coded_buffer_segment->status & VA_CODED_BUF_STATUS_SLICE_OVERFLOW_MASK) {
+ if (slice_type == SLICE_TYPE_I)
+ avcenc_context.codedbuf_i_size *= 2;
+ else
+ avcenc_context.codedbuf_pb_size *= 2;
+
+ vaUnmapBuffer(va_dpy, avcenc_context.codedbuf_buf_id);
+ return -1;
+ }
+
+ slice_data_length = coded_buffer_segment->size;
+ do {
+ w_items = fwrite(coded_mem, slice_data_length, 1, avc_fp);
+ } while (w_items != 1);
+
+ if (slice_type == SLICE_TYPE_I) {
+ if (avcenc_context.codedbuf_i_size > slice_data_length * 3 / 2) {
+ avcenc_context.codedbuf_i_size = slice_data_length * 3 / 2;
+ }
+
+ if (avcenc_context.codedbuf_pb_size < slice_data_length) {
+ avcenc_context.codedbuf_pb_size = slice_data_length;
+ }
+ } else {
+ if (avcenc_context.codedbuf_pb_size > slice_data_length * 3 / 2) {
+ avcenc_context.codedbuf_pb_size = slice_data_length * 3 / 2;
+ }
+ }
+
+ vaUnmapBuffer(va_dpy, avcenc_context.codedbuf_buf_id);
+
+ return 0;
+}
+
+static void
+encode_picture(FILE *yuv_fp, FILE *avc_fp,
+ int frame_num, int display_num,
+ int is_idr,
+ int slice_type, int next_is_bpic,
+ int next_display_num)
+{
+ VAStatus va_status;
+ int ret = 0, codedbuf_size;
+
+ begin_picture(yuv_fp, frame_num, display_num, slice_type, is_idr);
+
+ //if (next_display_num < frame_number) {
+ if (1) {
+ int index;
+
+ /* prepare for next frame */
+ if (avcenc_context.current_input_surface == SID_INPUT_PICTURE_0)
+ index = SID_INPUT_PICTURE_1;
+ else
+ index = SID_INPUT_PICTURE_0;
+ if ( next_display_num >= frame_number )
+ next_display_num = frame_number - 1;
+ fseek(yuv_fp, frame_size * next_display_num, SEEK_SET);
+ avcenc_context.upload_thread_param.yuv_fp = yuv_fp;
+ avcenc_context.upload_thread_param.surface_id = surface_ids[index];
+#if 0
+ avcenc_context.upload_thread_value = pthread_create(&avcenc_context.upload_thread_id,
+ NULL,
+ upload_thread_function,
+ (void*)&avcenc_context.upload_thread_param);
+#endif
+//upload_thread_function();
+upload_yuv_to_surface(yuv_fp, surface_ids[index]);
+ }
+
+ do {
+ avcenc_destroy_buffers(&avcenc_context.codedbuf_buf_id, 1);
+ avcenc_destroy_buffers(&avcenc_context.pic_param_buf_id, 1);
+
+
+ if (SLICE_TYPE_I == slice_type) {
+ codedbuf_size = avcenc_context.codedbuf_i_size;
+ } else {
+ codedbuf_size = avcenc_context.codedbuf_pb_size;
+ }
+
+ /* coded buffer */
+ va_status = vaCreateBuffer(va_dpy,
+ avcenc_context.context_id,
+ VAEncCodedBufferType,
+ codedbuf_size, 1, NULL,
+ &avcenc_context.codedbuf_buf_id);
+ CHECK_VASTATUS(va_status,"vaCreateBuffer");
+
+ /* picture parameter set */
+ avcenc_update_picture_parameter(slice_type, frame_num, display_num, is_idr);
+
+ avcenc_render_picture();
+
+ ret = store_coded_buffer(avc_fp, slice_type);
+ } while (ret);
+
+ end_picture(slice_type, next_is_bpic);
+}
+
+static void encode_pb_pictures(FILE *yuv_fp, FILE *avc_fp, int f, int nbframes, int next_f)
+{
+ int i;
+ encode_picture(yuv_fp, avc_fp,
+ enc_frame_number, f + nbframes,
+ 0,
+ SLICE_TYPE_P, 1, f);
+
+ for( i = 0; i < nbframes - 1; i++) {
+ encode_picture(yuv_fp, avc_fp,
+ enc_frame_number + 1, f + i,
+ 0,
+ SLICE_TYPE_B, 1, f + i + 1);
+ }
+
+ encode_picture(yuv_fp, avc_fp,
+ enc_frame_number + 1, f + nbframes - 1,
+ 0,
+ SLICE_TYPE_B, 0, next_f);
+}
+
+static void show_help()
+{
+ printf("Usage: avnenc <width> <height> <input_yuvfile> <output_avcfile> [qp=qpvalue|fb=framebitrate] [mode=0(I frames only)/1(I and P frames)/2(I, P and B frames)\n");
+}
+
+static void avcenc_context_seq_param_init(VAEncSequenceParameterBufferH264 *seq_param,
+ int width, int height)
+
+{
+ int width_in_mbs = (width + 15) / 16;
+ int height_in_mbs = (height + 15) / 16;
+ int frame_cropping_flag = 0;
+ int frame_crop_bottom_offset = 0;
+
+ seq_param->seq_parameter_set_id = 0;
+ seq_param->level_idc = 41;
+ seq_param->intra_period = intra_period;
+ seq_param->ip_period = 0; /* FIXME: ??? */
+ seq_param->max_num_ref_frames = 4;
+ seq_param->picture_width_in_mbs = width_in_mbs;
+ seq_param->picture_height_in_mbs = height_in_mbs;
+ seq_param->seq_fields.bits.frame_mbs_only_flag = 1;
+ seq_param->time_scale = 900;
+ seq_param->num_units_in_tick = 15;
+
+ if (height_in_mbs * 16 - height) {
+ frame_cropping_flag = 1;
+ frame_crop_bottom_offset =
+ (height_in_mbs * 16 - height) / (2 * (!seq_param->seq_fields.bits.frame_mbs_only_flag + 1));
+ }
+
+ seq_param->frame_cropping_flag = frame_cropping_flag;
+ seq_param->frame_crop_left_offset = 0;
+ seq_param->frame_crop_right_offset = 0;
+ seq_param->frame_crop_top_offset = 0;
+ seq_param->frame_crop_bottom_offset = frame_crop_bottom_offset;
+
+ seq_param->seq_fields.bits.pic_order_cnt_type = 0;
+ seq_param->seq_fields.bits.direct_8x8_inference_flag = 0;
+
+ seq_param->seq_fields.bits.log2_max_frame_num_minus4 = 0;
+ seq_param->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4 = 2;
+
+ seq_param->vui_parameters_present_flag = 0;
+}
+
+static void avcenc_context_pic_param_init(VAEncPictureParameterBufferH264 *pic_param)
+{
+ pic_param->seq_parameter_set_id = 0;
+ pic_param->pic_parameter_set_id = 0;
+
+ pic_param->last_picture = 0;
+ pic_param->frame_num = 0;
+
+ pic_param->pic_init_qp = (qp_value >= 0 ? qp_value : 26);
+ pic_param->num_ref_idx_l0_active_minus1 = 0;
+ pic_param->num_ref_idx_l1_active_minus1 = 0;
+
+ pic_param->pic_fields.bits.idr_pic_flag = 0;
+ pic_param->pic_fields.bits.reference_pic_flag = 0;
+ pic_param->pic_fields.bits.entropy_coding_mode_flag = ENTROPY_MODE_CABAC;
+ pic_param->pic_fields.bits.weighted_pred_flag = 0;
+ pic_param->pic_fields.bits.weighted_bipred_idc = 0;
+ pic_param->pic_fields.bits.transform_8x8_mode_flag = 0;
+ pic_param->pic_fields.bits.deblocking_filter_control_present_flag = 1;
+}
+
+static void avcenc_context_init(int width, int height)
+{
+ int i;
+ memset(&avcenc_context, 0, sizeof(avcenc_context));
+ avcenc_context.profile = VAProfileH264Main;
+ avcenc_context.seq_param_buf_id = VA_INVALID_ID;
+ avcenc_context.pic_param_buf_id = VA_INVALID_ID;
+ avcenc_context.packed_seq_header_param_buf_id = VA_INVALID_ID;
+ avcenc_context.packed_seq_buf_id = VA_INVALID_ID;
+ avcenc_context.packed_pic_header_param_buf_id = VA_INVALID_ID;
+ avcenc_context.packed_pic_buf_id = VA_INVALID_ID;
+ avcenc_context.codedbuf_buf_id = VA_INVALID_ID;
+ avcenc_context.codedbuf_i_size = width * height;
+ avcenc_context.codedbuf_pb_size = 0;
+ avcenc_context.current_input_surface = SID_INPUT_PICTURE_0;
+ avcenc_context.upload_thread_value = -1;
+
+ for (i = 0; i < MAX_SLICES; i++) {
+ avcenc_context.slice_param_buf_id[i] = VA_INVALID_ID;
+ }
+
+ avcenc_context_seq_param_init(&avcenc_context.seq_param, width, height);
+ avcenc_context_pic_param_init(&avcenc_context.pic_param);
+}
+
+static int
+zoom_out_surface(VADisplay va_dpy,
+ VASurfaceID in_surface_id,
+ VASurfaceID *out_surface_id)
+{
+ VAStatus va_status;
+ VAEntrypoint entrypoints[5];
+ VAConfigAttrib attrib;
+ VAConfigID config_id;
+ VASurfaceID vpp_surface_id = VA_INVALID_SURFACE;
+ VAContextID context_id;
+ VAProcPipelineCaps vpp_cap;
+ VABufferID pipeline_param_buf_id = VA_INVALID_ID;
+ VAProcPipelineParameterBuffer pipeline_param;
+ int num_entrypoints, proc_entrypoint;
+ VARectangle surface_region, output_region;
+ VABufferID filter_bufs[VAProcFilterCount];
+ unsigned int num_filter_bufs = 0;
+
+
+ va_status = vaQueryConfigEntrypoints(va_dpy,
+ VAProfileNone,
+ entrypoints,
+ &num_entrypoints);
+ CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints");
+
+ for (proc_entrypoint = 0; proc_entrypoint < num_entrypoints; proc_entrypoint++) {
+ if (entrypoints[proc_entrypoint] == VAEntrypointVideoProc)
+ break;
+ }
+
+ if (proc_entrypoint == num_entrypoints) {
+ /* not find Video Proc entry point */
+ assert(0);
+ }
+
+ attrib.type = VAConfigAttribRTFormat;
+ vaGetConfigAttributes(va_dpy,
+ VAProfileNone,
+ VAEntrypointVideoProc,
+ &attrib,
+ 1);
+
+ if ((attrib.value & VA_RT_FORMAT_YUV420) == 0) {
+ assert(0);
+ }
+
+ va_status = vaCreateConfig(va_dpy,
+ VAProfileNone,
+ VAEntrypointVideoProc,
+ &attrib,
+ 1,
+ &config_id);
+ CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints");
+
+ va_status = vaCreateSurfaces(va_dpy,
+ surface_width * zoom_out,
+ surface_height * zoom_out,
+ VA_RT_FORMAT_YUV420,
+ 1,
+ &vpp_surface_id);
+ CHECK_VASTATUS(va_status, "vaCreateSurfaces");
+
+ /* Create a context for VPP pipe */
+ va_status = vaCreateContext(va_dpy,
+ config_id,
+ surface_width,
+ surface_height,
+ VA_PROGRESSIVE,
+ &vpp_surface_id,
+ 1,
+ &context_id);
+ CHECK_VASTATUS(va_status, "vaCreateContext");
+
+ vaQueryVideoProcPipelineCaps(va_dpy,
+ context_id,
+ filter_bufs, num_filter_bufs,
+ &vpp_cap);
+ CHECK_VASTATUS(va_status, "vaQueryVideoProcPipelineCaps");
+
+ surface_region.x = 0;
+ surface_region.y = 0;
+ surface_region.width = surface_width;
+ surface_region.height = surface_height;
+
+ output_region.x = 0;
+ output_region.y = 0;
+ output_region.width = surface_width * zoom_out;
+ output_region.height = surface_height * zoom_out;
+
+ memset(&pipeline_param, 0, sizeof(pipeline_param));
+ pipeline_param.surface = in_surface_id;
+ pipeline_param.surface_region = &surface_region;
+ pipeline_param.output_region = &output_region;
+
+ va_status = vaCreateBuffer(va_dpy,
+ context_id,
+ VAProcPipelineParameterBufferType,
+ sizeof(pipeline_param),
+ 1,
+ &pipeline_param,
+ &pipeline_param_buf_id);
+ CHECK_VASTATUS(va_status, "vaCreateBuffer");
+
+ va_status = vaBeginPicture(va_dpy,
+ context_id,
+ vpp_surface_id);
+ CHECK_VASTATUS(va_status, "vaBeginPicture");
+
+ va_status = vaRenderPicture(va_dpy,
+ context_id,
+ &pipeline_param_buf_id,
+ 1);
+ CHECK_VASTATUS(va_status, "vaRenderPicture");
+
+ va_status = vaEndPicture(va_dpy, context_id);
+ CHECK_VASTATUS(va_status, "vaEndPicture");
+
+ vaDestroyContext(va_dpy, context_id);
+ vaDestroyConfig(va_dpy, config_id);
+
+ *out_surface_id = vpp_surface_id;
+ return 0;
+}
+
+static int encode_file()
+{
+ int f;
+ FILE *yuv_fp;
+ FILE *avc_fp;
+ long file_size;
+ int i_frame_only=1,i_p_frame_only=0;
+ int mode_value;
+ struct timeval tpstart,tpend;
+ float timeuse;
+ int frame_number = 1;
+ yuv_fp = fopen("dump.yuv","rb");
+
+ fseek(yuv_fp, 0l, SEEK_SET);
+
+ avc_fp = fopen("test.264", "wb");
+ if ( avc_fp == NULL) {
+ fclose(yuv_fp);
+ printf("Can't open output avc file\n");
+ return -1;
+ }
+ gettimeofday(&tpstart,NULL);
+ avcenc_context_init(picture_width, picture_height);
+ create_encode_pipe();
+ alloc_encode_resource(yuv_fp);
+
+ enc_frame_number = 0;
+ for ( int f = 0; f < frame_number; ) { //picture level loop
+ static int const frame_type_pattern[][2] = { {SLICE_TYPE_I,1},
+ {SLICE_TYPE_P,3}, {SLICE_TYPE_P,3},{SLICE_TYPE_P,3},
+ {SLICE_TYPE_P,3}, {SLICE_TYPE_P,3},{SLICE_TYPE_P,3},
+ {SLICE_TYPE_P,3}, {SLICE_TYPE_P,3},{SLICE_TYPE_P,3},
+ {SLICE_TYPE_P,2} };
+
+ if ( i_frame_only ) {
+ encode_picture(yuv_fp, avc_fp,enc_frame_number, f, f==0, SLICE_TYPE_I, 0, f+1);
+ f++;
+ enc_frame_number++;
+ } else if ( i_p_frame_only ) {
+ if ( (f % intra_period) == 0 ) {
+ encode_picture(yuv_fp, avc_fp,enc_frame_number, f, f==0, SLICE_TYPE_I, 0, f+1);
+ f++;
+ enc_frame_number++;
+ } else {
+ encode_picture(yuv_fp, avc_fp,enc_frame_number, f, f==0, SLICE_TYPE_P, 0, f+1);
+ f++;
+ enc_frame_number++;
+ }
+ } else { // follow the i,p,b pattern
+ static int fcurrent = 0;
+ int fnext;
+
+ fcurrent = fcurrent % (sizeof(frame_type_pattern)/sizeof(int[2]));
+ fnext = (fcurrent+1) % (sizeof(frame_type_pattern)/sizeof(int[2]));
+
+ if ( frame_type_pattern[fcurrent][0] == SLICE_TYPE_I ) {
+ encode_picture(yuv_fp, avc_fp,enc_frame_number, f, f==0, SLICE_TYPE_I, 0,
+ f+frame_type_pattern[fnext][1]);
+ f++;
+ enc_frame_number++;
+ } else {
+ encode_pb_pictures(yuv_fp, avc_fp, f, frame_type_pattern[fcurrent][1]-1,
+ f + frame_type_pattern[fcurrent][1] + frame_type_pattern[fnext][1] -1 );
+ f += frame_type_pattern[fcurrent][1];
+ enc_frame_number++;
+ }
+
+ fcurrent++;
+ }
+ printf("\r %d/%d ...", f+1, frame_number);
+ fflush(stdout);
+ }
+
+ gettimeofday(&tpend,NULL);
+ timeuse=1000000*(tpend.tv_sec-tpstart.tv_sec)+ tpend.tv_usec-tpstart.tv_usec;
+ timeuse/=1000000;
+ printf("\ndone!\n");
+ printf("encode %d frames in %f secondes, FPS is %.1f\n",frame_number, timeuse, frame_number/timeuse);
+ release_encode_resource();
+ destory_encode_pipe();
+
+ fclose(yuv_fp);
+ fclose(avc_fp);
+
+
+}
+int main(int argc,char **argv)
+{
+ VAEntrypoint entrypoints[5];
+ int num_entrypoints,vld_entrypoint;
+ VAConfigAttrib attrib;
+ VAConfigID config_id;
+ VASurfaceID surface_id;
+ VAContextID context_id;
+ VABufferID pic_param_buf,iqmatrix_buf,slice_param_buf,slice_data_buf;
+ int major_ver, minor_ver;
+ VAStatus va_status;
+ int putsurface=0;
+ VAImageFormat image_format;
+ VAImage yuv_image;
+
+ if (argc > 1)
+ putsurface=1;
+#ifdef ANDROID
+ x11_display = (Display*)malloc(sizeof(Display));
+ *(x11_display ) = 0x18c34078;
+#else
+ x11_display = XOpenDisplay(":0.0");
+#endif
+
+ if (x11_display == NULL) {
+ fprintf(stderr, "Can't connect X server!\n");
+ exit(-1);
+ }
+
+ assert(x11_display);
+
+ va_dpy = vaGetDisplay(x11_display);
+ va_status = vaInitialize(va_dpy, &major_ver, &minor_ver);
+ assert(va_status == VA_STATUS_SUCCESS);
+
+ va_status = vaQueryConfigEntrypoints(va_dpy, VAProfileMPEG2Simple, entrypoints,
+ &num_entrypoints);
+ CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints");
+
+ for (vld_entrypoint = 0; vld_entrypoint < num_entrypoints; vld_entrypoint++) {
+ if (entrypoints[vld_entrypoint] == VAEntrypointVLD)
+ break;
+ }
+ if (vld_entrypoint == num_entrypoints) {
+ /* not find VLD entry point */
+ assert(0);
+ }
+
+ /* Assuming finding VLD, find out the format for the render target */
+ attrib.type = VAConfigAttribRTFormat;
+ vaGetConfigAttributes(va_dpy, VAProfileMPEG2Simple, VAEntrypointVLD,
+ &attrib, 1);
+ if ((attrib.value & VA_RT_FORMAT_YUV420) == 0) {
+ /* not find desired YUV420 RT format */
+ assert(0);
+ }
+
+ va_status = vaCreateConfig(va_dpy, VAProfileMPEG2Simple, VAEntrypointVLD,
+ &attrib, 1,&config_id);
+ CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints");
+
+ va_status = vaCreateSurfaces(va_dpy,CLIP_WIDTH,CLIP_HEIGHT,
+ VA_RT_FORMAT_YUV420, 1, &surface_id);
+ CHECK_VASTATUS(va_status, "vaCreateSurfaces");
+
+ /* Create a context for this decode pipe */
+ va_status = vaCreateContext(va_dpy, config_id,
+ CLIP_WIDTH,
+ ((CLIP_HEIGHT+15)/16)*16,
+ VA_PROGRESSIVE,
+ &surface_id,
+ 1,
+ &context_id);
+ CHECK_VASTATUS(va_status, "vaCreateContext");
+
+ va_status = vaCreateBuffer(va_dpy, context_id,
+ VAPictureParameterBufferType,
+ sizeof(VAPictureParameterBufferMPEG2),
+ 1, &pic_param,
+ &pic_param_buf);
+ CHECK_VASTATUS(va_status, "vaCreateBuffer");
+
+ va_status = vaCreateBuffer(va_dpy, context_id,
+ VAIQMatrixBufferType,
+ sizeof(VAIQMatrixBufferMPEG2),
+ 1, &iq_matrix,
+ &iqmatrix_buf );
+ CHECK_VASTATUS(va_status, "vaCreateBuffer");
+
+ va_status = vaCreateBuffer(va_dpy, context_id,
+ VASliceParameterBufferType,
+ sizeof(VASliceParameterBufferMPEG2),
+ 15,
+ &slice_param, &slice_param_buf);
+ CHECK_VASTATUS(va_status, "vaCreateBuffer");
+
+ va_status = vaCreateBuffer(va_dpy, context_id,
+ VASliceDataBufferType,
+ //0xc4-0x2f+1,
+ //19310-0x2f+1,
+ 19252,
+ 1,
+ //mpeg2_clip+0x2f,
+ mpeg2_clip+0x3b,
+ &slice_data_buf);
+ CHECK_VASTATUS(va_status, "vaCreateBuffer");
+
+ va_status = vaBeginPicture(va_dpy, context_id, surface_id);
+ CHECK_VASTATUS(va_status, "vaBeginPicture");
+
+ va_status = vaRenderPicture(va_dpy,context_id, &pic_param_buf, 1);
+ CHECK_VASTATUS(va_status, "vaRenderPicture");
+
+ va_status = vaRenderPicture(va_dpy,context_id, &iqmatrix_buf, 1);
+ CHECK_VASTATUS(va_status, "vaRenderPicture");
+
+ va_status = vaRenderPicture(va_dpy,context_id, &slice_param_buf, 1);
+ CHECK_VASTATUS(va_status, "vaRenderPicture");
+
+ va_status = vaRenderPicture(va_dpy,context_id, &slice_data_buf, 1);
+ CHECK_VASTATUS(va_status, "vaRenderPicture");
+
+ va_status = vaEndPicture(va_dpy,context_id);
+ CHECK_VASTATUS(va_status, "vaEndPicture");
+
+ va_status = vaSyncSurface(va_dpy, surface_id);
+ CHECK_VASTATUS(va_status, "vaSyncSurface");
+
+ if (putsurface) {
+#ifdef ANDROID
+ sp<ProcessState> proc(ProcessState::self());
+ ProcessState::self()->startThreadPool();
+
+ printf("Create window0 for thread0\n");
+ SURFACE_CREATE(client,surface_ctrl,android_surface, android_isurface, WIN_WIDTH, WIN_HEIGHT);
+
+ va_status = vaPutSurface(va_dpy, surface_id, android_isurface,
+ 0,0,CLIP_WIDTH,CLIP_HEIGHT,
+ 0,0,WIN_WIDTH,WIN_HEIGHT,
+ NULL,0,0);
+#else
+ Window win;
+ win = XCreateSimpleWindow(x11_display, RootWindow(x11_display, 0), 0, 0,
+ WIN_WIDTH,WIN_HEIGHT, 0, 0, WhitePixel(x11_display, 0));
+ XMapWindow(x11_display, win);
+ XSync(x11_display, False);
+#if 0
+ va_status = vaPutSurface(va_dpy, surface_id, win,
+ 0,0,CLIP_WIDTH,CLIP_HEIGHT,
+ 0,0,WIN_WIDTH,WIN_HEIGHT,
+ NULL,0,0);
+#endif
+ image_format.fourcc = VA_FOURCC_NV12;
+ image_format.byte_order = VA_LSB_FIRST;
+ image_format.bits_per_pixel = 12;
+
+ if( vaCreateImage(va_dpy, &image_format,
+ surface_width * zoom_out,surface_height * zoom_out,
+ &yuv_image) != VA_STATUS_SUCCESS )
+ printf("vaCreateImage error\n");
+
+ zoom_out_surface(va_dpy, surface_id, &zoom_surface_id);
+
+ if (vaGetImage(va_dpy,zoom_surface_id,0,0,
+ surface_width * zoom_out,surface_height * zoom_out,
+ yuv_image.image_id) != VA_STATUS_SUCCESS)
+ printf("vaGetImage error\n");
+ unsigned char *image_data = NULL;
+ va_status = vaMapBuffer(va_dpy,yuv_image.buf,(void **)&image_data);
+ CHECK_VASTATUS(va_status, "vaMapBuffer()");
+
+ FILE * image_fp = fopen("dump.yuv", "wb");
+ fwrite(image_data, surface_width * zoom_out * surface_height * zoom_out *3/2, 1, image_fp);
+ fclose(image_fp);
+
+ /*va_status = vaPutSurface(va_dpy, zoom_out>1?zoom_surface_id:surface_id,Drawable(win),
+ 0,0,surface_width * zoom_out,surface_height * zoom_out,
+ 0,0,WIN_WIDTH,WIN_HEIGHT,
+ NULL,0,0);*/
+#endif
+ CHECK_VASTATUS(va_status, "vaPutSurface");
+ encode_file();
+ }
+ printf("press any key to exit\n");
+ getchar();
+
+ vaDestroySurfaces(va_dpy,&surface_id,1);
+ vaDestroyConfig(va_dpy,config_id);
+ vaDestroyContext(va_dpy,context_id);
+
+ vaTerminate(va_dpy);
+#ifdef ANDROID
+ free(x11_display);
+#else
+ //XCloseDisplay(x11_display);
+#endif
+
+ return 0;
+}
diff --git a/test/vainfo/Makefile.am b/test/vainfo/Makefile.am
index 8d9d017..190aa8b 100644
--- a/test/vainfo/Makefile.am
+++ b/test/vainfo/Makefile.am
@@ -23,12 +23,15 @@
bin_PROGRAMS = vainfo
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/test/basic
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/test/basic \
+ -DLIBVA_VERSION_S="\"${LIBVA_VERSION}\"" \
+ $(NULL)
vainfo_LDADD = $(top_builddir)/va/$(libvacorelib) $(top_builddir)/va/$(libvabackendlib) -lX11
vainfo_DEPENDENCIES = $(top_builddir)/va/$(libvacorelib) $(top_builddir)/va/$(libvabackendlib)
-vainfo_SOURCES = vainfo.c
valgrind: vainfo
valgrind --leak-check=full --show-reachable=yes .libs/vainfo;
diff --git a/test/vainfo/vainfo.c b/test/vainfo/vainfo.c
index 96b7142..c386b5e 100644
--- a/test/vainfo/vainfo.c
+++ b/test/vainfo/vainfo.c
@@ -44,6 +44,7 @@ if (va_status != VA_STATUS_SUCCESS) { \
static char * profile_string(VAProfile profile)
{
switch (profile) {
+ case VAProfileNone: return "VAProfileNone";
case VAProfileMPEG2Simple: return "VAProfileMPEG2Simple";
case VAProfileMPEG2Main: return "VAProfileMPEG2Main";
case VAProfileMPEG4Simple: return "VAProfileMPEG4Simple";
@@ -57,6 +58,9 @@ static char * profile_string(VAProfile profile)
case VAProfileVC1Advanced: return "VAProfileVC1Advanced";
case VAProfileH263Baseline: return "VAProfileH263Baseline";
case VAProfileH264ConstrainedBaseline: return "VAProfileH264ConstrainedBaseline";
+ case VAProfileJPEGBaseline: return "VAProfileJPEGBaseline";
+ default:
+ break;
}
return "<unknown profile>";
}
@@ -71,6 +75,10 @@ static char * entrypoint_string(VAEntrypoint entrypoint)
case VAEntrypointMoComp:return "VAEntrypointMoComp";
case VAEntrypointDeblocking:return "VAEntrypointDeblocking";
case VAEntrypointEncSlice:return "VAEntrypointEncSlice";
+ case VAEntrypointEncPicture:return "VAEntrypointEncPicture";
+ case VAEntrypointVideoProc:return "VAEntrypointVideoProc";
+ default:
+ break;
}
return "<unknown entrypoint>";
}
@@ -94,7 +102,7 @@ int main(int argc, const char* argv[])
name = argv[0];
#ifndef ANDROID
- dpy = XOpenDisplay(":0.0");
+ dpy = XOpenDisplay(NULL);
#else
dpy = (Display*)malloc(sizeof(Display));
#endif
@@ -114,13 +122,14 @@ int main(int argc, const char* argv[])
va_status = vaInitialize(va_dpy, &major_version, &minor_version);
CHECK_VASTATUS(va_status, "vaInitialize", 3);
- printf("%s: VA API version: %d.%d\n", name, major_version, minor_version);
+ printf("%s: VA-API version: %d.%d (libva %s)\n",
+ name, major_version, minor_version, LIBVA_VERSION_S);
driver = vaQueryVendorString(va_dpy);
printf("%s: Driver version: %s\n", name, driver ? driver : "<unknown>");
printf("%s: Supported profile and entrypoints\n", name);
- for (profile = VAProfileMPEG2Simple; profile <= VAProfileH263Baseline; profile++) {
+ for (profile = VAProfileNone; profile <= VAProfileH264ConstrainedBaseline; profile++) {
char *profile_str;
va_status = vaQueryConfigEntrypoints(va_dpy, profile, entrypoints,
diff --git a/va/Android.mk b/va/Android.mk
index d031814..a4701f7 100755
--- a/va/Android.mk
+++ b/va/Android.mk
@@ -49,9 +49,14 @@ LOCAL_C_INCLUDES += \
LOCAL_COPY_HEADERS := \
va.h \
va_version.h \
+ va_enc.h \
+ va_enc_h264.h \
va_backend.h \
- va_version.h.in \
- x11/va_dricommon.h
+ x11/va_dricommon.h \
+ va_vpp.h \
+ va_dec_vp8.h \
+ va_dec_jpeg.h \
+ va_backend_vpp.h
LOCAL_COPY_HEADERS_TO := libva/va
@@ -62,14 +67,12 @@ LOCAL_SHARED_LIBRARIES := libdl libdrm libcutils liblog
include $(BUILD_SHARED_LIBRARY)
-intermediates := $(local-intermediates-dir)
-GEN := $(intermediates)/va_version.h
-$(GEN): PRIVATE_GEN_VERSION := $(LOCAL_PATH)/../build/gen_version.sh
-$(GEN): PRIVATE_INPUT_FILE := $(LOCAL_PATH)/va_version.h.in
-$(GEN): PRIVATE_CUSTOM_TOOL = sh $(PRIVATE_GEN_VERSION) $(LOCAL_PATH)/.. $(PRIVATE_INPUT_FILE) > $@
-$(GEN): $(LOCAL_PATH)/va_version.h
+GEN := $(LOCAL_PATH)/va_version.h
+$(GEN): SCRIPT := $(LOCAL_PATH)/../build/gen_version.sh
+$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
+$(GEN): PRIVATE_CUSTOM_TOOL = sh $(SCRIPT) $(PRIVATE_PATH)/.. $(PRIVATE_PATH)/va_version.h.in > $@
+$(GEN): $(LOCAL_PATH)/%.h : $(LOCAL_PATH)/%.h.in $(SCRIPT) $(LOCAL_PATH)/../configure.ac
$(transform-generated-source)
-
LOCAL_GENERATED_SOURCES += $(GEN)
# For libva-android
diff --git a/va/Makefile.am b/va/Makefile.am
index 16a1e8f..8919c47 100644
--- a/va/Makefile.am
+++ b/va/Makefile.am
@@ -33,6 +33,7 @@ LDADD = \
libva_source_c = \
va.c \
+ va_compat.c \
va_fool.c \
va_trace.c \
$(NULL)
@@ -41,9 +42,16 @@ libva_source_h = \
va.h \
va_backend.h \
va_backend_tpi.h \
+ va_backend_vpp.h \
+ va_compat.h \
+ va_dec_jpeg.h \
+ va_dec_vp8.h \
va_dummy.h \
+ va_enc.h \
+ va_enc_h264.h \
va_tpi.h \
va_version.h \
+ va_vpp.h \
va_x11.h \
$(NULL)
@@ -53,12 +61,18 @@ libva_source_h_priv = \
va_trace.h \
$(NULL)
+libva_ldflags = \
+ $(LDADD) -no-undefined \
+ -Wl,-version-script,libva.syms \
+ $(NULL)
+
lib_LTLIBRARIES = libva.la
libvaincludedir = ${includedir}/va
libvainclude_HEADERS = $(libva_source_h)
noinst_HEADERS = $(libva_source_h_priv)
libva_la_SOURCES = $(libva_source_c)
-libva_la_LDFLAGS = $(LDADD) -no-undefined
+libva_la_LDFLAGS = $(libva_ldflags)
+libva_la_DEPENDENCIES = libva.syms
libva_la_LIBADD = $(LIBVA_LIBS) -ldl
lib_LTLIBRARIES += libva-tpi.la
diff --git a/va/android/va_android.cpp b/va/android/va_android.cpp
index a92aacc..4f935de 100644
--- a/va/android/va_android.cpp
+++ b/va/android/va_android.cpp
@@ -121,11 +121,12 @@ static VAStatus va_DisplayContextGetDriverName (
} devices[] = {
{ 0x8086, 0x4100, "pvr" },
{ 0x8086, 0x0130, "pvr" },
+ { 0x1010, 0x1cf2, "pvr" },
{ 0x0, 0x0, "\0" },
};
memset(dri_state, 0, sizeof(*dri_state));
- dri_state->fd = open_device(DEVICE_NAME);
+ dri_state->fd = open_device((char *)DEVICE_NAME);
if (dri_state->fd < 0) {
fprintf(stderr,"can't open DRM devices\n");
@@ -160,6 +161,7 @@ static VAStatus va_DisplayContextGetDriverName (
} devices[] = {
{ 0x8086, 0x4100, "pvr" },
{ 0x8086, 0x0130, "pvr" },
+ { 0x1010, 0x1cf2, "pvr" },
{ 0x0, 0x0, "\0" },
};
@@ -290,7 +292,10 @@ VAStatus vaPutSurface (
if (fool_postp)
return VA_STATUS_SUCCESS;
-
+/*
+ if (draw == NULL)
+ return VA_STATUS_ERROR_UNKNOWN;
+*/
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
@@ -302,4 +307,24 @@ VAStatus vaPutSurface (
destx, desty, destw, desth,
cliprects, number_cliprects, flags );
}
+#else
+VAStatus vaPutSurface (
+ VADisplay dpy,
+ VASurfaceID surface,
+ void *draw,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth,
+ VARectangle *cliprects, /* client supplied clip list */
+ unsigned int number_cliprects, /* number of clip rects in the clip list */
+ unsigned int flags /* de-interlacing flags */
+)
+{
+ return VA_STATUS_SUCCESS;
+}
#endif
diff --git a/va/libva.syms b/va/libva.syms
new file mode 100644
index 0000000..13430df
--- /dev/null
+++ b/va/libva.syms
@@ -0,0 +1,16 @@
+VA_API_0.32.0 {
+ local:
+ vaCreateSurfaces_0_32_0;
+};
+
+VA_API_0.33.0 {
+ local:
+ vaCreateSurfaces_0_32_0;
+} VA_API_0.32.0;
+
+VA_API_0.34.0 {
+ global:
+ vaCreateSurfaces;
+ local:
+ vaCreateSurfaces_0_34_0;
+} VA_API_0.33.0;
diff --git a/va/va.c b/va/va.c
index 067e276..f339c0c 100755
--- a/va/va.c
+++ b/va/va.c
@@ -26,9 +26,9 @@
#include "sysdeps.h"
#include "va.h"
#include "va_backend.h"
+#include "va_backend_vpp.h"
#include "va_trace.h"
#include "va_fool.h"
-#include "config.h"
#include <assert.h>
#include <stdarg.h>
@@ -150,6 +150,13 @@ static Bool va_checkString(const char* value, char *variable)
return True;
}
+static inline int
+va_getDriverInitName(char *name, int namelen, int major, int minor)
+{
+ int ret = snprintf(name, namelen, "__vaDriverInit_%d_%d", major, minor);
+ return ret > 0 && ret < namelen;
+}
+
static VAStatus va_getDriverName(VADisplay dpy, char **driver_name)
{
VADisplayContextP pDisplayContext = (VADisplayContextP)dpy;
@@ -194,13 +201,39 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
if (0 == access( driver_path, F_OK))
va_errorMessage("dlopen of %s failed: %s\n", driver_path, dlerror());
} else {
- VADriverInit init_func;
- init_func = (VADriverInit) dlsym(handle, VA_DRIVER_INIT_FUNC_S);
- if (!init_func) {
- va_errorMessage("%s has no function %s\n", driver_path, VA_DRIVER_INIT_FUNC_S);
+ VADriverInit init_func = NULL;
+ char init_func_s[256];
+ int i;
+
+ static const struct {
+ int major;
+ int minor;
+ } compatible_versions[] = {
+ { VA_MAJOR_VERSION, VA_MINOR_VERSION },
+ { 0, 33 },
+ { 0, 32 },
+ { -1, }
+ };
+
+ for (i = 0; compatible_versions[i].major >= 0; i++) {
+ if (va_getDriverInitName(init_func_s, sizeof(init_func_s),
+ compatible_versions[i].major,
+ compatible_versions[i].minor)) {
+ init_func = (VADriverInit)dlsym(handle, init_func_s);
+ if (init_func) {
+ va_infoMessage("Found init function %s\n", init_func_s);
+ break;
+ }
+ }
+ }
+
+ if (compatible_versions[i].major < 0) {
+ va_errorMessage("%s has no function %s\n",
+ driver_path, init_func_s);
dlclose(handle);
} else {
struct VADriverVTable *vtable = ctx->vtable;
+ struct VADriverVTableVPP *vtable_vpp = ctx->vtable_vpp;
vaStatus = VA_STATUS_SUCCESS;
if (!vtable) {
@@ -210,7 +243,16 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
}
ctx->vtable = vtable;
- if (VA_STATUS_SUCCESS == vaStatus)
+ if (!vtable_vpp) {
+ vtable_vpp = calloc(1, sizeof(*vtable_vpp));
+ if (vtable_vpp)
+ vtable_vpp->version = VA_DRIVER_VTABLE_VPP_VERSION;
+ else
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ }
+ ctx->vtable_vpp = vtable_vpp;
+
+ if (init_func && (VA_STATUS_SUCCESS == vaStatus))
vaStatus = (*init_func)(ctx);
if (VA_STATUS_SUCCESS == vaStatus) {
@@ -228,7 +270,7 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
CHECK_VTABLE(vaStatus, ctx, CreateConfig);
CHECK_VTABLE(vaStatus, ctx, DestroyConfig);
CHECK_VTABLE(vaStatus, ctx, GetConfigAttributes);
- CHECK_VTABLE(vaStatus, ctx, CreateSurfaces);
+ //CHECK_VTABLE(vaStatus, ctx, CreateSurfaces);
CHECK_VTABLE(vaStatus, ctx, DestroySurfaces);
CHECK_VTABLE(vaStatus, ctx, CreateContext);
CHECK_VTABLE(vaStatus, ctx, DestroyContext);
@@ -348,6 +390,12 @@ const char *vaErrorStr(VAStatus error_status)
return "surface is in displaying (may by overlay)" ;
case VA_STATUS_ERROR_INVALID_IMAGE_FORMAT:
return "invalid VAImageFormat";
+ case VA_STATUS_ERROR_INVALID_VALUE:
+ return "an invalid/unsupported value was supplied";
+ case VA_STATUS_ERROR_UNSUPPORTED_FILTER:
+ return "the requested filter is not supported";
+ case VA_STATUS_ERROR_INVALID_FILTER_CHAIN:
+ return "an invalid filter chain was supplied";
case VA_STATUS_ERROR_UNKNOWN:
return "unknown libva error";
}
@@ -370,7 +418,7 @@ VAStatus vaInitialize (
va_FoolInit(dpy);
- va_infoMessage("libva version %s\n", VA_VERSION_S);
+ va_infoMessage("VA-API version %s\n", VA_VERSION_S);
driver_name_env = getenv("LIBVA_DRIVER_NAME");
if (driver_name_env && geteuid() == getuid()) {
@@ -421,6 +469,8 @@ VAStatus vaTerminate (
}
free(old_ctx->vtable);
old_ctx->vtable = NULL;
+ free(old_ctx->vtable_vpp);
+ old_ctx->vtable_vpp = NULL;
if (VA_STATUS_SUCCESS == vaStatus)
pDisplayContext->vaDestroy(pDisplayContext);
@@ -582,31 +632,69 @@ VAStatus vaQueryConfigAttributes (
return ctx->vtable->vaQueryConfigAttributes( ctx, config_id, profile, entrypoint, attrib_list, num_attribs);
}
-VAStatus vaCreateSurfaces (
- VADisplay dpy,
- int width,
- int height,
- int format,
- int num_surfaces,
- VASurfaceID *surfaces, /* out */
- VASurfaceAttrib *attrib_list,
- int num_attribs
+VAStatus
+vaGetSurfaceAttributes(
+ VADisplay dpy,
+ VAConfigID config,
+ VASurfaceAttrib *attrib_list,
+ unsigned int num_attribs
)
{
- VADriverContextP ctx;
- VAStatus vaStatus;
- int ret = 0;
+ VADriverContextP ctx;
+ VAStatus vaStatus;
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
+ CHECK_DISPLAY(dpy);
+ ctx = CTX(dpy);
+ if (!ctx)
+ return VA_STATUS_ERROR_INVALID_DISPLAY;
- vaStatus = ctx->vtable->vaCreateSurfaces(ctx, width, height, format, num_surfaces, surfaces, attrib_list, num_attribs);
+ if (!ctx->vtable->vaGetSurfaceAttributes)
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
- VA_TRACE_LOG(va_TraceCreateSurface, dpy, width, height, format, num_surfaces, surfaces, attrib_list, num_attribs);
-
- return vaStatus;
+ vaStatus = ctx->vtable->vaGetSurfaceAttributes(ctx, config,
+ attrib_list, num_attribs);
+ return vaStatus;
}
+VAStatus
+vaCreateSurfaces(
+ VADisplay dpy,
+ unsigned int format,
+ unsigned int width,
+ unsigned int height,
+ VASurfaceID *surfaces,
+ unsigned int num_surfaces,
+ VASurfaceAttrib *attrib_list,
+ unsigned int num_attribs
+)
+{
+ VADriverContextP ctx;
+ VAStatus vaStatus;
+
+ CHECK_DISPLAY(dpy);
+ ctx = CTX(dpy);
+ if (!ctx)
+ return VA_STATUS_ERROR_INVALID_DISPLAY;
+
+ if (ctx->vtable->vaCreateSurfaces2)
+ return ctx->vtable->vaCreateSurfaces2(ctx, format, width, height,
+ surfaces, num_surfaces,
+ attrib_list, num_attribs);
+
+ if (attrib_list && num_attribs > 0)
+ return VA_STATUS_ERROR_ATTR_NOT_SUPPORTED;
+
+ vaStatus = ctx->vtable->vaCreateSurfaces(ctx, width, height, format,
+ num_surfaces, surfaces);
+
+ VA_TRACE_LOG(va_TraceCreateSurfaces,
+ dpy, width, height, format, num_surfaces, surfaces,
+ attrib_list, num_attribs);
+
+ return vaStatus;
+}
+
+
VAStatus vaDestroySurfaces (
VADisplay dpy,
VASurfaceID *surface_list,
@@ -781,7 +869,6 @@ VAStatus vaBeginPicture (
{
VADriverContextP ctx;
VAStatus va_status;
- int ret = 0;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
@@ -802,7 +889,6 @@ VAStatus vaRenderPicture (
)
{
VADriverContextP ctx;
- int ret = 0;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
@@ -820,7 +906,6 @@ VAStatus vaEndPicture (
{
VAStatus va_status;
VADriverContextP ctx;
- int ret = 0;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
@@ -844,7 +929,6 @@ VAStatus vaSyncSurface (
{
VAStatus va_status;
VADriverContextP ctx;
- int ret = 0;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
@@ -1084,7 +1168,6 @@ VAStatus vaQuerySubpictureFormats (
)
{
VADriverContextP ctx;
- int ret = 0;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
@@ -1347,3 +1430,79 @@ VAStatus vaUnlockSurface(VADisplay dpy,
return ctx->vtable->vaUnlockSurface( ctx, surface );
}
+
+/* Video Processing */
+#define VA_VPP_INIT_CONTEXT(ctx, dpy) do { \
+ CHECK_DISPLAY(dpy); \
+ ctx = CTX(dpy); \
+ if (!ctx) \
+ return VA_STATUS_ERROR_INVALID_DISPLAY; \
+ } while (0)
+
+#define VA_VPP_INVOKE(dpy, func, args) do { \
+ if (!ctx->vtable_vpp->va##func) \
+ return VA_STATUS_ERROR_UNIMPLEMENTED; \
+ status = ctx->vtable_vpp->va##func args; \
+ } while (0)
+
+VAStatus
+vaQueryVideoProcFilters(
+ VADisplay dpy,
+ VAContextID context,
+ VAProcFilterType *filters,
+ unsigned int *num_filters
+)
+{
+ VADriverContextP ctx;
+ VAStatus status;
+
+ VA_VPP_INIT_CONTEXT(ctx, dpy);
+ VA_VPP_INVOKE(
+ ctx,
+ QueryVideoProcFilters,
+ (ctx, context, filters, num_filters)
+ );
+ return status;
+}
+
+VAStatus
+vaQueryVideoProcFilterCaps(
+ VADisplay dpy,
+ VAContextID context,
+ VAProcFilterType type,
+ void *filter_caps,
+ unsigned int *num_filter_caps
+)
+{
+ VADriverContextP ctx;
+ VAStatus status;
+
+ VA_VPP_INIT_CONTEXT(ctx, dpy);
+ VA_VPP_INVOKE(
+ ctx,
+ QueryVideoProcFilterCaps,
+ (ctx, context, type, filter_caps, num_filter_caps)
+ );
+ return status;
+}
+
+VAStatus
+vaQueryVideoProcPipelineCaps(
+ VADisplay dpy,
+ VAContextID context,
+ VABufferID *filters,
+ unsigned int num_filters,
+ VAProcPipelineCaps *pipeline_caps
+)
+{
+ VADriverContextP ctx;
+ VAStatus status;
+
+ VA_VPP_INIT_CONTEXT(ctx, dpy);
+ VA_VPP_INVOKE(
+ ctx,
+ QueryVideoProcPipelineCaps,
+ (ctx, context, filters, num_filters, pipeline_caps)
+ );
+ return status;
+}
diff --git a/va/va.h b/va/va.h
index 0e10bd5..a4b184c 100755
--- a/va/va.h
+++ b/va/va.h
@@ -24,7 +24,7 @@
/*
* Video Acceleration (VA) API Specification
*
- * Rev. 0.30
+ * Rev. 0.32.2
* <jonathan.bian@intel.com>
*
* Revision History:
@@ -61,6 +61,9 @@
* screen relative rather than source video relative.
* rev 0.32.0 (01/13/2011 Xiang Haihao) - Add profile into VAPictureParameterBufferVC1
* update VAAPI to 0.32.0
+ * rev 0.32.1 (05/04/2011) - Linux VA encoding API extension proposal
+ *
+ * rev 0.32.2 (07/05/2011 Jonathan Bian/Andrey Yakovenko) - Video Processing interface
*
* Acknowledgements:
* Some concepts borrowed from XvMC and XvImage.
@@ -68,6 +71,13 @@
* contributed to various aspects of the API.
*/
+/**
+ * \file va.h
+ * \brief The Core API
+ *
+ * This file contains the \ref api_core "Core API".
+ */
+
#ifndef _VA_H_
#define _VA_H_
@@ -77,6 +87,30 @@
extern "C" {
#endif
+/**
+ * \mainpage Video Acceleration (VA) API
+ *
+ * \section intro Introduction
+ *
+ * The main motivation for VA-API (Video Acceleration API) is to
+ * enable hardware accelerated video decode and encode at various
+ * entry-points (VLD, IDCT, Motion Compensation etc.) for the
+ * prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4
+ * AVC/H.264, VC-1/VMW3, and JPEG).
+ *
+ * VA-API is split into several modules:
+ * - \ref api_core
+ * - \ref api_enc_core
+ * - \ref api_enc_h264
+ * - \ref api_vpp
+ */
+
+/**
+ * \defgroup api_core Core API
+ *
+ * @{
+ */
+
/*
Overview
@@ -134,7 +168,20 @@ typedef int VAStatus; /* Return status type from functions */
#define VA_STATUS_ERROR_INVALID_IMAGE_FORMAT 0x00000016
#define VA_STATUS_ERROR_DECODING_ERROR 0x00000017
#define VA_STATUS_ERROR_ENCODING_ERROR 0x00000018
-#define VA_STATUS_ERROR_HW_BUSY 0x00000019
+/**
+ * \brief An invalid/unsupported value was supplied.
+ *
+ * This is a catch-all error code for invalid or unsupported values.
+ * e.g. value exceeding the valid range, invalid type in the context
+ * of generic attribute values.
+ */
+#define VA_STATUS_ERROR_INVALID_VALUE 0x00000019
+/** \brief An unsupported filter was supplied. */
+#define VA_STATUS_ERROR_UNSUPPORTED_FILTER 0x00000020
+/** \brief An invalid filter chain was supplied. */
+#define VA_STATUS_ERROR_INVALID_FILTER_CHAIN 0x00000021
+/** \brief Indicate HW busy (e.g. run multiple encoding simultaneously). */
+#define VA_STATUS_ERROR_HW_BUSY 0x00000022
#define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF
/* De-interlacing flags for vaPutSurface() */
@@ -239,8 +286,14 @@ typedef enum
VAProfileVC1Main = 9,
VAProfileVC1Advanced = 10,
VAProfileH263Baseline = 11,
- VAProfileJPEGBaseline = 12,
- VAProfileH264ConstrainedBaseline = 13
+ VAProfileJPEGBaseline = 12,
+ VAProfileH264ConstrainedBaseline = 13,
+ VAProfileH264MultiviewHigh = 14,
+ VAProfileH264StereoHigh = 15,
+ /** \brief Profile ID used for video processing. */
+ VAProfileNone = 16,
+ VAProfileVP8Version0_3 = 17,
+ VAProfileMax
} VAProfile;
/*
@@ -254,7 +307,9 @@ typedef enum
VAEntrypointMoComp = 4,
VAEntrypointDeblocking = 5,
VAEntrypointEncSlice = 6, /* slice level encode */
- VAEntrypointEncPicture = 7 /* pictuer encode, JPEG, etc */
+ VAEntrypointEncPicture = 7, /* pictuer encode, JPEG, etc */
+ VAEntrypointVideoProc = 10, /**< Video pre/post-processing. */
+ VAEntrypointMax
} VAEntrypoint;
/* Currently defined configuration attribute types */
@@ -265,7 +320,80 @@ typedef enum
VAConfigAttribSpatialClipping = 2,
VAConfigAttribIntraResidual = 3,
VAConfigAttribEncryption = 4,
- VAConfigAttribRateControl = 5
+ VAConfigAttribRateControl = 5,
+
+ /** @name Attributes for encoding */
+ /**@{*/
+ /**
+ * \brief Packed headers mode. Read/write.
+ *
+ * This attribute determines what packed headers the driver supports,
+ * through vaGetConfigAttributes(); and what packed headers the user
+ * will be providing to the driver, through vaCreateConfig(), if the
+ * driver supports those.
+ *
+ * See \c VA_ENC_PACKED_HEADER_xxx for the list of packed headers.
+ */
+ VAConfigAttribEncPackedHeaders = 10,
+ /**
+ * \brief Interlaced mode. Read/write.
+ *
+ * This attribute determines what kind of interlaced encoding mode
+ * the driver supports.
+ *
+ * See \c VA_ENC_INTERLACED_xxx for the list of interlaced modes.
+ */
+ VAConfigAttribEncInterlaced = 11,
+ /**
+ * \brief Maximum number of reference frames. Read-only.
+ *
+ * This attribute determines the maximum number of reference
+ * frames supported for encoding.
+ *
+ * Note: for H.264 encoding, the value represents the maximum number
+ * of reference frames for both the reference picture list 0 (bottom
+ * 16 bits) and the reference picture list 1 (top 16 bits).
+ */
+ VAConfigAttribEncMaxRefFrames = 13,
+ /**
+ * \brief Maximum number of slices per frame. Read-only.
+ *
+ * This attribute determines the maximum number of slices the
+ * driver can support to encode a single frame.
+ */
+ VAConfigAttribEncMaxSlices = 14,
+ /**
+ * \brief Slice structure. Read-only.
+ *
+ * This attribute determines slice structures supported by the
+ * driver for encoding. This attribute is a hint to the user so
+ * that he can choose a suitable surface size and how to arrange
+ * the encoding process of multiple slices per frame.
+ *
+ * More specifically, for H.264 encoding, this attribute
+ * determines the range of accepted values to
+ * VAEncSliceParameterBufferH264::macroblock_address and
+ * VAEncSliceParameterBufferH264::num_macroblocks.
+ *
+ * See \c VA_ENC_SLICE_STRUCTURE_xxx for the supported slice
+ * structure types.
+ */
+ VAConfigAttribEncSliceStructure = 15,
+ /**
+ * \brief Macroblock information. Read-only.
+ *
+ * This attribute determines whether the driver supports extra
+ * encoding information per-macroblock. e.g. QP.
+ *
+ * More specifically, for H.264 encoding, if the driver returns a non-zero
+ * value for this attribute, this means the application can create
+ * additional #VAEncMacroblockParameterBufferH264 buffers referenced
+ * through VAEncSliceParameterBufferH264::macroblock_info.
+ */
+ VAConfigAttribEncMacroblockInfo = 16,
+ /**@}*/
+
+ VAConfigAttribTypeMax
} VAConfigAttribType;
/*
@@ -279,82 +407,65 @@ typedef struct _VAConfigAttrib {
unsigned int value; /* OR'd flags (bits) for this attribute */
} VAConfigAttrib;
-typedef enum
-{
- VAGenericValueTypeInteger,
- VAGenericValueTypeFloat,
- VAGenericValueTypePointer,
-} VAGenericValueType;
-
-typedef struct _VAGenericValue {
- VAGenericValueType type;
- union
- {
- int i_val;
- float f_val;
- void *p_val;
- } value;
-} VAGenericValue;
-
-/*
- * Surface attributes are used for the client to query additional details
- * on the surface formats and types supported by the underlying implementation,
- * and convey its preferences to the implementation.
- */
-typedef enum
-{
- VASurfaceAttribPixelFormats, /* value is pointer to array of fourcc */
- VASurfaceAttribMinWidth, /* value is int */
- VASurfaceAttribMaxWidth, /* value is int */
- VASurfaceAttribMinHeight, /* value is int */
- VASurfaceAttribMaxHeight, /* value is int */
- VASurfaceAttribAlignment, /* value is int (bytes) */
- VASurfaceAttribNativeHandle /* value is void *p_val */
-} VASurfaceAttribType;
-
-/* value for "flags" in VASurfaceAttrib */
-#define VA_SURFACE_ATTRIB_NOT_SUPPORTED 0x00000000 /* not supported */
-#define VA_SURFACE_ATTRIB_GETTABLE 0x00000001 /* value is gettable */
-#define VA_SURFACE_ATTRIB_SETTABLE 0x00000002 /* value is settable */
-
-typedef struct _VASurfaceAttrib {
- VASurfaceAttribType type;
- unsigned int flags;
- VAGenericValue value;
-} VASurfaceAttrib;
-
-typedef enum {
- VAExternalMemoryAndroidGrallocBuffer, /* the memory is from Android Gralloc memory */
- VAExternalMemoryKernelDRMBufffer, /* the memory is from kernel DRM buffers */
- VAExternalMemoryUserPointer, /* the memory is malloc-ed and has a user pointer */
-} VAExternalMemoryType;
-
-typedef struct _VAExternalMemoryBuffers {
- VAExternalMemoryType type;
- unsigned int width;
- unsigned int height;
- unsigned int pixel_format; /* buffer format */
- unsigned int luma_stride; /* luma stride, could be width aligned with a special value */
- unsigned int chroma_u_stride; /* chroma stride */
- unsigned int chroma_v_stride;
- unsigned int luma_offset; /* could be 0 */
- unsigned int chroma_u_offset; /* UV offset from the beginning of the memory */
- unsigned int count; /* buffer count for surface creation */
- unsigned int *buffers; /* buffer handles or user pointers */
- void *native_window; /*native window pointer*/
-} VAExternalMemoryBuffers;
-
/* attribute value for VAConfigAttribRTFormat */
#define VA_RT_FORMAT_YUV420 0x00000001
#define VA_RT_FORMAT_YUV422 0x00000002
#define VA_RT_FORMAT_YUV444 0x00000004
#define VA_RT_FORMAT_PROTECTED 0x80000000
-/* attribute value for VAConfigAttribRateControl */
-#define VA_RC_NONE 0x00000001
-#define VA_RC_CBR 0x00000002
-#define VA_RC_VBR 0x00000004
-#define VA_RC_VCM 0x00000008 /* video conference mode */
+/** @name Attribute values for VAConfigAttribRateControl */
+/**@{*/
+/** \brief Driver does not support any form of rate control. */
+#define VA_RC_NONE 0x00000001
+/** \brief Constant bitrate. */
+#define VA_RC_CBR 0x00000002
+/** \brief Variable bitrate. */
+#define VA_RC_VBR 0x00000004
+/** \brief Video conference mode. */
+#define VA_RC_VCM 0x00000008
+/** \brief Constant QP. */
+#define VA_RC_CQP 0x00000010
+/** \brief Variable bitrate with peak rate higher than average bitrate. */
+#define VA_RC_VBR_CONSTRAINED 0x00000020
+/**@}*/
+
+/** @name Attribute values for VAConfigAttribEncPackedHeaders */
+/**@{*/
+/** \brief Driver does not support any packed headers mode. */
+#define VA_ENC_PACKED_HEADER_NONE 0x00000000
+/** \brief Driver supports packed sequence headers. e.g. SPS for H.264. */
+#define VA_ENC_PACKED_HEADER_SEQUENCE 0x00000001
+/** \brief Driver supports packed picture headers. e.g. PPS for H.264. */
+#define VA_ENC_PACKED_HEADER_PICTURE 0x00000002
+/** \brief Driver supports packed slice headers. e.g. \c slice_header() for H.264. */
+#define VA_ENC_PACKED_HEADER_SLICE 0x00000004
+/** \brief Driver supports misc packed headers. e.g. SEI for H.264. */
+#define VA_ENC_PACKED_HEADER_MISC 0x00000008
+/**@}*/
+
+/** @name Attribute values for VAConfigAttribEncInterlaced */
+/**@{*/
+/** \brief Driver does not support interlaced coding. */
+#define VA_ENC_INTERLACED_NONE 0x00000000
+/** \brief Driver supports interlaced frame coding. */
+#define VA_ENC_INTERLACED_FRAME 0x00000001
+/** \brief Driver supports interlaced field coding. */
+#define VA_ENC_INTERLACED_FIELD 0x00000002
+/** \brief Driver supports macroblock adaptive frame field coding. */
+#define VA_ENC_INTERLACED_MBAFF 0x00000004
+/** \brief Driver supports picture adaptive frame field coding. */
+#define VA_ENC_INTERLACED_PAFF 0x00000008
+/**@}*/
+
+/** @name Attribute values for VAConfigAttribEncSliceStructure */
+/**@{*/
+/** \brief Driver supports an arbitrary number of rows per slice. */
+#define VA_ENC_SLICE_STRUCTURE_ARBITRARY_ROWS 0x00000000
+/** \brief Driver supports a power-of-two number of rows per slice. */
+#define VA_ENC_SLICE_STRUCTURE_POWER_OF_TWO_ROWS 0x00000001
+/** \brief Driver supports an arbitrary number of rows per slice. */
+#define VA_ENC_SLICE_STRUCTURE_ARBITRARY_MACROBLOCKS 0x00000002
+/**@}*/
/*
* if an attribute is not applicable for a given
@@ -462,21 +573,6 @@ VAStatus vaQueryConfigAttributes (
int *num_attribs /* out */
);
-/* Get maximum number of surface attributs supported by the implementation */
-int vaMaxNumSurfaceAttributes (
- VADisplay dpy
-);
-
-/*
- * Query the implementation on what surface attributes are supported
- * depending on the intended usage for the surfaces.
- */
-VAStatus vaQuerySurfaceAttributes (
- VADisplay dpy,
- VAConfigID config,
- VASurfaceAttrib *attrib_list, /* in/out */
- int num_attribs
-);
/*
* Contexts and Surfaces
@@ -501,26 +597,133 @@ typedef VAGenericID VASurfaceID;
#define VA_INVALID_ID 0xffffffff
#define VA_INVALID_SURFACE VA_INVALID_ID
-/*
- * vaCreateSurfaces - Create an array of surfaces used for decode and display
- * dpy: display
- * width: surface width
- * height: surface height
- * format: VA_RT_FORMAT_YUV420, VA_RT_FORMAT_YUV422 or VA_RT_FORMAT_YUV444
- * num_surfaces: number of surfaces to be created
- * surfaces: array of surfaces created upon return
- * attrib_list: attributes for the surfaces to be created
- * num_attribs: number of attributes in attrib_list
- */
-VAStatus vaCreateSurfaces (
- VADisplay dpy,
- int width,
- int height,
- int format,
- int num_surfaces,
- VASurfaceID *surfaces, /* out */
- VASurfaceAttrib *attrib_list,
- int num_attribs
+/** \brief Generic value types. */
+typedef enum {
+ VAGenericValueTypeInteger = 1, /**< 32-bit signed integer. */
+ VAGenericValueTypeFloat, /**< 32-bit floating-point value. */
+ VAGenericValueTypePointer, /**< Generic pointer type */
+ VAGenericValueTypeFunc /**< Pointer to function */
+} VAGenericValueType;
+
+/** \brief Generic function type. */
+typedef void (*VAGenericFunc)(void);
+
+/** \brief Generic value. */
+typedef struct _VAGenericValue {
+ /** \brief Value type. See #VAGenericValueType. */
+ VAGenericValueType type;
+ /** \brief Value holder. */
+ union {
+ /** \brief 32-bit signed integer. */
+ int i;
+ /** \brief 32-bit float. */
+ float f;
+ /** \brief Generic pointer. */
+ void *p;
+ /** \brief Pointer to function. */
+ VAGenericFunc fn;
+ } value;
+} VAGenericValue;
+
+/** @name Surface attribute flags */
+/**@{*/
+/** \brief Surface attribute is not supported. */
+#define VA_SURFACE_ATTRIB_NOT_SUPPORTED 0x00000000
+/** \brief Surface attribute can be got through vaQuerySurfaceAttributes(). */
+#define VA_SURFACE_ATTRIB_GETTABLE 0x00000001
+/** \brief Surface attribute can be set through vaCreateSurfaces(). */
+#define VA_SURFACE_ATTRIB_SETTABLE 0x00000002
+/**@}*/
+
+/** \brief Surface attribute types. */
+typedef enum {
+ VASurfaceAttribNone = 0,
+ /**
+ * \brief Pixel format (fourcc).
+ *
+ * The value is meaningful as input to vaQuerySurfaceAttributes().
+ * If zero, the driver returns the optimal pixel format for the
+ * specified config. Otherwise, if non-zero, the value represents
+ * a pixel format (FOURCC) that is kept as is on output, if the
+ * driver supports it. Otherwise, the driver sets the value to
+ * zero and drops the \c VA_SURFACE_ATTRIB_SETTABLE flag.
+ */
+ VASurfaceAttribPixelFormat,
+ /** \brief Minimal width in pixels (int, read/write). */
+ VASurfaceAttribMinWidth,
+ /** \brief Maximal width in pixels (int, read-only). */
+ VASurfaceAttribMaxWidth,
+ /** \brief Minimal height in pixels (int, read-only). */
+ VASurfaceAttribMinHeight,
+ /** \brief Maximal height in pixels (int, read-only). */
+ VASurfaceAttribMaxHeight,
+ /** \brief Number of surface attributes. */
+ VASurfaceAttribCount
+} VASurfaceAttribType;
+
+/** \brief Surface attribute. */
+typedef struct _VASurfaceAttrib {
+ /** \brief Type. */
+ VASurfaceAttribType type;
+ /** \brief Flags. See "Surface attribute flags". */
+ unsigned int flags;
+ /** \brief Value. See "Surface attribute types" for the expected types. */
+ VAGenericValue value;
+} VASurfaceAttrib;
+
+/**
+ * \brief Get surface attributes for the supplied config.
+ *
+ * This function retrieves the surface attributes matching the supplied
+ * config. The caller shall provide an \c attrib_list with all attributes
+ * to be retrieved. Upon successful return, the attributes in \c attrib_list
+ * are updated with the requested value. Unknown attributes or attributes
+ * that are not supported for the given config will have their \c flags
+ * field set to \c VA_SURFACE_ATTRIB_NOT_SUPPORTED.
+ *
+ * @param[in] dpy the VA display
+ * @param[in] config the config identifying a codec or a video
+ * processing pipeline
+ * @param[in,out] attrib_list the list of attributes on input, with at
+ * least \c type fields filled in, and possibly \c value fields whenever
+ * necessary. The updated list of attributes and flags on output
+ * @param[in] num_attribs the number of attributes supplied in the
+ * \c attrib_list array
+ */
+VAStatus
+vaGetSurfaceAttributes(
+ VADisplay dpy,
+ VAConfigID config,
+ VASurfaceAttrib *attrib_list,
+ unsigned int num_attribs
+);
+
+/**
+ * \brief Creates an array of surfaces
+ *
+ * Creates an array of surfaces. The optional list of attributes shall
+ * be constructed and verified through vaGetSurfaceAttributes().
+ *
+ * @param[in] dpy the VA display
+ * @param[in] format the desired surface format. See \c VA_RT_FORMAT_*
+ * @param[in] width the surface width
+ * @param[in] height the surface height
+ * @param[out] surfaces the array of newly created surfaces
+ * @param[in] num_surfaces the number of surfaces to create
+ * @param[in] attrib_list the list of (optional) attributes, or \c NULL
+ * @param[in] num_attribs the number of attributes supplied in
+ * \c attrib_list, or zero
+ */
+VAStatus
+vaCreateSurfaces(
+ VADisplay dpy,
+ unsigned int format,
+ unsigned int width,
+ unsigned int height,
+ VASurfaceID *surfaces,
+ unsigned int num_surfaces,
+ VASurfaceAttrib *attrib_list,
+ unsigned int num_attribs
);
/*
@@ -595,15 +798,39 @@ typedef enum
VAImageBufferType = 9,
VAProtectedSliceDataBufferType = 10,
VAQMatrixBufferType = 11,
+ VAHuffmanTableBufferType = 12,
+ VAProbabilityBufferType = 13,
/* Following are encode buffer types */
VAEncCodedBufferType = 21,
VAEncSequenceParameterBufferType = 22,
VAEncPictureParameterBufferType = 23,
VAEncSliceParameterBufferType = 24,
- VAEncH264VUIBufferType = 25,
- VAEncH264SEIBufferType = 26,
+ VAEncPackedHeaderParameterBufferType = 25,
+ VAEncPackedHeaderDataBufferType = 26,
VAEncMiscParameterBufferType = 27,
- VABufferTypeMax = 0xff
+ VAEncMacroblockParameterBufferType = 28,
+/* Following are video processing buffer types */
+ /**
+ * \brief Video processing pipeline parameter buffer.
+ *
+ * This buffer describes the video processing pipeline. See
+ * #VAProcPipelineParameterBuffer for details.
+ */
+ VAProcPipelineParameterBufferType = 41,
+ /**
+ * \brief Video filter parameter buffer.
+ *
+ * This buffer describes the video filter parameters. All buffers
+ * inherit from #VAProcFilterParameterBufferBase, thus including
+ * a unique filter buffer type.
+ *
+ * The default buffer used by most filters is #VAProcFilterParameterBuffer.
+ * Filters requiring advanced parameters include, but are not limited to,
+ * deinterlacing (#VAProcFilterParameterBufferDeinterlacing),
+ * color balance (#VAProcFilterParameterBufferColorBalance), etc.
+ */
+ VAProcFilterParameterBufferType = 42,
+ VABufferTypeMax
} VABufferType;
typedef enum
@@ -612,9 +839,34 @@ typedef enum
VAEncMiscParameterTypeRateControl = 1,
VAEncMiscParameterTypeMaxSliceSize = 2,
VAEncMiscParameterTypeAIR = 3,
- VAEncMiscParameterTypeHRD = 4
+ /** \brief Buffer type used to express a maximum frame size (in bits). */
+ VAEncMiscParameterTypeMaxFrameSize = 4,
+ /** \brief Buffer type used for HRD parameters. */
+ VAEncMiscParameterTypeHRD = 5,
} VAEncMiscParameterType;
+/** \brief Packed header type. */
+typedef enum {
+ /** \brief Packed sequence header. */
+ VAEncPackedHeaderSequence = 1,
+ /** \brief Packed picture header. */
+ VAEncPackedHeaderPicture = 2,
+ /** \brief Packed slice header. */
+ VAEncPackedHeaderSlice = 3,
+ /** \brief Misc packed header. See codec-specific definitions. */
+ VAEncPackedHeaderMiscMask = 0x80000000,
+} VAEncPackedHeaderType;
+
+/** \brief Packed header parameter. */
+typedef struct _VAEncPackedHeaderParameterBuffer {
+ /** Type of the packed header buffer. See #VAEncPackedHeaderType. */
+ unsigned int type;
+ /** \brief Size of the #VAEncPackedHeaderDataBuffer in bits. */
+ unsigned int bit_length;
+ /** \brief Flag: buffer contains start code emulation prevention bytes? */
+ unsigned char has_emulation_bytes;
+} VAEncPackedHeaderParameterBuffer;
+
/*
* For application, e.g. set a new bitrate
* VABufferID buf_id;
@@ -638,16 +890,25 @@ typedef struct _VAEncMiscParameterBuffer
unsigned int data[0];
} VAEncMiscParameterBuffer;
+
+/** \brief Rate control parameters */
typedef struct _VAEncMiscParameterRateControl
{
- unsigned int bits_per_second; /* this is the maximum bit-rate to be constrained by the rate control implementation */
- unsigned int target_percentage; /* this is the bit-rate the rate control is targeting, as a percentage of the maximum bit-rate */
- /* for example if target_percentage is 95 then the rate control will target a bit-rate that is */
- /* 95% of the maximum bit-rate */
- unsigned int window_size; /* windows size in milliseconds. For example if this is set to 500, then the rate control will guarantee the */
- /* target bit-rate over a 500 ms window */
- unsigned int initial_qp; /* initial QP at I frames */
+ /* this is the maximum bit-rate to be constrained by the rate control implementation */
+ unsigned int bits_per_second;
+ /* this is the bit-rate the rate control is targeting, as a percentage of the maximum
+ * bit-rate for example if target_percentage is 95 then the rate control will target
+ * a bit-rate that is 95% of the maximum bit-rate
+ */
+ unsigned int target_percentage;
+ /* windows size in milliseconds. For example if this is set to 500,
+ * then the rate control will guarantee the target bit-rate over a 500 ms window
+ */
+ unsigned int window_size;
+ /* initial QP at I frames */
+ unsigned int initial_qp;
unsigned int min_qp;
+ unsigned int basic_unit_size;
union
{
struct
@@ -655,7 +916,6 @@ typedef struct _VAEncMiscParameterRateControl
unsigned int reset : 1;
unsigned int disable_frame_skip : 1; /* Disable frame skip in rate control mode */
unsigned int disable_bit_stuffing : 1; /* Disable bit stuffing in rate control mode */
- unsigned int : 29;
} bits;
unsigned int value;
} rc_flags;
@@ -685,10 +945,26 @@ typedef struct _VAEncMiscParameterAIR
typedef struct _VAEncMiscParameterHRD
{
- unsigned int buffer_size; /* in bits */
- unsigned int initial_buffer_fullness; /* in bits */
+ unsigned int initial_buffer_fullness; /* in bits */
+ unsigned int buffer_size; /* in bits */
} VAEncMiscParameterHRD;
+/**
+ * \brief Defines a maximum frame size (in bits).
+ *
+ * This misc parameter buffer defines the maximum size of a frame (in
+ * bits). The encoder will try to make sure that each frame does not
+ * exceed this size. Otherwise, if the frame size exceeds this size,
+ * the \c status flag of #VACodedBufferSegment will contain
+ * #VA_CODED_BUF_STATUS_FRAME_SIZE_OVERFLOW.
+ */
+typedef struct _VAEncMiscParameterBufferMaxFrameSize {
+ /** \brief Type. Shall be set to #VAEncMiscParameterTypeMaxFrameSize. */
+ VAEncMiscParameterType type;
+ /** \brief Maximum size of a frame (in bits). */
+ unsigned int max_frame_size;
+} VAEncMiscParameterBufferMaxFrameSize;
+
/*
* There will be cases where the bitstream buffer will not have enough room to hold
* the data for the entire slice, and the following flags will be used in the slice
@@ -1225,9 +1501,20 @@ typedef struct _VAIQMatrixBufferH264
typedef struct _VASliceParameterBufferH264
{
unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */
- unsigned int slice_data_offset;/* the offset to the NAL start code for this slice */
+ /** \brief Byte offset to the NAL Header Unit for this slice. */
+ unsigned int slice_data_offset;
unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
- unsigned short slice_data_bit_offset; /* bit offset from NAL start code to the beginning of slice data */
+ /**
+ * \brief Bit offset from NAL Header Unit to the begining of slice_data().
+ *
+ * This bit offset is relative to and includes the NAL unit byte
+ * and represents the number of bits parsed in the slice_header()
+ * after the removal of any emulation prevention bytes in
+ * there. However, the slice data buffer passed to the hardware is
+ * the original bitstream, thus including any emulation prevention
+ * bytes.
+ */
+ unsigned short slice_data_bit_offset;
unsigned short first_mb_in_slice;
unsigned char slice_type;
unsigned char direct_spatial_mv_pred_flag;
@@ -1283,58 +1570,6 @@ typedef struct _VAEncSliceParameterBuffer
} VAEncSliceParameterBuffer;
/****************************
- * H.264 specific encode data structures
- ****************************/
-
-typedef struct _VAEncSequenceParameterBufferH264
-{
- unsigned char seq_parameter_set_id;
- unsigned char level_idc;
- unsigned int intra_period;
- unsigned int intra_idr_period;
- unsigned int max_num_ref_frames;
- unsigned int picture_width_in_mbs;
- unsigned int picture_height_in_mbs;
- unsigned int bits_per_second;
- unsigned int frame_rate;
- unsigned int initial_qp;
- unsigned int min_qp;
- unsigned int basic_unit_size;
-
- /** \brief Same as the H.264 bitstream syntax element. */
- unsigned char frame_cropping_flag;
- /** \brief Same as the H.264 bitstream syntax element. */
- unsigned int frame_crop_left_offset;
- /** \brief Same as the H.264 bitstream syntax element. */
- unsigned int frame_crop_right_offset;
- /** \brief Same as the H.264 bitstream syntax element. */
- unsigned int frame_crop_top_offset;
- /** \brief Same as the H.264 bitstream syntax element. */
- unsigned int frame_crop_bottom_offset;
- /** \brief Same as the H.264 bitstream syntax element. */
- unsigned char aspect_ratio_info_present_flag;
- /** \brief Same as the H.264 bitstream syntax element. */
- unsigned char vui_flag;
- unsigned char aspect_ratio_idc;
- /** \brief Same as the H.264 bitstream syntax element. */
- unsigned int sar_width;
- /** \brief Same as the H.264 bitstream syntax element. */
- unsigned int sar_height;
-} VAEncSequenceParameterBufferH264;
-
-#define H264_LAST_PICTURE_EOSEQ 0x01 /* the last picture in the sequence */
-#define H264_LAST_PICTURE_EOSTREAM 0x02 /* the last picture in the stream */
-typedef struct _VAEncPictureParameterBufferH264
-{
- VASurfaceID reference_picture;
- VASurfaceID reconstructed_picture;
- VABufferID coded_buf;
- unsigned short picture_width;
- unsigned short picture_height;
- unsigned char last_picture;
-} VAEncPictureParameterBufferH264;
-
-/****************************
* H.263 specific encode data structures
****************************/
@@ -1442,26 +1677,59 @@ VAStatus vaBufferSetNumElements (
* BITRATE_OVERFLOW(bit10): The peak bitrate was exceeded for this frame.
* BITRATE_HIGH(bit11): The frame size got within the safety margin of the maximum size (VCM only)
* AIR_MB_OVER_THRESHOLD: the number of MBs adapted to Intra MB
- * AVC_SINGLE_NALU(bit31): indicate the segment only contains one AVC NALU
*/
#define VA_CODED_BUF_STATUS_PICTURE_AVE_QP_MASK 0xff
#define VA_CODED_BUF_STATUS_LARGE_SLICE_MASK 0x100
#define VA_CODED_BUF_STATUS_SLICE_OVERFLOW_MASK 0x200
#define VA_CODED_BUF_STATUS_BITRATE_OVERFLOW 0x400
#define VA_CODED_BUF_STATUS_BITRATE_HIGH 0x800
+/**
+ * \brief The frame has exceeded the maximum requested size.
+ *
+ * This flag indicates that the encoded frame size exceeds the value
+ * specified through a misc parameter buffer of type
+ * #VAEncMiscParameterTypeMaxFrameSize.
+ */
+#define VA_CODED_BUF_STATUS_FRAME_SIZE_OVERFLOW 0x1000
#define VA_CODED_BUF_STATUS_AIR_MB_OVER_THRESHOLD 0xff0000
-#define VA_CODED_BUF_STATUS_AVC_SINGLE_NALU 0x80000000
-/*
- * device independent data structure for codedbuffer
+/**
+ * \brief The coded buffer segment contains a single NAL unit.
+ *
+ * This flag indicates that the coded buffer segment contains a
+ * single NAL unit. This flag might be useful to the user for
+ * processing the coded buffer.
+ */
+#define VA_CODED_BUF_STATUS_SINGLE_NALU 0x10000000
+
+/**
+ * \brief Coded buffer segment.
+ *
+ * #VACodedBufferSegment is an element of a linked list describing
+ * some information on the coded buffer. The coded buffer segment
+ * could contain either a single NAL unit, or more than one NAL unit.
+ * It is recommended (but not required) to return a single NAL unit
+ * in a coded buffer segment, and the implementation should set the
+ * VA_CODED_BUF_STATUS_SINGLE_NALU status flag if that is the case.
*/
typedef struct _VACodedBufferSegment {
- unsigned int size;/* size of the data buffer in the coded buffer segment, in bytes */
- unsigned int bit_offset; /* bit offset into the data buffer where valid bitstream data begins */
- unsigned int status; /* status set by the driver on the coded buffer*/
- unsigned int reserved; /* for future use */
- void *buf; /* pointer to the beginning of the data buffer in the coded buffer segment */
- void *next; /* pointer to the next VACodedBufferSegment */
+ /**
+ * \brief Size of the data buffer in this segment (in bytes).
+ */
+ unsigned int size;
+ /** \brief Bit offset into the data buffer where the video data starts. */
+ unsigned int bit_offset;
+ /** \brief Status set by the driver. See \c VA_CODED_BUF_STATUS_*. */
+ unsigned int status;
+ /** \brief Reserved for future use. */
+ unsigned int reserved;
+ /** \brief Pointer to the start of the data buffer. */
+ void *buf;
+ /**
+ * \brief Pointer to the next #VACodedBufferSegment element,
+ * or \c NULL if there is none.
+ */
+ void *next;
} VACodedBufferSegment;
/*
@@ -1627,6 +1895,8 @@ VAStatus vaQuerySurfaceError(
#define VA_FOURCC_YV12 0x32315659
#define VA_FOURCC_P208 0x38303250
#define VA_FOURCC_IYUV 0x56555949
+#define VA_FOURCC_YV24 0x34325659
+#define VA_FOURCC_YV32 0x32335659
/* byte order */
#define VA_LSB_FIRST 1
@@ -1954,15 +2224,6 @@ typedef struct _VARectangle
* attributes are supported by the driver, and then set the appropriate attributes
* before calling vaPutSurface()
*/
-/* PowerVR IEP Lite attributes */
-typedef enum
-{
- VADISPLAYATTRIB_BLE_OFF = 0x00,
- VADISPLAYATTRIB_BLE_LOW,
- VADISPLAYATTRIB_BLE_MEDIUM,
- VADISPLAYATTRIB_BLE_HIGH,
- VADISPLAYATTRIB_BLE_NONE,
-} VADisplayAttribBLEMode;
/* attribute value for VADisplayAttribRotation */
#define VA_ROTATION_NONE 0x00000000
@@ -1999,26 +2260,9 @@ typedef enum
* also it will blend with the decoded video color
*/
VADisplayAttribBackgroundColor = 4,
- /*
- * this is a gettable only attribute. For some implementations that use the
- * hardware overlay, after PutSurface is called, the surface can not be
- * re-used until after the subsequent PutSurface call. If this is the case
- * then the value for this attribute will be set to 1 so that the client
- * will not attempt to re-use the surface right after returning from a call
- * to PutSurface.
- *
- * Don't use it, use flag VASurfaceDisplaying of vaQuerySurfaceStatus since
- * driver may use overlay or GPU alternatively
- */
- VADisplayAttribDirectSurface = 5,
VADisplayAttribRotation = 6,
VADisplayAttribOutofLoopDeblock = 7,
- /* PowerVR IEP Lite specific attributes */
- VADisplayAttribBLEBlackMode = 8,
- VADisplayAttribBLEWhiteMode = 9,
- VADisplayAttribBlueStretch = 10,
- VADisplayAttribSkinColorCorrection = 11,
/*
* For type VADisplayAttribCSCMatrix, "value" field is a pointer to the color
* conversion matrix. Each element in the matrix is float-point
@@ -2116,6 +2360,8 @@ VAStatus vaSetDisplayAttributes (
int num_attributes
);
+/**@}*/
+
#ifdef __cplusplus
}
#endif
diff --git a/va/va_backend.h b/va/va_backend.h
index 56e6e82..c92be53 100755
--- a/va/va_backend.h
+++ b/va/va_backend.h
@@ -86,16 +86,14 @@ struct VADriverVTable
int *num_attribs /* out */
);
- VAStatus (*vaCreateSurfaces) (
- VADriverContextP ctx,
- int width,
- int height,
- int format,
- int num_surfaces,
- VASurfaceID *surfaces, /* out */
- VASurfaceAttrib *attrib_list,
- int num_attribs
- );
+ VAStatus (*vaCreateSurfaces) (
+ VADriverContextP ctx,
+ int width,
+ int height,
+ int format,
+ int num_surfaces,
+ VASurfaceID *surfaces /* out */
+ );
VAStatus (*vaDestroySurfaces) (
VADriverContextP ctx,
@@ -379,6 +377,26 @@ struct VADriverVTable
VADriverContextP ctx,
VASurfaceID surface
);
+
+ VAStatus
+ (*vaGetSurfaceAttributes)(
+ VADriverContextP dpy,
+ VAConfigID config,
+ VASurfaceAttrib *attrib_list,
+ unsigned int num_attribs
+ );
+
+ VAStatus
+ (*vaCreateSurfaces2)(
+ VADriverContextP ctx,
+ unsigned int format,
+ unsigned int width,
+ unsigned int height,
+ VASurfaceID *surfaces,
+ unsigned int num_surfaces,
+ VASurfaceAttrib *attrib_list,
+ unsigned int num_attribs
+ );
};
struct VADriverContext
@@ -436,7 +454,14 @@ struct VADriverContext
void *dri_state;
void *glx; /* opaque for GLX code */
- unsigned long reserved[45]; /* reserve for future add-ins, decrease the subscript accordingly */
+ /**
+ * \brief The VA/VPP implementation hooks.
+ *
+ * This structure is allocated from libva with calloc().
+ */
+ struct VADriverVTableVPP *vtable_vpp;
+
+ unsigned long reserved[44]; /* reserve for future add-ins, decrease the subscript accordingly */
};
#define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */
diff --git a/va/va_backend_tpi.h b/va/va_backend_tpi.h
index 172c1af..b96a37e 100644
--- a/va/va_backend_tpi.h
+++ b/va/va_backend_tpi.h
@@ -31,84 +31,43 @@
#include <va/va.h>
#include <va/va_backend.h>
-
-#include <linux/videodev2.h>
+#include <va/va_tpi.h>
struct VADriverVTableTPI
{
- /* device specific */
- VAStatus (*vaCreateSurfaceFromCIFrame) (
- VADriverContextP ctx,
- unsigned long frame_id,
- VASurfaceID *surface /* out */
- );
+ VAStatus (*vaCreateSurfacesWithAttribute) (
+ VADisplay dpy,
+ int width,
+ int height,
+ int format,
+ int num_surfaces,
+ VASurfaceID *surfaces, /* out */
+ VASurfaceAttributeTPI *attribute_tpi
+ );
- VAStatus (*vaCreateSurfaceFromV4L2Buf) (
- VADriverContextP ctx,
- int v4l2_fd, /* file descriptor of V4L2 device */
- struct v4l2_format *v4l2_fmt, /* format of V4L2 */
- struct v4l2_buffer *v4l2_buf, /* V4L2 buffer */
- VASurfaceID *surface /* out */
+ VAStatus (*vaPutSurfaceBuf) (
+ VADriverContextP ctx,
+ VASurfaceID surface,
+ unsigned char* data,
+ int* data_len,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth,
+ VARectangle *cliprects, /* client supplied clip list */
+ unsigned int number_cliprects, /* number of clip rects in the clip list */
+ unsigned int flags /* de-interlacing flags */
);
- VAStatus (*vaCreateSurfacesForUserPtr)(
- VADriverContextP ctx,
- int width,
- int height,
- int format,
- int num_surfaces,
- VASurfaceID *surfaces, /* out */
- unsigned size, /* total buffer size need to be allocated */
- unsigned int fourcc, /* expected fourcc */
- unsigned int luma_stride, /* luma stride, could be width aligned with a special value */
- unsigned int chroma_u_stride, /* chroma stride */
- unsigned int chroma_v_stride,
- unsigned int luma_offset, /* could be 0 */
- unsigned int chroma_u_offset, /* UV offset from the beginning of the memory */
- unsigned int chroma_v_offset
- );
-
- VAStatus (*vaCreateSurfaceFromKBuf)(
- VADriverContextP ctx,
- int width,
- int height,
- int format,
- VASurfaceID *surface, /* out */
- unsigned int kbuf_handle, /* kernel buffer handle*/
- unsigned size, /* kernel buffer size */
- unsigned int kBuf_fourcc, /* expected fourcc */
- unsigned int luma_stride, /* luma stride, could be width aligned with a special value */
- unsigned int chroma_u_stride, /* chroma stride */
- unsigned int chroma_v_stride,
- unsigned int luma_offset, /* could be 0 */
- unsigned int chroma_u_offset, /* UV offset from the beginning of the memory */
- unsigned int chroma_v_offset
- );
-
- VAStatus (*vaPutSurfaceBuf) (
- VADriverContextP ctx,
- VASurfaceID surface,
- unsigned char* data,
- int* data_len,
- short srcx,
- short srcy,
- unsigned short srcw,
- unsigned short srch,
- short destx,
- short desty,
- unsigned short destw,
- unsigned short desth,
- VARectangle *cliprects, /* client supplied clip list */
- unsigned int number_cliprects, /* number of clip rects in the clip list */
- unsigned int flags /* de-interlacing flags */
- );
-
- VAStatus (*vaSetTimestampForSurface)(
- VADisplay dpy,
- VASurfaceID surface,
- long long timestamp
- );
-
+ VAStatus (*vaSetTimestampForSurface)(
+ VADisplay dpy,
+ VASurfaceID surface,
+ long long timestamp
+ );
};
diff --git a/va/va_backend_vpp.h b/va/va_backend_vpp.h
new file mode 100644
index 0000000..b776ef6
--- /dev/null
+++ b/va/va_backend_vpp.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2007-2011 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef VA_BACKEND_VPP_H
+#define VA_BACKEND_VPP_H
+
+#include <va/va_vpp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \brief VTable version for VA/VPP hooks. */
+#define VA_DRIVER_VTABLE_VPP_VERSION 1
+
+struct VADriverVTableVPP {
+ unsigned int version;
+
+ VAStatus
+ (*vaQueryVideoProcFilters)(
+ VADriverContextP ctx,
+ VAContextID context,
+ VAProcFilterType *filters,
+ unsigned int *num_filters
+ );
+
+ VAStatus
+ (*vaQueryVideoProcFilterCaps)(
+ VADriverContextP ctx,
+ VAContextID context,
+ VAProcFilterType type,
+ void *filter_caps,
+ unsigned int *num_filter_caps
+ );
+
+ VAStatus
+ (*vaQueryVideoProcPipelineCaps)(
+ VADriverContextP ctx,
+ VAContextID context,
+ VABufferID *filters,
+ unsigned int num_filters,
+ VAProcPipelineCaps *pipeline_caps
+ );
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VA_BACKEND_VPP_H */
diff --git a/va/va_compat.c b/va/va_compat.c
new file mode 100644
index 0000000..113591f
--- /dev/null
+++ b/va/va_compat.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2007-2011 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#define VA_COMPAT_DISABLED 1
+#include "sysdeps.h"
+#include "va.h"
+#include "va_compat.h"
+
+VAStatus
+vaCreateSurfaces_0_32_0(
+ VADisplay dpy,
+ int width,
+ int height,
+ int format,
+ int num_surfaces,
+ VASurfaceID *surfaces
+)
+{
+ return vaCreateSurfaces(dpy, format, width, height, surfaces, num_surfaces,
+ NULL, 0);
+}
+VA_CPP_HELPER_ALIAS(vaCreateSurfaces, 0,32,0);
diff --git a/va/va_compat.h b/va/va_compat.h
new file mode 100644
index 0000000..41a3f73
--- /dev/null
+++ b/va/va_compat.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2007-2011 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file va_compat.h
+ * \brief The Compatibility API
+ *
+ * This file contains the \ref api_compat "Compatibility API".
+ */
+
+#ifndef VA_COMPAT_H
+#define VA_COMPAT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \defgroup api_compat Compatibility API
+ *
+ * The Compatibility API allows older programs that are not ported to
+ * the current API to still build and run correctly. In particular,
+ * this exposes older API to allow for backwards source compatibility.
+ *
+ * @{
+ */
+
+/**
+ * Makes a string literal out of the macro argument
+ */
+#define VA_CPP_HELPER_STRINGIFY(x) \
+ VA_CPP_HELPER_STRINGIFY_(x)
+#define VA_CPP_HELPER_STRINGIFY_(x) \
+ #x
+
+/**
+ * Concatenates two macro arguments at preprocessing time.
+ */
+#define VA_CPP_HELPER_CONCAT(a, b) \
+ VA_CPP_HELPER_CONCAT_(a, b)
+#define VA_CPP_HELPER_CONCAT_(a, b) \
+ a ## b
+
+/**
+ * Generates the number of macro arguments at preprocessing time.
+ * <http://groups.google.com/group/comp.std.c/browse_thread/thread/77ee8c8f92e4a3fb/346fc464319b1ee5>
+ *
+ * Note: this doesn't work for macros with no arguments
+ */
+#define VA_CPP_HELPER_N_ARGS(...) \
+ VA_CPP_HELPER_N_ARGS_(__VA_ARGS__, VA_CPP_HELPER_N_ARGS_LIST_REV())
+#define VA_CPP_HELPER_N_ARGS_(...) \
+ VA_CPP_HELPER_N_ARGS_LIST(__VA_ARGS__)
+#define VA_CPP_HELPER_N_ARGS_LIST(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a12, a13, a14, a15, a16, N, ...) N
+#define VA_CPP_HELPER_N_ARGS_LIST_REV() \
+ 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
+
+/**
+ * Generates a versioned function alias.
+ *
+ * VA_CPP_HELPER_ALIAS(vaSomeFunction, 0,32,0) will generate
+ * .symber vaSomeFunction_0_32_0, vaSomeFunction@VA_API_0.32.0
+ */
+#define VA_CPP_HELPER_ALIAS(func, major, minor, micro) \
+ VA_CPP_HELPER_ALIAS_(func, major, minor, micro, "@")
+#define VA_CPP_HELPER_ALIAS_DEFAULT(func, major, minor, micro) \
+ VA_CPP_HELPER_ALIAS_(func, major, minor, micro, "@@")
+#define VA_CPP_HELPER_ALIAS_(func, major, minor, micro, binding) \
+ asm(".symver " #func "_" #major "_" #minor "_" #micro ", " \
+ #func binding "VA_API_" #major "." #minor "." #micro)
+
+/* vaCreateSurfaces() */
+
+#ifndef VA_COMPAT_DISABLED
+#define vaCreateSurfaces(dpy, ...) \
+ VA_CPP_HELPER_CONCAT(vaCreateSurfaces, \
+ VA_CPP_HELPER_N_ARGS(dpy, __VA_ARGS__)) \
+ (dpy, __VA_ARGS__)
+#endif
+
+#define vaCreateSurfaces6(dpy, width, height, format, num_surfaces, surfaces) \
+ (vaCreateSurfaces)(dpy, format, width, height, surfaces, num_surfaces, \
+ NULL, 0)
+
+#define vaCreateSurfaces8(dpy, format, width, height, surfaces, num_surfaces, attribs, num_attribs) \
+ (vaCreateSurfaces)(dpy, format, width, height, surfaces, num_surfaces, \
+ attribs, num_attribs)
+
+/*@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VA_COMPAT_H */
diff --git a/va/va_dec_jpeg.h b/va/va_dec_jpeg.h
new file mode 100644
index 0000000..53f1769
--- /dev/null
+++ b/va/va_dec_jpeg.h
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2007-2012 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file va_dec_jpeg.h
+ * \brief The JPEG decoding API
+ *
+ * This file contains the \ref api_dec_jpeg "JPEG decoding API".
+ */
+
+#ifndef VA_DEC_JPEG_H
+#define VA_DEC_JPEG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <va/va_enc.h>
+
+/**
+ * \defgroup api_dec_jpeg JPEG decoding API
+ *
+ * WIP: this is work-in-progress API subject to change.
+ *
+ * @{
+ */
+
+/**
+ * \brief Picture parameter for JPEG decoding.
+ *
+ * This structure holds information from the frame header, along with
+ * definitions from additional segments.
+ */
+typedef struct _VAPictureParameterBufferJPEG {
+ /** \brief Picture width in pixels. */
+ unsigned short picture_width;
+ /** \brief Picture height in pixels. */
+ unsigned short picture_height;
+ /** \brief Sample precision (P). */
+ unsigned char sample_precision;
+
+ struct {
+ /** \brief Component identifier (Ci). */
+ unsigned char component_id;
+ /** \brief Horizontal sampling factor (Hi). */
+ unsigned char h_sampling_factor;
+ /** \brief Vertical sampling factor (Vi). */
+ unsigned char v_sampling_factor;
+ /* \brief Quantization table selector (Tqi). */
+ unsigned char quantiser_table_selector;
+ } components[255];
+ /** \brief Number of components in frame (Nf). */
+ unsigned char num_components;
+
+ /** @name Cropping (JPEG-2000) */
+ /**@{*/
+ unsigned char frame_cropping_flag;
+ unsigned short frame_crop_left_offset;
+ unsigned short frame_crop_right_offset;
+ unsigned short frame_crop_top_offset;
+ unsigned short frame_crop_bottom_offset;
+ /**@}*/
+
+ /** \brief Rotation (JPEG-2000). See \c VA_ROTATION_xxx. */
+ unsigned int rotation;
+} VAPictureParameterBufferJPEG;
+
+/**
+ * \brief Quantization table for JPEG decoding.
+ *
+ * This structure holds the complete quantization tables. This is an
+ * aggregation of all quantization table (DQT) segments maintained by
+ * the application. i.e. up to 4 quantization tables are stored in
+ * there for baseline profile.
+ *
+ * The #load_quantization_table array can be used as a hint to notify
+ * the VA driver implementation about which table(s) actually changed
+ * since the last submission of this buffer.
+ *
+ * WIP: this is work-in-progress API subject to change, and only
+ * suitable to Baseline profile.
+ */
+typedef struct _VAIQMatrixParameterBufferJPEG {
+ /** \brief Specifies which #quantiser_table is valid. */
+ unsigned char load_quantiser_table[4];
+ /** \brief Quanziation tables indexed by table identifier (Tqi). */
+ unsigned char quantiser_table[4][64];
+} VAIQMatrixParameterBufferJPEG;
+
+/**
+ * \brief Huffman table for JPEG decoding.
+ *
+ * This structure holds the complete Huffman tables. This is an
+ * aggregation of all Huffman table (DHT) segments maintained by the
+ * application. i.e. up to 2 Huffman tables are stored in there for
+ * baseline profile.
+ *
+ * The #load_huffman_table array can be used as a hint to notify the
+ * VA driver implementation about which table(s) actually changed
+ * since the last submission of this buffer.
+ *
+ * WIP: this is work-in-progress API subject to change, and only
+ * suitable to Baseline profile.
+ */
+typedef struct _VAHuffmanTableParameterBufferJPEG {
+ /** \brief Specifies which #huffman_table is valid. */
+ unsigned char load_huffman_table[2];
+ /** \brief Huffman tables indexed by table identifier (Th). */
+ struct {
+ /** @name DC table (up to 12 categories) */
+ /**@{*/
+ /** \brief Number of Huffman codes of length i + 1 (Li). */
+ unsigned char num_dc_codes[16];
+ /** \brief Value associated with each Huffman code (Vij). */
+ unsigned char dc_values[12];
+ /**@}*/
+ /** @name AC table (2 special codes + up to 16 * 10 codes) */
+ /**@{*/
+ /** \brief Number of Huffman codes of length i + 1 (Li). */
+ unsigned char num_ac_codes[16];
+ /** \brief Value associated with each Huffman code (Vij). */
+ unsigned char ac_values[162];
+ /**@}*/
+ } huffman_table[2];
+} VAHuffmanTableParameterBufferJPEG;
+
+/**
+ * \brief Slice parameter for JPEG decoding.
+ *
+ * This structure holds information from the scan header, along with
+ * definitions from additional segments. The associated slice data
+ * buffer holds all entropy coded segments (ECS) in the scan.
+ */
+typedef struct _VASliceParameterBufferJPEG {
+ /** @name Codec-independent Slice Parameter Buffer base. */
+ /**@{*/
+ /** \brief Number of bytes in the slice data buffer for this slice. */
+ unsigned int slice_data_size;
+ /** \brief The offset to the first byte of the first MCU. */
+ unsigned int slice_data_offset;
+ /** \brief Slice data buffer flags. See \c VA_SLICE_DATA_FLAG_xxx. */
+ unsigned int slice_data_flag;
+ /**@}*/
+
+ /** \brief Scan horizontal position. */
+ unsigned int slice_horizontal_position;
+ /** \brief Scan vertical position. */
+ unsigned int slice_vertical_position;
+
+ struct {
+ /** \brief Scan component selector (Csj). */
+ unsigned char component_selector;
+ /** \brief DC entropy coding table selector (Tdj). */
+ unsigned char dc_table_selector;
+ /** \brief AC entropy coding table selector (Taj). */
+ unsigned char ac_table_selector;
+ } components[4];
+ /** \brief Number of components in scan (Ns). */
+ unsigned char num_components;
+
+ /** \brief Restart interval definition (Ri). */
+ unsigned short restart_interval;
+ /** \brief Number of MCUs in a scan. */
+ unsigned int num_mcus;
+} VASliceParameterBufferJPEG;
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VA_DEC_JPEG_H */
diff --git a/va/va_dec_vp8.h b/va/va_dec_vp8.h
new file mode 100644
index 0000000..66b866b
--- /dev/null
+++ b/va/va_dec_vp8.h
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2007-2012 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file va_dec_vp.h
+ * \brief VP8 decoding API
+ *
+ * This file contains the \ref api_dec_vp8 "VP8 decoding API".
+ */
+
+#ifndef VA_DEC_VP8_H
+#define VA_DEC_VP8_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \defgroup api_dec_vp8 VP8 decoding API
+ *
+ * @{
+ */
+
+/**
+ * \brief VPX Bool Coder Context structure
+ *
+ * This common structure is defined for potential sharing by other VP formats
+ *
+ */
+typedef struct _VABoolCoderContextVPX
+{
+ /* partition 0 "range" */
+ unsigned short range;
+ /* partition 0 "value" */
+ unsigned int value;
+ /* partition 0 number of shifts before an output byte is available */
+ unsigned short count;
+} VABoolCoderContextVPX;
+
+/**
+ * \brief VP8 Decoding Picture Parameter Buffer Structure
+ *
+ * This structure conveys frame level parameters and should be sent once
+ * per frame.
+ *
+ */
+typedef struct _VAPictureParameterBufferVP8
+{
+ /* frame width in pixels */
+ unsigned int frame_width;
+ /* frame height in pixels */
+ unsigned int frame_height;
+
+ /* specifies the "last" reference frame */
+ VASurfaceID last_ref_frame;
+ /* specifies the "golden" reference frame */
+ VASurfaceID golden_ref_frame;
+ /* specifies the "alternate" referrence frame */
+ VASurfaceID alt_ref_frame;
+ /* specifies the out-of-loop deblocked frame, not used currently */
+ VASurfaceID out_of_loop_frame;
+
+ union {
+ struct {
+ /* same as key_frame in bitstream syntax */
+ unsigned int key_frame : 1;
+ /* same as version in bitstream syntax */
+ unsigned int version : 3;
+ /* same as segmentation_enabled in bitstream syntax */
+ unsigned int segmentation_enabled : 1;
+ /* same as update_mb_segmentation_map in bitstream syntax */
+ unsigned int update_mb_segmentation_map : 1;
+ /* same as update_segment_feature_data in bitstream syntax */
+ unsigned int update_segment_feature_data : 1;
+ /* same as filter_type in bitstream syntax */
+ unsigned int filter_type : 1;
+ /* same as sharpness_level in bitstream syntax */
+ unsigned int sharpness_level : 3;
+ /* same as loop_filter_adj_enable in bitstream syntax */
+ unsigned int loop_filter_adj_enable : 1;
+ /* same as mode_ref_lf_delta_update in bitstream syntax */
+ unsigned int mode_ref_lf_delta_update : 1;
+ /* same as sign_bias_golden in bitstream syntax */
+ unsigned int sign_bias_golden : 1;
+ /* same as sign_bias_alternate in bitstream syntax */
+ unsigned int sign_bias_alternate : 1;
+ /* same as mb_no_coeff_skip in bitstream syntax */
+ unsigned int mb_no_coeff_skip : 1;
+ /* see section 11.1 for mb_skip_coeff */
+ unsigned int mb_skip_coeff : 1;
+ /* flag to indicate that loop filter should be disabled */
+ unsigned int loop_filter_disable : 1;
+ } bits;
+ unsigned int value;
+ } pic_fields;
+
+ /*
+ * probabilities of the segment_id decoding tree and same as
+ * mb_segment_tree_probs in the spec.
+ */
+ unsigned char mb_segment_tree_probs[3];
+
+ /* Post-adjustment loop filter levels for the 4 segments */
+ unsigned char loop_filter_level[4];
+ /* loop filter deltas for reference frame based MB level adjustment */
+ char loop_filter_deltas_ref_frame[4];
+ /* loop filter deltas for coding mode based MB level adjustment */
+ char loop_filter_deltas_mode[4];
+
+ /* same as prob_skip_false in bitstream syntax */
+ unsigned char prob_skip_false;
+ /* same as prob_intra in bitstream syntax */
+ unsigned char prob_intra;
+ /* same as prob_last in bitstream syntax */
+ unsigned char prob_last;
+ /* same as prob_gf in bitstream syntax */
+ unsigned char prob_gf;
+
+ /*
+ * list of 4 probabilities of the luma intra prediction mode decoding
+ * tree and same as y_mode_probs in frame header
+ */
+ unsigned char y_mode_probs[4];
+ /*
+ * list of 3 probabilities of the chroma intra prediction mode decoding
+ * tree and same as uv_mode_probs in frame header
+ */
+ unsigned char uv_mode_probs[3];
+ /*
+ * updated mv decoding probabilities and same as mv_probs in
+ * frame header
+ */
+ unsigned char mv_probs[2][19];
+
+ VABoolCoderContextVPX bool_coder_ctx;
+
+ /* Partitions */
+ unsigned char num_of_partitions;
+ unsigned int partition_size[9];
+
+ /*
+ * offset to the first bit of MB from the first byte of slice data buffer
+ */
+ unsigned int macroblock_offset;
+
+} VAPictureParameterBufferVP8;
+
+/**
+ * \brief VP8 Coefficient Probability Data Buffer Structure
+ *
+ * Contains the contents of the token probability table, which may be
+ * incrementally modified in the frame header. There are four dimensions to
+ * the token probability array. The outermost dimension is indexed by the
+ * type of plane being decoded; the next dimension is selected by the
+ * position of the coefficient being decoded; the third dimension, * roughly
+ * speaking, measures the "local complexity" or extent to which nearby
+ * coefficients are non-zero; the fourth, and final, dimension of the token
+ * probability array is indexed by the position in the token tree structure,
+ * as are all tree probability arrays. This structure is sent once per frame.
+ *
+ */
+typedef struct _VAProbabilityDataBufferVP8
+{
+ unsigned char dct_coeff_probs[4][8][3][11];
+} VAProbabilityDataBufferVP8;
+
+/**
+ * \brief VP8 Inverse Quantization Matrix Buffer Structure
+ *
+ * Contains quantization indices for yac(0),ydc(1),y2dc(2),y2ac(3),uvdc(4),
+ * uvac(5) for each segment (0-3). When segmentation is disabled, only
+ * quantization_index[0][] will be used. This structure is sent once per frame.
+ */
+typedef struct _VAIQMatrixBufferVP8
+{
+ /*
+ * array first dimensional is segment and 2nd dimensional is Q index
+ */
+ unsigned short quantization_index[4][6];
+} VAIQMatrixBufferVP8;
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VA_DEC_VP8_H */
diff --git a/va/va_enc.h b/va/va_enc.h
new file mode 100644
index 0000000..becd980
--- /dev/null
+++ b/va/va_enc.h
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2007-2011 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file va_enc.h
+ * \brief The Core encoding API
+ *
+ * This file contains the \ref api_enc_core "Core encoding API".
+ */
+
+#ifndef VA_ENC_H
+#define VA_ENC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <va/va.h>
+
+/**
+ * \defgroup api_enc_core Core encoding API
+ *
+ * @{
+ */
+
+/** \brief Abstract representation of a bitstream writer. */
+typedef struct _VAEncBitstream VAEncBitstream;
+
+/** @name The set of all possible error codes */
+/**@{*/
+/** \brief An invalid bitstream writer handle was supplied. */
+#define VA_ENC_STATUS_ERROR_INVALID_BITSTREAM_WRITER (-1)
+/** \brief An invalid/unsupported parameter value was supplied. */
+#define VA_ENC_STATUS_ERROR_INVALID_VALUE (-2)
+/** \brief A buffer overflow has occurred. */
+#define VA_ENC_STATUS_ERROR_BUFFER_OVERFLOW (-3)
+/**@}*/
+
+typedef int (*VAEncBitstreamFlushFunc)(
+ VAEncBitstream *bs,
+ unsigned char *buffer,
+ unsigned int buffer_size
+);
+
+/** \brief Bitstream writer attribute types. */
+typedef enum {
+ /**
+ * \brief User-provided buffer to hold output bitstream (pointer).
+ *
+ * If this attribute is provided, then \c VAencBitstreamAttribBufferSize
+ * shall also be supplied or va_enc_bitstream_new() will ignore that
+ * attribute and allocate its own buffer.
+ */
+ VAEncBitstreamAttribBuffer = 1,
+ /** \brief Size of the user-provided buffer (integer). */
+ VAEncBitstreamAttribBufferSize = 2,
+ /** \brief User-provided \c flush() callback (pointer-to-function). */
+ VAEncBitstreamAttribFlushFunc = 3,
+ /** \brief Placeholder for codec-specific attributes. */
+ VAEncBitstreamAttribMiscMask = 0x80000000
+} VAEncBitstreamAttribType;
+
+/** \brief Bitstream writer attribute value. */
+typedef struct {
+ /** \brief Attribute type (#VAEncBitstreamAttribType). */
+ VAEncBitstreamAttribType type;
+ /** \brief Attribute value (#VAGenericValue). */
+ VAGenericValue value;
+} VAEncBitstreamAttrib;
+
+/**
+ * \brief Allocates a new bitstream writer.
+ *
+ * Allocates a new bitstream writer. By default, libva allocates and
+ * maintains its own buffer. However, the user can pass down his own
+ * buffer with the \c VAEncBitstreamAttribBuffer attribute, along with
+ * the size of that buffer with the \c VAEncBitstreamAttribBufferSize
+ * attribute.
+ *
+ * @param[in] attribs the optional attributes, or NULL
+ * @param[in] num_attribs the number of attributes available in \c attribs
+ * @return a new #VAEncBitstream, or NULL if an error occurred
+ */
+VAEncBitstream *
+va_enc_bitstream_new(VAEncBitstreamAttrib *attribs, unsigned int num_attribs);
+
+/**
+ * \brief Destroys a bitstream writer.
+ *
+ * @param[in] bs the bitstream writer to destroy
+ */
+void
+va_enc_bitstream_destroy(VAEncBitstream *bs);
+
+/**
+ * \brief Writes an unsigned integer.
+ *
+ * Writes an unsigned int value of the specified length in bits. The
+ * value is implicitly zero-extended to the number of specified bits.
+ *
+ * @param[in] bs the bitstream writer
+ * @param[in] value the unsigned int value to write
+ * @param[in] length the length (in bits) of the value
+ * @return the number of bits written, or a negative value to indicate an error
+ */
+int
+va_enc_bitstream_write_ui(VAEncBitstream *bs, unsigned int value, int length);
+
+/**
+ * \brief Writes a signed integer.
+ *
+ * Writes a signed int value of the specified length in bits. The
+ * value is implicitly sign-extended to the number of specified bits.
+ *
+ * @param[in] bs the bitstream writer
+ * @param[in] value the signed int value to write
+ * @param[in] length the length (in bits) of the value
+ * @return the number of bits written, or a negative value to indicate an error
+ */
+int
+va_enc_bitstream_write_si(VAEncBitstream *bs, int value, int length);
+
+#if 0
+/* XXX: expose such API? */
+int
+va_enc_bitstream_skip(VAEncBitstream *bs, unsigned int length);
+#endif
+
+/**
+ * \brief Byte aligns the bitstream.
+ *
+ * Align the bitstream to next byte boundary, while filling in bits
+ * with the specified value (0 or 1).
+ *
+ * @param[in] bs the bitstream writer
+ * @param[in] value the bit filler value (0 or 1)
+ * @return the number of bits written, or a negative value to indicate an error
+ */
+int
+va_enc_bitstream_align(VAEncBitstream *bs, unsigned int value);
+
+/**
+ * \brief Flushes the bitstream.
+ *
+ * Flushes the bitstream, while padding with zeroe's up to the next
+ * byte boundary. This functions resets the bitstream writer to its
+ * initial state. If the user provided a flush function through the
+ * \c VAEncBitstreamFlushFunc attribute, then his callback will be
+ * called.
+ *
+ * @param[in] bs the bitstream writer
+ * @return the number of bytes written, or a negative value to indicate an error
+ */
+int
+va_enc_bitstream_flush(VAEncBitstream *bs);
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VA_ENC_H */
diff --git a/va/va_enc_h264.h b/va/va_enc_h264.h
new file mode 100644
index 0000000..6da3f01
--- /dev/null
+++ b/va/va_enc_h264.h
@@ -0,0 +1,697 @@
+/*
+ * Copyright (c) 2007-2011 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file va_enc_h264.h
+ * \brief The H.264 encoding API
+ *
+ * This file contains the \ref api_enc_h264 "H.264 encoding API".
+ */
+
+#ifndef VA_ENC_H264_H
+#define VA_ENC_H264_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <va/va_enc.h>
+
+/**
+ * \defgroup api_enc_h264 H.264 encoding API
+ *
+ * @{
+ */
+
+/**
+ * @name Picture flags
+ *
+ * Those flags flags are meant to signal when a picture marks the end
+ * of a sequence, a stream, or even both at once.
+ *
+ * @{
+ */
+/**
+ * \brief Marks the last picture in the sequence.
+ *
+ * i.e. the driver appends \c end_of_seq() NAL unit to the encoded frame.
+ */
+#define H264_LAST_PICTURE_EOSEQ 0x01
+/**
+ * \brief Marks the last picture in the stream.
+ *
+ * i.e. the driver appends \c end_of_stream() NAL unit to the encoded frame.
+ */
+#define H264_LAST_PICTURE_EOSTREAM 0x02
+/**@}*/
+
+/**
+ * \brief Packed header types specific to H.264 encoding.
+ *
+ * Types of packed headers generally used for H.264 encoding. Each
+ * associated packed header data buffer shall contain the start code
+ * prefix 0x000001 followed by the complete NAL unit, thus also
+ * including the \c nal_unit_type.
+ *
+ * Note: the start code prefix can contain an arbitrary number of leading
+ * zeros. The driver will skip them for emulation prevention bytes insertion,
+ * if necessary.
+ */
+typedef enum {
+ /**
+ * \brief Packed Sequence Parameter Set (SPS).
+ *
+ * The corresponding packed header data buffer shall contain the
+ * complete seq_parameter_set_rbsp() syntax element.
+ *
+ * Note: packed \c nal_unit_type shall be equal to 7.
+ */
+ VAEncPackedHeaderH264_SPS = VAEncPackedHeaderSequence,
+ /**
+ * \brief Packed Picture Parameter Set (PPS).
+ *
+ * The corresponding packed header data buffer shall contain the
+ * complete pic_parameter_set_rbsp() syntax element.
+ *
+ * Note: packed \c nal_unit_type shall be equal to 8.
+ */
+ VAEncPackedHeaderH264_PPS = VAEncPackedHeaderPicture,
+ /**
+ * \brief Packed slice header.
+ *
+ * The corresponding packed header data buffer shall contain the
+ * \c slice_header() syntax element only, along with any start
+ * code prefix and NAL unit type preceeding it. i.e. this means
+ * that the buffer does not contain any of the \c slice_data() or
+ * the \c rbsp_slice_trailing_bits().
+ *
+ * Note: packed \c nal_unit_type shall be equal to 1 (non-IDR
+ * picture), or 5 (IDR picture).
+ */
+ VAEncPackedHeaderH264_Slice = VAEncPackedHeaderSlice,
+ /**
+ * \brief Packed Supplemental Enhancement Information (SEI).
+ *
+ * The corresponding packed header data buffer shall contain the
+ * complete sei_rbsp() syntax element, thus including several
+ * sei_message() elements if necessary.
+ *
+ * Note: packed \c nal_unit_type shall be equal to 6.
+ */
+ VAEncPackedHeaderH264_SEI = (VAEncPackedHeaderMiscMask | 1),
+} VAEncPackedHeaderTypeH264;
+
+/**
+ * \brief Sequence parameter for H.264 encoding in main & high profiles.
+ *
+ * This structure holds information for \c seq_parameter_set_data() as
+ * defined by the H.264 specification.
+ *
+ * If packed sequence headers mode is used, i.e. if the encoding
+ * pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE
+ * flag, then the driver expects two more buffers to be provided to
+ * the same \c vaRenderPicture() as this buffer:
+ * - a #VAEncPackedHeaderParameterBuffer with type set to
+ * VAEncPackedHeaderType::VAEncPackedHeaderSequence ;
+ * - a #VAEncPackedHeaderDataBuffer which holds the actual packed
+ * header data.
+ *
+ * If \c seq_scaling_matrix_present_flag is set to \c 1, then a
+ * #VAIQMatrixBufferH264 buffer shall also be provided within the same
+ * \c vaRenderPicture() call as this sequence parameter buffer.
+ */
+typedef struct _VAEncSequenceParameterBufferH264 {
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char seq_parameter_set_id;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char level_idc;
+ /** \brief Period between I frames. */
+ unsigned int intra_period;
+ /** \brief Period between IDR frames. */
+ unsigned int intra_idr_period;
+ /** \brief Period between I/P frames. */
+ unsigned int ip_period;
+ /**
+ * \brief Initial bitrate set for this sequence in CBR or VBR modes.
+ *
+ * This field represents the initial bitrate value for this
+ * sequence if CBR or VBR mode is used, i.e. if the encoder
+ * pipeline was created with a #VAConfigAttribRateControl
+ * attribute set to either \ref VA_RC_CBR or \ref VA_RC_VBR.
+ *
+ * The bitrate can be modified later on through
+ * #VAEncMiscParameterRateControl buffers.
+ */
+ unsigned int bits_per_second;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int max_num_ref_frames;
+ /** \brief Picture width in macroblocks. */
+ unsigned short picture_width_in_mbs;
+ /** \brief Picture height in macroblocks. */
+ unsigned short picture_height_in_mbs;
+
+ union {
+ struct {
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int chroma_format_idc : 2;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int frame_mbs_only_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int mb_adaptive_frame_field_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int seq_scaling_matrix_present_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int direct_8x8_inference_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int log2_max_frame_num_minus4 : 4;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int pic_order_cnt_type : 2;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int log2_max_pic_order_cnt_lsb_minus4 : 4;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int delta_pic_order_always_zero_flag : 1;
+ } bits;
+ unsigned int value;
+ } seq_fields;
+
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char bit_depth_luma_minus8;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char bit_depth_chroma_minus8;
+
+ /** if pic_order_cnt_type == 1 */
+ /**@{*/
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char num_ref_frames_in_pic_order_cnt_cycle;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ int offset_for_non_ref_pic;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ int offset_for_top_to_bottom_field;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ int offset_for_ref_frame[256];
+ /**@}*/
+
+ /** @name Cropping (optional) */
+ /**@{*/
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char frame_cropping_flag;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int frame_crop_left_offset;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int frame_crop_right_offset;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int frame_crop_top_offset;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int frame_crop_bottom_offset;
+ /**@}*/
+
+ /** @name VUI parameters (optional) */
+ /**@{*/
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char vui_parameters_present_flag;
+ union {
+ struct {
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int aspect_ratio_info_present_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int timing_info_present_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int bitstream_restriction_flag : 1;
+ /** \brief Range: 0 to 16, inclusive. */
+ unsigned int log2_max_mv_length_horizontal : 5;
+ /** \brief Range: 0 to 16, inclusive. */
+ unsigned int log2_max_mv_length_vertical : 5;
+ } bits;
+ unsigned int value;
+ } vui_fields;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char aspect_ratio_idc;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int sar_width;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int sar_height;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int num_units_in_tick;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int time_scale;
+ /**@}*/
+} VAEncSequenceParameterBufferH264;
+
+/**
+ * \brief Picture parameter for H.264 encoding in main & high profiles.
+ *
+ * This structure holds information for \c pic_parameter_set_rbsp() as
+ * defined by the H.264 specification.
+ *
+ * If packed picture headers mode is used, i.e. if the encoding
+ * pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE
+ * flag, then the driver expects two more buffers to be provided to
+ * the same \c vaRenderPicture() as this buffer:
+ * - a #VAEncPackedHeaderParameterBuffer with type set to
+ * VAEncPackedHeaderType::VAEncPackedHeaderPicture ;
+ * - a #VAEncPackedHeaderDataBuffer which holds the actual packed
+ * header data.
+ *
+ * If \c pic_scaling_matrix_present_flag is set to \c 1, then a
+ * #VAIQMatrixBufferH264 buffer shall also be provided within the same
+ * \c vaRenderPicture() call as this picture parameter buffer.
+ */
+typedef struct _VAEncPictureParameterBufferH264 {
+ /**
+ * \brief Information about the picture to be encoded.
+ *
+ * See #VAPictureH264 for further description of each field.
+ * Note that CurrPic.picture_id represents the reconstructed
+ * (decoded) picture. User provides a scratch VA surface ID here.
+ */
+ VAPictureH264 CurrPic;
+ /**
+ * \brief Decoded Picture Buffer (DPB).
+ *
+ * This array represents the list of reconstructed (decoded)
+ * frames used as reference. It is important to keep track of
+ * reconstructed frames so that they can be used later on as
+ * reference for P or B-frames encoding.
+ */
+ VAPictureH264 ReferenceFrames[16];
+ /**
+ * \brief Output encoded bitstream.
+ *
+ * \ref coded_buf has type #VAEncCodedBufferType. It should be
+ * large enough to hold the compressed NAL slice and possibly SPS
+ * and PPS NAL units.
+ */
+ VABufferID coded_buf;
+
+ /** \brief The picture parameter set referred to in the slice header. */
+ unsigned char pic_parameter_set_id;
+ /** \brief The active sequence parameter set. Range: 0 to 31, inclusive. */
+ unsigned char seq_parameter_set_id;
+
+ /**
+ * \brief OR'd flags describing whether the picture is the last one or not.
+ *
+ * This fields holds 0 if the picture to be encoded is not the last
+ * one in the stream or sequence. Otherwise, it is a combination of
+ * \ref H264_LAST_PICTURE_EOSEQ or \ref H264_LAST_PICTURE_EOSTREAM.
+ */
+ unsigned char last_picture;
+
+ /** \brief The picture identifier.
+ * Range: 0 to \f$2^{log2\_max\_frame\_num\_minus4 + 4} - 1\f$, inclusive.
+ */
+ unsigned short frame_num;
+
+ /** \brief \c pic_init_qp_minus26 + 26. */
+ unsigned char pic_init_qp;
+ /** \brief Maximum reference index for reference picture list 0.
+ * Range: 0 to 31, inclusive.
+ */
+ unsigned char num_ref_idx_l0_active_minus1;
+ /** \brief Maximum reference index for reference picture list 1.
+ * Range: 0 to 31, inclusive.
+ */
+ unsigned char num_ref_idx_l1_active_minus1;
+
+ /** \brief Range: -12 to 12, inclusive. */
+ signed char chroma_qp_index_offset;
+ /** \brief Range: -12 to 12, inclusive. */
+ signed char second_chroma_qp_index_offset;
+
+ union {
+ struct {
+ /** \brief Is picture an IDR picture? */
+ unsigned int idr_pic_flag : 1;
+ /** \brief Is picture a reference picture? */
+ unsigned int reference_pic_flag : 2;
+ /** \brief Selects CAVLC (0) or CABAC (1) entropy coding mode. */
+ unsigned int entropy_coding_mode_flag : 1;
+ /** \brief Is weighted prediction applied to P slices? */
+ unsigned int weighted_pred_flag : 1;
+ /** \brief Range: 0 to 2, inclusive. */
+ unsigned int weighted_bipred_idc : 2;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int constrained_intra_pred_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int transform_8x8_mode_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int deblocking_filter_control_present_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int redundant_pic_cnt_present_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int pic_order_present_flag : 1;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned int pic_scaling_matrix_present_flag : 1;
+ } bits;
+ unsigned int value;
+ } pic_fields;
+} VAEncPictureParameterBufferH264;
+
+/**
+ * \brief Slice parameter for H.264 encoding in main & high profiles.
+ *
+ * This structure holds information for \c
+ * slice_layer_without_partitioning_rbsp() as defined by the H.264
+ * specification.
+ *
+ * If packed slice headers mode is used, i.e. if the encoding
+ * pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE
+ * flag, then the driver expects two more buffers to be provided to
+ * the same \c vaRenderPicture() as this buffer:
+ * - a #VAEncPackedHeaderParameterBuffer with type set to
+ * VAEncPackedHeaderType::VAEncPackedHeaderSlice ;
+ * - a #VAEncPackedHeaderDataBuffer which holds the actual packed
+ * header data.
+ *
+ * If per-macroblock encoder configuration is needed, \c macroblock_info
+ * references a buffer of type #VAEncMacroblockParameterBufferH264. This
+ * buffer is not passed to vaRenderPicture(). i.e. it is not destroyed
+ * by subsequent calls to vaRenderPicture() and then can be re-used
+ * without re-allocating the whole buffer.
+ */
+typedef struct _VAEncSliceParameterBufferH264 {
+ /** \brief Starting MB address for this slice. */
+ unsigned int macroblock_address;
+ /** \brief Number of macroblocks in this slice. */
+ unsigned int num_macroblocks;
+ /**
+ * \brief Per-MB encoder configuration buffer, or \c VA_INVALID_ID.
+ *
+ * If per-MB encoder configuration is needed, then \ref macroblock_info
+ * references a buffer of type #VAEncMacroblockParameterBufferH264
+ * (\c VAEncMacroblockParameterBufferType). Otherwise, buffer id
+ * is set to \c VA_INVALID_ID and per-MB configuration is derived
+ * from this slice parameter.
+ *
+ * The \c macroblock_info buffer must hold \ref num_macroblocks
+ * elements.
+ */
+ VABufferID macroblock_info;
+ /** \brief Slice type.
+ * Range: 0..2, 5..7, i.e. no switching slices.
+ */
+ unsigned char slice_type;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char pic_parameter_set_id;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned short idr_pic_id;
+
+ /** @name If pic_order_cnt_type == 0 */
+ /**@{*/
+ /** \brief The picture order count modulo MaxPicOrderCntLsb. */
+ unsigned short pic_order_cnt_lsb;
+ /** \brief Valid if \c pic_order_present_flag and this is a bottom field. */
+ int delta_pic_order_cnt_bottom;
+ /**@}*/
+ /** @name If pic_order_cnt_type == 1 && !delta_pic_order_always_zero_flag */
+ /**@{*/
+ /** \brief [0]: top, [1]: bottom. */
+ int delta_pic_order_cnt[2];
+ /**@}*/
+
+ /** @name If slice_type == B */
+ /**@{*/
+ unsigned char direct_spatial_mv_pred_flag;
+ /**@}*/
+
+ /** @name If slice_type == P */
+ /**@{*/
+ /** \brief Specifies if
+ * \ref _VAEncPictureParameterBufferH264::num_ref_idx_l0_active_minus1 or
+ * \ref _VAEncPictureParameterBufferH264::num_ref_idx_l1_active_minus1 are
+ * overriden by the values for this slice.
+ */
+ unsigned char num_ref_idx_active_override_flag;
+ /** \brief Maximum reference index for reference picture list 0.
+ * Range: 0 to 31, inclusive.
+ */
+ unsigned char num_ref_idx_l0_active_minus1;
+ /** \brief Maximum reference index for reference picture list 1.
+ * Range: 0 to 31, inclusive.
+ */
+ unsigned char num_ref_idx_l1_active_minus1;
+ /** \brief Reference picture list 0 (for P slices). */
+ VAPictureH264 RefPicList0[32];
+ /** \brief Reference picture list 1 (for B slices). */
+ VAPictureH264 RefPicList1[32];
+ /**@}*/
+
+ /** @name pred_weight_table() */
+ /**@{*/
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char luma_log2_weight_denom;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char chroma_log2_weight_denom;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char luma_weight_l0_flag;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed short luma_weight_l0[32];
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed short luma_offset_l0[32];
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char chroma_weight_l0_flag;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed short chroma_weight_l0[32][2];
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed short chroma_offset_l0[32][2];
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char luma_weight_l1_flag;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed short luma_weight_l1[32];
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed short luma_offset_l1[32];
+ /** \brief Same as the H.264 bitstream syntax element. */
+ unsigned char chroma_weight_l1_flag;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed short chroma_weight_l1[32][2];
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed short chroma_offset_l1[32][2];
+ /**@}*/
+
+ /** \brief Range: 0 to 2, inclusive. */
+ unsigned char cabac_init_idc;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed char slice_qp_delta;
+ /** @name If deblocking_filter_control_present_flag */
+ /**@{*/
+ /** \brief Range: 0 to 2, inclusive. */
+ unsigned char disable_deblocking_filter_idc;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed char slice_alpha_c0_offset_div2;
+ /** \brief Same as the H.264 bitstream syntax element. */
+ signed char slice_beta_offset_div2;
+ /**@}*/
+} VAEncSliceParameterBufferH264;
+
+/**
+ * @name Macroblock neighbour availability bits
+ *
+ * \anchor api_enc_h264_mb_pred_avail_bits
+ * Definitions for macroblock neighbour availability bits used in
+ * intra prediction mode (non MBAFF only).
+ *
+ * @{
+ */
+/** \brief References macroblock in the top-left corner. */
+#define VA_MB_PRED_AVAIL_TOP_LEFT (1 << 2)
+/** \brief References macroblock above the current macroblock. */
+#define VA_MB_PRED_AVAIL_TOP (1 << 4)
+/** \brief References macroblock in the top-right corner. */
+#define VA_MB_PRED_AVAIL_TOP_RIGHT (1 << 3)
+/** \brief References macroblock on the left of the current macroblock. */
+#define VA_MB_PRED_AVAIL_LEFT (1 << 6)
+/**@}*/
+
+/**
+ * \brief Macroblock parameter for H.264 encoding in main & high profiles.
+ *
+ * This structure holds per-macroblock information. The buffer must be
+ * allocated with as many elements (macroblocks) as necessary to fit
+ * the slice to be encoded. Besides, the per-macroblock records must
+ * be written in a strict raster order and with no gap. i.e. every
+ * macroblock, regardless of its type, shall have an entry.
+ */
+typedef struct _VAEncMacroblockParameterBufferH264 {
+ /**
+ * \brief Quantization parameter.
+ *
+ * Requested quantization parameter. Range: 0 to 51, inclusive.
+ * If \ref qp is set to 0xff, then the actual value is derived
+ * from the slice-level value: \c pic_init_qp + \c slice_qp_delta.
+ */
+ unsigned char qp;
+
+ union {
+ /** @name Data for intra macroblock */
+ /**@{*/
+ struct {
+ union {
+ /**
+ * \brief Flag specified to override MB neighbour
+ * availability bits from VME stage.
+ *
+ * This flag specifies that macroblock neighbour
+ * availability bits from the VME stage are overriden
+ * by the \ref pred_avail_flags hereunder.
+ */
+ unsigned int pred_avail_override_flag : 1;
+ /**
+ * \brief Bitwise representation of which macroblocks
+ * are available for intra prediction.
+ *
+ * If the slice is intra-coded, this field represents
+ * the macroblocks available for intra prediction.
+ * See \ref api_enc_h264_mb_pred_avail_bits
+ * "macroblock neighbour availability" bit definitions.
+ */
+ unsigned int pred_avail_flags : 8;
+ } bits;
+ unsigned int value;
+ } intra_fields;
+ /**@}*/
+
+ /** @name Data for inter macroblock */
+ /**@{*/
+ struct {
+ union {
+ } bits;
+ unsigned int value;
+ } inter_fields;
+ /**@}*/
+ } info;
+} VAEncMacroblockParameterBufferH264;
+
+/** \brief Bitstream writer attribute types specific to H.264 encoding. */
+typedef enum {
+ /**
+ * \brief Flag: specifies whether to insert emulation prevention
+ * bytes (integer).
+ */
+ VAEncBitstreamAttribEmulationPreventionH264 = (
+ VAEncBitstreamAttribMiscMask | 1),
+} VAEncBitstreamAttribTypeH264;
+
+typedef struct _VAEncPictureParameterBufferH264MVC {
+ /**
+ * \brief Regular H.264 picture parameters
+ *
+ */
+ VAEncPictureParameterBufferH264 base_picture_param;
+ /**
+ * \brief view id associated with this picture
+ *
+ */
+ unsigned int view_id;
+ /**
+ * \brief same as H.264 MVC syntax element
+ *
+ */
+ unsigned char anchor_picture_flag;
+ /**
+ * \brief same as H.264 MVC syntax element
+ *
+ */
+ unsigned char inter_view_flag;
+
+ /**
+ * \brief Specifies view_id of each element in ReferenceFrames[16]
+ *
+ */
+ unsigned int view_id_dpb[16];
+
+} VAEncPictureParameterBufferH264MVC;
+
+/**
+ * \brief Allocates a new H.264 bitstream writer.
+ *
+ * Allocates a new bitstream writer. By default, libva allocates and
+ * maintains its own buffer. However, the user can pass down his own
+ * buffer with the \c VAEncBitstreamAttribBuffer attribute, along with
+ * the size of that buffer with the \c VAEncBitstreamAttribBufferSize
+ * attribute.
+ *
+ * By default, emulation prevention bytes are not inserted. However,
+ * the user can still request emulation prevention by setting the
+ * \c VAEncBitstreamAttribEmulationPreventionH264 attribute to 1.
+ *
+ * @param[in] attribs the optional attributes, or NULL
+ * @param[in] num_attribs the number of attributes available in \c attribs
+ * @return a new #VAEncBitstream, or NULL if an error occurred
+ */
+VAEncBitstream *
+va_enc_bitstream_h264_new(
+ VAEncBitstreamAttrib *attribs,
+ unsigned int num_attribs
+);
+
+/**
+ * \brief Destroys an H.264 bitstream writer.
+ *
+ * @param[in] bs the bitstream writer to destroy
+ */
+void
+va_enc_bitstream_h264_destroy(VAEncBitstream *bs);
+
+/**
+ * \brief Writes an unsigned integer as \c ue(v).
+ *
+ * Writes a 32-bit unsigned int value by following \c ue(v) from the
+ * H.264 specification.
+ *
+ * @param[in] bs the bitstream writer
+ * @param[in] value the unsigned int value
+ * @return the number of bits written, or a negative value to indicate an error
+ */
+int
+va_enc_bitstream_h264_write_ue(VAEncBitstream *bs, unsigned int value);
+
+/**
+ * \brief Writes a signed integer as \c se(v).
+ *
+ * Writes a 32-bit signed int value by following \c se(v) from the
+ * H.264 specification.
+ *
+ * @param[in] bs the bitstream writer
+ * @param[in] value the signed int value
+ * @return the number of bits written, or a negative value to indicate an error
+ */
+int
+va_enc_bitstream_h264_write_se(VAEncBitstream *bs, int value);
+
+/**
+ * \brief Helper function to write trailing bits into the bitstream.
+ *
+ * @param[in] bs the bitstream writer
+ * @return the number of bits written, or a negative value to indicate an error
+ */
+int
+va_enc_bitstream_h264_write_trailing_bits(VAEncBitstream *bs);
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VA_ENC_H264_H */
diff --git a/va/va_fool.c b/va/va_fool.c
index 2f8f1e5..807307e 100644
--- a/va/va_fool.c
+++ b/va/va_fool.c
@@ -262,9 +262,9 @@ static int va_FoolFillCodedBufEnc(int idx)
/* try file_name.file_count, if fail, try file_name.file_count-- */
for (i=0; i<=1; i++) {
- snprintf(file_name, "%s.%d",
+ sprintf(file_name, "%s.%d",
fool_context[idx].fn_enc,
- fool_context[idx].file_count, 1024);
+ fool_context[idx].file_count);
if ((fd = open(file_name, O_RDONLY)) != -1) {
fstat(fd, &file_stat);
diff --git a/va/va_tpi.c b/va/va_tpi.c
index 5451f70..6b67bbe 100644
--- a/va/va_tpi.c
+++ b/va/va_tpi.c
@@ -39,122 +39,18 @@
#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; }
-/* Wrap a CI (camera imaging) frame as a VA surface to share captured video between camear
- * and VA encode. With frame_id, VA driver need to call CI interfaces to get the information
- * of the frame, and to determine if the frame can be wrapped as a VA surface
- *
- * Application should make sure the frame is idle before the frame is passed into VA stack
- * and also a vaSyncSurface should be called before application tries to access the frame
- * from CI stack
- */
-VAStatus vaCreateSurfaceFromCIFrame (
- VADisplay dpy,
- unsigned long frame_id,
- VASurfaceID *surface /* out */
-)
-{
- VADriverContextP ctx;
- struct VADriverVTableTPI *tpi;
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
-
- tpi = ( struct VADriverVTableTPI *)ctx->vtable_tpi;
- if (tpi && tpi->vaCreateSurfaceFromCIFrame) {
- return tpi->vaCreateSurfaceFromCIFrame( ctx, frame_id, surface );
- } else
- return VA_STATUS_ERROR_UNIMPLEMENTED;
-
-}
-
-/* Wrap a V4L2 buffer as a VA surface, so that V4L2 camera, VA encode
- * can share the data without copy
- * The VA driver should query the camera device from v4l2_fd to see
- * if camera device memory/buffer can be wrapped into a VA surface
- * Buffer information is passed in by v4l2_fmt and v4l2_buf structure,
- * VA driver also needs do further check if the buffer can meet encode
- * hardware requirement, such as dimension, fourcc, stride, etc
- *
- * Application should make sure the buffer is idle before the frame into VA stack
- * and also a vaSyncSurface should be called before application tries to access the frame
- * from V4L2 stack
- */
-VAStatus vaCreateSurfaceFromV4L2Buf(
- VADisplay dpy,
- int v4l2_fd, /* file descriptor of V4L2 device */
- struct v4l2_format *v4l2_fmt, /* format of V4L2 */
- struct v4l2_buffer *v4l2_buf, /* V4L2 buffer */
- VASurfaceID *surface /* out */
-)
-{
- VADriverContextP ctx;
- struct VADriverVTableTPI *tpi;
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
-
- tpi = ( struct VADriverVTableTPI *)ctx->vtable_tpi;
- if (tpi && tpi->vaCreateSurfaceFromV4L2Buf) {
- return tpi->vaCreateSurfaceFromV4L2Buf( ctx, v4l2_fd, v4l2_fmt, v4l2_buf, surface );
- } else
- return VA_STATUS_ERROR_UNIMPLEMENTED;
-}
-
/*
- * The surfaces could be shared and accessed with extern devices
- * which has special requirements, e.g. stride alignment
- * This API is used to force libVA video surfaces are allocated
- * according to these external requirements
- * Special API for V4L2 user pointer support
+ * Create surfaces with special inputs/requirements
*/
-VAStatus vaCreateSurfacesForUserPtr(
- VADisplay dpy,
- int width,
- int height,
- int format,
- int num_surfaces,
- VASurfaceID *surfaces, /* out */
- unsigned size, /* total buffer size need to be allocated */
- unsigned int fourcc, /* expected fourcc */
- unsigned int luma_stride, /* luma stride, could be width aligned with a special value */
- unsigned int chroma_u_stride, /* chroma stride */
- unsigned int chroma_v_stride,
- unsigned int luma_offset, /* could be 0 */
- unsigned int chroma_u_offset, /* UV offset from the beginning of the memory */
- unsigned int chroma_v_offset
-)
-{
- VADriverContextP ctx;
- struct VADriverVTableTPI *tpi;
- CHECK_DISPLAY(dpy);
- ctx = CTX(dpy);
-
- tpi = (struct VADriverVTableTPI *)ctx->vtable_tpi;
- if (tpi && tpi->vaCreateSurfacesForUserPtr) {
- return tpi->vaCreateSurfacesForUserPtr( ctx, width, height, format, num_surfaces,
- surfaces,size, fourcc, luma_stride, chroma_u_stride,
- chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset );
- } else
- return VA_STATUS_ERROR_UNIMPLEMENTED;
-}
-
-/*
- * Create surface from the Kernel buffer
- */
-VAStatus vaCreateSurfaceFromKBuf(
- VADisplay dpy,
- int width,
- int height,
- int format,
- VASurfaceID *surface, /* out */
- unsigned int kbuf_handle, /* kernel buffer handle*/
- unsigned size, /* kernel buffer size */
- unsigned int kBuf_fourcc, /* expected fourcc */
- unsigned int luma_stride, /* luma stride, could be width aligned with a special value */
- unsigned int chroma_u_stride, /* chroma stride */
- unsigned int chroma_v_stride,
- unsigned int luma_offset, /* could be 0 */
- unsigned int chroma_u_offset, /* UV offset from the beginning of the memory */
- unsigned int chroma_v_offset
+VAStatus vaCreateSurfacesWithAttribute (
+ VADisplay dpy,
+ int width,
+ int height,
+ int format,
+ int num_surfaces,
+ VASurfaceID *surfaces, /* out */
+ VASurfaceAttributeTPI *attribute_tpi
)
{
VADriverContextP ctx;
@@ -163,10 +59,8 @@ VAStatus vaCreateSurfaceFromKBuf(
ctx = CTX(dpy);
tpi = (struct VADriverVTableTPI *)ctx->vtable_tpi;
- if (tpi && tpi->vaCreateSurfaceFromKBuf) {
- return tpi->vaCreateSurfaceFromKBuf( ctx, width, height, format, surface, kbuf_handle,
- size, kBuf_fourcc, luma_stride, chroma_u_stride,
- chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset );
+ if (tpi && tpi->vaCreateSurfacesWithAttribute) {
+ return tpi->vaCreateSurfacesWithAttribute( ctx, width, height, format, num_surfaces, surfaces, attribute_tpi);
} else
return VA_STATUS_ERROR_UNIMPLEMENTED;
}
@@ -198,7 +92,7 @@ VAStatus vaPutSurfaceBuf (
tpi = ( struct VADriverVTableTPI *)ctx->vtable_tpi;
if (tpi && tpi->vaPutSurfaceBuf) {
return tpi->vaPutSurfaceBuf( ctx, surface, data, data_len, srcx, srcy, srcw, srch,
- destx, desty, destw, desth, cliprects, number_cliprects, flags );
+ destx, desty, destw, desth, cliprects, number_cliprects, flags );
} else
return VA_STATUS_ERROR_UNIMPLEMENTED;
}
diff --git a/va/va_tpi.h b/va/va_tpi.h
index 060d387..f05f08a 100644
--- a/va/va_tpi.h
+++ b/va/va_tpi.h
@@ -21,34 +21,51 @@
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifndef _VA_TPI_H_
+#define _VA_TPI_H_
-/* Wrap a CI (camera imaging) frame as a VA surface to share captured video between camear
- * and VA encode. With frame_id, VA driver need to call CI interfaces to get the information
- * of the frame, and to determine if the frame can be wrapped as a VA surface
- *
- * Application should make sure the frame is idle before the frame is passed into VA stack
- * and also a vaSyncSurface should be called before application tries to access the frame
- * from CI stack
- */
#include <va/va.h>
#ifdef __cplusplus
extern "C" {
#endif
-VAStatus vaCreateSurfaceFromCIFrame (
- VADisplay dpy,
- unsigned long frame_id,
- VASurfaceID *surface /* out */
-);
-VAStatus vaCreateSurfaceFromV4L2Buf(
- VADisplay dpy,
- int v4l2_fd, /* file descriptor of V4L2 device */
- struct v4l2_format *v4l2_fmt, /* format of V4L2 */
- struct v4l2_buffer *v4l2_buf, /* V4L2 buffer */
- VASurfaceID *surface /* out */
-);
+typedef enum {
+ VAExternalMemoryNULL, /* it is not external buffer, but requires the implementation allocates
+ * the surface with the input attribute
+ */
+ VAExternalMemoryV4L2Buffer,
+ VAExternalMemoryCIFrame, /* the memory is from camera frames and buffers points the frame ID list */
+ VAExternalMemoryUserPointer, /* the memory is malloc-ed and buffers points to the buffers */
+ VAExternalMemoryKernelDRMBufffer, /* the memory is from kernel DRM buffers and buffers points the
+ * DRM buffer handle list
+ */
+ VAExternalMemoryAndroidGrallocBuffer, /* the memory is from Android Gralloc memory, and buffers points
+ * the gralloc native_handle_t list
+ */
+} VASurfaceMemoryType;
+
+typedef struct _VASurfaceAttributeTPI {
+ VASurfaceMemoryType type;
+ unsigned int width;
+ unsigned int height;
+ unsigned int size;
+ unsigned int pixel_format; /* buffer format */
+ unsigned int tiling; /* the memory is tiling or not */
+ unsigned int luma_stride; /* luma stride, could be width aligned with a special value */
+ unsigned int chroma_u_stride; /* chroma stride */
+ unsigned int chroma_v_stride;
+ unsigned int luma_offset; /* could be 0 */
+ unsigned int chroma_u_offset; /* U offset from the beginning of the memory */
+ unsigned int chroma_v_offset; /* V offset from the beginning of the memory */
+ unsigned int count; /* buffer count for surface creation */
+ unsigned int *buffers; /* buffer handles or user pointers */
+ unsigned int reserved[4]; /* used to pass additional information, like
+ * Android native window pointer
+ */
+} VASurfaceAttributeTPI;
+
VAStatus vaPutSurfaceBuf (
VADisplay dpy,
@@ -68,58 +85,25 @@ VAStatus vaPutSurfaceBuf (
unsigned int flags /* de-interlacing flags */
);
-
-/*
- * The surfaces could be shared and accessed with extern devices
- * which has special requirements, e.g. stride alignment
- * This API is used to force libVA video surfaces are allocated
- * according to these external requirements
- * Special API for V4L2 user pointer support
- */
-VAStatus vaCreateSurfacesForUserPtr(
+VAStatus vaSetTimestampForSurface(
VADisplay dpy,
- int width,
- int height,
- int format,
- int num_surfaces,
- VASurfaceID *surfaces, /* out */
- unsigned size, /* total buffer size need to be allocated */
- unsigned int fourcc, /* expected fourcc */
- unsigned int luma_stride, /* luma stride, could be width aligned with a special value */
- unsigned int chroma_u_stride, /* chroma stride */
- unsigned int chroma_v_stride,
- unsigned int luma_offset, /* could be 0 */
- unsigned int chroma_u_offset, /* UV offset from the beginning of the memory */
- unsigned int chroma_v_offset
+ VASurfaceID surface,
+ long long timestamp
);
-/*
- * Create surface from the Kernel buffer
- */
-VAStatus vaCreateSurfaceFromKBuf(
+
+VAStatus vaCreateSurfacesWithAttribute (
VADisplay dpy,
int width,
int height,
int format,
- VASurfaceID *surface, /* out */
- unsigned int kbuf_handle, /* kernel buffer handle*/
- unsigned size, /* kernel buffer size */
- unsigned int kBuf_fourcc, /* expected fourcc */
- unsigned int luma_stride, /* luma stride, could be width aligned with a special value */
- unsigned int chroma_u_stride, /* chroma stride */
- unsigned int chroma_v_stride,
- unsigned int luma_offset, /* could be 0 */
- unsigned int chroma_u_offset, /* UV offset from the beginning of the memory */
- unsigned int chroma_v_offset
-);
-
-VAStatus vaSetTimestampForSurface(
- VADisplay dpy,
- VASurfaceID surface,
- long long timestamp
+ int num_surfaces,
+ VASurfaceID *surfaces, /* out */
+ VASurfaceAttributeTPI *attribute_tpi
);
-
#ifdef __cplusplus
}
#endif
+
+#endif
diff --git a/va/va_trace.c b/va/va_trace.c
index 29addf0..3e0fc8c 100755
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -24,8 +24,10 @@
#define _GNU_SOURCE 1
#include "va.h"
+#include "va_enc_h264.h"
#include "va_backend.h"
#include "va_trace.h"
+#include "va_enc_h264.h"
#include <assert.h>
#include <stdarg.h>
@@ -488,15 +490,16 @@ void va_TraceCreateConfig(
}
}
-void va_TraceCreateSurface(
+
+void va_TraceCreateSurfaces(
VADisplay dpy,
int width,
int height,
int format,
int num_surfaces,
- VASurfaceID *surfaces, /* out */
- VASurfaceAttrib *attrib_list,
- int num_attribs
+ VASurfaceID *surfaces, /* out */
+ VASurfaceAttrib *attrib_list,
+ unsigned int num_attribs
)
{
int i;
@@ -1154,22 +1157,52 @@ static void va_TraceVAEncSequenceParameterBufferH264(
{
VAEncSequenceParameterBufferH264 *p = (VAEncSequenceParameterBufferH264 *)data;
DPY2INDEX(dpy);
-
+ int i;
+
va_TraceMsg(idx, "VAEncSequenceParameterBufferH264\n");
-
+
va_TraceMsg(idx, "\tseq_parameter_set_id = %d\n", p->seq_parameter_set_id);
va_TraceMsg(idx, "\tlevel_idc = %d\n", p->level_idc);
va_TraceMsg(idx, "\tintra_period = %d\n", p->intra_period);
va_TraceMsg(idx, "\tintra_idr_period = %d\n", p->intra_idr_period);
+ va_TraceMsg(idx, "\tip_period = %d\n", p->ip_period);
+ va_TraceMsg(idx, "\tbits_per_second = %d\n", p->bits_per_second);
va_TraceMsg(idx, "\tmax_num_ref_frames = %d\n", p->max_num_ref_frames);
va_TraceMsg(idx, "\tpicture_width_in_mbs = %d\n", p->picture_width_in_mbs);
va_TraceMsg(idx, "\tpicture_height_in_mbs = %d\n", p->picture_height_in_mbs);
- va_TraceMsg(idx, "\tbits_per_second = %d\n", p->bits_per_second);
- va_TraceMsg(idx, "\tframe_rate = %d\n", p->frame_rate);
- va_TraceMsg(idx, "\tinitial_qp = %d\n", p->initial_qp);
- va_TraceMsg(idx, "\tmin_qp = %d\n", p->min_qp);
- va_TraceMsg(idx, "\tbasic_unit_size = %d\n", p->basic_unit_size);
- va_TraceMsg(idx, "\tvui_flag = %d\n", p->vui_flag);
+ va_TraceMsg(idx, "\tchroma_format_idc = %d\n", p->seq_fields.bits.chroma_format_idc);
+ va_TraceMsg(idx, "\tframe_mbs_only_flag = %d\n", p->seq_fields.bits.frame_mbs_only_flag);
+ va_TraceMsg(idx, "\tmb_adaptive_frame_field_flag = %d\n", p->seq_fields.bits.mb_adaptive_frame_field_flag);
+ va_TraceMsg(idx, "\tseq_scaling_matrix_present_flag = %d\n", p->seq_fields.bits.seq_scaling_matrix_present_flag);
+ va_TraceMsg(idx, "\tdirect_8x8_inference_flag = %d\n", p->seq_fields.bits.direct_8x8_inference_flag);
+ va_TraceMsg(idx, "\tlog2_max_frame_num_minus4 = %d\n", p->seq_fields.bits.log2_max_frame_num_minus4);
+ va_TraceMsg(idx, "\tpic_order_cnt_type = %d\n", p->seq_fields.bits.pic_order_cnt_type);
+ va_TraceMsg(idx, "\tlog2_max_pic_order_cnt_lsb_minus4 = %d\n", p->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4);
+ va_TraceMsg(idx, "\tdelta_pic_order_always_zero_flag = %d\n", p->seq_fields.bits.delta_pic_order_always_zero_flag);
+ va_TraceMsg(idx, "\tbit_depth_luma_minus8 = %d\n", p->bit_depth_luma_minus8);
+ va_TraceMsg(idx, "\tbit_depth_chroma_minus8 = %d\n", p->bit_depth_chroma_minus8);
+ va_TraceMsg(idx, "\tnum_ref_frames_in_pic_order_cnt_cycle = %d\n", p->num_ref_frames_in_pic_order_cnt_cycle);
+ va_TraceMsg(idx, "\toffset_for_non_ref_pic = %d\n", p->offset_for_non_ref_pic);
+ va_TraceMsg(idx, "\toffset_for_top_to_bottom_field = %d\n", p->offset_for_top_to_bottom_field);
+ for(i = 0; i< p->max_num_ref_frames; ++i)
+ va_TraceMsg(idx, "\toffset_for_ref_frame[%d] = %d\n", i, p->offset_for_ref_frame[i]);
+ va_TraceMsg(idx, "\tframe_cropping_flag = %d\n", p->frame_cropping_flag);
+ va_TraceMsg(idx, "\tframe_crop_left_offset = %d\n", p->frame_crop_left_offset);
+ va_TraceMsg(idx, "\tframe_crop_right_offset = %d\n", p->frame_crop_right_offset);
+ va_TraceMsg(idx, "\tframe_crop_top_offset = %d\n", p->frame_crop_top_offset);
+ va_TraceMsg(idx, "\tframe_crop_bottom_offset = %d\n", p->frame_crop_bottom_offset);
+ va_TraceMsg(idx, "\tvui_parameters_present_flag = %d\n", p->vui_parameters_present_flag);
+ va_TraceMsg(idx, "\taspect_ratio_info_present_flag = %d\n", p->vui_fields.bits.aspect_ratio_info_present_flag);
+ va_TraceMsg(idx, "\ttiming_info_present_flag = %d\n", p->vui_fields.bits.timing_info_present_flag);
+ va_TraceMsg(idx, "\tbitstream_restriction_flag = %d\n", p->vui_fields.bits.bitstream_restriction_flag);
+ va_TraceMsg(idx, "\tlog2_max_mv_length_horizontal = %d\n", p->vui_fields.bits.log2_max_mv_length_horizontal);
+ va_TraceMsg(idx, "\tlog2_max_mv_length_vertical = %d\n", p->vui_fields.bits.log2_max_mv_length_vertical);
+ va_TraceMsg(idx, "\taspect_ratio_idc = %d\n", p->aspect_ratio_idc);
+ va_TraceMsg(idx, "\tsar_width = %d\n", p->sar_width);
+ va_TraceMsg(idx, "\tsar_height = %d\n", p->sar_height);
+ va_TraceMsg(idx, "\tnum_units_in_tick = %d\n", p->num_units_in_tick);
+ va_TraceMsg(idx, "\ttime_scale = %d\n", p->time_scale);
+
va_TraceMsg(idx, NULL);
/* start a new sequce, coded log file can be truncated */
@@ -1178,6 +1211,7 @@ static void va_TraceVAEncSequenceParameterBufferH264(
return;
}
+
static void va_TraceVAEncPictureParameterBufferH264(
VADisplay dpy,
VAContextID context,
@@ -1189,22 +1223,57 @@ static void va_TraceVAEncPictureParameterBufferH264(
{
VAEncPictureParameterBufferH264 *p = (VAEncPictureParameterBufferH264 *)data;
DPY2INDEX(dpy);
-
+ int i;
+
va_TraceMsg(idx, "VAEncPictureParameterBufferH264\n");
- va_TraceMsg(idx, "\treference_picture = 0x%08x\n", p->reference_picture);
- va_TraceMsg(idx, "\treconstructed_picture = 0x%08x\n", p->reconstructed_picture);
+
+ va_TraceMsg(idx, "\tCurrPic.picture_id = 0x%08x\n", p->CurrPic.picture_id);
+ va_TraceMsg(idx, "\tCurrPic.frame_idx = %d\n", p->CurrPic.frame_idx);
+ va_TraceMsg(idx, "\tCurrPic.flags = %d\n", p->CurrPic.flags);
+ va_TraceMsg(idx, "\tCurrPic.TopFieldOrderCnt = %d\n", p->CurrPic.TopFieldOrderCnt);
+ va_TraceMsg(idx, "\tCurrPic.BottomFieldOrderCnt = %d\n", p->CurrPic.BottomFieldOrderCnt);
+ va_TraceMsg(idx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx:\n");
+ for (i = 0; i < 16; i++)
+ {
+ if (p->ReferenceFrames[i].flags != VA_PICTURE_H264_INVALID) {
+ va_TraceMsg(idx, "\t\t%d-%d-0x%08x-%d\n",
+ p->ReferenceFrames[i].TopFieldOrderCnt,
+ p->ReferenceFrames[i].BottomFieldOrderCnt,
+ p->ReferenceFrames[i].picture_id,
+ p->ReferenceFrames[i].frame_idx);
+ } else
+ va_TraceMsg(idx, "\t\tinv-inv-inv-inv\n");
+ }
va_TraceMsg(idx, "\tcoded_buf = %08x\n", p->coded_buf);
- va_TraceMsg(idx, "\tpicture_width = %d\n", p->picture_width);
- va_TraceMsg(idx, "\tpicture_height = %d\n", p->picture_height);
+ va_TraceMsg(idx, "\tpic_parameter_set_id = %d\n", p->pic_parameter_set_id);
+ va_TraceMsg(idx, "\tseq_parameter_set_id = %d\n", p->seq_parameter_set_id);
va_TraceMsg(idx, "\tlast_picture = 0x%08x\n", p->last_picture);
+ va_TraceMsg(idx, "\tframe_num = %d\n", p->frame_num);
+ va_TraceMsg(idx, "\tpic_init_qp = %d\n", p->pic_init_qp);
+ va_TraceMsg(idx, "\tnum_ref_idx_l0_active_minus1 = %d\n", p->num_ref_idx_l0_active_minus1);
+ va_TraceMsg(idx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1);
+ va_TraceMsg(idx, "\tchroma_qp_index_offset = %d\n", p->chroma_qp_index_offset);
+ va_TraceMsg(idx, "\tsecond_chroma_qp_index_offset = %d\n", p->second_chroma_qp_index_offset);
+ va_TraceMsg(idx, "\tpic_fields = 0x%03x\n", p->pic_fields.value);
+ va_TraceMsg(idx, "\tidr_pic_flag = %d\n", p->pic_fields.bits.idr_pic_flag);
+ va_TraceMsg(idx, "\treference_pic_flag = %d\n", p->pic_fields.bits.reference_pic_flag);
+ va_TraceMsg(idx, "\tentropy_coding_mode_flag = %d\n", p->pic_fields.bits.entropy_coding_mode_flag);
+ va_TraceMsg(idx, "\tweighted_pred_flag = %d\n", p->pic_fields.bits.weighted_pred_flag);
+ va_TraceMsg(idx, "\tweighted_bipred_idc = %d\n", p->pic_fields.bits.weighted_bipred_idc);
+ va_TraceMsg(idx, "\tconstrained_intra_pred_flag = %d\n", p->pic_fields.bits.constrained_intra_pred_flag);
+ va_TraceMsg(idx, "\ttransform_8x8_mode_flag = %d\n", p->pic_fields.bits.transform_8x8_mode_flag);
+ va_TraceMsg(idx, "\tdeblocking_filter_control_present_flag = %d\n", p->pic_fields.bits.deblocking_filter_control_present_flag);
+ va_TraceMsg(idx, "\tredundant_pic_cnt_present_flag = %d\n", p->pic_fields.bits.redundant_pic_cnt_present_flag);
+ va_TraceMsg(idx, "\tpic_order_present_flag = %d\n", p->pic_fields.bits.pic_order_present_flag);
+ va_TraceMsg(idx, "\tpic_scaling_matrix_present_flag = %d\n", p->pic_fields.bits.pic_scaling_matrix_present_flag);
+
va_TraceMsg(idx, NULL);
trace_context[idx].trace_codedbuf = p->coded_buf;
-
+
return;
}
-
static void va_TraceVAEncSliceParameterBuffer(
VADisplay dpy,
VAContextID context,
@@ -1230,6 +1299,99 @@ static void va_TraceVAEncSliceParameterBuffer(
return;
}
+static void va_TraceVAEncSliceParameterBufferH264(
+ VADisplay dpy,
+ VAContextID context,
+ VABufferID buffer,
+ VABufferType type,
+ unsigned int size,
+ unsigned int num_elements,
+ void *data)
+{
+ VAEncSliceParameterBufferH264* p = (VAEncSliceParameterBufferH264*)data;
+ DPY2INDEX(dpy);
+ int i;
+
+ va_TraceMsg(idx, "VAEncSliceParameterBufferH264\n");
+ va_TraceMsg(idx, "\tmacroblock_address = %d\n", p->macroblock_address);
+ va_TraceMsg(idx, "\tnum_macroblocks = %d\n", p->num_macroblocks);
+ va_TraceMsg(idx, "\tmacroblock_info = %08x\n", p->macroblock_info);
+ va_TraceMsg(idx, "\tslice_type = %d\n", p->slice_type);
+ va_TraceMsg(idx, "\tpic_parameter_set_id = %d\n", p->pic_parameter_set_id);
+ va_TraceMsg(idx, "\tidr_pic_id = %d\n", p->idr_pic_id);
+ va_TraceMsg(idx, "\tpic_order_cnt_lsb = %d\n", p->pic_order_cnt_lsb);
+ va_TraceMsg(idx, "\tdelta_pic_order_cnt_bottom = %d\n", p->delta_pic_order_cnt_bottom);
+ va_TraceMsg(idx, "\tdelta_pic_order_cnt[0] = %d\n", p->delta_pic_order_cnt[0]);
+ va_TraceMsg(idx, "\tdelta_pic_order_cnt[1] = %d\n", p->delta_pic_order_cnt[1]);
+ va_TraceMsg(idx, "\tdirect_spatial_mv_pred_flag = %d\n", p->direct_spatial_mv_pred_flag);
+ va_TraceMsg(idx, "\tnum_ref_idx_active_override_flag = %d\n", p->num_ref_idx_active_override_flag);
+ va_TraceMsg(idx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1);
+ va_TraceMsg(idx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
+
+ if (p->slice_type == 0 || p->slice_type == 1) {
+ va_TraceMsg(idx, "\tRefPicList0 =");
+ for (i = 0; i < p->num_ref_idx_l0_active_minus1 + 1; i++) {
+ va_TraceMsg(idx, "%d-%d-0x%08x-%d\n", p->RefPicList0[i].TopFieldOrderCnt, p->RefPicList0[i].BottomFieldOrderCnt, p->RefPicList0[i].picture_id, p->RefPicList0[i].frame_idx);
+ }
+ if (p->slice_type == 1) {
+ va_TraceMsg(idx, "\tRefPicList1 =");
+ for (i = 0; i < p->num_ref_idx_l1_active_minus1 + 1; i++)
+ {
+ va_TraceMsg(idx, "%d-%d-0x%08x-%d\n", p->RefPicList1[i].TopFieldOrderCnt, p->RefPicList1[i].BottomFieldOrderCnt, p->RefPicList1[i].picture_id, p->RefPicList1[i].frame_idx);
+ }
+ }
+ }
+
+ va_TraceMsg(idx, "\tluma_log2_weight_denom = %d\n", p->luma_log2_weight_denom);
+ va_TraceMsg(idx, "\tchroma_log2_weight_denom = %d\n", p->chroma_log2_weight_denom);
+ va_TraceMsg(idx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag);
+ if (p->luma_weight_l0_flag) {
+ for (i = 0; i <= p->num_ref_idx_l0_active_minus1; i++) {
+ va_TraceMsg(idx, "\t%d ", p->luma_weight_l0[i]);
+ va_TraceMsg(idx, "\t%d ", p->luma_offset_l0[i]);
+ }
+ }
+
+ va_TraceMsg(idx, "\tchroma_weight_l0_flag = %d\n", p->chroma_weight_l0_flag);
+ if (p->chroma_weight_l0_flag) {
+ for (i = 0; i <= p->num_ref_idx_l0_active_minus1; i++) {
+ va_TraceMsg(idx, "\t\t%d ", p->chroma_weight_l0[i][0]);
+ va_TraceMsg(idx, "\t\t%d ", p->chroma_offset_l0[i][0]);
+ va_TraceMsg(idx, "\t\t%d ", p->chroma_weight_l0[i][1]);
+ va_TraceMsg(idx, "\t\t%d ", p->chroma_offset_l0[i][1]);
+ }
+ }
+
+ va_TraceMsg(idx, "\tluma_weight_l1_flag = %d\n", p->luma_weight_l1_flag);
+ if (p->luma_weight_l1_flag) {
+ for (i = 0; i <= p->num_ref_idx_l1_active_minus1; i++) {
+ va_TraceMsg(idx, "\t\t%d ", p->luma_weight_l1[i]);
+ va_TraceMsg(idx, "\t\t%d ", p->luma_offset_l1[i]);
+ }
+ }
+
+ va_TraceMsg(idx, "\tchroma_weight_l1_flag = %d\n", p->chroma_weight_l1_flag);
+ if (p->chroma_weight_l1_flag) {
+ for (i = 0; i <= p->num_ref_idx_l1_active_minus1; i++) {
+ va_TraceMsg(idx, "\t\t%d ", p->chroma_weight_l1[i][0]);
+ va_TraceMsg(idx, "\t\t%d ", p->chroma_offset_l1[i][0]);
+ va_TraceMsg(idx, "\t\t%d ", p->chroma_weight_l1[i][1]);
+ va_TraceMsg(idx, "\t\t%d ", p->chroma_offset_l1[i][1]);
+ }
+ va_TraceMsg(idx, "\n");
+ }
+ va_TraceMsg(idx, NULL);
+
+ va_TraceMsg(idx, "\tcabac_init_idc = %d\n", p->cabac_init_idc);
+ va_TraceMsg(idx, "\tslice_qp_delta = %d\n", p->slice_qp_delta);
+ va_TraceMsg(idx, "\tdisable_deblocking_filter_idc = %d\n", p->disable_deblocking_filter_idc);
+ va_TraceMsg(idx, "\tslice_alpha_c0_offset_div2 = %d\n", p->slice_alpha_c0_offset_div2);
+ va_TraceMsg(idx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
+ va_TraceMsg(idx, NULL);
+
+ return;
+}
+
static void va_TraceVAEncMiscParameterBuffer(
VADisplay dpy,
VAContextID context,
@@ -1280,6 +1442,15 @@ static void va_TraceVAEncMiscParameterBuffer(
va_TraceMsg(idx, "\tair_auto = %d\n", p->air_auto);
break;
}
+ case VAEncMiscParameterTypeHRD:
+ {
+ VAEncMiscParameterHRD *p = (VAEncMiscParameterHRD *)tmp->data;
+
+ va_TraceMsg(idx, "VAEncMiscParameterHRD\n");
+ va_TraceMsg(idx, "\tinitial_buffer_fullness = %d\n", p->initial_buffer_fullness);
+ va_TraceMsg(idx, "\tbuffer_size = %d\n", p->buffer_size);
+ break;
+ }
default:
va_TraceMsg(idx, "invalid VAEncMiscParameterBuffer type = %d\n", tmp->type);
break;
@@ -1492,10 +1663,6 @@ static void va_TraceMPEG2Buf(
break;
case VAEncSliceParameterBufferType:
break;
- case VAEncH264VUIBufferType:
- break;
- case VAEncH264SEIBufferType:
- break;
default:
break;
}
@@ -1768,10 +1935,6 @@ static void va_TraceMPEG4Buf(
case VAEncSliceParameterBufferType:
va_TraceVAEncSliceParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
break;
- case VAEncH264VUIBufferType:
- break;
- case VAEncH264SEIBufferType:
- break;
default:
break;
}
@@ -1832,13 +1995,7 @@ static void va_TraceH264Buf(
va_TraceVAEncPictureParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
break;
case VAEncSliceParameterBufferType:
- va_TraceVAEncSliceParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
- break;
- case VAEncH264VUIBufferType:
- va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
- break;
- case VAEncH264SEIBufferType:
- va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
+ va_TraceVAEncSliceParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
break;
case VAEncMiscParameterBufferType:
va_TraceVAEncMiscParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
diff --git a/va/va_trace.h b/va/va_trace.h
index 7db8dc2..6803c28 100755
--- a/va/va_trace.h
+++ b/va/va_trace.h
@@ -29,6 +29,8 @@
extern "C" {
#endif
+#include "va/va.h"
+
extern int trace_flag;
#define VA_TRACE_FLAG_LOG 0x1
@@ -78,15 +80,15 @@ void va_TraceCreateConfig(
VAConfigID *config_id /* out */
);
-void va_TraceCreateSurface(
+void va_TraceCreateSurfaces(
VADisplay dpy,
int width,
int height,
int format,
int num_surfaces,
- VASurfaceID *surfaces, /* out */
- VASurfaceAttrib *attrib_list,
- int num_attribs
+ VASurfaceID *surfaces, /* out */
+ VASurfaceAttrib *attrib_list,
+ unsigned int num_attribs
);
void va_TraceCreateContext(
diff --git a/va/va_version.h b/va/va_version.h
deleted file mode 100644
index 41d542c..0000000
--- a/va/va_version.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef VA_VERSION_H
-#define VA_VERSION_H
-
-/**
- * VA_MAJOR_VERSION:
- *
- * The major version of the VA library (1, if %VA_VERSION is 1.2.3)
- */
-#define VA_MAJOR_VERSION (0)
-
-/**
- * VA_MINOR_VERSION:
- *
- * The minor version of the VA library (2, if %VA_VERSION is 1.2.3)
- */
-#define VA_MINOR_VERSION (32)
-
-/**
- * VA_MICRO_VERSION:
- *
- * The micro version of the VA library (3, if %VA_VERSION is 1.2.3)
- */
-#define VA_MICRO_VERSION (0)
-
-/**
- * VA_VERSION:
- *
- * The full version of the VA library, like 1.2.3
- */
-#define VA_VERSION 0.32.0
-
-/**
- * VA_VERSION_S:
- *
- * The full version of the VA library, in string form (suited for
- * string concatenation)
- */
-#define VA_VERSION_S "0.32.0"
-
-/**
- * VA_VERSION_HEX:
- *
- * Numerically encoded version of the VA library, like 0x010203
- */
-#define VA_VERSION_HEX ((VA_MAJOR_VERSION << 24) | \
- (VA_MINOR_VERSION << 16) | \
- (VA_MICRO_VERSION << 8))
-
-/**
- * VA_CHECK_VERSION:
- * @major: major version, like 1 in 1.2.3
- * @minor: minor version, like 2 in 1.2.3
- * @micro: micro version, like 3 in 1.2.3
- *
- * Evaluates to %TRUE if the version of the VA library is greater
- * than @major, @minor and @micro
- */
-#define VA_CHECK_VERSION(major,minor,micro) \
- (VA_MAJOR_VERSION > (major) || \
- (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION > (minor)) || \
- (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION == (minor) && VA_MICRO_VERSION >= (micro)))
-
-#endif /* VA_VERSION_H */
diff --git a/va/va_version.h.in b/va/va_version.h.in
index c9ea97a..0cc5ea7 100644
--- a/va/va_version.h.in
+++ b/va/va_version.h.in
@@ -28,43 +28,43 @@
/**
* VA_MAJOR_VERSION:
*
- * The major version of the VA library (1, if %VA_VERSION is 1.2.3)
+ * The major version of VA-API (1, if %VA_VERSION is 1.2.3)
*/
-#define VA_MAJOR_VERSION (@LIBVA_MAJOR_VERSION@)
+#define VA_MAJOR_VERSION @VA_API_MAJOR_VERSION@
/**
* VA_MINOR_VERSION:
*
- * The minor version of the VA library (2, if %VA_VERSION is 1.2.3)
+ * The minor version of VA-API (2, if %VA_VERSION is 1.2.3)
*/
-#define VA_MINOR_VERSION (@LIBVA_MINOR_VERSION@)
+#define VA_MINOR_VERSION @VA_API_MINOR_VERSION@
/**
* VA_MICRO_VERSION:
*
- * The micro version of the VA library (3, if %VA_VERSION is 1.2.3)
+ * The micro version of VA-API (3, if %VA_VERSION is 1.2.3)
*/
-#define VA_MICRO_VERSION (@LIBVA_MICRO_VERSION@)
+#define VA_MICRO_VERSION @VA_API_MICRO_VERSION@
/**
* VA_VERSION:
*
- * The full version of the VA library, like 1.2.3
+ * The full version of VA-API, like 1.2.3
*/
-#define VA_VERSION @LIBVA_VERSION@
+#define VA_VERSION @VA_API_VERSION@
/**
* VA_VERSION_S:
*
- * The full version of the VA library, in string form (suited for
- * string concatenation)
+ * The full version of VA-API, in string form (suited for string
+ * concatenation)
*/
-#define VA_VERSION_S "@LIBVA_VERSION@"
+#define VA_VERSION_S "@VA_API_VERSION@"
/**
* VA_VERSION_HEX:
*
- * Numerically encoded version of the VA library, like 0x010203
+ * Numerically encoded version of VA-API, like 0x010203
*/
#define VA_VERSION_HEX ((VA_MAJOR_VERSION << 24) | \
(VA_MINOR_VERSION << 16) | \
@@ -76,8 +76,8 @@
* @minor: minor version, like 2 in 1.2.3
* @micro: micro version, like 3 in 1.2.3
*
- * Evaluates to %TRUE if the version of the VA library is greater
- * than @major, @minor and @micro
+ * Evaluates to %TRUE if the version of VA-API is greater than
+ * @major, @minor and @micro
*/
#define VA_CHECK_VERSION(major,minor,micro) \
(VA_MAJOR_VERSION > (major) || \
diff --git a/va/va_vpp.h b/va/va_vpp.h
new file mode 100644
index 0000000..0d23cbf
--- /dev/null
+++ b/va/va_vpp.h
@@ -0,0 +1,782 @@
+/*
+ * Copyright (c) 2007-2011 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file va_vpp.h
+ * \brief The video processing API
+ *
+ * This file contains the \ref api_vpp "Video processing API".
+ */
+
+#ifndef VA_VPP_H
+#define VA_VPP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \defgroup api_vpp Video processing API
+ *
+ * @{
+ *
+ * The video processing API uses the same paradigm as for decoding:
+ * - Query for supported filters;
+ * - Set up a video processing pipeline;
+ * - Send video processing parameters through VA buffers.
+ *
+ * \section api_vpp_caps Query for supported filters
+ *
+ * Checking whether video processing is supported can be performed
+ * with vaQueryConfigEntrypoints() and the profile argument set to
+ * #VAProfileNone. If video processing is supported, then the list of
+ * returned entry-points will include #VAEntrypointVideoProc.
+ *
+ * \code
+ * VAEntrypoint *entrypoints;
+ * int i, num_entrypoints, supportsVideoProcessing = 0;
+ *
+ * num_entrypoints = vaMaxNumEntrypoints();
+ * entrypoints = malloc(num_entrypoints * sizeof(entrypoints[0]);
+ * vaQueryConfigEntrypoints(va_dpy, VAProfileNone,
+ * entrypoints, &num_entrypoints);
+ *
+ * for (i = 0; !supportsVideoProcessing && i < num_entrypoints; i++) {
+ * if (entrypoints[i] == VAEntrypointVideoProc)
+ * supportsVideoProcessing = 1;
+ * }
+ * \endcode
+ *
+ * Then, the vaQueryVideoProcFilters() function is used to query the
+ * list of video processing filters.
+ *
+ * \code
+ * VAProcFilterType filters[VAProcFilterCount];
+ * unsigned int num_filters = VAProcFilterCount;
+ *
+ * // num_filters shall be initialized to the length of the array
+ * vaQueryVideoProcFilters(va_dpy, vpp_ctx, &filters, &num_filters);
+ * \endcode
+ *
+ * Finally, individual filter capabilities can be checked with
+ * vaQueryVideoProcFilterCaps().
+ *
+ * \code
+ * VAProcFilterCap denoise_caps;
+ * unsigned int num_denoise_caps = 1;
+ * vaQueryVideoProcFilterCaps(va_dpy, vpp_ctx,
+ * VAProcFilterNoiseReduction,
+ * &denoise_caps, &num_denoise_caps
+ * );
+ *
+ * VAProcFilterCapDeinterlacing deinterlacing_caps[VAProcDeinterlacingCount];
+ * unsigned int num_deinterlacing_caps = VAProcDeinterlacingCount;
+ * vaQueryVideoProcFilterCaps(va_dpy, vpp_ctx,
+ * VAProcFilterDeinterlacing,
+ * &deinterlacing_caps, &num_deinterlacing_caps
+ * );
+ * \endcode
+ *
+ * \section api_vpp_setup Set up a video processing pipeline
+ *
+ * A video processing pipeline buffer is created for each source
+ * surface we want to process. However, buffers holding filter
+ * parameters can be created once and for all. Rationale is to avoid
+ * multiple creation/destruction chains of filter buffers and also
+ * because filter parameters generally won't change frame after
+ * frame. e.g. this makes it possible to implement a checkerboard of
+ * videos where the same filters are applied to each video source.
+ *
+ * The general control flow is demonstrated by the following pseudo-code:
+ * \code
+ * // Create filters
+ * VABufferID denoise_filter, deint_filter;
+ * VABufferID filter_bufs[VAProcFilterCount];
+ * unsigned int num_filter_bufs;
+ *
+ * for (i = 0; i < num_filters; i++) {
+ * switch (filters[i]) {
+ * case VAProcFilterNoiseReduction: { // Noise reduction filter
+ * VAProcFilterParameterBuffer denoise;
+ * denoise.type = VAProcFilterNoiseReduction;
+ * denoise.value = 0.5;
+ * vaCreateBuffer(va_dpy, vpp_ctx,
+ * VAProcFilterParameterBufferType, sizeof(denoise), 1,
+ * &denoise, &denoise_filter
+ * );
+ * filter_bufs[num_filter_bufs++] = denoise_filter;
+ * break;
+ * }
+ *
+ * case VAProcFilterDeinterlacing: // Motion-adaptive deinterlacing
+ * for (j = 0; j < num_deinterlacing_caps; j++) {
+ * VAProcFilterCapDeinterlacing * const cap = &deinterlacing_caps[j];
+ * if (cap->type != VAProcDeinterlacingMotionAdaptive)
+ * continue;
+ *
+ * VAProcFilterParameterBufferDeinterlacing deint;
+ * deint.type = VAProcFilterDeinterlacing;
+ * deint.algorithm = VAProcDeinterlacingMotionAdaptive;
+ * vaCreateBuffer(va_dpy, vpp_ctx,
+ * VAProcFilterParameterBufferType, sizeof(deint), 1,
+ * &deint, &deint_filter
+ * );
+ * filter_bufs[num_filter_bufs++] = deint_filter;
+ * }
+ * }
+ * }
+ * \endcode
+ *
+ * Once the video processing pipeline is set up, the caller shall check the
+ * implied capabilities and requirements with vaQueryVideoProcPipelineCaps().
+ * This function can be used to validate the number of reference frames are
+ * needed by the specified deinterlacing algorithm, the supported color
+ * primaries, etc.
+ * \code
+ * // Create filters
+ * VAProcPipelineCaps pipeline_caps;
+ * VASurfaceID *forward_references;
+ * unsigned int num_forward_references;
+ * VASurfaceID *backward_references;
+ * unsigned int num_backward_references;
+ * VAProcColorStandardType in_color_standards[VAProcColorStandardCount];
+ * VAProcColorStandardType out_color_standards[VAProcColorStandardCount];
+ *
+ * pipeline_caps.input_color_standards = NULL;
+ * pipeline_caps.num_input_color_standards = ARRAY_ELEMS(in_color_standards);
+ * pipeline_caps.output_color_standards = NULL;
+ * pipeline_caps.num_output_color_standards = ARRAY_ELEMS(out_color_standards);
+ * vaQueryVideoProcPipelineCaps(va_dpy, vpp_ctx,
+ * filter_bufs, num_filter_bufs,
+ * &pipeline_caps
+ * );
+ *
+ * num_forward_references = pipeline_caps.num_forward_references;
+ * forward_references =
+ * malloc(num__forward_references * sizeof(VASurfaceID));
+ * num_backward_references = pipeline_caps.num_backward_references;
+ * backward_references =
+ * malloc(num_backward_references * sizeof(VASurfaceID));
+ * \endcode
+ *
+ * \section api_vpp_submit Send video processing parameters through VA buffers
+ *
+ * Video processing pipeline parameters are submitted for each source
+ * surface to process. Video filter parameters can also change, per-surface.
+ * e.g. the list of reference frames used for deinterlacing.
+ *
+ * \code
+ * foreach (iteration) {
+ * vaBeginPicture(va_dpy, vpp_ctx, vpp_surface);
+ * foreach (surface) {
+ * VARectangle output_region;
+ * VABufferID pipeline_buf;
+ * VAProcPipelineParameterBuffer *pipeline_param;
+ *
+ * vaCreateBuffer(va_dpy, vpp_ctx,
+ * VAProcPipelineParameterBuffer, sizeof(*pipeline_param), 1,
+ * NULL, &pipeline_buf
+ * );
+ *
+ * // Setup output region for this surface
+ * // e.g. upper left corner for the first surface
+ * output_region.x = BORDER;
+ * output_region.y = BORDER;
+ * output_region.width =
+ * (vpp_surface_width - (Nx_surfaces + 1) * BORDER) / Nx_surfaces;
+ * output_region.height =
+ * (vpp_surface_height - (Ny_surfaces + 1) * BORDER) / Ny_surfaces;
+ *
+ * vaMapBuffer(va_dpy, pipeline_buf, &pipeline_param);
+ * pipeline_param->surface = surface;
+ * pipeline_param->surface_region = NULL;
+ * pipeline_param->output_region = &output_region;
+ * pipeline_param->output_background_color = 0;
+ * if (first surface to render)
+ * pipeline_param->output_background_color = 0xff000000; // black
+ * pipeline_param->filter_flags = VA_FILTER_SCALING_HQ;
+ * pipeline_param->filters = filter_bufs;
+ * pipeline_param->num_filters = num_filter_bufs;
+ * vaUnmapBuffer(va_dpy, pipeline_buf);
+ *
+ * // Update reference frames for deinterlacing, if necessary
+ * pipeline_param->forward_references = forward_references;
+ * pipeline_param->num_forward_references = num_forward_references_used;
+ * pipeline_param->backward_references = backward_references;
+ * pipeline_param->num_backward_references = num_bacward_references_used;
+ *
+ * // Apply filters
+ * vaRenderPicture(va_dpy, vpp_ctx, &pipeline_buf, 1);
+ * }
+ * vaEndPicture(va_dpy, vpp_ctx);
+ * }
+ * \endcode
+ */
+
+/** \brief Video filter types. */
+typedef enum _VAProcFilterType {
+ VAProcFilterNone = 0,
+ /** \brief Dering filter. */
+ VAProcFilterDering = 1,
+ /** \brief De-blocking filter. */
+ VAProcFilterDeblocking = 2,
+ /** \brief Noise reduction filter. */
+ VAProcFilterNoiseReduction = 3,
+ /** \brief Deinterlacing filter. */
+ VAProcFilterDeinterlacing = 4,
+ /** \brief Sharpening filter. */
+ VAProcFilterSharpening = 5,
+ /** \brief Color balance parameters. */
+ VAProcFilterColorBalance = 6,
+ /** \brief Color standard conversion. */
+ VAProcFilterColorStandard = 7,
+ /** \brief Number of video filters. */
+ VAProcFilterColorEnhancement = 8,
+ VAProcFilterProcAmp = 9,
+ VAProcFilterComposition = 10,
+ /** \brief Frame rate convert filter. */
+ VAProcFilterFrameRateConversion = 11,
+ VAProcFilterCount
+} VAProcFilterType;
+
+/** \brief Deinterlacing types. */
+typedef enum _VAProcDeinterlacingType {
+ VAProcDeinterlacingNone = 0,
+ /** \brief Bob deinterlacing algorithm. */
+ VAProcDeinterlacingBob,
+ /** \brief Weave deinterlacing algorithm. */
+ VAProcDeinterlacingWeave,
+ /** \brief Motion adaptive deinterlacing algorithm. */
+ VAProcDeinterlacingMotionAdaptive,
+ /** \brief Motion compensated deinterlacing algorithm. */
+ VAProcDeinterlacingMotionCompensated,
+ /** \brief Number of deinterlacing algorithms. */
+ VAProcDeinterlacingCount
+} VAProcDeinterlacingType;
+
+/** \brief Color balance types. */
+typedef enum _VAProcColorBalanceType {
+ VAProcColorBalanceNone = 0,
+ /** \brief Hue. */
+ VAProcColorBalanceHue,
+ /** \brief Saturation. */
+ VAProcColorBalanceSaturation,
+ /** \brief Brightness. */
+ VAProcColorBalanceBrightness,
+ /** \brief Contrast. */
+ VAProcColorBalanceContrast,
+ /** \brief Automatically adjusted saturation. */
+ VAProcColorBalanceAutoSaturation,
+ /** \brief Automatically adjusted brightness. */
+ VAProcColorBalanceAutoBrightness,
+ /** \brief Automatically adjusted contrast. */
+ VAProcColorBalanceAutoContrast,
+ /** \brief Number of color balance attributes. */
+ VAProcColorBalanceCount
+} VAProcColorBalanceType;
+
+/** \brief Color standard types. */
+typedef enum _VAProcColorStandardType {
+ VAProcColorStandardNone = 0,
+ /** \brief ITU-R BT.601. */
+ VAProcColorStandardBT601,
+ /** \brief ITU-R BT.709. */
+ VAProcColorStandardBT709,
+ /** \brief ITU-R BT.470-2 System M. */
+ VAProcColorStandardBT470M,
+ /** \brief ITU-R BT.470-2 System B, G. */
+ VAProcColorStandardBT470BG,
+ /** \brief SMPTE-170M. */
+ VAProcColorStandardSMPTE170M,
+ /** \brief SMPTE-240M. */
+ VAProcColorStandardSMPTE240M,
+ /** \brief Generic film. */
+ VAProcColorStandardGenericFilm,
+ /** \brief Number of color standards. */
+ VAProcColorStandardCount
+} VAProcColorStandardType;
+
+/** @name Video pipeline flags */
+/**@{*/
+/** \brief Specifies whether to apply subpictures when processing a surface. */
+#define VA_PROC_PIPELINE_SUBPICTURES 0x00000001
+/**
+ * \brief Specifies whether to apply power or performance
+ * optimizations to a pipeline.
+ *
+ * When processing several surfaces, it may be necessary to prioritize
+ * more certain pipelines than others. This flag is only a hint to the
+ * video processor so that it can omit certain filters to save power
+ * for example. Typically, this flag could be used with video surfaces
+ * decoded from a secondary bitstream.
+ */
+#define VA_PROC_PIPELINE_FAST 0x00000002
+/**@}*/
+
+/** @name Video filter flags */
+/**@{*/
+/** \brief Specifies whether the filter shall be present in the pipeline. */
+#define VA_PROC_FILTER_MANDATORY 0x00000001
+/**@}*/
+
+/** @name Pipeline end flags */
+/**@{*/
+/** \brief Specifies the pipeline is the last. */
+#define VA_PIPELINE_FLAG_END 0x8
+/**@}*/
+
+/** \brief Video processing pipeline capabilities. */
+typedef struct _VAProcPipelineCaps {
+ /** \brief Video filter flags. See video pipeline flags. */
+ unsigned int flags;
+ /** \brief Pipeline flags. See VAProcPipelineParameterBuffer::pipeline_flags. */
+ unsigned int pipeline_flags;
+ /** \brief Extra filter flags. See VAProcPipelineParameterBuffer::filter_flags. */
+ unsigned int filter_flags;
+ /** \brief Number of forward reference frames that are needed. */
+ unsigned int num_forward_references;
+ /** \brief Number of backward reference frames that are needed. */
+ unsigned int num_backward_references;
+ /** \brief List of color standards supported on input. */
+ VAProcColorStandardType *input_color_standards;
+ /** \brief Number of elements in \ref input_color_standards array. */
+ unsigned int num_input_color_standards;
+ /** \brief List of color standards supported on output. */
+ VAProcColorStandardType *output_color_standards;
+ /** \brief Number of elements in \ref output_color_standards array. */
+ unsigned int num_output_color_standards;
+} VAProcPipelineCaps;
+
+/** \brief Specification of values supported by the filter. */
+typedef struct _VAProcFilterValueRange {
+ /** \brief Minimum value supported, inclusive. */
+ float min_value;
+ /** \brief Maximum value supported, inclusive. */
+ float max_value;
+ /** \brief Default value. */
+ float default_value;
+ /** \brief Step value that alters the filter behaviour in a sensible way. */
+ float step;
+} VAProcFilterValueRange;
+
+/**
+ * \brief Video processing pipeline configuration.
+ *
+ * This buffer defines a video processing pipeline. As for any buffer
+ * passed to \c vaRenderPicture(), this is a one-time usage model.
+ * However, the actual filters to be applied are provided in the
+ * \c filters field, so they can be re-used in other processing
+ * pipelines.
+ *
+ * The target surface is specified by the \c render_target argument of
+ * \c vaBeginPicture(). The general usage model is described as follows:
+ * - \c vaBeginPicture(): specify the target surface that receives the
+ * processed output;
+ * - \c vaRenderPicture(): specify a surface to be processed and composed
+ * into the \c render_target. Use as many \c vaRenderPicture() calls as
+ * necessary surfaces to compose ;
+ * - \c vaEndPicture(): tell the driver to start processing the surfaces
+ * with the requested filters.
+ *
+ * If a filter (e.g. noise reduction) needs to be applied with different
+ * values for multiple surfaces, the application needs to create as many
+ * filter parameter buffers as necessary. i.e. the filter parameters shall
+ * not change between two calls to \c vaRenderPicture().
+ *
+ * For composition usage models, the first surface to process will generally
+ * use an opaque background color, i.e. \c output_background_color set with
+ * the most significant byte set to \c 0xff. For instance, \c 0xff000000 for
+ * a black background. Then, subsequent surfaces would use a transparent
+ * background color.
+ */
+typedef struct _VAProcPipelineParameterBuffer {
+ /**
+ * \brief Source surface ID.
+ *
+ * ID of the source surface to process. If subpictures are associated
+ * with the video surfaces then they shall be rendered to the target
+ * surface, if the #VA_PROC_PIPELINE_SUBPICTURES pipeline flag is set.
+ */
+ VASurfaceID surface;
+ /**
+ * \brief Region within the source surface to be processed.
+ *
+ * Pointer to a #VARectangle defining the region within the source
+ * surface to be processed. If NULL, \c surface_region implies the
+ * whole surface.
+ */
+ const VARectangle *surface_region;
+ /**
+ * \brief Requested input color primaries.
+ *
+ * Color primaries are implicitly converted throughout the processing
+ * pipeline. The video processor chooses the best moment to apply
+ * this conversion. The set of supported color primaries primaries
+ * for input shall be queried with vaQueryVideoProcPipelineCaps().
+ */
+ VAProcColorStandardType surface_color_standard;
+ /**
+ * \brief Region within the output surface.
+ *
+ * Pointer to a #VARectangle defining the region within the output
+ * surface that receives the processed pixels. If NULL, \c output_region
+ * implies the whole surface.
+ *
+ * Note that any pixels residing outside the specified region will
+ * be filled in with the \ref output_background_color.
+ */
+ const VARectangle *output_region;
+ /**
+ * \brief Background color.
+ *
+ * Background color used to fill in pixels that reside outside of the
+ * specified \ref output_region. The color is specified in ARGB format:
+ * [31:24] alpha, [23:16] red, [15:8] green, [7:0] blue.
+ *
+ * Unless the alpha value is zero or the \ref output_region represents
+ * the whole target surface size, implementations shall not render the
+ * source surface to the target surface directly. Rather, in order to
+ * maintain the exact semantics of \ref output_background_color, the
+ * driver shall use a temporary surface and fill it in with the
+ * appropriate background color. Next, the driver will blend this
+ * temporary surface into the target surface.
+ */
+ unsigned int output_background_color;
+ /**
+ * \brief Requested output color primaries.
+ */
+ VAProcColorStandardType output_color_standard;
+ /**
+ * \brief Pipeline filters. See video pipeline flags.
+ *
+ * Flags to control the pipeline, like whether to apply subpictures
+ * or not, notify the driver that it can opt for power optimizations,
+ * should this be needed.
+ */
+ unsigned int pipeline_flags;
+ /**
+ * \brief Extra filter flags. See vaPutSurface() flags.
+ *
+ * Filter flags are used as a fast path, wherever possible, to use
+ * vaPutSurface() flags instead of explicit filter parameter buffers.
+ *
+ * Allowed filter flags API-wise. Use vaQueryVideoProcPipelineCaps()
+ * to check for implementation details:
+ * - Bob-deinterlacing: \c VA_FRAME_PICTURE, \c VA_TOP_FIELD,
+ * \c VA_BOTTOM_FIELD. Note that any deinterlacing filter
+ * (#VAProcFilterDeinterlacing) will override those flags.
+ * - Color space conversion: \c VA_SRC_BT601, \c VA_SRC_BT709,
+ * \c VA_SRC_SMPTE_240. Note that any color standard filter
+ * (#VAProcFilterColorStandard) will override those flags.
+ * - Scaling: \c VA_FILTER_SCALING_DEFAULT, \c VA_FILTER_SCALING_FAST,
+ * \c VA_FILTER_SCALING_HQ, \c VA_FILTER_SCALING_NL_ANAMORPHIC.
+ */
+ unsigned int filter_flags;
+ /**
+ * \brief Array of filters to apply to the surface.
+ *
+ * The list of filters shall be ordered in the same way the driver expects
+ * them. i.e. as was returned from vaQueryVideoProcFilters().
+ * Otherwise, a #VA_STATUS_ERROR_INVALID_FILTER_CHAIN is returned
+ * from vaRenderPicture() with this buffer.
+ *
+ * #VA_STATUS_ERROR_UNSUPPORTED_FILTER is returned if the list
+ * contains an unsupported filter.
+ *
+ * Note: no filter buffer is destroyed after a call to vaRenderPicture(),
+ * only this pipeline buffer will be destroyed as per the core API
+ * specification. This allows for flexibility in re-using the filter for
+ * other surfaces to be processed.
+ */
+ VABufferID *filters;
+ /** \brief Actual number of filters. */
+ unsigned int num_filters;
+ /** \brief Array of forward reference frames. */
+ VASurfaceID *forward_references;
+ /** \brief Number of forward reference frames that were supplied. */
+ unsigned int num_forward_references;
+ /** \brief Array of backward reference frames. */
+ VASurfaceID *backward_references;
+ /** \brief Number of backward reference frames that were supplied. */
+ unsigned int num_backward_references;
+} VAProcPipelineParameterBuffer;
+
+/**
+ * \brief Filter parameter buffer base.
+ *
+ * This is a helper structure used by driver implementations only.
+ * Users are not supposed to allocate filter parameter buffers of this
+ * type.
+ */
+typedef struct _VAProcFilterParameterBufferBase {
+ /** \brief Filter type. */
+ VAProcFilterType type;
+} VAProcFilterParameterBufferBase;
+
+/**
+ * \brief Default filter parametrization.
+ *
+ * Unless there is a filter-specific parameter buffer,
+ * #VAProcFilterParameterBuffer is the default type to use.
+ */
+typedef struct _VAProcFilterParameterBuffer {
+ /** \brief Filter type. */
+ VAProcFilterType type;
+ /** \brief Value. */
+ float value;
+} VAProcFilterParameterBuffer;
+
+/** \brief Deinterlacing filter parametrization. */
+typedef struct _VAProcFilterParameterBufferDeinterlacing {
+ /** \brief Filter type. Shall be set to #VAProcFilterDeinterlacing. */
+ VAProcFilterType type;
+ /** \brief Deinterlacing algorithm. */
+ VAProcDeinterlacingType algorithm;
+} VAProcFilterParameterBufferDeinterlacing;
+
+/**
+ * \brief Color balance filter parametrization.
+ *
+ * This buffer defines color balance attributes. A VA buffer can hold
+ * several color balance attributes by creating a VA buffer of desired
+ * number of elements. This can be achieved by the following pseudo-code:
+ *
+ * \code
+ * enum { kHue, kSaturation, kBrightness, kContrast };
+ *
+ * // Initial color balance parameters
+ * static const VAProcFilterParameterBufferColorBalance colorBalanceParams[4] =
+ * {
+ * [kHue] =
+ * { VAProcFilterColorBalance, VAProcColorBalanceHue, 0.5 },
+ * [kSaturation] =
+ * { VAProcFilterColorBalance, VAProcColorBalanceSaturation, 0.5 },
+ * [kBrightness] =
+ * { VAProcFilterColorBalance, VAProcColorBalanceBrightness, 0.5 },
+ * [kSaturation] =
+ * { VAProcFilterColorBalance, VAProcColorBalanceSaturation, 0.5 }
+ * };
+ *
+ * // Create buffer
+ * VABufferID colorBalanceBuffer;
+ * vaCreateBuffer(va_dpy, vpp_ctx,
+ * VAProcFilterParameterBufferType, sizeof(*pColorBalanceParam), 4,
+ * colorBalanceParams,
+ * &colorBalanceBuffer
+ * );
+ *
+ * VAProcFilterParameterBufferColorBalance *pColorBalanceParam;
+ * vaMapBuffer(va_dpy, colorBalanceBuffer, &pColorBalanceParam);
+ * {
+ * // Change brightness only
+ * pColorBalanceBuffer[kBrightness].value = 0.75;
+ * }
+ * vaUnmapBuffer(va_dpy, colorBalanceBuffer);
+ * \endcode
+ */
+typedef struct _VAProcFilterParameterBufferColorBalance {
+ /** \brief Filter type. Shall be set to #VAProcFilterColorBalance. */
+ VAProcFilterType type;
+ /** \brief Color balance attribute. */
+ VAProcColorBalanceType attrib;
+ /**
+ * \brief Color balance value.
+ *
+ * Special case for automatically adjusted attributes. e.g.
+ * #VAProcColorBalanceAutoSaturation,
+ * #VAProcColorBalanceAutoBrightness,
+ * #VAProcColorBalanceAutoContrast.
+ * - If \ref value is \c 1.0 +/- \c FLT_EPSILON, the attribute is
+ * automatically adjusted and overrides any other attribute of
+ * the same type that would have been set explicitly;
+ * - If \ref value is \c 0.0 +/- \c FLT_EPSILON, the attribute is
+ * disabled and other attribute of the same type is used instead.
+ */
+ float value;
+} VAProcFilterParameterBufferColorBalance;
+
+/** \brief Color standard filter parametrization. */
+typedef struct _VAProcFilterParameterBufferColorStandard {
+ /** \brief Filter type. Shall be set to #VAProcFilterColorStandard. */
+ VAProcFilterType type;
+ /** \brief Color standard to use. */
+ VAProcColorStandardType standard;
+} VAProcFilterParameterBufferColorStandard;
+
+/** \brief Frame rate conversion filter parametrization. */
+typedef struct _VAProcFilterParamterBufferFrameRateConversion {
+ /** \brief filter type. Shall be set to #VAProcFilterFrameRateConversion. */
+ VAProcFilterType type;
+ /** \brief FPS of input sequence. */
+ unsigned int input_fps;
+ /** \brief FPS of output sequence. */
+ unsigned int output_fps;
+ /** \brief Number of output frames in addition to the first output frame. */
+ unsigned int num_output_frames;
+ /**
+ * \brief Array to store output frames in addition to the first one.
+ * The first output frame is stored in the render target from vaBeginPicture().
+ */
+ VASurfaceID* output_frames;
+} VAProcFilterParameterBufferFrameRateConversion;
+
+/**
+ * \brief Default filter cap specification (single range value).
+ *
+ * Unless there is a filter-specific cap structure, #VAProcFilterCap is the
+ * default type to use for output caps from vaQueryVideoProcFilterCaps().
+ */
+typedef struct _VAProcFilterCap {
+ /** \brief Range of supported values for the filter. */
+ VAProcFilterValueRange range;
+} VAProcFilterCap;
+
+/** \brief Capabilities specification for the deinterlacing filter. */
+typedef struct _VAProcFilterCapDeinterlacing {
+ /** \brief Deinterlacing algorithm. */
+ VAProcDeinterlacingType type;
+} VAProcFilterCapDeinterlacing;
+
+/** \brief Capabilities specification for the color balance filter. */
+typedef struct _VAProcFilterCapColorBalance {
+ /** \brief Color balance operation. */
+ VAProcColorBalanceType type;
+ /** \brief Range of supported values for the specified operation. */
+ VAProcFilterValueRange range;
+} VAProcFilterCapColorBalance;
+
+/** \brief Capabilities specification for the color standard filter. */
+typedef struct _VAProcFilterCapColorStandard {
+ /** \brief Color standard type. */
+ VAProcColorStandardType type;
+} VAProcFilterCapColorStandard;
+
+/** \brief Capabilities specification for the amplifier filter. */
+typedef struct _VAProcFilterCapProcAmp
+{
+ VAProcFilterValueRange brightness_range;
+ VAProcFilterValueRange contrast_range;
+ VAProcFilterValueRange saturation_range;
+ VAProcFilterValueRange hue_range;
+} VAProcFilterCapProcAmp;
+
+/**
+ * \brief Queries video processing filters.
+ *
+ * This function returns the list of video processing filters supported
+ * by the driver. The \c filters array is allocated by the user and
+ * \c num_filters shall be initialized to the number of allocated
+ * elements in that array. Upon successful return, the actual number
+ * of filters will be overwritten into \c num_filters. Otherwise,
+ * \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and \c num_filters
+ * is adjusted to the number of elements that would be returned if enough
+ * space was available.
+ *
+ * The list of video processing filters supported by the driver shall
+ * be ordered in the way they can be iteratively applied. This is needed
+ * for both correctness, i.e. some filters would not mean anything if
+ * applied at the beginning of the pipeline; but also for performance
+ * since some filters can be applied in a single pass (e.g. noise
+ * reduction + deinterlacing).
+ *
+ * @param[in] dpy the VA display
+ * @param[in] context the video processing context
+ * @param[out] filters the output array of #VAProcFilterType elements
+ * @param[in,out] num_filters the number of elements allocated on input,
+ * the number of elements actually filled in on output
+ */
+VAStatus
+vaQueryVideoProcFilters(
+ VADisplay dpy,
+ VAContextID context,
+ VAProcFilterType *filters,
+ unsigned int *num_filters
+);
+
+/**
+ * \brief Queries video filter capabilities.
+ *
+ * This function returns the list of capabilities supported by the driver
+ * for a specific video filter. The \c filter_caps array is allocated by
+ * the user and \c num_filter_caps shall be initialized to the number
+ * of allocated elements in that array. Upon successful return, the
+ * actual number of filters will be overwritten into \c num_filter_caps.
+ * Otherwise, \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and
+ * \c num_filter_caps is adjusted to the number of elements that would be
+ * returned if enough space was available.
+ *
+ * @param[in] dpy the VA display
+ * @param[in] context the video processing context
+ * @param[in] type the video filter type
+ * @param[out] filter_caps the output array of #VAProcFilterCap elements
+ * @param[in,out] num_filter_caps the number of elements allocated on input,
+ * the number of elements actually filled in output
+ */
+VAStatus
+vaQueryVideoProcFilterCaps(
+ VADisplay dpy,
+ VAContextID context,
+ VAProcFilterType type,
+ void *filter_caps,
+ unsigned int *num_filter_caps
+);
+
+/**
+ * \brief Queries video processing pipeline capabilities.
+ *
+ * This function returns the video processing pipeline capabilities. The
+ * \c filters array defines the video processing pipeline and is an array
+ * of buffers holding filter parameters.
+ *
+ * Note: the #VAProcPipelineCaps structure contains user-provided arrays.
+ * If non-NULL, the corresponding \c num_* fields shall be filled in on
+ * input with the number of elements allocated. Upon successful return,
+ * the actual number of elements will be overwritten into the \c num_*
+ * fields. Otherwise, \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned
+ * and \c num_* fields are adjusted to the number of elements that would
+ * be returned if enough space was available.
+ *
+ * @param[in] dpy the VA display
+ * @param[in] context the video processing context
+ * @param[in] filters the array of VA buffers defining the video
+ * processing pipeline
+ * @param[in] num_filters the number of elements in filters
+ * @param[in,out] pipeline_caps the video processing pipeline capabilities
+ */
+VAStatus
+vaQueryVideoProcPipelineCaps(
+ VADisplay dpy,
+ VAContextID context,
+ VABufferID *filters,
+ unsigned int num_filters,
+ VAProcPipelineCaps *pipeline_caps
+);
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VA_VPP_H */
diff --git a/va/x11/dri2_util.c b/va/x11/dri2_util.c
index a00df7b..995f235 100644
--- a/va/x11/dri2_util.c
+++ b/va/x11/dri2_util.c
@@ -167,7 +167,6 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name)
if (!VA_DRI2QueryVersion(ctx->native_dpy, &major, &minor))
goto err_out;
-
if (!VA_DRI2Connect(ctx->native_dpy, RootWindow(ctx->native_dpy, ctx->x11_screen),
driver_name, &device_name))
goto err_out;
diff --git a/va/x11/va_fglrx.c b/va/x11/va_fglrx.c
index 5be0256..77149cb 100644
--- a/va/x11/va_fglrx.c
+++ b/va/x11/va_fglrx.c
@@ -78,23 +78,43 @@ static void ADL_Main_Memory_Free(void *arg)
}
}
-static int match_display(Display *x11_dpy, const char *display_name)
+static int get_display_name_length(const char *name)
+{
+ const char *m;
+
+ if (!name)
+ return 0;
+
+ /* Strip out screen number */
+ m = strchr(name, ':');
+ if (m) {
+ m = strchr(m, '.');
+ if (m)
+ return m - name;
+ }
+ return strlen(name);
+}
+
+static int match_display_name(Display *x11_dpy, const char *display_name)
{
Display *test_dpy;
char *test_dpy_name, *x11_dpy_name;
+ int test_dpy_namelen, x11_dpy_namelen;
int m;
test_dpy = XOpenDisplay(display_name);
if (!test_dpy)
return 0;
- test_dpy_name = XDisplayString(test_dpy);
- x11_dpy_name = XDisplayString(x11_dpy);
+ test_dpy_name = XDisplayString(test_dpy);
+ test_dpy_namelen = get_display_name_length(test_dpy_name);
+ x11_dpy_name = XDisplayString(x11_dpy);
+ x11_dpy_namelen = get_display_name_length(x11_dpy_name);
- if (x11_dpy_name && test_dpy_name)
- m = strcmp(x11_dpy_name, test_dpy_name) == 0;
- else
- m = !x11_dpy_name && !test_dpy_name;
+ m = (test_dpy_namelen == x11_dpy_namelen &&
+ (test_dpy_namelen == 0 ||
+ (test_dpy_namelen > 0 &&
+ strncmp(test_dpy_name, x11_dpy_name, test_dpy_namelen) == 0)));
XCloseDisplay(test_dpy);
return m;
@@ -204,14 +224,15 @@ Bool VA_FGLRXGetClientDriverName( Display *dpy, int screen,
printf(" iPresent: %d\n", lpCurrAdapterInfo->iPresent);
printf(" iXScreenNum: %d\n", lpCurrXScreenInfo->iXScreenNum);
#endif
- if (match_display(dpy, lpCurrAdapterInfo->strDisplayName) &&
- screen == lpCurrXScreenInfo->iXScreenNum) {
- *clientDriverName = strdup("fglrx");
+ if (screen == lpCurrXScreenInfo->iXScreenNum &&
+ match_display_name(dpy, lpCurrAdapterInfo->strDisplayName)) {
+ if (clientDriverName)
+ *clientDriverName = strdup("fglrx");
+ success = True;
break;
}
}
- success = True;
end:
if (lpXScreenInfo)
ADL_Main_Memory_Free(&lpXScreenInfo);