[x265] [PATCH 14 of 14] predict: remove checkIdenticalMotion()
Steve Borho
steve at borho.org
Sat Sep 20 18:46:13 CEST 2014
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1411234856 -3600
# Sat Sep 20 18:40:56 2014 +0100
# Node ID 8f73cb0faabae6a5868ad0f642adc79db6650938
# Parent f8ee6c103fafc6537eb98483ab6c082859190d3b
predict: remove checkIdenticalMotion()
We will not insert the same reference picture into L1 and L0 at the same time,
so this check is utterly redundant.
diff -r f8ee6c103faf -r 8f73cb0faaba source/encoder/predict.cpp
--- a/source/encoder/predict.cpp Sat Sep 20 18:39:12 2014 +0100
+++ b/source/encoder/predict.cpp Sat Sep 20 18:40:56 2014 +0100
@@ -160,24 +160,6 @@
primitives.intra_pred[dirMode][sizeIdx](dst, stride, refLft + tuSize - 1, refAbv, dirMode, 0);
}
-bool Predict::checkIdenticalMotion()
-{
- X265_CHECK(m_slice->isInterB(), "identical motion check in P frame\n");
- if (!m_slice->m_pps->bUseWeightedBiPred)
- {
- int refIdxL0 = m_mvField[0]->getRefIdx(m_partAddr);
- int refIdxL1 = m_mvField[1]->getRefIdx(m_partAddr);
- if (refIdxL0 >= 0 && refIdxL1 >= 0)
- {
- int refPOCL0 = m_slice->m_refPOCList[0][refIdxL0];
- int refPOCL1 = m_slice->m_refPOCList[1][refIdxL1];
- if (refPOCL0 == refPOCL1 && m_mvField[0]->getMv(m_partAddr) == m_mvField[1]->getMv(m_partAddr))
- return true;
- }
- }
- return false;
-}
-
void Predict::prepMotionCompensation(TComDataCU* cu, int partIdx)
{
m_slice = cu->m_slice;
@@ -215,12 +197,7 @@
predInterUni(0, predYuv, bLuma, bChroma);
}
else
- {
- if (checkIdenticalMotion())
- predInterUni(REF_PIC_LIST_0, predYuv, bLuma, bChroma);
- else
- predInterBi(cu, predYuv, bLuma, bChroma);
- }
+ predInterBi(cu, predYuv, bLuma, bChroma);
}
void Predict::predInterUni(int list, TComYuv* outPredYuv, bool bLuma, bool bChroma)
diff -r f8ee6c103faf -r 8f73cb0faaba source/encoder/predict.h
--- a/source/encoder/predict.h Sat Sep 20 18:39:12 2014 +0100
+++ b/source/encoder/predict.h Sat Sep 20 18:40:56 2014 +0100
@@ -75,8 +75,6 @@
void getLLSPrediction(TComPattern* pcPattern, int* src0, int srcstride, pixel* dst0, int dststride, uint32_t width, uint32_t height, uint32_t ext0);
- bool checkIdenticalMotion();
-
void getWpScaling(TComDataCU* cu, int refIdx0, int refIdx1, WeightParam *&wp0, WeightParam *&wp1);
public:
More information about the x265-devel
mailing list