[x265] [PATCH] scaling: allow refinement of inter/intra frames when scalefactor is zero

kavitha at multicorewareinc.com kavitha at multicorewareinc.com
Thu Apr 26 09:11:03 CEST 2018


# HG changeset patch
# User Kavitha Sampath <kavitha at multicorewareinc.com>
# Date 1524568273 -19800
#      Tue Apr 24 16:41:13 2018 +0530
# Node ID 860c3b32f59e1883b77064b9948e8e17decd4641
# Parent  07defe235cde1949c55464952ee1dbdc10baf5e4
scaling: allow refinement of inter/intra frames when scalefactor is zero

Also disable analysis of CU with min-cu size when scale factor is zero

diff -r 07defe235cde -r 860c3b32f59e source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp	Thu Apr 12 16:57:19 2018 +0530
+++ b/source/encoder/analysis.cpp	Tue Apr 24 16:41:13 2018 +0530
@@ -523,7 +523,7 @@
     int split = 0;
     if (m_param->intraRefine && m_param->intraRefine != 4)
     {
-        split = ((cuGeom.log2CUSize == (uint32_t)(g_log2Size[m_param->minCUSize] + 1)) && bDecidedDepth);
+        split = m_param->scaleFactor && ((cuGeom.log2CUSize == (uint32_t)(g_log2Size[m_param->minCUSize] + 1)) && bDecidedDepth);
         if (cuGeom.log2CUSize == (uint32_t)(g_log2Size[m_param->minCUSize]) && !bDecidedDepth)
             bAlreadyDecided = false;
     }
@@ -2420,7 +2420,7 @@
         m_refineLevel = m_param->interRefine;
     else
         m_refineLevel = m_frame->m_classifyFrame ? 1 : 3;
-    int split = (m_refineLevel && cuGeom.log2CUSize == (uint32_t)(g_log2Size[m_param->minCUSize] + 1) && bDecidedDepth);
+    int split = (m_param->scaleFactor && m_refineLevel && cuGeom.log2CUSize == (uint32_t)(g_log2Size[m_param->minCUSize] + 1) && bDecidedDepth);
     td.split = split;
 
     if (bDecidedDepth)
@@ -2494,7 +2494,7 @@
                             mode.cu.m_mvd[list][pu.puAbsPartIdx] = mode.cu.m_mv[list][pu.puAbsPartIdx] - mode.amvpCand[list][ref][mode.cu.m_mvpIdx[list][pu.puAbsPartIdx]]/*mvp*/;
                         }
                     }
-                    else if(m_param->scaleFactor)
+                    else
                     {
                         MVField candMvField[MRG_MAX_NUM_CANDS][2]; // double length for mv of both lists
                         uint8_t candDir[MRG_MAX_NUM_CANDS];
diff -r 07defe235cde -r 860c3b32f59e source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Thu Apr 12 16:57:19 2018 +0530
+++ b/source/encoder/encoder.cpp	Tue Apr 24 16:41:13 2018 +0530
@@ -2694,7 +2694,7 @@
 
     if (p->intraRefine)
     {
-        if (!p->analysisLoad || p->analysisReuseLevel < 10 || !p->scaleFactor)
+        if (!p->analysisLoad || p->analysisReuseLevel < 10)
         {
             x265_log(p, X265_LOG_WARNING, "Intra refinement requires analysis load, analysis-reuse-level 10, scale factor. Disabling intra refine.\n");
             p->intraRefine = 0;
@@ -2703,7 +2703,7 @@
 
     if (p->interRefine)
     {
-        if (!p->analysisLoad || p->analysisReuseLevel < 10 || !p->scaleFactor)
+        if (!p->analysisLoad || p->analysisReuseLevel < 10)
         {
             x265_log(p, X265_LOG_WARNING, "Inter refinement requires analysis load, analysis-reuse-level 10, scale factor. Disabling inter refine.\n");
             p->interRefine = 0;
@@ -2737,7 +2737,7 @@
 
     if (p->mvRefine)
     {
-        if (!p->analysisLoad || p->analysisReuseLevel < 10 || !p->scaleFactor)
+        if (!p->analysisLoad || p->analysisReuseLevel < 10)
         {
             x265_log(p, X265_LOG_WARNING, "MV refinement requires analysis load, analysis-reuse-level 10, scale factor. Disabling MV refine.\n");
             p->mvRefine = 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hevc_latest.patch
Type: text/x-patch
Size: 3403 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180426/b173bbaa/attachment.bin>


More information about the x265-devel mailing list