Commit 8fb362e9 authored by Xiang Li's avatar Xiang Li
Browse files

Merge branch 'tpoirier/VVCSoftware_VTM-JVET-O0500-SW-BF'

parents d6524163 683cd869
......@@ -376,6 +376,16 @@ const CtxSet ContextSetCfg::RefPic = ContextSetCfg::addCtxSet
{ 4, 5, },
});
#if JVET_O0500_SEP_CTX_AFFINE_SUBBLOCK_MRG
const CtxSet ContextSetCfg::SubblockMergeFlag = ContextSetCfg::addCtxSet
({
{ 183, 185, 187, },
{ 168, 169, 171, },
{ CNU, CNU, CNU, },
{ 4, 4, 4, },
});
#endif
const CtxSet ContextSetCfg::AffineFlag = ContextSetCfg::addCtxSet
({
{ 183, 185, 187, },
......
......@@ -218,6 +218,9 @@ public:
static const CtxSet MmvdFlag;
static const CtxSet MmvdMergeIdx;
static const CtxSet MmvdStepMvpIdx;
#if JVET_O0500_SEP_CTX_AFFINE_SUBBLOCK_MRG
static const CtxSet SubblockMergeFlag;
#endif
static const CtxSet AffineFlag;
static const CtxSet AffineType;
static const CtxSet AffMergeIdx;
......
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define JVET_O0500_SEP_CTX_AFFINE_SUBBLOCK_MRG 1 // JVET-O0500: Different ctx models for inter affine flag and subblock merge flag
#define JVET_O0414_SMVD_LTRP 1 // JVET-O0414: long-term reference picture restriction for SMVD
#define JVET_O0258_REMOVE_CHROMA_IBC_FOR_DUALTREE 1 // JVET-O0258 Remove chroma IBC when dualtree is used
......
......@@ -1677,7 +1677,11 @@ void CABACReader::subblock_merge_flag( CodingUnit& cu )
RExt__DECODER_DEBUG_BIT_STATISTICS_CREATE_SET( STATS__CABAC_BITS__AFFINE_FLAG );
unsigned ctxId = DeriveCtx::CtxAffineFlag( cu );
#if JVET_O0500_SEP_CTX_AFFINE_SUBBLOCK_MRG
cu.affine = m_BinDecoder.decodeBin( Ctx::SubblockMergeFlag( ctxId ) );
#else
cu.affine = m_BinDecoder.decodeBin( Ctx::AffineFlag( ctxId ) );
#endif
DTRACE( g_trace_ctx, D_SYNTAX, "subblock_merge_flag() subblock_merge_flag=%d ctx=%d pos=(%d,%d)\n", cu.affine ? 1 : 0, ctxId, cu.Y().x, cu.Y().y );
}
}
......
......@@ -1569,7 +1569,11 @@ void CABACWriter::subblock_merge_flag( const CodingUnit& cu )
if ( !cu.cs->slice->isIntra() && (cu.cs->sps->getUseAffine() || cu.cs->sps->getSBTMVPEnabledFlag()) && cu.lumaSize().width >= 8 && cu.lumaSize().height >= 8 )
{
unsigned ctxId = DeriveCtx::CtxAffineFlag( cu );
#if JVET_O0500_SEP_CTX_AFFINE_SUBBLOCK_MRG
m_BinEncoder.encodeBin( cu.affine, Ctx::SubblockMergeFlag( ctxId ) );
#else
m_BinEncoder.encodeBin( cu.affine, Ctx::AffineFlag( ctxId ) );
#endif
DTRACE( g_trace_ctx, D_SYNTAX, "subblock_merge_flag() subblock_merge_flag=%d ctx=%d pos=(%d,%d)\n", cu.affine ? 1 : 0, ctxId, cu.Y().x, cu.Y().y );
}
}
......
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