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

Steve Borho steve at borho.org
Mon Feb 23 16:14:34 CET 2015


On 02/23, deepthi at multicorewareinc.com wrote:
> # 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

I suppose so, just for the sake of removing the function call overhead
from the typical case

> 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);
>  
> _______________________________________________
> 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