[x265] [PATCH] stats: average psyEnergy per frame
Divya Manivannan
divya at multicorewareinc.com
Wed Jul 22 06:56:19 CEST 2015
# HG changeset patch
# User Divya Manivannan <divya at multicorewareinc.com>
# Date 1437540850 -19800
# Wed Jul 22 10:24:10 2015 +0530
# Node ID 5e33d0f04082ae890189ef14ed6681a629a24bd4
# Parent 46152345eb6ff261fd90272f7a0712300d6324c0
stats: average psyEnergy per frame
diff -r 46152345eb6f -r 5e33d0f04082 source/CMakeLists.txt
--- a/source/CMakeLists.txt Mon Jul 20 17:18:54 2015 -0700
+++ b/source/CMakeLists.txt Wed Jul 22 10:24:10 2015 +0530
@@ -30,7 +30,7 @@
mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)
# X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 65)
+set(X265_BUILD 66)
configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
"${PROJECT_BINARY_DIR}/x265.def")
configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r 46152345eb6f -r 5e33d0f04082 source/common/framedata.h
--- a/source/common/framedata.h Mon Jul 20 17:18:54 2015 -0700
+++ b/source/common/framedata.h Wed Jul 22 10:24:10 2015 +0530
@@ -54,6 +54,7 @@
double percent8x8Skip;
double avgLumaDistortion;
double avgChromaDistortion;
+ double avgPsyEnergy;
double percentIntraNxN;
double percentSkipCu[NUM_CU_DEPTH];
double percentMergeCu[NUM_CU_DEPTH];
@@ -65,6 +66,7 @@
uint64_t totalCtu;
uint64_t lumaDistortion;
uint64_t chromaDistortion;
+ uint64_t psyEnergy;
uint64_t cntSkipCu[NUM_CU_DEPTH];
uint64_t cntMergeCu[NUM_CU_DEPTH];
uint64_t cntInter[NUM_CU_DEPTH];
diff -r 46152345eb6f -r 5e33d0f04082 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Mon Jul 20 17:18:54 2015 -0700
+++ b/source/encoder/encoder.cpp Wed Jul 22 10:24:10 2015 +0530
@@ -1167,6 +1167,7 @@
frameStats->cuStats.percentIntraNxN = curFrame->m_encData->m_frameStats.percentIntraNxN;
frameStats->avgChromaDistortion = curFrame->m_encData->m_frameStats.avgChromaDistortion;
frameStats->avgLumaDistortion = curFrame->m_encData->m_frameStats.avgLumaDistortion;
+ frameStats->avgPsyEnergy = curFrame->m_encData->m_frameStats.avgPsyEnergy;
for (uint32_t depth = 0; depth <= g_maxCUDepth; depth++)
{
frameStats->cuStats.percentSkipCu[depth] = curFrame->m_encData->m_frameStats.percentSkipCu[depth];
diff -r 46152345eb6f -r 5e33d0f04082 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Mon Jul 20 17:18:54 2015 -0700
+++ b/source/encoder/frameencoder.cpp Wed Jul 22 10:24:10 2015 +0530
@@ -590,6 +590,7 @@
m_frame->m_encData->m_frameStats.totalCtu += m_rows[i].rowStats.totalCtu;
m_frame->m_encData->m_frameStats.lumaDistortion += m_rows[i].rowStats.lumaDistortion;
m_frame->m_encData->m_frameStats.chromaDistortion += m_rows[i].rowStats.chromaDistortion;
+ m_frame->m_encData->m_frameStats.psyEnergy += m_rows[i].rowStats.psyEnergy;
for (uint32_t depth = 0; depth <= g_maxCUDepth; depth++)
{
m_frame->m_encData->m_frameStats.cntSkipCu[depth] += m_rows[i].rowStats.cntSkipCu[depth];
@@ -602,6 +603,7 @@
}
m_frame->m_encData->m_frameStats.avgLumaDistortion = (double)(m_frame->m_encData->m_frameStats.lumaDistortion / m_frame->m_encData->m_frameStats.totalCtu);
m_frame->m_encData->m_frameStats.avgChromaDistortion = (double)(m_frame->m_encData->m_frameStats.chromaDistortion / m_frame->m_encData->m_frameStats.totalCtu);
+ m_frame->m_encData->m_frameStats.avgPsyEnergy = (double)(m_frame->m_encData->m_frameStats.psyEnergy / m_frame->m_encData->m_frameStats.totalCtu);
m_frame->m_encData->m_frameStats.percentIntraNxN = (double)(m_frame->m_encData->m_frameStats.cntIntraNxN * 100) / m_frame->m_encData->m_frameStats.totalCu;
for (uint32_t depth = 0; depth <= g_maxCUDepth; depth++)
{
@@ -969,6 +971,7 @@
curRow.rowStats.totalCtu++;
curRow.rowStats.lumaDistortion += best.lumaDistortion;
curRow.rowStats.chromaDistortion += best.chromaDistortion;
+ curRow.rowStats.psyEnergy += best.psyEnergy;
curRow.rowStats.cntIntraNxN += frameLog.cntIntraNxN;
curRow.rowStats.totalCu += frameLog.totalCu;
for (uint32_t depth = 0; depth <= g_maxCUDepth; depth++)
diff -r 46152345eb6f -r 5e33d0f04082 source/x265-extras.cpp
--- a/source/x265-extras.cpp Mon Jul 20 17:18:54 2015 -0700
+++ b/source/x265-extras.cpp Wed Jul 22 10:24:10 2015 +0530
@@ -107,7 +107,7 @@
fprintf(csvfp, ", Merge %dx%d", size, size);
size /= 2;
}
- fprintf(csvfp, ", Avg Luma Distortion, Avg Chroma Distortion");
+ fprintf(csvfp, ", Avg Luma Distortion, Avg Chroma Distortion, Avg psyEnergy");
}
fprintf(csvfp, "\n");
}
@@ -179,7 +179,7 @@
fprintf(csvfp, ", %5.2lf%%", frameStats->cuStats.percentSkipCu[depth]);
for (uint32_t depth = 0; depth <= g_maxCUDepth; depth++)
fprintf(csvfp, ", %5.2lf%%", frameStats->cuStats.percentMergeCu[depth]);
- fprintf(csvfp, ", %.2lf, %.2lf", frameStats->avgLumaDistortion, frameStats->avgChromaDistortion);
+ fprintf(csvfp, ", %.2lf, %.2lf, %.2lf", frameStats->avgLumaDistortion, frameStats->avgChromaDistortion, frameStats->avgPsyEnergy);
}
fprintf(csvfp, "\n");
fflush(stderr);
diff -r 46152345eb6f -r 5e33d0f04082 source/x265.h
--- a/source/x265.h Mon Jul 20 17:18:54 2015 -0700
+++ b/source/x265.h Wed Jul 22 10:24:10 2015 +0530
@@ -131,6 +131,7 @@
double avgWPP;
double avgLumaDistortion;
double avgChromaDistortion;
+ double avgPsyEnergy;
uint64_t bits;
int encoderOrder;
int poc;
More information about the x265-devel
mailing list