Changeset 1405 in 3DVCSoftware for trunk/source/Lib
- Timestamp:
- 27 May 2016, 17:32:40 (8 years ago)
- Location:
- trunk/source/Lib
- Files:
-
- 156 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TAppCommon/TAppComCamPara.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TAppCommon/TAppComCamPara.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TAppCommon/program_options_lite.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TAppCommon/program_options_lite.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/AccessUnit.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/CommonDef.h
r1397 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 72 72 #if NH_MV 73 73 #define NV_VERSION "16.1" ///< Current software version 74 #define HM_VERSION "16. 7" ///<75 #else 76 #define NV_VERSION "16. 7" ///< Current software version74 #define HM_VERSION "16.9" ///< 75 #else 76 #define NV_VERSION "16.9" ///< Current software version 77 77 #endif 78 78 // ==================================================================================================================== … … 266 266 static const Int CONTEXT_STATE_BITS = 6 ; 267 267 static const Int LAST_SIGNIFICANT_GROUPS = 10 ; 268 269 #if W0038_DB_OPT 270 static const Int MAX_ENCODER_DEBLOCKING_QUALITY_LAYERS = 8 ; 271 #endif 272 268 273 269 274 #if NH_MV -
trunk/source/Lib/TLibCommon/ContextModel.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/ContextModel.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/ContextModel3DBuffer.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/ContextModel3DBuffer.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/ContextTables.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/Debug.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/Debug.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/NAL.h
r1321 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/SEI.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 153 153 case SEI::CHROMA_RESAMPLING_FILTER_HINT: return "Chroma sampling filter hint"; 154 154 case SEI::COLOUR_REMAPPING_INFO: return "Colour remapping info"; 155 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 156 case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS: return "Alternative transfer characteristics"; 157 #endif 155 158 156 159 #if NH_MV -
trunk/source/Lib/TLibCommon/SEI.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 97 97 KNEE_FUNCTION_INFO = 141, 98 98 COLOUR_REMAPPING_INFO = 142, 99 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 100 ALTERNATIVE_TRANSFER_CHARACTERISTICS = 182, 101 #endif 99 102 DEINTERLACED_FIELD_IDENTIFICATION = 143, 100 103 LAYERS_NOT_PRESENT = 160, … … 655 658 656 659 }; 660 661 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 662 class SEIAlternativeTransferCharacteristics : public SEI 663 { 664 public: 665 PayloadType payloadType() const { return ALTERNATIVE_TRANSFER_CHARACTERISTICS; } 666 667 SEIAlternativeTransferCharacteristics() : m_preferredTransferCharacteristics(18) 668 { } 669 670 virtual ~SEIAlternativeTransferCharacteristics() {} 671 672 UInt m_preferredTransferCharacteristics; 673 }; 674 #endif 675 676 657 677 #if NH_MV 658 678 class SEILayersNotPresent : public SEI -
trunk/source/Lib/TLibCommon/TComBitCounter.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComBitStream.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComBitStream.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComCABACTables.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComCABACTables.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComChromaFormat.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComChromaFormat.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComCodingStatistics.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComDataCU.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComInterpolationFilter.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComInterpolationFilter.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComList.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComLoopFilter.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComLoopFilter.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComMotionInfo.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComMv.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPattern.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPattern.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPic.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 97 97 TComPic::~TComPic() 98 98 { 99 destroy(); 99 100 } 100 101 101 102 Void TComPic::create( const TComSPS &sps, const TComPPS &pps, const Bool bIsVirtual) 102 103 { 104 destroy(); 105 103 106 const ChromaFormat chromaFormatIDC = sps.getChromaFormatIdc(); 104 107 const Int iWidth = sps.getPicWidthInLumaSamples(); -
trunk/source/Lib/TLibCommon/TComPic.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 191 191 const TComPicSym* getPicSym() const { return &m_picSym; } 192 192 TComSlice* getSlice(Int i) { return m_picSym.getSlice(i); } 193 const TComSlice* getSlice(Int i) const { return m_picSym.getSlice(i); } 193 194 Int getPOC() const { return m_picSym.getSlice(m_uiCurrSliceIdx)->getPOC(); } 194 195 TComDataCU* getCtu( UInt ctuRsAddr ) { return m_picSym.getCtu( ctuRsAddr ); } -
trunk/source/Lib/TLibCommon/TComPicSym.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 71 71 72 72 73 TComPicSym::~TComPicSym() 74 { 75 destroy(); 76 } 77 78 73 79 Void TComPicSym::create ( const TComSPS &sps, const TComPPS &pps, UInt uiMaxDepth ) 74 80 { 75 UInt i;76 81 m_sps = sps; 77 82 m_pps = pps; … … 108 113 #endif 109 114 110 for ( i=0; i<m_numCtusInFrame ; i++ )115 for (UInt i=0; i<m_numCtusInFrame ; i++ ) 111 116 { 112 117 m_pictureCtuArray[i] = new TComDataCU; … … 122 127 m_ctuRsToTsAddrMap = new UInt[m_numCtusInFrame+1]; 123 128 124 for( i=0; i<m_numCtusInFrame; i++ )129 for(UInt i=0; i<m_numCtusInFrame; i++ ) 125 130 { 126 131 m_ctuTsToRsAddrMap[i] = i; -
trunk/source/Lib/TLibCommon/TComPicSym.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 125 125 126 126 TComPicSym (); 127 ~TComPicSym(); 128 127 129 TComSlice* getSlice(UInt i) { return m_apSlices[i]; } 128 130 const TComSlice* getSlice(UInt i) const { return m_apSlices[i]; } -
trunk/source/Lib/TLibCommon/TComPicYuv.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 74 74 TComPicYuv::~TComPicYuv() 75 75 { 76 destroy(); 76 77 } 77 78 … … 87 88 88 89 { 90 destroy(); 91 89 92 m_picWidth = picWidth; 90 93 m_picHeight = picHeight; -
trunk/source/Lib/TLibCommon/TComPicYuv.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPicYuvMD5.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComPrediction.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComRdCost.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComRdCost.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComRectangle.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComRom.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComRom.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 -
trunk/source/Lib/TLibCommon/TComSlice.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComTU.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComTU.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComTrQuant.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComTrQuant.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComWedgelet.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComWedgelet.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComWeightPrediction.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComWeightPrediction.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TComYuv.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 59 59 TComYuv::~TComYuv() 60 60 { 61 destroy(); 61 62 } 62 63 63 64 Void TComYuv::create( UInt iWidth, UInt iHeight, ChromaFormat chromaFormatIDC ) 64 65 { 66 destroy(); 65 67 // set width and height 66 68 m_iWidth = iWidth; -
trunk/source/Lib/TLibCommon/TComYuv.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibCommon/TypeDef.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 373 373 #define T0196_SELECTIVE_RDOQ 1 ///< selective RDOQ 374 374 #define U0040_MODIFIED_WEIGHTEDPREDICTION_WITH_BIPRED_AND_CLIPPING 1 375 #define U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 1 ///< Alternative transfer characteristics SEI message (JCTVC-U0033, with syntax naming from V1005) 376 #define W0062_RECALCULATE_QP_TO_ALIGN_WITH_LAMBDA 0 ///< This recalculates QP to align with the derived lambda (same relation as for all intra coding is used). Currently disabled by default. 377 #define OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 1 ///< Adds command line option to reset SAO parameters after each IRAP. 378 375 379 // ==================================================================================================================== 376 380 // Tool Switches … … 396 400 #endif 397 401 #define U0132_TARGET_BITS_SATURATION 1 ///< Rate control with target bits saturation method 402 #ifdef U0132_TARGET_BITS_SATURATION 403 #define V0078_ADAPTIVE_LOWER_BOUND 1 ///< Target bits saturation with adaptive lower bound 404 #endif 405 #define W0038_DB_OPT 1 ///< adaptive DB parameter selection, LoopFilterOffsetInPPS and LoopFilterDisable are set to 0 and DeblockingFilterMetric=2; 406 #define W0038_CQP_ADJ 1 ///< chroma QP adjustment based on TL, CQPTLAdjustEnabled is set to 1; 407 398 408 // ==================================================================================================================== 399 409 // Derived macros -
trunk/source/Lib/TLibDecoder/AnnexBread.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/AnnexBread.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/NALread.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/NALread.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/SEIread.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 311 311 xParseSEIMasteringDisplayColourVolume((SEIMasteringDisplayColourVolume&) *sei, payloadSize, pDecodedMessageOutputStream); 312 312 break; 313 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 314 case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS: 315 sei = new SEIAlternativeTransferCharacteristics; 316 xParseSEIAlternativeTransferCharacteristics((SEIAlternativeTransferCharacteristics&) *sei, payloadSize, pDecodedMessageOutputStream); 317 break; 318 #endif 313 319 #if NH_MV 314 320 case SEI::LAYERS_NOT_PRESENT: … … 636 642 sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_cpb_removal_delay":"nal_initial_cpb_removal_delay" ); 637 643 sei.m_initialCpbRemovalDelay[i][nalOrVcl] = code; 638 sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_cpb_removal_offset":" vcl_initial_cpb_removal_offset" );644 sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_cpb_removal_offset":"nal_initial_cpb_removal_offset" ); 639 645 sei.m_initialCpbRemovalDelayOffset[i][nalOrVcl] = code; 640 646 if( pHRD->getSubPicCpbParamsPresentFlag() || sei.m_rapCpbParamsPresentFlag ) 641 647 { 642 sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_alt_cpb_removal_delay":" vcl_initial_alt_cpb_removal_delay" );648 sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_alt_cpb_removal_delay":"nal_initial_alt_cpb_removal_delay" ); 643 649 sei.m_initialAltCpbRemovalDelay[i][nalOrVcl] = code; 644 sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_alt_cpb_removal_offset":" vcl_initial_alt_cpb_removal_offset" );650 sei_read_code( pDecodedMessageOutputStream, ( pHRD->getInitialCpbRemovalDelayLengthMinus1() + 1 ) , code, nalOrVcl?"vcl_initial_alt_cpb_removal_offset":"nal_initial_alt_cpb_removal_offset" ); 645 651 sei.m_initialAltCpbRemovalDelayOffset[i][nalOrVcl] = code; 646 652 } … … 1272 1278 sei_read_code( pDecodedMessageOutputStream, 32, code, "min_display_mastering_luminance" ); sei.values.minLuminance = code; 1273 1279 } 1280 1281 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 1282 Void SEIReader::xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics& sei, UInt payloadSize, ostream* pDecodedMessageOutputStream) 1283 { 1284 UInt code; 1285 output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize); 1286 1287 sei_read_code(pDecodedMessageOutputStream, 8, code, "preferred_transfer_characteristics"); sei.m_preferredTransferCharacteristics = code; 1288 } 1289 #endif 1290 1274 1291 #if NH_MV 1275 1292 Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent &sei, UInt payloadSize, const TComVPS *vps, std::ostream *pDecodedMessageOutputStream) -
trunk/source/Lib/TLibDecoder/SEIread.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 95 95 Void xParseSEIMasteringDisplayColourVolume (SEIMasteringDisplayColourVolume& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 96 96 Void xParseSEIColourRemappingInfo (SEIColourRemappingInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 97 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 98 Void xParseSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics& sei, UInt payLoadSize, std::ostream *pDecodedMessageOutputStream); 99 #endif 97 100 #if NH_MV 98 101 Void xParseSEILayersNotPresent (SEILayersNotPresent &sei, UInt payloadSize, const TComVPS *vps ,std::ostream *pDecodedMessageOutputStream); -
trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/SyntaxElementParser.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecBinCoder.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r1321 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecCu.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r1321 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecGop.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r1321 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecSlice.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecTop.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/AnnexBwrite.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/NALwrite.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/NALwrite.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/SEIEncoder.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 651 651 } 652 652 } 653 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 654 Void SEIEncoder::initSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics *seiAltTransCharacteristics) 655 { 656 assert (m_isInitialized); 657 assert (seiAltTransCharacteristics!=NULL); 658 // Set SEI message parameters read from command line options 659 seiAltTransCharacteristics->m_preferredTransferCharacteristics = m_pcCfg->getSEIPreferredTransferCharacteristics(); 660 } 661 #endif 653 662 654 663 #if NH_MV -
trunk/source/Lib/TLibEncoder/SEIEncoder.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 82 82 Void initSEITimeCode(SEITimeCode *sei); 83 83 Bool initSEIColourRemappingInfo(SEIColourRemappingInfo *sei, Int currPOC); // returns true on success, false on failure. 84 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 85 Void initSEIAlternativeTransferCharacteristics(SEIAlternativeTransferCharacteristics *sei); 86 #endif 84 87 85 88 // trailing SEIs -
trunk/source/Lib/TLibEncoder/SEIwrite.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 124 124 xWriteSEIMasteringDisplayColourVolume(*static_cast<const SEIMasteringDisplayColourVolume*>(&sei)); 125 125 break; 126 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 127 case SEI::ALTERNATIVE_TRANSFER_CHARACTERISTICS: 128 xWriteSEIAlternativeTransferCharacteristics(*static_cast<const SEIAlternativeTransferCharacteristics*>(&sei)); 129 break; 130 #endif 131 126 132 #if NH_MV 127 133 case SEI::LAYERS_NOT_PRESENT: … … 871 877 } 872 878 879 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 880 Void SEIWriter::xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics& sei) 881 { 882 WRITE_CODE(sei.m_preferredTransferCharacteristics, 8, "preferred_transfer_characteristics"); 883 } 884 #endif 885 873 886 #if NH_MV 874 887 Void SEIWriter::xWriteSEILayersNotPresent(const SEILayersNotPresent& sei) -
trunk/source/Lib/TLibEncoder/SEIwrite.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 75 75 Void xWriteSEIColourRemappingInfo(const SEIColourRemappingInfo& sei); 76 76 Void xWriteSEIMasteringDisplayColourVolume( const SEIMasteringDisplayColourVolume& sei); 77 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 78 Void xWriteSEIAlternativeTransferCharacteristics(const SEIAlternativeTransferCharacteristics& sei); 79 #endif 77 80 78 81 #if NH_MV -
trunk/source/Lib/TLibEncoder/SyntaxElementWriter.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/SyntaxElementWriter.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncAnalyze.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncBinCoder.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncBinCoderCABAC.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncCavlc.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 62 62 Int m_POC; 63 63 Int m_QPOffset; 64 #if W0038_CQP_ADJ 65 Int m_CbQPoffset; 66 Int m_CrQPoffset; 67 #endif 64 68 Double m_QPFactor; 65 69 Int m_tcOffsetDiv2; … … 89 93 : m_POC(-1) 90 94 , m_QPOffset(0) 95 #if W0038_CQP_ADJ 96 , m_CbQPoffset(0) 97 , m_CrQPoffset(0) 98 #endif 91 99 , m_QPFactor(0) 92 100 , m_tcOffsetDiv2(0) … … 135 143 Int m_iFrameRate; 136 144 Int m_FrameSkip; 145 UInt m_temporalSubsampleRatio; 137 146 Int m_iSourceWidth; 138 147 Int m_iSourceHeight; … … 163 172 164 173 //====== Coding Structure ======== 165 UInt m_uiIntraPeriod; 174 UInt m_uiIntraPeriod; // TODO: make this an Int - it can be -1! 166 175 UInt m_uiDecodingRefreshType; ///< the type of decoding refresh employed for the random access. 167 176 Int m_iGOPSize; … … 202 211 Int m_loopFilterBetaOffsetDiv2; 203 212 Int m_loopFilterTcOffsetDiv2; 213 #if W0038_DB_OPT 214 Int m_deblockingFilterMetric; 215 #else 204 216 Bool m_DeblockingFilterMetric; 217 #endif 205 218 Bool m_bUseSAO; 206 219 Bool m_bTestSAODisableAtPictureLevel; … … 209 222 Int m_maxNumOffsetsPerPic; 210 223 Bool m_saoCtuBoundary; 224 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 225 Bool m_saoResetEncoderStateAfterIRAP; 226 #endif 211 227 212 228 //====== Motion search ======== … … 231 247 Int m_chromaCbQpOffset; // Chroma Cb QP Offset (0:default) 232 248 Int m_chromaCrQpOffset; // Chroma Cr Qp Offset (0:default) 249 #if W0038_CQP_ADJ 250 UInt m_sliceChromaQpOffsetPeriodicity; ///< Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature. 251 Int m_sliceChromaQpOffsetIntraOrPeriodic[2/*Cb,Cr*/]; ///< Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table. 252 #endif 253 233 254 ChromaFormat m_chromaFormatIDC; 234 255 … … 363 384 std::string m_colourRemapSEIFileRoot; ///< SEI Colour Remapping File (initialized from external file) 364 385 TComSEIMasteringDisplay m_masteringDisplay; 386 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 387 Bool m_alternativeTransferCharacteristicsSEIEnabled; 388 UChar m_preferredTransferCharacteristics; 389 #endif 390 365 391 #if NH_MV 366 392 SEIMessages* m_seiMessages; … … 534 560 Void setFrameRate ( Int i ) { m_iFrameRate = i; } 535 561 Void setFrameSkip ( UInt i ) { m_FrameSkip = i; } 562 Void setTemporalSubsampleRatio ( UInt i ) { m_temporalSubsampleRatio = i; } 536 563 Void setSourceWidth ( Int i ) { m_iSourceWidth = i; } 537 564 Void setSourceHeight ( Int i ) { m_iSourceHeight = i; } … … 619 646 Void setLoopFilterBetaOffset ( Int i ) { m_loopFilterBetaOffsetDiv2 = i; } 620 647 Void setLoopFilterTcOffset ( Int i ) { m_loopFilterTcOffsetDiv2 = i; } 648 #if W0038_DB_OPT 649 Void setDeblockingFilterMetric ( Int i ) { m_deblockingFilterMetric = i; } 650 #else 621 651 Void setDeblockingFilterMetric ( Bool b ) { m_DeblockingFilterMetric = b; } 622 652 #endif 623 653 //====== Motion search ======== 624 654 Void setDisableIntraPUsInInterSlices ( Bool b ) { m_bDisableIntraPUsInInterSlices = b; } … … 645 675 Void setChromaCbQpOffset ( Int i ) { m_chromaCbQpOffset = i; } 646 676 Void setChromaCrQpOffset ( Int i ) { m_chromaCrQpOffset = i; } 677 #if W0038_CQP_ADJ 678 Void setSliceChromaOffsetQpIntraOrPeriodic( UInt periodicity, Int sliceChromaQpOffsetIntraOrPeriodic[2]) { m_sliceChromaQpOffsetPeriodicity = periodicity; memcpy(m_sliceChromaQpOffsetIntraOrPeriodic, sliceChromaQpOffsetIntraOrPeriodic, sizeof(m_sliceChromaQpOffsetIntraOrPeriodic)); } 679 Int getSliceChromaOffsetQpIntraOrPeriodic( Bool bIsCr) const { return m_sliceChromaQpOffsetIntraOrPeriodic[bIsCr?1:0]; } 680 UInt getSliceChromaOffsetQpPeriodicity() const { return m_sliceChromaQpOffsetPeriodicity; } 681 #endif 647 682 648 683 Void setChromaFormatIdc ( ChromaFormat cf ) { m_chromaFormatIDC = cf; } … … 666 701 Int getFrameRate () { return m_iFrameRate; } 667 702 UInt getFrameSkip () { return m_FrameSkip; } 703 UInt getTemporalSubsampleRatio () { return m_temporalSubsampleRatio; } 668 704 Int getSourceWidth () { return m_iSourceWidth; } 669 705 Int getSourceHeight () { return m_iSourceHeight; } … … 702 738 Int getLoopFilterBetaOffset () { return m_loopFilterBetaOffsetDiv2; } 703 739 Int getLoopFilterTcOffset () { return m_loopFilterTcOffsetDiv2; } 740 #if W0038_DB_OPT 741 Int getDeblockingFilterMetric () { return m_deblockingFilterMetric; } 742 #else 704 743 Bool getDeblockingFilterMetric () { return m_DeblockingFilterMetric; } 744 #endif 705 745 706 746 //==== Motion search ======== … … 831 871 Void setSaoCtuBoundary (Bool val) { m_saoCtuBoundary = val; } 832 872 Bool getSaoCtuBoundary () { return m_saoCtuBoundary; } 873 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 874 Void setSaoResetEncoderStateAfterIRAP(Bool b) { m_saoResetEncoderStateAfterIRAP = b; } 875 Bool getSaoResetEncoderStateAfterIRAP() const { return m_saoResetEncoderStateAfterIRAP; } 876 #endif 833 877 Void setLFCrossTileBoundaryFlag ( Bool val ) { m_loopFilterAcrossTilesEnabledFlag = val; } 834 878 Bool getLFCrossTileBoundaryFlag () { return m_loopFilterAcrossTilesEnabledFlag; } … … 975 1019 976 1020 Void setMasteringDisplaySEI(const TComSEIMasteringDisplay &src) { m_masteringDisplay = src; } 1021 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 1022 Void setSEIAlternativeTransferCharacteristicsSEIEnable( Bool b) { m_alternativeTransferCharacteristicsSEIEnabled = b; } 1023 Bool getSEIAlternativeTransferCharacteristicsSEIEnable( ) const { return m_alternativeTransferCharacteristicsSEIEnabled; } 1024 Void setSEIPreferredTransferCharacteristics(UChar v) { m_preferredTransferCharacteristics = v; } 1025 UChar getSEIPreferredTransferCharacteristics() const { return m_preferredTransferCharacteristics; } 1026 #endif 977 1027 const TComSEIMasteringDisplay &getMasteringDisplaySEI() const { return m_masteringDisplay; } 978 1028 #if NH_MV -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 1096 1096 // do normal intra modes 1097 1097 // speedup for inter frames 1098 Double intraCost = 0.0;1099 1098 1100 1099 if((rpcBestCU->getSlice()->getSliceType() == I_SLICE) || … … 1122 1121 if( bUseIVP ) 1123 1122 { 1124 xCheckRDCostIntra( rpcBestCU, rpcTempCU, intraCost,SIZE_2Nx2N DEBUG_STRING_PASS_INTO(sDebug), bOnlyIVP );1125 #else 1126 xCheckRDCostIntra( rpcBestCU, rpcTempCU, intraCost,SIZE_2Nx2N DEBUG_STRING_PASS_INTO(sDebug) );1123 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N DEBUG_STRING_PASS_INTO(sDebug), bOnlyIVP ); 1124 #else 1125 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N DEBUG_STRING_PASS_INTO(sDebug) ); 1127 1126 #endif 1128 1127 #if KWU_RC_MADPRED_E0227 … … 1143 1142 if( rpcTempCU->getWidth(0) > ( 1 << sps.getQuadtreeTULog2MinSize() ) ) 1144 1143 { 1145 Double tmpIntraCost;1146 1144 #if NH_3D_ENC_DEPTH 1147 xCheckRDCostIntra( rpcBestCU, rpcTempCU, tmpIntraCost, SIZE_NxN DEBUG_STRING_PASS_INTO(sDebug), bOnlyIVP ); 1148 #else 1149 xCheckRDCostIntra( rpcBestCU, rpcTempCU, tmpIntraCost, SIZE_NxN DEBUG_STRING_PASS_INTO(sDebug) ); 1150 #endif 1151 1152 intraCost = std::min(intraCost, tmpIntraCost); 1145 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN DEBUG_STRING_PASS_INTO(sDebug), bOnlyIVP ); 1146 #else 1147 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN DEBUG_STRING_PASS_INTO(sDebug) ); 1148 #endif 1153 1149 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1154 1150 } … … 2784 2780 Void TEncCu::xCheckRDCostIntra( TComDataCU *&rpcBestCU, 2785 2781 TComDataCU *&rpcTempCU, 2786 Double &cost,2787 2782 PartSize eSize 2788 2783 DEBUG_STRING_FN_DECLARE(sDebug) … … 2895 2890 2896 2891 xCheckDQP( rpcTempCU ); 2897 2898 cost = rpcTempCU->getTotalCost();2899 2892 2900 2893 xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth DEBUG_STRING_PASS_INTO(sDebug) DEBUG_STRING_PASS_INTO(sTest)); -
trunk/source/Lib/TLibEncoder/TEncCu.h
r1321 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 167 167 Void xCheckRDCostIntra ( TComDataCU *&rpcBestCU, 168 168 TComDataCU *&rpcTempCU, 169 Double &cost,170 169 PartSize ePartSize 171 170 DEBUG_STRING_FN_DECLARE(sDebug) -
trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncEntropy.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 108 108 m_associatedIRAPType = NAL_UNIT_CODED_SLICE_IDR_N_LP; 109 109 m_associatedIRAPPOC = 0; 110 #if W0038_DB_OPT 111 m_pcDeblockingTempPicYuv = NULL; 112 #endif 110 113 return; 111 114 } … … 125 128 Void TEncGOP::destroy() 126 129 { 130 #if W0038_DB_OPT 131 if (m_pcDeblockingTempPicYuv) 132 { 133 m_pcDeblockingTempPicYuv->destroy(); 134 delete m_pcDeblockingTempPicYuv; 135 m_pcDeblockingTempPicYuv = NULL; 136 } 137 #endif 127 138 } 128 139 … … 502 513 seiMessages.push_back(seiChromaResamplingFilterHint); 503 514 } 515 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 516 if(m_pcCfg->getSEIAlternativeTransferCharacteristicsSEIEnable()) 517 { 518 SEIAlternativeTransferCharacteristics *seiAlternativeTransferCharacteristics = new SEIAlternativeTransferCharacteristics; 519 m_seiEncoder.initSEIAlternativeTransferCharacteristics(seiAlternativeTransferCharacteristics); 520 seiMessages.push_back(seiAlternativeTransferCharacteristics); 521 } 522 #endif 504 523 } 505 524 … … 1727 1746 estimatedCpbFullness -= m_pcRateCtrl->getBufferingRate(); 1728 1747 // prevent underflow 1748 #if V0078_ADAPTIVE_LOWER_BOUND 1749 if (estimatedCpbFullness - estimatedBits < m_pcRateCtrl->getRCPic()->getLowerBound()) 1750 { 1751 estimatedBits = max(200, estimatedCpbFullness - m_pcRateCtrl->getRCPic()->getLowerBound()); 1752 } 1753 #else 1729 1754 if (estimatedCpbFullness - estimatedBits < (Int)(m_pcRateCtrl->getCpbSize()*0.1f)) 1730 1755 { 1731 1756 estimatedBits = max(200, estimatedCpbFullness - (Int)(m_pcRateCtrl->getCpbSize()*0.1f)); 1732 1757 } 1758 #endif 1733 1759 1734 1760 m_pcRateCtrl->getRCPic()->setTargetBits(estimatedBits); … … 1769 1795 estimatedCpbFullness -= m_pcRateCtrl->getBufferingRate(); 1770 1796 // prevent underflow 1797 #if V0078_ADAPTIVE_LOWER_BOUND 1798 if (estimatedCpbFullness - bits < m_pcRateCtrl->getRCPic()->getLowerBound()) 1799 { 1800 bits = estimatedCpbFullness - m_pcRateCtrl->getRCPic()->getLowerBound(); 1801 } 1802 #else 1771 1803 if (estimatedCpbFullness - bits < (Int)(m_pcRateCtrl->getCpbSize()*0.1f)) 1772 1804 { 1773 1805 bits = estimatedCpbFullness - (Int)(m_pcRateCtrl->getCpbSize()*0.1f); 1774 1806 } 1807 #endif 1775 1808 } 1776 1809 #endif … … 1902 1935 if ( m_pcCfg->getDeblockingFilterMetric() ) 1903 1936 { 1937 #if W0038_DB_OPT 1938 if ( m_pcCfg->getDeblockingFilterMetric()==2 ) 1939 { 1940 applyDeblockingFilterParameterSelection(pcPic, uiNumSliceSegments, iGOPid); 1941 } 1942 else 1943 { 1944 #endif 1904 1945 applyDeblockingFilterMetric(pcPic, uiNumSliceSegments); 1946 #if W0038_DB_OPT 1947 } 1948 #endif 1905 1949 } 1906 1950 m_pcLoopFilter->loopFilterPic( pcPic ); … … 1954 1998 m_pcEncTop->getRDGoOnSbacCoder()->setBitstream(&tempBitCounter); 1955 1999 m_pcSAO->initRDOCabacCoder(m_pcEncTop->getRDGoOnSbacCoder(), pcSlice); 2000 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 2001 m_pcSAO->SAOProcess(pcPic, sliceEnabled, pcPic->getSlice(0)->getLambdas(), 2002 m_pcCfg->getTestSAODisableAtPictureLevel(), 2003 m_pcCfg->getSaoEncodingRate(), 2004 m_pcCfg->getSaoEncodingRateChroma(), 2005 m_pcCfg->getSaoCtuBoundary(), 2006 m_pcCfg->getSaoResetEncoderStateAfterIRAP()); 2007 #else 1956 2008 m_pcSAO->SAOProcess(pcPic, sliceEnabled, pcPic->getSlice(0)->getLambdas(), m_pcCfg->getTestSAODisableAtPictureLevel(), m_pcCfg->getSaoEncodingRate(), m_pcCfg->getSaoEncodingRateChroma(), m_pcCfg->getSaoCtuBoundary()); 2009 #endif 1957 2010 m_pcSAO->PCMLFDisableProcess(pcPic); 1958 2011 m_pcEncTop->getRDGoOnSbacCoder()->setBitstream(NULL); … … 2186 2239 //--CFG_KDY 2187 2240 const Int rateMultiplier=(isField?2:1); 2188 m_gcAnalyzeAll.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier );2189 m_gcAnalyzeI.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier );2190 m_gcAnalyzeP.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier );2191 m_gcAnalyzeB.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier );2241 m_gcAnalyzeAll.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier / (Double)m_pcCfg->getTemporalSubsampleRatio()); 2242 m_gcAnalyzeI.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier / (Double)m_pcCfg->getTemporalSubsampleRatio()); 2243 m_gcAnalyzeP.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier / (Double)m_pcCfg->getTemporalSubsampleRatio()); 2244 m_gcAnalyzeB.setFrmRate( m_pcCfg->getFrameRate()*rateMultiplier / (Double)m_pcCfg->getTemporalSubsampleRatio()); 2192 2245 const ChromaFormat chFmt = m_pcCfg->getChromaFormatIdc(); 2193 2246 … … 2224 2277 { 2225 2278 //-- interlaced summary 2279 #if TEMPORAL_SUBSAMPLE 2280 m_gcAnalyzeAll_in.setFrmRate( m_pcCfg->getFrameRate() / (Double)m_pcCfg->getTemporalSubsampleRatio()); 2281 #else 2226 2282 m_gcAnalyzeAll_in.setFrmRate( m_pcCfg->getFrameRate()); 2283 #endif 2227 2284 m_gcAnalyzeAll_in.setBits(m_gcAnalyzeAll.getBits()); 2228 2285 // prior to the above statement, the interlace analyser does not contain the correct total number of bits. … … 2959 3016 assert(noCol > 1); 2960 3017 assert(noRows > 1); 2961 UInt64 *colSAD = (UInt64*)malloc(noCol*sizeof(UInt64));2962 UInt64 *rowSAD = (UInt64*)malloc(noRows*sizeof(UInt64));3018 std::vector<UInt64> colSAD(noCol, UInt64(0)); 3019 std::vector<UInt64> rowSAD(noRows, UInt64(0)); 2963 3020 UInt colIdx = 0; 2964 3021 UInt rowIdx = 0; … … 2972 3029 const Int thr1 = 2*bitdepthScale; 2973 3030 UInt a = 0; 2974 2975 memset(colSAD, 0, noCol*sizeof(UInt64));2976 memset(rowSAD, 0, noRows*sizeof(UInt64));2977 3031 2978 3032 if (maxTBsize > minBlockArtSize) … … 3064 3118 } 3065 3119 } 3066 3067 free(colSAD); 3068 free(rowSAD); 3069 } 3120 } 3121 3122 #if W0038_DB_OPT 3123 Void TEncGOP::applyDeblockingFilterParameterSelection( TComPic* pcPic, const UInt numSlices, const Int gopID ) 3124 { 3125 enum DBFltParam 3126 { 3127 DBFLT_PARAM_AVAILABLE = 0, 3128 DBFLT_DISABLE_FLAG, 3129 DBFLT_BETA_OFFSETD2, 3130 DBFLT_TC_OFFSETD2, 3131 //NUM_DBFLT_PARAMS 3132 }; 3133 const Int MAX_BETA_OFFSET = 3; 3134 const Int MIN_BETA_OFFSET = -3; 3135 const Int MAX_TC_OFFSET = 3; 3136 const Int MIN_TC_OFFSET = -3; 3137 3138 TComPicYuv* pcPicYuvRec = pcPic->getPicYuvRec(); 3139 TComPicYuv* pcPicYuvOrg = pcPic ->getPicYuvOrg(); 3140 3141 const Int currQualityLayer = (pcPic->getSlice(0)->getSliceType() != I_SLICE) ? m_pcCfg->getGOPEntry(gopID).m_temporalId+1 : 0; 3142 assert(currQualityLayer <MAX_ENCODER_DEBLOCKING_QUALITY_LAYERS); 3143 3144 if(!m_pcDeblockingTempPicYuv) 3145 { 3146 m_pcDeblockingTempPicYuv = new TComPicYuv; 3147 m_pcDeblockingTempPicYuv->create( m_pcEncTop->getSourceWidth(), m_pcEncTop->getSourceHeight(), m_pcEncTop->getChromaFormatIdc(), pcPic->getSlice(0)->getSPS()->getMaxCUWidth(), pcPic->getSlice(0)->getSPS()->getMaxCUHeight(), pcPic->getSlice(0)->getSPS()->getMaxTotalCUDepth(),true ); 3148 memset(m_DBParam, 0, sizeof(m_DBParam)); 3149 } 3150 3151 //preserve current reconstruction 3152 pcPicYuvRec->copyToPic(m_pcDeblockingTempPicYuv); 3153 3154 const Bool bNoFiltering = m_DBParam[currQualityLayer][DBFLT_PARAM_AVAILABLE] && m_DBParam[currQualityLayer][DBFLT_DISABLE_FLAG]==false /*&& pcPic->getTLayer()==0*/; 3155 const Int maxBetaOffsetDiv2 = bNoFiltering? Clip3(MIN_BETA_OFFSET, MAX_BETA_OFFSET, m_DBParam[currQualityLayer][DBFLT_BETA_OFFSETD2]+1) : MAX_BETA_OFFSET; 3156 const Int minBetaOffsetDiv2 = bNoFiltering? Clip3(MIN_BETA_OFFSET, MAX_BETA_OFFSET, m_DBParam[currQualityLayer][DBFLT_BETA_OFFSETD2]-1) : MIN_BETA_OFFSET; 3157 const Int maxTcOffsetDiv2 = bNoFiltering? Clip3(MIN_TC_OFFSET, MAX_TC_OFFSET, m_DBParam[currQualityLayer][DBFLT_TC_OFFSETD2]+2) : MAX_TC_OFFSET; 3158 const Int minTcOffsetDiv2 = bNoFiltering? Clip3(MIN_TC_OFFSET, MAX_TC_OFFSET, m_DBParam[currQualityLayer][DBFLT_TC_OFFSETD2]-2) : MIN_TC_OFFSET; 3159 3160 UInt64 distBetaPrevious = std::numeric_limits<UInt64>::max(); 3161 UInt64 distMin = std::numeric_limits<UInt64>::max(); 3162 Bool bDBFilterDisabledBest = true; 3163 Int betaOffsetDiv2Best = 0; 3164 Int tcOffsetDiv2Best = 0; 3165 3166 for(Int betaOffsetDiv2=maxBetaOffsetDiv2; betaOffsetDiv2>=minBetaOffsetDiv2; betaOffsetDiv2--) 3167 { 3168 UInt64 distTcMin = std::numeric_limits<UInt64>::max(); 3169 for(Int tcOffsetDiv2=maxTcOffsetDiv2; tcOffsetDiv2 >= minTcOffsetDiv2; tcOffsetDiv2--) 3170 { 3171 for (Int i=0; i<numSlices; i++) 3172 { 3173 pcPic->getSlice(i)->setDeblockingFilterOverrideFlag(true); 3174 pcPic->getSlice(i)->setDeblockingFilterDisable(false); 3175 pcPic->getSlice(i)->setDeblockingFilterBetaOffsetDiv2( betaOffsetDiv2 ); 3176 pcPic->getSlice(i)->setDeblockingFilterTcOffsetDiv2( tcOffsetDiv2 ); 3177 } 3178 m_pcDeblockingTempPicYuv->copyToPic(pcPicYuvRec); // restore reconstruction 3179 m_pcLoopFilter->loopFilterPic( pcPic ); 3180 const UInt64 dist = xFindDistortionFrame(pcPicYuvOrg, pcPicYuvRec, pcPic->getPicSym()->getSPS().getBitDepths()); 3181 if(dist < distMin) 3182 { 3183 distMin = dist; 3184 bDBFilterDisabledBest = false; 3185 betaOffsetDiv2Best = betaOffsetDiv2; 3186 tcOffsetDiv2Best = tcOffsetDiv2; 3187 } 3188 if(dist < distTcMin) 3189 { 3190 distTcMin = dist; 3191 } 3192 else if(tcOffsetDiv2 <-2) 3193 { 3194 break; 3195 } 3196 } 3197 if(betaOffsetDiv2<-1 && distTcMin >= distBetaPrevious) 3198 { 3199 break; 3200 } 3201 distBetaPrevious = distTcMin; 3202 } 3203 3204 //update: 3205 m_DBParam[currQualityLayer][DBFLT_PARAM_AVAILABLE] = 1; 3206 m_DBParam[currQualityLayer][DBFLT_DISABLE_FLAG] = bDBFilterDisabledBest; 3207 m_DBParam[currQualityLayer][DBFLT_BETA_OFFSETD2] = betaOffsetDiv2Best; 3208 m_DBParam[currQualityLayer][DBFLT_TC_OFFSETD2] = tcOffsetDiv2Best; 3209 3210 m_pcDeblockingTempPicYuv->copyToPic(pcPicYuvRec); //restore reconstruction 3211 3212 if(bDBFilterDisabledBest) 3213 { 3214 for (Int i=0; i<numSlices; i++) 3215 { 3216 pcPic->getSlice(i)->setDeblockingFilterOverrideFlag(true); 3217 pcPic->getSlice(i)->setDeblockingFilterDisable(true); 3218 } 3219 } 3220 else if(betaOffsetDiv2Best ==pcPic->getSlice(0)->getPPS()->getDeblockingFilterBetaOffsetDiv2() && tcOffsetDiv2Best==pcPic->getSlice(0)->getPPS()->getDeblockingFilterTcOffsetDiv2()) 3221 { 3222 for (Int i=0; i<numSlices; i++) 3223 { 3224 pcPic->getSlice(i)->setDeblockingFilterOverrideFlag(false); 3225 pcPic->getSlice(i)->setDeblockingFilterDisable( pcPic->getSlice(i)->getPPS()->getPicDisableDeblockingFilterFlag() ); 3226 pcPic->getSlice(i)->setDeblockingFilterBetaOffsetDiv2( pcPic->getSlice(i)->getPPS()->getDeblockingFilterBetaOffsetDiv2() ); 3227 pcPic->getSlice(i)->setDeblockingFilterTcOffsetDiv2( pcPic->getSlice(i)->getPPS()->getDeblockingFilterTcOffsetDiv2() ); 3228 } 3229 } 3230 else 3231 { 3232 for (Int i=0; i<numSlices; i++) 3233 { 3234 pcPic->getSlice(i)->setDeblockingFilterOverrideFlag(true); 3235 pcPic->getSlice(i)->setDeblockingFilterDisable( false ); 3236 pcPic->getSlice(i)->setDeblockingFilterBetaOffsetDiv2(betaOffsetDiv2Best); 3237 pcPic->getSlice(i)->setDeblockingFilterTcOffsetDiv2(tcOffsetDiv2Best); 3238 } 3239 } 3240 } 3241 #endif 3070 3242 3071 3243 #if NH_MV -
trunk/source/Lib/TLibEncoder/TEncGOP.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 153 153 Bool m_bufferingPeriodSEIPresentInAU; 154 154 SEIEncoder m_seiEncoder; 155 #if W0038_DB_OPT 156 TComPicYuv* m_pcDeblockingTempPicYuv; 157 Int m_DBParam[MAX_ENCODER_DEBLOCKING_QUALITY_LAYERS][4]; //[layer_id][0: available; 1: bDBDisabled; 2: Beta Offset Div2; 3: Tc Offset Div2;] 158 #endif 155 159 156 160 public: … … 249 253 250 254 Void applyDeblockingFilterMetric( TComPic* pcPic, UInt uiNumSlices ); 255 #if W0038_DB_OPT 256 Void applyDeblockingFilterParameterSelection( TComPic* pcPic, const UInt numSlices, const Int gopID ); 257 #endif 251 258 };// END CLASS DEFINITION TEncGOP 252 259 -
trunk/source/Lib/TLibEncoder/TEncPic.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncPic.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncPreanalyzer.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncPreanalyzer.h
r1179 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncRateCtrl.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 554 554 } 555 555 556 #if V0078_ADAPTIVE_LOWER_BOUND 557 Int TEncRCPic::xEstPicLowerBound(TEncRCSeq* encRCSeq, TEncRCGOP* encRCGOP) 558 { 559 Int lowerBound = 0; 560 Int GOPbitsLeft = encRCGOP->getBitsLeft(); 561 562 const Int nextPicPosition = (encRCGOP->getNumPic() - encRCGOP->getPicLeft() + 1) % encRCGOP->getNumPic(); 563 const Int nextPicRatio = encRCSeq->getBitRatio(nextPicPosition); 564 565 Int totalPicRatio = 0; 566 for (Int i = nextPicPosition; i < encRCGOP->getNumPic(); i++) 567 { 568 totalPicRatio += encRCSeq->getBitRatio(i); 569 } 570 571 if (nextPicPosition == 0) 572 { 573 GOPbitsLeft = encRCGOP->getTargetBits(); 574 } 575 else 576 { 577 GOPbitsLeft -= m_targetBits; 578 } 579 580 lowerBound = Int(((Double)GOPbitsLeft) * nextPicRatio / totalPicRatio); 581 582 if (lowerBound < 100) 583 { 584 lowerBound = 100; // at least allocate 100 bits for one picture 585 } 586 587 if (m_encRCSeq->getFramesLeft() > 16) 588 { 589 lowerBound = Int(g_RCWeightPicRargetBitInBuffer * lowerBound + g_RCWeightPicTargetBitInGOP * m_encRCGOP->getTargetBitInGOP(nextPicPosition)); 590 } 591 592 return lowerBound; 593 } 594 #endif 595 596 556 597 Void TEncRCPic::addToPictureLsit( list<TEncRCPic*>& listPreviousPictures ) 557 598 { … … 611 652 Int picWidthInLCU = ( picWidth % LCUWidth ) == 0 ? picWidth / LCUWidth : picWidth / LCUWidth + 1; 612 653 Int picHeightInLCU = ( picHeight % LCUHeight ) == 0 ? picHeight / LCUHeight : picHeight / LCUHeight + 1; 654 #if V0078_ADAPTIVE_LOWER_BOUND 655 m_lowerBound = xEstPicLowerBound( encRCSeq, encRCGOP ); 656 #endif 613 657 614 658 m_LCULeft = m_numberOfLCU; -
trunk/source/Lib/TLibEncoder/TEncRateCtrl.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 267 267 Int xEstPicTargetBits( TEncRCSeq* encRCSeq, TEncRCGOP* encRCGOP ); 268 268 Int xEstPicHeaderBits( list<TEncRCPic*>& listPreviousPictures, Int frameLevel ); 269 #if V0078_ADAPTIVE_LOWER_BOUND 270 Int xEstPicLowerBound( TEncRCSeq* encRCSeq, TEncRCGOP* encRCGOP ); 271 #endif 269 272 270 273 public: … … 282 285 Int getBitsCoded() { return m_targetBits - m_estHeaderBits - m_bitsLeft; } 283 286 Int getLCUCoded() { return m_numberOfLCU - m_LCULeft; } 287 #if V0078_ADAPTIVE_LOWER_BOUND 288 Int getLowerBound() { return m_lowerBound; } 289 #endif 284 290 TRCLCU* getLCU() { return m_LCUs; } 285 291 TRCLCU& getLCU( Int LCUIdx ) { return m_LCUs[LCUIdx]; } … … 321 327 Int m_estHeaderBits; 322 328 Int m_estPicQP; 329 #if V0078_ADAPTIVE_LOWER_BOUND 330 Int m_lowerBound; 331 #endif 323 332 Double m_estPicLambda; 324 333 -
trunk/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 120 120 121 121 ::memset(m_saoDisabledRate, 0, sizeof(m_saoDisabledRate)); 122 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 123 m_lastIRAPPoc = MAX_INT; 124 #endif 122 125 123 126 for(Int typeIdc=0; typeIdc < NUM_SAO_NEW_TYPES; typeIdc++) … … 239 242 240 243 244 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 245 Void TEncSampleAdaptiveOffset::SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool isPreDBFSamplesUsed, const Bool bResetStateAfterIRAP ) 246 #else 241 247 Void TEncSampleAdaptiveOffset::SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, Bool isPreDBFSamplesUsed ) 248 #endif 242 249 { 243 250 TComPicYuv* orgYuv= pPic->getPicYuvOrg(); … … 256 263 } 257 264 //slice on/off 265 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 266 decidePicParams(sliceEnabled, pPic, saoEncodingRate, saoEncodingRateChroma, bResetStateAfterIRAP); 267 #else 258 268 decidePicParams(sliceEnabled, pPic->getSlice(0)->getDepth(), saoEncodingRate, saoEncodingRateChroma); 269 #endif 259 270 260 271 //block on/off … … 330 341 } 331 342 343 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 344 Void TEncSampleAdaptiveOffset::decidePicParams(Bool* sliceEnabled, const TComPic* pic, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool bResetStateAfterIRAP) 345 #else 332 346 Void TEncSampleAdaptiveOffset::decidePicParams(Bool* sliceEnabled, Int picTempLayer, const Double saoEncodingRate, const Double saoEncodingRateChroma) 333 { 347 #endif 348 { 349 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 350 if (pic->getSlice(0)->isIRAP()) 351 { 352 m_lastIRAPPoc = pic->getSlice(0)->getPOC(); 353 } 354 if (bResetStateAfterIRAP && pic->getSlice(0)->getPOC() > m_lastIRAPPoc) 355 { // reset 356 for (Int compIdx = 0; compIdx < MAX_NUM_COMPONENT; compIdx++) 357 { 358 for (Int tempLayer = 1; tempLayer < MAX_TLAYER; tempLayer++) 359 { 360 m_saoDisabledRate[compIdx][tempLayer] = 0.0; 361 } 362 } 363 m_lastIRAPPoc = MAX_INT; 364 } 365 const Int picTempLayer = pic->getSlice(0)->getDepth(); 366 #endif 367 334 368 //decide sliceEnabled[compIdx] 335 369 const Int numberOfComponents = getNumberValidComponents(m_chromaFormatIDC); -
trunk/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 103 103 Void destroyEncData(); 104 104 Void initRDOCabacCoder(TEncSbac* pcRDGoOnSbacCoder, TComSlice* pcSlice) ; 105 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 106 Void SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool isPreDBFSamplesUsed, const Bool bResetStateAfterIRAP); 107 #else 105 108 Void SAOProcess(TComPic* pPic, Bool* sliceEnabled, const Double *lambdas, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma, Bool isPreDBFSamplesUsed); 109 #endif 106 110 public: //methods 107 111 Void getPreDBFStatistics(TComPic* pPic); 108 112 private: //methods 109 113 Void getStatistics(SAOStatData*** blkStats, TComPicYuv* orgYuv, TComPicYuv* srcYuv,TComPic* pPic, Bool isCalculatePreDeblockSamples = false); 114 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 115 Void decidePicParams(Bool* sliceEnabled, const TComPic* pic, const Double saoEncodingRate, const Double saoEncodingRateChroma, const Bool bResetStateAfterIRAP); 116 #else 110 117 Void decidePicParams(Bool* sliceEnabled, Int picTempLayer, const Double saoEncodingRate, const Double saoEncodingRateChroma); 118 #endif 111 119 Void decideBlkParams(TComPic* pic, Bool* sliceEnabled, SAOStatData*** blkStats, TComPicYuv* srcYuv, TComPicYuv* resYuv, SAOBlkParam* reconParams, SAOBlkParam* codedParams, const Bool bTestSAODisableAtPictureLevel, const Double saoEncodingRate, const Double saoEncodingRateChroma); 112 120 Void getBlkStats(const ComponentID compIdx, const Int channelBitDepth, SAOStatData* statsDataTypes, Pel* srcBlk, Pel* orgBlk, Int srcStride, Int orgStride, Int width, Int height, Bool isLeftAvail, Bool isRightAvail, Bool isAboveAvail, Bool isBelowAvail, Bool isAboveLeftAvail, Bool isAboveRightAvail, Bool isCalculatePreDeblockSamples); … … 133 141 SAOStatData*** m_preDBFstatData; 134 142 Double m_saoDisabledRate[MAX_NUM_COMPONENT][MAX_TLAYER]; 143 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 144 Int m_lastIRAPPoc; 145 #endif 135 146 Int m_skipLinesR[MAX_NUM_COMPONENT][NUM_SAO_NEW_TYPES]; 136 147 Int m_skipLinesB[MAX_NUM_COMPONENT][NUM_SAO_NEW_TYPES]; -
trunk/source/Lib/TLibEncoder/TEncSbac.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncSbac.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncSearch.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 49 49 : m_encCABACTableIdx(I_SLICE) 50 50 { 51 m_apcPicYuvPred = NULL;52 m_apcPicYuvResi = NULL;53 54 m_pdRdPicLambda = NULL;55 m_pdRdPicQp = NULL;56 m_piRdPicQp = NULL;57 51 } 58 52 59 53 TEncSlice::~TEncSlice() 60 54 { 55 destroy(); 61 56 } 62 57 … … 64 59 { 65 60 // create prediction picture 66 if ( m_apcPicYuvPred == NULL ) 67 { 68 m_apcPicYuvPred = new TComPicYuv; 69 m_apcPicYuvPred->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true ); 70 } 61 m_picYuvPred.create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true ); 71 62 72 63 // create residual picture 73 if( m_apcPicYuvResi == NULL ) 74 { 75 m_apcPicYuvResi = new TComPicYuv; 76 m_apcPicYuvResi->create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true ); 77 } 64 m_picYuvResi.create( iWidth, iHeight, chromaFormat, iMaxCUWidth, iMaxCUHeight, uhTotalDepth, true ); 78 65 } 79 66 80 67 Void TEncSlice::destroy() 81 68 { 82 // destroy prediction picture 83 if ( m_apcPicYuvPred ) 84 { 85 m_apcPicYuvPred->destroy(); 86 delete m_apcPicYuvPred; 87 m_apcPicYuvPred = NULL; 88 } 89 90 // destroy residual picture 91 if ( m_apcPicYuvResi ) 92 { 93 m_apcPicYuvResi->destroy(); 94 delete m_apcPicYuvResi; 95 m_apcPicYuvResi = NULL; 96 } 69 m_picYuvPred.destroy(); 70 m_picYuvResi.destroy(); 97 71 98 72 // free lambda and QP arrays 99 if ( m_pdRdPicLambda ) 100 { 101 xFree( m_pdRdPicLambda ); 102 m_pdRdPicLambda = NULL; 103 } 104 if ( m_pdRdPicQp ) 105 { 106 xFree( m_pdRdPicQp ); 107 m_pdRdPicQp = NULL; 108 } 109 if ( m_piRdPicQp ) 110 { 111 xFree( m_piRdPicQp ); 112 m_piRdPicQp = NULL; 113 } 73 m_vdRdPicLambda.clear(); 74 m_vdRdPicQp.clear(); 75 m_viRdPicQp.clear(); 114 76 } 115 77 … … 133 95 134 96 // create lambda and QP arrays 135 m_ pdRdPicLambda = (Double*)xMalloc( Double,m_pcCfg->getDeltaQpRD() * 2 + 1 );136 m_ pdRdPicQp = (Double*)xMalloc( Double,m_pcCfg->getDeltaQpRD() * 2 + 1 );137 m_ piRdPicQp = (Int* )xMalloc( Int,m_pcCfg->getDeltaQpRD() * 2 + 1 );97 m_vdRdPicLambda.resize(m_pcCfg->getDeltaQpRD() * 2 + 1 ); 98 m_vdRdPicQp.resize( m_pcCfg->getDeltaQpRD() * 2 + 1 ); 99 m_viRdPicQp.resize( m_pcCfg->getDeltaQpRD() * 2 + 1 ); 138 100 #if KWU_RC_MADPRED_E0227 139 101 if(m_pcCfg->getUseRateCtrl()) … … 427 389 } 428 390 391 #if W0062_RECALCULATE_QP_TO_ALIGN_WITH_LAMBDA 392 Double lambdaRef = 0.57*pow(2.0, qp_temp/3.0); 393 // QP correction due to modified lambda 394 Double qpOffset = floor((3.0*log(dLambda/lambdaRef)/log(2.0)) +0.5); 395 dQP += qpOffset; 396 #endif 397 429 398 iQP = max( -rpcSlice->getSPS()->getQpBDOffset(CHANNEL_TYPE_LUMA), min( MAX_QP, (Int) floor( dQP + 0.5 ) ) ); 430 399 431 m_ pdRdPicLambda[iDQpIdx] = dLambda;432 m_ pdRdPicQp [iDQpIdx] = dQP;433 m_ piRdPicQp [iDQpIdx] = iQP;400 m_vdRdPicLambda[iDQpIdx] = dLambda; 401 m_vdRdPicQp [iDQpIdx] = dQP; 402 m_viRdPicQp [iDQpIdx] = iQP; 434 403 } 435 404 436 405 // obtain dQP = 0 case 437 dLambda = m_ pdRdPicLambda[0];438 dQP = m_ pdRdPicQp [0];439 iQP = m_ piRdPicQp [0];406 dLambda = m_vdRdPicLambda[0]; 407 dQP = m_vdRdPicQp [0]; 408 iQP = m_viRdPicQp [0]; 440 409 441 410 … … 446 415 #endif 447 416 const std::vector<Double> &intraLambdaModifiers=m_pcCfg->getIntraLambdaModifier(); 417 418 #if W0038_CQP_ADJ 419 if(rpcSlice->getPPS()->getSliceChromaQpFlag()) 420 { 421 const Bool bUseIntraOrPeriodicOffset = rpcSlice->getSliceType()==I_SLICE || (m_pcCfg->getSliceChromaOffsetQpPeriodicity()!=0 && (rpcSlice->getPOC()%m_pcCfg->getSliceChromaOffsetQpPeriodicity())==0); 422 Int cbQP = bUseIntraOrPeriodicOffset? m_pcCfg->getSliceChromaOffsetQpIntraOrPeriodic(false) : m_pcCfg->getGOPEntry(iGOPid).m_CbQPoffset; 423 Int crQP = bUseIntraOrPeriodicOffset? m_pcCfg->getSliceChromaOffsetQpIntraOrPeriodic(true) : m_pcCfg->getGOPEntry(iGOPid).m_CrQPoffset; 424 425 cbQP = Clip3( -12, 12, cbQP + rpcSlice->getPPS()->getQpOffset(COMPONENT_Cb) ) - rpcSlice->getPPS()->getQpOffset(COMPONENT_Cb); 426 crQP = Clip3( -12, 12, crQP + rpcSlice->getPPS()->getQpOffset(COMPONENT_Cr) ) - rpcSlice->getPPS()->getQpOffset(COMPONENT_Cr); 427 rpcSlice->setSliceChromaQpDelta(COMPONENT_Cb, Clip3( -12, 12, cbQP)); 428 assert(rpcSlice->getSliceChromaQpDelta(COMPONENT_Cb)+rpcSlice->getPPS()->getQpOffset(COMPONENT_Cb)<=12 && rpcSlice->getSliceChromaQpDelta(COMPONENT_Cb)+rpcSlice->getPPS()->getQpOffset(COMPONENT_Cb)>=-12); 429 rpcSlice->setSliceChromaQpDelta(COMPONENT_Cr, Clip3( -12, 12, crQP)); 430 assert(rpcSlice->getSliceChromaQpDelta(COMPONENT_Cr)+rpcSlice->getPPS()->getQpOffset(COMPONENT_Cr)<=12 && rpcSlice->getSliceChromaQpDelta(COMPONENT_Cr)+rpcSlice->getPPS()->getQpOffset(COMPONENT_Cr)>=-12); 431 } 432 else 433 { 434 rpcSlice->setSliceChromaQpDelta( COMPONENT_Cb, 0 ); 435 rpcSlice->setSliceChromaQpDelta( COMPONENT_Cr, 0 ); 436 } 437 #endif 448 438 449 439 Double lambdaModifier; … … 517 507 #endif 518 508 rpcSlice->setSliceQpDelta ( 0 ); 509 #if !W0038_CQP_ADJ 519 510 rpcSlice->setSliceChromaQpDelta( COMPONENT_Cb, 0 ); 520 511 rpcSlice->setSliceChromaQpDelta( COMPONENT_Cr, 0 ); 512 #endif 521 513 rpcSlice->setUseChromaQpAdj( rpcSlice->getPPS()->getPpsRangeExtension().getChromaQpOffsetListEnabledFlag() ); 522 514 #if NH_MV … … 575 567 rpcSlice->setTLayer( pcPic->getTLayer() ); 576 568 577 assert( m_apcPicYuvPred ); 578 assert( m_apcPicYuvResi ); 579 580 pcPic->setPicYuvPred( m_apcPicYuvPred ); 581 pcPic->setPicYuvResi( m_apcPicYuvResi ); 569 pcPic->setPicYuvPred( &m_picYuvPred ); 570 pcPic->setPicYuvResi( &m_picYuvResi ); 582 571 rpcSlice->setSliceMode ( m_pcCfg->getSliceMode() ); 583 572 rpcSlice->setSliceArgument ( m_pcCfg->getSliceArgument() ); … … 679 668 if (m_pcCfg->getGOPSize() > 1) 680 669 { 681 dFrameLambda = 0.68 * pow (2, (m_ piRdPicQp[0] - SHIFT_QP) / 3.0) * (pcSlice->isInterB()? 2 : 1);670 dFrameLambda = 0.68 * pow (2, (m_viRdPicQp[0] - SHIFT_QP) / 3.0) * (pcSlice->isInterB()? 2 : 1); 682 671 } 683 672 else 684 673 { 685 dFrameLambda = 0.68 * pow (2, (m_ piRdPicQp[0] - SHIFT_QP) / 3.0);674 dFrameLambda = 0.68 * pow (2, (m_viRdPicQp[0] - SHIFT_QP) / 3.0); 686 675 } 687 676 m_pcRdCost ->setFrameLambda(dFrameLambda); … … 690 679 for ( UInt uiQpIdx = 0; uiQpIdx < 2 * m_pcCfg->getDeltaQpRD() + 1; uiQpIdx++ ) 691 680 { 692 pcSlice ->setSliceQp ( m_ piRdPicQp [uiQpIdx] );681 pcSlice ->setSliceQp ( m_viRdPicQp [uiQpIdx] ); 693 682 #if ADAPTIVE_QP_SELECTION 694 pcSlice ->setSliceQpBase ( m_ piRdPicQp [uiQpIdx] );695 #endif 696 setUpLambda(pcSlice, m_ pdRdPicLambda[uiQpIdx], m_piRdPicQp [uiQpIdx]);683 pcSlice ->setSliceQpBase ( m_viRdPicQp [uiQpIdx] ); 684 #endif 685 setUpLambda(pcSlice, m_vdRdPicLambda[uiQpIdx], m_viRdPicQp [uiQpIdx]); 697 686 698 687 // try compress … … 730 719 731 720 // set best values 732 pcSlice ->setSliceQp ( m_ piRdPicQp [uiQpIdxBest] );721 pcSlice ->setSliceQp ( m_viRdPicQp [uiQpIdxBest] ); 733 722 #if ADAPTIVE_QP_SELECTION 734 pcSlice ->setSliceQpBase ( m_ piRdPicQp [uiQpIdxBest] );735 #endif 736 setUpLambda(pcSlice, m_ pdRdPicLambda[uiQpIdxBest], m_piRdPicQp [uiQpIdxBest]);723 pcSlice ->setSliceQpBase ( m_viRdPicQp [uiQpIdxBest] ); 724 #endif 725 setUpLambda(pcSlice, m_vdRdPicLambda[uiQpIdxBest], m_viRdPicQp [uiQpIdxBest]); 737 726 } 738 727 -
trunk/source/Lib/TLibEncoder/TEncSlice.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 68 68 // pictures 69 69 TComList<TComPic*>* m_pcListPic; ///< list of pictures 70 TComPicYuv * m_apcPicYuvPred;///< prediction picture buffer71 TComPicYuv * m_apcPicYuvResi;///< residual picture buffer70 TComPicYuv m_picYuvPred; ///< prediction picture buffer 71 TComPicYuv m_picYuvResi; ///< residual picture buffer 72 72 73 73 // processing units … … 95 95 #endif 96 96 Double m_dPicRdCost; ///< picture-level RD cost 97 Double* m_pdRdPicLambda; ///< array of lambda candidates98 Double* m_pdRdPicQp; ///< array of picture QP candidates (double-type for lambda)99 Int* m_piRdPicQp; ///< array of picture QP candidates (Int-type)97 std::vector<Double> m_vdRdPicLambda; ///< array of lambda candidates 98 std::vector<Double> m_vdRdPicQp; ///< array of picture QP candidates (double-type for lambda) 99 std::vector<Int> m_viRdPicQp; ///< array of picture QP candidates (Int-type) 100 100 TEncRateCtrl* m_pcRateCtrl; ///< Rate control manager 101 101 UInt m_uiSliceIdx; -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 144 144 g_uiMaxCUWidth, g_uiMaxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList, getLayerId() ); 145 145 #else 146 m_cRateCtrl.init( m_framesToBeEncoded, m_RCTargetBitrate, m_iFrameRate, m_iGOPSize, m_iSourceWidth, m_iSourceHeight,147 m_maxCUWidth, m_maxCUHeight,m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList );146 m_cRateCtrl.init( m_framesToBeEncoded, m_RCTargetBitrate, (Int)( (Double)m_iFrameRate/m_temporalSubsampleRatio + 0.5), m_iGOPSize, m_iSourceWidth, m_iSourceHeight, 147 m_maxCUWidth, m_maxCUHeight,m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList ); 148 148 #endif 149 149 } … … 951 951 } 952 952 953 if (getTemporalSubsampleRatio()>1) 954 { 955 UInt temporalSubsampleRatio = getTemporalSubsampleRatio(); 956 if ( Double(timingInfo->getNumUnitsInTick()) * temporalSubsampleRatio > std::numeric_limits<UInt>::max() ) 957 { 958 timingInfo->setTimeScale( timingInfo->getTimeScale() / temporalSubsampleRatio ); 959 } 960 else 961 { 962 timingInfo->setNumUnitsInTick( timingInfo->getNumUnitsInTick() * temporalSubsampleRatio ); 963 } 964 } 965 953 966 Bool rateCnt = ( bitRate > 0 ); 954 967 hrd->setNalHrdParametersPresentFlag( rateCnt ); … … 1135 1148 m_cPPS.setQpOffset(COMPONENT_Cb, m_chromaCbQpOffset ); 1136 1149 m_cPPS.setQpOffset(COMPONENT_Cr, m_chromaCrQpOffset ); 1150 #if W0038_CQP_ADJ 1151 Bool bChromaDeltaQPEnabled = false; 1152 { 1153 bChromaDeltaQPEnabled = ( m_sliceChromaQpOffsetIntraOrPeriodic[0] || m_sliceChromaQpOffsetIntraOrPeriodic[1] ); 1154 if( !bChromaDeltaQPEnabled ) 1155 { 1156 for( Int i=0; i<m_iGOPSize; i++ ) 1157 { 1158 if( m_GOPList[i].m_CbQPoffset || m_GOPList[i].m_CrQPoffset ) 1159 { 1160 bChromaDeltaQPEnabled = true; 1161 break; 1162 } 1163 } 1164 } 1165 } 1166 m_cPPS.setSliceChromaQpFlag(bChromaDeltaQPEnabled); 1167 #endif 1137 1168 1138 1169 m_cPPS.setEntropyCodingSyncEnabledFlag( m_entropyCodingSyncEnabledFlag ); -
trunk/source/Lib/TLibEncoder/TEncTop.h
r1321 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibEncoder/WeightPredAnalysis.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibExtractor/TExtrTop.cpp
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibExtractor/TExtrTop.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenFilter.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenFilter.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenImage.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenImage.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenImagePlane.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenImagePlane.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenInterpFilter.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenInterpFilter.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenModSetupStrParser.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenModel.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenModel.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenSingleModel.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenTop.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibRenderer/TRenTop.h
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibVideoIO/TVideoIOYuv.cpp
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibVideoIO/TVideoIOYuv.h
r1386 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/libmd5/MD5.h
r1313 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/libmd5/libmd5.h
r1179 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 *
Note: See TracChangeset for help on using the changeset viewer.