Changeset 474 in SHVCSoftware for branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCu.cpp
- Timestamp:
- 15 Nov 2013, 13:43:17 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCu.cpp
r442 r474 250 250 #endif 251 251 252 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 253 m_disableILP = xCheckTileSetConstraint(rpcCU); 254 m_pcPredSearch->setDisableILP(m_disableILP); 255 #endif 256 252 257 // analysis of CU 253 258 xCompressCU( m_ppcBestCU[0], m_ppcTempCU[0], 0 ); … … 261 266 } 262 267 } 268 #endif 269 270 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 271 xVerifyTileSetConstraint(rpcCU); 263 272 #endif 264 273 } … … 731 740 } 732 741 #if (ENCODER_FAST_MODE) 742 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 743 if(pcPic->getLayerId() > 0 && !m_disableILP) 744 #else 733 745 if(pcPic->getLayerId() > 0) 746 #endif 734 747 { 735 748 for(Int refLayer = 0; refLayer < pcSlice->getActiveNumILRRefIdx(); refLayer++) … … 1381 1394 Bool bZeroMVILR = rpcTempCU->xCheckZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]); 1382 1395 if(bZeroMVILR) 1396 { 1397 #endif 1398 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 1399 if (!(rpcTempCU->isInterLayerReference(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]) && m_disableILP)) 1383 1400 { 1384 1401 #endif … … 1426 1443 } 1427 1444 } 1445 } 1446 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 1447 } 1448 #endif 1428 1449 #if REF_IDX_ME_ZEROMV 1429 } 1430 #endif 1431 } 1450 } 1451 #endif 1432 1452 } 1433 1453 … … 1808 1828 } 1809 1829 1830 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 1831 Bool TEncCu::xCheckTileSetConstraint( TComDataCU*& rpcCU ) 1832 { 1833 Bool disableILP = false; 1834 1835 if (rpcCU->getLayerId() == (m_pcEncCfg->getNumLayer() - 1) && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(rpcCU->getAddr()) >= 0) 1836 { 1837 if (rpcCU->getPic()->getPicSym()->getTileSetType(rpcCU->getAddr()) == 2) 1838 { 1839 disableILP = true; 1840 } 1841 if (rpcCU->getPic()->getPicSym()->getTileSetType(rpcCU->getAddr()) == 1) 1842 { 1843 Int currCUaddr = rpcCU->getAddr(); 1844 Int frameWitdhInCU = rpcCU->getPic()->getPicSym()->getFrameWidthInCU(); 1845 Int frameHeightInCU = rpcCU->getPic()->getPicSym()->getFrameHeightInCU(); 1846 Bool leftCUExists = (currCUaddr % frameWitdhInCU) > 0; 1847 Bool aboveCUExists = (currCUaddr / frameWitdhInCU) > 0; 1848 Bool rightCUExists = (currCUaddr % frameWitdhInCU) < (frameWitdhInCU - 1); 1849 Bool belowCUExists = (currCUaddr / frameWitdhInCU) < (frameHeightInCU - 1); 1850 Int currTileSetIdx = rpcCU->getPic()->getPicSym()->getTileSetIdxMap(currCUaddr); 1851 // Check if CU is at tile set boundary 1852 if ( (leftCUExists && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(currCUaddr-1) != currTileSetIdx) || 1853 (leftCUExists && aboveCUExists && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(currCUaddr-frameWitdhInCU-1) != currTileSetIdx) || 1854 (aboveCUExists && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(currCUaddr-frameWitdhInCU) != currTileSetIdx) || 1855 (aboveCUExists && rightCUExists && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(currCUaddr-frameWitdhInCU+1) != currTileSetIdx) || 1856 (rightCUExists && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(currCUaddr+1) != currTileSetIdx) || 1857 (rightCUExists && belowCUExists && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(currCUaddr+frameWitdhInCU+1) != currTileSetIdx) || 1858 (belowCUExists && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(currCUaddr+frameWitdhInCU) != currTileSetIdx) || 1859 (belowCUExists && leftCUExists && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(currCUaddr+frameWitdhInCU-1) != currTileSetIdx) ) 1860 { 1861 disableILP = true; // Disable ILP in tile set boundary CU 1862 } 1863 } 1864 } 1865 1866 return disableILP; 1867 } 1868 1869 Void TEncCu::xVerifyTileSetConstraint( TComDataCU*& rpcCU ) 1870 { 1871 if (rpcCU->getLayerId() == (m_pcEncCfg->getNumLayer() - 1) && m_pcEncCfg->getInterLayerConstrainedTileSetsSEIEnabled() && rpcCU->getPic()->getPicSym()->getTileSetIdxMap(rpcCU->getAddr()) >= 0 && 1872 m_disableILP) 1873 { 1874 UInt numPartitions = rpcCU->getPic()->getNumPartInCU(); 1875 for (UInt i = 0; i < numPartitions; i++) 1876 { 1877 if (!rpcCU->isIntra(i)) 1878 { 1879 for (UInt refList = 0; refList < 2; refList++) 1880 { 1881 if (rpcCU->getInterDir(i) & (1<<refList)) 1882 { 1883 TComCUMvField *mvField = rpcCU->getCUMvField(RefPicList(refList)); 1884 if (mvField->getRefIdx(i) >= 0) 1885 { 1886 assert(!(rpcCU->getSlice()->getRefPic(RefPicList(refList), mvField->getRefIdx(i))->isILR(rpcCU->getLayerId()))); 1887 } 1888 } 1889 } 1890 } 1891 } 1892 } 1893 } 1894 #endif 1895 1810 1896 /** Collect ARL statistics from one LCU 1811 1897 * \param pcCU
Note: See TracChangeset for help on using the changeset viewer.