[x265] [PATCH 08 of 13] stats: report times in milliseconds

Steve Borho steve at borho.org
Wed Jan 28 21:32:23 CET 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1422470763 21600
#      Wed Jan 28 12:46:03 2015 -0600
# Node ID 451e21c4c66b968eb3604c6eb7d6866f2b0c4a86
# Parent  090d305c57084e7ff0927520ef6167b9ce5364ca
stats: report times in milliseconds

diff -r 090d305c5708 -r 451e21c4c66b source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Wed Jan 28 12:44:21 2015 -0600
+++ b/source/encoder/encoder.cpp	Wed Jan 28 12:46:03 2015 -0600
@@ -215,7 +215,7 @@
                         fprintf(m_csvfpt, "RateFactor, ");
                     fprintf(m_csvfpt, "Y PSNR, U PSNR, V PSNR, YUV PSNR, SSIM, SSIM (dB),  List 0, List 1");
                     /* detailed performance statistics */
-                    fprintf(m_csvfpt, ", Row0Wait, Wall time, FrameEnd, Total CTU time, Avg WPP, Row Blocks\n");
+                    fprintf(m_csvfpt, ", Row0Wait ms, Wall time ms, FrameEnd ms, Total CTU time ms, Avg WPP, Row Blocks\n");
                 }
                 else
                     fputs(summaryCSVHeader, m_csvfpt);
@@ -1184,14 +1184,14 @@
                     fputs(", -", m_csvfpt);
             }
 
-#define ELAPSED_SEC(start, end) (((double)(end) - (start)) / 1000000)
+#define ELAPSED_MSEC(start, end) (((double)(end) - (start)) / 1000)
 
             // detailed frame statistics
-            fprintf(m_csvfpt, ", %.3lf, %.3lf, %.3lf, %.3lf",
-                ELAPSED_SEC(curEncoder->m_startCompressTime, curEncoder->m_row0WaitTime),
-                ELAPSED_SEC(curEncoder->m_row0WaitTime, curEncoder->m_endCompressTime),
-                ELAPSED_SEC(curEncoder->m_endCompressTime, curEncoder->m_endFrameTime),
-                ELAPSED_SEC(0, curEncoder->m_totalWorkerElapsedTime));
+            fprintf(m_csvfpt, ", %.1lf, %.1lf, %.1lf, %.1lf",
+                ELAPSED_MSEC(curEncoder->m_startCompressTime, curEncoder->m_row0WaitTime),
+                ELAPSED_MSEC(curEncoder->m_row0WaitTime, curEncoder->m_endCompressTime),
+                ELAPSED_MSEC(curEncoder->m_endCompressTime, curEncoder->m_endFrameTime),
+                ELAPSED_MSEC(0, curEncoder->m_totalWorkerElapsedTime));
             if (curEncoder->m_totalActiveWorkerCount)
                 fprintf(m_csvfpt, ", %.3lf", (double)curEncoder->m_totalActiveWorkerCount / curEncoder->m_activeWorkerCountSamples);
             else


More information about the x265-devel mailing list