# HG changeset patch # User Santhoshini Sekar <santhosh...@multicorewareinc.com> # Date 1566985098 -19800 # Wed Aug 28 15:08:18 2019 +0530 # Node ID 858a6b6267e025776b18eafc3279dc5addf891e4 # Parent 96fb4962ccb59f7c51c8a56c5d495ced1d8c2941 add reference list in analysis structure
diff -r 96fb4962ccb5 -r 858a6b6267e0 source/encoder/encoder.cpp --- a/source/encoder/encoder.cpp Wed Aug 28 13:32:12 2019 +0530 +++ b/source/encoder/encoder.cpp Wed Aug 28 15:08:18 2019 +0530 @@ -1810,6 +1810,17 @@ if (m_param->analysisSave) { pic_out->analysisData.frameBits = frameData->bits; + if (!slice->isIntra()) + { + for (int ref = 0; ref < MAX_NUM_REF; ref++) + pic_out->analysisData.list0POC[ref] = frameData->list0POC[ref]; + + if (!slice->isInterP()) + { + for (int ref = 0; ref < MAX_NUM_REF; ref++) + pic_out->analysisData.list1POC[ref] = frameData->list1POC[ref]; + } + } } /* Write RateControl Frame level stats in multipass encodes */ @@ -2696,12 +2707,12 @@ frameStats->ssim = ssim; if (!slice->isIntra()) { - for (int ref = 0; ref < 16; ref++) + for (int ref = 0; ref < MAX_NUM_REF; ref++) frameStats->list0POC[ref] = ref < slice->m_numRefIdx[0] ? slice->m_refPOCList[0][ref] - slice->m_lastIDR : -1; if (!slice->isInterP()) { - for (int ref = 0; ref < 16; ref++) + for (int ref = 0; ref < MAX_NUM_REF; ref++) frameStats->list1POC[ref] = ref < slice->m_numRefIdx[1] ? slice->m_refPOCList[1][ref] - slice->m_lastIDR : -1; } } diff -r 96fb4962ccb5 -r 858a6b6267e0 source/x265.h --- a/source/x265.h Wed Aug 28 13:32:12 2019 +0530 +++ b/source/x265.h Wed Aug 28 15:08:18 2019 +0530 @@ -200,6 +200,7 @@ }x265_analysis_distortion_data; +#define MAX_NUM_REF 16 /* Stores all analysis data for a single frame */ typedef struct x265_analysis_data { @@ -220,6 +221,8 @@ x265_analysis_validate saveParam; x265_analysis_distortion_data* distortionData; uint64_t frameBits; + int list0POC[MAX_NUM_REF]; + int list1POC[MAX_NUM_REF]; } x265_analysis_data; /* cu statistics */ @@ -275,8 +278,8 @@ int encoderOrder; int poc; int countRowBlocks; - int list0POC[16]; - int list1POC[16]; + int list0POC[MAX_NUM_REF]; + int list1POC[MAX_NUM_REF]; uint16_t maxLumaLevel; uint16_t minLumaLevel;
# HG changeset patch # User Santhoshini Sekar <santhosh...@multicorewareinc.com> # Date 1566985098 -19800 # Wed Aug 28 15:08:18 2019 +0530 # Node ID 858a6b6267e025776b18eafc3279dc5addf891e4 # Parent 96fb4962ccb59f7c51c8a56c5d495ced1d8c2941 add reference list in analysis structure diff -r 96fb4962ccb5 -r 858a6b6267e0 source/encoder/encoder.cpp --- a/source/encoder/encoder.cpp Wed Aug 28 13:32:12 2019 +0530 +++ b/source/encoder/encoder.cpp Wed Aug 28 15:08:18 2019 +0530 @@ -1810,6 +1810,17 @@ if (m_param->analysisSave) { pic_out->analysisData.frameBits = frameData->bits; + if (!slice->isIntra()) + { + for (int ref = 0; ref < MAX_NUM_REF; ref++) + pic_out->analysisData.list0POC[ref] = frameData->list0POC[ref]; + + if (!slice->isInterP()) + { + for (int ref = 0; ref < MAX_NUM_REF; ref++) + pic_out->analysisData.list1POC[ref] = frameData->list1POC[ref]; + } + } } /* Write RateControl Frame level stats in multipass encodes */ @@ -2696,12 +2707,12 @@ frameStats->ssim = ssim; if (!slice->isIntra()) { - for (int ref = 0; ref < 16; ref++) + for (int ref = 0; ref < MAX_NUM_REF; ref++) frameStats->list0POC[ref] = ref < slice->m_numRefIdx[0] ? slice->m_refPOCList[0][ref] - slice->m_lastIDR : -1; if (!slice->isInterP()) { - for (int ref = 0; ref < 16; ref++) + for (int ref = 0; ref < MAX_NUM_REF; ref++) frameStats->list1POC[ref] = ref < slice->m_numRefIdx[1] ? slice->m_refPOCList[1][ref] - slice->m_lastIDR : -1; } } diff -r 96fb4962ccb5 -r 858a6b6267e0 source/x265.h --- a/source/x265.h Wed Aug 28 13:32:12 2019 +0530 +++ b/source/x265.h Wed Aug 28 15:08:18 2019 +0530 @@ -200,6 +200,7 @@ }x265_analysis_distortion_data; +#define MAX_NUM_REF 16 /* Stores all analysis data for a single frame */ typedef struct x265_analysis_data { @@ -220,6 +221,8 @@ x265_analysis_validate saveParam; x265_analysis_distortion_data* distortionData; uint64_t frameBits; + int list0POC[MAX_NUM_REF]; + int list1POC[MAX_NUM_REF]; } x265_analysis_data; /* cu statistics */ @@ -275,8 +278,8 @@ int encoderOrder; int poc; int countRowBlocks; - int list0POC[16]; - int list1POC[16]; + int list0POC[MAX_NUM_REF]; + int list1POC[MAX_NUM_REF]; uint16_t maxLumaLevel; uint16_t minLumaLevel;
_______________________________________________ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel