diff --git a/source/Lib/CommonLib/Picture.cpp b/source/Lib/CommonLib/Picture.cpp index 3d3d475ffe178b19e7eb7829c0d86cc8df02c549..85b7eff2a7a6419637aa479c6c67d230409ddeeb 100644 --- a/source/Lib/CommonLib/Picture.cpp +++ b/source/Lib/CommonLib/Picture.cpp @@ -207,6 +207,7 @@ Picture::Picture() } void Picture::create( + const bool rprEnabled, #if JVET_Z0118_GDR const bool gdrEnabled, #endif @@ -216,7 +217,7 @@ void Picture::create( { layerId = _layerId; UnitArea::operator=( UnitArea( _chromaFormat, Area( Position{ 0, 0 }, size ) ) ); - margin = MAX_SCALING_RATIO*_margin; + margin = rprEnabled?(MAX_SCALING_RATIO*_margin):_margin; const Area a = Area( Position(), size ); #if JVET_Z0118_GDR diff --git a/source/Lib/CommonLib/Picture.h b/source/Lib/CommonLib/Picture.h index 86c8084b573e09182d4b6a89e43f00e27c3ae2fa..522092912a823d59fd7bb21039f4a3495aba6a5d 100644 --- a/source/Lib/CommonLib/Picture.h +++ b/source/Lib/CommonLib/Picture.h @@ -100,6 +100,7 @@ struct Picture : public UnitArea Picture(); void create( + const bool rprEnabled, #if JVET_Z0118_GDR const bool gdrEnabled, #endif diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index b14c2f4190c85526e37c6b68e5dfe4893e9b5e24..64d2a24e952cadaabb559243cd1ef0adafd32618 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -5414,6 +5414,7 @@ void Slice::scaleRefPicList( Picture *scaledRefPic[ ], PicHeader *picHeader, APS scaledRefPic[j]->create( + sps->getRprEnabledFlag(), #if JVET_Z0118_GDR sps->getGDREnabledFlag(), #endif diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 14da328fcfecc7c5cbd2be9e15b558e1806e1ac2..1ea4a2c5058b2c1695d5186e3aaf1b748d896c36 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -634,6 +634,7 @@ Picture* DecLib::xGetNewPicBuffer( const SPS &sps, const PPS &pps, const uint32_ pcPic->create( + sps.getRprEnabledFlag(), #if JVET_Z0118_GDR sps.getGDREnabledFlag(), #endif @@ -677,6 +678,7 @@ Picture* DecLib::xGetNewPicBuffer( const SPS &sps, const PPS &pps, const uint32_ pcPic->create( + sps.getRprEnabledFlag(), #if JVET_Z0118_GDR sps.getGDREnabledFlag(), #endif @@ -691,6 +693,7 @@ Picture* DecLib::xGetNewPicBuffer( const SPS &sps, const PPS &pps, const uint32_ pcPic->destroy(); pcPic->create( + sps.getRprEnabledFlag(), #if JVET_Z0118_GDR sps.getGDREnabledFlag(), #endif diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 87931a3e2b910d021c8f5b13ea75b46a4a4787ca..2c2148d8d2cc1595b7e9847cfb3ec6908cd7f531 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -777,6 +777,7 @@ void EncLib::init( bool isFieldCoding, AUWriterIf* auWriterIf ) Picture *picBg = new Picture; picBg->create( + sps0.getRprEnabledFlag(), #if JVET_Z0118_GDR sps0.getGDREnabledFlag(), #endif @@ -795,6 +796,7 @@ void EncLib::init( bool isFieldCoding, AUWriterIf* auWriterIf ) Picture *picOrig = new Picture; picOrig->create( + sps0.getRprEnabledFlag(), #if JVET_Z0118_GDR sps0.getGDREnabledFlag(), #endif @@ -1343,6 +1345,7 @@ void EncLib::xGetNewPicBuffer ( std::list<PelUnitBuf*>& rcListPicYuvRecOut, Pict rpcPic = new Picture; rpcPic->create( + isRprEnabled(), #if JVET_Z0118_GDR getGdrEnabled(), #endif