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

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

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

revision 1.13, Sat Feb 15 15:22:19 2003 UTC revision 1.14, 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.1.13  
changed lines
  Added in v.1.14

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