Merge "remove the dependency to stop_watch.[ch] in imageio"

This commit is contained in:
Pascal Massimino
2016-12-13 06:48:07 +00:00
committed by Gerrit Code Review
3 changed files with 20 additions and 34 deletions

View File

@ -366,10 +366,19 @@ int main(int argc, const char *argv[]) {
if (external_buffer == NULL) goto Exit;
}
if (incremental) {
status = DecodeWebPIncremental(data, data_size, verbose, &config);
} else {
status = DecodeWebP(data, data_size, verbose, &config);
{
Stopwatch stop_watch;
if (verbose) StopwatchReset(&stop_watch);
if (incremental) {
status = DecodeWebPIncremental(data, data_size, &config);
} else {
status = DecodeWebP(data, data_size, &config);
}
if (verbose) {
const double decode_time = StopwatchReadAndReset(&stop_watch);
fprintf(stderr, "Time to decode picture: %.3fs\n", decode_time);
}
}
ok = (status == VP8_STATUS_OK);