shithub: libvpx

Download patch

ref: 40ea310277b3eb5c0fc7be054704baf58a137bb0
parent: f9b93714764ef4dde7f672d5791b2e1c38b12e2c
parent: dc3ded3679ca0f8662d4789c0cbb67347b26c72e
author: Yue Chen <yuec@google.com>
date: Tue Aug 20 13:38:25 EDT 2019

Merge "Add 6:1:1 weighted PSNR to opsnr.stt"

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2613,9 +2613,16 @@
           SNPRINT2(results, "\t%7.3f", cpi->worst_consistency);
         }
 
-        fprintf(f, "%s\t    Time\tRcErr\tAbsErr\n", headings);
-        fprintf(f, "%s\t%8.0f\t%7.2f\t%7.2f\n", results, total_encode_time,
-                rate_err, fabs(rate_err));
+        SNPRINT(headings, "\t    Time\tRcErr\tAbsErr");
+        SNPRINT2(results, "\t%8.0f", total_encode_time);
+        SNPRINT2(results, "\t%7.2f", rate_err);
+        SNPRINT2(results, "\t%7.2f", fabs(rate_err));
+
+        fprintf(f, "%s\tAPsnr611\n", headings);
+        fprintf(
+            f, "%s\t%7.3f\n", results,
+            (6 * cpi->psnr.stat[Y] + cpi->psnr.stat[U] + cpi->psnr.stat[V]) /
+                (cpi->count * 8));
       }
 
       fclose(f);