Changeset 442 in SHVCSoftware for trunk/source/Lib/TLibCommon
- Timestamp:
- 21 Oct 2013, 13:41:29 (12 years ago)
- Location:
- trunk
- Files:
-
- 25 edited
-
. (modified) (1 prop)
-
source (modified) (1 prop)
-
source/Lib/TLibCommon/CommonDef.h (modified) (1 diff)
-
source/Lib/TLibCommon/SEI.h (modified) (2 diffs)
-
source/Lib/TLibCommon/TComDataCU.cpp (modified) (15 diffs)
-
source/Lib/TLibCommon/TComDataCU.h (modified) (2 diffs)
-
source/Lib/TLibCommon/TComLoopFilter.cpp (modified) (1 diff)
-
source/Lib/TLibCommon/TComMv.h (modified) (2 diffs)
-
source/Lib/TLibCommon/TComPic.cpp (modified) (7 diffs)
-
source/Lib/TLibCommon/TComPic.h (modified) (4 diffs)
-
source/Lib/TLibCommon/TComPicSym.cpp (modified) (5 diffs)
-
source/Lib/TLibCommon/TComPicSym.h (modified) (3 diffs)
-
source/Lib/TLibCommon/TComPrediction.cpp (modified) (1 diff)
-
source/Lib/TLibCommon/TComPrediction.h (modified) (1 diff)
-
source/Lib/TLibCommon/TComRdCost.h (modified) (1 diff)
-
source/Lib/TLibCommon/TComRom.cpp (modified) (5 diffs)
-
source/Lib/TLibCommon/TComRom.h (modified) (3 diffs)
-
source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp (modified) (1 diff)
-
source/Lib/TLibCommon/TComSlice.cpp (modified) (57 diffs)
-
source/Lib/TLibCommon/TComSlice.h (modified) (29 diffs)
-
source/Lib/TLibCommon/TComTrQuant.cpp (modified) (6 diffs)
-
source/Lib/TLibCommon/TComTrQuant.h (modified) (1 diff)
-
source/Lib/TLibCommon/TComUpsampleFilter.cpp (modified) (10 diffs)
-
source/Lib/TLibCommon/TComWeightPrediction.h (modified) (1 diff)
-
source/Lib/TLibCommon/TypeDef.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-3.0-dev merged: 350-351,357-360 /branches/SHM-3.1-dev (added) merged: 354-356,361-403,405-441 /trunk merged: 352 reverse-merged: 312-314
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-3.0-dev/source merged: 357-360 /branches/SHM-3.1-dev/source (added) merged: 355-356,361-364,366-403,405,407-441 /trunk/source merged: 352 reverse-merged: 312-314
- Property svn:mergeinfo changed
-
trunk/source/Lib/TLibCommon/CommonDef.h
r352 r442 57 57 58 58 #if SVC_EXTENSION 59 #define NV_VERSION "3. 0.1" ///< Current software version60 #else 61 #define NV_VERSION "1 1.0" ///< Current software version59 #define NV_VERSION "3.1" ///< Current software version 60 #else 61 #define NV_VERSION "12.0" ///< Current software version 62 62 #endif 63 63 -
trunk/source/Lib/TLibCommon/SEI.h
r313 r442 75 75 LAYERS_PRESENT = 137, 76 76 #endif 77 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 78 INTER_LAYER_CONSTRAINED_TILE_SETS = 138 79 #endif 77 80 }; 78 81 … … 381 384 }; 382 385 386 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 387 class SEIInterLayerConstrainedTileSets : public SEI 388 { 389 public: 390 PayloadType payloadType() const { return INTER_LAYER_CONSTRAINED_TILE_SETS; } 391 392 SEIInterLayerConstrainedTileSets() {} 393 virtual ~SEIInterLayerConstrainedTileSets() {} 394 395 Bool m_ilAllTilesExactSampleValueMatchFlag; 396 Bool m_ilOneTilePerTileSetFlag; 397 UInt m_ilNumSetsInMessageMinus1; 398 Bool m_skippedTileSetPresentFlag; 399 UInt m_ilctsId[256]; 400 UInt m_ilNumTileRectsInSetMinus1[256]; 401 UInt m_ilTopLeftTileIndex[256][440]; 402 UInt m_ilBottomRightTileIndex[256][440]; 403 UInt m_ilcIdc[256]; 404 Bool m_ilExactSampleValueMatchFlag[256]; 405 UInt m_allTilesIlcIdc; 406 }; 407 #endif 408 409 383 410 typedef std::list<SEI*> SEIMessages; 384 411 -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r345 r442 1273 1273 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 1274 1274 1275 #if REPN_FORMAT_IN_VPS 1276 if( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getPicWidthInLumaSamples() ) 1277 #else 1275 1278 if( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) 1279 #endif 1276 1280 { 1277 1281 uiARPartUnitIdx = MAX_UINT; … … 1335 1339 UInt uiAbsZorderCUIdxLB = g_auiZscanToRaster[ m_uiAbsIdxInLCU ] + (m_puhHeight[0] / m_pcPic->getMinCUHeight() - 1)*m_pcPic->getNumPartInWidth(); 1336 1340 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 1337 1341 1342 #if REPN_FORMAT_IN_VPS 1343 if( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getPicHeightInLumaSamples() ) 1344 #else 1338 1345 if( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 1346 #endif 1339 1347 { 1340 1348 uiBLPartUnitIdx = MAX_UINT; … … 1384 1392 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 1385 1393 1394 #if REPN_FORMAT_IN_VPS 1395 if( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getPicHeightInLumaSamples()) 1396 #else 1386 1397 if( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples()) 1398 #endif 1387 1399 { 1388 1400 uiBLPartUnitIdx = MAX_UINT; … … 1432 1444 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 1433 1445 1446 #if REPN_FORMAT_IN_VPS 1447 if( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getPicWidthInLumaSamples() ) 1448 #else 1434 1449 if( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) 1450 #endif 1435 1451 { 1436 1452 uiARPartUnitIdx = MAX_UINT; … … 1703 1719 { 1704 1720 // check BL mode 1705 UInt uiCUAddrBase , uiAbsPartAddrBase;1721 UInt uiCUAddrBase = 0, uiAbsPartAddrBase = 0; 1706 1722 // the right reference layerIdc should be specified, currently it is set to m_layerId-1 1707 TComDataCU* pcTempCU = getBaseColCU(m_layerId - 1, uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase );1723 TComDataCU* pcTempCU = getBaseColCU(m_layerId - 1, uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase, 0 ); 1708 1724 1709 1725 if( pcTempCU->getPredictionMode( uiAbsPartAddrBase ) != MODE_INTRA ) … … 2684 2700 Int uiLCUIdx = -1; 2685 2701 2702 #if REPN_FORMAT_IN_VPS 2703 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getPicWidthInLumaSamples() ) // image boundary check 2704 { 2705 } 2706 else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getPicHeightInLumaSamples() ) 2707 { 2708 } 2709 #else 2686 2710 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) // image boundary check 2687 2711 { … … 2690 2714 { 2691 2715 } 2716 #endif 2692 2717 else 2693 2718 { … … 3020 3045 uiAbsPartIdx = g_auiZscanToRaster[uiPartIdxRB]; 3021 3046 Int uiLCUIdx = -1; 3047 #if REPN_FORMAT_IN_VPS 3048 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdx] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getPicWidthInLumaSamples() ) // image boundary check 3049 { 3050 } 3051 else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdx] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getPicHeightInLumaSamples() ) 3052 { 3053 } 3054 #else 3022 3055 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdx] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) // image boundary check 3023 3056 { … … 3026 3059 { 3027 3060 } 3061 #endif 3028 3062 else 3029 3063 { … … 3095 3129 Int iMvShift = 2; 3096 3130 Int iOffset = 8; 3131 #if REPN_FORMAT_IN_VPS 3132 Int iHorMax = ( m_pcSlice->getPicWidthInLumaSamples() + iOffset - m_uiCUPelX - 1 ) << iMvShift; 3133 #else 3097 3134 Int iHorMax = ( m_pcSlice->getSPS()->getPicWidthInLumaSamples() + iOffset - m_uiCUPelX - 1 ) << iMvShift; 3135 #endif 3098 3136 Int iHorMin = ( -(Int)g_uiMaxCUWidth - iOffset - (Int)m_uiCUPelX + 1 ) << iMvShift; 3099 3137 3138 #if REPN_FORMAT_IN_VPS 3139 Int iVerMax = ( m_pcSlice->getPicHeightInLumaSamples() + iOffset - m_uiCUPelY - 1 ) << iMvShift; 3140 #else 3100 3141 Int iVerMax = ( m_pcSlice->getSPS()->getPicHeightInLumaSamples() + iOffset - m_uiCUPelY - 1 ) << iMvShift; 3142 #endif 3101 3143 Int iVerMin = ( -(Int)g_uiMaxCUHeight - iOffset - (Int)m_uiCUPelY + 1 ) << iMvShift; 3102 3144 … … 3946 3988 } 3947 3989 3948 #if SVC_COL_BLK 3949 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase ) 3950 { 3951 #if 1 // it should provide identical resutls 3990 #if SVC_EXTENSION 3991 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping ) 3992 { 3952 3993 UInt uiPelX = getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiCuAbsPartIdx] ]; 3953 3994 UInt uiPelY = getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiCuAbsPartIdx] ]; 3954 3995 3955 return getBaseColCU( refLayerIdc, uiPelX, uiPelY, uiCUAddrBase, uiAbsPartIdxBase ); 3956 #else 3957 TComPic* cBaseColPic = m_pcSlice->getBaseColPic(); 3958 3959 #if SVC_UPSAMPLING 3960 Int widthBL = cBaseColPic->getPicYuvRec()->getWidth () - cBaseColPic->getPicYuvRec()->getPicCropLeftOffset() - cBaseColPic->getPicYuvRec()->getPicCropRightOffset(); 3961 Int heightBL = cBaseColPic->getPicYuvRec()->getHeight() - cBaseColPic->getPicYuvRec()->getPicCropTopOffset() - cBaseColPic->getPicYuvRec()->getPicCropBottomOffset(); 3962 3963 Int widthEL = m_pcPic->getPicYuvRec()->getWidth() - m_pcPic->getPicYuvRec()->getPicCropLeftOffset() - m_pcPic->getPicYuvRec()->getPicCropRightOffset(); 3964 Int heightEL = m_pcPic->getPicYuvRec()->getHeight() - m_pcPic->getPicYuvRec()->getPicCropTopOffset() - m_pcPic->getPicYuvRec()->getPicCropBottomOffset(); 3965 #else 3966 Int widthBL = cBaseColPic->getPicYuvRec()->getWidth(); 3967 Int heightBL = cBaseColPic->getPicYuvRec()->getHeight(); 3968 3969 Int widthEL = m_pcPic->getPicYuvRec()->getWidth(); 3970 Int heightEL = m_pcPic->getPicYuvRec()->getHeight(); 3971 #endif 3972 3973 if (widthBL == widthEL && heightEL == heightBL) 3974 { 3975 uiAbsPartIdxBase = uiCuAbsPartIdx + m_uiAbsIdxInLCU; 3976 uiCUAddrBase = m_uiCUAddr; 3977 } 3978 else 3979 { 3980 UInt uiMinUnitSize = m_pcPic->getMinCUWidth(); 3981 UInt uiRasterAddr = g_auiZscanToRaster[uiCuAbsPartIdx]; 3982 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 3983 3984 Int iEX = m_uiCUPelX + uiMinUnitSize*(uiRasterAddr%uiNumPartInCUWidth); 3985 Int iEY = m_uiCUPelY + uiMinUnitSize*(uiRasterAddr/uiNumPartInCUWidth); 3986 3987 Int iBX = (iEX*widthBL + widthEL/2)/widthEL; 3988 Int iBY = (iEY*heightBL+ heightEL/2)/heightEL; 3989 3990 uiCUAddrBase = (iBY/g_uiMaxCUHeight)*cBaseColPic->getFrameWidthInCU() + (iBX/g_uiMaxCUWidth); 3991 3992 assert(uiCUAddrBase < cBaseColPic->getNumCUsInFrame()); 3993 3994 UInt uiRasterAddrBase = (iBY - (iBY/g_uiMaxCUHeight)*g_uiMaxCUHeight)/uiMinUnitSize*cBaseColPic->getNumPartInWidth() 3995 + (iBX - (iBX/g_uiMaxCUWidth)*g_uiMaxCUWidth)/uiMinUnitSize; 3996 3997 uiAbsPartIdxBase = g_auiRasterToZscan[uiRasterAddrBase]; 3998 } 3999 4000 return cBaseColPic->getCU(uiCUAddrBase); 4001 #endif 4002 } 4003 4004 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase ) 3996 return getBaseColCU( refLayerIdc, uiPelX, uiPelY, uiCUAddrBase, uiAbsPartIdxBase, iMotionMapping ); 3997 } 3998 3999 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping ) 4005 4000 { 4006 4001 TComPic* cBaseColPic = m_pcSlice->getBaseColPic(refLayerIdc); 4007 4008 #if !SIMPLIFIED_MV_POS_SCALING4009 #if SVC_UPSAMPLING && !ILP_DECODED_PICTURE4010 const Window &confBL = cBaseColPic->getPicYuvRec()->getConformanceWindow();4011 const Window &confEL = m_pcPic->getPicYuvRec()->getConformanceWindow();4012 4013 Int widthBL = m_pcSlice->getBaseColPic()->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();4014 Int heightBL = m_pcSlice->getBaseColPic()->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();4015 4016 Int widthEL = m_pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();4017 Int heightEL = m_pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();4018 #else4019 Int widthBL = cBaseColPic->getPicYuvRec()->getWidth();4020 Int heightBL = cBaseColPic->getPicYuvRec()->getHeight();4021 4022 Int widthEL = m_pcPic->getPicYuvRec()->getWidth();4023 Int heightEL = m_pcPic->getPicYuvRec()->getHeight();4024 #endif4025 #endif4026 4002 4027 4003 uiPelX = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getWidth() - 1, uiPelX); … … 4030 4006 UInt uiMinUnitSize = m_pcPic->getMinCUWidth(); 4031 4007 4032 #if SIMPLIFIED_MV_POS_SCALING4033 4008 #if SCALED_REF_LAYER_OFFSETS 4034 4009 Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset(); … … 4040 4015 Int iBY = (uiPelY*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16; 4041 4016 #endif 4042 #else4043 Int iBX = (uiPelX*widthBL + widthEL/2)/widthEL;4044 Int iBY = (uiPelY*heightBL+ heightEL/2)/heightEL;4045 #endif4046 4017 4047 4018 #if N0139_POSITION_ROUNDING_OFFSET 4048 iBX += 4; 4049 iBY += 4; 4019 if( iMotionMapping == 1 ) 4020 { 4021 iBX += 4; 4022 iBY += 4; 4023 } 4050 4024 #endif 4051 4025 … … 4060 4034 } 4061 4035 4062 #if AVC_SYNTAX && !ILP_DECODED_PICTURE4063 #if !ILP_DECODED_PICTURE4064 const Window &confBL = cBaseColPic->getPicYuvRec()->getConformanceWindow();4065 const Window &confEL = m_pcPic->getPicYuvRec()->getConformanceWindow();4066 4067 Int widthBL = m_pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();4068 Int heightBL = m_pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();4069 #endif4070 if( iBX >= widthBL || iBY >= heightBL ) //outside of the reference layer cropped picture4071 {4072 return NULL;4073 }4074 #endif4075 4076 4036 uiCUAddrBase = (iBY/g_uiMaxCUHeight)*cBaseColPic->getFrameWidthInCU() + (iBX/g_uiMaxCUWidth); 4077 4037 … … 4090 4050 TComMvField cMvFieldBase; 4091 4051 TComMv cMv; 4092 #if SIMPLIFIED_MV_POS_SCALING 4052 4093 4053 cMv = rcMvFieldBase.getMv().scaleMv( g_mvScalingFactor[refLayerIdc][0], g_mvScalingFactor[refLayerIdc][1] ); 4094 #else4095 const Window &confBL = m_pcSlice->getBaseColPic()->getPicYuvRec()->getConformanceWindow();4096 const Window &confEL = m_pcPic->getPicYuvRec()->getConformanceWindow();4097 4098 Int widthBL = m_pcSlice->getBaseColPic()->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();4099 Int heightBL = m_pcSlice->getBaseColPic()->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();4100 4101 Int widthEL = m_pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();4102 Int heightEL = m_pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();4103 4104 Int iMvX = (rcMvFieldBase.getHor()*widthEL + (widthBL/2 -1) * (rcMvFieldBase.getHor() > 0 ? 1: -1) )/widthBL;4105 Int iMvY = (rcMvFieldBase.getVer()*heightEL + (heightBL/2 -1) * (rcMvFieldBase.getVer() > 0 ? 1: -1) )/heightBL;4106 4107 cMv.set(iMvX, iMvY);4108 #endif4109 4054 4110 4055 rcMvFieldEnhance.setMvField( cMv, rcMvFieldBase.getRefIdx() ); -
trunk/source/Lib/TLibCommon/TComDataCU.h
r345 r442 516 516 UInt& getTotalBins () { return m_uiTotalBins; } 517 517 518 #if REF_IDX_FRAMEWORK518 #if SVC_EXTENSION 519 519 #if FAST_INTRA_SHVC 520 520 Int reduceSetOfIntraModes ( UInt uiAbsPartIdx, Int* uiIntraDirPred, Int &fullSetOfModes ); … … 538 538 UInt getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra); 539 539 540 #if REF_IDX_FRAMEWORK 541 #if SVC_COL_BLK 542 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase ); 543 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase ); 540 #if SVC_EXTENSION 541 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping = 0 ); 542 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping = 0 ); 544 543 Void scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase ); 545 #endif546 544 #endif 547 545 }; -
trunk/source/Lib/TLibCommon/TComLoopFilter.cpp
r313 r442 180 180 UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsZorderIdx] ]; 181 181 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsZorderIdx] ]; 182 #if REPN_FORMAT_IN_VPS 183 if( ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) ) 184 #else 182 185 if( ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) ) 186 #endif 183 187 { 184 188 xDeblockCU( pcCU, uiAbsZorderIdx, uiDepth+1, Edge ); -
trunk/source/Lib/TLibCommon/TComMv.h
r313 r442 40 40 41 41 #include "CommonDef.h" 42 #include <cstdlib> 42 43 43 44 //! \ingroup TLibCommon … … 149 150 return TComMv( mvx, mvy ); 150 151 } 151 #if S IMPLIFIED_MV_POS_SCALING152 #if SVC_EXTENSION 152 153 const TComMv scaleMv( Int iScaleX, Int iScaleY ) const 153 154 { -
trunk/source/Lib/TLibCommon/TComPic.cpp
r313 r442 53 53 , m_bUsedByCurr (false) 54 54 , m_bIsLongTerm (false) 55 , m_bIsUsedAsLongTerm (false)56 55 , m_apcPicSym (NULL) 57 56 , m_pcPicYuvPred (NULL) … … 213 212 UInt maxNumSUInLCU = getNumPartInCU(); 214 213 UInt numLCUInPic = getNumCUsInFrame(); 214 #if REPN_FORMAT_IN_VPS 215 UInt picWidth = getSlice(0)->getPicWidthInLumaSamples(); 216 UInt picHeight = getSlice(0)->getPicHeightInLumaSamples(); 217 #else 215 218 UInt picWidth = getSlice(0)->getSPS()->getPicWidthInLumaSamples(); 216 219 UInt picHeight = getSlice(0)->getSPS()->getPicHeightInLumaSamples(); 220 #endif 217 221 Int numLCUsInPicWidth = getFrameWidthInCU(); 218 222 Int numLCUsInPicHeight= getFrameHeightInCU(); … … 524 528 } 525 529 526 #if REF_IDX_FRAMEWORK530 #if SVC_EXTENSION 527 531 Void copyOnetoOnePicture( // SVC_NONCOLL 528 532 Pel *in, … … 570 574 Void TComPic::copyUpsampledMvField(UInt refLayerIdc, TComPic* pcPicBase) 571 575 { 572 #if AVC_SYNTAX && !ILP_DECODED_PICTURE573 const Window &confBL = pcPicBase->getConformanceWindow();574 const Window &confEL = getPicYuvRec()->getConformanceWindow();575 576 Int widthBL = pcPicBase->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();577 Int heightBL = pcPicBase->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();578 579 Int widthEL = getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();580 Int heightEL = getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();581 #endif582 583 576 UInt numPartitions = 1<<(g_uiMaxCUDepth<<1); 584 577 UInt widthMinPU = g_uiMaxCUWidth/(1<<g_uiMaxCUDepth); … … 598 591 599 592 TComDataCU *pcColCU = 0; 600 pcColCU = pcCUDes->getBaseColCU(refLayerIdc, pelX + 8, pelY + 8, baseCUAddr, baseAbsPartIdx); 601 602 #if AVC_SYNTAX && !ILP_DECODED_PICTURE 603 Int xBL = ( (pelX + 8) * widthBL + widthEL/2 ) / widthEL; 604 Int yBL = ( (pelY + 8) * heightBL+ heightEL/2 ) / heightEL; 605 606 if( ( xBL < widthBL && yBL < heightBL ) && pcColCU && (pcColCU->getPredictionMode(baseAbsPartIdx) != MODE_NONE) && (pcColCU->getPredictionMode(baseAbsPartIdx) != MODE_INTRA) ) //base layer unit not skip and invalid mode 607 #else 593 pcColCU = pcCUDes->getBaseColCU(refLayerIdc, pelX + 8, pelY + 8, baseCUAddr, baseAbsPartIdx, 1); 594 608 595 if( pcColCU && (pcColCU->getPredictionMode(baseAbsPartIdx) != MODE_NONE) && (pcColCU->getPredictionMode(baseAbsPartIdx) != MODE_INTRA) ) //base layer unit not skip and invalid mode 609 #endif610 596 { 611 597 for(UInt refPicList = 0; refPicList < 2; refPicList++) //for each reference list … … 670 656 } 671 657 672 #if ILP_DECODED_PICTURE673 658 UInt width = this->getPicYuvRec()->getWidth(); 674 659 UInt height = this->getPicYuvRec()->getHeight(); 675 #else 676 const Window &conf = this->getPicYuvRec()->getConformanceWindow(); 677 UInt width = this->getPicYuvRec()->getWidth() - conf.getWindowLeftOffset() - conf.getWindowRightOffset(); 678 UInt height = this->getPicYuvRec()->getHeight() - conf.getWindowTopOffset() - conf.getWindowBottomOffset(); 679 #endif 660 680 661 UInt64 poc = (UInt64)this->getPOC(); 681 662 UInt partWidth = width / 4; … … 754 735 } 755 736 756 #if ILP_DECODED_PICTURE757 737 UInt width = this->getPicYuvRec()->getWidth(); 758 738 UInt height = this->getPicYuvRec()->getHeight(); 759 #else760 const Window &conf = this->getConformanceWindow();761 UInt width = this->getPicYuvRec()->getWidth() - conf.getWindowLeftOffset() - conf.getWindowRightOffset();762 UInt height = this->getPicYuvRec()->getHeight() - conf.getWindowTopOffset() - conf.getWindowBottomOffset();763 #endif764 739 765 740 UInt64 poc = (UInt64)this->getPOC(); -
trunk/source/Lib/TLibCommon/TComPic.h
r313 r442 66 66 Bool m_bUsedByCurr; // Used by current picture 67 67 Bool m_bIsLongTerm; // IS long term picture 68 Bool m_bIsUsedAsLongTerm; // long term picture is used as reference before69 68 TComPicSym* m_apcPicSym; // Symbol 70 69 … … 88 87 Window m_defaultDisplayWindow; 89 88 89 Bool m_isTop; 90 Bool m_isField; 91 90 92 std::vector<std::vector<TComDataCU*> > m_vSliceCUDataLink; 91 93 … … 194 196 std::vector<TComDataCU*>& getOneSliceCUDataForNDBFilter (Int sliceID) { return m_vSliceCUDataLink[sliceID];} 195 197 198 /* field coding parameters*/ 199 200 Void setTopField(bool b) {m_isTop = b;} 201 Bool isTopField() {return m_isTop;} 202 Void setField(bool b) {m_isField = b;} 203 Bool isField() {return m_isField;} 204 196 205 /** transfer ownership of seis to this picture */ 197 206 void setSEIs(SEIMessages& seis) { m_SEIs = seis; } … … 207 216 const SEIMessages& getSEIs() const { return m_SEIs; } 208 217 209 #if REF_IDX_FRAMEWORK218 #if SVC_EXTENSION 210 219 Void copyUpsampledPictureYuv(TComPicYuv* pcPicYuvIn, TComPicYuv* pcPicYuvOut); 211 #endif212 220 #if AVC_SYNTAX 213 221 Void readBLSyntax( fstream* filestream, UInt numBytes ); 214 222 #endif 223 #endif 215 224 #if SYNTAX_OUTPUT 216 225 Void wrireBLSyntax( fstream* filestream, UInt numBytes ); -
trunk/source/Lib/TLibCommon/TComPicSym.cpp
r313 r442 61 61 ,m_uiNumAllocatedSlice (0) 62 62 ,m_apcTComDataCU (NULL) 63 ,m_iTileBoundaryIndependenceIdr (0)64 63 ,m_iNumColumnsMinus1 (0) 65 64 ,m_iNumRowsMinus1(0) … … 116 115 m_puiCUOrderMap = new UInt[m_uiNumCUsInFrame+1]; 117 116 m_puiTileIdxMap = new UInt[m_uiNumCUsInFrame]; 117 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 118 m_piTileSetIdxMap = new Int[m_uiNumCUsInFrame]; 119 m_pucTileSetType = new UChar[m_uiNumCUsInFrame]; 120 m_pbSkippedTileSetFlag = new Bool[m_uiNumCUsInFrame]; 121 #endif 118 122 m_puiInverseCUOrderMap = new UInt[m_uiNumCUsInFrame+1]; 119 123 … … 147 151 m_apcTComDataCU = NULL; 148 152 149 #if AVC_BASE || REF_IDX_FRAMEWORK153 #if SVC_EXTENSION 150 154 if( m_apcTComTile ) 151 155 { … … 156 160 } 157 161 delete [] m_apcTComTile; 158 #if AVC_BASE || REF_IDX_FRAMEWORK162 #if SVC_EXTENSION 159 163 } 160 164 #endif … … 167 171 delete [] m_puiTileIdxMap; 168 172 m_puiTileIdxMap = NULL; 173 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 174 delete [] m_piTileSetIdxMap; 175 m_piTileSetIdxMap = NULL; 176 delete [] m_pucTileSetType; 177 m_pucTileSetType = NULL; 178 delete [] m_pbSkippedTileSetFlag; 179 m_pbSkippedTileSetFlag = NULL; 180 #endif 169 181 170 182 delete [] m_puiInverseCUOrderMap; -
trunk/source/Lib/TLibCommon/TComPicSym.h
r313 r442 100 100 TComDataCU** m_apcTComDataCU; ///< array of CU data 101 101 102 Int m_iTileBoundaryIndependenceIdr;103 102 Int m_iNumColumnsMinus1; 104 103 Int m_iNumRowsMinus1; … … 106 105 UInt* m_puiCUOrderMap; //the map of LCU raster scan address relative to LCU encoding order 107 106 UInt* m_puiTileIdxMap; //the map of the tile index relative to LCU raster scan address 107 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 108 Int* m_piTileSetIdxMap; //the map of the tile set index relative to LCU raster scan address 109 UChar* m_pucTileSetType; 110 Bool* m_pbSkippedTileSetFlag; 111 #endif 108 112 UInt* m_puiInverseCUOrderMap; 109 113 … … 144 148 UInt getCUOrderMap( Int encCUOrder ) { return *(m_puiCUOrderMap + (encCUOrder>=m_uiNumCUsInFrame ? m_uiNumCUsInFrame : encCUOrder)); } 145 149 UInt getTileIdxMap( Int i ) { return *(m_puiTileIdxMap + i); } 150 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 151 Void setTileSetIdxMap( Int i, Int tileSetIdx, UChar setType, Bool skipFlag ) 152 { 153 m_piTileSetIdxMap[i] = tileSetIdx; 154 m_pucTileSetType[i] = setType; 155 m_pbSkippedTileSetFlag[i] = skipFlag; 156 } 157 Int getTileSetIdxMap( Int i ) { return *(m_piTileSetIdxMap + i); } 158 UChar getTileSetType( Int i ) { return *(m_pucTileSetType + i); } 159 Bool getSkippedTileSetFlag( Int i ) { return *(m_pbSkippedTileSetFlag + i); } 160 #endif 146 161 Void setInverseCUOrderMap( Int cuAddr, Int encCUOrder ) { *(m_puiInverseCUOrderMap + cuAddr) = encCUOrder; } 147 162 UInt getInverseCUOrderMap( Int cuAddr ) { return *(m_puiInverseCUOrderMap + (cuAddr>=m_uiNumCUsInFrame ? m_uiNumCUsInFrame : cuAddr)); } -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r345 r442 696 696 Int k, l, bottomLeft, topRight; 697 697 Int horPred; 698 Int leftColumn[MAX_CU_SIZE ], topRow[MAX_CU_SIZE], bottomRow[MAX_CU_SIZE], rightColumn[MAX_CU_SIZE];698 Int leftColumn[MAX_CU_SIZE+1], topRow[MAX_CU_SIZE+1], bottomRow[MAX_CU_SIZE], rightColumn[MAX_CU_SIZE]; 699 699 UInt blkSize = width; 700 700 UInt offset2D = width; -
trunk/source/Lib/TLibCommon/TComPrediction.h
r345 r442 118 118 Int getPredicBufHeight() { return m_iYuvExtHeight; } 119 119 120 #if REF_IDX_FRAMEWORK120 #if SVC_EXTENSION 121 121 #if SVC_UPSAMPLING 122 122 #if SCALED_REF_LAYER_OFFSETS -
trunk/source/Lib/TLibCommon/TComRdCost.h
r313 r442 116 116 private: 117 117 // for distortion 118 Int m_iBlkWidth;119 Int m_iBlkHeight;120 118 121 119 #if AMP_SAD -
trunk/source/Lib/TLibCommon/TComRom.cpp
r313 r442 55 55 ::memset( g_aucConvertToBit, -1, sizeof( g_aucConvertToBit ) ); 56 56 c=0; 57 for ( i=4; i< MAX_CU_SIZE; i*=2 )57 for ( i=4; i<=MAX_CU_SIZE; i*=2 ) 58 58 { 59 59 g_aucConvertToBit[ i ] = c; 60 60 c++; 61 61 } 62 g_aucConvertToBit[ i ] = c;63 62 64 63 c=2; … … 278 277 279 278 #if FAST_UDI_USE_MPM 280 const UChar g_aucIntraModeNumFast[ 7] =279 const UChar g_aucIntraModeNumFast[MAX_CU_DEPTH] = 281 280 { 282 281 3, // 2x2 … … 285 284 3, // 16x16 286 285 3, // 32x32 287 3, // 64x64 288 3 // 128x128 286 3 // 64x64 289 287 }; 290 288 #else // FAST_UDI_USE_MPM 291 const UChar g_aucIntraModeNumFast[ 7] =289 const UChar g_aucIntraModeNumFast[MAX_CU_DEPTH] = 292 290 { 293 291 3, // 2x2 … … 296 294 4, // 16x16 33 297 295 4, // 32x32 33 298 5, // 64x64 33 299 4 // 128x128 33 296 5 // 64x64 33 300 297 }; 301 298 #endif // FAST_UDI_USE_MPM … … 523 520 Int g_eTTable[4] = {0,3,1,2}; 524 521 525 #if S IMPLIFIED_MV_POS_SCALING522 #if SVC_EXTENSION 526 523 Int g_mvScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 527 524 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 525 526 #if IL_SL_SIGNALLING_N0371 527 Int ref_scalingListDC [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; 528 Int ref_scalingListCoef [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][MAX_MATRIX_COEF_NUM]; 529 Int activeRefPPSId [MAX_LAYERS]; 530 Int activeRefSPSId [MAX_LAYERS]; 531 #endif 528 532 #endif 529 533 -
trunk/source/Lib/TLibCommon/TComRom.h
r313 r442 51 51 // ==================================================================================================================== 52 52 53 #define MAX_CU_DEPTH 7// log2(LCUSize)53 #define MAX_CU_DEPTH 6 // log2(LCUSize) 54 54 #define MAX_CU_SIZE (1<<(MAX_CU_DEPTH)) // maximum allowable size of CU 55 55 #define MIN_PU_SIZE 4 … … 131 131 // ==================================================================================================================== 132 132 133 extern const UChar g_aucIntraModeNumFast[ 7];133 extern const UChar g_aucIntraModeNumFast[ MAX_CU_DEPTH ]; 134 134 135 135 #if FAST_INTRA_SHVC … … 279 279 extern Int g_eTTable[4]; 280 280 281 #if S IMPLIFIED_MV_POS_SCALING281 #if SVC_EXTENSION 282 282 extern Int g_mvScalingFactor [MAX_LAYERS][2]; 283 283 extern Int g_posScalingFactor [MAX_LAYERS][2]; 284 285 #if IL_SL_SIGNALLING_N0371 286 extern Int ref_scalingListDC [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; 287 extern Int ref_scalingListCoef [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][MAX_MATRIX_COEF_NUM]; 288 extern Int activeRefPPSId [MAX_LAYERS]; 289 extern Int activeRefSPSId [MAX_LAYERS]; 290 #endif 284 291 #endif 285 292 -
trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
r313 r442 1414 1414 UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsZorderIdx] ]; 1415 1415 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsZorderIdx] ]; 1416 #if REPN_FORMAT_IN_VPS 1417 if( ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) ) 1418 #else 1416 1419 if( ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) ) 1420 #endif 1417 1421 xPCMCURestoration( pcCU, uiAbsZorderIdx, uiDepth+1 ); 1418 1422 } -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r349 r442 46 46 47 47 #if SVC_EXTENSION 48 ParameterSetMap<TComVPS> ParameterSetManager::m_vpsMap(MAX_NUM_VPS); 49 Int ParameterSetManager::m_activeVPSId = -1; 48 ParameterSetMap<TComVPS> ParameterSetManager::m_vpsMap(MAX_NUM_VPS); 49 Int ParameterSetManager::m_activeVPSId = -1; 50 #if IL_SL_SIGNALLING_N0371 51 TComSPS* TComSPS::m_pcSPS[MAX_LAYERS]; 52 TComPPS* TComPPS::m_pcPPS[MAX_LAYERS]; 53 #endif 50 54 #endif 51 55 … … 71 75 , m_iDepth ( 0 ) 72 76 , m_bRefenced ( false ) 77 #if POC_RESET_FLAG 78 , m_bPocResetFlag ( false ) 79 #endif 73 80 #if SH_DISCARDABLE_FLAG 74 81 , m_bDiscardableFlag ( false ) … … 116 123 #if SVC_EXTENSION 117 124 memset( m_pcBaseColPic, 0, sizeof( m_pcBaseColPic ) ); 118 #if REF_IDX_FRAMEWORK119 125 #if JCTVC_M0458_INTERLAYER_RPS_SIG 120 126 m_activeNumILRRefIdx = 0; … … 133 139 #endif 134 140 #endif 135 #endif136 141 137 142 initEqualRef(); … … 168 173 #if SVC_EXTENSION 169 174 m_layerId = layerId; 170 #endif171 m_aiNumRefIdx[0] = 0;172 m_aiNumRefIdx[1] = 0;173 #if REF_IDX_FRAMEWORK174 175 #if JCTVC_M0458_INTERLAYER_RPS_SIG 175 176 m_activeNumILRRefIdx = 0; … … 177 178 #else 178 179 m_numILRRefIdx = 0; 179 #endif 180 #endif 180 181 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG 181 182 m_numSamplePredRefLayers = 0; … … 183 184 #endif 184 185 #endif 186 m_aiNumRefIdx[0] = 0; 187 m_aiNumRefIdx[1] = 0; 188 185 189 m_colFromL0Flag = 1; 186 190 … … 273 277 pcPic = *(iterPic); 274 278 } 279 #if POC_RESET_FLAG 280 assert( pcPic->getSlice(0)->isReferenced() ); 281 #endif 275 282 return pcPic; 276 283 } … … 286 293 if (!pocHasMsb) 287 294 { 288 poc = poc % pocCycle;295 poc = poc & (pocCycle - 1); 289 296 } 290 297 … … 297 304 if (!pocHasMsb) 298 305 { 299 picPoc = picPoc % pocCycle;306 picPoc = picPoc & (pocCycle - 1); 300 307 } 301 308 … … 384 391 Int i; 385 392 386 #if REF_IDX_FRAMEWORK393 #if SVC_EXTENSION 387 394 if( m_layerId == 0 || ( m_layerId > 0 && ( m_activeNumILRRefIdx == 0 || !((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && (getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA)) ) ) ) 388 395 { … … 439 446 pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i)); 440 447 } 441 #if REF_IDX_FRAMEWORK442 } 443 #endif 444 445 #if REF_IDX_FRAMEWORK448 #if SVC_EXTENSION 449 } 450 #endif 451 452 #if SVC_EXTENSION 446 453 for( i = 0; i < m_activeNumILRRefIdx; i++ ) 447 454 { … … 450 457 451 458 #if ILR_RESTR 452 Int max SubLayerForILPPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxSublayerForIlpPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()) : 0;453 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 && ( ( (Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<= max SubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) )459 Int maxTidIlRefPicsPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()) : 0; 460 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 && ( ( (Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<= maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) ) 454 461 #else //#if ILR_RESTR 455 462 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 ) … … 477 484 TComPic* rpsCurrList0[MAX_NUM_REF+1]; 478 485 TComPic* rpsCurrList1[MAX_NUM_REF+1]; 479 #if REF_IDX_FRAMEWORK486 #if SVC_EXTENSION 480 487 #if ILR_RESTR 481 488 Int numInterLayerRPSPics = 0; … … 488 495 for( i=0; i < m_pcVPS->getNumDirectRefLayers( m_layerId ); i++ ) 489 496 { 490 Int max SubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[i]->getSlice(0)->getLayerId());491 if( ((Int)(ilpPic[i]->getSlice(0)->getTLayer())<= max SubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[i]->getSlice(0)->getRapPicFlag() ) )497 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[i]->getSlice(0)->getLayerId()); 498 if( ((Int)(ilpPic[i]->getSlice(0)->getTLayer())<= maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[i]->getSlice(0)->getRapPicFlag() ) ) 492 499 { 493 500 numInterLayerRPSPics++; … … 499 506 m_activeNumILRRefIdx = numInterLayerRPSPics; 500 507 } 501 #if MAX_ONE_RESAMPLING_DIRECT_LAYERS && SIMPLIFIED_MV_POS_SCALING 508 #if MAX_ONE_RESAMPLING_DIRECT_LAYERS 509 #if SCALABILITY_MASK_E0104 510 if( m_pcVPS->getScalabilityMask(2) ) 511 #else 502 512 if( m_pcVPS->getScalabilityMask(1) ) 513 #endif 503 514 { 504 515 Int numResampler = 0; 516 #if MOTION_RESAMPLING_CONSTRAINT 517 Int numMotionResamplers = 0; 518 Int refResamplingLayer[MAX_LAYERS]; 519 memset( refResamplingLayer, 0, sizeof( refResamplingLayer ) ); 520 #endif 505 521 const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]); 506 522 Int scalingOffset = ((scalEL.getWindowLeftOffset() == 0 ) && … … 513 529 { 514 530 UInt refLayerIdc = m_interLayerPredLayerIdc[i]; 515 if(!( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) && (scalingOffset)) // ratio 1x531 if(!( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) || (!scalingOffset)) // ratio 1x 516 532 { 533 #if MOTION_RESAMPLING_CONSTRAINT 534 UInt predType = m_pcVPS->getDirectDependencyType( m_layerId, m_pcVPS->getRefLayerId( m_layerId, refLayerIdc ) ) + 1; 535 536 if( predType & 0x1 ) 537 { 538 numResampler++; 539 refResamplingLayer[i] = refLayerIdc + 1; 540 } 541 542 if( predType & 0x2 ) 543 { 544 numMotionResamplers++; 545 refResamplingLayer[i] -= refLayerIdc + 1; 546 } 547 #else 517 548 numResampler++; 549 #endif 518 550 } 519 551 } 520 521 //Bitstream constraint for SHVC: The picture resampling process as specified in subclause G.8.1.4.1 shall not be invoked more than once for decoding of each particular picture. 552 553 // When both picture sample values and picture motion field resampling processes are invoked for decoding of a particular picture, they shall be applied to the same reference layer picture. 554 if( m_activeNumILRRefIdx > 1 && numResampler > 0 ) 555 { 556 for( i=0; i < m_activeNumILRRefIdx; i++ ) 557 { 558 assert( refResamplingLayer[i] >= 0 && "Motion and sample inter-layer prediction shall be from the same layer" ); 559 } 560 } 561 562 // Bitstream constraint for SHVC: The picture resampling process as specified in subclause G.8.1.4.1 shall not be invoked more than once for decoding of each particular picture. 522 563 assert(numResampler <= 1); 564 #if MOTION_RESAMPLING_CONSTRAINT 565 assert( numMotionResamplers <= 1 && "Up to 1 motion resampling is allowed" ); 566 #endif 523 567 } 524 568 #endif … … 584 628 rpsCurrList0[cIdx] = RefPicSetStCurr0[i]; 585 629 } 630 #if SVC_EXTENSION 586 631 #if RPL_INIT_N0316_N0082 587 #if REF_IDX_FRAMEWORK588 632 if( m_layerId > 0 ) 589 633 { … … 596 640 Int refLayerIdc = m_interLayerPredLayerIdc[i]; 597 641 #if ILR_RESTR 598 Int max SubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());599 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=max SubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )642 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()); 643 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) 600 644 #endif 601 645 rpsCurrList0[cIdx] = ilpPic[refLayerIdc]; … … 613 657 } 614 658 #if !RPL_INIT_N0316_N0082 615 #if REF_IDX_FRAMEWORK659 #if SVC_EXTENSION 616 660 if( m_layerId > 0 ) 617 661 { … … 624 668 Int refLayerIdc = m_interLayerPredLayerIdc[i]; 625 669 #if ILR_RESTR 626 Int max SubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());627 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=max SubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )670 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()); 671 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) 628 672 #endif 629 673 rpsCurrList0[cIdx] = ilpPic[refLayerIdc]; … … 650 694 } 651 695 652 #if REF_IDX_FRAMEWORK696 #if SVC_EXTENSION 653 697 if( m_layerId > 0 ) 654 698 { … … 661 705 Int refLayerIdc = m_interLayerPredLayerIdc[i]; 662 706 #if ILR_RESTR 663 Int max SubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId());664 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=max SubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) )707 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()); 708 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) 665 709 #endif 666 710 rpsCurrList1[cIdx] = ilpPic[refLayerIdc]; … … 680 724 m_apcRefPicList[0][rIdx] = rpsCurrList0[ cIdx ]; 681 725 #if RPL_INIT_N0316_N0082 682 m_bIsUsedAsLongTerm[0][rIdx] = ( cIdx >= NumPocStCurr0 && cIdx < NumPocStCurr0 + m_activeNumILRRefIdx ) ;726 m_bIsUsedAsLongTerm[0][rIdx] = ( cIdx >= NumPocStCurr0 && cIdx < NumPocStCurr0 + m_activeNumILRRefIdx ) || ( cIdx >= NumPocStCurr0 + NumPocStCurr1 + m_activeNumILRRefIdx ); 683 727 #else 684 728 m_bIsUsedAsLongTerm[0][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 ); … … 702 746 } 703 747 704 #if REF_IDX_FRAMEWORK748 #if SVC_EXTENSION 705 749 Void TComSlice::setRefPicListModificationSvc() 706 750 { … … 721 765 #endif 722 766 767 #if N0147_IRAP_ALIGN_FLAG 768 assert(m_aiNumRefIdx[REF_PIC_LIST_0] > 0); 769 assert(m_aiNumRefIdx[REF_PIC_LIST_1] > 0); 770 #else 723 771 assert(m_aiNumRefIdx[REF_PIC_LIST_0] > 1); 724 772 assert(m_aiNumRefIdx[REF_PIC_LIST_1] > 1); 773 #endif 725 774 726 775 //set L0 inter-layer reference picture modification … … 729 778 #else 730 779 Bool hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == numberOfRpsCurrTempList) ? false : true; 780 #endif 781 #if N0147_IRAP_ALIGN_FLAG 782 hasModification = hasModification && ( m_aiNumRefIdx[REF_PIC_LIST_0] > 1 ); 731 783 #endif 732 784 #if FINAL_RPL_CHANGE_N0082 … … 758 810 #if RPL_INIT_N0316_N0082 759 811 if((numberOfPocBeforeCurr) >= m_aiNumRefIdx[REF_PIC_LIST_0]) 812 { 760 813 refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr); 814 } 761 815 else 762 816 { 763 817 refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr); 764 818 for (Int j = numberOfPocBeforeCurr; j < (m_aiNumRefIdx[REF_PIC_LIST_0] - i); j++) 819 { 765 820 refPicListModification->setRefPicSetIdxL0(j, j + m_activeNumILRRefIdx); 821 } 766 822 } 767 823 #else … … 774 830 //set L1 inter-layer reference picture modification 775 831 hasModification = (m_aiNumRefIdx[REF_PIC_LIST_1] == numberOfRpsCurrTempList) ? false : true; 832 #if N0147_IRAP_ALIGN_FLAG 833 hasModification = hasModification && ( m_aiNumRefIdx[REF_PIC_LIST_1] > 1 ); 834 #endif 835 776 836 refPicListModification->setRefPicListModificationFlagL1(hasModification); 777 837 if(hasModification) … … 828 888 Int numRpsCurrTempList = 0; 829 889 830 #if REF_IDX_FRAMEWORK890 #if SVC_EXTENSION 831 891 if( m_eSliceType == I_SLICE || ( m_pcSPS->getLayerId() && 832 892 (m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && … … 836 896 #endif 837 897 { 838 #if REF_IDX_FRAMEWORK898 #if SVC_EXTENSION 839 899 #if JCTVC_M0458_INTERLAYER_RPS_SIG 840 900 return m_activeNumILRRefIdx; … … 853 913 } 854 914 } 855 #if REF_IDX_FRAMEWORK915 #if SVC_EXTENSION 856 916 if( m_layerId > 0 ) 857 917 { … … 907 967 } 908 968 909 Void TComSlice::checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, Bool& prevRAPisBLA, TComList<TComPic *>& rcListPic)969 Void TComSlice::checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic) 910 970 { 911 971 for(Int i = 0; i < pReferencePictureSet->getNumberOfNegativePictures()+pReferencePictureSet->getNumberOfPositivePictures(); i++) … … 933 993 { 934 994 pocCRA = getPOC(); 935 prevRAPisBLA = false;995 associatedIRAPType = getNalUnitType(); 936 996 } 937 997 else if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // CRA picture found 938 998 { 939 999 pocCRA = getPOC(); 940 prevRAPisBLA = false;1000 associatedIRAPType = getNalUnitType(); 941 1001 } 942 1002 else if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP … … 945 1005 { 946 1006 pocCRA = getPOC(); 947 prevRAPisBLA = true;1007 associatedIRAPType = getNalUnitType(); 948 1008 } 949 1009 } … … 970 1030 { 971 1031 TComPic* rpcPic; 1032 setAssociatedIRAPPOC(pocCRA); 972 1033 Int pocCurr = getPOC(); 973 1034 … … 1076 1137 m_interLayerPredEnabledFlag = pSrc->m_interLayerPredEnabledFlag; 1077 1138 memcpy( m_interLayerPredLayerIdc, pSrc->m_interLayerPredLayerIdc, sizeof( m_interLayerPredLayerIdc ) ); 1078 #elif REF_IDX_FRAMEWORK1079 m_numILRRefIdx = pSrc->m_numILRRefIdx;1080 1139 #endif 1081 1140 #endif … … 1138 1197 } 1139 1198 1140 Int TComSlice::m_prev POC = 0;1199 Int TComSlice::m_prevTid0POC = 0; 1141 1200 1142 1201 /** Function for setting the slice's temporal layer ID and corresponding temporal_layer_switching_point_flag. … … 1193 1252 } 1194 1253 1254 1255 Void TComSlice::checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic) 1256 { 1257 TComPic* rpcPic; 1258 1259 Int nalUnitType = this->getNalUnitType(); 1260 1261 // When a picture is a leading picture, it shall be a RADL or RASL picture. 1262 if(this->getAssociatedIRAPPOC() > this->getPOC()) 1263 { 1264 // Do not check IRAP pictures since they may get a POC lower than their associated IRAP 1265 if(nalUnitType < NAL_UNIT_CODED_SLICE_BLA_W_LP || 1266 nalUnitType > NAL_UNIT_RESERVED_IRAP_VCL23) 1267 { 1268 assert(nalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || 1269 nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R || 1270 nalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || 1271 nalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); 1272 } 1273 } 1274 1275 // When a picture is a trailing picture, it shall not be a RADL or RASL picture. 1276 if(this->getAssociatedIRAPPOC() < this->getPOC()) 1277 { 1278 assert(nalUnitType != NAL_UNIT_CODED_SLICE_RASL_N && 1279 nalUnitType != NAL_UNIT_CODED_SLICE_RASL_R && 1280 nalUnitType != NAL_UNIT_CODED_SLICE_RADL_N && 1281 nalUnitType != NAL_UNIT_CODED_SLICE_RADL_R); 1282 } 1283 1284 // No RASL pictures shall be present in the bitstream that are associated 1285 // with a BLA picture having nal_unit_type equal to BLA_W_RADL or BLA_N_LP. 1286 if(nalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || 1287 nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R) 1288 { 1289 assert(this->getAssociatedIRAPType() != NAL_UNIT_CODED_SLICE_BLA_W_RADL && 1290 this->getAssociatedIRAPType() != NAL_UNIT_CODED_SLICE_BLA_N_LP); 1291 } 1292 1293 // No RASL pictures shall be present in the bitstream that are associated with 1294 // an IDR picture. 1295 if(nalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || 1296 nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R) 1297 { 1298 assert(this->getAssociatedIRAPType() != NAL_UNIT_CODED_SLICE_IDR_N_LP && 1299 this->getAssociatedIRAPType() != NAL_UNIT_CODED_SLICE_IDR_W_RADL); 1300 } 1301 1302 // No RADL pictures shall be present in the bitstream that are associated with 1303 // a BLA picture having nal_unit_type equal to BLA_N_LP or that are associated 1304 // with an IDR picture having nal_unit_type equal to IDR_N_LP. 1305 if(nalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || 1306 nalUnitType == NAL_UNIT_CODED_SLICE_RADL_R) 1307 { 1308 assert(this->getAssociatedIRAPType() != NAL_UNIT_CODED_SLICE_BLA_N_LP && 1309 this->getAssociatedIRAPType() != NAL_UNIT_CODED_SLICE_IDR_N_LP); 1310 } 1311 1312 // loop through all pictures in the reference picture buffer 1313 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); 1314 while ( iterPic != rcListPic.end()) 1315 { 1316 rpcPic = *(iterPic++); 1317 if (rpcPic->getPOC() == this->getPOC()) 1318 { 1319 continue; 1320 } 1321 1322 // Any picture that has PicOutputFlag equal to 1 that precedes an IRAP picture 1323 // in decoding order shall precede the IRAP picture in output order. 1324 // (Note that any picture following in output order would be present in the DPB) 1325 if(rpcPic->getSlice(0)->getPicOutputFlag() == 1) 1326 { 1327 if(nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP || 1328 nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP || 1329 nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL || 1330 nalUnitType == NAL_UNIT_CODED_SLICE_CRA || 1331 nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP || 1332 nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL) 1333 { 1334 assert(rpcPic->getPOC() < this->getPOC()); 1335 } 1336 } 1337 1338 // Any picture that has PicOutputFlag equal to 1 that precedes an IRAP picture 1339 // in decoding order shall precede any RADL picture associated with the IRAP 1340 // picture in output order. 1341 if(rpcPic->getSlice(0)->getPicOutputFlag() == 1) 1342 { 1343 if((nalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || 1344 nalUnitType == NAL_UNIT_CODED_SLICE_RADL_R)) 1345 { 1346 // rpcPic precedes the IRAP in decoding order 1347 if(this->getAssociatedIRAPPOC() > rpcPic->getSlice(0)->getAssociatedIRAPPOC()) 1348 { 1349 // rpcPic must not be the IRAP picture 1350 if(this->getAssociatedIRAPPOC() != rpcPic->getPOC()) 1351 { 1352 assert(rpcPic->getPOC() < this->getPOC()); 1353 } 1354 } 1355 } 1356 } 1357 1358 // When a picture is a leading picture, it shall precede, in decoding order, 1359 // all trailing pictures that are associated with the same IRAP picture. 1360 if(nalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || 1361 nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R || 1362 nalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || 1363 nalUnitType == NAL_UNIT_CODED_SLICE_RADL_R) 1364 { 1365 if(rpcPic->getSlice(0)->getAssociatedIRAPPOC() == this->getAssociatedIRAPPOC()) 1366 { 1367 // rpcPic is a picture that preceded the leading in decoding order since it exist in the DPB 1368 // rpcPic would violate the constraint if it was a trailing picture 1369 assert(rpcPic->getPOC() <= this->getAssociatedIRAPPOC()); 1370 } 1371 } 1372 1373 // Any RASL picture associated with a CRA or BLA picture shall precede any 1374 // RADL picture associated with the CRA or BLA picture in output order 1375 if(nalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || 1376 nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R) 1377 { 1378 if((this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_BLA_N_LP || 1379 this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_BLA_W_LP || 1380 this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL || 1381 this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_CRA) && 1382 this->getAssociatedIRAPPOC() == rpcPic->getSlice(0)->getAssociatedIRAPPOC()) 1383 { 1384 if(rpcPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N || 1385 rpcPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_R) 1386 { 1387 assert(rpcPic->getPOC() > this->getPOC()); 1388 } 1389 } 1390 } 1391 1392 // Any RASL picture associated with a CRA picture shall follow, in output 1393 // order, any IRAP picture that precedes the CRA picture in decoding order. 1394 if(nalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || 1395 nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R) 1396 { 1397 if(this->getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_CRA) 1398 { 1399 if(rpcPic->getSlice(0)->getPOC() < this->getAssociatedIRAPPOC() && 1400 (rpcPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP || 1401 rpcPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP || 1402 rpcPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL || 1403 rpcPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || 1404 rpcPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || 1405 rpcPic->getSlice(0)->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA)) 1406 { 1407 assert(this->getPOC() > rpcPic->getSlice(0)->getPOC()); 1408 } 1409 } 1410 } 1411 } 1412 } 1413 1195 1414 /** Function for applying picture marking based on the Reference Picture Set in pReferencePictureSet. 1196 1415 */ … … 1199 1418 TComPic* rpcPic; 1200 1419 Int i, isReference; 1420 1421 checkLeadingPictureRestrictions(rcListPic); 1201 1422 1202 1423 // loop through all pictures in the reference picture buffer … … 1235 1456 else 1236 1457 { 1237 if(rpcPic->getIsLongTerm() && (rpcPic->getPicSym()->getSlice(0)->getPOC()%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) == pReferencePictureSet->getPOC(i)%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) 1458 Int pocCycle = 1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC(); 1459 Int curPoc = rpcPic->getPicSym()->getSlice(0)->getPOC() & (pocCycle-1); 1460 Int refPoc = pReferencePictureSet->getPOC(i) & (pocCycle-1); 1461 if(rpcPic->getIsLongTerm() && curPoc == refPoc) 1238 1462 { 1239 1463 isReference = 1; … … 1295 1519 else 1296 1520 { 1297 if(rpcPic->getIsLongTerm() && (rpcPic->getPicSym()->getSlice(0)->getPOC()%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) == pReferencePictureSet->getPOC(i)%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC()) && rpcPic->getSlice(0)->isReferenced()) 1521 Int pocCycle = 1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC(); 1522 Int curPoc = rpcPic->getPicSym()->getSlice(0)->getPOC() & (pocCycle-1); 1523 Int refPoc = pReferencePictureSet->getPOC(i) & (pocCycle-1); 1524 if(rpcPic->getIsLongTerm() && curPoc == refPoc && rpcPic->getSlice(0)->isReferenced()) 1298 1525 { 1299 1526 isAvailable = 1; … … 1314 1541 if (!pReferencePictureSet->getCheckLTMSBPresent(i)) 1315 1542 { 1316 curPoc = curPoc % pocCycle;1317 refPoc = refPoc % pocCycle;1543 curPoc = curPoc & (pocCycle - 1); 1544 refPoc = refPoc & (pocCycle - 1); 1318 1545 } 1319 1546 … … 1589 1816 } 1590 1817 1818 #if REPN_FORMAT_IN_VPS 1819 UInt TComSlice::getPicWidthInLumaSamples() 1820 { 1821 TComSPS *sps = getSPS(); 1822 TComVPS *vps = getVPS(); 1823 UInt retVal, layerId = getLayerId(); 1824 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 1825 { 1826 retVal = sps->getPicWidthInLumaSamples(); 1827 } 1828 else 1829 { 1830 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getPicWidthVpsInLumaSamples(); 1831 } 1832 return retVal; 1833 } 1834 UInt TComSlice::getPicHeightInLumaSamples() 1835 { 1836 TComSPS *sps = getSPS(); 1837 TComVPS *vps = getVPS(); 1838 UInt retVal, layerId = getLayerId(); 1839 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 1840 { 1841 retVal = sps->getPicHeightInLumaSamples(); 1842 } 1843 else 1844 { 1845 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getPicHeightVpsInLumaSamples(); 1846 } 1847 return retVal; 1848 } 1849 UInt TComSlice::getChromaFormatIdc() 1850 { 1851 TComSPS *sps = getSPS(); 1852 TComVPS *vps = getVPS(); 1853 UInt retVal, layerId = getLayerId(); 1854 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 1855 { 1856 retVal = sps->getChromaFormatIdc(); 1857 } 1858 else 1859 { 1860 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getChromaFormatVpsIdc(); 1861 } 1862 return retVal; 1863 } 1864 UInt TComSlice::getBitDepthY() 1865 { 1866 TComSPS *sps = getSPS(); 1867 TComVPS *vps = getVPS(); 1868 UInt retVal, layerId = getLayerId(); 1869 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 1870 { 1871 retVal = sps->getBitDepthY(); 1872 } 1873 else 1874 { 1875 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getBitDepthVpsLuma(); 1876 } 1877 return retVal; 1878 } 1879 UInt TComSlice::getBitDepthC() 1880 { 1881 TComSPS *sps = getSPS(); 1882 TComVPS *vps = getVPS(); 1883 UInt retVal, layerId = getLayerId(); 1884 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 1885 { 1886 retVal = sps->getBitDepthC(); 1887 } 1888 else 1889 { 1890 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getBitDepthVpsChroma(); 1891 } 1892 return retVal; 1893 } 1894 Int TComSlice::getQpBDOffsetY() 1895 { 1896 return (getBitDepthY() - 8) * 6; 1897 } 1898 Int TComSlice::getQpBDOffsetC() 1899 { 1900 return (getBitDepthC() - 8) * 6; 1901 } 1902 1903 RepFormat::RepFormat() 1904 : m_chromaFormatVpsIdc (0) 1905 , m_separateColourPlaneVpsFlag (false) 1906 , m_picWidthVpsInLumaSamples (0) 1907 , m_picHeightVpsInLumaSamples (0) 1908 , m_bitDepthVpsLuma (0) 1909 , m_bitDepthVpsChroma (0) 1910 {} 1911 #endif 1912 1591 1913 // ------------------------------------------------------------------------------------------------ 1592 1914 // Video parameter set (VPS) … … 1617 1939 , m_defaultOneTargetOutputLayerFlag (false) 1618 1940 #endif 1941 #if VPS_VUI_BITRATE_PICRATE 1942 , m_bitRatePresentVpsFlag (false) 1943 , m_picRatePresentVpsFlag (false) 1944 #endif 1945 #if REPN_FORMAT_IN_VPS 1946 , m_repFormatIdxPresentFlag (true) 1947 , m_vpsNumRepFormats (1) 1948 #endif 1949 #if VIEW_ID_RELATED_SIGNALING 1950 , m_viewIdLenMinus1 (0) 1951 #endif 1619 1952 { 1620 1953 for( Int i = 0; i < MAX_TLAYER; i++) … … 1665 1998 m_maxOneActiveRefLayerFlag = true; 1666 1999 #endif 2000 #if N0147_IRAP_ALIGN_FLAG 2001 m_crossLayerIrapAlignFlag = true; 2002 #endif 1667 2003 #if JCTVC_M0203_INTERLAYER_PRED_IDC 1668 2004 #if N0120_MAX_TID_REF_PRESENT_FLAG 1669 m_maxTid IlRefPicsPlus1PresentFlag = true;2005 m_maxTidRefPresentFlag = true; 1670 2006 #endif 1671 2007 for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++) 1672 2008 { 1673 m_maxSublayerForIlpPlus1[i] = m_uiMaxTLayers + 1; 1674 } 2009 m_maxTidIlRefPicsPlus1[i] = m_uiMaxTLayers + 1; 2010 } 2011 #endif 2012 #if TILE_BOUNDARY_ALIGNED_FLAG 2013 ::memset(m_tileBoundariesAlignedFlag, 0, sizeof(m_tileBoundariesAlignedFlag)); 2014 #endif 2015 #if N0160_VUI_EXT_ILP_REF 2016 m_numIlpRestrictedRefLayers = false; 2017 ::memset(m_minSpatialSegmentOffsetPlus1, 0, sizeof(m_minSpatialSegmentOffsetPlus1)); 2018 ::memset(m_ctuBasedOffsetEnabledFlag, 0, sizeof(m_ctuBasedOffsetEnabledFlag)); 2019 ::memset(m_minHorizontalCtuOffsetPlus1, 0, sizeof(m_minHorizontalCtuOffsetPlus1)); 2020 #endif 2021 #if VPS_VUI_BITRATE_PICRATE 2022 ::memset(m_bitRatePresentFlag, 0, sizeof(m_bitRatePresentFlag)); 2023 ::memset(m_picRatePresentFlag, 0, sizeof(m_picRatePresentFlag)); 2024 ::memset(m_avgBitRate , 0, sizeof(m_avgBitRate) ); 2025 ::memset(m_maxBitRate , 0, sizeof(m_maxBitRate) ); 2026 ::memset(m_constPicRateIdc , 0, sizeof(m_constPicRateIdc) ); 2027 ::memset(m_avgPicRate , 0, sizeof(m_avgPicRate) ); 2028 #endif 2029 #if REPN_FORMAT_IN_VPS 2030 ::memset( m_vpsRepFormatIdx, 0, sizeof(m_vpsRepFormatIdx) ); 2031 #endif 2032 #if VIEW_ID_RELATED_SIGNALING 2033 ::memset(m_viewIdVal, 0, sizeof(m_viewIdVal)); 1675 2034 #endif 1676 2035 } … … 1704 2063 setNumLayersInIdList(i, n); 1705 2064 } 2065 } 2066 #endif 2067 2068 #if IL_SL_SIGNALLING_N0371 2069 Bool TComVPS::checkLayerDependency(UInt i, UInt j) 2070 { 2071 if( this->getDirectDependencyFlag(i, j) == true ) 2072 { 2073 return true; 2074 } 2075 else 2076 { 2077 for(UInt k=i-1; k>j; k--) 2078 { 2079 if( this->getDirectDependencyFlag(i, k) == true ) 2080 { 2081 checkLayerDependency( k,j ); 2082 } 2083 } 2084 } 2085 return false; 2086 } 2087 #endif 2088 2089 #if VIEW_ID_RELATED_SIGNALING 2090 Int TComVPS::getNumViews() 2091 { 2092 Int numViews = 1; 2093 for( Int i = 0; i <= getMaxLayers() - 1; i++ ) 2094 { 2095 Int lId = getLayerIdInNuh( i ); 2096 if ( i > 0 && ( getViewIndex( lId ) != getScalabilityId( i - 1, VIEW_ORDER_INDEX ) ) ) 2097 { 2098 numViews++; 2099 } 2100 } 2101 2102 return numViews; 2103 } 2104 Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType ) 2105 { 2106 return getScalabilityMask( scalType ) ? getDimensionId( layerIdInVps, scalTypeToScalIdx( scalType ) ) : 0; 2107 } 2108 Int TComVPS::scalTypeToScalIdx( ScalabilityType scalType ) 2109 { 2110 assert( scalType >= 0 && scalType <= MAX_VPS_NUM_SCALABILITY_TYPES ); 2111 assert( scalType == MAX_VPS_NUM_SCALABILITY_TYPES || getScalabilityMask( scalType ) ); 2112 Int scalIdx = 0; 2113 for( Int curScalType = 0; curScalType < scalType; curScalType++ ) 2114 { 2115 scalIdx += ( getScalabilityMask( curScalType ) ? 1 : 0 ); 2116 2117 } 2118 2119 return scalIdx; 1706 2120 } 1707 2121 #endif … … 1759 2173 , m_numScaledRefLayerOffsets (0) 1760 2174 #endif 2175 #if REPN_FORMAT_IN_VPS 2176 , m_updateRepFormatFlag (false) 2177 #endif 1761 2178 { 1762 2179 for ( Int i = 0; i < MAX_TLAYER; i++ ) … … 1802 2219 1803 2220 TimingInfo *timingInfo = vui->getTimingInfo(); 1804 timingInfo->setTimingInfoPresentFlag( true ); 1805 switch( frameRate ) 1806 { 1807 case 24: 1808 timingInfo->setNumUnitsInTick( 1125000 ); timingInfo->setTimeScale ( 27000000 ); 1809 break; 1810 case 25: 1811 timingInfo->setNumUnitsInTick( 1080000 ); timingInfo->setTimeScale ( 27000000 ); 1812 break; 1813 case 30: 1814 timingInfo->setNumUnitsInTick( 900900 ); timingInfo->setTimeScale ( 27000000 ); 1815 break; 1816 case 50: 1817 timingInfo->setNumUnitsInTick( 540000 ); timingInfo->setTimeScale ( 27000000 ); 1818 break; 1819 case 60: 1820 timingInfo->setNumUnitsInTick( 450450 ); timingInfo->setTimeScale ( 27000000 ); 1821 break; 1822 default: 1823 timingInfo->setNumUnitsInTick( 1001 ); timingInfo->setTimeScale ( 60000 ); 1824 break; 1825 } 1826 1827 Bool rateCnt = ( bitRate > 0 ); 1828 hrd->setNalHrdParametersPresentFlag( rateCnt ); 1829 hrd->setVclHrdParametersPresentFlag( rateCnt ); 1830 1831 hrd->setSubPicCpbParamsPresentFlag( ( numDU > 1 ) ); 1832 1833 if( hrd->getSubPicCpbParamsPresentFlag() ) 1834 { 1835 hrd->setTickDivisorMinus2( 100 - 2 ); // 1836 hrd->setDuCpbRemovalDelayLengthMinus1( 7 ); // 8-bit precision ( plus 1 for last DU in AU ) 1837 hrd->setSubPicCpbParamsInPicTimingSEIFlag( true ); 1838 hrd->setDpbOutputDelayDuLengthMinus1( 5 + 7 ); // With sub-clock tick factor of 100, at least 7 bits to have the same value as AU dpb delay 2221 #if TIMING_INFO_NONZERO_LAYERID_SPS 2222 if( getLayerId() > 0 ) 2223 { 2224 timingInfo->setTimingInfoPresentFlag( false ); 1839 2225 } 1840 2226 else 1841 2227 { 1842 hrd->setSubPicCpbParamsInPicTimingSEIFlag( false ); 1843 } 1844 1845 hrd->setBitRateScale( 4 ); // in units of 2~( 6 + 4 ) = 1,024 bps 1846 hrd->setCpbSizeScale( 6 ); // in units of 2~( 4 + 4 ) = 1,024 bit 1847 hrd->setDuCpbSizeScale( 6 ); // in units of 2~( 4 + 4 ) = 1,024 bit 2228 #endif 2229 timingInfo->setTimingInfoPresentFlag( true ); 2230 switch( frameRate ) 2231 { 2232 case 24: 2233 timingInfo->setNumUnitsInTick( 1125000 ); timingInfo->setTimeScale ( 27000000 ); 2234 break; 2235 case 25: 2236 timingInfo->setNumUnitsInTick( 1080000 ); timingInfo->setTimeScale ( 27000000 ); 2237 break; 2238 case 30: 2239 timingInfo->setNumUnitsInTick( 900900 ); timingInfo->setTimeScale ( 27000000 ); 2240 break; 2241 case 50: 2242 timingInfo->setNumUnitsInTick( 540000 ); timingInfo->setTimeScale ( 27000000 ); 2243 break; 2244 case 60: 2245 timingInfo->setNumUnitsInTick( 450450 ); timingInfo->setTimeScale ( 27000000 ); 2246 break; 2247 default: 2248 timingInfo->setNumUnitsInTick( 1001 ); timingInfo->setTimeScale ( 60000 ); 2249 break; 2250 } 2251 2252 Bool rateCnt = ( bitRate > 0 ); 2253 hrd->setNalHrdParametersPresentFlag( rateCnt ); 2254 hrd->setVclHrdParametersPresentFlag( rateCnt ); 2255 2256 hrd->setSubPicCpbParamsPresentFlag( ( numDU > 1 ) ); 2257 2258 if( hrd->getSubPicCpbParamsPresentFlag() ) 2259 { 2260 hrd->setTickDivisorMinus2( 100 - 2 ); // 2261 hrd->setDuCpbRemovalDelayLengthMinus1( 7 ); // 8-bit precision ( plus 1 for last DU in AU ) 2262 hrd->setSubPicCpbParamsInPicTimingSEIFlag( true ); 2263 hrd->setDpbOutputDelayDuLengthMinus1( 5 + 7 ); // With sub-clock tick factor of 100, at least 7 bits to have the same value as AU dpb delay 2264 } 2265 else 2266 { 2267 hrd->setSubPicCpbParamsInPicTimingSEIFlag( false ); 2268 } 2269 2270 hrd->setBitRateScale( 4 ); // in units of 2~( 6 + 4 ) = 1,024 bps 2271 hrd->setCpbSizeScale( 6 ); // in units of 2~( 4 + 4 ) = 1,024 bit 2272 hrd->setDuCpbSizeScale( 6 ); // in units of 2~( 4 + 4 ) = 1,024 bit 1848 2273 1849 hrd->setInitialCpbRemovalDelayLengthMinus1(15); // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit1850 if( randomAccess )1851 {1852 hrd->setCpbRemovalDelayLengthMinus1(5); // 32 = 2^5 (plus 1)1853 hrd->setDpbOutputDelayLengthMinus1 (5); // 32 + 3 = 2^61854 }1855 else1856 {1857 hrd->setCpbRemovalDelayLengthMinus1(9); // max. 2^101858 hrd->setDpbOutputDelayLengthMinus1 (9); // max. 2^101859 }2274 hrd->setInitialCpbRemovalDelayLengthMinus1(15); // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit 2275 if( randomAccess ) 2276 { 2277 hrd->setCpbRemovalDelayLengthMinus1(5); // 32 = 2^5 (plus 1) 2278 hrd->setDpbOutputDelayLengthMinus1 (5); // 32 + 3 = 2^6 2279 } 2280 else 2281 { 2282 hrd->setCpbRemovalDelayLengthMinus1(9); // max. 2^10 2283 hrd->setDpbOutputDelayLengthMinus1 (9); // max. 2^10 2284 } 1860 2285 1861 2286 /* 1862 Note: only the case of "vps_max_temporal_layers_minus1 = 0" is supported.2287 Note: only the case of "vps_max_temporal_layers_minus1 = 0" is supported. 1863 2288 */ 1864 Int i, j; 1865 UInt birateValue, cpbSizeValue; 1866 UInt ducpbSizeValue; 1867 UInt duBitRateValue = 0; 1868 1869 for( i = 0; i < MAX_TLAYER; i ++ ) 1870 { 1871 hrd->setFixedPicRateFlag( i, 1 ); 1872 hrd->setPicDurationInTcMinus1( i, 0 ); 1873 hrd->setLowDelayHrdFlag( i, 0 ); 1874 hrd->setCpbCntMinus1( i, 0 ); 1875 1876 birateValue = bitRate; 1877 cpbSizeValue = bitRate; // 1 second 1878 ducpbSizeValue = bitRate/numDU; 1879 duBitRateValue = bitRate; 1880 for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ ) 1881 { 1882 hrd->setBitRateValueMinus1( i, j, 0, ( birateValue - 1 ) ); 1883 hrd->setCpbSizeValueMinus1( i, j, 0, ( cpbSizeValue - 1 ) ); 1884 hrd->setDuCpbSizeValueMinus1( i, j, 0, ( ducpbSizeValue - 1 ) ); 1885 hrd->setCbrFlag( i, j, 0, ( j == 0 ) ); 1886 1887 hrd->setBitRateValueMinus1( i, j, 1, ( birateValue - 1) ); 1888 hrd->setCpbSizeValueMinus1( i, j, 1, ( cpbSizeValue - 1 ) ); 1889 hrd->setDuCpbSizeValueMinus1( i, j, 1, ( ducpbSizeValue - 1 ) ); 1890 hrd->setDuBitRateValueMinus1( i, j, 1, ( duBitRateValue - 1 ) ); 1891 hrd->setCbrFlag( i, j, 1, ( j == 0 ) ); 1892 } 1893 } 2289 Int i, j; 2290 UInt birateValue, cpbSizeValue; 2291 UInt ducpbSizeValue; 2292 UInt duBitRateValue = 0; 2293 2294 for( i = 0; i < MAX_TLAYER; i ++ ) 2295 { 2296 hrd->setFixedPicRateFlag( i, 1 ); 2297 hrd->setPicDurationInTcMinus1( i, 0 ); 2298 hrd->setLowDelayHrdFlag( i, 0 ); 2299 hrd->setCpbCntMinus1( i, 0 ); 2300 2301 birateValue = bitRate; 2302 cpbSizeValue = bitRate; // 1 second 2303 ducpbSizeValue = bitRate/numDU; 2304 duBitRateValue = bitRate; 2305 for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ ) 2306 { 2307 hrd->setBitRateValueMinus1( i, j, 0, ( birateValue - 1 ) ); 2308 hrd->setCpbSizeValueMinus1( i, j, 0, ( cpbSizeValue - 1 ) ); 2309 hrd->setDuCpbSizeValueMinus1( i, j, 0, ( ducpbSizeValue - 1 ) ); 2310 hrd->setCbrFlag( i, j, 0, ( j == 0 ) ); 2311 2312 hrd->setBitRateValueMinus1( i, j, 1, ( birateValue - 1) ); 2313 hrd->setCpbSizeValueMinus1( i, j, 1, ( cpbSizeValue - 1 ) ); 2314 hrd->setDuCpbSizeValueMinus1( i, j, 1, ( ducpbSizeValue - 1 ) ); 2315 hrd->setDuBitRateValueMinus1( i, j, 1, ( duBitRateValue - 1 ) ); 2316 hrd->setCbrFlag( i, j, 1, ( j == 0 ) ); 2317 } 2318 } 2319 #if TIMING_INFO_NONZERO_LAYERID_SPS 2320 } 2321 #endif 1894 2322 } 1895 2323 const Int TComSPS::m_winUnitX[]={1,2,2,1}; … … 2152 2580 TComScalingList::TComScalingList() 2153 2581 { 2154 m_useTransformSkip = false;2155 2582 init(); 2156 2583 } 2584 2157 2585 TComScalingList::~TComScalingList() 2158 2586 { … … 2162 2590 /** set default quantization matrix to array 2163 2591 */ 2592 #if IL_SL_SIGNALLING_N0371 2593 Void TComSlice::setDefaultScalingList( UInt layerId ) 2594 #else 2164 2595 Void TComSlice::setDefaultScalingList() 2596 #endif 2165 2597 { 2166 2598 for(UInt sizeId = 0; sizeId < SCALING_LIST_SIZE_NUM; sizeId++) … … 2168 2600 for(UInt listId=0;listId<g_scalingListNum[sizeId];listId++) 2169 2601 { 2602 #if IL_SL_SIGNALLING_N0371 2603 getScalingList()->processDefaultMarix(sizeId, listId, layerId); 2604 #else 2170 2605 getScalingList()->processDefaultMarix(sizeId, listId); 2606 #endif 2171 2607 } 2172 2608 } … … 2343 2779 * \param Index of input matrix 2344 2780 */ 2781 #if IL_SL_SIGNALLING_N0371 2782 Void TComScalingList::processDefaultMarix(UInt sizeId, UInt listId, UInt layerId) 2783 #else 2345 2784 Void TComScalingList::processDefaultMarix(UInt sizeId, UInt listId) 2346 { 2785 #endif 2786 { 2787 #if IL_SL_SIGNALLING_N0371 2788 Int i,coefNum = min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId]); 2789 UInt* scan = (sizeId == 0) ? g_auiSigLastScan [ SCAN_DIAG ] [ 1 ] : g_sigLastScanCG32x32; 2790 Int *src = getScalingListDefaultAddress(sizeId, listId); 2791 #endif 2792 2347 2793 ::memcpy(getScalingListAddress(sizeId, listId),getScalingListDefaultAddress(sizeId,listId),sizeof(Int)*min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId])); 2794 2795 #if IL_SL_SIGNALLING_N0371 2796 for(i = 0; i < coefNum; i++) 2797 { 2798 ref_scalingListCoef[layerId][sizeId][listId][i] = src[scan[i]]; 2799 } 2800 #endif 2801 2348 2802 setScalingListDC(sizeId,listId,SCALING_LIST_DC); 2803 #if IL_SL_SIGNALLING_N0371 2804 ref_scalingListDC[layerId][sizeId][listId] = SCALING_LIST_DC; 2805 #endif 2349 2806 } 2350 2807 2351 2808 /** check DC value of matrix for default matrix signaling 2352 2809 */ 2810 #if IL_SL_SIGNALLING_N0371 2811 Void TComScalingList::checkDcOfMatrix( UInt layerId ) 2812 #else 2353 2813 Void TComScalingList::checkDcOfMatrix() 2814 #endif 2354 2815 { 2355 2816 for(UInt sizeId = 0; sizeId < SCALING_LIST_SIZE_NUM; sizeId++) … … 2360 2821 if(getScalingListDC(sizeId,listId) == 0) 2361 2822 { 2823 #if IL_SL_SIGNALLING_N0371 2824 processDefaultMarix(sizeId, listId, layerId); 2825 #else 2362 2826 processDefaultMarix(sizeId, listId); 2827 #endif 2363 2828 } 2364 2829 } … … 2441 2906 m_activeVPSId = vpsId; 2442 2907 m_activeSPSId = spsId; 2908 2909 #if IL_SL_SIGNALLING_N0371 2910 activeRefPPSId[ sps->getLayerId() ] = ppsId; 2911 activeRefSPSId[ sps->getLayerId() ] = spsId; 2912 #endif 2913 2443 2914 return true; 2444 2915 } … … 2554 3025 return; 2555 3026 } 3027 #if POC_RESET_FLAG 3028 if( this->getPocResetFlag() ) 3029 { 3030 setBaseColPic(refLayerIdc, xGetRefPic(rcListPic, 0)); 3031 } 3032 else 3033 { 3034 setBaseColPic(refLayerIdc, xGetRefPic(rcListPic, getPOC())); 3035 } 3036 #else 2556 3037 setBaseColPic(refLayerIdc, xGetRefPic(rcListPic, getPOC())); 3038 #endif 2557 3039 } 2558 3040 #endif … … 2568 3050 //set reference picture POC of each ILP reference 2569 3051 Int thePoc = ilpPic[refLayerIdc]->getPOC(); 2570 assert(thePoc >= 0); 3052 assert(thePoc >= 0); 2571 3053 assert(thePoc == pcRefPicBL->getPOC()); 2572 3054 -
trunk/source/Lib/TLibCommon/TComSlice.h
r345 r442 156 156 Void setScalingListPresentFlag (Bool b) { m_scalingListPresentFlag = b; } 157 157 Bool getScalingListPresentFlag () { return m_scalingListPresentFlag; } 158 Bool getUseTransformSkip () { return m_useTransformSkip; } 159 Void setUseTransformSkip (Bool b) { m_useTransformSkip = b; } 158 159 #if IL_SL_SIGNALLING_N0371 160 UInt m_layerId; 161 162 Void setPredScalingListFlag (Bool b) { m_predScalingListFlag = b; } 163 Bool getPredScalingListFlag () { return m_predScalingListFlag; } 164 Void setScalingListRefLayerId (UInt b) { m_scalingListRefLayerId = b; } 165 UInt getScalingListRefLayerId () { return m_scalingListRefLayerId; } 166 #endif 167 160 168 Int* getScalingListAddress (UInt sizeId, UInt listId) { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient 161 169 Bool checkPredMode (UInt sizeId, UInt listId); … … 163 171 UInt getRefMatrixId (UInt sizeId, UInt listId) { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID 164 172 Int* getScalingListDefaultAddress (UInt sizeId, UInt listId); //!< get default matrix coefficient 173 174 #if IL_SL_SIGNALLING_N0371 175 Void processDefaultMarix (UInt sizeId, UInt listId, UInt layerId ); 176 #else 165 177 Void processDefaultMarix (UInt sizeId, UInt listId); 178 #endif 179 166 180 Void setScalingListDC (UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value 167 181 168 182 Int getScalingListDC (UInt sizeId, UInt listId) { return m_scalingListDC[sizeId][listId]; } //!< get DC value 183 184 #if IL_SL_SIGNALLING_N0371 185 Void setLayerId(UInt layerId) { m_layerId = layerId; } 186 UInt getLayerId() { return m_layerId; } 187 Void checkDcOfMatrix ( UInt m_layerId ); 188 #else 169 189 Void checkDcOfMatrix (); 190 #endif 191 170 192 Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); 171 193 Bool xParseScalingList (Char* pchFile); … … 178 200 UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID 179 201 Bool m_scalingListPresentFlag; //!< flag for using default matrix 202 203 #if IL_SL_SIGNALLING_N0371 204 Bool m_predScalingListFlag; //!< flag for inter-layer scaling-list prediction 205 UInt m_scalingListRefLayerId; //!< scaling_list_ref_layer_id 206 #endif 207 180 208 UInt m_predMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index 181 Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix 182 Bool m_useTransformSkip; //!< transform skipping flag for setting default scaling matrix for 4x4 209 Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix 183 210 }; 184 211 … … 406 433 }; 407 434 435 #if REPN_FORMAT_IN_VPS 436 class RepFormat 437 { 438 Int m_chromaFormatVpsIdc; 439 Bool m_separateColourPlaneVpsFlag; 440 Int m_picWidthVpsInLumaSamples; 441 Int m_picHeightVpsInLumaSamples; 442 Int m_bitDepthVpsLuma; // coded as minus8 443 Int m_bitDepthVpsChroma; // coded as minus8 444 445 public: 446 RepFormat(); 447 448 Int getChromaFormatVpsIdc() { return m_chromaFormatVpsIdc; } 449 Void setChromaFormatVpsIdc(Int x) { m_chromaFormatVpsIdc = x; } 450 451 Bool getSeparateColourPlaneVpsFlag() { return m_separateColourPlaneVpsFlag; } 452 Void setSeparateColourPlaneVpsFlag(Bool x) { m_separateColourPlaneVpsFlag = x; } 453 454 Int getPicWidthVpsInLumaSamples() { return m_picWidthVpsInLumaSamples; } 455 Void setPicWidthVpsInLumaSamples(Int x) { m_picWidthVpsInLumaSamples = x; } 456 457 Int getPicHeightVpsInLumaSamples() { return m_picHeightVpsInLumaSamples; } 458 Void setPicHeightVpsInLumaSamples(Int x) { m_picHeightVpsInLumaSamples = x; } 459 460 Int getBitDepthVpsLuma() { return m_bitDepthVpsLuma; } 461 Void setBitDepthVpsLuma(Int x) { m_bitDepthVpsLuma = x; } 462 463 Int getBitDepthVpsChroma() { return m_bitDepthVpsChroma; } 464 Void setBitDepthVpsChroma(Int x) { m_bitDepthVpsChroma = x; } 465 }; 466 #endif 408 467 class TComVPS 409 468 { … … 436 495 Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 437 496 Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; 497 #endif 498 #if IL_SL_SIGNALLING_N0371 499 Bool m_scalingListLayerDependency[MAX_LAYERS][MAX_LAYERS]; // layer dependency for scaling list 500 #endif 501 #if VPS_EXTN_OFFSET 502 UInt m_extensionOffset; 438 503 #endif 439 504 TComPTL m_pcPTL; … … 491 556 Bool m_maxOneActiveRefLayerFlag; 492 557 #endif 558 #if N0147_IRAP_ALIGN_FLAG 559 Bool m_crossLayerIrapAlignFlag; 560 #endif 493 561 #if JCTVC_M0203_INTERLAYER_PRED_IDC 494 UInt m_max SublayerForIlpPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1];562 UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; 495 563 #endif 496 564 #if N0120_MAX_TID_REF_PRESENT_FLAG 497 Bool m_maxTid IlRefPicsPlus1PresentFlag;565 Bool m_maxTidRefPresentFlag; 498 566 #endif 499 567 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 500 568 Bool m_singleLayerForNonIrapFlag; 569 #endif 570 #if TILE_BOUNDARY_ALIGNED_FLAG 571 Bool m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 572 #endif 573 #if N0160_VUI_EXT_ILP_REF 574 Bool m_numIlpRestrictedRefLayers; 575 Int m_minSpatialSegmentOffsetPlus1[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 576 Bool m_ctuBasedOffsetEnabledFlag [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 577 Int m_minHorizontalCtuOffsetPlus1 [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 578 #endif 579 #if VPS_VUI_BITRATE_PICRATE 580 Bool m_bitRatePresentVpsFlag; 581 Bool m_picRatePresentVpsFlag; 582 Bool m_bitRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 583 Bool m_picRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 584 Int m_avgBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 585 Int m_maxBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 586 Int m_constPicRateIdc [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 587 Int m_avgPicRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 588 #endif 589 #if REPN_FORMAT_IN_VPS 590 Bool m_repFormatIdxPresentFlag; 591 Int m_vpsNumRepFormats; // coded as minus1 592 RepFormat m_vpsRepFormat[16]; 593 Int m_vpsRepFormatIdx[16]; 594 #endif 595 #if VIEW_ID_RELATED_SIGNALING 596 Int m_viewIdLenMinus1; 597 Int m_viewIdVal [MAX_LAYERS]; 501 598 #endif 502 599 public: … … 565 662 Void deriveLayerIdListVariables(); 566 663 #endif 664 665 #if IL_SL_SIGNALLING_N0371 666 Bool checkLayerDependency(UInt i, UInt j); 667 Bool getScalingListLayerDependency ( UInt layerId, UInt refLayerId ) { return m_scalingListLayerDependency[layerId][refLayerId]; } 668 Void setScalingListLayerDependency ( UInt layerId, UInt refLayerId, Bool val ) { m_scalingListLayerDependency[layerId][refLayerId] = val; } 669 #endif 670 567 671 TComPTL* getPTL() { return &m_pcPTL; } 568 672 TimingInfo* getTimingInfo() { return &m_timingInfo; } … … 659 763 Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } 660 764 #endif 765 #if N0147_IRAP_ALIGN_FLAG 766 Bool getCrossLayerIrapAlignFlag() { return m_crossLayerIrapAlignFlag; } 767 Void setCrossLayerIrapAlignFlag(Bool x) { m_crossLayerIrapAlignFlag = x; } 768 #endif 661 769 #if JCTVC_M0203_INTERLAYER_PRED_IDC 662 Bool getMaxSublayerForIlpPlus1(Int layerId) { return m_maxSublayerForIlpPlus1[layerId]; }663 Void setMax SublayerForIlpPlus1(Int layerId, UInt maxSublayer) { m_maxSublayerForIlpPlus1[layerId] = maxSublayer; }770 UInt getMaxTidIlRefPicsPlus1(Int layerId) { return m_maxTidIlRefPicsPlus1[layerId]; } 771 Void setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer; } 664 772 #endif 665 773 #if N0120_MAX_TID_REF_PRESENT_FLAG 666 Bool getMaxTid IlRefPicsPlus1PresentFlag() { return m_maxTidIlRefPicsPlus1PresentFlag ;}667 Void setMaxTid IlRefPicsPlus1PresentFlag(Bool x) { m_maxTidIlRefPicsPlus1PresentFlag = x;}774 Bool getMaxTidRefPresentFlag() { return m_maxTidRefPresentFlag ;} 775 Void setMaxTidRefPresentFlag(Bool x) { m_maxTidRefPresentFlag = x;} 668 776 #endif 669 777 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 670 778 Bool getSingleLayerForNonIrapFlag() { return m_singleLayerForNonIrapFlag; } 671 779 Void setSingleLayerForNonIrapFlag(Bool x) { m_singleLayerForNonIrapFlag = x; } 780 #endif 781 #if TILE_BOUNDARY_ALIGNED_FLAG 782 Bool getTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId) { return m_tileBoundariesAlignedFlag[currLayerId][refLayerId]; } 783 Void setTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId, Bool x) { m_tileBoundariesAlignedFlag[currLayerId][refLayerId] = x; } 784 #endif 785 #if N0160_VUI_EXT_ILP_REF 786 Bool getNumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers ;} 787 Void setNumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers = val;} 788 789 Int getMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId ) { return m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId];} 790 Void setMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId, Int val ) { m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId] = val;} 791 792 Bool getCtuBasedOffsetEnabledFlag ( Int currLayerId, Int refLayerId ) { return m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId];} 793 Void setCtuBasedOffsetEnabledFlag ( Int currLayerId, Int refLayerId, Bool flag ) { m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId] = flag;} 794 795 Int getMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId ) { return m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId];} 796 Void setMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId, Int val ) { m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId] = val;} 797 #endif 798 #if VPS_VUI_BITRATE_PICRATE 799 Bool getBitRatePresentVpsFlag() { return m_bitRatePresentVpsFlag; } 800 Void setBitRatePresentVpsFlag(Bool x) { m_bitRatePresentVpsFlag = x; } 801 Bool getPicRatePresentVpsFlag() { return m_picRatePresentVpsFlag; } 802 Void setPicRatePresentVpsFlag(Bool x) { m_picRatePresentVpsFlag = x; } 803 804 Bool getBitRatePresentFlag(Int i, Int j) { return m_bitRatePresentFlag[i][j]; } 805 Void setBitRatePresentFlag(Int i, Int j, Bool x) { m_bitRatePresentFlag[i][j] = x; } 806 Bool getPicRatePresentFlag(Int i, Int j) { return m_picRatePresentFlag[i][j]; } 807 Void setPicRatePresentFlag(Int i, Int j, Bool x) { m_picRatePresentFlag[i][j] = x; } 808 809 Int getAvgBitRate(Int i, Int j) { return m_avgBitRate[i][j]; } 810 Void setAvgBitRate(Int i, Int j, Int x) { m_avgBitRate[i][j] = x; } 811 Int getMaxBitRate(Int i, Int j) { return m_maxBitRate[i][j]; } 812 Void setMaxBitRate(Int i, Int j, Int x) { m_maxBitRate[i][j] = x; } 813 814 Int getConstPicRateIdc(Int i, Int j) { return m_constPicRateIdc[i][j]; } 815 Void setConstPicRateIdc(Int i, Int j, Int x) { m_constPicRateIdc[i][j] = x; } 816 Int getAvgPicRate(Int i, Int j) { return m_avgPicRate[i][j]; } 817 Void setAvgPicRate(Int i, Int j, Int x) { m_avgPicRate[i][j] = x; } 818 #endif 819 820 #if REPN_FORMAT_IN_VPS 821 Bool getRepFormatIdxPresentFlag() { return m_repFormatIdxPresentFlag; } 822 Void setRepFormatIdxPresentFlag(Bool x) { m_repFormatIdxPresentFlag = x; } 823 824 Int getVpsNumRepFormats() { return m_vpsNumRepFormats; } 825 Void setVpsNumRepFormats(Int x) { m_vpsNumRepFormats = x; } 826 827 RepFormat* getVpsRepFormat(Int idx) { return &m_vpsRepFormat[idx]; } 828 829 Int getVpsRepFormatIdx(Int idx) { return m_vpsRepFormatIdx[idx]; } 830 Void setVpsRepFormatIdx(Int idx, Int x) { m_vpsRepFormatIdx[idx] = x; } 831 #endif 832 #if VIEW_ID_RELATED_SIGNALING 833 Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; } 834 Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; } 835 836 Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } 837 Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } 838 Int getScalabilityId(Int, ScalabilityType scalType ); 839 840 Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } 841 842 Int getNumViews(); 843 Int scalTypeToScalIdx( ScalabilityType scalType ); 844 #endif 845 #if VPS_EXTN_OFFSET 846 Int getExtensionOffset() { return m_extensionOffset; } 847 Void setExtensionOffset( UInt offset ) { m_extensionOffset = offset; } 672 848 #endif 673 849 }; … … 951 1127 Bool m_scalingListEnabledFlag; 952 1128 Bool m_scalingListPresentFlag; 1129 953 1130 TComScalingList* m_scalingList; //!< ScalingList class pointer 1131 954 1132 UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; 955 1133 UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) … … 975 1153 #if SVC_EXTENSION 976 1154 UInt m_layerId; 1155 1156 #if IL_SL_SIGNALLING_N0371 1157 TComVPS* m_pVPS; 1158 static TComSPS* m_pcSPS[MAX_LAYERS]; 1159 Bool m_predScalingListFlag; 1160 UInt m_scalingListRefLayerId; 1161 #endif 1162 977 1163 #endif 978 1164 #if REF_IDX_MFM … … 984 1170 UInt m_numScaledRefLayerOffsets; 985 1171 Window m_scaledRefLayerWindow[MAX_LAYERS]; 1172 #endif 1173 #if REPN_FORMAT_IN_VPS 1174 Bool m_updateRepFormatFlag; 986 1175 #endif 987 1176 public: … … 1094 1283 Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } 1095 1284 Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } 1285 1286 #if IL_SL_SIGNALLING_N0371 1287 Bool getPredScalingListFlag() { return m_predScalingListFlag; } 1288 Void setPredScalingListFlag( Bool b ) { m_predScalingListFlag = b; } 1289 UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } 1290 Void setScalingListRefLayerId( UInt b ) { m_scalingListRefLayerId = b; } 1291 1292 TComVPS* getVPS() { return m_pVPS; } 1293 Void setVPS( TComVPS* vps ) { m_pVPS = vps; } 1294 static TComSPS* getSPS(UInt layerId) { return m_pcSPS[layerId]; } 1295 static Void setSPS(UInt layerId, TComSPS* sps) { m_pcSPS[layerId] = sps; } 1296 #endif 1297 1096 1298 Void setScalingList ( TComScalingList *scalingList); 1097 1299 TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in SPS 1300 1098 1301 UInt getMaxDecPicBuffering (UInt tlayer) { return m_uiMaxDecPicBuffering[tlayer]; } 1099 1302 Void setMaxDecPicBuffering ( UInt ui, UInt tlayer ) { m_uiMaxDecPicBuffering[tlayer] = ui; } … … 1142 1345 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 1143 1346 Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } 1347 #endif 1348 #if REPN_FORMAT_IN_VPS 1349 Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } 1350 Void setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x; } 1144 1351 #endif 1145 1352 }; … … 1225 1432 Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter 1226 1433 Bool m_scalingListPresentFlag; 1434 1435 #if SVC_EXTENSION 1436 UInt m_layerId; 1437 1438 #if IL_SL_SIGNALLING_N0371 1439 static TComPPS* m_pcPPS[MAX_LAYERS]; 1440 Bool m_predScalingListFlag; 1441 UInt m_scalingListRefLayerId; 1442 #endif 1443 1444 #endif 1445 1227 1446 TComScalingList* m_scalingList; //!< ScalingList class pointer 1447 1228 1448 Bool m_listsModificationPresentFlag; 1229 1449 UInt m_log2ParallelMergeLevelMinus2; … … 1339 1559 Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } 1340 1560 Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } 1561 1562 #if IL_SL_SIGNALLING_N0371 1563 Void setLayerId(UInt layerId) { m_layerId = layerId; } 1564 UInt getLayerId() { return m_layerId; } 1565 1566 Bool getPredScalingListFlag() { return m_predScalingListFlag; } 1567 Void setPredScalingListFlag( Bool b ) { m_predScalingListFlag = b; } 1568 UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } 1569 Void setScalingListRefLayerId( UInt b ) { m_scalingListRefLayerId = b; } 1570 1571 static TComPPS* getPPS(UInt layerId) { return m_pcPPS[layerId]; } 1572 static Void setPPS(UInt layerId, TComPPS* pps) { m_pcPPS[layerId] = pps; } 1573 #endif 1574 1341 1575 Void setScalingList ( TComScalingList *scalingList); 1342 1576 TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in PPS … … 1384 1618 Int m_iPOC; 1385 1619 Int m_iLastIDR; 1386 static Int m_prevPOC; 1620 Int m_iAssociatedIRAP; 1621 NalUnitType m_iAssociatedIRAPType; 1622 static Int m_prevTid0POC; 1387 1623 TComReferencePictureSet *m_pcRPS; 1388 1624 TComReferencePictureSet m_LocalRPS; … … 1404 1640 Int m_interLayerPredLayerIdc [MAX_VPS_LAYER_ID_PLUS1]; 1405 1641 #else 1406 #if REF_IDX_FRAMEWORK1642 #if SVC_EXTENSION 1407 1643 Int m_numILRRefIdx; //< for inter-layer reference picture ser 1408 1644 #endif … … 1429 1665 Bool m_bRefenced; 1430 1666 1667 #if POC_RESET_FLAG 1668 Bool m_bPocResetFlag; 1669 Int m_pocValueBeforeReset; 1670 #endif 1431 1671 #if SH_DISCARDABLE_FLAG 1432 1672 Bool m_bDiscardableFlag; 1433 1673 #endif 1434 1435 1674 // access channel 1436 1675 TComVPS* m_pcVPS; … … 1460 1699 TComPic* m_pcBaseColPic[MAX_LAYERS]; 1461 1700 TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; 1462 #if REF_IDX_FRAMEWORK &&M0457_COL_PICTURE_SIGNALING1701 #if M0457_COL_PICTURE_SIGNALING 1463 1702 Int m_numMotionPredRefLayers; 1464 1703 #if REF_IDX_MFM … … 1542 1781 Void setRPSidx ( Int iBDidx ) { m_iBDidx = iBDidx; } 1543 1782 Int getRPSidx () { return m_iBDidx; } 1544 Int getPrev POC () { return m_prevPOC; }1783 Int getPrevTid0POC () { return m_prevTid0POC; } 1545 1784 TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } 1546 1785 Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } 1547 1786 Int getLastIDR() { return m_iLastIDR; } 1787 Void setAssociatedIRAPPOC(Int iAssociatedIRAPPOC) { m_iAssociatedIRAP = iAssociatedIRAPPOC; } 1788 Int getAssociatedIRAPPOC() { return m_iAssociatedIRAP; } 1789 Void setAssociatedIRAPType(NalUnitType associatedIRAPType) { m_iAssociatedIRAPType = associatedIRAPType; } 1790 NalUnitType getAssociatedIRAPType() { return m_iAssociatedIRAPType; } 1548 1791 SliceType getSliceType () { return m_eSliceType; } 1549 1792 Int getPOC () { return m_iPOC; } … … 1571 1814 Void checkColRefIdx (UInt curSliceIdx, TComPic* pic); 1572 1815 Bool getIsUsedAsLongTerm (Int i, Int j) { return m_bIsUsedAsLongTerm[i][j]; } 1816 Void setIsUsedAsLongTerm (Int i, Int j, Bool value) { m_bIsUsedAsLongTerm[i][j] = value; } 1573 1817 Bool getCheckLDC () { return m_bCheckLDC; } 1574 1818 Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } … … 1580 1824 Void setReferenced(Bool b) { m_bRefenced = b; } 1581 1825 Bool isReferenced() { return m_bRefenced; } 1582 Void setPOC ( Int i ) { m_iPOC = i; if(getTLayer()==0) m_prevPOC=i; } 1826 Bool isReferenceNalu() { return ((getNalUnitType() <= NAL_UNIT_RESERVED_VCL_R15) && (getNalUnitType()%2 != 0)) || ((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && (getNalUnitType() <= NAL_UNIT_RESERVED_IRAP_VCL23) ); } 1827 Void setPOC ( Int i ) { m_iPOC = i; if ((getTLayer()==0) && (isReferenceNalu() && (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RASL_R)&& (getNalUnitType()!=NAL_UNIT_CODED_SLICE_RADL_R))) {m_prevTid0POC=i;} } 1583 1828 Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } 1584 1829 NalUnitType getNalUnitType () const { return m_eNalUnitType; } … … 1591 1836 #endif 1592 1837 1838 #if POC_RESET_FLAG 1839 Bool getPocResetFlag () { return m_bPocResetFlag; } 1840 Void setPocResetFlag (Bool b) { m_bPocResetFlag = b; } 1841 Int getPocValueBeforeReset () { return m_pocValueBeforeReset; } 1842 Void setPocValueBeforeReset (Int x) { m_pocValueBeforeReset = x ; } 1843 #endif 1593 1844 #if SH_DISCARDABLE_FLAG 1594 1845 Bool getDiscardableFlag () { return m_bDiscardableFlag; } … … 1596 1847 #endif 1597 1848 1598 Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, Bool& prevRAPisBLA, TComList<TComPic *>& rcListPic);1849 Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic); 1599 1850 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); 1600 1851 Void setSliceType ( SliceType e ) { m_eSliceType = e; } … … 1665 1916 Void setTLayerInfo( UInt uiTLayer ); 1666 1917 Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); 1918 Void checkLeadingPictureRestrictions( TComList<TComPic*>& rcListPic ); 1667 1919 Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); 1668 1920 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); … … 1731 1983 Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } 1732 1984 TComScalingList* getScalingList () { return m_scalingList; } 1985 1986 #if IL_SL_SIGNALLING_N0371 1987 Void setDefaultScalingList ( UInt m_layerId ); 1988 #else 1733 1989 Void setDefaultScalingList (); 1990 #endif 1991 1734 1992 Bool checkDefaultScalingList (); 1735 1993 Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag … … 1761 2019 #endif 1762 2020 1763 #if REF_IDX_FRAMEWORK1764 2021 Void setRefPicListModificationSvc(); 1765 2022 Int getNumILRRefIdx ( ) { return m_pcVPS->getNumDirectRefLayers( m_layerId ); } … … 1789 2046 #endif 1790 2047 1791 #if REF_IDX_FRAMEWORK &&M0457_COL_PICTURE_SIGNALING2048 #if M0457_COL_PICTURE_SIGNALING 1792 2049 Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } 1793 2050 Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } … … 1806 2063 #endif 1807 2064 1808 #else1809 // temporal solution for IntraBL. Only one reference layer is supported.1810 Int getActiveNumILRRefIdx ( ) { return 1; }1811 Int getInterLayerPredLayerIdc (UInt layerIdx) { return m_layerId - 1;}1812 Void setActiveNumILRRefIdx ( Int i ) {}1813 Void setInterLayerPredEnabledFlag( Bool val ) {}1814 #endif1815 1816 2065 TComPic* getRefPic(TComList<TComPic*>& rcListPic, Int poc) { return xGetRefPic( rcListPic, poc ); } 1817 2066 1818 2067 #endif //SVC_EXTENSION 1819 2068 2069 #if REPN_FORMAT_IN_VPS 2070 UInt getPicWidthInLumaSamples(); 2071 UInt getPicHeightInLumaSamples(); 2072 UInt getChromaFormatIdc(); 2073 UInt getBitDepthY(); 2074 UInt getBitDepthC(); 2075 Int getQpBDOffsetY(); 2076 Int getQpBDOffsetC(); 2077 #endif 1820 2078 protected: 1821 2079 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, -
trunk/source/Lib/TLibCommon/TComTrQuant.cpp
r345 r442 42 42 #include "TComPic.h" 43 43 #include "ContextTables.h" 44 44 #define MAYBE_BUGFIX 1 45 45 typedef struct 46 46 { … … 50 50 Double d64SigCost; 51 51 Double d64SigCost_0; 52 #if MAYBE_BUGFIX 53 Void init() 54 { 55 iNNZbeforePos0 = 0; 56 d64CodedLevelandDist = 0; 57 d64UncodedDist = 0; 58 d64SigCost = 0; 59 d64SigCost_0 = 0; 60 } 61 #endif 52 62 } coeffGroupRDStats; 53 63 … … 1033 1043 1034 1044 Int qpScaled; 1045 #if REPN_FORMAT_IN_VPS 1046 Int qpBDOffset = (eTType == TEXT_LUMA)? pcCU->getSlice()->getQpBDOffsetY() : pcCU->getSlice()->getQpBDOffsetC(); 1047 #else 1035 1048 Int qpBDOffset = (eTType == TEXT_LUMA)? pcCU->getSlice()->getSPS()->getQpBDOffsetY() : pcCU->getSlice()->getSPS()->getQpBDOffsetC(); 1049 #endif 1036 1050 1037 1051 if(eTType == TEXT_LUMA) … … 1581 1595 UInt uiCGPosY = uiCGBlkPos / uiNumBlkSide; 1582 1596 UInt uiCGPosX = uiCGBlkPos - (uiCGPosY * uiNumBlkSide); 1597 #if MAYBE_BUGFIX 1598 rdStats.init(); 1599 #else 1583 1600 ::memset( &rdStats, 0, sizeof (coeffGroupRDStats)); 1584 1601 #endif 1585 1602 const Int patternSigCtx = TComTrQuant::calcPatternSigCtx(uiSigCoeffGroupFlag, uiCGPosX, uiCGPosY, uiWidth, uiHeight); 1586 1603 for (Int iScanPosinCG = uiCGSize-1; iScanPosinCG >= 0; iScanPosinCG--) … … 2477 2494 /** set flat matrix value to quantized coefficient 2478 2495 */ 2496 #if IL_SL_SIGNALLING_N0371 2497 Void TComTrQuant::setFlatScalingList( UInt m_layerId ) 2498 #else 2479 2499 Void TComTrQuant::setFlatScalingList() 2500 #endif 2480 2501 { 2481 2502 UInt size,list; … … 2486 2507 for(list = 0; list < g_scalingListNum[size]; list++) 2487 2508 { 2509 #if IL_SL_SIGNALLING_N0371 2510 ref_scalingListDC[m_layerId][size][list] = SCALING_LIST_DC; 2511 for(UInt i=0; i<MAX_MATRIX_COEF_NUM; i++) 2512 { 2513 ref_scalingListCoef[m_layerId][size][list][i] = SCALING_LIST_DC; 2514 } 2515 #endif 2516 2488 2517 for(qp=0;qp<SCALING_LIST_REM_NUM;qp++) 2489 2518 { -
trunk/source/Lib/TLibCommon/TComTrQuant.h
r313 r442 181 181 Void setUseScalingList ( Bool bUseScalingList){ m_scalingListEnabledFlag = bUseScalingList; }; 182 182 Bool getUseScalingList (){ return m_scalingListEnabledFlag; }; 183 184 #if IL_SL_SIGNALLING_N0371 185 Void setFlatScalingList ( UInt m_layerId ); 186 #else 183 187 Void setFlatScalingList (); 188 #endif 189 184 190 Void xsetFlatScalingList ( UInt list, UInt size, UInt qp); 185 191 Void xSetScalingListEnc ( TComScalingList *scalingList, UInt list, UInt size, UInt qp); -
trunk/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r345 r442 151 151 Pel* piDstV; 152 152 153 #if SIMPLIFIED_MV_POS_SCALING154 153 Int scaleX = g_posScalingFactor[refLayerIdc][0]; 155 154 Int scaleY = g_posScalingFactor[refLayerIdc][1]; 156 #else157 Int scaleX = ( ( widthBL << shiftX ) + ( widthEL >> 1 ) ) / widthEL;158 Int scaleY = ( ( heightBL << shiftY ) + ( heightEL >> 1 ) ) / heightEL;159 #endif160 155 161 156 if( scaleX == 65536 && scaleY == 65536 ) // ratio 1x 162 157 { 163 piSrcY = piSrcBufY - scalEL.getWindowLeftOffset() - scalEL.getWindowTopOffset() * strideEL;164 piDstY = piDstBufY ;165 for( i = 0; i < height EL; i++ )158 piSrcY = piSrcBufY; 159 piDstY = piDstBufY + scalEL.getWindowLeftOffset() + scalEL.getWindowTopOffset() * strideEL; 160 for( i = 0; i < heightBL; i++ ) 166 161 { 167 162 memcpy( piDstY, piSrcY, sizeof(Pel) * widthBL ); … … 179 174 strideEL = pcUsPic->getCStride(); 180 175 181 piSrcU = piSrcBufU - ( scalEL.getWindowLeftOffset() >> 1 ) - ( scalEL.getWindowTopOffset() >> 1 ) * strideEL;182 piSrcV = piSrcBufV - ( scalEL.getWindowLeftOffset() >> 1 ) - ( scalEL.getWindowTopOffset() >> 1 ) * strideEL;183 184 piDstU = piDstBufU ;185 piDstV = piDstBufV ;186 187 for( i = 0; i < height EL; i++ )176 piSrcU = piSrcBufU; 177 piSrcV = piSrcBufV; 178 179 piDstU = piDstBufU + ( scalEL.getWindowLeftOffset() >> 1 ) + ( scalEL.getWindowTopOffset() >> 1 ) * strideEL; 180 piDstV = piDstBufV + ( scalEL.getWindowLeftOffset() >> 1 ) + ( scalEL.getWindowTopOffset() >> 1 ) * strideEL; 181 182 for( i = 0; i < heightBL; i++ ) 188 183 { 189 184 memcpy( piDstU, piSrcU, sizeof(Pel) * widthBL ); … … 238 233 Int shiftYM4 = shiftY - 4; 239 234 240 #if ILP_DECODED_PICTURE241 235 widthEL = pcUsPic->getWidth (); 242 236 heightEL = pcUsPic->getHeight(); … … 244 238 widthBL = pcBasePic->getWidth (); 245 239 heightBL = min<Int>( pcBasePic->getHeight(), heightEL ); 246 #endif247 240 #if SCALED_REF_LAYER_OFFSETS 248 241 Int leftStartL = scalEL.getWindowLeftOffset(); … … 395 388 } 396 389 397 #if ILP_DECODED_PICTURE398 390 #if SCALED_REF_LAYER_OFFSETS 399 391 widthBL = pcBasePic->getWidth (); … … 408 400 widthEL = pcUsPic->getWidth () - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset(); 409 401 heightEL = pcUsPic->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset(); 410 #endif411 402 #endif 412 403 … … 451 442 shiftYM4 = shiftY - 4; 452 443 453 #if !SIMPLIFIED_MV_POS_SCALING454 scaleX = ( ( widthBL << shiftX ) + ( widthEL >> 1 ) ) / widthEL;455 scaleY = ( ( heightBL << shiftY ) + ( heightEL >> 1 ) ) / heightEL;456 #endif457 458 #if ILP_DECODED_PICTURE459 444 widthEL = pcUsPic->getWidth () >> 1; 460 445 heightEL = pcUsPic->getHeight() >> 1; … … 462 447 widthBL = pcBasePic->getWidth () >> 1; 463 448 heightBL = min<Int>( pcBasePic->getHeight() >> 1, heightEL ); 464 #endif465 449 466 450 #if N0214_INTERMEDIATE_BUFFER_16BITS … … 639 623 #endif 640 624 } 641 625 } 642 626 pcUsPic->setBorderExtension(false); 643 627 pcUsPic->extendPicBorder (); // extend the border. … … 647 631 pcTempPic->setBorderExtension(false); 648 632 pcBasePic->setBorderExtension(false); 649 }650 633 } 651 634 #endif //SVC_EXTENSION -
trunk/source/Lib/TLibCommon/TComWeightPrediction.h
r313 r442 53 53 class TComWeightPrediction 54 54 { 55 wpScalingParam m_wp0[3], m_wp1[3];56 57 55 public: 58 56 TComWeightPrediction(); -
trunk/source/Lib/TLibCommon/TypeDef.h
r345 r442 41 41 #define SVC_EXTENSION 1 42 42 43 #define N0139_POSITION_ROUNDING_OFFSET 144 45 43 #define SYNTAX_BYTES 10 ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)] 46 44 45 #define RANDOM_ACCESS_SEI_FIX 1 47 46 #if SVC_EXTENSION 47 #define VPS_NUH_LAYER_ID 1 ///< JCTVC-N0085: Assert that the nuh_layer_id of VPS NAL unit should be 0 48 48 #define MAX_LAYERS 2 ///< max number of layers the codec is supposed to handle 49 #define RPL_INIT_N0316_N0082 1 ///< N0316, N0082: initial reference picture list construction 50 #define FINAL_RPL_CHANGE_N0082 1 ///< N0082: final ref picture list change (encoder) 51 #define M0464_TILE_BOUNDARY_ALIGNED_FLAG 1 ///< VUI flag to indicate tile boundary alignment 52 #define M0463_VUI_EXT_ILP_REF 1 ///< VUI extension inter-layer dependency offset signalling 49 #define POC_RESET_FLAG 1 ///< JCTVC-N0244: POC reset flag for layer pictures. 50 #define ALIGN_TSA_STSA_PICS 1 ///< JCTVC-N0084: Alignment of TSA and STSA pictures across AU. 51 #define REPN_FORMAT_IN_VPS 1 ///< JCTVC-N0092: Signal represenation format (spatial resolution, bit depth, colour format) in the VPS 52 #define TIMING_INFO_NONZERO_LAYERID_SPS 1 ///< JCTVC-N0085: Semantics of vui_timing_info_present_flag to always set that flag to zero for non-zero layer ID SPS 53 #define RPL_INIT_N0316_N0082 1 ///< JCTVC-N0316, JCTVC-N0082: initial reference picture list construction 54 #define FINAL_RPL_CHANGE_N0082 1 ///< JCTVC-N0082: final ref picture list change (encoder) 55 #if FINAL_RPL_CHANGE_N0082 56 #define EXTERNAL_USEDBYCURR_N0082 1 ///< JCTVC-N0082: final ref picture list change (encoder) //dev ver. 57 #define TEMP_SCALABILITY_FIX 1 ///< fix for temporal scalability 58 #endif 59 #define IL_SL_SIGNALLING_N0371 0 ///< JCTVC-N0371: inter-layer scaling list 60 #define M0464_TILE_BOUNDARY_ALIGNED_FLAG 0 ///< JCTVC-M0464: VUI flag to indicate tile boundary alignment 61 #define M0463_VUI_EXT_ILP_REF 0 ///< JCTVC-M0463: VUI extension inter-layer dependency offset signalling 53 62 #define SPS_EXTENSION 1 ///< Define sps_extension() syntax structure 54 #define SCALED_REF_LAYER_OFFSET_FLAG 0 ///< M0309: Signal scaled reference layer offsets in SPS 55 #define SCALED_REF_LAYER_OFFSETS 1 ///< M0309: Signal scaled reference layer offsets in SPS 63 #define SCALED_REF_LAYER_OFFSETS 1 ///< JCTVC-M0309: Signal scaled reference layer offsets in SPS 64 #define VERT_MV_CONSTRAINT 1 ///< Vertical MV component constraint flag 65 #define SCALABILITY_MASK_E0104 1 ///< JCT3V-E0104: scalability mask for depth 56 66 57 67 #define ILP_SSH_SIG 1 ///< JCTVC-N0195 proposal 2, JCTVC-N0118: add presence flag in VPS ext to condition inter-layer prediction signaling in slice segment header … … 66 76 #define VPS_EXTN_PROFILE_INFO 1 ///< Include profile information for layer sets in VPS extension 67 77 #define VPS_EXTN_DIRECT_REF_LAYERS 1 ///< Include indication of direct dependency of layers in VPS extension 68 #define VPS_OUTPUT_LAYER_SET_IDX 1 ///< M0268: Signal output_layer_set_idx[i] as output_layer_set_idx_minus1[i]69 #define VPS_MOVE_DIR_DEPENDENCY_FLAG 1 ///< M0268: Move the syntax element direct_dependency_flag to follow the syntax element dimension_id70 #define VPS_PROFILE_OUTPUT_LAYERS 1 ///< M0268: Signal profile information and output layer information as in Sec. 3 of M0268v271 #define SPS_SUB_LAYER_INFO 1 ///< M0268: Do not signal sps_max_sub_layers_minus1 and sps_temporal_id_nesting_flag for nuh_layer_id greater than 072 #define VPS_SPLIT_FLAG 1 ///< M0163: Do not signal dimension_id and the last dimension_id_len_minus1, when splitting_flag is equal to 1.78 #define VPS_OUTPUT_LAYER_SET_IDX 1 ///< JCTVC-M0268: Signal output_layer_set_idx[i] as output_layer_set_idx_minus1[i] 79 #define VPS_MOVE_DIR_DEPENDENCY_FLAG 1 ///< JCTVC-M0268: Move the syntax element direct_dependency_flag to follow the syntax element dimension_id 80 #define VPS_PROFILE_OUTPUT_LAYERS 1 ///< JCTVC-M0268: Signal profile information and output layer information as in Sec. 3 of M0268v2 81 #define SPS_SUB_LAYER_INFO 1 ///< JCTVC-M0268: Do not signal sps_max_sub_layers_minus1 and sps_temporal_id_nesting_flag for nuh_layer_id greater than 0 82 #define VPS_SPLIT_FLAG 1 ///< JCTVC-M0163: Do not signal dimension_id and the last dimension_id_len_minus1, when splitting_flag is equal to 1. 73 83 #define M0457_PREDICTION_INDICATIONS 1 74 84 #define M0040_ADAPTIVE_RESOLUTION_CHANGE 1 75 #endif 76 77 #define SH_DISCARDABLE_FLAG 1 ///< M0152: Use one reserved flag in the slice header for discardable flag 85 #define VPS_VUI 1 ///< Include function structure for VPS VUI 86 87 #if VPS_VUI 88 #define TILE_BOUNDARY_ALIGNED_FLAG 1 ///< JCTVC-N0160/JCTVC-N0199 proposal 2 variant 2: VPS VUI flag to indicate tile boundary alignment 89 #define N0160_VUI_EXT_ILP_REF 1 ///< VUI extension inter-layer dependency offset signalling 90 #define VPS_VUI_BITRATE_PICRATE 1 ///< JCTVC-N0085: Signal bit rate and picture in VPS VUI 91 #else 92 #define M0464_TILE_BOUNDARY_ALIGNED_FLAG 0 ///< VUI flag to indicate tile boundary alignment 93 #endif //VPS_VUI 94 95 #endif 96 97 #define VPS_EXTN_OFFSET 1 ///< implementation of vps_extension_offset syntax element 98 #define SPS_PTL_FIX 1 ///< remove profile_tier_level from enhancement layer SPS 99 #define SH_DISCARDABLE_FLAG 1 ///< JCTVC-M0152: Use one reserved flag in the slice header for discardable flag 78 100 79 101 #define DERIVE_LAYER_ID_LIST_VARIABLES 1 ///< Derived variables based on the variables in VPS - for use in syntax table parsing 80 102 81 #define SVC_COL_BLK 1 ///< get co-located block82 103 #define SVC_UPSAMPLING 1 ///< upsampling filters 83 104 #define ROUNDING_OFFSET 1 ///< JCTVC-N0111: upsampling rounding offset using scalling factors 84 #define N0214_INTERMEDIATE_BUFFER_16BITS 1 ///< JCTVC-N0214 support base layer input more than 8 bits105 #define N0214_INTERMEDIATE_BUFFER_16BITS 1 ///< JCTVC-N0214: support base layer input more than 8 bits 85 106 #define ARBITRARY_SPATIAL_RATIO 0 ///< JCTVC-N0219, JCTVC-N0273: Support arbitrary spatial ratio 86 107 #define BUGFIX_RESAMPLE 1 ///< JCTVC-N0055: resampling bug fix for positive left scalled offset 87 108 88 #define SIMPLIFIED_MV_POS_SCALING 1 ///< M0133/M0449: inter-layer MV scaling and pixel mapping position calculation89 #define ILP_DECODED_PICTURE 1 ///< M0274: use decoded picture for inter-layer prediction90 109 #define JCTVC_M0259_LAMBDAREFINEMENT 1 ///< JCTVC-M0259: lambda refinement (encoder only optimization) 91 110 #define RESTR_CHK 1 ///< JCTVC-M0208 proposal 1 92 111 #define ILP_RAP 1 ///< JCTVC-M0208 proposal 3 93 112 94 #define REF_IDX_FRAMEWORK 1 ///< inter-layer reference framework95 96 #define IDR_ALIGNMENT 1 ///< align IDR picures across layers97 98 113 #define AVC_BASE 1 ///< YUV BL reading for AVC base SVC 99 114 #if AVC_BASE … … 101 116 #endif 102 117 103 #if REF_IDX_FRAMEWORK 104 #define REF_IDX_ME_ZEROMV 1 ///< L0051: use zero motion for inter-layer reference picture (without fractional ME) 105 #define ENCODER_FAST_MODE 1 ///< L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1. 106 #define REF_IDX_MFM 1 ///< L0336: motion vector mapping of inter-layer reference picture 118 #define REF_IDX_ME_ZEROMV 1 ///< JCTVC-L0051: use zero motion for inter-layer reference picture (without fractional ME) 119 #define ENCODER_FAST_MODE 1 ///< JCTVC-L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1. 120 #define REF_IDX_MFM 1 ///< JCTVC-L0336: motion vector mapping of inter-layer reference picture 107 121 #define JCTVC_M0458_INTERLAYER_RPS_SIG 1 ///< implementation of JCTVC-L0178 108 122 #if JCTVC_M0458_INTERLAYER_RPS_SIG 109 123 #define MAX_ONE_RESAMPLING_DIRECT_LAYERS 1 ///< Allow maximum of one resampling process for direct reference layers 110 #endif 111 #define JCTVC_M0203_INTERLAYER_PRED_IDC 1 ///< implementation of JCTVC-M0203 Inter-layer Prediction Indication 124 #define MOTION_RESAMPLING_CONSTRAINT 1 ///< JCTVC-N0108: Allow maximum of one motion resampling process for direct reference layers, and use motion inter-layer prediction from the same layer as texture inter-layer prediction. 125 #endif 126 #define JCTVC_M0203_INTERLAYER_PRED_IDC 1 ///< JCTVC-M0203: implementation of Inter-layer Prediction Indication 112 127 #if JCTVC_M0203_INTERLAYER_PRED_IDC 113 #define ILR_RESTR 1 ///< JCTVC-M0209 Inter-layer RPS and RPL 114 #define N0120_MAX_TID_REF_PRESENT_FLAG 1 ///< JCTVC-N0120 max_tid_ref_pics_plus1_present_flag 128 #define ILR_RESTR 1 ///< JCTVC-M0209: Inter-layer RPS and RPL 129 #define ILR_RESTR_FIX 1 ///< Fix encoder crash when temporal layers are used with scalable coding 130 #define EARLY_REF_PIC_MARKING 1 ///< Decoded picture marking of sub-layer non-reference pictures 131 #define N0120_MAX_TID_REF_PRESENT_FLAG 1 ///< JCTVC-N0120: max_tid_ref_pics_plus1_present_flag 132 #define N0120_MAX_TID_REF_CFG 1 ///< set max_tid_il_ref_pics_plus1 and max_tid_ref_present_flag in the config. file (configuration setting) 115 133 #endif 116 134 #if REF_IDX_MFM 117 #define REMOVE_COL_PICTURE_SIGNALING 1 ///< JCTVC-N0107 remove alternative collocated picture signalling135 #define REMOVE_COL_PICTURE_SIGNALING 1 ///< JCTVC-N0107: remove alternative collocated picture signalling 118 136 #define M0457_COL_PICTURE_SIGNALING 1 137 #define N0139_POSITION_ROUNDING_OFFSET 1 ///< JCTVC-N0139: offset for collocated block in motion mapping 119 138 #endif 120 139 … … 124 143 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107 125 144 #endif 126 #endif 127 128 #define FAST_INTRA_SHVC 1 ///< M0115: reduction number of intra modes in the EL (encoder only) 145 146 #define N0147_IRAP_ALIGN_FLAG 1 ///< a flag to indicatate whether IRAPs are aligned across layers 147 #if !N0147_IRAP_ALIGN_FLAG 148 #define IDR_ALIGNMENT 1 ///< align IDR picures across layers : As per JCTVC-N0373, IDR are not required to be aligned. 149 #endif 150 #define FAST_INTRA_SHVC 1 ///< JCTVC-M0115: reduction number of intra modes in the EL (encoder only) 129 151 #if FAST_INTRA_SHVC 130 #define NB_REMAIN_MODES 2 ///< nb of remaining modes (M0115) 131 #endif 132 133 #define RC_SHVC_HARMONIZATION 1 ///< JCTVC-M0037, rate control for SHVC 134 135 #else 136 #define ILP_DECODED_PICTURE 0 152 #define NB_REMAIN_MODES 2 ///< JCTVC-M0115: nb of remaining modes 153 #endif 154 155 #define RC_SHVC_HARMONIZATION 1 ///< JCTVC-M0037: rate control for SHVC 156 157 #define VIEW_ID_RELATED_SIGNALING 1 ///< Introduce syntax elements view_id_len_minus1 and view_id_val 158 #define M0043_LAYERS_PRESENT_SEI 0 ///< JCTVC-M0043: add layers present SEI. Macro shall be equal to 0 according to the JCTVC-N0174 discussion. The code is to be removed. 159 #define N0383_IL_CONSTRAINED_TILE_SETS_SEI 1 160 #define N0065_LAYER_POC_ALIGNMENT 1 161 #else 137 162 #define SYNTAX_OUTPUT 0 138 163 #endif // SVC_EXTENSION … … 143 168 144 169 #define FIX1071 1 ///< fix for issue #1071 145 #define M0043_LAYERS_PRESENT_SEI 0 ///< M0043: add layers present SEI146 170 147 171 #define MAX_NUM_PICS_IN_SOP 1024 … … 606 630 }; 607 631 } 632 #if VIEW_ID_RELATED_SIGNALING 633 /// scalability types 634 enum ScalabilityType 635 { 636 VIEW_ORDER_INDEX = 1, 637 SCALABILITY_ID = 2, 638 }; 639 #endif 608 640 //! \} 609 641
Note: See TracChangeset for help on using the changeset viewer.