Commit 6e37508f authored by Karsten Suehring's avatar Karsten Suehring
Browse files

Merge branch 'R0210_NumtilesInSlice' into 'master'

JVET-R0210 section 3.3: conditional signalling of number of tiles in slice

See merge request jvet/VVCSoftware_VTM!1539
parents 2e7de3b3 c4fa8430
......@@ -62,6 +62,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.
#define JVET_R0156_ASPECT3_SPS_CLEANUP 1 // Condition sps_sublayer_dpb_params_flag on sps_ptl_dpb_hrd_params_present_flag, in addition to sps_max_sublayer_minus1, JVET-R0156 proposal 3, JVET-R0170, JVET-R0222 proposal 2
......
......@@ -3075,7 +3075,18 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par
{
int bitsSliceAddress = ceilLog2(pps->getNumTiles());
READ_CODE(bitsSliceAddress, uiCode, "slice_address"); sliceAddr = uiCode;
READ_UVLC(uiCode, "num_tiles_in_slice_minus1"); numTilesInSlice = uiCode + 1;
#if JVET_R0210_NUMTILESINSLICE_SIGNALLING
if (((int)pps->getNumTiles() - (int)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");
......
......@@ -1990,7 +1990,14 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
{
int bitsSliceAddress = ceilLog2(pcSlice->getPPS()->getNumTiles());
WRITE_CODE( pcSlice->getSliceID(), bitsSliceAddress, "slice_address");
WRITE_UVLC( pcSlice->getNumTilesInSlice() - 1, "num_tiles_in_slice_minus1");
#if JVET_R0210_NUMTILESINSLICE_SIGNALLING
if ((int)pcSlice->getPPS()->getNumTiles() - (int)pcSlice->getSliceID() > 1)
{
#endif
WRITE_UVLC(pcSlice->getNumTilesInSlice() - 1, "num_tiles_in_slice_minus1");
#if JVET_R0210_NUMTILESINSLICE_SIGNALLING
}
#endif
}
}
// rectangular slices
......
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