diff --git a/source/Lib/CommonLib/Picture.h b/source/Lib/CommonLib/Picture.h index 212a02c61c955342cf421b13dd1864713042c502..28440c240626ce1880758f88f1e6558ad81d45dd 100644 --- a/source/Lib/CommonLib/Picture.h +++ b/source/Lib/CommonLib/Picture.h @@ -243,8 +243,8 @@ public: Window& getScalingWindow() { return m_scalingWindow; } const Window& getScalingWindow() const { return m_scalingWindow; } #if JVET_Q0487_SCALING_WINDOW_ISSUES - bool isRefScaled( const PPS* pps ) const { return getPicWidthInLumaSamples() != pps->getPicWidthInLumaSamples() || - getPicHeightInLumaSamples() != pps->getPicHeightInLumaSamples() || + bool isRefScaled( const PPS* pps ) const { return unscaledPic->getPicWidthInLumaSamples() != pps->getPicWidthInLumaSamples() || + unscaledPic->getPicHeightInLumaSamples() != pps->getPicHeightInLumaSamples() || getScalingWindow().getWindowLeftOffset() != pps->getScalingWindow().getWindowLeftOffset() || getScalingWindow().getWindowRightOffset() != pps->getScalingWindow().getWindowRightOffset() || getScalingWindow().getWindowTopOffset() != pps->getScalingWindow().getWindowTopOffset() || diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 69a2daa92c856014edacee475a9cfa3e73440bd3..b97a0b312bec2b7fa7258dba86da307c3149d06b 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -316,7 +316,11 @@ void EncLib::init( bool isFieldCoding, AUWriterIf* auWriterIf ) pps.setConformanceWindow( conformanceWindow ); Window scalingWindow; +#if JVET_Q0487_SCALING_WINDOW_ISSUES + scalingWindow.setWindow( 0, ( width - scaledWidth ) / SPS::getWinUnitX( sps0.getChromaFormatIdc() ), 0, ( height - scaledHeight ) / SPS::getWinUnitY( sps0.getChromaFormatIdc() ) ); +#else scalingWindow.setWindow( 0, width - scaledWidth, 0, height - scaledHeight ); +#endif pps.setScalingWindow( scalingWindow ); #if JVET_Q0179_SCALING_WINDOW_SIZE_CONSTRAINT