зеркало из https://github.com/mozilla/eideticker.git
Bug 922770 - Set stable frame threshold to be less than 4096 pixels;r=davehunt
Turns out that 2048 was too few for certain cases (e.g. a scrollbar transitioning out) where things aren't actually changing very much.
This commit is contained in:
Родитель
abae9ea5dc
Коммит
27c59525e5
|
@ -89,12 +89,12 @@ def get_num_unique_frames(capture, threshold=0):
|
||||||
def get_fps(capture, threshold=0):
|
def get_fps(capture, threshold=0):
|
||||||
return get_num_unique_frames(capture, threshold=threshold) / capture.length
|
return get_num_unique_frames(capture, threshold=threshold) / capture.length
|
||||||
|
|
||||||
def get_stable_frame(capture, threshold = 2048):
|
def get_stable_frame(capture, threshold = 4096):
|
||||||
framediff_sums = get_framediff_sums(capture)
|
framediff_sums = get_framediff_sums(capture)
|
||||||
for i in range(len(framediff_sums)-1, 0, -1):
|
for i in range(len(framediff_sums)-1, 0, -1):
|
||||||
if framediff_sums[i] > threshold:
|
if framediff_sums[i] > threshold:
|
||||||
return i+1
|
return i+1
|
||||||
return len(framediff_sums)-1
|
return len(framediff_sums)-1
|
||||||
|
|
||||||
def get_stable_frame_time(capture, threshold = 2048):
|
def get_stable_frame_time(capture, threshold = 4096):
|
||||||
return get_stable_frame(capture, threshold) / 60.0
|
return get_stable_frame(capture, threshold) / 60.0
|
||||||
|
|
Загрузка…
Ссылка в новой задаче