tests/swscale: improve colorization of speedup
The old limits were a bit too tightly clustered around 1.0. Make the value range much more generous, and also introduce a new highlight for speedups above 10.0 (order of magnitude improvement).
This commit is contained in:
parent
eb6dc952cb
commit
f297ebf97a
1 changed files with 6 additions and 5 deletions
|
|
@ -79,11 +79,12 @@ static int speedup_count;
|
|||
|
||||
static const char *speedup_color(double ratio)
|
||||
{
|
||||
return ratio > 1.10 ? "\033[1;32m" : /* bold green */
|
||||
ratio > 1.02 ? "\033[32m" : /* green */
|
||||
ratio > 0.98 ? "" : /* default */
|
||||
ratio > 0.95 ? "\033[33m" : /* yellow */
|
||||
ratio > 0.90 ? "\033[31m" : /* red */
|
||||
return ratio > 10.00 ? "\033[1;94m" : /* bold blue */
|
||||
ratio > 2.00 ? "\033[1;32m" : /* bold green */
|
||||
ratio > 1.02 ? "\033[32m" : /* green */
|
||||
ratio > 0.98 ? "" : /* default */
|
||||
ratio > 0.90 ? "\033[33m" : /* yellow */
|
||||
ratio > 0.75 ? "\033[31m" : /* red */
|
||||
"\033[1;31m"; /* bold red */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue