diff --git a/source/Lib/Utilities/VideoIOYuv.cpp b/source/Lib/Utilities/VideoIOYuv.cpp index ee422e82572b7aae193c1e3b11944e61a530d75f..42b33fc054d124d594bdfa7314062e0ae3a5d583 100644 --- a/source/Lib/Utilities/VideoIOYuv.cpp +++ b/source/Lib/Utilities/VideoIOYuv.cpp @@ -1424,8 +1424,7 @@ bool VideoIOYuv::writeUpscaledPicture(const SPS &sps, const PPS &pps, const CPel ChromaFormat chromaFormatIdc = sps.getChromaFormatIdc(); bool ret = false; - static Window confFullResolution; - static Window afterScaleWindowFullResolution; + Window afterScaleWindowFullResolution = sps.getConformanceWindow(); // decoder does not have information about upscaled picture scaling and conformance windows, store this information when full resolution picutre is encountered if( sps.getMaxPicWidthInLumaSamples() == pps.getPicWidthInLumaSamples() && sps.getMaxPicHeightInLumaSamples() == pps.getPicHeightInLumaSamples() ) @@ -1458,11 +1457,11 @@ bool VideoIOYuv::writeUpscaledPicture(const SPS &sps, const PPS &pps, const CPel sps.getHorCollocatedChromaFlag(), sps.getVerCollocatedChromaFlag(), rescaleForDisplay, upscaleFilterForDisplay); ret = write(sps.getMaxPicWidthInLumaSamples(), sps.getMaxPicHeightInLumaSamples(), upscaledPic, ipCSC, - packedYuvOutputMode, confFullResolution.getWindowLeftOffset() * SPS::getWinUnitX(chromaFormatIdc), - confFullResolution.getWindowRightOffset() * SPS::getWinUnitX(chromaFormatIdc), - confFullResolution.getWindowTopOffset() * SPS::getWinUnitY(chromaFormatIdc), - confFullResolution.getWindowBottomOffset() * SPS::getWinUnitY(chromaFormatIdc), - ChromaFormat::UNDEFINED, clipToRec709, false); + packedYuvOutputMode, afterScaleWindowFullResolution.getWindowLeftOffset() * SPS::getWinUnitX(chromaFormatIdc), + afterScaleWindowFullResolution.getWindowRightOffset() * SPS::getWinUnitX(chromaFormatIdc), + afterScaleWindowFullResolution.getWindowTopOffset() * SPS::getWinUnitY(chromaFormatIdc), + afterScaleWindowFullResolution.getWindowBottomOffset() * SPS::getWinUnitY(chromaFormatIdc), + ChromaFormat::UNDEFINED, clipToRec709); } else {