Commit cdc98f45 authored by Fabrice Le Léannec's avatar Fabrice Le Léannec

JVET-N0286: simplified GBi index coding

parent c74ba3a4
......@@ -973,7 +973,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)
......@@ -988,7 +990,9 @@ void CABACReader::cu_gbi_flag(CodingUnit& cu)
{
break;
}
#if !JVET_N0286_SIMPLIFIED_GBI_IDX
ctxIdGBi += step;
#endif
idx += step;
}
}
......
......@@ -766,7 +766,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)
{
......@@ -785,8 +787,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