History

[Processing/x86] Simplify denoisefilter X86_32_PICASM handling

Utilize program counter-relative offsets to simplify X86_32_PICASM code. In order for this to work with nasm, data constants are placed in the text segment.

Sindre Aamås committed 9 years ago

Commit 4769d4d1 parent 17eed991 file · +7 −14Browse files

Showing the changes to codec/processing/src (1 of 1 file). Show all

Unified · Split

codec/processing/src/x86/denoisefilter.asm+7−14
@@ -44,7 +44,11 @@ · 43 unmodified lines
44;***********************************************************************44;***********************************************************************
45; Constant45; Constant
46;***********************************************************************46;***********************************************************************
47%ifdef X86_32_PICASM
48SECTION .text align=16
49%else
47SECTION .rodata align=1650SECTION .rodata align=16
51%endif
48 52
49sse2_32 times 8 dw 3253sse2_32 times 8 dw 32
50sse2_20 times 8 dw 2054sse2_20 times 8 dw 20
@@ -147,20 +151,7 @@ SECTION .text · 96 unmodified lines
147 movdqa %2, %1151 movdqa %2, %1
148 psrldq %2, 2152 psrldq %2, 2
149 punpcklbw %2, %4153 punpcklbw %2, %4
150%ifdef X86_32_PICASM154 pmullw %2, [pic(sse2_20)]
151 push r0
152 mov r0, esp
153 and esp, 0xfffffff0
154 push 0x00140014
155 push 0x00140014
156 push 0x00140014
157 push 0x00140014
158 pmullw %2, [esp]
159 mov esp, r0
160 pop r0
161%else
162 pmullw %2, [sse2_20]
163%endif
164 paddw %3, %2155 paddw %3, %2
165 156
166 movdqa %2, %1157 movdqa %2, %1
@@ -254,6 +245,7 @@ WELS_EXTERN WaverageChromaFilter8_sse2 · 87 unmodified lines
254 245
255 %assign push_num 1246 %assign push_num 1
256 247
248 INIT_X86_32_PIC r4
257 LOAD_2_PARA249 LOAD_2_PARA
258 250
259 mov r3, r1251 mov r3, r1
@@ -285,6 +277,7 @@ WELS_EXTERN WaverageChromaFilter8_sse2 · 25 unmodified lines
285 movq [r0 + 2], xmm3277 movq [r0 + 2], xmm3
286 278
287 279
280 DEINIT_X86_32_PIC
288 pop r3281 pop r3
289 282
290 %assign push_num 0283 %assign push_num 0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t