From: Loren Merritt Date: Thu, 30 Oct 2008 07:47:09 +0000 (-0700) Subject: Fix bug in hadamard_ac SSE assembly X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=dbc5ef040b1f8a83e7491dc8a2fc8943b1e20c07;p=x264.git Fix bug in hadamard_ac SSE assembly Some extreme inputs could cause overflows. --- diff --git a/common/x86/pixel-a.asm b/common/x86/pixel-a.asm index 5c646581..f1594be3 100644 --- a/common/x86/pixel-a.asm +++ b/common/x86/pixel-a.asm @@ -1463,12 +1463,13 @@ cglobal x264_pixel_hadamard_ac_%1x%2_%3, 2,3 paddusw m1, [rsp+0x60] paddusw m0, [rsp+0x70] paddusw m1, [rsp+0x80] + psrlw m0, 1 %endif HADDW m0, m2 HADDW m1, m3 movd edx, m0 movd eax, m1 - shr edx, 2 + shr edx, 2 - (%1*%2 >> 8) shr eax, 1 %ifdef ARCH_X86_64 shl rdx, 32