[x265] [PATCH 5 of 5] add total intra percentage per frame in analysis structure

Aruna Matheswaran aruna at multicorewareinc.com
Wed Nov 13 07:52:16 CET 2019


# HG changeset patch
# User Santhoshini Sekar <santhoshini at multicorewareinc.com>
# Date 1571648235 -19800
#      Mon Oct 21 14:27:15 2019 +0530
# Node ID fbb3957d8b5e46dc4049d3c8365ebc52b8f9f46e
# Parent  5297824e605c5eed543c2f99c41335d466d17b4b
add total intra percentage per frame in analysis structure

diff -r 5297824e605c -r fbb3957d8b5e 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 5297824e605c -r fbb3957d8b5e 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/20191113/dc217b10/attachment.bin>


More information about the x265-devel mailing list