Commit a9adb7fb authored by Remy Foray's avatar Remy Foray
Browse files

Fix #362: bcw_idx coding

parent 2637b3c2
Pipeline #1886 passed with stage
......@@ -1069,7 +1069,7 @@ void CABACReader::cu_gbi_flag(CodingUnit& cu)
int32_t numGBi = (cu.slice->getCheckLDC()) ? 5 : 3;
if(symbol == 0)
if(symbol == 1)
{
uint32_t prefixNumBits = numGBi - 2;
uint32_t step = 1;
......@@ -1080,7 +1080,7 @@ void CABACReader::cu_gbi_flag(CodingUnit& cu)
{
symbol = m_BinDecoder.decodeBinEP();
if (symbol == 1)
if (symbol == 0)
{
break;
}
......
......@@ -1878,6 +1878,11 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para
parsePredWeightTable(pcSlice, sps);
pcSlice->initWpScaling(sps);
}
else
{
pcSlice->resetWpScaling();
}
READ_FLAG( uiCode, "dep_quant_enabled_flag" );
pcSlice->setDepQuantEnabledFlag( uiCode != 0 );
if( !pcSlice->getDepQuantEnabledFlag() )
......
......@@ -836,12 +836,12 @@ void CABACWriter::cu_gbi_flag(const CodingUnit& cu)
{
if (gbiCodingIdx == idx)
{
m_BinEncoder.encodeBinEP(1);
m_BinEncoder.encodeBinEP(0);
break;
}
else
{
m_BinEncoder.encodeBinEP(0);
m_BinEncoder.encodeBinEP(1);
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