3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* - 8<->16 bit buffer transfer header - |
* - 8<->16 bit buffer transfer header - |
5 |
* |
* |
6 |
* This program is an implementation of a part of one or more MPEG-4 |
* Copyright(C) 2001-2003 Peter Ross <pross@xvid.org> |
|
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
|
|
* to use this software module in hardware or software products are |
|
|
* advised that its use may infringe existing patents or copyrights, and |
|
|
* any such use would be at such party's own risk. The original |
|
|
* developer of this software module and his/her company, and subsequent |
|
|
* editors and their companies, will have no liability for use of this |
|
|
* software or modifications or derivatives thereof. |
|
7 |
* |
* |
8 |
* This program is free software ; you can redistribute it and/or modify |
* 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 |
* it under the terms of the GNU General Public License as published by |
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 |
* |
* |
|
****************************************************************************/ |
|
|
/***************************************************************************** |
|
|
* |
|
|
* History |
|
|
* |
|
|
* - Sun Jun 16 00:12:49 2002 Added legal header |
|
|
* Cosmetic |
|
22 |
* $Id$ |
* $Id$ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
|
|
|
26 |
#ifndef _MEM_TRANSFER_H |
#ifndef _MEM_TRANSFER_H |
27 |
#define _MEM_TRANSFER_H |
#define _MEM_TRANSFER_H |
28 |
|
|
42 |
/* Implemented functions */ |
/* Implemented functions */ |
43 |
TRANSFER_8TO16COPY transfer_8to16copy_c; |
TRANSFER_8TO16COPY transfer_8to16copy_c; |
44 |
TRANSFER_8TO16COPY transfer_8to16copy_mmx; |
TRANSFER_8TO16COPY transfer_8to16copy_mmx; |
45 |
|
TRANSFER_8TO16COPY transfer_8to16copy_3dne; |
46 |
TRANSFER_8TO16COPY transfer_8to16copy_ia64; |
TRANSFER_8TO16COPY transfer_8to16copy_ia64; |
47 |
|
|
48 |
/***************************************************************************** |
/***************************************************************************** |
60 |
/* Implemented functions */ |
/* Implemented functions */ |
61 |
TRANSFER_16TO8COPY transfer_16to8copy_c; |
TRANSFER_16TO8COPY transfer_16to8copy_c; |
62 |
TRANSFER_16TO8COPY transfer_16to8copy_mmx; |
TRANSFER_16TO8COPY transfer_16to8copy_mmx; |
63 |
|
TRANSFER_16TO8COPY transfer_16to8copy_3dne; |
64 |
TRANSFER_16TO8COPY transfer_16to8copy_ia64; |
TRANSFER_16TO8COPY transfer_16to8copy_ia64; |
65 |
|
|
66 |
/***************************************************************************** |
/***************************************************************************** |
67 |
* transfer8to16 + substraction op API |
* transfer8to16 + substraction *writeback* op API |
68 |
****************************************************************************/ |
****************************************************************************/ |
69 |
|
|
70 |
typedef void (TRANSFER_8TO16SUB) (int16_t * const dct, |
typedef void (TRANSFER_8TO16SUB) (int16_t * const dct, |
80 |
/* Implemented functions */ |
/* Implemented functions */ |
81 |
TRANSFER_8TO16SUB transfer_8to16sub_c; |
TRANSFER_8TO16SUB transfer_8to16sub_c; |
82 |
TRANSFER_8TO16SUB transfer_8to16sub_mmx; |
TRANSFER_8TO16SUB transfer_8to16sub_mmx; |
83 |
|
TRANSFER_8TO16SUB transfer_8to16sub_3dne; |
84 |
TRANSFER_8TO16SUB transfer_8to16sub_ia64; |
TRANSFER_8TO16SUB transfer_8to16sub_ia64; |
85 |
|
|
86 |
/***************************************************************************** |
/***************************************************************************** |
87 |
|
* 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 |
* transfer8to16 + substraction op API - Bidirectionnal Version |
* transfer8to16 + substraction op API - Bidirectionnal Version |
107 |
****************************************************************************/ |
****************************************************************************/ |
108 |
|
|
119 |
|
|
120 |
/* Implemented functions */ |
/* Implemented functions */ |
121 |
TRANSFER_8TO16SUB2 transfer_8to16sub2_c; |
TRANSFER_8TO16SUB2 transfer_8to16sub2_c; |
122 |
//TRANSFER_8TO16SUB2 transfer_8to16sub2_mmx; |
TRANSFER_8TO16SUB2 transfer_8to16sub2_mmx; |
123 |
TRANSFER_8TO16SUB2 transfer_8to16sub2_xmm; |
TRANSFER_8TO16SUB2 transfer_8to16sub2_xmm; |
124 |
|
TRANSFER_8TO16SUB2 transfer_8to16sub2_3dne; |
125 |
TRANSFER_8TO16SUB2 transfer_8to16sub2_ia64; |
TRANSFER_8TO16SUB2 transfer_8to16sub2_ia64; |
126 |
|
|
127 |
|
|
141 |
/* Implemented functions */ |
/* Implemented functions */ |
142 |
TRANSFER_16TO8ADD transfer_16to8add_c; |
TRANSFER_16TO8ADD transfer_16to8add_c; |
143 |
TRANSFER_16TO8ADD transfer_16to8add_mmx; |
TRANSFER_16TO8ADD transfer_16to8add_mmx; |
144 |
|
TRANSFER_16TO8ADD transfer_16to8add_3dne; |
145 |
TRANSFER_16TO8ADD transfer_16to8add_ia64; |
TRANSFER_16TO8ADD transfer_16to8add_ia64; |
146 |
|
|
147 |
/***************************************************************************** |
/***************************************************************************** |
160 |
/* Implemented functions */ |
/* Implemented functions */ |
161 |
TRANSFER8X8_COPY transfer8x8_copy_c; |
TRANSFER8X8_COPY transfer8x8_copy_c; |
162 |
TRANSFER8X8_COPY transfer8x8_copy_mmx; |
TRANSFER8X8_COPY transfer8x8_copy_mmx; |
163 |
|
TRANSFER8X8_COPY transfer8x8_copy_3dne; |
164 |
TRANSFER8X8_COPY transfer8x8_copy_ia64; |
TRANSFER8X8_COPY transfer8x8_copy_ia64; |
165 |
|
|
166 |
|
|
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 |
#endif |
#endif |