Browse code

swscale: handle unaligned buffers in yuv2plane1

The issue had been introduced in
c435653627529e22d74214c2266f571255e404d6

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

Ronald S. Bultje authored on 2011/11/13 13:40:41
Showing 1 changed files
... ...
@@ -718,6 +718,8 @@ yuv2planeX_fn avx,  10,  7, 5
718 718
 
719 719
 %macro yuv2plane1_fn 3
720 720
 cglobal yuv2plane1_%1, %3, %3, %2
721
+    add             r2, mmsize - 1
722
+    and             r2, ~(mmsize - 1)
721 723
 %if %1 == 8
722 724
     add             r1, r2
723 725
 %else ; %1 != 8