changeset 12579:96fb4962ccb5

Add encoded frame bits into analysis structure
author Santhoshini Sekar <santhoshini@multicorewareinc.com>
date Wed, 28 Aug 2019 13:32:12 +0530
parents f27e4c589564
children 858a6b6267e0
files source/encoder/api.cpp source/encoder/encoder.cpp source/x265.h
diffstat 3 files changed, 6 insertions(+-), 0 deletions(-) [+]
line wrap: on
line diff
--- a/source/encoder/api.cpp	Thu Oct 17 12:04:07 2019 +0530
+++ b/source/encoder/api.cpp	Wed Aug 28 13:32:12 2019 +0530
@@ -190,6 +190,7 @@ x265_encoder *x265_encoder_open(x265_par
     }
 
     encoder->create();
+    p->frameNumThreads = encoder->m_param->frameNumThreads;
 
     if (!param->bResetZoneConfig)
     {
--- a/source/encoder/encoder.cpp	Thu Oct 17 12:04:07 2019 +0530
+++ b/source/encoder/encoder.cpp	Wed Aug 28 13:32:12 2019 +0530
@@ -1807,6 +1807,10 @@ int Encoder::encode(const x265_picture* 
 
             if ((m_outputCount + 1)  >= m_param->chunkStart)
                 finishFrameStats(outFrame, curEncoder, frameData, m_pocLast);
+            if (m_param->analysisSave)
+            {
+                pic_out->analysisData.frameBits = frameData->bits;
+            }
 
             /* Write RateControl Frame level stats in multipass encodes */
             if (m_param->rc.bStatWrite)
--- a/source/x265.h	Thu Oct 17 12:04:07 2019 +0530
+++ b/source/x265.h	Wed Aug 28 13:32:12 2019 +0530
@@ -219,6 +219,7 @@ typedef struct x265_analysis_data
     uint8_t*                          modeFlag[2];
     x265_analysis_validate            saveParam;
     x265_analysis_distortion_data*    distortionData;
+    uint64_t                          frameBits;
 } x265_analysis_data;
 
 /* cu statistics */