Skip to content

Commit f297ebf

Browse files
committed
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).
1 parent eb6dc95 commit f297ebf

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

libswscale/tests/swscale.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,12 @@ static int speedup_count;
7979

8080
static const char *speedup_color(double ratio)
8181
{
82-
return ratio > 1.10 ? "\033[1;32m" : /* bold green */
83-
ratio > 1.02 ? "\033[32m" : /* green */
84-
ratio > 0.98 ? "" : /* default */
85-
ratio > 0.95 ? "\033[33m" : /* yellow */
86-
ratio > 0.90 ? "\033[31m" : /* red */
82+
return ratio > 10.00 ? "\033[1;94m" : /* bold blue */
83+
ratio > 2.00 ? "\033[1;32m" : /* bold green */
84+
ratio > 1.02 ? "\033[32m" : /* green */
85+
ratio > 0.98 ? "" : /* default */
86+
ratio > 0.90 ? "\033[33m" : /* yellow */
87+
ratio > 0.75 ? "\033[31m" : /* red */
8788
"\033[1;31m"; /* bold red */
8889
}
8990

0 commit comments

Comments
 (0)