Changeset 251 in 3DVCSoftware for branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.cpp
- Timestamp:
- 4 Feb 2013, 01:35:46 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.cpp
r242 r251 2136 2136 } 2137 2137 2138 #if LGE_DMM3_SIMP_C0044 2139 /** 2140 - fetch best Wedgelet pattern at decoder 2141 */ 2142 UInt TComPrediction::getBestWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt IntraTabIdx) 2143 { 2144 assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE ); 2145 2146 UInt uiBestTabIdx = 0; 2147 TComPic* pcPicTex = pcCU->getSlice()->getTexturePic(); 2148 TComDataCU* pcColTexCU = pcPicTex->getCU(pcCU->getAddr()); 2149 UInt uiTexPartIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 2150 Int uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255; 2151 2152 std::vector< std::vector<UInt> > pauiWdgLstSz = g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]]; 2153 2154 if( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 ) 2155 { 2156 std::vector<UInt>* pauiWdgLst = &pauiWdgLstSz[uiColTexIntraDir-2]; 2157 uiBestTabIdx = pauiWdgLst->at(IntraTabIdx); 2158 } 2159 else 2160 { 2161 WedgeNodeList* pacWedgeNodeList = &g_aacWedgeNodeLists[(g_aucConvertToBit[uiWidth])]; 2162 uiBestTabIdx = pacWedgeNodeList->at(IntraTabIdx).getPatternIdx(); 2163 } 2164 2165 return uiBestTabIdx; 2166 } 2167 #endif 2168 2169 #if LGE_DMM3_SIMP_C0044 2170 /** 2171 - calculate best Wedgelet pattern at encoder 2172 */ 2173 UInt TComPrediction::getBestWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Pel* piOrigi, UInt uiStride, UInt & ruiIntraTabIdx) 2174 #else 2138 2175 UInt TComPrediction::getBestWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight ) 2176 #endif 2139 2177 { 2140 2178 assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE ); … … 2164 2202 Int iDC2 = 0; 2165 2203 WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])]; 2166 2204 #if LGE_DMM3_SIMP_C0044 2205 ruiIntraTabIdx = 0; 2206 #endif 2167 2207 #if HHIQC_DMMFASTSEARCH_B0039 2168 2208 TComPic* pcPicTex = pcCU->getSlice()->getTexturePic(); … … 2178 2218 { 2179 2219 UInt uiIdx = pauiWdgLst->at(uiIdxW); 2220 #if LGE_DMM3_SIMP_C0044 2221 calcWedgeDCs ( &(pacWedgeList->at(uiIdx)), piOrigi, uiWidth, iDC1, iDC2 ); 2222 #else 2180 2223 calcWedgeDCs ( &(pacWedgeList->at(uiIdx)), piRefBlkY, uiWidth, iDC1, iDC2 ); 2224 #endif 2181 2225 assignWedgeDCs2Pred( &(pacWedgeList->at(uiIdx)), piPred, uiPredStride, iDC1, iDC2 ); 2182 2226 2227 #if LGE_DMM3_SIMP_C0044 2228 UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piOrigi, uiStride, uiWidth, uiHeight, WedgeDist_SAD ); 2229 #else 2183 2230 UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD ); 2231 #endif 2184 2232 2185 2233 if( uiActDist < uiBestDist || uiBestDist == MAX_UINT ) … … 2187 2235 uiBestDist = uiActDist; 2188 2236 uiBestTabIdx = uiIdx; 2237 #if LGE_DMM3_SIMP_C0044 2238 ruiIntraTabIdx = uiIdxW; 2239 #endif 2189 2240 } 2190 2241 } … … 2197 2248 for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ ) 2198 2249 { 2250 #if LGE_DMM3_SIMP_C0044 2251 calcWedgeDCs ( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piOrigi, uiWidth, iDC1, iDC2 ); 2252 #else 2199 2253 calcWedgeDCs ( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piRefBlkY, uiWidth, iDC1, iDC2 ); 2254 #endif 2200 2255 assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piPred, uiPredStride, iDC1, iDC2 ); 2201 2256 2257 #if LGE_DMM3_SIMP_C0044 2258 UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piOrigi, uiStride, uiWidth, uiHeight, WedgeDist_SAD ); 2259 #else 2202 2260 UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD ); 2261 #endif 2203 2262 2204 2263 if( uiActDist < uiBestNodeDist || uiBestNodeDist == MAX_UINT ) … … 2206 2265 uiBestNodeDist = uiActDist; 2207 2266 uiBestNodeId = uiNodeId; 2208 } 2209 } 2210 2267 #if LGE_DMM3_SIMP_C0044 2268 ruiIntraTabIdx = uiNodeId; 2269 #endif 2270 } 2271 } 2272 #if LGE_DMM3_SIMP_C0044 2273 uiBestTabIdx = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx(); 2274 #else 2211 2275 // refinement 2212 2276 uiBestDist = uiBestNodeDist; … … 2228 2292 } 2229 2293 } 2294 #endif 2230 2295 } 2231 2296 #else … … 2282 2347 { 2283 2348 // decoder: get and store wedge pattern in CU 2349 // decoder: get and store wedge pattern in CU 2350 #if LGE_DMM3_SIMP_C0044 2351 UInt uiIntraTabIdx = pcCU->getWedgePredTexIntraTabIdx ( uiAbsPartIdx ); 2352 uiTextureWedgeTabIdx = getBestWedgeFromTex( pcCU, uiAbsPartIdx, (UInt)iWidth, (UInt)iHeight, uiIntraTabIdx ); 2353 #else 2284 2354 uiTextureWedgeTabIdx = getBestWedgeFromTex( pcCU, uiAbsPartIdx, (UInt)iWidth, (UInt)iHeight ); 2355 #endif 2285 2356 2286 2357 UInt uiDepth = (pcCU->getDepth(0)) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1);
Note: See TracChangeset for help on using the changeset viewer.