Changeset 766 in 3DVCSoftware for branches/HTM-9.2-dev0/source/Lib
- Timestamp:
- 12 Jan 2014, 03:29:17 (11 years ago)
- Location:
- branches/HTM-9.2-dev0/source/Lib
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComRom.cpp
r764 r766 573 573 #if H_MV_ENC_DEC_TRAC 574 574 #if ENC_DEC_TRACE 575 #if H_MV_FIX_TRACE_FILE576 575 Void writeToTraceFile( const Char* symbolName, Int val, Bool doIt ) 577 #else578 Void writeToTraceFile( Char* symbolName, Int val, Bool doIt )579 #endif580 576 { 581 577 if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt ) … … 592 588 } 593 589 594 #if H_MV_FIX_TRACE_FILE595 590 Void writeToTraceFile( const Char* symbolName, Bool doIt ) 596 #else597 Void writeToTraceFile( Char* symbolName, Bool doIt )598 #endif599 591 { 600 592 if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt ) -
branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComRom.h
r764 r766 233 233 234 234 235 #if H_MV_FIX_TRACE_FILE236 235 Void writeToTraceFile( const Char* symbolName, Int val, Bool doIt ); 237 236 Void writeToTraceFile( const Char* symbolName, Bool doIt ); 238 #else239 Void writeToTraceFile( Char* symbolName, Int val, Bool doIt );240 Void writeToTraceFile( Char* symbolName, Bool doIt );241 #endif242 237 #endif 243 238 #else -
branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComSlice.cpp
r765 r766 110 110 #endif 111 111 , m_pocResetFlag (false) 112 #if H_MV_6_RALS_O0149_11113 112 , m_crossLayerBlaFlag (false) 114 #endif115 113 , m_discardableFlag (false) 116 114 , m_interLayerPredEnabledFlag (false) … … 1705 1703 , m_hrdOpSetIdx (NULL) 1706 1704 , m_cprmsPresentFlag (NULL) 1707 #if H_MV_6_HRD_O0217_131708 1705 , m_dpbSize (NULL) 1709 #endif1710 1706 #if H_MV 1711 1707 , m_vpsVUI ( NULL ) … … 1723 1719 for( Int layerId = 0; layerId < MAX_VPS_NUH_LAYER_ID_PLUS1; layerId++ ) 1724 1720 { 1725 #if H_MV_6_HRD_O0217_131726 1721 m_layerIdIncludedFlag[lsIdx][layerId] = (( lsIdx == 0 ) && ( layerId == 0 )) ; 1727 #else1728 m_layerIdIncludedFlag[lsIdx][layerId] = false;1729 #endif1730 1722 } 1731 1723 } … … 1741 1733 m_moreOutputLayerSetsThanDefaultFlag = false; 1742 1734 m_numAddOutputLayerSetsMinus1 = -1; 1743 #if H_MV_6_PS_0109_251744 1735 m_defaultOneTargetOutputLayerIdc = 0; 1745 #else1746 m_defaultOneTargetOutputLayerFlag = false;1747 #endif1748 1736 1749 1737 for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++) … … 1756 1744 } 1757 1745 } 1758 #if H_MV_6_GEN_0153_281759 1746 m_altOutputLayerFlag = false; 1760 #endif1761 1747 m_maxOneActiveRefLayerFlag = false; 1762 1748 m_directDepTypeLenMinus2 = 0; … … 1795 1781 m_layerIdInNuh [i] = ( i == 0 ) ? 0 : -1; 1796 1782 m_numDirectRefLayers[i] = 0; 1797 #if !H_MV_6_ILDDS_O0225_301798 m_maxTidIlRefPicPlus1[i] = 7;1799 #endif1800 1783 m_vpsRepFormatIdx [i] = 0; 1801 #if H_MV_6_MISC_O0062_311802 1784 m_pocLsbNotPresentFlag[i] = 0; 1803 #endif1804 1785 m_repFormat [i] = NULL; 1805 1786 m_viewIdVal [i] = 0; … … 1837 1818 m_directDependencyType[i][j] = -1; 1838 1819 m_refLayerId[i][j] = -1; 1839 #if H_MV_6_ILDDS_O0225_301840 1820 m_maxTidIlRefPicsPlus1[i][j] = 7; 1841 #endif1842 1821 } 1843 1822 … … 1852 1831 } 1853 1832 m_vpsVUI = new TComVPSVUI; 1854 #if H_MV_6_HRD_O0217_131855 1833 m_dpbSize = new TComDpbSize; 1856 #endif1857 1834 # 1858 1835 #if H_3D … … 1889 1866 #if H_MV 1890 1867 if ( m_vpsVUI != NULL ) delete m_vpsVUI; 1891 #if H_MV_6_HRD_O0217_131892 1868 if ( m_dpbSize != NULL ) delete m_dpbSize; 1893 #endif1894 1869 1895 1870 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) … … 2193 2168 assert( lsIdx >= 0 ); 2194 2169 assert( lsIdx <= getVpsNumLayerSetsMinus1() ); 2195 #if H_MV_6_HRD_O0217_132196 2170 return (Int) m_layerSetLayerIdList[ lsIdx ].size(); 2197 #else 2198 Int numLayersInIdList = 0; 2199 for (Int layerId = 0; layerId < getVpsMaxLayerId(); layerId++ ) 2200 { 2201 numLayersInIdList += ( getLayerIdIncludedFlag( lsIdx, layerId ) ); 2202 } 2203 return numLayersInIdList; 2204 #endif 2205 } 2206 2207 #if H_MV_6_HRD_O0217_13 2171 } 2172 2208 2173 Int TComVPS::getNumOutputLayerSets() 2209 2174 { … … 2215 2180 return numOutputLayerSets; 2216 2181 } 2217 #endif2218 2182 2219 2183 Int TComVPS::getNumViews() … … 2247 2211 } 2248 2212 2249 #if H_MV_6_HRD_O0217_132250 2213 Void TComVPS::deriveLayerSetLayerIdList() 2251 2214 { … … 2283 2246 } 2284 2247 } 2285 #endif2286 2248 #endif // H_MV 2287 2249 … … 2338 2300 , m_spsScalingListRefLayerId ( 0 ) 2339 2301 2340 #if !H_MV_6_PS_REP_FORM_18_19_202341 , m_updateRepFormatFlag ( true )2342 #else2343 2302 , m_updateRepFormatFlag ( false ) 2344 2303 , m_spsRepFormatIdx ( 0 ) 2345 #endif2346 2304 , m_interViewMvVertConstraintFlag (false) 2347 2305 #endif … … 2359 2317 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 2360 2318 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2361 #if H_MV_6_PSEM_O0142_32362 2319 m_spsExtensionFlag = false; 2363 2320 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ ) … … 2365 2322 m_spsExtensionTypeFlag[ i ] = false; 2366 2323 } 2367 #endif2368 #if H_MV_6_SHVC_O0098_362369 2324 m_numScaledRefLayerOffsets = 0; 2370 2325 … … 2381 2336 m_scaledRefLayerBottomOffset [i] = 0; 2382 2337 } 2383 #endif2384 2338 } 2385 2339 … … 2742 2696 if ( layerIdCurr > 0 ) 2743 2697 { 2744 #if H_MV_6_PS_REP_FORM_18_19_202745 2698 Int repFormatIdx = getUpdateRepFormatFlag() ? getSpsRepFormatIdx() : vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) ; 2746 2699 TComRepFormat* repFormat = vps->getRepFormat( repFormatIdx ); 2747 #else2748 TComRepFormat* repFormat = vps->getRepFormat( vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) );2749 if ( !getUpdateRepFormatFlag() )2750 {2751 #endif2752 2700 setChromaFormatIdc( repFormat->getChromaFormatVpsIdc() ); 2753 2701 //// ToDo: add when supported: … … 2762 2710 setBitDepthC ( repFormat->getBitDepthVpsChromaMinus8() + 8 ); 2763 2711 setQpBDOffsetC ( (Int) (6* ( getBitDepthC() -8 ) ) ); 2764 #if !H_MV_6_PS_REP_FORM_18_19_202765 }2766 else2767 #else2768 2712 if ( getLayerId() > 0 && getUpdateRepFormatFlag() ) 2769 #endif2770 2713 { 2771 2714 assert( getChromaFormatIdc() <= repFormat->getChromaFormatVpsIdc() ); … … 3139 3082 { 3140 3083 TComPic* pcPic = ivPicLists->getPic( targetDecLayerIdSet[ i ], curPoc ); 3141 #if H_MV_LAYER_WISE_STARTUP3142 3084 if ( pcPic ) 3143 3085 { 3144 #endif3145 3086 if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() ) 3146 3087 { … … 3165 3106 } 3166 3107 } 3167 #if H_MV_LAYER_WISE_STARTUP 3168 } 3169 #endif 3108 } 3170 3109 } 3171 3110 } … … 3225 3164 3226 3165 3227 #if H_MV_6_ILDDS_ILREFPICS_27_343228 3166 Int TComSlice::getRefLayerPicFlag( Int i ) 3229 3167 { … … 3268 3206 return numRefLayerPics; 3269 3207 } 3270 #endif3271 3208 3272 3209 … … 3282 3219 else if (getVPS()->getAllRefLayersActiveFlag() ) 3283 3220 { 3284 #if H_MV_6_ILDDS_ILREFPICS_27_343285 3221 numActiveRefLayerPics = getNumRefLayerPics(); 3286 #else3287 numActiveRefLayerPics = getVPS()->getNumDirectRefLayers( getLayerId() );3288 #endif3289 3222 } 3290 3223 else if ( !getInterLayerPredEnabledFlag() ) … … 3294 3227 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 ) 3295 3228 { 3296 #if H_MV_6_ILDDS_ILREFPICS_27_343297 3229 numActiveRefLayerPics = getRefLayerPicFlag( 0 ) ? 1 : 0; 3298 #else3299 numActiveRefLayerPics = 1;3300 #endif3301 3230 } 3302 3231 else … … 3876 3805 TComVPSVUI::TComVPSVUI() 3877 3806 { 3878 #if H_MV_6_PS_O0223_293879 3807 m_crossLayerIrapAlignedFlag = true; 3880 #endif3881 3808 m_bitRatePresentVpsFlag = false; 3882 3809 m_picRatePresentVpsFlag = false; … … 3906 3833 } 3907 3834 } 3908 #if H_MV_6_PS_O0118_333909 3835 for ( Int i = 0; i < MAX_NUM_VIDEO_SIGNAL_INFO; i++ ) 3910 3836 { 3911 3837 m_videoSignalInfo [i] = NULL; 3912 3838 } 3913 #endif 3914 3915 #if H_MV_6_HRD_O0164_15 3839 3916 3840 m_vpsVuiBspHrdPresentFlag = false; 3917 3841 m_vpsVuiBspHrdParameters = new TComVpsVuiBspHrdParameters(); 3918 #endif 3919 } 3920 3921 #if H_MV_6_PS_O0118_33 3842 } 3843 3922 3844 TComVPSVUI::~TComVPSVUI() 3923 3845 { … … 3928 3850 } 3929 3851 3930 #if H_MV_6_HRD_O0164_153931 3852 if ( m_vpsVuiBspHrdParameters ) delete m_vpsVuiBspHrdParameters; 3932 3853 m_vpsVuiBspHrdParameters = NULL; 3933 #endif 3934 } 3935 #endif 3936 3937 #if H_MV_6_PS_REP_FORM_18_19_20 3854 } 3855 3938 3856 Void TComRepFormat::inferChromaAndBitDepth( TComRepFormat* prevRepFormat, Bool encoderFlag ) 3939 3857 { … … 3953 3871 } 3954 3872 } 3955 #endif 3956 3957 #if H_MV_6_HRD_O0164_15 3873 3958 3874 Void TComVpsVuiBspHrdParameters::checkLayerInBspFlag( TComVPS* vps, Int h ) 3959 3875 { … … 3983 3899 } 3984 3900 #endif 3985 #endif -
branches/HTM-9.2-dev0/source/Lib/TLibCommon/TComSlice.h
r765 r766 62 62 // ==================================================================================================================== 63 63 64 #if H_MV_6_HRD_O0164_1565 64 class TComVPS; 66 #endif67 65 /// Reference Picture Set class 68 66 class TComReferencePictureSet … … 407 405 #if H_MV 408 406 409 #if H_MV_6_PS_O0118_33410 407 class TComVideoSignalInfo 411 408 { … … 432 429 Int getMatrixCoeffsVps( ) { return m_matrixCoeffsVps; } 433 430 }; 434 #endif435 #if H_MV_6_HRD_O0164_15436 431 class TComVpsVuiBspHrdParameters 437 432 { … … 473 468 }; 474 469 475 #endif476 470 class TComVPSVUI 477 471 { 478 472 private: 479 #if H_MV_6_PS_O0223_29480 473 Bool m_crossLayerPicTypeAlignedFlag; 481 474 Bool m_crossLayerIrapAlignedFlag; 482 #endif483 475 Bool m_bitRatePresentVpsFlag; 484 476 Bool m_picRatePresentVpsFlag; … … 489 481 Int m_constantPicRateIdc [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 490 482 Int m_avgPicRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 491 #if H_MV_6_O0226_37492 483 Bool m_tilesNotInUseFlag; 493 484 Bool m_tilesInUseFlag [MAX_NUM_LAYERS]; 494 485 Bool m_loopFilterNotAcrossTilesFlag[MAX_NUM_LAYERS]; 495 #endif496 486 Bool m_tileBoundariesAlignedFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 497 #if H_MV_6_O0226_37498 487 Bool m_wppNotInUseFlag; 499 488 Bool m_wppInUseFlag [MAX_NUM_LAYERS]; 500 #endif501 489 Bool m_ilpRestrictedRefLayersFlag; 502 490 Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 503 491 Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 504 492 Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 505 #if H_MV_6_PS_O0118_33506 493 Bool m_videoSignalInfoIdxPresentFlag; 507 494 Int m_vpsNumVideoSignalInfoMinus1; 508 495 TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO]; 509 496 Int m_vpsVideoSignalInfoIdx [MAX_NUM_VIDEO_SIGNAL_INFO]; 510 #endif511 #if H_MV_6_HRD_O0164_15512 497 Bool m_vpsVuiBspHrdPresentFlag; 513 498 TComVpsVuiBspHrdParameters* m_vpsVuiBspHrdParameters; 514 #endif515 499 516 500 public: 517 501 TComVPSVUI(); 518 502 ~TComVPSVUI(); 519 #if H_MV_6_PS_O0223_29520 503 Void setCrossLayerPicTypeAlignedFlag( Bool flag ) { m_crossLayerPicTypeAlignedFlag = flag; } 521 504 Bool getCrossLayerPicTypeAlignedFlag( ) { return m_crossLayerPicTypeAlignedFlag; } … … 523 506 Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; } 524 507 Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; } 525 #endif526 508 527 509 Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; } … … 549 531 Int getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; } 550 532 551 #if H_MV_6_O0226_37552 533 Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; } 553 534 Bool getTilesNotInUseFlag( ) { return m_tilesNotInUseFlag; } … … 558 539 Void setLoopFilterNotAcrossTilesFlag( Int i, Int val ) { m_loopFilterNotAcrossTilesFlag[i] = val; } 559 540 Bool getLoopFilterNotAcrossTilesFlag( Int i ) { return m_loopFilterNotAcrossTilesFlag[i]; } 560 #endif561 541 562 542 Void setTileBoundariesAlignedFlag( Int i, Int j, Bool flag ) { m_tileBoundariesAlignedFlag[i][j] = flag; } 563 543 Bool getTileBoundariesAlignedFlag( Int i, Int j ) { return m_tileBoundariesAlignedFlag[i][j]; } 564 544 565 #if H_MV_6_O0226_37566 545 Void setWppNotInUseFlag( Bool flag ) { m_wppNotInUseFlag = flag; } 567 546 Bool getWppNotInUseFlag( ) { return m_wppNotInUseFlag; } … … 569 548 Void setWppInUseFlag( Int i, Bool flag ) { m_wppInUseFlag[i] = flag; } 570 549 Bool getWppInUseFlag( Int i ) { return m_wppInUseFlag[i]; } 571 #endif572 550 573 551 Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; } … … 583 561 Int getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; } 584 562 585 #if H_MV_6_PS_O0118_33586 563 Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } 587 564 Bool getVideoSignalInfoIdxPresentFlag( ) { return m_videoSignalInfoIdxPresentFlag; } … … 595 572 Void setVpsVideoSignalInfoIdx( Int i, Int val ) { m_vpsVideoSignalInfoIdx[i] = val; } 596 573 Int getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; } 597 #endif 598 599 #if H_MV_6_HRD_O0164_15 574 600 575 Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; } 601 576 Bool getVpsVuiBspHrdPresentFlag( ) { return m_vpsVuiBspHrdPresentFlag; } … … 603 578 Void setVpsVuiBspHrdParameters( TComVpsVuiBspHrdParameters* val) { m_vpsVuiBspHrdParameters = val; } 604 579 TComVpsVuiBspHrdParameters* getVpsVuiBspHrdParameters( ) { return m_vpsVuiBspHrdParameters; } 605 #endif606 580 }; 607 581 … … 609 583 { 610 584 private: 611 #if H_MV_6_PS_REP_FORM_18_19_20612 585 Bool m_chromaAndBitDepthVpsPresentFlag; 613 #endif614 586 Int m_chromaFormatVpsIdc; 615 587 Bool m_separateColourPlaneVpsFlag; … … 622 594 TComRepFormat() { }; 623 595 624 #if H_MV_6_PS_REP_FORM_18_19_20625 596 Void setChromaAndBitDepthVpsPresentFlag( Bool flag ) { m_chromaAndBitDepthVpsPresentFlag = flag; } 626 597 Bool getChromaAndBitDepthVpsPresentFlag( ) { return m_chromaAndBitDepthVpsPresentFlag; } 627 598 Void checkChromaAndBitDepthVpsPresentFlag( Int i ) { assert( i != 0 || m_chromaAndBitDepthVpsPresentFlag ); } // The value of chroma_and_bit_depth_vps_present_flag of the first rep_format( ) syntax structure in the VPS shall be equal to 1. 628 599 Void inferChromaAndBitDepth( TComRepFormat* prevRepFormat, Bool encoderFlag ); 629 #endif630 600 631 601 Void setChromaFormatVpsIdc( Int val ) { m_chromaFormatVpsIdc = val; } … … 649 619 #endif 650 620 651 #if H_MV_6_HRD_O0217_13652 621 class TComDpbSize 653 622 { … … 695 664 Int getMaxVpsLatencyIncreasePlus1( Int i, Int j ) { return m_maxVpsLatencyIncreasePlus1[i][j]; } 696 665 }; 697 #endif698 666 699 667 class TComVPS … … 748 716 Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 749 717 750 #if H_MV_6_PS_O0109_22751 718 Int m_viewIdLen; 752 #else753 Int m_viewIdLenMinus1;754 #endif755 719 Int m_viewIdVal [MAX_NUM_LAYERS]; 756 720 Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 757 #if H_MV_6_ILDSD_O0120_26758 721 Bool m_vpsSubLayersMaxMinus1PresentFlag; 759 722 Int m_subLayersVpsMaxMinus1 [MAX_NUM_LAYERS]; 760 #endif761 723 Bool m_maxTidRefPresentFlag; 762 #if H_MV_6_ILDDS_O0225_30763 724 Int m_maxTidIlRefPicsPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 764 #else765 Int m_maxTidIlRefPicPlus1 [MAX_NUM_LAYERS];766 #endif767 725 Bool m_allRefLayersActiveFlag; 768 726 Int m_vpsNumberLayerSetsMinus1; … … 772 730 Bool m_moreOutputLayerSetsThanDefaultFlag; 773 731 Int m_numAddOutputLayerSetsMinus1; 774 #if H_MV_6_PS_0109_25775 732 Int m_defaultOneTargetOutputLayerIdc; 776 #else777 Bool m_defaultOneTargetOutputLayerFlag;778 #endif779 733 Int m_outputLayerSetIdxMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; 780 734 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 781 735 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; 782 #if H_MV_6_GEN_0153_28783 736 Bool m_altOutputLayerFlag; 784 #endif785 737 Bool m_repFormatIdxPresentFlag; 786 738 Int m_vpsNumRepFormatsMinus1; … … 788 740 TComRepFormat* m_repFormat [MAX_NUM_LAYERS]; 789 741 Bool m_maxOneActiveRefLayerFlag; 790 #if H_MV_6_MISC_O0062_31791 742 Bool m_pocLsbNotPresentFlag [MAX_NUM_LAYERS]; 792 #endif 793 794 #if H_MV_6_HRD_O0217_13 743 795 744 TComDpbSize* m_dpbSize; 796 #endif797 #if !H_MV_6_PS_O0223_29798 Bool m_crossLayerIrapAlignedFlag;799 #endif800 745 Int m_directDepTypeLenMinus2; 801 #if H_MV_6_PS_O0096_21802 746 Bool m_defaultDirectDependencyFlag; 803 747 Int m_defaultDirectDependencyType; 804 #endif805 748 Bool m_vpsVuiPresentFlag; 806 749 TComVPSVUI* m_vpsVUI; … … 822 765 Int m_viewIndex [MAX_NUM_LAYERS ]; 823 766 824 #if H_MV_6_HRD_O0217_13825 767 std::vector< std::vector< Int> > m_targetDecLayerIdLists; //[TargetOptLayerSetIdx][i] 826 768 std::vector< std::vector< Int> > m_targetOptLayerIdLists; 827 769 std::vector< std::vector< Int> > m_layerSetLayerIdList; 828 #endif829 770 830 771 … … 901 842 UInt getMaxTLayers () { return m_uiMaxTLayers; } 902 843 Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } 903 #if H_MV_6_HRD_O0164_15904 844 UInt getMaxSubLayersMinus1() { return m_uiMaxTLayers - 1; } // For consistency with draft spec 905 #endif906 845 #if H_MV 907 846 UInt getMaxLayersMinus1() { return m_uiMaxLayersMinus1; }; … … 978 917 Int getDimensionId( Int layerIdInVps, Int scalIdx ) { return m_dimensionId[layerIdInVps][scalIdx]; } 979 918 980 #if H_MV_6_PS_O0109_22981 919 Void setViewIdLen( Int val ) { m_viewIdLen = val; } 982 920 Int getViewIdLen( ) { return m_viewIdLen; } 983 #else984 Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; }985 Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; }986 #endif987 921 988 922 Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } … … 990 924 Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } 991 925 Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } 992 #if H_MV_6_ILDSD_O0120_26993 926 Void setVpsSubLayersMaxMinus1PresentFlag( Bool flag ) { m_vpsSubLayersMaxMinus1PresentFlag = flag; } 994 927 Bool getVpsSubLayersMaxMinus1PresentFlag( ) { return m_vpsSubLayersMaxMinus1PresentFlag; } … … 996 929 Int getSubLayersVpsMaxMinus1( Int i ) { return m_subLayersVpsMaxMinus1[i]; } 997 930 Void checkSubLayersVpsMaxMinus1( Int i ) { assert( m_subLayersVpsMaxMinus1[i] >= 0 && m_subLayersVpsMaxMinus1[i] <= m_uiMaxTLayers - 1 ); } 998 #endif999 931 Void setMaxTidRefPresentFlag( Bool flag ) { m_maxTidRefPresentFlag = flag; } 1000 932 Bool getMaxTidRefPresentFlag( ) { return m_maxTidRefPresentFlag; } 1001 #if H_MV_6_ILDDS_O0225_301002 933 Void setMaxTidIlRefPicsPlus1( Int i, Int j, Int val ) { m_maxTidIlRefPicsPlus1[i][j] = val; } 1003 934 Int getMaxTidIlRefPicsPlus1( Int i, Int j ) { return m_maxTidIlRefPicsPlus1[i][j]; } 1004 #else1005 Void setMaxTidIlRefPicPlus1( Int layerIdInVps, Int val ) { m_maxTidIlRefPicPlus1[ layerIdInVps ] = val; }1006 Int getMaxTidIlRefPicPlus1( Int layerIdInVps ) { return m_maxTidIlRefPicPlus1[ layerIdInVps ]; }1007 #endif1008 935 Void setAllRefLayersActiveFlag( Bool flag ) { m_allRefLayersActiveFlag = flag; } 1009 936 Bool getAllRefLayersActiveFlag( ) { return m_allRefLayersActiveFlag; } … … 1019 946 Void setProfileRefMinus1( Int profileTierLevelIdx, Int val ) { m_profileRefMinus1[ profileTierLevelIdx ] = val; } 1020 947 Int getProfileRefMinus1( Int profileTierLevelIdx ) { return m_profileRefMinus1[ profileTierLevelIdx ]; } 1021 #if H_MV_6_PS_O0109_231022 948 Void checkProfileRefMinus1( Int i ) { assert( getProfileRefMinus1( i ) + 1 <= i ); }; // The value of profile_ref_minus1[ i ] + 1 shall be less than or equal to i. 1023 #endif1024 949 Void setMoreOutputLayerSetsThanDefaultFlag( Bool flag ) { m_moreOutputLayerSetsThanDefaultFlag = flag; } 1025 950 Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag; } … … 1028 953 Int getNumAddOutputLayerSetsMinus1( ) { return m_numAddOutputLayerSetsMinus1; } 1029 954 1030 #if H_MV_6_PS_0109_251031 955 Void setDefaultOneTargetOutputLayerIdc( Int val ) { m_defaultOneTargetOutputLayerIdc = val; } 1032 956 Int getDefaultOneTargetOutputLayerIdc( ) { return m_defaultOneTargetOutputLayerIdc; } 1033 957 Void checkDefaultOneTargetOutputLayerIdc( ) { assert( m_defaultOneTargetOutputLayerIdc >= 0 && m_defaultOneTargetOutputLayerIdc <= 1 ); } 1034 #else1035 Void setDefaultOneTargetOutputLayerFlag( Bool flag ) { m_defaultOneTargetOutputLayerFlag = flag; }1036 Bool getDefaultOneTargetOutputLayerFlag( ) { return m_defaultOneTargetOutputLayerFlag; }1037 #endif1038 958 1039 959 Void setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val ) { m_outputLayerSetIdxMinus1[ outLayerSetIdx ] = val; } … … 1042 962 Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } 1043 963 Bool getOutputLayerFlag( Int outLayerSetIdx, Int i ) { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; } 1044 #if H_MV_6_HRD_O0217_131045 964 Bool inferOutputLayerFlag( Int layerSetIdx, Int i ) { return ( getDefaultOneTargetOutputLayerIdc( ) == 0 || ( ( getDefaultOneTargetOutputLayerIdc( ) == 1 ) && ( i == m_layerSetLayerIdList[layerSetIdx].size() - 1 ) )); } 1046 #endif1047 965 1048 966 Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx = val ]; } 1049 967 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 1050 #if H_MV_6_GEN_0153_281051 968 Void setAltOutputLayerFlag( Bool flag ) { m_altOutputLayerFlag = flag; } 1052 969 Bool getAltOutputLayerFlag( ) { return m_altOutputLayerFlag; } 1053 #endif1054 970 1055 971 Void setRepFormatIdxPresentFlag( Bool flag ) { m_repFormatIdxPresentFlag = flag; } … … 1067 983 Bool getMaxOneActiveRefLayerFlag( ) { return m_maxOneActiveRefLayerFlag; } 1068 984 1069 #if H_MV_6_HRD_O0217_131070 985 Void setDpbSize( TComDpbSize* val ) { assert( m_dpbSize != 0 ); m_dpbSize = val; } 1071 986 TComDpbSize* getDpbSize( ) { return m_dpbSize;} 1072 #endif 1073 1074 #if H_MV_6_MISC_O0062_31 987 1075 988 Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } 1076 989 Bool getPocLsbNotPresentFlag( Int i ) { return m_pocLsbNotPresentFlag[i]; } 1077 #endif1078 #if !H_MV_6_PS_O0223_291079 Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; }1080 Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; }1081 #endif1082 990 Void setDirectDepTypeLenMinus2( Int val) { m_directDepTypeLenMinus2 = val; } 1083 991 Int getDirectDepTypeLenMinus2( ) { return m_directDepTypeLenMinus2; } 1084 992 1085 #if H_MV_6_PS_O0096_211086 993 Void setDefaultDirectDependencyFlag( Bool flag ) { m_defaultDirectDependencyFlag = flag; } 1087 994 Bool getDefaultDirectDependencyFlag( ) { return m_defaultDirectDependencyFlag; } … … 1089 996 Void setDefaultDirectDependencyType( Int val ) { m_defaultDirectDependencyType = val; } 1090 997 Int getDefaultDirectDependencyType( ) { return m_defaultDirectDependencyType; } 1091 #endif1092 998 Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } 1093 999 Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } … … 1101 1007 1102 1008 Int getScalabilityId ( Int layerIdInVps, ScalabilityType scalType ); 1103 #if H_MV_6_FIX_GET_VIEW_ID1104 1009 Int getViewId ( Int layerIdInNuh ) { return m_viewIdVal[ getViewIndex( layerIdInNuh )]; } 1105 #else1106 Int getViewId ( Int layerIdInNuh ) { return m_viewIdVal[ getViewIndex( getLayerIdInVps( layerIdInNuh) )]; }1107 #endif1108 1010 Void setRefLayers(); 1109 1011 … … 1120 1022 Int getNumLayersInIdList ( Int lsIdx ); 1121 1023 1122 #if H_MV_6_HRD_O0217_131123 1024 Int getNumOutputLayerSets() ; 1124 1025 Int getNumSubDpbs( Int i ) { return getNumLayersInIdList( i ); }; 1125 1026 Bool isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh ); 1126 #if H_MV_6_HRD_O0217_131127 1027 Void deriveLayerSetLayerIdList(); 1128 1028 Void deriveTargetLayerIdLists(); 1129 1029 std::vector<Int> getTargetDecLayerIdList( Int targetOptLayerSetIdx ) { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; 1130 1030 std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx ) { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; 1131 #endif1132 #endif1133 1031 1134 1032 … … 1482 1380 TimingInfo* getTimingInfo() { return &m_timingInfo; } 1483 1381 1484 #if H_MV_6_PS_O0118_331485 1382 Void inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ) 1486 1383 { … … 1502 1399 setMatrixCoefficients ( videoSignalInfo->getMatrixCoeffsVps () ); 1503 1400 } 1504 #endif1505 1401 }; 1506 1402 … … 1588 1484 TComVPS* m_pcVPS; 1589 1485 // SPS 1590 #if H_MV_6_PSEM_O0142_31591 1486 Bool m_spsExtensionFlag; 1592 1487 Bool m_spsExtensionTypeFlag[PS_EX_T_MAX_NUM]; 1593 #endif1594 1488 Bool m_spsInferScalingListFlag; 1595 1489 Int m_spsScalingListRefLayerId; 1596 1490 Bool m_updateRepFormatFlag; 1597 #if H_MV_6_PS_REP_FORM_18_19_201598 1491 Int m_spsRepFormatIdx; 1599 #endif1600 1492 // SPS Extension 1601 1493 Bool m_interViewMvVertConstraintFlag; 1602 #if H_MV_6_SHVC_O0098_361603 1494 Int m_numScaledRefLayerOffsets; 1604 1495 Int m_scaledRefLayerId [MAX_NUM_SCALED_REF_LAYERS]; … … 1607 1498 Int m_scaledRefLayerRightOffset [MAX_NUM_LAYERS]; 1608 1499 Int m_scaledRefLayerBottomOffset[MAX_NUM_LAYERS]; 1609 #endif1610 1500 #endif 1611 1501 #if H_3D … … 1744 1634 TComPTL* getPTL() { return &m_pcPTL; } 1745 1635 #if H_MV 1746 #if H_MV_6_PSEM_O0142_31747 1636 Void setSpsExtensionFlag( Bool flag ) { m_spsExtensionFlag = flag; } 1748 1637 Bool getSpsExtensionFlag( ) { return m_spsExtensionFlag; } … … 1750 1639 Void setSpsExtensionTypeFlag( Int i, Bool flag ) { m_spsExtensionTypeFlag[i] = flag; } 1751 1640 Bool getSpsExtensionTypeFlag( Int i ) { return m_spsExtensionTypeFlag[i]; } 1752 #endif1753 1641 Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } 1754 1642 TComVPS* getVPS () { return m_pcVPS; } … … 1762 1650 Void setUpdateRepFormatFlag( Bool flag ) { m_updateRepFormatFlag = flag; } 1763 1651 Bool getUpdateRepFormatFlag( ) { return m_updateRepFormatFlag; } 1764 #if H_MV_6_PS_REP_FORM_18_19_201765 1652 Void setSpsRepFormatIdx( Int val ) { m_spsRepFormatIdx = val; } 1766 1653 Int getSpsRepFormatIdx( ) { return m_spsRepFormatIdx; } 1767 #endif1768 1654 // SPS Extension 1769 1655 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } 1770 1656 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} 1771 1657 1772 #if H_MV_6_SHVC_O0098_361773 1658 Void setNumScaledRefLayerOffsets( Int val ) { m_numScaledRefLayerOffsets = val; } 1774 1659 Int getNumScaledRefLayerOffsets( ) { return m_numScaledRefLayerOffsets; } … … 1788 1673 Void setScaledRefLayerBottomOffset( Int j, Int val ) { m_scaledRefLayerBottomOffset[j] = val; } 1789 1674 Int getScaledRefLayerBottomOffset( Int j ) { return m_scaledRefLayerBottomOffset[j]; } 1790 #endif1791 1675 // Inference 1792 1676 Void inferRepFormat( TComVPS* vps, Int layerIdCurr ); … … 2199 2083 // Additional slice header syntax elements 2200 2084 Bool m_pocResetFlag; 2201 #if H_MV_6_RALS_O0149_112202 2085 Bool m_crossLayerBlaFlag; 2203 #endif2204 2086 Bool m_discardableFlag; 2205 2087 Bool m_interLayerPredEnabledFlag; … … 2529 2411 // Additional slice header syntax elements 2530 2412 2531 #if H_MV_6_RALS_O0149_112532 2413 Void setCrossLayerBlaFlag( Bool flag ) { m_crossLayerBlaFlag = flag; } 2533 2414 Bool getCrossLayerBlaFlag( ) { return m_crossLayerBlaFlag; } … … 2540 2421 } 2541 2422 } 2542 #endif2543 2423 2544 2424 Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; } … … 2561 2441 Int getInterLayerPredLayerIdcLen ( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } 2562 2442 2563 #if H_MV_6_ILDDS_ILREFPICS_27_342564 2443 Int getRefLayerPicFlag( Int i ); 2565 2444 Int getRefLayerPicIdc ( Int j ); 2566 2445 Int getNumRefLayerPics( ); 2567 #endif2568 2446 2569 2447 Int getNumActiveRefLayerPics( ); -
branches/HTM-9.2-dev0/source/Lib/TLibCommon/TypeDef.h
r765 r766 293 293 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 294 294 295 /////////////////////////////////////////////////////////////////////////////////////////296 /////////////////////////////////// HTM-9.1 Integrations //////////////////////////////297 /////////////////////////////////////////////////////////////////////////////////////////298 299 #define H_MV_FIX_TRACE_FILE 1 // Fix linux compilation error related const char conversion300 301 #define H_MV_LAYER_WISE_STARTUP 1 // Basic version of layer wise startup.302 #define H_MV_FIX_SKIP_PICTURES 1 // Fix related to skipping pictures.303 #define H_MV_6_HRD_O0164_15 1 // (HRD/O0164/Multilayer HRD) #15 Decision: Adopt, modified as follows: It was suggested to constrain the stalling based on the relative cpb removal times, which must be in decoding order. The "du_based_bpb_sync_flag" is not needed, in view of this. SEI in the highest layer of the layer set or (inclusive "or") VPS VUI is used to carry the parameters (at encoder discretion). SEI in higher layer and SEI in VUI do not need to repeat information available in some lower layer. Shall be after APS SEI and buffering period SEI and before all other SEI of all layers except other HRD related SEI.304 #define H_MV_6_HRD_O0217_13 1 // (HRD/O0217/Sub-DPB based DPB operations) #13 Decision: Adopt ?Specify a separate DPB capacity for each layer ?no sharing of capacity across layers ?each layer has its own parameters (max pictures, max latency, max reordering). This proposal would specify distinct parameters for each "output layer set" and to change the definition of an operation point to be specific to an output layer set instead of a 'layer set". Decision: Adopted this aspect as well.305 #define H_MV_6_SHVC_O0098_36 1 // (SHVC/O0098/Scaled ref layer offset) #36 Modify signalling of scaled reference layer offsets to allow signalling of any lower layer, rather than just a direct reference layer, in order to enable alignment of auxiliary pictures. In further JCT-VC and JCT-3V discussion, it was also agreed to use the same offset signalling for MV-HEVC as well as SHVC306 #define H_MV_6_GEN_0153_28 1 //(Gen/O0153/output highest layer) #28 Add a flag in the VPS to indicate if startup process should output the highest available layer if the target output layer is not available.307 #define H_MV_6_PS_0109_25 1 //XXX(PS/O0109/default_one_target_output_layer_idc) #25 To change default_one_target_output_layer_flag to a two-bit default_one_target_output_layer_idc, and reserve the values 2 and 3308 #define H_MV_6_O0226_37 1 //(VUI/O0226/Mod tile WPP) #37 Modifications to the VUI indicators of tile and WPP alignment related syntax elements, from the r1.309 #define H_MV_6_RALS_O0149_11 1 //XXX (RALS/O0149/Prop2): #11 Proposal: A new slice_reserved_flag is taken into use to indicate if a base-layer IDR picture initiates the layer-wise start-up process. Decision: Adopt (the bit should not be required to be present; if present should be the bit after the discardable_flag, and discardable_flag should be the first one of the three, and the poc reset flag is not required to be present).310 #define H_MV_6_PSEM_O0142_3 1 // (PSEM/O0142/Conditional extension syntax) #3 Adopt JCTVC-O0142 (as a structure to be used to switch whatever extensions we define in SPS, not necessarily committing to having these extensions be separate for each extension, but the current plan unless decided otherwise is to use one flag for range extensions syntax presence and one flag for SHVC+MV-HEVC extension syntax presence)311 #define H_MV_6_FIX_GET_VIEW_ID 1 // Fix get view id312 #define H_MV_6_LAYER_ID_32 1 // (Gen/O0137,O0200,O0223,Layer id) #32 Add (editorial equivalent of) "The value of nuh_layer_id shall be in the range of 0 to 62. The value of 63 for nuh_layer_id is reserved for future use by ITU-T | ISO/IEC. Decoders shall ignore all data that follow the value 63 for nuh_layer_id in a NAL unit." and specify that vps_max_layers_minus1 shall not be equal to 63, but decoders shall allow that value to appear in the bitstream. Specify that the value 63 is interpreted the same as the value 62 (e.g., MaxLayersMinus1 = Min( 62, vps_max_layers_minus1) and subsequently refer to MaxLayersMinus1 instead of vps_max_layers_minus1)313 #define H_MV_6_PS_O0118_33 1 // (PS/O0118/visual signal info in vui per layer) #33 Add visual signal information (video_format, video_full_range_flag, colour_primaries, transfer_characteristics, matrix_coeffs) per layer to the VPS VUI, from v2 version of JCTVC-O0118.314 #define H_MV_6_POC_31_35_38 1 //XXX Various related to POC315 // (Misc/O0062/POC LSB present) (SH changes)316 // (POC/O0117/Modify PicOrderCntVal of prevTid0Pic) #35 Modification of the PicOrderCntVal of prevTid0Pic and modification to the decoding process for reference picture set, to address problems found for cross-layer POC alignment.317 // (POC/O0211/Fix ambiguity) #38 Modify POC derivation to correct an ambiguity in the spec.318 #define H_MV_6_MISC_O0062_31 1 // (Misc/O0062/POC LSB present) (without SH changes ) #31 The proposal's "option 3" is to add a flag in the VPS for each EL to control whether these LSBs are present or not (for IDR pictures), and when not present, the LSBs are inferred to be equal to 0. Decision: Adopted (as described herein).319 #define H_MV_6_ILDDS_ILREFPICS_27_34 1 // Various inter layer reference picture derivation320 // (ILDSD/O0225/max_tid_il_ref_pics RPL const.) #27 Change derivation of NumActiveRefLayerPics to consider max_tid_il_ref_pics.321 // (ILDSD/O0120/sub_layers_vps_max_minus1 RPL const) #34 Modify inter-layer reference picture list default construction to incorporate max temporal sub-layers per layer syntax elements in VPS extension, from r2 version of JCTVC-O0120322 #define H_MV_6_ILDDS_O0225_30 1 // (ILDSD/O0225/signal max_tid_il_ref_pics per layer ) #30 2nd proposal of JCTVC-O0225 regarding signalling of max_tid_il_ref_pics per layer, based upon relation to SCE2 on single loop decoding. Decision: Adopted.323 #define H_MV_6_ILDSD_O0120_26 1 // (ILDSD/O0120/sub_layers_vps_max_minus1) #26 Add syntax elements to signal max temporal sub-layers for each layer in the VPS, with a gating flag, from JCTVC- option 2.324 #define H_MV_6_PS_O0223_29 1 // (PS/O0223/Cross layer alignment type) #29 Add a flag in VPS VUI to indicate cross layer pic type alignment. Move cross_layer_irap_aligned_flag to VPS VUI and make presence condition on added flag325 #define H_MV_6_PS_0092_17 1 // (PS/O0092/Sharing SPS PPS) #17 Restrict sharing of SPS and PPS across layers to avoid creating problems during sub-bitstream extraction, based on modification of proposals in JCTVC-O0059 and JCTVC-O0092, reflected in the v2 version of O0092.326 #define H_MV_6_PS_REP_FORM_18_19_20 1 // Various Rep format327 // (PS/O0096/rep format syntax element length ) #20 Modification of length to 8 bit as decided later in trac.328 // (PS/O0179/Rep. Format) #18 Add flag in rep_format( ) syntax structure to control sending of chroma and bit depth related parameters, as proposed in the v2 version of JCTVC-O0179.329 // (PS/O0096/rep format) #20 Modify the SPS syntax for layers with nuh_layer_id > 0 to signal a reference to a rep_format index in the VPS, rather than signalling explicit representation format data in the SPS, from the v2 version of JCTVC-O0096.330 // (PS/FIX/N0092/Rep. Format) #19 Inferences.331 #define H_MV_6_PS_O0096_21 1 // (PS/O0096/direct_dependency_type gating flag) #21 Add a gating flag in VPS extension to condition the presence of direct dependency type, with a default type signalled, from JCTVC-O0096332 #define H_MV_6_PS_O0109_22 1 // (PS/O0109/view_id_len) #22 Modify the VPS extension syntax and semantics to replace view_id_len_minus1 with view_id_len, always signal that syntax element, add a constraint that (1<<view_id_len) >= NumViews, and modify view_id_val semantics to infer value of 0 when not present, from discussion of JCTVC-O0109333 #define H_MV_6_PS_O0109_23 1 // (PS/O0109/profile_ref_minus1 constraint) #23 Modify the semantics of profile_ref_minus1[ i ] to replace shall be less than i?with shall be less than or equal to i? from discussion of JCTVC-O0109334 #define H_MV_6_PS_O0109_24 1 // (PS/O0109/vps_vui_present_flag move) #24 Move the vps_vui_present_flag to precede vps_vui_offset, and make vps_vui_offset conditional on that flag, from JCTVC-O0109335 336 295 337 296 ///////////////////////////////////////////////////////////////////////////////////////// … … 349 308 #define MAX_VPS_OP_SETS_PLUS1 1024 350 309 #if H_MV 351 #if H_MV_6_LAYER_ID_32352 310 #define MAX_VPS_NUH_LAYER_ID_PLUS1 63 353 #else354 #define MAX_VPS_NUH_LAYER_ID_PLUS1 64355 #endif356 311 #define MAX_NUM_SCALABILITY_TYPES 16 357 312 #define ENC_CFG_CONSOUT_SPACE 29 … … 377 332 #define MAX_CPB_CNT 32 ///< Upper bound of (cpb_cnt_minus1 + 1) 378 333 #if H_MV 379 #if H_MV_6_LAYER_ID_32380 334 #define MAX_NUM_LAYER_IDS 63 381 335 #define MAX_NUM_LAYERS 63 382 #else383 #define MAX_NUM_LAYER_IDS 64384 #define MAX_NUM_LAYERS 64385 #endif386 336 #define MAX_VPS_PROFILE_TIER_LEVEL 64 387 337 #define MAX_VPS_ADD_OUTPUT_LAYER_SETS 1024 388 338 #define MAX_VPS_OUTPUTLAYER_SETS ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 ) 389 #if H_MV_6_PS_O0118_33390 339 #define MAX_NUM_VIDEO_SIGNAL_INFO 16 391 #endif392 #if H_MV_6_SHVC_O0098_36393 340 #define MAX_NUM_SCALED_REF_LAYERS MAX_NUM_LAYERS-1 394 #endif395 #if H_MV_6_HRD_O0164_15396 341 #define MAX_NUM_BSP_HRD_PARAMETERS 100 ///< Maximum value is actually not specified 397 342 #define MAX_NUM_BITSTREAM_PARTITIONS 100 ///< Maximum value is actually not specified 398 343 #define MAX_NUM_BSP_SCHED_COMBINATION 100 ///< Maximum value is actually not specified 399 #endif400 344 #endif 401 345 … … 875 819 #if H_MV 876 820 877 #if H_MV_6_PSEM_O0142_3878 821 enum PsExtensionTypes 879 822 { … … 885 828 PS_EX_T_MAX_NUM = 8 886 829 }; 887 #endif888 830 889 831 /// scalability types -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r765 r766 556 556 557 557 READ_FLAG( uiCode, "video_signal_type_present_flag"); pcVUI->setVideoSignalTypePresentFlag(uiCode); 558 #if H_MV_6_PS_O0118_33559 558 assert( pcSPS->getLayerId() == 0 || !pcVUI->getVideoSignalTypePresentFlag() ); 560 #endif561 559 562 560 if (pcVUI->getVideoSignalTypePresentFlag()) … … 746 744 { 747 745 READ_FLAG( uiCode, "update_rep_format_flag" ); pcSPS->setUpdateRepFormatFlag( uiCode == 1 ); 748 #if H_MV_6_PS_REP_FORM_18_19_20749 746 if ( pcSPS->getUpdateRepFormatFlag() ) 750 747 { … … 754 751 else 755 752 { 756 #else757 }758 759 if ( pcSPS->getUpdateRepFormatFlag() )760 {761 #endif762 753 #endif 763 754 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); … … 795 786 796 787 #if H_MV 797 #if H_MV_6_PS_REP_FORM_18_19_20798 788 if ( pcSPS->getLayerId() == 0 ) 799 #else800 if ( pcSPS->getUpdateRepFormatFlag() )801 #endif802 789 { 803 790 #endif … … 948 935 949 936 READ_FLAG( uiCode, "sps_extension_flag"); 950 #if H_MV_6_PSEM_O0142_3951 937 pcSPS->setSpsExtensionFlag( uiCode ); 952 #endif953 938 if (pcSPS->getSpsExtensionFlag( ) ) 954 939 { 955 #if !H_MV_6_PSEM_O0142_3956 #if H_MV957 parseSPSExtension( pcSPS );958 READ_FLAG( uiCode, "sps_extension2_flag");959 if ( uiCode )960 {961 #if H_3D962 parseSPSExtension2( pcSPS, viewIndex, depthFlag );963 READ_FLAG( uiCode, "sps_extension3_flag");964 if ( uiCode )965 {966 #endif967 #endif968 #else969 940 for (Int i = 0; i < PS_EX_T_MAX_NUM; i++) 970 941 { … … 991 962 if ( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_ESC )) 992 963 { 993 #endif994 964 while ( xMoreRbspData() ) 995 965 { 996 966 READ_FLAG( uiCode, "sps_extension_data_flag"); 997 967 } 998 #if H_MV_6_PSEM_O0142_3 999 } 1000 #else 1001 #if H_MV 1002 #if H_3D 1003 } 1004 #endif 1005 } 1006 #endif 1007 #endif 968 } 1008 969 } 1009 970 } … … 1014 975 UInt uiCode; 1015 976 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false); 1016 #if !H_MV_6_SHVC_O0098_361017 READ_UVLC( uiCode, "sps_shvc_reserved_zero_idc" );1018 #else1019 977 1020 978 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode ); … … 1031 989 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode ); 1032 990 } 1033 #endif1034 991 } 1035 992 … … 1081 1038 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 1082 1039 #if H_MV 1083 #if H_MV_6_LAYER_ID_321084 1040 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayersMinus1( std::min( uiCode, (UInt) ( MAX_NUM_LAYER_IDS-1) ) ); 1085 #else1086 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayersMinus1( uiCode );1087 #endif1088 1041 #else 1089 1042 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); … … 1140 1093 } 1141 1094 } 1142 #if H_MV_6_HRD_O0217_131143 1095 pcVPS->deriveLayerSetLayerIdList(); 1144 #endif1145 1096 TimingInfo *timingInfo = pcVPS->getTimingInfo(); 1146 1097 READ_FLAG( uiCode, "vps_timing_info_present_flag"); timingInfo->setTimingInfoPresentFlag (uiCode ? true : false); … … 1209 1160 UInt uiCode; 1210 1161 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false ); 1211 #if H_MV_6_PS_O0109_241212 1162 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); if ( pcVPS->getVpsVuiPresentFlag() ) 1213 1163 { 1214 #endif1215 1164 READ_CODE( 16, uiCode, "vps_vui_offset" ); pcVPS->setVpsVuiOffset( uiCode ); 1216 #if H_MV_6_PS_O0109_24 1217 } 1218 #endif 1165 } 1219 1166 1220 1167 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); … … 1263 1210 } 1264 1211 1265 #if H_MV_6_PS_O0109_221266 1212 READ_CODE( 4, uiCode, "view_id_len" ); pcVPS->setViewIdLen( uiCode ); 1267 1213 … … 1280 1226 } 1281 1227 } 1282 #else1283 // GT spec says: trac #391284 // if ( pcVPS->getNumViews() > 1 )1285 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.1286 {1287 READ_CODE( 4, uiCode, "view_id_len_minus1" ); pcVPS->setViewIdLenMinus1( uiCode );1288 }1289 1290 for( Int i = 0; i < pcVPS->getNumViews(); i++ )1291 {1292 READ_CODE( pcVPS->getViewIdLenMinus1( ) + 1, uiCode, "view_id_val[i]" ); pcVPS->setViewIdVal( i, uiCode );1293 }1294 #endif1295 1228 1296 1229 … … 1302 1235 } 1303 1236 } 1304 #if H_MV_6_MISC_O0062_311305 1237 pcVPS->setRefLayers(); 1306 #endif1307 #if H_MV_6_ILDSD_O0120_261308 1238 READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 ); 1309 1239 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1323 1253 } 1324 1254 } 1325 #endif1326 1255 READ_FLAG( uiCode, "max_tid_ref_present_flag" ); pcVPS->setMaxTidRefPresentFlag( uiCode == 1 ); 1327 1256 … … 1330 1259 for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ ) 1331 1260 { 1332 #if H_MV_6_ILDDS_O0225_301333 1261 for( Int j = i + 1; j <= pcVPS->getMaxLayersMinus1(); j++ ) 1334 1262 { … … 1338 1266 } 1339 1267 } 1340 #else1341 READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); pcVPS->setMaxTidIlRefPicPlus1( i , uiCode );1342 #endif1343 1268 } 1344 1269 } … … 1354 1279 { 1355 1280 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode ); 1356 #if H_MV_6_PS_O0109_231357 1281 pcVPS->checkProfileRefMinus1( i ); 1358 #endif1359 1282 } 1360 1283 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); … … 1379 1302 if( numOutputLayerSets > 1) 1380 1303 { 1381 #if H_MV_6_PS_0109_251382 1304 READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode ); 1383 1305 pcVPS->checkDefaultOneTargetOutputLayerIdc(); 1384 #else1385 READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag( uiCode == 1);1386 #endif1387 1306 } 1388 1307 1389 #if H_MV_6_HRD_O0217_131390 1308 pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 1391 1309 pcVPS->setOutputLayerSetIdxMinus1(0, -1); 1392 #endif1393 1310 for( Int i = 1; i < numOutputLayerSets; i++ ) 1394 1311 { … … 1401 1318 } 1402 1319 } 1403 #if H_MV_6_HRD_O0217_131404 1320 else 1405 1321 { // These inference rules would also be helpful in spec text … … 1410 1326 } 1411 1327 } 1412 #endif1413 1328 1414 1329 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) … … 1417 1332 } 1418 1333 } 1419 #if H_MV_6_GEN_0153_281420 1334 if( pcVPS->getMaxLayersMinus1() > 0 ) 1421 1335 { 1422 1336 READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 ); 1423 1337 } 1424 #endif1425 #if H_MV_6_HRD_O0217_131426 1338 pcVPS->deriveTargetLayerIdLists(); 1427 #endif1428 1339 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1429 1340 if ( pcVPS->getRepFormatIdxPresentFlag() ) … … 1434 1345 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) 1435 1346 { 1436 #if H_MV_6_PS_REP_FORM_18_19_201437 1347 assert( pcVPS->getRepFormat(i) == NULL ); 1438 1348 TComRepFormat* curRepFormat = new TComRepFormat(); … … 1440 1350 parseRepFormat( i, curRepFormat , prevRepFormat); 1441 1351 pcVPS->setRepFormat(i, curRepFormat ); 1442 #else1443 assert( pcVPS->getRepFormat(i) == NULL );1444 TComRepFormat* repFormat = new TComRepFormat();1445 parseRepFormat( repFormat );1446 pcVPS->setRepFormat(i, repFormat );1447 #endif1448 1352 } 1449 1353 … … 1454 1358 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1455 1359 { 1456 #if H_MV_6_PS_REP_FORM_18_19_201457 1360 READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1458 #else1459 READ_CODE( 4, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );1460 #endif1461 1361 } 1462 1362 } … … 1464 1364 1465 1365 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); 1466 #if H_MV_6_MISC_O0062_311467 1366 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1468 1367 { … … 1472 1371 } 1473 1372 } 1474 #endif 1475 1476 #if H_MV_6_HRD_O0217_13 1373 1477 1374 parseDpbSize( pcVPS ); 1478 #endif 1479 1480 #if !H_MV_6_PS_O0223_29 1481 READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPS->setCrossLayerIrapAlignedFlag( uiCode == 1 ); 1482 #endif 1375 1483 1376 READ_UVLC( uiCode, "direct_dep_type_len_minus2") ; pcVPS->setDirectDepTypeLenMinus2 ( uiCode ); 1484 1377 1485 #if H_MV_6_PS_O0096_211486 1378 READ_FLAG( uiCode, "default_direct_dependency_flag" ); pcVPS->setDefaultDirectDependencyFlag( uiCode == 1 ); 1487 1379 if ( pcVPS->getDefaultDirectDependencyFlag( ) ) … … 1507 1399 } 1508 1400 } 1509 #else1510 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1511 {1512 for( Int j = 0; j < i; j++ )1513 {1514 if (pcVPS->getDirectDependencyFlag( i, j) )1515 {1516 READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2, uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode);1517 }1518 }1519 }1520 #endif1521 1401 1522 1402 READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" ); 1523 #if !H_MV_6_PS_O0109_241524 READ_FLAG( uiCode, "vps_vui_present_flag" ) ; pcVPS->setVpsVuiPresentFlag( uiCode == 1 );1525 #endif1526 1403 1527 1404 if( pcVPS->getVpsVuiPresentFlag() ) … … 1532 1409 1533 1410 pcVPS->checkVPSExtensionSyntax(); 1534 #if !H_MV_6_MISC_O0062_31 1535 pcVPS->setRefLayers(); 1536 #endif 1537 } 1538 1539 #if H_MV_6_PS_REP_FORM_18_19_20 1411 } 1412 1540 1413 Void TDecCavlc::parseRepFormat( Int i, TComRepFormat* pcRepFormat, TComRepFormat* pcPrevRepFormat ) 1541 #else1542 Void TDecCavlc::parseRepFormat( TComRepFormat* pcRepFormat )1543 #endif1544 1414 { 1545 1415 assert( pcRepFormat ); … … 1547 1417 UInt uiCode; 1548 1418 1549 #if H_MV_6_PS_REP_FORM_18_19_201550 1419 READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" ); pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode ); 1551 1420 READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode ); … … 1556 1425 if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() ) 1557 1426 { 1558 #endif1559 1427 READ_CODE( 2, uiCode, "chroma_format_vps_idc" ); pcRepFormat->setChromaFormatVpsIdc ( uiCode ); 1560 1428 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 ) … … 1562 1430 READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 ); 1563 1431 } 1564 #if !H_MV_6_PS_REP_FORM_18_19_201565 READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" ); pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode );1566 READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode );1567 #endif1568 1432 READ_CODE( 4, uiCode, "bit_depth_vps_luma_minus8" ); pcRepFormat->setBitDepthVpsLumaMinus8 ( uiCode ); 1569 1433 READ_CODE( 4, uiCode, "bit_depth_vps_chroma_minus8" ); pcRepFormat->setBitDepthVpsChromaMinus8 ( uiCode ); 1570 #if H_MV_6_PS_REP_FORM_18_19_201571 1434 } 1572 1435 else … … 1574 1437 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false ); 1575 1438 } 1576 #endif1577 1439 } 1578 1440 … … 1587 1449 1588 1450 UInt uiCode; 1589 #if H_MV_6_PS_O0223_291590 1451 READ_FLAG( uiCode, "cross_layer_pic_type_aligned_flag" ); pcVPSVUI->setCrossLayerPicTypeAlignedFlag( uiCode == 1 ); 1591 1452 if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() ) … … 1593 1454 READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 ); 1594 1455 } 1595 #endif1596 1456 READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 ); 1597 1457 READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 ); … … 1624 1484 } 1625 1485 1626 #if H_MV_6_O0226_371627 1486 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); 1628 1487 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1659 1518 } 1660 1519 } 1661 #else1662 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1663 {1664 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )1665 {1666 READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVPSVUI->setTileBoundariesAlignedFlag( i, j, uiCode == 1 );1667 }1668 }1669 #endif1670 1520 1671 1521 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); … … 1690 1540 } 1691 1541 1692 #if H_MV_6_PS_O0118_331693 1542 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 ); 1694 1543 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1724 1573 } 1725 1574 } 1726 #endif1727 #if H_MV_6_HRD_O0164_151728 1575 READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 ); 1729 1576 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1731 1578 parseVpsVuiBspHrdParameters( pcVPS ); 1732 1579 } 1733 #endif 1734 } 1735 1736 #if H_MV_6_HRD_O0164_15 1580 } 1581 1737 1582 Void TDecCavlc::parseVpsVuiBspHrdParameters( TComVPS* pcVPS ) 1738 1583 { … … 1791 1636 } 1792 1637 } 1793 #endif 1794 1795 #if H_MV_6_PS_O0118_33 1638 1796 1639 Void TDecCavlc::parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) 1797 1640 { … … 1803 1646 READ_CODE( 8, uiCode, "matrix_coeffs_vps" ); pcVideoSignalInfo->setMatrixCoeffsVps( uiCode ); 1804 1647 } 1805 #endif 1806 1807 #if H_MV_6_HRD_O0217_13 1648 1808 1649 Void TDecCavlc::parseDpbSize( TComVPS* vps ) 1809 1650 { … … 1846 1687 } 1847 1688 } 1848 #endif1849 1689 #endif 1850 1690 … … 2000 1840 sps->inferRepFormat ( vps , rpcSlice->getLayerId() ); 2001 1841 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 2002 #if H_MV_6_PS_O0118_332003 1842 if ( sps->getVuiParametersPresentFlag() ) 2004 1843 { 2005 1844 sps->getVuiParameters()->inferVideoSignalInfo( vps, rpcSlice->getLayerId() ); 2006 1845 } 2007 #endif2008 1846 rpcSlice->setVPS(vps); 2009 1847 rpcSlice->setViewId ( vps->getViewId ( rpcSlice->getLayerId() ) ); … … 2059 1897 #if H_MV 2060 1898 Int esb = 0; //Don't use i, otherwise will shadow something below 2061 #if !H_MV_6_RALS_O0149_11 1899 1900 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1901 { 1902 esb++; 1903 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 ); 1904 } 1905 1906 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1907 { 1908 esb++; 1909 READ_FLAG( uiCode, "cross_layer_bla_flag" ); rpcSlice->setCrossLayerBlaFlag( uiCode == 1 ); 1910 } 1911 rpcSlice->checkCrossLayerBlaFlag( ); 1912 2062 1913 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 2063 1914 { … … 2065 1916 READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 ); 2066 1917 } 2067 #endif2068 2069 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )2070 {2071 esb++;2072 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );2073 }2074 2075 #if H_MV_6_RALS_O0149_112076 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )2077 {2078 esb++;2079 READ_FLAG( uiCode, "cross_layer_bla_flag" ); rpcSlice->setCrossLayerBlaFlag( uiCode == 1 );2080 }2081 rpcSlice->checkCrossLayerBlaFlag( );2082 2083 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )2084 {2085 esb++;2086 READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 );2087 }2088 #endif2089 1918 2090 1919 for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) … … 2111 1940 2112 1941 2113 #if H_MV_6_POC_31_35_382114 1942 UInt slicePicOrderCntLsb = 0; 2115 1943 Int iPOClsb = slicePicOrderCntLsb; // Needed later … … 2158 1986 rpcSlice->setPOC ( 0 ); 2159 1987 } 2160 #endif2161 1988 2162 1989 if( rpcSlice->getIdrPicFlag() ) 2163 1990 { 2164 #if !H_MV_6_POC_31_35_382165 rpcSlice->setPOC(0);2166 #endif2167 1991 TComReferencePictureSet* rps = rpcSlice->getLocalRPS(); 2168 1992 rps->setNumberOfNegativePictures(0); … … 2177 2001 else 2178 2002 { 2179 #if !H_MV_6_POC_31_35_382180 READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb");2181 Int iPOClsb = uiCode;2182 Int iPrevPOC = rpcSlice->getPrevTid0POC();2183 Int iMaxPOClsb = 1<< sps->getBitsForPOC();2184 Int iPrevPOClsb = iPrevPOC & (iMaxPOClsb - 1);2185 Int iPrevPOCmsb = iPrevPOC-iPrevPOClsb;2186 Int iPOCmsb;2187 if( ( iPOClsb < iPrevPOClsb ) && ( ( iPrevPOClsb - iPOClsb ) >= ( iMaxPOClsb / 2 ) ) )2188 {2189 iPOCmsb = iPrevPOCmsb + iMaxPOClsb;2190 }2191 else if( (iPOClsb > iPrevPOClsb ) && ( (iPOClsb - iPrevPOClsb ) > ( iMaxPOClsb / 2 ) ) )2192 {2193 iPOCmsb = iPrevPOCmsb - iMaxPOClsb;2194 }2195 else2196 {2197 iPOCmsb = iPrevPOCmsb;2198 }2199 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP2200 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL2201 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )2202 {2203 // For BLA picture types, POCmsb is set to 0.2204 iPOCmsb = 0;2205 }2206 rpcSlice->setPOC (iPOCmsb+iPOClsb);2207 #if H_MV2208 if ( rpcSlice->getPocResetFlag() )2209 {2210 rpcSlice->setPocBeforeReset ( rpcSlice->getPOC() );2211 rpcSlice->setPOC ( 0 );2212 2213 }2214 #endif2215 #endif2216 2003 TComReferencePictureSet* rps; 2217 2004 rps = rpcSlice->getLocalRPS(); … … 2347 2134 } 2348 2135 #if H_MV 2349 #if H_MV_6_ILDDS_ILREFPICS_27_342350 2136 Bool interLayerPredLayerIdcPresentFlag = false; 2351 #endif2352 2137 Int layerId = rpcSlice->getLayerId(); 2353 2138 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) … … 2362 2147 if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) 2363 2148 { 2364 #if H_MV_6_ILDDS_ILREFPICS_27_342365 2149 interLayerPredLayerIdcPresentFlag = true; 2366 #endif2367 2150 for( Int idx = 0; idx < rpcSlice->getNumActiveRefLayerPics(); idx++ ) 2368 2151 { … … 2372 2155 } 2373 2156 } 2374 #if H_MV_6_ILDDS_ILREFPICS_27_342375 2157 if ( !interLayerPredLayerIdcPresentFlag ) 2376 2158 { … … 2380 2162 } 2381 2163 } 2382 #endif2383 2164 #endif 2384 2165 if(sps->getUseSAO()) -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
r758 r766 78 78 #if H_MV 79 79 Void parseVPSExtension ( TComVPS* pcVPS ); 80 #if H_MV_6_PS_REP_FORM_18_19_2081 80 Void parseRepFormat ( Int i, TComRepFormat* curRepFormat, TComRepFormat* prevRepFormat ); 82 #else83 Void parseRepFormat ( TComRepFormat* pcRepFormat );84 #endif85 81 Void parseVPSVUI ( TComVPS* pcVPS ); 86 #if H_MV_6_PS_O0118_3387 82 Void parseVideoSignalInfo ( TComVideoSignalInfo* pcVideoSignalInfo ); 88 #endif89 #if H_MV_6_HRD_O0217_1390 83 Void parseDpbSize ( TComVPS* pcVPS ); 91 #endif92 #if H_MV_6_HRD_O0164_1593 84 Void parseVpsVuiBspHrdParameters( TComVPS* pcVPS ); 94 #endif95 85 #endif 96 86 -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r765 r766 656 656 #if H_MV 657 657 m_apcSlicePilot->setVPS(vps); 658 #if H_MV_6_PS_0092_17659 658 // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 660 659 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) ); 661 660 // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 662 661 assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) ); 663 #endif664 662 sps->inferRepFormat ( vps , m_layerId ); 665 663 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); … … 692 690 693 691 #if H_MV 694 #if H_MV_FIX_SKIP_PICTURES695 692 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ) 696 #else697 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag )698 #endif699 693 { 700 694 assert( nalu.m_layerId == m_layerId ); … … 754 748 #endif 755 749 756 #if H_MV_LAYER_WISE_STARTUP757 750 xCeckNoClrasOutput(); 758 #endif759 751 // Skip pictures due to random access 760 752 if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay)) … … 762 754 m_prevSliceSkipped = true; 763 755 m_skippedPOC = m_apcSlicePilot->getPOC(); 764 #if H_MV_FIX_SKIP_PICTURES765 756 sliceSkippedFlag = true; 766 #endif767 757 return false; 768 758 } … … 772 762 m_prevSliceSkipped = true; 773 763 m_skippedPOC = m_apcSlicePilot->getPOC(); 774 #if H_MV_FIX_SKIP_PICTURES775 764 sliceSkippedFlag = true; 776 #endif777 765 return false; 778 766 } … … 1222 1210 1223 1211 #if H_MV 1224 #if H_MV_FIX_SKIP_PICTURES1225 1212 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ) 1226 #else1227 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag)1228 #endif1229 1213 #else 1230 1214 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay) … … 1271 1255 case NAL_UNIT_CODED_SLICE_RASL_R: 1272 1256 #if H_MV 1273 #if H_MV_FIX_SKIP_PICTURES1274 1257 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag, sliceSkippedFlag ); 1275 #else1276 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag);1277 #endif1278 1258 #else 1279 1259 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay); … … 1324 1304 return true; 1325 1305 } 1326 #if H_MV_LAYER_WISE_STARTUP1327 1306 else if ( !m_layerInitilizedFlag[ m_layerId ] ) // start of random access point, m_pocRandomAccess has not been set yet. 1328 #else1329 else if (m_pocRandomAccess == MAX_INT) // start of random access point, m_pocRandomAccess has not been set yet.1330 #endif1331 1307 { 1332 1308 if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA … … 1336 1312 { 1337 1313 1338 #if H_MV_LAYER_WISE_STARTUP1339 1314 if ( xAllRefLayersInitilized() ) 1340 1315 { … … 1346 1321 return true; 1347 1322 } 1348 #else1349 // set the POC random access since we need to skip the reordered pictures in the case of CRA/CRANT/BLA/BLANT.1350 m_pocRandomAccess = m_apcSlicePilot->getPOC();1351 #endif1352 1323 } 1353 1324 else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 1354 1325 { 1355 #if H_MV_LAYER_WISE_STARTUP1356 1326 if ( xAllRefLayersInitilized() ) 1357 1327 { … … 1363 1333 return true; 1364 1334 } 1365 #else1366 m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable.1367 #endif1368 1335 } 1369 1336 else 1370 1337 { 1371 #if H_MV_FIX_SKIP_PICTURES1372 1338 static Bool warningMessage[MAX_NUM_LAYERS]; 1373 1339 static Bool warningInitFlag = false; … … 1387 1353 warningMessage[m_layerId] = false; 1388 1354 } 1389 #else1390 static Bool warningMessage = false;1391 if(!warningMessage)1392 {1393 printf("\nWarning: this is not a valid random access point and the data is discarded until the first CRA picture");1394 warningMessage = true;1395 }1396 #endif1397 1355 return true; 1398 1356 } … … 1404 1362 return true; 1405 1363 } 1406 #if H_MV_LAYER_WISE_STARTUP1407 1364 return !m_layerInitilizedFlag[ getLayerId() ]; 1408 #else1409 // if we reach here, then the picture is not skipped.1410 return false;1411 #endif1412 1365 } 1413 1366 … … 1451 1404 } 1452 1405 1453 #if H_MV_LAYER_WISE_STARTUP1454 1406 Void TDecTop::xCeckNoClrasOutput() 1455 1407 { … … 1486 1438 } 1487 1439 #endif 1488 #endif1489 1440 //! \} -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.h
r765 r766 186 186 TComList<TComPic*> m_cListPic; // Dynamic buffer 187 187 #if H_MV 188 #if H_MV_LAYER_WISE_STARTUP189 188 Bool* m_layerInitilizedFlag; // initialization Layers 190 #endif191 189 static ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets 192 190 #else … … 246 244 Void init(); 247 245 #if H_MV 248 #if H_MV_FIX_SKIP_PICTURES249 246 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer, Bool& sliceSkippedFlag ); 250 #else251 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );252 #endif253 247 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer ); 254 248 #else … … 268 262 TComList<TComPic*>* getListPic () { return &m_cListPic; } 269 263 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 270 #if H_MV_LAYER_WISE_STARTUP271 264 Void setLayerInitilizedFlags( Bool* val ) { m_layerInitilizedFlag = val; } 272 #endif273 #if H_MV_6_HRD_O0217_13274 265 TComVPS* getPrefetchedVPS () { return m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); }; //Assuming that currently only one VPS is present. 275 #endif276 266 Int getCurrPoc () { return m_apcSlicePilot->getPOC(); } 277 267 Void setLayerId ( Int layer) { m_layerId = layer; } … … 294 284 #if H_MV 295 285 TComPic* xGetPic( Int layerId, Int poc ); 296 #if H_MV_FIX_SKIP_PICTURES297 286 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ); 298 #else299 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag );300 #endif301 287 Void xResetPocInPicBuffer(); 302 #if H_MV_LAYER_WISE_STARTUP303 288 Void xCeckNoClrasOutput(); 304 289 305 290 Bool xAllRefLayersInitilized(); 306 #endif307 291 #else 308 292 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay); -
branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r765 r766 495 495 } 496 496 WRITE_FLAG(pcVUI->getVideoSignalTypePresentFlag(), "video_signal_type_present_flag"); 497 #if H_MV_6_PS_O0118_33498 497 assert( pcSPS->getLayerId() == 0 || !pcVUI->getVideoSignalTypePresentFlag() ); 499 #endif500 498 if (pcVUI->getVideoSignalTypePresentFlag()) 501 499 { … … 661 659 { 662 660 WRITE_FLAG( pcSPS->getUpdateRepFormatFlag( ) ? 1 : 0 , "update_rep_format_flag" ); 663 #if H_MV_6_PS_REP_FORM_18_19_20664 661 if ( pcSPS->getUpdateRepFormatFlag() ) 665 662 { … … 669 666 else 670 667 { 671 #else672 }673 674 if ( pcSPS->getUpdateRepFormatFlag() )675 {676 #endif677 668 #endif 678 669 WRITE_UVLC( pcSPS->getChromaFormatIdc (), "chroma_format_idc" ); … … 700 691 } 701 692 #if H_MV 702 #if H_MV_6_PS_REP_FORM_18_19_20703 693 if ( pcSPS->getLayerId() == 0 ) 704 #else705 if ( pcSPS->getUpdateRepFormatFlag() )706 #endif707 694 { 708 695 #endif … … 809 796 WRITE_FLAG( 0, "sps_extension_flag" ); 810 797 #else 811 #if H_MV_6_PSEM_O0142_3812 798 WRITE_FLAG( pcSPS->getSpsExtensionFlag(), "sps_extension_flag" ); 813 799 … … 836 822 #endif 837 823 } 838 #else839 WRITE_FLAG( 1, "sps_extension_flag" );840 codeSPSExtension( pcSPS );841 #if !H_3D842 WRITE_FLAG( 0, "sps_extension2_flag" );843 #else844 WRITE_FLAG( 1, "sps_extension2_flag" );845 codeSPSExtension2( pcSPS, viewIndex, depthFlag );846 WRITE_FLAG( 0, "sps_extension3_flag" );847 #endif848 #endif849 824 #endif 850 825 } … … 855 830 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" ); 856 831 857 #if !H_MV_6_SHVC_O0098_36858 WRITE_UVLC( 0, "sps_shvc_reserved_zero_idc" );859 #else860 832 WRITE_UVLC( pcSPS->getNumScaledRefLayerOffsets( ), "num_scaled_ref_layer_offsets" ); 861 833 … … 871 843 WRITE_SVLC( pcSPS->getScaledRefLayerBottomOffset( j ), "scaled_ref_layer_bottom_offset" ); 872 844 } 873 #endif874 845 } 875 846 #endif … … 1020 991 { 1021 992 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 1022 #if H_MV_6_PS_O0109_241023 993 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 1024 994 if ( pcVPS->getVpsVuiPresentFlag() ) 1025 995 { 1026 #endif1027 996 WRITE_CODE( pcVPS->getVpsVuiOffset( ), 16, "vps_vui_offset" ); // TBD 1028 #if H_MV_6_PS_O0109_24 1029 } 1030 #endif 997 } 1031 998 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 1032 999 … … 1075 1042 1076 1043 1077 #if H_MV_6_PS_O0109_221078 1044 WRITE_CODE( pcVPS->getViewIdLen( ), 4, "view_id_len" ); 1079 1045 … … 1092 1058 } 1093 1059 } 1094 #else1095 // GT spec says: trac #391096 // if ( pcVPS->getNumViews() > 1 )1097 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.1098 {1099 WRITE_CODE( pcVPS->getViewIdLenMinus1( ), 4, "view_id_len_minus1" );1100 }1101 1102 for( Int i = 0; i < pcVPS->getNumViews(); i++ )1103 {1104 WRITE_CODE( pcVPS->getViewIdVal( i ), pcVPS->getViewIdLenMinus1( ) + 1, "view_id_val[i]" );1105 }1106 #endif1107 1060 1108 1061 … … 1114 1067 } 1115 1068 } 1116 #if H_MV_6_ILDSD_O0120_261117 1069 WRITE_FLAG( pcVPS->getVpsSubLayersMaxMinus1PresentFlag( ) ? 1 : 0 , "vps_sub_layers_max_minus1_present_flag" ); 1118 1070 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1131 1083 } 1132 1084 } 1133 #endif1134 1085 WRITE_FLAG( pcVPS->getMaxTidRefPresentFlag( ) ? 1 : 0 , "max_tid_ref_present_flag" ); 1135 1086 … … 1138 1089 for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ ) 1139 1090 { 1140 #if H_MV_6_ILDDS_O0225_301141 1091 for( Int j = i + 1; j <= pcVPS->getMaxLayersMinus1(); j++ ) 1142 1092 { … … 1146 1096 } 1147 1097 } 1148 #else1149 WRITE_CODE( pcVPS->getMaxTidIlRefPicPlus1( i ), 3, "max_tid_il_ref_pics_plus1[i]" );1150 #endif1151 1098 } 1152 1099 } … … 1162 1109 { 1163 1110 WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" ); 1164 #if H_MV_6_PS_O0109_231165 1111 pcVPS->checkProfileRefMinus1( i ); 1166 #endif1167 1112 } 1168 1113 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); … … 1181 1126 if( numOutputLayerSets > 1) 1182 1127 { 1183 #if H_MV_6_PS_0109_251184 1128 WRITE_CODE( pcVPS->getDefaultOneTargetOutputLayerIdc( ), 2, "default_one_target_output_layer_idc" ); 1185 1129 pcVPS->checkDefaultOneTargetOutputLayerIdc(); 1186 #else1187 WRITE_FLAG( pcVPS->getDefaultOneTargetOutputLayerFlag( ) ? 1 : 0, "default_one_target_output_layer_flag" );1188 #endif1189 1130 } 1190 1131 1191 #if H_MV_6_HRD_O0217_131192 1132 assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 )); 1193 1133 assert( pcVPS->getOutputLayerSetIdxMinus1( 0 ) == -1 ); 1194 #endif1195 1134 for( Int i = 1; i < numOutputLayerSets; i++ ) 1196 1135 { … … 1203 1142 } 1204 1143 } 1205 #if H_MV_6_HRD_O0217_131206 1144 else 1207 1145 { // These inference rules would also be helpful in spec text … … 1212 1150 } 1213 1151 } 1214 #endif1215 1152 1216 1153 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) … … 1220 1157 } 1221 1158 1222 #if H_MV_6_GEN_0153_281223 1159 if( pcVPS->getMaxLayersMinus1() > 0 ) 1224 1160 { 1225 1161 WRITE_FLAG( pcVPS->getAltOutputLayerFlag( ) ? 1 : 0 , "alt_output_layer_flag" ); 1226 1162 } 1227 #endif1228 1163 1229 1164 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); … … 1235 1170 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) 1236 1171 { 1237 #if H_MV_6_PS_REP_FORM_18_19_201238 1172 TComRepFormat* curRepFormat = pcVPS->getRepFormat(i); 1239 1173 TComRepFormat* prevRepFormat = i > 0 ? pcVPS->getRepFormat( i - 1) : NULL; 1240 1174 codeRepFormat( i, curRepFormat , prevRepFormat); 1241 #else1242 TComRepFormat* pcRepFormat = pcVPS->getRepFormat(i);1243 codeRepFormat( pcRepFormat );1244 #endif1245 1175 } 1246 1176 … … 1251 1181 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1252 1182 { 1253 #if H_MV_6_PS_REP_FORM_18_19_201254 1183 WRITE_CODE( pcVPS->getVpsRepFormatIdx( i ), 8, "vps_rep_format_idx" ); 1255 #else1256 WRITE_CODE( pcVPS->getVpsRepFormatIdx( i ), 4, "vps_rep_format_idx" );1257 #endif1258 1184 } 1259 1185 } … … 1261 1187 1262 1188 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" ); 1263 #if H_MV_6_MISC_O0062_311264 1189 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1265 1190 { … … 1269 1194 } 1270 1195 } 1271 #endif1272 #if H_MV_6_HRD_O0217_131273 1196 codeDpbSize( pcVPS ); 1274 #endif 1275 1276 #if !H_MV_6_PS_O0223_29 1277 WRITE_FLAG( pcVPS->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" ); 1278 #endif 1197 1279 1198 WRITE_UVLC( pcVPS->getDirectDepTypeLenMinus2 ( ), "direct_dep_type_len_minus2"); 1280 1199 1281 #if H_MV_6_PS_O0096_211282 1200 WRITE_FLAG( pcVPS->getDefaultDirectDependencyFlag( ) ? 1 : 0 , "default_direct_dependency_flag" ); 1283 1201 … … 1305 1223 } 1306 1224 } 1307 #else1308 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1309 {1310 for( Int j = 0; j < i; j++ )1311 {1312 if (pcVPS->getDirectDependencyFlag( i, j) )1313 {1314 assert ( pcVPS->getDirectDependencyType( i, j ) != -1 );1315 WRITE_CODE( pcVPS->getDirectDependencyType( i, j ),pcVPS->getDirectDepTypeLenMinus2( ) + 2, "direct_dependency_type[i][j]" );1316 }1317 }1318 }1319 #endif1320 1225 WRITE_FLAG ( 0, "vps_shvc_reserved_zero_flag" ); 1321 #if !H_MV_6_PS_O0109_241322 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag( ) ? 1 : 0 , "vps_vui_present_flag" );1323 #endif1324 1226 1325 1227 if( pcVPS->getVpsVuiPresentFlag() ) … … 1329 1231 } 1330 1232 } 1331 #if H_MV_6_PS_O0118_331332 1233 Void TEncCavlc::codeVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) 1333 1234 { … … 1339 1240 WRITE_CODE( pcVideoSignalInfo->getMatrixCoeffsVps( ), 8, "matrix_coeffs_vps" ); 1340 1241 } 1341 #endif 1342 1343 #if H_MV_6_HRD_O0217_13 1242 1344 1243 Void TEncCavlc::codeDpbSize( TComVPS* vps ) 1345 1244 { … … 1381 1280 } 1382 1281 } 1383 #endif 1384 1385 #if H_MV_6_PS_REP_FORM_18_19_20 1282 1386 1283 Void TEncCavlc::codeRepFormat( Int i, TComRepFormat* pcRepFormat, TComRepFormat* pcPrevRepFormat ) 1387 #else1388 Void TEncCavlc::codeRepFormat( TComRepFormat* pcRepFormat )1389 #endif1390 1284 { 1391 1285 assert( pcRepFormat ); 1392 1286 1393 #if H_MV_6_PS_REP_FORM_18_19_201394 1287 WRITE_CODE( pcRepFormat->getPicWidthVpsInLumaSamples( ), 16, "pic_width_vps_in_luma_samples" ); 1395 1288 WRITE_CODE( pcRepFormat->getPicHeightVpsInLumaSamples( ), 16, "pic_height_vps_in_luma_samples" ); … … 1400 1293 if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() ) 1401 1294 { 1402 #endif1403 1295 WRITE_CODE( pcRepFormat->getChromaFormatVpsIdc( ), 2, "chroma_format_vps_idc" ); 1404 1296 … … 1407 1299 WRITE_FLAG( pcRepFormat->getSeparateColourPlaneVpsFlag( ) ? 1 : 0 , "separate_colour_plane_vps_flag" ); 1408 1300 } 1409 #if !H_MV_6_PS_REP_FORM_18_19_201410 WRITE_CODE( pcRepFormat->getPicWidthVpsInLumaSamples( ), 16, "pic_width_vps_in_luma_samples" );1411 WRITE_CODE( pcRepFormat->getPicHeightVpsInLumaSamples( ), 16, "pic_height_vps_in_luma_samples" );1412 #endif1413 1301 WRITE_CODE( pcRepFormat->getBitDepthVpsLumaMinus8( ), 4, "bit_depth_vps_luma_minus8" ); 1414 1302 WRITE_CODE( pcRepFormat->getBitDepthVpsChromaMinus8( ), 4, "bit_depth_vps_chroma_minus8" ); 1415 #if H_MV_6_PS_REP_FORM_18_19_201416 1303 } 1417 1304 else … … 1419 1306 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, true ); 1420 1307 } 1421 #endif1422 1308 } 1423 1309 … … 1430 1316 assert( pcVPSVUI ); 1431 1317 1432 #if H_MV_6_PS_O0223_291433 1318 WRITE_FLAG( pcVPSVUI->getCrossLayerPicTypeAlignedFlag( ) ? 1 : 0 , "cross_layer_pic_type_aligned_flag" ); 1434 1319 if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() ) … … 1436 1321 WRITE_FLAG( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" ); 1437 1322 } 1438 #endif1439 1323 1440 1324 WRITE_FLAG( pcVPSVUI->getBitRatePresentVpsFlag( ) ? 1 : 0 , "bit_rate_present_vps_flag" ); … … 1468 1352 } 1469 1353 1470 #if H_MV_6_O0226_371471 1354 WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" ); 1472 1355 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1503 1386 } 1504 1387 } 1505 #else1506 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1507 {1508 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )1509 {1510 WRITE_FLAG( pcVPSVUI->getTileBoundariesAlignedFlag( i, j ) ? 1 : 0 , "tile_boundaries_aligned_flag" );1511 }1512 }1513 #endif1514 1388 WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1515 1389 … … 1532 1406 } 1533 1407 } 1534 #if H_MV_6_PS_O0118_331535 1408 WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" ); 1536 1409 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1565 1438 } 1566 1439 } 1567 #endif1568 #if H_MV_6_HRD_O0164_151569 1440 WRITE_FLAG( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ? 1 : 0 , "vps_vui_bsp_hrd_present_flag" ); 1570 1441 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1572 1443 codeVpsVuiBspHrdParameters( pcVPS ); 1573 1444 } 1574 #endif 1575 } 1576 #if H_MV_6_HRD_O0164_15 1445 } 1577 1446 Void TEncCavlc::codeVpsVuiBspHrdParameters( TComVPS* pcVPS ) 1578 1447 { … … 1631 1500 } 1632 1501 } 1633 #endif1634 1502 1635 1503 #endif … … 1783 1651 #if H_MV 1784 1652 Int esb = 0; //Don't use i, otherwise will shadow something below 1785 #if !H_MV_6_RALS_O0149_11 1653 1654 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1655 { 1656 esb++; 1657 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" ); 1658 } 1659 1660 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1661 { 1662 esb++; 1663 WRITE_FLAG( pcSlice->getCrossLayerBlaFlag( ) ? 1 : 0 , "cross_layer_bla_flag" ); 1664 } 1665 pcSlice->checkCrossLayerBlaFlag( ); 1666 1786 1667 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1787 1668 { … … 1789 1670 WRITE_FLAG( pcSlice->getPocResetFlag( ) ? 1 : 0 , "poc_reset_flag" ); 1790 1671 } 1791 #endif1792 1793 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )1794 {1795 esb++;1796 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" );1797 }1798 1799 #if H_MV_6_RALS_O0149_111800 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )1801 {1802 esb++;1803 WRITE_FLAG( pcSlice->getCrossLayerBlaFlag( ) ? 1 : 0 , "cross_layer_bla_flag" );1804 }1805 pcSlice->checkCrossLayerBlaFlag( );1806 1807 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )1808 {1809 esb++;1810 WRITE_FLAG( pcSlice->getPocResetFlag( ) ? 1 : 0 , "poc_reset_flag" );1811 }1812 #endif1813 1672 1814 1673 … … 1835 1694 // colour_plane_id u(2) 1836 1695 1837 #if H_MV_6_POC_31_35_381838 1696 if ( (pcSlice->getLayerId() > 0 && !vps->getPocLsbNotPresentFlag( pcSlice->getLayerIdInVps())) || !pcSlice->getIdrPicFlag() ) 1839 1697 { … … 1841 1699 WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "slice_pic_order_cnt_lsb"); 1842 1700 } 1843 #endif1844 1701 if( !pcSlice->getIdrPicFlag() ) 1845 1702 { 1846 #if !H_MV_6_POC_31_35_381847 Int picOrderCntLSB = (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1);1848 WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "pic_order_cnt_lsb");1849 #endif1850 1703 TComReferencePictureSet* rps = pcSlice->getRPS(); 1851 1704 … … 1961 1814 } 1962 1815 #if H_MV 1963 #if H_MV_6_ILDDS_ILREFPICS_27_341964 1816 Bool interLayerPredLayerIdcPresentFlag = false; 1965 #endif1966 1817 Int layerId = pcSlice->getLayerId(); 1967 1818 if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) … … 1976 1827 if ( pcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) 1977 1828 { 1978 #if H_MV_6_ILDDS_ILREFPICS_27_341979 1829 interLayerPredLayerIdcPresentFlag = true; 1980 #endif1981 1830 for( Int idx = 0; idx < pcSlice->getNumActiveRefLayerPics(); idx++ ) 1982 1831 { … … 1986 1835 } 1987 1836 } 1988 #if H_MV_6_ILDDS_ILREFPICS_27_341989 1837 if ( !interLayerPredLayerIdcPresentFlag ) 1990 1838 { … … 1994 1842 } 1995 1843 } 1996 #endif1997 1844 #endif 1998 1845 if(pcSlice->getSPS()->getUseSAO()) -
branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncCavlc.h
r758 r766 86 86 #if H_MV 87 87 Void codeVPSExtension ( TComVPS *pcVPS ); 88 #if H_MV_6_PS_O0118_3389 88 Void codeVideoSignalInfo ( TComVideoSignalInfo* pcVideoSignalInfo ); 90 #endif91 89 92 #if H_MV_6_HRD_O0217_1393 90 Void codeDpbSize ( TComVPS* vps ); 94 #endif95 91 96 #if H_MV_6_PS_REP_FORM_18_19_2097 92 Void codeRepFormat ( Int i, TComRepFormat* curRepFormat, TComRepFormat* prevRepFormat ); 98 #else99 Void codeRepFormat ( TComRepFormat* pcRepFormat );100 #endif101 93 Void codeVPSVUI ( TComVPS* pcVPS ); 102 #if H_MV_6_HRD_O0164_15103 94 Void codeVpsVuiBspHrdParameters( TComVPS* pcVPS ); 104 #endif105 95 #endif 106 96 Void codeVUI ( TComVUI *pcVUI, TComSPS* pcSPS ); -
branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r765 r766 664 664 refPicListModification->setRefPicListModificationFlagL1(0); 665 665 #if H_MV 666 #if H_MV_6_RALS_O0149_11667 666 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 ) 668 #else669 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 1 )670 #endif671 667 { 672 668 // Some more sophisticated algorithm to determine discardable_flag might be added here. … … 678 674 GOPEntry gopEntry = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ); 679 675 680 #if H_MV_6_ILDDS_ILREFPICS_27_34681 676 Bool interLayerPredLayerIdcPresentFlag = false; 682 #endif683 677 if ( getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && numDirectRefLayers > 0 ) 684 678 { … … 692 686 if ( gopEntry.m_numActiveRefLayerPics != vps->getNumDirectRefLayers( getLayerId() ) ) 693 687 { 694 #if H_MV_6_ILDDS_ILREFPICS_27_34695 688 interLayerPredLayerIdcPresentFlag = true; 696 #endif697 689 for (Int i = 0; i < gopEntry.m_numActiveRefLayerPics; i++ ) 698 690 { … … 702 694 } 703 695 } 704 #if H_MV_6_ILDDS_ILREFPICS_27_34705 696 if ( !interLayerPredLayerIdcPresentFlag ) 706 697 { … … 710 701 } 711 702 } 712 #endif713 703 714 704 -
branches/HTM-9.2-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r765 r766 723 723 724 724 #if H_MV 725 #if H_MV_6_PS_REP_FORM_18_19_20726 725 m_cSPS.setUpdateRepFormatFlag ( false ); 727 #else728 m_cSPS.setUpdateRepFormatFlag ( m_layerId == 0 );729 #endif730 726 m_cSPS.setSpsInferScalingListFlag ( m_layerId > 0 && m_cVPS->getInDirectDependencyFlag( getLayerIdInVps(), 0 ) ); 731 727 m_cSPS.setSpsScalingListRefLayerId ( 0 ); 732 #if H_MV_6_PSEM_O0142_3733 728 m_cSPS.setSpsExtensionFlag ( true ); 734 729 m_cSPS.setSpsExtensionTypeFlag ( PS_EX_T_MV ,true ); 735 730 #if H_3D 736 731 m_cSPS.setSpsExtensionTypeFlag ( PS_EX_T_3D ,true ); 737 #endif738 732 #endif 739 733 #endif … … 823 817 pcVUI->setOverscanInfoPresentFlag(getOverscanInfoPresentFlag()); 824 818 pcVUI->setOverscanAppropriateFlag(getOverscanAppropriateFlag()); 825 #if H_MV_6_PS_O0118_33826 819 pcVUI->setVideoSignalTypePresentFlag(getVideoSignalTypePresentFlag() && getLayerId() == 0 ); 827 #else828 pcVUI->setVideoSignalTypePresentFlag(getVideoSignalTypePresentFlag());829 #endif830 820 pcVUI->setVideoFormat(getVideoFormat()); 831 821 pcVUI->setVideoFullRangeFlag(getVideoFullRangeFlag()); … … 945 935 m_cPPS.setOutputFlagPresentFlag( false ); 946 936 #if H_MV 947 #if H_MV_6_RALS_O0149_11948 937 m_cPPS.setNumExtraSliceHeaderBits( 3 ); 949 #else950 m_cPPS.setNumExtraSliceHeaderBits( 2 );951 #endif952 938 #endif 953 939 m_cPPS.setSignHideFlag(getSignHideFlag());
Note: See TracChangeset for help on using the changeset viewer.