Lines Matching refs:sad
18 * Tests for SAD (sum of absolute differences).
24 // TODO: consider unsigned SAD too, b/64091002
28 char sad = 0;
30 sad += Math.abs(s1[i] - s2[i]);
32 return sad;
37 char sad = 0;
41 sad += s >= p ? s - p : p - s;
43 return sad;
48 char sad = 0;
54 sad += x;
56 return sad;
75 int sad = 0;
77 sad += Math.abs(s1[i] - s2[i]);
79 return sad;
98 int sad = 0;
102 sad += s >= p ? s - p : p - s;
104 return sad;
123 int sad = 0;
129 sad += x;
131 return sad;
153 long sad = 0;
157 sad += Math.abs(x - y);
159 return sad;
181 long sad = 1; // starts at 1
185 sad += Math.abs(x - y);
187 return sad;