[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 90, Sat Mar 30 01:25:29 2002 UTC revision 652, Sun Nov 17 00:35:33 2002 UTC
# Line 1  Line 1 
1    /*****************************************************************************
2     *
3     *  XVID MPEG-4 VIDEO CODEC
4     *  - SAD Routines header -
5     *
6     *  Copyright(C) 2002 Michael Militzer <isibaar@xvid.org>
7     *               2002 Peter Ross <pross@xvid.org>
8     *
9     *  This file is part of XviD, a free MPEG-4 video encoder/decoder
10     *
11     *  XviD is free software; you can redistribute it and/or modify it
12     *  under the terms of the GNU General Public License as published by
13     *  the Free Software Foundation; either version 2 of the License, or
14     *  (at your option) any later version.
15     *
16     *  This program is distributed in the hope that it will be useful,
17     *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18     *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19     *  GNU General Public License for more details.
20     *
21     *  You should have received a copy of the GNU General Public License
22     *  along with this program; if not, write to the Free Software
23     *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
24     *
25     *  Under section 8 of the GNU General Public License, the copyright
26     *  holders of XVID explicitly forbid distribution in the following
27     *  countries:
28     *
29     *    - Japan
30     *    - United States of America
31     *
32     *  Linking XviD statically or dynamically with other modules is making a
33     *  combined work based on XviD.  Thus, the terms and conditions of the
34     *  GNU General Public License cover the whole combination.
35     *
36     *  As a special exception, the copyright holders of XviD give you
37     *  permission to link XviD with independent modules that communicate with
38     *  XviD solely through the VFW1.1 and DShow interfaces, regardless of the
39     *  license terms of these independent modules, and to copy and distribute
40     *  the resulting combined work under terms of your choice, provided that
41     *  every copy of the combined work is accompanied by a complete copy of
42     *  the source code of XviD (the version of XviD used to produce the
43     *  combined work), being distributed under the terms of the GNU General
44     *  Public License plus this exception.  An independent module is a module
45     *  which is not derived from or based on XviD.
46     *
47     *  Note that people who make modified versions of XviD are not obligated
48     *  to grant this special exception for their modified versions; it is
49     *  their choice whether to do so.  The GNU General Public License gives
50     *  permission to release a modified version without this exception; this
51     *  exception also makes it possible to release a modified version which
52     *  carries forward this exception.
53     *
54     * $Id: sad.h,v 1.17 2002-11-17 00:32:06 edgomez Exp $
55     *
56     ****************************************************************************/
57    
58  #ifndef _ENCODER_SAD_H_  #ifndef _ENCODER_SAD_H_
59  #define _ENCODER_SAD_H_  #define _ENCODER_SAD_H_
60    
   
61  #include "../portab.h"  #include "../portab.h"
62    
63    typedef void (sadInitFunc) (void);
64    typedef sadInitFunc *sadInitFuncPtr;
65    
66    extern sadInitFuncPtr sadInit;
67    sadInitFunc sadInit_altivec;
68    
69    
70  typedef uint32_t (sad16Func)(const uint8_t * const cur,  typedef uint32_t (sad16Func)(const uint8_t * const cur,
71                                                   const uint8_t * const ref,                                                   const uint8_t * const ref,
72                                                   const uint32_t stride,                                                   const uint32_t stride,
73                                                   const uint32_t best_sad);                                                   const uint32_t best_sad);
   
   
74  typedef sad16Func* sad16FuncPtr;  typedef sad16Func* sad16FuncPtr;
   
75  extern sad16FuncPtr sad16;  extern sad16FuncPtr sad16;
76  sad16Func sad16_c;  sad16Func sad16_c;
77  sad16Func sad16_mmx;  sad16Func sad16_mmx;
78  sad16Func sad16_xmm;  sad16Func sad16_xmm;
79    sad16Func sad16_sse2;
80  sad16Func sad16_altivec;  sad16Func sad16_altivec;
81    sad16Func sad16_ia64;
82    
83    sad16Func mrsad16_c;
84    
85    
86  typedef uint32_t (sad8Func)(const uint8_t * const cur,  typedef uint32_t (sad8Func)(const uint8_t * const cur,
87                                                  const uint8_t * const ref,                                                  const uint8_t * const ref,
88                                                  const uint32_t stride);                                                  const uint32_t stride);
   
   
89  typedef sad8Func* sad8FuncPtr;  typedef sad8Func* sad8FuncPtr;
   
90  extern sad8FuncPtr sad8;  extern sad8FuncPtr sad8;
91  sad8Func sad8_c;  sad8Func sad8_c;
92  sad8Func sad8_mmx;  sad8Func sad8_mmx;
93  sad8Func sad8_xmm;  sad8Func sad8_xmm;
94  sad8Func sad8_altivec;  sad8Func sad8_altivec;
95    sad8Func sad8_ia64;
96    
97    
98  typedef uint32_t (dev16Func)(const uint8_t * const cur,  typedef uint32_t(sad16biFunc) (const uint8_t * const cur,
99                                  const uint32_t stride);                                                             const uint8_t * const ref1,
100                                                               const uint8_t * const ref2,
101                                                               const uint32_t stride);
102    typedef sad16biFunc *sad16biFuncPtr;
103    extern sad16biFuncPtr sad16bi;
104    sad16biFunc sad16bi_c;
105    sad16biFunc sad16bi_ia64;
106    sad16biFunc sad16bi_mmx;
107    sad16biFunc sad16bi_xmm;
108    sad16biFunc sad16bi_3dn;
109    
110    
111    typedef uint32_t(sad8biFunc) (const uint8_t * const cur,
112                                                               const uint8_t * const ref1,
113                                                               const uint8_t * const ref2,
114                                                               const uint32_t stride);
115    typedef sad8biFunc *sad8biFuncPtr;
116    extern sad8biFuncPtr sad8bi;
117    sad8biFunc sad8bi_c;
118    sad8biFunc sad8bi_mmx;
119    sad8biFunc sad8bi_xmm;
120    sad8biFunc sad8bi_3dn;
121    
122    
123    typedef uint32_t(dev16Func) (const uint8_t * const cur,
124                                                             const uint32_t stride);
125  typedef dev16Func *dev16FuncPtr;  typedef dev16Func *dev16FuncPtr;
   
126  extern dev16FuncPtr dev16;  extern dev16FuncPtr dev16;
127  dev16Func dev16_c;  dev16Func dev16_c;
128  dev16Func dev16_mmx;  dev16Func dev16_mmx;
129  dev16Func dev16_xmm;  dev16Func dev16_xmm;
130    dev16Func dev16_sse2;
131  dev16Func dev16_altivec;  dev16Func dev16_altivec;
132    dev16Func dev16_ia64;
133    
134  /* plain c */  /* plain c */
135  /*  /*

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

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