mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
remove the dependency to stop_watch.[ch] in imageio
Passing the 'verbose' flag to DecodeWebP() wasn't mandated, and was creating a forced dependency between imageio/ and examples/ Change-Id: Ib3d3f381a7b699df369a97cfb44360580422df11
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user