Commit fb5d5e2b authored by Hendry's avatar Hendry

Fix bug in parameter set activation

parent 1286af0f
......@@ -2854,6 +2854,13 @@ void xTracePPSHeader()
DTRACE( g_trace_ctx, D_HEADER, "=========== Picture Parameter Set ===========\n" );
}
#if JVET_M0132
void xTraceAPSHeader()
{
DTRACE(g_trace_ctx, D_HEADER, "=========== Adaptation Parameter Set ===========\n");
}
#endif
void xTraceSliceHeader()
{
DTRACE( g_trace_ctx, D_HEADER, "=========== Slice ===========\n" );
......
......@@ -2383,6 +2383,9 @@ void xTraceVPSHeader();
#endif
void xTraceSPSHeader();
void xTracePPSHeader();
#if JVET_M0132
void xTraceAPSHeader();
#endif
void xTraceSliceHeader();
void xTraceAccessUnitDelimiter();
#endif
......
......@@ -759,6 +759,11 @@ void DecLib::xActivateParameterSets()
m_parameterSetManager.clearSPSChangedFlag(sps->getSPSId());
m_parameterSetManager.clearPPSChangedFlag(pps->getPPSId());
#if JVET_M0132 //Hendry
if (aps != 0)
m_parameterSetManager.clearAPSChangedFlag(aps->getAPSId());
#endif
if (false == m_parameterSetManager.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))
{
THROW("Parameter set activation failed!");
......@@ -905,7 +910,7 @@ void DecLib::xActivateParameterSets()
EXIT("Error - a new PPS has been decoded while processing a picture");
}
#if JVET_M0132
if (m_parameterSetManager.getAPSChangedFlag(aps->getAPSId()))
if (aps && m_parameterSetManager.getAPSChangedFlag(aps->getAPSId()))
{
EXIT("Error - a new APS has been decoded while processing a picture");
}
......
......@@ -610,12 +610,15 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS )
#if JVET_M0132
void HLSyntaxReader::parseAPS(APS* aps)
{
#if ENABLE_TRACING
xTraceAPSHeader();
#endif
uint32_t code;
READ_CODE(5, code, "adaptation_parameter_set_id");
aps->setAPSId(code);
//uint32_t code = 1;
AlfSliceParam param = aps->getAlfAPSParam();
param.enabledFlag[COMPONENT_Y] = true;
......@@ -649,6 +652,7 @@ void HLSyntaxReader::parseAPS(APS* aps)
xReadRbspTrailingBits();
}
#endif
void HLSyntaxReader::parseVUI(VUI* pcVUI, SPS *pcSPS)
{
#if ENABLE_TRACING
......
......@@ -368,6 +368,10 @@ void HLSWriter::codePPS( const PPS* pcPPS )
#if JVET_M0132
void HLSWriter::codeAPS( APS* pcAPS)
{
#if ENABLE_TRACING
xTraceAPSHeader();
#endif
AlfSliceParam param = pcAPS->getAlfAPSParam();
WRITE_CODE(pcAPS->getAPSId(), 5, "adaptation_parameter_set_id");
......
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