[FFmpeg-cvslog] tests/swscale: improve colorization of speedup
Niklas Haas
git at videolan.org
Sun May 18 16:01:24 EEST 2025
ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Wed Apr 23 17:20:57 2025 +0200| [f297ebf97abbe300abfb7ca074fd56b9f3cc3f4a] | committer: Niklas Haas
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).
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f297ebf97abbe300abfb7ca074fd56b9f3cc3f4a
---
libswscale/tests/swscale.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
index 7081058130..0f1f8311c9 100644
--- a/libswscale/tests/swscale.c
+++ b/libswscale/tests/swscale.c
@@ -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 */
}
More information about the ffmpeg-cvslog
mailing list