Changeset 1074 in 3DVCSoftware for branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComWedgelet.cpp
- Timestamp:
- 21 Oct 2014, 20:39:50 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComWedgelet.cpp
r1039 r1074 68 68 m_uiHeight ( rcWedge.m_uiHeight ), 69 69 m_pbPattern( (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) ) ) 70 #if SHARP_DMM1_I011071 70 ,m_pbScaledPattern( g_wedgePattern ) 72 #endif73 71 { 74 72 ::memcpy( m_pbPattern, rcWedge.m_pbPattern, sizeof(Bool) * (m_uiWidth * m_uiHeight)); … … 88 86 89 87 m_pbPattern = (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) ); 90 #if SHARP_DMM1_I011091 88 m_pbScaledPattern = g_wedgePattern; 92 #endif93 89 } 94 90 … … 187 183 switch( m_eWedgeRes ) 188 184 { 189 #if !SHARP_DMM1_I0110190 case( DOUBLE_PEL ): { uiTempBlockSize = m_uiWidth; uhXs = (m_uhXs<<1); uhYs = (m_uhYs<<1); uhXe = (m_uhXe<<1); uhYe = (m_uhYe<<1); } break;191 #endif192 185 case( FULL_PEL ): { uiTempBlockSize = m_uiWidth; uhXs = m_uhXs; uhYs = m_uhYs; uhXe = m_uhXe; uhYe = m_uhYe; } break; 193 186 case( HALF_PEL ): { uiTempBlockSize = (m_uiWidth<<1); uhXs = m_uhXs; uhYs = m_uhYs; uhXe = m_uhXe; uhYe = m_uhYe; } break; 194 187 } 195 196 #if !SHARP_DMM1_I0110197 if( m_eWedgeRes == DOUBLE_PEL) // adjust line-end for DOUBLE_PEL resolution198 {199 if( m_uhOri == 1 ) { uhXs = uiTempBlockSize-1; }200 if( m_uhOri == 2 ) { uhXe = uiTempBlockSize-1; uhYs = uiTempBlockSize-1; }201 if( m_uhOri == 3 ) { uhYe = uiTempBlockSize-1; }202 if( m_uhOri == 4 ) { uhYe = uiTempBlockSize-1; }203 if( m_uhOri == 5 ) { uhXs = uiTempBlockSize-1; }204 }205 #endif206 188 207 189 Bool* pbTempPattern = new Bool[ (uiTempBlockSize * uiTempBlockSize) ]; … … 233 215 switch( m_eWedgeRes ) 234 216 { 235 #if !SHARP_DMM1_I0110236 case( DOUBLE_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break;237 #endif238 217 case( FULL_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break; 239 218 case( HALF_PEL ): // sub-sampling by factor 2 … … 327 306 } 328 307 329 #if SHARP_DMM1_I0110330 308 Bool* TComWedgelet::getScaledPattern(UInt uiDstSize) 331 309 { 332 Bool *pbSrcPat = this->getPattern(); 333 UInt uiSrcSize = this->getStride(); 334 335 Int scale = (g_aucConvertToBit[uiDstSize] - g_aucConvertToBit[uiSrcSize]); 336 assert(scale>=0); 337 for (Int y=0; y<uiDstSize; y++) 338 { 339 for (Int x=0; x<uiDstSize; x++) 340 { 341 Int srcX = x>>scale; 342 Int srcY = y>>scale; 343 m_pbScaledPattern[y*uiDstSize + x] = pbSrcPat[ srcY*uiSrcSize + srcX ]; 344 } 345 } 346 return m_pbScaledPattern; 347 } 348 #endif 310 Bool *pbSrcPat = this->getPattern(); 311 UInt uiSrcSize = this->getStride(); 312 313 Int scale = (g_aucConvertToBit[uiDstSize] - g_aucConvertToBit[uiSrcSize]); 314 assert(scale>=0); 315 for (Int y=0; y<uiDstSize; y++) 316 { 317 for (Int x=0; x<uiDstSize; x++) 318 { 319 Int srcX = x>>scale; 320 Int srcY = y>>scale; 321 m_pbScaledPattern[y*uiDstSize + x] = pbSrcPat[ srcY*uiSrcSize + srcX ]; 322 } 323 } 324 return m_pbScaledPattern; 325 } 349 326 350 327 TComWedgeNode::TComWedgeNode()
Note: See TracChangeset for help on using the changeset viewer.