Commit bbb23a37 authored by Frank Bossen's avatar Frank Bossen

Merge branch 'M0118-TriangleFlag-Fix' into 'master'

JVET-M0118, M0185 etc on merge_triangle_flag redudant signaling when a CU uses MMVD or CIIP

See merge request jvet/VVCSoftware_VTM!174
parents 0fb3764e d85a2ca0
Pipeline #573 passed with stage
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define JVET_M0118_M0185_TRIANGLE_FLAG_FIX 1 // Avoid signaling triangle flag if a CU uses MMVD or CIIP
#define JVET_M0487_INT_EXTEND 1 // CE9.1.1 b: integer reference samples as 1 extended samples
#define JVET_M0444_SMVD 1 // SMVD mode
......
......@@ -1951,6 +1951,18 @@ void CABACReader::triangle_mode( CodingUnit& cu )
return;
}
#if JVET_M0118_M0185_TRIANGLE_FLAG_FIX
if ( cu.firstPU->mmvdMergeFlag || cu.mmvdSkip )
{
return;
}
if ( cu.firstPU->mhIntraFlag )
{
return;
}
#endif
unsigned flag_idx = DeriveCtx::CtxTriangleFlag( cu );
cu.triangle = m_BinDecoder.decodeBin( Ctx::TriangleFlag(flag_idx) );
......
......@@ -1782,6 +1782,18 @@ void CABACWriter::triangle_mode( const CodingUnit& cu )
return;
}
#if JVET_M0118_M0185_TRIANGLE_FLAG_FIX
if ( cu.firstPU->mmvdMergeFlag || cu.mmvdSkip )
{
return;
}
if ( cu.firstPU->mhIntraFlag )
{
return;
}
#endif
unsigned flag_idx = DeriveCtx::CtxTriangleFlag( cu );
m_BinEncoder.encodeBin( cu.triangle, Ctx::TriangleFlag(flag_idx) );
......
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