From 6cc5674cba7a2483d2a06e141df92040b98772f1 Mon Sep 17 00:00:00 2001 From: Karsten Suehring Date: Fri, 18 Jan 2019 12:13:11 +0100 Subject: [PATCH] remove macro JVET_L0265_AFF_MINIMUM4X4 --- source/Lib/CommonLib/InterPrediction.cpp | 28 ------------------------ source/Lib/CommonLib/InterPrediction.h | 2 -- source/Lib/CommonLib/TypeDef.h | 1 - 3 files changed, 31 deletions(-) diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index b0335576e..30a96614a 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -55,9 +55,7 @@ InterPrediction::InterPrediction() m_currChromaFormat( NUM_CHROMA_FORMAT ) , m_maxCompIDToPred ( MAX_NUM_COMPONENT ) , m_pcRdCost ( nullptr ) -#if JVET_L0265_AFF_MINIMUM4X4 , m_storedMv ( nullptr ) -#endif #if JVET_L0256_BIO , m_gradX0(nullptr) , m_gradY0(nullptr) @@ -122,13 +120,11 @@ void InterPrediction::destroy() m_triangleBuf.destroy(); -#if JVET_L0265_AFF_MINIMUM4X4 if (m_storedMv != nullptr) { delete[]m_storedMv; m_storedMv = nullptr; } -#endif #if JVET_L0256_BIO xFree(m_gradX0); m_gradX0 = nullptr; @@ -194,13 +190,11 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC ) m_if.initInterpolationFilter( true ); #endif -#if JVET_L0265_AFF_MINIMUM4X4 if (m_storedMv == nullptr) { const int MVBUFFER_SIZE = MAX_CU_SIZE / MIN_PU_SIZE; m_storedMv = new Mv[MVBUFFER_SIZE*MVBUFFER_SIZE]; } -#endif } bool checkIdenticalMotion( const PredictionUnit &pu, bool checkAffine ) @@ -754,14 +748,12 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio blockWidth >>= iScaleX; blockHeight >>= iScaleY; - #if JVET_L0265_AFF_MINIMUM4X4 blockWidth = std::max(blockWidth, AFFINE_MIN_BLOCK_SIZE); blockHeight = std::max(blockHeight, AFFINE_MIN_BLOCK_SIZE); CHECK(blockWidth > (width >> iScaleX ), "Sub Block width > Block width"); CHECK(blockHeight > (height >> iScaleX), "Sub Block height > Block height"); const int MVBUFFER_SIZE = MAX_CU_SIZE / MIN_PU_SIZE; -#endif const int cxWidth = width >> iScaleX; const int cxHeight = height >> iScaleY; @@ -804,7 +796,6 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio for ( int w = 0; w < cxWidth; w += blockWidth ) { -#if JVET_L0265_AFF_MINIMUM4X4 int iMvScaleTmpHor, iMvScaleTmpVer; if(compID == COMPONENT_Y) { @@ -844,25 +835,6 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio iMvScaleTmpHor = curMv.hor; iMvScaleTmpVer = curMv.ver; } -#else - int iMvScaleTmpHor = iMvScaleHor + iDMvHorX * (iHalfBW + w) + iDMvVerX * (iHalfBH + h); - int iMvScaleTmpVer = iMvScaleVer + iDMvHorY * (iHalfBW + w) + iDMvVerY * (iHalfBH + h); - roundAffineMv( iMvScaleTmpHor, iMvScaleTmpVer, shift ); - - // clip and scale - if (sps.getUseWrapAround()) - { - Mv tmpMv(iMvScaleTmpHor, iMvScaleTmpVer); - clipMv(tmpMv, Position(pu.Y().x + (w << iScaleX), pu.Y().y + (h << iScaleY)), Size(blockWidth << iScaleX, blockHeight << iScaleY), sps); - iMvScaleTmpHor = tmpMv.getHor(); - iMvScaleTmpVer = tmpMv.getVer(); - } - else - { - iMvScaleTmpHor = std::min( iHorMax, std::max( iHorMin, iMvScaleTmpHor ) ); - iMvScaleTmpVer = std::min( iVerMax, std::max( iVerMin, iMvScaleTmpVer ) ); - } -#endif // get the MV in high precision int xFrac, yFrac, xInt, yInt; diff --git a/source/Lib/CommonLib/InterPrediction.h b/source/Lib/CommonLib/InterPrediction.h index d73904337..119360921 100644 --- a/source/Lib/CommonLib/InterPrediction.h +++ b/source/Lib/CommonLib/InterPrediction.h @@ -92,9 +92,7 @@ protected: int m_iRefListIdx; PelStorage m_triangleBuf; -#if JVET_L0265_AFF_MINIMUM4X4 Mv* m_storedMv; -#endif #if JVET_L0256_BIO Pel* m_gradX0; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index f6afa9ec2..dd00d1b8c 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -61,7 +61,6 @@ -#define JVET_L0265_AFF_MINIMUM4X4 1 //Affine 4x4 chroma subblock #define JVET_L0111 1 // Max Tx size for skip #define JVET_L0209_PCM 1 // PCM mode -- GitLab