4 |
; * - GMC core functions - |
; * - GMC core functions - |
5 |
; * Copyright(C) 2006 Pascal Massimino <skal@planet-d.net> |
; * Copyright(C) 2006 Pascal Massimino <skal@planet-d.net> |
6 |
; * |
; * |
7 |
; * This file is part of XviD, a free MPEG-4 video encoder/decoder |
; * This file is part of Xvid, a free MPEG-4 video encoder/decoder |
8 |
; * |
; * |
9 |
; * XviD is free software; you can redistribute it and/or modify it |
; * Xvid is free software; you can redistribute it and/or modify it |
10 |
; * under the terms of the GNU General Public License as published by |
; * under the terms of the GNU General Public License as published by |
11 |
; * the Free Software Foundation; either version 2 of the License, or |
; * the Free Software Foundation; either version 2 of the License, or |
12 |
; * (at your option) any later version. |
; * (at your option) any later version. |
20 |
; * along with this program; if not, write to the Free Software |
; * along with this program; if not, write to the Free Software |
21 |
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
; * |
; * |
23 |
; * $Id: gmc_mmx.asm,v 1.6 2008-11-26 01:04:34 Isibaar Exp $ |
; * $Id: gmc_mmx.asm,v 1.12 2010-03-09 10:00:14 Isibaar Exp $ |
24 |
; * |
; * |
25 |
; *************************************************************************/ |
; *************************************************************************/ |
26 |
|
|
48 |
Cst16: |
Cst16: |
49 |
times 8 dw 16 |
times 8 dw 16 |
50 |
|
|
51 |
SECTION .rotext align=SECTION_ALIGN |
TEXT |
52 |
|
|
53 |
;////////////////////////////////////////////////////////////////////// |
;////////////////////////////////////////////////////////////////////// |
54 |
;// mmx version |
;// mmx version |
104 |
GMC_4_SSE 0, mm5 |
GMC_4_SSE 0, mm5 |
105 |
GMC_4_SSE 4, mm6 |
GMC_4_SSE 4, mm6 |
106 |
|
|
107 |
; pshufw mm4, prm5, 01010101b ; Rounder (bits [16..31]) |
; pshufw mm4, prm5d, 01010101b ; Rounder (bits [16..31]) |
108 |
movd mm4, prm5d ; Rounder (bits [16..31]) |
movd mm4, prm5d ; Rounder (bits [16..31]) |
109 |
mov _EAX, prm1 ; Dst |
mov _EAX, prm1 ; Dst |
110 |
punpcklwd mm4, mm4 |
punpcklwd mm4, mm4 |
174 |
|
|
175 |
align SECTION_ALIGN |
align SECTION_ALIGN |
176 |
xvid_GMC_Core_Lin_8_sse2: |
xvid_GMC_Core_Lin_8_sse2: |
177 |
|
PUSH_XMM6_XMM7 |
178 |
|
|
179 |
mov _EAX, prm2 ; Offsets |
mov _EAX, prm2 ; Offsets |
180 |
mov TMP0, prm3 ; Src0 |
mov TMP0, prm3 ; Src0 |
181 |
mov TMP1, prm4 ; BpS |
mov TMP1, prm4 ; BpS |
194 |
packuswb xmm5, xmm5 |
packuswb xmm5, xmm5 |
195 |
movq [_EAX], xmm5 |
movq [_EAX], xmm5 |
196 |
|
|
197 |
|
POP_XMM6_XMM7 |
198 |
ret |
ret |
199 |
ENDFUNC |
ENDFUNC |
200 |
|
|
220 |
ENDFUNC |
ENDFUNC |
221 |
|
|
222 |
;////////////////////////////////////////////////////////////////////// |
;////////////////////////////////////////////////////////////////////// |
223 |
|
NON_EXEC_STACK |
|
%ifidn __OUTPUT_FORMAT__,elf |
|
|
section ".note.GNU-stack" noalloc noexec nowrite progbits |
|
|
%endif |
|