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 |
* |
* |
22 |
* $Id: sad.h,v 1.18.2.2 2003-08-13 11:43:59 edgomez Exp $ |
* $Id: sad.h,v 1.18.2.3 2003-09-10 22:19:00 edgomez Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
26 |
#ifndef _ENCODER_SAD_H_ |
#ifndef _ENCODER_SAD_H_ |
27 |
#define _ENCODER_SAD_H_ |
#define _ENCODER_SAD_H_ |
28 |
|
|
|
|
|
29 |
#include "../portab.h" |
#include "../portab.h" |
30 |
|
|
31 |
typedef void (sadInitFunc) (void); |
typedef void (sadInitFunc) (void); |
34 |
extern sadInitFuncPtr sadInit; |
extern sadInitFuncPtr sadInit; |
35 |
sadInitFunc sadInit_altivec; |
sadInitFunc sadInit_altivec; |
36 |
|
|
|
|
|
37 |
typedef uint32_t(sad16Func) (const uint8_t * const cur, |
typedef uint32_t(sad16Func) (const uint8_t * const cur, |
38 |
const uint8_t * const ref, |
const uint8_t * const ref, |
39 |
const uint32_t stride, |
const uint32_t stride, |
121 |
extern dev16FuncPtr dev16; |
extern dev16FuncPtr dev16; |
122 |
dev16Func dev16_c; |
dev16Func dev16_c; |
123 |
|
|
|
#ifdef ARCH_IS_IA32 |
|
|
dev16Func dev16_mmx; |
|
|
dev16Func dev16_xmm; |
|
|
dev16Func dev16_3dne; |
|
|
dev16Func dev16_sse2; |
|
|
#endif |
|
|
|
|
|
#ifdef ARCH_IS_ALTIVEC |
|
|
dev16Func dev16_altivec; |
|
|
#endif |
|
|
|
|
|
#ifdef ARCH_IS_IA64 |
|
|
dev16Func dev16_ia64; |
|
|
#endif |
|
|
|
|
124 |
typedef uint32_t (sad16vFunc)( const uint8_t * const cur, |
typedef uint32_t (sad16vFunc)( const uint8_t * const cur, |
125 |
const uint8_t * const ref, |
const uint8_t * const ref, |
126 |
const uint32_t stride, int32_t *sad8); |
const uint32_t stride, int32_t *sad8); |
129 |
|
|
130 |
sad16vFunc sad16v_c; |
sad16vFunc sad16v_c; |
131 |
sad16vFunc sad32v_c; |
sad16vFunc sad32v_c; |
|
sad16vFunc mrsad16v; |
|
|
sad16vFunc mrsad16v_c; |
|
132 |
|
|
133 |
#ifdef ARCH_IS_IA32 |
#ifdef ARCH_IS_IA32 |
134 |
|
dev16Func dev16_mmx; |
135 |
|
dev16Func dev16_xmm; |
136 |
|
dev16Func dev16_3dne; |
137 |
|
dev16Func dev16_sse2; |
138 |
sad16vFunc sad16v_xmm; |
sad16vFunc sad16v_xmm; |
139 |
sad16vFunc sad16v_mmx; |
sad16vFunc sad16v_mmx; |
140 |
|
#endif |
141 |
|
|
142 |
int32_t sad8x8mean_mmx( const uint8_t * const current, |
#ifdef ARCH_IS_ALTIVEC |
143 |
const uint8_t * const reference, |
dev16Func dev16_altivec; |
144 |
const uint32_t stride, |
#endif |
|
const int mean); |
|
145 |
|
|
146 |
void sad16x8total_mmx(const uint8_t *, const uint32_t, int32_t[]); |
#ifdef ARCH_IS_IA64 |
147 |
|
dev16Func dev16_ia64; |
148 |
#endif |
#endif |
149 |
|
|
150 |
#endif /* _ENCODER_SAD_H_ */ |
#endif /* _ENCODER_SAD_H_ */ |