[x265] [PATCH] analysis: model the effectiveness of --limit-ref with RD 0/4
ashok at multicorewareinc.com
ashok at multicorewareinc.com
Mon Apr 13 15:33:03 CEST 2015
# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1428931472 -19800
# Mon Apr 13 18:54:32 2015 +0530
# Node ID 3b60d34e493aa7c813d6aaa7f1de3e0e18e08cea
# Parent edd2fb8a28825e856bd614e2d9089473d86f9159
analysis: model the effectiveness of --limit-ref with RD 0/4
diff -r edd2fb8a2882 -r 3b60d34e493a source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Mon Apr 13 18:54:31 2015 +0530
+++ b/source/encoder/analysis.cpp Mon Apr 13 18:54:32 2015 +0530
@@ -839,6 +839,26 @@
md.pred[PRED_2Nx2N].cu.initSubCU(parentCTU, cuGeom);
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;
+ }
+ 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);
More information about the x265-devel
mailing list