- int64_t sad;
-
- for (sad = y = 0; y < me_ctx->height; y += 8)
- for (x = 0; x < linesize; x += 8)
- sad += mi_ctx->sad(p1 + x + y * linesize, linesize, p2 + x + y * linesize, linesize);
-
+ uint64_t sad;
+ mi_ctx->sad(p1, linesize1, p2, linesize2, me_ctx->width, me_ctx->height, &sad);