ref: dc3ded3679ca0f8662d4789c0cbb67347b26c72e
parent: 0af40df746b47057e3f416fbfc49d83e324741b4
author: Yue Chen <[email protected]>
date: Mon Aug 12 12:56:24 EDT 2019
Add 6:1:1 weighted PSNR to opsnr.stt Change-Id: I6f519ff99bacbe6968d9271a224cc2cbc0958cd8
--- 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);