Commit ff4fcbde authored by Frank Bossen's avatar Frank Bossen

Merge branch 'S0113-S0195-GCI' into 'master'

JVET-S0113/S0195: new GCI flags

See merge request !1835
parents 2edb292b dfacc275
Pipeline #5576 passed with stage
in 22 minutes and 29 seconds
......@@ -977,6 +977,18 @@ Valid values are: main, high.
NB: There is currently only limited validation that the encoder configuration complies with the profile, level and tier constraints.
\\
\Option{FrameOnlyConstraintFlag} &
%\ShortOption{\None} &
\Default{1} &
Specifies the value of ptl_frame_only_constraint_flag .
\\
\Option{MultiLayerEnabledFlag} &
%\ShortOption{\None} &
\Default{0} &
Specifies the value of ptl_multilayer_enabled_flag.
\\
\Option{SubProfile} &
%\ShortOption{\None} &
\Default{0} &
......@@ -1085,6 +1097,12 @@ Specifies the value of gci_no_gdr_constraint_flag
Specifies the value of gci_no_aps_constraint_flag
\\
\Option{NoIdrRplConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of gci_no_idr_rpl_constraint_flag
\\
\Option{OneTilePerPicConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
......@@ -1102,11 +1120,22 @@ Specifies the value of pic_header_in_slice_header_constraint_flag
\Default{false} &
Specifies the value of one_slice_per_pic_constraint_flag
\\
\Option{NoRectSliceConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of gci_no_rectangular_slice_constraint_flag
\\
\Option{OneSubpicPerPicConstraintFlag} &
\Option{OneSlicePerSubpicConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of one_subpic_per_pic_constraint_flag
Specifies the value of gci_one_slice_per_subpic_constraint_flag
\\
\Option{NoSubpicInfoConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of gci_no_subpic_info_constraint_flag
\\
\Option{MaxLog2CtuSizeConstraintIdc} &
......@@ -1355,18 +1384,6 @@ Specifies the value of gci_no_ladf_constraint_flag
Specifies the value of gci_no_virtual_boundaries_constraint_flag
\\
\Option{SingleLayerConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of single_layer_constraint_flag
\\
\Option{FrameOnlyConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of general_frame_only_constraint_flag
\\
\end{OptionTableNoShorthand}
......
......@@ -268,7 +268,21 @@ void EncApp::xInitLibCfg()
m_cEncLib.setOneTilePerPicConstraintFlag(m_oneTilePerPicConstraintFlag);
m_cEncLib.setPicHeaderInSliceHeaderConstraintFlag(m_picHeaderInSliceHeaderConstraintFlag);
m_cEncLib.setOneSlicePerPicConstraintFlag(m_oneSlicePerPicConstraintFlag);
#if JVET_S0113_S0195_GCI
m_cEncLib.setNoIdrRplConstraintFlag(m_noIdrRplConstraintFlag);
CHECK(m_noIdrRplConstraintFlag&& m_idrRefParamList, "IDR RPL shall be deactivated when gci_no_idr_rpl_constraint_flag equal to 1");
m_cEncLib.setNoRectSliceConstraintFlag(m_noRectSliceConstraintFlag);
CHECK(m_noRectSliceConstraintFlag && !m_rasterSliceFlag, "Rectangular slice shall be deactivated when gci_no_rectangular_slice_constraint_flag equal to 1");
m_cEncLib.setOneSlicePerSubpicConstraintFlag(m_oneSlicePerSubpicConstraintFlag);
CHECK(m_oneSlicePerSubpicConstraintFlag && !m_singleSlicePerSubPicFlag, "Each picture shall consist of one and only one rectangular slice when gci_one_slice_per_subpic_constraint_flag equal to 1");
m_cEncLib.setNoSubpicInfoConstraintFlag(m_noSubpicInfoConstraintFlag);
CHECK(m_noSubpicInfoConstraintFlag&& m_subPicInfoPresentFlag, "Subpicture information shall not present when gci_no_subpic_info_constraint_flag equal to 1");
#else
m_cEncLib.setOneSubpicPerPicConstraintFlag(m_oneSubpicPerPicConstraintFlag);
#endif
#if !JVET_S0138_GCI_PTL
m_cEncLib.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag);
#endif
......@@ -445,7 +459,14 @@ void EncApp::xInitLibCfg()
m_cEncLib.setOneTilePerPicConstraintFlag(false);
m_cEncLib.setPicHeaderInSliceHeaderConstraintFlag(false);
m_cEncLib.setOneSlicePerPicConstraintFlag(false);
#if JVET_S0113_S0195_GCI
m_cEncLib.setNoIdrRplConstraintFlag(false);
m_cEncLib.setNoRectSliceConstraintFlag(false);
m_cEncLib.setOneSlicePerSubpicConstraintFlag(false);
m_cEncLib.setNoSubpicInfoConstraintFlag(false);
#else
m_cEncLib.setOneSubpicPerPicConstraintFlag(false);
#endif
#if !JVET_S0138_GCI_PTL
m_cEncLib.setFrameOnlyConstraintFlag(false);
#endif
......
......@@ -835,7 +835,14 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("OneTilePerPicConstraintFlag", m_oneTilePerPicConstraintFlag, false, "Indicate that each picture shall contain only one tile")
("PicHeaderInSliceHeaderConstraintFlag", m_picHeaderInSliceHeaderConstraintFlag, false, "Indicate that picture header is present in slice header")
("OneSlicePerPicConstraintFlag", m_oneSlicePerPicConstraintFlag, false, "Indicate that each picture shall contain only one slice")
#if JVET_S0113_S0195_GCI
("NoIdrRplConstraintFlag", m_noIdrRplConstraintFlag, false, "Indicate that RPL is not present in SH of IDR slices")
("NoRectSliceConstraintFlag", m_noRectSliceConstraintFlag, false, "Indicate that rectagular slice is deactivated")
("OneSlicePerSubpicConstraintFlag", m_oneSlicePerSubpicConstraintFlag, false, "Indicate that each subpicture shall contain only one slice")
("NoSubpicInfoConstraintFlag", m_noSubpicInfoConstraintFlag, false, "Indicate that subpicture information is not present")
#else
("OneSubpicPerPicConstraintFlag", m_oneSubpicPerPicConstraintFlag, false, "Indicate that each picture shall contain only one subpicture")
#endif
#if JVET_S0066_GCI
("MaxLog2CtuSizeConstraintIdc", m_maxLog2CtuSizeConstraintIdc, 8, "Indicate that Log2CtuSize shall be in the range of 0 to m_maxLog2CtuSizeConstraintIdc")
#endif
......
......@@ -217,7 +217,14 @@ protected:
bool m_oneTilePerPicConstraintFlag;
bool m_picHeaderInSliceHeaderConstraintFlag;
bool m_oneSlicePerPicConstraintFlag;
#if JVET_S0113_S0195_GCI
bool m_noIdrRplConstraintFlag;
bool m_noRectSliceConstraintFlag;
bool m_oneSlicePerSubpicConstraintFlag;
bool m_noSubpicInfoConstraintFlag;
#else
bool m_oneSubpicPerPicConstraintFlag;
#endif
#if !JVET_S0138_GCI_PTL
bool m_frameOnlyConstraintFlag;
#endif
......
......@@ -246,7 +246,14 @@ class ConstraintInfo
bool m_oneTilePerPicConstraintFlag;
bool m_picHeaderInSliceHeaderConstraintFlag;
bool m_oneSlicePerPicConstraintFlag;
#if JVET_S0113_S0195_GCI
bool m_noIdrRplConstraintFlag;
bool m_noRectSliceConstraintFlag;
bool m_oneSlicePerSubpicConstraintFlag;
bool m_noSubpicInfoConstraintFlag;
#else
bool m_oneSubpicPerPicConstraintFlag;
#endif
#if !JVET_S0138_GCI_PTL
bool m_frameOnlyConstraintFlag;
#endif
......@@ -332,7 +339,14 @@ public:
, m_oneTilePerPicConstraintFlag(false)
, m_picHeaderInSliceHeaderConstraintFlag(false)
, m_oneSlicePerPicConstraintFlag(false)
#if JVET_S0113_S0195_GCI
, m_noIdrRplConstraintFlag(false)
, m_noRectSliceConstraintFlag(false)
, m_oneSlicePerSubpicConstraintFlag(false)
, m_noSubpicInfoConstraintFlag(false)
#else
, m_oneSubpicPerPicConstraintFlag(false)
#endif
#if !JVET_S0138_GCI_PTL
, m_frameOnlyConstraintFlag (false)
#endif
......@@ -444,8 +458,22 @@ public:
bool getOneSlicePerPicConstraintFlag() const { return m_oneSlicePerPicConstraintFlag; }
void setOneSlicePerPicConstraintFlag(bool b) { m_oneSlicePerPicConstraintFlag = b; }
#if JVET_S0113_S0195_GCI
bool getNoIdrRplConstraintFlag() const { return m_noIdrRplConstraintFlag; }
void setNoIdrRplConstraintFlag(bool b) { m_noIdrRplConstraintFlag = b; }
bool getNoRectSliceConstraintFlag() const { return m_noRectSliceConstraintFlag; }
void setNoRectSliceConstraintFlag(bool b) { m_noRectSliceConstraintFlag = b; }
bool getOneSlicePerSubpicConstraintFlag() const { return m_oneSlicePerSubpicConstraintFlag; }
void setOneSlicePerSubpicConstraintFlag(bool b) { m_oneSlicePerSubpicConstraintFlag = b; }
bool getNoSubpicInfoConstraintFlag() const { return m_noSubpicInfoConstraintFlag; }
void setNoSubpicInfoConstraintFlag(bool b) { m_noSubpicInfoConstraintFlag = b; }
#else
bool getOneSubpicPerPicConstraintFlag() const { return m_oneSubpicPerPicConstraintFlag; }
void setOneSubpicPerPicConstraintFlag(bool b) { m_oneSubpicPerPicConstraintFlag = b; }
#endif
bool getIntraOnlyConstraintFlag() const { return m_intraOnlyConstraintFlag; }
void setIntraOnlyConstraintFlag(bool b) { m_intraOnlyConstraintFlag = b; }
......
......@@ -147,6 +147,11 @@
#define JVET_S0138_GCI_PTL 1 // JVET-S_Notes_d9: move frame_only_constraint_flag and single_layer_constraint_flag into PTL for easy access
#define JVET_S0113_S0195_GCI 1 // JVET-S0113: no_rectangular_slice_constraint_flag to constrain pps_rect_slice_flag
// one_slice_per_subpicture_constraint_flag to constrain pps_single_slice_per_subpic_flag
// JVET-S0195: replace one_subpic_per_pic_constraint_flag with no_subpic_info_constraint_flag and its semantics
// add no_idr_rpl_constraint_flag
#define JVET_S0182_RPL_SIGNALLING 1 // JVET-S0182: modifications to rpl information signalling
#define JVET_S0185_PROPOSAl1_PICTURE_TIMING_CLEANUP 1 // JVET-S0185: Proposal 1, put syntax element pt_cpb_removal_delay_minus1[] first, followed by similar information for sub-layers, followed by pt_dpb_output_delay
......
......@@ -1856,12 +1856,40 @@ void DecLib::xCheckParameterSetConstraints(const int layerId)
#endif
}
#if JVET_S0113_S0195_GCI
if (sps->getProfileTierLevel()->getConstraintInfo()->getNoIdrRplConstraintFlag())
{
CHECK(sps->getIDRRefParamListPresent(), "When gci_no_idr_rpl_constraint_flag equal to 1 , the value of sps_idr_rpl_present_flag shall be equal to 0")
}
if (sps->getProfileTierLevel()->getConstraintInfo()->getNoMixedNaluTypesInPicConstraintFlag())
{
CHECK(pps->getMixedNaluTypesInPicFlag(), "When gci_no_mixed_nalu_types_in_pic_constraint_flag equal to 1, the value of pps_mixed_nalu_types_in_pic_flag shall be equal to 0")
}
if (sps->getProfileTierLevel()->getConstraintInfo()->getNoRectSliceConstraintFlag())
{
CHECK(pps->getRectSliceFlag(), "When gci_no_rectangular_slice_constraint_flag equal to 1, the value of pps_rect_slice_flag shall be equal to 0")
}
if (sps->getProfileTierLevel()->getConstraintInfo()->getOneSlicePerSubpicConstraintFlag())
{
CHECK(!(pps->getSingleSlicePerSubPicFlag()), "When gci_one_slice_per_subpic_constraint_flag equal to 1, the value of pps_single_slice_per_subpic_flag shall be equal to 1")
}
if (sps->getProfileTierLevel()->getConstraintInfo()->getNoSubpicInfoConstraintFlag())
{
CHECK(sps->getSubPicInfoPresentFlag(), "When gci_no_subpic_info_constraint_flag is equal to 1, the value of sps_subpic_info_present_flag shall be equal to 0")
}
#else
#if JVET_S0050_GCI
if (sps->getProfileTierLevel()->getConstraintInfo()->getOneSubpicPerPicConstraintFlag())
{
CHECK(sps->getNumSubPics() != 1, "When one_subpic_per_pic_constraint_flag is equal to 1, the value of sps_num_subpics_minus1 shall be equal to 0")
}
#endif
#endif
#if JVET_S0066_GCI
CHECK(sps->getCTUSize() > (1 << sps->getProfileTierLevel()->getConstraintInfo()->getMaxLog2CtuSizeConstraintIdc()), "The CTU size specified by sps_log2_ctu_size_minus5 shall not exceed the constraint specified by gci_three_minus_max_log2_ctu_size_constraint_idc");
......
......@@ -1497,16 +1497,23 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
#endif
READ_FLAG( uiCode, "subpic_info_present_flag" ); pcSPS->setSubPicInfoPresentFlag(uiCode);
#if JVET_S0113_S0195_GCI
if (pcSPS->getProfileTierLevel()->getConstraintInfo()->getNoSubpicInfoConstraintFlag())
{
CHECK(uiCode != 0, "When gci_no_subpic_info_constraint_flag is equal to 1, the value of subpic_info_present_flag shall be equal to 0");
}
#endif
if (pcSPS->getSubPicInfoPresentFlag())
{
READ_UVLC(uiCode, "sps_num_subpics_minus1"); pcSPS->setNumSubPics(uiCode + 1);
CHECK(uiCode > (pcSPS->getMaxPicWidthInLumaSamples() / (1 << pcSPS->getCTUSize())) * (pcSPS->getMaxPicHeightInLumaSamples() / (1 << pcSPS->getCTUSize())) - 1, "Invalid sps_num_subpics_minus1 value");
#if !JVET_S0113_S0195_GCI
if (pcSPS->getProfileTierLevel()->getConstraintInfo()->getOneSubpicPerPicConstraintFlag())
{
CHECK(uiCode != 0, "When one_subpic_per_pic_constraint_flag is equal to 1, each picture shall contain only one subpicture");
}
#endif
if( pcSPS->getNumSubPics() == 1 )
{
pcSPS->setSubPicCtuTopLeftX( 0, 0 );
......@@ -1915,6 +1922,13 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
pcSPS->setInterLayerPresentFlag(0);
}
READ_FLAG( uiCode, "sps_idr_rpl_present_flag" ); pcSPS->setIDRRefParamListPresent( (bool) uiCode );
#if JVET_S0113_S0195_GCI
if (pcSPS->getProfileTierLevel()->getConstraintInfo()->getNoIdrRplConstraintFlag())
{
CHECK(uiCode != 0, "When gci_no_idr_rpl_constraint_flag equal to 1 , the value of sps_idr_rpl_present_flag shall be equal to 0");
}
#endif
READ_FLAG(uiCode, "rpl1_copy_from_rpl0_flag");
pcSPS->setRPL1CopyFromRPL0Flag(uiCode);
......@@ -4629,10 +4643,19 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo)
}
#endif
READ_FLAG(symbol, "no_res_change_in_clvs_constraint_flag" ); cinfo->setNoResChangeInClvsConstraintFlag(symbol ? true : false);
#if JVET_S0113_S0195_GCI
READ_FLAG(symbol, "gci_no_idr_rpl_constraint_flag" ); cinfo->setNoIdrRplConstraintFlag(symbol ? true : false);
#endif
READ_FLAG(symbol, "one_tile_per_pic_constraint_flag" ); cinfo->setOneTilePerPicConstraintFlag(symbol ? true : false);
READ_FLAG(symbol, "pic_header_in_slice_header_constraint_flag"); cinfo->setPicHeaderInSliceHeaderConstraintFlag(symbol ? true : false);
READ_FLAG(symbol, "one_slice_per_pic_constraint_flag" ); cinfo->setOneSlicePerPicConstraintFlag(symbol ? true : false);
#if JVET_S0113_S0195_GCI
READ_FLAG(symbol, "gci_no_rectangular_slice_constraint_flag" ); cinfo->setNoRectSliceConstraintFlag(symbol ? true : false);
READ_FLAG(symbol, "gci_one_slice_per_subpic_constraint_flag" ); cinfo->setOneSlicePerSubpicConstraintFlag(symbol ? true : false);
READ_FLAG(symbol, "gci_no_subpic_info_constraint_flag" ); cinfo->setNoSubpicInfoConstraintFlag(symbol ? true : false);
#else
READ_FLAG(symbol, "one_subpic_per_pic_constraint_flag" ); cinfo->setOneSubpicPerPicConstraintFlag(symbol ? true : false);
#endif
#if !JVET_S0050_GCI
if (cinfo->getOneSlicePerPicConstraintFlag())
{
......
......@@ -257,7 +257,14 @@ protected:
bool m_oneTilePerPicConstraintFlag;
bool m_picHeaderInSliceHeaderConstraintFlag;
bool m_oneSlicePerPicConstraintFlag;
#if JVET_S0113_S0195_GCI
bool m_noIdrRplConstraintFlag;
bool m_noRectSliceConstraintFlag;
bool m_oneSlicePerSubpicConstraintFlag;
bool m_noSubpicInfoConstraintFlag;
#else
bool m_oneSubpicPerPicConstraintFlag;
#endif
#if !JVET_S0138_GCI_PTL
bool m_frameOnlyConstraintFlag;
#endif
......@@ -1887,8 +1894,23 @@ public:
bool getOneSlicePerPicConstraintFlag() const { return m_oneSlicePerPicConstraintFlag; }
void setOneSlicePerPicConstraintFlag(bool b) { m_oneSlicePerPicConstraintFlag = b; }
#if JVET_S0113_S0195_GCI
bool getNoIdrRplConstraintFlag() const { return m_noIdrRplConstraintFlag; }
void setNoIdrRplConstraintFlag(bool b) { m_noIdrRplConstraintFlag = b; }
bool getNoRectSliceConstraintFlag() const { return m_noRectSliceConstraintFlag; }
void setNoRectSliceConstraintFlag(bool b) { m_noRectSliceConstraintFlag = b; }
bool getOneSlicePerSubpicConstraintFlag() const { return m_oneSlicePerSubpicConstraintFlag; }
void setOneSlicePerSubpicConstraintFlag(bool b) { m_oneSlicePerSubpicConstraintFlag = b; }
bool getNoSubpicInfoConstraintFlag() const { return m_noSubpicInfoConstraintFlag; }
void setNoSubpicInfoConstraintFlag(bool b) { m_noSubpicInfoConstraintFlag = b; }
#else
bool getOneSubpicPerPicConstraintFlag() const { return m_oneSubpicPerPicConstraintFlag; }
void setOneSubpicPerPicConstraintFlag(bool b) { m_oneSubpicPerPicConstraintFlag = b; }
#endif
#if !JVET_S0138_GCI_PTL
bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; }
void setFrameOnlyConstraintFlag(bool b) { m_frameOnlyConstraintFlag = b; }
......
......@@ -1127,7 +1127,14 @@ void EncLib::xInitSPS( SPS& sps )
cinfo->setOneTilePerPicConstraintFlag(m_oneTilePerPicConstraintFlag);
cinfo->setPicHeaderInSliceHeaderConstraintFlag(m_picHeaderInSliceHeaderConstraintFlag);
cinfo->setOneSlicePerPicConstraintFlag(m_oneSlicePerPicConstraintFlag);
#if JVET_S0113_S0195_GCI
cinfo->setNoIdrRplConstraintFlag(m_noIdrRplConstraintFlag);
cinfo->setNoRectSliceConstraintFlag(m_noRectSliceConstraintFlag);
cinfo->setOneSlicePerSubpicConstraintFlag(m_oneSlicePerSubpicConstraintFlag);
cinfo->setNoSubpicInfoConstraintFlag(m_noSubpicInfoConstraintFlag);
#else
cinfo->setOneSubpicPerPicConstraintFlag(m_oneSubpicPerPicConstraintFlag);
#endif
#if !JVET_S0138_GCI_PTL
cinfo->setFrameOnlyConstraintFlag (m_frameOnlyConstraintFlag);
#endif
......
......@@ -2691,10 +2691,19 @@ void HLSWriter::codeConstraintInfo ( const ConstraintInfo* cinfo )
#endif
WRITE_FLAG(cinfo->getAllLayersIndependentConstraintFlag(), "all_layers_independent_constraint_flag");
WRITE_FLAG(cinfo->getNoResChangeInClvsConstraintFlag(), "no_res_change_in_clvs_constraint_flag");
#if JVET_S0113_S0195_GCI
WRITE_FLAG(cinfo->getNoIdrRplConstraintFlag(), "gci_no_idr_rpl_constraint_flag");
#endif
WRITE_FLAG(cinfo->getOneTilePerPicConstraintFlag(), "one_tile_per_pic_constraint_flag");
WRITE_FLAG(cinfo->getPicHeaderInSliceHeaderConstraintFlag(), "pic_header_in_slice_header_constraint_flag");
WRITE_FLAG(cinfo->getOneSlicePerPicConstraintFlag(), "one_slice_per_pic_constraint_flag");
#if JVET_S0113_S0195_GCI
WRITE_FLAG(cinfo->getNoRectSliceConstraintFlag(), "gci_no_rectangular_slice_constraint_flag");
WRITE_FLAG(cinfo->getOneSlicePerSubpicConstraintFlag(), "gci_one_slice_per_subpic_constraint_flag");
WRITE_FLAG(cinfo->getNoSubpicInfoConstraintFlag(), "gci_no_subpic_info_constraint_flag");
#else
WRITE_FLAG(cinfo->getOneSubpicPerPicConstraintFlag(), "one_subpic_per_pic_constraint_flag");
#endif
WRITE_FLAG(cinfo->getNoQtbttDualTreeIntraConstraintFlag() ? 1 : 0, "no_qtbtt_dual_tree_intra_constraint_flag");
#if JVET_S0066_GCI
......
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