[x265] [PATCH 1 of 2] predict: remove initMotionCompensation, superseded by prep

deepthi at multicorewareinc.com deepthi at multicorewareinc.com
Mon Feb 23 12:25:08 CET 2015


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1424666992 -19800
#      Mon Feb 23 10:19:52 2015 +0530
# Node ID 5c0575c25628f98d8f7570a70bf942fecad4f7e0
# Parent  d179686d7b8d79a125b51fc3f8799152add0fd9f
predict: remove initMotionCompensation, superseded by prep

diff -r d179686d7b8d -r 5c0575c25628 source/common/predict.cpp
--- a/source/common/predict.cpp	Thu Feb 19 14:44:16 2015 -0800
+++ b/source/common/predict.cpp	Mon Feb 23 10:19:52 2015 +0530
@@ -112,17 +112,12 @@
     primitives.cu[sizeIdx].intra_pred[dirMode](dst, stride, srcBuf, dirMode, 0);
 }
 
-void Predict::initMotionCompensation(const CUData& cu, const CUGeom& cuGeom, int partIdx)
+void Predict::prepMotionCompensation(const CUData& cu, const CUGeom& cuGeom, int partIdx)
 {
     m_predSlice = cu.m_slice;
     cu.getPartIndexAndSize(partIdx, m_puAbsPartIdx, m_puWidth, m_puHeight);
     m_ctuAddr = cu.m_cuAddr;
     m_cuAbsPartIdx = cuGeom.encodeIdx;
-}
-
-void Predict::prepMotionCompensation(const CUData& cu, const CUGeom& cuGeom, int partIdx)
-{
-    initMotionCompensation(cu, cuGeom, partIdx);
 
     m_refIdx0      = cu.m_refIdx[0][m_puAbsPartIdx];
     m_clippedMv[0] = cu.m_mv[0][m_puAbsPartIdx];
diff -r d179686d7b8d -r 5c0575c25628 source/common/predict.h
--- a/source/common/predict.h	Thu Feb 19 14:44:16 2015 -0800
+++ b/source/common/predict.h	Mon Feb 23 10:19:52 2015 +0530
@@ -115,7 +115,6 @@
 public:
 
     /* prepMotionCompensation needs to be called to prepare MC with CU-relevant data */
-    void initMotionCompensation(const CUData& cu, const CUGeom& cuGeom, int partIdx);
     void prepMotionCompensation(const CUData& cu, const CUGeom& cuGeom, int partIdx);
     void motionCompensation(Yuv& predYuv, bool bLuma, bool bChroma);
 
diff -r d179686d7b8d -r 5c0575c25628 source/encoder/search.cpp
--- a/source/encoder/search.cpp	Thu Feb 19 14:44:16 2015 -0800
+++ b/source/encoder/search.cpp	Mon Feb 23 10:19:52 2015 +0530
@@ -1954,8 +1954,8 @@
     {
         MotionData* bestME = interMode.bestME[puIdx];
 
-        /* sets m_puAbsPartIdx, m_puWidth, m_puHeight */
-        initMotionCompensation(cu, cuGeom, puIdx);
+        /* Not a terribly good idea to set base class members from derived class */
+        cu.getPartIndexAndSize(puIdx, m_puAbsPartIdx, m_puWidth, m_puHeight);
 
         m_me.setSourcePU(*interMode.fencYuv, cu.m_cuAddr, cuGeom.encodeIdx, m_puAbsPartIdx, m_puWidth, m_puHeight);
 


More information about the x265-devel mailing list