unaligned memory read with mplayer's mcdeint filter
Evgeniy Stepanov <eugeni.stepanov <at> gmail.com>
2008-03-02 01:12:50 GMT
Hi,
it turns out, for quite some time mplayer has been crashing with a segfault if
run with -vf mcdeint=2. There is a message in mplayer-user regarding this.
The reason is unaligned memory access in sad16_sse2 function, the first psadbw
instruction. It seems that sad16_sse2 expects 16 bytes aligned blk1 and blk2.
At the same time, get_block_rd() from snow.c calls it with only 4 bytes
aligned data when block_w==8.
$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured
with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2
--program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr
--enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.3 20071023 (prerelease) (Ubuntu 4.2.2-3ubuntu3)
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1230223152 (LWP 23204)]
0x085180a9 in sad16_sse2 (v=0xb57843c0, blk2=0xb530bfac '\200' <repeats 200
times>...,
blk1=0x8df6a8c '\200' <repeats 200 times>..., stride=672, h=16) at
i386/motion_est_mmx.c:94
94 asm volatile(
(gdb) bt
(Continue reading)