Changeset 648 in 3DVCSoftware
- Timestamp:
- 19 Oct 2013, 18:46:09 (11 years ago)
- Location:
- branches/HTM-8.2-dev0-Cleanup/source
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-8.2-dev0-Cleanup/source/App/TAppDecoder/TAppDecTop.cpp
r646 r648 500 500 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 501 501 #if H_MV 502 #if H_MV5503 502 assert( conf .getScaledFlag() ); 504 503 assert( defDisp.getScaledFlag() ); 505 #endif506 504 m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(), 507 505 #else … … 577 575 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 578 576 #if H_MV 579 #if H_MV5580 577 assert( conf .getScaledFlag() ); 581 578 assert( defDisp.getScaledFlag() ); 582 #endif583 579 m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(), 584 580 #else -
branches/HTM-8.2-dev0-Cleanup/source/App/TAppEncoder/TAppEncCfg.cpp
r647 r648 228 228 in>>entry.m_interViewRefPosL[1][i]; 229 229 } 230 #if !H_MV5231 if (entry.m_numActiveRefLayerPics > 0 )232 {233 in>>entry.m_collocatedRefLayerIdx;234 }235 #endif236 230 #endif 237 231 return in; … … 373 367 ("NumberOfLayers", m_numberOfLayers , 1, "Number of layers") 374 368 #if !H_3D 375 #if H_MV5376 369 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask") 377 #else378 ("ScalabilityMask", m_scalabilityMask , 1 , "Scalability Mask")379 #endif380 370 #else 381 371 ("ScalabilityMask", m_scalabilityMask , 3 , "Scalability Mask, 1: Texture 3: Texture + Depth ") 382 372 #endif 383 373 ("DimensionIdLen", m_dimensionIdLen , cfg_dimensionLength , "Number of bits used to store dimensions Id") 384 #if H_MV5385 374 ("ViewOrderIndex", m_viewOrderIndex , std::vector<Int>(1,0), "View Order Index per layer") 386 375 ("ViewId", m_viewId , std::vector<Int>(1,0), "View Id per View Order Index") 387 #else388 ("ViewId", m_viewId , std::vector<Int>(1,0), "View Id")389 #endif390 376 #if H_3D 391 377 ("DepthFlag", m_depthFlag , std::vector<Int>(1,0), "Depth Flag") … … 620 606 #endif 621 607 622 #if H_MV5623 608 #if H_MV 624 609 // VPS VUI … … 637 622 ("CtuBasedOffsetEnabledFlag" , m_ctuBasedOffsetEnabledFlag , std::vector< Bool >(1,0) ,MAX_NUM_LAYERS , "CtuBasedOffsetEnabledFlag per direct reference for the N-th layer") 638 623 ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , std::vector< Int >(1,0) ,MAX_NUM_LAYERS , "MinHorizontalCtuOffsetPlus1 per direct reference for the N-th layer") 639 #endif640 624 #endif 641 625 … … 782 766 if( k == 0 ) 783 767 { 784 #if H_MV5785 768 m_GOPListMvc[0][0].m_sliceType = 'I'; 786 #endif787 769 for( Int i = 1; i < MAX_GOP + 1; i++ ) 788 770 { … … 988 970 // allocate slice-based dQP values 989 971 #if H_MV 990 #if H_MV5991 972 xResizeVector( m_viewOrderIndex ); 992 973 … … 1008 989 #if H_3D 1009 990 xResizeVector( m_depthFlag ); 1010 #endif1011 #else1012 xResizeVector( m_viewId );1013 #if H_3D1014 xResizeVector( m_depthFlag );1015 1016 std::vector<Int> uniqueViewIds;1017 for( Int layer = 0; layer < m_numberOfLayers; layer++ )1018 {1019 Bool isIn = false;1020 for ( Int i = 0 ; i < uniqueViewIds.size(); i++ )1021 {1022 isIn = isIn || ( m_viewId[ layer ] == uniqueViewIds[ i ] );1023 }1024 if ( !isIn )1025 {1026 uniqueViewIds.push_back( m_viewId[ layer ] );1027 }1028 }1029 m_iNumberOfViews = (Int) uniqueViewIds.size();1030 #endif1031 1032 991 #endif 1033 992 xResizeVector( m_fQP ); … … 1303 1262 xConfirmPara( (m_layerIdInNuh.size()!=1) && (m_layerIdInNuh.size() < m_numberOfLayers) , "LayerIdInNuh must be given for all layers. "); 1304 1263 1305 #if H_MV51306 1264 #if H_3D 1307 1265 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 3, "Scalability Mask must be equal to 2 or 3. "); … … 1318 1276 1319 1277 m_dimIds.push_back( m_viewOrderIndex ); 1320 #else1321 #if H_3D1322 xConfirmPara( m_scalabilityMask != 1 && m_scalabilityMask != 3, "Scalability Mask must be equal to 1 or 3. ");1323 #else1324 xConfirmPara( m_scalabilityMask != 1 , "Scalability Mask must be equal to 1. ");1325 #endif1326 1327 m_dimIds.push_back( m_viewId );1328 const Int viewDimPosition = 0;1329 #if H_3D1330 if ( m_scalabilityMask & ( 1 << DEPTH_ID ) )1331 m_dimIds.push_back( m_depthFlag );1332 #endif1333 1334 #endif1335 1278 xConfirmPara( m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. " ); Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1]; 1336 1279 … … 1349 1292 { 1350 1293 xConfirmPara( m_dimIds[j].size() < m_numberOfLayers, "DimensionId must be given for all layers and all dimensions. "); 1351 #if H_MV51352 1294 xConfirmPara( (m_dimIds[j][0] != 0) , "DimensionId of layer 0 must be 0. " ); 1353 #else1354 xConfirmPara( ( j != viewDimPosition ) && (m_dimIds[j][0] != 0), "DimensionId of layer 0 must be 0. " );1355 #endif1356 1295 xConfirmPara( m_dimensionIdLen[j] < 1 || m_dimensionIdLen[j] > 8, "DimensionIdLen must be greater than 0 and less than 9 in all dimensions. " ); 1357 1296 … … 1396 1335 { 1397 1336 Bool inc = m_dimIds[ lastDiff ][ i ] > m_dimIds[ lastDiff ][ j ]; 1398 #if H_MV51399 1337 Bool shallBeButIsNotIncreasing = ( !inc ) ; 1400 #else1401 Bool shallBeButIsNotIncreasing = ( !inc && ( lastDiff != viewDimPosition ) ) ;1402 #endif1403 1338 if ( shallBeButIsNotIncreasing ) 1404 1339 { 1405 1340 printf( "\nError: Positions of Layers %d and %d is not increasing in dimension %d \n", i, j, lastDiff); 1406 1341 } 1407 #if H_MV51408 1342 xConfirmPara( shallBeButIsNotIncreasing, "DimensionIds shall be increasing within one dimension. " ); 1409 #else1410 xConfirmPara( shallBeButIsNotIncreasing && ( lastDiff != viewDimPosition ), "DimensionIds shall be increasing within one dimension. " );1411 #endif1412 1343 } 1413 1344 #endif … … 1415 1346 } 1416 1347 1417 #if H_MV51418 1348 /// ViewId 1419 1349 xConfirmPara( m_viewId.size() != m_iNumberOfViews, "The number of ViewIds must be equal to the number of views." ); … … 1421 1351 /// Layer sets 1422 1352 xConfirmPara( m_vpsNumLayerSets < 0 || m_vpsNumLayerSets > 1024, "VpsNumLayerSets must be greater than 0 and less than 1025. ") ; 1423 #else1424 xConfirmPara( m_vpsNumLayerSets < 0 || m_vpsNumLayerSets > 1024, "VpsNumLayerSets must be greater than 0 and less than 1025") ;1425 #endif1426 1353 for( Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ ) 1427 1354 { … … 2185 2112 } 2186 2113 #endif 2187 #if H_MV52188 2114 #if H_MV 2189 2115 // VPS VUI … … 2208 2134 } 2209 2135 #endif 2210 #endif2211 2136 2212 2137 xConfirmPara(!m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagValue, "CUTransquantBypassFlagValue cannot be 1 when TransquantBypassEnableFlag is 0"); … … 2274 2199 #endif 2275 2200 #if H_MV 2276 #if H_MV52277 2201 xPrintParaVector( "ViewIdVal" , m_viewId ); 2278 2202 xPrintParaVector( "ViewOrderIndex", m_viewOrderIndex ); 2279 #else2280 xPrintParaVector( "ViewId", m_viewId );2281 #endif2282 2203 #endif 2283 2204 #if H_3D -
branches/HTM-8.2-dev0-Cleanup/source/App/TAppEncoder/TAppEncCfg.h
r646 r648 69 69 std::vector<char*> m_pchReconFileList; ///< output reconstruction file names 70 70 Int m_numberOfLayers; ///< number of Layers to Encode 71 #if H_MV572 71 Int m_iNumberOfViews; ///< number of Layers that are views 73 #else74 #if H_3D75 Int m_iNumberOfViews; ///< number of Layers that are views76 #endif77 #endif78 72 #else 79 73 Char* m_pchReconFile; ///< output reconstruction file … … 83 77 std::vector< std::vector<Int> > m_dimIds; ///< dimension ids ( pointers to m_viewId and m_depthFlag 84 78 std::vector<Int> m_viewId; ///< view id 85 #if H_MV586 79 std::vector<Int> m_viewOrderIndex; ///< view order index 87 #endif88 80 #if H_3D 89 81 std::vector<Int> m_depthFlag; ///< depth flag … … 106 98 std::vector< std::vector<Int> > m_dependencyTypes; ///< Dependency types of direct reference layers 107 99 108 #if H_MV5109 100 // VPS VUI 110 101 Bool m_vpsVuiPresentFlag; … … 122 113 std::vector< std::vector<Bool > > m_ctuBasedOffsetEnabledFlag; 123 114 std::vector< std::vector<Int > > m_minHorizontalCtuOffsetPlus1; 124 #endif125 115 126 116 #if H_3D_IV_MERGE -
branches/HTM-8.2-dev0-Cleanup/source/App/TAppEncoder/TAppEncTop.cpp
r646 r648 88 88 vps.setTemporalNestingFlag(true); 89 89 } 90 #if H_MV591 90 vps.setMaxLayersMinus1( m_numberOfLayers - 1); 92 #else93 vps.setMaxLayers( m_numberOfLayers );94 #endif95 91 for(Int i = 0; i < MAX_TLAYER; i++) 96 92 { … … 124 120 xSetDependencies( vps ); 125 121 xSetProfileTierLevel ( vps ); 126 #if H_MV5127 122 xSetRepFormat ( vps ); 128 #endif129 123 xSetLayerSets ( vps ); 130 #if H_MV5131 124 xSetVPSVUI ( vps ); 132 #endif133 125 #if H_3D 134 #if !H_MV5135 vps.initViewIndex();136 #endif137 126 xSetVPSExtension2 ( vps ); 138 127 m_ivPicLists.setVPS ( &vps ); … … 140 129 141 130 142 #if H_MV5143 131 for(Int layerIdInVps = 0; layerIdInVps < m_numberOfLayers; layerIdInVps++) 144 #else145 for(Int layer = 0; layer < m_numberOfLayers; layer++)146 #endif147 132 { 148 133 m_frameRcvd .push_back(0); … … 151 136 m_acTVideoIOYuvReconFileList.push_back(new TVideoIOYuv); 152 137 m_picYuvRec .push_back(new TComList<TComPicYuv*>) ; 153 #if H_MV5154 138 m_ivPicLists.push_back( m_acTEncTopList[ layerIdInVps ]->getListPic() ); 155 139 TEncTop& m_cTEncTop = *m_acTEncTopList[ layerIdInVps ]; // It is not a member, but this name helps avoiding code duplication !!! … … 160 144 m_cTEncTop.setViewId ( vps.getViewId ( layerId ) ); 161 145 m_cTEncTop.setViewIndex ( vps.getViewIndex ( layerId ) ); 162 #else163 m_ivPicLists.push_back( m_acTEncTopList[ layer ]->getListPic() );164 TEncTop& m_cTEncTop = *m_acTEncTopList[ layer ]; // It is not a member, but this name helps avoiding code duplication !!!165 166 m_cTEncTop.setLayerIdInVps ( layer );167 m_cTEncTop.setLayerId ( vps.getLayerIdInNuh( layer ) );168 m_cTEncTop.setViewId ( vps.getViewId ( layer ) );169 170 #endif171 146 #if H_3D 172 #if H_MV5173 147 Bool isDepth = ( vps.getDepthId ( layerId ) != 0 ) ; 174 #else175 Bool isDepth = ( vps.getDepthId ( layer ) != 0 ) ;176 m_cTEncTop.setViewIndex ( vps.getViewIndex ( layer ) );177 #endif178 148 m_cTEncTop.setIsDepth ( isDepth ); 179 149 //====== Camera Parameters ========= … … 201 171 m_cTEncTop.setDWeight ( isDepth ? m_iDWeight : 0 ); 202 172 #endif // H_3D_VSO 203 #if H_MV5204 173 #if H_3D_ARP 205 174 //====== Advanced Inter-view Residual Prediction ========= … … 209 178 #if H_3D_IC 210 179 m_cTEncTop.setUseIC ( vps.getViewIndex( layerId ) == 0 ? false : m_abUseIC[isDepth ? 1 : 0] ); 211 #endif212 #else213 #if H_3D_ARP214 //====== Advanced Inter-view Residual Prediction =========215 m_cTEncTop.setUseAdvRP ( ( isDepth || 0==layer ) ? 0 : m_uiUseAdvResPred );216 m_cTEncTop.setARPStepNum ( ( isDepth || 0==layer ) ? 1 : H_3D_ARP_WFNR );217 #endif218 #if H_3D_IC219 m_cTEncTop.setUseIC ( vps.getViewIndex( layer ) == 0 ? false : m_abUseIC[isDepth ? 1 : 0] );220 #endif221 180 #endif 222 181 //========== Depth intra modes ========== … … 260 219 m_cTEncTop.setGOPSize ( m_iGOPSize ); 261 220 #if H_MV 262 #if H_MV5263 221 m_cTEncTop.setGopList ( m_GOPListMvc[layerIdInVps] ); 264 222 m_cTEncTop.setExtraRPSs ( m_extraRPSsMvc[layerIdInVps] ); … … 269 227 } 270 228 #else 271 m_cTEncTop.setGopList ( m_GOPListMvc[layer] );272 m_cTEncTop.setExtraRPSs ( m_extraRPSsMvc[layer] );273 for(Int i = 0; i < MAX_TLAYER; i++)274 {275 m_cTEncTop.setNumReorderPics ( m_numReorderPicsMvc[layer][i], i );276 m_cTEncTop.setMaxDecPicBuffering ( m_maxDecPicBufferingMvc[layer][i], i );277 }278 #endif279 #else280 229 m_cTEncTop.setGopList ( m_GOPList ); 281 230 m_cTEncTop.setExtraRPSs ( m_extraRPSs ); … … 291 240 } 292 241 #if H_MV 293 #if H_MV5294 242 m_cTEncTop.setQP ( m_iQP[layerIdInVps] ); 295 243 #else 296 m_cTEncTop.setQP ( m_iQP[layer] );297 #endif298 #else299 244 m_cTEncTop.setQP ( m_iQP ); 300 245 #endif … … 303 248 304 249 #if H_MV 305 #if H_MV5306 250 m_cTEncTop.setMaxTempLayer ( m_maxTempLayerMvc[layerIdInVps] ); 307 251 #else 308 m_cTEncTop.setMaxTempLayer ( m_maxTempLayerMvc[layer] );309 #endif310 #else311 252 m_cTEncTop.setMaxTempLayer ( m_maxTempLayer ); 312 253 #endif … … 317 258 //====== Loop/Deblock Filter ======== 318 259 #if H_MV 319 #if H_MV5320 260 m_cTEncTop.setLoopFilterDisable ( m_bLoopFilterDisable[layerIdInVps]); 321 #else322 m_cTEncTop.setLoopFilterDisable ( m_bLoopFilterDisable[layer]);323 #endif324 261 #else 325 262 m_cTEncTop.setLoopFilterDisable ( m_bLoopFilterDisable ); … … 351 288 352 289 #if H_MV 353 #if H_MV5354 290 if ((m_iMaxDeltaQP == 0 ) && (m_iQP[layerIdInVps] == lowestQP) && (m_useLossless == true)) 355 #else356 if ((m_iMaxDeltaQP == 0 ) && (m_iQP[layer] == lowestQP) && (m_useLossless == true))357 #endif358 291 #else 359 292 if ((m_iMaxDeltaQP == 0 ) && (m_iQP == lowestQP) && (m_useLossless == true)) … … 372 305 m_cTEncTop.setUseLossless ( m_useLossless ); 373 306 #if H_MV 374 #if H_MV5375 307 m_cTEncTop.setdQPs ( m_aidQP[layerIdInVps] ); 376 #else377 m_cTEncTop.setdQPs ( m_aidQP[layer] );378 #endif379 308 #else 380 309 m_cTEncTop.setdQPs ( m_aidQP ); … … 435 364 m_cTEncTop.setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag ); 436 365 #if H_MV 437 #if H_MV5438 366 m_cTEncTop.setUseSAO ( m_bUseSAO[layerIdInVps] ); 439 #else440 m_cTEncTop.setUseSAO ( m_bUseSAO[layer] );441 #endif442 367 #else 443 368 m_cTEncTop.setUseSAO ( m_bUseSAO ); … … 1303 1228 Void TAppEncTop::xSetDimensionIdAndLength( TComVPS& vps ) 1304 1229 { 1305 #if H_MV51306 1230 vps.setScalabilityMaskFlag( m_scalabilityMask ); 1307 #else1308 vps.setScalabilityMask( m_scalabilityMask );1309 #endif1310 1231 for( Int dim = 0; dim < m_dimIds.size(); dim++ ) 1311 1232 { 1312 1233 vps.setDimensionIdLen( dim, m_dimensionIdLen[ dim ] ); 1313 #if H_MV51314 1234 for( Int layer = 0; layer <= vps.getMaxLayersMinus1(); layer++ ) 1315 #else1316 for( Int layer = 0; layer < vps.getMaxLayers(); layer++ )1317 #endif1318 1235 1319 1236 { … … 1322 1239 } 1323 1240 1324 #if H_MV51325 1241 Int maxViewId = xGetMax( m_viewId ); 1326 1242 … … 1335 1251 1336 1252 assert( m_iNumberOfViews == vps.getNumViews() ); 1337 #endif1338 1253 } 1339 1254 … … 1362 1277 1363 1278 // Max temporal id for inter layer reference pictures + presence flag 1364 #if H_MV51365 1279 Bool maxTidRefPresentFlag = false; 1366 #endif1367 1280 for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++) 1368 1281 { … … 1385 1298 } 1386 1299 vps.setMaxTidIlRefPicPlus1( refLayerIdInVps, maxTid + 1 ); 1387 #if H_MV51388 1300 maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 ); 1389 #endif 1390 } 1391 1392 #if H_MV5 1301 } 1302 1393 1303 vps.setMaxTidRefPresentFlag( maxTidRefPresentFlag ); 1394 #endif1395 1304 // Max one active ref layer flag 1396 1305 Bool maxOneActiveRefLayerFlag = true; 1397 #if H_MV51398 1306 for ( Int layerIdInVps = 1; layerIdInVps < m_numberOfLayers && maxOneActiveRefLayerFlag; layerIdInVps++) 1399 #else1400 for ( Int currLayerIdInVps = 1; currLayerIdInVps < m_numberOfLayers && maxOneActiveRefLayerFlag; currLayerIdInVps++)1401 #endif1402 1307 { 1403 1308 for( Int i = 0; i < ( getGOPSize() + 1) && maxOneActiveRefLayerFlag; i++ ) 1404 1309 { 1405 #if H_MV51406 1310 GOPEntry ge = m_GOPListMvc[layerIdInVps][ ( i < getGOPSize() ? i : MAX_GOP ) ]; 1407 #else1408 GOPEntry ge = m_GOPListMvc[currLayerIdInVps][ ( i < getGOPSize() ? i : MAX_GOP ) ];1409 #endif1410 1311 maxOneActiveRefLayerFlag = maxOneActiveRefLayerFlag && (ge.m_numActiveRefLayerPics <= 1); 1411 1312 } … … 1415 1316 1416 1317 1417 #if H_MV51418 1318 // All Ref layers active flag 1419 1319 Bool allRefLayersActiveFlag = true; … … 1431 1331 // Currently cross layer irap aligned is always true. 1432 1332 vps.setCrossLayerIrapAlignedFlag( true ); 1433 #endif1434 1333 vps.setRefLayers(); 1435 1334 }; 1436 1335 1437 #if H_MV51438 1336 GOPEntry* TAppEncTop::xGetGopEntry( Int layerIdInVps, Int poc ) 1439 1337 { … … 1450 1348 return geFound; 1451 1349 } 1452 #endif1453 1350 1454 1351 Void TAppEncTop::xSetLayerIds( TComVPS& vps ) … … 1490 1387 } 1491 1388 1492 #if H_MV51493 1389 1494 1390 Void TAppEncTop::xSetRepFormat( TComVPS& vps ) … … 1515 1411 } 1516 1412 } 1517 #endif1518 1413 1519 1414 Void TAppEncTop::xSetLayerSets( TComVPS& vps ) … … 1568 1463 } 1569 1464 } 1570 #if H_MV51571 1465 1572 1466 Void TAppEncTop::xSetVPSVUI( TComVPS& vps ) … … 1660 1554 } 1661 1555 #endif 1662 #endif1663 1556 #if H_3D 1664 1557 Void TAppEncTop::xSetVPSExtension2( TComVPS& vps ) 1665 1558 { 1666 #if H_MV51667 1559 1668 1560 for ( Int layer = 0; layer <= vps.getMaxLayersMinus1(); layer++ ) 1669 #else1670 for ( Int layer = 0; layer < vps.getMaxLayers(); layer++ )1671 #endif1672 1561 { 1673 1562 Bool isDepth = ( vps.getDepthId( layer ) == 1 ) ; -
branches/HTM-8.2-dev0-Cleanup/source/App/TAppEncoder/TAppEncTop.h
r635 r648 124 124 Void xSetLayerSets ( TComVPS& vps ); 125 125 Void xSetProfileTierLevel ( TComVPS& vps ); 126 #if H_MV5127 126 Void xSetRepFormat ( TComVPS& vps ); 128 127 Void xSetVPSVUI ( TComVPS& vps ); 129 128 GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc ); 130 #endif131 129 Int xGetMax( std::vector<Int>& vec); 132 130 #endif -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/CommonDef.h
r625 r648 187 187 } 188 188 189 #if H_MV5190 189 template <typename T> 191 190 __inline T gCeilLog2( T val ) … … 196 195 return ceilLog2; 197 196 } 198 #endif199 197 200 198 #define RemoveBitIncrement( exp ) ( exp >> ( g_bitDepthY - 8 ) ) -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComDataCU.cpp
r647 r648 4804 4804 4805 4805 // use coldir. 4806 #if H_MV54807 4806 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 4808 #else4809 #if H_MV4810 TComPic *pColPic;4811 if (getSlice()->getAltCollocatedIndicationFlag() )4812 {4813 pColPic = getSlice()->getPicFromRefPicSetInterLayer( getSlice()->getActiveMotionPredRefLayerId( getSlice()->getCollocatedRefLayerIdx() ));4814 }4815 else4816 {4817 pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx());4818 }4819 #else4820 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx());4821 #endif4822 #endif4823 4807 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 4824 4808 if(pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE) -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComSlice.cpp
r646 r648 101 101 , m_enableTMVPFlag ( true ) 102 102 #if H_MV 103 #if H_MV5104 103 , m_refPicSetInterLayer0 ( NULL ) 105 104 , m_refPicSetInterLayer1 ( NULL ) 106 #else107 , m_refPicSetInterLayer ( NULL )108 #endif109 105 , m_layerId (0) 110 106 , m_viewId (0) 111 #if H_MV5112 107 , m_viewIndex (0) 113 #endif114 108 #if H_3D 115 #if !H_MV5116 , m_viewIndex (0)117 #endif118 109 , m_isDepth (false) 119 110 #endif 120 #if H_MV5121 111 , m_pocResetFlag (false) 122 #endif123 112 , m_discardableFlag (false) 124 113 , m_interLayerPredEnabledFlag (false) 125 114 , m_numInterLayerRefPicsMinus1 (0) 126 #if !H_MV5127 , m_interLayerSamplePredOnlyFlag (false)128 , m_altCollocatedIndicationFlag (0)129 , m_collocatedRefLayerIdx (0)130 #endif131 115 #if H_3D_IC 132 116 , m_bApplyIC ( false ) … … 164 148 for (Int i = 0; i < MAX_NUM_LAYERS; i++ ) 165 149 { 166 #if H_MV5167 150 m_interLayerPredLayerIdc[ i ] = i; 168 #else169 m_interLayerPredLayerIdc[ i ] = 0;170 #endif171 151 } 172 152 #endif … … 387 367 } 388 368 } 389 #if H_MV5390 369 #if !H_MV 391 370 #if FIX1071 … … 730 709 } 731 710 #endif 732 #else 711 Int TComSlice::getNumRpsCurrTempList() 712 { 713 Int numRpsCurrTempList = 0; 714 715 if (m_eSliceType == I_SLICE) 716 { 717 return 0; 718 } 719 for(UInt i=0; i < m_pcRPS->getNumberOfNegativePictures()+ m_pcRPS->getNumberOfPositivePictures() + m_pcRPS->getNumberOfLongtermPictures(); i++) 720 { 721 if(m_pcRPS->getUsed(i)) 722 { 723 numRpsCurrTempList++; 724 } 725 } 733 726 #if H_MV 734 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer , Bool checkNumPocTotalCurr)735 #else736 #if FIX1071737 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr )738 #else739 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic )740 #endif741 #endif742 {743 #if FIX1071744 if (!checkNumPocTotalCurr)745 #endif746 {747 if (m_eSliceType == I_SLICE)748 {749 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList));750 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx ));751 752 return;753 }754 755 #if !H_MV756 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0);757 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1);758 #endif759 }760 761 TComPic* pcRefPic= NULL;762 TComPic* RefPicSetStCurr0[16];763 TComPic* RefPicSetStCurr1[16];764 TComPic* RefPicSetLtCurr[16];765 UInt NumPocStCurr0 = 0;766 UInt NumPocStCurr1 = 0;767 UInt NumPocLtCurr = 0;768 Int i;769 770 for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++)771 {772 if(m_pcRPS->getUsed(i))773 {774 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));775 pcRefPic->setIsLongTerm(0);776 pcRefPic->getPicYuvRec()->extendPicBorder();777 RefPicSetStCurr0[NumPocStCurr0] = pcRefPic;778 NumPocStCurr0++;779 pcRefPic->setCheckLTMSBPresent(false);780 }781 }782 783 for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++)784 {785 if(m_pcRPS->getUsed(i))786 {787 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));788 pcRefPic->setIsLongTerm(0);789 pcRefPic->getPicYuvRec()->extendPicBorder();790 RefPicSetStCurr1[NumPocStCurr1] = pcRefPic;791 NumPocStCurr1++;792 pcRefPic->setCheckLTMSBPresent(false);793 }794 }795 796 for(i = m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--)797 {798 if(m_pcRPS->getUsed(i))799 {800 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));801 pcRefPic->setIsLongTerm(1);802 pcRefPic->getPicYuvRec()->extendPicBorder();803 RefPicSetLtCurr[NumPocLtCurr] = pcRefPic;804 NumPocLtCurr++;805 }806 if(pcRefPic==NULL)807 {808 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));809 }810 pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i));811 }812 813 // ref_pic_list_init814 TComPic* rpsCurrList0[MAX_NUM_REF+1];815 TComPic* rpsCurrList1[MAX_NUM_REF+1];816 #if H_MV817 Int numPocInterCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr;818 assert( numPocInterCurr == 0 || getInterRefEnabledInRPLFlag() );819 Int numPocTotalCurr = numPocInterCurr + getNumActiveRefLayerPics( );820 assert( numPocTotalCurr == getNumRpsCurrTempList() );821 #else822 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr;823 #endif824 #if FIX1071825 if (checkNumPocTotalCurr)826 {827 // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance that the following applies to the value of NumPocTotalCurr:828 #if H_MV829 // ??If nuh_layer_id is equal to 0 and the current picture is a BLA picture or a CRA picture, the value of NumPocTotalCurr shall be equal to 0.830 // ??Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.831 if ( getRapPicFlag() && m_layerId == 0 )832 #else833 // ??If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0.834 // ??Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.835 if (getRapPicFlag())836 #endif837 {838 assert(numPocTotalCurr == 0);839 }840 841 if (m_eSliceType == I_SLICE)842 {843 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList));844 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx ));845 846 return;847 }848 849 assert(numPocTotalCurr > 0);850 851 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0);852 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1);853 }854 #endif855 856 Int cIdx = 0;857 #if H_MV858 if ( getInterRefEnabledInRPLFlag() )859 {860 #endif861 for ( i=0; i<NumPocStCurr0; i++, cIdx++)862 {863 rpsCurrList0[cIdx] = RefPicSetStCurr0[i];864 }865 for ( i=0; i<NumPocStCurr1; i++, cIdx++)866 {867 rpsCurrList0[cIdx] = RefPicSetStCurr1[i];868 }869 for ( i=0; i<NumPocLtCurr; i++, cIdx++)870 {871 rpsCurrList0[cIdx] = RefPicSetLtCurr[i];872 }873 #if H_MV874 }875 for ( i=0; i < getNumActiveRefLayerPics( ); i++, cIdx++)876 {877 assert( cIdx < MAX_NUM_REF );878 rpsCurrList0[cIdx] = refPicSetInterLayer[i];879 }880 #endif881 assert(cIdx == numPocTotalCurr);882 883 if (m_eSliceType==B_SLICE)884 {885 cIdx = 0;886 #if H_MV887 if ( getInterRefEnabledInRPLFlag() )888 {889 #endif890 for ( i=0; i<NumPocStCurr1; i++, cIdx++)891 {892 rpsCurrList1[cIdx] = RefPicSetStCurr1[i];893 }894 for ( i=0; i<NumPocStCurr0; i++, cIdx++)895 {896 rpsCurrList1[cIdx] = RefPicSetStCurr0[i];897 }898 for ( i=0; i<NumPocLtCurr; i++, cIdx++)899 {900 rpsCurrList1[cIdx] = RefPicSetLtCurr[i];901 }902 #if H_MV903 }904 for ( i=0; i < getNumActiveRefLayerPics( ); i++, cIdx++)905 {906 assert( cIdx < MAX_NUM_REF );907 rpsCurrList1[cIdx] = refPicSetInterLayer[i];908 }909 #endif910 assert(cIdx == numPocTotalCurr);911 }912 913 ::memset(m_bIsUsedAsLongTerm, 0, sizeof(m_bIsUsedAsLongTerm));914 915 #if H_MV916 Int numPocSt = NumPocStCurr0 + NumPocStCurr1;917 assert( getInterRefEnabledInRPLFlag( ) || numPocSt == 0 );918 919 for (Int li = 0; li < 2; li++)920 {921 if ( m_eSliceType == P_SLICE && li == 1 )922 {923 m_aiNumRefIdx[1] = 0;924 ::memset( m_apcRefPicList[1], 0, sizeof(m_apcRefPicList[1]));925 }926 else927 {928 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[ li ] - 1 ); rIdx ++)929 {930 Bool listModified = m_RefPicListModification.getRefPicListModificationFlagL( li );931 Int orgIdx = listModified ? m_RefPicListModification.getRefPicSetIdxL(li, rIdx) : (rIdx % numPocTotalCurr);932 933 m_apcRefPicList [li][rIdx] = ( li == 0 ) ? rpsCurrList0[ orgIdx ] : rpsCurrList1[ orgIdx ];934 m_bIsUsedAsLongTerm[li][rIdx] = ( orgIdx >= numPocSt ) ;935 }936 }937 }938 #else939 for (Int rIdx = 0; rIdx < m_aiNumRefIdx[0]; rIdx ++)940 {941 cIdx = m_RefPicListModification.getRefPicListModificationFlagL0() ? m_RefPicListModification.getRefPicSetIdxL0(rIdx) : rIdx % numPocTotalCurr;942 assert(cIdx >= 0 && cIdx < numPocTotalCurr);943 m_apcRefPicList[0][rIdx] = rpsCurrList0[ cIdx ];944 m_bIsUsedAsLongTerm[0][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 );945 }946 if ( m_eSliceType != B_SLICE )947 {948 m_aiNumRefIdx[1] = 0;949 ::memset( m_apcRefPicList[1], 0, sizeof(m_apcRefPicList[1]));950 }951 else952 {953 for (Int rIdx = 0; rIdx < m_aiNumRefIdx[1]; rIdx ++)954 {955 cIdx = m_RefPicListModification.getRefPicListModificationFlagL1() ? m_RefPicListModification.getRefPicSetIdxL1(rIdx) : rIdx % numPocTotalCurr;956 assert(cIdx >= 0 && cIdx < numPocTotalCurr);957 m_apcRefPicList[1][rIdx] = rpsCurrList1[ cIdx ];958 m_bIsUsedAsLongTerm[1][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 );959 }960 }961 #endif962 }963 964 #endif965 Int TComSlice::getNumRpsCurrTempList()966 {967 Int numRpsCurrTempList = 0;968 969 if (m_eSliceType == I_SLICE)970 {971 return 0;972 }973 for(UInt i=0; i < m_pcRPS->getNumberOfNegativePictures()+ m_pcRPS->getNumberOfPositivePictures() + m_pcRPS->getNumberOfLongtermPictures(); i++)974 {975 if(m_pcRPS->getUsed(i))976 {977 numRpsCurrTempList++;978 }979 }980 #if H_MV981 #if !H_MV5982 assert( ( numRpsCurrTempList == 0 ) || getInterRefEnabledInRPLFlag() );983 #endif984 727 numRpsCurrTempList = numRpsCurrTempList + getNumActiveRefLayerPics(); 985 728 #endif … … 1295 1038 #if H_MV 1296 1039 // Additional slice header syntax elements 1297 #if H_MV51298 1040 m_pocResetFlag = pSrc->m_pocResetFlag; 1299 #endif1300 1041 m_discardableFlag = pSrc->m_discardableFlag; 1301 1042 m_interLayerPredEnabledFlag = pSrc->m_interLayerPredEnabledFlag; … … 1306 1047 m_interLayerPredLayerIdc[ layer ] = pSrc->m_interLayerPredLayerIdc[ layer ]; 1307 1048 } 1308 #if !H_MV51309 m_interLayerSamplePredOnlyFlag = pSrc->m_interLayerSamplePredOnlyFlag;1310 m_altCollocatedIndicationFlag = pSrc->m_altCollocatedIndicationFlag ;1311 m_collocatedRefLayerIdx = pSrc->m_collocatedRefLayerIdx ;1312 m_numActiveMotionPredRefLayers = pSrc->m_numActiveMotionPredRefLayers;1313 1314 for (Int layer = 0; layer < MAX_NUM_LAYER_IDS; layer++)1315 {1316 m_interLayerPredLayerIdc[layer] = pSrc->m_interLayerPredLayerIdc[layer];1317 }1318 #endif1319 1049 #endif 1320 1050 #if H_3D_IC … … 1781 1511 : m_VPSId ( 0) 1782 1512 , m_uiMaxTLayers ( 1) 1783 #if H_MV51784 1513 #if H_MV 1785 1514 , m_uiMaxLayersMinus1 ( 0) 1786 #else1787 , m_uiMaxLayers ( 1)1788 #endif1789 1515 #else 1790 1516 , m_uiMaxLayers ( 1) … … 1800 1526 , m_hrdOpSetIdx (NULL) 1801 1527 , m_cprmsPresentFlag (NULL) 1802 #if H_MV51803 1528 #if H_MV 1804 1529 , m_vpsVUI ( NULL ) 1805 #endif1806 1530 #endif 1807 1531 { … … 1848 1572 1849 1573 m_avcBaseLayerFlag = false; 1850 #if H_MV51851 1574 m_vpsVuiOffset = 0; 1852 #endif1853 1575 m_splittingFlag = false; 1854 1576 1855 1577 for( Int i = 0; i < MAX_NUM_SCALABILITY_TYPES; i++ ) 1856 1578 { 1857 #if H_MV51858 1579 m_scalabilityMaskFlag[i] = false; 1859 #else1860 m_scalabilityMask[i] = false;1861 #endif1862 1580 m_dimensionIdLen [i] = -1; 1863 1581 } … … 1885 1603 m_layerIdInNuh [i] = ( i == 0 ) ? 0 : -1; 1886 1604 m_numDirectRefLayers[i] = 0; 1887 #if H_MV51888 1605 m_maxTidIlRefPicPlus1[i] = 7; 1889 1606 m_vpsRepFormatIdx [i] = 0; 1890 1607 m_repFormat [i] = NULL; 1891 1608 m_viewIdVal [i] = 0; 1892 #else1893 m_maxTidIlRefPicPlus1[i] = -1;1894 #endif1895 1609 1896 1610 #if H_3D … … 1935 1649 #endif 1936 1650 } 1937 #if H_MV51938 1651 m_vpsVUI = new TComVPSVUI; 1939 #endif1940 1652 #if H_3D 1941 1653 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) … … 1963 1675 if( m_hrdOpSetIdx != NULL ) delete[] m_hrdOpSetIdx; 1964 1676 if( m_cprmsPresentFlag != NULL ) delete[] m_cprmsPresentFlag; 1965 #if H_MV51966 1677 #if H_MV 1967 1678 if ( m_vpsVUI != NULL ) delete m_vpsVUI; … … 1983 1694 #endif 1984 1695 } 1985 #endif1986 #else1987 #if H_3D_DIM_DLT1988 for( Int i = 0; i < MAX_NUM_LAYERS; i++ )1989 {1990 if ( m_iDepthValue2Idx[i] != 0 )1991 {1992 xFree( m_iDepthValue2Idx[i] );1993 m_iDepthValue2Idx[i] = 0;1994 }1995 1996 if ( m_iIdx2DepthValue[i] != 0 )1997 {1998 xFree( m_iIdx2DepthValue[i] );1999 m_iIdx2DepthValue[i] = 0;2000 2001 }2002 }2003 #endif2004 1696 #endif 2005 1697 } … … 2072 1764 Bool TComVPS::checkVPSExtensionSyntax() 2073 1765 { 2074 #if H_MV52075 1766 for( Int layer = 1; layer <= getMaxLayersMinus1(); layer++ ) 2076 #else2077 for( Int layer = 1; layer < getMaxLayers(); layer++ )2078 #endif2079 1767 { 2080 1768 // check layer_id_in_nuh constraint … … 2092 1780 { 2093 1781 assert( scalType >= 0 && scalType <= MAX_NUM_SCALABILITY_TYPES ); 2094 #if H_MV52095 1782 assert( scalType == MAX_NUM_SCALABILITY_TYPES || getScalabilityMaskFlag( scalType ) ); 2096 #else2097 assert( scalType == MAX_NUM_SCALABILITY_TYPES || getScalabilityMask( scalType ) );2098 #endif2099 1783 Int scalIdx = 0; 2100 1784 for( Int curScalType = 0; curScalType < scalType; curScalType++ ) 2101 1785 { 2102 #if H_MV52103 1786 scalIdx += ( getScalabilityMaskFlag( curScalType ) ? 1 : 0 ); 2104 #else2105 scalIdx += ( getScalabilityMask( curScalType ) ? 1 : 0 );2106 #endif2107 1787 2108 1788 } … … 2110 1790 return scalIdx; 2111 1791 } 2112 #if H_MV52113 1792 Void TComVPS::setScalabilityMaskFlag( UInt val ) 2114 1793 { … … 2118 1797 } 2119 1798 } 2120 #else 2121 Void TComVPS::setScalabilityMask( UInt val ) 2122 { 2123 for ( Int scalType = 0; scalType < MAX_NUM_SCALABILITY_TYPES; scalType++ ) 2124 setScalabilityMask( scalType, ( val & (1 << scalType ) ) != 0 ); 2125 } 2126 2127 #endif 2128 2129 #if H_MV5 1799 2130 1800 Void TComVPS::setRefLayers() 2131 1801 { … … 2176 1846 } 2177 1847 #endif // H_3D 2178 #else2179 Void TComVPS::setRefLayers()2180 {2181 for( Int i = 0; i < MAX_NUM_LAYERS; i++ )2182 {2183 m_numSamplePredRefLayers[ i ] = 0;2184 m_numMotionPredRefLayers[ i ] = 0;2185 m_numDirectRefLayers[ i ] = 0;2186 for( Int j = 0; j < MAX_NUM_LAYERS; j++ ) {2187 m_samplePredEnabledFlag[ i ][ j ] = 0;2188 m_motionPredEnabledFlag[ i ][ j ] = 0;2189 m_refLayerId[ i ][ j ] = 0;2190 m_samplePredRefLayerId[ i ][ j ] = 0;2191 m_motionPredRefLayerId[ i ][ j ] = 0;2192 }2193 }2194 2195 for( Int i = 1; i <= getMaxLayers()- 1; i++ )2196 {2197 for( Int j = 0; j < i; j++ )2198 {2199 if( getDirectDependencyFlag(i,j) )2200 {2201 m_refLayerId[ i ][m_numDirectRefLayers[ i ]++ ] = getLayerIdInNuh( j );2202 2203 m_samplePredEnabledFlag [ i ][ j ] = ( ( getDirectDependencyType( i , j ) + 1 ) & 1 ) == 1;2204 m_numSamplePredRefLayers[ i ] += m_samplePredEnabledFlag [ i ][ j ] ? 1 : 0;2205 m_motionPredEnabledFlag [ i ][ j ] = ( ( ( getDirectDependencyType( i , j ) + 1 ) & 2 ) >> 1 ) == 1;2206 m_numMotionPredRefLayers[ i ] += m_motionPredEnabledFlag [ i][ j ] ? 1 : 0;2207 }2208 }2209 }2210 2211 for( Int i = 1, mIdx = 0, sIdx = 0; i <= getMaxLayers()- 1; i++ )2212 {2213 for( Int j = 0 ; j < i; j++ )2214 {2215 if( m_motionPredEnabledFlag[ i ][ j ] )2216 {2217 m_motionPredRefLayerId[ i ][ mIdx++ ] = getLayerIdInNuh( j );2218 }2219 2220 if( m_samplePredEnabledFlag[ i ][ j ] )2221 {2222 m_samplePredRefLayerId[ i ][ sIdx++ ] = getLayerIdInNuh( j );2223 }2224 }2225 }2226 }2227 2228 Int TComVPS::getRefLayerId( Int layerIdInVps, Int idx )2229 {2230 assert( idx >= 0 && idx < m_numDirectRefLayers[layerIdInVps] );2231 Int layerIdInNuh = m_refLayerId[ layerIdInVps ][ idx ];2232 assert ( layerIdInNuh >= 0 );2233 return layerIdInNuh;2234 }2235 2236 Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType )2237 {2238 return getScalabilityMask( scalType ) ? getDimensionId( layerIdInVps, scalTypeToScalIdx( scalType ) ) : 0;2239 }2240 2241 #if H_3D2242 Void TComVPS::initViewIndex()2243 {2244 Int viewIdList [ MAX_NUM_LAYERS ]; // ed. should be changed to MAX_VIEW_ID2245 Int viewIndexList[ MAX_NUM_LAYERS ];2246 Int numViewIds = 0;2247 2248 for ( Int i = 0 ; i < m_uiMaxLayers; i++ )2249 {2250 Int currViewId = getViewId( i );2251 2252 Bool viewIdInListFlag = false;2253 for ( Int j = 0; j < numViewIds; j ++ )2254 {2255 viewIdInListFlag = viewIdInListFlag || ( currViewId == viewIdList[ j ] );2256 }2257 2258 if ( !viewIdInListFlag )2259 {2260 viewIdList [ numViewIds ] = currViewId;2261 viewIndexList[ currViewId ] = numViewIds;2262 2263 numViewIds++;2264 }2265 2266 m_viewIndex[ i ] = viewIndexList[ currViewId ];2267 }2268 }2269 2270 Int TComVPS::getLayerIdInNuh( Int viewIndex, Bool depthFlag )2271 {2272 Int foundlayerId = -1;2273 2274 for (Int layer = 0 ; layer < m_uiMaxLayers; layer++ )2275 {2276 if( ( getViewIndex( layer ) == viewIndex ) && ( getDepthId( layer ) == ( depthFlag ? 1 : 0 ) ) )2277 {2278 foundlayerId = layer;2279 break;2280 }2281 }2282 assert( foundlayerId != -1 );2283 2284 return getLayerIdInNuh( foundlayerId );2285 }2286 2287 #endif // H_3D2288 2289 Int TComVPS::xCeilLog2( Int val )2290 {2291 assert( val > 0 );2292 Int ceilLog2 = 0;2293 while( val > ( 1 << ceilLog2 ) ) ceilLog2++;2294 return ceilLog2;2295 }2296 2297 #endif // H_MV52298 1848 2299 1849 … … 2336 1886 return numLayersInIdList; 2337 1887 } 2338 #if H_MV52339 1888 Int TComVPS::getNumViews() 2340 1889 { … … 2366 1915 return dependentFlag; 2367 1916 } 2368 #endif2369 1917 #endif // H_MV 2370 1918 … … 2417 1965 , m_vuiParameters () 2418 1966 #if H_MV 2419 #if H_MV52420 1967 , m_pcVPS ( NULL ) 2421 1968 , m_spsInferScalingListFlag ( false ) … … 2423 1970 , m_updateRepFormatFlag ( true ) 2424 1971 , m_interViewMvVertConstraintFlag (false) 2425 #else2426 , m_interViewMvVertConstraintFlag (false)2427 , m_numIlpRestrictedRefLayers ( 0 )2428 #endif2429 1972 #endif 2430 1973 #if H_3D … … 2441 1984 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 2442 1985 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2443 #if !H_MV52444 #if H_MV2445 for (Int i = 0; i < MAX_NUM_LAYERS; i++ )2446 {2447 m_minSpatialSegmentOffsetPlus1[ i ] = 0;2448 m_ctuBasedOffsetEnabledFlag [ i ] = false;2449 m_minHorizontalCtuOffsetPlus1 [ i ] = 0;2450 }2451 #endif2452 #endif2453 1986 } 2454 1987 … … 2603 2136 , m_listsModificationPresentFlag( 0) 2604 2137 , m_numExtraSliceHeaderBits(0) 2605 #if H_MV52606 2138 #if H_MV 2607 2139 , m_ppsInferScalingListFlag(false) 2608 2140 , m_ppsScalingListRefLayerId(0) 2609 2141 #endif 2610 #endif2611 2142 { 2612 2143 m_scalingList = new TComScalingList; … … 2628 2159 } 2629 2160 2630 #if H_MV52631 2161 #if H_MV 2632 2162 Void TComSPS::inferRepFormat( TComVPS* vps, Int layerIdCurr ) … … 2679 2209 } 2680 2210 } 2681 #endif2682 2211 #endif 2683 2212 #if H_3D … … 2950 2479 2951 2480 #if H_MV 2952 #if H_MV52953 2481 Void TComSlice::createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ) 2954 2482 { … … 2982 2510 } 2983 2511 } 2984 #else 2985 Void TComSlice::createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer ) 2986 { 2987 refPicSetInterLayer.clear(); 2988 2989 for( Int i = 0; i < getNumActiveRefLayerPics(); i++ ) 2990 { 2991 Int layerIdRef = getRefPicLayerId( i ); 2992 TComPic* picRef = ivPicLists->getPic( layerIdRef, getPOC() ) ; 2993 assert ( picRef != 0 ); 2994 2995 picRef->getPicYuvRec()->extendPicBorder(); 2996 picRef->setIsLongTerm( true ); 2997 picRef->getSlice(0)->setReferenced( true ); 2998 2999 // Consider to check here: 3000 // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer that is a RASL picture. " 3001 refPicSetInterLayer.push_back( picRef ); 3002 } 3003 } 3004 #endif 3005 3006 #if H_MV5 2512 3007 2513 Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ) 3008 2514 { … … 3019 2525 3020 2526 } 3021 #else3022 Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer )3023 {3024 // Mark as shortterm3025 for ( Int i = 0; i < refPicSetInterLayer.size(); i++ )3026 {3027 refPicSetInterLayer[i]->setIsLongTerm( false );3028 }3029 }3030 3031 #endif3032 2527 Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ) 3033 2528 { … … 3035 2530 if (targetDecLayerIdSet.size() == 0 ) 3036 2531 { 3037 #if H_MV53038 2532 for ( Int layerIdInVps = 0; layerIdInVps <= vps->getMaxLayersMinus1(); layerIdInVps++ ) 3039 #else3040 for ( Int layerIdInVps = 0; layerIdInVps < vps->getMaxLayers(); layerIdInVps++ )3041 #endif3042 2533 { 3043 2534 targetDecLayerIdSet.push_back( vps->getLayerIdInNuh( layerIdInVps ) ); … … 3068 2559 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) ) 3069 2560 { 3070 #if H_MV53071 2561 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ ) 3072 2562 { 3073 2563 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ], k ) ) 3074 #else3075 Int targetDecLayerIdinVPS = vpsSlice->getLayerIdInVps( targetDecLayerIdSet[ j ] );3076 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdinVPS ); k++ )3077 {3078 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdinVPS, k ) )3079 #endif3080 2564 { 3081 2565 remainingInterLayerReferencesFlag = true; … … 3093 2577 } 3094 2578 3095 #if H_MV53096 2579 Void TComSlice::printRefPicList() 3097 #else3098 Void TComSlice::xPrintRefPicList()3099 #endif3100 2580 { 3101 2581 for ( Int li = 0; li < 2; li++) … … 3110 2590 } 3111 2591 } 3112 #if !H_MV53113 Int TComSlice::xCeilLog2( Int val )3114 {3115 assert( val > 0 );3116 Int ceilLog2 = 0;3117 while( val > ( 1 << ceilLog2 ) ) ceilLog2++;3118 return ceilLog2;3119 }3120 #endif3121 2592 3122 2593 Void TComSlice::markCurrPic( TComPic* currPic ) … … 3133 2604 } 3134 2605 3135 #if H_MV53136 2606 Void TComSlice::setRefPicSetInterLayer( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1 ) 3137 2607 { … … 3158 2628 return pcPic; 3159 2629 } 3160 #else3161 Void TComSlice::setRefPicSetInterLayer( std::vector<TComPic*>* refPicSetInterLayer )3162 {3163 m_refPicSetInterLayer = refPicSetInterLayer;3164 }3165 3166 TComPic* TComSlice::getPicFromRefPicSetInterLayer( Int layerId )3167 {3168 assert( m_refPicSetInterLayer != 0 );3169 assert( (*m_refPicSetInterLayer).size() == getNumActiveRefLayerPics() );3170 TComPic* pcPic = NULL;3171 for ( Int i = 0; i < getNumActiveRefLayerPics(); i++ )3172 {3173 if ((*m_refPicSetInterLayer)[ i ]->getLayerId() == layerId)3174 {3175 pcPic = (*m_refPicSetInterLayer)[ i ];3176 }3177 }3178 assert(pcPic != NULL);3179 return pcPic;3180 }3181 #endif3182 2630 Int TComSlice::getNumActiveRefLayerPics() 3183 2631 { 3184 2632 Int numActiveRefLayerPics; 3185 2633 3186 #if H_MV53187 2634 if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerId() ) == 0 ) 3188 2635 { … … 3198 2645 } 3199 2646 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 ) 3200 #else3201 if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 0 || !getInterLayerPredEnabledFlag() )3202 {3203 numActiveRefLayerPics = 0;3204 }3205 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 1 )3206 #endif3207 2647 { 3208 2648 numActiveRefLayerPics = 1; … … 3217 2657 Int TComSlice::getRefPicLayerId( Int i ) 3218 2658 { 3219 #if H_MV53220 2659 return getVPS()->getRefLayerId( getLayerId(), getInterLayerPredLayerIdc( i ) ); 3221 #else 3222 return getVPS()->getRefLayerId( getLayerIdInVps(), getInterLayerPredLayerIdc( i ) ); 3223 #endif 3224 } 3225 3226 #if !H_MV5 3227 Void TComSlice::setActiveMotionPredRefLayers() 3228 { 3229 Int j = 0; 3230 for( Int i = 0; i < getNumActiveRefLayerPics(); i++) 3231 { 3232 if( getVPS()->getMotionPredEnabledFlag( getLayerIdInVps(), getInterLayerPredLayerIdc( i )) ) 3233 { 3234 m_activeMotionPredRefLayerId[ j++ ] = getVPS()->getRefLayerId( getLayerIdInVps(), i ); 3235 } 3236 } 3237 m_numActiveMotionPredRefLayers = j; 3238 3239 // Consider incorporating bitstream conformance tests on derived variables here. 3240 } 3241 3242 Bool TComSlice::getInterRefEnabledInRPLFlag() 3243 { 3244 Bool interRefEnabledInRPLFlag; 3245 if ( getVPS()->getNumSamplePredRefLayers( getLayerIdInVps() ) > 0 && getNumActiveRefLayerPics() > 0 ) 3246 { 3247 interRefEnabledInRPLFlag = !getInterLayerSamplePredOnlyFlag(); 3248 } 3249 else 3250 { 3251 interRefEnabledInRPLFlag = 1; 3252 } 3253 return interRefEnabledInRPLFlag; 3254 } 3255 #endif 2660 } 2661 3256 2662 #if H_3D_ARP 3257 2663 Void TComSlice::setARPStepNum() … … 3531 2937 } 3532 2938 3533 #if H_MV53534 2939 #if H_MV 3535 2940 Void TComScalingList::inferFrom( TComScalingList* srcScLi ) … … 3545 2950 } 3546 2951 } 3547 #endif3548 2952 #endif 3549 2953 /** initialization process of quantization matrix array … … 3636 3040 , m_ppsMap(MAX_NUM_PPS) 3637 3041 , m_activeVPSId(-1) 3638 #if H_MV53639 3042 #if !H_MV 3640 3043 , m_activeSPSId(-1) … … 3649 3052 } 3650 3053 #endif 3651 #else3652 , m_activeSPSId(-1)3653 , m_activePPSId(-1)3654 {3655 #endif3656 3054 } 3657 3055 … … 3663 3061 //! activate a SPS from a active parameter sets SEI message 3664 3062 //! \returns true, if activation is successful 3665 #if H_MV53666 3063 #if H_MV 3667 3064 Bool ParameterSetManager::activateSPSWithSEI(Int spsId, Int layerId ) … … 3669 3066 Bool ParameterSetManager::activateSPSWithSEI(Int spsId) 3670 3067 #endif 3671 #else3672 Bool ParameterSetManager::activateSPSWithSEI(Int spsId)3673 #endif3674 3068 { 3675 3069 TComSPS *sps = m_spsMap.getPS(spsId); … … 3680 3074 { 3681 3075 m_activeVPSId = vpsId; 3682 #if !H_MV53683 m_activeSPSId = spsId;3684 #else3685 3076 #if H_MV 3686 3077 m_activeSPSId[ layerId ] = spsId; … … 3688 3079 m_activeSPSId = spsId; 3689 3080 #endif 3690 #endif3691 3081 return true; 3692 3082 } … … 3705 3095 //! activate a PPS and depending on isIDR parameter also SPS and VPS 3706 3096 //! \returns true, if activation is successful 3707 #if H_MV53708 3097 #if H_MV 3709 3098 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIRAP, Int layerId ) … … 3742 3131 m_activeSPSId[ layerId ] = spsId; 3743 3132 #else 3744 m_activePPSId = ppsId;3745 m_activeVPSId = vpsId;3746 m_activeSPSId = spsId;3747 #endif3748 #else3749 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIRAP)3750 {3751 TComPPS *pps = m_ppsMap.getPS(ppsId);3752 if (pps)3753 {3754 Int spsId = pps->getSPSId();3755 #if H_MV3756 // active parameter sets per layer should be used here3757 #else3758 if (!isIRAP && (spsId != m_activeSPSId))3759 {3760 printf("Warning: tried to activate PPS referring to a inactive SPS at non-IRAP.");3761 return false;3762 }3763 #endif3764 TComSPS *sps = m_spsMap.getPS(spsId);3765 if (sps)3766 {3767 Int vpsId = sps->getVPSId();3768 if (!isIRAP && (vpsId != m_activeVPSId))3769 {3770 printf("Warning: tried to activate PPS referring to a inactive VPS at non-IRAP.");3771 return false;3772 }3773 if (m_vpsMap.getPS(vpsId))3774 {3775 3133 m_activePPSId = ppsId; 3776 3134 m_activeVPSId = vpsId; … … 3828 3186 //! \} 3829 3187 3830 #if H_MV53831 3188 #if H_MV 3832 3189 TComVPSVUI::TComVPSVUI() … … 3861 3218 } 3862 3219 #endif 3863 #endif -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComSlice.h
r646 r648 169 169 Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); 170 170 Bool xParseScalingList (Char* pchFile); 171 #if H_MV5172 171 #if H_MV 173 172 Void inferFrom ( TComScalingList* srcScLi ); 174 #endif175 173 #endif 176 174 … … 407 405 }; 408 406 409 #if H_MV5410 407 #if H_MV 411 408 class TComVPSVUI … … 502 499 }; 503 500 #endif 504 #endif505 501 506 502 class TComVPS … … 510 506 UInt m_uiMaxTLayers; 511 507 512 #if H_MV5513 508 #if H_MV 514 509 UInt m_uiMaxLayersMinus1; 515 #else516 UInt m_uiMaxLayers;517 #endif518 510 #else 519 511 UInt m_uiMaxLayers; … … 551 543 /// VPS EXTENSION SYNTAX ELEMENTS 552 544 Bool m_avcBaseLayerFlag; 553 #if H_MV5554 545 Int m_vpsVuiOffset; 555 #endif556 546 Bool m_splittingFlag; 557 #if H_MV5558 547 Bool m_scalabilityMaskFlag [MAX_NUM_SCALABILITY_TYPES]; 559 #else560 Bool m_scalabilityMask [MAX_NUM_SCALABILITY_TYPES];561 #endif562 548 Int m_dimensionIdLen [MAX_NUM_SCALABILITY_TYPES]; 563 549 Bool m_vpsNuhLayerIdPresentFlag; 564 550 Int m_layerIdInNuh [MAX_NUM_LAYER_IDS]; 565 551 Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 566 #if H_MV5567 552 Int m_viewIdLenMinus1; 568 553 Int m_viewIdVal [MAX_NUM_LAYERS]; 569 #endif570 554 Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 571 #if H_MV5572 555 Bool m_maxTidRefPresentFlag; 573 #endif574 556 Int m_maxTidIlRefPicPlus1 [MAX_NUM_LAYERS]; 575 #if H_MV5576 557 Bool m_allRefLayersActiveFlag; 577 #endif578 558 Int m_vpsNumberLayerSetsMinus1; 579 559 Int m_vpsNumProfileTierLevelMinus1; … … 586 566 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 587 567 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; 588 #if H_MV5589 568 Bool m_repFormatIdxPresentFlag; 590 569 Int m_vpsNumRepFormatsMinus1; 591 570 Int m_vpsRepFormatIdx [MAX_NUM_LAYERS]; 592 571 TComRepFormat* m_repFormat [MAX_NUM_LAYERS]; 593 #endif594 572 Bool m_maxOneActiveRefLayerFlag; 595 #if H_MV5596 573 Bool m_crossLayerIrapAlignedFlag; 597 #endif598 574 Int m_directDepTypeLenMinus2; 599 #if H_MV5600 575 Bool m_vpsVuiPresentFlag; 601 576 TComVPSVUI* m_vpsVUI; 602 #endif603 577 Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; 604 578 … … 616 590 Bool m_motionPredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 617 591 Int m_motionPredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 618 #if H_MV5619 592 Int m_viewIndex [MAX_NUM_LAYERS ]; 620 #else621 #if H_3D622 Int m_viewIndex [MAX_NUM_LAYERS ];623 #endif624 625 Int xCeilLog2 ( Int val );626 #endif627 593 Int xGetDimBitOffset( Int j ); 628 594 … … 681 647 Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } 682 648 683 #if H_MV5684 649 #if H_MV 685 650 UInt getMaxLayersMinus1() { return m_uiMaxLayersMinus1; }; … … 689 654 Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } 690 655 #endif 691 #else692 UInt getMaxLayers () { return m_uiMaxLayers; }693 Void setMaxLayers (UInt l) { m_uiMaxLayers = l; }694 #endif695 656 696 657 Bool getTemporalNestingFlag () { return m_bTemporalIdNestingFlag; } … … 735 696 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } 736 697 737 #if H_MV5738 698 Void setVpsVuiOffset( Int val ) { m_vpsVuiOffset = val; } 739 699 Int getVpsVuiOffset( ) { return m_vpsVuiOffset; } 740 #endif741 700 742 701 Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } 743 702 Bool getSplittingFlag() { return m_splittingFlag; } 744 703 745 #if H_MV5746 704 Void setScalabilityMaskFlag( UInt val ); 747 705 Void setScalabilityMaskFlag( Int scalType, Bool val ) { m_scalabilityMaskFlag[scalType] = val; } 748 706 Bool getScalabilityMaskFlag( Int scalType ) { return m_scalabilityMaskFlag[scalType]; } 749 #else750 Void setScalabilityMask( UInt val );751 752 Void setScalabilityMask( Int scalType, Bool val ) { m_scalabilityMask[scalType] = val; }753 Bool getScalabilityMask( Int scalType ) { return m_scalabilityMask[scalType]; }754 #endif755 707 Int getNumScalabilityTypes( ); 756 708 … … 769 721 Int getDimensionId( Int layerIdInVps, Int scalIdx ) { return m_dimensionId[layerIdInVps][scalIdx]; } 770 722 771 #if H_MV5772 723 Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; } 773 724 Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; } … … 775 726 Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } 776 727 Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } 777 #endif778 728 Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } 779 729 Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } 780 730 781 #if H_MV5782 731 Void setMaxTidRefPresentFlag( Bool flag ) { m_maxTidRefPresentFlag = flag; } 783 732 Bool getMaxTidRefPresentFlag( ) { return m_maxTidRefPresentFlag; } 784 #endif785 733 Void setMaxTidIlRefPicPlus1( Int layerIdInVps, Int val ) { m_maxTidIlRefPicPlus1[ layerIdInVps ] = val; } 786 734 Int getMaxTidIlRefPicPlus1( Int layerIdInVps ) { return m_maxTidIlRefPicPlus1[ layerIdInVps ]; } 787 #if H_MV5788 735 Void setAllRefLayersActiveFlag( Bool flag ) { m_allRefLayersActiveFlag = flag; } 789 736 Bool getAllRefLayersActiveFlag( ) { return m_allRefLayersActiveFlag; } 790 #endif791 737 Void setVpsNumberLayerSetsMinus1( Int val ) { m_vpsNumberLayerSetsMinus1 = val; } 792 738 Int getVpsNumberLayerSetsMinus1( ) { return m_vpsNumberLayerSetsMinus1; } … … 819 765 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 820 766 821 #if H_MV5822 767 Void setRepFormatIdxPresentFlag( Bool flag ) { m_repFormatIdxPresentFlag = flag; } 823 768 Bool getRepFormatIdxPresentFlag( ) { return m_repFormatIdxPresentFlag; } … … 831 776 Void setRepFormat( Int i, TComRepFormat* val ) { m_repFormat[i] = val; } 832 777 TComRepFormat* getRepFormat( Int i ) { return m_repFormat[i]; } 833 #endif834 778 Void setMaxOneActiveRefLayerFlag( Bool flag) { m_maxOneActiveRefLayerFlag = flag; } 835 779 Bool getMaxOneActiveRefLayerFlag( ) { return m_maxOneActiveRefLayerFlag; } 836 #if H_MV5837 780 Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; } 838 781 Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; } 839 #endif840 782 Void setDirectDepTypeLenMinus2( Int val) { m_directDepTypeLenMinus2 = val; } 841 783 Int getDirectDepTypeLenMinus2( ) { return m_directDepTypeLenMinus2; } … … 843 785 Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } 844 786 Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } 845 #if H_MV5846 787 Void setVpsVuiPresentFlag( Bool flag ) { m_vpsVuiPresentFlag = flag; } 847 788 Bool getVpsVuiPresentFlag( ) { return m_vpsVuiPresentFlag; } 848 789 849 790 TComVPSVUI* getVPSVUI( ) { return m_vpsVUI; } 850 #endif851 791 // VPS EXTENSION SEMANTICS VARIABLES 852 792 Void setLayerIdInVps( Int layerIdInNuh, Int val ) { m_layerIdInVps[layerIdInNuh] = val; } … … 854 794 855 795 Int getScalabilityId ( Int layerIdInVps, ScalabilityType scalType ); 856 #if H_MV5857 796 Int getViewId ( Int layerIdInNuh ) { return m_viewIdVal[ getViewIndex( getLayerIdInVps( layerIdInNuh) )]; } 858 #else859 Int getViewId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, VIEW_ID ); }860 861 #endif862 797 Void setRefLayers(); 863 798 864 #if H_MV5865 799 Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } 866 800 Int getNumViews(); … … 868 802 Int getNumDirectRefLayers( Int layerIdInNuh ) { return m_numDirectRefLayers[ layerIdInNuh ]; }; 869 803 Int getRefLayerId ( Int layerIdInNuh, Int idx );; 870 #else871 Int getNumDirectRefLayers( Int layerIdInVps ) { return m_numDirectRefLayers[ layerIdInVps ]; };872 Int getRefLayerId ( Int layerIdInVps, Int idx );;873 874 Int getNumSamplePredRefLayers( Int layerIdInVps ) { return m_numSamplePredRefLayers[layerIdInVps]; }875 Bool getSamplePredEnabledFlag ( Int layerIdInVps, Int idx ) { return m_samplePredEnabledFlag [layerIdInVps][idx]; }876 Int getSamplePredRefLayerId ( Int layerIdInVps, Int idx ) { return m_samplePredRefLayerId [layerIdInVps][idx]; }877 878 Int getNumMotionPredRefLayers( Int layerIdInVps ) { return m_numMotionPredRefLayers[layerIdInVps]; }879 Bool getMotionPredEnabledFlag ( Int layerIdInVps, Int idx ) { return m_motionPredEnabledFlag [layerIdInVps][idx]; }880 Int getMotionPredRefLayerId ( Int layerIdInVps, Int idx ) { return m_motionPredRefLayerId [layerIdInVps][idx]; }881 #endif882 804 Bool checkVPSExtensionSyntax(); 883 805 Int scalTypeToScalIdx ( ScalabilityType scalType ); 884 806 885 #if H_MV5886 807 Int getProfileLevelTierIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; 887 #else888 Int getProfileLevelTierIdxLen() { return xCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); };889 #endif890 808 891 809 Int getNumLayersInIdList ( Int lsIdx );; … … 895 813 Int inferLastDimsionIdLenMinus1(); 896 814 897 #if H_MV5898 815 // helpers 899 816 Bool getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 ); 900 #endif901 817 /// VPS EXTENSION 2 SYNTAX ELEMENTS 902 818 #if H_3D 903 #if H_MV5904 819 Int getDepthId ( Int layerIdInNuh) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPTH_ID ); } 905 #else906 Void initViewIndex();907 Int getViewIndex ( Int layerIdInVps ) { return m_viewIndex[ layerIdInVps ]; }908 Int getDepthId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, DEPTH_ID ); }909 #endif910 820 Int getLayerIdInNuh( Int viewIndex, Bool depthFlag ); 911 821 … … 960 870 Int m_winTopOffset; 961 871 Int m_winBottomOffset; 962 #if H_MV5963 872 #if H_MV 964 873 Bool m_scaledFlag; 965 #endif966 874 #endif 967 875 public: … … 972 880 , m_winTopOffset (0) 973 881 , m_winBottomOffset (0) 974 #if H_MV5975 882 #if H_MV 976 883 , m_scaledFlag(true) 977 #endif978 884 #endif 979 885 { } … … 990 896 Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } 991 897 992 #if H_MV5993 898 #if H_MV 994 899 Void setScaledFlag(Bool flag) { m_scaledFlag = flag; } … … 1005 910 } 1006 911 } 1007 #endif1008 912 #endif 1009 913 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) … … 1054 958 TComHRD m_hrdParameters; 1055 959 TimingInfo m_timingInfo; 1056 #if !H_MV51057 #if H_MV1058 Bool m_tileBoundariesAlignedFlag;1059 #endif1060 #endif1061 960 1062 961 public: … … 1091 990 ,m_log2MaxMvLengthHorizontal(15) 1092 991 ,m_log2MaxMvLengthVertical(15) 1093 #if !H_MV51094 #if H_MV1095 ,m_tileBoundariesAlignedFlag(true)1096 #endif1097 #endif1098 992 {} 1099 993 … … 1191 1085 TComHRD* getHrdParameters () { return &m_hrdParameters; } 1192 1086 TimingInfo* getTimingInfo() { return &m_timingInfo; } 1193 #if !H_MV51194 #if H_MV1195 Bool getTileBoundariesAlignedFlag( ) { return m_tileBoundariesAlignedFlag; }1196 Void setTileBoundariesAlignedFlag( Bool flag ) { m_tileBoundariesAlignedFlag = flag; }1197 #endif1198 #endif1199 1087 1200 1088 }; … … 1281 1169 TComPTL m_pcPTL; 1282 1170 #if H_MV 1283 #if H_MV51284 1171 TComVPS* m_pcVPS; 1285 1172 // SPS … … 1287 1174 Int m_spsScalingListRefLayerId; 1288 1175 Bool m_updateRepFormatFlag; 1289 #endif1290 1176 // SPS Extension 1291 1177 Bool m_interViewMvVertConstraintFlag; 1292 #if !H_MV51293 Int m_numIlpRestrictedRefLayers ;1294 Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS];1295 Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS];1296 Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS];1297 #endif1298 1178 #endif 1299 1179 #if H_3D … … 1432 1312 TComPTL* getPTL() { return &m_pcPTL; } 1433 1313 #if H_MV 1434 #if H_MV51435 1314 Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } 1436 1315 TComVPS* getVPS () { return m_pcVPS; } … … 1444 1323 Void setUpdateRepFormatFlag( Bool flag ) { m_updateRepFormatFlag = flag; } 1445 1324 Bool getUpdateRepFormatFlag( ) { return m_updateRepFormatFlag; } 1446 #endif1447 1325 // SPS Extension 1448 1326 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } 1449 1327 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} 1450 #if H_MV51451 1328 // Inference 1452 1329 Void inferRepFormat( TComVPS* vps, Int layerIdCurr ); 1453 1330 1454 1331 Void inferScalingList( TComSPS* spsSrc ); 1455 #else1456 Void setNumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers = val;}1457 Int getNumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers ;}1458 1459 Void setMinSpatialSegmentOffsetPlus1( Int i, Int val ) { m_minSpatialSegmentOffsetPlus1[ i ] = val;}1460 Int getMinSpatialSegmentOffsetPlus1( Int i ) { return m_minSpatialSegmentOffsetPlus1[ i ];}1461 1462 Void setCtuBasedOffsetEnabledFlag ( Int i, Bool flag ) { m_ctuBasedOffsetEnabledFlag [ i ] = flag;}1463 Bool getCtuBasedOffsetEnabledFlag ( Int i ) { return m_ctuBasedOffsetEnabledFlag [ i ];}1464 1465 Void setMinHorizontalCtuOffsetPlus1 ( Int i, Int val ) { m_minHorizontalCtuOffsetPlus1 [ i ] = val;}1466 Int getMinHorizontalCtuOffsetPlus1 ( Int i ) { return m_minHorizontalCtuOffsetPlus1 [ i ];}1467 1468 #endif1469 1332 #endif 1470 1333 #if H_3D_QTLPC … … 1582 1445 Int m_numExtraSliceHeaderBits; 1583 1446 1584 #if H_MV51585 1447 #if H_MV 1586 1448 Int m_layerId; 1587 1449 Bool m_ppsInferScalingListFlag; 1588 1450 Int m_ppsScalingListRefLayerId; 1589 #endif1590 1451 #endif 1591 1452 public: … … 1710 1571 Bool getSliceHeaderExtensionPresentFlag () { return m_sliceHeaderExtensionPresentFlag; } 1711 1572 Void setSliceHeaderExtensionPresentFlag (Bool val) { m_sliceHeaderExtensionPresentFlag = val; } 1712 #if H_MV51713 1573 #if H_MV 1714 1574 Void setLayerId( Int val ) { m_layerId = val; } … … 1720 1580 Void setPpsScalingListRefLayerId( Int val ) { m_ppsScalingListRefLayerId = val; } 1721 1581 Int getPpsScalingListRefLayerId( ) { return m_ppsScalingListRefLayerId; } 1722 #endif1723 1582 #endif 1724 1583 }; … … 1754 1613 Bool m_PicOutputFlag; ///< pic_output_flag 1755 1614 Int m_iPOC; 1756 #if H_MV51757 1615 #if H_MV 1758 1616 Int m_iPOCBeforeReset; 1759 #endif1760 1617 #endif 1761 1618 Int m_iLastIDR; … … 1853 1710 Bool m_enableTMVPFlag; 1854 1711 #if H_MV 1855 #if H_MV51856 1712 std::vector<TComPic*>* m_refPicSetInterLayer0; 1857 1713 std::vector<TComPic*>* m_refPicSetInterLayer1; … … 1862 1718 Bool m_isDepth; 1863 1719 #endif 1864 #else1865 std::vector<TComPic*>* m_refPicSetInterLayer;1866 Int m_layerId;1867 Int m_viewId;1868 #if H_3D1869 Int m_viewIndex;1870 Bool m_isDepth;1871 #endif1872 #endif1873 1720 1874 1721 // Additional slice header syntax elements 1875 #if H_MV51876 1722 Bool m_pocResetFlag; 1877 #endif1878 1723 Bool m_discardableFlag; 1879 1724 Bool m_interLayerPredEnabledFlag; 1880 1725 Int m_numInterLayerRefPicsMinus1; 1881 1726 Int m_interLayerPredLayerIdc [MAX_NUM_LAYERS]; 1882 #if !H_MV51883 Bool m_interLayerSamplePredOnlyFlag;1884 Bool m_altCollocatedIndicationFlag;1885 Int m_collocatedRefLayerIdx;1886 // Additional slice header semantics variables1887 Int m_numActiveMotionPredRefLayers;1888 Int m_activeMotionPredRefLayerId [ MAX_NUM_LAYER_IDS ];1889 1890 #endif1891 1727 Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; 1892 1728 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; … … 2022 1858 2023 1859 #if H_MV 2024 #if H_MV52025 1860 Void setPocBeforeReset ( Int i ) { m_iPOCBeforeReset = i; } 2026 1861 Int getPocBeforeReset ( ) { return m_iPOCBeforeReset; } 2027 #endif2028 1862 Int getRefLayerId ( RefPicList e, Int iRefIdx) { return m_aiRefLayerIdList[e][iRefIdx]; } 2029 1863 Void setRefLayerId ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefLayerIdList[e][iRefIdx] = i; } 2030 #if H_MV52031 1864 Void getTempRefPicLists ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1, 2032 1865 std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int& numPocTotalCurr, Bool checkNumPocTotalCurr = false ); 2033 1866 2034 1867 Void setRefPicList ( std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int numPocTotalCurr, Bool checkNumPocTotalCurr = false ); 2035 #else2036 Void setRefPicList ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& interLayerRefPicSet , Bool checkNumPocTotalCurr = false );2037 #endif2038 1868 #else 2039 1869 #if FIX1071 … … 2084 1914 Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); 2085 1915 #if H_MV 2086 #if !H_MV52087 Void createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer );2088 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer );2089 #else2090 1916 Void createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ); 2091 1917 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ); 2092 #endif2093 1918 static Void markCurrPic ( TComPic* currPic );; 2094 1919 static Void markIvRefPicsAsUnused ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ); 2095 #if H_MV52096 1920 Void printRefPicList(); 2097 #else2098 Void xPrintRefPicList();2099 #endif2100 1921 #endif 2101 1922 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); … … 2184 2005 Void setViewId ( Int viewId ) { m_viewId = viewId; } 2185 2006 Int getViewId () { return m_viewId; } 2186 #if H_MV52187 2007 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 2188 2008 Int getViewIndex () { return m_viewIndex; } 2189 #endif2190 2009 #if H_3D 2191 2010 #if H_3D_TMVP … … 2193 2012 Void setAlterRefIdx ( RefPicList e, Int i ) { m_aiAlterRefIdx[e] = i; } 2194 2013 Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } 2195 #endif2196 #if !H_MV52197 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; }2198 Int getViewIndex () { return m_viewIndex; }2199 2014 #endif 2200 2015 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } … … 2219 2034 // Additional slice header syntax elements 2220 2035 2221 #if H_MV52222 2036 Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; } 2223 2037 Bool getPocResetFlag( ) { return m_pocResetFlag; } 2224 #endif2225 2038 2226 2039 Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; } … … 2236 2049 Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } 2237 2050 2238 #if H_MV52239 2051 // Additional variables derived in slice header semantics 2240 2052 Int getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } … … 2250 2062 Void setRefPicSetInterLayer ( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1); 2251 2063 TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); 2252 #else2253 Void setInterLayerSamplePredOnlyFlag( Bool flag ) { m_interLayerSamplePredOnlyFlag = flag; }2254 Bool getInterLayerSamplePredOnlyFlag( ) { return m_interLayerSamplePredOnlyFlag; }2255 2256 Void setAltCollocatedIndicationFlag( Bool flag ) { m_altCollocatedIndicationFlag = flag; }2257 Bool getAltCollocatedIndicationFlag( ) { return m_altCollocatedIndicationFlag; }2258 2259 Void setCollocatedRefLayerIdx( Int val ) { m_collocatedRefLayerIdx = val; }2260 Int getCollocatedRefLayerIdx( ) { return m_collocatedRefLayerIdx; }2261 2262 // Additional variables derived in slice header semantics2263 Int getNumInterLayerRefPicsMinus1Len( ) { return xCeilLog2( getVPS()->getNumDirectRefLayers( getLayerIdInVps() )); }2264 Int getInterLayerPredLayerIdcLen ( ) { return xCeilLog2( getVPS()->getNumDirectRefLayers( getLayerIdInVps() )); }2265 2266 Int getNumActiveRefLayerPics( );2267 Int getRefPicLayerId ( Int i );2268 2269 Void setActiveMotionPredRefLayers ( );2270 2271 Int getNumActiveMotionPredRefLayers( ) { return m_numActiveMotionPredRefLayers; }2272 Int getActiveMotionPredRefLayerId ( Int i ) { return m_activeMotionPredRefLayerId[i]; }2273 2274 Bool getInterRefEnabledInRPLFlag( );2275 2276 Void setRefPicSetInterLayer ( std::vector<TComPic*>* m_refPicSetInterLayer );2277 TComPic* getPicFromRefPicSetInterLayer( Int layerId );2278 2279 #endif2280 2064 #endif 2281 2065 protected: … … 2284 2068 TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); 2285 2069 #if H_MV 2286 #if !H_MV52287 Int xCeilLog2( Int val );2288 #endif2289 2070 TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId ); 2290 2071 #endif … … 2368 2149 //! activate a SPS from a active parameter sets SEI message 2369 2150 //! \returns true, if activation is successful 2370 #if !H_MV52371 Bool activateSPSWithSEI(Int SPSId);2372 2373 //! activate a PPS and depending on isIDR parameter also SPS and VPS2374 //! \returns true, if activation is successful2375 Bool activatePPS(Int ppsId, Bool isIRAP);2376 2377 TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); };2378 TComSPS* getActiveSPS(){ return m_spsMap.getPS(m_activeSPSId); };2379 TComPPS* getActivePPS(){ return m_ppsMap.getPS(m_activePPSId); };2380 2381 protected:2382 2383 ParameterSetMap<TComVPS> m_vpsMap;2384 ParameterSetMap<TComSPS> m_spsMap;2385 ParameterSetMap<TComPPS> m_ppsMap;2386 2387 Int m_activeVPSId;2388 Int m_activeSPSId;2389 Int m_activePPSId;2390 #else2391 2151 #if H_MV 2392 2152 Bool activateSPSWithSEI(Int SPSId, Int layerId ); … … 2426 2186 #endif 2427 2187 2428 #endif2429 2188 }; 2430 2189 -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TypeDef.h
r647 r648 181 181 #define KWU_RC_MADPRED_E0227 0 ///< JCT3V-E0227, inter-view MAD prediction 182 182 183 184 /// FIXES185 #if H_MV186 #define H_MV5 1 // Update to MV-HEVC 5 HLS187 #endif188 183 ///////////////////////////////////////////////////////////////////////////////////////// 189 184 /////////////////////////////////// DERIVED DEFINES /////////////////////////////////// … … 769 764 enum ScalabilityType 770 765 { 771 #if H_MV5772 766 #if H_3D 773 767 DEPTH_ID = 0, 774 768 #endif 775 769 VIEW_ORDER_INDEX = 1, 776 #else777 VIEW_ID = 0,778 #if H_3D779 DEPTH_ID = 1,780 #endif781 #endif782 770 }; 783 771 #endif -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecCAVLC.cpp
r646 r648 330 330 } 331 331 } 332 #if H_MV5333 332 #if H_MV 334 333 if ( pcPPS->getLayerId() > 0 ) … … 344 343 { 345 344 #endif 346 #endif347 345 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); 348 346 if(pcPPS->getScalingListPresentFlag ()) … … 350 348 parseScalingList( pcPPS->getScalingList() ); 351 349 } 352 #if H_MV5 353 #if H_MV 354 } 355 #endif 350 #if H_MV 351 } 356 352 #endif 357 353 … … 430 426 { 431 427 Window &defDisp = pcVUI->getDefaultDisplayWindow(); 432 #if !H_MV5433 READ_UVLC( uiCode, "def_disp_win_left_offset" ); defDisp.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc()) );434 READ_UVLC( uiCode, "def_disp_win_right_offset" ); defDisp.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc()) );435 READ_UVLC( uiCode, "def_disp_win_top_offset" ); defDisp.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) );436 READ_UVLC( uiCode, "def_disp_win_bottom_offset" ); defDisp.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) );437 #else438 428 #if H_MV 439 429 defDisp.setScaledFlag( false ); … … 448 438 READ_UVLC( uiCode, "def_disp_win_bottom_offset" ); defDisp.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) ); 449 439 #endif 450 #endif451 440 } 452 441 TimingInfo *timingInfo = pcVUI->getTimingInfo(); … … 471 460 { 472 461 READ_FLAG( uiCode, "tiles_fixed_structure_flag"); pcVUI->setTilesFixedStructureFlag(uiCode); 473 #if !H_MV5474 #if H_MV475 if ( pcSPS->getLayerId() > 0 )476 {477 READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVUI->setTileBoundariesAlignedFlag( uiCode == 1 );478 }479 #endif480 #endif481 462 READ_FLAG( uiCode, "motion_vectors_over_pic_boundaries_flag"); pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode); 482 463 READ_FLAG( uiCode, "restricted_ref_pic_lists_flag"); pcVUI->setRestrictedRefPicListsFlag(uiCode); … … 597 578 READ_UVLC( uiCode, "sps_seq_parameter_set_id" ); pcSPS->setSPSId( uiCode ); 598 579 assert(uiCode <= 15); 599 #if H_MV5600 580 #if H_MV 601 581 if ( pcSPS->getLayerId() > 0 ) … … 606 586 if ( pcSPS->getUpdateRepFormatFlag() ) 607 587 { 608 #endif609 588 #endif 610 589 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); … … 619 598 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 620 599 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 621 #if H_MV5 622 #if H_MV 623 } 624 #endif 600 #if H_MV 601 } 625 602 #endif 626 603 READ_FLAG( uiCode, "conformance_window_flag"); … … 628 605 { 629 606 Window &conf = pcSPS->getConformanceWindow(); 630 #if H_MV5631 607 #if H_MV 632 608 // Needs to be scaled later, when ChromaFormatIdc is known. … … 642 618 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 643 619 #endif 644 #else 645 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 646 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 647 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 648 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 649 #endif 650 } 651 652 #if H_MV5 620 } 621 653 622 #if H_MV 654 623 if ( pcSPS->getUpdateRepFormatFlag() ) 655 624 { 656 #endif657 625 #endif 658 626 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); … … 665 633 pcSPS->setBitDepthC( uiCode + 8 ); 666 634 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 667 #if H_MV5 668 #if H_MV 669 } 670 #endif 635 #if H_MV 636 } 671 637 #endif 672 638 … … 692 658 pcSPS->setNumReorderPics(uiCode, i); 693 659 #if H_MV 694 #if H_MV5695 660 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]"); 696 #else697 READ_UVLC ( uiCode, "sps_max_latency_increase[i]");698 #endif699 661 #else 700 662 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1"); … … 736 698 if(pcSPS->getScalingListFlag()) 737 699 { 738 #if H_MV5739 700 #if H_MV 740 701 if ( pcSPS->getLayerId() > 0 ) … … 750 711 { 751 712 #endif 752 #endif753 713 READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" ); pcSPS->setScalingListPresentFlag ( uiCode ); 754 714 if(pcSPS->getScalingListPresentFlag ()) … … 756 716 parseScalingList( pcSPS->getScalingList() ); 757 717 } 758 #if H_MV5 759 #if H_MV 760 } 761 #endif 718 #if H_MV 719 } 762 720 #endif 763 721 } … … 814 772 if (uiCode) 815 773 { 816 #if !H_MV5817 #if !H_MV818 while ( xMoreRbspData() )819 {820 READ_FLAG( uiCode, "sps_extension_data_flag");821 }822 #else823 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);824 //// sps_extension_vui_parameters( )825 if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() )826 {827 READ_UVLC( uiCode, "num_ilp_restricted_ref_layers" ); pcSPS->setNumIlpRestrictedRefLayers( uiCode );828 for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ )829 {830 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcSPS->setMinSpatialSegmentOffsetPlus1( i, uiCode );831 if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 )832 {833 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[ i ]"); pcSPS->setCtuBasedOffsetEnabledFlag(i, uiCode == 1 );834 if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) )835 {836 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[ i ]"); pcSPS->setMinHorizontalCtuOffsetPlus1( i, uiCode );837 }838 }839 }840 }841 842 #if H_3D_QTLPC843 if( depthFlag )844 {845 READ_FLAG( uiCode, "use_qtl_flag" );846 pcSPS->setUseQTL( uiCode );847 READ_FLAG( uiCode, "use_pc_flag" );848 pcSPS->setUsePC( uiCode );849 }850 #endif851 //// sps_extension_vui_parameters( ) END852 READ_UVLC( uiCode, "sps_shvc_reserved_zero_idc" );853 READ_FLAG( uiCode, "sps_extension2_flag");854 if ( uiCode )855 {856 #if !H_3D857 while ( xMoreRbspData() )858 {859 READ_FLAG( uiCode, "sps_extension_data_flag");860 }861 #else862 863 UInt uiCamParPrecision = 0;864 Bool bCamParSlice = false;865 if ( !depthFlag )866 {867 READ_UVLC( uiCamParPrecision, "cp_precision" );868 READ_FLAG( uiCode, "cp_in_slice_header_flag" ); bCamParSlice = ( uiCode == 1 );869 if( !bCamParSlice )870 {871 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )872 {873 Int iCode;874 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode;875 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode;876 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];877 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];878 }879 }880 }881 pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );882 READ_FLAG( uiCode, "sps_extension3_flag");883 if ( uiCode )884 {885 while ( xMoreRbspData() )886 {887 READ_FLAG( uiCode, "sps_extension_data_flag");888 }889 }890 #endif // !H_3D891 }892 #endif // !H_MV893 }894 }895 #else896 774 #if H_MV 897 775 parseSPSExtension( pcSPS ); … … 918 796 } 919 797 } 920 #endif921 #if H_MV5922 798 Void TDecCavlc::parseSPSExtension( TComSPS* pcSPS ) 923 799 { … … 963 839 } 964 840 #endif 965 #endif966 841 967 842 Void TDecCavlc::parseVPS(TComVPS* pcVPS) … … 972 847 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 973 848 #if H_MV 974 #if H_MV5975 849 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayersMinus1( uiCode ); 976 #else977 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayers( uiCode + 1 );978 #endif979 850 #else 980 851 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); … … 1061 932 if (uiCode) 1062 933 { 1063 #if !H_MV51064 #if H_MV1065 m_pcBitstream->readOutTrailingBits();1066 1067 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );1068 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false );1069 1070 for( Int sIdx = 0; sIdx < MAX_NUM_SCALABILITY_TYPES; sIdx++ )1071 {1072 READ_FLAG( uiCode, "scalability_mask[i]" ); pcVPS->setScalabilityMask( sIdx, uiCode == 1 ? true : false );1073 }1074 1075 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) - ( pcVPS->getSplittingFlag() ? 1 : 0 ); sIdx++ )1076 {1077 READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" ); pcVPS->setDimensionIdLen( sIdx, uiCode + 1 );1078 }1079 1080 if ( pcVPS->getSplittingFlag() )1081 {1082 pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1, pcVPS->inferLastDimsionIdLenMinus1() );1083 }1084 1085 READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); pcVPS->setVpsNuhLayerIdPresentFlag( uiCode == 1 ? true : false );1086 1087 for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )1088 {1089 if ( pcVPS->getVpsNuhLayerIdPresentFlag() && ( i > 0 ) )1090 {1091 READ_CODE( 6, uiCode, "layer_id_in_nuh[i]" ); pcVPS->setLayerIdInNuh( i, uiCode );1092 }1093 else1094 {1095 pcVPS->setLayerIdInNuh( i, i );;1096 }1097 1098 pcVPS->setLayerIdInVps( pcVPS->getLayerIdInNuh( i ), i );1099 1100 for( Int j = 0; j < pcVPS->getNumScalabilityTypes() ; j++ )1101 {1102 if ( !pcVPS->getSplittingFlag() )1103 {1104 READ_CODE( pcVPS->getDimensionIdLen( j ), uiCode, "dimension_id[i][j]" ); pcVPS->setDimensionId( i, j, uiCode );1105 }1106 else1107 {1108 pcVPS->setDimensionId( i, j, pcVPS->inferDimensionId( i, j) );1109 }1110 }1111 }1112 1113 1114 for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )1115 {1116 for( Int j = 0; j < i; j++ )1117 {1118 READ_FLAG( uiCode, "direct_dependency_flag[i][j]" ); pcVPS->setDirectDependencyFlag( i, j, uiCode );1119 }1120 }1121 1122 for( Int i = 0; i < pcVPS->getMaxLayers() - 1; i++ )1123 {1124 READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); pcVPS->setMaxTidIlRefPicPlus1( i , uiCode );1125 }1126 1127 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); pcVPS->setVpsNumberLayerSetsMinus1 ( uiCode );1128 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode );1129 1130 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )1131 {1132 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );1133 if( !pcVPS->getVpsProfilePresentFlag( i ) )1134 {1135 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );1136 }1137 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);1138 if( !pcVPS->getVpsProfilePresentFlag( i ) )1139 {1140 TComPTL temp = *pcVPS->getPTL( i );1141 *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );1142 pcVPS->getPTL( i )->copyLevelFrom( &temp );1143 }1144 }1145 1146 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;1147 1148 READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 );1149 1150 if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )1151 {1152 READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1" ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode );1153 numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1);1154 }1155 1156 if( numOutputLayerSets > 1)1157 {1158 READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag( uiCode == 1);1159 }1160 1161 for( Int i = 1; i < numOutputLayerSets; i++ )1162 {1163 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )1164 {1165 READ_UVLC( uiCode, "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode );1166 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )1167 {1168 READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 );1169 }1170 }1171 if ( pcVPS->getProfileLevelTierIdxLen() > 0 )1172 {1173 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode );1174 }1175 }1176 1177 READ_FLAG( uiCode , "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag( uiCode == 1 );1178 READ_UVLC( uiCode, "direct_dep_type_len_minus2"); pcVPS->setDirectDepTypeLenMinus2 ( uiCode );1179 1180 for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )1181 {1182 for( Int j = 0; j < i; j++ )1183 {1184 if (pcVPS->getDirectDependencyFlag( i, j) )1185 {1186 READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2, uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode);1187 }1188 }1189 }1190 1191 READ_FLAG ( uiCode, "vps_shvc_reserved_zero_flag" );1192 1193 #if H_3D1194 READ_FLAG( uiCode, "vps_extension2_flag" );1195 if (uiCode)1196 {1197 m_pcBitstream->readOutTrailingBits();1198 1199 for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )1200 {1201 1202 #if H_3D_ARP1203 pcVPS->setUseAdvRP ( i, 0 );1204 pcVPS->setARPStepNum( i, 1 );1205 #endif1206 if ( i != 0 )1207 {1208 if( !( pcVPS->getDepthId( i ) == 1 ) )1209 {1210 #if H_3D_IV_MERGE1211 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false );1212 #endif1213 #if H_3D_ARP1214 READ_FLAG( uiCode, "iv_res_pred_flag[i]" ); pcVPS->setUseAdvRP ( i, uiCode ); pcVPS->setARPStepNum( i, uiCode ? H_3D_ARP_WFNR : 1 );1215 1216 #endif1217 #if H_3D_NBDV_REF1218 READ_FLAG( uiCode, "depth_refinement_flag[i]"); pcVPS->setDepthRefinementFlag ( i, uiCode == 1 ? true : false );1219 #endif1220 #if H_3D_VSP1221 READ_FLAG( uiCode, "view_synthesis_pred_flag[i]"); pcVPS->setViewSynthesisPredFlag( i, uiCode == 1 ? true : false );1222 #endif1223 }1224 else1225 {1226 1227 READ_FLAG( uiCode, "vps_depth_modes_flag[i]" ); pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false );1228 // READ_FLAG( uiCode, "lim_qt_pred_flag[i]"); pcVPS->setLimQtPreFlag ( i, uiCode == 1 ? true : false );1229 #if H_3D_DIM_DLT1230 if( pcVPS->getVpsDepthModesFlag( i ) )1231 {1232 READ_FLAG( uiCode, "dlt_flag[i]" ); pcVPS->setUseDLTFlag( i, uiCode == 1 ? true : false );1233 }1234 if( pcVPS->getUseDLTFlag( i ) )1235 {1236 // decode mapping1237 UInt uiNumDepthValues;1238 // parse number of values in DLT1239 READ_UVLC(uiNumDepthValues, "num_depth_values_in_dlt[i]");1240 1241 // parse actual DLT values1242 Int* aiIdx2DepthValue = (Int*) calloc(uiNumDepthValues, sizeof(Int));1243 for(Int d=0; d<uiNumDepthValues; d++)1244 {1245 READ_UVLC(uiCode, "dlt_depth_value[i][d]");1246 aiIdx2DepthValue[d] = (Int)uiCode;1247 }1248 1249 pcVPS->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);1250 1251 // clean memory1252 free(aiIdx2DepthValue);1253 }1254 #endif1255 #if H_3D_INTER_SDC1256 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false );1257 #endif1258 }1259 }1260 }1261 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );1262 }1263 #endif1264 pcVPS->checkVPSExtensionSyntax();1265 1266 pcVPS->setRefLayers();1267 1268 #else1269 while ( xMoreRbspData() )1270 {1271 READ_FLAG( uiCode, "vps_extension_data_flag");1272 }1273 #endif1274 }1275 1276 #if H_3D1277 pcVPS->initViewIndex();1278 #endif1279 return;1280 }1281 #else1282 934 #if H_MV 1283 935 m_pcBitstream->readOutTrailingBits(); … … 1306 958 } 1307 959 } 1308 #endif 1309 1310 #if H_MV5 960 1311 961 #if H_MV 1312 962 Void TDecCavlc::parseVPSExtension( TComVPS* pcVPS ) … … 1649 1299 } 1650 1300 #endif 1651 #endif1652 1301 1653 1302 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) … … 1680 1329 #if H_MV 1681 1330 vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId()); 1682 #if H_MV51683 1331 assert( vps != NULL ); 1684 1332 … … 1692 1340 rpcSlice->setIsDepth ( vps->getDepthId ( rpcSlice->getLayerId() ) == 1 ); 1693 1341 #endif 1694 #else1695 assert(vps!=0);1696 rpcSlice->setVPS(vps);1697 rpcSlice->setViewId ( vps->getViewId ( rpcSlice->getLayerIdInVps() ) );1698 #if H_3D1699 rpcSlice->setViewIndex( vps->getViewIndex( rpcSlice->getLayerIdInVps() ) );1700 rpcSlice->setIsDepth ( vps->getDepthId ( rpcSlice->getLayerIdInVps() ) == 1 );1701 #endif1702 #endif1703 1342 #endif 1704 1343 rpcSlice->setSPS(sps); … … 1747 1386 { 1748 1387 #if H_MV 1749 #if H_MV51750 1388 Int esb = 0; //Don't use i, otherwise will shadow something below 1751 1389 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) … … 1762 1400 1763 1401 for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) 1764 #else1765 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 )1766 {1767 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );1768 }1769 1770 for (Int i = 1; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)1771 #endif1772 1402 #else 1773 1403 for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) … … 1833 1463 } 1834 1464 rpcSlice->setPOC (iPOCmsb+iPOClsb); 1835 #if H_MV51836 1465 #if H_MV 1837 1466 if ( rpcSlice->getPocResetFlag() ) … … 1841 1470 1842 1471 } 1843 #endif1844 1472 #endif 1845 1473 TComReferencePictureSet* rps; … … 1970 1598 } 1971 1599 #if H_MV 1972 #if H_MV51973 1600 Int layerId = rpcSlice->getLayerId(); 1974 1601 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) { … … 1989 1616 } 1990 1617 } 1991 #else1992 Int layerIdInVps = rpcSlice->getLayerIdInVps();1993 if( rpcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 )1994 {1995 READ_FLAG( uiCode, "inter_layer_pred_enabled_flag" ); rpcSlice->setInterLayerPredEnabledFlag( uiCode == 1 );1996 if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerIdInVps ) > 1 )1997 {1998 if( !vps->getMaxOneActiveRefLayerFlag())1999 {2000 READ_CODE( rpcSlice->getNumInterLayerRefPicsMinus1Len( ), uiCode, "num_inter_layer_ref_pics_minus1" ); rpcSlice->setNumInterLayerRefPicsMinus1( uiCode );2001 }2002 for( Int i = 0; i < rpcSlice->getNumActiveRefLayerPics(); i++ )2003 {2004 READ_CODE( rpcSlice->getInterLayerPredLayerIdcLen( ), uiCode, "inter_layer_pred_layer_idc" ); rpcSlice->setInterLayerPredLayerIdc( i, uiCode );2005 }2006 }2007 }2008 2009 rpcSlice->setActiveMotionPredRefLayers( );2010 2011 if( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0 && rpcSlice->getNumActiveRefLayerPics() > 0 )2012 {2013 READ_FLAG( uiCode, "inter_layer_sample_pred_only_flag" ); rpcSlice->setInterLayerSamplePredOnlyFlag( uiCode == 1 );2014 }2015 #endif2016 1618 #endif 2017 1619 if(sps->getUseSAO()) … … 2155 1757 if ( rpcSlice->getEnableTMVPFlag() ) 2156 1758 { 2157 #if !H_MV52158 #if H_MV2159 if( rpcSlice->getLayerId() > 0 && rpcSlice->getNumActiveMotionPredRefLayers() > 0 )2160 {2161 READ_FLAG( uiCode, "alt_collocated_indication_flag" ); rpcSlice->setAltCollocatedIndicationFlag( uiCode == 1 );2162 }2163 2164 if( rpcSlice->getAltCollocatedIndicationFlag() && rpcSlice->getNumActiveMotionPredRefLayers() > 1 )2165 {2166 READ_UVLC( uiCode, "collocated_ref_layer_idx" ); rpcSlice->setCollocatedRefLayerIdx( uiCode );2167 }2168 else2169 {2170 #endif2171 #endif2172 1759 if ( rpcSlice->getSliceType() == B_SLICE ) 2173 1760 { … … 2191 1778 rpcSlice->setColRefIdx(0); 2192 1779 } 2193 #if !H_MV52194 #if H_MV2195 }2196 #endif2197 #endif2198 1780 } 2199 1781 if ( (pps->getUseWP() && rpcSlice->getSliceType()==P_SLICE) || (pps->getWPBiPred() && rpcSlice->getSliceType()==B_SLICE) ) -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecCAVLC.h
r646 r648 76 76 Void parseQtRootCbf ( UInt uiAbsPartIdx, UInt& uiQtRootCbf ); 77 77 Void parseVPS ( TComVPS* pcVPS ); 78 #if H_MV579 78 #if H_MV 80 79 Void parseVPSExtension ( TComVPS* pcVPS ); … … 86 85 Void parseSPSExtension ( TComSPS* pcSPS ); 87 86 #endif 88 #endif89 87 #if H_3D 90 #if H_MV591 88 Void parseVPSExtension2 ( TComVPS* pcVPS ); 92 89 Void parseSPSExtension2 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 93 #endif94 90 Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 95 91 #else -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecTop.cpp
r647 r648 436 436 Window defaultDisplayWindow = pcSlice->getSPS()->getVuiParametersPresentFlag() ? pcSlice->getSPS()->getVuiParameters()->getDefaultDisplayWindow() : Window(); 437 437 438 #if H_MV5439 438 #if H_MV 440 439 assert( conformanceWindow .getScaledFlag() ); 441 440 assert( defaultDisplayWindow.getScaledFlag() ); 442 #endif443 441 #endif 444 442 for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++) … … 518 516 m_cCuDecoder.destroy(); 519 517 #if H_MV 520 #if H_MV5521 518 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 522 #else523 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer );524 #endif525 519 TComSlice::markCurrPic( pcPic ); 526 520 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc ); … … 591 585 assert (sps != 0); 592 586 593 #if H_MV5594 587 #if H_MV 595 588 TComVPS* vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); … … 599 592 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) 600 593 #endif 601 #else602 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))603 #endif604 594 { 605 595 printf ("Parameter set activation failed!"); … … 627 617 m_apcSlicePilot->setSPS(sps); 628 618 #if H_MV 629 #if H_MV5630 619 m_apcSlicePilot->setVPS(vps); 631 620 sps->inferRepFormat ( vps , m_layerId ); 632 621 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 633 #else634 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() );635 #endif636 622 #endif 637 623 pps->setSPS(sps); … … 695 681 696 682 #if H_MV 697 #if H_MV5698 683 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 699 #else700 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer );701 #endif702 684 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 703 685 #endif … … 706 688 #if H_MV 707 689 TComVPS* vps = m_apcSlicePilot->getVPS(); 708 #if H_MV5709 690 Int layerId = nalu.m_layerId; 710 691 setViewId ( vps->getViewId ( layerId ) ); … … 714 695 m_ivPicLists->setVPS( vps ); 715 696 #endif 716 #else717 Int layerIdInVps = vps->getLayerIdInVps( nalu.m_layerId );718 setViewId ( vps->getViewId ( layerIdInVps ) );719 #if H_3D720 setViewIndex( vps->getViewIndex( layerIdInVps ) );721 setIsDepth ( vps->getDepthId ( layerIdInVps ) == 1 );722 m_ivPicLists->setVPS( vps );723 #endif724 #endif725 697 #endif 726 698 // Skip pictures due to random access … … 763 735 #endif 764 736 // actual decoding starts here 765 #if H_MV5766 737 #if H_MV 767 738 // This part needs further testing ! … … 771 742 } 772 743 #endif 773 #endif774 744 xActivateParameterSets(); 775 745 … … 791 761 m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS()); 792 762 #if H_MV 793 #if H_MV5794 763 m_apcSlicePilot->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 795 #else796 m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );797 #endif798 764 #endif 799 765 // Get a new picture buffer … … 941 907 // Set reference list 942 908 #if H_MV 943 #if H_MV5944 909 std::vector< TComPic* > tempRefPicLists[2]; 945 910 std::vector< Bool > usedAsLongTerm [2]; … … 948 913 pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr); 949 914 pcSlice->setRefPicList ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 950 #else951 pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true );952 #endif953 915 #if H_3D_ARP 954 916 pcSlice->setARPStepNum(); … … 1088 1050 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1089 1051 assert( vps != 0 ); 1090 #if H_MV51091 1052 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) ); 1092 1053 #else 1093 Int layerIdInVPS = vps->getLayerIdInVps( m_layerId );1094 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( layerIdInVPS ), ( vps->getDepthId( layerIdInVPS ) == 1 ) );1095 #endif1096 #else1097 1054 m_cEntropyDecoder.decodeSPS( sps ); 1098 1055 #endif … … 1103 1060 { 1104 1061 TComPPS* pps = new TComPPS(); 1105 #if H_MV51106 1062 #if H_MV 1107 1063 pps->setLayerId( getLayerId() ); 1108 #endif1109 1064 #endif 1110 1065 m_cEntropyDecoder.decodePPS( pps ); … … 1116 1071 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 1117 1072 { 1118 #if H_MV51119 1073 #if H_MV 1120 1074 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) ); … … 1122 1076 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1123 1077 #endif 1124 #else1125 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );1126 #endif1127 1078 } 1128 1079 else 1129 1080 { 1130 #if H_MV51131 1081 #if H_MV 1132 1082 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) ); … … 1134 1084 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1135 1085 #endif 1136 #else1137 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );1138 #endif1139 1086 SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS); 1140 1087 if (activeParamSets.size()>0) … … 1143 1090 m_parameterSetManagerDecoder.applyPrefetchedPS(); 1144 1091 assert(seiAps->activeSeqParamSetId.size()>0); 1145 #if H_MV51146 1092 #if H_MV 1147 1093 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0], m_layerId )) 1148 #else1149 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] ))1150 #endif1151 1094 #else 1152 1095 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] )) … … 1310 1253 } 1311 1254 1312 #if H_MV51313 1255 Void TDecTop::xResetPocInPicBuffer() 1314 1256 { … … 1328 1270 } 1329 1271 #endif 1330 #endif1331 1272 //! \} -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecTop.h
r622 r648 216 216 Int m_viewId; 217 217 TComPicLists* m_ivPicLists; 218 #if H_MV5219 218 std::vector<TComPic*> m_refPicSetInterLayer0; 220 219 std::vector<TComPic*> m_refPicSetInterLayer1; 221 #else222 std::vector<TComPic*> m_refPicSetInterLayer;223 #endif224 220 #if H_3D 225 221 Int m_viewIndex; … … 279 275 TComPic* xGetPic( Int layerId, Int poc ); 280 276 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag ); 281 #if H_MV5282 277 Void xResetPocInPicBuffer(); 283 #endif284 278 #else 285 279 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay); -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCavlc.cpp
r646 r648 229 229 } 230 230 } 231 #if H_MV5232 231 #if H_MV 233 232 if ( pcPPS->getLayerId() > 0 ) … … 243 242 { 244 243 #endif 245 #endif246 244 WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0, "pps_scaling_list_data_present_flag" ); 247 245 if( pcPPS->getScalingListPresentFlag() ) … … 252 250 codeScalingList( m_pcSlice->getScalingList() ); 253 251 } 254 #if H_MV5255 252 #if H_MV 256 253 } 257 #endif258 254 #endif 259 255 WRITE_FLAG( pcPPS->getListsModificationPresentFlag(), "lists_modification_present_flag"); … … 339 335 { 340 336 WRITE_FLAG(pcVUI->getTilesFixedStructureFlag(), "tiles_fixed_structure_flag"); 341 #if !H_MV5342 #if H_MV343 if ( pcSPS->getLayerId() > 0 )344 {345 WRITE_FLAG( pcVUI->getTileBoundariesAlignedFlag( ) ? 1 : 0 , "tile_boundaries_aligned_flag" );346 }347 #endif348 #endif349 337 WRITE_FLAG(pcVUI->getMotionVectorsOverPicBoundariesFlag(), "motion_vectors_over_pic_boundaries_flag"); 350 338 WRITE_FLAG(pcVUI->getRestrictedRefPicListsFlag(), "restricted_ref_pic_lists_flag"); … … 451 439 #endif 452 440 WRITE_UVLC( pcSPS->getSPSId (), "sps_seq_parameter_set_id" ); 453 #if H_MV5454 441 #if H_MV 455 442 if ( pcSPS->getLayerId() > 0 ) … … 460 447 if ( pcSPS->getUpdateRepFormatFlag() ) 461 448 { 462 #endif463 449 #endif 464 450 WRITE_UVLC( pcSPS->getChromaFormatIdc (), "chroma_format_idc" ); … … 472 458 WRITE_UVLC( pcSPS->getPicWidthInLumaSamples (), "pic_width_in_luma_samples" ); 473 459 WRITE_UVLC( pcSPS->getPicHeightInLumaSamples(), "pic_height_in_luma_samples" ); 474 #if H_MV5475 460 #if H_MV 476 461 } 477 #endif478 462 #endif 479 463 Window conf = pcSPS->getConformanceWindow(); … … 487 471 WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" ); 488 472 } 489 #if H_MV5490 473 #if H_MV 491 474 if ( pcSPS->getUpdateRepFormatFlag() ) 492 475 { 493 476 #endif 494 #endif495 477 WRITE_UVLC( pcSPS->getBitDepthY() - 8, "bit_depth_luma_minus8" ); 496 478 WRITE_UVLC( pcSPS->getBitDepthC() - 8, "bit_depth_chroma_minus8" ); 497 #if H_MV5498 479 #if H_MV 499 480 } 500 #endif501 481 #endif 502 482 WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" ); … … 525 505 if(pcSPS->getScalingListFlag()) 526 506 { 527 #if H_MV5528 507 #if H_MV 529 508 if ( pcSPS->getLayerId() > 0 ) … … 539 518 { 540 519 #endif 541 #endif542 520 WRITE_FLAG( pcSPS->getScalingListPresentFlag() ? 1 : 0, "sps_scaling_list_data_present_flag" ); 543 521 if(pcSPS->getScalingListPresentFlag()) … … 548 526 codeScalingList( m_pcSlice->getScalingList() ); 549 527 } 550 #if H_MV5551 528 #if H_MV 552 529 } 553 #endif554 530 #endif 555 531 } … … 598 574 } 599 575 600 #if !H_MV5601 #if H_MV602 WRITE_FLAG( 1, "sps_extension_flag" );603 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" );604 //// sps_extension_vui_parameters( )605 if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() )606 {607 WRITE_UVLC( pcSPS->getNumIlpRestrictedRefLayers( ), "num_ilp_restricted_ref_layers" );608 for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ )609 {610 WRITE_UVLC( pcSPS->getMinSpatialSegmentOffsetPlus1( i ), "min_spatial_segment_offset_plus1" );611 if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 )612 {613 WRITE_FLAG( pcSPS->getCtuBasedOffsetEnabledFlag( i ), "ctu_based_offset_enabled_flag[ i ]");614 if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) )615 {616 WRITE_UVLC( pcSPS->getMinHorizontalCtuOffsetPlus1( i ), "min_horizontal_ctu_offset_plus1[ i ]");617 }618 }619 }620 }621 #if H_3D_QTLPC622 if( depthFlag )623 {624 WRITE_FLAG( pcSPS->getUseQTL() ? 1 : 0, "use_qtl_flag");625 WRITE_FLAG( pcSPS->getUsePC() ? 1 : 0, "use_pc_flag");626 }627 #endif628 //// sps_extension_vui_parameters( ) END629 WRITE_UVLC( 0, "sps_shvc_reserved_zero_idc" );630 #if !H_3D631 WRITE_FLAG( 0, "sps_extension2_flag" );632 #else633 WRITE_FLAG( 1, "sps_extension2_flag" );634 if (!depthFlag )635 {636 WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" );637 WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" );638 if( !pcSPS->hasCamParInSliceHeader() )639 {640 for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ )641 {642 WRITE_SVLC( pcSPS->getCodedScale ()[ uiIndex ], "cp_scale" );643 WRITE_SVLC( pcSPS->getCodedOffset ()[ uiIndex ], "cp_off" );644 WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" );645 WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" );646 }647 }648 }649 650 WRITE_FLAG( 0, "sps_extension3_flag" );651 #endif652 #else653 WRITE_FLAG( 0, "sps_extension_flag" );654 #endif655 }656 #else657 576 #if !H_MV 658 577 WRITE_FLAG( 0, "sps_extension_flag" ); … … 706 625 } 707 626 #endif 708 #endif709 627 710 628 Void TEncCavlc::codeVPS( TComVPS* pcVPS ) … … 713 631 WRITE_CODE( 3, 2, "vps_reserved_three_2bits" ); 714 632 #if H_MV 715 #if H_MV5716 633 WRITE_CODE( pcVPS->getMaxLayersMinus1(), 6, "vps_max_layers_minus1" ); 717 #else718 WRITE_CODE( pcVPS->getMaxLayers() - 1, 6, "vps_max_layers_minus1" );719 #endif720 634 #else 721 635 WRITE_CODE( 0, 6, "vps_reserved_zero_6bits" ); … … 800 714 } 801 715 } 802 #if !H_MV5803 #if H_MV804 WRITE_FLAG( 1, "vps_extension_flag" );805 806 m_pcBitIf->writeAlignOne();807 808 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" );809 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" );810 811 for( Int type = 0; type < MAX_NUM_SCALABILITY_TYPES; type++ )812 {813 WRITE_FLAG( pcVPS->getScalabilityMask( type ) ? 1 : 0, "scalability_mask[i]" );814 }815 816 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) - ( pcVPS->getSplittingFlag() ? 1 : 0 ); sIdx++ )817 {818 WRITE_CODE( pcVPS->getDimensionIdLen( sIdx ) - 1 , 3, "dimension_id_len_minus1[j]");819 }820 821 if ( pcVPS->getSplittingFlag() )822 { // Ignore old dimension id length823 pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1 ,pcVPS->inferLastDimsionIdLenMinus1() + 1 );824 }825 826 827 WRITE_FLAG( pcVPS->getVpsNuhLayerIdPresentFlag() ? 1 : 0, "vps_nuh_layer_id_present_flag");828 829 for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )830 {831 if ( pcVPS->getVpsNuhLayerIdPresentFlag() && ( i > 0 ) )832 {833 WRITE_CODE( pcVPS->getLayerIdInNuh( i ), 6, "layer_id_in_nuh[i]");834 }835 else836 {837 assert( pcVPS->getLayerIdInNuh( i ) == i );838 }839 840 assert( pcVPS->getLayerIdInVps( pcVPS->getLayerIdInNuh( i ) ) == i );841 842 for( Int j = 0; j < pcVPS->getNumScalabilityTypes() ; j++ )843 {844 if ( !pcVPS->getSplittingFlag() )845 {846 WRITE_CODE( pcVPS->getDimensionId( i, j ), pcVPS->getDimensionIdLen( j ), "dimension_id[i][j]");847 }848 else849 {850 assert( pcVPS->getDimensionId( i, j ) == pcVPS->inferDimensionId( i, j ) );851 }852 }853 }854 855 for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )856 {857 for( Int j = 0; j < i; j++ )858 {859 WRITE_FLAG( pcVPS->getDirectDependencyFlag( i, j ), "direct_dependency_flag[i][j]" );860 }861 }862 863 for( Int i = 0; i < pcVPS->getMaxLayers() - 1; i++ )864 {865 WRITE_CODE( pcVPS->getMaxTidIlRefPicPlus1( i ), 3, "max_tid_il_ref_pics_plus1[i]" );866 }867 868 WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( ) , 10, "vps_number_layer_sets_minus1" );869 WRITE_CODE( pcVPS->getVpsNumProfileTierLevelMinus1( ), 6, "vps_num_profile_tier_level_minus1" );870 871 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )872 {873 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" );874 if( !pcVPS->getVpsProfilePresentFlag( i ) )875 {876 WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" );877 }878 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 );879 }880 881 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;882 883 WRITE_FLAG( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" );884 885 if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )886 {887 WRITE_CODE( pcVPS->getNumAddOutputLayerSetsMinus1( ) , 10, "num_add_output_layer_sets_minus1" );888 numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1 );889 }890 891 if( numOutputLayerSets > 1)892 {893 WRITE_FLAG( pcVPS->getDefaultOneTargetOutputLayerFlag( ) ? 1 : 0, "default_one_target_output_layer_flag" );894 }895 896 for( Int i = 1; i < numOutputLayerSets; i++ )897 {898 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )899 {900 WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ), "output_layer_set_idx_minus1[i]" );901 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ )902 {903 WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" );904 }905 }906 if ( pcVPS->getProfileLevelTierIdxLen() > 0 )907 {908 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" );909 }910 }911 912 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" );913 WRITE_UVLC( pcVPS->getDirectDepTypeLenMinus2 ( ), "direct_dep_type_len_minus2");914 915 for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )916 {917 for( Int j = 0; j < i; j++ )918 {919 if (pcVPS->getDirectDependencyFlag( i, j) )920 {921 assert ( pcVPS->getDirectDependencyType( i, j ) != -1 );922 WRITE_CODE( pcVPS->getDirectDependencyType( i, j ),pcVPS->getDirectDepTypeLenMinus2( ) + 2, "direct_dependency_type[i][j]" );923 }924 }925 }926 927 WRITE_FLAG ( 0, "vps_shvc_reserved_zero_flag" );928 929 #if H_3D930 WRITE_FLAG( 1, "vps_extension2_flag" );931 m_pcBitIf->writeAlignOne();932 for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )933 {934 if (i!= 0)935 {936 if ( !( pcVPS->getDepthId( i ) == 1 ) )937 {938 #if H_3D_IV_MERGE939 WRITE_FLAG( pcVPS->getIvMvPredFlag ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");940 #endif941 #if H_3D_ARP942 WRITE_FLAG( pcVPS->getUseAdvRP ( i ) ? 1 : 0, "iv_res_pred_flag[i]" );943 #endif944 #if H_3D_NBDV_REF945 WRITE_FLAG( pcVPS->getDepthRefinementFlag ( i ) ? 1 : 0 , "depth_refinement_flag[i]");946 #endif947 #if H_3D_VSP948 WRITE_FLAG( pcVPS->getViewSynthesisPredFlag( i ) ? 1 : 0 , "view_synthesis_pred_flag[i]");949 #endif950 }951 else952 {953 WRITE_FLAG( pcVPS->getVpsDepthModesFlag( i ) ? 1 : 0 , "vps_depth_modes_flag[i]" );954 //WRITE_FLAG( pcVPS->getLimQtPredFlag ( i ) ? 1 : 0 , "lim_qt_pred_flag[i]" );955 #if H_3D_DIM_DLT956 if( pcVPS->getVpsDepthModesFlag( i ) )957 {958 WRITE_FLAG( pcVPS->getUseDLTFlag( i ) ? 1 : 0, "dlt_flag[i]" );959 }960 if( pcVPS->getUseDLTFlag( i ) )961 {962 // code mapping963 WRITE_UVLC(pcVPS->getNumDepthValues(i), "num_depth_values_in_dlt[i]");964 for(Int d=0; d<pcVPS->getNumDepthValues(i); d++)965 {966 WRITE_UVLC( pcVPS->idx2DepthValue(i, d), "dlt_depth_value[i][d]" );967 }968 }969 #endif970 #if H_3D_INTER_SDC971 WRITE_FLAG( pcVPS->getInterSDCFlag( i ) ? 1 : 0, "depth_inter_SDC_flag" );972 #endif973 }974 }975 }976 WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 , "iv_mv_scaling_flag" );977 #else978 WRITE_FLAG( 0, "vps_extension2_flag" );979 #endif980 #else981 WRITE_FLAG( 0, "vps_extension_flag" );982 #endif983 984 //future extensions here..985 986 return;987 }988 #else989 716 #if H_MV 990 717 WRITE_FLAG( 1, "vps_extension_flag" ); … … 1005 732 } 1006 733 1007 #endif 1008 1009 1010 #if H_MV5 734 735 1011 736 #if H_MV 1012 737 Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS ) … … 1320 1045 } 1321 1046 #endif 1322 #endif1323 1047 1324 1048 Void TEncCavlc::codeSliceHeader ( TComSlice* pcSlice ) … … 1370 1094 { 1371 1095 #if H_MV 1372 #if H_MV51373 1096 Int esb = 0; //Don't use i, otherwise will shadow something below 1374 1097 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) … … 1385 1108 1386 1109 for (; esb < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) 1387 #else1388 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 )1389 {1390 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" );1391 }1392 1393 for (Int i = 1; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)1394 #endif1395 1110 #else 1396 1111 for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) … … 1530 1245 } 1531 1246 #if H_MV 1532 #if H_MV51533 1247 Int layerId = pcSlice->getLayerId(); 1534 1248 if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) … … 1550 1264 } 1551 1265 } 1552 #else1553 Int layerIdInVps = pcSlice->getLayerIdInVps();1554 if( pcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 )1555 {1556 WRITE_FLAG( pcSlice->getInterLayerPredEnabledFlag( ) ? 1 : 0 , "inter_layer_pred_enabled_flag" );1557 if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerIdInVps ) > 1 )1558 {1559 if( !vps->getMaxOneActiveRefLayerFlag())1560 {1561 WRITE_CODE( pcSlice->getNumInterLayerRefPicsMinus1( ), pcSlice->getNumInterLayerRefPicsMinus1Len( ), "num_inter_layer_ref_pics_minus1" );1562 }1563 for( Int i = 0; i < pcSlice->getNumActiveRefLayerPics(); i++ )1564 {1565 WRITE_CODE( pcSlice->getInterLayerPredLayerIdc( i ), pcSlice->getInterLayerPredLayerIdcLen( ), "inter_layer_pred_layer_idc" );1566 }1567 }1568 }1569 1570 if( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0 && pcSlice->getNumActiveRefLayerPics() > 0 )1571 {1572 WRITE_FLAG( pcSlice->getInterLayerSamplePredOnlyFlag( ) ? 1 : 0 , "inter_layer_sample_pred_only_flag" );1573 }1574 1575 #endif1576 1266 #endif 1577 1267 if(pcSlice->getSPS()->getUseSAO()) … … 1678 1368 if ( pcSlice->getEnableTMVPFlag() ) 1679 1369 { 1680 #if !H_MV51681 #if H_MV1682 if( pcSlice->getLayerId() > 0 && pcSlice->getNumActiveMotionPredRefLayers() > 0 )1683 {1684 WRITE_FLAG( pcSlice->getAltCollocatedIndicationFlag( ) ? 1 : 0 , "alt_collocated_indication_flag" );1685 }1686 if( pcSlice->getAltCollocatedIndicationFlag() && pcSlice->getNumActiveMotionPredRefLayers() > 1 )1687 {1688 WRITE_UVLC( pcSlice->getCollocatedRefLayerIdx( ), "collocated_ref_layer_idx" );1689 }1690 else1691 {1692 #endif1693 #endif1694 1370 if ( pcSlice->getSliceType() == B_SLICE ) 1695 1371 { … … 1704 1380 } 1705 1381 } 1706 #if !H_MV51707 #if H_MV1708 }1709 #endif1710 #endif1711 1382 if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) ) 1712 1383 { -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCavlc.h
r646 r648 84 84 UInt getCoeffCost () { return m_uiCoeffCost; } 85 85 Void codeVPS ( TComVPS* pcVPS ); 86 #if H_MV587 86 #if H_MV 88 87 Void codeVPSExtension ( TComVPS *pcVPS ); … … 90 89 Void codeVPSVUI ( TComVPS* pcVPS ); 91 90 #endif 92 #endif93 91 Void codeVUI ( TComVUI *pcVUI, TComSPS* pcSPS ); 94 #if H_MV595 92 #if H_MV 96 93 Void codeSPSExtension ( TComSPS* pcSPS ); 97 94 #endif 98 #endif99 95 #if H_3D 100 #if H_MV5101 96 Void codeVPSExtension2 ( TComVPS* pcVPS ); 102 97 Void codeSPSExtension2 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 103 #endif104 98 Void codeSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 105 99 #else -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncCfg.h
r646 r648 77 77 Int m_interLayerPredLayerIdc [MAX_NUM_REF_PICS]; 78 78 Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; 79 #if !H_MV580 Int m_collocatedRefLayerIdx;81 #endif82 79 #endif 83 80 GOPEntry() … … 97 94 #if H_MV 98 95 , m_numActiveRefLayerPics(0) 99 #if !H_MV5100 , m_collocatedRefLayerIdx(-1)101 #endif102 96 #endif 103 97 { … … 375 369 Int m_layerIdInVps; 376 370 Int m_viewId; 377 #if H_MV5378 371 Int m_viewIndex; 379 #endif380 372 #endif 381 373 382 374 #if H_3D 383 #if !H_MV5384 Int m_viewIndex;385 #endif386 375 Bool m_isDepth; 387 376 … … 440 429 , m_layerIdInVps(-1) 441 430 , m_viewId(-1) 442 #if H_MV5443 431 , m_viewIndex(-1) 444 #endif445 432 #if H_3D 446 #if !H_MV5447 , m_viewIndex(-1)448 #endif449 433 , m_isDepth(false) 450 434 , m_bUseVSO(false) … … 479 463 Void setViewId ( Int viewId ) { m_viewId = viewId; } 480 464 Int getViewId () { return m_viewId; } 481 #if H_MV5482 465 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 483 466 Int getViewIndex () { return m_viewIndex; } 484 #endif485 467 #if H_3D 486 #if !H_MV5487 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; }488 Int getViewIndex () { return m_viewIndex; }489 #endif490 468 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 491 469 Bool getIsDepth () { return m_isDepth; } -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncGOP.cpp
r647 r648 476 476 477 477 478 #if H_MV5479 478 #if H_MV 480 479 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS(), getLayerId() ); 481 480 #else 482 481 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() ); 483 #endif484 #else485 #if H_3D486 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS(), getLayerId() );487 #else488 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );489 #endif490 482 #endif 491 483 pcSlice->setLastIDR(m_iLastIDR); 492 484 pcSlice->setSliceIdx(0); 493 485 #if H_MV 494 #if H_MV5495 486 pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 496 #else497 pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer );498 #endif499 487 pcPic ->setLayerId ( getLayerId() ); 500 488 pcPic ->setViewId ( getViewId() ); … … 659 647 refPicListModification->setRefPicListModificationFlagL1(0); 660 648 #if H_MV 661 #if H_MV5662 649 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 1 ) 663 650 { … … 703 690 xSetRefPicListModificationsMv( tempRefPicLists, pcSlice, iGOPid ); 704 691 #else 705 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 )706 {707 pcSlice->setDiscardableFlag ( false );708 }709 710 TComVPS* vps = pcSlice->getVPS();711 Int layerIdInVps = vps ->getLayerIdInVps( getLayerId());712 Int numDirectRefLayers = vps ->getNumDirectRefLayers( layerIdInVps );713 GOPEntry gopEntry = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid );714 715 if ( getLayerId() > 0 && numDirectRefLayers > 0 )716 {717 pcSlice->setInterLayerPredEnabledFlag ( gopEntry.m_numActiveRefLayerPics > 0 );718 if ( pcSlice->getInterLayerPredEnabledFlag() && numDirectRefLayers > 1 )719 {720 if ( !vps->getMaxOneActiveRefLayerFlag() )721 {722 pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 );723 }724 for (Int i = 0; i < gopEntry.m_numActiveRefLayerPics; i++ )725 {726 pcSlice->setInterLayerPredLayerIdc( i, gopEntry.m_interLayerPredLayerIdc[ i ] );727 }728 }729 }730 assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics );731 732 if ( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0 && pcSlice->getNumActiveRefLayerPics() > 0)733 {734 pcSlice->setInterLayerSamplePredOnlyFlag( gopEntry.m_numRefPics == 0 );735 }736 737 pcSlice->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );738 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );739 pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );740 741 xSetRefPicListModificationsMv( pcSlice, iGOPid );742 743 pcSlice->setActiveMotionPredRefLayers( );744 745 if ( getLayerId() > 0 && pcSlice->getNumActiveMotionPredRefLayers() > 0 && pcSlice->getEnableTMVPFlag() &&746 ( pcSlice->getSliceType() == B_SLICE || pcSlice->getSliceType() == P_SLICE ))747 {748 pcSlice->setAltCollocatedIndicationFlag( gopEntry.m_collocatedRefLayerIdx >= 0 );749 if ( pcSlice->getNumActiveRefLayerPics() && pcSlice->getNumActiveMotionPredRefLayers() > 0 )750 {751 pcSlice->setCollocatedRefLayerIdx( gopEntry.m_collocatedRefLayerIdx );752 }753 }754 755 #endif756 #else757 692 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures())); 758 693 pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures())); … … 764 699 765 700 // Set reference list 766 #if H_MV5767 701 #if H_MV 768 702 pcSlice->setRefPicList( tempRefPicLists, usedAsLongTerm, numPocTotalCurr ); … … 786 720 } 787 721 } 788 #endif789 #else790 #if H_MV791 pcSlice->setRefPicList( rcListPic, m_refPicSetInterLayer );792 #if H_3D_ARP793 pcSlice->setARPStepNum();794 if(pcSlice->getARPStepNum() > 1)795 {796 for(Int iLayerId = 0; iLayerId < getLayerId(); iLayerId ++ )797 {798 Int iViewIdx = pcSlice->getVPS()->getViewIndex(iLayerId);799 Bool bIsDepth = ( pcSlice->getVPS()->getDepthId ( iLayerId ) == 1 );800 if( iViewIdx<getViewIndex() && !bIsDepth )801 {802 pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx );803 }804 }805 }806 #endif807 #else808 pcSlice->setRefPicList ( rcListPic );809 #endif810 722 #endif 811 723 #if H_3D … … 2198 2110 pcPic->setReconMark ( true ); 2199 2111 #if H_MV 2200 #if H_MV52201 2112 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 2202 #else2203 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer );2204 #endif2205 2113 std::vector<Int> temp; 2206 2114 TComSlice::markCurrPic( pcPic ); … … 3034 2942 3035 2943 #if H_MV 3036 #if H_MV53037 2944 Void TEncGOP::xSetRefPicListModificationsMv( std::vector<TComPic*> tempPicLists[2], TComSlice* pcSlice, UInt iGOPid ) 3038 2945 { … … 3118 3025 } 3119 3026 } 3120 #else3121 Void TEncGOP::xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid )3122 {3123 Int layer = pcSlice->getLayerIdInVps( );3124 3125 if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || pcSlice->getNumActiveRefLayerPics() == 0 )3126 {3127 return;3128 }3129 3130 // analyze inter-view modifications3131 GOPEntry ge = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && ( layer > 0) ) ? MAX_GOP : iGOPid );3132 assert( ge.m_numActiveRefLayerPics == pcSlice->getNumActiveRefLayerPics() );3133 3134 Int maxRefListSize = pcSlice->getNumRpsCurrTempList();3135 Int numTemporalRefs = maxRefListSize - pcSlice->getNumActiveRefLayerPics();3136 3137 for (Int li = 0; li < 2; li ++) // Loop over lists L0 and L13138 {3139 // set inter-view modifications3140 Int tempList[16];3141 for( Int k = 0; k < 16; k++ )3142 {3143 tempList[ k ] = -1;3144 }3145 3146 Bool isModified = false;3147 if ( maxRefListSize > 1 )3148 {3149 for( Int k = 0, orgIdx = numTemporalRefs; k < ge.m_numActiveRefLayerPics; k++, orgIdx++ )3150 {3151 Int targetIdx = ge.m_interViewRefPosL[ li ][ k ];3152 3153 isModified = ( targetIdx != orgIdx ) && ( targetIdx >= 0 );3154 if ( isModified )3155 {3156 assert( tempList[ targetIdx ] == -1 ); // Assert when two inter layer reference pictures are sorted to the same position3157 tempList[ targetIdx ] = orgIdx;3158 }3159 }3160 }3161 3162 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification();3163 refPicListModification->setRefPicListModificationFlagL( li, isModified );3164 3165 if( isModified )3166 {3167 Int temporalRefIdx = 0;3168 for( Int i = 0; i < pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); i++ )3169 {3170 if( tempList[i] >= 0 )3171 {3172 refPicListModification->setRefPicSetIdxL( li, i, tempList[i] );3173 }3174 else3175 {3176 refPicListModification->setRefPicSetIdxL( li, i, temporalRefIdx );3177 temporalRefIdx++;3178 }3179 }3180 }3181 }3182 }3183 #endif3184 3027 #endif 3185 3028 //! \} -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncGOP.h
r635 r648 102 102 #if H_MV 103 103 TComPicLists* m_ivPicLists; 104 #if H_MV5105 104 std::vector<TComPic*> m_refPicSetInterLayer0; 106 105 std::vector<TComPic*> m_refPicSetInterLayer1; 107 #else108 std::vector<TComPic*> m_refPicSetInterLayer;109 #endif110 106 111 107 Int m_pocLastCoded; … … 223 219 } 224 220 #if H_MV 225 #if H_MV5226 221 Void xSetRefPicListModificationsMv( std::vector<TComPic*> tempPicLists[2], TComSlice* pcSlice, UInt iGOPid ); 227 #else228 Void xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid );229 #endif230 222 #endif 231 223 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSlice.cpp
r638 r648 187 187 \param pPPS PPS associated with the slice 188 188 */ 189 #if H_MV5190 189 #if H_MV 191 190 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId ) 192 191 #else 193 192 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS ) 194 #endif195 #else196 #if H_3D197 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId )198 #else199 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS )200 #endif201 193 #endif 202 194 { … … 206 198 rpcSlice = pcPic->getSlice(0); 207 199 208 #if H_MV5209 200 rpcSlice->setVPS( pVPS ); 210 201 … … 214 205 #if H_3D 215 206 rpcSlice->setIsDepth ( pVPS->getDepthId ( layerId ) != 0 ); 216 #endif217 #else218 #if H_3D219 // GT: Should also be activated for MV-HEVC at some stage220 rpcSlice->setVPS( pVPS );221 Int vpsLayerId = pVPS->getLayerIdInNuh( layerId );222 223 rpcSlice->setLayerId ( layerId );224 rpcSlice->setViewId ( pVPS->getViewId ( vpsLayerId ) );225 rpcSlice->setViewIndex ( pVPS->getViewIndex ( vpsLayerId ) );226 rpcSlice->setIsDepth ( pVPS->getDepthId ( vpsLayerId ) != 0 );227 #endif228 207 #endif 229 208 rpcSlice->setSPS( pSPS ); -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncSlice.h
r622 r648 116 116 117 117 /// preparation of slice encoding (reference marking, QP and lambda) 118 #if H_MV5119 118 #if H_MV 120 119 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, … … 123 122 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, 124 123 Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS ); 125 #endif126 #else127 #if H_3D128 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd,129 Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId );130 #else131 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd,132 Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS );133 #endif134 124 #endif 135 125 #if RATE_CONTROL_LAMBDA_DOMAIN -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibEncoder/TEncTop.cpp
r646 r648 562 562 * that chooses the actual compatibility based upon options */ 563 563 564 #if H_MV5565 564 #if H_MV 566 565 m_cSPS.setUpdateRepFormatFlag ( m_layerId == 0 ); 567 566 m_cSPS.setSpsInferScalingListFlag ( m_layerId > 0 && m_cVPS->getInDirectDependencyFlag( getLayerIdInVps(), 0 ) ); 568 567 m_cSPS.setSpsScalingListRefLayerId ( 0 ); 569 #endif570 568 #endif 571 569 m_cSPS.setPicWidthInLumaSamples ( m_iSourceWidth ); … … 691 689 { 692 690 #if H_MV 693 #if H_MV5694 691 m_cPPS.setLayerId( getLayerId() ); 695 692 if( getVPS()->getNumDirectRefLayers( getLayerId() ) > 0 ) 696 #else697 if( getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) > 0 )698 #endif699 693 { 700 694 m_cPPS.setListsModificationPresentFlag( true ); … … 770 764 m_cPPS.setOutputFlagPresentFlag( false ); 771 765 #if H_MV 772 #if H_MV5773 766 m_cPPS.setNumExtraSliceHeaderBits( 2 ); 774 #else775 m_cPPS.setNumExtraSliceHeaderBits( 1 );776 #endif777 767 #endif 778 768 m_cPPS.setSignHideFlag(getSignHideFlag()); -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibExtractor/TExtrTop.cpp
r622 r648 100 100 Void TExtrTop::dumpVpsInfo( std::ostream& rcVpsInfoHandle ) 101 101 { 102 #if H_MV5103 102 rcVpsInfoHandle << "MaxLayers = " << m_cVPS.getMaxLayersMinus1() + 1 << std::endl; 104 103 rcVpsInfoHandle << "MaxNuhLayerId = " << m_cVPS.getVpsMaxLayerId() << std::endl; … … 114 113 #endif 115 114 rcVpsInfoHandle << "ViewId = " << m_cVPS.getViewId ( layerId ) << std::endl; 116 #else117 rcVpsInfoHandle << "MaxLayers = " << m_cVPS.getMaxLayers() << std::endl;118 rcVpsInfoHandle << "MaxNuhLayerId = " << m_cVPS.getVpsMaxLayerId() << std::endl;119 120 for ( Int layerIdxInVps = 0; layerIdxInVps < m_cVPS.getMaxLayers(); layerIdxInVps++ )121 {122 rcVpsInfoHandle << "LayerIdxInVps = " << layerIdxInVps << std::endl;123 rcVpsInfoHandle << "LayerIdInNuh = " << m_cVPS.getLayerIdInNuh( layerIdxInVps ) << std::endl;124 rcVpsInfoHandle << "ViewId = " << m_cVPS.getViewId ( layerIdxInVps ) << std::endl;125 #if H_3D126 rcVpsInfoHandle << "DepthFlag = " << m_cVPS.getViewIndex ( layerIdxInVps ) << std::endl;127 rcVpsInfoHandle << "DepthFlag = " << m_cVPS.getDepthId ( layerIdxInVps ) << std::endl;128 #endif129 #endif130 115 } 131 116 }
Note: See TracChangeset for help on using the changeset viewer.