[x265] cleanup m_cuColocated[]
Satoshi Nakagawa
nakagawa424 at oki.com
Wed Apr 2 10:13:58 CEST 2014
# HG changeset patch
# User Satoshi Nakagawa <nakagawa424 at oki.com>
# Date 1396426163 -32400
# Wed Apr 02 17:09:23 2014 +0900
# Node ID 9c9829862b5995adb34648759f8fd450e071882f
# Parent 03bad90e94adce6fb89c6d5edb86919a1e783402
cleanup m_cuColocated[]
diff -r 03bad90e94ad -r 9c9829862b59 source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp Wed Apr 02 06:51:35 2014 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.cpp Wed Apr 02 17:09:23 2014 +0900
@@ -91,8 +91,6 @@
m_cuAboveRight = NULL;
m_cuAbove = NULL;
m_cuLeft = NULL;
- m_cuColocated[0] = NULL;
- m_cuColocated[1] = NULL;
m_mvpIdx[0] = NULL;
m_mvpIdx[1] = NULL;
m_chromaFormat = 0;
@@ -280,9 +278,6 @@
m_cuAboveLeft = NULL;
m_cuAboveRight = NULL;
- m_cuColocated[0] = NULL;
- m_cuColocated[1] = NULL;
-
uint32_t uiWidthInCU = pic->getFrameWidthInCU();
if (m_cuAddr % uiWidthInCU)
{
@@ -303,16 +298,6 @@
{
m_cuAboveRight = pic->getCU(m_cuAddr - uiWidthInCU + 1);
}
-
- if (getSlice()->getNumRefIdx(REF_PIC_LIST_0) > 0)
- {
- m_cuColocated[0] = getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getCU(m_cuAddr);
- }
-
- if (getSlice()->getNumRefIdx(REF_PIC_LIST_1) > 0)
- {
- m_cuColocated[1] = getSlice()->getRefPic(REF_PIC_LIST_1, 0)->getCU(m_cuAddr);
- }
}
/** initialize prediction data with enabling sub-LCU-level delta QP
@@ -457,9 +442,6 @@
m_cuAbove = cu->getCUAbove();
m_cuAboveLeft = cu->getCUAboveLeft();
m_cuAboveRight = cu->getCUAboveRight();
-
- m_cuColocated[0] = cu->getCUColocated(REF_PIC_LIST_0);
- m_cuColocated[1] = cu->getCUColocated(REF_PIC_LIST_1);
}
// initialize Sub partition
@@ -526,9 +508,6 @@
m_cuAbove = cu->getCUAbove();
m_cuAboveLeft = cu->getCUAboveLeft();
m_cuAboveRight = cu->getCUAboveRight();
-
- m_cuColocated[0] = cu->getCUColocated(REF_PIC_LIST_0);
- m_cuColocated[1] = cu->getCUColocated(REF_PIC_LIST_1);
}
@@ -620,9 +599,6 @@
m_cuAbove = cu->getCUAbove();
m_cuLeft = cu->getCULeft();
- m_cuColocated[0] = cu->getCUColocated(REF_PIC_LIST_0);
- m_cuColocated[1] = cu->getCUColocated(REF_PIC_LIST_1);
-
m_cuMvField[0].copyFrom(cu->getCUMvField(REF_PIC_LIST_0), cu->getTotalNumPart(), offset);
m_cuMvField[1].copyFrom(cu->getCUMvField(REF_PIC_LIST_1), cu->getTotalNumPart(), offset);
diff -r 03bad90e94ad -r 9c9829862b59 source/Lib/TLibCommon/TComDataCU.h
--- a/source/Lib/TLibCommon/TComDataCU.h Wed Apr 02 06:51:35 2014 +0530
+++ b/source/Lib/TLibCommon/TComDataCU.h Wed Apr 02 17:09:23 2014 +0900
@@ -129,7 +129,6 @@
TComDataCU* m_cuAboveRight; ///< pointer of above-right CU
TComDataCU* m_cuAbove; ///< pointer of above CU
TComDataCU* m_cuLeft; ///< pointer of left CU
- TComDataCU* m_cuColocated[2]; ///< pointer of temporally colocated CU's for both directions
// -------------------------------------------------------------------------------------------------------------------
// coding tool information
@@ -387,8 +386,6 @@
TComDataCU* getCUAboveRight() { return m_cuAboveRight; }
- TComDataCU* getCUColocated(int picList) { return m_cuColocated[picList]; }
-
TComDataCU* getPULeft(uint32_t& lPartUnitIdx,
uint32_t curPartUnitIdx,
bool bEnforceSliceRestriction = true,
diff -r 03bad90e94ad -r 9c9829862b59 source/encoder/compress.cpp
--- a/source/encoder/compress.cpp Wed Apr 02 06:51:35 2014 +0530
+++ b/source/encoder/compress.cpp Wed Apr 02 17:09:23 2014 +0900
@@ -372,13 +372,13 @@
// We need to split, so don't try these modes.
TComYuv* tempYuv = NULL;
#if TOPSKIP
- TComDataCU* colocated0 = outTempCU->getCUColocated(REF_PIC_LIST_0);
- TComDataCU* colocated1 = outTempCU->getCUColocated(REF_PIC_LIST_1);
- char currentQP = outTempCU->getQP(0);
- char previousQP = colocated0->getQP(0);
- uint8_t delta = 0, minDepth0 = 4, minDepth1 = 4;
if (depth == 0)
{
+ TComDataCU* colocated0 = outTempCU->getSlice()->getNumRefIdx(REF_PIC_LIST_0) > 0 ? outTempCU->getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getCU(outTempCU->getAddr()) : NULL;
+ TComDataCU* colocated1 = outTempCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1) > 0 ? outTempCU->getSlice()->getRefPic(REF_PIC_LIST_1, 0)->getCU(outTempCU->getAddr()) : NULL;
+ char currentQP = outTempCU->getQP(0);
+ char previousQP = colocated0->getQP(0);
+ uint8_t delta = 0, minDepth0 = 4, minDepth1 = 4;
double sum0 = 0, sum1 = 0, avgDepth0 = 0, avgDepth1 = 0, avgDepth = 0;
for (uint32_t i = 0; i < outTempCU->getTotalNumPart(); i = i + 4)
{
More information about the x265-devel
mailing list