Changeset 464 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCu.cpp
- Timestamp:
- 11 Jun 2013, 20:35:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncCu.cpp
r455 r464 65 65 m_ppcTempCU = new TComDataCU*[m_uhTotalDepth-1]; 66 66 67 #if H_3D_ARP 68 m_ppcWeightedTempCU = new TComDataCU*[m_uhTotalDepth-1]; 69 #endif 70 67 71 m_ppcPredYuvBest = new TComYuv*[m_uhTotalDepth-1]; 68 72 m_ppcResiYuvBest = new TComYuv*[m_uhTotalDepth-1]; … … 83 87 m_ppcTempCU[i] = new TComDataCU; m_ppcTempCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 84 88 89 #if H_3D_ARP 90 m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 91 #endif 92 85 93 m_ppcPredYuvBest[i] = new TComYuv; m_ppcPredYuvBest[i]->create(uiWidth, uiHeight); 86 94 m_ppcResiYuvBest[i] = new TComYuv; m_ppcResiYuvBest[i]->create(uiWidth, uiHeight); … … 124 132 m_ppcTempCU[i]->destroy(); delete m_ppcTempCU[i]; m_ppcTempCU[i] = NULL; 125 133 } 134 #if H_3D_ARP 135 if(m_ppcWeightedTempCU[i]) 136 { 137 m_ppcWeightedTempCU[i]->destroy(); delete m_ppcWeightedTempCU[i]; m_ppcWeightedTempCU[i] = NULL; 138 } 139 #endif 126 140 if(m_ppcPredYuvBest[i]) 127 141 { … … 468 482 if( rpcTempCU->getSlice()->getSliceType() != I_SLICE ) 469 483 { 484 #if H_3D_ARP 485 if( rpcTempCU->getSlice()->getVPS()->getUseAdvRP(rpcTempCU->getSlice()->getLayerId()) ) 486 #else 470 487 if(rpcTempCU->getSlice()->getViewIndex() && !rpcTempCU->getSlice()->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. Remove this comment once it is done. 488 #endif 471 489 { 472 490 PartSize ePartTemp = rpcTempCU->getPartitionSize(0); … … 1220 1238 { 1221 1239 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx ); 1240 #if H_3D_ARP 1241 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1242 #endif 1222 1243 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1223 1244 return; … … 1241 1262 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 1242 1263 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1243 1264 #if H_3D_ARP 1265 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1266 #endif 1267 1244 1268 // Encode Coefficients 1245 1269 Bool bCodeDQP = getdQPFlag(); … … 1302 1326 } 1303 1327 1328 #if H_3D_ARP 1329 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 1330 if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV ) 1331 { 1332 nARPWMax = 0; 1333 } 1334 for( Int nARPW=nARPWMax; nARPW >= 0 ; nARPW-- ) 1335 { 1336 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS*sizeof(Int) ); 1337 #endif 1304 1338 for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual ) 1305 1339 { … … 1316 1350 rpcTempCU->setCUTransquantBypassSubParts( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uhDepth ); 1317 1351 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level 1352 #if H_3D_ARP 1353 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1354 #endif 1318 1355 rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to LCU level 1319 1356 rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to LCU level … … 1322 1359 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 1323 1360 1361 #if H_3D_ARP 1362 if( nARPW ) 1363 { 1364 Bool bSignalflag[2] = { true, true }; 1365 for( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ ) 1366 { 1367 Int iRefIdx = cMvFieldNeighbours[uiRefListIdx + 2*uiMergeCand].getRefIdx(); 1368 RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 1369 if( iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx) ) 1370 { 1371 bSignalflag[uiRefListIdx] = false; 1372 } 1373 } 1374 if( !bSignalflag[0] && !bSignalflag[1] ) 1375 { 1376 rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth ); 1377 } 1378 } 1379 #endif 1324 1380 // do MC 1325 1381 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); … … 1401 1457 } 1402 1458 } 1459 #if H_3D_ARP 1460 } 1461 #endif 1403 1462 } 1404 1463 … … 1411 1470 { 1412 1471 UChar uhDepth = rpcTempCU->getDepth( 0 ); 1472 #if H_3D_ARP 1473 Int iLayerId = rpcTempCU->getSlice()->getLayerId(); 1474 Bool bFirstTime = true; 1475 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 1476 1477 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV ) 1478 { 1479 nARPWMax = 0; 1480 } 1481 1482 for( Int nARPW = 0; nARPW <= nARPWMax; nARPW++ ) 1483 { 1484 if( bFirstTime == false && rpcTempCU->getSlice()->getVPS()->getUseAdvRP( iLayerId ) ) 1485 { 1486 rpcTempCU->initEstData( rpcTempCU->getDepth(0), rpcTempCU->getQP(0) ); 1487 } 1488 #endif 1413 1489 #if H_3D_VSO // M3 1414 1490 if( m_pcRdCost->getUseRenModel() ) … … 1430 1506 rpcTempCU->setCUTransquantBypassSubParts ( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uhDepth ); 1431 1507 1508 #if H_3D_ARP 1509 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1510 #endif 1511 1512 #if H_3D_ARP 1513 if( bFirstTime == false && nARPWMax ) 1514 { 1515 rpcTempCU->copyPartFrom( m_ppcWeightedTempCU[uhDepth] , 0 , uhDepth ); 1516 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1517 1518 m_pcPredSearch->motionCompensation( rpcTempCU , m_ppcPredYuvTemp[uhDepth] ); 1519 1520 if(rpcTempCU->getPartitionSize(0)==SIZE_2Nx2N) 1521 { 1522 Bool bSignalflag[2] = { true, true }; 1523 for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ ) 1524 { 1525 RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 1526 Int iRefIdx = rpcTempCU->getCUMvField(eRefList)->getRefIdx(0); 1527 if( iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx) ) 1528 { 1529 bSignalflag[uiRefListIdx] = false; 1530 } 1531 } 1532 if( !bSignalflag[0] && !bSignalflag[1] ) 1533 { 1534 rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth ); 1535 } 1536 } 1537 } 1538 else 1539 { 1540 bFirstTime = false; 1541 #endif 1432 1542 #if AMP_MRG 1433 1543 rpcTempCU->setMergeAMP (true); … … 1436 1546 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] ); 1437 1547 #endif 1548 #if H_3D_ARP 1549 if( nARPWMax ) 1550 { 1551 m_ppcWeightedTempCU[uhDepth]->copyPartFrom( rpcTempCU , 0 , uhDepth ); 1552 1553 Bool bSignalflag[2] = { true, true }; 1554 for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ ) 1555 { 1556 RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 1557 Int iRefIdx = rpcTempCU->getCUMvField(eRefList)->getRefIdx(0); 1558 if( iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx) ) 1559 { 1560 bSignalflag[uiRefListIdx] = false; 1561 } 1562 } 1563 if( !bSignalflag[0] && !bSignalflag[1]) 1564 { 1565 rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth ); 1566 } 1567 } 1568 } 1569 #endif 1438 1570 1439 1571 #if AMP_MRG 1440 1572 if ( !rpcTempCU->getMergeAMP() ) 1441 1573 { 1574 #if H_3D_ARP 1575 if( nARPWMax ) 1576 { 1577 continue; 1578 } 1579 else 1580 #endif 1442 1581 return; 1443 1582 } … … 1466 1605 xCheckDQP( rpcTempCU ); 1467 1606 xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth); 1607 #if H_3D_ARP 1608 } 1609 #endif 1468 1610 } 1469 1611
Note: See TracChangeset for help on using the changeset viewer.