diff --git a/source/App/DecoderApp/DecApp.cpp b/source/App/DecoderApp/DecApp.cpp index 8722fcbf28e4ce98de541080e2d82283ec1a58cc..634aa847a193353b49aa56ea7e93681bfbd505ba 100644 --- a/source/App/DecoderApp/DecApp.cpp +++ b/source/App/DecoderApp/DecApp.cpp @@ -767,9 +767,7 @@ void DecApp::xCreateDecLib() std::ostream &os=m_seiMessageFileStream.is_open() ? m_seiMessageFileStream : std::cout; m_cDecLib.setDecodedSEIMessageOutputStream(&os); } -#if JVET_P0257_SCALING_LISTS_SPEEDUP_DEC m_cDecLib.initScalingList(); -#endif } void DecApp::xDestroyDecLib() diff --git a/source/Lib/CommonLib/Quant.cpp b/source/Lib/CommonLib/Quant.cpp index d468acdabe2c2e3135126b697445d7ccf555a9d0..ab8252ca484699c3e46e1ec7aad3e7fcc94c3bae 100644 --- a/source/Lib/CommonLib/Quant.cpp +++ b/source/Lib/CommonLib/Quant.cpp @@ -942,7 +942,6 @@ void Quant::processScalingListEnc( int *coeff, int *quantcoeff, int quantScales, } } -#if JVET_P0257_SCALING_LISTS_SPEEDUP_DEC void Quant::processScalingListDec( const int *coeff, int *dequantcoeff, int invQuantScales, uint32_t height, uint32_t width, uint32_t ratio, int sizeNum, uint32_t dc) { if (height != width) @@ -1004,53 +1003,6 @@ void Quant::processScalingListDec( const int *coeff, int *dequantcoeff, int invQ dequantcoeff[0] = invQuantScales * dc; } } -#else -void Quant::processScalingListDec( const int *coeff, int *dequantcoeff, int invQuantScales, uint32_t height, uint32_t width, uint32_t ratio, int sizuNum, uint32_t dc) -{ - if (height != width) - { - for (uint32_t j = 0; j<height; j++) - { - for (uint32_t i = 0; i<width; i++) - { - if (i >= JVET_C0024_ZERO_OUT_TH || j >= JVET_C0024_ZERO_OUT_TH) - { - dequantcoeff[j*width + i] = 0; - continue; - } - int ratioWH = (height>width) ? height / width : width / height; - int ratioH = (height / sizuNum) ? (height / sizuNum) : (sizuNum / height); - int ratioW = (width / sizuNum) ? (width / sizuNum) : (sizuNum / width); - //sizeNum = 8/4 - if (height > width) - { - dequantcoeff[j*width + i] = invQuantScales * coeff[sizuNum * (j / ratioH) + ((i * ratioWH) / ratioH)]; - } - else //ratioH < ratioW - { - dequantcoeff[j*width + i] = invQuantScales * coeff[sizuNum * ((j * ratioWH) / ratioW) + (i / ratioW)]; - } - int largeOne = (width > height) ? width : height; - if (largeOne > 8) - dequantcoeff[0] = invQuantScales * dc; - } - } - return; - } - for(uint32_t j=0;j<height;j++) - { - for(uint32_t i=0;i<width;i++) - { - dequantcoeff[j*width + i] = invQuantScales * coeff[sizuNum * (j / ratio) + i / ratio]; - } - } - - if(ratio > 1) - { - dequantcoeff[0] = invQuantScales * dc; - } -} -#endif /** initialization process of scaling list array */ diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 14ebe8c13d1a58cccaee7618b42b65119ecf364c..805e462b882cbfdb740a38970fd60403f4435bf8 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -56,7 +56,6 @@ -#define JVET_P0257_SCALING_LISTS_SPEEDUP_DEC 1 // JVET-P0257: Decoder speed-up for handling scaling matrices #define JVET_P2001_REMOVE_TRANSQUANT_BYPASS 1 // JVET-P2001: Remove transquant bypass - not supported in JVET-P2001 draft text diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 88617e719837a1e90e2c07081d92c0619dfe5ee9..29ae5369cb1f54edba8e4757f723361903a5fff8 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -388,9 +388,7 @@ DecLib::DecLib() , m_cInterPred() , m_cTrQuant() , m_cSliceDecoder() -#if JVET_P0257_SCALING_LISTS_SPEEDUP_DEC , m_cTrQuantScalingList() -#endif , m_cCuDecoder() , m_HLSReader() , m_seiReader() @@ -423,10 +421,8 @@ DecLib::DecLib() , m_debugPOC( -1 ) , m_debugCTU( -1 ) , m_vps( nullptr ) -#if JVET_P0257_SCALING_LISTS_SPEEDUP_DEC , m_scalingListUpdateFlag(true) , m_PreScalingListAPSId(-1) -#endif { #if ENABLE_SIMD_OPT_BUFFER g_pelBufOP.initPelBufOpsX86(); @@ -1149,11 +1145,7 @@ void DecLib::xActivateParameterSets( const int layerId ) { m_cCuDecoder.initDecCuReshaper(&m_cReshaper, sps->getChromaFormatIdc()); } -#if JVET_P0257_SCALING_LISTS_SPEEDUP_DEC m_cTrQuant.init(m_cTrQuantScalingList.getQuant(), sps->getMaxTbSize(), false, false, false, false); -#else - m_cTrQuant.init( nullptr, sps->getMaxTbSize(), false, false, false, false ); -#endif // RdCost m_cRdCost.setCostMode ( COST_STANDARD_LOSSY ); // not used in decoder side RdCost stuff -> set to default @@ -1791,7 +1783,6 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl { scalingList.setDefaultScalingList(); } -#if JVET_P0257_SCALING_LISTS_SPEEDUP_DEC int scalingListAPSId = pcSlice->getPicHeader()->getScalingListAPSId(); if (getScalingListUpdateFlag() || (scalingListAPSId != getPreScalingListAPSId())) { @@ -1799,9 +1790,6 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl setScalingListUpdateFlag(false); setPreScalingListAPSId(scalingListAPSId); } -#else - quant->setScalingListDec( scalingList ); -#endif quant->setUseScalingList( true ); } else @@ -1959,12 +1947,10 @@ void DecLib::xDecodeAPS(InputNALUnit& nalu) aps->setTemporalId(nalu.m_temporalId); aps->setLayerId( nalu.m_nuhLayerId ); m_parameterSetManager.checkAuApsContent( aps, m_accessUnitApsNals ); -#if JVET_P0257_SCALING_LISTS_SPEEDUP_DEC if (aps->getAPSType() == SCALING_LIST_APS) { setScalingListUpdateFlag(true); } -#endif // aps will be deleted if it was already stored (and did not changed), // thus, storing it must be last action. diff --git a/source/Lib/DecoderLib/DecLib.h b/source/Lib/DecoderLib/DecLib.h index 6f86b97d972a0416d41d49be230b64db4341d259..74953f16aff24243d2cd004e34d115738001a6f5 100644 --- a/source/Lib/DecoderLib/DecLib.h +++ b/source/Lib/DecoderLib/DecLib.h @@ -91,9 +91,7 @@ private: InterPrediction m_cInterPred; TrQuant m_cTrQuant; DecSlice m_cSliceDecoder; -#if JVET_P0257_SCALING_LISTS_SPEEDUP_DEC TrQuant m_cTrQuantScalingList; -#endif DecCu m_cCuDecoder; HLSyntaxReader m_HLSReader; CABACDecoder m_CABACDecoder; @@ -140,10 +138,8 @@ private: std::vector<int> m_accessUnitApsNals; VPS* m_vps; -#if JVET_P0257_SCALING_LISTS_SPEEDUP_DEC bool m_scalingListUpdateFlag; int m_PreScalingListAPSId; -#endif public: DecLib(); @@ -191,7 +187,6 @@ public: #endif const VPS* getVPS() { return m_vps; } -#if JVET_P0257_SCALING_LISTS_SPEEDUP_DEC void initScalingList() { m_cTrQuantScalingList.init(nullptr, MAX_TB_SIZEY, false, false, false, false); @@ -200,7 +195,6 @@ public: void setScalingListUpdateFlag(bool b) { m_scalingListUpdateFlag = b; } int getPreScalingListAPSId() { return m_PreScalingListAPSId; } void setPreScalingListAPSId(int id) { m_PreScalingListAPSId = id; } -#endif protected: void xUpdateRasInit(Slice* slice);