Commit 72816a6f authored by Xiang Li's avatar Xiang Li
Browse files

Merge branch 'JVET-N0266' into 'master'

JVET-N0266: remove 4x4 uni-pred, 4x8/8x4 bi-pred from regular inter modes.

See merge request jvet/VVCSoftware_VTM!446
parents 77d1d366 acaa1cf7
......@@ -449,6 +449,9 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList&
int iRefIdx = pu.refIdx[eRefPicList];
Mv mv[3];
bool isIBC = false;
#if JVET_N0266_SMALL_BLOCKS
CHECK( !CU::isIBC( *pu.cu ) && pu.lwidth() == 4 && pu.lheight() == 4, "invalid 4x4 inter blocks" );
#endif
if (CU::isIBC(*pu.cu))
{
isIBC = true;
......@@ -506,7 +509,9 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
{
const PPS &pps = *pu.cs->pps;
const Slice &slice = *pu.cs->slice;
#if JVET_N0266_SMALL_BLOCKS
CHECK( !pu.cu->affine && pu.refIdx[0] >= 0 && pu.refIdx[1] >= 0 && ( pu.lwidth() + pu.lheight() == 12 ), "invalid 4x8/8x4 bi-predicted blocks" );
#endif
bool bioApplied = false;
if (pu.cs->sps->getBDOFEnabledFlag())
{
......@@ -521,7 +526,11 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
if (biocheck0
&& biocheck1
&& PU::isBiPredFromDifferentDir(pu)
#if JVET_N0266_SMALL_BLOCKS
&& pu.Y().height != 4
#else
&& !(pu.Y().height == 4 || (pu.Y().width == 4 && pu.Y().height == 8))
#endif
)
{
bioApplied = true;
......@@ -820,6 +829,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
const int shift = iBit - 4 + MV_FRACTIONAL_BITS_INTERNAL;
// get prediction block by block
for ( int h = 0; h < cxHeight; h += blockHeight )
{
......@@ -831,6 +841,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
{
iMvScaleTmpHor = iMvScaleHor + iDMvHorX * (iHalfBW + w) + iDMvVerX * (iHalfBH + h);
iMvScaleTmpVer = iMvScaleVer + iDMvHorY * (iHalfBW + w) + iDMvVerY * (iHalfBH + h);
roundAffineMv(iMvScaleTmpHor, iMvScaleTmpVer, shift);
Mv tmpMv(iMvScaleTmpHor, iMvScaleTmpVer);
tmpMv.clipToStorageBitDepth();
......
......@@ -54,7 +54,6 @@ CacheModel* InterpolationFilter::m_cacheModel;
// ====================================================================================================================
// Tables
// ====================================================================================================================
const TFilterCoeff InterpolationFilter::m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_LUMA] =
{
{ 0, 0, 0, 64, 0, 0, 0, 0 },
......@@ -574,7 +573,7 @@ void InterpolationFilter::filterHor( const ComponentID compID, Pel const *src, i
}
else
{
filterHor<NTAPS_LUMA>( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac], biMCForDMVR);
filterHor<NTAPS_LUMA>(clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac], biMCForDMVR);
}
}
else
......@@ -617,7 +616,7 @@ void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, i
}
else
{
filterVer<NTAPS_LUMA>( clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac], biMCForDMVR);
filterVer<NTAPS_LUMA>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac], biMCForDMVR);
}
}
else
......
......@@ -221,7 +221,9 @@ struct LutMotionCand
{
static_vector<MotionInfo, MAX_NUM_HMVP_CANDS> lut;
static_vector<MotionInfo, MAX_NUM_HMVP_CANDS> lutIbc;
#if !JVET_N0266_SMALL_BLOCKS
static_vector<MotionInfo, MAX_NUM_HMVP_CANDS> lutShare;
#endif
static_vector<MotionInfo, MAX_NUM_HMVP_CANDS> lutShareIbc;
};
#if JVET_N0329_IBC_SEARCH_IMP
......
......@@ -55,7 +55,7 @@
#define JVET_N0843_BVP_SIMPLIFICATION 1
#define JVET_N0448_N0380 1 // When MaxNumMergeCand is 1, MMVD_BASE_MV_NUM is inferred to be 1.
#define JVET_N0266_SMALL_BLOCKS 1 // remove 4x4 uni-pred, 4x8/8x4 bi-pred from regular inter modes
#define JVET_N0054_JOINT_CHROMA 1 // Joint chroma residual coding mode
#define JVET_N0317_ADD_ZERO_BV 1
......@@ -101,7 +101,6 @@
#define JVET_N0271_SIMPLFIED_CCLM 1 // Simplified CCLM parameter derivation in JVET-N0271
#define JVET_N0178_IMPLICIT_BDOF_SPLIT 1
#define JVET_N0383_N0251_IBC_COL_VPDU_REMOVE 1
#define JCTVC_Y0038_PARAMS 1
......
......@@ -1057,7 +1057,11 @@ bool PU::addMergeHMVPCand(const CodingStructure &cs, MergeCtx& mrgCtx, bool isCa
{
hasPruned[subPuMvpPos] = true;
}
#if JVET_N0266_SMALL_BLOCKS
auto &lut = ibcFlag ? ( isShared ? cs.motionLut.lutShareIbc : cs.motionLut.lutIbc ) : cs.motionLut.lut;
#else
auto &lut = ibcFlag ? ( isShared ? cs.motionLut.lutShareIbc : cs.motionLut.lutIbc ) : ( isShared ? cs.motionLut.lutShare : cs.motionLut.lut );
#endif
int num_avai_candInLUT = (int) lut.size();
for (int mrgIdx = 1; mrgIdx <= num_avai_candInLUT; mrgIdx++)
......@@ -1383,10 +1387,15 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
int cnt = 0;
#if JVET_N0266_SMALL_BLOCKS
const Position posLT = pu.Y().topLeft();
const Position posRT = pu.Y().topRight();
const Position posLB = pu.Y().bottomLeft();
#else
const Position posLT = pu.shareParentPos;
const Position posRT = pu.shareParentPos.offset(pu.shareParentSize.width - 1, 0);
const Position posLB = pu.shareParentPos.offset(0, pu.shareParentSize.height - 1);
#endif
MotionInfo miAbove, miLeft, miAboveLeft, miAboveRight, miBelowLeft;
//left
......@@ -1609,15 +1618,23 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
{
//>> MTK colocated-RightBottom
// offset the pos to be sure to "point" to the same position the uiAbsPartIdx would've pointed to
#if JVET_N0266_SMALL_BLOCKS
Position posRB = pu.Y().bottomRight().offset( -3, -3 );
#else
Position posRB = pu.shareParentPos.offset(pu.shareParentSize.width-3, pu.shareParentSize.height - 3);
#endif
const PreCalcValues& pcv = *cs.pcv;
Position posC0;
#if JVET_N0266_SMALL_BLOCKS
Position posC1 = pu.Y().center();
#else
Position posC1 = pu.shareParentPos.offset((pu.shareParentSize.width/2), (pu.shareParentSize.height/2));
#endif
bool C0Avail = false;
#if !JVET_N0266_SMALL_BLOCKS
bool C1Avail = (posC1.x < pcv.lumaWidth) && (posC1.y < pcv.lumaHeight);
#endif
if (((posRB.x + pcv.minCUWidth) < pcv.lumaWidth) && ((posRB.y + pcv.minCUHeight) < pcv.lumaHeight))
{
{
......@@ -1652,8 +1669,11 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
int dir = 0;
unsigned uiArrayAddr = cnt;
bool bExistMV = ( C0Avail && getColocatedMVP(pu, REF_PIC_LIST_0, posC0, cColMv, iRefIdx ) )
#if JVET_N0266_SMALL_BLOCKS
|| getColocatedMVP( pu, REF_PIC_LIST_0, posC1, cColMv, iRefIdx );
#else
|| ( C1Avail && getColocatedMVP(pu, REF_PIC_LIST_0, posC1, cColMv, iRefIdx ));
#endif
if (bExistMV)
{
dir |= 1;
......@@ -1663,7 +1683,11 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
if (slice.isInterB())
{
bExistMV = ( C0Avail && getColocatedMVP(pu, REF_PIC_LIST_1, posC0, cColMv, iRefIdx ) )
#if JVET_N0266_SMALL_BLOCKS
|| getColocatedMVP( pu, REF_PIC_LIST_1, posC1, cColMv, iRefIdx );
#else
|| (C1Avail && getColocatedMVP(pu, REF_PIC_LIST_1, posC1, cColMv, iRefIdx ) );
#endif
if (bExistMV)
{
dir |= 2;
......@@ -1715,7 +1739,11 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx,
bool isAvailableSubPu = false;
unsigned subPuMvpPos = 0;
#if JVET_L0090_PAIR_AVG
#if JVET_N0266_SMALL_BLOCKS
bool isShared = false;
#else
bool isShared = ((pu.Y().lumaSize().width != pu.shareParentSize.width) || (pu.Y().lumaSize().height != pu.shareParentSize.height));
#endif
bool bFound = addMergeHMVPCand(cs, mrgCtx, canFastExit
, mrgCandIdx
, maxNumMergeCandMin1, cnt
......@@ -2657,8 +2685,9 @@ void PU::fillMvpCand(PredictionUnit &pu, const RefPicList &eRefPicList, const in
Position posC0;
bool C0Avail = false;
Position posC1 = pu.Y().center();
#if !JVET_N0266_SMALL_BLOCKS
bool C1Avail = ( posC1.x < pcv.lumaWidth ) && ( posC1.y < pcv.lumaHeight ) ;
#endif
Mv cColMv;
if( ( ( posRB.x + pcv.minCUWidth ) < pcv.lumaWidth ) && ( ( posRB.y + pcv.minCUHeight ) < pcv.lumaHeight ) )
......@@ -2687,8 +2716,11 @@ void PU::fillMvpCand(PredictionUnit &pu, const RefPicList &eRefPicList, const in
posC0 = posRB.offset(4, 4);
}
}
#if JVET_N0266_SMALL_BLOCKS
if ( ( C0Avail && getColocatedMVP( pu, eRefPicList, posC0, cColMv, refIdx_Col ) ) || getColocatedMVP( pu, eRefPicList, posC1, cColMv, refIdx_Col ) )
#else
if ((C0Avail && getColocatedMVP(pu, eRefPicList, posC0, cColMv, refIdx_Col)) || (C1Avail && getColocatedMVP(pu, eRefPicList, posC1, cColMv, refIdx_Col)))
#endif
{
cColMv.roundToAmvrSignalPrecision(MV_PRECISION_INTERNAL, pu.cu->imv);
pInfo->mvCand[pInfo->numCand++] = cColMv;
......@@ -3021,8 +3053,9 @@ void PU::fillAffineMvpCand(PredictionUnit &pu, const RefPicList &eRefPicList, co
Position posC0;
bool C0Avail = false;
Position posC1 = pu.Y().center();
#if !JVET_N0266_SMALL_BLOCKS
bool C1Avail = ( posC1.x < pcv.lumaWidth ) && ( posC1.y < pcv.lumaHeight ) ;
#endif
Mv cColMv;
if ( ((posRB.x + pcv.minCUWidth) < pcv.lumaWidth) && ((posRB.y + pcv.minCUHeight) < pcv.lumaHeight) )
{
......@@ -3050,8 +3083,11 @@ void PU::fillAffineMvpCand(PredictionUnit &pu, const RefPicList &eRefPicList, co
posC0 = posRB.offset( 4, 4 );
}
}
#if JVET_N0266_SMALL_BLOCKS
if ( ( C0Avail && getColocatedMVP( pu, eRefPicList, posC0, cColMv, refIdxCol ) ) || getColocatedMVP( pu, eRefPicList, posC1, cColMv, refIdxCol ) )
#else
if ( (C0Avail && getColocatedMVP( pu, eRefPicList, posC0, cColMv, refIdxCol )) || (C1Avail && getColocatedMVP( pu, eRefPicList, posC1, cColMv, refIdxCol ) ) )
#endif
{
if ( pu.cu->imv == 0 )
{
......@@ -3314,6 +3350,13 @@ bool PU::isBipredRestriction(const PredictionUnit &pu)
{
return true;
}
#if JVET_N0266_SMALL_BLOCKS
/* disable bi-prediction for 4x8/8x4 */
if ( pu.cu->lumaSize().width + pu.cu->lumaSize().height == 12 )
{
return true;
}
#endif
return false;
}
#if JVET_N0481_BCW_CONSTRUCTED_AFFINE
......@@ -3962,12 +4005,14 @@ void PU::setAllAffineMv( PredictionUnit& pu, Mv affLT, Mv affRT, Mv affLB, RefPi
MotionBuf mb = pu.getMotionBuf();
int mvScaleTmpHor, mvScaleTmpVer;
for ( int h = 0; h < pu.Y().height; h += blockHeight )
{
for ( int w = 0; w < pu.Y().width; w += blockWidth )
{
mvScaleTmpHor = mvScaleHor + deltaMvHorX * (halfBW + w) + deltaMvVerX * (halfBH + h);
mvScaleTmpVer = mvScaleVer + deltaMvHorY * (halfBW + w) + deltaMvVerY * (halfBH + h);
roundAffineMv( mvScaleTmpHor, mvScaleTmpVer, shift );
Mv curMv(mvScaleTmpHor, mvScaleTmpVer);
curMv.clipToStorageBitDepth();
......@@ -4573,8 +4618,9 @@ void PU::getTriangleMergeCandidates( const PredictionUnit &pu, MergeCtx& triangl
Position posC0;
Position posC1 = pu.Y().center();
bool isAvailableC0 = false;
#if !JVET_N0266_SMALL_BLOCKS
bool isAvailableC1 = (posC1.x < pcv.lumaWidth) && (posC1.y < pcv.lumaHeight);
#endif
if (((posRB.x + pcv.minCUWidth) < pcv.lumaWidth) && ((posRB.y + pcv.minCUHeight) < pcv.lumaHeight))
{
Position posInCtu( posRB.x & pcv.maxCUWidthMask, posRB.y & pcv.maxCUHeightMask );
......@@ -4636,7 +4682,11 @@ void PU::getTriangleMergeCandidates( const PredictionUnit &pu, MergeCtx& triangl
// C1
temporalMv.interDir = 0;
#if JVET_N0266_SMALL_BLOCKS
existMV = getColocatedMVP( pu, REF_PIC_LIST_0, posC1, cColMv, refIdx );
#else
existMV = isAvailableC1 && getColocatedMVP(pu, REF_PIC_LIST_0, posC1, cColMv, refIdx );
#endif
if( existMV )
{
temporalMv.isInter = true;
......@@ -4644,7 +4694,11 @@ void PU::getTriangleMergeCandidates( const PredictionUnit &pu, MergeCtx& triangl
temporalMv.mv[0] = cColMv;
temporalMv.refIdx[0] = refIdx;
}
#if JVET_N0266_SMALL_BLOCKS
existMV = getColocatedMVP( pu, REF_PIC_LIST_1, posC1, cColMv, refIdx );
#else
existMV = isAvailableC1 && getColocatedMVP(pu, REF_PIC_LIST_1, posC1, cColMv, refIdx );
#endif
if( existMV )
{
temporalMv.interDir |= 2;
......
......@@ -746,7 +746,12 @@ void CABACReader::cu_skip_flag( CodingUnit& cu )
#endif
return;
}
#if JVET_N0266_SMALL_BLOCKS
if ( !cu.cs->slice->getSPS()->getIBCFlag() && cu.lwidth() == 4 && cu.lheight() == 4 )
{
return;
}
#endif
unsigned ctxId = DeriveCtx::CtxSkipFlag(cu);
unsigned skip = m_BinDecoder.decodeBin( Ctx::SkipFlag(ctxId) );
......@@ -757,6 +762,16 @@ void CABACReader::cu_skip_flag( CodingUnit& cu )
#if JVET_N0318_N0467_IBC_SIZE
if (cu.lwidth() < 128 || cu.lheight() < 128) // disable 128x128 IBC mode
{
#endif
#if JVET_N0266_SMALL_BLOCKS
if ( cu.lwidth() == 4 && cu.lheight() == 4 )
{
cu.skip = true;
cu.rootCbf = false;
cu.predMode = MODE_IBC;
cu.mmvdSkip = false;
return;
}
#endif
unsigned ctxidx = DeriveCtx::CtxIBCFlag(cu);
if (m_BinDecoder.decodeBin(Ctx::IBCFlag(ctxidx)))
......@@ -895,7 +910,11 @@ void CABACReader::pred_mode( CodingUnit& cu )
if (cu.cs->slice->getSPS()->getIBCFlag())
{
#if JVET_N0266_SMALL_BLOCKS
if ( cu.cs->slice->isIntra() || ( cu.lwidth() == 4 && cu.lheight() == 4 ) )
#else
if (cu.cs->slice->isIntra())
#endif
{
cu.predMode = MODE_INTRA;
#if JVET_N0318_N0467_IBC_SIZE
......@@ -937,7 +956,11 @@ void CABACReader::pred_mode( CodingUnit& cu )
}
else
{
#if JVET_N0266_SMALL_BLOCKS
if ( cu.cs->slice->isIntra() || ( cu.lwidth() == 4 && cu.lheight() == 4 ) || m_BinDecoder.decodeBin( Ctx::PredMode( DeriveCtx::CtxPredModeFlag( cu ) ) ) )
#else
if (cu.cs->slice->isIntra() || m_BinDecoder.decodeBin(Ctx::PredMode(DeriveCtx::CtxPredModeFlag(cu))))
#endif
{
cu.predMode = MODE_INTRA;
}
......
......@@ -122,7 +122,9 @@ void DecCu::decompressCtu( CodingStructure& cs, const UnitArea& ctuArea )
if ((currCU.shareParentPos.x >= 0) && (!(currCU.shareParentPos.x == prevTmpPos.x && currCU.shareParentPos.y == prevTmpPos.y)))
{
m_shareStateDec = GEN_ON_SHARED_BOUND;
#if !JVET_N0266_SMALL_BLOCKS
cs.motionLut.lutShare = cs.motionLut.lut;
#endif
cs.motionLut.lutShareIbc = cs.motionLut.lutIbc;
}
......
......@@ -220,7 +220,9 @@ void DecSlice::decompressSlice( Slice* slice, InputBitstream* bitstream, int deb
{
cs.motionLut.lut.resize(0);
cs.motionLut.lutIbc.resize(0);
#if !JVET_N0266_SMALL_BLOCKS
cs.motionLut.lutShare.resize(0);
#endif
cs.motionLut.lutShareIbc.resize(0);
}
......
......@@ -647,7 +647,12 @@ void CABACWriter::cu_skip_flag( const CodingUnit& cu )
#endif
return;
}
#if JVET_N0266_SMALL_BLOCKS
if ( !cu.cs->slice->getSPS()->getIBCFlag() && cu.lwidth() == 4 && cu.lheight() == 4 )
{
return;
}
#endif
m_BinEncoder.encodeBin( ( cu.skip ), Ctx::SkipFlag( ctxId ) );
DTRACE( g_trace_ctx, D_SYNTAX, "cu_skip_flag() ctx=%d skip=%d\n", ctxId, cu.skip ? 1 : 0 );
......@@ -656,6 +661,12 @@ void CABACWriter::cu_skip_flag( const CodingUnit& cu )
#if JVET_N0318_N0467_IBC_SIZE
if (cu.lwidth() < 128 || cu.lheight() < 128) // disable 128x128 IBC mode
{
#endif
#if JVET_N0266_SMALL_BLOCKS
if ( cu.lwidth() == 4 && cu.lheight() == 4 )
{
return;
}
#endif
unsigned ctxidx = DeriveCtx::CtxIBCFlag(cu);
m_BinEncoder.encodeBin(CU::isIBC(cu) ? 1 : 0, Ctx::IBCFlag(ctxidx));
......@@ -685,7 +696,11 @@ void CABACWriter::pred_mode( const CodingUnit& cu )
{
if (cu.cs->slice->getSPS()->getIBCFlag())
{
#if JVET_N0266_SMALL_BLOCKS
if ( cu.cs->slice->isIntra() || ( cu.lwidth() == 4 && cu.lheight() == 4 ) )
#else
if (cu.cs->slice->isIntra())
#endif
{
#if JVET_N0318_N0467_IBC_SIZE
if (cu.lwidth() < 128 || cu.lheight() < 128) // disable 128x128 IBC mode
......@@ -716,7 +731,11 @@ void CABACWriter::pred_mode( const CodingUnit& cu )
}
else
{
#if JVET_N0266_SMALL_BLOCKS
if ( cu.cs->slice->isIntra() || ( cu.lwidth() == 4 && cu.lheight() == 4 ) )
#else
if (cu.cs->slice->isIntra())
#endif
{
return;
}
......
......@@ -1137,9 +1137,15 @@ void EncCu::xCheckModeSplit(CodingStructure *&tempCS, CodingStructure *&bestCS,
startShareThisLevel = 1;
}
}
#if JVET_N0266_SMALL_BLOCKS
if ( m_shareState == GEN_ON_SHARED_BOUND && slice.getSPS()->getIBCFlag() )
#else
if ((m_shareState == GEN_ON_SHARED_BOUND) && (!slice.isIntra() || slice.getSPS()->getIBCFlag()))
#endif
{
#if !JVET_N0266_SMALL_BLOCKS
tempCS->motionLut.lutShare = tempCS->motionLut.lut;
#endif
tempCS->motionLut.lutShareIbc = tempCS->motionLut.lutIbc;
m_shareBndPosX = uiLPelX;
m_shareBndPosY = uiTPelY;
......
......@@ -625,6 +625,7 @@ static bool isTheSameNbHood( const CodingUnit &cu, const CodingStructure& cs, co
const UnitArea &cmnAnc = ps[i - 1].parts[ps[i - 1].idx];
const UnitArea cuArea = CS::getArea( cs, cu, partitioner.chType );
#if !JVET_N0266_SMALL_BLOCKS
bool sharedListReuseMode = true;
if(
pu.mergeFlag == true &&
......@@ -648,6 +649,7 @@ static bool isTheSameNbHood( const CodingUnit &cu, const CodingStructure& cs, co
{
sharedListReuseMode = true;
}
#endif
//#endif
for( int i = 0; i < cmnAnc.blocks.size(); i++ )
......@@ -657,11 +659,12 @@ static bool isTheSameNbHood( const CodingUnit &cu, const CodingStructure& cs, co
return false;
}
}
#if !JVET_N0266_SMALL_BLOCKS
if(!sharedListReuseMode)
{
return false;
}
#endif
return true;
}
......@@ -1348,7 +1351,11 @@ void EncModeCtrlMTnoRQT::initCULevel( Partitioner &partitioner, const CodingStru
}
// add first pass modes
#if JVET_N0266_SMALL_BLOCKS
if ( !m_slice->isIRAP() && !( cs.area.lwidth() == 4 && cs.area.lheight() == 4 ) )
#else
if( !m_slice->isIRAP() )
#endif
{
for( int qpLoop = maxQP; qpLoop >= minQP; qpLoop-- )
{
......@@ -1513,6 +1520,12 @@ bool EncModeCtrlMTnoRQT::tryMode( const EncTestMode& encTestmode, const CodingSt
// INTRA MODES
if (cs.sps->getIBCFlag() && !cuECtx.bestTU)
return true;
#if JVET_N0266_SMALL_BLOCKS
if ( partitioner.currArea().lumaSize().width == 4 && partitioner.currArea().lumaSize().height == 4 && !slice.isIntra() && !cuECtx.bestTU )
{
return true;
}
#endif
if( !( slice.isIRAP() || bestMode.type == ETM_INTRA || !cuECtx.bestTU ||
((!m_pcEncCfg->getDisableIntraPUsInInterSlices()) && (!relatedCU.isInter || !relatedCU.isIBC) && (
( cuECtx.bestTU->cbf[0] != 0 ) ||
......
......@@ -1629,7 +1629,9 @@ void EncSlice::encodeCtus( Picture* pcPic, const bool bCompressEntireSlice, cons
{
cs.motionLut.lut.resize(0);
cs.motionLut.lutIbc.resize(0);
#if !JVET_N0266_SMALL_BLOCKS
cs.motionLut.lutShare.resize(0);
#endif
cs.motionLut.lutShareIbc.resize(0);
}
......
......@@ -4306,6 +4306,7 @@ void InterSearch::xPredAffineInterSearch( PredictionUnit& pu,
for ( int iRefList = 0; iRefList < iNumPredDir; iRefList++ )
{
RefPicList eRefPicList = ( iRefList ? REF_PIC_LIST_1 : REF_PIC_LIST_0 );
for (int iRefIdxTemp = 0; iRefIdxTemp < slice.getNumRefIdx(eRefPicList); iRefIdxTemp++)
{
// Get RefIdx bits
......@@ -4644,6 +4645,7 @@ void InterSearch::xPredAffineInterSearch( PredictionUnit& pu,
if ( slice.isInterB() && !PU::isBipredRestriction(pu) )
{
tryBipred = 1;
// Set as best list0 and list1
iRefIdxBi[0] = iRefIdx[0];
iRefIdxBi[1] = iRefIdx[1];
......@@ -4945,6 +4947,7 @@ void InterSearch::xPredAffineInterSearch( PredictionUnit& pu,
pu.mvdAffi[0][verIdx] = pu.mvdAffi[0][verIdx] - pu.mvdAffi[0][0];
}
}
pu.interDir = 1;
pu.mvpIdx[REF_PIC_LIST_0] = aaiMvpIdx[0][iRefIdx[0]];
......@@ -4968,6 +4971,7 @@ void InterSearch::xPredAffineInterSearch( PredictionUnit& pu,
pu.mvdAffi[1][verIdx] = pu.mvdAffi[1][verIdx] - pu.mvdAffi[1][0];
}
}
pu.interDir = 2;
pu.mvpIdx[REF_PIC_LIST_1] = aaiMvpIdx[1][iRefIdx[1]];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment