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

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

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

revision 1423, Mon Apr 12 14:05:08 2004 UTC revision 1424, Mon Apr 12 15:49:56 2004 UTC
# Line 19  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   * $Id: sad.c,v 1.15 2004-03-22 22:36:24 edgomez Exp $   * $Id: sad.c,v 1.16 2004-04-12 15:49:56 edgomez Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 36  Line 36 
36  dev16FuncPtr dev16;  dev16FuncPtr dev16;
37  sad16vFuncPtr sad16v;  sad16vFuncPtr sad16v;
38  sse8Func_16bitPtr sse8_16bit;  sse8Func_16bitPtr sse8_16bit;
39    sse8Func_8bitPtr sse8_8bit;
40    
41  sadInitFuncPtr sadInit;  sadInitFuncPtr sadInit;
42    
# Line 303  Line 304 
304    
305          return(sse);          return(sse);
306  }  }
307    
308    uint32_t
309    sse8_8bit_c(const uint8_t * b1,
310                            const uint8_t * b2,
311                            const uint32_t stride)
312    {
313            int i;
314            int sse = 0;
315    
316            for (i=0; i<8; i++) {
317                    sse += (b1[0] - b2[0])*(b1[0] - b2[0]);
318                    sse += (b1[1] - b2[1])*(b1[1] - b2[1]);
319                    sse += (b1[2] - b2[2])*(b1[2] - b2[2]);
320                    sse += (b1[3] - b2[3])*(b1[3] - b2[3]);
321                    sse += (b1[4] - b2[4])*(b1[4] - b2[4]);
322                    sse += (b1[5] - b2[5])*(b1[5] - b2[5]);
323                    sse += (b1[6] - b2[6])*(b1[6] - b2[6]);
324                    sse += (b1[7] - b2[7])*(b1[7] - b2[7]);
325    
326                    b1 = b1+stride;
327                    b2 = b2+stride;
328            }
329    
330            return(sse);
331    }

Legend:
Removed from v.1423  
changed lines
  Added in v.1424

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