<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 4, 2020 at 7:06 PM Srikanth Kurapati <<a href="mailto:srikanth.kurapati@multicorewareinc.com">srikanth.kurapati@multicorewareinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">this patch series consists of 1 patches.<br><br><br>Content-Type: multipart/mixed; boundary="===============0695437367=="<br>MIME-Version: 1.0<br>Subject: [PATCH] EQT feature updates<br>X-Mercurial-Node: 0aa429b156680764ce3f62bcebd150a285af1c9d<br>X-Mercurial-Series-Index: 1<br>X-Mercurial-Series-Total: 1<br>Message-Id: <0aa429b156680764ce3f.1588599355@SrikanthKurapati><br>X-Mercurial-Series-Id: <0aa429b156680764ce3f.1588599355@SrikanthKurapati><br>User-Agent: Mercurial-patchbomb/4.9<br>Date: Mon, 04 May 2020 19:05:55 +0530<br>From: <a href="mailto:srikanth.kurapati@multicorewareinc.com" target="_blank">srikanth.kurapati@multicorewareinc.com</a><br>To: <a href="mailto:srikanth.kurapati@multicorewareinc.com" target="_blank">srikanth.kurapati@multicorewareinc.com</a><br><br>--===============0695437367==<br>MIME-Version: 1.0<br>Content-Type: text/plain; charset="us-ascii"<br>Content-Transfer-Encoding: 7bit<br><br># HG changeset patch<br># User Srikanth Kurapati<br># Date 1588584544 -19800<br>#      Mon May 04 14:59:04 2020 +0530<br># Node ID 0aa429b156680764ce3f62bcebd150a285af1c9d<br># Parent  37916f420742078b8b1f5fe231d9e5d7d7449705<br>EQT feature updates.<br><br>1. Improves documentation in help and x265readthedocs for rskip cli options.<br>2. Renamed rskip variable in x265_param structure & rectified regression clis.<br>3. Removed rskip mode 3 which is same as mode 2 with min-cu-size 16.<br></div></blockquote><div>[AM] Please update X265_BUILD </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br>diff -r 37916f420742 -r 0aa429b15668 doc/reST/cli.rst<br>--- a/doc/reST/cli.rst        Mon Jan 06 12:06:48 2020 +0530<br>+++ b/doc/reST/cli.rst  Mon May 04 14:59:04 2020 +0530<br>@@ -845,31 +845,31 @@<br>        Measure 2Nx2N merge candidates first; if no residual is found, <br>      additional modes at that depth are not analysed. Default disabled<br> <br>-.. option:: --rskip <0|1|2|3><br>-<br>-       This option determines early exit from CU depth recursion in modes 1, 2 and 3. When a skip CU is<br>-     found, additional heuristics (depending on RD level and rskip mode) are used to decide whether<br>+.. option:: --rskip <0|1|2><br>+<br>+        This option determines early exit from CU depth recursion in modes 1 and 2. When a skip CU is<br>+        found, additional heuristics (depending on the RD level and rskip mode) are used to decide whether<br>   to terminate recursion. The following table summarizes the behavior.<br>         <br>     +----------+------------+----------------------------------------------------------------+<br>   | RD Level | Rskip Mode |   Skip Recursion Heuristic                                     |<br>        +==========+============+================================================================+<br>-   |   0 - 4  |      1     |   Neighbour costs.                                             |<br>+     |   0 - 4  |      1     |   Neighbour costs and CU homogenity.                           |<br>      +----------+------------+----------------------------------------------------------------+<br>   |   5 - 6  |      1     |   Comparison with inter2Nx2N.                                  |<br>  +----------+------------+----------------------------------------------------------------+<br>-   |   0 - 6  |      2     |   CU edge denstiy.                                             |<br>+     |   0 - 6  |      2     |   CU edge density.                                             |<br>     +----------+------------+----------------------------------------------------------------+<br>-   |   0 - 6  |      3     |   CU edge denstiy with forceful skip for lower levels of CTU.  |<br>-  +----------+------------+----------------------------------------------------------------+<br>-   <br>+<br>  Provides minimal quality degradation at good performance gains for non-zero modes.<br>   :option:`--rskip mode 0` means disabled. Default: 1, disabled when :option:`--tune grain` is used.<br>+   This is a integer value representing the edge-density percentage within the CU. Internally normalized to a number between 0.0 to 1.0 in x265. <br>+       Recommended low thresholds for slow encodes and high for fast encodes.<br> <br> .. option:: --rskip-edge-threshold <0..100><br> <br>  Denotes the minimum expected edge-density percentage within the CU, below which the recursion is skipped.<br>-    Default: 5, requires :option:`--rskip mode 2|3` to be enabled.<br>+       Default: 5, requires :option:`--rskip mode 2` to be enabled.<br> <br> .. option:: --splitrd-skip, --no-splitrd-skip<br> <br>diff -r 37916f420742 -r 0aa429b15668 source/common/frame.cpp<br>--- a/source/common/frame.cpp      Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/common/frame.cpp   Mon May 04 14:59:04 2020 +0530<br>@@ -117,7 +117,7 @@<br>         m_thetaPic = X265_MALLOC(pixel, m_stride * (maxHeight + (m_lumaMarginY * 2)));<br>     }<br> <br>-    if (param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    if (param->recursionSkipMode == EDGE_BASED_RSKIP)<br>     {<br>         uint32_t numCuInWidth = (param->sourceWidth + param->maxCUSize - 1) / param->maxCUSize;<br>         uint32_t numCuInHeight = (param->sourceHeight + param->maxCUSize - 1) / param->maxCUSize;<br>@@ -283,7 +283,7 @@<br>         X265_FREE(m_thetaPic);<br>     }<br> <br>-    if (m_param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    if (m_param->recursionSkipMode == EDGE_BASED_RSKIP)<br>     {<br>         X265_FREE_ZERO(m_edgeBitPlane);<br>         m_edgeBitPic = NULL;<br>diff -r 37916f420742 -r 0aa429b15668 source/common/param.cpp<br>--- a/source/common/param.cpp    Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/common/param.cpp   Mon May 04 14:59:04 2020 +0530<br>@@ -198,7 +198,7 @@<br>     param->bEnableWeightedPred = 1;<br>     param->bEnableWeightedBiPred = 0;<br>     param->bEnableEarlySkip = 1;<br>-    param->enableRecursionSkip = 1;<br>+    param->recursionSkipMode = 1;<br>     param->edgeVarThreshold = 0.05f;<br>     param->bEnableAMP = 0;<br>     param->bEnableRectInter = 0;<br>@@ -548,7 +548,7 @@<br>             param->maxNumMergeCand = 5;<br>             param->searchMethod = X265_STAR_SEARCH;<br>             param->bEnableTransformSkip = 1;<br>-            param->enableRecursionSkip = 0;<br>+            param->recursionSkipMode = 0;<br>             param->maxNumReferences = 5;<br>             param->limitReferences = 0;<br>             param->lookaheadSlices = 0; // disabled for best quality<br>@@ -600,7 +600,7 @@<br>             param->rc.hevcAq = 0;<br>             param->rc.qpStep = 1;<br>             param->rc.bEnableGrain = 1;<br>-            param->enableRecursionSkip = 0;<br>+            param->recursionSkipMode = 0;<br>             param->psyRd = 4.0;<br>             param->psyRdoq = 10.0;<br>             param->bEnableSAO = 0;<br>@@ -704,7 +704,7 @@<br>     OPT("ref") p->maxNumReferences = atoi(value);<br>     OPT("fast-intra") p->bEnableFastIntra = atobool(value);<br>     OPT("early-skip") p->bEnableEarlySkip = atobool(value);<br>-    OPT("rskip") p->enableRecursionSkip = atoi(value);<br>+    OPT("rskip") p->recursionSkipMode = atoi(value);<br>     OPT("rskip-edge-threshold") p->edgeVarThreshold = atoi(value)/100.0f;<br>     OPT("me") p->searchMethod = parseName(value, x265_motion_est_names, bError);<br>     OPT("subme") p->subpelRefine = atoi(value);<br>@@ -922,7 +922,7 @@<br>     OPT("max-merge") p->maxNumMergeCand = (uint32_t)atoi(value);<br>     OPT("temporal-mvp") p->bEnableTemporalMvp = atobool(value);<br>     OPT("early-skip") p->bEnableEarlySkip = atobool(value);<br>-    OPT("rskip") p->enableRecursionSkip = atoi(value);<br>+    OPT("rskip") p->recursionSkipMode = atoi(value);<br>     OPT("rdpenalty") p->rdPenalty = atoi(value);<br>     OPT("tskip") p->bEnableTransformSkip = atobool(value);<br>     OPT("no-tskip-fast") p->bEnableTSkipFast = atobool(value);<br>@@ -1603,9 +1603,9 @@<br>           "RDOQ Level is out of range");<br>     CHECK(param->dynamicRd < 0 || param->dynamicRd > x265_ADAPT_RD_STRENGTH,<br>           "Dynamic RD strength must be between 0 and 4");<br>-    CHECK(param->enableRecursionSkip > 3 || param->enableRecursionSkip < 0,<br>-          "Invalid Recursion skip mode. Valid modes 0,1,2,3");<br>-    if (param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    CHECK(param->recursionSkipMode > 2 || param->recursionSkipMode < 0,<br>+          "Invalid Recursion skip mode. Valid modes 0,1,2");<br>+    if (param->recursionSkipMode == EDGE_BASED_RSKIP)<br>     {<br>         CHECK(param->edgeVarThreshold < 0.0f || param->edgeVarThreshold > 1.0f,<br>               "Minimum edge density percentage for a CU should be an integer between 0 to 100");<br>@@ -1920,8 +1920,8 @@<br>     TOOLVAL(param->psyRdoq, "psy-rdoq=%.2lf");<br>     TOOLOPT(param->bEnableRdRefine, "rd-refine");<br>     TOOLOPT(param->bEnableEarlySkip, "early-skip");<br>-    TOOLVAL(param->enableRecursionSkip, "rskip mode=%d");<br>-    if (param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    TOOLVAL(param->recursionSkipMode, "rskip mode=%d");<br>+    if (param->recursionSkipMode == EDGE_BASED_RSKIP)<br>         TOOLVAL(param->edgeVarThreshold, "rskip-edge-threshold=%.2f");<br>     TOOLOPT(param->bEnableSplitRdSkip, "splitrd-skip");<br>     TOOLVAL(param->noiseReductionIntra, "nr-intra=%d");<br>@@ -2080,8 +2080,8 @@<br>     s += sprintf(s, " rd=%d", p->rdLevel);<br>     s += sprintf(s, " selective-sao=%d", p->selectiveSAO);<br>     BOOL(p->bEnableEarlySkip, "early-skip");<br>-    BOOL(p->enableRecursionSkip, "rskip");<br>-    if (p->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    BOOL(p->recursionSkipMode, "rskip");<br>+    if (p->recursionSkipMode == EDGE_BASED_RSKIP)<br>         s += sprintf(s, " rskip-edge-threshold=%f", p->edgeVarThreshold);<br> <br>     BOOL(p->bEnableFastIntra, "fast-intra");<br>@@ -2391,7 +2391,7 @@<br>     dst->bSaoNonDeblocked = src->bSaoNonDeblocked;<br>     dst->rdLevel = src->rdLevel;<br>     dst->bEnableEarlySkip = src->bEnableEarlySkip;<br>-    dst->enableRecursionSkip = src->enableRecursionSkip;<br>+    dst->recursionSkipMode = src->recursionSkipMode;<br>     dst->edgeVarThreshold = src->edgeVarThreshold;<br>     dst->bEnableFastIntra = src->bEnableFastIntra;<br>     dst->bEnableTSkipFast = src->bEnableTSkipFast;<br>diff -r 37916f420742 -r 0aa429b15668 source/encoder/analysis.cpp<br>--- a/source/encoder/analysis.cpp     Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/encoder/analysis.cpp       Mon May 04 14:59:04 2020 +0530<br>@@ -1272,7 +1272,7 @@<br>                     md.pred[PRED_SKIP].cu.initSubCU(parentCTU, cuGeom, qp);<br>                     checkMerge2Nx2N_rd0_4(md.pred[PRED_SKIP], md.pred[PRED_MERGE], cuGeom);<br> <br>-                    skipRecursion = !!m_param->enableRecursionSkip && md.bestMode;<br>+                    skipRecursion = !!m_param->recursionSkipMode && md.bestMode;<br>                     if (m_param->rdLevel)<br>                         skipModes = m_param->bEnableEarlySkip && md.bestMode;<br>                 }<br>@@ -1296,7 +1296,7 @@<br>                     md.pred[PRED_SKIP].cu.initSubCU(parentCTU, cuGeom, qp);<br>                     checkMerge2Nx2N_rd0_4(md.pred[PRED_SKIP], md.pred[PRED_MERGE], cuGeom);<br> <br>-                    skipRecursion = !!m_param->enableRecursionSkip && md.bestMode;<br>+                    skipRecursion = !!m_param->recursionSkipMode && md.bestMode;<br>                     if (m_param->rdLevel)<br>                         skipModes = m_param->bEnableEarlySkip && md.bestMode;<br>                 }<br>@@ -1314,24 +1314,23 @@<br>                 skipModes = (m_param->bEnableEarlySkip || m_refineLevel == 2)<br>                 && md.bestMode && md.bestMode->cu.isSkipped(0); // TODO: sa8d threshold per depth<br>         }<br>-        if (md.bestMode && m_param->enableRecursionSkip && !bCtuInfoCheck && !(m_param->bAnalysisType == AVC_INFO && m_param->analysisLoadReuseLevel == 7 && (m_modeFlag[0] || m_modeFlag[1])))<br>+        if (md.bestMode && m_param->recursionSkipMode && !bCtuInfoCheck && !(m_param->bAnalysisType == AVC_INFO && m_param->analysisLoadReuseLevel == 7 && (m_modeFlag[0] || m_modeFlag[1])))<br>         {<br>             skipRecursion = md.bestMode->cu.isSkipped(0);<br>             if (mightSplit && !skipRecursion)<br>             {<br>-                if (depth >= minDepth && m_param->enableRecursionSkip == RDCOST_BASED_RSKIP)<br>+                if (depth >= minDepth && m_param->recursionSkipMode == RDCOST_BASED_RSKIP)<br>                 {<br>                     if (depth)<br>                         skipRecursion = recursionDepthCheck(parentCTU, cuGeom, *md.bestMode);<br>                     if (m_bHD && !skipRecursion && m_param->rdLevel == 2 && md.fencYuv.m_size != MAX_CU_SIZE)<br>                         skipRecursion = complexityCheckCU(*md.bestMode);<br>                 }<br>-                else if (cuGeom.log2CUSize >= MAX_LOG2_CU_SIZE - 1 && m_param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+                else if (cuGeom.log2CUSize >= MAX_LOG2_CU_SIZE - 1 && m_param->recursionSkipMode == EDGE_BASED_RSKIP)<br>                 {<br>                     skipRecursion = complexityCheckCU(*md.bestMode);<br>                 }<br>-                else if (m_param->enableRecursionSkip > EDGE_BASED_RSKIP)<br>-                    skipRecursion = true;<br>+<br>             }<br>         }<br>         if (m_param->bAnalysisType == AVC_INFO && md.bestMode && cuGeom.numPartitions <= 16 && m_param->analysisLoadReuseLevel == 7)<br>@@ -1981,7 +1980,7 @@<br>                     checkInter_rd5_6(md.pred[PRED_2Nx2N], cuGeom, SIZE_2Nx2N, refMasks);<br>                     checkBestMode(md.pred[PRED_2Nx2N], cuGeom.depth);<br> <br>-                    if (m_param->enableRecursionSkip && depth && m_modeDepth[depth - 1].bestMode)<br>+                    if (m_param->recursionSkipMode && depth && m_modeDepth[depth - 1].bestMode)<br>                         skipRecursion = md.bestMode && !md.bestMode->cu.getQtRootCbf(0);<br>                 }<br>                 if (m_param->analysisLoadReuseLevel > 4 && m_reusePartSize[cuGeom.absPartIdx] == SIZE_2Nx2N)<br>@@ -2005,7 +2004,7 @@<br>                     checkInter_rd5_6(md.pred[PRED_2Nx2N], cuGeom, SIZE_2Nx2N, refMasks);<br>                     checkBestMode(md.pred[PRED_2Nx2N], cuGeom.depth);<br> <br>-                    if (m_param->enableRecursionSkip && depth && m_modeDepth[depth - 1].bestMode)<br>+                    if (m_param->recursionSkipMode && depth && m_modeDepth[depth - 1].bestMode)<br>                         skipRecursion = md.bestMode && !md.bestMode->cu.getQtRootCbf(0);<br>                 }<br>             }<br>@@ -2024,12 +2023,10 @@<br>             checkInter_rd5_6(md.pred[PRED_2Nx2N], cuGeom, SIZE_2Nx2N, refMasks);<br>             checkBestMode(md.pred[PRED_2Nx2N], cuGeom.depth);<br> <br>-            if (m_param->enableRecursionSkip == RDCOST_BASED_RSKIP && depth && m_modeDepth[depth - 1].bestMode)<br>+            if (m_param->recursionSkipMode == RDCOST_BASED_RSKIP && depth && m_modeDepth[depth - 1].bestMode)<br>                 skipRecursion = md.bestMode && !md.bestMode->cu.getQtRootCbf(0);<br>-            else if (cuGeom.log2CUSize >= MAX_LOG2_CU_SIZE - 1 && m_param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+            else if (cuGeom.log2CUSize >= MAX_LOG2_CU_SIZE - 1 && m_param->recursionSkipMode == EDGE_BASED_RSKIP)<br>                 skipRecursion = md.bestMode && complexityCheckCU(*md.bestMode);<br>-            else if (m_param->enableRecursionSkip > EDGE_BASED_RSKIP)<br>-                skipRecursion = true;<br>         }<br>         if (m_param->bAnalysisType == AVC_INFO && md.bestMode && cuGeom.numPartitions <= 16 && m_param->analysisLoadReuseLevel == 7)<br>             skipRecursion = true;<br>@@ -3538,7 +3535,7 @@<br> <br> bool Analysis::complexityCheckCU(const Mode& bestMode)<br> {<br>-    if (m_param->enableRecursionSkip == RDCOST_BASED_RSKIP)<br>+    if (m_param->recursionSkipMode == RDCOST_BASED_RSKIP)<br>     {<br>         uint32_t mean = 0;<br>         uint32_t homo = 0;<br>@@ -3563,8 +3560,8 @@<br>     }<br>     else<br>     {<br>-        int blockType = bestMode.cu.m_log2CUSize[0] - 2;<br>-        int shift = bestMode.cu.m_log2CUSize[0] * 2;<br>+        int blockType = bestMode.cu.m_log2CUSize[0] - LOG2_UNIT_SIZE;<br>+        int shift = bestMode.cu.m_log2CUSize[0] * LOG2_UNIT_SIZE;<br>         intptr_t stride = m_frame->m_fencPic->m_stride;<br>         intptr_t blockOffsetLuma = bestMode.cu.m_cuPelX + bestMode.cu.m_cuPelY * stride;<br>         uint64_t sum_ss = <a href="http://primitives.cu" target="_blank">primitives.cu</a>[blockType].var(m_frame->m_edgeBitPic + blockOffsetLuma, stride);<br>diff -r 37916f420742 -r 0aa429b15668 source/encoder/encoder.cpp<br>--- a/source/encoder/encoder.cpp      Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/encoder/encoder.cpp        Mon May 04 14:59:04 2020 +0530<br>@@ -1757,7 +1757,7 @@<br>                         }<br>                     }<br>                 }<br>-                if (m_param->enableRecursionSkip >= EDGE_BASED_RSKIP && m_param->bHistBasedSceneCut)<br>+                if (m_param->recursionSkipMode == EDGE_BASED_RSKIP && m_param->bHistBasedSceneCut)<br>                 {<br>                     pixel* src = m_edgePic;<br>                     primitives.planecopy_pp_shr(src, inFrame->m_fencPic->m_picWidth, inFrame->m_edgeBitPic, inFrame->m_fencPic->m_stride,<br>@@ -2425,7 +2425,7 @@<br>         encParam->maxNumReferences = param->maxNumReferences; // never uses more refs than specified in stream headers<br>         encParam->bEnableFastIntra = param->bEnableFastIntra;<br>         encParam->bEnableEarlySkip = param->bEnableEarlySkip;<br>-        encParam->enableRecursionSkip = param->enableRecursionSkip;<br>+        encParam->recursionSkipMode = param->recursionSkipMode;<br>         encParam->searchMethod = param->searchMethod;<br>         /* Scratch buffer prevents me_range from being increased for esa/tesa */<br>         if (param->searchRange < encParam->searchRange)<br>@@ -3413,7 +3413,7 @@<br>         p->maxNumReferences = zone->maxNumReferences;<br>         p->bEnableFastIntra = zone->bEnableFastIntra;<br>         p->bEnableEarlySkip = zone->bEnableEarlySkip;<br>-        p->enableRecursionSkip = zone->enableRecursionSkip;<br>+        p->recursionSkipMode = zone->recursionSkipMode;<br>         p->searchMethod = zone->searchMethod;<br>         p->searchRange = zone->searchRange;<br>         p->subpelRefine = zone->subpelRefine;<br>@@ -5714,7 +5714,7 @@<br>     TOOLCMP(oldParam->maxNumReferences, newParam->maxNumReferences, "ref=%d to %d\n");<br>     TOOLCMP(oldParam->bEnableFastIntra, newParam->bEnableFastIntra, "fast-intra=%d to %d\n");<br>     TOOLCMP(oldParam->bEnableEarlySkip, newParam->bEnableEarlySkip, "early-skip=%d to %d\n");<br>-    TOOLCMP(oldParam->enableRecursionSkip, newParam->enableRecursionSkip, "rskip=%d to %d\n");<br>+    TOOLCMP(oldParam->recursionSkipMode, newParam->recursionSkipMode, "rskip=%d to %d\n");<br>     TOOLCMP(oldParam->searchMethod, newParam->searchMethod, "me=%d to %d\n");<br>     TOOLCMP(oldParam->searchRange, newParam->searchRange, "merange=%d to %d\n");<br>     TOOLCMP(oldParam->subpelRefine, newParam->subpelRefine, "subme= %d to %d\n");<br>diff -r 37916f420742 -r 0aa429b15668 source/encoder/frameencoder.cpp<br>--- a/source/encoder/frameencoder.cpp        Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/encoder/frameencoder.cpp   Mon May 04 14:59:04 2020 +0530<br>@@ -448,7 +448,7 @@<br>     m_ssimCnt = 0;<br>     memset(&(m_frame->m_encData->m_frameStats), 0, sizeof(m_frame->m_encData->m_frameStats));<br> <br>-    if (!m_param->bHistBasedSceneCut && m_param->rc.aqMode != X265_AQ_EDGE && m_param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    if (!m_param->bHistBasedSceneCut && m_param->rc.aqMode != X265_AQ_EDGE && m_param->recursionSkipMode == EDGE_BASED_RSKIP)<br>     {<br>         int height = m_frame->m_fencPic->m_picHeight;<br>         int width = m_frame->m_fencPic->m_picWidth;<br>diff -r 37916f420742 -r 0aa429b15668 source/encoder/slicetype.cpp<br>--- a/source/encoder/slicetype.cpp     Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/encoder/slicetype.cpp      Mon May 04 14:59:04 2020 +0530<br>@@ -519,7 +519,7 @@<br>                 if (param->rc.aqMode == X265_AQ_EDGE)<br>                     edgeFilter(curFrame, param);<br> <br>-                if (param->rc.aqMode == X265_AQ_EDGE && !param->bHistBasedSceneCut && param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+                if (param->rc.aqMode == X265_AQ_EDGE && !param->bHistBasedSceneCut && param->recursionSkipMode == EDGE_BASED_RSKIP)<br>                 {<br>                     pixel* src = curFrame->m_edgePic + curFrame->m_fencPic->m_lumaMarginY * curFrame->m_fencPic->m_stride + curFrame->m_fencPic->m_lumaMarginX;<br>                     primitives.planecopy_pp_shr(src, curFrame->m_fencPic->m_stride, curFrame->m_edgeBitPic,<br>diff -r 37916f420742 -r 0aa429b15668 source/test/regression-tests.txt<br>--- a/source/test/regression-tests.txt    Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/test/regression-tests.txt  Mon May 04 14:59:04 2020 +0530<br>@@ -166,10 +166,6 @@<br> crowd_run_1920x1080_50.yuv, --preset fast --ctu 64 --rskip 2 --rskip-edge-threshold 5 --aq-mode 4<br> crowd_run_1920x1080_50.yuv, --preset slow --ctu 32 --rskip 2 --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1<br> crowd_run_1920x1080_50.yuv, --preset slower --ctu 16 --rskip 2 --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1 --aq-mode 4<br>-crowd_run_1920x1080_50.yuv, --preset faster --ctu 32 --rskip 3 --rskip-edge-threshold 5<br>-crowd_run_1920x1080_50.yuv, --preset fast --ctu 64 --rskip 3 --rskip-edge-threshold 5 --aq-mode 4<br>-crowd_run_1920x1080_50.yuv, --preset slow --ctu 32 --rskip 3 --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1<br>-crowd_run_1920x1080_50.yuv, --preset slower --ctu 16 --rskip 3 --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1 --aq-mode 4<br>  <br> # Main12 intraCost overflow bug test<br> 720p50_parkrun_ter.y4m,--preset medium<br>diff -r 37916f420742 -r 0aa429b15668 source/x265.h<br>--- a/source/x265.h       Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/x265.h     Mon May 04 14:59:04 2020 +0530<br>@@ -1258,7 +1258,7 @@<br> <br>     /* Enable early CU size decisions to avoid recursing to higher depths.<br>      * Default is enabled */<br>-    int       enableRecursionSkip;<br>+    int       recursionSkipMode;<br> <br>     /* Use a faster search method to find the best intra mode. Default is 0 */<br>     int       bEnableFastIntra;<br>diff -r 37916f420742 -r 0aa429b15668 source/x265cli.cpp<br>--- a/source/x265cli.cpp        Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/x265cli.cpp        Mon May 04 14:59:04 2020 +0530<br>@@ -123,9 +123,9 @@<br>         H0("   --[no-]ssim-rd                Enable ssim rate distortion optimization, 0 to disable. Default %s\n", OPT(param->bSsimRd));<br>         H0("   --[no-]rd-refine              Enable QP based RD refinement for rd levels 5 and 6. Default %s\n", OPT(param->bEnableRdRefine));<br>         H0("   --[no-]early-skip             Enable early SKIP detection. Default %s\n", OPT(param->bEnableEarlySkip));<br>-        H0("   --rskip <mode>                Set mode for early exit from recursion. Mode 1: exit using rdcost. Mode 2: exit using edge density. Mode 3: exit using edge density with forceful skip for small sized CU's."<br>-            "                                          Mode 0: disabled. Default %s\n", OPT(param->enableRecursionSkip));<br>-        H1("   --rskip-edge-threshold        Threshold in terms of percentage (integer of range [0,100]) for minimum edge density in CUs to prun the recursion depth. Applicable only for rskip modes 2 and 3. Default: %.f\n", param->edgeVarThreshold*100.0f);<br>+        H0("   --rskip <mode>                Set mode for early exit from recursion. Mode 1: exit using rdcost & CU homogenity. Mode 2: exit using CU edge density.\n"<br>+            "                                 Mode 0: disabled. Default %d\n", param->recursionSkipMode);<br>+        H1("   --rskip-edge-threshold        Threshold in terms of percentage (integer of range [0,100]) for minimum edge density in CUs used to prun the recursion depth. Applicable only for rskip mode 2. Value is preset dependent. Default: %.f\n", param->edgeVarThreshold*100.0f);<br>         H1("   --[no-]tskip-fast             Enable fast intra transform skipping. Default %s\n", OPT(param->bEnableTSkipFast));<br>         H1("   --[no-]splitrd-skip           Enable skipping split RD analysis when sum of split CU rdCost larger than one split CU rdCost for Intra CU. Default %s\n", OPT(param->bEnableSplitRdSkip));<br>         H1("   --nr-intra <integer>          An integer value in range of 0 to 2000, which denotes strength of noise reduction in intra CUs. Default 0\n");<br><br>--===============0695437367==<br>MIME-Version: 1.0<br>Content-Type: text/x-patch; charset="us-ascii"<br>Content-Transfer-Encoding: 7bit<br>Content-Disposition: attachment; filename=x265-3.4.patch<br><br># HG changeset patch<br># User Srikanth Kurapati<br># Date 1588584544 -19800<br>#      Mon May 04 14:59:04 2020 +0530<br># Node ID 0aa429b156680764ce3f62bcebd150a285af1c9d<br># Parent  37916f420742078b8b1f5fe231d9e5d7d7449705<br>EQT feature updates.<br><br>1. Improves documentation in help and x265readthedocs for rskip cli options.<br>2. Renamed rskip variable in x265_param structure & rectified regression clis.<br>3. Removed rskip mode 3 which is same as mode 2 with min-cu-size 16.<br><br>diff -r 37916f420742 -r 0aa429b15668 doc/reST/cli.rst<br>--- a/doc/reST/cli.rst Mon Jan 06 12:06:48 2020 +0530<br>+++ b/doc/reST/cli.rst  Mon May 04 14:59:04 2020 +0530<br>@@ -845,31 +845,31 @@<br>        Measure 2Nx2N merge candidates first; if no residual is found, <br>      additional modes at that depth are not analysed. Default disabled<br> <br>-.. option:: --rskip <0|1|2|3><br>-<br>-       This option determines early exit from CU depth recursion in modes 1, 2 and 3. When a skip CU is<br>-     found, additional heuristics (depending on RD level and rskip mode) are used to decide whether<br>+.. option:: --rskip <0|1|2><br>+<br>+        This option determines early exit from CU depth recursion in modes 1 and 2. When a skip CU is<br>+        found, additional heuristics (depending on the RD level and rskip mode) are used to decide whether<br>   to terminate recursion. The following table summarizes the behavior.<br>         <br>     +----------+------------+----------------------------------------------------------------+<br>   | RD Level | Rskip Mode |   Skip Recursion Heuristic                                     |<br>        +==========+============+================================================================+<br>-   |   0 - 4  |      1     |   Neighbour costs.                                             |<br>+     |   0 - 4  |      1     |   Neighbour costs and CU homogenity.                           |<br>      +----------+------------+----------------------------------------------------------------+<br>   |   5 - 6  |      1     |   Comparison with inter2Nx2N.                                  |<br>  +----------+------------+----------------------------------------------------------------+<br>-   |   0 - 6  |      2     |   CU edge denstiy.                                             |<br>+     |   0 - 6  |      2     |   CU edge density.                                             |<br>     +----------+------------+----------------------------------------------------------------+<br>-   |   0 - 6  |      3     |   CU edge denstiy with forceful skip for lower levels of CTU.  |<br>-  +----------+------------+----------------------------------------------------------------+<br>-   <br>+<br>  Provides minimal quality degradation at good performance gains for non-zero modes.<br>   :option:`--rskip mode 0` means disabled. Default: 1, disabled when :option:`--tune grain` is used.<br>+   This is a integer value representing the edge-density percentage within the CU. Internally normalized to a number between 0.0 to 1.0 in x265. <br>+       Recommended low thresholds for slow encodes and high for fast encodes.<br> <br> .. option:: --rskip-edge-threshold <0..100><br> <br>  Denotes the minimum expected edge-density percentage within the CU, below which the recursion is skipped.<br>-    Default: 5, requires :option:`--rskip mode 2|3` to be enabled.<br>+       Default: 5, requires :option:`--rskip mode 2` to be enabled.<br> <br> .. option:: --splitrd-skip, --no-splitrd-skip<br> <br>diff -r 37916f420742 -r 0aa429b15668 source/common/frame.cpp<br>--- a/source/common/frame.cpp      Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/common/frame.cpp   Mon May 04 14:59:04 2020 +0530<br>@@ -117,7 +117,7 @@<br>         m_thetaPic = X265_MALLOC(pixel, m_stride * (maxHeight + (m_lumaMarginY * 2)));<br>     }<br> <br>-    if (param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    if (param->recursionSkipMode == EDGE_BASED_RSKIP)<br>     {<br>         uint32_t numCuInWidth = (param->sourceWidth + param->maxCUSize - 1) / param->maxCUSize;<br>         uint32_t numCuInHeight = (param->sourceHeight + param->maxCUSize - 1) / param->maxCUSize;<br>@@ -283,7 +283,7 @@<br>         X265_FREE(m_thetaPic);<br>     }<br> <br>-    if (m_param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    if (m_param->recursionSkipMode == EDGE_BASED_RSKIP)<br>     {<br>         X265_FREE_ZERO(m_edgeBitPlane);<br>         m_edgeBitPic = NULL;<br>diff -r 37916f420742 -r 0aa429b15668 source/common/param.cpp<br>--- a/source/common/param.cpp    Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/common/param.cpp   Mon May 04 14:59:04 2020 +0530<br>@@ -198,7 +198,7 @@<br>     param->bEnableWeightedPred = 1;<br>     param->bEnableWeightedBiPred = 0;<br>     param->bEnableEarlySkip = 1;<br>-    param->enableRecursionSkip = 1;<br>+    param->recursionSkipMode = 1;<br>     param->edgeVarThreshold = 0.05f;<br>     param->bEnableAMP = 0;<br>     param->bEnableRectInter = 0;<br>@@ -548,7 +548,7 @@<br>             param->maxNumMergeCand = 5;<br>             param->searchMethod = X265_STAR_SEARCH;<br>             param->bEnableTransformSkip = 1;<br>-            param->enableRecursionSkip = 0;<br>+            param->recursionSkipMode = 0;<br>             param->maxNumReferences = 5;<br>             param->limitReferences = 0;<br>             param->lookaheadSlices = 0; // disabled for best quality<br>@@ -600,7 +600,7 @@<br>             param->rc.hevcAq = 0;<br>             param->rc.qpStep = 1;<br>             param->rc.bEnableGrain = 1;<br>-            param->enableRecursionSkip = 0;<br>+            param->recursionSkipMode = 0;<br>             param->psyRd = 4.0;<br>             param->psyRdoq = 10.0;<br>             param->bEnableSAO = 0;<br>@@ -704,7 +704,7 @@<br>     OPT("ref") p->maxNumReferences = atoi(value);<br>     OPT("fast-intra") p->bEnableFastIntra = atobool(value);<br>     OPT("early-skip") p->bEnableEarlySkip = atobool(value);<br>-    OPT("rskip") p->enableRecursionSkip = atoi(value);<br>+    OPT("rskip") p->recursionSkipMode = atoi(value);<br>     OPT("rskip-edge-threshold") p->edgeVarThreshold = atoi(value)/100.0f;<br>     OPT("me") p->searchMethod = parseName(value, x265_motion_est_names, bError);<br>     OPT("subme") p->subpelRefine = atoi(value);<br>@@ -922,7 +922,7 @@<br>     OPT("max-merge") p->maxNumMergeCand = (uint32_t)atoi(value);<br>     OPT("temporal-mvp") p->bEnableTemporalMvp = atobool(value);<br>     OPT("early-skip") p->bEnableEarlySkip = atobool(value);<br>-    OPT("rskip") p->enableRecursionSkip = atoi(value);<br>+    OPT("rskip") p->recursionSkipMode = atoi(value);<br>     OPT("rdpenalty") p->rdPenalty = atoi(value);<br>     OPT("tskip") p->bEnableTransformSkip = atobool(value);<br>     OPT("no-tskip-fast") p->bEnableTSkipFast = atobool(value);<br>@@ -1603,9 +1603,9 @@<br>           "RDOQ Level is out of range");<br>     CHECK(param->dynamicRd < 0 || param->dynamicRd > x265_ADAPT_RD_STRENGTH,<br>           "Dynamic RD strength must be between 0 and 4");<br>-    CHECK(param->enableRecursionSkip > 3 || param->enableRecursionSkip < 0,<br>-          "Invalid Recursion skip mode. Valid modes 0,1,2,3");<br>-    if (param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    CHECK(param->recursionSkipMode > 2 || param->recursionSkipMode < 0,<br>+          "Invalid Recursion skip mode. Valid modes 0,1,2");<br>+    if (param->recursionSkipMode == EDGE_BASED_RSKIP)<br>     {<br>         CHECK(param->edgeVarThreshold < 0.0f || param->edgeVarThreshold > 1.0f,<br>               "Minimum edge density percentage for a CU should be an integer between 0 to 100");<br>@@ -1920,8 +1920,8 @@<br>     TOOLVAL(param->psyRdoq, "psy-rdoq=%.2lf");<br>     TOOLOPT(param->bEnableRdRefine, "rd-refine");<br>     TOOLOPT(param->bEnableEarlySkip, "early-skip");<br>-    TOOLVAL(param->enableRecursionSkip, "rskip mode=%d");<br>-    if (param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    TOOLVAL(param->recursionSkipMode, "rskip mode=%d");<br>+    if (param->recursionSkipMode == EDGE_BASED_RSKIP)<br>         TOOLVAL(param->edgeVarThreshold, "rskip-edge-threshold=%.2f");<br>     TOOLOPT(param->bEnableSplitRdSkip, "splitrd-skip");<br>     TOOLVAL(param->noiseReductionIntra, "nr-intra=%d");<br>@@ -2080,8 +2080,8 @@<br>     s += sprintf(s, " rd=%d", p->rdLevel);<br>     s += sprintf(s, " selective-sao=%d", p->selectiveSAO);<br>     BOOL(p->bEnableEarlySkip, "early-skip");<br>-    BOOL(p->enableRecursionSkip, "rskip");<br>-    if (p->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    BOOL(p->recursionSkipMode, "rskip");<br>+    if (p->recursionSkipMode == EDGE_BASED_RSKIP)<br>         s += sprintf(s, " rskip-edge-threshold=%f", p->edgeVarThreshold);<br> <br>     BOOL(p->bEnableFastIntra, "fast-intra");<br>@@ -2391,7 +2391,7 @@<br>     dst->bSaoNonDeblocked = src->bSaoNonDeblocked;<br>     dst->rdLevel = src->rdLevel;<br>     dst->bEnableEarlySkip = src->bEnableEarlySkip;<br>-    dst->enableRecursionSkip = src->enableRecursionSkip;<br>+    dst->recursionSkipMode = src->recursionSkipMode;<br>     dst->edgeVarThreshold = src->edgeVarThreshold;<br>     dst->bEnableFastIntra = src->bEnableFastIntra;<br>     dst->bEnableTSkipFast = src->bEnableTSkipFast;<br>diff -r 37916f420742 -r 0aa429b15668 source/encoder/analysis.cpp<br>--- a/source/encoder/analysis.cpp     Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/encoder/analysis.cpp       Mon May 04 14:59:04 2020 +0530<br>@@ -1272,7 +1272,7 @@<br>                     md.pred[PRED_SKIP].cu.initSubCU(parentCTU, cuGeom, qp);<br>                     checkMerge2Nx2N_rd0_4(md.pred[PRED_SKIP], md.pred[PRED_MERGE], cuGeom);<br> <br>-                    skipRecursion = !!m_param->enableRecursionSkip && md.bestMode;<br>+                    skipRecursion = !!m_param->recursionSkipMode && md.bestMode;<br>                     if (m_param->rdLevel)<br>                         skipModes = m_param->bEnableEarlySkip && md.bestMode;<br>                 }<br>@@ -1296,7 +1296,7 @@<br>                     md.pred[PRED_SKIP].cu.initSubCU(parentCTU, cuGeom, qp);<br>                     checkMerge2Nx2N_rd0_4(md.pred[PRED_SKIP], md.pred[PRED_MERGE], cuGeom);<br> <br>-                    skipRecursion = !!m_param->enableRecursionSkip && md.bestMode;<br>+                    skipRecursion = !!m_param->recursionSkipMode && md.bestMode;<br>                     if (m_param->rdLevel)<br>                         skipModes = m_param->bEnableEarlySkip && md.bestMode;<br>                 }<br>@@ -1314,24 +1314,23 @@<br>                 skipModes = (m_param->bEnableEarlySkip || m_refineLevel == 2)<br>                 && md.bestMode && md.bestMode->cu.isSkipped(0); // TODO: sa8d threshold per depth<br>         }<br>-        if (md.bestMode && m_param->enableRecursionSkip && !bCtuInfoCheck && !(m_param->bAnalysisType == AVC_INFO && m_param->analysisLoadReuseLevel == 7 && (m_modeFlag[0] || m_modeFlag[1])))<br>+        if (md.bestMode && m_param->recursionSkipMode && !bCtuInfoCheck && !(m_param->bAnalysisType == AVC_INFO && m_param->analysisLoadReuseLevel == 7 && (m_modeFlag[0] || m_modeFlag[1])))<br>         {<br>             skipRecursion = md.bestMode->cu.isSkipped(0);<br>             if (mightSplit && !skipRecursion)<br>             {<br>-                if (depth >= minDepth && m_param->enableRecursionSkip == RDCOST_BASED_RSKIP)<br>+                if (depth >= minDepth && m_param->recursionSkipMode == RDCOST_BASED_RSKIP)<br>                 {<br>                     if (depth)<br>                         skipRecursion = recursionDepthCheck(parentCTU, cuGeom, *md.bestMode);<br>                     if (m_bHD && !skipRecursion && m_param->rdLevel == 2 && md.fencYuv.m_size != MAX_CU_SIZE)<br>                         skipRecursion = complexityCheckCU(*md.bestMode);<br>                 }<br>-                else if (cuGeom.log2CUSize >= MAX_LOG2_CU_SIZE - 1 && m_param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+                else if (cuGeom.log2CUSize >= MAX_LOG2_CU_SIZE - 1 && m_param->recursionSkipMode == EDGE_BASED_RSKIP)<br>                 {<br>                     skipRecursion = complexityCheckCU(*md.bestMode);<br>                 }<br>-                else if (m_param->enableRecursionSkip > EDGE_BASED_RSKIP)<br>-                    skipRecursion = true;<br>+<br>             }<br>         }<br>         if (m_param->bAnalysisType == AVC_INFO && md.bestMode && cuGeom.numPartitions <= 16 && m_param->analysisLoadReuseLevel == 7)<br>@@ -1981,7 +1980,7 @@<br>                     checkInter_rd5_6(md.pred[PRED_2Nx2N], cuGeom, SIZE_2Nx2N, refMasks);<br>                     checkBestMode(md.pred[PRED_2Nx2N], cuGeom.depth);<br> <br>-                    if (m_param->enableRecursionSkip && depth && m_modeDepth[depth - 1].bestMode)<br>+                    if (m_param->recursionSkipMode && depth && m_modeDepth[depth - 1].bestMode)<br>                         skipRecursion = md.bestMode && !md.bestMode->cu.getQtRootCbf(0);<br>                 }<br>                 if (m_param->analysisLoadReuseLevel > 4 && m_reusePartSize[cuGeom.absPartIdx] == SIZE_2Nx2N)<br>@@ -2005,7 +2004,7 @@<br>                     checkInter_rd5_6(md.pred[PRED_2Nx2N], cuGeom, SIZE_2Nx2N, refMasks);<br>                     checkBestMode(md.pred[PRED_2Nx2N], cuGeom.depth);<br> <br>-                    if (m_param->enableRecursionSkip && depth && m_modeDepth[depth - 1].bestMode)<br>+                    if (m_param->recursionSkipMode && depth && m_modeDepth[depth - 1].bestMode)<br>                         skipRecursion = md.bestMode && !md.bestMode->cu.getQtRootCbf(0);<br>                 }<br>             }<br>@@ -2024,12 +2023,10 @@<br>             checkInter_rd5_6(md.pred[PRED_2Nx2N], cuGeom, SIZE_2Nx2N, refMasks);<br>             checkBestMode(md.pred[PRED_2Nx2N], cuGeom.depth);<br> <br>-            if (m_param->enableRecursionSkip == RDCOST_BASED_RSKIP && depth && m_modeDepth[depth - 1].bestMode)<br>+            if (m_param->recursionSkipMode == RDCOST_BASED_RSKIP && depth && m_modeDepth[depth - 1].bestMode)<br>                 skipRecursion = md.bestMode && !md.bestMode->cu.getQtRootCbf(0);<br>-            else if (cuGeom.log2CUSize >= MAX_LOG2_CU_SIZE - 1 && m_param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+            else if (cuGeom.log2CUSize >= MAX_LOG2_CU_SIZE - 1 && m_param->recursionSkipMode == EDGE_BASED_RSKIP)<br>                 skipRecursion = md.bestMode && complexityCheckCU(*md.bestMode);<br>-            else if (m_param->enableRecursionSkip > EDGE_BASED_RSKIP)<br>-                skipRecursion = true;<br>         }<br>         if (m_param->bAnalysisType == AVC_INFO && md.bestMode && cuGeom.numPartitions <= 16 && m_param->analysisLoadReuseLevel == 7)<br>             skipRecursion = true;<br>@@ -3538,7 +3535,7 @@<br> <br> bool Analysis::complexityCheckCU(const Mode& bestMode)<br> {<br>-    if (m_param->enableRecursionSkip == RDCOST_BASED_RSKIP)<br>+    if (m_param->recursionSkipMode == RDCOST_BASED_RSKIP)<br>     {<br>         uint32_t mean = 0;<br>         uint32_t homo = 0;<br>@@ -3563,8 +3560,8 @@<br>     }<br>     else<br>     {<br>-        int blockType = bestMode.cu.m_log2CUSize[0] - 2;<br>-        int shift = bestMode.cu.m_log2CUSize[0] * 2;<br>+        int blockType = bestMode.cu.m_log2CUSize[0] - LOG2_UNIT_SIZE;<br>+        int shift = bestMode.cu.m_log2CUSize[0] * LOG2_UNIT_SIZE;<br>         intptr_t stride = m_frame->m_fencPic->m_stride;<br>         intptr_t blockOffsetLuma = bestMode.cu.m_cuPelX + bestMode.cu.m_cuPelY * stride;<br>         uint64_t sum_ss = <a href="http://primitives.cu" target="_blank">primitives.cu</a>[blockType].var(m_frame->m_edgeBitPic + blockOffsetLuma, stride);<br>diff -r 37916f420742 -r 0aa429b15668 source/encoder/encoder.cpp<br>--- a/source/encoder/encoder.cpp      Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/encoder/encoder.cpp        Mon May 04 14:59:04 2020 +0530<br>@@ -1757,7 +1757,7 @@<br>                         }<br>                     }<br>                 }<br>-                if (m_param->enableRecursionSkip >= EDGE_BASED_RSKIP && m_param->bHistBasedSceneCut)<br>+                if (m_param->recursionSkipMode == EDGE_BASED_RSKIP && m_param->bHistBasedSceneCut)<br>                 {<br>                     pixel* src = m_edgePic;<br>                     primitives.planecopy_pp_shr(src, inFrame->m_fencPic->m_picWidth, inFrame->m_edgeBitPic, inFrame->m_fencPic->m_stride,<br>@@ -2425,7 +2425,7 @@<br>         encParam->maxNumReferences = param->maxNumReferences; // never uses more refs than specified in stream headers<br>         encParam->bEnableFastIntra = param->bEnableFastIntra;<br>         encParam->bEnableEarlySkip = param->bEnableEarlySkip;<br>-        encParam->enableRecursionSkip = param->enableRecursionSkip;<br>+        encParam->recursionSkipMode = param->recursionSkipMode;<br>         encParam->searchMethod = param->searchMethod;<br>         /* Scratch buffer prevents me_range from being increased for esa/tesa */<br>         if (param->searchRange < encParam->searchRange)<br>@@ -3413,7 +3413,7 @@<br>         p->maxNumReferences = zone->maxNumReferences;<br>         p->bEnableFastIntra = zone->bEnableFastIntra;<br>         p->bEnableEarlySkip = zone->bEnableEarlySkip;<br>-        p->enableRecursionSkip = zone->enableRecursionSkip;<br>+        p->recursionSkipMode = zone->recursionSkipMode;<br>         p->searchMethod = zone->searchMethod;<br>         p->searchRange = zone->searchRange;<br>         p->subpelRefine = zone->subpelRefine;<br>@@ -5714,7 +5714,7 @@<br>     TOOLCMP(oldParam->maxNumReferences, newParam->maxNumReferences, "ref=%d to %d\n");<br>     TOOLCMP(oldParam->bEnableFastIntra, newParam->bEnableFastIntra, "fast-intra=%d to %d\n");<br>     TOOLCMP(oldParam->bEnableEarlySkip, newParam->bEnableEarlySkip, "early-skip=%d to %d\n");<br>-    TOOLCMP(oldParam->enableRecursionSkip, newParam->enableRecursionSkip, "rskip=%d to %d\n");<br>+    TOOLCMP(oldParam->recursionSkipMode, newParam->recursionSkipMode, "rskip=%d to %d\n");<br>     TOOLCMP(oldParam->searchMethod, newParam->searchMethod, "me=%d to %d\n");<br>     TOOLCMP(oldParam->searchRange, newParam->searchRange, "merange=%d to %d\n");<br>     TOOLCMP(oldParam->subpelRefine, newParam->subpelRefine, "subme= %d to %d\n");<br>diff -r 37916f420742 -r 0aa429b15668 source/encoder/frameencoder.cpp<br>--- a/source/encoder/frameencoder.cpp        Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/encoder/frameencoder.cpp   Mon May 04 14:59:04 2020 +0530<br>@@ -448,7 +448,7 @@<br>     m_ssimCnt = 0;<br>     memset(&(m_frame->m_encData->m_frameStats), 0, sizeof(m_frame->m_encData->m_frameStats));<br> <br>-    if (!m_param->bHistBasedSceneCut && m_param->rc.aqMode != X265_AQ_EDGE && m_param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+    if (!m_param->bHistBasedSceneCut && m_param->rc.aqMode != X265_AQ_EDGE && m_param->recursionSkipMode == EDGE_BASED_RSKIP)<br>     {<br>         int height = m_frame->m_fencPic->m_picHeight;<br>         int width = m_frame->m_fencPic->m_picWidth;<br>diff -r 37916f420742 -r 0aa429b15668 source/encoder/slicetype.cpp<br>--- a/source/encoder/slicetype.cpp     Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/encoder/slicetype.cpp      Mon May 04 14:59:04 2020 +0530<br>@@ -519,7 +519,7 @@<br>                 if (param->rc.aqMode == X265_AQ_EDGE)<br>                     edgeFilter(curFrame, param);<br> <br>-                if (param->rc.aqMode == X265_AQ_EDGE && !param->bHistBasedSceneCut && param->enableRecursionSkip >= EDGE_BASED_RSKIP)<br>+                if (param->rc.aqMode == X265_AQ_EDGE && !param->bHistBasedSceneCut && param->recursionSkipMode == EDGE_BASED_RSKIP)<br>                 {<br>                     pixel* src = curFrame->m_edgePic + curFrame->m_fencPic->m_lumaMarginY * curFrame->m_fencPic->m_stride + curFrame->m_fencPic->m_lumaMarginX;<br>                     primitives.planecopy_pp_shr(src, curFrame->m_fencPic->m_stride, curFrame->m_edgeBitPic,<br>diff -r 37916f420742 -r 0aa429b15668 source/test/regression-tests.txt<br>--- a/source/test/regression-tests.txt    Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/test/regression-tests.txt  Mon May 04 14:59:04 2020 +0530<br>@@ -166,10 +166,6 @@<br> crowd_run_1920x1080_50.yuv, --preset fast --ctu 64 --rskip 2 --rskip-edge-threshold 5 --aq-mode 4<br> crowd_run_1920x1080_50.yuv, --preset slow --ctu 32 --rskip 2 --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1<br> crowd_run_1920x1080_50.yuv, --preset slower --ctu 16 --rskip 2 --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1 --aq-mode 4<br>-crowd_run_1920x1080_50.yuv, --preset faster --ctu 32 --rskip 3 --rskip-edge-threshold 5<br>-crowd_run_1920x1080_50.yuv, --preset fast --ctu 64 --rskip 3 --rskip-edge-threshold 5 --aq-mode 4<br>-crowd_run_1920x1080_50.yuv, --preset slow --ctu 32 --rskip 3 --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1<br>-crowd_run_1920x1080_50.yuv, --preset slower --ctu 16 --rskip 3 --rskip-edge-threshold 5 --hist-scenecut --hist-threshold 0.1 --aq-mode 4<br>  <br> # Main12 intraCost overflow bug test<br> 720p50_parkrun_ter.y4m,--preset medium<br>diff -r 37916f420742 -r 0aa429b15668 source/x265.h<br>--- a/source/x265.h       Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/x265.h     Mon May 04 14:59:04 2020 +0530<br>@@ -1258,7 +1258,7 @@<br> <br>     /* Enable early CU size decisions to avoid recursing to higher depths.<br>      * Default is enabled */<br>-    int       enableRecursionSkip;<br>+    int       recursionSkipMode;<br> <br>     /* Use a faster search method to find the best intra mode. Default is 0 */<br>     int       bEnableFastIntra;<br>diff -r 37916f420742 -r 0aa429b15668 source/x265cli.cpp<br>--- a/source/x265cli.cpp        Mon Jan 06 12:06:48 2020 +0530<br>+++ b/source/x265cli.cpp        Mon May 04 14:59:04 2020 +0530<br>@@ -123,9 +123,9 @@<br>         H0("   --[no-]ssim-rd                Enable ssim rate distortion optimization, 0 to disable. Default %s\n", OPT(param->bSsimRd));<br>         H0("   --[no-]rd-refine              Enable QP based RD refinement for rd levels 5 and 6. Default %s\n", OPT(param->bEnableRdRefine));<br>         H0("   --[no-]early-skip             Enable early SKIP detection. Default %s\n", OPT(param->bEnableEarlySkip));<br>-        H0("   --rskip <mode>                Set mode for early exit from recursion. Mode 1: exit using rdcost. Mode 2: exit using edge density. Mode 3: exit using edge density with forceful skip for small sized CU's."<br>-            "                                          Mode 0: disabled. Default %s\n", OPT(param->enableRecursionSkip));<br>-        H1("   --rskip-edge-threshold        Threshold in terms of percentage (integer of range [0,100]) for minimum edge density in CUs to prun the recursion depth. Applicable only for rskip modes 2 and 3. Default: %.f\n", param->edgeVarThreshold*100.0f);<br>+        H0("   --rskip <mode>                Set mode for early exit from recursion. Mode 1: exit using rdcost & CU homogenity. Mode 2: exit using CU edge density.\n"<br>+            "                                 Mode 0: disabled. Default %d\n", param->recursionSkipMode);<br>+        H1("   --rskip-edge-threshold        Threshold in terms of percentage (integer of range [0,100]) for minimum edge density in CUs used to prun the recursion depth. Applicable only for rskip mode 2. Value is preset dependent. Default: %.f\n", param->edgeVarThreshold*100.0f);<br>         H1("   --[no-]tskip-fast             Enable fast intra transform skipping. Default %s\n", OPT(param->bEnableTSkipFast));<br>         H1("   --[no-]splitrd-skip           Enable skipping split RD analysis when sum of split CU rdCost larger than one split CU rdCost for Intra CU. Default %s\n", OPT(param->bEnableSplitRdSkip));<br>         H1("   --nr-intra <integer>          An integer value in range of 0 to 2000, which denotes strength of noise reduction in intra CUs. Default 0\n");<br><br>--===============0695437367==--<br><br><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><b style="background-color:rgb(255,255,255)"><font color="#0b5394">With Regards,</font></b><div><b style="background-color:rgb(255,255,255)"><font color="#0b5394">Srikanth Kurapati.</font></b></div></div></div></div>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font face="georgia, serif">Regards,</font><div><b><font face="georgia, serif">Aruna Matheswaran,</font></b></div><div><font face="georgia, serif">Video Codec Engineer,</font></div><div><font face="georgia, serif">Media & AI analytics BU,</font></div><div><span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:153px;height:58px"><img src="https://lh5.googleusercontent.com/gjX5cPNIZgwUrhfqkTwQUZWztIKmmo0qs3kbwvkS5H-bDVE2ftte9pMTVnFLSjOcjYWLtfc6_OGpxW4vraLg2r5QAIf1Q3MpldFDgWtzK_gXi8ptw5B3joIbsGL6mxj-JRdjHzT5" width="96" height="36" style="margin-left: 0px; margin-top: 0px;"></span></span></span><font face="georgia, serif"><br></font></div><div><span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:153px;height:58px"><img src="https://lh5.googleusercontent.com/gjX5cPNIZgwUrhfqkTwQUZWztIKmmo0qs3kbwvkS5H-bDVE2ftte9pMTVnFLSjOcjYWLtfc6_OGpxW4vraLg2r5QAIf1Q3MpldFDgWtzK_gXi8ptw5B3joIbsGL6mxj-JRdjHzT5" style="margin-left: 0px; margin-top: 0px;"></span></span></span><font face="georgia, serif"><br></font></div><div><font face="georgia, serif"><br></font></div></div></div></div></div></div></div></div></div></div>