mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
ppmdiff detects lack of changes more quickly. Improved cache robustness.
- scripts/ppmdiff/ppmdiff.c (main): do a quick memcmp to detect absence of changes instead of comparing pixel by pixel (saves 30% of total run time when remaking ben-wpan/atrf from cache) - scripts/schhist2web: added title and copyright header - scripts/schhist2web: create $out/names after deleting the cache (-n) - scripts/schhist2web: fat_* directories were created under $out, not $cache - scripts/schhist2web: remove ppm_* and fat_* directories being worked on if we fail to complete the process for some reason
This commit is contained in:
@@ -376,16 +376,18 @@ int main(int argc, char *const *argv)
|
||||
|
||||
old = load_ppm(argv[optind], &x, &y);
|
||||
new = load_ppm(argv[optind+1], &x, &y);
|
||||
d = diff(old, new, x, y);
|
||||
if (shadow_old) {
|
||||
a = load_ppm(shadow_old, &x, &y);
|
||||
b = load_ppm(shadow_new, &x, &y);
|
||||
if (!force && !memcmp(a, b, x*y*3))
|
||||
return 1;
|
||||
shadow_diff(a, b, x, y);
|
||||
}
|
||||
if (!force && !areas && !memcmp(old, new, x*y*3))
|
||||
return 1;
|
||||
d = diff(old, new, x, y);
|
||||
if (frame_dist)
|
||||
mark_areas(d, x, y);
|
||||
if (!areas && !force)
|
||||
return 1;
|
||||
|
||||
if (out_name) {
|
||||
out = fopen(out_name, "w");
|
||||
|
||||
Reference in New Issue
Block a user