Parent Directory | Revision Log
Revision 1054 - (view) (download)
1 : | edgomez | 213 | /***************************************************************************** |
2 : | * | ||
3 : | * XVID MPEG-4 VIDEO CODEC | ||
4 : | * - 8<->16 bit buffer transfer header - | ||
5 : | * | ||
6 : | edgomez | 1054 | * Copyright(C) 2001-2003 Peter Ross <pross@xvid.org> |
7 : | edgomez | 439 | * |
8 : | edgomez | 851 | * This program is free software ; you can redistribute it and/or modify |
9 : | * it under the terms of the GNU General Public License as published by | ||
10 : | * the Free Software Foundation ; either version 2 of the License, or | ||
11 : | edgomez | 213 | * (at your option) any later version. |
12 : | * | ||
13 : | * This program is distributed in the hope that it will be useful, | ||
14 : | edgomez | 851 | * but WITHOUT ANY WARRANTY ; without even the implied warranty of |
15 : | edgomez | 213 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 : | * GNU General Public License for more details. | ||
17 : | * | ||
18 : | * You should have received a copy of the GNU General Public License | ||
19 : | edgomez | 851 | * along with this program ; if not, write to the Free Software |
20 : | edgomez | 213 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 : | * | ||
22 : | edgomez | 1054 | * $Id: mem_transfer.h,v 1.12.2.1 2003-06-09 13:55:44 edgomez Exp $ |
23 : | edgomez | 213 | * |
24 : | ****************************************************************************/ | ||
25 : | |||
26 : | Isibaar | 3 | #ifndef _MEM_TRANSFER_H |
27 : | #define _MEM_TRANSFER_H | ||
28 : | |||
29 : | edgomez | 213 | /***************************************************************************** |
30 : | * transfer8to16 API | ||
31 : | ****************************************************************************/ | ||
32 : | |||
33 : | edgomez | 195 | typedef void (TRANSFER_8TO16COPY) (int16_t * const dst, |
34 : | const uint8_t * const src, | ||
35 : | uint32_t stride); | ||
36 : | edgomez | 213 | |
37 : | edgomez | 195 | typedef TRANSFER_8TO16COPY *TRANSFER_8TO16COPY_PTR; |
38 : | edgomez | 213 | |
39 : | /* Our global function pointer - Initialized in xvid.c */ | ||
40 : | Isibaar | 3 | extern TRANSFER_8TO16COPY_PTR transfer_8to16copy; |
41 : | edgomez | 213 | |
42 : | /* Implemented functions */ | ||
43 : | Isibaar | 3 | TRANSFER_8TO16COPY transfer_8to16copy_c; |
44 : | TRANSFER_8TO16COPY transfer_8to16copy_mmx; | ||
45 : | edgomez | 851 | TRANSFER_8TO16COPY transfer_8to16copy_3dne; |
46 : | ia64p | 210 | TRANSFER_8TO16COPY transfer_8to16copy_ia64; |
47 : | Isibaar | 3 | |
48 : | edgomez | 213 | /***************************************************************************** |
49 : | * transfer16to8 API | ||
50 : | ****************************************************************************/ | ||
51 : | |||
52 : | edgomez | 195 | typedef void (TRANSFER_16TO8COPY) (uint8_t * const dst, |
53 : | const int16_t * const src, | ||
54 : | uint32_t stride); | ||
55 : | typedef TRANSFER_16TO8COPY *TRANSFER_16TO8COPY_PTR; | ||
56 : | edgomez | 213 | |
57 : | /* Our global function pointer - Initialized in xvid.c */ | ||
58 : | Isibaar | 3 | extern TRANSFER_16TO8COPY_PTR transfer_16to8copy; |
59 : | edgomez | 213 | |
60 : | /* Implemented functions */ | ||
61 : | Isibaar | 3 | TRANSFER_16TO8COPY transfer_16to8copy_c; |
62 : | TRANSFER_16TO8COPY transfer_16to8copy_mmx; | ||
63 : | edgomez | 851 | TRANSFER_16TO8COPY transfer_16to8copy_3dne; |
64 : | ia64p | 210 | TRANSFER_16TO8COPY transfer_16to8copy_ia64; |
65 : | Isibaar | 3 | |
66 : | edgomez | 213 | /***************************************************************************** |
67 : | edgomez | 851 | * transfer8to16 + substraction *writeback* op API |
68 : | edgomez | 213 | ****************************************************************************/ |
69 : | |||
70 : | edgomez | 195 | typedef void (TRANSFER_8TO16SUB) (int16_t * const dct, |
71 : | uint8_t * const cur, | ||
72 : | const uint8_t * ref, | ||
73 : | const uint32_t stride); | ||
74 : | edgomez | 213 | |
75 : | edgomez | 195 | typedef TRANSFER_8TO16SUB *TRANSFER_8TO16SUB_PTR; |
76 : | Isibaar | 3 | |
77 : | edgomez | 213 | /* Our global function pointer - Initialized in xvid.c */ |
78 : | Isibaar | 3 | extern TRANSFER_8TO16SUB_PTR transfer_8to16sub; |
79 : | edgomez | 213 | |
80 : | /* Implemented functions */ | ||
81 : | Isibaar | 3 | TRANSFER_8TO16SUB transfer_8to16sub_c; |
82 : | TRANSFER_8TO16SUB transfer_8to16sub_mmx; | ||
83 : | edgomez | 851 | TRANSFER_8TO16SUB transfer_8to16sub_3dne; |
84 : | ia64p | 210 | TRANSFER_8TO16SUB transfer_8to16sub_ia64; |
85 : | Isibaar | 3 | |
86 : | edgomez | 213 | /***************************************************************************** |
87 : | edgomez | 851 | * transfer8to16 + substraction *readonly* op API |
88 : | ****************************************************************************/ | ||
89 : | |||
90 : | typedef void (TRANSFER_8TO16SUBRO) (int16_t * const dct, | ||
91 : | const uint8_t * const cur, | ||
92 : | const uint8_t * ref, | ||
93 : | const uint32_t stride); | ||
94 : | |||
95 : | typedef TRANSFER_8TO16SUBRO *TRANSFER_8TO16SUBRO_PTR; | ||
96 : | |||
97 : | /* Our global function pointer - Initialized in xvid.c */ | ||
98 : | extern TRANSFER_8TO16SUBRO_PTR transfer_8to16subro; | ||
99 : | |||
100 : | /* Implemented functions */ | ||
101 : | TRANSFER_8TO16SUBRO transfer_8to16subro_c; | ||
102 : | TRANSFER_8TO16SUBRO transfer_8to16subro_mmx; | ||
103 : | TRANSFER_8TO16SUBRO transfer_8to16subro_3dne; | ||
104 : | |||
105 : | /***************************************************************************** | ||
106 : | edgomez | 213 | * transfer8to16 + substraction op API - Bidirectionnal Version |
107 : | ****************************************************************************/ | ||
108 : | |||
109 : | edgomez | 195 | typedef void (TRANSFER_8TO16SUB2) (int16_t * const dct, |
110 : | uint8_t * const cur, | ||
111 : | const uint8_t * ref1, | ||
112 : | const uint8_t * ref2, | ||
113 : | const uint32_t stride); | ||
114 : | edgomez | 213 | |
115 : | edgomez | 195 | typedef TRANSFER_8TO16SUB2 *TRANSFER_8TO16SUB2_PTR; |
116 : | suxen_drol | 118 | |
117 : | edgomez | 213 | /* Our global function pointer - Initialized in xvid.c */ |
118 : | suxen_drol | 118 | extern TRANSFER_8TO16SUB2_PTR transfer_8to16sub2; |
119 : | edgomez | 213 | |
120 : | /* Implemented functions */ | ||
121 : | suxen_drol | 118 | TRANSFER_8TO16SUB2 transfer_8to16sub2_c; |
122 : | edgomez | 236 | TRANSFER_8TO16SUB2 transfer_8to16sub2_mmx; |
123 : | edgomez | 218 | TRANSFER_8TO16SUB2 transfer_8to16sub2_xmm; |
124 : | edgomez | 851 | TRANSFER_8TO16SUB2 transfer_8to16sub2_3dne; |
125 : | ia64p | 210 | TRANSFER_8TO16SUB2 transfer_8to16sub2_ia64; |
126 : | suxen_drol | 118 | |
127 : | |||
128 : | edgomez | 213 | /***************************************************************************** |
129 : | * transfer16to8 + addition op API | ||
130 : | ****************************************************************************/ | ||
131 : | |||
132 : | edgomez | 195 | typedef void (TRANSFER_16TO8ADD) (uint8_t * const dst, |
133 : | const int16_t * const src, | ||
134 : | uint32_t stride); | ||
135 : | edgomez | 213 | |
136 : | edgomez | 195 | typedef TRANSFER_16TO8ADD *TRANSFER_16TO8ADD_PTR; |
137 : | edgomez | 213 | |
138 : | /* Our global function pointer - Initialized in xvid.c */ | ||
139 : | Isibaar | 3 | extern TRANSFER_16TO8ADD_PTR transfer_16to8add; |
140 : | edgomez | 213 | |
141 : | /* Implemented functions */ | ||
142 : | Isibaar | 3 | TRANSFER_16TO8ADD transfer_16to8add_c; |
143 : | TRANSFER_16TO8ADD transfer_16to8add_mmx; | ||
144 : | edgomez | 851 | TRANSFER_16TO8ADD transfer_16to8add_3dne; |
145 : | ia64p | 210 | TRANSFER_16TO8ADD transfer_16to8add_ia64; |
146 : | Isibaar | 3 | |
147 : | edgomez | 213 | /***************************************************************************** |
148 : | * transfer8to8 + no op | ||
149 : | ****************************************************************************/ | ||
150 : | |||
151 : | edgomez | 195 | typedef void (TRANSFER8X8_COPY) (uint8_t * const dst, |
152 : | const uint8_t * const src, | ||
153 : | const uint32_t stride); | ||
154 : | edgomez | 213 | |
155 : | edgomez | 195 | typedef TRANSFER8X8_COPY *TRANSFER8X8_COPY_PTR; |
156 : | edgomez | 213 | |
157 : | /* Our global function pointer - Initialized in xvid.c */ | ||
158 : | Isibaar | 3 | extern TRANSFER8X8_COPY_PTR transfer8x8_copy; |
159 : | edgomez | 213 | |
160 : | /* Implemented functions */ | ||
161 : | Isibaar | 3 | TRANSFER8X8_COPY transfer8x8_copy_c; |
162 : | TRANSFER8X8_COPY transfer8x8_copy_mmx; | ||
163 : | edgomez | 851 | TRANSFER8X8_COPY transfer8x8_copy_3dne; |
164 : | ia64p | 210 | TRANSFER8X8_COPY transfer8x8_copy_ia64; |
165 : | Isibaar | 3 | |
166 : | edgomez | 851 | |
167 : | static __inline void | ||
168 : | transfer16x16_copy(uint8_t * const dst, | ||
169 : | const uint8_t * const src, | ||
170 : | const uint32_t stride) | ||
171 : | { | ||
172 : | transfer8x8_copy(dst, src, stride); | ||
173 : | transfer8x8_copy(dst + 8, src + 8, stride); | ||
174 : | transfer8x8_copy(dst + 8*stride, src + 8*stride, stride); | ||
175 : | transfer8x8_copy(dst + 8*stride + 8, src + 8*stride + 8, stride); | ||
176 : | } | ||
177 : | |||
178 : | static __inline void | ||
179 : | transfer32x32_copy(uint8_t * const dst, | ||
180 : | const uint8_t * const src, | ||
181 : | const uint32_t stride) | ||
182 : | { | ||
183 : | transfer16x16_copy(dst, src, stride); | ||
184 : | transfer16x16_copy(dst + 16, src + 16, stride); | ||
185 : | transfer16x16_copy(dst + 16*stride, src + 16*stride, stride); | ||
186 : | transfer16x16_copy(dst + 16*stride + 16, src + 16*stride + 16, stride); | ||
187 : | } | ||
188 : | |||
189 : | |||
190 : | edgomez | 213 | #endif |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |