Skip to contentSkip to conversation

meta-intel: enable video acceleration for crownbay, v1

PATCH New [email protected] 1 participant 7 messages Dec 1, 2011

lore
Share & tools
lore
#0 lore raw

cover meta-intel: enable video acceleration for crownbay, v1

From: Tom Zanussi <[email protected]>

This patchset enables video acceleration for crownbay by adding the video components from EMGD along with a libva recipe and an additional bbappend to install plugins for demuxing mp4 videos.

So far tested with the 'Big Buck Bunny' H.264 1920x1080 and 'Big Buck Bunny' MP4 1920x1080 videos.

v1 changes:

- moved libva dependency to emgd
- added gst-ffmpeg to gst-meta-base
- additional testing

The following changes since commit 9b71d9c11579023a4428328ff6734a5f5fc7870d:
Tom Zanussi (1):
meta-romley: Remove xserver-xorg .bbappend.

are available in the git repository at:

git://git.yoctoproject.org/meta-intel.git tzanussi/va-v1
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/va-v1

Tom Zanussi (6):
libva: new recipe for video acceleration
libva: upgrade to 1.0.12 and factor out common settings
emgd-driver-bin: add video components
meta-crownbay: update README with EMGD video plugin instructions
meta-intel: add gst-meta-base .bbappend
meta-intel: add libva to EGMD xserver

 .../xorg-xserver/emgd-driver-bin_1.8.bb            |   22 ++++++-----
 .../gstreamer/gst-meta-base_0.10.bbappend          |    9 ++++
 common/recipes-multimedia/libva/libva.inc          |   41 ++++++++++++++++++++
 common/recipes-multimedia/libva/libva_1.0.12.bb    |    8 ++++
 conf/machine/include/ia32-base.inc                 |    4 +-
 meta-crownbay/README                               |   27 ++++++++++---
 6 files changed, 94 insertions(+), 17 deletions(-)
 create mode 100644 common/recipes-multimedia/gstreamer/gst-meta-base_0.10.bbappend
 create mode 100644 common/recipes-multimedia/libva/libva.inc
 create mode 100644 common/recipes-multimedia/libva/libva_1.0.12.bb
#1 lore raw

PATCH 1/6 libva: new recipe for video acceleration

From: Tom Zanussi <[email protected]>

This adds the libva_1.0.10 recipe based on the poky-contrib recipe by Yu Ke (commit msg copied below).

The original recipe was in meta/recipes-graphics; this patch moves it to meta-intel/recipes-multimedia since it's multimedia- and Intel-specific.

The original commit messages (indented):

libva: add new recpies libva

libva is a library implementation of "Video Acceleration (VA) API for Linux". libva enables and provides access to graphics hardware (GPU) acceleration for video processing on Linux and UNIX, includes video decoding, video encoding, subpicture blending and rendering.

This patch add the libva recipes.

libva: install some missing .so files

---
 common/recipes-multimedia/libva/libva_1.0.10.bb |   38 +++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)
 create mode 100644 common/recipes-multimedia/libva/libva_1.0.10.bb
common/recipes-multimedia/libva/libva_1.0.10.bb new file +38 -0
new file mode 100644
index 0000000..0cd0444
@@ -0,0 +1,38 @@
+SUMMARY = "Video Acceleration (VA) API for Linux"
+DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \
+and API specification which enables and provides access to graphics \
+hardware (GPU) acceleration for video processing on Linux and UNIX \
+based operating systems. Accelerated processing includes video \
+decoding, video encoding, subpicture blending and rendering. The \
+specification was originally designed by Intel for its GMA (Graphics \
+Media Accelerator) series of GPU hardware, the API is however not \
+limited to GPUs or Intel specific hardware, as other hardware and \
+manufacturers can also freely use this API for hardware accelerated \
+video decoding."
+
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/vaapi"
+BUGTRACKER = "https://bugs.freedesktop.org"
+
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
+
+PR = "r1"
+
+DEPENDS = "libxext libxfixes libdrm"
+
+SRC_URI = "http://cgit.freedesktop.org/libva/snapshot/libva-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "959de03d47654adab855e10bff614df3"
+SRC_URI[sha256sum] = "05f757f0043dce9f753d354d15e0cb772b1240cc9d29d26bbb5526285a203693"
+
+inherit autotools pkgconfig
+
+LEAD_SONAME = "libva.so"
+
+PACKAGES =+ "${PN}-x11 ${PN}-tpi ${PN}-glx ${PN}-egl"
+RDEPENDS_${PN} =+ "${PN}-x11 ${PN}-tpi ${PN}-glx ${PN}-egl"
+FILES_${PN}-x11 =+ "${libdir}/libva-x11.*"
+FILES_${PN}-tpi =+ "${libdir}/libva-tpi.*"
+FILES_${PN}-glx =+ "${libdir}/libva-glx.*"
+FILES_${PN}-egl =+ "${libdir}/libva-egl.*"
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/6 libva: upgrade to 1.0.12 and factor out common settings

From: Tom Zanussi <[email protected]>

EMGD 1.8 requires libva-1.0.12, so upgrade to that version, and we don't actually need the 1.0.10 recipe, so remove it.

This also adds -dbg and -dev packaging fixes to fix QA problems, removes some unnecessary settings, updates checksums, etc.

Also create and use a common libva.inc, as we'll soon be adding a more updated version of libva to the current version.

---
 .../libva/{libva_1.0.10.bb => libva.inc}           |   19 +++++++++++--------
 common/recipes-multimedia/libva/libva_1.0.12.bb    |    8 ++++++++
 2 files changed, 19 insertions(+), 8 deletions(-)
 rename common/recipes-multimedia/libva/{libva_1.0.10.bb => libva.inc} (78%)
 create mode 100644 common/recipes-multimedia/libva/libva_1.0.12.bb
common/recipes-multimedia/libva/libva.inc renamed from common/recipes-multimedia/libva/libva_1.0.10.bb +11 -8
similarity index 78%
rename from common/recipes-multimedia/libva/libva_1.0.10.bb
rename to common/recipes-multimedia/libva/libva.inc
index 0cd0444..93b3cae 100644
@@ -17,21 +17,24 @@ SECTION = "x11"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
 
-PR = "r1"
+INC_PR = "r0"
 
 DEPENDS = "libxext libxfixes libdrm"
 
-SRC_URI = "http://cgit.freedesktop.org/libva/snapshot/libva-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "959de03d47654adab855e10bff614df3"
-SRC_URI[sha256sum] = "05f757f0043dce9f753d354d15e0cb772b1240cc9d29d26bbb5526285a203693"
-
 inherit autotools pkgconfig
 
-LEAD_SONAME = "libva.so"
-
 PACKAGES =+ "${PN}-x11 ${PN}-tpi ${PN}-glx ${PN}-egl"
+PACKAGES =+ "${PN}-x11-dev ${PN}-tpi-dev ${PN}-glx-dev ${PN}-egl-dev"
+
 RDEPENDS_${PN} =+ "${PN}-x11 ${PN}-tpi ${PN}-glx ${PN}-egl"
+
+FILES_${PN}-dbg += "${libdir}/dri/.debug"
+FILES_${PN} += "${libdir}/dri"
+
+FILES_${PN}-x11-dev =+ "${libdir}/libva-x11.so"
+FILES_${PN}-tpi-dev =+ "${libdir}/libva-tpi.so"
+FILES_${PN}-glx-dev =+ "${libdir}/libva-glx.so"
+FILES_${PN}-egl-dev =+ "${libdir}/libva-egl.so"
 FILES_${PN}-x11 =+ "${libdir}/libva-x11.*"
 FILES_${PN}-tpi =+ "${libdir}/libva-tpi.*"
 FILES_${PN}-glx =+ "${libdir}/libva-glx.*"
common/recipes-multimedia/libva/libva_1.0.12.bb new file +8 -0
new file mode 100644
index 0000000..490e60f
@@ -0,0 +1,8 @@
+require libva.inc
+
+PR = "${INC_PR}.0"
+
+SRC_URI = "http://cgit.freedesktop.org/libva/snapshot/libva-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "84408a0746a63b8cf308dc7b9f2451cf"
+SRC_URI[sha256sum] = "e80aae68fc78d237d046be6525d333f072fd57fe4f4d8f981e869703ebfee8f5"
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 3/6 emgd-driver-bin: add video components

In reply to [email protected]

From: Tom Zanussi <[email protected]>

This adds the video binaries extracted from the following EMGD 1.8 binary rpms (emgd/1.8.2032/IEMGD_HEAD_Linux/common/video_plugin):

gst-plugins-mixvideo-0.10.30-1.i586.rpm
gst-plugins-va-0.10.7MFLD-1.i586.rpm
gst-vabuffer-0.10.5MFLD-1.i586.rpm
mixcommon-0.1.9-1.i586.rpm
mixvbp-0.1.24-1.i586.rpm
mixvideo-0.1.31-1.i586.rpm

---
 .../xorg-xserver/emgd-driver-bin_1.8.bb            |   22 ++++++++++---------
 1 files changed, 12 insertions(+), 10 deletions(-)
common/recipes-graphics/xorg-xserver/emgd-driver-bin_1.8.bb +12 -10
index 8dc43ea..bb98962 100644
@@ -6,7 +6,7 @@ see the README in meta-crownbay/ for instructions on the (simple) manual \
 steps necessary to make the necessary binaries available to this recipe.  \
 Please do that before building an image."
 LICENSE = "Intel-binary-only"
-PR = "r7"
+PR = "r8"
 
 LIC_FILES_CHKSUM = "file://${WORKDIR}/License.txt;md5=b54f01caaf8483b3cb60c0c40f2bf22d"
 
@@ -15,23 +15,25 @@ FILESPATH = "${FILE_DIRNAME}/emgd-driver-bin-1.8"
 SRC_URI = "file://lib \
            file://License.txt"
 
-FILES_${PN} += "${libdir}/dri ${libdir}/xorg/modules/drivers"
+FILES_${PN} += "${libdir}/dri ${libdir}/gstreamer-0.10 ${libdir}/xorg/modules/drivers"
 FILES_${PN}-dev += "${libdir}/*.so"
 FILES_${PN}-dbg += "${libdir}/xorg/modules/drivers/.debug ${libdir}/dri/.debug"
 
 S = "${WORKDIR}"
 
 do_install () {
-    install -d -m 0755                    ${D}/${libdir}/dri
-    install -d -m 0755                    ${D}/${libdir}/xorg/modules/drivers
-    install -m 0755 ${S}/lib/*.so.*       ${D}${libdir}/
-    install -m 0755 ${S}/lib/dri/*        ${D}${libdir}/dri/
+    install -d -m 0755                              ${D}/${libdir}/dri
+    install -d -m 0755                              ${D}/${libdir}/gstreamer-0.10
+    install -d -m 0755                              ${D}/${libdir}/xorg/modules/drivers
+    install -m 0755 ${S}/lib/*.so.*                 ${D}${libdir}/
+    install -m 0755 ${S}/lib/dri/*                  ${D}${libdir}/dri/
+    install -m 0755 ${S}/lib/gstreamer-0.10/*       ${D}${libdir}/gstreamer-0.10/
     install -m 0755 ${S}/lib/xorg/modules/drivers/* ${D}${libdir}/xorg/modules/drivers/
 
-    ln -sf libEGL.so.1                    ${D}${libdir}/libEGL.so
-    ln -sf libGLES_CM.so.1                ${D}${libdir}/libGLES_CM.so
-    ln -sf libGLESv2.so.2                 ${D}${libdir}/libGLESv2.so
-    ln -sf libEMGDScopeServices.so.1.5.15.3226 ${D}${libdir}/libPVRScopeServices.so
+    ln -sf libEGL.so.1                              ${D}${libdir}/libEGL.so
+    ln -sf libGLES_CM.so.1                          ${D}${libdir}/libGLES_CM.so
+    ln -sf libGLESv2.so.2                           ${D}${libdir}/libGLESv2.so
+    ln -sf libEMGDScopeServices.so.1.5.15.3226      ${D}${libdir}/libPVRScopeServices.so
 }
 
 LEAD_SONAME = "libEGL.so"
Signature · 1 line
1.7.0.4
#4 lore raw

PATCH 4/6 meta-crownbay: update README with EMGD video plugin instructions

In reply to [email protected]

From: Tom Zanussi <[email protected]>

Adding support for video acceleration means some new components need to be installed - update the instructions to reflect that.

---
 meta-crownbay/README |   27 +++++++++++++++++++++------
 1 files changed, 21 insertions(+), 6 deletions(-)
meta-crownbay/README +21 -6
index e1cf28d..65289f7 100644
@@ -144,8 +144,8 @@ $ rpm2cpio emgd-bin-2032-1.6.i586.rpm > emgd-bin-2032-1.6.i586.cpio
 $ mkdir extracted; cd extracted
 $ cpio -idv < ../emgd-bin-2032-1.6.i586.cpio
 
-Finally, you can copy the xorg-xserver binaries to the
-emgd-driver-bin-1.8 directory in meta-intel/common:
+You can now copy the xorg-xserver binaries to the emgd-driver-bin-1.8
+directory in meta-intel/common:
 
 $ cp -a usr/lib meta-intel/common/recipes-graphics/xorg-xserver/emgd-driver-bin-1.8
 
@@ -153,10 +153,25 @@ You also need to copy the IEMGD License.txt file to the same directory:
 
 $ cp IEMGD_HEAD_Linux/License/License.txt meta-intel/common/recipes/xorg-xserver/emgd-driver-bin-1.8
 
-Additionally, you should remove the following unused file from the
-emgd binaries in order to avoid a packaging error at build-time:
-
-$ rm meta-intel/common/recipes-graphics/xorg-xserver/emgd-driver-bin-1.8/lib/dri/emgd_drv_video.so
+Finally, you need to extract and copy the video plugins to the
+emgd-driver-bin-1.8 directory in meta-intel/common:
+ 
+$ cd IEMGD_HEAD_Linux/common/video_plugin
+$ rpm2cpio gst-plugins-mixvideo-0.10.30-1.i586.rpm > gst-plugins-mixvideo-0.10.30-1.i586.cpio
+$ rpm2cpio gst-plugins-va-0.10.7MFLD-1.i586.rpm > gst-plugins-va-0.10.7MFLD-1.i586.cpio
+$ rpm2cpio gst-vabuffer-0.10.5MFLD-1.i586.rpm > gst-vabuffer-0.10.5MFLD-1.i586.cpio
+$ rpm2cpio mixcommon-0.1.9-1.i586.rpm > mixcommon-0.1.9-1.i586.cpio
+$ rpm2cpio mixvbp-0.1.24-1.i586.rpm > mixvbp-0.1.24-1.i586.cpio
+$ rpm2cpio mixvideo-0.1.31-1.i586.rpm > mixvideo-0.1.31-1.i586.cpio
+$ mkdir extracted; cd extracted
+$ cpio -idv < ../gst-plugins-mixvideo-0.10.30-1.i586.cpio
+$ cpio -idv < ../gst-plugins-va-0.10.7MFLD-1.i586.cpio
+$ cpio -idv < ../gst-vabuffer-0.10.5MFLD-1.i586.cpio
+$ cpio -idv < ../mixcommon-0.1.9-1.i586.cpio
+$ cpio -idv < ../mixvbp-0.1.24-1.i586.cpio
+$ cpio -idv < ../mixvideo-0.1.31-1.i586.cpio
+$ rm usr/lib/*.so.0
+$ cp -a usr/lib meta-intel/common/recipes-graphics/xorg-xserver/emgd-driver-bin-1.8
 
 At this point, you should be able to build meta-crownbay images as usual.
 
Signature · 1 line
1.7.0.4
#5 lore raw

PATCH 5/6 meta-intel: add gst-meta-base .bbappend

In reply to [email protected]

From: Tom Zanussi <[email protected]>

We need some extra plugins for EMGD video acceleration use and testing, so append them to gst-meta-base.

---
 .../gstreamer/gst-meta-base_0.10.bbappend          |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
 create mode 100644 common/recipes-multimedia/gstreamer/gst-meta-base_0.10.bbappend
common/recipes-multimedia/gstreamer/gst-meta-base_0.10.bbappend new file +9 -0
new file mode 100644
index 0000000..61e3059
@@ -0,0 +1,9 @@
+RDEPENDS_gst-meta-video += "\
+    gst-plugins-good-isomp4"
+
+RDEPENDS_gst-meta-base += "\
+    gst-ffmpeg"
+
+COMPATIBLE_MACHINE = "(crownbay|fri2)"
+
+PR := "${PR}.0"
Signature · 1 line
1.7.0.4
#6 lore raw

PATCH 6/6 meta-intel: add libva to EGMD xserver

In reply to [email protected]

From: Tom Zanussi <[email protected]>

EMGD requires libva, so add the dependency here.

---
 conf/machine/include/ia32-base.inc |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
conf/machine/include/ia32-base.inc +3 -1
index 5cf2f4f..6522c9c 100644
@@ -53,6 +53,8 @@ XSERVER_IA32_I915 = "xf86-video-intel \
            mesa-dri-driver-i965 \
            "
 
-XSERVER_IA32_EMGD = "emgd-driver-bin"
+XSERVER_IA32_EMGD = "emgd-driver-bin \
+           libva \
+           "
 
 XSERVER_IA32_VESA = "xf86-video-vesa"
Signature · 1 line
1.7.0.4