diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 6b2b119aecb11b04d0fdbe1aa8abe501864ab764..b27d2a2a0687a6dd771bb7183b604110fbafa48b 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -225,9 +225,7 @@ void EncApp::xInitLibCfg() #endif m_cEncLib.setAffine ( m_Affine ); m_cEncLib.setAffineType ( m_AffineType ); -#if JVET_L0256_BIO m_cEncLib.setBIO (m_BIO); -#endif m_cEncLib.setDisableMotionCompression ( m_DisableMotionCompression ); m_cEncLib.setMTTMode ( m_MTT ); m_cEncLib.setUseLMChroma ( m_LMChroma ); diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 727b301148cfe370f699b454f2ca687cd89debb6..e63817ed05dcc8f8be691789fe5737e01a1c2f7e 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -820,9 +820,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) #endif ("Affine", m_Affine, false, "Enable affine prediction (0:off, 1:on) [default: off]") ("AffineType", m_AffineType, true, "Enable affine type prediction (0:off, 1:on) [default: on]" ) -#if JVET_L0256_BIO ("BIO", m_BIO, false, "Enable bi-directional optical flow") -#endif ("DisableMotCompression", m_DisableMotionCompression, false, "Disable motion data compression for all modes") ("IMV", m_ImvMode, 2, "Adaptive MV precision Mode (IMV)\n" "\t0: disabled IMV\n" @@ -1929,9 +1927,7 @@ bool EncAppCfg::xCheckParameter() xConfirmPara( m_LMChroma, "LMChroma only allowed with NEXT profile" ); xConfirmPara( m_LargeCTU, "Large CTU is only allowed with NEXT profile" ); xConfirmPara( m_SubPuMvpMode != 0, "Sub-PU motion vector prediction is only allowed with NEXT profile" ); -#if JVET_L0256_BIO xConfirmPara( m_BIO, "BIO only allowed with NEXT profile" ); -#endif xConfirmPara( m_DisableMotionCompression, "Disable motion data compression only allowed with NEXT profile" ); xConfirmPara( m_MTT, "Multi type tree is only allowed with NEXT profile" ); xConfirmPara( m_ImvMode, "IMV is only allowed with NEXT profile" ); @@ -3124,9 +3120,7 @@ void EncAppCfg::xPrintParameter() msg( VERBOSE, "DualITree:%d ", m_dualTree ); msg( VERBOSE, "LargeCTU:%d ", m_LargeCTU ); msg( VERBOSE, "IMV:%d ", m_ImvMode ); -#if JVET_L0256_BIO msg( VERBOSE, "BIO:%d ", m_BIO ); -#endif msg( VERBOSE, "DisMDC:%d ", m_DisableMotionCompression ); msg( VERBOSE, "MTT:%d ", m_MTT ); #if ENABLE_WPP_PARALLELISM diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index ceea9a2819eeac33711b1d486deb2397e8e65936..01ab84d453155b57a2a0c1ebaff73557f68af00f 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -212,9 +212,7 @@ protected: #endif bool m_Affine; bool m_AffineType; -#if JVET_L0256_BIO bool m_BIO; -#endif bool m_DisableMotionCompression; unsigned m_MTT; #if ENABLE_WPP_PARALLELISM diff --git a/source/Lib/CommonLib/Buffer.cpp b/source/Lib/CommonLib/Buffer.cpp index 2b79cdc2b27bfab40c453efc67c5c338256e0bdd..de242cdaefe159f46ed9892ca9dda0f0b89ad693 100644 --- a/source/Lib/CommonLib/Buffer.cpp +++ b/source/Lib/CommonLib/Buffer.cpp @@ -62,7 +62,6 @@ void addAvgCore( const T* src1, int src1Stride, const T* src2, int src2Stride, T #undef ADD_AVG_CORE_INC } -#if JVET_L0256_BIO void addBIOAvgCore(const Pel* src0, int src0Stride, const Pel* src1, int src1Stride, Pel *dst, int dstStride, const Pel *gradX0, const Pel *gradX1, const Pel *gradY0, const Pel*gradY1, int gradStride, int width, int height, int tmpx, int tmpy, int shift, int offset, const ClpRng& clpRng) { int b = 0; @@ -192,7 +191,6 @@ void calcBlkGradientCore(int sx, int sy, int *arraysGx2, int *arraysGxGy GydI += width; } } -#endif #if ENABLE_SIMD_OPT_GBI && JVET_L0646_GBI void removeWeightHighFreq(int16_t* dst, int dstStride, const int16_t* src, int srcStride, int width, int height, int shift, int gbiWeight) diff --git a/source/Lib/CommonLib/CommonDef.h b/source/Lib/CommonLib/CommonDef.h index 61de89a1a21fe9af39a6f106c18af02685f4cd7e..67a384a31646dff2e584633c3d372a97d4860f6c 100644 --- a/source/Lib/CommonLib/CommonDef.h +++ b/source/Lib/CommonLib/CommonDef.h @@ -306,10 +306,8 @@ static const int MAX_NUM_GT2_BINS_4x4SUBBLOCK = 4; ///< max static const int MAX_NUM_REG_BINS_2x2SUBBLOCK = 8; ///< max number of context-coded bins (incl. gt2 bins) per 2x2 subblock (chroma) static const int MAX_NUM_GT2_BINS_2x2SUBBLOCK = 2; ///< max number of gt2 bins per 2x2 subblock (chroma) -#if JVET_L0256_BIO static const int BIO_EXTEND_SIZE = 1; static const int BIO_TEMP_BUFFER_SIZE = (MAX_CU_SIZE + 2 * BIO_EXTEND_SIZE) * (MAX_CU_SIZE + 2 * BIO_EXTEND_SIZE); -#endif #if JVET_L0646_GBI static const int GBI_NUM = 5; ///< the number of weight options @@ -387,9 +385,7 @@ static const int NTAPS_CHROMA = 4; ///< Numb static const int MAX_LADF_INTERVALS = 5; /// max number of luma adaptive deblocking filter qp offset intervals #endif -#if JVET_L0256_BIO static const int NTAPS_BILINEAR = 2; ///< Number of taps for bilinear filter -#endif #if JVET_L0198_L0468_L0104_ATMVP_8x8SUB_BLOCK static const int ATMVP_SUB_BLOCK_SIZE = 3; ///< sub-block size for ATMVP diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index 30a96614ac48ff1f4e22d0012cffa42ebdde8b69..8c2a1aae594559620f0fde3fb16582c58b7c1e9c 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -56,13 +56,11 @@ InterPrediction::InterPrediction() , m_maxCompIDToPred ( MAX_NUM_COMPONENT ) , m_pcRdCost ( nullptr ) , m_storedMv ( nullptr ) -#if JVET_L0256_BIO , m_gradX0(nullptr) , m_gradY0(nullptr) , m_gradX1(nullptr) , m_gradY1(nullptr) , m_subPuMC(false) -#endif { for( uint32_t ch = 0; ch < MAX_NUM_COMPONENT; ch++ ) { @@ -126,12 +124,10 @@ void InterPrediction::destroy() m_storedMv = nullptr; } -#if JVET_L0256_BIO xFree(m_gradX0); m_gradX0 = nullptr; xFree(m_gradY0); m_gradY0 = nullptr; xFree(m_gradX1); m_gradX1 = nullptr; xFree(m_gradY1); m_gradY1 = nullptr; -#endif } void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC ) @@ -150,13 +146,8 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC ) { for( uint32_t c = 0; c < MAX_NUM_COMPONENT; c++ ) { -#if JVET_L0256_BIO int extWidth = MAX_CU_SIZE + (2 * BIO_EXTEND_SIZE + 2) + 16; int extHeight = MAX_CU_SIZE + (2 * BIO_EXTEND_SIZE + 2) + 1; -#else - int extWidth = MAX_CU_SIZE + 16; - int extHeight = MAX_CU_SIZE + 1; -#endif for( uint32_t i = 0; i < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS_SIGNAL; i++ ) { m_filteredBlockTmp[i][c] = ( Pel* ) xMalloc( Pel, ( extWidth + 4 ) * ( extHeight + 7 + 4 ) ); @@ -178,12 +169,10 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC ) m_iRefListIdx = -1; -#if JVET_L0256_BIO m_gradX0 = (Pel*)xMalloc(Pel, BIO_TEMP_BUFFER_SIZE); m_gradY0 = (Pel*)xMalloc(Pel, BIO_TEMP_BUFFER_SIZE); m_gradX1 = (Pel*)xMalloc(Pel, BIO_TEMP_BUFFER_SIZE); m_gradY1 = (Pel*)xMalloc(Pel, BIO_TEMP_BUFFER_SIZE); -#endif } #if !JVET_J0090_MEMORY_BANDWITH_MEASURE @@ -327,9 +316,7 @@ void InterPrediction::xSubPuMC( PredictionUnit& pu, PelUnitBuf& predBuf, const R int fstStep = (!verMC ? puHeight : puWidth); int secStep = (!verMC ? puWidth : puHeight); -#if JVET_L0256_BIO m_subPuMC = true; -#endif for (int fstDim = fstStart; fstDim < fstEnd; fstDim += fstStep) { @@ -366,9 +353,7 @@ void InterPrediction::xSubPuMC( PredictionUnit& pu, PelUnitBuf& predBuf, const R secDim = later - secStep; } } -#if JVET_L0256_BIO m_subPuMC = false; -#endif #if JVET_L0369_SUBBLOCK_MERGE pu.cu->affine = isAffine; @@ -395,14 +380,10 @@ void InterPrediction::xChromaMC(PredictionUnit &pu, PelUnitBuf& pcYuvPred) PelUnitBuf subPredBuf = pcYuvPred.subBuf(UnitAreaRelative(pu, subPu)); xPredInterBlk(COMPONENT_Cb, subPu, refPic, curMi.mv[0], subPredBuf, false, pu.cu->slice->clpRng(COMPONENT_Cb) -#if JVET_L0256_BIO , false -#endif , true); xPredInterBlk(COMPONENT_Cr, subPu, refPic, curMi.mv[0], subPredBuf, false, pu.cu->slice->clpRng(COMPONENT_Cr) -#if JVET_L0256_BIO , false -#endif , true); } } @@ -411,9 +392,7 @@ void InterPrediction::xChromaMC(PredictionUnit &pu, PelUnitBuf& pcYuvPred) void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList& eRefPicList, PelUnitBuf& pcYuvPred, const bool& bi -#if JVET_L0256_BIO , const bool& bioApplied -#endif #if JVET_L0293_CPR , const bool luma, const bool chroma #endif @@ -466,17 +445,13 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList& #endif if ( pu.cu->affine ) { -#if JVET_L0256_BIO CHECK( bioApplied, "BIO is not allowed with affine" ); -#endif xPredAffineBlk( compID, pu, pu.cu->slice->getRefPic( eRefPicList, iRefIdx ), mv, pcYuvPred, bi, pu.cu->slice->clpRng( compID ) ); } else { xPredInterBlk( compID, pu, pu.cu->slice->getRefPic( eRefPicList, iRefIdx ), mv[0], pcYuvPred, bi, pu.cu->slice->clpRng( compID ) -#if JVET_L0256_BIO , bioApplied -#endif #if JVET_L0293_CPR , isCPR #endif @@ -491,7 +466,6 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred) const PPS &pps = *pu.cs->pps; const Slice &slice = *pu.cs->slice; -#if JVET_L0256_BIO bool bioApplied = false; if (pu.cs->sps->getSpsNext().getUseBIO()) { @@ -520,7 +494,6 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred) } #endif } -#endif for (uint32_t refList = 0; refList < NUM_REF_PIC_LIST_01; refList++) { @@ -541,9 +514,7 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred) if (pu.refIdx[0] >= 0 && pu.refIdx[1] >= 0) { xPredInterUni ( pu, eRefPicList, pcMbBuf, true -#if JVET_L0256_BIO , bioApplied -#endif #if JVET_L0293_CPR , true, true #endif @@ -554,9 +525,7 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred) if( ( (pps.getUseWP() && slice.getSliceType() == P_SLICE) || (pps.getWPBiPred() && slice.getSliceType() == B_SLICE) ) ) { xPredInterUni ( pu, eRefPicList, pcMbBuf, true -#if JVET_L0256_BIO , bioApplied -#endif #if JVET_L0293_CPR , true, true #endif @@ -565,9 +534,7 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred) else { xPredInterUni( pu, eRefPicList, pcMbBuf, pu.cu->triangle -#if JVET_L0256_BIO , bioApplied -#endif #if JVET_L0293_CPR , true, true #endif @@ -593,18 +560,12 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred) } else { -#if JVET_L0256_BIO xWeightedAverage( pu, srcPred0, srcPred1, pcYuvPred, slice.getSPS()->getBitDepths(), slice.clpRngs(), bioApplied ); -#else - xWeightedAverage( pu, srcPred0, srcPred1, pcYuvPred, slice.getSPS()->getBitDepths(), slice.clpRngs() ); -#endif } } void InterPrediction::xPredInterBlk ( const ComponentID& compID, const PredictionUnit& pu, const Picture* refPic, const Mv& _mv, PelUnitBuf& dstPic, const bool& bi, const ClpRng& clpRng -#if JVET_L0256_BIO , const bool& bioApplied -#endif #if JVET_L0293_CPR , bool isCPR #endif @@ -637,7 +598,6 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio refBuf = refPic->getRecoBuf( CompArea( compID, chFmt, offset, pu.blocks[compID].size() ) ); } -#if JVET_L0256_BIO // backup data int backupWidth = width; int backupHeight = height; @@ -653,46 +613,26 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio dstBuf.stride = width; dstBuf.buf = m_filteredBlockTmp[2 + m_iRefListIdx][compID] + 2 * dstBuf.stride + 2; } -#endif if( yFrac == 0 ) { -#if JVET_L0256_BIO m_if.filterHor(compID, (Pel*)refBuf.buf, refBuf.stride, dstBuf.buf, dstBuf.stride, backupWidth, backupHeight, xFrac, rndRes, chFmt, clpRng); -#else - m_if.filterHor(compID, (Pel*) refBuf.buf, refBuf.stride, dstBuf.buf, dstBuf.stride, width, height, xFrac, rndRes, chFmt, clpRng); -#endif } else if( xFrac == 0 ) { -#if JVET_L0256_BIO m_if.filterVer(compID, (Pel*)refBuf.buf, refBuf.stride, dstBuf.buf, dstBuf.stride, backupWidth, backupHeight, yFrac, true, rndRes, chFmt, clpRng); -#else - m_if.filterVer(compID, (Pel*) refBuf.buf, refBuf.stride, dstBuf.buf, dstBuf.stride, width, height, yFrac, true, rndRes, chFmt, clpRng); -#endif } else { PelBuf tmpBuf = PelBuf(m_filteredBlockTmp[0][compID], pu.blocks[compID]); -#if JVET_L0256_BIO tmpBuf.stride = dstBuf.stride; -#endif int vFilterSize = isLuma(compID) ? NTAPS_LUMA : NTAPS_CHROMA; -#if JVET_L0256_BIO m_if.filterHor(compID, (Pel*)refBuf.buf - ((vFilterSize >> 1) - 1) * refBuf.stride, refBuf.stride, tmpBuf.buf, tmpBuf.stride, backupWidth, backupHeight + vFilterSize - 1, xFrac, false, chFmt, clpRng); -#else - m_if.filterHor(compID, (Pel*) refBuf.buf - ((vFilterSize >> 1) - 1) * refBuf.stride, refBuf.stride, tmpBuf.buf, tmpBuf.stride, width, height + vFilterSize - 1, xFrac, false, chFmt, clpRng); -#endif JVET_J0090_SET_CACHE_ENABLE( false ); -#if JVET_L0256_BIO m_if.filterVer(compID, (Pel*)tmpBuf.buf + ((vFilterSize >> 1) - 1) * tmpBuf.stride, tmpBuf.stride, dstBuf.buf, dstBuf.stride, backupWidth, backupHeight, yFrac, false, rndRes, chFmt, clpRng); -#else - m_if.filterVer(compID, (Pel*) tmpBuf.buf + ((vFilterSize >> 1) - 1) * tmpBuf.stride, tmpBuf.stride, dstBuf.buf, dstBuf.stride, width, height, yFrac, false, rndRes, chFmt, clpRng); -#endif } JVET_J0090_SET_CACHE_ENABLE( true ); -#if JVET_L0256_BIO if (bioApplied && compID == COMPONENT_Y) { refBuf.buf = refBuf.buf - refBuf.stride - 1; @@ -705,7 +645,6 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio dstBuf.buf = backupDstBufPtr; dstBuf.stride = backupDstBufStride; } -#endif } void InterPrediction::xPredAffineBlk( const ComponentID& compID, const PredictionUnit& pu, const Picture* refPic, const Mv* _mv, PelUnitBuf& dstPic, const bool& bi, const ClpRng& clpRng ) @@ -719,9 +658,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio pu.cu->lumaSize(), *pu.cs->sps ); xPredInterBlk( compID, pu, refPic, mvTemp, dstPic, bi, clpRng -#if JVET_L0256_BIO , false -#endif #if JVET_L0293_CPR , false #endif @@ -898,7 +835,6 @@ int getMSB( unsigned x ) return msb; } -#if JVET_L0256_BIO void InterPrediction::applyBiOptFlow(const PredictionUnit &pu, const CPelUnitBuf &yuvSrc0, const CPelUnitBuf &yuvSrc1, const int &refIdx0, const int &refIdx1, PelUnitBuf &yuvDst, const BitDepths &clipBitDepths) { const int height = yuvDst.Y().height; @@ -1258,13 +1194,8 @@ void InterPrediction::xCalcBlkGradient(int sx, int sy, int *arraysGx2, int } #endif } -#endif -#if JVET_L0256_BIO void InterPrediction::xWeightedAverage(const PredictionUnit& pu, const CPelUnitBuf& pcYuvSrc0, const CPelUnitBuf& pcYuvSrc1, PelUnitBuf& pcYuvDst, const BitDepths& clipBitDepths, const ClpRngs& clpRngs, const bool& bioApplied ) -#else -void InterPrediction::xWeightedAverage( const PredictionUnit& pu, const CPelUnitBuf& pcYuvSrc0, const CPelUnitBuf& pcYuvSrc1, PelUnitBuf& pcYuvDst, const BitDepths& clipBitDepths, const ClpRngs& clpRngs ) -#endif { const int iRefIdx0 = pu.refIdx[0]; const int iRefIdx1 = pu.refIdx[1]; @@ -1274,14 +1205,11 @@ void InterPrediction::xWeightedAverage( const PredictionUnit& pu, const CPelUnit #if JVET_L0646_GBI if( pu.cu->GBiIdx != GBI_DEFAULT ) { -#if JVET_L0256_BIO CHECK(bioApplied, "GBi is disallowed with BIO"); -#endif pcYuvDst.addWeightedAvg(pcYuvSrc0, pcYuvSrc1, clpRngs, pu.cu->GBiIdx); return; } #endif -#if JVET_L0256_BIO if (bioApplied) { const int src0Stride = pu.lwidth() + 2 * BIO_EXTEND_SIZE + 2; @@ -1300,9 +1228,6 @@ void InterPrediction::xWeightedAverage( const PredictionUnit& pu, const CPelUnit } } pcYuvDst.addAvg(pcYuvSrc0, pcYuvSrc1, clpRngs, bioApplied); -#else - pcYuvDst.addAvg( pcYuvSrc0, pcYuvSrc1, clpRngs ); -#endif } else if( iRefIdx0 >= 0 && iRefIdx1 < 0 ) { @@ -1342,9 +1267,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu else // (luma && !chroma) { xPredInterUni(pu, eRefPicList, predBuf, false -#if JVET_L0256_BIO , false -#endif , luma, chroma); return; } @@ -1360,9 +1283,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu if( ( ( sliceType == P_SLICE && pps.getUseWP() ) || ( sliceType == B_SLICE && pps.getWPBiPred() ) ) ) { xPredInterUni ( pu, eRefPicList, predBuf, true -#if JVET_L0256_BIO , false -#endif #if JVET_L0293_CPR , true, true #endif @@ -1372,9 +1293,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu else { xPredInterUni( pu, eRefPicList, predBuf, false -#if JVET_L0256_BIO , false -#endif #if JVET_L0293_CPR , true, true #endif @@ -1394,9 +1313,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu else if( xCheckIdenticalMotion( pu ) ) { xPredInterUni( pu, REF_PIC_LIST_0, predBuf, false -#if JVET_L0256_BIO , false -#endif #if JVET_L0293_CPR , true, true #endif @@ -1441,7 +1358,6 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, const RefPicList & ); } -#if JVET_L0256_BIO int InterPrediction::rightShiftMSB(int numer, int denom) { int d; @@ -1459,7 +1375,6 @@ int InterPrediction::rightShiftMSB(int numer, int denom) return d; } -#endif void InterPrediction::motionCompensation4Triangle( CodingUnit &cu, MergeCtx &triangleMrgCtx, const bool splitDir, const uint8_t candIdx0, const uint8_t candIdx1 ) { diff --git a/source/Lib/CommonLib/InterPrediction.h b/source/Lib/CommonLib/InterPrediction.h index 1193609219bc68c1850849680d08c95676b7a52d..8f9169059ac7202b17400a17b64beb38ac46e735 100644 --- a/source/Lib/CommonLib/InterPrediction.h +++ b/source/Lib/CommonLib/InterPrediction.h @@ -64,7 +64,6 @@ class InterPrediction : public WeightPrediction { private: -#if JVET_L0256_BIO Distortion m_bioDistThres; Distortion m_bioSubBlkDistThres; Distortion m_bioPredSubBlkDist[MAX_NUM_PARTS_IN_CTU]; @@ -74,7 +73,6 @@ private: int m_dotProduct3[BIO_TEMP_BUFFER_SIZE]; int m_dotProduct5[BIO_TEMP_BUFFER_SIZE]; int m_dotProduct6[BIO_TEMP_BUFFER_SIZE]; -#endif protected: InterpolationFilter m_if; @@ -94,7 +92,6 @@ protected: PelStorage m_triangleBuf; Mv* m_storedMv; -#if JVET_L0256_BIO Pel* m_gradX0; Pel* m_gradY0; Pel* m_gradX1; @@ -105,35 +102,26 @@ protected: void applyBiOptFlow(const PredictionUnit &pu, const CPelUnitBuf &yuvSrc0, const CPelUnitBuf &yuvSrc1, const int &refIdx0, const int &refIdx1, PelUnitBuf &yuvDst, const BitDepths &clipBitDepths); bool xCalcBiPredSubBlkDist(const PredictionUnit &pu, const Pel* yuvSrc0, const int src0Stride, const Pel* yuvSrc1, const int src1Stride, const BitDepths &clipBitDepths); void bioSampleExtendBilinearFilter(Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int dim, int fracX, int fracY, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng); -#endif void xPredInterUni ( const PredictionUnit& pu, const RefPicList& eRefPicList, PelUnitBuf& pcYuvPred, const bool& bi -#if JVET_L0256_BIO , const bool& bioApplied -#endif #if JVET_L0293_CPR , const bool luma, const bool chroma #endif ); void xPredInterBi ( PredictionUnit& pu, PelUnitBuf &pcYuvPred ); void xPredInterBlk ( const ComponentID& compID, const PredictionUnit& pu, const Picture* refPic, const Mv& _mv, PelUnitBuf& dstPic, const bool& bi, const ClpRng& clpRng -#if JVET_L0256_BIO , const bool& bioApplied -#endif #if JVET_L0293_CPR , bool isCPR #endif ); -#if JVET_L0256_BIO void xAddBIOAvg4 (const Pel* src0, int src0Stride, const Pel* src1, int src1Stride, Pel *dst, int dstStride, const Pel *gradX0, const Pel *gradX1, const Pel *gradY0, const Pel*gradY1, int gradStride, int width, int height, int tmpx, int tmpy, int shift, int offset, const ClpRng& clpRng); void xBioGradFilter (Pel* pSrc, int srcStride, int width, int height, int gradStride, Pel* gradX, Pel* gradY); void xCalcBIOPar (const Pel* srcY0Temp, const Pel* srcY1Temp, const Pel* gradX0, const Pel* gradX1, const Pel* gradY0, const Pel* gradY1, int* dotProductTemp1, int* dotProductTemp2, int* dotProductTemp3, int* dotProductTemp5, int* dotProductTemp6, const int src0Stride, const int src1Stride, const int gradStride, const int widthG, const int heightG); void xCalcBlkGradient (int sx, int sy, int *arraysGx2, int *arraysGxGy, int *arraysGxdI, int *arraysGy2, int *arraysGydI, int &sGx2, int &sGy2, int &sGxGy, int &sGxdI, int &sGydI, int width, int height, int unitSize); void xWeightedAverage ( const PredictionUnit& pu, const CPelUnitBuf& pcYuvSrc0, const CPelUnitBuf& pcYuvSrc1, PelUnitBuf& pcYuvDst, const BitDepths& clipBitDepths, const ClpRngs& clpRngs, const bool& bioApplied ); -#else - void xWeightedAverage ( const PredictionUnit& pu, const CPelUnitBuf& pcYuvSrc0, const CPelUnitBuf& pcYuvSrc1, PelUnitBuf& pcYuvDst, const BitDepths& clipBitDepths, const ClpRngs& clpRngs ); -#endif void xPredAffineBlk( const ComponentID& compID, const PredictionUnit& pu, const Picture* refPic, const Mv* _mv, PelUnitBuf& dstPic, const bool& bi, const ClpRng& clpRng ); void xWeightedTriangleBlk ( const PredictionUnit &pu, const uint32_t width, const uint32_t height, const ComponentID compIdx, const bool splitDir, const bool weights, PelUnitBuf& predDst, PelUnitBuf& predSrc0, PelUnitBuf& predSrc1 ); diff --git a/source/Lib/CommonLib/InterpolationFilter.cpp b/source/Lib/CommonLib/InterpolationFilter.cpp index fd91a3550d270b776bc526335b4a8fe5cb609a71..840c1770d5319d7872cd48ff853329ca2c81749d 100644 --- a/source/Lib/CommonLib/InterpolationFilter.cpp +++ b/source/Lib/CommonLib/InterpolationFilter.cpp @@ -111,7 +111,6 @@ const TFilterCoeff InterpolationFilter::m_chromaFilter[CHROMA_INTERPOLATION_FILT { 0, 2, 63, -1 }, }; -#if JVET_L0256_BIO const TFilterCoeff InterpolationFilter::m_bilinearFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_BILINEAR] = { { 64, 0, }, @@ -131,7 +130,6 @@ const TFilterCoeff InterpolationFilter::m_bilinearFilter[LUMA_INTERPOLATION_FILT { 8, 56, }, { 4, 60, }, }; -#endif // ==================================================================================================================== // Private member functions @@ -465,11 +463,7 @@ void InterpolationFilter::filterVer(const ClpRng& clpRng, Pel const *src, int sr * \param fmt Chroma format * \param bitDepth Bit depth */ -#if JVET_L0256_BIO void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx ) -#else -void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng ) -#endif { if( frac == 0 ) { @@ -478,13 +472,11 @@ void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, i else if( isLuma( compID ) ) { CHECK( frac < 0 || frac >= LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" ); -#if JVET_L0256_BIO if( nFilterIdx == 1 ) { filterHor(clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_bilinearFilter[frac]); } else -#endif { filterHor( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac] ); } @@ -514,11 +506,7 @@ void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, i * \param fmt Chroma format * \param bitDepth Bit depth */ -#if JVET_L0256_BIO void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isFirst, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx) -#else -void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isFirst, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng ) -#endif { if( frac == 0 ) { @@ -527,13 +515,11 @@ void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, i else if( isLuma( compID ) ) { CHECK( frac < 0 || frac >= LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS, "Invalid fraction" ); -#if JVET_L0256_BIO if (nFilterIdx == 1) { filterVer(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_bilinearFilter[frac]); } else -#endif { filterVer( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac] ); } diff --git a/source/Lib/CommonLib/InterpolationFilter.h b/source/Lib/CommonLib/InterpolationFilter.h index 3d42b5649f326672434e35417436c52711e6057a..1b1f28327b65072e47b0e93f57cfd480d8fa0181 100644 --- a/source/Lib/CommonLib/InterpolationFilter.h +++ b/source/Lib/CommonLib/InterpolationFilter.h @@ -56,9 +56,7 @@ class InterpolationFilter { static const TFilterCoeff m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_LUMA]; ///< Luma filter taps static const TFilterCoeff m_chromaFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA]; ///< Chroma filter taps -#if JVET_L0256_BIO static const TFilterCoeff m_bilinearFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_BILINEAR]; ///< bilinear filter taps -#endif public: template static void filterCopy( const ClpRng& clpRng, const Pel *src, int srcStride, Pel *dst, int dstStride, int width, int height ); @@ -90,13 +88,8 @@ public: void _initInterpolationFilterX86(); #endif -#if JVET_L0256_BIO void filterHor(const ComponentID compID, Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx = 0); void filterVer(const ComponentID compID, Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isFirst, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng, int nFilterIdx = 0); -#else - void filterHor(const ComponentID compID, Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng ); - void filterVer(const ComponentID compID, Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int frac, bool isFirst, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng ); -#endif #if JVET_J0090_MEMORY_BANDWITH_MEASURE void cacheAssign( CacheModel *cache ) { m_cacheModel = cache; } #endif diff --git a/source/Lib/CommonLib/RdCost.cpp b/source/Lib/CommonLib/RdCost.cpp index dea19abe5b4d6a3bd2777d5f380de2bba571db97..a0519747c564780d33574290fb63ebfffe27f66c 100644 --- a/source/Lib/CommonLib/RdCost.cpp +++ b/source/Lib/CommonLib/RdCost.cpp @@ -164,9 +164,7 @@ void RdCost::init() m_afpDistortFunc[DF_SSE16N_WTD] = RdCost::xGetSSE16N_WTD; #endif -#if JVET_L0256_BIO m_afpDistortFunc[DF_SAD_INTERMEDIATE_BITDEPTH] = RdCost::xGetSAD; -#endif #if ENABLE_SIMD_OPT_DIST #ifdef TARGET_SIMD_X86 @@ -319,11 +317,7 @@ void RdCost::setDistParam( DistParam &rcDP, const CPelBuf &org, const CPelBuf &c rcDP.maximumDistortionForEarlyExit = std::numeric_limits::max(); } -#if JVET_L0256_BIO void RdCost::setDistParam( DistParam &rcDP, const Pel* pOrg, const Pel* piRefY, int iOrgStride, int iRefStride, int bitDepth, ComponentID compID, int width, int height, int subShiftMode, int step, bool useHadamard, bool bioApplied ) -#else -void RdCost::setDistParam( DistParam &rcDP, const Pel* pOrg, const Pel* piRefY, int iOrgStride, int iRefStride, int bitDepth, ComponentID compID, int width, int height, int subShiftMode, int step, bool useHadamard ) -#endif { rcDP.bitDepth = bitDepth; rcDP.compID = compID; @@ -343,13 +337,11 @@ void RdCost::setDistParam( DistParam &rcDP, const Pel* pOrg, const Pel* piRefY, CHECK( useHadamard || rcDP.useMR || subShiftMode > 0, "only used in xDirectMCCost with these default parameters (so far...)" ); -#if JVET_L0256_BIO if ( bioApplied ) { rcDP.distFunc = m_afpDistortFunc[ DF_SAD_INTERMEDIATE_BITDEPTH ]; return; } -#endif if( width == 12 ) { diff --git a/source/Lib/CommonLib/RdCost.h b/source/Lib/CommonLib/RdCost.h index 129d530cac302228608c0c39de301576a4067c12..93203d162121e67cb1fc24e7ab01ea5915f15a2f 100644 --- a/source/Lib/CommonLib/RdCost.h +++ b/source/Lib/CommonLib/RdCost.h @@ -156,11 +156,7 @@ public: void setDistParam( DistParam &rcDP, const CPelBuf &org, const Pel* piRefY , int iRefStride, int bitDepth, ComponentID compID, int subShiftMode = 0, int step = 1, bool useHadamard = false ); void setDistParam( DistParam &rcDP, const CPelBuf &org, const CPelBuf &cur, int bitDepth, ComponentID compID, bool useHadamard = false ); -#if JVET_L0256_BIO void setDistParam( DistParam &rcDP, const Pel* pOrg, const Pel* piRefY, int iOrgStride, int iRefStride, int bitDepth, ComponentID compID, int width, int height, int subShiftMode = 0, int step = 1, bool useHadamard = false, bool bioApplied = false ); -#else - void setDistParam( DistParam &rcDP, const Pel* pOrg, const Pel* piRefY, int iOrgStride, int iRefStride, int bitDepth, ComponentID compID, int width, int height, int subShiftMode = 0, int step = 1, bool useHadamard = false ); -#endif double getMotionLambda ( bool bIsTransquantBypass ) { return m_dLambdaMotionSAD[(bIsTransquantBypass && m_costMode==COST_MIXED_LOSSLESS_LOSSY_CODING)?1:0]; } void selectMotionLambda ( bool bIsTransquantBypass ) { m_motionLambda = getMotionLambda( bIsTransquantBypass ); } diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 719b89341b551e6365edc946cfe2e160c545f4d9..e4e29ec3425b2e4aea9d7342594e733890c8614b 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -1765,9 +1765,7 @@ SPSNext::SPSNext( SPS& sps ) , m_LargeCTU ( false ) , m_SubPuMvp ( false ) , m_IMV ( false ) -#if JVET_L0256_BIO , m_BIO ( false ) -#endif , m_DisableMotionCompression ( false ) , m_LMChroma ( false ) , m_IntraEMT ( false ) diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 7eaadea705ad4258d4775affb6e612bb5f737b34..673b71359ab37fbf933ac7a0610cb200091c2aa1 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -801,9 +801,7 @@ private: bool m_LargeCTU; // 5 bool m_SubPuMvp; bool m_IMV; // 9 -#if JVET_L0256_BIO bool m_BIO; -#endif bool m_DisableMotionCompression; // 13 bool m_LMChroma; // 17 bool m_IntraEMT; // 18 @@ -883,10 +881,8 @@ public: bool getUseAffine () const { return m_Affine; } void setUseAffineType ( bool b ) { m_AffineType = b; } bool getUseAffineType () const { return m_AffineType; } -#if JVET_L0256_BIO void setUseBIO(bool b) { m_BIO = b; } bool getUseBIO() const { return m_BIO; } -#endif void setDisableMotCompress ( bool b ) { m_DisableMotionCompression = b; } bool getDisableMotCompress () const { return m_DisableMotionCompression; } bool getMTTEnabled () const { return m_MTTEnabled; } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 4dffc4aed596c1b0a0d97fca40eb03a8e3e4fd73..3c9487253bad5500314b1e6824df95f1e670ee8e 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -79,7 +79,6 @@ -#define JVET_L0256_BIO 1 #define JVET_L0646_GBI 1 // Generalized bi-prediction (GBi) @@ -547,13 +546,9 @@ enum DFunc DF_DEFAULT_ORI = DF_SSE_WTD+8, #endif -#if JVET_L0256_BIO DF_SAD_INTERMEDIATE_BITDEPTH = 63, DF_TOTAL_FUNCTIONS = 64 -#else - DF_TOTAL_FUNCTIONS = 63 -#endif }; /// motion vector predictor direction used in AMVP diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 02a683c6da9a070b67dfd965710e91bd57110305..c6d44417251705cdd593ef2e87ae1a8c4dd1ea73 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -791,9 +791,7 @@ void HLSyntaxReader::parseSPSNext( SPSNext& spsNext, const bool usePCM ) READ_FLAG( symbol, "large_ctu_flag" ); spsNext.setUseLargeCTU ( symbol != 0 ); READ_FLAG( symbol, "subpu_tmvp_flag" ); spsNext.setSubPuMvpMode (symbol); READ_FLAG( symbol, "imv_enable_flag" ); spsNext.setUseIMV ( symbol != 0 ); -#if JVET_L0256_BIO READ_FLAG( symbol, "bio_enable_flag" ); spsNext.setUseBIO ( symbol != 0 ); -#endif READ_FLAG( symbol, "disable_motion_compression_flag" ); spsNext.setDisableMotCompress ( symbol != 0 ); READ_FLAG( symbol, "lm_chroma_enabled_flag" ); spsNext.setUseLMChroma ( symbol != 0 ); READ_FLAG( symbol, "emt_intra_enabled_flag" ); spsNext.setUseIntraEMT ( symbol != 0 ); diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 9e22b3420d8533c088f4320aa9cc828e6f27e080..c25c58005b7a7a201598919c7721883f943423c3 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -217,9 +217,7 @@ protected: #endif bool m_Affine; bool m_AffineType; -#if JVET_L0256_BIO bool m_BIO; -#endif bool m_DisableMotionCompression; unsigned m_MTTMode; @@ -705,10 +703,8 @@ public: bool getAffine () const { return m_Affine; } void setAffineType( bool b ) { m_AffineType = b; } bool getAffineType() const { return m_AffineType; } -#if JVET_L0256_BIO void setBIO(bool b) { m_BIO = b; } bool getBIO() const { return m_BIO; } -#endif void setDisableMotionCompression ( bool b ) { m_DisableMotionCompression = b; } bool getDisableMotionCompression () const { return m_DisableMotionCompression; } diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 6291357cd3cadf3b691f1db3ff3d5032e9a9e271..f21f1a24697d72fb91234dc1edafa7658a54808a 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -868,9 +868,7 @@ void EncLib::xInitSPS(SPS &sps) #endif sps.getSpsNext().setImvMode ( ImvMode(m_ImvMode) ); sps.getSpsNext().setUseIMV ( m_ImvMode != IMV_OFF ); -#if JVET_L0256_BIO sps.getSpsNext().setUseBIO ( m_BIO ); -#endif sps.getSpsNext().setUseAffine ( m_Affine ); sps.getSpsNext().setUseAffineType ( m_AffineType ); sps.getSpsNext().setDisableMotCompress ( m_DisableMotionCompression ); diff --git a/source/Lib/EncoderLib/InterSearch.cpp b/source/Lib/EncoderLib/InterSearch.cpp index 26d317dbbd9c95219480a54b257760b8cb1761c5..4ca0952e2c943f322259d1295139bed7806f807c 100644 --- a/source/Lib/EncoderLib/InterSearch.cpp +++ b/source/Lib/EncoderLib/InterSearch.cpp @@ -2313,9 +2313,7 @@ Distortion InterSearch::xGetTemplateCost( const PredictionUnit& pu, xPredInterBlk( COMPONENT_Y, pu, picRef, cMvCand, predBuf, bi, pu.cu->slice->clpRng( COMPONENT_Y ) -#if JVET_L0256_BIO , false -#endif #if JVET_L0293_CPR , false #endif diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index e050385ba8884a38e49854060e47993ec6bc8544..427e91f79ca75f68a8c5ae53a4e6b9fb3f6de208 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -531,9 +531,7 @@ void HLSWriter::codeSPSNext( const SPSNext& spsNext, const bool usePCM ) WRITE_FLAG( spsNext.getUseLargeCTU() ? 1 : 0, "large_ctu_flag" ); WRITE_FLAG(spsNext.getUseSubPuMvp() ? 1 : 0, "subpu_tmvp_flag"); WRITE_FLAG( spsNext.getUseIMV() ? 1 : 0, "imv_enable_flag" ); -#if JVET_L0256_BIO WRITE_FLAG( spsNext.getUseBIO() ? 1 : 0, "bio_enable_flag" ); -#endif WRITE_FLAG( spsNext.getDisableMotCompress() ? 1 : 0, "disable_motion_compression_flag" ); WRITE_FLAG( spsNext.getUseLMChroma() ? 1 : 0, "lm_chroma_enabled_flag" ); WRITE_FLAG( spsNext.getUseIntraEMT() ? 1 : 0, "emt_intra_enabled_flag" );