Changeset 1274 in 3DVCSoftware for branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncCu.cpp
- Timestamp:
- 14 Jul 2015, 12:31:09 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncCu.cpp
r1256 r1274 68 68 m_ppcTempCU = new TComDataCU*[m_uhTotalDepth-1]; 69 69 70 #if H_3D_ARP70 #if NH_3D_ARP 71 71 m_ppcWeightedTempCU = new TComDataCU*[m_uhTotalDepth-1]; 72 72 #endif … … 79 79 m_ppcRecoYuvTemp = new TComYuv*[m_uhTotalDepth-1]; 80 80 m_ppcOrigYuv = new TComYuv*[m_uhTotalDepth-1]; 81 #if H_3D_DBBP81 #if NH_3D_DBBP 82 82 m_ppcOrigYuvDBBP = new TComYuv*[m_uhTotalDepth-1]; 83 83 #endif … … 92 92 m_ppcBestCU[i] = new TComDataCU; m_ppcBestCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 93 93 m_ppcTempCU[i] = new TComDataCU; m_ppcTempCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 94 #if H_3D_ARP95 m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );94 #if NH_3D_ARP 95 m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) ); 96 96 #endif 97 97 … … 105 105 106 106 m_ppcOrigYuv [i] = new TComYuv; m_ppcOrigYuv [i]->create(uiWidth, uiHeight, chromaFormat); 107 #if H_3D_DBBP108 m_ppcOrigYuvDBBP[i] = new TComYuv; m_ppcOrigYuvDBBP[i]->create(uiWidth, uiHeight );107 #if NH_3D_DBBP 108 m_ppcOrigYuvDBBP[i] = new TComYuv; m_ppcOrigYuvDBBP[i]->create(uiWidth, uiHeight, chromaFormat); 109 109 #endif 110 110 … … 146 146 m_ppcTempCU[i]->destroy(); delete m_ppcTempCU[i]; m_ppcTempCU[i] = NULL; 147 147 } 148 #if H_3D_ARP148 #if NH_3D_ARP 149 149 if(m_ppcWeightedTempCU[i]) 150 150 { … … 180 180 m_ppcOrigYuv[i]->destroy(); delete m_ppcOrigYuv[i]; m_ppcOrigYuv[i] = NULL; 181 181 } 182 #if H_3D_DBBP182 #if NH_3D_DBBP 183 183 if(m_ppcOrigYuvDBBP[i]) 184 184 { … … 198 198 } 199 199 200 #if H_3D_ARP200 #if NH_3D_ARP 201 201 if(m_ppcWeightedTempCU) 202 202 { … … 240 240 m_ppcOrigYuv = NULL; 241 241 } 242 #if H_3D_DBBP242 #if NH_3D_DBBP 243 243 if(m_ppcOrigYuvDBBP) 244 244 { … … 280 280 m_ppcTempCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() ); 281 281 282 #if NH_3D_ARP 283 m_ppcWeightedTempCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() ); 284 #endif 285 282 286 #if KWU_RC_MADPRED_E0227 283 287 m_LCUPredictionSAD = 0; … … 441 445 Bool earlyDetectionSkipMode = false; 442 446 443 #if H_3D_VSP447 #if NH_3D_NBDV 444 448 DisInfo DvInfo; 445 449 DvInfo.m_acNBDV.setZero(); 446 450 DvInfo.m_aVIdxCan = 0; 447 #if H_3D_NBDV_REF451 #if NH_3D_NBDV_REF 448 452 DvInfo.m_acDoNBDV.setZero(); 449 453 #endif … … 584 588 #endif 585 589 586 #if H_3D_NBDV590 #if NH_3D_NBDV 587 591 if( rpcTempCU->getSlice()->getSliceType() != I_SLICE ) 588 592 { 589 #if H_3D_ARP && H_3D_IV_MERGE590 if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() )593 #if NH_3D_ARP && NH_3D_IV_MERGE && NH_3D_VSP 594 if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() ) 591 595 #else 592 #if H_3D_ARP 593 if( rpcTempCU->getSlice()->getVPS()->getUseAdvRP(rpcTempCU->getSlice()->getLayerId()) ) 596 #if NH_3D_IV_MERGE && NH_3D_VSP 597 if( rpcTempCU->getSlice()->getIvMvPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() ) 598 #else 599 #if NH_3D_ARP && NH_3D_VSP 600 if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() ) 601 #else 602 #if NH_3D_VSP 603 if( rpcTempCU->getSlice()->getViewSynthesisPredFlag() ) 604 #else 605 #if NH_3D_ARP 606 if( rpcTempCU->getSlice()->getIvResPredFlag() ) 594 607 #else 595 608 #if H_3D_IV_MERGE 596 609 if( rpcTempCU->getSlice()->getVPS()->getIvMvPredFlag(rpcTempCU->getSlice()->getLayerId()) ) 597 610 #else 611 #if NH_3D_DBBP 612 if( rpcTempCU->getSlice()->getDepthBasedBlkPartFlag() ) 613 #else 598 614 if (0) 615 #endif 616 #endif 617 #endif 618 #endif 599 619 #endif 600 620 #endif … … 602 622 { 603 623 PartSize ePartTemp = rpcTempCU->getPartitionSize(0); 604 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );605 #if H_3D_IV_MERGE624 rpcTempCU->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth); 625 #if NH_3D_IV_MERGE 606 626 if (rpcTempCU->getSlice()->getIsDepth() ) 607 627 { … … 611 631 { 612 632 #endif 613 #if H_3D_NBDV_REF633 #if NH_3D_NBDV_REF 614 634 if( rpcTempCU->getSlice()->getDepthRefinementFlag() ) 615 635 { … … 621 641 rpcTempCU->getDisMvpCandNBDV(&DvInfo); 622 642 } 623 #if H_3D_IV_MERGE643 #if NH_3D_IV_MERGE 624 644 } 625 645 #endif … … 659 679 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );//by Competition for inter_2Nx2N 660 680 #endif 661 #if H_3D_VSP662 681 #if NH_3D_VSP || NH_3D_DBBP 682 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 663 683 #endif 664 684 } … … 673 693 674 694 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 675 #if H_3D_VSP676 695 #if NH_3D_VSP || NH_3D_DBBP 696 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 677 697 #endif 678 698 … … 690 710 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 691 711 #endif 692 #if H_3D_VSP693 694 #endif 695 #if H_3D_DBBP712 #if NH_3D_VSP || NH_3D_DBBP 713 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 714 #endif 715 #if NH_3D_DBBP 696 716 if( rpcTempCU->getSlice()->getDepthBasedBlkPartFlag() && rpcTempCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 697 717 { 698 718 xCheckRDCostInterDBBP( rpcBestCU, rpcTempCU, false ); 699 719 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 700 #if H_3D_VSP720 #if NH_3D_VSP || NH_3D_DBBP 701 721 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 702 722 #endif … … 780 800 #endif 781 801 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 782 #if H_3D_VSP783 802 #if NH_3D_VSP || NH_3D_DBBP 803 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 784 804 #endif 785 805 … … 799 819 #endif 800 820 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 801 #if H_3D_VSP821 #if NH_3D_VSP || NH_3D_DBBP 802 822 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 803 823 #endif … … 822 842 823 843 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 824 #if H_3D_VSP844 #if NH_3D_VSP || NH_3D_DBBP 825 845 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 826 846 #endif … … 861 881 #endif 862 882 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 863 #if H_3D_VSP883 #if NH_3D_VSP || NH_3D_DBBP 864 884 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 865 885 #endif … … 882 902 883 903 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 884 #if H_3D_VSP904 #if NH_3D_VSP || NH_3D_DBBP 885 905 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 886 906 #endif … … 909 929 910 930 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 911 #if H_3D_VSP931 #if NH_3D_VSP || NH_3D_DBBP 912 932 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 913 933 #endif … … 929 949 #endif 930 950 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 931 #if H_3D_VSP951 #if NH_3D_VSP || NH_3D_DBBP 932 952 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 933 953 #endif … … 957 977 958 978 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 959 #if H_3D_VSP979 #if NH_3D_VSP || NH_3D_DBBP 960 980 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 961 981 #endif … … 977 997 #endif 978 998 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 979 #if H_3D_VSP999 #if NH_3D_VSP || NH_3D_DBBP 980 1000 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 981 1001 #endif … … 997 1017 #endif 998 1018 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 999 #if H_3D_VSP1019 #if NH_3D_VSP || NH_3D_DBBP 1000 1020 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1001 1021 #endif … … 1018 1038 #endif 1019 1039 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1020 #if H_3D_VSP1040 #if NH_3D_VSP || NH_3D_DBBP 1021 1041 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1022 1042 #endif … … 1034 1054 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1035 1055 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1036 #if H_3D_VSP1037 1056 #if NH_3D_VSP || NH_3D_DBBP 1057 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1038 1058 #endif 1039 1059 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1040 1060 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1041 #if H_3D_VSP1042 1061 #if NH_3D_VSP || NH_3D_DBBP 1062 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1043 1063 #endif 1044 1064 #if NH_3D_QTLPC … … 1049 1069 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1050 1070 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1051 #if H_3D_VSP1052 1071 #if NH_3D_VSP || NH_3D_DBBP 1072 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1053 1073 #endif 1054 1074 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1055 1075 rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 1056 #if H_3D_VSP1057 1076 #if NH_3D_VSP || NH_3D_DBBP 1077 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 1058 1078 #endif 1059 1079 #if NH_3D_QTLPC … … 1270 1290 DEBUG_STRING_NEW(sTempDebug) 1271 1291 1292 #if NH_3D_ARP 1293 m_ppcWeightedTempCU[uhNextDepth]->setSlice( m_ppcWeightedTempCU[ uiDepth]->getSlice()); 1294 m_ppcWeightedTempCU[uhNextDepth]->setPic ( m_ppcWeightedTempCU[ uiDepth] ); 1295 #endif 1272 1296 for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ ) 1273 1297 { … … 1575 1599 1576 1600 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx ); 1577 #if H_3D_ARP1601 #if NH_3D_ARP 1578 1602 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1579 1603 #endif … … 1612 1636 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 1613 1637 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1614 #if H_3D1638 #if NH_3D_DBBP 1615 1639 m_pcEntropyCoder->encodeDBBPFlag( pcCU, uiAbsPartIdx ); 1616 1640 #endif … … 1618 1642 m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false ); 1619 1643 #endif 1620 #if H_3D_ARP1644 #if NH_3D_ARP 1621 1645 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1622 1646 #endif … … 1763 1787 { 1764 1788 assert( rpcTempCU->getSlice()->getSliceType() != I_SLICE ); 1765 #if H_3D_IV_MERGE1789 #if NH_3D_MLC 1766 1790 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 1767 1791 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; … … 1792 1816 #endif 1793 1817 1794 #if H_3D_ARP1818 #if NH_3D_ARP 1795 1819 DisInfo cOrigDisInfo = rpcTempCU->getDvInfo(0); 1796 1820 #else … … 1798 1822 1799 1823 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level 1800 #if H_3D_VSP 1801 #if !H_3D_ARP 1824 1825 #if NH_3D_SPIVMP 1826 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 1827 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 1828 TComMvField* pcMvFieldSP; 1829 UChar* puhInterDirSP; 1830 pcMvFieldSP = new TComMvField[rpcTempCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2]; 1831 puhInterDirSP = new UChar[rpcTempCU->getPic()->getPicSym()->getNumPartitionsInCtu()]; 1832 #endif 1833 1834 #if NH_3D_VSP 1835 #if !NH_3D_ARP 1802 1836 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1803 1837 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 1804 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 1805 rpcTempCU->m_bAvailableFlagA1 = 0; 1806 rpcTempCU->m_bAvailableFlagB1 = 0; 1807 rpcTempCU->m_bAvailableFlagB0 = 0; 1808 rpcTempCU->m_bAvailableFlagA0 = 0; 1809 rpcTempCU->m_bAvailableFlagB2 = 0; 1838 #if NH_3D_MLC 1839 rpcTempCU->initAvailableFlags(); 1840 #endif 1810 1841 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1811 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,inheritedVSPDisInfo, numValidMergeCand ); 1812 #endif 1813 #else 1814 #if H_3D 1815 rpcTempCU->m_bAvailableFlagA1 = 0; 1816 rpcTempCU->m_bAvailableFlagB1 = 0; 1817 rpcTempCU->m_bAvailableFlagB0 = 0; 1818 rpcTempCU->m_bAvailableFlagA0 = 0; 1819 rpcTempCU->m_bAvailableFlagB2 = 0; 1820 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1821 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 1822 #else 1842 #if NH_3D_MLC 1843 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1844 #if NH_3D_SPIVMP 1845 , pcMvFieldSP, puhInterDirSP 1846 #endif 1847 , numValidMergeCand 1848 ); 1849 1850 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag 1851 #if NH_3D_SPIVMP 1852 , bSPIVMPFlag 1853 #endif 1854 , numValidMergeCand 1855 ); 1856 #endif 1857 #endif 1858 #else 1859 #if NH_3D_MLC 1860 rpcTempCU->initAvailableFlags(); 1861 #endif 1823 1862 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 1824 #endif 1825 #endif 1826 #if H_3D_IV_MERGE 1863 #if NH_3D_MLC 1864 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1865 #if H_3D_SPIVMP 1866 , pcMvFieldSP, puhInterDirSP 1867 #endif 1868 , numValidMergeCand 1869 ); 1870 #if NH_3D_MLC 1871 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours 1872 #if H_3D_SPIVMP 1873 , bSPIVMPFlag 1874 #endif 1875 , numValidMergeCand 1876 ); 1877 #endif 1878 #endif 1879 #endif 1880 1881 #if NH_3D_MLC 1827 1882 Int mergeCandBuffer[MRG_MAX_NUM_CANDS_MEM]; 1828 1883 #else 1829 1884 Int mergeCandBuffer[MRG_MAX_NUM_CANDS]; 1830 1885 #endif 1831 #if H_3D_ARP1832 for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui )1886 #if NH_3D_MLC 1887 for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui ) 1833 1888 #else 1834 1889 for( UInt ui = 0; ui < numValidMergeCand; ++ui ) 1835 1890 #endif 1836 1837 1891 { 1838 1892 mergeCandBuffer[ui] = 0; … … 1852 1906 DEBUG_STRING_NEW(bestStr) 1853 1907 1854 #if H_3D_ARP1908 #if NH_3D_ARP 1855 1909 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 1910 #if H_3D_IC 1856 1911 if( nARPWMax < 0 || bICFlag ) 1912 #else 1913 if( nARPWMax < 0 ) 1914 #endif 1857 1915 { 1858 1916 nARPWMax = 0; … … 1860 1918 for( Int nARPW=nARPWMax; nARPW >= 0 ; nARPW-- ) 1861 1919 { 1920 #if NH_3D_IV_MERGE 1862 1921 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM*sizeof(Int) ); 1922 #else 1923 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS * sizeof(Int) ); 1924 #endif 1863 1925 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level 1864 1926 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); … … 1867 1929 #endif 1868 1930 rpcTempCU->getDvInfo(0) = cOrigDisInfo; 1869 rpcTempCU->setDvInfoSubParts(cOrigDisInfo, 0, 0, uhDepth ); 1931 rpcTempCU->setDvInfoSubParts(cOrigDisInfo, 0, uhDepth ); 1932 #if NH_3D_VSP 1870 1933 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1871 1934 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 1872 #if H_3D_SPIVMP 1873 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 1874 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 1875 TComMvField* pcMvFieldSP; 1876 UChar* puhInterDirSP; 1877 pcMvFieldSP = new TComMvField[rpcTempCU->getPic()->getPicSym()->getNumPartition()*2]; 1878 puhInterDirSP = new UChar[rpcTempCU->getPic()->getPicSym()->getNumPartition()]; 1879 #endif 1880 #if H_3D 1935 #endif 1936 #if NH_3D 1937 #if NH_3D_MLC 1881 1938 rpcTempCU->initAvailableFlags(); 1939 #endif 1882 1940 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1883 1941 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1884 #if H_3D_SPIVMP1942 #if NH_3D_SPIVMP 1885 1943 , pcMvFieldSP, puhInterDirSP 1886 1944 #endif … … 1888 1946 ); 1889 1947 1890 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag 1891 #if H_3D_SPIVMP 1948 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours 1949 #if NH_3D_VSP 1950 , vspFlag 1951 #endif 1952 #if NH_3D_SPIVMP 1892 1953 , bSPIVMPFlag 1893 1954 #endif … … 1896 1957 1897 1958 #else 1898 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,numValidMergeCand );1959 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 1899 1960 #endif 1900 1961 … … 1926 1987 rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth ); 1927 1988 #endif 1928 #if H_3D_ARP1929 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );1930 #endif1931 1989 rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag, 0, uhDepth ); 1932 1990 rpcTempCU->setChromaQpAdjSubParts( bTransquantBypassFlag ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth ); … … 1934 1992 rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to CTU level 1935 1993 rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to CTU level 1936 #if H_3D_VSP 1994 #if NH_3D_ARP 1995 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1996 #endif 1997 1998 #if NH_3D_VSP 1937 1999 rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth ); 1938 2000 #endif 1939 #if H_3D_SPIVMP2001 #if NH_3D_SPIVMP 1940 2002 rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth); 1941 2003 if (bSPIVMPFlag[uiMergeCand]) … … 1956 2018 else 1957 2019 #endif 1958 #if H_3D_VSP1959 2020 { 2021 #if NH_3D_VSP 1960 2022 if ( vspFlag[uiMergeCand] ) 1961 2023 { … … 1987 2049 { 1988 2050 #endif 1989 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to CTU level1990 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level1991 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level1992 #if H_3D_VSP2051 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to CTU level 2052 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 2053 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 2054 #if NH_3D_VSP 1993 2055 } 2056 #endif 1994 2057 } 1995 #endif1996 2058 // do MC 1997 2059 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); … … 2027 2089 rpcTempCU->setDISFlagSubParts( false, 0, uhDepth ); 2028 2090 #endif 2029 #if H_3D_VSP // possible bug fix2091 #if NH_3D_VSP 2030 2092 if( rpcTempCU->getSkipFlag(0) ) 2031 2093 { … … 2160 2222 } 2161 2223 DEBUG_STRING_APPEND(sDebug, bestStr) 2162 #if H_3D_SPIVMP 2224 #if NH_3D_ARP 2225 } 2226 #endif 2227 #if NH_3D_SPIVMP 2163 2228 delete[] pcMvFieldSP; 2164 2229 delete[] puhInterDirSP; 2165 2230 #endif 2166 #if H_3D_ARP2167 }2168 #endif2169 2170 2231 } 2171 2232 … … 2184 2245 2185 2246 // prior to this, rpcTempCU will have just been reset using rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 2186 #if H_3D 2247 #if H_3D || NH_3D_ARP 2187 2248 const Bool bTransquantBypassFlag = rpcTempCU->getCUTransquantBypass(0); 2188 2249 #endif … … 2192 2253 #endif 2193 2254 UChar uhDepth = rpcTempCU->getDepth( 0 ); 2194 #if H_3D_ARP2255 #if NH_3D_ARP 2195 2256 Bool bFirstTime = true; 2196 2257 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 2258 #if H_3D_IC 2197 2259 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || rpcTempCU->getICFlag(0) ) 2260 #else 2261 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N ) 2262 #endif 2198 2263 { 2199 2264 nARPWMax = 0; … … 2223 2288 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 2224 2289 rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth ); 2225 #if H_3D_ARP2290 #if NH_3D_ARP 2226 2291 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 2227 2292 #endif 2228 #if H_3D_ARP2293 #if NH_3D_ARP 2229 2294 if( bFirstTime == false && nARPWMax ) 2230 2295 { … … 2249 2314 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] ); 2250 2315 #endif 2251 #if H_3D_ARP2316 #if NH_3D_ARP 2252 2317 if( nARPWMax ) 2253 2318 { … … 2260 2325 if ( !rpcTempCU->getMergeAMP() ) 2261 2326 { 2262 #if H_3D_ARP2327 #if NH_3D_ARP 2263 2328 if( nARPWMax ) 2264 2329 { … … 2281 2346 2282 2347 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false DEBUG_STRING_PASS_INTO(sTest) ); 2283 #if H_3D_VSP // possible bug fix2284 2285 2286 2287 2348 #if NH_3D_VSP 2349 if( rpcTempCU->getQtRootCbf(0)==0 ) 2350 { 2351 rpcTempCU->setTrIdxSubParts(0, 0, uhDepth); 2352 } 2288 2353 #endif 2289 2354 #if NH_3D_VSO // M4 … … 2377 2442 } 2378 2443 #endif 2379 #if H_3D_ARP2444 #if NH_3D_ARP 2380 2445 } 2381 2446 #endif … … 2385 2450 } 2386 2451 2387 #if H_3D_DBBP2452 #if NH_3D_DBBP 2388 2453 Void TEncCu::xInvalidateOriginalSegments( TComYuv* pOrigYuv, TComYuv* pOrigYuvTemp, Bool* pMask, UInt uiValidSegment ) 2389 2454 { 2390 UInt uiWidth = pOrigYuv->getWidth ( 2391 UInt uiHeight = pOrigYuv->getHeight( 2392 Pel* piSrc = pOrigYuv->get LumaAddr();2393 UInt uiSrcStride = pOrigYuv->getStride( );2394 Pel* piDst = pOrigYuvTemp->get LumaAddr();2395 UInt uiDstStride = pOrigYuvTemp->getStride( );2455 UInt uiWidth = pOrigYuv->getWidth (COMPONENT_Y); 2456 UInt uiHeight = pOrigYuv->getHeight(COMPONENT_Y); 2457 Pel* piSrc = pOrigYuv->getAddr(COMPONENT_Y); 2458 UInt uiSrcStride = pOrigYuv->getStride(COMPONENT_Y); 2459 Pel* piDst = pOrigYuvTemp->getAddr(COMPONENT_Y); 2460 UInt uiDstStride = pOrigYuvTemp->getStride(COMPONENT_Y); 2396 2461 2397 2462 UInt uiMaskStride= MAX_CU_SIZE; … … 2418 2483 2419 2484 // now invalidate chroma 2420 Pel* piSrcU = pOrigYuv->get CbAddr();2421 Pel* piSrcV = pOrigYuv->get CrAddr();2422 UInt uiSrcStrideC = pOrigYuv->get CStride();2423 Pel* piDstU = pOrigYuvTemp->get CbAddr();2424 Pel* piDstV = pOrigYuvTemp->get CrAddr();2425 UInt uiDstStrideC = pOrigYuvTemp->get CStride();2485 Pel* piSrcU = pOrigYuv->getAddr(COMPONENT_Cb); 2486 Pel* piSrcV = pOrigYuv->getAddr(COMPONENT_Cr); 2487 UInt uiSrcStrideC = pOrigYuv->getStride(COMPONENT_Cb); 2488 Pel* piDstU = pOrigYuvTemp->getAddr(COMPONENT_Cb); 2489 Pel* piDstV = pOrigYuvTemp->getAddr(COMPONENT_Cr); 2490 UInt uiDstStrideC = pOrigYuvTemp->getStride(COMPONENT_Cb); 2426 2491 pMask = pMaskStart; 2427 2492 … … 2444 2509 } 2445 2510 } 2446 2511 #endif 2512 2513 #if H_3D_DIS 2447 2514 Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize ) 2448 2515 { … … 2518 2585 xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth); 2519 2586 } 2520 2587 #endif 2588 2589 #if NH_3D_DBBP 2521 2590 Void TEncCu::xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG ) 2522 2591 { … … 2540 2609 AOF( uiWidth == uiHeight ); 2541 2610 2542 #if H_3D_DBBP 2543 // Is this correct here, was under the macro SEC_DBBP_DISALLOW_8x8_I0078, however the function is related to Single Depth Mode 2611 #if NH_3D_DBBP 2544 2612 if(uiWidth <= 8) 2545 2613 { … … 2592 2660 rpcTempCU->getDBBPTmpData()->eVirtualPartSize = eVirtualPartSize; 2593 2661 rpcTempCU->getDBBPTmpData()->uiVirtualPartIndex = uiSegment; 2594 m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, false,bUseMRG );2662 m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, bUseMRG ); 2595 2663 m_pcRdCost->setUseMask(false); 2596 2664 … … 2601 2669 pDBBPTmpData->auhMergeIndex[uiSegment] = rpcTempCU->getMergeIndex(0); 2602 2670 2671 #if NH_3D_VSP 2603 2672 AOF( rpcTempCU->getSPIVMPFlag(0) == false ); 2604 2673 AOF( rpcTempCU->getVSPFlag(0) == 0 ); 2674 #endif 2605 2675 2606 2676 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 2621 2691 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 2622 2692 2623 UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( rpcTempCU->getSlice()->getSPS()->getMax CUDepth() - uhDepth ) << 1 ) ) >> 4;2693 UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( rpcTempCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uhDepth ) << 1 ) ) >> 4; 2624 2694 for( UInt uiSegment = 0; uiSegment < 2; uiSegment++ ) 2625 2695 { … … 2647 2717 2648 2718 // reconstruct final prediction signal by combining both segments 2649 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize); 2719 Int bitDepthY = rpcTempCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 2720 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize, bitDepthY); 2650 2721 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false ); 2651 2722
Note: See TracChangeset for help on using the changeset viewer.