changeset 35032:5dcaa3aa2c7b

Add Video Decode Acceleration support. Patch by Xidorn Quan, quanxunzhen gmail
author cehoyos
date Tue, 28 Aug 2012 20:47:34 +0000
parents 135b1ef31668
children 387485e3956a
files configure etc/codecs.conf
diffstat 2 files changed, 41 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Mon Aug 27 20:46:06 2012 +0000
+++ b/configure	Tue Aug 28 20:47:34 2012 +0000
@@ -503,6 +503,7 @@
   --enable-xmga            enable mga_vid X11 video output [autodetect]
   --enable-xv              enable Xv video output [autodetect]
   --enable-xvmc            enable XvMC acceleration [disable]
+  --enable-vda             enable VDA acceleration [autodetect]
   --enable-vdpau           enable VDPAU acceleration [autodetect]
   --enable-vm              enable XF86VidMode support [autodetect]
   --enable-xinerama        enable Xinerama support [autodetect]
@@ -696,6 +697,7 @@
 _dga2=auto
 _xv=auto
 _xvmc=no  #auto when complete
+_vda=auto
 _vdpau=auto
 _sdl=auto
 _kva=auto
@@ -1039,6 +1041,8 @@
   --disable-xv)         _xv=no          ;;
   --enable-xvmc)        _xvmc=yes       ;;
   --disable-xvmc)       _xvmc=no        ;;
+  --enable-vda)         _vda=yes        ;;
+  --disable-vda)        _vda=no         ;;
   --enable-vdpau)       _vdpau=yes      ;;
   --disable-vdpau)      _vdpau=no       ;;
   --enable-sdl)         _sdl=yes        ;;
@@ -4437,6 +4441,22 @@
 echores "$_xvmc"
 
 
+echocheck "Video Decode Acceleration (VDA)"
+if test "$_vda" = auto ; then
+  _vda=no
+  header_check VideoDecodeAcceleration/VDADecoder.h && _vda=yes
+fi
+if test "$_vda" = yes ; then
+  def_vda='#define CONFIG_VDA 1'
+  extra_ldflags="$extra_ldflags -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore"
+  libavhwaccels="H264_VDA_HWACCEL"
+else
+  def_vda='#define CONFIG_VDA 0'
+  libavdecoders=$(echo $libavdecoders | sed -e 's/[A-Z0-9]*_VDA_DECODER//g')
+fi
+echores "$_vda"
+
+
 echocheck "VDPAU"
 if test "$_vdpau" = auto && test "$_x11" = yes ; then
   _vdpau=no
@@ -8234,6 +8254,7 @@
 UNRAR_EXEC = $_unrar_exec
 V4L2 = $_v4l2
 VCD = $_vcd
+VDA = $_vda
 VDPAU = $_vdpau
 VESA = $_vesa
 VIDIX = $_vidix
@@ -8350,6 +8371,7 @@
 CONFIG_NETWORK  = $networking
 CONFIG_RTPDEC   = $networking
 CONFIG_VF_LAVFI = $_vf_lavfi
+CONFIG_VDA      = $_vda
 CONFIG_VDPAU    = $_vdpau
 CONFIG_XVMC     = $_xvmc
 CONFIG_ZLIB     = $_zlib
--- a/etc/codecs.conf	Mon Aug 27 20:46:06 2012 +0000
+++ b/etc/codecs.conf	Tue Aug 28 20:47:34 2012 +0000
@@ -1306,6 +1306,25 @@
   dll h264_crystalhd
   out YUY2
 
+videocodec ffh264vda
+  info "FFmpeg H.264 (VDA)"
+  status working
+  fourcc H264,h264
+  fourcc X264,x264
+  fourcc avc1,AVC1
+  fourcc davc,DAVC
+  fourcc vvvc ; only one sample using this fourcc
+  fourcc ai1p,ai1q,ai12,ai13
+  fourcc ai15,ai16
+  fourcc ai5p,ai5q,ai52,ai53
+  fourcc ai55,ai56
+  fourcc x3eV
+  fourcc Q264
+  format 0x10000005
+  driver ffmpeg
+  dll h264_vda
+  out YUY2,UYVY,YV12,NV12
+
 ;http://corecodec.org/
 videocodec coreavcwindows
   info "CoreAVC H.264 for x86"