Commit 8896c114 authored by Frank Bossen's avatar Frank Bossen
Browse files

Merge branch 'IBC-SMALL-CTU' into 'master'

JVET-N0175/N0251/N0384: Re-arrange IBC search range for small CTU sizes

See merge request jvet/VVCSoftware_VTM!429
parents 699a2def 3cf8ca65
......@@ -58,6 +58,8 @@
#define JVET_N0462_FIX_CTX_MODELING 1 // Fix context modeling of inter_pred_idc
#define JVET_N0175_N0251_N0384_IBC_SMALL_CTU 1 // IBC search range arrangement for small CTU sizes
#define JVET_N0286_SIMPLIFIED_GBI_IDX 1 // Simplified coding of the GBi index
#define JVET_N600_AMVR_TPM_CTX_REDUCTION 1
......
......@@ -1938,12 +1938,21 @@ bool PU::isBlockVectorValid(PredictionUnit& pu, int xPos, int yPos, int width, i
}
// in the same CTU line
#if JVET_N0175_N0251_N0384_IBC_SMALL_CTU
int numLeftCTUs = (1 << ((7 - ctuSizeLog2) << 1)) - ((ctuSizeLog2 < 7) ? 1 : 0);
if ((refRightX >> ctuSizeLog2 <= xPos >> ctuSizeLog2) && (refLeftX >> ctuSizeLog2 >= (xPos >> ctuSizeLog2) - numLeftCTUs))
#else
if ((refRightX >> ctuSizeLog2 <= xPos >> ctuSizeLog2) && (refLeftX >> ctuSizeLog2 >= (xPos >> ctuSizeLog2) - 1))
#endif
{
// in the same CTU, or left CTU
// if part of ref block is in the left CTU, some area can be referred from the not-yet updated local CTU buffer
#if JVET_N0175_N0251_N0384_IBC_SMALL_CTU
if (((refLeftX >> ctuSizeLog2) == ((xPos >> ctuSizeLog2) - 1)) && (ctuSizeLog2 == 7))
#else
if ((refLeftX >> ctuSizeLog2) == ((xPos >> ctuSizeLog2) - 1))
#endif
{
// ref block's collocated block in current CTU
const Position refPosCol = pu.Y().topLeft().offset(xBv + ctuSize, yBv);
......
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