[x265] [PATCH] scaling: allow refinement of inter/intra frames when scalefactor is zero
Bhavna Hariharan
bhavna at multicorewareinc.com
Thu Apr 26 11:08:32 CEST 2018
On Thu, Apr 26, 2018 at 12:41 PM, <kavitha at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Kavitha Sampath <kavitha at multicorewareinc.com>
> # Date 1524568273 -19800
> # Tue Apr 24 16:41:13 2018 +0530
> # Node ID 860c3b32f59e1883b77064b9948e8e17decd4641
> # Parent 07defe235cde1949c55464952ee1dbdc10baf5e4
> scaling: allow refinement of inter/intra frames when scalefactor is zero
>
> Also disable analysis of CU with min-cu size when scale factor is zero
>
> diff -r 07defe235cde -r 860c3b32f59e source/encoder/analysis.cpp
> --- a/source/encoder/analysis.cpp Thu Apr 12 16:57:19 2018 +0530
> +++ b/source/encoder/analysis.cpp Tue Apr 24 16:41:13 2018 +0530
> @@ -523,7 +523,7 @@
> int split = 0;
> if (m_param->intraRefine && m_param->intraRefine != 4)
> {
> - split = ((cuGeom.log2CUSize == (uint32_t)(g_log2Size[m_param->minCUSize]
> + 1)) && bDecidedDepth);
> + split = m_param->scaleFactor && ((cuGeom.log2CUSize ==
> (uint32_t)(g_log2Size[m_param->minCUSize] + 1)) && bDecidedDepth);
> if (cuGeom.log2CUSize == (uint32_t)(g_log2Size[m_param->minCUSize])
> && !bDecidedDepth)
> bAlreadyDecided = false;
> }
> @@ -2420,7 +2420,7 @@
> m_refineLevel = m_param->interRefine;
> else
> m_refineLevel = m_frame->m_classifyFrame ? 1 : 3;
> - int split = (m_refineLevel && cuGeom.log2CUSize ==
> (uint32_t)(g_log2Size[m_param->minCUSize] + 1) && bDecidedDepth);
> + int split = (m_param->scaleFactor && m_refineLevel &&
> cuGeom.log2CUSize == (uint32_t)(g_log2Size[m_param->minCUSize] + 1) &&
> bDecidedDepth);
> td.split = split;
>
> if (bDecidedDepth)
> @@ -2494,7 +2494,7 @@
> mode.cu.m_mvd[list][pu.puAbsPartIdx] =
> mode.cu.m_mv[list][pu.puAbsPartIdx] - mode.amvpCand[list][ref][mode.
> cu.m_mvpIdx[list][pu.puAbsPartIdx]]/*mvp*/;
> }
> }
> - else if(m_param->scaleFactor)
> + else
> {
> MVField candMvField[MRG_MAX_NUM_CANDS][2]; //
> double length for mv of both lists
> uint8_t candDir[MRG_MAX_NUM_CANDS];
> diff -r 07defe235cde -r 860c3b32f59e source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp Thu Apr 12 16:57:19 2018 +0530
> +++ b/source/encoder/encoder.cpp Tue Apr 24 16:41:13 2018 +0530
> @@ -2694,7 +2694,7 @@
>
> if (p->intraRefine)
> {
> - if (!p->analysisLoad || p->analysisReuseLevel < 10 ||
> !p->scaleFactor)
> + if (!p->analysisLoad || p->analysisReuseLevel < 10)
> {
> x265_log(p, X265_LOG_WARNING, "Intra refinement requires
> analysis load, analysis-reuse-level 10, scale factor. Disabling intra
> refine.\n");
>
All the warning messages still say that scale factor is required to enable
refinement methods, we can remove that.
I see that you've enabled inter-refine, intra-refine and refine-mv without
scale-factor, is there any reason for not enabling dynamic refinement
without scale factor?
> p->intraRefine = 0;
> @@ -2703,7 +2703,7 @@
>
> if (p->interRefine)
> {
> - if (!p->analysisLoad || p->analysisReuseLevel < 10 ||
> !p->scaleFactor)
> + if (!p->analysisLoad || p->analysisReuseLevel < 10)
> {
> x265_log(p, X265_LOG_WARNING, "Inter refinement requires
> analysis load, analysis-reuse-level 10, scale factor. Disabling inter
> refine.\n");
> p->interRefine = 0;
> @@ -2737,7 +2737,7 @@
>
> if (p->mvRefine)
> {
> - if (!p->analysisLoad || p->analysisReuseLevel < 10 ||
> !p->scaleFactor)
> + if (!p->analysisLoad || p->analysisReuseLevel < 10)
> {
> x265_log(p, X265_LOG_WARNING, "MV refinement requires
> analysis load, analysis-reuse-level 10, scale factor. Disabling MV
> refine.\n");
> p->mvRefine = 0;
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180426/22fdba53/attachment.html>
More information about the x265-devel
mailing list