[x265] [PATCH] analysis: model the effectiveness of --limit-ref with RD 0/4
Steve Borho
steve at borho.org
Tue May 19 18:19:43 CEST 2015
On 05/19, ashok at multicorewareinc.com wrote:
> # HG changeset patch
> # User Ashok Kumar Mishra<ashok at multicorewareinc.com>
> # Date 1431935793 -19800
> # Mon May 18 13:26:33 2015 +0530
> # Node ID f6c9a1e184fe7a8c17744117120828458be43106
> # Parent 5bc61c2bc0cec50dc33eda9638f215de21fb4bcf
> analysis: model the effectiveness of --limit-ref with RD 0/4
the series looks good, queued for testing
> diff -r 5bc61c2bc0ce -r f6c9a1e184fe source/encoder/analysis.cpp
> --- a/source/encoder/analysis.cpp Mon May 18 13:24:42 2015 +0530
> +++ b/source/encoder/analysis.cpp Mon May 18 13:26:33 2015 +0530
> @@ -850,6 +850,26 @@
> md.pred[PRED_2Nx2N].cu.initSubCU(parentCTU, cuGeom, qp);
> checkInter_rd0_4(md.pred[PRED_2Nx2N], cuGeom, SIZE_2Nx2N, refMasks);
>
> + if (m_param->limitReferences & X265_REF_LIMIT_CU)
> + {
> + CUData& cu = md.pred[PRED_2Nx2N].cu;
> + int refMask;
> + switch (cu.m_interDir[0])
> + {
> + case 1:
> + refMask = 1 << cu.m_refIdx[0][0];
> + break;
> + case 2:
> + refMask = 1 << (cu.m_refIdx[1][0] + 16);
> + break;
> + case 3:
> + refMask = 1 << cu.m_refIdx[0][0];
> + refMask |= 1 << (cu.m_refIdx[1][0] + 16);
> + break;
> + }
this probably wants to eventually be a cudata helper function, and could
be micro-optimized to avoid the switch statement by using:
refmask |= (cu.m_interDir[0] & (1 << list)) * listmask;
> + allSplitRefs = splitRefs[0] = splitRefs[1] = splitRefs[2] = splitRefs[3] = refMask;
> + }
> +
> if (m_slice->m_sliceType == B_SLICE)
> {
> md.pred[PRED_BIDIR].cu.initSubCU(parentCTU, cuGeom, qp);
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
--
Steve Borho
More information about the x265-devel
mailing list