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