Home
last modified time | relevance | path

Searched refs:mid (Results 1 – 2 of 2) sorted by relevance

/tools/test/connectivity/acts/framework/acts/test_utils/audio_analysis_lib/
Daudio_analysis.py194 def mid_is_peak(array, mid, left, right): argument
213 value_mid = array[int(mid)]
218 for index in range(int(left), int(mid)):
224 if mid == right:
229 for index in range(int(right), int(mid), -1):
243 mid = 0
245 while mid < length:
246 left = max(0, mid - half_window_size)
247 right = min(length - 1, mid + half_window_size)
250 if array[int(mid)] == 0:
[all …]
/tools/test/connectivity/acts/framework/tests/
Daudio_analysis_unittest.py54 def mid_is_peak(array, mid, left, right): argument
68 value_mid = array[int(mid)]
70 if index == mid:
77 for mid in range(length):
78 left = max(0, mid - half_window_size)
79 right = min(length - 1, mid + half_window_size)
80 if mid_is_peak(array, mid, left, right):
81 results.append((mid, array[int(mid)]))