Changeset 495 in 3DVCSoftware for branches/HTM-DEV-0.3-dev0/source/App
- Timestamp:
- 25 Jun 2013, 22:11:57 (11 years ago)
- Location:
- branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r493 r495 228 228 in>>entry.m_interViewRefPosL[1][i]; 229 229 } 230 in>>entry.m_collocatedRefLayerIdx; 230 if (entry.m_numActiveRefLayerPics > 0 ) 231 { 232 in>>entry.m_collocatedRefLayerIdx; 233 } 231 234 #endif 232 235 return in; … … 1375 1378 1376 1379 // Output layer sets 1377 xConfirmPara( m_outputLayerSetIdx.size() < 0 || m_outputLayerSetIdx.size() > 1024, "The number of output layer set indices must be less than 1025 ") ;1380 xConfirmPara( m_outputLayerSetIdx.size() < 0 || m_outputLayerSetIdx.size() > 1024, "The number of output layer set indices must be less than 1025.") ; 1378 1381 for (Int lsIdx = 0; lsIdx < m_outputLayerSetIdx.size(); lsIdx++) 1379 1382 { 1380 1383 Int refLayerSetIdx = m_outputLayerSetIdx[ lsIdx ]; 1381 xConfirmPara( refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets " );1384 xConfirmPara( refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets." ); 1382 1385 1383 1386 for (Int i = 0; i < m_layerIdsInAddOutputLayerSet[ lsIdx ].size(); i++) … … 1390 1393 isAlsoInLayerSet = true; 1391 1394 break; 1392 } 1393 xConfirmPara( !isAlsoInLayerSet, "All output layers must of a output layer set be included in corresponding layer set");1394 }1395 } 1396 } 1397 xConfirmPara( !isAlsoInLayerSet, "All output layers of a output layer set be included in corresponding layer set."); 1395 1398 } 1396 1399 } … … 1401 1404 { 1402 1405 xConfirmPara( (i == 0) && m_directRefLayers[0].size() != 0, "Layer 0 shall not have reference layers." ); 1403 xConfirmPara( m_directRefLayers[i].size() == m_dependencyTypes[ i ].size() != 0, "Each reference layer shall have a reference type" );1406 xConfirmPara( m_directRefLayers[i].size() != m_dependencyTypes[ i ].size(), "Each reference layer shall have a reference type." ); 1404 1407 for (Int j = 0; j < m_directRefLayers[i].size(); j++) 1405 1408 { … … 1573 1576 if( m_numberOfLayers > 1 ) 1574 1577 { 1575 for( Int k = 1; k < m_numberOfLayers; k++ )1578 for( Int layer = 1; layer < m_numberOfLayers; layer++ ) 1576 1579 { 1577 1580 for( Int i = 0; i < MAX_GOP+1; i++ ) 1578 1581 { 1579 for( Int j = 0; j < m_GOPListMvc[k][i].m_numActiveRefLayerPics; j++ ) 1582 GOPEntry gopEntry = m_GOPListMvc[layer][i]; 1583 for( Int j = 0; j < gopEntry.m_numActiveRefLayerPics; j++ ) 1580 1584 { 1581 Int ilPredLayerIdc = m_directRefLayers[k][m_GOPListMvc[k][i].m_interLayerPredLayerIdc[j]];1582 if( ilPredLayerIdc < 0 || ilPredLayerIdc >= m_directRefLayers[ k].size() )1585 Int ilPredLayerIdc = gopEntry.m_interLayerPredLayerIdc[j]; 1586 if( ilPredLayerIdc < 0 || ilPredLayerIdc >= m_directRefLayers[layer].size() ) 1583 1587 { 1584 printf( "\nError: inter-layer ref idc %d is not available for Frame%d_l%d\n", m_GOPListMvc[k][i].m_interLayerPredLayerIdc[j], i, k);1588 printf( "\nError: inter-layer ref idc %d is not available for Frame%d_l%d\n", gopEntry.m_interLayerPredLayerIdc[j], i, layer ); 1585 1589 bErrorIvpEnhV = true; 1586 1590 } 1587 if( m_GOPListMvc[k][i].m_interViewRefPosL[0][j] < -1 || m_GOPListMvc[k][i].m_interViewRefPosL[0][j] > m_GOPListMvc[k][i].m_numRefPicsActive )1591 if( gopEntry.m_interViewRefPosL[0][j] < -1 || gopEntry.m_interViewRefPosL[0][j] > gopEntry.m_numRefPicsActive ) 1588 1592 { 1589 printf( "\nError: inter-layer ref pos %d on L0 is not available for Frame%d_l%d\n", m_GOPListMvc[k][i].m_interViewRefPosL[0][j], i, k);1593 printf( "\nError: inter-layer ref pos %d on L0 is not available for Frame%d_l%d\n", gopEntry.m_interViewRefPosL[0][j], i, layer ); 1590 1594 bErrorIvpEnhV = true; 1591 1595 } 1592 if( m_GOPListMvc[k][i].m_interViewRefPosL[1][j] < -1 || m_GOPListMvc[k][i].m_interViewRefPosL[1][j] > m_GOPListMvc[k][i].m_numRefPicsActive )1596 if( gopEntry.m_interViewRefPosL[1][j] < -1 || gopEntry.m_interViewRefPosL[1][j] > gopEntry.m_numRefPicsActive ) 1593 1597 { 1594 printf( "\nError: inter-layer ref pos %d on L1 is not available for Frame%d_l%d\n", m_GOPListMvc[k][i].m_interViewRefPosL[1][j], i, k);1598 printf( "\nError: inter-layer ref pos %d on L1 is not available for Frame%d_l%d\n", gopEntry.m_interViewRefPosL[1][j], i, layer ); 1595 1599 bErrorIvpEnhV = true; 1596 1600 } … … 1598 1602 if( i == MAX_GOP ) // inter-view refs at I pic position in base view 1599 1603 { 1600 if( m_GOPListMvc[k][MAX_GOP].m_sliceType != 'B' && m_GOPListMvc[k][MAX_GOP].m_sliceType != 'P' && m_GOPListMvc[k][MAX_GOP].m_sliceType != 'I' )1604 if( gopEntry.m_sliceType != 'B' && gopEntry.m_sliceType != 'P' && gopEntry.m_sliceType != 'I' ) 1601 1605 { 1602 printf( "\nError: slice type of FrameI_l%d must be equal to B or P or I\n", k);1606 printf( "\nError: slice type of FrameI_l%d must be equal to B or P or I\n", layer ); 1603 1607 bErrorIvpEnhV = true; 1604 1608 } 1605 1609 1606 if( m_GOPListMvc[k][MAX_GOP].m_POC != 0 )1610 if( gopEntry.m_POC != 0 ) 1607 1611 { 1608 printf( "\nError: POC %d not possible for FrameI_l%d, must be 0\n", m_GOPListMvc[k][MAX_GOP].m_POC, k);1612 printf( "\nError: POC %d not possible for FrameI_l%d, must be 0\n", gopEntry.m_POC, layer ); 1609 1613 bErrorIvpEnhV = true; 1610 1614 } 1611 1615 1612 if( m_GOPListMvc[k][MAX_GOP].m_temporalId != 0 )1616 if( gopEntry.m_temporalId != 0 ) 1613 1617 { 1614 printf( "\nWarning: Temporal id of FrameI_l%d must be 0 (cp. I-frame in base layer)\n", k);1615 m_GOPListMvc[k][MAX_GOP].m_temporalId = 0;1618 printf( "\nWarning: Temporal id of FrameI_l%d must be 0 (cp. I-frame in base layer)\n", layer ); 1619 gopEntry.m_temporalId = 0; 1616 1620 } 1617 1621 1618 if( m_GOPListMvc[k][MAX_GOP].m_numRefPics != 0 )1622 if( gopEntry.m_numRefPics != 0 ) 1619 1623 { 1620 printf( "\nWarning: temporal references not possible for FrameI_l%d\n", k);1621 for( Int j = 0; j < m_GOPListMvc[ k][MAX_GOP].m_numRefPics; j++ )1624 printf( "\nWarning: temporal references not possible for FrameI_l%d\n", layer ); 1625 for( Int j = 0; j < m_GOPListMvc[layer][MAX_GOP].m_numRefPics; j++ ) 1622 1626 { 1623 m_GOPListMvc[k][MAX_GOP].m_referencePics[j] = 0;1627 gopEntry.m_referencePics[j] = 0; 1624 1628 } 1625 m_GOPListMvc[k][MAX_GOP].m_numRefPics = 0;1629 gopEntry.m_numRefPics = 0; 1626 1630 } 1627 1631 1628 if( m_GOPListMvc[k][MAX_GOP].m_interRPSPrediction )1632 if( gopEntry.m_interRPSPrediction ) 1629 1633 { 1630 printf( "\nError: inter RPS prediction not possible for FrameI_l%d, must be 0\n", k);1634 printf( "\nError: inter RPS prediction not possible for FrameI_l%d, must be 0\n", layer ); 1631 1635 bErrorIvpEnhV = true; 1632 1636 } 1633 1637 1634 if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'I' && m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics != 0 )1638 if( gopEntry.m_sliceType == 'I' && gopEntry.m_numActiveRefLayerPics != 0 ) 1635 1639 { 1636 printf( "\nError: inter-layer prediction not possible for FrameI_l%d with slice type I, #IL_ref_pics must be 0\n", k);1640 printf( "\nError: inter-layer prediction not possible for FrameI_l%d with slice type I, #IL_ref_pics must be 0\n", layer ); 1637 1641 bErrorIvpEnhV = true; 1638 1642 } 1639 1643 1640 if( m_GOPListMvc[k][MAX_GOP].m_numRefPicsActive > m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics )1644 if( gopEntry.m_numRefPicsActive > gopEntry.m_numActiveRefLayerPics ) 1641 1645 { 1642 m_GOPListMvc[k][MAX_GOP].m_numRefPicsActive = m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics;1646 gopEntry.m_numRefPicsActive = gopEntry.m_numActiveRefLayerPics; 1643 1647 } 1644 1648 1645 if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'P' )1649 if( gopEntry.m_sliceType == 'P' ) 1646 1650 { 1647 if( m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics < 1 )1651 if( gopEntry.m_numActiveRefLayerPics < 1 ) 1648 1652 { 1649 printf( "\nError: #IL_ref_pics must be at least one for FrameI_l%d with slice type P\n", k);1653 printf( "\nError: #IL_ref_pics must be at least one for FrameI_l%d with slice type P\n", layer ); 1650 1654 bErrorIvpEnhV = true; 1651 1655 } 1652 1656 else 1653 1657 { 1654 for( Int j = 0; j < m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics; j++ )1658 for( Int j = 0; j < gopEntry.m_numActiveRefLayerPics; j++ ) 1655 1659 { 1656 if( m_GOPListMvc[k][MAX_GOP].m_interViewRefPosL[1][j] != -1 )1660 if( gopEntry.m_interViewRefPosL[1][j] != -1 ) 1657 1661 { 1658 printf( "\nError: inter-layer ref pos %d on L1 not possible for FrameI_l%d with slice type P\n", m_GOPListMvc[k][MAX_GOP].m_interViewRefPosL[1][j], k);1662 printf( "\nError: inter-layer ref pos %d on L1 not possible for FrameI_l%d with slice type P\n", gopEntry.m_interViewRefPosL[1][j], layer ); 1659 1663 bErrorIvpEnhV = true; 1660 1664 } … … 1663 1667 } 1664 1668 1665 if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'B' && m_GOPListMvc[k][MAX_GOP].m_numActiveRefLayerPics < 1 )1669 if( gopEntry.m_sliceType == 'B' && gopEntry.m_numActiveRefLayerPics < 1 ) 1666 1670 { 1667 printf( "\nError: #IL_ref_pics must be at least one for FrameI_l%d with slice type B\n", k);1671 printf( "\nError: #IL_ref_pics must be at least one for FrameI_l%d with slice type B\n", layer ); 1668 1672 bErrorIvpEnhV = true; 1669 1673 } -
branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder/TAppEncCfg.h
r493 r495 90 90 Int m_vpsNumLayerSets; ///< Number of layer sets 91 91 std::vector< std::vector<Int> > m_layerIdsInSets; ///< LayerIds in vps of layer set 92 Bool m_defaultOneTargetOutputLayerFlag; ///< Output highest layer of layer sets by default 93 Int numAddOuputLayerSets; ///< Number of additional output layer sets 92 Bool m_defaultOneTargetOutputLayerFlag; ///< Output highest layer of layer sets by default 94 93 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 95 94 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers … … 97 96 98 97 // Dependencies 99 std::vector< std::vector<Int>> m_directRefLayers;///< LayerIds of direct reference layers100 std::vector< std::vector<Int>> m_dependencyTypes;///< Dependency types of direct reference layers98 std::vector< std::vector<Int> > m_directRefLayers; ///< LayerIds of direct reference layers 99 std::vector< std::vector<Int> > m_dependencyTypes; ///< Dependency types of direct reference layers 101 100 #endif 102 101 Double m_adLambdaModifier[ MAX_TLAYER ]; ///< Lambda modifier array for each temporal layer -
branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r493 r495 119 119 xSetDimensionIdAndLength ( vps ); 120 120 xSetDependencies( vps ); 121 xSetProfileTierLevel ( vps ); 121 122 xSetLayerSets ( vps ); 122 123 #if H_3D … … 993 994 { 994 995 vps.setDirectDependencyFlag( depLayer, refLayer, false); 995 vps.setDirectDependencyType( depLayer, refLayer, 0);996 vps.setDirectDependencyType( depLayer, refLayer, -1 ); 996 997 } 997 998 } 998 999 for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ ) 999 1000 { 1000 Int numRefLayers = m_directRefLayers[depLayer].size();1001 assert( numRefLayers == m_dependencyTypes[depLayer].size() );1001 Int numRefLayers = (Int) m_directRefLayers[depLayer].size(); 1002 assert( numRefLayers == (Int) m_dependencyTypes[depLayer].size() ); 1002 1003 for( Int i = 0; i < numRefLayers; i++ ) 1003 1004 { … … 1012 1013 { 1013 1014 Int maxTid = -1; 1014 for ( Int cur rLayerIdInVps = 1; currLayerIdInVps < m_numberOfLayers; currLayerIdInVps++)1015 for ( Int curLayerIdInVps = 1; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++) 1015 1016 { 1016 1017 for( Int i = 0; i < getGOPSize(); i++ ) 1017 1018 { 1018 GOPEntry ge = m_GOPListMvc[currLayerIdInVps][i]; 1019 GOPEntry geCur = m_GOPListMvc[curLayerIdInVps][i]; 1020 GOPEntry geRef = m_GOPListMvc[refLayerIdInVps][i]; 1019 1021 1020 for (Int j = 0; j < ge .m_numRefPicsActive; j++)1022 for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++) 1021 1023 { 1022 if ( m_directRefLayers[ cur rLayerIdInVps ][ ge.m_interLayerPredLayerIdc[ j ]] == refLayerIdInVps )1024 if ( m_directRefLayers[ curLayerIdInVps ][ geCur.m_interLayerPredLayerIdc[ j ]] == refLayerIdInVps ) 1023 1025 { 1024 maxTid = std::max( maxTid, ge .m_temporalId );1026 maxTid = std::max( maxTid, geRef.m_temporalId ); 1025 1027 } 1026 1028 } … … 1037 1039 { 1038 1040 GOPEntry ge = m_GOPListMvc[currLayerIdInVps][ ( i < getGOPSize() ? i : MAX_GOP ) ]; 1039 maxOneActiveRefLayerFlag = maxOneActiveRefLayerFlag && (ge.m_num RefPicsActive<= 1);1041 maxOneActiveRefLayerFlag = maxOneActiveRefLayerFlag && (ge.m_numActiveRefLayerPics <= 1); 1040 1042 } 1041 1043 } … … 1069 1071 return maxVec; 1070 1072 } 1073 1074 1075 Void TAppEncTop::xSetProfileTierLevel( TComVPS& vps ) 1076 { 1077 const Int vpsNumProfileTierLevelMinus1 = 0; //TBD 1078 vps.setVpsNumProfileTierLevelMinus1( vpsNumProfileTierLevelMinus1 ); 1079 1080 for (Int i = 0; i <= vps.getVpsNumProfileTierLevelMinus1(); i++ ) 1081 { 1082 vps.setVpsProfilePresentFlag( i, true ); 1083 } 1084 } 1085 1071 1086 1072 1087 Void TAppEncTop::xSetLayerSets( TComVPS& vps ) … … 1088 1103 } 1089 1104 1090 Int numAddOuputLayerSets = m_outputLayerSetIdx.size();1105 Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 1091 1106 // Additional output layer sets + profileLevelTierIdx 1092 1107 vps.setDefaultOneTargetOutputLayerFlag ( m_defaultOneTargetOutputLayerFlag ); -
branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder/TAppEncTop.h
r493 r495 119 119 Void xSetDimensionIdAndLength ( TComVPS& vps ); 120 120 Void xSetDependencies ( TComVPS& vps ); 121 Void xSetLayerSets( TComVPS& vps ); 121 Void xSetLayerSets ( TComVPS& vps ); 122 Void xSetProfileTierLevel ( TComVPS& vps ); 122 123 Int xGetMax( std::vector<Int>& vec); 123 124 #endif … … 131 132 #else 132 133 TEncTop& getTEncTop () { return m_cTEncTop; } ///< return encoder class pointer reference 133 134 134 #endif 135 135 };// END CLASS DEFINITION TAppEncTop
Note: See TracChangeset for help on using the changeset viewer.