1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

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:
Niklas Haas
2025-04-23 17:20:57 +02:00
parent eb6dc952cb
commit f297ebf97a

View File

@ -79,11 +79,12 @@ static int speedup_count;
static const char *speedup_color(double ratio) static const char *speedup_color(double ratio)
{ {
return ratio > 1.10 ? "\033[1;32m" : /* bold green */ return ratio > 10.00 ? "\033[1;94m" : /* bold blue */
ratio > 1.02 ? "\033[32m" : /* green */ ratio > 2.00 ? "\033[1;32m" : /* bold green */
ratio > 0.98 ? "" : /* default */ ratio > 1.02 ? "\033[32m" : /* green */
ratio > 0.95 ? "\033[33m" : /* yellow */ ratio > 0.98 ? "" : /* default */
ratio > 0.90 ? "\033[31m" : /* red */ ratio > 0.90 ? "\033[33m" : /* yellow */
ratio > 0.75 ? "\033[31m" : /* red */
"\033[1;31m"; /* bold red */ "\033[1;31m"; /* bold red */
} }