diff --git a/source/Lib/CommonLib/UnitTools.cpp b/source/Lib/CommonLib/UnitTools.cpp index 4cfaa1eeb924a6713d1634f2348fdabac8762b6a..444ff8b32792f2a02f88064bb05665a2f3ff07b7 100644 --- a/source/Lib/CommonLib/UnitTools.cpp +++ b/source/Lib/CommonLib/UnitTools.cpp @@ -128,8 +128,8 @@ bool CU::getRprScaling( const SPS* sps, const PPS* curPPS, Picture* refPic, int& CHECK(curPicHeight > refPicHeight * 8, "curPicHeight shall be less than or equal to refPicHeight * 8"); #if JVET_R0114_NEGATIVE_SCALING_WINDOW_OFFSETS - CHECK(SPS::getWinUnitX(sps->getChromaFormatIdc()) * (abs(curScalingWindow.getWindowLeftOffset()) + abs(curScalingWindow.getWindowRightOffset())) > curPPS->getPicWidthInLumaSamples(), "The value of SubWidthC * ( Abs(scaling_win_left_offset) + Abs(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(scaling_win_top_offset) + Abs(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 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"); #endif return refPic->isRefScaled( curPPS ); diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 71bbcc93ca80822f617c3199722dbf763db08ae5..b254d00ef47161fd757cfac1b96959863d7b362f 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -453,10 +453,10 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) { Window &scalingWindow = pcPPS->getScalingWindow(); #if JVET_R0114_NEGATIVE_SCALING_WINDOW_OFFSETS - READ_SVLC( iCode, "scaling_win_left_offset" ); scalingWindow.setWindowLeftOffset( iCode ); - READ_SVLC( iCode, "scaling_win_right_offset" ); scalingWindow.setWindowRightOffset( iCode ); - READ_SVLC( iCode, "scaling_win_top_offset" ); scalingWindow.setWindowTopOffset( iCode ); - READ_SVLC( iCode, "scaling_win_bottom_offset" ); scalingWindow.setWindowBottomOffset( iCode ); + READ_SVLC( iCode, "pps_scaling_win_left_offset" ); scalingWindow.setWindowLeftOffset( iCode ); + READ_SVLC( iCode, "pps_scaling_win_right_offset" ); scalingWindow.setWindowRightOffset( iCode ); + READ_SVLC( iCode, "pps_scaling_win_top_offset" ); scalingWindow.setWindowTopOffset( iCode ); + READ_SVLC( iCode, "pps_scaling_win_bottom_offset" ); scalingWindow.setWindowBottomOffset( iCode ); #else READ_UVLC( uiCode, "scaling_win_left_offset" ); scalingWindow.setWindowLeftOffset( uiCode ); READ_UVLC( uiCode, "scaling_win_right_offset" ); scalingWindow.setWindowRightOffset( uiCode ); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 5e38f6c0771ce440007eb96a975bd5fe5bc91319..fbfcb51bc86b50c60a03fbc1e0e2a776d4d07b33 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -278,10 +278,10 @@ void HLSWriter::codePPS( const PPS* pcPPS ) if( scalingWindow.getWindowEnabledFlag() ) { #if JVET_R0114_NEGATIVE_SCALING_WINDOW_OFFSETS - WRITE_SVLC( scalingWindow.getWindowLeftOffset(), "scaling_win_left_offset" ); - WRITE_SVLC( scalingWindow.getWindowRightOffset(), "scaling_win_right_offset" ); - WRITE_SVLC( scalingWindow.getWindowTopOffset(), "scaling_win_top_offset" ); - WRITE_SVLC( scalingWindow.getWindowBottomOffset(), "scaling_win_bottom_offset" ); + WRITE_SVLC( scalingWindow.getWindowLeftOffset(), "pps_scaling_win_left_offset" ); + WRITE_SVLC( scalingWindow.getWindowRightOffset(), "pps_scaling_win_right_offset" ); + WRITE_SVLC( scalingWindow.getWindowTopOffset(), "pps_scaling_win_top_offset" ); + WRITE_SVLC( scalingWindow.getWindowBottomOffset(), "pps_scaling_win_bottom_offset" ); #else WRITE_UVLC( scalingWindow.getWindowLeftOffset(), "scaling_win_left_offset" ); WRITE_UVLC( scalingWindow.getWindowRightOffset(), "scaling_win_right_offset" );