[FFmpeg-user] No visible difference between hwaccel and no hwaccel

Jonathan Haws Jonathan.Haws at sdl.usu.edu
Thu Apr 18 01:44:21 CEST 2013


Question:

I am trying to benchmark the difference between VA-API accelerated decoding and non-accelerated.  I have an H.264 encoded video that I am using.  Here is what I have tried:

Build latest from GIT with --enable-vaapi:

./configure --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --disable-indev=jack --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect --enable-vaapi --enable-gpl
make &&make install

Then I run:

ffmpeg -benchmark -i myfile.mp4 -f null -

With htop I see that the ffmpeg threads are consuming no more than 1.3% of the CPU (totalling around 10% overall).

Then I rebuild ffmpeg:

./configure --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --disable-indev=jack --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect --enable-gpl
make &&make install

And rerun the same test.  Then I see nearly the exact same output - CPU usage at about 10%.

I am running this on an Intel i7 (Ivy Bridge) with the following installed:

libva.x86_64 (1.1.0-5)
libva-devel.x86_64 (1.1.0-5)
libva-utils.x86_64 (1.1.0-5)
libva-intel-driver.x86_64 (1.0.20-1)
xorg-x11-drv-intel.x86_64 (2.21.5-1)
xorg-x11-proto-devel.noarch (7.6-24)
xorg-x11-server-Xorg.x86_64 (1.13.3-2)
xorg-x11-server-common.x86_64 (1.13.3-2)
xorg-x11-server-devel.x86_64 (1.13.3-2)
xorg-x11-util-macros.noarch (1.17-2)
xorg-x11-xkb-utils.x86_64 (7.7-5)
mesa-dri-drivers.x86_64 (9.1-3)
mesa-dri-filesystem.x86_64 (9.1-3)
mesa-libEGL.x86_64 (9.1-3)
mesa-libGL.x86_64 (9.1-3)
mesa-libGL-devel.x86_64 (9.1-3)
mesa-libGLU.x86_64 (9.0.0-1)
mesa-libgbm.x86_64 (9.1-3)
mesa-libglapi.x86_64 (9.1-3)

Why can't I see a difference between the two?  Shouldn't the CPU usage be lower for the accelerated build?  What am I missing?

Thanks!
Jon


More information about the ffmpeg-user mailing list