diff --git a/doc/software-manual.tex b/doc/software-manual.tex index 985ebe7d7f15b4ae2113feeb4c6b6c1d7857169b..201e81b072d37cb86cdb6fffbc1840027295bbbb 100644 --- a/doc/software-manual.tex +++ b/doc/software-manual.tex @@ -886,6 +886,12 @@ Add Access Unit Delimiter NAL units between all Access Units. Enable Picture Header to be signalled in Slice Header when encoding with single slice per picture. \\ +\Option{RPR} & +%\ShortOption{\None} & +\Default{true} & +Specifies the value of sps_ref_pic_resampling_enabled_flag. +\\ + \Option{ScalingRatioHor} & %\ShortOption{\None} & \Default{1.0} & @@ -1049,37 +1055,37 @@ Specifies the value of 16 minus gci_sixteen_minus_max_bitdepth_constraint_idc Specifies the value of 3 minus gci_three_minus_max_chroma_format_constraint_idc \\ -\Option{TrailConstraintFlag} & +\Option{NoTrailConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_trail_constraint_flag \\ -\Option{StsaConstraintFlag} & +\Option{NoStsaConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_stsa_constraint_flag \\ -\Option{RaslConstraintFlag} & +\Option{NoRaslConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_rasl_constraint_flag \\ -\Option{RadlConstraintFlag} & +\Option{NoRadlConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_radl_constraint_flag \\ -\Option{IdrConstraintFlag} & +\Option{NoIdrConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_idr_constraint_flag \\ -\Option{CraConstraintFlag} & +\Option{NoCraConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_cra_constraint_flag @@ -1091,7 +1097,7 @@ Specifies the value of gci_no_cra_constraint_flag Specifies the value of gci_no_gdr_constraint_flag \\ -\Option{ApsConstraintFlag} & +\Option{NoApsConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_aps_constraint_flag @@ -1144,241 +1150,247 @@ Specifies the value of gci_no_subpic_info_constraint_flag Specifies the value of gci_three_minus_max_log2_ctu_size_constraint_idc \\ -\Option{PartitionConstraintsOverrideConstraintFlag} & +\Option{NoPartitionConstraintsOverrideConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_partition_constraints_override_constraint_flag \\ -\Option{QtbttDualTreeIntraConstraintFlag} & +\Option{NoQtbttDualTreeIntraConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_qtbtt_dual_tree_intra_constraint_flag \\ -\Option{PaletteConstraintFlag} & +\Option{NoPaletteConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_palette_constraint_flag \\ -\Option{IbcConstraintFlag} & +\Option{NoIbcConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_ibc_constraint_flag \\ -\Option{IspConstraintFlag} & +\Option{NoIspConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_isp_constraint_flag \\ -\Option{MrlConstraintFlag} & +\Option{NoMrlConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_mrl_constraint_flag \\ -\Option{MipConstraintFlag} & +\Option{NoMipConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_mip_constraint_flag \\ -\Option{CclmConstraintFlag} & +\Option{NoCclmConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_cclm_constraint_flag \\ +\Option{NoRprConstraintFlag} & +%\ShortOption{\None} & +\Default{false} & +Specifies the value of gci_no_ref_pic_resampling_constraint_flag +\\ + \Option{NoResChangeInClvsConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_res_change_in_clvs_constraint_flag \\ -\Option{RefWraparoundConstraintFlag} & +\Option{NoRefWraparoundConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_ref_wraparound_constraint_flag \\ -\Option{TemporalMvpConstraintFlag} & +\Option{NoTemporalMvpConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_temporal_mvp_constraint_flag \\ -\Option{SbtmvpConstraintFlag} & +\Option{NoSbtmvpConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_sbtmvp_constraint_flag \\ -\Option{AmvrConstraintFlag} & +\Option{NoAmvrConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_amvr_constraint_flag \\ -\Option{SmvdConstraintFlag} & +\Option{NoSmvdConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_smvd_constraint_flag \\ -\Option{BdofConstraintFlag} & +\Option{NoBdofConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_bdof_constraint_flag \\ -\Option{DmvrConstraintFlag} & +\Option{NoDmvrConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_dmvr_constraint_flag \\ -\Option{MmvdConstraintFlag} & +\Option{NoMmvdConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_mmvd_constraint_flag \\ -\Option{AffineMotionConstraintFlag} & +\Option{NoAffineMotionConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_affine_motion_constraint_flag \\ -\Option{ProfConstraintFlag} & +\Option{NoProfConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_prof_constraint_flag \\ -\Option{BcwConstraintFlag} & +\Option{NoBcwConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_bcw_constraint_flag \\ -\Option{CiipConstraintFlag} & +\Option{NoCiipConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_ciip_constraint_flag \\ -\Option{GpmConstraintFlag} & +\Option{NoGpmConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_gpm_constraint_flag \\ -\Option{TransformSkipConstraintFlag} & +\Option{NoTransformSkipConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_transform_skip_constraint_flag \\ -\Option{LumaTransformSize64ConstraintFlag} & +\Option{NoLumaTransformSize64ConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_luma_transform_size_64_constraint_flag \\ -\Option{BDPCMConstraintFlag} & +\Option{NoBDPCMConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_bdpcm_constraint_flag \\ -\Option{MtsConstraintFlag} & +\Option{NoMtsConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_mts_constraint_flag \\ -\Option{LfnstConstraintFlag} & +\Option{NoLfnstConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_lfnst_constraint_flag \\ -\Option{JointCbCrConstraintFlag} & +\Option{NoJointCbCrConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_joint_cbcr_constraint_flag \\ -\Option{SbtConstraintFlag} & +\Option{NoSbtConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_sbt_constraint_flag \\ -\Option{ActConstraintFlag} & +\Option{NoActConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_act_constraint_flag \\ -\Option{ExplicitScaleListConstraintFlag} & +\Option{NoExplicitScaleListConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_explicit_scaling_list_constraint_flag \\ -\Option{DepQuantConstraintFlag} & +\Option{NoDepQuantConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_dep_quant_constraint_flag \\ -\Option{SignDataHidingConstraintFlag} & +\Option{NoSignDataHidingConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_sign_data_hiding_constraint_flag \\ -\Option{QpDeltaConstraintFlag} & +\Option{NoQpDeltaConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_cu_qp_delta_constraint_flag \\ -\Option{SaoConstraintFlag} & +\Option{NoSaoConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_sao_constraint_flag \\ -\Option{AlfConstraintFlag} & +\Option{NoAlfConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_alf_constraint_flag \\ -\Option{CCAlfConstraintFlag} & +\Option{NoCCAlfConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_ccalf_constraint_flag \\ -\Option{LmcsConstraintFlag} & +\Option{NoLmcsConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_lmcs_constraint_flag \\ -\Option{LadfConstraintFlag} & +\Option{NoLadfConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_ladf_constraint_flag \\ -\Option{VirtualBoundaryConstraintFlag} & +\Option{NoVirtualBoundaryConstraintFlag} & %\ShortOption{\None} & \Default{false} & Specifies the value of gci_no_virtual_boundaries_constraint_flag diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 57d5bad6ee706cf13ea118498df9abe88aa8f12c..cf0eb83ba4f1265f7181e78133d637ea776830bf 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -250,6 +250,9 @@ void EncApp::xInitLibCfg() m_cEncLib.setSourceHeight ( m_iSourceHeight ); m_cEncLib.setConformanceWindow ( m_confWinLeft / SPS::getWinUnitX( m_InputChromaFormatIDC ), m_confWinRight / SPS::getWinUnitX( m_InputChromaFormatIDC ), m_confWinTop / SPS::getWinUnitY( m_InputChromaFormatIDC ), m_confWinBottom / SPS::getWinUnitY( m_InputChromaFormatIDC ) ); m_cEncLib.setScalingRatio ( m_scalingRatioHor, m_scalingRatioVer ); +#if JVET_Q0114_ASPECT5_GCI_FLAG + m_cEncLib.setRprEnabled (m_rprEnabledFlag); +#endif m_cEncLib.setResChangeInClvsEnabled ( m_resChangeInClvsEnabled ); m_cEncLib.setSwitchPocPeriod ( m_switchPocPeriod ); m_cEncLib.setUpscaledOutput ( m_upscaledOutput ); @@ -311,6 +314,11 @@ void EncApp::xInitLibCfg() m_cEncLib.setNoCraConstraintFlag(m_noCraConstraintFlag); CHECK(m_noCraConstraintFlag && (m_iDecodingRefreshType == 1), "CRA shall be deactivated when m_noCraConstraintFlag is equal to 1"); +#if JVET_Q0114_ASPECT5_GCI_FLAG + m_cEncLib.setNoRprConstraintFlag(m_noRprConstraintFlag); + CHECK(m_noRprConstraintFlag && m_rprEnabledFlag, "Reference picture resampling shall be deactivated when m_noRprConstraintFlag is equal to 1"); +#endif + m_cEncLib.setNoResChangeInClvsConstraintFlag(m_noResChangeInClvsConstraintFlag); CHECK(m_noResChangeInClvsConstraintFlag && m_resChangeInClvsEnabled, "Resolution change in CLVS shall be deactivated when m_noResChangeInClvsConstraintFlag is equal to 1"); diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 7fdbfe7e7b25ef727e4de040cf30c595f4c83b94..f5836aeda766db8e03def2df22a29c18dc31a1bb 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -824,14 +824,14 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("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") - ("TrailConstraintFlag", m_noTrailConstraintFlag, false, "Indicate that TRAIL is deactivated") - ("StsaConstraintFlag", m_noStsaConstraintFlag, false, "Indicate that STSA is deactivated") - ("RaslConstraintFlag", m_noRaslConstraintFlag, false, "Indicate that RSAL is deactivated") - ("RadlConstraintFlag", m_noRadlConstraintFlag, false, "Indicate that RADL is deactivated") - ("IdrConstraintFlag", m_noIdrConstraintFlag, false, "Indicate that IDR is deactivated") - ("CraConstraintFlag", m_noCraConstraintFlag, false, "Indicate that CRA is deactivated") - ("GdrConstraintFlag", m_noGdrConstraintFlag, false, "Indicate that GDR is deactivated") - ("ApsConstraintFlag", m_noApsConstraintFlag, false, "Indicate that APS is deactivated") + ("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") + ("NoRadlConstraintFlag", m_noRadlConstraintFlag, false, "Indicate that RADL is deactivated") + ("NoIdrConstraintFlag", m_noIdrConstraintFlag, false, "Indicate that IDR is deactivated") + ("NoCraConstraintFlag", m_noCraConstraintFlag, false, "Indicate that CRA is deactivated") + ("NoGdrConstraintFlag", m_noGdrConstraintFlag, false, "Indicate that GDR is deactivated") + ("NoApsConstraintFlag", m_noApsConstraintFlag, false, "Indicate that APS is deactivated") ("OneTilePerPicConstraintFlag", m_oneTilePerPicConstraintFlag, false, "Indicate that each picture shall contain only one tile") ("PicHeaderInSliceHeaderConstraintFlag", m_picHeaderInSliceHeaderConstraintFlag, false, "Indicate that picture header is present in slice header") ("OneSlicePerPicConstraintFlag", m_oneSlicePerPicConstraintFlag, false, "Indicate that each picture shall contain only one slice") @@ -846,51 +846,54 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) #if JVET_S0066_GCI ("MaxLog2CtuSizeConstraintIdc", m_maxLog2CtuSizeConstraintIdc, 8, "Indicate that Log2CtuSize shall be in the range of 0 to m_maxLog2CtuSizeConstraintIdc") #endif - ("PartitionConstraintsOverrideConstraintFlag", m_noPartitionConstraintsOverrideConstraintFlag, false, "Indicate that Partition Override is deactivated") - ("QtbttDualTreeIntraConstraintFlag", m_bNoQtbttDualTreeIntraConstraintFlag, false, "Indicate that Qtbtt DualTree Intra is deactivated") - ("PaletteConstraintFlag", m_noPaletteConstraintFlag, false, "Indicate that PLT is deactivated") - ("IbcConstraintFlag", m_noIbcConstraintFlag, false, "Indicate that IBC is deactivated") - ("IspConstraintFlag", m_noIspConstraintFlag, false, "Indicate that ISP is deactivated") - ("MrlConstraintFlag", m_noMrlConstraintFlag, false, "Indicate that MRL is deactivated") - ("MipConstraintFlag", m_noMipConstraintFlag, false, "Indicate that MIP is deactivated") - ("CclmConstraintFlag", m_bNoCclmConstraintFlag, false, "Indicate that CCLM is deactivated") + ("NoPartitionConstraintsOverrideConstraintFlag", m_noPartitionConstraintsOverrideConstraintFlag, false, "Indicate that Partition Override is deactivated") + ("NoQtbttDualTreeIntraConstraintFlag", m_bNoQtbttDualTreeIntraConstraintFlag, false, "Indicate that Qtbtt DualTree Intra is deactivated") + ("NoPaletteConstraintFlag", m_noPaletteConstraintFlag, false, "Indicate that PLT is deactivated") + ("NoIbcConstraintFlag", m_noIbcConstraintFlag, false, "Indicate that IBC is deactivated") + ("NoIspConstraintFlag", m_noIspConstraintFlag, false, "Indicate that ISP is deactivated") + ("NoMrlConstraintFlag", m_noMrlConstraintFlag, false, "Indicate that MRL is deactivated") + ("NoMipConstraintFlag", m_noMipConstraintFlag, false, "Indicate that MIP is deactivated") + ("NoCclmConstraintFlag", m_bNoCclmConstraintFlag, false, "Indicate that CCLM is deactivated") +#if JVET_Q0114_ASPECT5_GCI_FLAG + ("NoRprConstraintFlag", m_noRprConstraintFlag, false, "Indicate that reference picture resampling is deactivated") +#endif ("NoResChangeInClvsConstraintFlag", m_noResChangeInClvsConstraintFlag, false, "Indicate that the picture spatial resolution does not change within any CLVS referring to the SPS") - ("RefWraparoundConstraintFlag", m_bNoRefWraparoundConstraintFlag, false, "Indicate that Reference Wraparound is deactivated") - ("TemporalMvpConstraintFlag", m_bNoTemporalMvpConstraintFlag, false, "Indicate that temporal MVP is deactivated") - ("SbtmvpConstraintFlag", m_bNoSbtmvpConstraintFlag, false, "Indicate that SbTMVP is deactivated") - ("AmvrConstraintFlag", m_bNoAmvrConstraintFlag, false, "Indicate that AMVR is deactivated") - ("SmvdConstraintFlag", m_noSmvdConstraintFlag, false, "Indicate that SMVD is deactivated") - ("BdofConstraintFlag", m_bNoBdofConstraintFlag, false, "Indicate that BIO is deactivated") - ("DmvrConstraintFlag", m_noDmvrConstraintFlag, false, "Indicate that DMVR is deactivated") - ("MmvdConstraintFlag", m_noMmvdConstraintFlag, false, "Indicate that MMVD is deactivated") - ("AffineMotionConstraintFlag", m_bNoAffineMotionConstraintFlag, false, "Indicate that Affine is deactivated") - ("ProfConstraintFlag", m_noProfConstraintFlag, false, "Indicate that PROF is deactivated") - ("BcwConstraintFlag", m_bNoBcwConstraintFlag, false, "Indicate that BCW is deactivated") - ("CiipConstraintFlag", m_bNoCiipConstraintFlag, false, "Indicate that CIIP is deactivated") - ("GpmConstraintFlag", m_noGeoConstraintFlag, false, "Indicate that GPM is deactivated") - ("TransformSkipConstraintFlag", m_noTransformSkipConstraintFlag, false, "Indicate that Transform Skip is deactivated") + ("NoRefWraparoundConstraintFlag", m_bNoRefWraparoundConstraintFlag, false, "Indicate that Reference Wraparound is deactivated") + ("NoTemporalMvpConstraintFlag", m_bNoTemporalMvpConstraintFlag, false, "Indicate that temporal MVP is deactivated") + ("NoSbtmvpConstraintFlag", m_bNoSbtmvpConstraintFlag, false, "Indicate that SbTMVP is deactivated") + ("NoAmvrConstraintFlag", m_bNoAmvrConstraintFlag, false, "Indicate that AMVR is deactivated") + ("NoSmvdConstraintFlag", m_noSmvdConstraintFlag, false, "Indicate that SMVD is deactivated") + ("NoBdofConstraintFlag", m_bNoBdofConstraintFlag, false, "Indicate that BIO is deactivated") + ("NoDmvrConstraintFlag", m_noDmvrConstraintFlag, false, "Indicate that DMVR is deactivated") + ("NoMmvdConstraintFlag", m_noMmvdConstraintFlag, false, "Indicate that MMVD is deactivated") + ("NoAffineMotionConstraintFlag", m_bNoAffineMotionConstraintFlag, false, "Indicate that Affine is deactivated") + ("NoProfConstraintFlag", m_noProfConstraintFlag, false, "Indicate that PROF is deactivated") + ("NoBcwConstraintFlag", m_bNoBcwConstraintFlag, false, "Indicate that BCW is deactivated") + ("NoCiipConstraintFlag", m_bNoCiipConstraintFlag, false, "Indicate that CIIP is deactivated") + ("NoGpmConstraintFlag", m_noGeoConstraintFlag, false, "Indicate that GPM is deactivated") + ("NoTransformSkipConstraintFlag", m_noTransformSkipConstraintFlag, false, "Indicate that Transform Skip is deactivated") #if JVET_S0066_GCI - ("LumaTransformSize64ConstraintFlag", m_noLumaTransformSize64ConstraintFlag, false, "Indicate that Luma Transform Size 64 is deactivated") + ("NoLumaTransformSize64ConstraintFlag", m_noLumaTransformSize64ConstraintFlag, false, "Indicate that Luma Transform Size 64 is deactivated") #endif - ("BDPCMConstraintFlag", m_noBDPCMConstraintFlag, false, "Indicate that BDPCM is deactivated") - ("MtsConstraintFlag", m_bNoMtsConstraintFlag, false, "Indicate that MTS is deactivated") - ("LfnstConstraintFlag", m_noLfnstConstraintFlag, false, "Indicate that LFNST is deactivated") - ("JointCbCrConstraintFlag", m_noJointCbCrConstraintFlag, false, "Indicate that JCCR is deactivated") - ("SbtConstraintFlag", m_noSbtConstraintFlag, false, "Indicate that SBT is deactivated") - ("ActConstraintFlag", m_noActConstraintFlag, false, "Indicate that ACT is deactivated") + ("NoBDPCMConstraintFlag", m_noBDPCMConstraintFlag, false, "Indicate that BDPCM is deactivated") + ("NoMtsConstraintFlag", m_bNoMtsConstraintFlag, false, "Indicate that MTS is deactivated") + ("NoLfnstConstraintFlag", m_noLfnstConstraintFlag, false, "Indicate that LFNST is deactivated") + ("NoJointCbCrConstraintFlag", m_noJointCbCrConstraintFlag, false, "Indicate that JCCR is deactivated") + ("NoSbtConstraintFlag", m_noSbtConstraintFlag, false, "Indicate that SBT is deactivated") + ("NoActConstraintFlag", m_noActConstraintFlag, false, "Indicate that ACT is deactivated") #if JVET_S0050_GCI - ("ExplicitScaleListConstraintFlag", m_noExplicitScaleListConstraintFlag, false, "Indicate that explicit scaling list is deactivated") + ("NoExplicitScaleListConstraintFlag", m_noExplicitScaleListConstraintFlag, false, "Indicate that explicit scaling list is deactivated") #endif - ("DepQuantConstraintFlag", m_bNoDepQuantConstraintFlag, false, "Indicate that DQ is deactivated") - ("SignDataHidingConstraintFlag", m_bNoSignDataHidingConstraintFlag, false, "Indicate that SDH is deactivated") - ("QpDeltaConstraintFlag", m_bNoQpDeltaConstraintFlag, false, "Indicate that QPdelta is deactivated") - ("SaoConstraintFlag", m_bNoSaoConstraintFlag, false, "Indicate that SAO is deactivated") - ("AlfConstraintFlag", m_bNoAlfConstraintFlag, false, "Indicate that ALF is deactivated") - ("CCAlfConstraintFlag", m_noCCAlfConstraintFlag, false, "Indicate that CCALF is deactivated") - ("LmcsConstraintFlag", m_noLmcsConstraintFlag, false, "Indicate that LMCS is deactivated") - ("LadfConstraintFlag", m_bNoLadfConstraintFlag, false, "Indicate that LADF is deactivated") + ("NoDepQuantConstraintFlag", m_bNoDepQuantConstraintFlag, false, "Indicate that DQ is deactivated") + ("NoSignDataHidingConstraintFlag", m_bNoSignDataHidingConstraintFlag, false, "Indicate that SDH is deactivated") + ("NoQpDeltaConstraintFlag", m_bNoQpDeltaConstraintFlag, false, "Indicate that QPdelta is deactivated") + ("NoSaoConstraintFlag", m_bNoSaoConstraintFlag, false, "Indicate that SAO is deactivated") + ("NoAlfConstraintFlag", m_bNoAlfConstraintFlag, false, "Indicate that ALF is deactivated") + ("NoCCAlfConstraintFlag", m_noCCAlfConstraintFlag, false, "Indicate that CCALF is deactivated") + ("NoLmcsConstraintFlag", m_noLmcsConstraintFlag, false, "Indicate that LMCS is deactivated") + ("NoLadfConstraintFlag", m_bNoLadfConstraintFlag, false, "Indicate that LADF is deactivated") #if JVET_S0050_GCI - ("VirtualBoundaryConstraintFlag", m_noVirtualBoundaryConstraintFlag, false, "Indicate that virtual boundary is deactivated") + ("NoVirtualBoundaryConstraintFlag", m_noVirtualBoundaryConstraintFlag, false, "Indicate that virtual boundary is deactivated") #endif #if !JVET_S0138_GCI_PTL ("SingleLayerConstraintFlag", m_singleLayerConstraintFlag, false, "Indicate that the bitstream contains only one layer") @@ -1443,6 +1446,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ( "ALF", m_alf, true, "Adaptive Loop Filter\n" ) ( "CCALF", m_ccalf, true, "Cross-component Adaptive Loop Filter" ) ( "CCALFQpTh", m_ccalfQpThreshold, 37, "QP threshold above which encoder reduces CCALF usage") +#if JVET_Q0114_ASPECT5_GCI_FLAG + ( "RPR", m_rprEnabledFlag, true, "Reference Sample Resolution" ) +#endif ( "ScalingRatioHor", m_scalingRatioHor, 1.0, "Scaling ratio in hor direction" ) ( "ScalingRatioVer", m_scalingRatioVer, 1.0, "Scaling ratio in ver direction" ) ( "FractionNumFrames", m_fractionOfFrames, 1.0, "Encode a fraction of the specified in FramesToBeEncoded frames" ) @@ -1503,6 +1509,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) const list<const char*>& argv_unhandled = po::scanArgv(opts, argc, (const char**) argv, err); m_resChangeInClvsEnabled = m_scalingRatioHor != 1.0 || m_scalingRatioVer != 1.0; +#if JVET_Q0114_ASPECT5_GCI_FLAG + m_resChangeInClvsEnabled = m_resChangeInClvsEnabled && m_rprEnabledFlag; +#endif if( m_fractionOfFrames != 1.0 ) { m_framesToBeEncoded = int( m_framesToBeEncoded * m_fractionOfFrames ); diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 5a9f598e5d401abfd9af152d386c6e5b6d8b5211..02b0a7f72caa27126fdb8fd87f86218d7a97f333 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -213,6 +213,9 @@ protected: bool m_intraOnlyConstraintFlag; bool m_nonPackedConstraintFlag; bool m_nonProjectedConstraintFlag; +#if JVET_Q0114_ASPECT5_GCI_FLAG + bool m_noRprConstraintFlag; +#endif bool m_noResChangeInClvsConstraintFlag; bool m_oneTilePerPicConstraintFlag; bool m_picHeaderInSliceHeaderConstraintFlag; @@ -717,6 +720,9 @@ protected: bool m_ccalf; int m_ccalfQpThreshold; +#if JVET_Q0114_ASPECT5_GCI_FLAG + bool m_rprEnabledFlag; +#endif double m_scalingRatioHor; double m_scalingRatioVer; bool m_resChangeInClvsEnabled; diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 158989f4aedb34d31a9e12065fafb4b767af79ca..b4e2a32a4334b9f83f722824231debe2d2de0a8d 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -4601,6 +4601,10 @@ bool operator == (const ConstraintInfo& op1, const ConstraintInfo& o #if JVET_S0050_GCI if (op1.m_noExplicitScaleListConstraintFlag != op2.m_noExplicitScaleListConstraintFlag ) return false; if (op1.m_noVirtualBoundaryConstraintFlag != op2.m_noVirtualBoundaryConstraintFlag ) return false; +#endif +#if JVET_Q0114_ASPECT5_GCI_FLAG + if (op1.m_noRprConstraintFlag != op2.m_noRprConstraintFlag ) return false; + if (op1.m_noResChangeInClvsConstraintFlag != op2.m_noResChangeInClvsConstraintFlag ) return false; #endif if( op1.m_noQtbttDualTreeIntraConstraintFlag != op2.m_noQtbttDualTreeIntraConstraintFlag ) return false; if( op1.m_noPartitionConstraintsOverrideConstraintFlag != op2.m_noPartitionConstraintsOverrideConstraintFlag ) return false; diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 007b00ed49c5328b7943ee318e69ae89b7056df5..fbcf0c9ccea4e0874dcc506efe1f3b7bc4fefdd0 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -241,6 +241,9 @@ class ConstraintInfo #if !JVET_S0266_VUI_length bool m_nonPackedConstraintFlag; bool m_nonProjectedConstraintFlag; +#endif +#if JVET_Q0114_ASPECT5_GCI_FLAG + bool m_noRprConstraintFlag; #endif bool m_noResChangeInClvsConstraintFlag; bool m_oneTilePerPicConstraintFlag; @@ -334,6 +337,9 @@ public: #else : m_nonPackedConstraintFlag (false) , m_nonProjectedConstraintFlag(false) +#endif +#if JVET_Q0114_ASPECT5_GCI_FLAG + , m_noRprConstraintFlag(false) #endif , m_noResChangeInClvsConstraintFlag(false) , m_oneTilePerPicConstraintFlag(false) @@ -446,6 +452,11 @@ public: void setNonProjectedConstraintFlag(bool b) { m_nonProjectedConstraintFlag = b; } #endif +#if JVET_Q0114_ASPECT5_GCI_FLAG + bool getNoRprConstraintFlag() const { return m_noRprConstraintFlag; } + void setNoRprConstraintFlag(bool b) { m_noRprConstraintFlag = b; } +#endif + bool getNoResChangeInClvsConstraintFlag() const { return m_noResChangeInClvsConstraintFlag; } void setNoResChangeInClvsConstraintFlag(bool b) { m_noResChangeInClvsConstraintFlag = b; } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index b4d66160dbc9e06ff32f2d349540089b9ef94539..e02b0a0fb7364d83126fe80568dec2bc5bb9b4f4 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -164,6 +164,8 @@ #define JVET_S0184_VIRTUAL_BOUNDARY_CONSTRAINT 1 // JVET-S0184: Conformance constraints regarding virtual boundary signalling when subpictures are present +#define JVET_Q0114_ASPECT5_GCI_FLAG 1 // JVET-Q0114 Aspect 5: Add a general constraint on no reference picture resampling + //########### place macros to be be kept below this line ############### #define JVET_S0257_DUMP_360SEI_MESSAGE 1 // Software support of 360 SEI messages diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index f6ad8a5df2ef5dc4b4de7e53840117ee6c520ceb..94018b804816a620c134eaf3a0c04b1523055951 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -1856,6 +1856,17 @@ void DecLib::xCheckParameterSetConstraints(const int layerId) #endif } +#if JVET_Q0114_ASPECT5_GCI_FLAG + if (sps->getProfileTierLevel()->getConstraintInfo()->getNoRprConstraintFlag()) + { + CHECK(sps->getRprEnabledFlag(), "When gci_no_ref_pic_resampling_constraint_flag is equal to 1, the value of sps_ref_pic_resampling_enabled_flag shall be equal to 0"); + } + if (sps->getProfileTierLevel()->getConstraintInfo()->getNoResChangeInClvsConstraintFlag()) + { + CHECK(sps->getResChangeInClvsEnabledFlag(), "When gci_no_res_change_in_clvs_constraint_flag is equal to 1, the value of sps_res_change_in_clvs_allowed_flag shall be equal to 0"); + } +#endif + #if JVET_S0113_S0195_GCI if (sps->getProfileTierLevel()->getConstraintInfo()->getNoIdrRplConstraintFlag()) { diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 2e25fda8d4e00cb5ddd7ab7ac4d041f3ea104eac..8389ceb97bbfd410d2e76ccbec478f09f1d4dc07 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -1470,6 +1470,12 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) #endif READ_FLAG(uiCode, "ref_pic_resampling_enabled_flag"); pcSPS->setRprEnabledFlag(uiCode); +#if JVET_Q0114_ASPECT5_GCI_FLAG + if (pcSPS->getProfileTierLevel()->getConstraintInfo()->getNoRprConstraintFlag()) + { + CHECK(uiCode != 0, "When gci_no_ref_pic_resampling_constraint_flag is equal to 1, sps_ref_pic_resampling_enabled_flag shall be equal to 0"); + } +#endif if (uiCode) { READ_FLAG(uiCode, "res_change_in_clvs_allowed_flag"); pcSPS->setResChangeInClvsEnabledFlag(uiCode); @@ -2171,6 +2177,12 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } #endif READ_FLAG(uiCode, "sps_explicit_scaling_list_enabled_flag"); pcSPS->setScalingListFlag(uiCode); +#if JVET_S0050_GCI + if (pcSPS->getProfileTierLevel()->getConstraintInfo()->getNoExplicitScaleListConstraintFlag()) + { + CHECK(uiCode != 0, "When gci_no_explicit_scaling_list_constraint_flag is equal to 1, sps_explicit_scaling_list_enabled_flag shall be equal to 0"); + } +#endif if (pcSPS->getUseLFNST() && pcSPS->getScalingListFlag()) { @@ -2189,6 +2201,13 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG(uiCode, "sps_sign_data_hiding_enabled_flag"); pcSPS->setSignDataHidingEnabledFlag(uiCode); READ_FLAG( uiCode, "sps_virtual_boundaries_enabled_flag" ); pcSPS->setVirtualBoundariesEnabledFlag( uiCode != 0 ); +#if JVET_S0050_GCI + if (pcSPS->getProfileTierLevel()->getConstraintInfo()->getNoVirtualBoundaryConstraintFlag()) + { + CHECK(uiCode != 0, "When gci_no_virtual_boundaries_constraint_flag is equal to 1, sps_virtual_boundaries_enabled_flag shall be equal to 0"); + } +#endif + if( pcSPS->getVirtualBoundariesEnabledFlag() ) { READ_FLAG( uiCode, "sps_loop_filter_across_virtual_boundaries_present_flag" ); pcSPS->setVirtualBoundariesPresentFlag( uiCode != 0 ); @@ -4660,6 +4679,9 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo) { CHECK(symbol == 0, "When single_layer_constraint_flag is equal to 1, the value of all_layers_independent_ constraint_flag shall be equal to 1"); } +#endif +#if JVET_Q0114_ASPECT5_GCI_FLAG + READ_FLAG(symbol, "gci_no_ref_pic_resampling_constraint_flag"); cinfo->setNoRprConstraintFlag(symbol ? true : false); #endif READ_FLAG(symbol, "no_res_change_in_clvs_constraint_flag" ); cinfo->setNoResChangeInClvsConstraintFlag(symbol ? true : false); #if JVET_S0113_S0195_GCI diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 83d24e12760a0b4326d17d8e538d340d23a42748..d0ea83db6a16aabebe42a013fe35cd0c147fe511 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -253,6 +253,9 @@ protected: uint8_t m_numSubProfile; bool m_nonPackedConstraintFlag; bool m_nonProjectedConstraintFlag; +#if JVET_Q0114_ASPECT5_GCI_FLAG + bool m_noRprConstraintFlag; +#endif bool m_noResChangeInClvsConstraintFlag; bool m_oneTilePerPicConstraintFlag; bool m_picHeaderInSliceHeaderConstraintFlag; @@ -771,6 +774,9 @@ protected: #endif double m_scalingRatioHor; double m_scalingRatioVer; +#if JVET_Q0114_ASPECT5_GCI_FLAG + bool m_rprEnabledFlag; +#endif bool m_resChangeInClvsEnabled; int m_switchPocPeriod; int m_upscaledOutput; @@ -1882,6 +1888,11 @@ public: bool getNonProjectedConstraintFlag() const { return m_nonProjectedConstraintFlag; } void setNonProjectedConstraintFlag(bool b) { m_nonProjectedConstraintFlag = b; } +#if JVET_Q0114_ASPECT5_GCI_FLAG + bool getNoRprConstraintFlag() const { return m_noRprConstraintFlag; } + void setNoRprConstraintFlag(bool b) { m_noRprConstraintFlag = b; } +#endif + bool getNoResChangeInClvsConstraintFlag() const { return m_noResChangeInClvsConstraintFlag; } void setNoResChangeInClvsConstraintFlag(bool b) { m_noResChangeInClvsConstraintFlag = b; } @@ -1982,7 +1993,10 @@ public: void setCalculateHdrMetrics(bool value) { m_calculateHdrMetrics = value;} bool getCalcluateHdrMetrics() const { return m_calculateHdrMetrics;} #endif - +#if JVET_Q0114_ASPECT5_GCI_FLAG + void setRprEnabled(bool b) { m_rprEnabledFlag = b; } + bool isRprEnabled() const { return m_rprEnabledFlag; } +#endif void setScalingRatio( double hor, double ver ) { m_scalingRatioHor = hor, m_scalingRatioVer = ver; } void setResChangeInClvsEnabled(bool b) { m_resChangeInClvsEnabled = b; } bool isResChangeInClvsEnabled() const { return m_resChangeInClvsEnabled; } diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 8e01670e0dbd8c46ca4cb7c8640ab98cd92b2af5..ae770c25d9cc33b2f2f3c1d225eea760f8071f1b 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -1122,6 +1122,9 @@ void EncLib::xInitSPS( SPS& sps ) #if !JVET_S0266_VUI_length cinfo->setNonPackedConstraintFlag (m_nonPackedConstraintFlag); cinfo->setNonProjectedConstraintFlag(m_nonProjectedConstraintFlag); +#endif +#if JVET_Q0114_ASPECT5_GCI_FLAG + cinfo->setNoRprConstraintFlag(m_noRprConstraintFlag); #endif cinfo->setNoResChangeInClvsConstraintFlag(m_noResChangeInClvsConstraintFlag); cinfo->setOneTilePerPicConstraintFlag(m_oneTilePerPicConstraintFlag); @@ -1503,7 +1506,11 @@ void EncLib::xInitSPS( SPS& sps ) CHECK( m_vps->getIndependentLayerFlag( m_vps->getGeneralLayerIdx( m_layerId ) ) && sps.getInterLayerPresentFlag(), " When vps_independent_layer_flag[GeneralLayerIdx[nuh_layer_id ]] is equal to 1, the value of inter_layer_ref_pics_present_flag shall be equal to 0." ); sps.setResChangeInClvsEnabledFlag(m_resChangeInClvsEnabled); +#if JVET_Q0114_ASPECT5_GCI_FLAG + sps.setRprEnabledFlag(m_rprEnabledFlag); +#else sps.setRprEnabledFlag((m_resChangeInClvsEnabled) || sps.getInterLayerPresentFlag()); +#endif sps.setLog2ParallelMergeLevelMinus2( m_log2ParallelMergeLevelMinus2 ); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 58051321b12f0c66ef876ceae07f5a849f36b2e3..edda6d5bb43f2dbdb9346a02b6bc03eed34074b5 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -883,6 +883,9 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) { WRITE_FLAG(pcSPS->getResChangeInClvsEnabledFlag(), "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"); +#endif WRITE_UVLC( pcSPS->getMaxPicWidthInLumaSamples(), "pic_width_max_in_luma_samples" ); WRITE_UVLC( pcSPS->getMaxPicHeightInLumaSamples(), "pic_height_max_in_luma_samples" ); @@ -2708,6 +2711,9 @@ void HLSWriter::codeConstraintInfo ( const ConstraintInfo* cinfo ) WRITE_FLAG(cinfo->getSingleLayerConstraintFlag(), "single_layer_constraint_flag"); #endif WRITE_FLAG(cinfo->getAllLayersIndependentConstraintFlag(), "all_layers_independent_constraint_flag"); +#if JVET_Q0114_ASPECT5_GCI_FLAG + WRITE_FLAG(cinfo->getNoRprConstraintFlag(), "gci_no_ref_pic_resampling_constraint_flag"); +#endif WRITE_FLAG(cinfo->getNoResChangeInClvsConstraintFlag(), "no_res_change_in_clvs_constraint_flag"); #if JVET_S0113_S0195_GCI WRITE_FLAG(cinfo->getNoIdrRplConstraintFlag(), "gci_no_idr_rpl_constraint_flag");