swscale: handle unaligned buffers in yuv2plane1
authorRonald S. Bultje <rsbultje@gmail.com>
Sun, 13 Nov 2011 04:40:41 +0000 (05:40 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 13 Nov 2011 07:27:20 +0000 (08:27 +0100)
The issue had been introduced in
c435653627529e22d74214c2266f571255e404d6

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libswscale/x86/scale.asm

index 64699ea..3bdf71b 100644 (file)
@@ -718,6 +718,8 @@ yuv2planeX_fn avx,  10,  7, 5
 
 %macro yuv2plane1_fn 3
 cglobal yuv2plane1_%1, %3, %3, %2
+    add             r2, mmsize - 1
+    and             r2, ~(mmsize - 1)
 %if %1 == 8
     add             r1, r2
 %else ; %1 != 8