[cvs] / xvidcore / src / utils / mem_transfer.h Repository:
ViewVC logotype

Annotation of /xvidcore/src/utils/mem_transfer.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (view) (download)

1 : edgomez 1.6 /*****************************************************************************
2 :     *
3 :     * XVID MPEG-4 VIDEO CODEC
4 :     * - 8<->16 bit buffer transfer header -
5 :     *
6 : edgomez 1.13 * Copyright(C) 2001-2003 Peter Ross <pross@xvid.org>
7 : edgomez 1.12 *
8 :     * 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 1.6 * (at your option) any later version.
12 :     *
13 :     * This program is distributed in the hope that it will be useful,
14 : edgomez 1.12 * but WITHOUT ANY WARRANTY ; without even the implied warranty of
15 : edgomez 1.6 * 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 1.12 * along with this program ; if not, write to the Free Software
20 : edgomez 1.6 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 :     *
22 : edgomez 1.13 * $Id$
23 : edgomez 1.6 *
24 :     ****************************************************************************/
25 :    
26 : Isibaar 1.1 #ifndef _MEM_TRANSFER_H
27 :     #define _MEM_TRANSFER_H
28 :    
29 : edgomez 1.6 /*****************************************************************************
30 :     * transfer8to16 API
31 :     ****************************************************************************/
32 :    
33 : edgomez 1.4 typedef void (TRANSFER_8TO16COPY) (int16_t * const dst,
34 :     const uint8_t * const src,
35 :     uint32_t stride);
36 : edgomez 1.6
37 : edgomez 1.4 typedef TRANSFER_8TO16COPY *TRANSFER_8TO16COPY_PTR;
38 : edgomez 1.6
39 :     /* Our global function pointer - Initialized in xvid.c */
40 : Isibaar 1.1 extern TRANSFER_8TO16COPY_PTR transfer_8to16copy;
41 : edgomez 1.6
42 :     /* Implemented functions */
43 : edgomez 1.13 extern TRANSFER_8TO16COPY transfer_8to16copy_c;
44 :    
45 :     #ifdef ARCH_IS_IA32
46 :     extern TRANSFER_8TO16COPY transfer_8to16copy_mmx;
47 :     extern TRANSFER_8TO16COPY transfer_8to16copy_3dne;
48 :     #endif
49 :    
50 :     #ifdef ARCH_IS_IA64
51 :     extern TRANSFER_8TO16COPY transfer_8to16copy_ia64;
52 :     #endif
53 : Isibaar 1.1
54 : edgomez 1.6 /*****************************************************************************
55 :     * transfer16to8 API
56 :     ****************************************************************************/
57 :    
58 : edgomez 1.4 typedef void (TRANSFER_16TO8COPY) (uint8_t * const dst,
59 :     const int16_t * const src,
60 :     uint32_t stride);
61 :     typedef TRANSFER_16TO8COPY *TRANSFER_16TO8COPY_PTR;
62 : edgomez 1.6
63 :     /* Our global function pointer - Initialized in xvid.c */
64 : Isibaar 1.1 extern TRANSFER_16TO8COPY_PTR transfer_16to8copy;
65 : edgomez 1.6
66 :     /* Implemented functions */
67 : edgomez 1.13 extern TRANSFER_16TO8COPY transfer_16to8copy_c;
68 :    
69 :     #ifdef ARCH_IS_IA32
70 :     extern TRANSFER_16TO8COPY transfer_16to8copy_mmx;
71 :     extern TRANSFER_16TO8COPY transfer_16to8copy_3dne;
72 :     #endif
73 :    
74 :     #ifdef ARCH_IS_IA64
75 :     extern TRANSFER_16TO8COPY transfer_16to8copy_ia64;
76 :     #endif
77 : Isibaar 1.1
78 : edgomez 1.6 /*****************************************************************************
79 : edgomez 1.12 * transfer8to16 + substraction *writeback* op API
80 : edgomez 1.6 ****************************************************************************/
81 :    
82 : edgomez 1.4 typedef void (TRANSFER_8TO16SUB) (int16_t * const dct,
83 :     uint8_t * const cur,
84 :     const uint8_t * ref,
85 :     const uint32_t stride);
86 : edgomez 1.6
87 : edgomez 1.4 typedef TRANSFER_8TO16SUB *TRANSFER_8TO16SUB_PTR;
88 : Isibaar 1.1
89 : edgomez 1.6 /* Our global function pointer - Initialized in xvid.c */
90 : Isibaar 1.1 extern TRANSFER_8TO16SUB_PTR transfer_8to16sub;
91 : edgomez 1.6
92 :     /* Implemented functions */
93 : edgomez 1.13 extern TRANSFER_8TO16SUB transfer_8to16sub_c;
94 :    
95 :     #ifdef ARCH_IS_IA32
96 :     extern TRANSFER_8TO16SUB transfer_8to16sub_mmx;
97 :     extern TRANSFER_8TO16SUB transfer_8to16sub_3dne;
98 :     #endif
99 :    
100 :     #ifdef ARCH_IS_IA64
101 :     extern TRANSFER_8TO16SUB transfer_8to16sub_ia64;
102 :     #endif
103 : Isibaar 1.1
104 : edgomez 1.6 /*****************************************************************************
105 : edgomez 1.12 * transfer8to16 + substraction *readonly* op API
106 :     ****************************************************************************/
107 :    
108 :     typedef void (TRANSFER_8TO16SUBRO) (int16_t * const dct,
109 :     const uint8_t * const cur,
110 :     const uint8_t * ref,
111 :     const uint32_t stride);
112 :    
113 :     typedef TRANSFER_8TO16SUBRO *TRANSFER_8TO16SUBRO_PTR;
114 :    
115 :     /* Our global function pointer - Initialized in xvid.c */
116 :     extern TRANSFER_8TO16SUBRO_PTR transfer_8to16subro;
117 :    
118 :     /* Implemented functions */
119 : edgomez 1.13 extern TRANSFER_8TO16SUBRO transfer_8to16subro_c;
120 :    
121 :     #ifdef ARCH_IS_IA32
122 :     extern TRANSFER_8TO16SUBRO transfer_8to16subro_mmx;
123 :     extern TRANSFER_8TO16SUBRO transfer_8to16subro_3dne;
124 :     #endif
125 : edgomez 1.12
126 :     /*****************************************************************************
127 : edgomez 1.6 * transfer8to16 + substraction op API - Bidirectionnal Version
128 :     ****************************************************************************/
129 :    
130 : edgomez 1.4 typedef void (TRANSFER_8TO16SUB2) (int16_t * const dct,
131 :     uint8_t * const cur,
132 :     const uint8_t * ref1,
133 :     const uint8_t * ref2,
134 :     const uint32_t stride);
135 : edgomez 1.6
136 : edgomez 1.4 typedef TRANSFER_8TO16SUB2 *TRANSFER_8TO16SUB2_PTR;
137 : suxen_drol 1.3
138 : edgomez 1.6 /* Our global function pointer - Initialized in xvid.c */
139 : suxen_drol 1.3 extern TRANSFER_8TO16SUB2_PTR transfer_8to16sub2;
140 : edgomez 1.6
141 :     /* Implemented functions */
142 : edgomez 1.13 extern TRANSFER_8TO16SUB2 transfer_8to16sub2_c;
143 : suxen_drol 1.3
144 : edgomez 1.13 #ifdef ARCH_IS_IA32
145 :     extern TRANSFER_8TO16SUB2 transfer_8to16sub2_mmx;
146 :     extern TRANSFER_8TO16SUB2 transfer_8to16sub2_xmm;
147 :     extern TRANSFER_8TO16SUB2 transfer_8to16sub2_3dne;
148 :     #endif
149 :    
150 :     #ifdef ARCH_IS_IA64
151 :     extern TRANSFER_8TO16SUB2 transfer_8to16sub2_ia64;
152 :     #endif
153 : suxen_drol 1.3
154 : edgomez 1.6 /*****************************************************************************
155 :     * transfer16to8 + addition op API
156 :     ****************************************************************************/
157 :    
158 : edgomez 1.4 typedef void (TRANSFER_16TO8ADD) (uint8_t * const dst,
159 :     const int16_t * const src,
160 :     uint32_t stride);
161 : edgomez 1.6
162 : edgomez 1.4 typedef TRANSFER_16TO8ADD *TRANSFER_16TO8ADD_PTR;
163 : edgomez 1.6
164 :     /* Our global function pointer - Initialized in xvid.c */
165 : Isibaar 1.1 extern TRANSFER_16TO8ADD_PTR transfer_16to8add;
166 : edgomez 1.6
167 :     /* Implemented functions */
168 : edgomez 1.13 extern TRANSFER_16TO8ADD transfer_16to8add_c;
169 :    
170 :     #ifdef ARCH_IS_IA32
171 :     extern TRANSFER_16TO8ADD transfer_16to8add_mmx;
172 :     extern TRANSFER_16TO8ADD transfer_16to8add_3dne;
173 :     #endif
174 :    
175 :     #ifdef ARCH_IS_IA64
176 :     extern TRANSFER_16TO8ADD transfer_16to8add_ia64;
177 :     #endif
178 : Isibaar 1.1
179 : edgomez 1.6 /*****************************************************************************
180 :     * transfer8to8 + no op
181 :     ****************************************************************************/
182 :    
183 : edgomez 1.4 typedef void (TRANSFER8X8_COPY) (uint8_t * const dst,
184 :     const uint8_t * const src,
185 :     const uint32_t stride);
186 : edgomez 1.6
187 : edgomez 1.4 typedef TRANSFER8X8_COPY *TRANSFER8X8_COPY_PTR;
188 : edgomez 1.6
189 :     /* Our global function pointer - Initialized in xvid.c */
190 : Isibaar 1.1 extern TRANSFER8X8_COPY_PTR transfer8x8_copy;
191 : edgomez 1.6
192 :     /* Implemented functions */
193 : edgomez 1.13 extern TRANSFER8X8_COPY transfer8x8_copy_c;
194 : edgomez 1.12
195 : edgomez 1.13 #ifdef ARCH_IS_IA32
196 :     extern TRANSFER8X8_COPY transfer8x8_copy_mmx;
197 :     extern TRANSFER8X8_COPY transfer8x8_copy_3dne;
198 :     #endif
199 :    
200 :     #ifdef ARCH_IS_IA64
201 :     extern TRANSFER8X8_COPY transfer8x8_copy_ia64;
202 :     #endif
203 : edgomez 1.12
204 :     static __inline void
205 :     transfer16x16_copy(uint8_t * const dst,
206 :     const uint8_t * const src,
207 :     const uint32_t stride)
208 :     {
209 :     transfer8x8_copy(dst, src, stride);
210 :     transfer8x8_copy(dst + 8, src + 8, stride);
211 :     transfer8x8_copy(dst + 8*stride, src + 8*stride, stride);
212 :     transfer8x8_copy(dst + 8*stride + 8, src + 8*stride + 8, stride);
213 :     }
214 :    
215 :     static __inline void
216 :     transfer32x32_copy(uint8_t * const dst,
217 :     const uint8_t * const src,
218 :     const uint32_t stride)
219 :     {
220 :     transfer16x16_copy(dst, src, stride);
221 :     transfer16x16_copy(dst + 16, src + 16, stride);
222 :     transfer16x16_copy(dst + 16*stride, src + 16*stride, stride);
223 :     transfer16x16_copy(dst + 16*stride + 16, src + 16*stride + 16, stride);
224 :     }
225 :    
226 : Isibaar 1.1
227 : edgomez 1.6 #endif

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4