<div dir="ltr">From d6025f47a444aed2906c5f6cf293e017410d0808 Mon Sep 17 00:00:00 2001<br>From: Mahesh Pittala <<a href="mailto:mahesh@multicorewareinc.com">mahesh@multicorewareinc.com</a>><br>Date: Wed, 9 Sep 2020 15:02:09 +0530<br>Subject: [PATCH] analysis-save/load: Enable reuse of cutree info in<br> reuse-levels >= 2<br><br>---<br> source/encoder/analysis.cpp | 2 +-<br> source/encoder/encoder.cpp  | 2 +-<br> 2 files changed, 2 insertions(+), 2 deletions(-)<br><br>diff --git a/source/encoder/analysis.cpp b/source/encoder/analysis.cpp<br>index 157bae8..aabf386 100644<br>--- a/source/encoder/analysis.cpp<br>+++ b/source/encoder/analysis.cpp<br>@@ -3645,7 +3645,7 @@ int Analysis::calculateQpforCuSize(const CUData& ctu, const CUGeom& cuGeom, int3<br>             qp += distortionData->offset[ctu.m_cuAddr];<br>     }<br> <br>-    if (m_param->analysisLoadReuseLevel == 10 && m_param->rc.cuTree)<br>+    if (m_param->analysisLoadReuseLevel >= 2 && m_param->rc.cuTree)<br>     {<br>         int cuIdx = (ctu.m_cuAddr * ctu.m_numPartitions) + cuGeom.absPartIdx;<br>         if (ctu.m_slice->m_sliceType == I_SLICE)<br>diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp<br>index cf7bfb9..1f710e1 100644<br>--- a/source/encoder/encoder.cpp<br>+++ b/source/encoder/encoder.cpp<br>@@ -5167,7 +5167,7 @@ int Encoder::validateAnalysisData(x265_analysis_validate* saveParam, int writeFl<br> <br>         int bcutree;<br>         X265_FREAD(&bcutree, sizeof(int), 1, m_analysisFileIn, &(saveParam->cuTree));<br>-        if (loadLevel == 10 && m_param->rc.cuTree && (!bcutree || saveLevel < 2))<br>+        if (loadLevel >= 2 && m_param->rc.cuTree && (!bcutree || saveLevel < 2))<br>         {<br>             x265_log(NULL, X265_LOG_ERROR, "Error reading cu-tree info. Disabling cutree offsets. \n");<br>             m_param->rc.cuTree = 0;<br>-- <br>1.8.3.1<br><br></div>