[svn] / branches / dev-api-4 / xvidcore / src / motion / sad.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/motion/sad.c

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

revision 956, Fri Mar 28 07:28:23 2003 UTC revision 957, Fri Mar 28 08:43:28 2003 UTC
# Line 111  Line 111 
111    
112                  for (i = 0; i < 16; i++) {                  for (i = 0; i < 16; i++) {
113                          int pixel = (ptr_ref1[i] + ptr_ref2[i] + 1) / 2;                          int pixel = (ptr_ref1[i] + ptr_ref2[i] + 1) / 2;
   
                         if (pixel < 0) {  
                                 pixel = 0;  
                         } else if (pixel > 255) {  
                                 pixel = 255;  
                         }  
   
114                          sad += ABS(ptr_cur[i] - pixel);                          sad += ABS(ptr_cur[i] - pixel);
115                  }                  }
116    
# Line 148  Line 141 
141    
142                  for (i = 0; i < 8; i++) {                  for (i = 0; i < 8; i++) {
143                          int pixel = (ptr_ref1[i] + ptr_ref2[i] + 1) / 2;                          int pixel = (ptr_ref1[i] + ptr_ref2[i] + 1) / 2;
   
                         if (pixel < 0) {  
                                 pixel = 0;  
                         } else if (pixel > 255) {  
                                 pixel = 255;  
                         }  
   
144                          sad += ABS(ptr_cur[i] - pixel);                          sad += ABS(ptr_cur[i] - pixel);
145                  }                  }
146    

Legend:
Removed from v.956  
changed lines
  Added in v.957

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