diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 6e7431219a4f624e364fa2b2c6b2b8e3181b7768..3480c6b14cf6d05aa788d625824d7e29a168d957 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -1144,8 +1144,12 @@ void EncApp::xInitLibCfg() m_cEncLib.setNNPostFilterSEICharacteristicsPurpose (m_nnPostFilterSEICharacteristicsPurpose[i], i); if (m_cEncLib.getNNPostFilterSEICharacteristicsPurpose(i) == 2 || m_cEncLib.getNNPostFilterSEICharacteristicsPurpose(i) == 4) { +#if JVET_AA0054_CHROMA_FORMAT_FLAG + m_cEncLib.setNNPostFilterSEICharacteristicsOutSubCFlag(m_nnPostFilterSEICharacteristicsOutSubCFlag[i], i); +#else m_cEncLib.setNNPostFilterSEICharacteristicsOutSubWidthCFlag (m_nnPostFilterSEICharacteristicsOutSubWidthCFlag[i], i); m_cEncLib.setNNPostFilterSEICharacteristicsOutSubHeightCFlag (m_nnPostFilterSEICharacteristicsOutSubHeightCFlag[i], i); +#endif } if (m_cEncLib.getNNPostFilterSEICharacteristicsPurpose(i) == 3 || m_cEncLib.getNNPostFilterSEICharacteristicsPurpose(i) == 4) { diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 13c6213f4fe7d3b5d0b3e3f63a0da4245cecc7c3..1cac6e72e05bc5618d50fe6e995b833150a04a8e 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1343,104 +1343,104 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) #endif ("SEIErpEnabled", m_erpSEIEnabled, false, "Control generation of equirectangular projection SEI messages") - ("SEIErpCancelFlag", m_erpSEICancelFlag, true, "Indicate that equirectangular projection SEI message cancels the persistence or follows") - ("SEIErpPersistenceFlag", m_erpSEIPersistenceFlag, false, "Specifies the persistence of the equirectangular projection SEI messages") - ("SEIErpGuardBandFlag", m_erpSEIGuardBandFlag, false, "Indicate the existence of guard band areas in the constituent picture") - ("SEIErpGuardBandType", m_erpSEIGuardBandType, 0u, "Indicate the type of the guard band") - ("SEIErpLeftGuardBandWidth", m_erpSEILeftGuardBandWidth, 0u, "Indicate the width of the guard band on the left side of the constituent picture") - ("SEIErpRightGuardBandWidth", m_erpSEIRightGuardBandWidth, 0u, "Indicate the width of the guard band on the right side of the constituent picture") - ("SEISphereRotationEnabled", m_sphereRotationSEIEnabled, false, "Control generation of sphere rotation SEI messages") - ("SEISphereRotationCancelFlag", m_sphereRotationSEICancelFlag, true, "Indicate that sphere rotation SEI message cancels the persistence or follows") - ("SEISphereRotationPersistenceFlag", m_sphereRotationSEIPersistenceFlag, false, "Specifies the persistence of the sphere rotation SEI messages") - ("SEISphereRotationYaw", m_sphereRotationSEIYaw, 0, "Specifies the value of the yaw rotation angle") - ("SEISphereRotationPitch", m_sphereRotationSEIPitch, 0, "Specifies the value of the pitch rotation angle") - ("SEISphereRotationRoll", m_sphereRotationSEIRoll, 0, "Specifies the value of the roll rotation angle") - ("SEIOmniViewportEnabled", m_omniViewportSEIEnabled, false, "Control generation of omni viewport SEI messages") - ("SEIOmniViewportId", m_omniViewportSEIId, 0u, "An identifying number that may be used to identify the purpose of the one or more recommended viewport regions") - ("SEIOmniViewportCancelFlag", m_omniViewportSEICancelFlag, true, "Indicate that omni viewport SEI message cancels the persistence or follows") - ("SEIOmniViewportPersistenceFlag", m_omniViewportSEIPersistenceFlag, false, "Specifies the persistence of the omni viewport SEI messages") - ("SEIOmniViewportCntMinus1", m_omniViewportSEICntMinus1, 0u, "specifies the number of recommended viewport regions minus 1") - ("SEIOmniViewportAzimuthCentre", cfg_omniViewportSEIAzimuthCentre, cfg_omniViewportSEIAzimuthCentre, "Indicate the centre of the i-th recommended viewport region") - ("SEIOmniViewportElevationCentre", cfg_omniViewportSEIElevationCentre, cfg_omniViewportSEIElevationCentre, "Indicate the centre of the i-th recommended viewport region") - ("SEIOmniViewportTiltCentre", cfg_omniViewportSEITiltCentre, cfg_omniViewportSEITiltCentre, "Indicates the tilt angle of the i-th recommended viewport region") - ("SEIOmniViewportHorRange", cfg_omniViewportSEIHorRange, cfg_omniViewportSEIHorRange, "Indicates the azimuth range of the i-th recommended viewport region") - ("SEIOmniViewportVerRange", cfg_omniViewportSEIVerRange, cfg_omniViewportSEIVerRange, "Indicates the elevation range of the i-th recommended viewport region") - ("SEIRwpEnabled", m_rwpSEIEnabled, false, "Controls if region-wise packing SEI message enabled") - ("SEIRwpCancelFlag", m_rwpSEIRwpCancelFlag, true, "Specifies the persistence of any previous region-wise packing SEI message in output order.") - ("SEIRwpPersistenceFlag", m_rwpSEIRwpPersistenceFlag, false, "Specifies the persistence of the region-wise packing SEI message for the current layer.") - ("SEIRwpConstituentPictureMatchingFlag", m_rwpSEIConstituentPictureMatchingFlag, false, "Specifies the information in the SEI message apply individually to each constituent picture or to the projected picture.") - ("SEIRwpNumPackedRegions", m_rwpSEINumPackedRegions, 0, "specifies the number of packed regions when constituent picture matching flag is equal to 0.") - ("SEIRwpProjPictureWidth", m_rwpSEIProjPictureWidth, 0, "Specifies the width of the projected picture.") - ("SEIRwpProjPictureHeight", m_rwpSEIProjPictureHeight, 0, "Specifies the height of the projected picture.") - ("SEIRwpPackedPictureWidth", m_rwpSEIPackedPictureWidth, 0, "specifies the width of the packed picture.") - ("SEIRwpPackedPictureHeight", m_rwpSEIPackedPictureHeight, 0, "Specifies the height of the packed picture.") - ("SEIRwpTransformType", cfg_rwpSEIRwpTransformType, cfg_rwpSEIRwpTransformType, "specifies the rotation and mirroring to be applied to the i-th packed region.") - ("SEIRwpGuardBandFlag", cfg_rwpSEIRwpGuardBandFlag, cfg_rwpSEIRwpGuardBandFlag, "specifies the existence of guard band in the i-th packed region.") - ("SEIRwpProjRegionWidth", cfg_rwpSEIProjRegionWidth, cfg_rwpSEIProjRegionWidth, "specifies the width of the i-th projected region.") - ("SEIRwpProjRegionHeight", cfg_rwpSEIProjRegionHeight, cfg_rwpSEIProjRegionHeight, "specifies the height of the i-th projected region.") - ("SEIRwpProjRegionTop", cfg_rwpSEIRwpSEIProjRegionTop, cfg_rwpSEIRwpSEIProjRegionTop, "specifies the top sample row of the i-th projected region.") - ("SEIRwpProjRegionLeft", cfg_rwpSEIProjRegionLeft, cfg_rwpSEIProjRegionLeft, "specifies the left-most sample column of the i-th projected region.") - ("SEIRwpPackedRegionWidth", cfg_rwpSEIPackedRegionWidth, cfg_rwpSEIPackedRegionWidth, "specifies the width of the i-th packed region.") - ("SEIRwpPackedRegionHeight", cfg_rwpSEIPackedRegionHeight, cfg_rwpSEIPackedRegionHeight, "specifies the height of the i-th packed region.") - ("SEIRwpPackedRegionTop", cfg_rwpSEIPackedRegionTop, cfg_rwpSEIPackedRegionTop, "specifies the top luma sample row of the i-th packed region.") - ("SEIRwpPackedRegionLeft", cfg_rwpSEIPackedRegionLeft, cfg_rwpSEIPackedRegionLeft, "specifies the left-most luma sample column of the i-th packed region.") - ("SEIRwpLeftGuardBandWidth", cfg_rwpSEIRwpLeftGuardBandWidth, cfg_rwpSEIRwpLeftGuardBandWidth, "specifies the width of the guard band on the left side of the i-th packed region.") - ("SEIRwpRightGuardBandWidth", cfg_rwpSEIRwpRightGuardBandWidth, cfg_rwpSEIRwpRightGuardBandWidth, "specifies the width of the guard band on the right side of the i-th packed region.") - ("SEIRwpTopGuardBandHeight", cfg_rwpSEIRwpTopGuardBandHeight, cfg_rwpSEIRwpTopGuardBandHeight, "specifies the height of the guard band above the i-th packed region.") - ("SEIRwpBottomGuardBandHeight", cfg_rwpSEIRwpBottomGuardBandHeight, cfg_rwpSEIRwpBottomGuardBandHeight, "specifies the height of the guard band below the i-th packed region.") - ("SEIRwpGuardBandNotUsedForPredFlag", cfg_rwpSEIRwpGuardBandNotUsedForPredFlag, cfg_rwpSEIRwpGuardBandNotUsedForPredFlag, "Specifies if the guard bands is used in the inter prediction process.") - ("SEIRwpGuardBandType", cfg_rwpSEIRwpGuardBandType, cfg_rwpSEIRwpGuardBandType, "Specifies the type of the guard bands for the i-th packed region.") - ("SEIGcmpEnabled", m_gcmpSEIEnabled, false, "Control generation of generalized cubemap projection SEI messages") - ("SEIGcmpCancelFlag", m_gcmpSEICancelFlag, true, "Indicate that generalized cubemap projection SEI message cancels the persistence or follows") - ("SEIGcmpPersistenceFlag", m_gcmpSEIPersistenceFlag, false, "Specifies the persistence of the generalized cubemap projection SEI messages") - ("SEIGcmpPackingType", m_gcmpSEIPackingType, 0u, "Specifies the packing type") - ("SEIGcmpMappingFunctionType", m_gcmpSEIMappingFunctionType, 0u, "Specifies the mapping function used to adjust the sample locations of the cubemap projection") - ("SEIGcmpFaceIndex", cfg_gcmpSEIFaceIndex, cfg_gcmpSEIFaceIndex, "Specifies the face index for the i-th face") - ("SEIGcmpFaceRotation", cfg_gcmpSEIFaceRotation, cfg_gcmpSEIFaceRotation, "Specifies the rotation to be applied to the i-th face") - ("SEIGcmpFunctionCoeffU", cfg_gcmpSEIFunctionCoeffU, cfg_gcmpSEIFunctionCoeffU, "Specifies the coefficient used in the cubemap mapping function of the u-axis of the i-th face") - ("SEIGcmpFunctionUAffectedByVFlag", cfg_gcmpSEIFunctionUAffectedByVFlag, cfg_gcmpSEIFunctionUAffectedByVFlag, "Specifies whether the cubemap mapping function of the u-axis refers to the v position of the sample location") - ("SEIGcmpFunctionCoeffV", cfg_gcmpSEIFunctionCoeffV, cfg_gcmpSEIFunctionCoeffV, "Specifies the coefficient used in the cubemap mapping function of the v-axis of the i-th face") - ("SEIGcmpFunctionVAffectedByUFlag", cfg_gcmpSEIFunctionVAffectedByUFlag, cfg_gcmpSEIFunctionVAffectedByUFlag, "Specifies whether the cubemap mapping function of the v-axis refers to the u position of the sample location") - ("SEIGcmpGuardBandFlag", m_gcmpSEIGuardBandFlag, false, "Indicate the existence of guard band areas in the picture") - ("SEIGcmpGuardBandType", m_gcmpSEIGuardBandType, 0u, "Indicate the type of the guard bands") - ("SEIGcmpGuardBandBoundaryExteriorFlag", m_gcmpSEIGuardBandBoundaryExteriorFlag, false, "Indicate whether face boundaries contain guard bands") - ("SEIGcmpGuardBandSamplesMinus1", m_gcmpSEIGuardBandSamplesMinus1, 0u, "Specifies the number of guard band samples minus1 used in the cubemap projected picture") - ("SEISubpicLevelInfoEnabled", m_cfgSubpictureLevelInfoSEI.m_enabled, false, "Control generation of Subpicture Level Information SEI messages") - ("SEISubpicLevelInfoRefLevels", cfg_sliRefLevels, cfg_sliRefLevels, "List of reference levels for Subpicture Level Information SEI messages") - ("SEISubpicLevelInfoExplicitFraction", m_cfgSubpictureLevelInfoSEI.m_explicitFraction, false, "Enable sending of explicit fractions in Subpicture Level Information SEI messages") - ("SEISubpicLevelInfoNumSubpics", m_cfgSubpictureLevelInfoSEI.m_numSubpictures, 1, "Number of subpictures for Subpicture Level Information SEI messages") - ("SEIAnnotatedRegionsFileRoot,-ar", m_arSEIFileRoot, string(""), "Annotated region SEI parameters root file name (wo num ext); only the file name base is to be added. Underscore and POC would be automatically addded to . E.g. \"-ar ar\" will search for files ar_0.txt, ar_1.txt, ...") - ("SEISubpicLevelInfoMaxSublayers", m_cfgSubpictureLevelInfoSEI.m_sliMaxSublayers, 1, "Number of sublayers for Subpicture Level Information SEI messages") - ("SEISubpicLevelInfoSublayerInfoPresentFlag", m_cfgSubpictureLevelInfoSEI.m_sliSublayerInfoPresentFlag, false, "Enable sending of level information for all sublayers in Subpicture Level Information SEI messages") - ("SEISubpicLevelInfoRefLevelFractions", cfg_sliFractions, cfg_sliFractions, "List of subpicture level fractions for Subpicture Level Information SEI messages") - ("SEISubpicLevelInfoNonSubpicLayersFractions", cfg_sliNonSubpicLayersFractions, cfg_sliNonSubpicLayersFractions, "List of level fractions for non-subpicture layers in Subpicture Level Information SEI messages") - ("SEISampleAspectRatioInfo", m_sampleAspectRatioInfoSEIEnabled, false, "Control generation of Sample Aspect Ratio Information SEI messages") - ("SEISARICancelFlag", m_sariCancelFlag, false, "Indicates that Sample Aspect Ratio Information SEI message cancels the persistence or follows") - ("SEISARIPersistenceFlag", m_sariPersistenceFlag, true, "Specifies the persistence of the Sample Aspect Ratio Information SEI message") - ("SEISARIAspectRatioIdc", m_sariAspectRatioIdc, 0, "Specifies the Sample Aspect Ratio IDC of Sample Aspect Ratio Information SEI messages") - ("SEISARISarWidth", m_sariSarWidth, 0, "Specifies the Sample Aspect Ratio Width of Sample Aspect Ratio Information SEI messages, if extended SAR is chosen.") - ("SEISARISarHeight", m_sariSarHeight, 0, "Specifies the Sample Aspect Ratio Height of Sample Aspect Ratio Information SEI messages, if extended SAR is chosen.") +("SEIErpCancelFlag", m_erpSEICancelFlag, true, "Indicate that equirectangular projection SEI message cancels the persistence or follows") +("SEIErpPersistenceFlag", m_erpSEIPersistenceFlag, false, "Specifies the persistence of the equirectangular projection SEI messages") +("SEIErpGuardBandFlag", m_erpSEIGuardBandFlag, false, "Indicate the existence of guard band areas in the constituent picture") +("SEIErpGuardBandType", m_erpSEIGuardBandType, 0u, "Indicate the type of the guard band") +("SEIErpLeftGuardBandWidth", m_erpSEILeftGuardBandWidth, 0u, "Indicate the width of the guard band on the left side of the constituent picture") +("SEIErpRightGuardBandWidth", m_erpSEIRightGuardBandWidth, 0u, "Indicate the width of the guard band on the right side of the constituent picture") +("SEISphereRotationEnabled", m_sphereRotationSEIEnabled, false, "Control generation of sphere rotation SEI messages") +("SEISphereRotationCancelFlag", m_sphereRotationSEICancelFlag, true, "Indicate that sphere rotation SEI message cancels the persistence or follows") +("SEISphereRotationPersistenceFlag", m_sphereRotationSEIPersistenceFlag, false, "Specifies the persistence of the sphere rotation SEI messages") +("SEISphereRotationYaw", m_sphereRotationSEIYaw, 0, "Specifies the value of the yaw rotation angle") +("SEISphereRotationPitch", m_sphereRotationSEIPitch, 0, "Specifies the value of the pitch rotation angle") +("SEISphereRotationRoll", m_sphereRotationSEIRoll, 0, "Specifies the value of the roll rotation angle") +("SEIOmniViewportEnabled", m_omniViewportSEIEnabled, false, "Control generation of omni viewport SEI messages") +("SEIOmniViewportId", m_omniViewportSEIId, 0u, "An identifying number that may be used to identify the purpose of the one or more recommended viewport regions") +("SEIOmniViewportCancelFlag", m_omniViewportSEICancelFlag, true, "Indicate that omni viewport SEI message cancels the persistence or follows") +("SEIOmniViewportPersistenceFlag", m_omniViewportSEIPersistenceFlag, false, "Specifies the persistence of the omni viewport SEI messages") +("SEIOmniViewportCntMinus1", m_omniViewportSEICntMinus1, 0u, "specifies the number of recommended viewport regions minus 1") +("SEIOmniViewportAzimuthCentre", cfg_omniViewportSEIAzimuthCentre, cfg_omniViewportSEIAzimuthCentre, "Indicate the centre of the i-th recommended viewport region") +("SEIOmniViewportElevationCentre", cfg_omniViewportSEIElevationCentre, cfg_omniViewportSEIElevationCentre, "Indicate the centre of the i-th recommended viewport region") +("SEIOmniViewportTiltCentre", cfg_omniViewportSEITiltCentre, cfg_omniViewportSEITiltCentre, "Indicates the tilt angle of the i-th recommended viewport region") +("SEIOmniViewportHorRange", cfg_omniViewportSEIHorRange, cfg_omniViewportSEIHorRange, "Indicates the azimuth range of the i-th recommended viewport region") +("SEIOmniViewportVerRange", cfg_omniViewportSEIVerRange, cfg_omniViewportSEIVerRange, "Indicates the elevation range of the i-th recommended viewport region") +("SEIRwpEnabled", m_rwpSEIEnabled, false, "Controls if region-wise packing SEI message enabled") +("SEIRwpCancelFlag", m_rwpSEIRwpCancelFlag, true, "Specifies the persistence of any previous region-wise packing SEI message in output order.") +("SEIRwpPersistenceFlag", m_rwpSEIRwpPersistenceFlag, false, "Specifies the persistence of the region-wise packing SEI message for the current layer.") +("SEIRwpConstituentPictureMatchingFlag", m_rwpSEIConstituentPictureMatchingFlag, false, "Specifies the information in the SEI message apply individually to each constituent picture or to the projected picture.") +("SEIRwpNumPackedRegions", m_rwpSEINumPackedRegions, 0, "specifies the number of packed regions when constituent picture matching flag is equal to 0.") +("SEIRwpProjPictureWidth", m_rwpSEIProjPictureWidth, 0, "Specifies the width of the projected picture.") +("SEIRwpProjPictureHeight", m_rwpSEIProjPictureHeight, 0, "Specifies the height of the projected picture.") +("SEIRwpPackedPictureWidth", m_rwpSEIPackedPictureWidth, 0, "specifies the width of the packed picture.") +("SEIRwpPackedPictureHeight", m_rwpSEIPackedPictureHeight, 0, "Specifies the height of the packed picture.") +("SEIRwpTransformType", cfg_rwpSEIRwpTransformType, cfg_rwpSEIRwpTransformType, "specifies the rotation and mirroring to be applied to the i-th packed region.") +("SEIRwpGuardBandFlag", cfg_rwpSEIRwpGuardBandFlag, cfg_rwpSEIRwpGuardBandFlag, "specifies the existence of guard band in the i-th packed region.") +("SEIRwpProjRegionWidth", cfg_rwpSEIProjRegionWidth, cfg_rwpSEIProjRegionWidth, "specifies the width of the i-th projected region.") +("SEIRwpProjRegionHeight", cfg_rwpSEIProjRegionHeight, cfg_rwpSEIProjRegionHeight, "specifies the height of the i-th projected region.") +("SEIRwpProjRegionTop", cfg_rwpSEIRwpSEIProjRegionTop, cfg_rwpSEIRwpSEIProjRegionTop, "specifies the top sample row of the i-th projected region.") +("SEIRwpProjRegionLeft", cfg_rwpSEIProjRegionLeft, cfg_rwpSEIProjRegionLeft, "specifies the left-most sample column of the i-th projected region.") +("SEIRwpPackedRegionWidth", cfg_rwpSEIPackedRegionWidth, cfg_rwpSEIPackedRegionWidth, "specifies the width of the i-th packed region.") +("SEIRwpPackedRegionHeight", cfg_rwpSEIPackedRegionHeight, cfg_rwpSEIPackedRegionHeight, "specifies the height of the i-th packed region.") +("SEIRwpPackedRegionTop", cfg_rwpSEIPackedRegionTop, cfg_rwpSEIPackedRegionTop, "specifies the top luma sample row of the i-th packed region.") +("SEIRwpPackedRegionLeft", cfg_rwpSEIPackedRegionLeft, cfg_rwpSEIPackedRegionLeft, "specifies the left-most luma sample column of the i-th packed region.") +("SEIRwpLeftGuardBandWidth", cfg_rwpSEIRwpLeftGuardBandWidth, cfg_rwpSEIRwpLeftGuardBandWidth, "specifies the width of the guard band on the left side of the i-th packed region.") +("SEIRwpRightGuardBandWidth", cfg_rwpSEIRwpRightGuardBandWidth, cfg_rwpSEIRwpRightGuardBandWidth, "specifies the width of the guard band on the right side of the i-th packed region.") +("SEIRwpTopGuardBandHeight", cfg_rwpSEIRwpTopGuardBandHeight, cfg_rwpSEIRwpTopGuardBandHeight, "specifies the height of the guard band above the i-th packed region.") +("SEIRwpBottomGuardBandHeight", cfg_rwpSEIRwpBottomGuardBandHeight, cfg_rwpSEIRwpBottomGuardBandHeight, "specifies the height of the guard band below the i-th packed region.") +("SEIRwpGuardBandNotUsedForPredFlag", cfg_rwpSEIRwpGuardBandNotUsedForPredFlag, cfg_rwpSEIRwpGuardBandNotUsedForPredFlag, "Specifies if the guard bands is used in the inter prediction process.") +("SEIRwpGuardBandType", cfg_rwpSEIRwpGuardBandType, cfg_rwpSEIRwpGuardBandType, "Specifies the type of the guard bands for the i-th packed region.") +("SEIGcmpEnabled", m_gcmpSEIEnabled, false, "Control generation of generalized cubemap projection SEI messages") +("SEIGcmpCancelFlag", m_gcmpSEICancelFlag, true, "Indicate that generalized cubemap projection SEI message cancels the persistence or follows") +("SEIGcmpPersistenceFlag", m_gcmpSEIPersistenceFlag, false, "Specifies the persistence of the generalized cubemap projection SEI messages") +("SEIGcmpPackingType", m_gcmpSEIPackingType, 0u, "Specifies the packing type") +("SEIGcmpMappingFunctionType", m_gcmpSEIMappingFunctionType, 0u, "Specifies the mapping function used to adjust the sample locations of the cubemap projection") +("SEIGcmpFaceIndex", cfg_gcmpSEIFaceIndex, cfg_gcmpSEIFaceIndex, "Specifies the face index for the i-th face") +("SEIGcmpFaceRotation", cfg_gcmpSEIFaceRotation, cfg_gcmpSEIFaceRotation, "Specifies the rotation to be applied to the i-th face") +("SEIGcmpFunctionCoeffU", cfg_gcmpSEIFunctionCoeffU, cfg_gcmpSEIFunctionCoeffU, "Specifies the coefficient used in the cubemap mapping function of the u-axis of the i-th face") +("SEIGcmpFunctionUAffectedByVFlag", cfg_gcmpSEIFunctionUAffectedByVFlag, cfg_gcmpSEIFunctionUAffectedByVFlag, "Specifies whether the cubemap mapping function of the u-axis refers to the v position of the sample location") +("SEIGcmpFunctionCoeffV", cfg_gcmpSEIFunctionCoeffV, cfg_gcmpSEIFunctionCoeffV, "Specifies the coefficient used in the cubemap mapping function of the v-axis of the i-th face") +("SEIGcmpFunctionVAffectedByUFlag", cfg_gcmpSEIFunctionVAffectedByUFlag, cfg_gcmpSEIFunctionVAffectedByUFlag, "Specifies whether the cubemap mapping function of the v-axis refers to the u position of the sample location") +("SEIGcmpGuardBandFlag", m_gcmpSEIGuardBandFlag, false, "Indicate the existence of guard band areas in the picture") +("SEIGcmpGuardBandType", m_gcmpSEIGuardBandType, 0u, "Indicate the type of the guard bands") +("SEIGcmpGuardBandBoundaryExteriorFlag", m_gcmpSEIGuardBandBoundaryExteriorFlag, false, "Indicate whether face boundaries contain guard bands") +("SEIGcmpGuardBandSamplesMinus1", m_gcmpSEIGuardBandSamplesMinus1, 0u, "Specifies the number of guard band samples minus1 used in the cubemap projected picture") +("SEISubpicLevelInfoEnabled", m_cfgSubpictureLevelInfoSEI.m_enabled, false, "Control generation of Subpicture Level Information SEI messages") +("SEISubpicLevelInfoRefLevels", cfg_sliRefLevels, cfg_sliRefLevels, "List of reference levels for Subpicture Level Information SEI messages") +("SEISubpicLevelInfoExplicitFraction", m_cfgSubpictureLevelInfoSEI.m_explicitFraction, false, "Enable sending of explicit fractions in Subpicture Level Information SEI messages") +("SEISubpicLevelInfoNumSubpics", m_cfgSubpictureLevelInfoSEI.m_numSubpictures, 1, "Number of subpictures for Subpicture Level Information SEI messages") +("SEIAnnotatedRegionsFileRoot,-ar", m_arSEIFileRoot, string(""), "Annotated region SEI parameters root file name (wo num ext); only the file name base is to be added. Underscore and POC would be automatically addded to . E.g. \"-ar ar\" will search for files ar_0.txt, ar_1.txt, ...") +("SEISubpicLevelInfoMaxSublayers", m_cfgSubpictureLevelInfoSEI.m_sliMaxSublayers, 1, "Number of sublayers for Subpicture Level Information SEI messages") +("SEISubpicLevelInfoSublayerInfoPresentFlag", m_cfgSubpictureLevelInfoSEI.m_sliSublayerInfoPresentFlag, false, "Enable sending of level information for all sublayers in Subpicture Level Information SEI messages") +("SEISubpicLevelInfoRefLevelFractions", cfg_sliFractions, cfg_sliFractions, "List of subpicture level fractions for Subpicture Level Information SEI messages") +("SEISubpicLevelInfoNonSubpicLayersFractions", cfg_sliNonSubpicLayersFractions, cfg_sliNonSubpicLayersFractions, "List of level fractions for non-subpicture layers in Subpicture Level Information SEI messages") +("SEISampleAspectRatioInfo", m_sampleAspectRatioInfoSEIEnabled, false, "Control generation of Sample Aspect Ratio Information SEI messages") +("SEISARICancelFlag", m_sariCancelFlag, false, "Indicates that Sample Aspect Ratio Information SEI message cancels the persistence or follows") +("SEISARIPersistenceFlag", m_sariPersistenceFlag, true, "Specifies the persistence of the Sample Aspect Ratio Information SEI message") +("SEISARIAspectRatioIdc", m_sariAspectRatioIdc, 0, "Specifies the Sample Aspect Ratio IDC of Sample Aspect Ratio Information SEI messages") +("SEISARISarWidth", m_sariSarWidth, 0, "Specifies the Sample Aspect Ratio Width of Sample Aspect Ratio Information SEI messages, if extended SAR is chosen.") +("SEISARISarHeight", m_sariSarHeight, 0, "Specifies the Sample Aspect Ratio Height of Sample Aspect Ratio Information SEI messages, if extended SAR is chosen.") #if JVET_AA0110_PHASE_INDICATION_SEI_MESSAGE - ("SEIPhaseIndicationFullResolution", m_phaseIndicationSEIEnabledFullResolution, false, "Control generation of Phase Indication SEI messages for full resolution pictures.") - ("SEIPIHorPhaseNumFullResolution", m_piHorPhaseNumFullResolution, 0, "Specifies the Horizontal Phase Numerator of Phase Indication SEI messages for full resolution pictures.") - ("SEIPIHorPhaseDenMinus1FullResolution", m_piHorPhaseDenMinus1FullResolution, 0, "Specifies the Horizontal Phase Denominator minus 1 of Phase Indication SEI messages for full resolution pictures.") - ("SEIPIVerPhaseNumFullResolution", m_piVerPhaseNumFullResolution, 0, "Specifies the Vertical Phase Numerator of Phase Indication SEI messages for full resolution pictures.") - ("SEIPIVerPhaseDenMinus1FullResolution", m_piVerPhaseDenMinus1FullResolution, 0, "Specifies the Vertical Phase Denominator minus 1 of Phase Indication SEI messages for full resolution pictures.") - ("SEIPhaseIndicationReducedResolution", m_phaseIndicationSEIEnabledReducedResolution, false, "Control generation of Phase Indication SEI messages for reduced resolution pictures.") - ("SEIPIHorPhaseNumReducedResolution", m_piHorPhaseNumReducedResolution, 0, "Specifies the Horizontal Phase Numerator of Phase Indication SEI messages for reduced resolution pictures.") - ("SEIPIHorPhaseDenMinus1ReducedResolution", m_piHorPhaseDenMinus1ReducedResolution, 0, "Specifies the Horizontal Phase Denominator minus 1 of Phase Indication SEI messages for reduced resolution pictures.") - ("SEIPIVerPhaseNumReducedResolution", m_piVerPhaseNumReducedResolution, 0, "Specifies the Vertical Phase Numerator of Phase Indication SEI messages for reduced resolution pictures.") - ("SEIPIVerPhaseDenMinus1ReducedResolution", m_piVerPhaseDenMinus1ReducedResolution, 0, "Specifies the Vertical Phase Denominator minus 1 of Phase Indication SEI messages for reduced resolution pictures.") +("SEIPhaseIndicationFullResolution", m_phaseIndicationSEIEnabledFullResolution, false, "Control generation of Phase Indication SEI messages for full resolution pictures.") +("SEIPIHorPhaseNumFullResolution", m_piHorPhaseNumFullResolution, 0, "Specifies the Horizontal Phase Numerator of Phase Indication SEI messages for full resolution pictures.") +("SEIPIHorPhaseDenMinus1FullResolution", m_piHorPhaseDenMinus1FullResolution, 0, "Specifies the Horizontal Phase Denominator minus 1 of Phase Indication SEI messages for full resolution pictures.") +("SEIPIVerPhaseNumFullResolution", m_piVerPhaseNumFullResolution, 0, "Specifies the Vertical Phase Numerator of Phase Indication SEI messages for full resolution pictures.") +("SEIPIVerPhaseDenMinus1FullResolution", m_piVerPhaseDenMinus1FullResolution, 0, "Specifies the Vertical Phase Denominator minus 1 of Phase Indication SEI messages for full resolution pictures.") +("SEIPhaseIndicationReducedResolution", m_phaseIndicationSEIEnabledReducedResolution, false, "Control generation of Phase Indication SEI messages for reduced resolution pictures.") +("SEIPIHorPhaseNumReducedResolution", m_piHorPhaseNumReducedResolution, 0, "Specifies the Horizontal Phase Numerator of Phase Indication SEI messages for reduced resolution pictures.") +("SEIPIHorPhaseDenMinus1ReducedResolution", m_piHorPhaseDenMinus1ReducedResolution, 0, "Specifies the Horizontal Phase Denominator minus 1 of Phase Indication SEI messages for reduced resolution pictures.") +("SEIPIVerPhaseNumReducedResolution", m_piVerPhaseNumReducedResolution, 0, "Specifies the Vertical Phase Numerator of Phase Indication SEI messages for reduced resolution pictures.") +("SEIPIVerPhaseDenMinus1ReducedResolution", m_piVerPhaseDenMinus1ReducedResolution, 0, "Specifies the Vertical Phase Denominator minus 1 of Phase Indication SEI messages for reduced resolution pictures.") #endif - ("MCTSEncConstraint", m_MCTSEncConstraint, false, "For MCTS, constrain motion vectors at tile boundaries") - ("SEIShutterIntervalEnabled", m_siiSEIEnabled, false, "Controls if shutter interval information SEI message is enabled") - ("SEISiiTimeScale", m_siiSEITimeScale, 27000000u, "Specifies sii_time_scale") - ("SEISiiInputNumUnitsInShutterInterval", cfg_siiSEIInputNumUnitsInSI, cfg_siiSEIInputNumUnitsInSI, "Specifies sub_layer_num_units_in_shutter_interval") +("MCTSEncConstraint", m_MCTSEncConstraint, false, "For MCTS, constrain motion vectors at tile boundaries") +("SEIShutterIntervalEnabled", m_siiSEIEnabled, false, "Controls if shutter interval information SEI message is enabled") +("SEISiiTimeScale", m_siiSEITimeScale, 27000000u, "Specifies sii_time_scale") +("SEISiiInputNumUnitsInShutterInterval", cfg_siiSEIInputNumUnitsInSI, cfg_siiSEIInputNumUnitsInSI, "Specifies sub_layer_num_units_in_shutter_interval") #if ENABLE_TRACING - ("TraceChannelsList", bTracingChannelsList, false, "List all available tracing channels") - ("TraceRule", sTracingRule, string( "" ), "Tracing rule (ex: \"D_CABAC:poc==8\" or \"D_REC_CB_LUMA:poc==8\")") - ("TraceFile", sTracingFile, string( "" ), "Tracing file") +("TraceChannelsList", bTracingChannelsList, false, "List all available tracing channels") +("TraceRule", sTracingRule, string(""), "Tracing rule (ex: \"D_CABAC:poc==8\" or \"D_REC_CB_LUMA:poc==8\")") +("TraceFile", sTracingFile, string(""), "Tracing file") #endif // film grain characteristics SEI ("SEIFGCEnabled", m_fgcSEIEnabled, false, "Control generation of the film grain characteristics SEI message") @@ -1694,6 +1694,11 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) purpose << "SEINNPostFilterCharacteristicsPurpose" << i; opts.addOptions()(purpose.str(), m_nnPostFilterSEICharacteristicsPurpose[i], 0u, "Specifies the purpose in the Neural Network Post Filter Characteristics SEI message"); +#if JVET_AA0054_CHROMA_FORMAT_FLAG + std::ostringstream outSubWidthCFlag; + outSubWidthCFlag << "SEINNPostFilterCharacteristicsOutSubCFlag" << i; + opts.addOptions()(outSubWidthCFlag.str(), m_nnPostFilterSEICharacteristicsOutSubCFlag[i], false, "Specifies output chroma format when upsampling"); +#else std::ostringstream outSubWidthCFlag; outSubWidthCFlag << "SEINNPostFilterCharacteristicsOutSubWidthCFlag" << i; opts.addOptions()(outSubWidthCFlag.str(), m_nnPostFilterSEICharacteristicsOutSubWidthCFlag[i], false, "Specifies if the output SubWidthC (horizontal chroma subsampling ratio relative to luma) is smaller than the input SubWidthC"); @@ -1701,6 +1706,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) std::ostringstream outSubHeightCFlag; outSubHeightCFlag << "SEINNPostFilterCharacteristicsOutSubHeightCFlag" << i; opts.addOptions()(outSubHeightCFlag.str(), m_nnPostFilterSEICharacteristicsOutSubHeightCFlag[i], false, "Specifies if the output SubHeightC (vertical chroma subsampling ratio relative to luma) is smaller than the input SubHeightC"); +#endif std::ostringstream picWidthInLumaSamples; picWidthInLumaSamples << "SEINNPostFilterCharacteristicsPicWidthInLumaSamples" << i; diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 142c219941fe2204a1d93a1e61af9b1abdbd7d37..052dbda4417218e1d3b17f4d08c62ccd320a7607 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -738,8 +738,12 @@ protected: bool m_nnPostFilterSEICharacteristicsPurposeAndFormattingFlag[MAX_NUM_NN_POST_FILTERS]; #endif uint32_t m_nnPostFilterSEICharacteristicsPurpose[MAX_NUM_NN_POST_FILTERS]; +#if JVET_AA0054_CHROMA_FORMAT_FLAG + bool m_nnPostFilterSEICharacteristicsOutSubCFlag[MAX_NUM_NN_POST_FILTERS]; +#else bool m_nnPostFilterSEICharacteristicsOutSubWidthCFlag[MAX_NUM_NN_POST_FILTERS]; bool m_nnPostFilterSEICharacteristicsOutSubHeightCFlag[MAX_NUM_NN_POST_FILTERS]; +#endif uint32_t m_nnPostFilterSEICharacteristicsPicWidthInLumaSamples[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsPicHeightInLumaSamples[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsInpTensorBitDepthMinus8[MAX_NUM_NN_POST_FILTERS]; diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index 2e3ad7225f909944d3c79b9de276ec241d86ea9a..f5c86e0cda4f613ce9ad477e221880b9c264c9f0 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -1089,8 +1089,14 @@ public: , m_purposeAndFormattingFlag(false) #endif , m_purpose(0) +#if JVET_AA0054_CHROMA_FORMAT_FLAG + , m_outSubCFlag(0) + , m_outSubWidthC(1) + , m_outSubHeightC(1) +#else , m_outSubWidthCFlag(false) , m_outSubHeightCFlag(false) +#endif , m_picWidthInLumaSamples(0) , m_picHeightInLumaSamples(0) , m_inpTensorBitDepthMinus8(0) @@ -1135,8 +1141,14 @@ public: bool m_purposeAndFormattingFlag; #endif uint32_t m_purpose; +#if JVET_AA0054_CHROMA_FORMAT_FLAG + bool m_outSubCFlag; + uint8_t m_outSubWidthC; + uint8_t m_outSubHeightC; +#else bool m_outSubWidthCFlag; bool m_outSubHeightCFlag; +#endif uint32_t m_picWidthInLumaSamples; uint32_t m_picHeightInLumaSamples; uint32_t m_inpTensorBitDepthMinus8; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index ddedfe523f2571de9f7a94a702a95999d840ba7b..7e15952cb21b3f0a8f6c2d6fd7a7255e5db4c63d 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -58,6 +58,8 @@ #define JVET_AA0100_SEPERATE_COLOR_CHARACTERISTICS 1 // JVET-AA0100 AHG9: On auxiliary input and separate colour description in the neural-network post-filter characteristics SEI message #define JVET_AA0067_NNPFC_SEI_FIX 1 // JVET-AA0067 AHG9: Some specification improvements for neural-network post-filter characteristics SEI message #define JVET_AA0110_PHASE_INDICATION_SEI_MESSAGE 1 // Software support of Phase Indication SEI message +#define JVET_AA0054_CHROMA_FORMAT_FLAG 1 // JVET-AA0054 PROPOSAL2: Signalling improvements to specify output chroma information +#define JVET_AA0054_CHROMA_UPSAMPLING_CONSTRAINT 1 // JVET-AA0054 PROPOSAL3: Constraint to prevent chroma upsampling when input chroma format is monochrome or YUV444 //########### place macros to be be kept below this line ############### #define JVET_X0143_ALF_APS_ID_OFFSET 0 // A value between 0 to 7 inclusive. This macro should be kept, or to be defined as a configuration parameter if possible. diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index 248436a8387595ce0e7fdaeef850e26513cee854..d4c0b0e82c22f4e3be1c048253227533a3406ed1 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -408,7 +408,11 @@ void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType break; case SEI::NEURAL_NETWORK_POST_FILTER_CHARACTERISTICS: sei = new SEINeuralNetworkPostFilterCharacteristics; +#if JVET_AA0054_CHROMA_FORMAT_FLAG + xParseSEINNPostFilterCharacteristics((SEINeuralNetworkPostFilterCharacteristics&)*sei, payloadSize, sps, pDecodedMessageOutputStream); +#else xParseSEINNPostFilterCharacteristics((SEINeuralNetworkPostFilterCharacteristics&)*sei, payloadSize, pDecodedMessageOutputStream); +#endif break; case SEI::NEURAL_NETWORK_POST_FILTER_ACTIVATION: sei = new SEINeuralNetworkPostFilterActivation; @@ -2473,7 +2477,11 @@ void SEIReader::xParseSEIConstrainedRaslIndication( SEIConstrainedRaslIndication output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); } +#if JVET_AA0054_CHROMA_FORMAT_FLAG +void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterCharacteristics& sei, uint32_t payloadSize, const SPS* sps, std::ostream* pDecodedMessageOutputStream) +#else void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterCharacteristics& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream) +#endif { output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); uint32_t val; @@ -2496,13 +2504,61 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_purpose"); sei.m_purpose = val; +#if JVET_AA0054_CHROMA_FORMAT_FLAG + ChromaFormat chromaFormatIDC = sps->getChromaFormatIdc(); + uint8_t SubWidthC; + uint8_t SubHeightC; + if (chromaFormatIDC == ChromaFormat::CHROMA_420) + { + SubWidthC = 2; + SubHeightC = 2; + } + else if (chromaFormatIDC == ChromaFormat::CHROMA_422) + { + SubWidthC = 2; + SubHeightC = 1; + } + else + { + SubWidthC = 1; + SubHeightC = 1; + } +#endif if(sei.m_purpose == 2 || sei.m_purpose == 4) { +#if JVET_AA0054_CHROMA_FORMAT_FLAG + sei_read_flag(pDecodedMessageOutputStream, val, "nnpfc_out_sub_c_flag"); + sei.m_outSubCFlag = val; + + CHECK(((SubWidthC == 2) && (SubHeightC == 1) && (sei.m_outSubCFlag == 0)), "If SubWidthC is equal to 2 and SubHeightC is equal to 1, nnpfc_out_sub_c_flag shall not be equal to 0"); + + if (sei.m_outSubCFlag) + { + sei.m_outSubWidthC = 1; + sei.m_outSubHeightC = 1; + } + else + { + sei.m_outSubWidthC = 2; + sei.m_outSubHeightC = 1; + } +#else sei_read_flag(pDecodedMessageOutputStream, val, "nnpfc_out_sub_width_c_flag"); sei.m_outSubWidthCFlag = val; sei_read_flag(pDecodedMessageOutputStream, val, "nnpfc_out_sub_height_c_flag"); sei.m_outSubHeightCFlag = val; +#endif + } +#if JVET_AA0054_CHROMA_FORMAT_FLAG + else + { + sei.m_outSubWidthC = SubWidthC; + sei.m_outSubHeightC = SubHeightC; } +#if JVET_AA0054_CHROMA_UPSAMPLING_CONSTRAINT + CHECK(((SubWidthC == 1) && (SubHeightC == 1)) && ((sei.m_purpose == 2) || (sei.m_purpose == 4)), "If SubWidthC is equal to 1 and SubHeightC is equal to 1, nnpfc_purpose shall not be equal to 2 or 4"); +#endif +#endif if(sei.m_purpose == 3 || sei.m_purpose == 4) { sei_read_flag(pDecodedMessageOutputStream, val, "nnpfc_pic_width_in_luma_samples"); diff --git a/source/Lib/DecoderLib/SEIread.h b/source/Lib/DecoderLib/SEIread.h index d8553e03b59d79cc9e7cb31b00ff8772fcc68c13..4efccbc4fad0292b754cea1111762ab3300a7b4e 100644 --- a/source/Lib/DecoderLib/SEIread.h +++ b/source/Lib/DecoderLib/SEIread.h @@ -103,7 +103,11 @@ protected: void xParseSEIColourTransformInfo (SEIColourTransformInfo& sei, uint32_t payloadSize, std::ostream* pDecodedMessageOutputStream); void xParseSEIConstrainedRaslIndication (SEIConstrainedRaslIndication& sei, uint32_t payLoadSize, std::ostream *pDecodedMessageOutputStream); void xParseSEIShutterInterval(SEIShutterIntervalInfo& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); +#if JVET_AA0054_CHROMA_FORMAT_FLAG + void xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterCharacteristics& sei, uint32_t payloadSize, const SPS* sps, std::ostream* pDecodedMessageOutputStream); +#else void xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterCharacteristics& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); +#endif void xParseSEINNPostFilterActivation(SEINeuralNetworkPostFilterActivation& sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream); #if JVET_AA0110_PHASE_INDICATION_SEI_MESSAGE void xParseSEIPhaseIndication(SEIPhaseIndication& sei, uint32_t payloadSize, std::ostream* pDecodedMessageOutputStream); diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 3898ea7be7463d1f919e9fa1a1b267ae0da40c99..0c9e6ba93f39aea6bd7b62ac0e6076facc571b8f 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -682,8 +682,12 @@ protected: bool m_nnPostFilterSEICharacteristicsPurposeAndFormattingFlag[MAX_NUM_NN_POST_FILTERS]; #endif uint32_t m_nnPostFilterSEICharacteristicsPurpose[MAX_NUM_NN_POST_FILTERS]; +#if JVET_AA0054_CHROMA_FORMAT_FLAG + bool m_nnPostFilterSEICharacteristicsOutSubCFlag[MAX_NUM_NN_POST_FILTERS]; +#else bool m_nnPostFilterSEICharacteristicsOutSubWidthCFlag[MAX_NUM_NN_POST_FILTERS]; bool m_nnPostFilterSEICharacteristicsOutSubHeightCFlag[MAX_NUM_NN_POST_FILTERS]; +#endif uint32_t m_nnPostFilterSEICharacteristicsPicWidthInLumaSamples[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsPicHeightInLumaSamples[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsInpTensorBitDepthMinus8[MAX_NUM_NN_POST_FILTERS]; @@ -1803,10 +1807,15 @@ public: void setNNPostFilterSEICharacteristicsPurpose(uint32_t purpose, int filterIdx) { m_nnPostFilterSEICharacteristicsPurpose[filterIdx] = purpose; } uint32_t getNNPostFilterSEICharacteristicsPurpose(int filterIdx) const { return m_nnPostFilterSEICharacteristicsPurpose[filterIdx]; } +#if JVET_AA0054_CHROMA_FORMAT_FLAG + void setNNPostFilterSEICharacteristicsOutSubCFlag(bool SubCFlag, int filterIdx) { m_nnPostFilterSEICharacteristicsOutSubCFlag[filterIdx] = SubCFlag; } + bool getNNPostFilterSEICharacteristicsOutSubCFlag(int filterIdx) const { return m_nnPostFilterSEICharacteristicsOutSubCFlag[filterIdx]; } +#else void setNNPostFilterSEICharacteristicsOutSubWidthCFlag(bool outSubWidthCFlag, int filterIdx) { m_nnPostFilterSEICharacteristicsOutSubWidthCFlag[filterIdx] = outSubWidthCFlag; } bool getNNPostFilterSEICharacteristicsOutSubWidthCFlag(int filterIdx) const { return m_nnPostFilterSEICharacteristicsOutSubWidthCFlag[filterIdx]; } void setNNPostFilterSEICharacteristicsOutSubHeightCFlag(bool outSubHeightCFlag, int filterIdx) { m_nnPostFilterSEICharacteristicsOutSubHeightCFlag[filterIdx] = outSubHeightCFlag; } bool getNNPostFilterSEICharacteristicsOutSubHeightCFlag(int filterIdx) const { return m_nnPostFilterSEICharacteristicsOutSubHeightCFlag[filterIdx]; } +#endif void setNNPostFilterSEICharacteristicsPicWidthInLumaSamples(uint32_t picWidthInLumaSamples, int filterIdx) { m_nnPostFilterSEICharacteristicsPicWidthInLumaSamples[filterIdx] = picWidthInLumaSamples; } uint32_t getNNPostFilterSEICharacteristicsPicWidthInLumaSamples(int filterIdx) const { return m_nnPostFilterSEICharacteristicsPicWidthInLumaSamples[filterIdx]; } void setNNPostFilterSEICharacteristicsPicHeightInLumaSamples(uint32_t picHeightInLumaSamples, int filterIdx) { m_nnPostFilterSEICharacteristicsPicHeightInLumaSamples[filterIdx] = picHeightInLumaSamples; } diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index 355755e9746dd6d81aaecc3435cd4729f096f7cb..3c2d82597f7a12118f824854c5a5ebe8d8106db3 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -1192,8 +1192,12 @@ void SEIEncoder::initSEINeuralNetworkPostFilterCharacteristics(SEINeuralNetworkP if(sei->m_purpose == 2 || sei->m_purpose == 4) { +#if JVET_AA0054_CHROMA_FORMAT_FLAG + sei->m_outSubCFlag = m_pcCfg->getNNPostFilterSEICharacteristicsOutSubCFlag(filterIdx); +#else sei->m_outSubWidthCFlag = m_pcCfg->getNNPostFilterSEICharacteristicsOutSubWidthCFlag(filterIdx); sei->m_outSubHeightCFlag = m_pcCfg->getNNPostFilterSEICharacteristicsOutSubHeightCFlag(filterIdx); +#endif } if(sei->m_purpose == 3 || sei->m_purpose == 4) { diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 75206f9cdeb6ea5927dc931c27678ca2e99e625d..02fb4d4cba509344b52e174fd766f0095131f9d3 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -1423,8 +1423,12 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralN if(sei.m_purpose == 2 || sei.m_purpose == 4) { +#if JVET_AA0054_CHROMA_FORMAT_FLAG + WRITE_FLAG(sei.m_outSubCFlag, "nnpfc_out_sub_c_flag"); +#else WRITE_FLAG(sei.m_outSubWidthCFlag, "nnpfc_out_sub_width_c_flag"); WRITE_FLAG(sei.m_outSubHeightCFlag, "nnpfc_out_sub_height_c_flag"); +#endif } if(sei.m_purpose == 3 || sei.m_purpose == 4) {