Commit c804a833 authored by Semih Esenlik's avatar Semih Esenlik
Browse files

R0210 section 3.3 conditional signalling of number of tiles in slice

header
parent 2275adb3
......@@ -59,6 +59,7 @@
#define JVET_Q0471_CHROMA_QT_SPLIT 1 // JVET-Q0471: Chroma QT split
#define JVET_R0208_ALF_VB_ROUNDING_FIX 1 // JVET-R0208: Rounding offset fix for ALF virtual boundary processing
#define JVET_R0232_CCALF_APS_CONSTRAINT 1 // JVET-R0232 section 3.2: APS contraint for CCALF
#define JVET_R0210_NUMTILESINSLICE_SIGNALLING 1 // JVET-R0210 section 3.3: Don't signal NumTilesInSlice syntax element when numTilesInPic - slice_address is 1.
//########### place macros to be be kept below this line ###############
......
......@@ -3054,7 +3054,18 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par
{
int bitsSliceAddress = ceilLog2(pps->getNumTiles());
READ_CODE(bitsSliceAddress, uiCode, "slice_address"); sliceAddr = uiCode;
#if JVET_R0210_NUMTILESINSLICE_SIGNALLING
if ((pps->getNumTiles() - sliceAddr) > 1)
{
#endif
READ_UVLC(uiCode, "num_tiles_in_slice_minus1"); numTilesInSlice = uiCode + 1;
#if JVET_R0210_NUMTILESINSLICE_SIGNALLING
}
else
{
numTilesInSlice = 1;
}
#endif
if (!pps->getRectSliceFlag() && sps->getProfileTierLevel()->getConstraintInfo()->getOneSlicePerPicConstraintFlag())
{
CHECK(pps->getNumTiles() != uiCode + 1, "When rect_slice_flag is equal to 0 and one_slice_per_pic_constraint_flag equal to 1, the value of num_tiles_in_slice_minus1 present in each slice header shall be equal to NumTilesInPic - 1");
......
......@@ -1980,6 +1980,9 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
{
int bitsSliceAddress = ceilLog2(pcSlice->getPPS()->getNumTiles());
WRITE_CODE( pcSlice->getSliceID(), bitsSliceAddress, "slice_address");
#if JVET_R0210_NUMTILESINSLICE_SIGNALLING
if (pcSlice->getPPS()->getNumTiles() - pcSlice->getSliceID() > 1)
#endif
WRITE_UVLC( pcSlice->getNumTilesInSlice() - 1, "num_tiles_in_slice_minus1");
}
}
......
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