[svn] / trunk / xvidcore / src / motion / sad.h Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/motion/sad.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 652, Sun Nov 17 00:35:33 2002 UTC revision 1586, Wed Jan 5 23:02:15 2005 UTC
# Line 1  Line 1 
1  /*****************************************************************************  /*****************************************************************************
2   *   *
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  - SAD Routines header -   *  - Sum Of Absolute Difference header  -
5   *   *
6   *  Copyright(C) 2002 Michael Militzer <isibaar@xvid.org>   *  Copyright(C) 2001-2003 Peter Ross <pross@xvid.org>
  *               2002 Peter Ross <pross@xvid.org>  
7   *   *
8   *  This file is part of XviD, a free MPEG-4 video encoder/decoder   *  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
  *  XviD is free software; you can redistribute it and/or modify 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   *  the Free Software Foundation; either version 2 of the License, or
11   *  (at your option) any later version.   *  (at your option) any later version.
12   *   *
# Line 22  Line 19 
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   *  Under section 8 of the GNU General Public License, the copyright   * $Id: sad.h,v 1.22 2005-01-05 23:02:15 edgomez Exp $
  *  holders of XVID explicitly forbid distribution in the following  
  *  countries:  
  *  
  *    - Japan  
  *    - United States of America  
  *  
  *  Linking XviD statically or dynamically with other modules is making a  
  *  combined work based on XviD.  Thus, the terms and conditions of the  
  *  GNU General Public License cover the whole combination.  
  *  
  *  As a special exception, the copyright holders of XviD give you  
  *  permission to link XviD with independent modules that communicate with  
  *  XviD solely through the VFW1.1 and DShow interfaces, regardless of the  
  *  license terms of these independent modules, and to copy and distribute  
  *  the resulting combined work under terms of your choice, provided that  
  *  every copy of the combined work is accompanied by a complete copy of  
  *  the source code of XviD (the version of XviD used to produce the  
  *  combined work), being distributed under the terms of the GNU General  
  *  Public License plus this exception.  An independent module is a module  
  *  which is not derived from or based on XviD.  
  *  
  *  Note that people who make modified versions of XviD are not obligated  
  *  to grant this special exception for their modified versions; it is  
  *  their choice whether to do so.  The GNU General Public License gives  
  *  permission to release a modified version without this exception; this  
  *  exception also makes it possible to release a modified version which  
  *  carries forward this exception.  
  *  
  * $Id: sad.h,v 1.17 2002-11-17 00:32:06 edgomez Exp $  
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 66  Line 34 
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,
# Line 74  Line 41 
41  typedef sad16Func *sad16FuncPtr;  typedef sad16Func *sad16FuncPtr;
42  extern sad16FuncPtr sad16;  extern sad16FuncPtr sad16;
43  sad16Func sad16_c;  sad16Func sad16_c;
44    
45    #ifdef ARCH_IS_IA32
46  sad16Func sad16_mmx;  sad16Func sad16_mmx;
47  sad16Func sad16_xmm;  sad16Func sad16_xmm;
48    sad16Func sad16_3dne;
49  sad16Func sad16_sse2;  sad16Func sad16_sse2;
50  sad16Func sad16_altivec;  #endif
51    
52    #ifdef ARCH_IS_IA64
53  sad16Func sad16_ia64;  sad16Func sad16_ia64;
54    #endif
55    
56  sad16Func mrsad16_c;  #ifdef ARCH_IS_PPC
57    sad16Func sad16_altivec_c;
58    #endif
59    
60    #ifdef ARCH_IS_X86_64
61    sad16Func sad16_x86_64;
62    #endif
63    
64    sad16Func mrsad16_c;
65    
66  typedef uint32_t(sad8Func) (const uint8_t * const cur,  typedef uint32_t(sad8Func) (const uint8_t * const cur,
67                                                          const uint8_t * const ref,                                                          const uint8_t * const ref,
# Line 89  Line 69 
69  typedef sad8Func *sad8FuncPtr;  typedef sad8Func *sad8FuncPtr;
70  extern sad8FuncPtr sad8;  extern sad8FuncPtr sad8;
71  sad8Func sad8_c;  sad8Func sad8_c;
72    
73    #ifdef ARCH_IS_IA32
74  sad8Func sad8_mmx;  sad8Func sad8_mmx;
75  sad8Func sad8_xmm;  sad8Func sad8_xmm;
76  sad8Func sad8_altivec;  sad8Func sad8_3dne;
77    #endif
78    
79    #ifdef ARCH_IS_IA64
80  sad8Func sad8_ia64;  sad8Func sad8_ia64;
81    #endif
82    
83    #ifdef ARCH_IS_PPC
84    sad8Func sad8_altivec_c;
85    #endif
86    
87    #ifdef ARCH_IS_X86_64
88    sad8Func sad8_x86_64;
89    #endif
90    
91  typedef uint32_t(sad16biFunc) (const uint8_t * const cur,  typedef uint32_t(sad16biFunc) (const uint8_t * const cur,
92                                                             const uint8_t * const ref1,                                                             const uint8_t * const ref1,
# Line 102  Line 95 
95  typedef sad16biFunc *sad16biFuncPtr;  typedef sad16biFunc *sad16biFuncPtr;
96  extern sad16biFuncPtr sad16bi;  extern sad16biFuncPtr sad16bi;
97  sad16biFunc sad16bi_c;  sad16biFunc sad16bi_c;
98  sad16biFunc sad16bi_ia64;  
99    #ifdef ARCH_IS_IA32
100  sad16biFunc sad16bi_mmx;  sad16biFunc sad16bi_mmx;
101  sad16biFunc sad16bi_xmm;  sad16biFunc sad16bi_xmm;
102    sad16biFunc sad16bi_3dne;
103  sad16biFunc sad16bi_3dn;  sad16biFunc sad16bi_3dn;
104    #endif
105    
106    #ifdef ARCH_IS_IA64
107    sad16biFunc sad16bi_ia64;
108    #endif
109    
110    #ifdef ARCH_IS_PPC
111    sad16biFunc sad16bi_altivec_c;
112    #endif
113    
114    #ifdef ARCH_IS_X86_64
115    sad16biFunc sad16bi_x86_64;
116    #endif
117    
118  typedef uint32_t(sad8biFunc) (const uint8_t * const cur,  typedef uint32_t(sad8biFunc) (const uint8_t * const cur,
119                                                             const uint8_t * const ref1,                                                             const uint8_t * const ref1,
# Line 115  Line 122 
122  typedef sad8biFunc *sad8biFuncPtr;  typedef sad8biFunc *sad8biFuncPtr;
123  extern sad8biFuncPtr sad8bi;  extern sad8biFuncPtr sad8bi;
124  sad8biFunc sad8bi_c;  sad8biFunc sad8bi_c;
125    
126    #ifdef ARCH_IS_IA32
127  sad8biFunc sad8bi_mmx;  sad8biFunc sad8bi_mmx;
128  sad8biFunc sad8bi_xmm;  sad8biFunc sad8bi_xmm;
129    sad8biFunc sad8bi_3dne;
130  sad8biFunc sad8bi_3dn;  sad8biFunc sad8bi_3dn;
131    #endif
132    
133    #ifdef ARCH_IS_X86_64
134    sad8biFunc sad8bi_x86_64;
135    #endif
136    
137  typedef uint32_t(dev16Func) (const uint8_t * const cur,  typedef uint32_t(dev16Func) (const uint8_t * const cur,
138                                                           const uint32_t stride);                                                           const uint32_t stride);
139  typedef dev16Func *dev16FuncPtr;  typedef dev16Func *dev16FuncPtr;
140  extern dev16FuncPtr dev16;  extern dev16FuncPtr dev16;
141  dev16Func dev16_c;  dev16Func dev16_c;
142    
143    typedef uint32_t (sad16vFunc)(  const uint8_t * const cur,
144                                                                    const uint8_t * const ref,
145                                                                    const uint32_t stride, int32_t *sad8);
146    typedef sad16vFunc *sad16vFuncPtr;
147    extern sad16vFuncPtr sad16v;
148    
149    sad16vFunc sad16v_c;
150    sad16vFunc sad32v_c;
151    
152    #ifdef ARCH_IS_IA32
153  dev16Func dev16_mmx;  dev16Func dev16_mmx;
154  dev16Func dev16_xmm;  dev16Func dev16_xmm;
155    dev16Func dev16_3dne;
156  dev16Func dev16_sse2;  dev16Func dev16_sse2;
157  dev16Func dev16_altivec;  sad16vFunc sad16v_xmm;
158    sad16vFunc sad16v_mmx;
159    #endif
160    
161    #ifdef ARCH_IS_IA64
162  dev16Func dev16_ia64;  dev16Func dev16_ia64;
163    #endif
164    
165  /* plain c */  #ifdef ARCH_IS_PPC
166  /*  dev16Func dev16_altivec_c;
167    #endif
168    
169  uint32_t sad16(const uint8_t * const cur,  #ifdef ARCH_IS_X86_64
170                                  const uint8_t * const ref,  dev16Func dev16_x86_64;
171                                  const uint32_t stride,  sad16vFunc sad16v_x86_64;
172                                  const uint32_t best_sad);  #endif
173    
174  uint32_t sad8(const uint8_t * const cur,  /* This function assumes blocks use 16bit signed elements */
175                                  const uint8_t * const ref,  typedef uint32_t (sse8Func_16bit)(const int16_t * cur,
176                                                                      const int16_t * ref,
177                                  const uint32_t stride);                                  const uint32_t stride);
178    typedef sse8Func_16bit *sse8Func_16bitPtr;
179    extern sse8Func_16bitPtr sse8_16bit;
180    
181  uint32_t dev16(const uint8_t * const cur,  sse8Func_16bit sse8_16bit_c;
182                                  const uint32_t stride);  #ifdef ARCH_IS_IA32
183  */  sse8Func_16bit sse8_16bit_mmx;
184  /* mmx */  #endif
 /*  
   
 uint32_t sad16_mmx(const uint8_t * const cur,  
                                 const uint8_t * const ref,  
                                 const uint32_t stride,  
                                 const uint32_t best_sad);  
185    
186  uint32_t sad8_mmx(const uint8_t * const cur,  #ifdef ARCH_IS_PPC
187                                  const uint8_t * const ref,  sse8Func_16bit sse8_16bit_altivec_c;
188                                  const uint32_t stride);  #endif
189    
190    #ifdef ARCH_IS_X86_64
191    sse8Func_16bit sse8_16bit_x86_64;
192    #endif
193    
194  uint32_t dev16_mmx(const uint8_t * const cur,  /* This function assumes blocks use 8bit *un*signed elements */
195    typedef uint32_t (sse8Func_8bit)(const uint8_t * cur,
196                                                                     const uint8_t * ref,
197                                  const uint32_t stride);                                  const uint32_t stride);
198    typedef sse8Func_8bit *sse8Func_8bitPtr;
199    extern sse8Func_8bitPtr sse8_8bit;
200    
201  */  sse8Func_8bit sse8_8bit_c;
 /* xmm */  
 /*  
 uint32_t sad16_xmm(const uint8_t * const cur,  
                                 const uint8_t * const ref,  
                                 const uint32_t stride,  
                                 const uint32_t best_sad);  
202    
203  uint32_t sad8_xmm(const uint8_t * const cur,  #ifdef ARCH_IS_IA32
204                                  const uint8_t * const ref,  sse8Func_8bit sse8_8bit_mmx;
205                                  const uint32_t stride);  #endif
206    
207  uint32_t dev16_xmm(const uint8_t * const cur,  #ifdef ARCH_IS_X86_64
208                                  const uint32_t stride);  sse8Func_8bit sse8_8bit_x86_64;
209  */  #endif
210    
211  #endif                                                  /* _ENCODER_SAD_H_ */  #endif                                                  /* _ENCODER_SAD_H_ */

Legend:
Removed from v.652  
changed lines
  Added in v.1586

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