From 7d243701d986b8b7fa2d3148e7a09b52cffd272a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 13 Jul 2010 11:43:51 +0200 Subject: [PATCH] Replace pinsrw (SSE) with MMX instructions Fixes http://code.google.com/p/webm/issues/detail?id=136 Change-Id: I5a3e294061644a1a9718e8ba4a39548ede25cc42 --- vp8/decoder/x86/dequantize_mmx.asm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vp8/decoder/x86/dequantize_mmx.asm b/vp8/decoder/x86/dequantize_mmx.asm index 7ad9289..f11eef3 100644 --- a/vp8/decoder/x86/dequantize_mmx.asm +++ b/vp8/decoder/x86/dequantize_mmx.asm @@ -261,8 +261,6 @@ sym(vp8_dequant_dc_idct_add_mmx): mov rax, arg(0) ;input mov rdx, arg(1) ;dq - movsxd rcx, dword ptr arg(6) ;Dc - movq mm0, [rax ] pmullw mm0, [rdx] @@ -286,8 +284,13 @@ sym(vp8_dequant_dc_idct_add_mmx): movq [rax+16],mm7 movq [rax+24],mm7 + ; move lower word of Dc to lower word of mm0 + psrlq mm0, 16 + movzx rcx, word ptr arg(6) ;Dc + psllq mm0, 16 + movd mm7, rcx + por mm0, mm7 - pinsrw mm0, rcx, 0 movsxd rax, dword ptr arg(4) ;pitch movsxd rdi, dword ptr arg(5) ;stride -- 2.7.4