Changeset 1262 in 3DVCSoftware for branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp
- Timestamp:
- 29 Jun 2015, 19:43:32 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev4-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp
r1246 r1262 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 … … 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 … … 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 { … … 198 198 } 199 199 200 #if H_3D_ARP200 #if NH_3D_ARP 201 201 if(m_ppcWeightedTempCU) 202 202 { … … 279 279 m_ppcBestCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() ); 280 280 m_ppcTempCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() ); 281 282 #if NH_3D_ARP 283 m_ppcWeightedTempCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() ); 284 #endif 281 285 282 286 #if KWU_RC_MADPRED_E0227 … … 587 591 if( rpcTempCU->getSlice()->getSliceType() != I_SLICE ) 588 592 { 589 #if H_3D_ARP && H_3D_IV_MERGE593 #if NH_3D_ARP && H_3D_IV_MERGE 590 594 if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() ) 591 595 #else 592 #if H_3D_ARP593 if( rpcTempCU->getSlice()->get VPS()->getUseAdvRP(rpcTempCU->getSlice()->getLayerId()) )596 #if NH_3D_ARP 597 if( rpcTempCU->getSlice()->getIvResPredFlag() ) 594 598 #else 595 599 #if H_3D_IV_MERGE … … 1272 1276 TComDataCU* pcSubTempPartCU = m_ppcTempCU[uhNextDepth]; 1273 1277 DEBUG_STRING_NEW(sTempDebug) 1274 1278 #if NH_3D_ARP 1279 m_ppcWeightedTempCU[uhNextDepth]->setSlice( m_ppcWeightedTempCU[ uiDepth]->getSlice()); 1280 m_ppcWeightedTempCU[uhNextDepth]->setPic ( m_ppcWeightedTempCU[ uiDepth] ); 1281 #endif 1275 1282 for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ ) 1276 1283 { … … 1578 1585 1579 1586 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx ); 1580 #if H_3D_ARP1587 #if NH_3D_ARP 1581 1588 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1582 1589 #endif … … 1621 1628 m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false ); 1622 1629 #endif 1623 #if H_3D_ARP1630 #if NH_3D_ARP 1624 1631 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1625 1632 #endif … … 1795 1802 #endif 1796 1803 1797 #if H_3D_ARP1804 #if NH_3D_ARP 1798 1805 DisInfo cOrigDisInfo = rpcTempCU->getDvInfo(0); 1799 1806 #else … … 1802 1809 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level 1803 1810 #if H_3D_VSP 1804 #if ! H_3D_ARP1811 #if !NH_3D_ARP 1805 1812 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1806 1813 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); … … 1832 1839 Int mergeCandBuffer[MRG_MAX_NUM_CANDS]; 1833 1840 #endif 1834 #if H_3D_ARP 1835 for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui ) 1836 #else 1841 1837 1842 for( UInt ui = 0; ui < numValidMergeCand; ++ui ) 1838 #endif1839 1840 1843 { 1841 1844 mergeCandBuffer[ui] = 0; … … 1855 1858 DEBUG_STRING_NEW(bestStr) 1856 1859 1857 #if H_3D_ARP1860 #if NH_3D_ARP 1858 1861 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 1862 #if H_3D_IC 1859 1863 if( nARPWMax < 0 || bICFlag ) 1864 #else 1865 if( nARPWMax < 0 ) 1866 #endif 1860 1867 { 1861 1868 nARPWMax = 0; 1862 1869 } 1863 for( Int nARPW=nARPWMax; nARPW >= 0 ; nARPW-- ) 1864 { 1865 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM*sizeof(Int) ); 1866 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level 1867 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1870 for( Int nARPW = nARPWMax; nARPW >= 0 ; nARPW-- ) 1871 { 1872 #if NH_3D_IV_MERGE 1873 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM * sizeof(Int) ); 1874 #else 1875 memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS * sizeof(Int) ); 1876 #endif 1877 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N , 0 , uhDepth ); // interprets depth relative to LCU level 1878 rpcTempCU->setARPWSubParts ( (UChar)nARPW , 0 , uhDepth ); 1868 1879 #if H_3D_IC 1869 1880 rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth ); 1870 1881 #endif 1871 1882 rpcTempCU->getDvInfo(0) = cOrigDisInfo; 1872 rpcTempCU->setDvInfoSubParts(cOrigDisInfo, 0, 0,uhDepth );1883 rpcTempCU->setDvInfoSubParts(cOrigDisInfo, 0, uhDepth ); 1873 1884 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1874 1885 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); … … 1897 1908 , numValidMergeCand 1898 1909 ); 1899 1900 #else 1901 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, numValidMergeCand ); 1910 #else 1911 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 1902 1912 #endif 1903 1913 … … 1929 1939 rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth ); 1930 1940 #endif 1931 #if H_3D_ARP1932 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );1933 #endif1934 1941 rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag, 0, uhDepth ); 1935 1942 rpcTempCU->setChromaQpAdjSubParts( bTransquantBypassFlag ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth ); … … 1937 1944 rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to CTU level 1938 1945 rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to CTU level 1946 #if NH_3D_ARP 1947 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1948 #endif 1939 1949 #if H_3D_VSP 1940 1950 rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth ); … … 2112 2122 2113 2123 rpcTempCU->initEstData( uhDepth, orgQP, bTransquantBypassFlag ); 2114 2115 2124 if( m_pcEncCfg->getUseFastDecisionForMerge() && !bestIsSkip ) 2116 2125 { … … 2167 2176 delete[] puhInterDirSP; 2168 2177 #endif 2169 #if H_3D_ARP2178 #if NH_3D_ARP 2170 2179 } 2171 2180 #endif … … 2187 2196 2188 2197 // prior to this, rpcTempCU will have just been reset using rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode ); 2189 #if H_3D 2198 #if H_3D || NH_3D_ARP 2190 2199 const Bool bTransquantBypassFlag = rpcTempCU->getCUTransquantBypass(0); 2191 2200 #endif … … 2195 2204 #endif 2196 2205 UChar uhDepth = rpcTempCU->getDepth( 0 ); 2197 #if H_3D_ARP2206 #if NH_3D_ARP 2198 2207 Bool bFirstTime = true; 2199 2208 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 2209 #if H_3D_IC 2200 2210 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || rpcTempCU->getICFlag(0) ) 2211 #else 2212 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N ) 2213 #endif 2201 2214 { 2202 2215 nARPWMax = 0; … … 2226 2239 rpcTempCU->setPredModeSubParts ( MODE_INTER, 0, uhDepth ); 2227 2240 rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth ); 2228 #if H_3D_ARP2229 2230 #endif 2231 #if H_3D_ARP2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2241 #if NH_3D_ARP 2242 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 2243 #endif 2244 #if NH_3D_ARP 2245 if( bFirstTime == false && nARPWMax ) 2246 { 2247 rpcTempCU->copyPartFrom( m_ppcWeightedTempCU[uhDepth] , 0 , uhDepth ); 2248 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 2249 2250 m_pcPredSearch->motionCompensation( rpcTempCU , m_ppcPredYuvTemp[uhDepth] ); 2251 } 2252 else 2253 { 2254 bFirstTime = false; 2242 2255 #endif 2243 2256 #if AMP_MRG … … 2252 2265 m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] ); 2253 2266 #endif 2254 #if H_3D_ARP2255 2256 2257 2258 2259 2267 #if NH_3D_ARP 2268 if( nARPWMax ) 2269 { 2270 m_ppcWeightedTempCU[uhDepth]->copyPartFrom( rpcTempCU , 0 , uhDepth ); 2271 } 2272 } 2260 2273 #endif 2261 2274 … … 2263 2276 if ( !rpcTempCU->getMergeAMP() ) 2264 2277 { 2265 #if H_3D_ARP2266 2267 2268 2269 2270 2278 #if NH_3D_ARP 2279 if( nARPWMax ) 2280 { 2281 continue; 2282 } 2283 else 2271 2284 #endif 2272 2285 return; … … 2380 2393 } 2381 2394 #endif 2382 #if H_3D_ARP2395 #if NH_3D_ARP 2383 2396 } 2384 2397 #endif
Note: See TracChangeset for help on using the changeset viewer.