Changeset 490 in 3DVCSoftware for branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon
- Timestamp:
- 23 Jun 2013, 05:16:22 (12 years ago)
- Location:
- branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComSlice.cpp
r488 r490 114 114 , m_isDepth (false) 115 115 #endif 116 , m_discardableFlag (false) 117 , m_interLayerPredEnabledFlag (false) 118 , m_numInterLayerRefPicsMinus1 (0) 119 , m_interLayerSamplePredOnlyFlag (false) 120 , m_altCollocatedIndicationFlag (0) 121 , m_collocatedRefLayerIdx (0) 116 122 #endif 117 123 { … … 154 160 initWpAcDcParam(); 155 161 m_saoEnabledFlag = false; 162 #if H_MV 163 for (Int i = 0; i < MAX_NUM_LAYERS; i++ ) 164 { 165 m_interLayerPredLayerIdc[ i ] = 0; 166 } 167 #endif 156 168 } 157 169 … … 1440 1452 } 1441 1453 #if H_MV 1454 m_vpsNumberLayerSetsMinus1 = -1; 1455 m_vpsNumProfileTierLevelMinus1 = -1; 1456 1457 for ( Int i = 0; i < MAX_VPS_PROFILE_TIER_LEVEL; i++) 1458 { 1459 m_profileRefMinus1[ i ] = -1; 1460 } 1461 1462 m_moreOutputLayerSetsThanDefaultFlag = false; 1463 m_numAddOutputLayerSetsMinus1 = -1; 1464 m_defaultOneTargetOutputLayerFlag = false; 1465 1466 for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++) 1467 { 1468 m_outputLayerSetIdxMinus1[i] = -1; 1469 m_profileLevelTierIdx[i] = -1; 1470 for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++) 1471 { 1472 m_outputLayerFlag[i][j] = false; 1473 } 1474 } 1475 1476 m_maxOneActiveRefLayerFlag = false; 1477 m_directDepTypeLenMinus2 = -1; 1478 1479 1442 1480 m_avcBaseLayerFlag = false; 1443 1481 m_splittingFlag = false; … … 1450 1488 1451 1489 m_vpsNuhLayerIdPresentFlag = false; 1452 m_numOutputLayerSets = 0; 1453 1490 1454 1491 for( Int i = 0; i < MAX_VPS_OP_SETS_PLUS1; i++ ) 1455 1492 { 1456 1493 m_vpsProfilePresentFlag [i] = false; 1457 m_profile LayerSetRefMinus1[i] = 0;1494 m_profileRefMinus1[i] = 0; 1458 1495 m_outputLayerSetIdxMinus1 [i] = 0; 1459 1496 for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ ) … … 1470 1507 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) 1471 1508 { 1472 m_layerIdInNuh [i] = ( i == 0 ) ? 0 : -1; 1473 m_numDirectRefLayers[i] = 0; 1509 m_layerIdInNuh [i] = ( i == 0 ) ? 0 : -1; 1510 m_numDirectRefLayers [i] = 0; 1511 m_maxTidIlRefPicPlus1[i] = -1; 1474 1512 #if H_3D 1475 1513 m_viewIndex [i] = -1; … … 1479 1517 { 1480 1518 m_directDependencyFlag[i][j] = false; 1519 m_directDependencyType[i][j] = -1; 1481 1520 m_refLayerId[i][j] = -1; 1482 1521 } … … 1560 1599 } 1561 1600 1562 Void TComVPS::calcIvRefLayers() 1563 { 1564 for( Int i = 1; i <= getMaxLayers(); i++ ) 1565 { 1566 m_numDirectRefLayers[ i ] = 0; 1567 for( Int j = 0 ; j < i; j++ ) 1568 if( m_directDependencyFlag[ i ][ j ]) 1569 m_refLayerId[ i ][ m_numDirectRefLayers[ i ]++ ] = m_layerIdInNuh[ j ]; 1601 Void TComVPS::setRefLayers() 1602 { 1603 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) 1604 { 1605 m_numSamplePredRefLayers[ i ] = 0; 1606 m_numMotionPredRefLayers[ i ] = 0; 1607 m_numDirectRefLayers [ i ] = 0; 1608 for( Int j = 0; j < MAX_NUM_LAYERS; j++ ) { 1609 m_samplePredEnabledFlag[ i ][ j ] = 0; 1610 m_motionPredEnabledFlag[ i ][ j ] = 0; 1611 m_refLayerId[ i ][ j ] = 0; 1612 m_samplePredRefLayerId[ i ][ j ] = 0; 1613 m_motionPredRefLayerId[ i ][ j ] = 0; 1614 } 1615 } 1616 1617 for( Int i = 1; i <= getMaxLayers()- 1; i++ ) 1618 { 1619 for( Int j = 0; j < i; j++ ) 1620 { 1621 if( getDirectDependencyFlag(i,j) ) 1622 { 1623 m_refLayerId[ i ][m_numDirectRefLayers[ i ]++ ] = getLayerIdInNuh( j ); 1624 1625 m_samplePredEnabledFlag [ i ][ j ] = ( ( getDirectDependencyType( i , j ) + 1 ) & 1 ) == 1; 1626 m_numSamplePredRefLayers[ i ] += m_samplePredEnabledFlag [ i ][ j ] ? 1 : 0; 1627 m_motionPredEnabledFlag [ i ][ j ] = ( ( ( getDirectDependencyType( i , j ) + 1 ) & 2 ) >> 1 ) == 1; 1628 m_numMotionPredRefLayers[ i ] += m_motionPredEnabledFlag [ i][ j ] ? 1 : 0; 1629 } 1630 } 1631 } 1632 1633 for( Int i = 1, mIdx = 0, sIdx = 0; i <= getMaxLayers()- 1; i++ ) 1634 { 1635 for( Int j = 0; j < i; j++ ) 1636 { 1637 if( m_motionPredEnabledFlag[ i ][ j ] ) 1638 { 1639 m_motionPredRefLayerId[ i ][ mIdx++ ] = getLayerIdInNuh( j ); 1640 } 1641 1642 if( m_samplePredEnabledFlag[ i ][ j ] ) 1643 { 1644 m_samplePredRefLayerId[ i ][ sIdx++ ] = getLayerIdInNuh( j ); 1645 } 1646 } 1570 1647 } 1571 1648 } … … 1631 1708 1632 1709 #endif // H_3D 1710 1711 Int TComVPS::xCeilLog2( Int val ) 1712 { 1713 assert( val > 0 ); 1714 Int ceilLog2 = 0; 1715 while( val > ( 1 << ceilLog2 ) ) ceilLog2++; 1716 return ceilLog2; 1717 } 1718 1633 1719 #endif // H_MV 1634 1720 … … 1681 1767 #if H_MV 1682 1768 , m_interViewMvVertConstraintFlag (false) 1769 , m_numIlpRestrictedRefLayers ( 0 ) 1770 1683 1771 #endif 1684 1772 #if H_3D … … 1699 1787 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 1700 1788 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 1789 #if H_MV 1790 for (Int i = 0; i < MAX_NUM_LAYERS; i++ ) 1791 { 1792 m_minSpatialSegmentOffsetPlus1[ i ] = 0; 1793 m_ctuBasedOffsetEnabledFlag [ i ] = false; 1794 m_minHorizontalCtuOffsetPlus1 [ i ] = 0; 1795 } 1796 #endif 1701 1797 } 1702 1798 … … 2258 2354 } 2259 2355 } 2356 2357 Int TComSlice::xCeilLog2( Int val ) 2358 { 2359 assert( val > 0 ); 2360 Int ceilLog2 = 0; 2361 while( val > ( 1 << ceilLog2 ) ) ceilLog2++; 2362 return ceilLog2; 2363 } 2364 2260 2365 #endif 2261 2366 /** get scaling matrix from RefMatrixID -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComSlice.h
r488 r490 515 515 516 516 517 Int m_maxTidIlRefPicPlus1 [ MAX_NUM_LAYERS ]; 518 Int m_vpsNumberLayerSetsMinus1; 519 Int m_vpsNumProfileTierLevelMinus1; 520 Int m_profileRefMinus1 [ MAX_VPS_PROFILE_TIER_LEVEL ]; 521 Bool m_vpsMoreOutputLayerSetsThanDefaultFlag; 522 Int m_numAddOutputLayerSetsMinus1; 523 Bool m_defaultOneTargetOutputLayerFlag; 524 Int m_outputLayerSetIdxMinus1 [ MAX_VPS_OUTPUTLAYER_SETS ]; 525 Int m_profileLevelTierIdx [ MAX_VPS_OUTPUTLAYER_SETS ]; 526 Bool m_maxOneActiveRefLayerFlag; 527 Int m_directDepTypeLenMinus2; 528 Int m_directDependencyType [ MAX_NUM_LAYERS ] [ MAX_NUM_LAYERS ]; 529 530 #if H_MV 517 518 519 #if H_MV 520 /// VPS EXTENSION SYNTAX ELEMENTS 531 521 Bool m_avcBaseLayerFlag; 532 522 Bool m_splittingFlag; … … 534 524 Int m_dimensionIdLen [MAX_NUM_SCALABILITY_TYPES]; 535 525 Bool m_vpsNuhLayerIdPresentFlag; 536 Int m_layerIdInNuh [MAX_NUM_LAYER_IDS]; 526 Int m_layerIdInNuh [MAX_NUM_LAYER_IDS]; 527 Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 528 Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 529 Int m_maxTidIlRefPicPlus1 [MAX_NUM_LAYERS]; 530 Int m_vpsNumberLayerSetsMinus1; 531 Int m_vpsNumProfileTierLevelMinus1; 532 Bool m_vpsProfilePresentFlag [MAX_VPS_OP_SETS_PLUS1]; 533 Int m_profileRefMinus1 [MAX_VPS_PROFILE_TIER_LEVEL]; 534 Bool m_moreOutputLayerSetsThanDefaultFlag; 535 Int m_numAddOutputLayerSetsMinus1; 536 Bool m_defaultOneTargetOutputLayerFlag; 537 Int m_outputLayerSetIdxMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; 538 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 539 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; 540 Bool m_maxOneActiveRefLayerFlag; 541 Int m_directDepTypeLenMinus2; 542 Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; 543 544 // VPS EXTENSION SEMANTICS VARIABLES 537 545 Int m_layerIdInVps [MAX_NUM_LAYERS ]; 538 Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 546 547 Int m_numDirectRefLayers [MAX_NUM_LAYERS]; 548 Int m_refLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 549 550 Int m_numSamplePredRefLayers [MAX_NUM_LAYERS]; 551 Bool m_samplePredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 552 Int m_samplePredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 553 554 Int m_numMotionPredRefLayers [MAX_NUM_LAYERS]; 555 Bool m_motionPredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 556 Int m_motionPredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 539 557 #if H_3D 540 558 Int m_viewIndex [MAX_NUM_LAYERS ]; 541 559 #endif 542 560 543 544 Bool m_vpsProfilePresentFlag [MAX_VPS_OP_SETS_PLUS1]; 545 Int m_profileLayerSetRefMinus1 [MAX_VPS_OP_SETS_PLUS1]; 546 Int m_numOutputLayerSets; 547 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 548 Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 549 550 Int m_numDirectRefLayers [ MAX_NUM_LAYERS ]; 551 Int m_refLayerId [ MAX_NUM_LAYERS ][MAX_NUM_LAYERS]; 552 553 Int xCeilLog2( Int val ) 554 { 555 assert( val > 0 ); 556 Int ceilLog2 = 0; 557 while( val > ( 1 << ceilLog2 ) ) ceilLog2++; 558 return ceilLog2; 559 } 561 Int xCeilLog2( Int val ); 562 560 563 561 564 #endif … … 634 637 Void setScalabilityMask( UInt val ); 635 638 636 Void setScalabilityMask( Int scalType, Bool val ) { m_scalabilityMask[scalType] = val; }637 Bool getScalabilityMask( Int scalType ) { return m_scalabilityMask[scalType]; }639 Void setScalabilityMask( Int scalType, Bool val ) { m_scalabilityMask[scalType] = val; } 640 Bool getScalabilityMask( Int scalType ) { return m_scalabilityMask[scalType]; } 638 641 639 642 Int getNumScalabilityTypes( ); … … 648 651 Int getLayerIdInNuh( Int layerIdInVps ) { assert( m_layerIdInNuh[layerIdInVps] >= 0 ); return m_layerIdInNuh[layerIdInVps]; } 649 652 653 Bool nuhLayerIdIncluded( Int layerIdinNuh ) { return ( m_layerIdInVps[ layerIdinNuh ] > 0 ); } 654 655 Void setDimensionId( Int layerIdInVps, Int scalIdx, Int val ) { m_dimensionId[layerIdInVps][scalIdx] = val; } 656 Int getDimensionId( Int layerIdInVps, Int scalIdx ) { return m_dimensionId[layerIdInVps][scalIdx]; } 657 658 Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } 659 Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } 660 661 Void setMaxTidIlRefPicPlus1( Int layerIdInVps, Int val ) { m_maxTidIlRefPicPlus1[ layerIdInVps ] = val; } 662 Int getMaxTidIlRefPicPlus1( Int layerIdInVps ) { return m_maxTidIlRefPicPlus1[ layerIdInVps ]; } 663 664 Void setVpsNumberLayerSetsMinus1( Int val ) { m_vpsNumberLayerSetsMinus1 = val; } 665 Int getVpsNumberLayerSetsMinus1( ) { return m_vpsNumberLayerSetsMinus1; } 666 667 Void setVpsNumProfileTierLevelMinus1( Int val ) { m_vpsNumProfileTierLevelMinus1 = val; } 668 Int getVpsNumProfileTierLevelMinus1( ) { return m_vpsNumProfileTierLevelMinus1; } 669 670 Void setVpsProfilePresentFlag( Int layerSet, Bool val ) { m_vpsProfilePresentFlag[layerSet] = val; } 671 Bool getVpsProfilePresentFlag( Int layerSet ) { return m_vpsProfilePresentFlag[layerSet]; } 672 673 Void setProfileRefMinus1( Int profileTierLevelIdx, Int val ) { m_profileRefMinus1[ profileTierLevelIdx ] = val; } 674 Int getProfileRefMinus1( Int profileTierLevelIdx ) { return m_profileRefMinus1[ profileTierLevelIdx ]; } 675 676 Void setMoreOutputLayerSetsThanDefaultFlag( Bool flag ) { m_moreOutputLayerSetsThanDefaultFlag = flag; } 677 Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag; } 678 679 Void setNumAddOutputLayerSetsMinus1( Int val ) { m_numAddOutputLayerSetsMinus1 = val; } 680 Int getNumAddOutputLayerSetsMinus1( ) { return m_numAddOutputLayerSetsMinus1; } 681 682 Void setDefaultOneTargetOutputLayerFlag( Bool flag ) { m_defaultOneTargetOutputLayerFlag = flag; } 683 Bool getDefaultOneTargetOutputLayerFlag( ) { return m_defaultOneTargetOutputLayerFlag; } 684 685 Void setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val ) { m_outputLayerSetIdxMinus1[ outLayerSetIdx ] = val; } 686 Int getOutputLayerSetIdxMinus1( Int outLayerSetIdx ) { return m_outputLayerSetIdxMinus1[ outLayerSetIdx ]; } 687 688 Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } 689 Bool getOutputLayerFlag( Int outLayerSetIdx, Int i ) { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; } 690 691 Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx = val ]; } 692 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 693 694 Void setMaxOneActiveRefLayerFlag( Bool flag) { m_maxOneActiveRefLayerFlag = flag; } 695 Bool getMaxOneActiveRefLayerFlag( ) { return m_maxOneActiveRefLayerFlag; } 696 697 Void setDirectDepTypeLenMinus2( Int val) { m_directDepTypeLenMinus2 = val; } 698 Int getDirectDepTypeLenMinus2( ) { return m_directDepTypeLenMinus2; } 699 700 Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } 701 Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } 702 703 // VPS EXTENSION SEMANTICS VARIABLES 650 704 Void setLayerIdInVps( Int layerIdInNuh, Int val ) { m_layerIdInVps[layerIdInNuh] = val; } 651 705 Int getLayerIdInVps( Int layerIdInNuh ) { assert( m_layerIdInVps[layerIdInNuh] >= 0 ); return m_layerIdInVps[layerIdInNuh]; } 652 706 653 Bool nuhLayerIdIncluded( Int layerIdinNuh ) { return ( m_layerIdInVps[ layerIdinNuh ] > 0 ); }654 655 Void setDimensionId( Int layerIdInVps, Int scalIdx, Int val ) { m_dimensionId[layerIdInVps][scalIdx] = val; }656 Int getDimensionId( Int layerIdInVps, Int scalIdx ) { return m_dimensionId[layerIdInVps][scalIdx]; }657 658 707 Int getScalabilityId ( Int layerIdInVps, ScalabilityType scalType ); 659 660 708 Int getViewId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, VIEW_ID ); } 661 #if H_3D 662 Void initViewIndex(); 663 Int getViewIndex ( Int layerIdInVps ) { return m_viewIndex[ layerIdInVps ]; } 664 Int getDepthId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, DEPTH_ID ); } 665 Int getLayerIdInNuh( Int viewIndex, Bool depthFlag ); 666 #endif 667 668 669 Void setVpsProfilePresentFlag( Int layerSet, Bool val ) { m_vpsProfilePresentFlag[layerSet] = val; } 670 Bool getVpsProfilePresentFlag( Int layerSet ) { return m_vpsProfilePresentFlag[layerSet]; } 671 672 Void setProfileLayerSetRefMinus1( Int layerSet, Int val ) { m_profileLayerSetRefMinus1[layerSet] = val; } 673 Bool getProfileLayerSetRefMinus1( Int layerSet ) { return m_profileLayerSetRefMinus1[layerSet]; } 674 675 Void setNumOutputLayerSets( Int val ) { m_numOutputLayerSets = val; } 676 Int getNumOutputLayerSets() { return m_numOutputLayerSets; } 677 678 Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } 679 Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } 680 681 Void calcIvRefLayers(); 682 683 Int getNumDirectRefLayers( Int layerIdInVps ) { return m_numDirectRefLayers[ layerIdInVps ]; }; 684 Int getRefLayerId ( Int layerIdInVps, Int idx );; 685 709 710 Void setRefLayers(); 711 712 Int getNumDirectRefLayers ( Int layerIdInVps ) { return m_numDirectRefLayers[ layerIdInVps ]; }; 713 Int getRefLayerId ( Int layerIdInVps, Int idx );; 714 715 Int getNumSamplePredRefLayers( Int layerIdInVps ) { return m_numSamplePredRefLayers[layerIdInVps]; } 716 Bool getSamplePredEnabledFlag ( Int layerIdInVps, Int idx ) { return m_samplePredEnabledFlag [layerIdInVps][idx]; } 717 Int getSamplePredRefLayerId ( Int layerIdInVps, Int idx ) { return m_samplePredRefLayerId [layerIdInVps][idx]; } 718 719 Int getNumMotionPredRefLayers( Int layerIdInVps ) { return m_numMotionPredRefLayers[layerIdInVps]; } 720 Bool getMotionPredEnabledFlag ( Int layerIdInVps, Int idx ) { return m_motionPredEnabledFlag [layerIdInVps][idx]; } 721 Int getMotionPredRefLayerId ( Int layerIdInVps, Int idx ) { return m_motionPredRefLayerId [layerIdInVps][idx]; } 722 686 723 Bool checkVPSExtensionSyntax(); 687 724 Int scalTypeToScalIdx ( ScalabilityType scalType ); 688 689 690 Int getMaxTidIlRefPicPlus1 ( Int layerIdInVps ) { return m_maxTidIlRefPicPlus1 [ layerIdInVps ]; } 691 Void setMaxTidIlRefPicPlus1 ( Int layerIdInVps, Int val ) { m_maxTidIlRefPicPlus1 [ layerIdInVps ] = val; } 692 693 Int getVpsNumberLayerSetsMinus1 () { return m_vpsNumberLayerSetsMinus1 ; } 694 Void setVpsNumberLayerSetsMinus1 ( Int val ) { m_vpsNumberLayerSetsMinus1 = val; } 695 696 Int getVpsNumProfileTierLevelMinus1 () { return m_vpsNumProfileTierLevelMinus1 ; } 697 Void setVpsNumProfileTierLevelMinus1 ( Int val ) { m_vpsNumProfileTierLevelMinus1 = val; } 698 699 Void setProfileRefMinus1 ( Int profileTierLevelIdx, Int val ) { m_profileRefMinus1 [ profileTierLevelIdx ] = val; } 700 Int getProfileRefMinus1 ( Int profileTierLevelIdx ) { return m_profileRefMinus1 [ profileTierLevelIdx ]; } 701 702 Bool getVpsMoreOutputLayerSetsThanDefaultFlag() { return m_vpsMoreOutputLayerSetsThanDefaultFlag ; } 703 Void setVpsMoreOutputLayerSetsThanDefaultFlag( Bool flag ) { m_vpsMoreOutputLayerSetsThanDefaultFlag = flag; } 704 705 Int getNumAddOutputLayerSetsMinus1 () { return m_numAddOutputLayerSetsMinus1 ; } 706 Void setNumAddOutputLayerSetsMinus1 ( Int val ) { m_numAddOutputLayerSetsMinus1 = val; } 707 708 Bool getDefaultOneTargetOutputLayerFlag () { return m_defaultOneTargetOutputLayerFlag ; } 709 Void setDefaultOneTargetOutputLayerFlag ( Bool flag ) { m_defaultOneTargetOutputLayerFlag = flag; } 710 711 Int getOutputLayerSetIdxMinus1 ( Int outLayerSetIdx ) { return m_outputLayerSetIdxMinus1 [ outLayerSetIdx ] ; } 712 Void setOutputLayerSetIdxMinus1 ( Int outLayerSetIdx, Int val ) { m_outputLayerSetIdxMinus1 [ outLayerSetIdx ] = val; } 713 714 Int getProfileLevelTierIdx ( Int outLayerSetIdx ) { return m_profileLevelTierIdx [ outLayerSetIdx ] ; } 715 Void setProfileLevelTierIdx ( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx [ outLayerSetIdx ] = val; } 716 717 Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag ; } 718 Void setMaxOneActiveRefLayerFlag ( Bool flag) { m_maxOneActiveRefLayerFlag = flag; } 719 720 Int getDirectDepTypeLenMinus2() { return m_directDepTypeLenMinus2 ; } 721 Void setDirectDepTypeLenMinus2 ( Int val) { m_directDepTypeLenMinus2 = val; } 722 723 Int getDirectDependencyType ( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType [ depLayeridInVps ][ refLayeridInVps ]; } 724 Void setDirectDependencyType ( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType [ depLayeridInVps ][ refLayeridInVps ] = val ; } 725 726 Int getProfileLevelTierIdxLen() 727 { 728 return xCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); 729 }; 730 731 Int getNumLayersInIdList ( Int lsIdx ) 725 726 727 Int getProfileLevelTierIdxLen() { return xCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; 728 Int getNumLayersInIdList ( Int lsIdx ) 732 729 { 733 assert( lsIdx > 0 );734 assert( lsIdx < =getMaxOpSets() );730 assert( lsIdx >= 0 ); 731 assert( lsIdx < getMaxOpSets() ); 735 732 Int numLayersInIdList = 0; 736 733 for (Int layerId = 0; layerId < getVpsMaxLayerId(); layerId++ ) … … 740 737 return numLayersInIdList; 741 738 }; 742 739 #if H_3D 740 Void initViewIndex(); 741 Int getViewIndex ( Int layerIdInVps ) { return m_viewIndex[ layerIdInVps ]; } 742 Int getDepthId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, DEPTH_ID ); } 743 Int getLayerIdInNuh( Int viewIndex, Bool depthFlag ); 744 #endif 743 745 #endif 744 746 }; … … 824 826 Int m_numTicksPocDiffOneMinus1; 825 827 #endif 826 828 #if H_MV 829 Bool m_tileBoundariesAlignedFlag; 830 #endif 827 831 public: 828 832 TComVUI() … … 860 864 ,m_numTicksPocDiffOneMinus1(0) 861 865 #endif 866 #if H_MV 867 ,m_tileBoundariesAlignedFlag(false) 868 #endif 862 869 {} 863 870 … … 961 968 Int getNumTicksPocDiffOneMinus1() {return m_numTicksPocDiffOneMinus1;} 962 969 Void setNumTicksPocDiffOneMinus1(Int x) { m_numTicksPocDiffOneMinus1 = x;} 970 #endif 971 #if H_MV 972 Bool getTileBoundariesAlignedFlag( ) { return m_tileBoundariesAlignedFlag; } 973 Void setTileBoundariesAlignedFlag( Bool flag ) { m_tileBoundariesAlignedFlag = flag; } 963 974 #endif 964 975 }; … … 1046 1057 #if H_MV 1047 1058 Bool m_interViewMvVertConstraintFlag; 1059 Int m_numIlpRestrictedRefLayers ; 1060 Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS]; 1061 Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS]; 1062 Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS]; 1048 1063 #endif 1049 1064 #if H_3D … … 1052 1067 Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; 1053 1068 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; 1069 #endif 1070 #if H_MV 1071 Int m_layerId; 1054 1072 #endif 1055 1073 public: … … 1186 1204 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } 1187 1205 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} 1206 1207 //// sps_extension_vui_parameters( ) 1208 Void setNumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers = val;} 1209 Int getNumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers ;} 1210 1211 Void setMinSpatialSegmentOffsetPlus1( Int i, Int val ) { m_minSpatialSegmentOffsetPlus1[ i ] = val;} 1212 Int getMinSpatialSegmentOffsetPlus1( Int i ) { return m_minSpatialSegmentOffsetPlus1[ i ];} 1213 1214 Void setCtuBasedOffsetEnabledFlag ( Int i, Bool flag ) { m_ctuBasedOffsetEnabledFlag [ i ] = flag;} 1215 Bool getCtuBasedOffsetEnabledFlag ( Int i ) { return m_ctuBasedOffsetEnabledFlag [ i ];} 1216 1217 Void setMinHorizontalCtuOffsetPlus1 ( Int i, Int val ) { m_minHorizontalCtuOffsetPlus1 [ i ] = val;} 1218 Int getMinHorizontalCtuOffsetPlus1 ( Int i ) { return m_minHorizontalCtuOffsetPlus1 [ i ];} 1188 1219 #endif 1189 1220 #if H_3D … … 1196 1227 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } 1197 1228 #endif 1229 #if H_MV 1230 Int getLayerId () { return m_layerId; } 1231 Void setLayerId ( Int val ) { m_layerId = val; } 1232 #endif 1233 1198 1234 }; 1199 1235 … … 1558 1594 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; 1559 1595 #endif 1596 #endif 1597 #if H_MV 1598 // Additional slice header syntax elements 1599 Bool m_discardableFlag; 1600 Bool m_interLayerPredEnabledFlag; 1601 Int m_numInterLayerRefPicsMinus1; 1602 Int m_interLayerPredLayerIdc [MAX_NUM_LAYERS]; 1603 Bool m_interLayerSamplePredOnlyFlag; 1604 Bool m_altCollocatedIndicationFlag; 1605 Int m_collocatedRefLayerIdx; 1606 // Additional slice header semantics variables 1607 Int m_numActiveMotionPredRefLayers; 1608 Int m_activeMotionPredRefLayerId [ MAX_NUM_LAYER_IDS ]; 1609 1560 1610 #endif 1561 1611 public: … … 1829 1879 #endif 1830 1880 #endif 1881 #if H_MV 1882 // Additional slice header syntax elements 1883 Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; } 1884 Bool getDiscardableFlag( ) { return m_discardableFlag; } 1885 1886 Void setInterLayerPredEnabledFlag( Bool flag ) { m_interLayerPredEnabledFlag = flag; } 1887 Bool getInterLayerPredEnabledFlag( ) { return m_interLayerPredEnabledFlag; } 1888 1889 Void setNumInterLayerRefPicsMinus1( Int val ) { m_numInterLayerRefPicsMinus1 = val; } 1890 Int getNumInterLayerRefPicsMinus1( ) { return m_numInterLayerRefPicsMinus1; } 1891 1892 Void setInterLayerPredLayerIdc( Int i, Int val ) { m_interLayerPredLayerIdc[i] = val; } 1893 Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } 1894 1895 Void setInterLayerSamplePredOnlyFlag( Bool flag ) { m_interLayerSamplePredOnlyFlag = flag; } 1896 Bool getInterLayerSamplePredOnlyFlag( ) { return m_interLayerSamplePredOnlyFlag; } 1897 1898 Void setAltCollocatedIndicationFlag( Bool flag ) { m_altCollocatedIndicationFlag = flag; } 1899 Bool getAltCollocatedIndicationFlag( ) { return m_altCollocatedIndicationFlag; } 1900 1901 Void setCollocatedRefLayerIdx( Int val ) { m_collocatedRefLayerIdx = val; } 1902 Int getCollocatedRefLayerIdx( ) { return m_collocatedRefLayerIdx; } 1903 1904 // Additional variables derived in slice header semantics 1905 1906 Int getNumInterLayerRefPicsMinus1Len( ) { return xCeilLog2( getVPS()->getNumDirectRefLayers( getLayerIdInVps() )); } 1907 Int getInterLayerPredLayerIdcLen ( ) { return xCeilLog2( getVPS()->getNumDirectRefLayers( getLayerIdInVps() )); } 1908 1909 Int getNumActiveRefLayerPics( ) 1910 { 1911 Int numActiveRefLayerPics; 1912 1913 if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 0 || !getInterLayerPredEnabledFlag() ) 1914 { 1915 numActiveRefLayerPics = 0; 1916 } 1917 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 1 ) 1918 { 1919 numActiveRefLayerPics = 1; 1920 } 1921 else 1922 { 1923 numActiveRefLayerPics = getNumInterLayerRefPicsMinus1() + 1; 1924 } 1925 return numActiveRefLayerPics; 1926 } 1927 1928 Int getRefPicLayerId( Int i ) 1929 { 1930 return getVPS()->getRefLayerId( getLayerIdInVps(), getInterLayerPredLayerIdc( i ) ); 1931 } 1932 1933 Void setActiveMotionPredRefLayers( ) 1934 { 1935 Int j = 0; 1936 for( Int i = 0; i < getNumActiveRefLayerPics(); i++) 1937 { 1938 if( getVPS()->getMotionPredEnabledFlag( getLayerIdInVps(), getInterLayerPredLayerIdc( i )) ) 1939 { 1940 m_activeMotionPredRefLayerId[ j++ ] = getVPS()->getRefLayerId( getLayerIdInVps(), i ); 1941 } 1942 } 1943 m_numActiveMotionPredRefLayers = j; 1944 1945 // Consider incorporating bitstream conformance tests on derived variables here. 1946 } 1947 1948 Int getActiveMotionPredRefLayerId( Int i ) { return m_activeMotionPredRefLayerId[i]; } 1949 Int getNumActiveMotionPredRefLayers( ) { return m_numActiveMotionPredRefLayers; } 1950 1951 Bool getInterRefEnabledInRPLFlag( ) 1952 { 1953 Bool interRefEnabledInRPLFlag; 1954 if ( getVPS()->getNumSamplePredRefLayers( getLayerIdInVps() ) > 0 && getNumActiveRefLayerPics() > 0 ) 1955 { 1956 interRefEnabledInRPLFlag = !getInterLayerSamplePredOnlyFlag(); 1957 } 1958 else 1959 { 1960 interRefEnabledInRPLFlag = 1; 1961 } 1962 return interRefEnabledInRPLFlag; 1963 } 1964 #endif 1831 1965 protected: 1832 1966 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, … … 1835 1969 #if H_MV 1836 1970 TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId ); 1971 Int xCeilLog2( Int val ); 1837 1972 #endif 1838 1973 };// END CLASS DEFINITION TComSlice
Note: See TracChangeset for help on using the changeset viewer.