From 665b247b6b41c03148c24c27ec742fa844a68bcc Mon Sep 17 00:00:00 2001 From: Shunsuke Iwamura <iwamura.s-gc@nhk.or.jp> Date: Wed, 23 Aug 2023 08:09:31 +0900 Subject: [PATCH] Change the name of the macro --- source/App/EncoderApp/EncApp.cpp | 4 ++-- source/App/EncoderApp/EncAppCfg.cpp | 4 ++-- source/App/EncoderApp/EncAppCfg.h | 2 +- source/Lib/CommonLib/TypeDef.h | 5 ++--- source/Lib/EncoderLib/EncCfg.h | 4 ++-- source/Lib/EncoderLib/EncLib.cpp | 6 +++--- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 0c29bd61d..accaf0e9e 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -266,7 +266,7 @@ void EncApp::xInitLibCfg( int layerIdx ) m_confWinRight / SPS::getWinUnitX(m_inputChromaFormatIDC), m_confWinTop / SPS::getWinUnitY(m_inputChromaFormatIDC), m_confWinBottom / SPS::getWinUnitY(m_inputChromaFormatIDC)); -#if SCALING_WINDOW_ENABLED +#if JVET_AE0181_SCALING_WINDOW_ENABLED m_cEncLib.setExplicitScalingWindowEnabled ( m_explicitScalingWindowEnabled ); m_cEncLib.setScalingWindow ( m_scalWinLeft / SPS::getWinUnitX( m_inputChromaFormatIDC ), m_scalWinRight / SPS::getWinUnitX( m_inputChromaFormatIDC ), m_scalWinTop / SPS::getWinUnitY( m_inputChromaFormatIDC ), m_scalWinBottom / SPS::getWinUnitY( m_inputChromaFormatIDC ) ); #endif @@ -1983,7 +1983,7 @@ void EncApp::xWriteOutput(int numEncoded, std::list<PelUnitBuf *> &recBufList) } else { -#if SCALING_WINDOW_ENABLED +#if JVET_AE0181_SCALING_WINDOW_ENABLED ppsID = ((sps.getMaxPicWidthInLumaSamples() != pcPicYuvRec->get(COMPONENT_Y).width || sps.getMaxPicHeightInLumaSamples() != pcPicYuvRec->get(COMPONENT_Y).height) && !m_explicitScalingWindowEnabled) ? m_resChangeInClvsEnabled ? ENC_PPS_ID_RPR : layerId : layerId; #else ppsID = (sps.getMaxPicWidthInLumaSamples() != pcPicYuvRec->get(COMPONENT_Y).width || sps.getMaxPicHeightInLumaSamples() != pcPicYuvRec->get(COMPONENT_Y).height) ? ENC_PPS_ID_RPR : layerId; diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 70144614f..7c0a58604 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -821,7 +821,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("ConfWinRight", m_confWinRight, 0, "Right offset for window conformance mode 3") ("ConfWinTop", m_confWinTop, 0, "Top offset for window conformance mode 3") ("ConfWinBottom", m_confWinBottom, 0, "Bottom offset for window conformance mode 3") -#if SCALING_WINDOW_ENABLED +#if JVET_AE0181_SCALING_WINDOW_ENABLED ("ScalingWindow", m_explicitScalingWindowEnabled, false, "Enable scaling window") ("ScalWinLeft,-swl", m_scalWinLeft, 0, "Left offset for scaling window") ("ScalWinRight,-swr", m_scalWinRight, 0, "Right offset for scaling window") @@ -4294,7 +4294,7 @@ bool EncAppCfg::xCheckParameter() "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); xConfirmPara(m_confWinBottom % SPS::getWinUnitY(m_chromaFormatIdc) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); -#if SCALING_WINDOW_ENABLED +#if JVET_AE0181_SCALING_WINDOW_ENABLED xConfirmPara(m_explicitScalingWindowEnabled && (m_scalingRatioHor != 1.0 || m_scalingRatioVer != 1.0 || m_gopBasedRPREnabledFlag), "ScalingWindow cannot be enabled when GOPBasedRPR is enabled"); xConfirmPara(m_scalWinLeft % SPS::getWinUnitX(m_chromaFormatIdc) != 0, "Left scaling window offset must be an integer multiple of the specified chroma subsampling"); xConfirmPara(m_scalWinRight % SPS::getWinUnitX(m_chromaFormatIdc) != 0, "Right scaling window offset must be an integer multiple of the specified chroma subsampling"); diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 5d7d14226..67ed1d424 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -111,7 +111,7 @@ protected: int m_confWinRight; int m_confWinTop; int m_confWinBottom; -#if SCALING_WINDOW_ENABLED +#if JVET_AE0181_SCALING_WINDOW_ENABLED bool m_explicitScalingWindowEnabled; int m_scalWinLeft; int m_scalWinRight; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 73a0f1283..ec528b312 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -100,6 +100,8 @@ #define JVET_AD0057_UPDATE_SEI_LISTS 1 // Update VclAssociatedSeiList and PicUnitRepConSeiList +#define JVET_AE0181_SCALING_WINDOW_ENABLED 1 + //########### place macros to be be kept below this line ############### #define GDR_ENABLED 1 @@ -148,9 +150,6 @@ #define ENABLE_USER_DEFINED_WEIGHTS 0 // User can specify weights for both current and previous picture, such that their sum = 1 #endif -#ifndef SCALING_WINDOW_ENABLED -#define SCALING_WINDOW_ENABLED 1 -#endif // clang-format on diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index c0a1988b5..4df3f64fb 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -161,7 +161,7 @@ protected: int m_sourceWidth; int m_sourceHeight; Window m_conformanceWindow; -#if SCALING_WINDOW_ENABLED +#if JVET_AE0181_SCALING_WINDOW_ENABLED bool m_explicitScalingWindowEnabled; Window m_scalingWindow; #endif @@ -1227,7 +1227,7 @@ public: Window &getConformanceWindow() { return m_conformanceWindow; } void setConformanceWindow (int confLeft, int confRight, int confTop, int confBottom ) { m_conformanceWindow.setWindow (confLeft, confRight, confTop, confBottom); } -#if SCALING_WINDOW_ENABLED +#if JVET_AE0181_SCALING_WINDOW_ENABLED void setExplicitScalingWindowEnabled(bool enabled) { m_explicitScalingWindowEnabled = enabled; } void setScalingWindow (int scalingLeft, int scalingRight, int scalingTop, int scalingBottom ) { m_scalingWindow.setWindow (scalingLeft, scalingRight, scalingTop, scalingBottom); } #endif diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 7c4c28a67..6b3a59d9c 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -197,7 +197,7 @@ void EncLib::init(AUWriterIf *auWriterIf) pps0.setConformanceWindow( m_conformanceWindow ); pps0.setConformanceWindowFlag( m_conformanceWindow.getWindowEnabledFlag() ); } -#if SCALING_WINDOW_ENABLED +#if JVET_AE0181_SCALING_WINDOW_ENABLED if (m_explicitScalingWindowEnabled) { pps0.setExplicitScalingWindowFlag(true); @@ -1458,7 +1458,7 @@ void EncLib::xInitSPS( SPS& sps ) sps.setMaxPicWidthInLumaSamples( m_sourceWidth ); sps.setMaxPicHeightInLumaSamples( m_sourceHeight ); -#if SCALING_WINDOW_ENABLED +#if JVET_AE0181_SCALING_WINDOW_ENABLED bool scalingWindowResChanged = false; if (m_multiLayerEnabledFlag && m_vps->getMaxLayers() > 0) { @@ -1797,7 +1797,7 @@ void EncLib::xInitSPS( SPS& sps ) sps.setInterLayerPresentFlag( m_layerId > 0 && m_vps->getMaxLayers() > 1 && !m_vps->getAllIndependentLayersFlag() && !m_vps->getIndependentLayerFlag( m_vps->getGeneralLayerIdx( m_layerId ) ) ); 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." ); -#if SCALING_WINDOW_ENABLED +#if JVET_AE0181_SCALING_WINDOW_ENABLED sps.setResChangeInClvsEnabledFlag(m_resChangeInClvsEnabled || m_constrainedRaslEncoding || scalingWindowResChanged); sps.setRprEnabledFlag(m_rprEnabledFlag || m_explicitScalingWindowEnabled || scalingWindowResChanged); #else -- GitLab