1 |
|
/***************************************************************************** |
2 |
|
* |
3 |
|
* XVID MPEG-4 VIDEO CODEC |
4 |
|
* - Sum Of Absolute Difference header - |
5 |
|
* |
6 |
|
* Copyright(C) 2001-2003 Peter Ross <pross@xvid.org> |
7 |
|
* |
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 |
|
* (at your option) any later version. |
12 |
|
* |
13 |
|
* This program is distributed in the hope that it will be useful, |
14 |
|
* but WITHOUT ANY WARRANTY ; without even the implied warranty of |
15 |
|
* 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 |
|
* along with this program ; if not, write to the Free Software |
20 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
|
* |
22 |
|
* $Id: sad.h,v 1.18.2.2 2003-08-13 11:43:59 edgomez Exp $ |
23 |
|
* |
24 |
|
****************************************************************************/ |
25 |
|
|
26 |
#ifndef _ENCODER_SAD_H_ |
#ifndef _ENCODER_SAD_H_ |
27 |
#define _ENCODER_SAD_H_ |
#define _ENCODER_SAD_H_ |
28 |
|
|
43 |
typedef sad16Func *sad16FuncPtr; |
typedef sad16Func *sad16FuncPtr; |
44 |
extern sad16FuncPtr sad16; |
extern sad16FuncPtr sad16; |
45 |
sad16Func sad16_c; |
sad16Func sad16_c; |
46 |
|
|
47 |
|
#ifdef ARCH_IS_IA32 |
48 |
sad16Func sad16_mmx; |
sad16Func sad16_mmx; |
49 |
sad16Func sad16_xmm; |
sad16Func sad16_xmm; |
50 |
sad16Func sad16_3dne; |
sad16Func sad16_3dne; |
51 |
sad16Func sad16_sse2; |
sad16Func sad16_sse2; |
52 |
|
#endif |
53 |
|
|
54 |
|
#ifdef ARCH_IS_ALTIVEC |
55 |
sad16Func sad16_altivec; |
sad16Func sad16_altivec; |
56 |
|
#endif |
57 |
|
|
58 |
|
#ifdef ARCH_IS_IA64 |
59 |
sad16Func sad16_ia64; |
sad16Func sad16_ia64; |
60 |
|
#endif |
61 |
|
|
62 |
sad16Func mrsad16_c; |
sad16Func mrsad16_c; |
63 |
|
|
67 |
typedef sad8Func *sad8FuncPtr; |
typedef sad8Func *sad8FuncPtr; |
68 |
extern sad8FuncPtr sad8; |
extern sad8FuncPtr sad8; |
69 |
sad8Func sad8_c; |
sad8Func sad8_c; |
70 |
|
|
71 |
|
#ifdef ARCH_IS_IA32 |
72 |
sad8Func sad8_mmx; |
sad8Func sad8_mmx; |
73 |
sad8Func sad8_xmm; |
sad8Func sad8_xmm; |
74 |
sad8Func sad8_3dne; |
sad8Func sad8_3dne; |
75 |
|
#endif |
76 |
|
|
77 |
|
#ifdef ARCH_IS_ALTIVEC |
78 |
sad8Func sad8_altivec; |
sad8Func sad8_altivec; |
79 |
sad8Func sad8_ia64; |
#endif |
80 |
|
|
81 |
|
#ifdef ARCH_IS_IA64 |
82 |
|
sad8Func sad8_ia64; |
83 |
|
#endif |
84 |
|
|
85 |
typedef uint32_t(sad16biFunc) (const uint8_t * const cur, |
typedef uint32_t(sad16biFunc) (const uint8_t * const cur, |
86 |
const uint8_t * const ref1, |
const uint8_t * const ref1, |
89 |
typedef sad16biFunc *sad16biFuncPtr; |
typedef sad16biFunc *sad16biFuncPtr; |
90 |
extern sad16biFuncPtr sad16bi; |
extern sad16biFuncPtr sad16bi; |
91 |
sad16biFunc sad16bi_c; |
sad16biFunc sad16bi_c; |
92 |
sad16biFunc sad16bi_ia64; |
|
93 |
|
#ifdef ARCH_IS_IA32 |
94 |
sad16biFunc sad16bi_mmx; |
sad16biFunc sad16bi_mmx; |
95 |
sad16biFunc sad16bi_xmm; |
sad16biFunc sad16bi_xmm; |
96 |
sad16biFunc sad16bi_3dne; |
sad16biFunc sad16bi_3dne; |
97 |
sad16biFunc sad16bi_3dn; |
sad16biFunc sad16bi_3dn; |
98 |
|
#endif |
99 |
|
|
100 |
|
#ifdef ARCH_IS_IA64 |
101 |
|
sad16biFunc sad16bi_ia64; |
102 |
|
#endif |
103 |
|
|
104 |
typedef uint32_t(sad8biFunc) (const uint8_t * const cur, |
typedef uint32_t(sad8biFunc) (const uint8_t * const cur, |
105 |
const uint8_t * const ref1, |
const uint8_t * const ref1, |
108 |
typedef sad8biFunc *sad8biFuncPtr; |
typedef sad8biFunc *sad8biFuncPtr; |
109 |
extern sad8biFuncPtr sad8bi; |
extern sad8biFuncPtr sad8bi; |
110 |
sad8biFunc sad8bi_c; |
sad8biFunc sad8bi_c; |
111 |
|
|
112 |
|
#ifdef ARCH_IS_IA32 |
113 |
sad8biFunc sad8bi_mmx; |
sad8biFunc sad8bi_mmx; |
114 |
sad8biFunc sad8bi_xmm; |
sad8biFunc sad8bi_xmm; |
115 |
sad8biFunc sad8bi_3dne; |
sad8biFunc sad8bi_3dne; |
116 |
sad8biFunc sad8bi_3dn; |
sad8biFunc sad8bi_3dn; |
117 |
|
#endif |
118 |
|
|
119 |
|
|
120 |
typedef uint32_t(dev16Func) (const uint8_t * const cur, |
typedef uint32_t(dev16Func) (const uint8_t * const cur, |
122 |
typedef dev16Func *dev16FuncPtr; |
typedef dev16Func *dev16FuncPtr; |
123 |
extern dev16FuncPtr dev16; |
extern dev16FuncPtr dev16; |
124 |
dev16Func dev16_c; |
dev16Func dev16_c; |
125 |
|
|
126 |
|
#ifdef ARCH_IS_IA32 |
127 |
dev16Func dev16_mmx; |
dev16Func dev16_mmx; |
128 |
dev16Func dev16_xmm; |
dev16Func dev16_xmm; |
129 |
dev16Func dev16_3dne; |
dev16Func dev16_3dne; |
130 |
dev16Func dev16_sse2; |
dev16Func dev16_sse2; |
131 |
|
#endif |
132 |
|
|
133 |
|
#ifdef ARCH_IS_ALTIVEC |
134 |
dev16Func dev16_altivec; |
dev16Func dev16_altivec; |
135 |
|
#endif |
136 |
|
|
137 |
|
#ifdef ARCH_IS_IA64 |
138 |
dev16Func dev16_ia64; |
dev16Func dev16_ia64; |
139 |
|
#endif |
140 |
|
|
141 |
typedef uint32_t (sad16vFunc)( const uint8_t * const cur, |
typedef uint32_t (sad16vFunc)( const uint8_t * const cur, |
142 |
const uint8_t * const ref, |
const uint8_t * const ref, |
143 |
const uint32_t stride, int32_t *sad8); |
const uint32_t stride, int32_t *sad8); |
144 |
typedef sad16vFunc *sad16vFuncPtr; |
typedef sad16vFunc *sad16vFuncPtr; |
145 |
extern sad16vFuncPtr sad16v; |
extern sad16vFuncPtr sad16v; |
146 |
sad16vFunc sad16v_xmm; |
|
|
sad16vFunc sad16v_mmx; |
|
147 |
sad16vFunc sad16v_c; |
sad16vFunc sad16v_c; |
148 |
sad16vFunc sad32v_c; |
sad16vFunc sad32v_c; |
149 |
sad16vFunc mrsad16v; |
sad16vFunc mrsad16v; |
150 |
sad16vFunc mrsad16v_c; |
sad16vFunc mrsad16v_c; |
151 |
|
|
152 |
|
#ifdef ARCH_IS_IA32 |
153 |
|
sad16vFunc sad16v_xmm; |
154 |
|
sad16vFunc sad16v_mmx; |
155 |
|
|
156 |
int32_t sad8x8mean_mmx( const uint8_t * const current, |
int32_t sad8x8mean_mmx( const uint8_t * const current, |
157 |
const uint8_t * const reference, |
const uint8_t * const reference, |
158 |
const uint32_t stride, |
const uint32_t stride, |
159 |
const int mean); |
const int mean); |
160 |
|
|
161 |
void sad16x8total_mmx(const uint8_t *, const uint32_t, int32_t[]); |
void sad16x8total_mmx(const uint8_t *, const uint32_t, int32_t[]); |
162 |
|
#endif |
163 |
|
|
164 |
#endif /* _ENCODER_SAD_H_ */ |
#endif /* _ENCODER_SAD_H_ */ |