[x265] [PATCH 5 of 5] add total intra percentage per frame in analysis structure
Aruna Matheswaran
aruna at multicorewareinc.com
Fri Oct 25 16:00:08 CEST 2019
# HG changeset patch
# User Santhoshini Sekar <santhoshini at multicorewareinc.com>
# 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 */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265_push-5.patch
Type: text/x-patch
Size: 1933 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20191025/d59592e1/attachment.bin>
More information about the x265-devel
mailing list