diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index d4857b50da0ef7440325c7ea5339c540edb0d718..ceddaf7db0588234d8a660867ca2d3dbf124b641 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -276,8 +276,8 @@ void EncApp::xInitLibCfg() #endif #if JVET_L0231_WRAPAROUND - m_cEncLib.setUseWraparound ( m_Wraparound ); - m_cEncLib.setWraparoundOffset ( m_WraparoundOffset ); + m_cEncLib.setUseWrapAround ( m_wrapAround ); + m_cEncLib.setWrapAroundOffset ( m_wrapAroundOffset ); #endif // ADD_NEW_TOOL : (encoder app) add setting of tool enabling flags and associated parameters here diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 924bdb3d942fd33c7825c71b0d044f28b5b97ed3..509fd0269f7aa77d6d2d397a64b68c6aaa4af9d4 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -880,8 +880,8 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) #endif #if JVET_L0231_WRAPAROUND - ("Wraparound", m_Wraparound, false, "Enable horizontal wrap-around motion compensation for inter prediction (0:off, 1:on) [default: off]") - ("WraparoundOffset", m_WraparoundOffset, 0u, "Offset in luma samples used for computing the horizontal wrap-around position") + ("WrapAround", m_wrapAround, false, "Enable horizontal wrap-around motion compensation for inter prediction (0:off, 1:on) [default: off]") + ("WrapAroundOffset", m_wrapAroundOffset, 0u, "Offset in luma samples used for computing the horizontal wrap-around position") #endif // ADD_NEW_TOOL : (encoder app) add parsing parameters here @@ -1966,7 +1966,7 @@ bool EncAppCfg::xCheckParameter() xConfirmPara( m_Triangle, "Triangle is only allowed with NEXT profile" ); #endif #if JVET_L0231_WRAPAROUND - xConfirmPara( m_Wraparound, "Horizontal wrap-around motion compensation for inter prediction is only allowed with NEXT profile" ); + xConfirmPara( m_wrapAround, "Horizontal wrap-around motion compensation for inter prediction is only allowed with NEXT profile" ); #endif // ADD_NEW_TOOL : (parameter check) add a check for next tools here } @@ -1992,11 +1992,11 @@ bool EncAppCfg::xCheckParameter() #endif #if JVET_L0231_WRAPAROUND - if( m_Wraparound ) + if( m_wrapAround ) { - xConfirmPara(m_WraparoundOffset == 0, "Wrap-around offset must be greater than 0"); - xConfirmPara(m_WraparoundOffset > m_iSourceWidth, "Wrap-around offset must not be greater than the source picture width"); - xConfirmPara(m_WraparoundOffset % SPS::getWinUnitX(m_chromaFormatIDC) != 0, "Wrap-around offset must be an integer multiple of the specified chroma subsampling"); + xConfirmPara(m_wrapAroundOffset == 0, "Wrap-around offset must be greater than 0"); + xConfirmPara(m_wrapAroundOffset > m_iSourceWidth, "Wrap-around offset must not be greater than the source picture width"); + xConfirmPara(m_wrapAroundOffset % SPS::getWinUnitX(m_chromaFormatIDC) != 0, "Wrap-around offset must be an integer multiple of the specified chroma subsampling"); } #endif } @@ -3182,10 +3182,10 @@ void EncAppCfg::xPrintParameter() msg(VERBOSE, "CPR:%d ", m_CPRMode); #endif #if JVET_L0231_WRAPAROUND - msg( VERBOSE, "Wraparound:%d ", m_Wraparound); - if( m_Wraparound ) + msg( VERBOSE, "WrapAround:%d ", m_wrapAround); + if( m_wrapAround ) { - msg( VERBOSE, "WraparoundOffset:%d ", m_WraparoundOffset ); + msg( VERBOSE, "WrapAroundOffset:%d ", m_wrapAroundOffset ); } #endif // ADD_NEW_TOOL (add some output indicating the usage of tools) diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 226a9369abcbf1b1dce53d8643ea947d07b7de48..6737b13567ea6105e50f6d209bc8fe0092824273 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -258,8 +258,8 @@ protected: #endif #if JVET_L0231_WRAPAROUND - bool m_Wraparound; - unsigned m_WraparoundOffset; + bool m_wrapAround; + unsigned m_wrapAroundOffset; #endif // ADD_NEW_TOOL : (encoder app) add tool enabling flags and associated parameters here diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp index e57de7d124dc5aea40d66b326ead26ba1bec802f..90add37c822e9ceca34c84f5a083069159b4fdef 100644 --- a/source/Lib/CommonLib/InterPrediction.cpp +++ b/source/Lib/CommonLib/InterPrediction.cpp @@ -831,7 +831,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio // clip and scale #if JVET_L0231_WRAPAROUND - if (sps.getSpsNext().getUseWraparound()) + if (sps.getSpsNext().getUseWrapAround()) { m_storedMv[h / AFFINE_MIN_BLOCK_SIZE * MVBUFFER_SIZE + w / AFFINE_MIN_BLOCK_SIZE].set(iMvScaleTmpHor, iMvScaleTmpVer); Mv tmpMv(iMvScaleTmpHor, iMvScaleTmpVer); @@ -859,7 +859,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio Mv(2, 2)); curMv.set(curMv.getHor() >> 2, curMv.getVer() >> 2); #if JVET_L0231_WRAPAROUND - if (sps.getSpsNext().getUseWraparound()) + if (sps.getSpsNext().getUseWrapAround()) { clipMv(curMv, Position(pu.Y().x + (w << iScaleX), pu.Y().y + (h << iScaleY)), Size(blockWidth << iScaleX, blockHeight << iScaleY), sps); } @@ -874,7 +874,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio // clip and scale #if JVET_L0231_WRAPAROUND - if (sps.getSpsNext().getUseWraparound()) + if (sps.getSpsNext().getUseWrapAround()) { Mv tmpMv(iMvScaleTmpHor, iMvScaleTmpVer); clipMv(tmpMv, Position(pu.Y().x + (w << iScaleX), pu.Y().y + (h << iScaleY)), Size(blockWidth << iScaleX, blockHeight << iScaleY), sps); diff --git a/source/Lib/CommonLib/Mv.cpp b/source/Lib/CommonLib/Mv.cpp index aa46498ad74bd059481a7c57680a5f843e024a04..d035d61a4a2cccb963182daa0f448289f47c0beb 100644 --- a/source/Lib/CommonLib/Mv.cpp +++ b/source/Lib/CommonLib/Mv.cpp @@ -85,7 +85,7 @@ void clipMv( Mv& rcMv, const Position& pos, int iVerMin = ( -( int ) sps.getMaxCUHeight() - iOffset - ( int ) pos.y + 1 ) << iMvShift; #if JVET_L0231_WRAPAROUND - if( sps.getSpsNext().getUseWraparound() ) + if( sps.getSpsNext().getUseWrapAround() ) { int iHorMax = ( sps.getPicWidthInLumaSamples() + sps.getMaxCUWidth() - size.width + iOffset - ( int ) pos.x - 1 ) << iMvShift; int iHorMin = ( -( int ) sps.getMaxCUWidth() - iOffset - ( int ) pos.x + 1 ) << iMvShift; diff --git a/source/Lib/CommonLib/Picture.cpp b/source/Lib/CommonLib/Picture.cpp index 78b614a9a8d361f31326ca9cecd82d8d3b3743f9..1ffa0272ce7cd394be2c10ae2075894c5084518c 100644 --- a/source/Lib/CommonLib/Picture.cpp +++ b/source/Lib/CommonLib/Picture.cpp @@ -1005,9 +1005,9 @@ void Picture::extendPicBorder() Pel* pi = piTxt; // do left and right margins #if JVET_L0231_WRAPAROUND - if (cs->sps->getSpsNext().getUseWraparound()) + if (cs->sps->getSpsNext().getUseWrapAround()) { - int xoffset = cs->sps->getSpsNext().getWraparoundOffset() >> getComponentScaleX( compID, cs->area.chromaFormat ); + int xoffset = cs->sps->getSpsNext().getWrapAroundOffset() >> getComponentScaleX( compID, cs->area.chromaFormat ); for (int y = 0; y < p.height; y++) { for (int x = 0; x < xmargin; x++ ) diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index a6a6d3b95c3b82835f73bdeea0e19804b5dd8fa7..75e0a1c1066ee707f99c521c44361fff27c59589 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -1831,8 +1831,8 @@ SPSNext::SPSNext( SPS& sps ) , m_CPRMode ( 0 ) #endif #if JVET_L0231_WRAPAROUND - , m_Wraparound ( false ) - , m_WraparoundOffset ( 0 ) + , m_wrapAround ( false ) + , m_wrapAroundOffset ( 0 ) #endif // ADD_NEW_TOOL : (sps extension) add tool enabling flags here (with "false" as default values) { diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 0d5f1bec70ed659bcb513c7cd8232efd8e1a543e..142a4273a73e5261525d462b6f1f4daa305459f9 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -869,8 +869,8 @@ private: #endif #if JVET_L0231_WRAPAROUND - bool m_Wraparound; - unsigned m_WraparoundOffset; + bool m_wrapAround; + unsigned m_wrapAroundOffset; #endif // ADD_NEW_TOOL : (sps extension) add tool enabling flags and associated parameters here @@ -996,10 +996,10 @@ public: unsigned getCPRMode () const { return m_CPRMode; } #endif #if JVET_L0231_WRAPAROUND - void setUseWraparound ( bool b ) { m_Wraparound = b; } - bool getUseWraparound () const { return m_Wraparound; } - void setWraparoundOffset ( unsigned offset ) { m_WraparoundOffset = offset; } - unsigned getWraparoundOffset () const { return m_WraparoundOffset; } + void setUseWrapAround ( bool b ) { m_wrapAround = b; } + bool getUseWrapAround () const { return m_wrapAround; } + void setWrapAroundOffset ( unsigned offset ) { m_wrapAroundOffset = offset; } + unsigned getWrapAroundOffset () const { return m_wrapAroundOffset; } #endif // ADD_NEW_TOOL : (sps extension) add access functions for tool enabling flags and associated parameters here diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index f5c83a27ed9c00c9f26d3e917a4b6fdeb6b7971c..067dafb260d0f46b67693079efd926b2e3e69f73 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -932,10 +932,10 @@ void HLSyntaxReader::parseSPSNext( SPSNext& spsNext, const bool usePCM ) #endif #if JVET_L0231_WRAPAROUND - READ_FLAG( symbol, "ref_wraparound_enabled_flag" ); spsNext.setUseWraparound( symbol != 0 ); - if( spsNext.getUseWraparound() ) + READ_FLAG( symbol, "ref_wraparound_enabled_flag" ); spsNext.setUseWrapAround( symbol != 0 ); + if( spsNext.getUseWrapAround() ) { - READ_UVLC( symbol, "ref_wraparound_offset" ); spsNext.setWraparoundOffset( symbol ); + READ_UVLC( symbol, "ref_wraparound_offset" ); spsNext.setWrapAroundOffset( symbol ); } #endif // ADD_NEW_TOOL : (sps extension parser) read tool enabling flags and associated parameters here diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 1ce03c6eca23c8247e619f21535ddcbd511c9769..93c91696220a53fc1f8dd05d184a9ebb8f8d2b7f 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -240,8 +240,8 @@ protected: #endif #if JVET_L0231_WRAPAROUND - bool m_Wraparound; - unsigned m_WraparoundOffset; + bool m_wrapAround; + unsigned m_wrapAroundOffset; #endif // ADD_NEW_TOOL : (encoder lib) add tool enabling flags and associated parameters here @@ -738,10 +738,10 @@ public: #endif #if JVET_L0231_WRAPAROUND - void setUseWraparound ( bool b ) { m_Wraparound = b; } - bool getUseWraparound () const { return m_Wraparound; } - void setWraparoundOffset ( unsigned u ) { m_WraparoundOffset = u; } - unsigned getWraparoundOffset () const { return m_WraparoundOffset; } + void setUseWrapAround ( bool b ) { m_wrapAround = b; } + bool getUseWrapAround () const { return m_wrapAround; } + void setWrapAroundOffset ( unsigned u ) { m_wrapAroundOffset = u; } + unsigned getWrapAroundOffset () const { return m_wrapAroundOffset; } #endif // ADD_NEW_TOOL : (encoder lib) add access functions here diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 8a102ef7c19f0ade95a2c2e154b727cd406c54de..a368c7992b3a47858f42ddcbd6bf7d2b27765bd0 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -884,8 +884,8 @@ void EncLib::xInitSPS(SPS &sps) #endif #if JVET_L0231_WRAPAROUND - sps.getSpsNext().setUseWraparound ( m_Wraparound ); - sps.getSpsNext().setWraparoundOffset ( m_WraparoundOffset ); + sps.getSpsNext().setUseWrapAround ( m_wrapAround ); + sps.getSpsNext().setWrapAroundOffset ( m_wrapAroundOffset ); #endif // ADD_NEW_TOOL : (encoder lib) set tool enabling flags and associated parameters here diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 1c7f05de6bd7e678e56d2084d5018b5cbdbba203..6edd3181fc9aaf01e705c0d2c34fd6e4792fde00 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -642,10 +642,10 @@ void HLSWriter::codeSPSNext( const SPSNext& spsNext, const bool usePCM ) #endif #if JVET_L0231_WRAPAROUND - WRITE_FLAG( spsNext.getUseWraparound() ? 1 : 0, "ref_wraparound_enabled_flag" ); - if( spsNext.getUseWraparound() ) + WRITE_FLAG( spsNext.getUseWrapAround() ? 1 : 0, "ref_wraparound_enabled_flag" ); + if( spsNext.getUseWrapAround() ) { - WRITE_UVLC( spsNext.getWraparoundOffset(), "ref_wraparound_offset" ); + WRITE_UVLC( spsNext.getWrapAroundOffset(), "ref_wraparound_offset" ); } #endif // ADD_NEW_TOOL : (sps extension writer) write tool enabling flags and associated parameters here