Commit 84a6aa20 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0256_BIO

parent 095aed43
......@@ -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 );
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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 )
{
......
......@@ -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 );
......
......@@ -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<NTAPS_BILINEAR>(clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_bilinearFilter[frac]);
}
else
#endif
{
filterHor<NTAPS_LUMA>( 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<NTAPS_BILINEAR>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_bilinearFilter[frac]);
}
else
#endif
{
filterVer<NTAPS_LUMA>( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac] );
}
......
......@@ -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<bool isFirst, bool isLast>
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
......
......@@ -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<Distortion>::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 )
{
......
......@@ -156,11 +156,7 @@ public: