Changeset 166 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCu.cpp
- Timestamp:
- 1 Nov 2012, 19:22:41 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r100 r166 453 453 // get Original YUV data from picture 454 454 m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); 455 #if FORCE_REF_VSP 456 //Bool bWholeCUCanBeSynthesized = false; 457 //Bool bOneSubCUCanNotBeSynthesied = false; 458 Bool bSubCUCanBeSynthesized[4]; 459 if( rpcBestCU->getSlice()->getViewId() ) 460 { 461 Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized; 462 pcPic->checkSynthesisAvailability(/*rpcBestCU, */rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU(), uiDepth, pbSubCUCanBeSynthesized); //KUBA SYNTH 463 //Int iSubCUCanNotBeSynthesized = 0; // Dong: Compiling error, set but not used. DONG_CHECK 464 Int iSubCUCanBeSynthesizedCnt = 0; 465 for(Int i = 0; i < 4; i++) 466 { 467 if (!bSubCUCanBeSynthesized[i]) 468 { 469 //iSubCUCanNotBeSynthesized = i; 470 } 471 else 472 { 473 iSubCUCanBeSynthesizedCnt ++; 474 } 475 } 476 if(iSubCUCanBeSynthesizedCnt == 4) 477 { 478 //bWholeCUCanBeSynthesized = true; 479 } 480 //else if(iSubCUCanBeSynthesizedCnt == 3) 481 //{ 482 // bOneSubCUCanNotBeSynthesied = true; 483 //} 484 //bWholeCUCanBeSynthesized = true; 485 } 486 #endif 455 487 456 488 // variables for fast encoder decision … … 654 686 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 655 687 } 688 689 #if FORCE_REF_VSP==1 690 #if VSP_TEXT_ONLY 691 if( !rpcBestCU->getSlice()->getSPS()->isDepth() ) 692 #endif 693 #if HHI_INTER_VIEW_RESIDUAL_PRED 694 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 695 #endif 696 #if HHI_INTERVIEW_SKIP 697 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec, false, true ); // VSP 698 #else 699 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 700 #endif 701 rpcTempCU->initEstData( uiDepth, iQP ); 702 #endif 656 703 } 657 704 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1581 1628 { 1582 1629 m_pcEntropyCoder->encodeSkipFlag( pcCU, uiAbsPartIdx ); 1630 1631 #if FORCE_REF_VSP==1 1632 if( (pcCU->isSkipped( uiAbsPartIdx ) || pcCU->isVspMode( uiAbsPartIdx )) && pcCU->getSlice()->getViewId() != 0 ) 1633 #if VSP_TEXT_ONLY 1634 if( !pcCU->getSlice()->getSPS()->isDepth() ) 1635 #endif 1636 { 1637 m_pcEntropyCoder->encodeVspFlag( pcCU, uiAbsPartIdx ); 1638 } 1639 #endif 1583 1640 } 1584 1641 1585 1642 if( pcCU->isSkipped( uiAbsPartIdx ) ) 1643 #if FORCE_REF_VSP==1 1644 if( !pcCU->isVspMode( uiAbsPartIdx ) ) 1645 #endif 1586 1646 { 1587 1647 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1588 1648 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1649 #if DEBUGLOGOUT 1650 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth ); 1651 #endif 1589 1652 xRestoreDepthWidthHeight( pcCU ); 1590 1653 return; … … 1635 1698 { 1636 1699 m_pcEntropyCoder->encodeSkipFlag( pcCU, uiAbsPartIdx ); 1700 1701 #if FORCE_REF_VSP==1 1702 if( (pcCU->isSkipped( uiAbsPartIdx ) || pcCU->isVspMode( uiAbsPartIdx )) && pcCU->getSlice()->getViewId() != 0 ) 1703 #if VSP_TEXT_ONLY 1704 if( !pcCU->getSlice()->getSPS()->isDepth() ) 1705 #endif 1706 { 1707 m_pcEntropyCoder->encodeVspFlag( pcCU, uiAbsPartIdx ); 1708 } 1709 #endif 1637 1710 } 1638 1711 1639 1712 if( pcCU->isSkipped( uiAbsPartIdx ) ) 1713 #if FORCE_REF_VSP==1 1714 if( !pcCU->isVspMode( uiAbsPartIdx ) ) 1715 #endif 1640 1716 { 1641 1717 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); … … 1644 1720 #endif 1645 1721 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1722 #if DEBUGLOGOUT 1723 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth ); 1724 #endif 1646 1725 return; 1647 1726 } 1727 1728 #if FORCE_REF_VSP==1 1729 if( pcCU->isVspMode( uiAbsPartIdx ) ) 1730 { 1731 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1732 #if DEBUGLOGOUT 1733 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth ); 1734 #endif 1735 return; 1736 } 1737 #endif 1738 1648 1739 #if HHI_MPI 1649 1740 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) … … 1662 1753 // Encode slice finish 1663 1754 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1755 #if DEBUGLOGOUT 1756 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth ); 1757 #endif 1664 1758 return; 1665 1759 } … … 1685 1779 // --- write terminating bit --- 1686 1780 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1781 #if DEBUGLOGOUT 1782 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth ); 1783 #endif 1687 1784 } 1688 1785 … … 1873 1970 #if AMP_MRG 1874 1971 #if HHI_INTERVIEW_SKIP 1875 Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bSkipRes, Bool bUseMRG) 1972 Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bSkipRes, Bool bUseMRG 1973 #if FORCE_REF_VSP==1 1974 , Bool bForceRefVsp 1975 #endif 1976 ) 1876 1977 #else 1877 1978 Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bUseMRG) … … 1910 2011 rpcTempCU->setResPredFlagSubParts ( bResPrdFlag, 0, 0, uhDepth ); 1911 2012 #endif 2013 #if FORCE_REF_VSP==1 2014 if( bForceRefVsp ) 2015 rpcTempCU->setPredModeSubParts ( MODE_SYNTH, 0, uhDepth ); 2016 else 2017 #endif 1912 2018 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 1913 2019 … … 1925 2031 #if HHI_INTERVIEW_SKIP 1926 2032 #if LG_RESTRICTEDRESPRED_M24766 1927 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcResPredTmp[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG ); 2033 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcResPredTmp[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG 2034 #if FORCE_REF_VSP==1 2035 , bForceRefVsp 2036 #endif 2037 ); 1928 2038 #else 1929 2039 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG ); … … 2494 2604 for( UInt ui = 0; ui < rpcTempCU->getTotalNumPart(); ui++ ) 2495 2605 { 2496 if( pcTextureCU->isIntra( rpcTempCU->getZorderIdxInCU() + ui ) ) 2606 if( pcTextureCU->isIntra( rpcTempCU->getZorderIdxInCU() + ui ) 2607 #if FORCE_REF_VSP==1 2608 || pcTextureCU->isVspMode( rpcTempCU->getZorderIdxInCU() + ui ) 2609 #endif 2610 ) 2497 2611 { 2498 2612 return; 2499 2613 } 2614 #if VSP_N 2615 #if !(!VSP_TEXT_ONLY && FORCE_REF_VSP==2) 2616 else // inter 2617 { 2618 Int aiRefIdx[2] = {NOT_VALID, NOT_VALID}; 2619 for( Int iList = 0; iList < 2; iList++ ) 2620 { 2621 aiRefIdx[iList] = pcTextureCU->getCUMvField( RefPicList(iList) )->getRefIdx( rpcTempCU->getZorderIdxInCU() + ui ); 2622 if( aiRefIdx[iList] >= 0 && pcTextureCU->getSlice()->getRefViewId( RefPicList(iList), aiRefIdx[iList] ) == NUM_VIEW_VSP ) 2623 { 2624 return; 2625 } 2626 } 2627 //if( aiRefIdx[0] == NOT_VALID && aiRefIdx[1] == NOT_VALID ) 2628 //{ 2629 // return; 2630 //} 2631 } 2632 #endif 2633 #endif 2500 2634 } 2501 2635 } … … 2694 2828 m_pcEntropyCoder->encodeSplitFlag( pcCU, 0, uhDepth, true ); 2695 2829 m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true ); 2830 #if FORCE_REF_VSP==1 2831 if( (pcCU->isSkipped( 0 ) || pcCU->isVspMode( 0 )) && pcCU->getSlice()->getViewId() != 0 ) 2832 #if VSP_TEXT_ONLY 2833 if( !pcCU->getSlice()->getSPS()->isDepth() ) 2834 #endif 2835 m_pcEntropyCoder->encodeVspFlag ( pcCU, 0, true ); 2836 #endif 2696 2837 2697 2838 if( pcCU->isSkipped( 0 ) ) 2839 #if FORCE_REF_VSP==1 2840 if( !pcCU->isVspMode( 0 ) ) 2841 #endif 2698 2842 { 2699 2843 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true );
Note: See TracChangeset for help on using the changeset viewer.