diff options
author | Andrew Mahone <andrew.mahone@gmail.com> | 2009-05-18 20:21:03 +0000 |
---|---|---|
committer | Andrew Mahone <andrew.mahone@gmail.com> | 2009-05-18 20:21:03 +0000 |
commit | e631d1fb28f25ff05522263c44fa9c347cd63883 (patch) | |
tree | f96efae3b2561b10712fc8bbb934e8ec4416b0ec /apps/plugins/bench_scaler.c | |
parent | c8d6a02c5a792f7c5d634dac8a99a82c6b4c3ad5 (diff) | |
download | rockbox-e631d1fb28f25ff05522263c44fa9c347cd63883.tar.gz rockbox-e631d1fb28f25ff05522263c44fa9c347cd63883.zip |
Use TIME_BEFORE in bench_* plugins, and use 10s test duration.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20983 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/bench_scaler.c')
-rw-r--r-- | apps/plugins/bench_scaler.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/plugins/bench_scaler.c b/apps/plugins/bench_scaler.c index 723e427aa7..c24807dad6 100644 --- a/apps/plugins/bench_scaler.c +++ b/apps/plugins/bench_scaler.c | |||
@@ -109,17 +109,18 @@ enum plugin_status plugin_start(const void* parameter) | |||
109 | if (in == out) | 109 | if (in == out) |
110 | continue; | 110 | continue; |
111 | lcd_printf("timing %dx%d->%dx>%d scale", in, in, out, out); | 111 | lcd_printf("timing %dx%d->%dx>%d scale", in, in, out, out); |
112 | long t1, t2; | 112 | long t1, t2, t_end; |
113 | int count = 0; | 113 | int count = 0; |
114 | t2 = *(rb->current_tick); | 114 | t2 = *(rb->current_tick); |
115 | in_dim.width = in_dim.height = in; | 115 | in_dim.width = in_dim.height = in; |
116 | bm.width = bm.height = rset.rowstop = out; | 116 | bm.width = bm.height = rset.rowstop = out; |
117 | while (t2 != (t1 = *(rb->current_tick))); | 117 | while (t2 != (t1 = *(rb->current_tick))); |
118 | t_end = t1 + 10 * HZ; | ||
118 | do { | 119 | do { |
119 | resize_on_load(&bm, false, &in_dim, &rset, (unsigned char *)plugin_buf, plugin_buf_len, &format_null, IF_PIX_FMT(0,) store_part_null, NULL); | 120 | resize_on_load(&bm, false, &in_dim, &rset, (unsigned char *)plugin_buf, plugin_buf_len, &format_null, IF_PIX_FMT(0,) store_part_null, NULL); |
120 | count++; | 121 | count++; |
121 | t2 = *(rb->current_tick); | 122 | t2 = *(rb->current_tick); |
122 | } while (t2 - t1 < HZ || count < 10); | 123 | } while (TIME_BEFORE(t2, t_end) || count < 10); |
123 | t2 -= t1; | 124 | t2 -= t1; |
124 | t2 *= 10; | 125 | t2 *= 10; |
125 | t2 += count >> 1; | 126 | t2 += count >> 1; |