Commit c05ae257 authored by Yao-Jen Chang's avatar Yao-Jen Chang

JVET-S0221: Fix bugs, resolve conflict, and add one check at configure

parent 39f5c659
......@@ -1615,6 +1615,17 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
CHECK(m_resChangeInClvsEnabled, "resolution change in CLVS and subpictures cannot be enabled together");
}
#if JVET_S0221_NUM_VB_CHECK
if (m_virtualBoundariesPresentFlag)
{
if (m_iSourceWidth <= 8)
CHECK(m_numVerVirtualBoundaries != 0, "The number of vertical virtual boundaries shall be 0 when the picture width is less than or equal to 8");
if (m_iSourceHeight <= 8)
CHECK(m_numHorVirtualBoundaries != 0, "The number of horizontal virtual boundaries shall be 0 when the picture height is less than or equal to 8");
}
#endif
if (m_cfgSubpictureLevelInfoSEI.m_enabled)
{
CHECK (m_numSubPics != m_cfgSubpictureLevelInfoSEI.m_numSubpictures, "NumSubPics must be equal to SEISubpicLevelInfoNumSubpics" );
......
......@@ -53,7 +53,7 @@
//########### place macros to be removed in next cycle below this line ###############
#define JVET_R0042_SUBPIC_CHECK 1 // JVET_R0042: SubPicture types related constraints
#define JVET_S0221_NUM_VB_CHECK 1 // JVET_S0221: Constraints on the number of virtual boundaries
//########### place macros to be be kept below this line ###############
......
......@@ -1873,7 +1873,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
#if JVET_S0221_NUM_VB_CHECK
if (pcSPS->getMaxPicWidthInLumaSamples() <= 8)
{
CHECK(pcSPS->getNumVerVirtualBoundaries() == 0, "SPS: When picture width is less than or equal to 8, the number of vertical virtual boundaries shall be equal to 0");
CHECK(pcSPS->getNumVerVirtualBoundaries() != 0, "SPS: When picture width is less than or equal to 8, the number of vertical virtual boundaries shall be equal to 0");
}
#endif
for( unsigned i = 0; i < pcSPS->getNumVerVirtualBoundaries(); i++ )
......@@ -1884,7 +1884,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
#if JVET_S0221_NUM_VB_CHECK
if (pcSPS->getMaxPicHeightInLumaSamples() <= 8)
{
CHECK(pcSPS->getNumHorVirtualBoundaries() == 0, "SPS: When picture width is less than or equal to 8, the number of vertical virtual boundaries shall be equal to 0");
CHECK(pcSPS->getNumHorVirtualBoundaries() != 0, "SPS: When picture width is less than or equal to 8, the number of vertical virtual boundaries shall be equal to 0");
}
#endif
for( unsigned i = 0; i < pcSPS->getNumHorVirtualBoundaries(); i++ )
......@@ -2594,7 +2594,7 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
#if JVET_S0221_NUM_VB_CHECK
if (pps->getPicWidthInLumaSamples() <= 8)
{
CHECK(picHeader->getNumVerVirtualBoundaries() == 0, "PH: When picture width is less than or equal to 8, the number of vertical virtual boundaries shall be equal to 0");
CHECK(picHeader->getNumVerVirtualBoundaries() != 0, "PH: When picture width is less than or equal to 8, the number of vertical virtual boundaries shall be equal to 0");
}
#endif
for( unsigned i = 0; i < picHeader->getNumVerVirtualBoundaries(); i++ )
......@@ -2605,7 +2605,7 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
#if JVET_S0221_NUM_VB_CHECK
if (pps->getPicHeightInLumaSamples() <= 8)
{
CHECK(picHeader->getNumHorVirtualBoundaries() == 0, "PH: When picture width is less than or equal to 8, the number of horizontal virtual boundaries shall be equal to 0");
CHECK(picHeader->getNumHorVirtualBoundaries() != 0, "PH: When picture width is less than or equal to 8, the number of horizontal virtual boundaries shall be equal to 0");
}
#endif
for( unsigned i = 0; i < picHeader->getNumHorVirtualBoundaries(); i++ )
......
......@@ -1139,7 +1139,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
#if JVET_S0221_NUM_VB_CHECK
if (pcSPS->getMaxPicWidthInLumaSamples() <= 8)
{
CHECK(pcSPS->getNumVerVirtualBoundaries() == 0, "SPS: When picture width is less than or equal to 8, the number of vertical virtual boundaries shall be equal to 0");
CHECK(pcSPS->getNumVerVirtualBoundaries() != 0, "SPS: When picture width is less than or equal to 8, the number of vertical virtual boundaries shall be equal to 0");
}
#endif
for( unsigned i = 0; i < pcSPS->getNumVerVirtualBoundaries(); i++ )
......@@ -1150,7 +1150,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
#if JVET_S0221_NUM_VB_CHECK
if (pcSPS->getMaxPicHeightInLumaSamples() <= 8)
{
CHECK(pcSPS->getNumHorVirtualBoundaries() == 0, "SPS: When picture height is less than or equal to 8, the number of horizontal virtual boundaries shall be equal to 0");
CHECK(pcSPS->getNumHorVirtualBoundaries() != 0, "SPS: When picture height is less than or equal to 8, the number of horizontal virtual boundaries shall be equal to 0");
}
#endif
for( unsigned i = 0; i < pcSPS->getNumHorVirtualBoundaries(); i++ )
......@@ -1595,7 +1595,7 @@ void HLSWriter::codePictureHeader( PicHeader* picHeader, bool writeRbspTrailingB
#if JVET_S0221_NUM_VB_CHECK
if (pps->getPicWidthInLumaSamples() <= 8)
{
CHECK(picHeader->getNumVerVirtualBoundaries() == 0, "PH: When picture width is less than or equal to 8, the number of vertical virtual boundaries shall be equal to 0");
CHECK(picHeader->getNumVerVirtualBoundaries() != 0, "PH: When picture width is less than or equal to 8, the number of vertical virtual boundaries shall be equal to 0");
}
#endif
for( unsigned i = 0; i < picHeader->getNumVerVirtualBoundaries(); i++ )
......@@ -1606,7 +1606,7 @@ void HLSWriter::codePictureHeader( PicHeader* picHeader, bool writeRbspTrailingB
#if JVET_S0221_NUM_VB_CHECK
if (pps->getPicHeightInLumaSamples() <= 8)
{
CHECK(picHeader->getNumHorVirtualBoundaries() == 0, "PH: When picture width is less than or equal to 8, the number of horizontal virtual boundaries shall be equal to 0");
CHECK(picHeader->getNumHorVirtualBoundaries() != 0, "PH: When picture width is less than or equal to 8, the number of horizontal virtual boundaries shall be equal to 0");
}
#endif
for( unsigned i = 0; i < picHeader->getNumHorVirtualBoundaries(); i++ )
......
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