diff --git a/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp b/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp index 6a846f3a61bf80c624ea1f5f743785fb8174cc1c..74b5c6c705d3367d2c6c87e0f79b9daebcde382f 100644 --- a/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp +++ b/source/App/BitstreamExtractorApp/BitstreamExtractorApp.cpp @@ -179,7 +179,7 @@ void BitstreamExtractorApp::xRewriteSPS (SPS &targetSPS, const SPS &sourceSPS, S targetSPS.setNumSubPics(1); // set the target subpicture ID as first ID targetSPS.setSubPicIdMappingExplicitlySignalledFlag(true); - targetSPS.setSubPicIdMappingInSpsFlag(true); + targetSPS.setSubPicIdMappingPresentFlag(true); targetSPS.setSubPicId(0, subPic.getSubPicID()); targetSPS.setMaxPicWidthInLumaSamples(subPic.getSubPicWidthInLumaSample()); targetSPS.setMaxPicHeightInLumaSamples(subPic.getSubPicHeightInLumaSample()); @@ -305,7 +305,7 @@ void BitstreamExtractorApp::xRewritePPS (PPS &targetPPS, const PPS &sourcePPS, S { int targetNumSlices = subPic.getNumSlicesInSubPic(); targetPPS.setNumSlicesInPic(targetNumSlices); - // To avoid the bitstream writer writing tile_idx_delta in the bitstream + // To avoid the bitstream writer writing pps_tile_idx_delta in the bitstream if ( (targetPPS.getNumSlicesInPic() - 1) <= 1) { targetPPS.setTileIdxDeltaPresentFlag(0); diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 738a61202ed013a4b24c1eb62c5174e2f9db41b3..bf19a9bcb73a7c90d5973ef7c288b050c75248c0 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -88,9 +88,9 @@ void EncApp::xInitLibCfg() { vps.setVPSId(0); vps.setEachLayerIsAnOlsFlag(1); // If vps_max_layers_minus1 is equal to 0, - // the value of each_layer_is_an_ols_flag is inferred to be equal to 1. + // the value of vps_each_layer_is_an_ols_flag is inferred to be equal to 1. // Otherwise, when vps_all_independent_layers_flag is equal to 0, - // the value of each_layer_is_an_ols_flag is inferred to be equal to 0. + // the value of vps_each_layer_is_an_ols_flag is inferred to be equal to 0. } vps.setMaxSubLayers(m_maxSublayers); if (vps.getMaxLayers() > 1 && vps.getMaxSubLayers() > 1) @@ -153,7 +153,7 @@ void EncApp::xInitLibCfg() vps.setEachLayerIsAnOlsFlag(m_eachLayerIsAnOlsFlag); if (vps.getEachLayerIsAnOlsFlag() == 0) { - vps.setOlsModeIdc(2); // When vps_all_independent_layers_flag is equal to 1 and each_layer_is_an_ols_flag is equal to 0, the value of ols_mode_idc is inferred to be equal to 2 + vps.setOlsModeIdc(2); // When vps_all_independent_layers_flag is equal to 1 and vps_each_layer_is_an_ols_flag is equal to 0, the value of vps_ols_mode_idc is inferred to be equal to 2 } } if (!vps.getEachLayerIsAnOlsFlag()) diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index cbe8d5241ce23d0bf39fb2b9afa6297ceda68453..6d0c065830cbf2007a4c6fd614235f878713a2cc 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -823,7 +823,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("AllLayersIndependentConstraintFlag", m_allLayersIndependentConstraintFlag, false, "Indicate that all layers are independent") ("OnePictureOnlyConstraintFlag", m_onePictureOnlyConstraintFlag, false, "Value of general_intra_constraint_flag. Can only be used for single frame encodings. Will be set to true for still picture profiles") ("MaxBitDepthConstraintIdc", m_maxBitDepthConstraintIdc, 16u, "Indicate that sps_bitdepth_minus8 plus 8 shall be in the range of 0 to m_maxBitDepthConstraintIdc") - ("MaxChromaFormatConstraintIdc", m_maxChromaFormatConstraintIdc, 3, "Indicate that chroma_format_idc shall be in the range of 0 to m_maxChromaFormatConstraintIdc") + ("MaxChromaFormatConstraintIdc", m_maxChromaFormatConstraintIdc, 3, "Indicate that sps_chroma_format_idc shall be in the range of 0 to m_maxChromaFormatConstraintIdc") ("NoTrailConstraintFlag", m_noTrailConstraintFlag, false, "Indicate that TRAIL is deactivated") ("NoStsaConstraintFlag", m_noStsaConstraintFlag, false, "Indicate that STSA is deactivated") ("NoRaslConstraintFlag", m_noRaslConstraintFlag, false, "Indicate that RSAL is deactivated") @@ -1735,8 +1735,8 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) else { uint32_t numSubpicCols = tmpWidthVal / m_subPicWidth[0]; - CHECK(tmpWidthVal % m_subPicWidth[0] != 0, "subpic_width_minus1[0] is invalid."); - CHECK(tmpHeightVal % m_subPicHeight[0] != 0, "subpic_height_minus1[0] is invalid."); + CHECK(tmpWidthVal % m_subPicWidth[0] != 0, "sps_subpic_width_minus1[0] is invalid."); + CHECK(tmpHeightVal % m_subPicHeight[0] != 0, "sps_subpic_height_minus1[0] is invalid."); CHECK(numSubpicCols * (tmpHeightVal / m_subPicHeight[0]) != m_numSubPics, "when sps_subpic_same_size_flag is equal to, sps_num_subpics_minus1 is invalid"); } #else diff --git a/source/App/Parcat/parcat.cpp b/source/App/Parcat/parcat.cpp index ee918fb0e7d017da31ab6a912b43ae5a08a36c8a..b9305e8a1c4e9a3eae9707eae4a296ba1845392a 100644 --- a/source/App/Parcat/parcat.cpp +++ b/source/App/Parcat/parcat.cpp @@ -56,7 +56,7 @@ bool ParcatHLSyntaxReader::parsePictureHeaderInSliceHeaderFlag(ParameterSetManag uint32_t uiCode; - READ_FLAG(uiCode, "picture_header_in_slice_header_flag"); + READ_FLAG(uiCode, "sh_picture_header_in_slice_header_flag"); return (uiCode==1); } @@ -68,17 +68,17 @@ void ParcatHLSyntaxReader::parsePictureHeaderUpToPoc ( ParameterSetManager *para #if JVET_S0076_ASPECT1 uint32_t uiTmp; - READ_FLAG(uiTmp, "gdr_or_irap_pic_flag"); + READ_FLAG(uiTmp, "ph_gdr_or_irap_pic_flag"); READ_FLAG(uiCode, "ph_non_ref_pic_flag"); if( uiTmp ) { - READ_FLAG( uiCode, "gdr_pic_flag" ); + READ_FLAG( uiCode, "ph_gdr_pic_flag" ); } #else - READ_FLAG( uiCode, "gdr_or_irap_pic_flag" ); + READ_FLAG( uiCode, "ph_gdr_or_irap_pic_flag" ); if (uiCode) { - READ_FLAG(uiCode, "gdr_pic_flag"); + READ_FLAG(uiCode, "ph_gdr_pic_flag"); } #endif READ_FLAG(uiCode, "ph_inter_slice_allowed_flag"); diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index 47bf99841aa46c79eb56e241e80b0ce8699a8880..41d34cb78269ec71b602efdcbe69cd5ae2883190 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -526,7 +526,7 @@ void InterPrediction::xPredInterBi(PredictionUnit &pu, PelUnitBuf &pcYuvPred, co const WPScalingParam *wp1 = pu.cs->slice->getWpScaling(REF_PIC_LIST_1, refIdx1); bool bioApplied = false; - if (pu.cs->sps->getBDOFEnabledFlag() && (!pu.cs->picHeader->getDisBdofFlag())) + if (pu.cs->sps->getBDOFEnabledFlag() && (!pu.cs->picHeader->getBdofDisabledFlag())) { if (pu.cu->affine || m_subPuMC) { @@ -921,7 +921,7 @@ void InterPrediction::xPredAffineBlk(const ComponentID &compID, const Prediction const bool subblkMVSpreadOverLimit = isSubblockVectorSpreadOverLimit( iDMvHorX, iDMvHorY, iDMvVerX, iDMvVerY, pu.interDir ); bool enablePROF = (sps.getUsePROF()) && (!m_skipPROF) && (compID == COMPONENT_Y); - enablePROF &= (!pu.cs->picHeader->getDisProfFlag()); + enablePROF &= (!pu.cs->picHeader->getProfDisabledFlag()); enablePROF &= !((pu.cu->affineType == AFFINEMODEL_6PARAM && _mv[0] == _mv[1] && _mv[0] == _mv[2]) || (pu.cu->affineType == AFFINEMODEL_4PARAM && _mv[0] == _mv[1])); enablePROF &= !subblkMVSpreadOverLimit; const int profThres = 1 << (iBit + (m_isBi ? 1 : 0)); @@ -1525,7 +1525,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu bool bioApplied = false; const Slice &slice = *pu.cs->slice; - if (pu.cs->sps->getBDOFEnabledFlag() && (!pu.cs->picHeader->getDisBdofFlag())) + if (pu.cs->sps->getBDOFEnabledFlag() && (!pu.cs->picHeader->getBdofDisabledFlag())) { if (pu.cu->affine || m_subPuMC) { diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index bfe9266fb14e6615486c37992ac88828eab0d711..fccba70da5b1646bcda5bb7df7d23c380be640ee 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -572,7 +572,7 @@ void Slice::checkColRefIdx(uint32_t curSliceSegmentIdx, const Picture* pic) const int preColRefPOC = preSlice->getRefPOC( RefPicList(1 - preSlice->getColFromL0Flag()), preSlice->getColRefIdx()); if(currColRefPOC != preColRefPOC) { - THROW("Collocated_ref_idx shall always be the same for all slices of a coded picture!"); + THROW("sh_collocated_ref_idx shall always be the same for all slices of a coded picture!"); } else { @@ -1230,7 +1230,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps) // When a picture is a leading picture, it shall be a RADL or RASL picture. if(this->getAssociatedIRAPPOC() > this->getPOC()) { - //check this only when mixed_nalu_types_in_pic_flag is equal to 0 + //check this only when pps_mixed_nalu_types_in_pic_flag is equal to 0 if (pps.getMixedNaluTypesInPicFlag() == 0) { // Do not check IRAP pictures since they may get a POC lower than their associated IRAP @@ -1332,7 +1332,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic, const PPS& pps) { limitNonLP = 1; } - CHECK(pcPic->poc > this->getAssociatedIRAPPOC() && numNonLPFound > limitNonLP, "If field_seq_flag is equal to 0 and the current picture, with nuh_layer_id " + CHECK(pcPic->poc > this->getAssociatedIRAPPOC() && numNonLPFound > limitNonLP, "If sps_field_seq_flag is equal to 0 and the current picture, with nuh_layer_id " "equal to a particular value layerId, is a leading picture associated with an IRAP picture, it shall precede, in decoding order, all non-leading " "pictures that are associated with the same IRAP picture.Otherwise, let picA and picB be the first and the last leading pictures, in decoding order, " "associated with an IRAP picture, respectively, there shall be at most one non-leading picture with nuh_layer_id equal to layerId preceding picA in " @@ -1378,7 +1378,7 @@ void Slice::checkSubpicTypeConstraints(PicList& rcListPic, const ReferencePictur if (getPPS()->getMixedNaluTypesInPicFlag() && getSliceType() != I_SLICE) { - CHECK(!getSPS()->getSubPicTreatedAsPicFlag(curSubpicIdx), "When pps_mixed_nalu_types_in_pic_flag is equal 1, the value of subpic_treated_as_pic_flag shall be equal to 1 " + CHECK(!getSPS()->getSubPicTreatedAsPicFlag(curSubpicIdx), "When pps_mixed_nalu_types_in_pic_flag is equal 1, the value of sps_subpic_treated_as_pic_flag shall be equal to 1 " "for all the subpictures that are in the picture and contain at least one P or B slice"); } @@ -1496,7 +1496,7 @@ void Slice::checkSubpicTypeConstraints(PicList& rcListPic, const ReferencePictur { numNonLeadingPic++; int th = bufPic->cs->sps->getFieldSeqFlag() ? 1 : 0; - CHECK(bufPic->poc > prevIRAPSubpicPOC && numNonLeadingPic > th, "If field_seq_flag is equal to 0 and the current subpicture, with nuh_layer_id equal to a particular value " + CHECK(bufPic->poc > prevIRAPSubpicPOC && numNonLeadingPic > th, "If sps_field_seq_flag is equal to 0 and the current subpicture, with nuh_layer_id equal to a particular value " "layerId and subpicture index equal to a particular value subpicIdx, is a leading subpicture associated with an IRAP subpicture, it shall precede, in decoding order, " "all non-leading subpictures that are associated with the same IRAP subpicture. Otherwise, let subpicA and subpicB be the first and the last leading subpictures, in " "decoding order, associated with an IRAP subpicture, respectively, there shall be at most one non-leading subpicture with nuh_layer_id equal to layerId and subpicture " @@ -2439,7 +2439,7 @@ VPS::VPS() , m_vpsExtensionFlag(false) , m_vpsGeneralHrdParamsPresentFlag(false) , m_vpsSublayerCpbParamsPresentFlag(false) - , m_numOlsHrdParamsMinus1(0) + , m_numOlsTimingHrdParamsMinus1(0) , m_totalNumOLSs( 1 ) , m_numMultiLayeredOlss( 0 ) , m_numDpbParams( 0 ) @@ -2480,7 +2480,7 @@ VPS::VPS() m_ptlMaxTemporalId[i] = m_vpsMaxSubLayers - 1; m_olsPtlIdx[i] = 0; m_hrdMaxTid[i] = m_vpsMaxSubLayers - 1; - m_olsHrdIdx[i] = 0; + m_olsTimingHrdIdx[i] = 0; } } @@ -2684,9 +2684,9 @@ void VPS::checkVPS() for (int multiLayerOlsIdx=0; multiLayerOlsIdx < m_numMultiLayeredOlss; multiLayerOlsIdx++) { const int olsIdx = m_multiLayerOlsIdxToOlsIdx[multiLayerOlsIdx]; - const int olsHrdIdx = getOlsHrdIdx(multiLayerOlsIdx); + const int olsTimingHrdIdx = getOlsTimingHrdIdx(multiLayerOlsIdx); const int olsPtlIdx = getOlsPtlIdx(olsIdx); - CHECK (getHrdMaxTid(olsHrdIdx) < getPtlMaxTemporalId(olsPtlIdx), "The value of vps_hrd_max_tid[vps_ols_timing_hrd_idx[m]] shall be greater than or equal to " + CHECK (getHrdMaxTid(olsTimingHrdIdx) < getPtlMaxTemporalId(olsPtlIdx), "The value of vps_hrd_max_tid[vps_ols_timing_hrd_idx[m]] shall be greater than or equal to " "vps_ptl_max_tid[ vps_ols_ptl_idx[n]] for each m-th multi-layer OLS for m from 0 to " "NumMultiLayerOlss - 1, inclusive, and n being the OLS index of the m-th multi-layer OLS among all OLSs."); const int olsDpbParamsIdx = getOlsDpbParamsIdx(multiLayerOlsIdx); @@ -2753,9 +2753,9 @@ PicHeader::PicHeader() , m_mvdL1ZeroFlag ( 0 ) , m_maxNumAffineMergeCand ( AFFINE_MRG_MAX_NUM_CANDS ) , m_disFracMMVD ( 0 ) -, m_disBdofFlag ( 0 ) -, m_disDmvrFlag ( 0 ) -, m_disProfFlag ( 0 ) +, m_bdofDisabledFlag ( 0 ) +, m_dmvrDisabledFlag ( 0 ) +, m_profDisabledFlag ( 0 ) , m_jointCbCrSignFlag ( 0 ) , m_qpDelta ( 0 ) , m_numAlfAps ( 0 ) @@ -2845,9 +2845,9 @@ void PicHeader::initPicHeader() m_mvdL1ZeroFlag = 0; m_maxNumAffineMergeCand = AFFINE_MRG_MAX_NUM_CANDS; m_disFracMMVD = 0; - m_disBdofFlag = 0; - m_disDmvrFlag = 0; - m_disProfFlag = 0; + m_bdofDisabledFlag = 0; + m_dmvrDisabledFlag = 0; + m_profDisabledFlag = 0; m_jointCbCrSignFlag = 0; m_qpDelta = 0; m_numAlfAps = 0; @@ -2976,7 +2976,7 @@ SPS::SPS() , m_subPicSameSizeFlag (false) #endif , m_subPicIdMappingExplicitlySignalledFlag ( false ) -, m_subPicIdMappingInSpsFlag ( false ) +, m_subPicIdMappingPresentFlag ( false ) , m_subPicIdLen(16) , m_log2MinCodingBlockSize ( 2) , m_CTUSize(0) @@ -3007,10 +3007,10 @@ SPS::SPS() , m_DmvrControlPresentFlag ( false ) , m_ProfControlPresentFlag ( false ) , m_uiBitsForPOC ( 8) -, m_pocMsbFlag ( false ) -, m_pocMsbLen ( 1 ) -, m_numExtraPHBitsBytes ( 0 ) -, m_numExtraSHBitsBytes ( 0 ) +, m_pocMsbCycleFlag ( false ) +, m_pocMsbCycleLen ( 1 ) +, m_numExtraPHBytes ( 0 ) +, m_numExtraSHBytes ( 0 ) , m_numLongTermRefPicSPS ( 0) , m_log2MaxTbSize ( 6) diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 16c03877f3e9cdfeec1fae0cdc24827e138c995a..1c973d2eefed313fa41bafd5ca06c3334d85a043 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -1078,9 +1078,9 @@ private: bool m_vpsExtensionFlag; bool m_vpsGeneralHrdParamsPresentFlag; bool m_vpsSublayerCpbParamsPresentFlag; - uint32_t m_numOlsHrdParamsMinus1; + uint32_t m_numOlsTimingHrdParamsMinus1; uint32_t m_hrdMaxTid[MAX_NUM_OLSS]; - uint32_t m_olsHrdIdx[MAX_NUM_OLSS]; + uint32_t m_olsTimingHrdIdx[MAX_NUM_OLSS]; GeneralHrdParams m_generalHrdParams; std::vector<Size> m_olsDpbPicSize; std::vector<int> m_olsDpbParamsIdx; @@ -1185,13 +1185,12 @@ public: void setVPSGeneralHrdParamsPresentFlag(bool t) { m_vpsGeneralHrdParamsPresentFlag = t; } bool getVPSSublayerCpbParamsPresentFlag() const { return m_vpsSublayerCpbParamsPresentFlag; } void setVPSSublayerCpbParamsPresentFlag(bool t) { m_vpsSublayerCpbParamsPresentFlag = t; } - uint32_t getNumOlsHrdParamsMinus1() const { return m_numOlsHrdParamsMinus1; } - void setNumOlsHrdParamsMinus1(uint32_t val) { m_numOlsHrdParamsMinus1 = val; } - + uint32_t getNumOlsTimingHrdParamsMinus1() const { return m_numOlsTimingHrdParamsMinus1; } + void setNumOlsTimingHrdParamsMinus1(uint32_t val) { m_numOlsTimingHrdParamsMinus1 = val; } uint32_t getHrdMaxTid(int olsIdx) const { return m_hrdMaxTid[olsIdx]; } void setHrdMaxTid(int olsIdx, uint32_t val) { m_hrdMaxTid[olsIdx] = val; } - uint32_t getOlsHrdIdx(int olsIdx) const { return m_olsHrdIdx[olsIdx]; } - void setOlsHrdIdx(int olsIdx, uint32_t val) { m_olsHrdIdx[olsIdx] = val; } + uint32_t getOlsTimingHrdIdx(int olsIdx) const { return m_olsTimingHrdIdx[olsIdx]; } + void setOlsTimingHrdIdx(int olsIdx, uint32_t val) { m_olsTimingHrdIdx[olsIdx] = val; } OlsHrdParams* getOlsHrdParameters(int olsIdx) { return &m_olsHrdParams[olsIdx][0]; } const OlsHrdParams* getOlsHrdParameters(int olsIdx) const { return &m_olsHrdParams[olsIdx][0]; } @@ -1516,7 +1515,7 @@ private: std::vector<bool> m_subPicTreatedAsPicFlag; std::vector<bool> m_loopFilterAcrossSubpicEnabledFlag; bool m_subPicIdMappingExplicitlySignalledFlag; - bool m_subPicIdMappingInSpsFlag; + bool m_subPicIdMappingPresentFlag; uint32_t m_subPicIdLen; //!< sub-picture ID length in bits std::vector<uint16_t> m_subPicId; //!< sub-picture ID for each sub-picture in the sequence @@ -1564,10 +1563,11 @@ private: bool m_DmvrControlPresentFlag; bool m_ProfControlPresentFlag; uint32_t m_uiBitsForPOC; - bool m_pocMsbFlag; - uint32_t m_pocMsbLen; - int m_numExtraPHBitsBytes; - int m_numExtraSHBitsBytes; + bool m_pocMsbCycleFlag; + uint32_t m_pocMsbCycleLen; + int m_numExtraPHBytes; + int m_numExtraSHBytes; + std::vector<bool> m_extraPHBitPresentFlag; std::vector<bool> m_extraSHBitPresentFlag; uint32_t m_numLongTermRefPicSPS; @@ -1737,8 +1737,8 @@ public: void setSubPicIdMappingExplicitlySignalledFlag( bool b ) { m_subPicIdMappingExplicitlySignalledFlag = b; } bool getSubPicIdMappingExplicitlySignalledFlag() const { return m_subPicIdMappingExplicitlySignalledFlag; } - void setSubPicIdMappingInSpsFlag( bool b ) { m_subPicIdMappingInSpsFlag = b; } - bool getSubPicIdMappingInSpsFlag() const { return m_subPicIdMappingInSpsFlag; } + void setSubPicIdMappingPresentFlag( bool b ) { m_subPicIdMappingPresentFlag = b; } + bool getSubPicIdMappingPresentFlag() const { return m_subPicIdMappingPresentFlag; } void setSubPicIdLen( uint32_t u ) { m_subPicIdLen = u; } uint32_t getSubPicIdLen() const { return m_subPicIdLen; } void setSubPicId( int i, uint16_t u ) { m_subPicId[i] = u; } @@ -1807,14 +1807,14 @@ public: void setBDPCMEnabledFlag( bool b ) { m_BDPCMEnabledFlag = b; } void setBitsForPOC( uint32_t u ) { m_uiBitsForPOC = u; } uint32_t getBitsForPOC() const { return m_uiBitsForPOC; } - void setPocMsbFlag(bool b) { m_pocMsbFlag = b; } - bool getPocMsbFlag() const { return m_pocMsbFlag; } - void setPocMsbLen(uint32_t u) { m_pocMsbLen = u; } - uint32_t getPocMsbLen() const { return m_pocMsbLen; } - void setNumExtraPHBitsBytes(int i) { m_numExtraPHBitsBytes = i; } - int getNumExtraPHBitsBytes() const { return m_numExtraPHBitsBytes; } - void setNumExtraSHBitsBytes(int i) { m_numExtraSHBitsBytes = i; } - int getNumExtraSHBitsBytes() const { return m_numExtraSHBitsBytes; } + void setPocMsbCycleFlag(bool b) { m_pocMsbCycleFlag = b; } + bool getPocMsbCycleFlag() const { return m_pocMsbCycleFlag; } + void setPocMsbCycleLen(uint32_t u) { m_pocMsbCycleLen = u; } + uint32_t getPocMsbCycleLen() const { return m_pocMsbCycleLen; } + void setNumExtraPHBytes(int i) { m_numExtraPHBytes = i; } + int getNumExtraPHBytes() const { return m_numExtraPHBytes; } + void setNumExtraSHBytes(int i) { m_numExtraSHBytes = i; } + int getNumExtraSHBytes() const { return m_numExtraSHBytes; } void setExtraPHBitPresentFlags(const std::vector<bool> &b) { m_extraPHBitPresentFlag = b; } const std::vector<bool> getExtraPHBitPresentFlags() const { return m_extraPHBitPresentFlag; } void setExtraSHBitPresentFlags(const std::vector<bool> &b) { m_extraSHBitPresentFlag = b; } @@ -2522,9 +2522,9 @@ private: bool m_mvdL1ZeroFlag; //!< L1 MVD set to zero flag uint32_t m_maxNumAffineMergeCand; //!< max number of sub-block merge candidates bool m_disFracMMVD; //!< fractional MMVD offsets disabled flag - bool m_disBdofFlag; //!< picture level BDOF disable flag - bool m_disDmvrFlag; //!< picture level DMVR disable flag - bool m_disProfFlag; //!< picture level PROF disable flag + bool m_bdofDisabledFlag; //!< picture level BDOF disable flag + bool m_dmvrDisabledFlag; //!< picture level DMVR disable flag + bool m_profDisabledFlag; //!< picture level PROF disable flag bool m_jointCbCrSignFlag; //!< joint Cb/Cr residual sign flag int m_qpDelta; //!< value of Qp delta bool m_saoEnabledFlag[MAX_NUM_CHANNEL_TYPE]; //!< sao enabled flags for each channel @@ -2643,12 +2643,12 @@ public: uint32_t getMaxNumAffineMergeCand() const { return m_maxNumAffineMergeCand; } void setDisFracMMVD( bool val ) { m_disFracMMVD = val; } bool getDisFracMMVD() const { return m_disFracMMVD; } - void setDisBdofFlag( bool val ) { m_disBdofFlag = val; } - bool getDisBdofFlag() const { return m_disBdofFlag; } - void setDisDmvrFlag( bool val ) { m_disDmvrFlag = val; } - bool getDisDmvrFlag() const { return m_disDmvrFlag; } - void setDisProfFlag( bool val ) { m_disProfFlag = val; } - bool getDisProfFlag() const { return m_disProfFlag; } + void setBdofDisabledFlag( bool val ) { m_bdofDisabledFlag = val; } + bool getBdofDisabledFlag() const { return m_bdofDisabledFlag; } + void setDmvrDisabledFlag( bool val ) { m_dmvrDisabledFlag = val; } + bool getDmvrDisabledFlag() const { return m_dmvrDisabledFlag; } + void setProfDisabledFlag( bool val ) { m_profDisabledFlag = val; } + bool getProfDisabledFlag() const { return m_profDisabledFlag; } void setJointCbCrSignFlag( bool b ) { m_jointCbCrSignFlag = b; } bool getJointCbCrSignFlag() const { return m_jointCbCrSignFlag; } void setQpDelta(int b) { m_qpDelta = b; } diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp index 8a1e66df469d77abdb27bdd8952bbda2f4858f57..445ee90b2cb8455e28209a3e56186525e4ac0d06 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -112,10 +112,10 @@ bool CU::getRprScaling( const SPS* sps, const PPS* curPPS, Picture* refPic, int& xScale = ( ( refPicWidth << SCALE_RATIO_BITS ) + ( curPicWidth >> 1 ) ) / curPicWidth; yScale = ( ( refPicHeight << SCALE_RATIO_BITS ) + ( curPicHeight >> 1 ) ) / curPicHeight; - int curSeqMaxPicWidthY = sps->getMaxPicWidthInLumaSamples(); // pic_width_max_in_luma_samples - int curSeqMaxPicHeightY = sps->getMaxPicHeightInLumaSamples(); // pic_height_max_in_luma_samples - int curPicWidthY = curPPS->getPicWidthInLumaSamples(); // pic_width_in_luma_samples - int curPicHeightY = curPPS->getPicHeightInLumaSamples(); // pic_height_in_luma_samples + int curSeqMaxPicWidthY = sps->getMaxPicWidthInLumaSamples(); // sps_pic_width_max_in_luma_samples + int curSeqMaxPicHeightY = sps->getMaxPicHeightInLumaSamples(); // sps_pic_height_max_in_luma_samples + int curPicWidthY = curPPS->getPicWidthInLumaSamples(); // pps_pic_width_in_luma_samples + int curPicHeightY = curPPS->getPicHeightInLumaSamples(); // pps_pic_height_in_luma_samples int max8MinCbSizeY = std::max((int)8, (1<<sps->getLog2MinCodingBlockSize())); // Max(8, MinCbSizeY) CHECK((curPicWidth * curSeqMaxPicWidthY) < refPicWidth * (curPicWidthY - max8MinCbSizeY), "(curPicWidth * curSeqMaxPicWidthY) should be greater than or equal to refPicWidth * (curPicWidthY - max8MinCbSizeY))"); @@ -131,9 +131,9 @@ bool CU::getRprScaling( const SPS* sps, const PPS* curPPS, Picture* refPic, int& int subHeightC = SPS::getWinUnitY(sps->getChromaFormatIdc()); CHECK(subWidthC * curScalingWindow.getWindowLeftOffset() < (-curPicWidthY) * 15, "The value of SubWidthC * pps_scaling_win_left_offset shall be greater than or equal to -pps_pic_width_in_luma_samples * 15"); - CHECK(subWidthC * curScalingWindow.getWindowLeftOffset() >= curPicWidthY, "The value of SubWidthC * pps_scaling_win_left_offset shall be less than pic_width_in_luma_samples"); + CHECK(subWidthC * curScalingWindow.getWindowLeftOffset() >= curPicWidthY, "The value of SubWidthC * pps_scaling_win_left_offset shall be less than pps_pic_width_in_luma_samples"); CHECK(subWidthC * curScalingWindow.getWindowRightOffset() < (-curPicWidthY) * 15, "The value of SubWidthC * pps_scaling_win_right_offset shall be greater than or equal to -pps_pic_width_in_luma_samples * 15"); - CHECK(subWidthC * curScalingWindow.getWindowRightOffset() >= curPicWidthY, "The value of SubWidthC * pps_scaling_win_right_offset shall be less than pic_width_in_luma_samples"); + CHECK(subWidthC * curScalingWindow.getWindowRightOffset() >= curPicWidthY, "The value of SubWidthC * pps_scaling_win_right_offset shall be less than pps_pic_width_in_luma_samples"); CHECK(subHeightC * curScalingWindow.getWindowTopOffset() < (-curPicHeightY) * 15, "The value of SubHeightC * pps_scaling_win_top_offset shall be greater than or equal to -pps_pic_height_in_luma_samples * 15"); CHECK(subHeightC * curScalingWindow.getWindowTopOffset() >= curPicHeightY, "The value of SubHeightC * pps_scaling_win_top_offset shall be less than pps_pic_height_in_luma_samples"); @@ -141,12 +141,12 @@ bool CU::getRprScaling( const SPS* sps, const PPS* curPPS, Picture* refPic, int& CHECK(subHeightC * curScalingWindow.getWindowBottomOffset() >= curPicHeightY, "The value of SubHeightC *pps_scaling_win_bottom_offset shall be less than pps_pic_height_in_luma_samples"); CHECK(subWidthC * (curScalingWindow.getWindowLeftOffset() + curScalingWindow.getWindowRightOffset()) < (-curPicWidthY) * 15, "The value of SubWidthC * ( pps_scaling_win_left_offset + pps_scaling_win_right_offset ) shall be greater than or equal to -pps_pic_width_in_luma_samples * 15"); - CHECK(subWidthC * (curScalingWindow.getWindowLeftOffset() + curScalingWindow.getWindowRightOffset()) >= curPicWidthY, "The value of SubWidthC * ( pps_scaling_win_left_offset + pps_scaling_win_right_offset ) shall be less than pic_width_in_luma_samples"); + CHECK(subWidthC * (curScalingWindow.getWindowLeftOffset() + curScalingWindow.getWindowRightOffset()) >= curPicWidthY, "The value of SubWidthC * ( pps_scaling_win_left_offset + pps_scaling_win_right_offset ) shall be less than pps_pic_width_in_luma_samples"); CHECK(subHeightC * (curScalingWindow.getWindowTopOffset() + curScalingWindow.getWindowBottomOffset()) < (-curPicHeightY) * 15, "The value of SubHeightC * ( pps_scaling_win_top_offset + pps_scaling_win_bottom_offset ) shall be greater than or equal to -pps_pic_height_in_luma_samples * 15"); - CHECK(subHeightC * (curScalingWindow.getWindowTopOffset() + curScalingWindow.getWindowBottomOffset()) >= curPicHeightY, "The value of SubHeightC * ( pps_scaling_win_top_offset + pps_scaling_win_bottom_offset ) shall be less than pic_height_in_luma_samples"); + CHECK(subHeightC * (curScalingWindow.getWindowTopOffset() + curScalingWindow.getWindowBottomOffset()) >= curPicHeightY, "The value of SubHeightC * ( pps_scaling_win_top_offset + pps_scaling_win_bottom_offset ) shall be less than pps_pic_height_in_luma_samples"); #else - CHECK(SPS::getWinUnitX(sps->getChromaFormatIdc()) * (abs(curScalingWindow.getWindowLeftOffset()) + abs(curScalingWindow.getWindowRightOffset())) > curPPS->getPicWidthInLumaSamples(), "The value of SubWidthC * ( Abs(pps_scaling_win_left_offset) + Abs(pps_scaling_win_right_offset) ) shall be less than pic_width_in_luma_samples"); - CHECK(SPS::getWinUnitY(sps->getChromaFormatIdc()) * (abs(curScalingWindow.getWindowTopOffset()) + abs(curScalingWindow.getWindowBottomOffset())) > curPPS->getPicHeightInLumaSamples(), "The value of SubHeightC * ( Abs(pps_scaling_win_top_offset) + Abs(pps_scaling_win_bottom_offset) ) shall be less than pic_height_in_luma_samples"); + CHECK(SPS::getWinUnitX(sps->getChromaFormatIdc()) * (abs(curScalingWindow.getWindowLeftOffset()) + abs(curScalingWindow.getWindowRightOffset())) > curPPS->getPicWidthInLumaSamples(), "The value of SubWidthC * ( Abs(pps_scaling_win_left_offset) + Abs(pps_scaling_win_right_offset) ) shall be less than pps_pic_width_in_luma_samples"); + CHECK(SPS::getWinUnitY(sps->getChromaFormatIdc()) * (abs(curScalingWindow.getWindowTopOffset()) + abs(curScalingWindow.getWindowBottomOffset())) > curPPS->getPicHeightInLumaSamples(), "The value of SubHeightC * ( Abs(pps_scaling_win_top_offset) + Abs(pps_scaling_win_bottom_offset) ) shall be less than pps_pic_height_in_luma_samples"); #endif return refPic->isRefScaled( curPPS ); @@ -1400,7 +1400,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, bool PU::checkDMVRCondition(const PredictionUnit& pu) { - if (pu.cs->sps->getUseDMVR() && !pu.cs->picHeader->getDisDmvrFlag()) + if (pu.cs->sps->getUseDMVR() && !pu.cs->picHeader->getDmvrDisabledFlag()) { const int refIdx0 = pu.refIdx[REF_PIC_LIST_0]; const int refIdx1 = pu.refIdx[REF_PIC_LIST_1]; diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 220e2a57aa4d8a3d3d9f88fb442e96865cd4a3b9..7b49ca3836798b2345576c24c6a8393d8c299a91 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -1788,7 +1788,7 @@ void DecLib::xCheckParameterSetConstraints(const int layerId) CHECK( m_clvssSPSid[layerId] != pps->getSPSId(), "The value of pps_seq_parameter_set_id shall be the same in all PPSs that are referred to by coded pictures in a CLVS" ); - CHECK(sps->getGDREnabledFlag() == false && m_picHeader.getGdrPicFlag(), "When gdr_enabled_flag is equal to 0, the value of gdr_pic_flag shall be equal to 0 "); + CHECK(sps->getGDREnabledFlag() == false && m_picHeader.getGdrPicFlag(), "When sps_gdr_enabled_flag is equal to 0, the value of ph_gdr_pic_flag shall be equal to 0 "); if( !sps->getUseWP() ) { CHECK( pps->getUseWP(), "When sps_weighted_pred_flag is equal to 0, the value of pps_weighted_pred_flag shall be equal to 0." ); @@ -1804,27 +1804,27 @@ void DecLib::xCheckParameterSetConstraints(const int layerId) CHECK( ( pps->getPicHeightInLumaSamples() % ( std::max( 8, minCuSize) ) ) != 0, "Coded frame height must be a multiple of Max(8, the minimum unit size)" ); if (!sps->getResChangeInClvsEnabledFlag()) { - CHECK(pps->getPicWidthInLumaSamples() != sps->getMaxPicWidthInLumaSamples(), "When res_change_in_clvs_allowed_flag equal to 0, the value of pic_width_in_luma_samples shall be equal to pic_width_max_in_luma_samples."); - CHECK(pps->getPicHeightInLumaSamples() != sps->getMaxPicHeightInLumaSamples(), "When res_change_in_clvs_allowed_flag equal to 0, the value of pic_height_in_luma_samples shall be equal to pic_height_max_in_luma_samples."); + CHECK(pps->getPicWidthInLumaSamples() != sps->getMaxPicWidthInLumaSamples(), "When sps_res_change_in_clvs_allowed_flag equal to 0, the value of pps_pic_width_in_luma_samples shall be equal to sps_pic_width_max_in_luma_samples."); + CHECK(pps->getPicHeightInLumaSamples() != sps->getMaxPicHeightInLumaSamples(), "When sps_res_change_in_clvs_allowed_flag equal to 0, the value of pps_pic_height_in_luma_samples shall be equal to sps_pic_height_max_in_luma_samples."); } if (sps->getResChangeInClvsEnabledFlag()) { - CHECK(sps->getSubPicInfoPresentFlag() != 0, "When res_change_in_clvs_allowed_flag is equal to 1, the value of subpic_info_present_flag shall be equal to 0."); + CHECK(sps->getSubPicInfoPresentFlag() != 0, "When sps_res_change_in_clvs_allowed_flag is equal to 1, the value of sps_subpic_info_present_flag shall be equal to 0."); } - CHECK(sps->getResChangeInClvsEnabledFlag() && sps->getVirtualBoundariesEnabledFlag(), "when the value of res_change_in_clvs_allowed_flag is equal to 1, the value of sps_virtual_boundaries_present_flag shall be equal to 0"); + CHECK(sps->getResChangeInClvsEnabledFlag() && sps->getVirtualBoundariesEnabledFlag(), "when the value of sps_res_change_in_clvs_allowed_flag is equal to 1, the value of sps_virtual_boundaries_present_flag shall be equal to 0"); if( sps->getCTUSize() + 2 * ( 1 << sps->getLog2MinCodingBlockSize() ) > pps->getPicWidthInLumaSamples() ) { - CHECK( pps->getWrapAroundEnabledFlag(), "Wraparound shall be disabled when the value of ( CtbSizeY / MinCbSizeY + 1) is greater than or equal to ( pic_width_in_luma_samples / MinCbSizeY - 1 )" ); + CHECK( pps->getWrapAroundEnabledFlag(), "Wraparound shall be disabled when the value of ( CtbSizeY / MinCbSizeY + 1) is greater than or equal to ( pps_pic_width_in_luma_samples / MinCbSizeY - 1 )" ); } if( vps != nullptr && vps->m_numOutputLayersInOls[vps->m_targetOlsIdx] > 1 ) { - CHECK( sps->getMaxPicWidthInLumaSamples() > vps->getOlsDpbPicSize( vps->m_targetOlsIdx ).width, "pic_width_max_in_luma_samples shall be less than or equal to the value of ols_dpb_pic_width[ i ]" ); - CHECK( sps->getMaxPicHeightInLumaSamples() > vps->getOlsDpbPicSize( vps->m_targetOlsIdx ).height, "pic_height_max_in_luma_samples shall be less than or equal to the value of ols_dpb_pic_height[ i ]" ); - CHECK( sps->getChromaFormatIdc() > vps->getOlsDpbChromaFormatIdc( vps->m_targetOlsIdx ), "sps_chroma_format_idc shall be less than or equal to the value of ols_dpb_chroma_format[ i ]"); + CHECK( sps->getMaxPicWidthInLumaSamples() > vps->getOlsDpbPicSize( vps->m_targetOlsIdx ).width, "sps_pic_width_max_in_luma_samples shall be less than or equal to the value of vps_ols_dpb_pic_width[ i ]" ); + CHECK( sps->getMaxPicHeightInLumaSamples() > vps->getOlsDpbPicSize( vps->m_targetOlsIdx ).height, "sps_pic_height_max_in_luma_samples shall be less than or equal to the value of vps_ols_dpb_pic_height[ i ]" ); + CHECK( sps->getChromaFormatIdc() > vps->getOlsDpbChromaFormatIdc( vps->m_targetOlsIdx ), "sps_chroma_format_idc shall be less than or equal to the value of vps_ols_dpb_chroma_format[ i ]"); CHECK((sps->getBitDepth(CHANNEL_TYPE_LUMA) - 8) > vps->getOlsDpbBitDepthMinus8(vps->m_targetOlsIdx), - "sps_bitdepth_minus8 shall be less than or equal to the value of ols_dpb_bitdepth_minus8[ i ]"); + "sps_bitdepth_minus8 shall be less than or equal to the value of vps_ols_dpb_bitdepth_minus8[ i ]"); } static std::unordered_map<int, int> m_layerChromaFormat; @@ -1867,7 +1867,7 @@ void DecLib::xCheckParameterSetConstraints(const int layerId) if (sps->getProfileTierLevel()->getConstraintInfo()->getOneSlicePerPicConstraintFlag()) { #if JVET_S0050_GCI - CHECK( pps->getRectSliceFlag() && pps->getNumSlicesInPic() != 1, "When one_slice_per_pic_constraint_flag is equal to 1 and if pps_rect_slice_flag is equal to 1, the value of num_slices_in_pic_minus1 shall be equal to 0"); + CHECK( pps->getRectSliceFlag() && pps->getNumSlicesInPic() != 1, "When one_slice_per_pic_constraint_flag is equal to 1 and if pps_rect_slice_flag is equal to 1, the value of pps_num_slices_in_pic_minus1 shall be equal to 0"); #else CHECK( pps->getNumSlicesInPic() != 1, "When one_slice_per_pic_constraint_flag is equal to 1, each picture shall contain only one slice"); #endif @@ -1972,7 +1972,7 @@ void DecLib::xCheckParameterSetConstraints(const int layerId) if( slice->getPicHeader()->getGdrOrIrapPicFlag() && !slice->getPicHeader()->getGdrPicFlag() && ( !vps || vps->getIndependentLayerFlag( vps->getGeneralLayerIdx( layerId ) ) ) ) { CHECK( slice->getPicHeader()->getPicInterSliceAllowedFlag(), - "When gdr_or_irap_pic_flag is equal to 1 and gdr_pic_flag is equal to 0 and vps_independent_layer_flag[ GeneralLayerIdx[ nuh_layer_id ] ] is equal to 1, ph_inter_slice_allowed_flag shall be equal to 0" ); + "When ph_gdr_or_irap_pic_flag is equal to 1 and ph_gdr_pic_flag is equal to 0 and vps_independent_layer_flag[ GeneralLayerIdx[ nuh_layer_id ] ] is equal to 1, ph_inter_slice_allowed_flag shall be equal to 0" ); } if( sps->getVPSId() && vps->m_numLayersInOls[vps->m_targetOlsIdx] == 1 ) @@ -3231,7 +3231,7 @@ void DecLib::xCheckMixedNalUnit(Slice* pcSlice, SPS *sps, InputNALUnit &nalu) if (PreSlice->getNalUnitType() != pcSlice->getNalUnitType()) sameNalUnitType = false; } - CHECK(!sameNalUnitType, "mixed_nalu_types_in_pic_flag is zero, but have different nal unit types"); + CHECK(!sameNalUnitType, "pps_mixed_nalu_types_in_pic_flag is zero, but have different nal unit types"); } } /** diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 6dc6af54724608d3011ebfa43962603e7f178810..c16f82047372eefdb745b48779e67f7063676c7e 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -435,11 +435,11 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) READ_CODE(4, uiCode, "pps_seq_parameter_set_id"); pcPPS->setSPSId (uiCode); - READ_FLAG( uiCode, "mixed_nalu_types_in_pic_flag" ); pcPPS->setMixedNaluTypesInPicFlag( uiCode == 1 ); + READ_FLAG( uiCode, "pps_mixed_nalu_types_in_pic_flag" ); pcPPS->setMixedNaluTypesInPicFlag( uiCode == 1 ); - READ_UVLC( uiCode, "pic_width_in_luma_samples" ); pcPPS->setPicWidthInLumaSamples( uiCode ); - READ_UVLC( uiCode, "pic_height_in_luma_samples" ); pcPPS->setPicHeightInLumaSamples( uiCode ); - READ_FLAG(uiCode, "pps_conformance_window_flag"); + READ_UVLC( uiCode, "pps_pic_width_in_luma_samples" ); pcPPS->setPicWidthInLumaSamples( uiCode ); + READ_UVLC( uiCode, "pps_pic_height_in_luma_samples" ); pcPPS->setPicHeightInLumaSamples( uiCode ); + READ_FLAG( uiCode, "pps_conformance_window_flag"); pcPPS->setConformanceWindowFlag( uiCode ); if (uiCode != 0) { @@ -449,7 +449,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) READ_UVLC(uiCode, "pps_conf_win_top_offset"); conf.setWindowTopOffset(uiCode); READ_UVLC(uiCode, "pps_conf_win_bottom_offset"); conf.setWindowBottomOffset(uiCode); } - READ_FLAG( uiCode, "scaling_window_flag" ); + READ_FLAG( uiCode, "pps_scaling_window_explicit_signalling_flag" ); if( uiCode != 0 ) { Window &scalingWindow = pcPPS->getScalingWindow(); @@ -468,10 +468,10 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) scalingWindow.setWindowBottomOffset( conf.getWindowBottomOffset() ); } - READ_FLAG( uiCode, "output_flag_present_flag" ); pcPPS->setOutputFlagPresentFlag( uiCode==1 ); + READ_FLAG( uiCode, "pps_output_flag_present_flag" ); pcPPS->setOutputFlagPresentFlag( uiCode==1 ); READ_FLAG( uiCode, "pps_no_pic_partition_flag"); pcPPS->setNoPicPartitionFlag(uiCode == 1); - READ_FLAG( uiCode, "subpic_id_mapping_in_pps_flag" ); pcPPS->setSubPicIdMappingInPpsFlag( uiCode != 0 ); + READ_FLAG( uiCode, "pps_subpic_id_mapping_present_flag" ); pcPPS->setSubPicIdMappingInPpsFlag( uiCode != 0 ); if( pcPPS->getSubPicIdMappingInPpsFlag() ) { if( !pcPPS->getNoPicPartitionFlag() ) @@ -503,8 +503,8 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) CHECK(uiCode > 2, "pps_log2_ctu_size_minus5 must be less than or equal to 2"); // number of explicit tile columns/rows - READ_UVLC( uiCode, "num_exp_tile_columns_minus1" ); pcPPS->setNumExpTileColumns( uiCode + 1 ); - READ_UVLC( uiCode, "num_exp_tile_rows_minus1" ); pcPPS->setNumExpTileRows( uiCode + 1 ); + READ_UVLC( uiCode, "pps_num_exp_tile_columns_minus1" ); pcPPS->setNumExpTileColumns( uiCode + 1 ); + READ_UVLC( uiCode, "pps_num_exp_tile_rows_minus1" ); pcPPS->setNumExpTileRows( uiCode + 1 ); CHECK(pcPPS->getNumExpTileColumns() > MAX_TILE_COLS, "Number of explicit tile columns exceeds valid range"); #if !JVET_S0156_LEVEL_DEFINITION CHECK(pcPPS->getNumExpTileRows() > MAX_TILE_ROWS, "Number of explicit tile rows exceeds valid range"); @@ -513,20 +513,20 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) // tile sizes for( colIdx = 0; colIdx < pcPPS->getNumExpTileColumns(); colIdx++ ) { - READ_UVLC( uiCode, "tile_column_width_minus1[i]" ); pcPPS->addTileColumnWidth( uiCode + 1 ); - CHECK(uiCode > (pcPPS->getPicWidthInCtu()-1), "The value of tile_column_width_minus1[i] shall be in the range of 0 to PicWidthInCtbY-1, inclusive"); + READ_UVLC( uiCode, "pps_tile_column_width_minus1[i]" ); pcPPS->addTileColumnWidth( uiCode + 1 ); + CHECK(uiCode > (pcPPS->getPicWidthInCtu()-1), "The value of pps_tile_column_width_minus1[i] shall be in the range of 0 to PicWidthInCtbY-1, inclusive"); } for( rowIdx = 0; rowIdx < pcPPS->getNumExpTileRows(); rowIdx++ ) { - READ_UVLC( uiCode, "tile_row_height_minus1[i]" ); pcPPS->addTileRowHeight( uiCode + 1 ); - CHECK(uiCode > (pcPPS->getPicHeightInCtu() - 1), "The value of tile_row_height_minus shall be in the range of 0 to PicHeightInCtbY-1, inclusive"); + READ_UVLC( uiCode, "pps_tile_row_height_minus1[i]" ); pcPPS->addTileRowHeight( uiCode + 1 ); + CHECK(uiCode > (pcPPS->getPicHeightInCtu() - 1), "The value of pps_tile_row_height_minus shall be in the range of 0 to PicHeightInCtbY-1, inclusive"); } pcPPS->initTiles(); // rectangular slice signalling if (pcPPS->getNumTiles() > 1) { READ_CODE(1, uiCode, "pps_loop_filter_across_tiles_enabled_flag"); pcPPS->setLoopFilterAcrossTilesEnabledFlag(uiCode == 1); - READ_CODE(1, uiCode, "rect_slice_flag"); + READ_CODE(1, uiCode, "pps_rect_slice_flag"); } else { @@ -540,7 +540,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) pcPPS->setRectSliceFlag(uiCode == 1); if (pcPPS->getRectSliceFlag()) { - READ_FLAG(uiCode, "single_slice_per_subpic_flag"); pcPPS->setSingleSlicePerSubPicFlag(uiCode == 1); + READ_FLAG(uiCode, "pps_single_slice_per_subpic_flag"); pcPPS->setSingleSlicePerSubPicFlag(uiCode == 1); } else { @@ -550,11 +550,11 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) { int32_t tileIdx = 0; - READ_UVLC( uiCode, "num_slices_in_pic_minus1" ); pcPPS->setNumSlicesInPic( uiCode + 1 ); + READ_UVLC( uiCode, "pps_num_slices_in_pic_minus1" ); pcPPS->setNumSlicesInPic( uiCode + 1 ); CHECK(pcPPS->getNumSlicesInPic() > MAX_SLICES, "Number of slices in picture exceeds valid range"); if ((pcPPS->getNumSlicesInPic() - 1) > 1) { - READ_CODE(1, uiCode, "tile_idx_delta_present_flag"); + READ_CODE(1, uiCode, "pps_tile_idx_delta_present_flag"); pcPPS->setTileIdxDeltaPresentFlag(uiCode == 1); } else @@ -571,7 +571,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) // complete tiles within a single slice if( ( tileIdx % pcPPS->getNumTileColumns() ) != pcPPS->getNumTileColumns() - 1 ) { - READ_UVLC( uiCode, "slice_width_in_tiles_minus1[i]" ); + READ_UVLC( uiCode, "pps_slice_width_in_tiles_minus1[i]" ); pcPPS->setSliceWidthInTiles ( i, uiCode + 1 ); } else @@ -582,7 +582,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) if( tileIdx / pcPPS->getNumTileColumns() != pcPPS->getNumTileRows() - 1 && ( pcPPS->getTileIdxDeltaPresentFlag() || tileIdx % pcPPS->getNumTileColumns() == 0 ) ) { - READ_UVLC( uiCode, "slice_height_in_tiles_minus1[i]" ); + READ_UVLC( uiCode, "pps_slice_height_in_tiles_minus1[i]" ); pcPPS->setSliceHeightInTiles( i, uiCode + 1 ); } else @@ -602,7 +602,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) { if( pcPPS->getTileRowHeight(tileIdx / pcPPS->getNumTileColumns()) > 1 ) { - READ_UVLC(uiCode, "num_exp_slices_in_tile[i]"); + READ_UVLC(uiCode, "pps_num_exp_slices_in_tile[i]"); if (uiCode == 0) { pcPPS->setNumSlicesInTile(i, 1); @@ -616,7 +616,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) for( ; j < numExpSliceInTile; j++ ) { - READ_UVLC(uiCode, "exp_slice_height_in_ctus_minus1[i]"); + READ_UVLC(uiCode, "pps_exp_slice_height_in_ctus_minus1[i]"); pcPPS->setSliceHeightInCtu(i + j, uiCode + 1); remTileRowHeight -= (uiCode + 1); } @@ -656,9 +656,9 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) if( pcPPS->getTileIdxDeltaPresentFlag() ) { int32_t tileIdxDelta; - READ_SVLC( tileIdxDelta, "tile_idx_delta[i]" ); + READ_SVLC( tileIdxDelta, "pps_tile_idx_delta[i]" ); tileIdx += tileIdxDelta; - CHECK( tileIdx < 0 || tileIdx >= pcPPS->getNumTiles(), "Invalid tile_idx_delta."); + CHECK( tileIdx < 0 || tileIdx >= pcPPS->getNumTiles(), "Invalid pps_tile_idx_delta."); } else { @@ -675,7 +675,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) if (pcPPS->getRectSliceFlag() == 0 || pcPPS->getSingleSlicePerSubPicFlag() || pcPPS->getNumSlicesInPic() > 1) { - READ_CODE(1, uiCode, "loop_filter_across_slices_enabled_flag"); pcPPS->setLoopFilterAcrossSlicesEnabledFlag( uiCode == 1 ); + READ_CODE(1, uiCode, "pps_loop_filter_across_slices_enabled_flag"); pcPPS->setLoopFilterAcrossSlicesEnabledFlag( uiCode == 1 ); } else { @@ -687,22 +687,22 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) pcPPS->setSingleSlicePerSubPicFlag(1); } - READ_FLAG( uiCode, "cabac_init_present_flag" ); pcPPS->setCabacInitPresentFlag( uiCode ? true : false ); + READ_FLAG( uiCode, "pps_cabac_init_present_flag" ); pcPPS->setCabacInitPresentFlag( uiCode ? true : false ); - READ_UVLC(uiCode, "num_ref_idx_l0_default_active_minus1"); + READ_UVLC(uiCode, "pps_num_ref_idx_default_active_minus1[0]"); CHECK(uiCode > 14, "Invalid code read"); pcPPS->setNumRefIdxL0DefaultActive(uiCode+1); - READ_UVLC(uiCode, "num_ref_idx_l1_default_active_minus1"); + READ_UVLC(uiCode, "pps_num_ref_idx_default_active_minus1[1]"); CHECK(uiCode > 14, "Invalid code read"); pcPPS->setNumRefIdxL1DefaultActive(uiCode+1); - READ_FLAG(uiCode, "rpl1_idx_present_flag"); + READ_FLAG(uiCode, "pps_rpl1_idx_present_flag"); pcPPS->setRpl1IdxPresentFlag(uiCode); #if JVET_S0132_HLS_REORDER - READ_FLAG( uiCode, "weighted_pred_flag" ); // Use of Weighting Prediction (P_SLICE) + READ_FLAG( uiCode, "pps_weighted_pred_flag" ); // Use of Weighting Prediction (P_SLICE) pcPPS->setUseWP( uiCode==1 ); - READ_FLAG( uiCode, "weighted_bipred_flag" ); // Use of Bi-Directional Weighting Prediction (B_SLICE) + READ_FLAG( uiCode, "pps_weighted_bipred_flag" ); // Use of Bi-Directional Weighting Prediction (B_SLICE) pcPPS->setWPBiPred( uiCode==1 ); READ_FLAG(uiCode, "pps_ref_wraparound_enabled_flag"); pcPPS->setWrapAroundEnabledFlag( uiCode ? true : false ); if (pcPPS->getWrapAroundEnabledFlag()) @@ -716,8 +716,8 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) } #endif - READ_SVLC(iCode, "init_qp_minus26" ); pcPPS->setPicInitQPMinus26(iCode); - READ_FLAG( uiCode, "cu_qp_delta_enabled_flag" ); pcPPS->setUseDQP( uiCode ? true : false ); + READ_SVLC(iCode, "pps_init_qp_minus26" ); pcPPS->setPicInitQPMinus26(iCode); + READ_FLAG( uiCode, "pps_cu_qp_delta_enabled_flag" ); pcPPS->setUseDQP( uiCode ? true : false ); READ_FLAG(uiCode, "pps_chroma_tool_offsets_present_flag"); pcPPS->setPPSChromaToolFlag(uiCode ? true : false); if (pcPPS->getPPSChromaToolFlag()) @@ -761,7 +761,7 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) else { uint32_t tableSizeMinus1 = 0; - READ_UVLC(tableSizeMinus1, "chroma_qp_offset_list_len_minus1"); + READ_UVLC(tableSizeMinus1, "pps_chroma_qp_offset_list_len_minus1"); CHECK(tableSizeMinus1 >= MAX_QP_OFFSET_LIST_SIZE, "Table size exceeds maximum"); for (int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx <= (tableSizeMinus1); cuChromaQpOffsetIdx++) @@ -769,13 +769,13 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) int cbOffset; int crOffset; int jointCbCrOffset; - READ_SVLC(cbOffset, "cb_qp_offset_list[i]"); + READ_SVLC(cbOffset, "pps_cb_qp_offset_list[i]"); CHECK(cbOffset < -12 || cbOffset > 12, "Invalid chroma QP offset"); - READ_SVLC(crOffset, "cr_qp_offset_list[i]"); + READ_SVLC(crOffset, "pps_cr_qp_offset_list[i]"); CHECK(crOffset < -12 || crOffset > 12, "Invalid chroma QP offset"); if (pcPPS->getJointCbCrQpOffsetPresentFlag()) { - READ_SVLC(jointCbCrOffset, "joint_cbcr_qp_offset_list[i]"); + READ_SVLC(jointCbCrOffset, "pps_joint_cbcr_qp_offset_list[i]"); } else { @@ -797,15 +797,15 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) pcPPS->clearChromaQpOffsetList(); } #if !JVET_S0132_HLS_REORDER - READ_FLAG( uiCode, "weighted_pred_flag" ); // Use of Weighting Prediction (P_SLICE) + READ_FLAG( uiCode, "pps_weighted_pred_flag" ); // Use of Weighting Prediction (P_SLICE) pcPPS->setUseWP( uiCode==1 ); - READ_FLAG( uiCode, "weighted_bipred_flag" ); // Use of Bi-Directional Weighting Prediction (B_SLICE) + READ_FLAG( uiCode, "pps_weighted_bipred_flag" ); // Use of Bi-Directional Weighting Prediction (B_SLICE) pcPPS->setWPBiPred( uiCode==1 ); #endif - READ_FLAG( uiCode, "deblocking_filter_control_present_flag" ); pcPPS->setDeblockingFilterControlPresentFlag( uiCode ? true : false ); + READ_FLAG( uiCode, "pps_deblocking_filter_control_present_flag" ); pcPPS->setDeblockingFilterControlPresentFlag( uiCode ? true : false ); if(pcPPS->getDeblockingFilterControlPresentFlag()) { - READ_FLAG( uiCode, "deblocking_filter_override_enabled_flag" ); pcPPS->setDeblockingFilterOverrideEnabledFlag( uiCode ? true : false ); + READ_FLAG( uiCode, "pps_deblocking_filter_override_enabled_flag" ); pcPPS->setDeblockingFilterOverrideEnabledFlag( uiCode ? true : false ); READ_FLAG( uiCode, "pps_deblocking_filter_disabled_flag" ); pcPPS->setPPSDeblockingFilterDisabledFlag(uiCode ? true : false ); if (!pcPPS->getNoPicPartitionFlag() && pcPPS->getDeblockingFilterOverrideEnabledFlag()) { @@ -895,9 +895,9 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) pcPPS->setPicWidthMinusWrapAroundOffset(0); } #endif - READ_FLAG( uiCode, "picture_header_extension_present_flag"); + READ_FLAG( uiCode, "pps_picture_header_extension_present_flag"); pcPPS->setPictureHeaderExtensionPresentFlag(uiCode); - READ_FLAG( uiCode, "slice_header_extension_present_flag"); + READ_FLAG( uiCode, "pps_slice_header_extension_present_flag"); pcPPS->setSliceHeaderExtensionPresentFlag(uiCode); READ_FLAG( uiCode, "pps_extension_flag"); @@ -1388,7 +1388,7 @@ void HLSyntaxReader::parseExtraPHBitsStruct( SPS *sps, int numBytes ) for (int i=0; i < 8*numBytes; i++) { - READ_FLAG(symbol, "extra_ph_bit_present_flag[ i ]"); + READ_FLAG(symbol, "sps_extra_ph_bit_present_flag[ i ]"); presentFlags[i] = symbol; } @@ -1403,7 +1403,7 @@ void HLSyntaxReader::parseExtraSHBitsStruct( SPS *sps, int numBytes ) for (int i=0; i < 8*numBytes; i++) { - READ_FLAG(symbol, "extra_sh_bit_present_flag[ i ]"); + READ_FLAG(symbol, "sps_extra_sh_bit_present_flag[ i ]"); presentFlags[i] = symbol; } @@ -1423,7 +1423,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_CODE(3, uiCode, "sps_max_sub_layers_minus1"); pcSPS->setMaxTLayers (uiCode + 1); CHECK(uiCode > 6, "Invalid maximum number of T-layer signalled"); #if JVET_S0186_SPS_CLEANUP - READ_CODE(2, uiCode, "chroma_format_idc"); + READ_CODE(2, uiCode, "sps_chroma_format_idc"); pcSPS->setChromaFormatIdc(ChromaFormat(uiCode)); READ_CODE(2, uiCode, "sps_log2_ctu_size_minus5"); @@ -1450,10 +1450,10 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } - READ_FLAG(uiCode, "gdr_enabled_flag"); + READ_FLAG(uiCode, "sps_gdr_enabled_flag"); pcSPS->setGDREnabledFlag(uiCode); #if !JVET_S0186_SPS_CLEANUP - READ_CODE(2, uiCode, "chroma_format_idc"); pcSPS->setChromaFormatIdc( ChromaFormat(uiCode) ); + READ_CODE(2, uiCode, "sps_chroma_format_idc"); pcSPS->setChromaFormatIdc( ChromaFormat(uiCode) ); #endif #if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE @@ -1464,7 +1464,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } #endif - READ_FLAG(uiCode, "ref_pic_resampling_enabled_flag"); pcSPS->setRprEnabledFlag(uiCode); + READ_FLAG(uiCode, "sps_ref_pic_resampling_enabled_flag"); pcSPS->setRprEnabledFlag(uiCode); #if JVET_Q0114_ASPECT5_GCI_FLAG if (pcSPS->getProfileTierLevel()->getConstraintInfo()->getNoRprConstraintFlag()) { @@ -1473,7 +1473,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) #endif if (uiCode) { - READ_FLAG(uiCode, "res_change_in_clvs_allowed_flag"); pcSPS->setResChangeInClvsEnabledFlag(uiCode); + READ_FLAG(uiCode, "sps_res_change_in_clvs_allowed_flag"); pcSPS->setResChangeInClvsEnabledFlag(uiCode); } else { @@ -1482,12 +1482,12 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) if (pcSPS->getProfileTierLevel()->getConstraintInfo()->getNoResChangeInClvsConstraintFlag()) { - CHECK(uiCode != 0, "When no_res_change_in_clvs_constraint_flag is equal to 1, res_change_in_clvs_allowed_flag shall be equal to 0"); + CHECK(uiCode != 0, "When no_res_change_in_clvs_constraint_flag is equal to 1, sps_res_change_in_clvs_allowed_flag shall be equal to 0"); } - READ_UVLC( uiCode, "pic_width_max_in_luma_samples" ); pcSPS->setMaxPicWidthInLumaSamples( uiCode ); - READ_UVLC( uiCode, "pic_height_max_in_luma_samples" ); pcSPS->setMaxPicHeightInLumaSamples( uiCode ); - READ_FLAG(uiCode, "sps_conformance_window_flag"); + READ_UVLC( uiCode, "sps_pic_width_max_in_luma_samples" ); pcSPS->setMaxPicWidthInLumaSamples( uiCode ); + READ_UVLC( uiCode, "sps_pic_height_max_in_luma_samples" ); pcSPS->setMaxPicHeightInLumaSamples( uiCode ); + READ_FLAG( uiCode, "sps_conformance_window_flag"); if (uiCode != 0) { Window& conf = pcSPS->getConformanceWindow(); @@ -1508,11 +1508,11 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) pcSPS->setMaxCUHeight(pcSPS->getCTUSize()); #endif - READ_FLAG( uiCode, "subpic_info_present_flag" ); pcSPS->setSubPicInfoPresentFlag(uiCode); + READ_FLAG( uiCode, "sps_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"); + CHECK(uiCode != 0, "When gci_no_subpic_info_constraint_flag is equal to 1, the value of sps_subpic_info_present_flag shall be equal to 0"); } #endif @@ -1555,7 +1555,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) { if ((picIdx > 0) && (pcSPS->getMaxPicWidthInLumaSamples() > pcSPS->getCTUSize())) { - READ_CODE(ceilLog2(tmpWidthVal), uiCode, "subpic_ctu_top_left_x[ i ]"); + READ_CODE(ceilLog2(tmpWidthVal), uiCode, "sps_subpic_ctu_top_left_x[ i ]"); pcSPS->setSubPicCtuTopLeftX(picIdx, uiCode); } else @@ -1564,7 +1564,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } if ((picIdx > 0) && (pcSPS->getMaxPicHeightInLumaSamples() > pcSPS->getCTUSize())) { - READ_CODE(ceilLog2(tmpHeightVal), uiCode, "subpic_ctu_top_left_y[ i ]"); + READ_CODE(ceilLog2(tmpHeightVal), uiCode, "sps_subpic_ctu_top_left_y[ i ]"); pcSPS->setSubPicCtuTopLeftY(picIdx, uiCode); } else @@ -1573,7 +1573,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } if (picIdx <pcSPS->getNumSubPics() - 1 && pcSPS->getMaxPicWidthInLumaSamples() > pcSPS->getCTUSize()) { - READ_CODE(ceilLog2(tmpWidthVal), uiCode, "subpic_width_minus1[ i ]"); + READ_CODE(ceilLog2(tmpWidthVal), uiCode, "sps_subpic_width_minus1[ i ]"); pcSPS->setSubPicWidth(picIdx, uiCode + 1); } else @@ -1582,7 +1582,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } if (picIdx <pcSPS->getNumSubPics() - 1 && pcSPS->getMaxPicHeightInLumaSamples() > pcSPS->getCTUSize()) { - READ_CODE(ceilLog2(tmpHeightVal), uiCode, "subpic_height_minus1[ i ]"); + READ_CODE(ceilLog2(tmpHeightVal), uiCode, "sps_subpic_height_minus1[ i ]"); pcSPS->setSubPicHeight(picIdx, uiCode + 1); } else @@ -1592,8 +1592,8 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) if (pcSPS->getSubPicSameSizeFlag()) { numSubpicCols = tmpWidthVal / pcSPS->getSubPicWidth(0); - CHECK(!(tmpWidthVal % pcSPS->getSubPicWidth(0) == 0), "subpic_width_minus1[0] is invalid."); - CHECK(!(tmpHeightVal % pcSPS->getSubPicHeight(0) == 0), "subpic_height_minus1[0] is invalid."); + CHECK(!(tmpWidthVal % pcSPS->getSubPicWidth(0) == 0), "sps_subpic_width_minus1[0] is invalid."); + CHECK(!(tmpHeightVal % pcSPS->getSubPicHeight(0) == 0), "sps_subpic_height_minus1[0] is invalid."); CHECK(!(numSubpicCols * (tmpHeightVal / pcSPS->getSubPicHeight(0)) == pcSPS->getNumSubPics()), "when sps_subpic_same_size_flag is equal to, sps_num_subpics_minus1 is invalid"); } } @@ -1606,9 +1606,9 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } if (!pcSPS->getIndependentSubPicsFlag()) { - READ_FLAG(uiCode, "subpic_treated_as_pic_flag[ i ]"); + READ_FLAG(uiCode, "sps_subpic_treated_as_pic_flag[ i ]"); pcSPS->setSubPicTreatedAsPicFlag(picIdx, uiCode); - READ_FLAG(uiCode, "loop_filter_across_subpic_enabled_flag[ i ]"); + READ_FLAG(uiCode, "sps_loop_filter_across_subpic_enabled_flag[ i ]"); pcSPS->setLoopFilterAcrossSubpicEnabledFlag(picIdx, uiCode); } } @@ -1618,7 +1618,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) { if ((picIdx > 0) && (pcSPS->getMaxPicWidthInLumaSamples() > pcSPS->getCTUSize())) { - READ_CODE(ceilLog2((pcSPS->getMaxPicWidthInLumaSamples() + pcSPS->getCTUSize() - 1) / pcSPS->getCTUSize()), uiCode, "subpic_ctu_top_left_x[ i ]"); + READ_CODE(ceilLog2((pcSPS->getMaxPicWidthInLumaSamples() + pcSPS->getCTUSize() - 1) / pcSPS->getCTUSize()), uiCode, "sps_subpic_ctu_top_left_x[ i ]"); pcSPS->setSubPicCtuTopLeftX(picIdx, uiCode); } else @@ -1627,7 +1627,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } if ((picIdx > 0) && (pcSPS->getMaxPicHeightInLumaSamples() > pcSPS->getCTUSize())) { - READ_CODE(ceilLog2((pcSPS->getMaxPicHeightInLumaSamples() + pcSPS->getCTUSize() - 1) / pcSPS->getCTUSize()), uiCode, "subpic_ctu_top_left_y[ i ]"); + READ_CODE(ceilLog2((pcSPS->getMaxPicHeightInLumaSamples() + pcSPS->getCTUSize() - 1) / pcSPS->getCTUSize()), uiCode, "sps_subpic_ctu_top_left_y[ i ]"); pcSPS->setSubPicCtuTopLeftY(picIdx, uiCode); } else @@ -1636,7 +1636,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } if (picIdx <pcSPS->getNumSubPics()-1 && pcSPS->getMaxPicWidthInLumaSamples() > pcSPS->getCTUSize()) { - READ_CODE(ceilLog2((pcSPS->getMaxPicWidthInLumaSamples() + pcSPS->getCTUSize() - 1) / pcSPS->getCTUSize()), uiCode, "subpic_width_minus1[ i ]"); + READ_CODE(ceilLog2((pcSPS->getMaxPicWidthInLumaSamples() + pcSPS->getCTUSize() - 1) / pcSPS->getCTUSize()), uiCode, "sps_subpic_width_minus1[ i ]"); pcSPS->setSubPicWidth(picIdx, uiCode + 1); } else @@ -1645,7 +1645,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } if (picIdx <pcSPS->getNumSubPics() - 1 && pcSPS->getMaxPicHeightInLumaSamples() > pcSPS->getCTUSize()) { - READ_CODE(ceilLog2((pcSPS->getMaxPicHeightInLumaSamples() + pcSPS->getCTUSize() - 1) / pcSPS->getCTUSize()), uiCode, "subpic_height_minus1[ i ]"); + READ_CODE(ceilLog2((pcSPS->getMaxPicHeightInLumaSamples() + pcSPS->getCTUSize() - 1) / pcSPS->getCTUSize()), uiCode, "sps_subpic_height_minus1[ i ]"); pcSPS->setSubPicHeight(picIdx, uiCode + 1); } else @@ -1654,9 +1654,9 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } if (!pcSPS->getIndependentSubPicsFlag()) { - READ_FLAG(uiCode, "subpic_treated_as_pic_flag[ i ]"); + READ_FLAG(uiCode, "sps_subpic_treated_as_pic_flag[ i ]"); pcSPS->setSubPicTreatedAsPicFlag(picIdx, uiCode); - READ_FLAG(uiCode, "loop_filter_across_subpic_enabled_flag[ i ]"); + READ_FLAG(uiCode, "sps_loop_filter_across_subpic_enabled_flag[ i ]"); pcSPS->setLoopFilterAcrossSubpicEnabledFlag(picIdx, uiCode); } } @@ -1666,11 +1666,11 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_UVLC( uiCode, "sps_subpic_id_len_minus1" ); pcSPS->setSubPicIdLen( uiCode + 1 ); CHECK( uiCode > 15, "Invalid sps_subpic_id_len_minus1 value" ); CHECK( (1 << (uiCode + 1)) < pcSPS->getNumSubPics(), "Invalid sps_subpic_id_len_minus1 value" ); - READ_FLAG( uiCode, "subpic_id_mapping_explicitly_signalled_flag" ); pcSPS->setSubPicIdMappingExplicitlySignalledFlag( uiCode != 0 ); + READ_FLAG( uiCode, "sps_subpic_id_mapping_explicitly_signalled_flag" ); pcSPS->setSubPicIdMappingExplicitlySignalledFlag( uiCode != 0 ); if (pcSPS->getSubPicIdMappingExplicitlySignalledFlag()) { - READ_FLAG( uiCode, "subpic_id_mapping_in_sps_flag" ); pcSPS->setSubPicIdMappingInSpsFlag( uiCode != 0 ); - if (pcSPS->getSubPicIdMappingInSpsFlag()) + READ_FLAG( uiCode, "sps_subpic_id_mapping_present_flag" ); pcSPS->setSubPicIdMappingPresentFlag( uiCode != 0 ); + if (pcSPS->getSubPicIdMappingPresentFlag()) { for (int picIdx = 0; picIdx < pcSPS->getNumSubPics(); picIdx++) { @@ -1689,7 +1689,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) pcSPS->setSubPicHeight(0, (pcSPS->getMaxPicHeightInLumaSamples() + pcSPS->getCTUSize() - 1) >> floorLog2(pcSPS->getCTUSize())); } - if( !pcSPS->getSubPicIdMappingExplicitlySignalledFlag() || !pcSPS->getSubPicIdMappingInSpsFlag() ) + if( !pcSPS->getSubPicIdMappingExplicitlySignalledFlag() || !pcSPS->getSubPicIdMappingPresentFlag() ) { for( int picIdx = 0; picIdx < pcSPS->getNumSubPics( ); picIdx++ ) { @@ -1705,22 +1705,22 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) pcSPS->setQpBDOffset(CHANNEL_TYPE_CHROMA, (int) (6*uiCode) ); READ_FLAG( uiCode, "sps_entropy_coding_sync_enabled_flag" ); pcSPS->setEntropyCodingSyncEnabledFlag(uiCode == 1); - READ_FLAG(uiCode, "sps_entry_point_offsets_present_flag"); pcSPS->setEntryPointsPresentFlag(uiCode == 1); - READ_CODE(4, uiCode, "log2_max_pic_order_cnt_lsb_minus4"); pcSPS->setBitsForPOC( 4 + uiCode ); - CHECK(uiCode > 12, "log2_max_pic_order_cnt_lsb_minus4 shall be in the range of 0 to 12"); - - READ_FLAG(uiCode, "sps_poc_msb_flag"); pcSPS->setPocMsbFlag(uiCode ? true : false); - if (pcSPS->getPocMsbFlag()) + READ_FLAG( uiCode, "sps_entry_point_offsets_present_flag"); pcSPS->setEntryPointsPresentFlag(uiCode == 1); + READ_CODE(4, uiCode, "sps_log2_max_pic_order_cnt_lsb_minus4"); pcSPS->setBitsForPOC( 4 + uiCode ); + CHECK(uiCode > 12, "sps_log2_max_pic_order_cnt_lsb_minus4 shall be in the range of 0 to 12"); + + READ_FLAG(uiCode, "sps_poc_msb_cycle_flag"); pcSPS->setPocMsbCycleFlag(uiCode ? true : false); + if (pcSPS->getPocMsbCycleFlag()) { - READ_UVLC(uiCode, "poc_msb_len_minus1"); pcSPS->setPocMsbLen(1 + uiCode); - CHECK(uiCode > (32 - ( pcSPS->getBitsForPOC() - 4 )- 5), "The value of poc_msb_len_minus1 shall be in the range of 0 to 32 - log2_max_pic_order_cnt_lsb_minus4 - 5, inclusive"); + READ_UVLC(uiCode, "sps_poc_msb_cycle_len_minus1"); pcSPS->setPocMsbCycleLen(1 + uiCode); + CHECK(uiCode > (32 - ( pcSPS->getBitsForPOC() - 4 )- 5), "The value of sps_poc_msb_cycle_len_minus1 shall be in the range of 0 to 32 - sps_log2_max_pic_order_cnt_lsb_minus4 - 5, inclusive"); } // extra bits are for future extensions, we will read, but ignore them, // unless a meaning is specified in the spec - READ_CODE(2, uiCode, "num_extra_ph_bits_bytes"); pcSPS->setNumExtraPHBitsBytes(uiCode); + READ_CODE(2, uiCode, "sps_num_extra_ph_bytes"); pcSPS->setNumExtraPHBytes(uiCode); parseExtraPHBitsStruct( pcSPS, uiCode ); - READ_CODE(2, uiCode, "num_extra_sh_bits_bytes"); pcSPS->setNumExtraSHBitsBytes(uiCode); + READ_CODE(2, uiCode, "sps_num_extra_sh_bytes"); pcSPS->setNumExtraSHBytes(uiCode); parseExtraSHBitsStruct( pcSPS, uiCode ); if (pcSPS->getPtlDpbHrdParamsPresentFlag()) @@ -1739,24 +1739,24 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) #if !JVET_S0132_HLS_REORDER if( pcSPS->getChromaFormatIdc() != CHROMA_400 ) { - READ_FLAG(uiCode, "qtbtt_dual_tree_intra_flag"); pcSPS->setUseDualITree(uiCode); + READ_FLAG(uiCode, "sps_qtbtt_dual_tree_intra_flag"); pcSPS->setUseDualITree(uiCode); } else { pcSPS->setUseDualITree(0); } #endif - READ_UVLC(uiCode, "log2_min_luma_coding_block_size_minus2"); + READ_UVLC(uiCode, "sps_log2_min_luma_coding_block_size_minus2"); int log2MinCUSize = uiCode + 2; pcSPS->setLog2MinCodingBlockSize(log2MinCUSize); - CHECK(uiCode > ctbLog2SizeY - 2, "Invalid log2_min_luma_coding_block_size_minus2 signalled"); + CHECK(uiCode > ctbLog2SizeY - 2, "Invalid sps_log2_min_luma_coding_block_size_minus2 signalled"); - CHECK(log2MinCUSize > std::min(6, (int)(ctbLog2SizeY)), "log2_min_luma_coding_block_size_minus2 shall be in the range of 0 to min (4, log2_ctu_size - 2)"); + CHECK(log2MinCUSize > std::min(6, (int)(ctbLog2SizeY)), "sps_log2_min_luma_coding_block_size_minus2 shall be in the range of 0 to min (4, log2_ctu_size - 2)"); const int minCuSize = 1 << pcSPS->getLog2MinCodingBlockSize(); CHECK( ( pcSPS->getMaxPicWidthInLumaSamples() % ( std::max( 8, minCuSize ) ) ) != 0, "Coded frame width must be a multiple of Max(8, the minimum unit size)" ); CHECK( ( pcSPS->getMaxPicHeightInLumaSamples() % ( std::max( 8, minCuSize ) ) ) != 0, "Coded frame height must be a multiple of Max(8, the minimum unit size)" ); - READ_FLAG(uiCode, "partition_constraints_override_enabled_flag"); pcSPS->setSplitConsOverrideEnabledFlag(uiCode); + READ_FLAG(uiCode, "sps_partition_constraints_override_enabled_flag"); pcSPS->setSplitConsOverrideEnabledFlag(uiCode); READ_UVLC(uiCode, "sps_log2_diff_min_qt_min_cb_intra_slice_luma"); unsigned minQtLog2SizeIntraY = uiCode + pcSPS->getLog2MinCodingBlockSize(); minQT[0] = 1 << minQtLog2SizeIntraY; @@ -1777,7 +1777,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) #if JVET_S0132_HLS_REORDER if( pcSPS->getChromaFormatIdc() != CHROMA_400 ) { - READ_FLAG(uiCode, "qtbtt_dual_tree_intra_flag"); pcSPS->setUseDualITree(uiCode); + READ_FLAG(uiCode, "sps_qtbtt_dual_tree_intra_flag"); pcSPS->setUseDualITree(uiCode); } else { @@ -1846,7 +1846,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG(uiCode, "sps_transform_skip_enabled_flag"); pcSPS->setTransformSkipEnabledFlag(uiCode ? true : false); if (pcSPS->getTransformSkipEnabledFlag()) { - READ_UVLC(uiCode, "log2_transform_skip_max_size_minus2"); + READ_UVLC(uiCode, "sps_log2_transform_skip_max_size_minus2"); pcSPS->setLog2MaxTransformSkipBlockSize(uiCode + 2); READ_FLAG(uiCode, "sps_bdpcm_enabled_flag"); pcSPS->setBDPCMEnabledFlag(uiCode ? true : false); } @@ -1867,7 +1867,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) { READ_FLAG(uiCode, "sps_joint_cbcr_enabled_flag"); pcSPS->setJointCbCrEnabledFlag(uiCode ? true : false); ChromaQpMappingTableParams chromaQpMappingTableParams; - READ_FLAG(uiCode, "same_qp_table_for_chroma"); chromaQpMappingTableParams.setSameCQPTableForAllChromaFlag(uiCode); + READ_FLAG(uiCode, "sps_same_qp_table_for_chroma_flag"); chromaQpMappingTableParams.setSameCQPTableForAllChromaFlag(uiCode); int numQpTables = chromaQpMappingTableParams.getSameCQPTableForAllChromaFlag() ? 1 : (pcSPS->getJointCbCrEnabledFlag() ? 3 : 2); chromaQpMappingTableParams.setNumQpTables(numQpTables); for (int i = 0; i < numQpTables; i++) @@ -1915,7 +1915,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG(uiCode, "sps_transform_skip_enabled_flag"); pcSPS->setTransformSkipEnabledFlag(uiCode ? true : false); if (pcSPS->getTransformSkipEnabledFlag()) { - READ_UVLC(uiCode, "log2_transform_skip_max_size_minus2"); + READ_UVLC(uiCode, "sps_log2_transform_skip_max_size_minus2"); pcSPS->setLog2MaxTransformSkipBlockSize(uiCode + 2); READ_FLAG(uiCode, "sps_bdpcm_enabled_flag"); pcSPS->setBDPCMEnabledFlag(uiCode ? true : false); } @@ -1924,10 +1924,10 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG( uiCode, "sps_weighted_pred_flag" ); pcSPS->setUseWP( uiCode ? true : false ); READ_FLAG( uiCode, "sps_weighted_bipred_flag" ); pcSPS->setUseWPBiPred( uiCode ? true : false ); - READ_FLAG(uiCode, "long_term_ref_pics_flag"); pcSPS->setLongTermRefsPresent(uiCode); + READ_FLAG(uiCode, "sps_long_term_ref_pics_flag"); pcSPS->setLongTermRefsPresent(uiCode); if (pcSPS->getVPSId() > 0) { - READ_FLAG( uiCode, "sps_inter_layer_ref_pics_present_flag" ); pcSPS->setInterLayerPresentFlag( uiCode ); + READ_FLAG( uiCode, "sps_inter_layer_prediction_enabled_flag" ); pcSPS->setInterLayerPresentFlag( uiCode ); } else { @@ -1941,11 +1941,11 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } #endif - READ_FLAG(uiCode, "rpl1_copy_from_rpl0_flag"); + READ_FLAG(uiCode, "sps_rpl1_same_as_rpl0_flag"); pcSPS->setRPL1CopyFromRPL0Flag(uiCode); //Read candidate for List0 - READ_UVLC(uiCode, "num_ref_pic_lists_in_sps[0]"); + READ_UVLC(uiCode, "sps_num_ref_pic_lists[0]"); uint32_t numberOfRPL = uiCode; pcSPS->createRPLList0(numberOfRPL); RPLList* rplList = pcSPS->getRPLList0(); @@ -1959,7 +1959,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) //Read candidate for List1 if (!pcSPS->getRPL1CopyFromRPL0Flag()) { - READ_UVLC(uiCode, "num_ref_pic_lists_in_sps[1]"); + READ_UVLC(uiCode, "sps_num_ref_pic_lists[1]"); numberOfRPL = uiCode; pcSPS->createRPLList1(numberOfRPL); rplList = pcSPS->getRPLList1(); @@ -2031,18 +2031,18 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) pcSPS->setFpelMmvdEnabledFlag( false ); } - READ_UVLC(uiCode, "six_minus_max_num_merge_cand"); + READ_UVLC(uiCode, "sps_six_minus_max_num_merge_cand"); CHECK(MRG_MAX_NUM_CANDS <= uiCode, "Incorrrect max number of merge candidates!"); pcSPS->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode); READ_FLAG(uiCode, "sps_sbt_enabled_flag"); pcSPS->setUseSBT ( uiCode != 0 ); READ_FLAG( uiCode, "sps_affine_enabled_flag" ); pcSPS->setUseAffine ( uiCode != 0 ); if ( pcSPS->getUseAffine() ) { - READ_UVLC(uiCode, "five_minus_max_num_subblock_merge_cand"); + READ_UVLC(uiCode, "sps_five_minus_max_num_subblock_merge_cand"); CHECK( uiCode > 5 - (pcSPS->getSbTMVPEnabledFlag() ? 1 : 0), - "The value of five_minus_max_num_subblock_merge_cand shall be in the range of 0 to 5 - sps_sbtmvp_enabled_flag"); - CHECK(AFFINE_MRG_MAX_NUM_CANDS < uiCode, "The value of five_minus_max_num_subblock_merge_cand shall be in the range of 0 to 5 - sps_sbtmvp_enabled_flag"); + "The value of sps_five_minus_max_num_subblock_merge_cand shall be in the range of 0 to 5 - sps_sbtmvp_enabled_flag"); + CHECK(AFFINE_MRG_MAX_NUM_CANDS < uiCode, "The value of sps_five_minus_max_num_subblock_merge_cand shall be in the range of 0 to 5 - sps_sbtmvp_enabled_flag"); pcSPS->setMaxNumAffineMergeCand(AFFINE_MRG_MAX_NUM_CANDS - uiCode); READ_FLAG( uiCode, "sps_affine_type_flag" ); pcSPS->setUseAffineType ( uiCode != 0 ); if( pcSPS->getAMVREnabledFlag()) @@ -2070,9 +2070,9 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) { if (pcSPS->getMaxNumMergeCand() >= 3) { - READ_UVLC(uiCode, "max_num_merge_cand_minus_max_num_gpm_cand"); + READ_UVLC(uiCode, "sps_max_num_merge_cand_minus_max_num_gpm_cand"); CHECK(pcSPS->getMaxNumMergeCand() - 2 < uiCode, - "max_num_merge_cand_minus_max_num_gpm_cand must not be greater than the number of merge candidates minus 2"); + "sps_max_num_merge_cand_minus_max_num_gpm_cand must not be greater than the number of merge candidates minus 2"); pcSPS->setMaxNumGeoCand((uint32_t)(pcSPS->getMaxNumMergeCand() - uiCode)); } else @@ -2087,8 +2087,8 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) pcSPS->setMaxNumGeoCand(0); } - READ_UVLC(uiCode, "log2_parallel_merge_level_minus2"); - CHECK(uiCode + 2 > ctbLog2SizeY, "The value of log2_parallel_merge_level_minus2 shall be in the range of 0 to ctbLog2SizeY - 2"); + READ_UVLC(uiCode, "sps_log2_parallel_merge_level_minus2"); + CHECK(uiCode + 2 > ctbLog2SizeY, "The value of sps_log2_parallel_merge_level_minus2 shall be in the range of 0 to ctbLog2SizeY - 2"); pcSPS->setLog2ParallelMergeLevelMinus2(uiCode); @@ -2144,8 +2144,8 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG(uiCode, "sps_ibc_enabled_flag"); pcSPS->setIBCFlag(uiCode); if (pcSPS->getIBCFlag()) { - READ_UVLC(uiCode, "six_minus_max_num_ibc_merge_cand"); - CHECK(IBC_MRG_MAX_NUM_CANDS <= uiCode, "Incorrrect max number of IBC merge candidates!"); + READ_UVLC(uiCode, "sps_six_minus_max_num_ibc_merge_cand"); + CHECK(IBC_MRG_MAX_NUM_CANDS <= uiCode, "Incorrect max number of IBC merge candidates!"); pcSPS->setMaxNumIBCMergeCand(IBC_MRG_MAX_NUM_CANDS - uiCode); } else @@ -2181,7 +2181,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) if (pcSPS->getUseLFNST() && pcSPS->getScalingListFlag()) { - READ_FLAG(uiCode, "scaling_matrix_for_lfnst_disabled_flag"); pcSPS->setDisableScalingMatrixForLfnstBlks(uiCode ? true : false); + READ_FLAG(uiCode, "sps_scaling_matrix_for_lfnst_disabled_flag"); pcSPS->setDisableScalingMatrixForLfnstBlks(uiCode ? true : false); } if (pcSPS->getUseColorTrans() && pcSPS->getScalingListFlag()) @@ -2264,12 +2264,12 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } } - READ_FLAG( uiCode, "field_seq_flag"); pcSPS->setFieldSeqFlag(uiCode); + READ_FLAG( uiCode, "sps_field_seq_flag"); pcSPS->setFieldSeqFlag(uiCode); #if JVET_S0138_GCI_PTL CHECK( pcSPS->getProfileTierLevel()->getFrameOnlyConstraintFlag() && uiCode, "When ptl_frame_only_constraint_flag equal to 1 , the value of sps_field_seq_flag shall be equal to 0"); #endif - READ_FLAG( uiCode, "vui_parameters_present_flag" ); pcSPS->setVuiParametersPresentFlag(uiCode); + READ_FLAG( uiCode, "sps_vui_parameters_present_flag" ); pcSPS->setVuiParametersPresentFlag(uiCode); if (pcSPS->getVuiParametersPresentFlag()) { @@ -2432,10 +2432,10 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) } } CHECK(sumUiCode == 0, "There has to be at least one value of j such that the value of vps_direct_dependency_flag[ i ][ j ] is equal to 1,when vps_independent_layer_flag[ i ] is equal to 0 "); - READ_FLAG(uiCode, "max_tid_ref_present_flag[ i ]"); + READ_FLAG(uiCode, "vps_max_tid_ref_present_flag[ i ]"); if (uiCode) { - READ_CODE(3, uiCode, "max_tid_il_ref_pics_plus1[ i ]"); + READ_CODE(3, uiCode, "vps_max_tid_il_ref_pics_plus1[ i ]"); pcVPS->setMaxTidIlRefPicsPlus1(i, uiCode); } else @@ -2450,7 +2450,7 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) { if (pcVPS->getAllIndependentLayersFlag()) { - READ_FLAG(uiCode, "each_layer_is_an_ols_flag"); pcVPS->setEachLayerIsAnOlsFlag(uiCode); + READ_FLAG(uiCode, "vps_each_layer_is_an_ols_flag"); pcVPS->setEachLayerIsAnOlsFlag(uiCode); if (pcVPS->getEachLayerIsAnOlsFlag() == 0) { pcVPS->setOlsModeIdc(2); @@ -2460,20 +2460,20 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) { if (!pcVPS->getAllIndependentLayersFlag()) { - READ_CODE(2, uiCode, "ols_mode_idc"); pcVPS->setOlsModeIdc(uiCode); CHECK(uiCode > MAX_VPS_OLS_MODE_IDC, "ols_mode_idc shall be in the rage of 0 to 2"); + READ_CODE(2, uiCode, "vps_ols_mode_idc"); pcVPS->setOlsModeIdc(uiCode); CHECK(uiCode > MAX_VPS_OLS_MODE_IDC, "vps_ols_mode_idc shall be in the range of 0 to 2"); } if (pcVPS->getOlsModeIdc() == 2) { #if JVET_S0183_VPS_INFORMATION_SIGNALLING - READ_CODE(8, uiCode, "num_output_layer_sets_minus2"); pcVPS->setNumOutputLayerSets(uiCode + 2); + READ_CODE(8, uiCode, "vps_num_output_layer_sets_minus2"); pcVPS->setNumOutputLayerSets(uiCode + 2); #else - READ_CODE(8, uiCode, "num_output_layer_sets_minus1"); pcVPS->setNumOutputLayerSets(uiCode + 1); + READ_CODE(8, uiCode, "vps_num_output_layer_sets_minus1"); pcVPS->setNumOutputLayerSets(uiCode + 1); #endif for (uint32_t i = 1; i <= pcVPS->getNumOutputLayerSets() - 1; i++) { for (uint32_t j = 0; j < pcVPS->getMaxLayers(); j++) { - READ_FLAG(uiCode, "ols_output_layer_flag"); pcVPS->setOlsOutputLayerFlag(i, j, uiCode); + READ_FLAG(uiCode, "vps_ols_output_layer_flag"); pcVPS->setOlsOutputLayerFlag(i, j, uiCode); } } } @@ -2499,14 +2499,14 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) { if(i > 0) { - READ_FLAG(uiCode, "pt_present_flag"); + READ_FLAG(uiCode, "vps_pt_present_flag"); pcVPS->setPtPresentFlag(i, uiCode); } else pcVPS->setPtPresentFlag(0, 1); if (!pcVPS->getAllLayersSameNumSublayersFlag()) { - READ_CODE(3, uiCode, "ptl_max_temporal_id"); + READ_CODE(3, uiCode, "vps_ptl_max_tid"); pcVPS->setPtlMaxTemporalId(i, uiCode); } else @@ -2537,7 +2537,7 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) { if (pcVPS->getNumPtls() > 1 && pcVPS->getNumPtls() != pcVPS->getTotalNumOLSs()) { - READ_CODE(8, uiCode, "ols_ptl_idx"); + READ_CODE(8, uiCode, "vps_ols_ptl_idx"); pcVPS->setOlsPtlIdx(i, uiCode); } else if (pcVPS->getNumPtls() == pcVPS->getTotalNumOLSs()) @@ -2571,7 +2571,7 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) { if (!pcVPS->getAllLayersSameNumSublayersFlag()) { - READ_CODE(3, uiCode, "dpb_max_temporal_id[i]"); + READ_CODE(3, uiCode, "vps_dpb_max_tid[i]"); pcVPS->m_dpbMaxTemporalId.push_back(uiCode); #if JVET_S0100_ASPECT3 CHECK (uiCode > (pcVPS->getMaxSubLayers() - 1), "The value of vps_dpb_max_tid[i] shall be in the range of 0 to vps_max_sublayers_minus1, inclusive." ) @@ -2608,13 +2608,13 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) { if( pcVPS->m_numLayersInOls[i] > 1 ) { - READ_UVLC( uiCode, "ols_dpb_pic_width[i]" ); pcVPS->setOlsDpbPicWidth( i, uiCode ); - READ_UVLC( uiCode, "ols_dpb_pic_height[i]" ); pcVPS->setOlsDpbPicHeight( i, uiCode ); - READ_CODE( 2, uiCode, "ols_dpb_chroma_format[i]"); pcVPS->setOlsDpbChromaFormatIdc(i, uiCode); - READ_UVLC( uiCode, "ols_dpb_bitdepth_minus8[i]"); pcVPS->setOlsDpbBitDepthMinus8(i, uiCode); + READ_UVLC( uiCode, "vps_ols_dpb_pic_width[i]" ); pcVPS->setOlsDpbPicWidth( i, uiCode ); + READ_UVLC( uiCode, "vps_ols_dpb_pic_height[i]" ); pcVPS->setOlsDpbPicHeight( i, uiCode ); + READ_CODE( 2, uiCode, "vps_ols_dpb_chroma_format[i]"); pcVPS->setOlsDpbChromaFormatIdc(i, uiCode); + READ_UVLC( uiCode, "vps_ols_dpb_bitdepth_minus8[i]"); pcVPS->setOlsDpbBitDepthMinus8(i, uiCode); if ((pcVPS->m_numDpbParams > 1) && (pcVPS->m_numDpbParams != pcVPS->m_numMultiLayeredOlss)) { - READ_UVLC( uiCode, "ols_dpb_params_idx[i]" ); pcVPS->setOlsDpbParamsIdx( i, uiCode ); + READ_UVLC( uiCode, "vps_ols_dpb_params_idx[i]" ); pcVPS->setOlsDpbParamsIdx( i, uiCode ); } else if (pcVPS->m_numDpbParams == 1) { @@ -2649,17 +2649,16 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) { pcVPS->setVPSSublayerCpbParamsPresentFlag(0); } - - READ_UVLC(uiCode, "num_ols_hrd_params_minus1"); pcVPS->setNumOlsHrdParamsMinus1(uiCode); - CHECK( uiCode >= pcVPS->getNumMultiLayeredOlss(),"The value of vps_num_ols_hrd_params_minus1 shall be in the range of 0 to NumMultiLayerOlss - 1, inclusive"); + READ_UVLC(uiCode, "vps_num_ols_timing_hrd_params_minus1"); pcVPS->setNumOlsTimingHrdParamsMinus1(uiCode); + CHECK( uiCode >= pcVPS->getNumMultiLayeredOlss(),"The value of vps_num_ols_timing_hrd_params_minus1 shall be in the range of 0 to NumMultiLayerOlss - 1, inclusive"); std::vector<bool> isHRDParamReferred( uiCode + 1, false); pcVPS->m_olsHrdParams.clear(); - pcVPS->m_olsHrdParams.resize(pcVPS->getNumOlsHrdParamsMinus1(), std::vector<OlsHrdParams>(pcVPS->getMaxSubLayers())); - for (int i = 0; i <= pcVPS->getNumOlsHrdParamsMinus1(); i++) + pcVPS->m_olsHrdParams.resize(pcVPS->getNumOlsTimingHrdParamsMinus1(), std::vector<OlsHrdParams>(pcVPS->getMaxSubLayers())); + for (int i = 0; i <= pcVPS->getNumOlsTimingHrdParamsMinus1(); i++) { if (!pcVPS->getAllLayersSameNumSublayersFlag()) { - READ_CODE(3, uiCode, "hrd_max_tid[i]"); pcVPS->setHrdMaxTid(i, uiCode); + READ_CODE(3, uiCode, "vps_hrd_max_tid[i]"); pcVPS->setHrdMaxTid(i, uiCode); #if JVET_S0100_ASPECT3 CHECK (uiCode > (pcVPS->getMaxSubLayers() - 1), "The value of vps_hrd_max_tid[i] shall be in the range of 0 to vps_max_sublayers_minus1, inclusive." ) #endif @@ -2672,31 +2671,31 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS) parseOlsHrdParameters(pcVPS->getGeneralHrdParameters(),pcVPS->getOlsHrdParameters(i), firstSublayer, pcVPS->getHrdMaxTid(i)); } #if JVET_S0100_ASPECT3 - for (int i = pcVPS->getNumOlsHrdParamsMinus1() + 1; i < pcVPS->getTotalNumOLSs(); i++) + for (int i = pcVPS->getNumOlsTimingHrdParamsMinus1() + 1; i < pcVPS->getTotalNumOLSs(); i++) { pcVPS->setHrdMaxTid(i, pcVPS->getMaxSubLayers() - 1); } #endif for (int i = 0; i < pcVPS->m_numMultiLayeredOlss; i++) { - if (((pcVPS->getNumOlsHrdParamsMinus1() + 1) != pcVPS->m_numMultiLayeredOlss) && (pcVPS->getNumOlsHrdParamsMinus1() > 0)) + if (((pcVPS->getNumOlsTimingHrdParamsMinus1() + 1) != pcVPS->m_numMultiLayeredOlss) && (pcVPS->getNumOlsTimingHrdParamsMinus1() > 0)) { - READ_UVLC(uiCode, "ols_hrd_idx[i]"); pcVPS->setOlsHrdIdx(i, uiCode); - CHECK(uiCode > pcVPS->getNumOlsHrdParamsMinus1(), "The value of ols_hrd_idx[[ i ] shall be in the range of 0 to num_ols_hrd_params_minus1, inclusive."); + READ_UVLC(uiCode, "vps_ols_timing_hrd_idx[i]"); pcVPS->setOlsTimingHrdIdx(i, uiCode); + CHECK(uiCode > pcVPS->getNumOlsTimingHrdParamsMinus1(), "The value of vps_ols_timing_hrd_idx[[ i ] shall be in the range of 0 to vps_num_ols_timing_hrd_params_minus1, inclusive."); } - else if (pcVPS->getNumOlsHrdParamsMinus1() == 0) + else if (pcVPS->getNumOlsTimingHrdParamsMinus1() == 0) { - pcVPS->setOlsHrdIdx(i, 0); + pcVPS->setOlsTimingHrdIdx(i, 0); } else { - pcVPS->setOlsHrdIdx(i, i); + pcVPS->setOlsTimingHrdIdx(i, i); } - isHRDParamReferred[pcVPS->getOlsHrdIdx(i)] = true; + isHRDParamReferred[pcVPS->getOlsTimingHrdIdx(i)] = true; } - for( int i = 0; i <= pcVPS->getNumOlsHrdParamsMinus1(); i++ ) + for( int i = 0; i <= pcVPS->getNumOlsTimingHrdParamsMinus1(); i++ ) { - CHECK( !isHRDParamReferred[i], "Each ols_hrd_parameters( ) syntax structure in the VPS shall be referred to by at least one value of vps_ols_hrd_idx[ i ] for i in the range of 1 to NumMultiLayerOlss - 1, inclusive"); + CHECK( !isHRDParamReferred[i], "Each vps_ols_timing_hrd_parameters( ) syntax structure in the VPS shall be referred to by at least one value of vps_ols_timing_hrd_idx[ i ] for i in the range of 1 to NumMultiLayerOlss - 1, inclusive"); } } #if JVET_S0100_ASPECT3 @@ -2735,13 +2734,13 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag xTracePictureHeader(); #endif - READ_FLAG(uiCode, "gdr_or_irap_pic_flag"); picHeader->setGdrOrIrapPicFlag(uiCode != 0); + READ_FLAG(uiCode, "ph_gdr_or_irap_pic_flag"); picHeader->setGdrOrIrapPicFlag(uiCode != 0); #if JVET_S0076_ASPECT1 READ_FLAG(uiCode, "ph_non_ref_pic_flag"); picHeader->setNonReferencePictureFlag(uiCode != 0); #endif if (picHeader->getGdrOrIrapPicFlag()) { - READ_FLAG(uiCode, "gdr_pic_flag"); picHeader->setGdrPicFlag(uiCode != 0); + READ_FLAG(uiCode, "ph_gdr_pic_flag"); picHeader->setGdrPicFlag(uiCode != 0); } else { @@ -2778,7 +2777,7 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag #endif if( picHeader->getGdrPicFlag() ) { - READ_UVLC(uiCode, "recovery_poc_cnt"); picHeader->setRecoveryPocCnt( uiCode ); + READ_UVLC(uiCode, "ph_recovery_poc_cnt"); picHeader->setRecoveryPocCnt( uiCode ); } else { @@ -2786,7 +2785,7 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag } std::vector<bool> phExtraBitsPresent = sps->getExtraPHBitPresentFlags(); - for (int i=0; i< sps->getNumExtraPHBitsBytes() * 8; i++) + for (int i=0; i< sps->getNumExtraPHBytes() * 8; i++) { // extra bits are ignored (when present) if (phExtraBitsPresent[i]) @@ -2795,12 +2794,12 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag } } - if (sps->getPocMsbFlag()) + if (sps->getPocMsbCycleFlag()) { READ_FLAG(uiCode, "ph_poc_msb_present_flag"); picHeader->setPocMsbPresentFlag(uiCode != 0); if (picHeader->getPocMsbPresentFlag()) { - READ_CODE(sps->getPocMsbLen(), uiCode, "poc_msb_val"); + READ_CODE(sps->getPocMsbCycleLen(), uiCode, "ph_poc_msb_cycle_val"); picHeader->setPocMsbVal(uiCode); } } @@ -2934,7 +2933,7 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag } if (pps->getPicWidthInLumaSamples() == sps->getMaxPicWidthInLumaSamples() && pps->getPicHeightInLumaSamples() == sps->getMaxPicHeightInLumaSamples()) { - CHECK(pps->getConformanceWindowFlag(), "When pic_width_in_luma_samples is equal to pic_width_max_in_luma_samples and pic_height_in_luma_samples is equal to pic_height_max_in_luma_samples, the value of pps_conformance_window_flag shall be equal to 0"); + CHECK(pps->getConformanceWindowFlag(), "When pps_pic_width_in_luma_samples is equal to sps_pic_width_max_in_luma_samples and pps_pic_height_in_luma_samples is equal to sps_pic_height_max_in_luma_samples, the value of pps_conformance_window_flag shall be equal to 0"); pps->getConformanceWindow().setWindowLeftOffset(sps->getConformanceWindow().getWindowLeftOffset()); pps->getConformanceWindow().setWindowRightOffset(sps->getConformanceWindow().getWindowRightOffset()); pps->getConformanceWindow().setWindowTopOffset(sps->getConformanceWindow().getWindowTopOffset()); @@ -2975,7 +2974,7 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag // set wraparound offset from PPS and SPS info int minCbSizeY = (1 << sps->getLog2MinCodingBlockSize()); CHECK( !sps->getWrapAroundEnabledFlag() && pps->getWrapAroundEnabledFlag(), "When sps_ref_wraparound_enabled_flag is equal to 0, the value of pps_ref_wraparound_enabled_flag shall be equal to 0."); - CHECK( (((sps->getCTUSize() / minCbSizeY) + 1) > ((pps->getPicWidthInLumaSamples() / minCbSizeY) - 1)) && pps->getWrapAroundEnabledFlag(), "When the value of CtbSizeY / MinCbSizeY + 1 is greater than pic_width_in_luma_samples / MinCbSizeY - 1, the value of pps_ref_wraparound_enabled_flag shall be equal to 0."); + CHECK( (((sps->getCTUSize() / minCbSizeY) + 1) > ((pps->getPicWidthInLumaSamples() / minCbSizeY) - 1)) && pps->getWrapAroundEnabledFlag(), "When the value of CtbSizeY / MinCbSizeY + 1 is greater than pps_pic_width_in_luma_samples / MinCbSizeY - 1, the value of pps_ref_wraparound_enabled_flag shall be equal to 0."); if( pps->getWrapAroundEnabledFlag() ) { CHECK((pps->getPicWidthMinusWrapAroundOffset() > (pps->getPicWidthInLumaSamples() / minCbSizeY - sps->getCTUSize() / minCbSizeY - 2)), "pps_pic_width_minus_wraparound_ofsfet shall be less than or equal to pps_pic_width_in_luma_samples/MinCbSizeY - CtbSizeY/MinCbSizeY-2"); @@ -3044,7 +3043,7 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag // picture output flag if (pps->getOutputFlagPresentFlag() && !picHeader->getNonReferencePictureFlag()) { - READ_FLAG( uiCode, "pic_output_flag" ); picHeader->setPicOutputFlag( uiCode != 0 ); + READ_FLAG( uiCode, "ph_pic_output_flag" ); picHeader->setPicOutputFlag( uiCode != 0 ); } else { @@ -3164,7 +3163,7 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag // partitioning constraint overrides if (sps->getSplitConsOverrideEnabledFlag()) { - READ_FLAG(uiCode, "partition_constraints_override_flag"); picHeader->setSplitConsOverrideFlag( uiCode != 0 ); + READ_FLAG(uiCode, "ph_partition_constraints_override_flag"); picHeader->setSplitConsOverrideFlag( uiCode != 0 ); } else { @@ -3365,45 +3364,45 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag // picture level BDOF disable flags if (sps->getBdofControlPresentFlag() && (!pps->getRplInfoInPhFlag() || picHeader->getRPL(1)->getNumRefEntries() > 0)) { - READ_FLAG(uiCode, "ph_disable_bdof_flag"); picHeader->setDisBdofFlag(uiCode != 0); + READ_FLAG(uiCode, "ph_bdof_disabled_flag"); picHeader->setBdofDisabledFlag(uiCode != 0); } else { if (sps->getBdofControlPresentFlag() == 0) { - picHeader->setDisBdofFlag(1 - (int)(sps->getBDOFEnabledFlag())); + picHeader->setBdofDisabledFlag(1 - (int)(sps->getBDOFEnabledFlag())); } else { - picHeader->setDisBdofFlag(1); + picHeader->setBdofDisabledFlag(1); } } // picture level DMVR disable flags if (sps->getDmvrControlPresentFlag() && (!pps->getRplInfoInPhFlag() || picHeader->getRPL(1)->getNumRefEntries() > 0)) { - READ_FLAG(uiCode, "ph_disable_dmvr_flag"); picHeader->setDisDmvrFlag(uiCode != 0); + READ_FLAG(uiCode, "ph_dmvr_disabled_flag"); picHeader->setDmvrDisabledFlag(uiCode != 0); } else { if (sps->getDmvrControlPresentFlag() == 0) { - picHeader->setDisDmvrFlag(1 - (int)(sps->getUseDMVR())); + picHeader->setDmvrDisabledFlag(1 - (int)(sps->getUseDMVR())); } else { - picHeader->setDisDmvrFlag(1); + picHeader->setDmvrDisabledFlag(1); } } // picture level PROF disable flags if (sps->getProfControlPresentFlag()) { - READ_FLAG(uiCode, "ph_disable_prof_flag"); picHeader->setDisProfFlag(uiCode != 0); + READ_FLAG(uiCode, "ph_prof_disabled_flag"); picHeader->setProfDisabledFlag(uiCode != 0); } else { - picHeader->setDisProfFlag(0); + picHeader->setProfDisabledFlag(0); } if( (pps->getUseWP() || pps->getWPBiPred()) && pps->getWpInfoInPhFlag() ) @@ -3666,7 +3665,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par #endif PPS* pps = NULL; SPS* sps = NULL; - READ_FLAG(uiCode, "picture_header_in_slice_header_flag"); + READ_FLAG(uiCode, "sh_picture_header_in_slice_header_flag"); pcSlice->setPictureHeaderInSliceHeader(uiCode); if (uiCode) { @@ -3696,7 +3695,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par CHECK(pcSlice->getPictureHeaderInSliceHeader() && pps->getQpDeltaInfoInPhFlag() == 1, "When sh_picture_header_in_slice_header_flag is equal to 1, qp_delta_info_in_ph_flag shall be equal to 0"); CHECK(pcSlice->getPictureHeaderInSliceHeader() && sps->getSubPicInfoPresentFlag() == 1, "When sps_subpic_info_present_flag is equal to 1, the value of sh_picture_header_in_slice_header_flag shall be equal to 0"); #if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE - CHECK(pcSlice->getPictureHeaderInSliceHeader() && sps->getSeparateColourPlaneFlag() == 1, "when separate_colour_plane_flag is equal to 1, the value of picture_header_in_slice_header_flag shall be equal to 0"); + CHECK(pcSlice->getPictureHeaderInSliceHeader() && sps->getSeparateColourPlaneFlag() == 1, "when separate_colour_plane_flag is equal to 1, the value of sh_picture_header_in_slice_header_flag shall be equal to 0"); #endif #if JVET_S0184_VIRTUAL_BOUNDARY_CONSTRAINT CHECK(sps->getSubPicInfoPresentFlag() == 1 && sps->getVirtualBoundariesEnabledFlag() == 1 && sps->getVirtualBoundariesPresentFlag() == 0, @@ -3755,7 +3754,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par { uint32_t bitsSubPicId; bitsSubPicId = sps->getSubPicIdLen(); - READ_CODE(bitsSubPicId, uiCode, "slice_subpic_id"); pcSlice->setSliceSubPicId(uiCode); + READ_CODE(bitsSubPicId, uiCode, "sh_subpic_id"); pcSlice->setSliceSubPicId(uiCode); } else { @@ -3770,7 +3769,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par if( pps->getNumTiles() > 1 ) { int bitsSliceAddress = ceilLog2(pps->getNumTiles()); - READ_CODE(bitsSliceAddress, uiCode, "slice_address"); sliceAddr = uiCode; + READ_CODE(bitsSliceAddress, uiCode, "sh_slice_address"); sliceAddr = uiCode; } } // rectangular slices @@ -3782,7 +3781,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par if( currSubPic.getNumSlicesInSubPic() > 1 ) { int bitsSliceAddress = ceilLog2(currSubPic.getNumSlicesInSubPic()); - READ_CODE(bitsSliceAddress, uiCode, "slice_address"); sliceAddr = uiCode; + READ_CODE(bitsSliceAddress, uiCode, "sh_slice_address"); sliceAddr = uiCode; CHECK(sliceAddr >= currSubPic.getNumSlicesInSubPic(), "Invalid slice address"); } uint32_t picLevelSliceIdx = sliceAddr; @@ -3795,7 +3794,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par } std::vector<bool> shExtraBitsPresent = sps->getExtraSHBitPresentFlags(); - for (int i=0; i< sps->getNumExtraSHBitsBytes() * 8; i++) + for (int i=0; i< sps->getNumExtraSHBytes() * 8; i++) { // extra bits are ignored (when present) if (shExtraBitsPresent[i]) @@ -3811,11 +3810,11 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par { if (((int)pps->getNumTiles() - (int)sliceAddr) > 1) { - READ_UVLC(uiCode, "num_tiles_in_slice_minus1"); numTilesInSlice = uiCode + 1; + READ_UVLC(uiCode, "sh_num_tiles_in_slice_minus1"); numTilesInSlice = uiCode + 1; } 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"); + CHECK(pps->getNumTiles() != uiCode + 1, "When pps_rect_slice_flag is equal to 0 and one_slice_per_pic_constraint_flag equal to 1, the value of sh_num_tiles_in_slice_minus1 present in each slice header shall be equal to NumTilesInPic - 1"); } } CHECK(sliceAddr >= pps->getNumTiles(), "Invalid slice address"); @@ -3835,11 +3834,11 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par if (picHeader->getPicInterSliceAllowedFlag()) { - READ_UVLC ( uiCode, "slice_type" ); pcSlice->setSliceType((SliceType)uiCode); + READ_UVLC ( uiCode, "sh_slice_type" ); pcSlice->setSliceType((SliceType)uiCode); VPS *vps = parameterSetManager->getVPS(sps->getVPSId()); if (pcSlice->isIRAP() && (sps->getVPSId() == 0 || pcSlice->getPOC() != prevPicPOC || vps->getIndependentLayerFlag(vps->getGeneralLayerIdx(pcSlice->getNalUnitLayerId())) == 1)) { - CHECK(uiCode != 2, "When nal_unit_type is in the range of IDR_W_RADL to CRA_NUT, inclusive, and vps_independent_layer_flag[ GeneralLayerIdx[ nuh_layer_id ] ] is equal to 1 or the current picture is the first picture in the current AU, slice_type shall be equal to 2"); + CHECK(uiCode != 2, "When nal_unit_type is in the range of IDR_W_RADL to CRA_NUT, inclusive, and vps_independent_layer_flag[ GeneralLayerIdx[ nuh_layer_id ] ] is equal to 1 or the current picture is the first picture in the current AU, sh_slice_type shall be equal to 2"); } } else @@ -3853,7 +3852,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par #if JVET_S0193_NO_OUTPUT_PRIOR_PIC if (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_GDR) { - READ_FLAG(uiCode, "no_output_of_prior_pics_flag"); pcSlice->setNoOutputOfPriorPicsFlag(uiCode != 0); + READ_FLAG(uiCode, "sh_no_output_of_prior_pics_flag"); pcSlice->setNoOutputOfPriorPicsFlag(uiCode != 0); } #endif // inherit values from picture header @@ -3862,20 +3861,20 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par if (sps->getALFEnabledFlag() && !pps->getAlfInfoInPhFlag()) { - READ_FLAG(uiCode, "slice_alf_enabled_flag"); + READ_FLAG(uiCode, "sh_alf_enabled_flag"); pcSlice->setTileGroupAlfEnabledFlag(COMPONENT_Y, uiCode); int alfCbEnabledFlag = 0; int alfCrEnabledFlag = 0; if (uiCode) { - READ_CODE(3, uiCode, "slice_num_alf_aps_ids_luma"); + READ_CODE(3, uiCode, "sh_num_alf_aps_ids_luma"); int numAps = uiCode; pcSlice->setTileGroupNumAps(numAps); std::vector<int> apsId(numAps, -1); for (int i = 0; i < numAps; i++) { - READ_CODE(3, uiCode, "slice_alf_aps_id_luma"); + READ_CODE(3, uiCode, "sh_alf_aps_id_luma[i]"); apsId[i] = uiCode; APS* APStoCheckLuma = parameterSetManager->getAPS(apsId[i], ALF_APS); CHECK(APStoCheckLuma == nullptr, "referenced APS not found"); @@ -3886,8 +3885,8 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par pcSlice->setAlfAPSs(apsId); if (bChroma) { - READ_CODE(1, uiCode, "slice_alf_cb_enabled_flag"); alfCbEnabledFlag = uiCode; - READ_CODE(1, uiCode, "slice_alf_cr_enabled_flag"); alfCrEnabledFlag = uiCode; + READ_CODE(1, uiCode, "sh_alf_cb_enabled_flag"); alfCbEnabledFlag = uiCode; + READ_CODE(1, uiCode, "sh_alf_cr_enabled_flag"); alfCrEnabledFlag = uiCode; } else { @@ -3896,7 +3895,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par } if (alfCbEnabledFlag || alfCrEnabledFlag) { - READ_CODE(3, uiCode, "slice_alf_aps_id_chroma"); + READ_CODE(3, uiCode, "sh_alf_aps_id_chroma"); pcSlice->setTileGroupApsIdChroma(uiCode); APS* APStoCheckChroma = parameterSetManager->getAPS(uiCode, ALF_APS); CHECK(APStoCheckChroma == nullptr, "referenced APS not found"); @@ -3913,25 +3912,25 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par CcAlfFilterParam &filterParam = pcSlice->m_ccAlfFilterParam; if (sps->getCCALFEnabledFlag() && pcSlice->getTileGroupAlfEnabledFlag(COMPONENT_Y)) { - READ_FLAG(uiCode, "slice_cc_alf_cb_enabled_flag"); + READ_FLAG(uiCode, "sh_alf_cc_cb_enabled_flag"); pcSlice->setTileGroupCcAlfCbEnabledFlag(uiCode); filterParam.ccAlfFilterEnabled[COMPONENT_Cb - 1] = (uiCode == 1) ? true : false; pcSlice->setTileGroupCcAlfCbApsId(-1); if (filterParam.ccAlfFilterEnabled[COMPONENT_Cb - 1]) { // parse APS ID - READ_CODE(3, uiCode, "slice_cc_alf_cb_aps_id"); + READ_CODE(3, uiCode, "sh_alf_cc_cb_aps_id"); pcSlice->setTileGroupCcAlfCbApsId(uiCode); } // Cr - READ_FLAG(uiCode, "slice_cc_alf_cr_enabled_flag"); + READ_FLAG(uiCode, "sh_alf_cc_cr_enabled_flag"); pcSlice->setTileGroupCcAlfCrEnabledFlag(uiCode); filterParam.ccAlfFilterEnabled[COMPONENT_Cr - 1] = (uiCode == 1) ? true : false; pcSlice->setTileGroupCcAlfCrApsId(-1); if (filterParam.ccAlfFilterEnabled[COMPONENT_Cr - 1]) { // parse APS ID - READ_CODE(3, uiCode, "slice_cc_alf_cr_aps_id"); + READ_CODE(3, uiCode, "sh_alf_cc_cr_aps_id"); pcSlice->setTileGroupCcAlfCrApsId(uiCode); } } @@ -3945,7 +3944,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par } if (picHeader->getLmcsEnabledFlag() && !pcSlice->getPictureHeaderInSliceHeader()) { - READ_FLAG(uiCode, "slice_lmcs_enabled_flag"); + READ_FLAG(uiCode, "sh_lmcs_used_flag"); pcSlice->setLmcsEnabledFlag(uiCode); } else @@ -3954,7 +3953,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par } if (picHeader->getExplicitScalingListEnabledFlag() && !pcSlice->getPictureHeaderInSliceHeader()) { - READ_FLAG(uiCode, "slice_explicit_scaling_list_used_flag"); + READ_FLAG(uiCode, "sh_explicit_scaling_list_used_flag"); pcSlice->setExplicitScalingListUsed(uiCode); } else @@ -4178,12 +4177,12 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par if ((!pcSlice->isIntra() && pcSlice->getRPL0()->getNumRefEntries() > 1) || (pcSlice->isInterB() && pcSlice->getRPL1()->getNumRefEntries() > 1) ) { - READ_FLAG( uiCode, "num_ref_idx_active_override_flag"); + READ_FLAG( uiCode, "sh_num_ref_idx_active_override_flag"); if (uiCode) { if(pcSlice->getRPL0()->getNumRefEntries() > 1) { - READ_UVLC (uiCode, "num_ref_idx_l0_active_minus1" ); + READ_UVLC (uiCode, "sh_num_ref_idx_active_minus1[0]" ); } else { @@ -4194,7 +4193,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par { if(pcSlice->getRPL1()->getNumRefEntries() > 1) { - READ_UVLC (uiCode, "num_ref_idx_l1_active_minus1" ); + READ_UVLC (uiCode, "sh_num_ref_idx_active_minus1[1]" ); } else { @@ -4252,7 +4251,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par pcSlice->setCabacInitFlag( false ); // default if(pps->getCabacInitPresentFlag() && !pcSlice->isIntra()) { - READ_FLAG(uiCode, "cabac_init_flag"); + READ_FLAG(uiCode, "sh_cabac_init_flag"); pcSlice->setCabacInitFlag( uiCode ? true : false ); pcSlice->setEncCABACTableIdx( pcSlice->getSliceType() == B_SLICE ? ( uiCode ? P_SLICE : B_SLICE ) : ( uiCode ? B_SLICE : P_SLICE ) ); } @@ -4265,7 +4264,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par } else if( !pps->getRplInfoInPhFlag() && pcSlice->getSliceType() == B_SLICE ) { - READ_FLAG( uiCode, "collocated_from_l0_flag" ); + READ_FLAG( uiCode, "sh_collocated_from_l0_flag" ); pcSlice->setColFromL0Flag( uiCode ); } else @@ -4279,7 +4278,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par ((pcSlice->getColFromL0Flag() == 1 && pcSlice->getNumRefIdx(REF_PIC_LIST_0) > 1)|| (pcSlice->getColFromL0Flag() == 0 && pcSlice->getNumRefIdx(REF_PIC_LIST_1) > 1))) { - READ_UVLC( uiCode, "collocated_ref_idx" ); + READ_UVLC( uiCode, "sh_collocated_ref_idx" ); pcSlice->setColRefIdx(uiCode); } else @@ -4330,7 +4329,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par } else { - READ_SVLC(iCode, "slice_qp_delta"); + READ_SVLC(iCode, "sh_qp_delta"); qpDelta = iCode; } pcSlice->setSliceQp(26 + pps->getPicInitQPMinus26() + qpDelta); @@ -4343,7 +4342,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par { if (numValidComp>COMPONENT_Cb) { - READ_SVLC( iCode, "slice_cb_qp_offset" ); + READ_SVLC( iCode, "sh_cb_qp_offset" ); pcSlice->setSliceChromaQpDelta(COMPONENT_Cb, iCode ); CHECK( pcSlice->getSliceChromaQpDelta(COMPONENT_Cb) < -12, "Invalid chroma QP offset" ); CHECK( pcSlice->getSliceChromaQpDelta(COMPONENT_Cb) > 12, "Invalid chroma QP offset" ); @@ -4353,7 +4352,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par if (numValidComp>COMPONENT_Cr) { - READ_SVLC( iCode, "slice_cr_qp_offset" ); + READ_SVLC( iCode, "sh_cr_qp_offset" ); pcSlice->setSliceChromaQpDelta(COMPONENT_Cr, iCode ); CHECK( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr) < -12, "Invalid chroma QP offset" ); CHECK( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr) > 12, "Invalid chroma QP offset" ); @@ -4361,7 +4360,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par CHECK( (pps->getQpOffset(COMPONENT_Cr) + pcSlice->getSliceChromaQpDelta(COMPONENT_Cr)) > 12, "Invalid chroma QP offset" ); if (sps->getJointCbCrEnabledFlag()) { - READ_SVLC(iCode, "slice_joint_cbcr_qp_offset" ); + READ_SVLC(iCode, "sh_joint_cbcr_qp_offset" ); pcSlice->setSliceChromaQpDelta(JOINT_CbCr, iCode); CHECK( pcSlice->getSliceChromaQpDelta(JOINT_CbCr) < -12, "Invalid chroma QP offset"); CHECK( pcSlice->getSliceChromaQpDelta(JOINT_CbCr) > 12, "Invalid chroma QP offset"); @@ -4373,7 +4372,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par if (pps->getCuChromaQpOffsetListEnabledFlag()) { - READ_FLAG(uiCode, "cu_chroma_qp_offset_enabled_flag"); pcSlice->setUseChromaQpAdj(uiCode != 0); + READ_FLAG(uiCode, "sh_cu_chroma_qp_offset_enabled_flag"); pcSlice->setUseChromaQpAdj(uiCode != 0); } else { @@ -4382,11 +4381,11 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par if (sps->getSAOEnabledFlag() && !pps->getSaoInfoInPhFlag()) { - READ_FLAG(uiCode, "slice_sao_luma_flag"); pcSlice->setSaoEnabledFlag(CHANNEL_TYPE_LUMA, (bool)uiCode); + READ_FLAG(uiCode, "sh_sao_luma_used_flag"); pcSlice->setSaoEnabledFlag(CHANNEL_TYPE_LUMA, (bool)uiCode); if (bChroma) { - READ_FLAG(uiCode, "slice_sao_chroma_flag"); pcSlice->setSaoEnabledFlag(CHANNEL_TYPE_CHROMA, (bool)uiCode); + READ_FLAG(uiCode, "sh_sao_chroma_used_flag"); pcSlice->setSaoEnabledFlag(CHANNEL_TYPE_CHROMA, (bool)uiCode); } } @@ -4395,7 +4394,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par { if (pps->getDeblockingFilterOverrideEnabledFlag() && !pps->getDbfInfoInPhFlag()) { - READ_FLAG ( uiCode, "slice_deblocking_filter_override_flag" ); pcSlice->setDeblockingFilterOverrideFlag(uiCode ? true : false); + READ_FLAG ( uiCode, "sh_deblocking_params_present_flag" ); pcSlice->setDeblockingFilterOverrideFlag(uiCode ? true : false); } else { @@ -4405,7 +4404,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par { if (!pps->getPPSDeblockingFilterDisabledFlag()) { - READ_FLAG(uiCode, "slice_deblocking_filter_disabled_flag"); pcSlice->setDeblockingFilterDisable(uiCode ? 1 : 0); + READ_FLAG(uiCode, "sh_deblocking_filter_disabled_flag"); pcSlice->setDeblockingFilterDisable(uiCode ? 1 : 0); } else { @@ -4413,26 +4412,26 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par } if(!pcSlice->getDeblockingFilterDisable()) { - READ_SVLC( iCode, "slice_beta_offset_div2" ); pcSlice->setDeblockingFilterBetaOffsetDiv2( iCode ); + READ_SVLC( iCode, "sh_luma_beta_offset_div2" ); pcSlice->setDeblockingFilterBetaOffsetDiv2( iCode ); CHECK( pcSlice->getDeblockingFilterBetaOffsetDiv2() < -12 || pcSlice->getDeblockingFilterBetaOffsetDiv2() > 12, "Invalid deblocking filter configuration"); - READ_SVLC( iCode, "slice_tc_offset_div2" ); pcSlice->setDeblockingFilterTcOffsetDiv2( iCode ); + READ_SVLC( iCode, "sh_luma_tc_offset_div2" ); pcSlice->setDeblockingFilterTcOffsetDiv2( iCode ); CHECK( pcSlice->getDeblockingFilterTcOffsetDiv2() < -12 || pcSlice->getDeblockingFilterTcOffsetDiv2() > 12, "Invalid deblocking filter configuration"); if( pps->getPPSChromaToolFlag() ) { - READ_SVLC( iCode, "slice_cb_beta_offset_div2" ); pcSlice->setDeblockingFilterCbBetaOffsetDiv2( iCode ); + READ_SVLC( iCode, "sh_cb_beta_offset_div2" ); pcSlice->setDeblockingFilterCbBetaOffsetDiv2( iCode ); CHECK( pcSlice->getDeblockingFilterCbBetaOffsetDiv2() < -12 || pcSlice->getDeblockingFilterCbBetaOffsetDiv2() > 12, "Invalid deblocking filter configuration" ); - READ_SVLC( iCode, "slice_cb_tc_offset_div2" ); pcSlice->setDeblockingFilterCbTcOffsetDiv2( iCode ); + READ_SVLC( iCode, "sh_cb_tc_offset_div2" ); pcSlice->setDeblockingFilterCbTcOffsetDiv2( iCode ); CHECK( pcSlice->getDeblockingFilterCbTcOffsetDiv2() < -12 || pcSlice->getDeblockingFilterCbTcOffsetDiv2() > 12, "Invalid deblocking filter configuration" ); - READ_SVLC( iCode, "slice_cr_beta_offset_div2" ); pcSlice->setDeblockingFilterCrBetaOffsetDiv2( iCode ); + READ_SVLC( iCode, "sh_cr_beta_offset_div2" ); pcSlice->setDeblockingFilterCrBetaOffsetDiv2( iCode ); CHECK( pcSlice->getDeblockingFilterCrBetaOffsetDiv2() < -12 || pcSlice->getDeblockingFilterCrBetaOffsetDiv2() > 12, "Invalid deblocking filter configuration" ); - READ_SVLC( iCode, "slice_cr_tc_offset_div2" ); pcSlice->setDeblockingFilterCrTcOffsetDiv2( iCode ); + READ_SVLC( iCode, "sh_cr_tc_offset_div2" ); pcSlice->setDeblockingFilterCrTcOffsetDiv2( iCode ); CHECK( pcSlice->getDeblockingFilterCrTcOffsetDiv2() < -12 || pcSlice->getDeblockingFilterCrTcOffsetDiv2() > 12, "Invalid deblocking filter configuration" ); } @@ -4470,7 +4469,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par // dependent quantization if( sps->getDepQuantEnabledFlag() ) { - READ_FLAG(uiCode, "slice_dep_quant_enabled_flag"); + READ_FLAG(uiCode, "sh_dep_quant_used_flag"); pcSlice->setDepQuantEnabledFlag(uiCode != 0); } else @@ -4481,7 +4480,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par // sign data hiding if( sps->getSignDataHidingEnabledFlag() && !pcSlice->getDepQuantEnabledFlag() ) { - READ_FLAG( uiCode, "slice_sign_data_hiding_enabled_flag" ); + READ_FLAG( uiCode, "sh_sign_data_hiding_used_flag" ); pcSlice->setSignDataHidingEnabledFlag( uiCode != 0 ); } else @@ -4492,7 +4491,7 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par // signal TS residual coding disabled flag if (sps->getTransformSkipEnabledFlag() && !pcSlice->getDepQuantEnabledFlag() && !pcSlice->getSignDataHidingEnabledFlag()) { - READ_FLAG(uiCode, "slice_ts_residual_coding_disabled_flag"); + READ_FLAG(uiCode, "sh_ts_residual_coding_disabled_flag"); pcSlice->setTSResidualCodingDisabledFlag( uiCode != 0 ); } else @@ -4508,11 +4507,11 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par if(pps->getSliceHeaderExtensionPresentFlag()) { - READ_UVLC(uiCode,"slice_segment_header_extension_length"); + READ_UVLC(uiCode,"sh_slice_header_extension_length"); for(int i=0; i<uiCode; i++) { uint32_t ignore_; - READ_CODE(8,ignore_,"slice_segment_header_extension_data_byte"); + READ_CODE(8,ignore_,"sh_slice_header_extension_data_byte"); } } @@ -4525,11 +4524,11 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par if( pcSlice->getNumEntryPoints() > 0 ) { uint32_t offsetLenMinus1; - READ_UVLC( offsetLenMinus1, "offset_len_minus1" ); + READ_UVLC( offsetLenMinus1, "sh_entry_offset_len_minus1" ); entryPointOffset.resize( pcSlice->getNumEntryPoints() ); for( uint32_t idx = 0; idx < pcSlice->getNumEntryPoints(); idx++ ) { - READ_CODE( offsetLenMinus1 + 1, uiCode, "entry_point_offset_minus1" ); + READ_CODE( offsetLenMinus1 + 1, uiCode, "sh_entry_point_offset_minus1" ); entryPointOffset[idx] = uiCode + 1; } } @@ -4595,24 +4594,24 @@ void HLSyntaxReader::getSlicePoc(Slice* pcSlice, PicHeader* picHeader, Parameter //!KS: need to add error handling code here, if SPS is not available CHECK(sps==0, "Invalid SPS"); - READ_FLAG(uiCode, "picture_header_in_slice_header_flag"); + READ_FLAG(uiCode, "sh_picture_header_in_slice_header_flag"); if (uiCode == 0) { pocLsb = picHeader->getPocLsb(); } else { - READ_FLAG(uiCode, "gdr_or_irap_pic_flag"); + READ_FLAG(uiCode, "ph_gdr_or_irap_pic_flag"); if (uiCode) { - READ_FLAG(uiCode, "gdr_pic_flag"); + READ_FLAG(uiCode, "ph_gdr_pic_flag"); } READ_FLAG(uiCode, "ph_inter_slice_allowed_flag"); if (uiCode) { READ_FLAG(uiCode, "ph_intra_slice_allowed_flag"); } - READ_FLAG(uiCode, "non_reference_picture_flag"); + READ_FLAG(uiCode, "ph_non_reference_picture_flag"); // parameter sets READ_UVLC(uiCode, "ph_pic_parameter_set_id"); // picture order count diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index 0248e21eebd15f0f300892e0d2bc84440556f24b..135e37d4fd32979a1a18d4c39a2a672451e3d8f5 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -3632,7 +3632,7 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic, { if(sps->getSubPicIdMappingExplicitlySignalledFlag()) { - if(sps->getSubPicIdMappingInSpsFlag()) + if(sps->getSubPicIdMappingPresentFlag()) { subpicIDs = sps->getSubPicIds(); } diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 4db7763f1cb9e2ae426fce6ea0ab88bcc3bedc70..3247b75025e25662417ffd9f7829c815a31dcd22 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -320,10 +320,10 @@ void EncLib::init( bool isFieldCoding, AUWriterIf* auWriterIf ) sps0.setPPSValidFlag(pps.getPPSId(), true); sps0.setScalingWindowSizeInPPS(pps.getPPSId(), scaledWidth, scaledHeight); } - int curSeqMaxPicWidthY = sps0.getMaxPicWidthInLumaSamples(); // pic_width_max_in_luma_samples - int curSeqMaxPicHeightY = sps0.getMaxPicHeightInLumaSamples(); // pic_height_max_in_luma_samples - int curPicWidthY = width; // pic_width_in_luma_samples - int curPicHeightY = height; // pic_height_in_luma_samples + int curSeqMaxPicWidthY = sps0.getMaxPicWidthInLumaSamples(); // sps_pic_width_max_in_luma_samples + int curSeqMaxPicHeightY = sps0.getMaxPicHeightInLumaSamples(); // sps_pic_height_max_in_luma_samples + int curPicWidthY = width; // pps_pic_width_in_luma_samples + int curPicHeightY = height; // pps_pic_height_in_luma_samples int max8MinCbSizeY = std::max((int)8, (1 << sps0.getLog2MinCodingBlockSize())); // Max(8, MinCbSizeY) //Warning message of potential scaling window size violation for (int i = 0; i < 64; i++) @@ -1007,7 +1007,7 @@ void EncLib::xInitVPS( const SPS& sps ) // set the VPS profile information. m_vps->m_olsHrdParams.clear(); - m_vps->m_olsHrdParams.resize(m_vps->getNumOlsHrdParamsMinus1(), std::vector<OlsHrdParams>(m_vps->getMaxSubLayers())); + m_vps->m_olsHrdParams.resize(m_vps->getNumOlsTimingHrdParamsMinus1(), std::vector<OlsHrdParams>(m_vps->getMaxSubLayers())); ProfileLevelTierFeatures profileLevelTierFeatures; profileLevelTierFeatures.extractPTLInformation( sps ); @@ -1056,14 +1056,14 @@ void EncLib::xInitVPS( const SPS& sps ) if( m_vps->getMaxSubLayers() == 1 ) { - // When vps_max_sublayers_minus1 is equal to 0, the value of dpb_max_temporal_id[ dpbIdx ] is inferred to be equal to 0. + // When vps_max_sublayers_minus1 is equal to 0, the value of vps_dpb_max_tid[ dpbIdx ] is inferred to be equal to 0. m_vps->m_dpbMaxTemporalId[dpbIdx] = 0; } else { if( m_vps->getAllLayersSameNumSublayersFlag() ) { - // When vps_max_sublayers_minus1 is greater than 0 and vps_all_layers_same_num_sublayers_flag is equal to 1, the value of dpb_max_temporal_id[ dpbIdx ] is inferred to be equal to vps_max_sublayers_minus1. + // When vps_max_sublayers_minus1 is greater than 0 and vps_all_layers_same_num_sublayers_flag is equal to 1, the value of vps_dpb_max_tid[ dpbIdx ] is inferred to be equal to vps_max_sublayers_minus1. m_vps->m_dpbMaxTemporalId[dpbIdx] = m_vps->getMaxSubLayers() - 1; } else @@ -1325,7 +1325,7 @@ void EncLib::xInitSPS( SPS& sps ) sps.setUseLmcs ( m_lmcsEnabled ); sps.setUseMRL ( m_MRL ); sps.setUseMIP ( m_MIP ); - CHECK(m_log2MinCUSize > std::min(6, floorLog2(sps.getMaxCUWidth())), "log2_min_luma_coding_block_size_minus2 shall be in the range of 0 to min (4, log2_ctu_size - 2)"); + CHECK(m_log2MinCUSize > std::min(6, floorLog2(sps.getMaxCUWidth())), "sps_log2_min_luma_coding_block_size_minus2 shall be in the range of 0 to min (4, log2_ctu_size - 2)"); CHECK(m_uiMaxMTTHierarchyDepth > 2 * (floorLog2(sps.getCTUSize()) - sps.getLog2MinCodingBlockSize()), "sps_max_mtt_hierarchy_depth_inter_slice shall be in the range 0 to 2*(ctbLog2SizeY - log2MinCUSize)"); CHECK(m_uiMaxMTTHierarchyDepthI > 2 * (floorLog2(sps.getCTUSize()) - sps.getLog2MinCodingBlockSize()), "sps_max_mtt_hierarchy_depth_intra_slice_luma shall be in the range 0 to 2*(ctbLog2SizeY - log2MinCUSize)"); CHECK(m_uiMaxMTTHierarchyDepthIChroma > 2 * (floorLog2(sps.getCTUSize()) - sps.getLog2MinCodingBlockSize()), "sps_max_mtt_hierarchy_depth_intra_slice_chroma shall be in the range 0 to 2*(ctbLog2SizeY - log2MinCUSize)"); @@ -1481,7 +1481,7 @@ void EncLib::xInitSPS( SPS& sps ) sps.setSubPicIdMappingExplicitlySignalledFlag(m_subPicIdMappingExplicitlySignalledFlag); if (m_subPicIdMappingExplicitlySignalledFlag) { - sps.setSubPicIdMappingInSpsFlag(m_subPicIdMappingInSpsFlag); + sps.setSubPicIdMappingPresentFlag(m_subPicIdMappingInSpsFlag); if (m_subPicIdMappingInSpsFlag) { sps.setSubPicId(m_subPicId); @@ -1538,7 +1538,7 @@ void EncLib::xInitSPS( SPS& sps ) sps.setLog2ParallelMergeLevelMinus2( m_log2ParallelMergeLevelMinus2 ); - CHECK(sps.getResChangeInClvsEnabledFlag() && sps.getVirtualBoundariesEnabledFlag(), "when the value of res_change_in_clvs_allowed_flag is equal to 1, the value of sps_virtual_boundaries_present_flag shall be equal to 0"); + CHECK(sps.getResChangeInClvsEnabledFlag() && sps.getVirtualBoundariesEnabledFlag(), "when the value of sps_res_change_in_clvs_allowed_flag is equal to 1, the value of sps_virtual_boundaries_present_flag shall be equal to 0"); } void EncLib::xInitHrdParameters(SPS &sps) @@ -1715,7 +1715,7 @@ void EncLib::xInitPPS(PPS &pps, const SPS &sps) pps.setWrapAroundOffset ( 0 ); } CHECK( !sps.getWrapAroundEnabledFlag() && pps.getWrapAroundEnabledFlag(), "When sps_ref_wraparound_enabled_flag is equal to 0, the value of pps_ref_wraparound_enabled_flag shall be equal to 0."); - CHECK( (((sps.getCTUSize() / minCbSizeY) + 1) > ((pps.getPicWidthInLumaSamples() / minCbSizeY) - 1)) && pps.getWrapAroundEnabledFlag(), "When the value of CtbSizeY / MinCbSizeY + 1 is greater than pic_width_in_luma_samples / MinCbSizeY - 1, the value of pps_ref_wraparound_enabled_flag shall be equal to 0."); + CHECK( (((sps.getCTUSize() / minCbSizeY) + 1) > ((pps.getPicWidthInLumaSamples() / minCbSizeY) - 1)) && pps.getWrapAroundEnabledFlag(), "When the value of CtbSizeY / MinCbSizeY + 1 is greater than pps_pic_width_in_luma_samples / MinCbSizeY - 1, the value of pps_ref_wraparound_enabled_flag shall be equal to 0."); pps.setNoPicPartitionFlag( m_noPicPartitionFlag ); if( m_noPicPartitionFlag == false ) @@ -1961,9 +1961,9 @@ void EncLib::xInitPicHeader(PicHeader &picHeader, const SPS &sps, const PPS &pps picHeader.setGdrPicFlag(false); // BDOF / DMVR / PROF - picHeader.setDisBdofFlag(false); - picHeader.setDisDmvrFlag(false); - picHeader.setDisProfFlag(false); + picHeader.setBdofDisabledFlag(false); + picHeader.setDmvrDisabledFlag(false); + picHeader.setProfDisabledFlag(false); } void EncLib::xInitAPS(APS &aps) diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 15fbdccd7d9ca1653d92b4bc270e3aa8e1295576..33bb0c6a93fc4aa0ebed8aee564683f4a7cd09d9 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -277,10 +277,11 @@ void HLSWriter::codePPS( const PPS* pcPPS ) WRITE_CODE( pcPPS->getPPSId(), 6, "pps_pic_parameter_set_id" ); WRITE_CODE( pcPPS->getSPSId(), 4, "pps_seq_parameter_set_id" ); - WRITE_FLAG( pcPPS->getMixedNaluTypesInPicFlag() ? 1 : 0, "mixed_nalu_types_in_pic_flag" ); + WRITE_FLAG( pcPPS->getMixedNaluTypesInPicFlag() ? 1 : 0, "pps_mixed_nalu_types_in_pic_flag" ); + + WRITE_UVLC( pcPPS->getPicWidthInLumaSamples(), "pps_pic_width_in_luma_samples" ); + WRITE_UVLC( pcPPS->getPicHeightInLumaSamples(), "pps_pic_height_in_luma_samples" ); - WRITE_UVLC( pcPPS->getPicWidthInLumaSamples(), "pic_width_in_luma_samples" ); - WRITE_UVLC( pcPPS->getPicHeightInLumaSamples(), "pic_height_in_luma_samples" ); Window conf = pcPPS->getConformanceWindow(); #if JVET_R0068_ASPECT6_ENC_RESTRICTION WRITE_FLAG(pcPPS->getConformanceWindowFlag(), "pps_conformance_window_flag"); @@ -297,7 +298,7 @@ void HLSWriter::codePPS( const PPS* pcPPS ) } Window scalingWindow = pcPPS->getScalingWindow(); - WRITE_FLAG( scalingWindow.getWindowEnabledFlag(), "scaling_window_flag" ); + WRITE_FLAG( scalingWindow.getWindowEnabledFlag(), "pps_scaling_window_explicit_signalling_flag" ); if( scalingWindow.getWindowEnabledFlag() ) { WRITE_SVLC( scalingWindow.getWindowLeftOffset(), "pps_scaling_win_left_offset" ); @@ -306,9 +307,9 @@ void HLSWriter::codePPS( const PPS* pcPPS ) WRITE_SVLC( scalingWindow.getWindowBottomOffset(), "pps_scaling_win_bottom_offset" ); } - WRITE_FLAG( pcPPS->getOutputFlagPresentFlag() ? 1 : 0, "output_flag_present_flag" ); + WRITE_FLAG( pcPPS->getOutputFlagPresentFlag() ? 1 : 0, "pps_output_flag_present_flag" ); WRITE_FLAG( pcPPS->getNoPicPartitionFlag() ? 1 : 0, "pps_no_pic_partition_flag" ); - WRITE_FLAG( pcPPS->getSubPicIdMappingInPpsFlag() ? 1 : 0, "subpic_id_mapping_in_pps_flag" ); + WRITE_FLAG( pcPPS->getSubPicIdMappingInPpsFlag() ? 1 : 0, "pps_subpic_id_mapping_present_flag" ); if( pcPPS->getSubPicIdMappingInPpsFlag() ) { CHECK(pcPPS->getNumSubPics() < 1, "PPS: NumSubPics cannot be less than 1"); @@ -333,35 +334,35 @@ void HLSWriter::codePPS( const PPS* pcPPS ) WRITE_CODE( pcPPS->getLog2CtuSize() - 5, 2, "pps_log2_ctu_size_minus5" ); // number of explicit tile columns/rows - WRITE_UVLC( pcPPS->getNumExpTileColumns() - 1, "num_exp_tile_columns_minus1" ); - WRITE_UVLC( pcPPS->getNumExpTileRows() - 1, "num_exp_tile_rows_minus1" ); + WRITE_UVLC( pcPPS->getNumExpTileColumns() - 1, "pps_num_exp_tile_columns_minus1" ); + WRITE_UVLC( pcPPS->getNumExpTileRows() - 1, "pps_num_exp_tile_rows_minus1" ); // tile sizes for( colIdx = 0; colIdx < pcPPS->getNumExpTileColumns(); colIdx++ ) { - WRITE_UVLC( pcPPS->getTileColumnWidth( colIdx ) - 1, "tile_column_width_minus1[i]" ); + WRITE_UVLC( pcPPS->getTileColumnWidth( colIdx ) - 1, "pps_tile_column_width_minus1[i]" ); } for( rowIdx = 0; rowIdx < pcPPS->getNumExpTileRows(); rowIdx++ ) { - WRITE_UVLC( pcPPS->getTileRowHeight( rowIdx ) - 1, "tile_row_height_minus1[i]" ); + WRITE_UVLC( pcPPS->getTileRowHeight( rowIdx ) - 1, "pps_tile_row_height_minus1[i]" ); } // rectangular slice signalling if (pcPPS->getNumTiles() > 1) { WRITE_FLAG(pcPPS->getLoopFilterAcrossTilesEnabledFlag(), "pps_loop_filter_across_tiles_enabled_flag"); - WRITE_FLAG(pcPPS->getRectSliceFlag() ? 1 : 0, "rect_slice_flag"); + WRITE_FLAG(pcPPS->getRectSliceFlag() ? 1 : 0, "pps_rect_slice_flag"); } if (pcPPS->getRectSliceFlag()) { - WRITE_FLAG(pcPPS->getSingleSlicePerSubPicFlag( ) ? 1 : 0, "single_slice_per_subpic_flag"); + WRITE_FLAG(pcPPS->getSingleSlicePerSubPicFlag( ) ? 1 : 0, "pps_single_slice_per_subpic_flag"); } if (pcPPS->getRectSliceFlag() & !(pcPPS->getSingleSlicePerSubPicFlag())) { - WRITE_UVLC( pcPPS->getNumSlicesInPic( ) - 1, "num_slices_in_pic_minus1" ); + WRITE_UVLC( pcPPS->getNumSlicesInPic( ) - 1, "pps_num_slices_in_pic_minus1" ); if ((pcPPS->getNumSlicesInPic() - 1) > 1) { - WRITE_FLAG(pcPPS->getTileIdxDeltaPresentFlag() ? 1 : 0, "tile_idx_delta_present_flag"); + WRITE_FLAG(pcPPS->getTileIdxDeltaPresentFlag() ? 1 : 0, "pps_tile_idx_delta_present_flag"); } // write rectangular slice parameters @@ -370,13 +371,13 @@ void HLSWriter::codePPS( const PPS* pcPPS ) // complete tiles within a single slice if( ( pcPPS->getSliceTileIdx( i ) % pcPPS->getNumTileColumns() ) != pcPPS->getNumTileColumns() - 1 ) { - WRITE_UVLC( pcPPS->getSliceWidthInTiles( i ) - 1, "slice_width_in_tiles_minus1[i]" ); + WRITE_UVLC( pcPPS->getSliceWidthInTiles( i ) - 1, "pps_slice_width_in_tiles_minus1[i]" ); } if( pcPPS->getSliceTileIdx( i ) / pcPPS->getNumTileColumns() != pcPPS->getNumTileRows() - 1 && ( pcPPS->getTileIdxDeltaPresentFlag() || pcPPS->getSliceTileIdx( i ) % pcPPS->getNumTileColumns() == 0 ) ) { - WRITE_UVLC( pcPPS->getSliceHeightInTiles( i ) - 1, "slice_height_in_tiles_minus1[i]" ); + WRITE_UVLC( pcPPS->getSliceHeightInTiles( i ) - 1, "pps_slice_height_in_tiles_minus1[i]" ); } // multiple slices within a single tile special case @@ -394,10 +395,10 @@ void HLSWriter::codePPS( const PPS* pcPPS ) } } uint32_t expSliceHeightSum = 0; - WRITE_UVLC(numExpSliceInTile, "num_exp_slices_in_tile[i]"); + WRITE_UVLC(numExpSliceInTile, "pps_num_exp_slices_in_tile[i]"); for( int j = 0; j < numExpSliceInTile; j++ ) { - WRITE_UVLC(pcPPS->getSliceHeightInCtu(i + j) - 1, "exp_slice_height_in_ctus_minus1[i]"); + WRITE_UVLC(pcPPS->getSliceHeightInCtu(i + j) - 1, "pps_exp_slice_height_in_ctus_minus1[i]"); expSliceHeightSum += pcPPS->getSliceHeightInCtu(i + j); } @@ -411,7 +412,7 @@ void HLSWriter::codePPS( const PPS* pcPPS ) if( pcPPS->getTileIdxDeltaPresentFlag() ) { int32_t tileIdxDelta = pcPPS->getSliceTileIdx( i + 1 ) - pcPPS->getSliceTileIdx( i ); - WRITE_SVLC( tileIdxDelta, "tile_idx_delta[i]" ); + WRITE_SVLC( tileIdxDelta, "pps_tile_idx_delta[i]" ); } } } @@ -419,17 +420,17 @@ void HLSWriter::codePPS( const PPS* pcPPS ) if (pcPPS->getRectSliceFlag() == 0 || pcPPS->getSingleSlicePerSubPicFlag() || pcPPS->getNumSlicesInPic() > 1) { - WRITE_FLAG( pcPPS->getLoopFilterAcrossSlicesEnabledFlag(), "loop_filter_across_slices_enabled_flag"); + WRITE_FLAG( pcPPS->getLoopFilterAcrossSlicesEnabledFlag(), "pps_loop_filter_across_slices_enabled_flag"); } } - WRITE_FLAG( pcPPS->getCabacInitPresentFlag() ? 1 : 0, "cabac_init_present_flag" ); - WRITE_UVLC( pcPPS->getNumRefIdxL0DefaultActive()-1, "num_ref_idx_l0_default_active_minus1"); - WRITE_UVLC( pcPPS->getNumRefIdxL1DefaultActive()-1, "num_ref_idx_l1_default_active_minus1"); - WRITE_FLAG( pcPPS->getRpl1IdxPresentFlag() ? 1 : 0, "rpl1_idx_present_flag"); + WRITE_FLAG( pcPPS->getCabacInitPresentFlag() ? 1 : 0, "pps_cabac_init_present_flag" ); + WRITE_UVLC( pcPPS->getNumRefIdxL0DefaultActive()-1, "pps_num_ref_idx_default_active_minus1[0]"); + WRITE_UVLC( pcPPS->getNumRefIdxL1DefaultActive()-1, "pps_num_ref_idx_default_active_minus1[1]"); + WRITE_FLAG( pcPPS->getRpl1IdxPresentFlag() ? 1 : 0, "pps_rpl1_idx_present_flag"); #if JVET_S0132_HLS_REORDER - WRITE_FLAG( pcPPS->getUseWP() ? 1 : 0, "weighted_pred_flag" ); // Use of Weighting Prediction (P_SLICE) - WRITE_FLAG( pcPPS->getWPBiPred() ? 1 : 0, "weighted_bipred_flag" ); // Use of Weighting Bi-Prediction (B_SLICE) + WRITE_FLAG( pcPPS->getUseWP() ? 1 : 0, "pps_weighted_pred_flag" ); // Use of Weighting Prediction (P_SLICE) + WRITE_FLAG( pcPPS->getWPBiPred() ? 1 : 0, "pps_weighted_bipred_flag" ); // Use of Weighting Bi-Prediction (B_SLICE) WRITE_FLAG( pcPPS->getWrapAroundEnabledFlag() ? 1 : 0, "pps_ref_wraparound_enabled_flag" ); if( pcPPS->getWrapAroundEnabledFlag() ) { @@ -437,8 +438,8 @@ void HLSWriter::codePPS( const PPS* pcPPS ) } #endif - WRITE_SVLC( pcPPS->getPicInitQPMinus26(), "init_qp_minus26"); - WRITE_FLAG( pcPPS->getUseDQP() ? 1 : 0, "cu_qp_delta_enabled_flag" ); + WRITE_SVLC( pcPPS->getPicInitQPMinus26(), "pps_init_qp_minus26"); + WRITE_FLAG( pcPPS->getUseDQP() ? 1 : 0, "pps_cu_qp_delta_enabled_flag" ); WRITE_FLAG(pcPPS->getPPSChromaToolFlag() ? 1 : 0, "pps_chroma_tool_offsets_present_flag"); if (pcPPS->getPPSChromaToolFlag()) { @@ -455,27 +456,27 @@ void HLSWriter::codePPS( const PPS* pcPPS ) WRITE_FLAG(uint32_t(pcPPS->getCuChromaQpOffsetListEnabledFlag()), "pps_cu_chroma_qp_offset_list_enabled_flag" ); if (pcPPS->getCuChromaQpOffsetListEnabledFlag()) { - WRITE_UVLC(pcPPS->getChromaQpOffsetListLen() - 1, "chroma_qp_offset_list_len_minus1"); + WRITE_UVLC(pcPPS->getChromaQpOffsetListLen() - 1, "pps_chroma_qp_offset_list_len_minus1"); /* skip zero index */ for (int cuChromaQpOffsetIdx = 0; cuChromaQpOffsetIdx < pcPPS->getChromaQpOffsetListLen(); cuChromaQpOffsetIdx++) { - WRITE_SVLC(pcPPS->getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CbOffset, "cb_qp_offset_list[i]"); - WRITE_SVLC(pcPPS->getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CrOffset, "cr_qp_offset_list[i]"); + WRITE_SVLC(pcPPS->getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CbOffset, "pps_cb_qp_offset_list[i]"); + WRITE_SVLC(pcPPS->getChromaQpOffsetListEntry(cuChromaQpOffsetIdx+1).u.comp.CrOffset, "pps_cr_qp_offset_list[i]"); if (pcPPS->getJointCbCrQpOffsetPresentFlag()) { - WRITE_SVLC(pcPPS->getChromaQpOffsetListEntry(cuChromaQpOffsetIdx + 1).u.comp.JointCbCrOffset, "joint_cbcr_qp_offset_list[i]"); + WRITE_SVLC(pcPPS->getChromaQpOffsetListEntry(cuChromaQpOffsetIdx + 1).u.comp.JointCbCrOffset, "pps_joint_cbcr_qp_offset_list[i]"); } } } } #if !JVET_S0132_HLS_REORDER - WRITE_FLAG( pcPPS->getUseWP() ? 1 : 0, "weighted_pred_flag" ); // Use of Weighting Prediction (P_SLICE) - WRITE_FLAG( pcPPS->getWPBiPred() ? 1 : 0, "weighted_bipred_flag" ); // Use of Weighting Bi-Prediction (B_SLICE) + WRITE_FLAG( pcPPS->getUseWP() ? 1 : 0, "pps_weighted_pred_flag" ); // Use of Weighting Prediction (P_SLICE) + WRITE_FLAG( pcPPS->getWPBiPred() ? 1 : 0, "pps_weighted_bipred_flag" ); // Use of Weighting Bi-Prediction (B_SLICE) #endif - WRITE_FLAG( pcPPS->getDeblockingFilterControlPresentFlag()?1 : 0, "deblocking_filter_control_present_flag"); + WRITE_FLAG( pcPPS->getDeblockingFilterControlPresentFlag()?1 : 0, "pps_deblocking_filter_control_present_flag"); if(pcPPS->getDeblockingFilterControlPresentFlag()) { - WRITE_FLAG( pcPPS->getDeblockingFilterOverrideEnabledFlag() ? 1 : 0, "deblocking_filter_override_enabled_flag" ); + WRITE_FLAG( pcPPS->getDeblockingFilterOverrideEnabledFlag() ? 1 : 0, "pps_deblocking_filter_override_enabled_flag" ); WRITE_FLAG( pcPPS->getPPSDeblockingFilterDisabledFlag() ? 1 : 0, "pps_deblocking_filter_disabled_flag" ); if (!pcPPS->getNoPicPartitionFlag() && pcPPS->getDeblockingFilterOverrideEnabledFlag()) { @@ -513,8 +514,8 @@ void HLSWriter::codePPS( const PPS* pcPPS ) } #endif - WRITE_FLAG( pcPPS->getPictureHeaderExtensionPresentFlag() ? 1 : 0, "picture_header_extension_present_flag"); - WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_header_extension_present_flag"); + WRITE_FLAG( pcPPS->getPictureHeaderExtensionPresentFlag() ? 1 : 0, "pps_picture_header_extension_present_flag"); + WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "pps_slice_header_extension_present_flag"); WRITE_FLAG(0, "pps_extension_flag"); xWriteRbspTrailingBits(); @@ -848,7 +849,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_CODE(pcSPS->getMaxTLayers() - 1, 3, "sps_max_sub_layers_minus1"); #if JVET_S0186_SPS_CLEANUP - WRITE_CODE(int(pcSPS->getChromaFormatIdc()), 2, "chroma_format_idc"); + WRITE_CODE(int(pcSPS->getChromaFormatIdc()), 2, "sps_chroma_format_idc"); WRITE_CODE(floorLog2(pcSPS->getCTUSize()) - 5, 2, "sps_log2_ctu_size_minus5"); #else WRITE_CODE(0, 4, "sps_reserved_zero_4bits"); @@ -865,7 +866,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) codeProfileTierLevel(pcSPS->getProfileTierLevel(), true, pcSPS->getMaxTLayers() - 1); } - WRITE_FLAG(pcSPS->getGDREnabledFlag(), "gdr_enabled_flag"); + WRITE_FLAG(pcSPS->getGDREnabledFlag(), "sps_gdr_enabled_flag"); #if !JVET_S0186_SPS_CLEANUP WRITE_CODE(int(pcSPS->getChromaFormatIdc ()), 2, "chroma_format_idc"); #endif @@ -882,17 +883,17 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) const uint32_t chromaArrayType = separate_colour_plane_flag ? 0 : format; #endif - WRITE_FLAG(pcSPS->getRprEnabledFlag(), "ref_pic_resampling_enabled_flag"); + WRITE_FLAG(pcSPS->getRprEnabledFlag(), "sps_ref_pic_resampling_enabled_flag"); if (pcSPS->getRprEnabledFlag()) { - WRITE_FLAG(pcSPS->getResChangeInClvsEnabledFlag(), "res_change_in_clvs_allowed_flag"); + WRITE_FLAG(pcSPS->getResChangeInClvsEnabledFlag(), "sps_res_change_in_clvs_allowed_flag"); } #if JVET_Q0114_ASPECT5_GCI_FLAG - CHECK(!pcSPS->getRprEnabledFlag() && pcSPS->getResChangeInClvsEnabledFlag(), "When ref_pic_resampling_enabled_flag is equal to 0, sps_res_change_in_clvs_allowed_flag shall be equal to 0"); + CHECK(!pcSPS->getRprEnabledFlag() && pcSPS->getResChangeInClvsEnabledFlag(), "When sps_ref_pic_resampling_enabled_flag is equal to 0, sps_res_change_in_clvs_allowed_flag shall be equal to 0"); #endif - WRITE_UVLC( pcSPS->getMaxPicWidthInLumaSamples(), "pic_width_max_in_luma_samples" ); - WRITE_UVLC( pcSPS->getMaxPicHeightInLumaSamples(), "pic_height_max_in_luma_samples" ); + WRITE_UVLC( pcSPS->getMaxPicWidthInLumaSamples(), "sps_pic_width_max_in_luma_samples" ); + WRITE_UVLC( pcSPS->getMaxPicHeightInLumaSamples(), "sps_pic_height_max_in_luma_samples" ); Window conf = pcSPS->getConformanceWindow(); WRITE_FLAG(conf.getWindowEnabledFlag(), "sps_conformance_window_flag"); if (conf.getWindowEnabledFlag()) @@ -907,7 +908,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_CODE(floorLog2(pcSPS->getCTUSize()) - 5, 2, "sps_log2_ctu_size_minus5"); #endif - WRITE_FLAG(pcSPS->getSubPicInfoPresentFlag(), "subpic_info_present_flag"); + WRITE_FLAG(pcSPS->getSubPicInfoPresentFlag(), "sps_subpic_info_present_flag"); if (pcSPS->getSubPicInfoPresentFlag()) { @@ -926,25 +927,25 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) { if ((picIdx > 0) && (pcSPS->getMaxPicWidthInLumaSamples() > pcSPS->getCTUSize())) { - WRITE_CODE(pcSPS->getSubPicCtuTopLeftX(picIdx), ceilLog2(tmpWidthVal), "subpic_ctu_top_left_x[ i ]"); + WRITE_CODE(pcSPS->getSubPicCtuTopLeftX(picIdx), ceilLog2(tmpWidthVal), "sps_subpic_ctu_top_left_x[ i ]"); } if ((picIdx > 0) && (pcSPS->getMaxPicHeightInLumaSamples() > pcSPS->getCTUSize())) { - WRITE_CODE(pcSPS->getSubPicCtuTopLeftY(picIdx), ceilLog2(tmpHeightVal), "subpic_ctu_top_left_y[ i ]"); + WRITE_CODE(pcSPS->getSubPicCtuTopLeftY(picIdx), ceilLog2(tmpHeightVal), "sps_subpic_ctu_top_left_y[ i ]"); } if (picIdx<pcSPS->getNumSubPics() - 1 && pcSPS->getMaxPicWidthInLumaSamples() > pcSPS->getCTUSize()) { - WRITE_CODE(pcSPS->getSubPicWidth(picIdx) - 1, ceilLog2(tmpWidthVal), "subpic_width_minus1[ i ]"); + WRITE_CODE(pcSPS->getSubPicWidth(picIdx) - 1, ceilLog2(tmpWidthVal), "sps_subpic_width_minus1[ i ]"); } if (picIdx<pcSPS->getNumSubPics() - 1 && pcSPS->getMaxPicHeightInLumaSamples() > pcSPS->getCTUSize()) { - WRITE_CODE(pcSPS->getSubPicHeight(picIdx) - 1, ceilLog2(tmpHeightVal), "subpic_height_minus1[ i ]"); + WRITE_CODE(pcSPS->getSubPicHeight(picIdx) - 1, ceilLog2(tmpHeightVal), "sps_subpic_height_minus1[ i ]"); } } if (!pcSPS->getIndependentSubPicsFlag()) { - WRITE_FLAG(pcSPS->getSubPicTreatedAsPicFlag(picIdx), "subpic_treated_as_pic_flag[ i ]"); - WRITE_FLAG(pcSPS->getLoopFilterAcrossSubpicEnabledFlag(picIdx), "loop_filter_across_subpic_enabled_flag[ i ]"); + WRITE_FLAG(pcSPS->getSubPicTreatedAsPicFlag(picIdx), "sps_subpic_treated_as_pic_flag[ i ]"); + WRITE_FLAG(pcSPS->getLoopFilterAcrossSubpicEnabledFlag(picIdx), "sps_loop_filter_across_subpic_enabled_flag[ i ]"); } } #else @@ -978,11 +979,11 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) CHECK(pcSPS->getSubPicIdLen() < 1, "SPS: SubPicIdLen cannot be less than 1"); WRITE_UVLC(pcSPS->getSubPicIdLen() - 1, "sps_subpic_id_len_minus1"); - WRITE_FLAG(pcSPS->getSubPicIdMappingExplicitlySignalledFlag(), "subpic_id_mapping_explicitly_signalled_flag"); + WRITE_FLAG(pcSPS->getSubPicIdMappingExplicitlySignalledFlag(), "sps_subpic_id_mapping_explicitly_signalled_flag"); if (pcSPS->getSubPicIdMappingExplicitlySignalledFlag()) { - WRITE_FLAG(pcSPS->getSubPicIdMappingInSpsFlag(), "subpic_id_mapping_in_sps_flag"); - if (pcSPS->getSubPicIdMappingInSpsFlag()) + WRITE_FLAG(pcSPS->getSubPicIdMappingPresentFlag(), "sps_subpic_id_mapping_present_flag"); + if (pcSPS->getSubPicIdMappingPresentFlag()) { for (int picIdx = 0; picIdx < pcSPS->getNumSubPics(); picIdx++) { @@ -995,18 +996,18 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_UVLC(pcSPS->getBitDepth(CHANNEL_TYPE_LUMA) - 8, "sps_bitdepth_minus8"); WRITE_FLAG( pcSPS->getEntropyCodingSyncEnabledFlag() ? 1 : 0, "sps_entropy_coding_sync_enabled_flag" ); WRITE_FLAG( pcSPS->getEntryPointsPresentFlag() ? 1 : 0, "sps_entry_point_offsets_present_flag" ); - WRITE_CODE(pcSPS->getBitsForPOC()-4, 4, "log2_max_pic_order_cnt_lsb_minus4"); - - WRITE_FLAG(pcSPS->getPocMsbFlag() ? 1 : 0, "sps_poc_msb_flag"); - if (pcSPS->getPocMsbFlag()) + WRITE_CODE(pcSPS->getBitsForPOC()-4, 4, "sps_log2_max_pic_order_cnt_lsb_minus4"); + + WRITE_FLAG(pcSPS->getPocMsbCycleFlag() ? 1 : 0, "sps_poc_msb_cycle_flag"); + if (pcSPS->getPocMsbCycleFlag()) { - WRITE_UVLC(pcSPS->getPocMsbLen() - 1, "poc_msb_len_minus1"); + WRITE_UVLC(pcSPS->getPocMsbCycleLen() - 1, "sps_poc_msb_cycle_len_minus1"); } // extra bits are for future extensions, so these are currently hard coded to not being sent - WRITE_CODE(0, 2, "num_extra_ph_bits_bytes"); - // extra_ph_bits_struct( num_extra_ph_bits_bytes ) - WRITE_CODE(0, 2, "num_extra_sh_bits_bytes"); - // extra_sh_bits_struct( num_extra_sh_bits_bytes ) + WRITE_CODE(0, 2, "sps_num_extra_ph_bytes"); + // extra_ph_bits_struct( sps_num_extra_ph_bytes ) + WRITE_CODE(0, 2, "sps_num_extra_sh_bytes"); + // extra_sh_bits_struct( sps_num_extra_sh_bytes ) if (pcSPS->getPtlDpbHrdParamsPresentFlag()) { @@ -1020,11 +1021,11 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) #if !JVET_S0132_HLS_REORDER if( pcSPS->getChromaFormatIdc() != CHROMA_400 ) { - WRITE_FLAG(pcSPS->getUseDualITree(), "qtbtt_dual_tree_intra_flag"); + WRITE_FLAG(pcSPS->getUseDualITree(), "sps_qtbtt_dual_tree_intra_flag"); } #endif - WRITE_UVLC(pcSPS->getLog2MinCodingBlockSize() - 2, "log2_min_luma_coding_block_size_minus2"); - WRITE_FLAG(pcSPS->getSplitConsOverrideEnabledFlag(), "partition_constraints_override_enabled_flag"); + WRITE_UVLC(pcSPS->getLog2MinCodingBlockSize() - 2, "sps_log2_min_luma_coding_block_size_minus2"); + WRITE_FLAG(pcSPS->getSplitConsOverrideEnabledFlag(), "sps_partition_constraints_override_enabled_flag"); WRITE_UVLC(floorLog2(pcSPS->getMinQTSize(I_SLICE)) - pcSPS->getLog2MinCodingBlockSize(), "sps_log2_diff_min_qt_min_cb_intra_slice_luma"); WRITE_UVLC(pcSPS->getMaxMTTHierarchyDepthI(), "sps_max_mtt_hierarchy_depth_intra_slice_luma"); if (pcSPS->getMaxMTTHierarchyDepthI() != 0) @@ -1035,7 +1036,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) #if JVET_S0132_HLS_REORDER if( pcSPS->getChromaFormatIdc() != CHROMA_400 ) { - WRITE_FLAG(pcSPS->getUseDualITree(), "qtbtt_dual_tree_intra_flag"); + WRITE_FLAG(pcSPS->getUseDualITree(), "sps_qtbtt_dual_tree_intra_flag"); } if (pcSPS->getUseDualITree()) { @@ -1074,7 +1075,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_FLAG(pcSPS->getTransformSkipEnabledFlag() ? 1 : 0, "sps_transform_skip_enabled_flag"); if (pcSPS->getTransformSkipEnabledFlag()) { - WRITE_UVLC(pcSPS->getLog2MaxTransformSkipBlockSize() - 2, "log2_transform_skip_max_size_minus2"); + WRITE_UVLC(pcSPS->getLog2MaxTransformSkipBlockSize() - 2, "sps_log2_transform_skip_max_size_minus2"); WRITE_FLAG(pcSPS->getBDPCMEnabledFlag() ? 1 : 0, "sps_bdpcm_enabled_flag"); } else @@ -1098,7 +1099,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) { WRITE_FLAG(pcSPS->getJointCbCrEnabledFlag(), "sps_joint_cbcr_enabled_flag"); const ChromaQpMappingTable& chromaQpMappingTable = pcSPS->getChromaQpMappingTable(); - WRITE_FLAG(chromaQpMappingTable.getSameCQPTableForAllChromaFlag(), "same_qp_table_for_chroma"); + WRITE_FLAG(chromaQpMappingTable.getSameCQPTableForAllChromaFlag(), "sps_same_qp_table_for_chroma_flag"); int numQpTables = chromaQpMappingTable.getSameCQPTableForAllChromaFlag() ? 1 : (pcSPS->getJointCbCrEnabledFlag() ? 3 : 2); CHECK(numQpTables != chromaQpMappingTable.getNumQpTables(), " numQpTables does not match at encoder side "); for (int i = 0; i < numQpTables; i++) @@ -1127,7 +1128,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_FLAG(pcSPS->getTransformSkipEnabledFlag() ? 1 : 0, "sps_transform_skip_enabled_flag"); if (pcSPS->getTransformSkipEnabledFlag()) { - WRITE_UVLC(pcSPS->getLog2MaxTransformSkipBlockSize() - 2, "log2_transform_skip_max_size_minus2"); + WRITE_UVLC(pcSPS->getLog2MaxTransformSkipBlockSize() - 2, "sps_log2_transform_skip_max_size_minus2"); WRITE_FLAG(pcSPS->getBDPCMEnabledFlag() ? 1 : 0, "sps_bdpcm_enabled_flag"); } else @@ -1138,20 +1139,20 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_FLAG(pcSPS->getUseWP() ? 1 : 0, "sps_weighted_pred_flag"); // Use of Weighting Prediction (P_SLICE) WRITE_FLAG(pcSPS->getUseWPBiPred() ? 1 : 0, "sps_weighted_bipred_flag"); // Use of Weighting Bi-Prediction (B_SLICE) - WRITE_FLAG(pcSPS->getLongTermRefsPresent() ? 1 : 0, "long_term_ref_pics_flag"); + WRITE_FLAG(pcSPS->getLongTermRefsPresent() ? 1 : 0, "sps_long_term_ref_pics_flag"); if( pcSPS->getVPSId() > 0 ) { - WRITE_FLAG( pcSPS->getInterLayerPresentFlag() ? 1 : 0, "sps_inter_layer_ref_pics_present_flag" ); + WRITE_FLAG( pcSPS->getInterLayerPresentFlag() ? 1 : 0, "sps_inter_layer_predictioned_enabled_flag" ); } WRITE_FLAG(pcSPS->getIDRRefParamListPresent() ? 1 : 0, "sps_idr_rpl_present_flag" ); - WRITE_FLAG(pcSPS->getRPL1CopyFromRPL0Flag() ? 1 : 0, "rpl1_copy_from_rpl0_flag"); + WRITE_FLAG(pcSPS->getRPL1CopyFromRPL0Flag() ? 1 : 0, "sps_rpl1_same_as_rpl0_flag"); const RPLList* rplList0 = pcSPS->getRPLList0(); const RPLList* rplList1 = pcSPS->getRPLList1(); //Write candidate for List0 uint32_t numberOfRPL = pcSPS->getNumRPL0(); - WRITE_UVLC(numberOfRPL, "num_ref_pic_lists_in_sps[0]"); + WRITE_UVLC(numberOfRPL, "sps_num_ref_pic_lists[0]"); for (int ii = 0; ii < numberOfRPL; ii++) { const ReferencePictureList* rpl = rplList0->getReferencePictureList(ii); @@ -1162,7 +1163,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) if (!pcSPS->getRPL1CopyFromRPL0Flag()) { numberOfRPL = pcSPS->getNumRPL1(); - WRITE_UVLC(numberOfRPL, "num_ref_pic_lists_in_sps[1]"); + WRITE_UVLC(numberOfRPL, "sps_num_ref_pic_lists[1]"); for (int ii = 0; ii < numberOfRPL; ii++) { const ReferencePictureList* rpl = rplList1->getReferencePictureList(ii); @@ -1197,12 +1198,12 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) { WRITE_FLAG(pcSPS->getFpelMmvdEnabledFlag() ? 1 : 0, "sps_mmvd_fullpel_only_flag"); } - WRITE_UVLC(MRG_MAX_NUM_CANDS - pcSPS->getMaxNumMergeCand(), "six_minus_max_num_merge_cand"); + WRITE_UVLC(MRG_MAX_NUM_CANDS - pcSPS->getMaxNumMergeCand(), "sps_six_minus_max_num_merge_cand"); WRITE_FLAG( pcSPS->getUseSBT() ? 1 : 0, "sps_sbt_enabled_flag"); WRITE_FLAG( pcSPS->getUseAffine() ? 1 : 0, "sps_affine_enabled_flag" ); if ( pcSPS->getUseAffine() ) { - WRITE_UVLC(AFFINE_MRG_MAX_NUM_CANDS - pcSPS->getMaxNumAffineMergeCand(), "five_minus_max_num_subblock_merge_cand"); + WRITE_UVLC(AFFINE_MRG_MAX_NUM_CANDS - pcSPS->getMaxNumAffineMergeCand(), "sps_five_minus_max_num_subblock_merge_cand"); WRITE_FLAG( pcSPS->getUseAffineType() ? 1 : 0, "sps_affine_type_flag" ); if (pcSPS->getAMVREnabledFlag()) { @@ -1230,12 +1231,12 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) if (pcSPS->getMaxNumMergeCand() >= 3) { WRITE_UVLC(pcSPS->getMaxNumMergeCand() - pcSPS->getMaxNumGeoCand(), - "max_num_merge_cand_minus_max_num_gpm_cand"); + "sps_max_num_merge_cand_minus_max_num_gpm_cand"); } } } - WRITE_UVLC(pcSPS->getLog2ParallelMergeLevelMinus2(), "log2_parallel_merge_level_minus2"); + WRITE_UVLC(pcSPS->getLog2ParallelMergeLevelMinus2(), "sps_log2_parallel_merge_level_minus2"); WRITE_FLAG( pcSPS->getUseISP() ? 1 : 0, "sps_isp_enabled_flag"); WRITE_FLAG( pcSPS->getUseMRL() ? 1 : 0, "sps_mrl_enabled_flag"); @@ -1276,7 +1277,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) if (pcSPS->getIBCFlag()) { CHECK(pcSPS->getMaxNumIBCMergeCand() > IBC_MRG_MAX_NUM_CANDS, "More IBC merge candidates signalled than supported"); - WRITE_UVLC(IBC_MRG_MAX_NUM_CANDS - pcSPS->getMaxNumIBCMergeCand(), "six_minus_max_num_ibc_merge_cand"); + WRITE_UVLC(IBC_MRG_MAX_NUM_CANDS - pcSPS->getMaxNumIBCMergeCand(), "sps_six_minus_max_num_ibc_merge_cand"); } #if !JVET_S0074_SPS_REORDER WRITE_FLAG(pcSPS->getUseLmcs() ? 1 : 0, "sps_lmcs_enable_flag"); @@ -1303,7 +1304,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) if (pcSPS->getUseLFNST() && pcSPS->getScalingListFlag()) { - WRITE_FLAG(pcSPS->getDisableScalingMatrixForLfnstBlks(), "scaling_matrix_for_lfnst_disabled_flag"); + WRITE_FLAG(pcSPS->getDisableScalingMatrixForLfnstBlks(), "sps_scaling_matrix_for_lfnst_disabled_flag"); } if (pcSPS->getUseColorTrans() && pcSPS->getScalingListFlag()) @@ -1362,8 +1363,8 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) } } - WRITE_FLAG(pcSPS->getFieldSeqFlag(), "field_seq_flag"); - WRITE_FLAG( pcSPS->getVuiParametersPresentFlag(), "vui_parameters_present_flag" ); + WRITE_FLAG(pcSPS->getFieldSeqFlag(), "sps_field_seq_flag"); + WRITE_FLAG( pcSPS->getVuiParametersPresentFlag(), "sps_vui_parameters_present_flag" ); if (pcSPS->getVuiParametersPresentFlag()) { #if JVET_S0266_VUI_length @@ -1499,10 +1500,10 @@ void HLSWriter::codeVPS(const VPS* pcVPS) WRITE_FLAG(pcVPS->getDirectRefLayerFlag(i, j), "vps_direct_dependency_flag"); } bool presentFlag = ( pcVPS->getMaxTidIlRefPicsPlus1(i) != 7 ); - WRITE_FLAG(presentFlag, "max_tid_ref_present_flag[ i ]"); + WRITE_FLAG(presentFlag, "vps_max_tid_ref_present_flag[ i ]"); if (presentFlag) { - WRITE_CODE(pcVPS->getMaxTidIlRefPicsPlus1(i), 3, "max_tid_il_ref_pics_plus1[ i ]"); + WRITE_CODE(pcVPS->getMaxTidIlRefPicsPlus1(i), 3, "vps_max_tid_il_ref_pics_plus1[ i ]"); } } } @@ -1511,25 +1512,25 @@ void HLSWriter::codeVPS(const VPS* pcVPS) { if (pcVPS->getAllIndependentLayersFlag()) { - WRITE_FLAG(pcVPS->getEachLayerIsAnOlsFlag(), "each_layer_is_an_ols_flag"); + WRITE_FLAG(pcVPS->getEachLayerIsAnOlsFlag(), "vps_each_layer_is_an_ols_flag"); } if (!pcVPS->getEachLayerIsAnOlsFlag()) { if (!pcVPS->getAllIndependentLayersFlag()) { - WRITE_CODE(pcVPS->getOlsModeIdc(), 2, "ols_mode_idc"); + WRITE_CODE(pcVPS->getOlsModeIdc(), 2, "vps_ols_mode_idc"); } if (pcVPS->getOlsModeIdc() == 2) { #if JVET_S0183_VPS_INFORMATION_SIGNALLING - WRITE_CODE(pcVPS->getNumOutputLayerSets() - 2, 8, "num_output_layer_sets_minus2"); + WRITE_CODE(pcVPS->getNumOutputLayerSets() - 2, 8, "vps_num_output_layer_sets_minus2"); #else - WRITE_CODE(pcVPS->getNumOutputLayerSets() - 1, 8, "num_output_layer_sets_minus1"); + WRITE_CODE(pcVPS->getNumOutputLayerSets() - 1, 8, "vps_num_output_layer_sets_minus1"); #endif for (uint32_t i = 1; i < pcVPS->getNumOutputLayerSets(); i++) { for (uint32_t j = 0; j < pcVPS->getMaxLayers(); j++) { - WRITE_FLAG(pcVPS->getOlsOutputLayerFlag(i, j), "ols_output_layer_flag"); + WRITE_FLAG(pcVPS->getOlsOutputLayerFlag(i, j), "vps_ols_output_layer_flag"); } } } @@ -1547,9 +1548,9 @@ void HLSWriter::codeVPS(const VPS* pcVPS) for (int i = 0; i < pcVPS->getNumPtls(); i++) { if(i > 0) - WRITE_FLAG(pcVPS->getPtPresentFlag(i), "pt_present_flag"); + WRITE_FLAG(pcVPS->getPtPresentFlag(i), "vps_pt_present_flag"); if (!pcVPS->getAllLayersSameNumSublayersFlag()) - WRITE_CODE(pcVPS->getPtlMaxTemporalId(i) ,3, "ptl_max_temporal_id"); + WRITE_CODE(pcVPS->getPtlMaxTemporalId(i) ,3, "vps_ptl_max_tid"); } int cnt = 0; while (m_pcBitIf->getNumBitsUntilByteAligned()) @@ -1569,7 +1570,7 @@ void HLSWriter::codeVPS(const VPS* pcVPS) for (int i = 0; i < totalNumOlss; i++) { if (pcVPS->getNumPtls() > 1 && pcVPS->getNumPtls() != pcVPS->getTotalNumOLSs()) - WRITE_CODE(pcVPS->getOlsPtlIdx(i), 8, "ols_ptl_idx"); + WRITE_CODE(pcVPS->getOlsPtlIdx(i), 8, "vps_ols_ptl_idx"); } if( !pcVPS->getEachLayerIsAnOlsFlag() ) @@ -1585,11 +1586,11 @@ void HLSWriter::codeVPS(const VPS* pcVPS) { if (!pcVPS->getAllLayersSameNumSublayersFlag()) { - WRITE_CODE(pcVPS->m_dpbMaxTemporalId[i], 3, "dpb_max_temporal_id[i]"); + WRITE_CODE(pcVPS->m_dpbMaxTemporalId[i], 3, "vps_dpb_max_tid[i]"); } else { - CHECK(pcVPS->m_dpbMaxTemporalId[i] != pcVPS->getMaxSubLayers() - 1, "When vps_all_layers_same_num_sublayers_flag is equal to 1, the value of dpb_max_temporal_id[ i ] is inferred to be equal to vps_max_sublayers_minus1"); + CHECK(pcVPS->m_dpbMaxTemporalId[i] != pcVPS->getMaxSubLayers() - 1, "When vps_all_layers_same_num_sublayers_flag is equal to 1, the value of vps_dpb_max_tid[ i ] is inferred to be equal to vps_max_sublayers_minus1"); } for( int j = ( pcVPS->m_sublayerDpbParamsPresentFlag ? 0 : pcVPS->m_dpbMaxTemporalId[i] ); j <= pcVPS->m_dpbMaxTemporalId[i]; j++ ) @@ -1605,13 +1606,13 @@ void HLSWriter::codeVPS(const VPS* pcVPS) { if( pcVPS->m_numLayersInOls[i] > 1 ) { - WRITE_UVLC( pcVPS->getOlsDpbPicSize( i ).width, "ols_dpb_pic_width[i]" ); - WRITE_UVLC( pcVPS->getOlsDpbPicSize( i ).height, "ols_dpb_pic_height[i]" ); - WRITE_CODE( pcVPS->m_olsDpbChromaFormatIdc[i], 2, "ols_dpb_chroma_format[i]"); - WRITE_UVLC( pcVPS->m_olsDpbBitDepthMinus8[i], "ols_dpb_bitdepth_minus8[i]"); + WRITE_UVLC( pcVPS->getOlsDpbPicSize( i ).width, "vps_ols_dpb_pic_width[i]" ); + WRITE_UVLC( pcVPS->getOlsDpbPicSize( i ).height, "vps_ols_dpb_pic_height[i]" ); + WRITE_CODE( pcVPS->m_olsDpbChromaFormatIdc[i], 2, "vps_ols_dpb_chroma_format[i]"); + WRITE_UVLC( pcVPS->m_olsDpbBitDepthMinus8[i], "vps_ols_dpb_bitdepth_minus8[i]"); if( (pcVPS->m_numDpbParams > 1) && (pcVPS->m_numDpbParams != pcVPS->m_numMultiLayeredOlss) ) { - WRITE_UVLC( pcVPS->getOlsDpbParamsIdx( i ), "ols_dpb_params_idx[i]" ); + WRITE_UVLC( pcVPS->getOlsDpbParamsIdx( i ), "vps_ols_dpb_params_idx[i]" ); } } } @@ -1627,21 +1628,21 @@ void HLSWriter::codeVPS(const VPS* pcVPS) { WRITE_FLAG(pcVPS->getVPSSublayerCpbParamsPresentFlag(), "vps_sublayer_cpb_params_present_flag"); } - WRITE_UVLC(pcVPS->getNumOlsHrdParamsMinus1(), "num_ols_hrd_params_minus1"); - for (int i = 0; i <= pcVPS->getNumOlsHrdParamsMinus1(); i++) + WRITE_UVLC(pcVPS->getNumOlsTimingHrdParamsMinus1(), "vps_num_ols_timing_hrd_params_minus1"); + for (int i = 0; i <= pcVPS->getNumOlsTimingHrdParamsMinus1(); i++) { if (!pcVPS->getAllLayersSameNumSublayersFlag()) { - WRITE_CODE(pcVPS->getHrdMaxTid(i), 3, "hrd_max_tid[i]"); + WRITE_CODE(pcVPS->getHrdMaxTid(i), 3, "vps_hrd_max_tid[i]"); } uint32_t firstSublayer = pcVPS->getVPSSublayerCpbParamsPresentFlag() ? 0 : pcVPS->getHrdMaxTid(i); codeOlsHrdParameters(pcVPS->getGeneralHrdParameters(), pcVPS->getOlsHrdParameters(i),firstSublayer, pcVPS->getHrdMaxTid(i)); } - if ((pcVPS->getNumOlsHrdParamsMinus1() > 0) && ((pcVPS->getNumOlsHrdParamsMinus1() + 1) != pcVPS->m_numMultiLayeredOlss)) + if ((pcVPS->getNumOlsTimingHrdParamsMinus1() > 0) && ((pcVPS->getNumOlsTimingHrdParamsMinus1() + 1) != pcVPS->m_numMultiLayeredOlss)) { for (int i = 0; i < pcVPS->m_numMultiLayeredOlss; i++) { - WRITE_UVLC(pcVPS->getOlsHrdIdx(i), "ols_hrd_idx[i]"); + WRITE_UVLC(pcVPS->getOlsTimingHrdIdx(i), "vps_ols_timing_hrd_idx[i]"); } } } @@ -1662,13 +1663,13 @@ void HLSWriter::codePictureHeader( PicHeader* picHeader, bool writeRbspTrailingB #endif CodingStructure& cs = *picHeader->getPic()->cs; -WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag"); +WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "ph_gdr_or_irap_pic_flag"); #if JVET_S0076_ASPECT1 WRITE_FLAG(picHeader->getNonReferencePictureFlag(), "ph_non_ref_pic_flag"); #endif if (picHeader->getGdrOrIrapPicFlag()) { - WRITE_FLAG(picHeader->getGdrPicFlag(), "gdr_pic_flag"); + WRITE_FLAG(picHeader->getGdrPicFlag(), "ph_gdr_pic_flag"); } // Q0781, two-flags WRITE_FLAG(picHeader->getPicInterSliceAllowedFlag(), "ph_inter_slice_allowed_flag"); @@ -1677,7 +1678,7 @@ WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag"); WRITE_FLAG(picHeader->getPicIntraSliceAllowedFlag(), "ph_intra_slice_allowed_flag"); } #if !JVET_S0076_ASPECT1 - WRITE_FLAG(picHeader->getNonReferencePictureFlag(), "non_reference_picture_flag"); + WRITE_FLAG(picHeader->getNonReferencePictureFlag(), "ph_non_reference_picture_flag"); #endif // parameter sets WRITE_UVLC(picHeader->getPPSId(), "ph_pic_parameter_set_id"); @@ -1696,7 +1697,7 @@ WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag"); #endif if( picHeader->getGdrPicFlag() ) { - WRITE_UVLC(picHeader->getRecoveryPocCnt(), "recovery_poc_cnt"); + WRITE_UVLC(picHeader->getRecoveryPocCnt(), "ph_recovery_poc_cnt"); } else { @@ -1707,12 +1708,12 @@ WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag"); // for( i = 0; i < NumExtraPhBits; i++ ) // ph_extra_bit[ i ] - if (sps->getPocMsbFlag()) + if (sps->getPocMsbCycleFlag()) { WRITE_FLAG(picHeader->getPocMsbPresentFlag(), "ph_poc_msb_present_flag"); if (picHeader->getPocMsbPresentFlag()) { - WRITE_CODE(picHeader->getPocMsbVal(), sps->getPocMsbLen(), "poc_msb_val"); + WRITE_CODE(picHeader->getPocMsbVal(), sps->getPocMsbCycleLen(), "ph_poc_msb_cycle_val"); } } @@ -1869,7 +1870,7 @@ WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag"); // picture output flag if (pps->getOutputFlagPresentFlag() && !picHeader->getNonReferencePictureFlag()) { - WRITE_FLAG( picHeader->getPicOutputFlag(), "pic_output_flag" ); + WRITE_FLAG( picHeader->getPicOutputFlag(), "ph_pic_output_flag" ); } else { @@ -1947,7 +1948,7 @@ WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag"); // partitioning constraint overrides if (sps->getSplitConsOverrideEnabledFlag()) { - WRITE_FLAG(picHeader->getSplitConsOverrideFlag(), "partition_constraints_override_flag"); + WRITE_FLAG(picHeader->getSplitConsOverrideFlag(), "ph_partition_constraints_override_flag"); } else { @@ -2092,31 +2093,31 @@ WRITE_FLAG(picHeader->getGdrOrIrapPicFlag(), "gdr_or_irap_pic_flag"); // picture level BDOF disable flags if (sps->getBdofControlPresentFlag() && (!pps->getRplInfoInPhFlag() || picHeader->getRPL(1)->getNumRefEntries() > 0)) { - WRITE_FLAG(picHeader->getDisBdofFlag(), "ph_disable_bdof_flag"); + WRITE_FLAG(picHeader->getBdofDisabledFlag(), "ph_bdof_disabled_flag"); } else { - picHeader->setDisBdofFlag(0); + picHeader->setBdofDisabledFlag(0); } // picture level DMVR disable flags if (sps->getDmvrControlPresentFlag() && (!pps->getRplInfoInPhFlag() || picHeader->getRPL(1)->getNumRefEntries() > 0)) { - WRITE_FLAG(picHeader->getDisDmvrFlag(), "ph_disable_dmvr_flag"); + WRITE_FLAG(picHeader->getDmvrDisabledFlag(), "ph_dmvr_disabled_flag"); } else { - picHeader->setDisDmvrFlag(0); + picHeader->setDmvrDisabledFlag(0); } // picture level PROF disable flags if (sps->getProfControlPresentFlag()) { - WRITE_FLAG(picHeader->getDisProfFlag(), "ph_disable_prof_flag"); + WRITE_FLAG(picHeader->getProfDisabledFlag(), "ph_prof_disabled_flag"); } else { - picHeader->setDisProfFlag(0); + picHeader->setProfDisabledFlag(0); } if ((pps->getUseWP() || pps->getWPBiPred()) && pps->getWpInfoInPhFlag()) @@ -2257,7 +2258,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) const ChromaFormat format = pcSlice->getSPS()->getChromaFormatIdc(); const uint32_t numberValidComponents = getNumberValidComponents(format); const bool chromaEnabled = isChromaEnabled(format); - WRITE_FLAG(pcSlice->getPictureHeaderInSliceHeader() ? 1 : 0, "picture_header_in_slice_header_flag"); + WRITE_FLAG(pcSlice->getPictureHeaderInSliceHeader() ? 1 : 0, "sh_picture_header_in_slice_header_flag"); if (pcSlice->getPictureHeaderInSliceHeader()) { codePictureHeader(picHeader, false); @@ -2267,7 +2268,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) { uint32_t bitsSubPicId; bitsSubPicId = pcSlice->getSPS()->getSubPicIdLen(); - WRITE_CODE(pcSlice->getSliceSubPicId(), bitsSubPicId, "slice_subpic_id"); + WRITE_CODE(pcSlice->getSliceSubPicId(), bitsSubPicId, "sh_subpic_id"); } // raster scan slices @@ -2277,10 +2278,10 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) if( pcSlice->getPPS()->getNumTiles() > 1 ) { int bitsSliceAddress = ceilLog2(pcSlice->getPPS()->getNumTiles()); - WRITE_CODE( pcSlice->getSliceID(), bitsSliceAddress, "slice_address"); + WRITE_CODE( pcSlice->getSliceID(), bitsSliceAddress, "sh_slice_address"); if ((int)pcSlice->getPPS()->getNumTiles() - (int)pcSlice->getSliceID() > 1) { - WRITE_UVLC(pcSlice->getNumTilesInSlice() - 1, "num_tiles_in_slice_minus1"); + WRITE_UVLC(pcSlice->getNumTilesInSlice() - 1, "sh_num_tiles_in_slice_minus1"); } } } @@ -2298,18 +2299,18 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) numSlicesInPreviousSubPics += pcSlice->getPPS()->getSubPic(sp).getNumSlicesInSubPic(); } int bitsSliceAddress = ceilLog2(currSubPic.getNumSlicesInSubPic()); - WRITE_CODE( pcSlice->getSliceID() - numSlicesInPreviousSubPics, bitsSliceAddress, "slice_address"); + WRITE_CODE( pcSlice->getSliceID() - numSlicesInPreviousSubPics, bitsSliceAddress, "sh_slice_address"); } } if (picHeader->getPicInterSliceAllowedFlag()) { - WRITE_UVLC(pcSlice->getSliceType(), "slice_type"); + WRITE_UVLC(pcSlice->getSliceType(), "sh_slice_type"); } #if JVET_S0193_NO_OUTPUT_PRIOR_PIC if (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_GDR) { - WRITE_FLAG(pcSlice->getNoOutputOfPriorPicsFlag(), "no_output_of_prior_pics_flag"); + WRITE_FLAG(pcSlice->getNoOutputOfPriorPicsFlag(), "sh_no_output_of_prior_pics_flag"); } #endif if (!picHeader->getPicIntraSliceAllowedFlag()) @@ -2320,43 +2321,43 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) if (pcSlice->getSPS()->getALFEnabledFlag() && !pcSlice->getPPS()->getAlfInfoInPhFlag()) { const int alfEnabled = pcSlice->getTileGroupAlfEnabledFlag(COMPONENT_Y); - WRITE_FLAG(alfEnabled, "slice_alf_enabled_flag"); + WRITE_FLAG(alfEnabled, "sh_alf_enabled_flag"); if (alfEnabled) { - WRITE_CODE(pcSlice->getTileGroupNumAps(), 3, "slice_num_alf_aps_ids_luma"); + WRITE_CODE(pcSlice->getTileGroupNumAps(), 3, "sh_num_alf_aps_ids_luma"); const std::vector<int>& apsId = pcSlice->getTileGroupApsIdLuma(); for (int i = 0; i < pcSlice->getTileGroupNumAps(); i++) { - WRITE_CODE(apsId[i], 3, "slice_alf_aps_id_luma"); + WRITE_CODE(apsId[i], 3, "sh_alf_aps_id_luma[i]"); } const int alfChromaIdc = pcSlice->getTileGroupAlfEnabledFlag(COMPONENT_Cb) + pcSlice->getTileGroupAlfEnabledFlag(COMPONENT_Cr) * 2; if (chromaEnabled) { - WRITE_CODE(pcSlice->getTileGroupAlfEnabledFlag(COMPONENT_Cb), 1, "slice_alf_cb_enabled_flag"); - WRITE_CODE(pcSlice->getTileGroupAlfEnabledFlag(COMPONENT_Cr), 1, "slice_alf_cr_enabled_flag"); + WRITE_CODE(pcSlice->getTileGroupAlfEnabledFlag(COMPONENT_Cb), 1, "sh_alf_cb_enabled_flag"); + WRITE_CODE(pcSlice->getTileGroupAlfEnabledFlag(COMPONENT_Cr), 1, "sh_alf_cr_enabled_flag"); } if (alfChromaIdc) { - WRITE_CODE(pcSlice->getTileGroupApsIdChroma(), 3, "slice_alf_aps_id_chroma"); + WRITE_CODE(pcSlice->getTileGroupApsIdChroma(), 3, "sh_alf_aps_id_chroma"); } if (pcSlice->getSPS()->getCCALFEnabledFlag()) { CcAlfFilterParam &filterParam = pcSlice->m_ccAlfFilterParam; - WRITE_FLAG(filterParam.ccAlfFilterEnabled[COMPONENT_Cb - 1] ? 1 : 0, "slice_cc_alf_cb_enabled_flag"); + WRITE_FLAG(filterParam.ccAlfFilterEnabled[COMPONENT_Cb - 1] ? 1 : 0, "sh_alf_cc_cb_enabled_flag"); if (filterParam.ccAlfFilterEnabled[COMPONENT_Cb - 1]) { // write CC ALF Cb APS ID - WRITE_CODE(pcSlice->getTileGroupCcAlfCbApsId(), 3, "slice_cc_alf_cb_aps_id"); + WRITE_CODE(pcSlice->getTileGroupCcAlfCbApsId(), 3, "sh_alf_cc_cb_aps_id"); } // Cr - WRITE_FLAG(filterParam.ccAlfFilterEnabled[COMPONENT_Cr - 1] ? 1 : 0, "slice_cc_alf_cr_enabled_flag"); + WRITE_FLAG(filterParam.ccAlfFilterEnabled[COMPONENT_Cr - 1] ? 1 : 0, "sh_alf_cc_cr_enabled_flag"); if (filterParam.ccAlfFilterEnabled[COMPONENT_Cr - 1]) { // write CC ALF Cr APS ID - WRITE_CODE(pcSlice->getTileGroupCcAlfCrApsId(), 3, "slice_cc_alf_cr_aps_id"); + WRITE_CODE(pcSlice->getTileGroupCcAlfCrApsId(), 3, "sh_alf_cc_cr_aps_id"); } } } @@ -2364,11 +2365,11 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) if (picHeader->getLmcsEnabledFlag() && !pcSlice->getPictureHeaderInSliceHeader()) { - WRITE_FLAG(pcSlice->getLmcsEnabledFlag(), "slice_lmcs_enabled_flag"); + WRITE_FLAG(pcSlice->getLmcsEnabledFlag(), "sh_lmcs_used_flag"); } if (picHeader->getExplicitScalingListEnabledFlag() && !pcSlice->getPictureHeaderInSliceHeader()) { - WRITE_FLAG(pcSlice->getExplicitScalingListUsed(), "slice_explicit_scaling_list_used_flag"); + WRITE_FLAG(pcSlice->getExplicitScalingListUsed(), "sh_explicit_scaling_list_used_flag"); } #if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE @@ -2492,12 +2493,12 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) int defaultL0 = std::min<int>(pcSlice->getRPL0()->getNumRefEntries(), pcSlice->getPPS()->getNumRefIdxL0DefaultActive()); int defaultL1 = pcSlice->isInterB() ? std::min<int>(pcSlice->getRPL1()->getNumRefEntries(), pcSlice->getPPS()->getNumRefIdxL1DefaultActive()) : 0; bool overrideFlag = ( pcSlice->getNumRefIdx( REF_PIC_LIST_0 ) != defaultL0 || ( pcSlice->isInterB() && pcSlice->getNumRefIdx( REF_PIC_LIST_1 ) != defaultL1 ) ); - WRITE_FLAG( overrideFlag ? 1 : 0, "num_ref_idx_active_override_flag" ); + WRITE_FLAG( overrideFlag ? 1 : 0, "sh_num_ref_idx_active_override_flag" ); if( overrideFlag ) { if(pcSlice->getRPL0()->getNumRefEntries() > 1) { - WRITE_UVLC( pcSlice->getNumRefIdx( REF_PIC_LIST_0 ) - 1, "num_ref_idx_l0_active_minus1" ); + WRITE_UVLC( pcSlice->getNumRefIdx( REF_PIC_LIST_0 ) - 1, "sh_num_ref_idx_active_minus1[0]" ); } else { @@ -2506,7 +2507,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) if( pcSlice->isInterB() && pcSlice->getRPL1()->getNumRefEntries() > 1) { - WRITE_UVLC( pcSlice->getNumRefIdx( REF_PIC_LIST_1 ) - 1, "num_ref_idx_l1_active_minus1" ); + WRITE_UVLC( pcSlice->getNumRefIdx( REF_PIC_LIST_1 ) - 1, "sh_num_ref_idx_active_minus1[1]" ); } else { @@ -2534,7 +2535,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) SliceType encCABACTableIdx = pcSlice->getEncCABACTableIdx(); bool encCabacInitFlag = ( sliceType != encCABACTableIdx && encCABACTableIdx != I_SLICE ) ? true : false; pcSlice->setCabacInitFlag( encCabacInitFlag ); - WRITE_FLAG( encCabacInitFlag ? 1 : 0, "cabac_init_flag" ); + WRITE_FLAG( encCabacInitFlag ? 1 : 0, "sh_cabac_init_flag" ); } } if (pcSlice->getPicHeader()->getEnableTMVPFlag() && !pcSlice->getPPS()->getRplInfoInPhFlag()) @@ -2543,7 +2544,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) { if (pcSlice->getSliceType() == B_SLICE) { - WRITE_FLAG(pcSlice->getColFromL0Flag(), "collocated_from_l0_flag"); + WRITE_FLAG(pcSlice->getColFromL0Flag(), "sh_collocated_from_l0_flag"); } } @@ -2551,7 +2552,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) ( ( pcSlice->getColFromL0Flag() == 1 && pcSlice->getNumRefIdx( REF_PIC_LIST_0 ) > 1 ) || ( pcSlice->getColFromL0Flag() == 0 && pcSlice->getNumRefIdx( REF_PIC_LIST_1 ) > 1 ) ) ) { - WRITE_UVLC( pcSlice->getColRefIdx(), "collocated_ref_idx" ); + WRITE_UVLC( pcSlice->getColRefIdx(), "sh_collocated_ref_idx" ); } } @@ -2566,20 +2567,20 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) if (!pcSlice->getPPS()->getQpDeltaInfoInPhFlag()) { - WRITE_SVLC(pcSlice->getSliceQp() - (pcSlice->getPPS()->getPicInitQPMinus26() + 26), "slice_qp_delta"); + WRITE_SVLC(pcSlice->getSliceQp() - (pcSlice->getPPS()->getPicInitQPMinus26() + 26), "sh_qp_delta"); } if (pcSlice->getPPS()->getSliceChromaQpFlag()) { if (numberValidComponents > COMPONENT_Cb) { - WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cb), "slice_cb_qp_offset" ); + WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cb), "sh_cb_qp_offset" ); } if (numberValidComponents > COMPONENT_Cr) { - WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr), "slice_cr_qp_offset" ); + WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr), "sh_cr_qp_offset" ); if (pcSlice->getSPS()->getJointCbCrEnabledFlag()) { - WRITE_SVLC( pcSlice->getSliceChromaQpDelta(JOINT_CbCr), "slice_joint_cbcr_qp_offset"); + WRITE_SVLC( pcSlice->getSliceChromaQpDelta(JOINT_CbCr), "sh_joint_cbcr_qp_offset"); } } CHECK(numberValidComponents < COMPONENT_Cr+1, "Too many valid components"); @@ -2587,15 +2588,15 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) if (pcSlice->getPPS()->getCuChromaQpOffsetListEnabledFlag()) { - WRITE_FLAG(pcSlice->getUseChromaQpAdj(), "cu_chroma_qp_offset_enabled_flag"); + WRITE_FLAG(pcSlice->getUseChromaQpAdj(), "sh_cu_chroma_qp_offset_enabled_flag"); } if (pcSlice->getSPS()->getSAOEnabledFlag() && !pcSlice->getPPS()->getSaoInfoInPhFlag()) { - WRITE_FLAG( pcSlice->getSaoEnabledFlag( CHANNEL_TYPE_LUMA ), "slice_sao_luma_flag" ); + WRITE_FLAG( pcSlice->getSaoEnabledFlag( CHANNEL_TYPE_LUMA ), "sh_sao_luma_used_flag" ); if( chromaEnabled ) { - WRITE_FLAG( pcSlice->getSaoEnabledFlag( CHANNEL_TYPE_CHROMA ), "slice_sao_chroma_flag" ); + WRITE_FLAG( pcSlice->getSaoEnabledFlag( CHANNEL_TYPE_CHROMA ), "sh_sao_chroma_used_flag" ); } } @@ -2604,7 +2605,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) { if( pcSlice->getPPS()->getDeblockingFilterOverrideEnabledFlag() && !pcSlice->getPPS()->getDbfInfoInPhFlag() ) { - WRITE_FLAG(pcSlice->getDeblockingFilterOverrideFlag(), "slice_deblocking_filter_override_flag"); + WRITE_FLAG(pcSlice->getDeblockingFilterOverrideFlag(), "sh_deblocking_params_present_flag"); } else { @@ -2614,18 +2615,18 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) { if (!pcSlice->getPPS()->getPPSDeblockingFilterDisabledFlag()) { - WRITE_FLAG(pcSlice->getDeblockingFilterDisable(), "slice_deblocking_filter_disabled_flag"); + WRITE_FLAG(pcSlice->getDeblockingFilterDisable(), "sh_deblocking_filter_disabled_flag"); } if(!pcSlice->getDeblockingFilterDisable()) { - WRITE_SVLC (pcSlice->getDeblockingFilterBetaOffsetDiv2(), "slice_beta_offset_div2"); - WRITE_SVLC (pcSlice->getDeblockingFilterTcOffsetDiv2(), "slice_tc_offset_div2"); + WRITE_SVLC (pcSlice->getDeblockingFilterBetaOffsetDiv2(), "sh_luma_beta_offset_div2"); + WRITE_SVLC (pcSlice->getDeblockingFilterTcOffsetDiv2(), "sh_luma_tc_offset_div2"); if( pcSlice->getPPS()->getPPSChromaToolFlag() ) { - WRITE_SVLC (pcSlice->getDeblockingFilterCbBetaOffsetDiv2(), "slice_cb_beta_offset_div2"); - WRITE_SVLC (pcSlice->getDeblockingFilterCbTcOffsetDiv2(), "slice_cb_tc_offset_div2"); - WRITE_SVLC (pcSlice->getDeblockingFilterCrBetaOffsetDiv2(), "slice_cr_beta_offset_div2"); - WRITE_SVLC (pcSlice->getDeblockingFilterCrTcOffsetDiv2(), "slice_cr_tc_offset_div2"); + WRITE_SVLC (pcSlice->getDeblockingFilterCbBetaOffsetDiv2(), "sh_cb_beta_offset_div2"); + WRITE_SVLC (pcSlice->getDeblockingFilterCbTcOffsetDiv2(), "sh_cb_tc_offset_div2"); + WRITE_SVLC (pcSlice->getDeblockingFilterCrBetaOffsetDiv2(), "sh_cr_beta_offset_div2"); + WRITE_SVLC (pcSlice->getDeblockingFilterCrTcOffsetDiv2(), "sh_cr_tc_offset_div2"); } } } @@ -2654,7 +2655,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) // dependent quantization if( pcSlice->getSPS()->getDepQuantEnabledFlag() ) { - WRITE_FLAG(pcSlice->getDepQuantEnabledFlag(), "slice_dep_quant_enabled_flag"); + WRITE_FLAG(pcSlice->getDepQuantEnabledFlag(), "sh_dep_quant_used_flag"); } else { @@ -2664,7 +2665,7 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) // sign data hiding if( pcSlice->getSPS()->getSignDataHidingEnabledFlag() && !pcSlice->getDepQuantEnabledFlag() ) { - WRITE_FLAG(pcSlice->getSignDataHidingEnabledFlag(), "slice_sign_data_hiding_enabled_flag" ); + WRITE_FLAG(pcSlice->getSignDataHidingEnabledFlag(), "sh_sign_data_hiding_used_flag" ); } else { @@ -2674,13 +2675,13 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice ) // signal TS residual coding disabled flag if (pcSlice->getSPS()->getTransformSkipEnabledFlag() && !pcSlice->getDepQuantEnabledFlag() && !pcSlice->getSignDataHidingEnabledFlag()) { - WRITE_FLAG(pcSlice->getTSResidualCodingDisabledFlag() ? 1 : 0, "slice_ts_residual_coding_disabled_flag"); + WRITE_FLAG(pcSlice->getTSResidualCodingDisabledFlag() ? 1 : 0, "sh_ts_residual_coding_disabled_flag"); } if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) { - WRITE_UVLC(0,"slice_segment_header_extension_length"); + WRITE_UVLC(0,"sh_slice_header_extension_length"); } } @@ -3009,11 +3010,10 @@ void HLSWriter::codeTilesWPPEntryPoint( Slice* pSlice ) if (pSlice->getNumberOfSubstreamSizes()>0) { - WRITE_UVLC(offsetLenMinus1, "offset_len_minus1"); - + WRITE_UVLC(offsetLenMinus1, "sh_entry_offset_len_minus1"); for (uint32_t idx=0; idx<pSlice->getNumberOfSubstreamSizes(); idx++) { - WRITE_CODE(pSlice->getSubstreamSize(idx)-1, offsetLenMinus1+1, "entry_point_offset_minus1"); + WRITE_CODE(pSlice->getSubstreamSize(idx)-1, offsetLenMinus1+1, "sh_entry_point_offset_minus1"); } } }