[Libav-user] gcc auto-vectorisation

"René J.V. Bertin" rjvbertin at gmail.com
Mon Feb 25 20:04:51 CET 2013


On Feb 25, 2013, at 12:00, Carl Eugen Hoyos wrote:

> René J.V. Bertin <rjvbertin at ...> writes:
> 
>> The SIMD version ran twice as fast as the scalar version 
>> until I used gcc 4.7, which has auto-vectorisation
> 
> Unfortunately, turning auto-vectorisation on triggers 
> bugs in gcc and is therefore no option;-(

I've had some time to check up on this. On my system (a Macbook Pro 13" with a 2.6Ghz i7 running OS X 10.6.8), I only had 4 failing tests after building for i386 with MacPort's gcc-4.7 with -ftree-vectorize . However, if the duration of make check is any indication, auto-vectorisation does not give any performance benefit (or hit); for both, the tests (2nd make check call) take about 249 seconds.

ffmpeg version N-50309-gaf0e814
built on Feb 25 2013 19:29:42 with gcc 4.7.2 (MacPorts gcc47 4.7.2_2+universal)
configuration: --prefix=/usr/local/FFmpeg/trunk --target-os=darwin --enable-shared --enable-static --enable-gpl --enable-nonfree --enable-libfreetype --enable-pthreads --enable-yasm --disable-doc --cpu=core2 --enable-debug=1 --disable-stripping --enable-ffmpeg --enable-ffprobe --disable-ffplay --enable-hwaccels --enable-libx264 --cc=gcc-mp-4.7 --disable-outdev=sdl
CFLAGS env. variable val when doing configure:
CFLAGS="-march=core2 -O3 -finline-functions -funroll-loops -fstrict-aliasing -msse3 -msse4 -mssse3 -I/opt/X11/include -ftracer -ftree-vectorize -arch i386 "

TEST    vsynth1-snow
/Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/fate-run.sh fate-vsynth1-snow "" "" "/Volumes/Debian/Users/bertin/work/src/FFmpeg/osx86" 'enc_dec "rawvideo -s 352x288 -pix_fmt yuv420p " tests/data/vsynth1.yuv avi "-c snow -strict -2 -qscale 2 -flags +qpel -me_method iter -dia_size 2 -cmp 12 -subcmp 12 -s 128x64" rawvideo "-s 352x288 -pix_fmt yuv420p -vsync 0 " -keep ""' '' '/Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/ref/vsynth/vsynth1-snow' '' '' '' '' '' '' '' '1'
--- /Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/ref/vsynth/vsynth1-snow	2013-01-21 17:17:04.000000000 +0100
+++ tests/data/fate/vsynth1-snow	2013-02-25 19:32:26.000000000 +0100
@@ -1,4 +1,4 @@
-44fed844eb715fba0cc2433e7d7713bb *tests/data/fate/vsynth1-snow.avi
-136076 tests/data/fate/vsynth1-snow.avi
-91021b7d6d7908648fe78cc1975af8c4 *tests/data/fate/vsynth1-snow.out.rawvideo
-stddev:   22.77 PSNR: 20.98 MAXDIFF:  172 bytes:  7603200/  7603200
+ba4214dd3f747639bdf0b480a0fc3191 *tests/data/fate/vsynth1-snow.avi
+236338 tests/data/fate/vsynth1-snow.avi
+f138d3e725eb6fd9fe7a7ce9e60f8146 *tests/data/fate/vsynth1-snow.out.rawvideo
+stddev:   27.56 PSNR: 19.32 MAXDIFF:  223 bytes:  7603200/  7603200
Test vsynth1-snow failed. Look at tests/data/fate/vsynth1-snow.err for details.
make: *** [fate-vsynth1-snow] Error 1
TEST    vsynth1-snow-hpel
/Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/fate-run.sh fate-vsynth1-snow-hpel "" "" "/Volumes/Debian/Users/bertin/work/src/FFmpeg/osx86" 'enc_dec "rawvideo -s 352x288 -pix_fmt yuv420p " tests/data/vsynth1.yuv avi "-c snow -strict -2 -qscale 2 -me_method iter -dia_size 2 -cmp 12 -subcmp 12 -s 128x64" rawvideo "-s 352x288 -pix_fmt yuv420p -vsync 0 " -keep ""' '' '/Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/ref/vsynth/vsynth1-snow-hpel' '' '' '' '' '' '' '' '1'
--- /Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/ref/vsynth/vsynth1-snow-hpel	2013-01-21 17:17:04.000000000 +0100
+++ tests/data/fate/vsynth1-snow-hpel	2013-02-25 19:32:27.000000000 +0100
@@ -1,4 +1,4 @@
-f60c8cb8f41b66bc38df87e9bdb84b34 *tests/data/fate/vsynth1-snow-hpel.avi
-138700 tests/data/fate/vsynth1-snow-hpel.avi
-d6845c8f1310e041afdcebc6bbfc449b *tests/data/fate/vsynth1-snow-hpel.out.rawvideo
-stddev:   22.74 PSNR: 20.99 MAXDIFF:  171 bytes:  7603200/  7603200
+2e5a43aa672ceabc7f5c743fee63e290 *tests/data/fate/vsynth1-snow-hpel.avi
+235404 tests/data/fate/vsynth1-snow-hpel.avi
+1e2869537b4ebe884a77605e2a636e34 *tests/data/fate/vsynth1-snow-hpel.out.rawvideo
+stddev:   26.57 PSNR: 19.64 MAXDIFF:  246 bytes:  7603200/  7603200
Test vsynth1-snow-hpel failed. Look at tests/data/fate/vsynth1-snow-hpel.err for details.
make: *** [fate-vsynth1-snow-hpel] Error 1

and

TEST    vsynth2-snow
/Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/fate-run.sh fate-vsynth2-snow "" "" "/Volumes/Debian/Users/bertin/work/src/FFmpeg/osx86" 'enc_dec "rawvideo -s 352x288 -pix_fmt yuv420p " tests/data/vsynth2.yuv avi "-c snow -strict -2 -qscale 2 -flags +qpel -me_method iter -dia_size 2 -cmp 12 -subcmp 12 -s 128x64" rawvideo "-s 352x288 -pix_fmt yuv420p -vsync 0 " -keep ""' '' '/Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/ref/vsynth/vsynth2-snow' '' '' '' '' '' '' '' '1'
--- /Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/ref/vsynth/vsynth2-snow	2013-01-21 17:17:04.000000000 +0100
+++ tests/data/fate/vsynth2-snow	2013-02-25 19:33:25.000000000 +0100
@@ -1,4 +1,4 @@
-4b6236e23ae4a52655f2c24c5a09380a *tests/data/fate/vsynth2-snow.avi
-57688 tests/data/fate/vsynth2-snow.avi
-8890189af71a0dd3447c4e8424c9a76b *tests/data/fate/vsynth2-snow.out.rawvideo
-stddev:   10.47 PSNR: 27.72 MAXDIFF:  119 bytes:  7603200/  7603200
+37ab2db2f1a5e7b6c5eefa5923e7e055 *tests/data/fate/vsynth2-snow.avi
+153908 tests/data/fate/vsynth2-snow.avi
+e6033526feddf5e8966a4f2c6568e792 *tests/data/fate/vsynth2-snow.out.rawvideo
+stddev:   16.20 PSNR: 23.94 MAXDIFF:  203 bytes:  7603200/  7603200
Test vsynth2-snow failed. Look at tests/data/fate/vsynth2-snow.err for details.
make: *** [fate-vsynth2-snow] Error 1
TEST    vsynth2-snow-hpel
/Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/fate-run.sh fate-vsynth2-snow-hpel "" "" "/Volumes/Debian/Users/bertin/work/src/FFmpeg/osx86" 'enc_dec "rawvideo -s 352x288 -pix_fmt yuv420p " tests/data/vsynth2.yuv avi "-c snow -strict -2 -qscale 2 -me_method iter -dia_size 2 -cmp 12 -subcmp 12 -s 128x64" rawvideo "-s 352x288 -pix_fmt yuv420p -vsync 0 " -keep ""' '' '/Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/ref/vsynth/vsynth2-snow-hpel' '' '' '' '' '' '' '' '1'
--- /Volumes/Debian/Users/bertin/work/src/FFmpeg/tests/ref/vsynth/vsynth2-snow-hpel	2013-01-21 17:17:04.000000000 +0100
+++ tests/data/fate/vsynth2-snow-hpel	2013-02-25 19:33:26.000000000 +0100
@@ -1,4 +1,4 @@
-9872032345c33cf8e8fc26ab655be3d3 *tests/data/fate/vsynth2-snow-hpel.avi
-61760 tests/data/fate/vsynth2-snow-hpel.avi
-8680d40905f423999d65b996c4dcb984 *tests/data/fate/vsynth2-snow-hpel.out.rawvideo
-stddev:   10.45 PSNR: 27.74 MAXDIFF:  123 bytes:  7603200/  7603200
+41255ade6e07c026c851bf5cc6d9815b *tests/data/fate/vsynth2-snow-hpel.avi
+155434 tests/data/fate/vsynth2-snow-hpel.avi
+fd30dcfa74fbddc2113d64872be40e1d *tests/data/fate/vsynth2-snow-hpel.out.rawvideo
+stddev:   15.32 PSNR: 24.42 MAXDIFF:  197 bytes:  7603200/  7603200
Test vsynth2-snow-hpel failed. Look at tests/data/fate/vsynth2-snow-hpel.err for details.
make: *** [fate-vsynth2-snow-hpel] Error 1






More information about the Libav-user mailing list