changeset 12697:772b3229d157

analysis-save/load: Enable reuse of cutree info in reuse-levels >= 2
author Mahesh Pittala <mahesh@multicorewareinc.com>
date Mon, 14 Sep 2020 22:22:55 +0530
parents 49a6e30c692e
children 529cac916a7d 65b6d13ab22a
files source/encoder/analysis.cpp source/encoder/encoder.cpp
diffstat 2 files changed, 2 insertions(+-), 2 deletions(-) [+]
line wrap: on
line diff
--- a/source/encoder/analysis.cpp	Mon Sep 14 21:18:35 2020 +0530
+++ b/source/encoder/analysis.cpp	Mon Sep 14 22:22:55 2020 +0530
@@ -3645,7 +3645,7 @@ int Analysis::calculateQpforCuSize(const
             qp += distortionData->offset[ctu.m_cuAddr];
     }
 
-    if (m_param->analysisLoadReuseLevel == 10 && m_param->rc.cuTree)
+    if (m_param->analysisLoadReuseLevel >= 2 && m_param->rc.cuTree)
     {
         int cuIdx = (ctu.m_cuAddr * ctu.m_numPartitions) + cuGeom.absPartIdx;
         if (ctu.m_slice->m_sliceType == I_SLICE)
--- a/source/encoder/encoder.cpp	Mon Sep 14 21:18:35 2020 +0530
+++ b/source/encoder/encoder.cpp	Mon Sep 14 22:22:55 2020 +0530
@@ -5167,7 +5167,7 @@ int Encoder::validateAnalysisData(x265_a
 
         int bcutree;
         X265_FREAD(&bcutree, sizeof(int), 1, m_analysisFileIn, &(saveParam->cuTree));
-        if (loadLevel == 10 && m_param->rc.cuTree && (!bcutree || saveLevel < 2))
+        if (loadLevel >= 2 && m_param->rc.cuTree && (!bcutree || saveLevel < 2))
         {
             x265_log(NULL, X265_LOG_ERROR, "Error reading cu-tree info. Disabling cutree offsets. \n");
             m_param->rc.cuTree = 0;