# HG changeset patch
# User Santhoshini Sekar <[email protected]>
# Date 1571648235 -19800
#      Mon Oct 21 14:27:15 2019 +0530
# Node ID ee74976854fd0a306548ae12f791c7f7c1d9ca98
# Parent  8a028481418d74c4b7304db3128a0093d425d491
add total intra percentage per frame in analysis structure

diff -r 8a028481418d -r ee74976854fd source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp        Mon Oct 21 14:11:47 2019 +0530
+++ b/source/encoder/encoder.cpp        Mon Oct 21 14:27:15 2019 +0530
@@ -1826,6 +1826,17 @@
                     for (int ref = 0; ref < MAX_NUM_REF; ref++)
                         pic_out->analysisData.list0POC[ref] = 
frameData->list0POC[ref];
 
+                    double totalIntraPercent = 0;
+
+                    for (uint32_t depth = 0; depth < m_param->maxCUDepth; 
depth++)
+                        for (uint32_t intramode = 0; intramode < 3; 
intramode++)
+                            totalIntraPercent += 
frameData->cuStats.percentIntraDistribution[depth][intramode];
+                    totalIntraPercent += frameData->cuStats.percentIntraNxN;
+
+                    for (uint32_t depth = 0; depth < m_param->maxCUDepth; 
depth++)
+                        totalIntraPercent += 
frameData->puStats.percentIntraPu[depth];
+                    pic_out->analysisData.totalIntraPercent = 
totalIntraPercent;
+
                     if (!slice->isInterP())
                     {
                         for (int ref = 0; ref < MAX_NUM_REF; ref++)
diff -r 8a028481418d -r ee74976854fd source/x265.h
--- a/source/x265.h     Mon Oct 21 14:11:47 2019 +0530
+++ b/source/x265.h     Mon Oct 21 14:27:15 2019 +0530
@@ -223,6 +223,7 @@
     uint64_t                          frameBits;
     int                               list0POC[MAX_NUM_REF];
     int                               list1POC[MAX_NUM_REF];
+    double                            totalIntraPercent;
 } x265_analysis_data;
 
 /* cu statistics */
# HG changeset patch
# User Santhoshini Sekar <[email protected]>
# Date 1571648235 -19800
#      Mon Oct 21 14:27:15 2019 +0530
# Node ID ee74976854fd0a306548ae12f791c7f7c1d9ca98
# Parent  8a028481418d74c4b7304db3128a0093d425d491
add total intra percentage per frame in analysis structure

diff -r 8a028481418d -r ee74976854fd source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Mon Oct 21 14:11:47 2019 +0530
+++ b/source/encoder/encoder.cpp	Mon Oct 21 14:27:15 2019 +0530
@@ -1826,6 +1826,17 @@
                     for (int ref = 0; ref < MAX_NUM_REF; ref++)
                         pic_out->analysisData.list0POC[ref] = frameData->list0POC[ref];
 
+                    double totalIntraPercent = 0;
+
+                    for (uint32_t depth = 0; depth < m_param->maxCUDepth; depth++)
+                        for (uint32_t intramode = 0; intramode < 3; intramode++)
+                            totalIntraPercent += frameData->cuStats.percentIntraDistribution[depth][intramode];
+                    totalIntraPercent += frameData->cuStats.percentIntraNxN;
+
+                    for (uint32_t depth = 0; depth < m_param->maxCUDepth; depth++)
+                        totalIntraPercent += frameData->puStats.percentIntraPu[depth];
+                    pic_out->analysisData.totalIntraPercent = totalIntraPercent;
+
                     if (!slice->isInterP())
                     {
                         for (int ref = 0; ref < MAX_NUM_REF; ref++)
diff -r 8a028481418d -r ee74976854fd source/x265.h
--- a/source/x265.h	Mon Oct 21 14:11:47 2019 +0530
+++ b/source/x265.h	Mon Oct 21 14:27:15 2019 +0530
@@ -223,6 +223,7 @@
     uint64_t                          frameBits;
     int                               list0POC[MAX_NUM_REF];
     int                               list1POC[MAX_NUM_REF];
+    double                            totalIntraPercent;
 } x265_analysis_data;
 
 /* cu statistics */
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to