Commit 36c839aa authored by Fabrice Le Léannec's avatar Fabrice Le Léannec

JVET-N0286: simplified GBi index coding

parent 704580a0
......@@ -958,7 +958,9 @@ void CABACReader::cu_gbi_flag(CodingUnit& cu)
uint32_t prefixNumBits = numGBi - 2;
uint32_t step = 1;
#if !JVET_N0286_SIMPLIFIED_GBI_IDX
unsigned ctxIdGBi = 4;
#endif
idx = 1;
for(int ui = 0; ui < prefixNumBits; ++ui)
......@@ -973,7 +975,9 @@ void CABACReader::cu_gbi_flag(CodingUnit& cu)
{
break;
}
#if !JVET_N0286_SIMPLIFIED_GBI_IDX
ctxIdGBi += step;
#endif
idx += step;
}
}
......
......@@ -761,7 +761,9 @@ void CABACWriter::cu_gbi_flag(const CodingUnit& cu)
const uint32_t prefixNumBits = numGBi - 2;
const uint32_t step = 1;
#if !JVET_N0286_SIMPLIFIED_GBI_IDX
int ctxIdGBi = 4;
#endif
uint8_t idx = 1;
for(int ui = 0; ui < prefixNumBits; ++ui)
{
......@@ -780,8 +782,8 @@ void CABACWriter::cu_gbi_flag(const CodingUnit& cu)
m_BinEncoder.encodeBinEP(0);
#else
m_BinEncoder.encodeBin(0, Ctx::GBiIdx(ctxIdGBi));
#endif
ctxIdGBi += step;
#endif
idx += step;
}
}
......
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