Changeset 1001 in 3DVCSoftware for branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComWedgelet.cpp
- Timestamp:
- 18 Jul 2014, 06:18:17 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-11.2-dev3-Sharp/source/Lib/TLibCommon/TComWedgelet.cpp
r655 r1001 68 68 m_uiHeight ( rcWedge.m_uiHeight ), 69 69 m_pbPattern( (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) ) ) 70 #if SHARP_DMM1_I0110 71 ,m_pbScaledPattern( g_wedgePattern ) 72 #endif 70 73 { 71 74 ::memcpy( m_pbPattern, rcWedge.m_pbPattern, sizeof(Bool) * (m_uiWidth * m_uiHeight)); … … 85 88 86 89 m_pbPattern = (Bool*)xMalloc( Bool, (m_uiWidth * m_uiHeight) ); 90 #if SHARP_DMM1_I0110 91 m_pbScaledPattern = g_wedgePattern; 92 #endif 87 93 } 88 94 … … 181 187 switch( m_eWedgeRes ) 182 188 { 189 #if !SHARP_DMM1_I0110 183 190 case( DOUBLE_PEL ): { uiTempBlockSize = m_uiWidth; uhXs = (m_uhXs<<1); uhYs = (m_uhYs<<1); uhXe = (m_uhXe<<1); uhYe = (m_uhYe<<1); } break; 191 #endif 184 192 case( FULL_PEL ): { uiTempBlockSize = m_uiWidth; uhXs = m_uhXs; uhYs = m_uhYs; uhXe = m_uhXe; uhYe = m_uhYe; } break; 185 193 case( HALF_PEL ): { uiTempBlockSize = (m_uiWidth<<1); uhXs = m_uhXs; uhYs = m_uhYs; uhXe = m_uhXe; uhYe = m_uhYe; } break; 186 194 } 187 195 196 #if !SHARP_DMM1_I0110 188 197 if( m_eWedgeRes == DOUBLE_PEL) // adjust line-end for DOUBLE_PEL resolution 189 198 { … … 194 203 if( m_uhOri == 5 ) { uhXs = uiTempBlockSize-1; } 195 204 } 205 #endif 196 206 197 207 Bool* pbTempPattern = new Bool[ (uiTempBlockSize * uiTempBlockSize) ]; … … 223 233 switch( m_eWedgeRes ) 224 234 { 235 #if !SHARP_DMM1_I0110 225 236 case( DOUBLE_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break; 237 #endif 226 238 case( FULL_PEL ): { for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ ) { m_pbPattern[k] = pbTempPattern[k]; }; } break; 227 239 case( HALF_PEL ): // sub-sampling by factor 2 … … 315 327 } 316 328 329 #if SHARP_DMM1_I0110 330 Bool* TComWedgelet::getScaledPattern(UInt uiDstSize) 331 { 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 349 317 350 TComWedgeNode::TComWedgeNode() 318 351 {
Note: See TracChangeset for help on using the changeset viewer.