Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: client/virt/ppm_utils.py

Issue 6883246: Merge autotest upstream from @5318 ~ @5336 (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/virt/kvm_vm.py ('k') | client/virt/rss_client.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """ 1 """
2 Utility functions to deal with ppm (qemu screendump format) files. 2 Utility functions to deal with ppm (qemu screendump format) files.
3 3
4 @copyright: Red Hat 2008-2009 4 @copyright: Red Hat 2008-2009
5 """ 5 """
6 6
7 import os, struct, time, re 7 import os, struct, time, re
8 from autotest_lib.client.bin import utils 8 from autotest_lib.client.bin import utils
9 9
10 # Some directory/filename utils, for consistency 10 # Some directory/filename utils, for consistency
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 while i < width*height*3: 228 while i < width*height*3:
229 pixel1_str = data1[i:i+3] 229 pixel1_str = data1[i:i+3]
230 pixel2_str = data2[i:i+3] 230 pixel2_str = data2[i:i+3]
231 # Compare pixels 231 # Compare pixels
232 if pixel1_str == pixel2_str: 232 if pixel1_str == pixel2_str:
233 equal += 1.0 233 equal += 1.0
234 else: 234 else:
235 different += 1.0 235 different += 1.0
236 i += 3 236 i += 3
237 return equal / (equal + different) 237 return equal / (equal + different)
OLDNEW
« no previous file with comments | « client/virt/kvm_vm.py ('k') | client/virt/rss_client.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698