5 |
; * |
; * |
6 |
; * Copyright(C) 2004 Peter Ross <pross@xvid.org> |
; * Copyright(C) 2004 Peter Ross <pross@xvid.org> |
7 |
; * |
; * |
8 |
; * XviD is free software; you can redistribute it and/or modify it |
; * Xvid is free software; you can redistribute it and/or modify it |
9 |
; * under the terms of the GNU General Public License as published by |
; * under the terms of the GNU General Public License as published by |
10 |
; * the Free Software Foundation; either version 2 of the License, or |
; * the Free Software Foundation; either version 2 of the License, or |
11 |
; * (at your option) any later version. |
; * (at your option) any later version. |
19 |
; * along with this program; if not, write to the Free Software |
; * along with this program; if not, write to the Free Software |
20 |
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
; * |
; * |
22 |
; * $Id: postprocessing_mmx.asm,v 1.8 2008-11-26 02:21:02 Isibaar Exp $ |
; * $Id: postprocessing_mmx.asm,v 1.14 2010-03-09 10:00:14 Isibaar Exp $ |
23 |
; * |
; * |
24 |
; *************************************************************************/ |
; *************************************************************************/ |
25 |
|
|
46 |
; Code |
; Code |
47 |
;============================================================================= |
;============================================================================= |
48 |
|
|
49 |
SECTION .rotext align=SECTION_ALIGN |
TEXT |
50 |
|
|
51 |
cglobal image_brightness_mmx |
cglobal image_brightness_mmx |
52 |
|
|
61 |
movq mm6, [mmx_0x80] |
movq mm6, [mmx_0x80] |
62 |
|
|
63 |
%ifdef ARCH_IS_X86_64 |
%ifdef ARCH_IS_X86_64 |
64 |
movsx _EAX, prm5d |
XVID_MOVSXD _EAX, prm5d |
65 |
lea r9, [mmx_offset] |
lea TMP0, [mmx_offset] |
66 |
movq mm7, [r9 + (_EAX + 128)*8] ; being lazy |
movq mm7, [TMP0 + (_EAX + 128)*8] ; being lazy |
67 |
%else |
%else |
68 |
mov eax, prm5d ; offset |
mov eax, prm5d ; offset |
69 |
movq mm7, [mmx_offset + (_EAX + 128)*8] ; being lazy |
movq mm7, [mmx_offset + (_EAX + 128)*8] ; being lazy |
104 |
jl .xloop |
jl .xloop |
105 |
|
|
106 |
add TMP1, TMP0 ; dst += stride |
add TMP1, TMP0 ; dst += stride |
107 |
sub _EDI, 1 |
dec _EDI |
108 |
jg .yloop |
jg .yloop |
109 |
|
|
110 |
pop _EDI |
pop _EDI |
114 |
ENDFUNC |
ENDFUNC |
115 |
;////////////////////////////////////////////////////////////////////// |
;////////////////////////////////////////////////////////////////////// |
116 |
|
|
117 |
%ifidn __OUTPUT_FORMAT__,elf |
NON_EXEC_STACK |
|
section ".note.GNU-stack" noalloc noexec nowrite progbits |
|
|
%endif |
|
|
|
|