Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Side by Side Diff: media/base/simd/yuv_row.inc

Issue 7003082: Implements RGB to YV12 conversion in YASM. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 ; Copyright (c) 2011 The Chromium Authors. All rights reserved.
Alpha Left Google 2011/08/22 14:16:59 Rename this to yuv_row_common_sse2.inc, there migh
2 ; Use of this source code is governed by a BSD-style license that can be
3 ; found in the LICENSE file.
4
5 %ifndef MEDIA_BASE_SIMD_COMMON_INC_
Alpha Left Google 2011/08/22 14:16:59 This should be MEDIA_BASE_YUV_ROW_COMMON_SSE2_INC_
6 %define MEDIA_BASE_SIMD_COMMON_INC_
7
8 %define EXTN(name) name ; foo() -> foo
9
10 %ifdef MACHO
11 %define PRIVATE :private_extern
12 %elifdef ELF
13 %define PRIVATE :hidden
14 %else
15 %define PRIVATE
16 %endif
17
18 %ifdef MACHO
19 %define SEG_TEXT .text align=16
20 %define SEG_CONST .rodata align=16
21 %elifdef ELF
22 %ifdef __x86_64__
23 %define SEG_TEXT .text progbits align=16
24 %define SEG_CONST .rodata progbits align=16
25 %else
26 %define SEG_TEXT .text progbits alloc exec nowrite align=16
27 %define SEG_CONST .rodata progbits alloc noexec nowrite align=16
28 %endif
29 %elifdef MSVC
30 %define SEG_TEXT .text align=16
31 %define SEG_CONST .rdata align=16
32 %endif
33
34 %define SIZEOF_BYTE 1 ; sizeof(BYTE)
35 %define SIZEOF_WORD 2 ; sizeof(WORD)
36 %define SIZEOF_DWORD 4 ; sizeof(DWORD)
37 %define SIZEOF_QWORD 8 ; sizeof(QWORD)
38 %define SIZEOF_DQWORD 16 ; sizeof(DQWORD)
39
40 %ifdef __x86_64__
41 %define POINTER qword ; general pointer type
42 %define SIZEOF_POINTER SIZEOF_QWORD ; sizeof(POINTER)
43 %define POINTER_BIT QWORD_BIT ; sizeof(POINTER) * BYTE_BIT
44 %else
45 %define POINTER dword ; general pointer type
46 %define SIZEOF_POINTER SIZEOF_DWORD ; sizeof(POINTER)
47 %define POINTER_BIT DWORD_BIT ; sizeof(POINTER) * BYTE_BIT
48 %endif
49
50 %define INT dword ; signed integer type
51 %define SIZEOF_INT SIZEOF_DWORD ; sizeof(INT)
52 %define INT_BIT DWORD_BIT ; sizeof(INT) * BYTE_BIT
53
54 %define MMWORD qword ; int64 (MMX register)
55 %define SIZEOF_MMWORD SIZEOF_QWORD ; sizeof(MMWORD)
56 %define MMWORD_BIT QWORD_BIT ; sizeof(MMWORD) * BYTE_BIT
57 %define XMMWORD ; int128 (SSE register)
58 %define SIZEOF_XMMWORD SIZEOF_DQWORD ; sizeof(XMMWORD)
59 %define XMMWORD_BIT DQWORD_BIT ; sizeof(XMMWORD) * BYTE_BIT
60
61 ; Aliases for x86 registers.
62 %ifdef __x86_64__
63 %define _EAX_ rax
64 %define _EBX_ rbx
65 %define _ECX_ rcx
66 %define _EDX_ rdx
67 %define _ESI_ rsi
68 %define _EDI_ rdi
69 %define _ESP_ rsp
70 %define _EBP_ rbp
71 %else
72 %define _EAX_ eax
73 %define _EBX_ ebx
74 %define _ECX_ ecx
75 %define _EDX_ edx
76 %define _ESI_ esi
77 %define _EDI_ edi
78 %define _ESP_ esp
79 %define _EBP_ ebp
80 %endif
81
82 ; LOADSYM register, symbol
83 ; Copies the address to a local symbol to the specified register.
Alpha Left Google 2011/08/22 14:16:59 Do a one liner to explain why we need to do this:
84 %ifdef MACHO
Alpha Left Google 2011/08/22 14:16:59 Both Linux and Mac uses PIC.
85 ; We create a PIC binary on Mac.
86 %imacro LOADSYM 2
87 call %%geteip
88 add %1, %2 - $
89 jmp %%end
90 %%geteip:
91 mov %1, POINTER [_ESP_]
92 ret
93 %%end:
94 %endmacro
95 %else
96 %imacro LOADSYM 2
Alpha Left Google 2011/08/22 14:16:59 Do a one liner explanation here.
97 lea %1, [%2]
98 %endmacro
99 %endif ; MACHO
100
101 %endif ; MEDIA_BASE_SIMD_COMMON_INC_
Alpha Left Google 2011/08/22 14:16:59 This one needs to change too.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698