Commit 52f84d82 authored by Ronald S. Bultje's avatar Ronald S. Bultje

videodsp: don't overread edges in vfix3 emu_edge.

Fixes trac ticket 3226. Also see Andreas' analysis in
https://bugs.debian.org/801745, which was very helpful.
parent 68346291
...@@ -194,8 +194,12 @@ hvar_fn ...@@ -194,8 +194,12 @@ hvar_fn
%elif (%2-%%off) == 2 %elif (%2-%%off) == 2
mov valw, [srcq+%2-2] mov valw, [srcq+%2-2]
%elifidn %1, body %elifidn %1, body
mov vald, [srcq+%2-3] mov valb, [srcq+%2-1]
%else sal vald, 16
mov valw, [srcq+%2-3]
%elifidn %1, bottom
movd mm %+ %%mmx_idx, [srcq+%2-4]
%else ; top
movd mm %+ %%mmx_idx, [srcq+%2-3] movd mm %+ %%mmx_idx, [srcq+%2-3]
%endif %endif
%endif ; (%2-%%off) >= 1 %endif ; (%2-%%off) >= 1
...@@ -251,12 +255,15 @@ hvar_fn ...@@ -251,12 +255,15 @@ hvar_fn
mov [dstq+%2-2], valw mov [dstq+%2-2], valw
%elifidn %1, body %elifidn %1, body
mov [dstq+%2-3], valw mov [dstq+%2-3], valw
shr vald, 16 sar vald, 16
mov [dstq+%2-1], valb mov [dstq+%2-1], valb
%else %else
movd vald, mm %+ %%mmx_idx movd vald, mm %+ %%mmx_idx
%ifidn %1, bottom
sar vald, 8
%endif
mov [dstq+%2-3], valw mov [dstq+%2-3], valw
shr vald, 16 sar vald, 16
mov [dstq+%2-1], valb mov [dstq+%2-1], valb
%endif %endif
%endif ; (%2-%%off) >= 1 %endif ; (%2-%%off) >= 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment