Commit b0e8dec1 authored by Karsten Suehring's avatar Karsten Suehring

remove macro JVET_L0361_SPLIT_CTX

parent a6589719
......@@ -182,24 +182,7 @@ unsigned DeriveCtx::CtxCUsplit( const CodingStructure& cs, Partitioner& partitio
#endif
ctxId += ( cuAbove && cuAbove->qtDepth > partitioner.currQtDepth ) ? 1 : 0;
#if JVET_L0361_SPLIT_CTX
ctxId += partitioner.currQtDepth < 2 ? 0 : 3;
#else
if( cs.sps->getSpsNext().getUseLargeCTU() )
{
unsigned minDepth = 0;
unsigned maxDepth = 0;
adPartitioner->setMaxMinDepth( minDepth, maxDepth, cs );
if( partitioner.currDepth < minDepth )
{
ctxId = 3;
}
else if( partitioner.currDepth >= maxDepth + 1 )
{
ctxId = 4;
}
}
#endif
return ctxId;
}
......@@ -294,7 +277,6 @@ unsigned DeriveCtx::CtxBTsplit(const CodingStructure& cs, Partitioner& partition
#endif
{
#if JVET_L0361_SPLIT_CTX
unsigned widthCurr = partitioner.currArea().blocks[partitioner.chType].width;
unsigned heightCurr = partitioner.currArea().blocks[partitioner.chType].height;
if( cuLeft )
......@@ -320,12 +302,6 @@ unsigned DeriveCtx::CtxBTsplit(const CodingStructure& cs, Partitioner& partition
unsigned int sizeCurr = partitioner.currArea().lumaSize().area();
ctx += sizeCurr > th2 ? 0 : ( sizeCurr > th1 ? 3 : 6 );
}
#else
const unsigned currDepth = partitioner.currQtDepth * 2 + partitioner.currBtDepth;
if( cuLeft ) ctx += ( ( 2 * cuLeft->qtDepth + cuLeft->btDepth ) > currDepth ? 1 : 0 );
if( cuAbove ) ctx += ( ( 2 * cuAbove->qtDepth + cuAbove->btDepth ) > currDepth ? 1 : 0 );
#endif
}
return ctx;
}
......
......@@ -262,7 +262,6 @@ std::vector<std::vector<uint8_t>> ContextSetCfg::sm_InitTables( NUMBER_OF_SLICE_
const CtxSet ContextSetCfg::SplitFlag = ContextSetCfg::addCtxSet
({
#if JVET_L0361_SPLIT_CTX
#if TRAINED_CABAC_INIT_TABLES
{ 137, 125, 127, 107, 138, 140, },
{ 138, 111, 143, 107, 138, 140, },
......@@ -272,16 +271,10 @@ const CtxSet ContextSetCfg::SplitFlag = ContextSetCfg::addCtxSet
{ 107, 139, 126, 107, 139, 126, },
{ 139, 141, 157, 139, 141, 157, },
#endif
#else
{ 107, 139, 126, 255, 0,},
{ 107, 139, 126, 255, 0,},
{ 139, 141, 157, 255, 0,},
#endif
});
const CtxSet ContextSetCfg::BTSplitFlag = ContextSetCfg::addCtxSet
({
#if JVET_L0361_SPLIT_CTX
// |-------- 1st bin, 9 ctx for luma + 3 ctx for chroma------| |--2nd bin--| |3rd bin|
#if TRAINED_CABAC_INIT_TABLES
{ 137, 125, 141, 123, 125, 141, 78, 124, 140, CNU, CNU, CNU, 169, 155, 154, 154, },
......@@ -292,11 +285,6 @@ const CtxSet ContextSetCfg::BTSplitFlag = ContextSetCfg::addCtxSet
{ 107, 139, 126, 107, 139, 126, 107, 139, 126, 107, 139, 126, 154, 154, 154, 154,},
{ 139, 141, 157, 139, 141, 157, 139, 141, 157, 139, 141, 157, 154, 154, 154, 154,},
#endif
#else
{ 107, 139, 126, 154, 154, 154, 154, 154, 154, 154, 154, 154,},
{ 107, 139, 126, 154, 154, 154, 154, 154, 154, 154, 154, 154,},
{ 139, 141, 157, 154, 154, 154, 154, 154, 154, 154, 154, 154,},
#endif
});
const CtxSet ContextSetCfg::SkipFlag = ContextSetCfg::addCtxSet
......
......@@ -73,7 +73,6 @@
#define JVET_L0361_SPLIT_CTX 1 // context for cu-split-related flags
#define JVET_L0274 1
#define JVET_L0274_ENCODER_SPEED_UP ( 1 && JVET_L0274 ) // encoder speed-up by pre-calculating position dependent parameters
......
......@@ -623,17 +623,10 @@ PartSplit CABACReader::split_cu_mode_mt( CodingStructure& cs, Partitioner &parti
unsigned btSCtxId = width == height ? 0 : ( width > height ? 1 : 2 );
dt.setCtxId( DTT_SPLIT_DO_SPLIT_DECISION, Ctx::BTSplitFlag( ctxIdBT ) ); // 0- 2
#if JVET_L0361_SPLIT_CTX
dt.setCtxId( DTT_SPLIT_HV_DECISION, Ctx::BTSplitFlag( 12 + btSCtxId ) );//12-14
dt.setCtxId( DTT_SPLIT_H_IS_BT_12_DECISION, Ctx::BTSplitFlag( 15 ) );
dt.setCtxId( DTT_SPLIT_V_IS_BT_12_DECISION, Ctx::BTSplitFlag( 15 ) );
#else
dt.setCtxId( DTT_SPLIT_HV_DECISION, Ctx::BTSplitFlag( 3 + btSCtxId ) ); // 3- 5
dt.setCtxId( DTT_SPLIT_H_IS_BT_12_DECISION, Ctx::BTSplitFlag( 6 + btSCtxId ) ); // 6- 8
dt.setCtxId( DTT_SPLIT_V_IS_BT_12_DECISION, Ctx::BTSplitFlag( 9 + btSCtxId ) ); // 9-11
#endif
unsigned id = decode_sparse_dt( dt );
......
......@@ -566,17 +566,10 @@ void CABACWriter::split_cu_mode_mt(const PartSplit split, const CodingStructure&
unsigned btSCtxId = width == height ? 0 : ( width > height ? 1 : 2 );
dt.setCtxId( DTT_SPLIT_DO_SPLIT_DECISION, Ctx::BTSplitFlag( ctxIdBT ) );
#if JVET_L0361_SPLIT_CTX
dt.setCtxId( DTT_SPLIT_HV_DECISION, Ctx::BTSplitFlag( 12 + btSCtxId ) );
dt.setCtxId( DTT_SPLIT_H_IS_BT_12_DECISION, Ctx::BTSplitFlag( 15 ) );
dt.setCtxId( DTT_SPLIT_V_IS_BT_12_DECISION, Ctx::BTSplitFlag( 15 ) );
#else
dt.setCtxId( DTT_SPLIT_HV_DECISION, Ctx::BTSplitFlag( 3 + btSCtxId ) );
dt.setCtxId( DTT_SPLIT_H_IS_BT_12_DECISION, Ctx::BTSplitFlag( 6 + btSCtxId ) );
dt.setCtxId( DTT_SPLIT_V_IS_BT_12_DECISION, Ctx::BTSplitFlag( 9 + btSCtxId ) );
#endif
encode_sparse_dt( dt, split == CU_DONT_SPLIT ? ( unsigned ) DTT_SPLIT_NO_SPLIT : ( unsigned ) split );
......
Markdown is supported
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