Changeset 588 in SHVCSoftware for trunk/source/Lib/TLibCommon
- Timestamp:
- 1 Feb 2014, 23:50:54 (11 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-5.0-dev (added) merged: 548-585,587
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-5.0-dev/source (added) merged: 549-585 /trunk/source removed
- Property svn:mergeinfo changed
-
trunk/source/Lib/TLibCommon/CommonDef.h
r540 r588 57 57 #if SVC_EXTENSION 58 58 #include <vector> 59 #define NV_VERSION " 4.1" ///< Current software version59 #define NV_VERSION "5.0 (HM-12.1)" ///< Current software version 60 60 #else 61 61 #define NV_VERSION "12.1" ///< Current software version … … 284 284 { 285 285 Int m_targetLayerId; 286 Int m_ outputLayerSetIdx;286 Int m_targetOutputLayerSetIdx; 287 287 std::vector<Int> *m_targetDecLayerIdSet; 288 288 Bool m_valueCheckedFlag; … … 290 290 CommonDecoderParams(): 291 291 m_targetLayerId(0) 292 , m_ outputLayerSetIdx(-1)292 , m_targetOutputLayerSetIdx(-1) 293 293 , m_targetDecLayerIdSet(NULL) 294 294 , m_valueCheckedFlag(false) … … 298 298 Int getTargetLayerId() { return m_targetLayerId;} 299 299 300 Void set OutputLayerSetIdx(const Int x) { m_outputLayerSetIdx = x; }301 Int get OutputLayerSetIdx() { return m_outputLayerSetIdx;}300 Void setTargetOutputLayerSetIdx(const Int x) { m_targetOutputLayerSetIdx = x; } 301 Int getTargetOutputLayerSetIdx() { return m_targetOutputLayerSetIdx;} 302 302 303 303 Void setTargetDecLayerIdSet(std::vector<Int> *x) { m_targetDecLayerIdSet = x; } -
trunk/source/Lib/TLibCommon/SEI.cpp
r313 r588 41 41 //Table D-7 Meaning of camera iso sensitivity indicator and exposure index rating indicator 42 42 Int Table_exp_indicator[32] = {0, 10, 12, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, -1}; 43 44 #if SUB_BITSTREAM_PROPERTY_SEI 45 SEISubBitstreamProperty::SEISubBitstreamProperty() 46 { 47 m_activeVpsId = -1; 48 m_numAdditionalSubStreams = 0; 49 ::memset(m_subBitstreamMode , 0, sizeof(m_subBitstreamMode)); 50 ::memset(m_outputLayerSetIdxToVps , 0, sizeof(m_outputLayerSetIdxToVps)); 51 ::memset(m_highestSublayerId , 0, sizeof(m_highestSublayerId)); 52 ::memset(m_avgBitRate , 0, sizeof(m_avgBitRate)); 53 ::memset(m_maxBitRate , 0, sizeof(m_maxBitRate)); 54 } 55 #endif 43 56 44 57 SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType) -
trunk/source/Lib/TLibCommon/SEI.h
r442 r588 72 72 SCALABLE_NESTING = 133, 73 73 REGION_REFRESH_INFO = 134, 74 #if M0043_LAYERS_PRESENT_SEI75 LAYERS_ PRESENT= 137,74 #if LAYERS_NOT_PRESENT_SEI 75 LAYERS_NOT_PRESENT = 137, 76 76 #endif 77 77 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 78 78 INTER_LAYER_CONSTRAINED_TILE_SETS = 138 79 #endif 80 #if SUB_BITSTREAM_PROPERTY_SEI 81 ,SUB_BITSTREAM_PROPERTY = 139 // Final PayloadType to be defined after finalization 79 82 #endif 80 83 }; … … 319 322 }; 320 323 321 #if M0043_LAYERS_PRESENT_SEI322 class SEILayers Present : public SEI323 { 324 public: 325 PayloadType payloadType() const { return LAYERS_ PRESENT; }326 327 SEILayers Present() {}328 virtual ~SEILayers Present() {}324 #if LAYERS_NOT_PRESENT_SEI 325 class SEILayersNotPresent : public SEI 326 { 327 public: 328 PayloadType payloadType() const { return LAYERS_NOT_PRESENT; } 329 330 SEILayersNotPresent() {} 331 virtual ~SEILayersNotPresent() {} 329 332 330 333 UInt m_activeVpsId; 331 334 UInt m_vpsMaxLayers; 332 Bool m_layer PresentFlag[MAX_LAYERS];335 Bool m_layerNotPresentFlag[MAX_LAYERS]; 333 336 }; 334 337 #endif … … 407 410 #endif 408 411 412 #if SUB_BITSTREAM_PROPERTY_SEI 413 class SEISubBitstreamProperty : public SEI 414 { 415 public: 416 PayloadType payloadType() const { return SUB_BITSTREAM_PROPERTY; } 417 418 SEISubBitstreamProperty(); 419 virtual ~SEISubBitstreamProperty() {} 420 421 Int m_activeVpsId; 422 Int m_numAdditionalSubStreams; 423 Int m_subBitstreamMode [MAX_SUB_STREAMS]; 424 Int m_outputLayerSetIdxToVps [MAX_SUB_STREAMS]; 425 Int m_highestSublayerId [MAX_SUB_STREAMS]; 426 Int m_avgBitRate [MAX_SUB_STREAMS]; 427 Int m_maxBitRate [MAX_SUB_STREAMS]; 428 }; 429 #endif 409 430 410 431 typedef std::list<SEI*> SEIMessages; -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r540 r588 3438 3438 3439 3439 // use coldir. 3440 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING3441 TComPic *pColPic;3442 if (m_layerId > 0 && getSlice()->getAltColIndicationFlag())3443 {3444 pColPic = getSlice()->getMotionPredIlp();3445 }3446 else3447 {3448 pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx());3449 }3450 #else3451 3440 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 3452 #endif3453 3441 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 3454 3442 if(pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE) -
trunk/source/Lib/TLibCommon/TComRom.cpp
r540 r588 530 530 Int g_mvScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 531 531 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 532 533 std::string NaluToStr( NalUnitType nalu ) 534 { 535 switch( nalu ) 536 { 537 case NAL_UNIT_CODED_SLICE_TRAIL_N: 538 case NAL_UNIT_CODED_SLICE_TRAIL_R: 539 return "TRAIL"; 540 541 case NAL_UNIT_CODED_SLICE_TSA_N: 542 case NAL_UNIT_CODED_SLICE_TSA_R: 543 return " TSA"; 544 545 case NAL_UNIT_CODED_SLICE_STSA_N: 546 case NAL_UNIT_CODED_SLICE_STSA_R: 547 return " STSA"; 548 549 case NAL_UNIT_CODED_SLICE_RADL_N: 550 case NAL_UNIT_CODED_SLICE_RADL_R: 551 return " RADL"; 552 553 case NAL_UNIT_CODED_SLICE_RASL_N: 554 case NAL_UNIT_CODED_SLICE_RASL_R: 555 return " RASL"; 556 557 case NAL_UNIT_CODED_SLICE_BLA_W_LP: 558 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: 559 case NAL_UNIT_CODED_SLICE_BLA_N_LP: 560 return " BLA"; 561 562 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: 563 case NAL_UNIT_CODED_SLICE_IDR_N_LP: 564 return " IDR"; 565 566 case NAL_UNIT_CODED_SLICE_CRA: 567 return " CRA"; 568 569 default: 570 return " "; 571 }; 572 } 532 573 #endif 533 574 -
trunk/source/Lib/TLibCommon/TComRom.h
r540 r588 288 288 #if SVC_EXTENSION 289 289 extern Int g_mvScalingFactor [MAX_LAYERS][2]; 290 extern Int g_posScalingFactor [MAX_LAYERS][2]; 290 extern Int g_posScalingFactor [MAX_LAYERS][2]; 291 std::string NaluToStr( NalUnitType nalu ); 291 292 #endif 292 293 -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r547 r588 117 117 #if SVC_EXTENSION 118 118 memset( m_pcBaseColPic, 0, sizeof( m_pcBaseColPic ) ); 119 #if JCTVC_M0458_INTERLAYER_RPS_SIG120 119 m_activeNumILRRefIdx = 0; 121 120 m_interLayerPredEnabledFlag = 0; 122 121 ::memset( m_interLayerPredLayerIdc, 0, sizeof(m_interLayerPredLayerIdc) ); 123 #else124 m_numILRRefIdx = 0;125 #endif126 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING127 m_altColIndicationFlag = false;128 m_colRefLayerIdx = 0;129 #endif130 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG131 m_numSamplePredRefLayers = 0;132 m_interLayerSamplePredOnlyFlag = false;133 #endif134 122 #endif //SVC_EXTENSION 135 123 … … 175 163 #if SVC_EXTENSION 176 164 m_layerId = layerId; 177 #if JCTVC_M0458_INTERLAYER_RPS_SIG178 165 m_activeNumILRRefIdx = 0; 179 166 m_interLayerPredEnabledFlag = 0; 180 #else181 m_numILRRefIdx = 0;182 #endif183 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG184 m_numSamplePredRefLayers = 0;185 m_interLayerSamplePredOnlyFlag = false;186 #endif187 167 #endif 188 168 m_aiNumRefIdx[0] = 0; … … 410 390 pcRefPic->getPicYuvRec()->extendPicBorder(); 411 391 RefPicSetStCurr0[NumPocStCurr0] = pcRefPic; 412 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG413 if( !m_interLayerSamplePredOnlyFlag || pcRefPic->getLayerId() < getLayerId())414 #endif415 392 NumPocStCurr0++; 416 393 pcRefPic->setCheckLTMSBPresent(false); … … 426 403 pcRefPic->getPicYuvRec()->extendPicBorder(); 427 404 RefPicSetStCurr1[NumPocStCurr1] = pcRefPic; 428 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG429 if( !m_interLayerSamplePredOnlyFlag || pcRefPic->getLayerId() < getLayerId())430 #endif431 405 NumPocStCurr1++; 432 406 pcRefPic->setCheckLTMSBPresent(false); … … 442 416 pcRefPic->getPicYuvRec()->extendPicBorder(); 443 417 RefPicSetLtCurr[NumPocLtCurr] = pcRefPic; 444 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG445 if( !m_interLayerSamplePredOnlyFlag || pcRefPic->getLayerId() < getLayerId())446 #endif447 418 NumPocLtCurr++; 448 419 } … … 470 441 { 471 442 #if REF_IDX_MFM 472 #if M0457_COL_PICTURE_SIGNALING473 443 if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && getMFMEnabledFlag()) 474 #else475 if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && m_pcSPS->getMFMEnabledFlag())476 #endif477 444 { 478 445 ilpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc] ); … … 508 475 { 509 476 numInterLayerRPSPics++; 510 } 511 } 512 #if JCTVC_M0458_INTERLAYER_RPS_SIG 477 #if DISCARDABLE_PIC_RPS 478 assert( ilpPic[i]->getSlice(0)->getDiscardableFlag() == 0 ); // Inter-layer RPS shall not contain picture with discardable_flag = 1. 479 #endif 480 } 481 } 513 482 if (numInterLayerRPSPics < m_activeNumILRRefIdx) 514 483 { … … 589 558 #endif 590 559 } 591 #endif 592 #else 593 if (numInterLayerRPSPics < m_numILRRefIdx) 594 { 595 m_numILRRefIdx = numInterLayerRPSPics; 596 } 597 #endif 598 } 599 #if JCTVC_M0458_INTERLAYER_RPS_SIG 560 #endif 561 } 600 562 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_activeNumILRRefIdx; 601 #else602 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_numILRRefIdx;603 #endif604 563 #else //SVC_EXTENSION 605 564 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; … … 609 568 { 610 569 // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance that the following applies to the value of NumPocTotalCurr: 611 #if ILP_RAP// inter-layer prediction is allowed for BLA, CRA pictures of nuh_layer_id>0570 #if SVC_EXTENSION // inter-layer prediction is allowed for BLA, CRA pictures of nuh_layer_id>0 612 571 // – If the current picture is a BLA or CRA picture with nuh_layer_id equal to 0, the value of NumPocTotalCurr shall be equal to 0. 613 572 // – Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0. … … 623 582 624 583 if (m_eSliceType == I_SLICE) 625 {584 { 626 585 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 627 586 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 628 587 629 588 return; 630 589 } 631 590 632 591 assert(numPocTotalCurr > 0); 633 592 634 593 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 635 594 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 636 595 } 637 596 638 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG639 if( m_interLayerSamplePredOnlyFlag && getLayerId() )640 {641 m_aiNumRefIdx[0] = m_aiNumRefIdx[0] > m_activeNumILRRefIdx ? m_activeNumILRRefIdx : m_aiNumRefIdx[0];642 m_aiNumRefIdx[1] = m_aiNumRefIdx[1] > m_activeNumILRRefIdx ? m_activeNumILRRefIdx : m_aiNumRefIdx[1];643 }644 #endif645 646 597 Int cIdx = 0; 647 598 for ( i=0; i<NumPocStCurr0; i++, cIdx++) … … 653 604 if( m_layerId > 0 ) 654 605 { 655 #if JCTVC_M0458_INTERLAYER_RPS_SIG656 606 for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 657 #else658 for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)659 #endif660 607 { 661 608 Int refLayerIdc = m_interLayerPredLayerIdc[i]; … … 685 632 if( m_layerId > 0 ) 686 633 { 687 #if JCTVC_M0458_INTERLAYER_RPS_SIG688 634 for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 689 #else690 for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)691 #endif692 635 { 693 636 Int refLayerIdc = m_interLayerPredLayerIdc[i]; … … 726 669 if( m_layerId > 0 ) 727 670 { 728 #if JCTVC_M0458_INTERLAYER_RPS_SIG729 671 for( i = 0; i < m_activeNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 730 #else731 for( i = 0; i < m_numILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++)732 #endif733 672 { 734 673 Int refLayerIdc = m_interLayerPredLayerIdc[i]; … … 832 771 else 833 772 { 834 #if JCTVC_M0458_INTERLAYER_RPS_SIG835 773 for(Int i = m_activeNumILRRefIdx; i > 0; i-- ) 836 #else837 for(Int i = m_numILRRefIdx; i > 0; i-- )838 #endif839 774 { 840 775 #if RPL_INIT_N0316_N0082 … … 881 816 else 882 817 { 883 #if JCTVC_M0458_INTERLAYER_RPS_SIG884 818 for(Int i = m_activeNumILRRefIdx; i > 0; i-- ) 885 #else886 for(Int i = m_numILRRefIdx; i > 0; i-- )887 #endif888 819 { 889 820 refPicListModification->setRefPicSetIdxL1(m_aiNumRefIdx[REF_PIC_LIST_1] - i, numberOfRpsCurrTempList - i); … … 927 858 { 928 859 #if SVC_EXTENSION 929 #if JCTVC_M0458_INTERLAYER_RPS_SIG930 860 return m_activeNumILRRefIdx; 931 #else932 return getNumILRRefIdx();933 #endif934 861 #else 935 862 return 0; … … 946 873 if( m_layerId > 0 ) 947 874 { 948 #if JCTVC_M0458_INTERLAYER_RPS_SIG949 875 numRpsCurrTempList += m_activeNumILRRefIdx; 950 #else951 numRpsCurrTempList += getNumILRRefIdx();952 #endif953 876 } 954 877 #endif … … 1179 1102 m_pcVPS = pSrc->m_pcVPS; 1180 1103 m_layerId = pSrc->m_layerId; 1181 #if JCTVC_M0458_INTERLAYER_RPS_SIG1182 1104 m_activeNumILRRefIdx = pSrc->m_activeNumILRRefIdx; 1183 1105 m_interLayerPredEnabledFlag = pSrc->m_interLayerPredEnabledFlag; 1184 1106 memcpy( m_interLayerPredLayerIdc, pSrc->m_interLayerPredLayerIdc, sizeof( m_interLayerPredLayerIdc ) ); 1185 #endif1186 1107 #endif 1187 1108 m_pcSPS = pSrc->m_pcSPS; … … 1508 1429 1509 1430 } 1431 #if DISCARDABLE_PIC_RPS 1432 if( isReference ) // Current picture is in the temporal RPS 1433 { 1434 assert( rpcPic->getSlice(0)->getDiscardableFlag() == 0 ); // Temporal RPS shall not contain picture with discardable_flag equal to 1 1435 } 1436 #endif 1510 1437 // mark the picture as "unused for reference" if it is not in 1511 1438 // the Reference Picture Set … … 2010 1937 , m_bitDepthVpsChroma (0) 2011 1938 {} 1939 #if RESOLUTION_BASED_DPB 1940 Void RepFormat::init() 1941 { 1942 m_chromaFormatVpsIdc = CHROMA_420; 1943 m_separateColourPlaneVpsFlag = false; 1944 m_picWidthVpsInLumaSamples = 0; 1945 m_picHeightVpsInLumaSamples = 0; 1946 m_bitDepthVpsLuma = 0; 1947 m_bitDepthVpsChroma = 0; 1948 } 1949 #endif 2012 1950 #endif 2013 1951 … … 2036 1974 #endif 2037 1975 , m_numProfileTierLevel (0) 1976 #if !VPS_EXTN_UEV_CODING 2038 1977 , m_moreOutputLayerSetsThanDefaultFlag (false) 1978 #endif 2039 1979 , m_numAddOutputLayerSets (0) 1980 #if P0295_DEFAULT_OUT_LAYER_IDC 1981 , m_defaultTargetOutputLayerIdc (0) 1982 #else 2040 1983 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 2041 1984 , m_defaultOneTargetOutputLayerIdc (0) 2042 1985 #else 2043 1986 , m_defaultOneTargetOutputLayerFlag (false) 1987 #endif 2044 1988 #endif 2045 1989 #if VPS_VUI_BITRATE_PICRATE … … 2058 2002 #endif 2059 2003 #endif 2004 #if !P0307_REMOVE_VPS_VUI_OFFSET 2060 2005 #if VPS_VUI_OFFSET 2061 2006 , m_vpsVuiOffset (0) 2007 #endif 2008 #endif 2009 #if P0307_VPS_NON_VUI_EXTENSION 2010 , m_vpsNonVuiExtLength (0) 2062 2011 #endif 2063 2012 { … … 2082 2031 #if VPS_EXTN_PROFILE_INFO 2083 2032 ::memset(m_profilePresentFlag, 0, sizeof(m_profilePresentFlag)); 2033 #if !P0048_REMOVE_PROFILE_REF 2084 2034 ::memset(m_profileLayerSetRef, 0, sizeof(m_profileLayerSetRef)); 2035 #endif 2085 2036 #endif 2086 2037 #if VPS_EXTN_OP_LAYER_SETS … … 2094 2045 ::memset(m_numDirectRefLayers, 0, sizeof(m_numDirectRefLayers )); 2095 2046 ::memset(m_refLayerId, 0, sizeof(m_refLayerId )); 2096 #if M0457_PREDICTION_INDICATIONS2097 2047 m_directDepTypeLen = 2; 2098 2048 ::memset(m_directDependencyType, 0, sizeof(m_directDependencyType)); 2099 #endif2100 2049 #endif 2101 2050 #if DERIVE_LAYER_ID_LIST_VARIABLES … … 2104 2053 #endif 2105 2054 ::memset(m_profileLevelTierIdx, 0, sizeof(m_profileLevelTierIdx)); 2106 #if JCTVC_M0458_INTERLAYER_RPS_SIG2107 2055 m_maxOneActiveRefLayerFlag = true; 2108 #endif2109 2056 #if O0062_POC_LSB_NOT_PRESENT_FLAG 2110 2057 ::memset(m_pocLsbNotPresentFlag, 0, sizeof(m_pocLsbNotPresentFlag)); … … 2116 2063 m_crossLayerIrapAlignFlag = true; 2117 2064 #endif 2118 #if JCTVC_M0203_INTERLAYER_PRED_IDC2119 2065 #if N0120_MAX_TID_REF_PRESENT_FLAG 2120 2066 m_maxTidRefPresentFlag = true; … … 2123 2069 { 2124 2070 #if O0225_MAX_TID_FOR_REF_LAYERS 2125 for( Int j = 0; j < MAX_VPS_LAYER_ID_PLUS1; j++)2126 {2127 m_maxTidIlRefPicsPlus1[i][j] = m_uiMaxTLayers + 1;2128 }2071 for( Int j = 0; j < MAX_VPS_LAYER_ID_PLUS1; j++) 2072 { 2073 m_maxTidIlRefPicsPlus1[i][j] = m_uiMaxTLayers + 1; 2074 } 2129 2075 #else 2130 2076 m_maxTidIlRefPicsPlus1[i] = m_uiMaxTLayers + 1; 2131 2077 #endif 2132 2078 } 2133 #endif2134 2079 #if VPS_VUI_TILES_NOT_IN_USE__FLAG 2135 2136 2137 2080 m_tilesNotInUseFlag = true; 2081 ::memset(m_tilesInUseFlag, 0, sizeof(m_tilesInUseFlag)); 2082 ::memset(m_loopFilterNotAcrossTilesFlag, 0, sizeof(m_loopFilterNotAcrossTilesFlag)); 2138 2083 #endif 2139 2084 #if TILE_BOUNDARY_ALIGNED_FLAG 2140 2085 ::memset(m_tileBoundariesAlignedFlag, 0, sizeof(m_tileBoundariesAlignedFlag)); 2141 2086 #endif 2142 2087 #if VPS_VUI_WPP_NOT_IN_USE__FLAG 2143 2144 2088 m_wppNotInUseFlag = true; 2089 ::memset(m_wppInUseFlag, 0, sizeof(m_wppInUseFlag)); 2145 2090 #endif 2146 2091 #if N0160_VUI_EXT_ILP_REF 2147 m_numIlpRestrictedRefLayers= false;2148 2149 2150 2092 m_ilpRestrictedRefLayersFlag = false; 2093 ::memset(m_minSpatialSegmentOffsetPlus1, 0, sizeof(m_minSpatialSegmentOffsetPlus1)); 2094 ::memset(m_ctuBasedOffsetEnabledFlag, 0, sizeof(m_ctuBasedOffsetEnabledFlag)); 2095 ::memset(m_minHorizontalCtuOffsetPlus1, 0, sizeof(m_minHorizontalCtuOffsetPlus1)); 2151 2096 #endif 2152 2097 #if VPS_VUI_VIDEO_SIGNAL 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2098 m_vidSigPresentVpsFlag=true; 2099 m_vpsVidSigInfo=1; 2100 ::memset( m_vpsVidSigIdx, 0, sizeof(m_vpsVidSigIdx) ); 2101 m_vpsVidSigIdx[0]=0; 2102 for (Int i=0; i < 16; i++) 2103 { 2104 m_vpsVidFormat[i] = 5; 2105 m_vpsFullRangeFlag[i] = false; 2106 m_vpsColorPrimaries[i] = 2; 2107 m_vpsTransChar[i] = 2; 2108 m_vpsMatCoeff[i] = 2; 2109 } 2165 2110 #endif 2166 2111 #if VPS_VUI_BITRATE_PICRATE … … 2192 2137 ::memset( m_subLayerDpbInfoPresentFlag, 0, sizeof(m_subLayerDpbInfoPresentFlag ) ); 2193 2138 ::memset( m_maxVpsDecPicBufferingMinus1, 0, sizeof(m_maxVpsDecPicBufferingMinus1 ) ); 2139 #if RESOLUTION_BASED_DPB 2140 ::memset( m_maxVpsLayerDecPicBuffMinus1, 0, sizeof(m_maxVpsLayerDecPicBuffMinus1 ) ); 2141 #endif 2194 2142 ::memset( m_maxVpsNumReorderPics, 0, sizeof(m_maxVpsNumReorderPics ) ); 2195 2143 ::memset( m_maxVpsLatencyIncreasePlus1, 0, sizeof(m_maxVpsLatencyIncreasePlus1 ) ); … … 2248 2196 } 2249 2197 #endif 2198 #if !RESOLUTION_BASED_DPB 2250 2199 #if VPS_DPB_SIZE_TABLE 2251 2200 Void TComVPS::deriveNumberOfSubDpbs() 2252 2201 { 2253 2202 // Derive number of sub-DPBs 2203 #if CHANGE_NUMSUBDPB_IDX 2204 // For layer set 0 2205 setNumSubDpbs(0, 1); 2206 // For other layer sets 2207 for( Int i = 1; i < getNumLayerSets(); i++) 2208 { 2209 setNumSubDpbs( i, getNumLayersInIdList( i ) ); 2210 } 2211 #else 2254 2212 // For output layer set 0 2255 2213 setNumSubDpbs(0, 1); … … 2259 2217 setNumSubDpbs( i, getNumLayersInIdList( getOutputLayerSetIdx(i)) ); 2260 2218 } 2261 } 2219 #endif 2220 } 2221 #endif 2262 2222 #endif 2263 2223 #if VPS_VUI_TILES_NOT_IN_USE__FLAG … … 2358 2318 2359 2319 return scalIdx; 2320 } 2321 #endif 2322 #if VPS_DPB_SIZE_TABLE 2323 Void TComVPS::determineSubDpbInfoFlags() 2324 { 2325 for(Int i = 1; i < getNumOutputLayerSets(); i++) 2326 { 2327 Int layerSetIdxForOutputLayerSet = getOutputLayerSetIdx( i ); 2328 // For each output layer set, set the DPB size for each layer and the reorder/latency value the maximum for all layers 2329 Bool checkFlagOuter = false; // Used to calculate sub_layer_flag_info_present_flag 2330 Bool checkFlagInner[MAX_TLAYER]; // Used to calculate sub_layer_dpb_info_present_flag 2331 2332 for(Int j = 0; j < getMaxTLayers(); j++) 2333 { 2334 // -------------------------------------------------------- 2335 // To determine value of m_subLayerDpbInfoPresentFlag 2336 // -------------------------------------------------------- 2337 if( j == 0 ) // checkFlagInner[0] is always 1 2338 { 2339 checkFlagInner[j] = true; // Always signal sub-layer DPB information for the first sub-layer 2340 } 2341 else 2342 { 2343 checkFlagInner[j] = false; // Initialize to be false. If the values of the current sub-layers matches with the earlier sub-layer, 2344 // then will be continue to be false - i.e. the j-th sub-layer DPB info is not signaled 2345 checkFlagInner[j] |= ( getMaxVpsNumReorderPics(i, j) != getMaxVpsNumReorderPics(i, j - 1) ); 2346 #if CHANGE_NUMSUBDPB_IDX 2347 for(Int subDpbIdx = 0; subDpbIdx < getNumSubDpbs(layerSetIdxForOutputLayerSet) && !checkFlagInner[j]; subDpbIdx++) // If checkFlagInner[j] is true, break and signal the values 2348 #else 2349 for(Int k = 0; k < getNumSubDpbs(i) && !checkFlagInner[j]; k++) // If checkFlagInner[j] is true, break and signal the values 2350 #endif 2351 { 2352 checkFlagInner[j] |= ( getMaxVpsDecPicBufferingMinus1(i, subDpbIdx, j - 1) != getMaxVpsDecPicBufferingMinus1(i, subDpbIdx, j) ); 2353 } 2354 #if RESOLUTION_BASED_DPB 2355 for(Int layerIdx = 0; layerIdx < this->getNumLayersInIdList(layerSetIdxForOutputLayerSet) && !checkFlagInner[j]; layerIdx++) // If checkFlagInner[j] is true, break and signal the values 2356 { 2357 checkFlagInner[j] |= ( getMaxVpsLayerDecPicBuffMinus1(i, layerIdx, j - 1) != getMaxVpsLayerDecPicBuffMinus1(i, layerIdx, j) ); 2358 } 2359 #endif 2360 } 2361 // If checkFlagInner[j] = true, then some value needs to be signalled for the j-th sub-layer 2362 setSubLayerDpbInfoPresentFlag( i, j, checkFlagInner[j] ); 2363 } 2364 2365 // -------------------------------------------------------- 2366 // To determine value of m_subLayerFlagInfoPresentFlag 2367 // -------------------------------------------------------- 2368 2369 for(Int j = 1; j < getMaxTLayers(); j++) // Check if DPB info of any of non-zero sub-layers is signaled. If so set flag to one 2370 { 2371 if( getSubLayerDpbInfoPresentFlag(i, j) ) 2372 { 2373 checkFlagOuter = true; 2374 break; 2375 } 2376 } 2377 setSubLayerFlagInfoPresentFlag( i, checkFlagOuter ); 2378 } 2379 } 2380 #endif 2381 #if RESOLUTION_BASED_DPB 2382 Void TComVPS::assignSubDpbIndices() 2383 { 2384 RepFormat layerRepFormat [MAX_LAYERS]; 2385 RepFormat subDpbRepFormat [MAX_LAYERS]; 2386 2387 for(Int lsIdx = 0; lsIdx < this->getNumLayerSets(); lsIdx++) 2388 { 2389 for(Int j = 0; j < MAX_LAYERS; j++) 2390 { 2391 layerRepFormat [j].init(); 2392 subDpbRepFormat[j].init(); 2393 } 2394 2395 // Assign resolution, bit-depth, colour format for each layer in the layer set 2396 for(Int i = 0; i < this->getNumLayersInIdList( lsIdx ); i++) 2397 { 2398 Int layerIdxInVps = this->getLayerIdInVps( this->getLayerSetLayerIdList(lsIdx, i) ); 2399 Int repFormatIdx = this->getVpsRepFormatIdx( layerIdxInVps ); 2400 RepFormat* repFormat = this->getVpsRepFormat( repFormatIdx ); 2401 2402 // Assign the rep_format() to the layer 2403 layerRepFormat[i] = *repFormat; 2404 } 2405 2406 // ---------------------------------------- 2407 // Sub-DPB assignment 2408 // ---------------------------------------- 2409 // For the base layer 2410 m_subDpbAssigned[lsIdx][0] = 0; 2411 subDpbRepFormat[0] = layerRepFormat[0]; 2412 2413 // Sub-DPB counter 2414 Int subDpbCtr = 1; 2415 2416 for(Int i = 1; i < this->getNumLayersInIdList( lsIdx ); i++) 2417 { 2418 Bool newSubDpbFlag = true; 2419 for(Int j = 0; (j < subDpbCtr) && (newSubDpbFlag); j++) 2420 { 2421 if( RepFormat::checkSameSubDpb( layerRepFormat[i], subDpbRepFormat[j] ) ) 2422 { 2423 // Belong to i-th sub-DPB 2424 m_subDpbAssigned[lsIdx][i] = j; 2425 newSubDpbFlag = false; 2426 } 2427 } 2428 if( newSubDpbFlag ) 2429 { 2430 // New sub-DPB 2431 subDpbRepFormat[subDpbCtr] = layerRepFormat[i]; 2432 m_subDpbAssigned[lsIdx][i] = subDpbCtr; 2433 subDpbCtr++; // Increment # subDpbs 2434 } 2435 } 2436 m_numSubDpbs[lsIdx] = subDpbCtr; 2437 } 2438 } 2439 Int TComVPS::findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId ) 2440 { 2441 for(Int i = 0; i < this->getNumLayersInIdList(lsIdx); i++) 2442 { 2443 if( this->getLayerSetLayerIdList( lsIdx, i) == nuhLayerId ) 2444 { 2445 return i; 2446 } 2447 } 2448 return -1; // Layer not found 2449 } 2450 // RepFormat Assignment operator 2451 RepFormat& RepFormat::operator= (const RepFormat &other) 2452 { 2453 if( this != &other) 2454 { 2455 m_chromaAndBitDepthVpsPresentFlag = other.m_chromaAndBitDepthVpsPresentFlag; 2456 m_chromaFormatVpsIdc = other.m_chromaFormatVpsIdc; 2457 m_separateColourPlaneVpsFlag = other.m_separateColourPlaneVpsFlag; 2458 m_picWidthVpsInLumaSamples = other.m_picWidthVpsInLumaSamples; 2459 m_picHeightVpsInLumaSamples = other.m_picHeightVpsInLumaSamples; 2460 m_bitDepthVpsLuma = other.m_bitDepthVpsLuma; 2461 m_bitDepthVpsChroma = other.m_bitDepthVpsChroma; 2462 } 2463 return *this; 2464 } 2465 2466 // Check whether x and y share the same resolution, chroma format and bit-depth. 2467 Bool RepFormat::checkSameSubDpb(const RepFormat &x, const RepFormat &y) 2468 { 2469 return ( (x.m_chromaFormatVpsIdc == y.m_chromaFormatVpsIdc) 2470 && (x.m_picWidthVpsInLumaSamples == y.m_picWidthVpsInLumaSamples) 2471 && (x.m_picHeightVpsInLumaSamples == y.m_picHeightVpsInLumaSamples) 2472 && (x.m_bitDepthVpsLuma == y.m_bitDepthVpsLuma) 2473 && (x.m_bitDepthVpsChroma == y.m_bitDepthVpsChroma) 2474 ); 2360 2475 } 2361 2476 #endif … … 2404 2519 , m_vuiParameters () 2405 2520 #if SVC_EXTENSION 2406 #if M0463_VUI_EXT_ILP_REF2407 , m_interViewMvVertConstraintFlag (false)2408 , m_numIlpRestrictedRefLayers ( 0 )2409 #endif2410 2521 , m_layerId ( 0 ) 2411 2522 , m_numScaledRefLayerOffsets ( 0 ) … … 2431 2542 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 2432 2543 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2433 #if M0463_VUI_EXT_ILP_REF2434 for (Int i = 0; i < MAX_LAYERS; i++ )2435 {2436 m_minSpatialSegmentOffsetPlus1[ i ] = 0;2437 m_ctuBasedOffsetEnabledFlag [ i ] = false;2438 m_minHorizontalCtuOffsetPlus1 [ i ] = 0;2439 }2440 #endif2441 2544 } 2442 2545 -
trunk/source/Lib/TLibCommon/TComSlice.h
r547 r588 422 422 public: 423 423 RepFormat(); 424 424 #if RESOLUTION_BASED_DPB 425 Void init(); 426 RepFormat& operator= (const RepFormat &); 427 static Bool checkSameSubDpb(const RepFormat &x, const RepFormat &y); 428 #endif 425 429 #if REPN_FORMAT_CONTROL_FLAG 426 430 Bool getChromaAndBitDepthVpsPresentFlag() { return m_chromaAndBitDepthVpsPresentFlag; } … … 483 487 Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; 484 488 #endif 489 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 485 490 #if VPS_EXTN_OFFSET 486 491 UInt m_extensionOffset; 492 #endif 487 493 #endif 488 494 #if VPS_RENAME … … 514 520 // Profile-tier-level signalling related 515 521 Bool m_profilePresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. 522 #if !P0048_REMOVE_PROFILE_REF 516 523 UInt m_profileLayerSetRef[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. 524 #endif 517 525 std::vector<TComPTL> m_pcPTLForExtn; 518 526 #endif … … 528 536 UInt m_numDirectRefLayers[MAX_VPS_LAYER_ID_PLUS1]; 529 537 UInt m_refLayerId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 530 #if M0457_PREDICTION_INDICATIONS531 538 UInt m_directDepTypeLen; 532 539 #if O0096_DEFAULT_DEPENDENCY_TYPE … … 536 543 UInt m_directDependencyType[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 537 544 #endif 538 #endif539 545 UInt m_numProfileTierLevel; 546 #if !VPS_EXTN_UEV_CODING 540 547 Bool m_moreOutputLayerSetsThanDefaultFlag; 548 #endif 541 549 Int m_numAddOutputLayerSets; 550 #if P0295_DEFAULT_OUT_LAYER_IDC 551 UInt m_defaultTargetOutputLayerIdc; 552 #else 542 553 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 543 554 UInt m_defaultOneTargetOutputLayerIdc; … … 545 556 Bool m_defaultOneTargetOutputLayerFlag; 546 557 #endif 558 #endif 547 559 Int m_profileLevelTierIdx[64]; 548 #if JCTVC_M0458_INTERLAYER_RPS_SIG549 560 Bool m_maxOneActiveRefLayerFlag; 550 #endif551 561 #if O0062_POC_LSB_NOT_PRESENT_FLAG 552 562 Bool m_pocLsbNotPresentFlag[MAX_VPS_LAYER_ID_PLUS1]; … … 558 568 Bool m_crossLayerIrapAlignFlag; 559 569 #endif 560 #if JCTVC_M0203_INTERLAYER_PRED_IDC561 570 #if O0225_MAX_TID_FOR_REF_LAYERS 562 571 UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1][MAX_VPS_LAYER_ID_PLUS1]; 563 572 #else 564 573 UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; 565 #endif566 574 #endif 567 575 #if N0120_MAX_TID_REF_PRESENT_FLAG … … 591 599 #endif 592 600 #if N0160_VUI_EXT_ILP_REF 593 Bool m_ numIlpRestrictedRefLayers;601 Bool m_ilpRestrictedRefLayersFlag; 594 602 Int m_minSpatialSegmentOffsetPlus1[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 595 603 Bool m_ctuBasedOffsetEnabledFlag [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; … … 597 605 #endif 598 606 #if VPS_VUI_VIDEO_SIGNAL 599 600 601 602 603 604 605 606 607 Bool m_vidSigPresentVpsFlag; 608 Int m_vpsVidSigInfo; 609 Int m_vpsVidSigIdx[MAX_VPS_LAYER_ID_PLUS1]; 610 Int m_vpsVidFormat[16]; 611 Bool m_vpsFullRangeFlag[16]; 612 Int m_vpsColorPrimaries[16]; 613 Int m_vpsTransChar[16]; 614 Int m_vpsMatCoeff[16]; 607 615 #endif 608 616 #if VPS_VUI_BITRATE_PICRATE … … 646 654 Bool m_subLayerDpbInfoPresentFlag [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; 647 655 Int m_maxVpsDecPicBufferingMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; 656 #if RESOLUTION_BASED_DPB 657 Int m_maxVpsLayerDecPicBuffMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; 658 #endif 648 659 Int m_maxVpsNumReorderPics [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; 649 660 Int m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; 661 #if CHANGE_NUMSUBDPB_IDX 662 Int m_numSubDpbs [MAX_VPS_LAYER_SETS_PLUS1]; 663 #else 650 664 Int m_numSubDpbs [MAX_VPS_OP_LAYER_SETS_PLUS1]; 665 #endif 651 666 #endif 652 667 … … 655 670 #endif 656 671 657 # endif //SVC_EXTENSION672 #if !P0307_REMOVE_VPS_VUI_OFFSET 658 673 #if VPS_VUI_OFFSET 659 674 Int m_vpsVuiOffset; 660 675 #endif 676 #endif 677 #if P0307_VPS_NON_VUI_EXTENSION 678 Int m_vpsNonVuiExtLength; 679 #endif 680 #if RESOLUTION_BASED_DPB 681 Int m_subDpbAssigned [MAX_VPS_LAYER_SETS_PLUS1][MAX_LAYERS]; 682 #endif 683 #endif //SVC_EXTENSION 661 684 public: 662 685 TComVPS(); … … 777 800 Void setProfilePresentFlag(Int id, Bool x) { m_profilePresentFlag[id] = x; } 778 801 802 #if !P0048_REMOVE_PROFILE_REF 779 803 UInt getProfileLayerSetRef(Int id) { return m_profileLayerSetRef[id]; } 780 804 Void setProfileLayerSetRef(Int id, Bool x) { m_profileLayerSetRef[id] = x; } 805 #endif 781 806 782 807 std::vector<TComPTL>* getPTLForExtnPtr() { return &m_pcPTLForExtn; } … … 805 830 Void setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId) { m_refLayerId[layerId][refLayerIdx] = refLayerId; } 806 831 807 #if M0457_PREDICTION_INDICATIONS808 832 UInt getDirectDepTypeLen() { return m_directDepTypeLen; } 809 833 Void setDirectDepTypeLen(UInt x) { m_directDepTypeLen = x; } … … 817 841 Void setDirectDependencyType(Int currLayerId, Int refLayerId, UInt x) { m_directDependencyType[currLayerId][refLayerId] = x; } 818 842 #endif 819 #endif820 843 UInt getNumProfileTierLevel() { return m_numProfileTierLevel; } 821 844 Void setNumProfileTierLevel(Int x) { m_numProfileTierLevel = x; } 822 845 846 #if !VPS_EXTN_UEV_CODING 823 847 Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag;} 824 848 Void setMoreOutputLayerSetsThanDefaultFlag(Bool x) { m_moreOutputLayerSetsThanDefaultFlag = x ;} 849 #endif 825 850 826 851 Int getNumAddOutputLayerSets() { return m_numAddOutputLayerSets; } 827 852 Void setNumAddOutputLayerSets(Int x) { m_numAddOutputLayerSets = x ; } 828 853 854 #if P0295_DEFAULT_OUT_LAYER_IDC 855 UInt getDefaultTargetOutputLayerIdc() { return m_defaultTargetOutputLayerIdc;} 856 Void setDefaultTargetOutputLayerIdc(UInt x) { m_defaultTargetOutputLayerIdc = x ;} 857 #else 829 858 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 830 859 UInt getDefaultOneTargetOutputLayerIdc() { return m_defaultOneTargetOutputLayerIdc;} … … 834 863 Void setDefaultOneTargetOutputLayerFlag(Bool x) { m_defaultOneTargetOutputLayerFlag= x ;} 835 864 #endif 865 #endif 836 866 Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } 837 867 Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } 838 #if JCTVC_M0458_INTERLAYER_RPS_SIG839 868 Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag; } 840 869 Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } 841 #endif842 870 #if O0062_POC_LSB_NOT_PRESENT_FLAG 843 871 UInt getPocLsbNotPresentFlag(Int i) { return m_pocLsbNotPresentFlag[i]; } … … 852 880 Void setCrossLayerIrapAlignFlag(Bool x) { m_crossLayerIrapAlignFlag = x; } 853 881 #endif 854 #if JCTVC_M0203_INTERLAYER_PRED_IDC855 882 #if O0225_MAX_TID_FOR_REF_LAYERS 856 883 UInt getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId) { return m_maxTidIlRefPicsPlus1[layerId][refLayerId]; } … … 859 886 UInt getMaxTidIlRefPicsPlus1(Int layerId) { return m_maxTidIlRefPicsPlus1[layerId]; } 860 887 Void setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer; } 861 #endif862 888 #endif 863 889 #if N0120_MAX_TID_REF_PRESENT_FLAG … … 898 924 #endif 899 925 #if N0160_VUI_EXT_ILP_REF 900 Bool get NumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers;}901 Void set NumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers= val;}926 Bool getIlpRestrictedRefLayersFlag ( ) { return m_ilpRestrictedRefLayersFlag ;} 927 Void setIlpRestrictedRefLayersFlag ( Int val ) { m_ilpRestrictedRefLayersFlag = val;} 902 928 903 929 Int getMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId ) { return m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId];} … … 983 1009 Int scalTypeToScalIdx( ScalabilityType scalType ); 984 1010 #endif 1011 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 985 1012 #if VPS_EXTN_OFFSET 986 1013 Int getExtensionOffset() { return m_extensionOffset; } 987 1014 Void setExtensionOffset( UInt offset ) { m_extensionOffset = offset; } 988 1015 #endif 1016 #endif 989 1017 #if O0215_PHASE_ALIGNMENT 990 1018 Bool getPhaseAlignFlag() { return m_phaseAlignFlag; } … … 1002 1030 Void setMaxVpsDecPicBufferingMinus1(Int i, Int k, Int j, Int x) { m_maxVpsDecPicBufferingMinus1[i][k][j] = x; } 1003 1031 1032 #if RESOLUTION_BASED_DPB 1033 Int getMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j) { assert(i != 0); return m_maxVpsLayerDecPicBuffMinus1[i][k][j]; } 1034 Void setMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j, Int x) { m_maxVpsLayerDecPicBuffMinus1[i][k][j] = x; } 1035 #endif 1036 1004 1037 Int getMaxVpsNumReorderPics(Int i, Int j) { assert(i != 0); return m_maxVpsNumReorderPics[i][j]; } 1005 1038 Void setMaxVpsNumReorderPics(Int i, Int j, Int x) { m_maxVpsNumReorderPics[i][j] = x; } … … 1010 1043 Int getNumSubDpbs(Int i) { return m_numSubDpbs[i]; } 1011 1044 Void setNumSubDpbs(Int i, Int x) { m_numSubDpbs[i] = x; } 1045 Void determineSubDpbInfoFlags(); 1012 1046 #endif 1013 1047 … … 1017 1051 #endif 1018 1052 1053 #if !P0307_REMOVE_VPS_VUI_OFFSET 1019 1054 #if VPS_VUI_OFFSET 1020 1055 Int getVpsVuiOffset() { return m_vpsVuiOffset; } 1021 1056 Void setVpsVuiOffset(Int x) { m_vpsVuiOffset = x; } 1057 #endif 1058 #endif 1059 #if P0307_VPS_NON_VUI_EXTENSION 1060 Int getVpsNonVuiExtLength() { return m_vpsNonVuiExtLength; } 1061 Void setVpsNonVuiExtLength(Int x) { m_vpsNonVuiExtLength = x; } 1062 #endif 1063 #if RESOLUTION_BASED_DPB 1064 Void assignSubDpbIndices(); 1065 Int getSubDpbAssigned (Int lsIdx, Int layerIdx) { return m_subDpbAssigned[lsIdx][layerIdx]; } 1066 Int findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId ); 1022 1067 #endif 1023 1068 #endif //SVC_EXTENSION … … 1312 1357 1313 1358 #if SVC_EXTENSION 1314 #if M0463_VUI_EXT_ILP_REF1315 Bool m_interViewMvVertConstraintFlag;1316 Int m_numIlpRestrictedRefLayers ;1317 Int m_minSpatialSegmentOffsetPlus1[MAX_LAYERS];1318 Bool m_ctuBasedOffsetEnabledFlag [MAX_LAYERS];1319 Int m_minHorizontalCtuOffsetPlus1 [MAX_LAYERS];1320 #endif1321 1322 1359 UInt m_layerId; 1323 1324 #if REF_IDX_MFM1325 #if !M0457_COL_PICTURE_SIGNALING1326 Bool m_bMFMEnabledFlag;1327 #endif1328 #endif1329 1360 UInt m_numScaledRefLayerOffsets; 1330 1361 #if O0098_SCALED_REF_LAYER_ID … … 1485 1516 1486 1517 #if SVC_EXTENSION 1487 #if M0463_VUI_EXT_ILP_REF1488 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; }1489 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;}1490 1491 //// sps_extension_vui_parameters( )1492 Void setNumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers = val;}1493 Int getNumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers ;}1494 1495 Void setMinSpatialSegmentOffsetPlus1( Int i, Int val ) { m_minSpatialSegmentOffsetPlus1[ i ] = val;}1496 Int getMinSpatialSegmentOffsetPlus1( Int i ) { return m_minSpatialSegmentOffsetPlus1[ i ];}1497 1498 Void setCtuBasedOffsetEnabledFlag ( Int i, Bool flag ) { m_ctuBasedOffsetEnabledFlag [ i ] = flag;}1499 Bool getCtuBasedOffsetEnabledFlag ( Int i ) { return m_ctuBasedOffsetEnabledFlag [ i ];}1500 1501 Void setMinHorizontalCtuOffsetPlus1 ( Int i, Int val ) { m_minHorizontalCtuOffsetPlus1 [ i ] = val;}1502 Int getMinHorizontalCtuOffsetPlus1 ( Int i ) { return m_minHorizontalCtuOffsetPlus1 [ i ];}1503 #endif1504 1518 Void setLayerId(UInt layerId) { m_layerId = layerId; } 1505 1519 UInt getLayerId() { return m_layerId; } 1506 #if REF_IDX_MFM1507 #if !M0457_COL_PICTURE_SIGNALING1508 Void setMFMEnabledFlag(Bool flag) {m_bMFMEnabledFlag = flag;}1509 Bool getMFMEnabledFlag() {return m_bMFMEnabledFlag;}1510 #endif1511 #endif1512 1520 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1513 1521 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } … … 1889 1897 TComPic* m_pcBaseColPic[MAX_LAYERS]; 1890 1898 TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; 1891 #if M0457_COL_PICTURE_SIGNALING1892 1899 Int m_numMotionPredRefLayers; 1893 1900 #if REF_IDX_MFM … … 1897 1904 TComPic* m_pcIlpPic; 1898 1905 #endif 1899 #endif 1900 1901 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1906 1902 1907 Bool m_interLayerPredEnabledFlag; 1903 1908 Int m_activeNumILRRefIdx; //< Active inter-layer reference pictures 1904 1909 Int m_interLayerPredLayerIdc [MAX_VPS_LAYER_ID_PLUS1]; 1905 #else1906 #if SVC_EXTENSION1907 Int m_numILRRefIdx; //< for inter-layer reference picture ser1908 #endif1909 #endif1910 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG1911 Int m_numSamplePredRefLayers;1912 Bool m_interLayerSamplePredOnlyFlag;1913 #endif1914 1910 #if POC_RESET_FLAG 1915 1911 Bool m_bPocResetFlag; … … 2174 2170 #endif 2175 2171 2176 #if JCTVC_M0458_INTERLAYER_RPS_SIG2177 2172 Int getActiveNumILRRefIdx ( ) { return m_activeNumILRRefIdx; } 2178 2173 Void setActiveNumILRRefIdx ( Int i ) { m_activeNumILRRefIdx = i; } … … 2183 2178 Void setInterLayerPredEnabledFlag ( Bool val ) { m_interLayerPredEnabledFlag = val; } 2184 2179 Bool getInterLayerPredEnabledFlag () { return m_interLayerPredEnabledFlag;} 2185 #else 2186 Void setNumILRRefIdx ( Int i ) { m_numILRRefIdx = i; } 2187 #endif 2188 2189 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG 2190 Int getNumSamplePredRefLayers ( ) { return m_numSamplePredRefLayers; } 2191 Void setNumSamplePredRefLayers ( Int i ) { m_numSamplePredRefLayers = i; } 2192 Bool getInterLayerSamplePredOnlyFlag( ) { return m_interLayerSamplePredOnlyFlag; } 2193 Void setInterLayerSamplePredOnlyFlag( Bool val ) { m_interLayerSamplePredOnlyFlag = val; } 2194 #endif 2195 2196 #if M0457_COL_PICTURE_SIGNALING 2180 2197 2181 Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } 2198 2182 Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } … … 2200 2184 Void setMFMEnabledFlag(Bool flag) { m_bMFMEnabledFlag = flag; } 2201 2185 Bool getMFMEnabledFlag() { return m_bMFMEnabledFlag; } 2202 #if !REMOVE_COL_PICTURE_SIGNALING2203 Void setColRefLayerIdx(Int i) { m_colRefLayerIdx = i; }2204 Int getColRefLayerIdx() { return m_colRefLayerIdx; }2205 Void setAltColIndicationFlag(Bool i) { m_altColIndicationFlag = i; }2206 Bool getAltColIndicationFlag() { return m_altColIndicationFlag; }2207 Void setMotionPredIlp(TComPic *ilpPic) { m_pcIlpPic = ilpPic; }2208 TComPic* getMotionPredIlp() { return m_pcIlpPic; }2209 #endif2210 #endif2211 2186 #endif 2212 2187 2213 2188 TComPic* getRefPic(TComList<TComPic*>& rcListPic, Int poc) { return xGetRefPic( rcListPic, poc ); } 2214 2189 2215 #if RESTR_CHK 2216 Bool isRADL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); } 2217 Bool isRASL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); } 2218 #endif 2190 Bool isRADL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); } 2191 Bool isRASL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); } 2219 2192 2220 2193 #if POC_RESET_FLAG -
trunk/source/Lib/TLibCommon/TypeDef.h
r547 r588 43 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)] 44 44 45 #if SVC_EXTENSION 46 #define MAX_LAYERS 8 ///< max number of layers the codec is supposed to handle 47 45 48 #define VPS_VUI_OFFSET 1 ///< N0085: Signal VPS VUI offset in the VPS extension 46 47 49 #define RANDOM_ACCESS_SEI_FIX 1 48 #if SVC_EXTENSION49 #define MAX_LAYERS 2 ///< max number of layers the codec is supposed to handle50 51 50 #define O0137_MAX_LAYERID 1 ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1 52 51 52 #define P0130_EOB 1 ///< JCTVC-P0130, set layer Id of EOB NALU to be fixed to 0 53 #define P0307_REMOVE_VPS_VUI_OFFSET 1 ///< JCTVC-P0307, remove implementation related to VPS VUI offset signalling 54 #define P0307_VPS_NON_VUI_EXTENSION 1 ///< JCTVC-P0307, implementation related to NON VUI VPS Extension signalling 55 56 #define DISCARDABLE_PIC_RPS 1 ///< JCTVC-P0130: Inter-layer RPS and temporal RPS should not contain picture with discardable_flag equal to 1 57 #define VPS_EXTN_UEV_CODING 1 ///< JCTVC-P0306: Code some syntax elements as ue(v), and remove some syntax elements that duplicate behaviour 58 #define CHANGE_NUMSUBDPB_IDX 1 ///< Change index of NumSubDpb from output layer set to layer set, to be more aligned with the Spec 59 #define RESOLUTION_BASED_DPB 1 ///< JCTVC-P0192: Assign layers to sub-DPBs based on the rep_format() signaled in the VPS 60 #define SUB_BITSTREAM_PROPERTY_SEI 1 ///< JCTVC-P0204: Sub-bitstream property SEI message 53 61 #define O0109_O0199_FLAGS_TO_VUI 1 ///< JCTVC-O0109, O0199: move single_layer_for_non_irap_flag and higher_layer_flag to vps_vui 54 62 #define O0109_VIEW_ID_LEN 1 ///< JCTVC-O0109: view_id_len_minus1 to view_id_len, and add constraint (1<<view_id_len) is greater than or equal to NumViews 63 64 #define P0048_REMOVE_PROFILE_REF 1 ///< JCTVC-P0048: remove profile_ref_minus1 65 #if !P0048_REMOVE_PROFILE_REF 55 66 #define O0109_PROF_REF_MINUS1 1 ///< JCTVC-O0109: constraint that profile_ref_minus1[i] shall be less than or equal to i 67 #endif 68 69 #define P0295_DEFAULT_OUT_LAYER_IDC 1 ///< JCTVC-P0295: modifify default_one_target_output_layer_idc to default_target_output_layer_idc 56 70 #define O0109_DEFAULT_ONE_OUT_LAYER_IDC 1 ///< JCTVC-O0109: default_one_target_output_layer_flag to default_one_target_output_layer_idc 57 71 #define O0109_MOVE_VPS_VUI_FLAG 1 ///< JCTVC-O0109: move vps_vui_present_flag before vps_vui_offset … … 63 77 #define O0194_JOINT_US_BITSHIFT 1 ///< JCTVC-O0194: Joint Upsampling and bit-shift 64 78 #endif 65 #define O0194_WEIGHTED_PREDICTION_CGS 0///< JCTVC-O0194: Weighted prediciton for color gamut scalability79 #define O0194_WEIGHTED_PREDICTION_CGS 1 ///< JCTVC-O0194: Weighted prediciton for color gamut scalability 66 80 #define MFM_ENCCONSTRAINT 1 ///< JCTVC-O0216: Encoder constraint for motion field mapping 67 81 #define VPS_NUH_LAYER_ID 1 ///< JCTVC-N0085: Assert that the nuh_layer_id of VPS NAL unit should be 0 … … 76 90 77 91 #define SCALINGLIST_INFERRING 1 ///< JCTVC-N0371: inter-layer scaling list 78 #define M0463_VUI_EXT_ILP_REF 0 ///< JCTVC-M0463: VUI extension inter-layer dependency offset signalling79 92 #define SPS_EXTENSION 1 ///< Define sps_extension() syntax structure 80 93 #if SPS_EXTENSION 81 94 #define O0142_CONDITIONAL_SPS_EXTENSION 1 ///< JCTVC-O0142: Conditional SPS extension 82 95 #endif 83 #define VERT_MV_CONSTRAINT 1 ///< Vertical MV component constraint flag84 96 #define SCALABILITY_MASK_E0104 1 ///< JCT3V-E0104: scalability mask for depth 85 97 #define LAYER_CTB 0 ///< enable layer-specific CTB structure … … 103 115 #define VPS_EXTN_PROFILE_INFO 1 ///< Include profile information for layer sets in VPS extension 104 116 #define VPS_EXTN_DIRECT_REF_LAYERS 1 ///< Include indication of direct dependency of layers in VPS extension 105 #define M0457_PREDICTION_INDICATIONS 1106 117 #define M0040_ADAPTIVE_RESOLUTION_CHANGE 1 107 118 #define VPS_VUI 1 ///< Include function structure for VPS VUI … … 117 128 #endif 118 129 #define VPS_VUI_VIDEO_SIGNAL 1 ///< JCTVC-O0118 video signal information 130 #if VPS_VUI_VIDEO_SIGNAL 131 #define VPS_VUI_VIDEO_SIGNAL_MOVE 1 ///< JCTVC-P0076 Move video signal information syntax structure earlier in the VPS VUI 132 #endif 119 133 #endif //VPS_VUI 120 134 121 135 #endif 122 136 137 #define P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 1 ///< JCTVC-P0125 -- Keep it as a reserved FFFF value --- The following two macros (VPS_EXTN_OFFSET & VPS_EXTN_OFFSET_CALC) will have no effect when this macro is set to 1. 123 138 #define VPS_EXTN_OFFSET 1 ///< implementation of vps_extension_offset syntax element 124 139 #define VPS_EXTN_OFFSET_CALC 1 ///< Calculation of VPS extension offset … … 133 148 134 149 #define JCTVC_M0259_LAMBDAREFINEMENT 1 ///< JCTVC-M0259: lambda refinement (encoder only optimization) 135 #define RESTR_CHK 1 ///< JCTVC-M0208 proposal 1136 #define ILP_RAP 1 ///< JCTVC-M0208 proposal 3137 150 138 151 #define AVC_BASE 1 ///< YUV BL reading for AVC base SVC … … 144 157 #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. 145 158 #define REF_IDX_MFM 1 ///< JCTVC-L0336: motion vector mapping of inter-layer reference picture 146 #define JCTVC_M0458_INTERLAYER_RPS_SIG 1 ///< implementation of JCTVC-L0178147 #if JCTVC_M0458_INTERLAYER_RPS_SIG148 159 #define MAX_ONE_RESAMPLING_DIRECT_LAYERS 1 ///< Allow maximum of one resampling process for direct reference layers 149 160 #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. 150 #endif151 #define JCTVC_M0203_INTERLAYER_PRED_IDC 1 ///< JCTVC-M0203: implementation of Inter-layer Prediction Indication152 #if JCTVC_M0203_INTERLAYER_PRED_IDC153 161 #define EARLY_REF_PIC_MARKING 1 ///< Decoded picture marking of sub-layer non-reference pictures 154 162 #define N0120_MAX_TID_REF_PRESENT_FLAG 1 ///< JCTVC-N0120: max_tid_ref_pics_plus1_present_flag … … 156 164 #define O0225_MAX_TID_FOR_REF_LAYERS 1 157 165 #define O0225_TID_BASED_IL_RPS_DERIV 1 158 159 166 #define VPS_TSLAYERS 1 ///< JCTVC-O0120 signal max temporal sub-layers for each layer 160 167 #define TSLAYERS_IL_RPS 1 ///< JCTVC-O0120 IL RPS based on max temporal sub-layers 161 # endif168 #define P0079_DERIVE_NUMACTIVE_REF_PICS 1 ///< JCTVC-P0079 Modification of derivation of variable NumActiveRefLayerPics 162 169 #if REF_IDX_MFM 163 #define REMOVE_COL_PICTURE_SIGNALING 1 ///< JCTVC-N0107: remove alternative collocated picture signalling164 #define M0457_COL_PICTURE_SIGNALING 1165 170 #define N0139_POSITION_ROUNDING_OFFSET 1 ///< JCTVC-N0139: offset for collocated block in motion mapping 166 #endif167 168 #if !VPS_EXTN_DIRECT_REF_LAYERS || !M0457_PREDICTION_INDICATIONS || !JCTVC_M0458_INTERLAYER_RPS_SIG169 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107170 #else171 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107172 171 #endif 173 172 … … 190 189 191 190 #define VIEW_ID_RELATED_SIGNALING 1 ///< Introduce syntax elements view_id and view_id_val 192 #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.191 #define LAYERS_NOT_PRESENT_SEI 1 ///< JCTVC-M0043: add layers not present SEI. 193 192 #define N0383_IL_CONSTRAINED_TILE_SETS_SEI 1 194 193 #define N0065_LAYER_POC_ALIGNMENT 1 … … 252 251 #define MAX_VPS_OP_SETS_PLUS1 1024 253 252 #define MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 1 253 #endif 254 255 #if SUB_BITSTREAM_PROPERTY_SEI 256 #define MAX_SUB_STREAMS 1024 254 257 #endif 255 258
Note: See TracChangeset for help on using the changeset viewer.