History

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).

Niklas Haas committed 1 year ago

Commit f297ebf1 parent eb6dc951 file · +6 −5Browse files

Unified · Split

libswscale/tests/swscale.c+6−5
@@ -79,11 +79,12 @@ static int speedup_count; · 78 unmodified lines
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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t