diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2006-08-22 22:00:58 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-08-22 22:00:58 -0400 |
commit | 96c8f92883322a785fa9fa55de93b8eb56afab64 (patch) | |
tree | a914ec3c3399f79d5f29041cd45c745dbd7f64f1 /test/buffer-diff.c | |
parent | 988b5dcb7e50d9e08ff94cb98f6d9c91915bb9b4 (diff) |
[test] bufferdiff: take abs of the pixel diffs. Oops!
Diffstat (limited to 'test/buffer-diff.c')
-rw-r--r-- | test/buffer-diff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/buffer-diff.c b/test/buffer-diff.c index 5463c298..45942c49 100644 --- a/test/buffer-diff.c +++ b/test/buffer-diff.c @@ -28,6 +28,7 @@ #endif #include <stdio.h> +#include <stdlib.h> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif @@ -93,7 +94,7 @@ buffer_diff_core (unsigned char *_buf_a, unsigned char value_a = (row_a[x] >> (channel*8)); unsigned char value_b = (row_b[x] >> (channel*8)); unsigned int diff; - diff = value_a - value_b; + diff = abs (value_a - value_b); diff *= 4; /* emphasize */ if (diff > 255) diff = 255; |