Changeset 1390 in 3DVCSoftware for branches/HTM-16.0-MV-draft-5/source/Lib/TLibCommon/TComPicYuv.cpp
- Timestamp:
- 13 Nov 2015, 17:00:20 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/HTM-16.0-MV-draft-5/source/Lib/TLibCommon/TComPicYuv.cpp ¶
r1386 r1390 90 90 m_picHeight = picHeight; 91 91 92 #if NH_3D_IV_MERGE93 m_iCuWidth = maxCUWidth;94 m_iCuHeight = maxCUHeight;95 96 m_iNumCuInWidth = picWidth / m_iCuWidth;97 m_iNumCuInWidth += ( picHeight % m_iCuWidth ) ? 1 : 0;98 // Check if m_iBaseUnitWidth and m_iBaseUnitHeight need to be derived here99 #endif100 92 101 93 m_chromaFormatIDC = chromaFormatIDC; … … 138 130 createWithoutCUInfo(picWidth, picHeight, chromaFormatIDC, bUseMargin, maxCUWidth, maxCUHeight); 139 131 140 #if NH_3D_IV_MERGE141 m_iBaseUnitWidth = maxCUWidth >> maxCUDepth;142 m_iBaseUnitHeight = maxCUHeight >> maxCUDepth;143 #endif144 132 145 133 … … 347 335 fclose(pFile); 348 336 } 349 #if NH_3D_IV_MERGE 350 Void 351 TComPicYuv::getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY ) 352 { 353 Int iRastPartIdx = g_auiZscanToRaster[iAbsZorderIdx]; 354 Int iCuSizeInBases = m_iCuWidth / m_iBaseUnitWidth; 355 Int iCuX = iCuAddr % m_iNumCuInWidth; 356 Int iCuY = iCuAddr / m_iNumCuInWidth; 357 Int iBaseX = iRastPartIdx % iCuSizeInBases; 358 Int iBaseY = iRastPartIdx / iCuSizeInBases; 359 riX = iCuX * m_iCuWidth + iBaseX * m_iBaseUnitWidth; 360 riY = iCuY * m_iCuHeight + iBaseY * m_iBaseUnitHeight; 361 } 362 363 Void 364 TComPicYuv::getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ) 365 { 366 Int iCuX = iX / m_iCuWidth; 367 Int iCuY = iY / m_iCuHeight; 368 Int iBaseX = ( iX - iCuX * m_iCuWidth ) / m_iBaseUnitWidth; 369 Int iBaseY = ( iY - iCuY * m_iCuHeight ) / m_iBaseUnitHeight; 370 Int iCuSizeInBases = m_iCuWidth / m_iBaseUnitWidth; 371 riCuAddr = iCuY * m_iNumCuInWidth + iCuX; 372 Int iRastPartIdx = iBaseY * iCuSizeInBases + iBaseX; 373 riAbsZorderIdx = g_auiRasterToZscan[ iRastPartIdx ]; 374 } 375 376 #endif 377 378 #if NH_3D_VSO 379 Void TComPicYuv::setChromaTo( Pel pVal ) 380 { 381 xSetPels( getAddr( COMPONENT_Cb ), getStride( COMPONENT_Cb ), getWidth( COMPONENT_Cb), getHeight( COMPONENT_Cb ), pVal ); 382 xSetPels( getAddr( COMPONENT_Cr ), getStride( COMPONENT_Cr ), getWidth( COMPONENT_Cr), getHeight( COMPONENT_Cr ), pVal ); 383 } 384 385 Void TComPicYuv::xSetPels( Pel* piPelSource , Int iSourceStride, Int iWidth, Int iHeight, Pel iVal ) 386 { 387 for (Int iYPos = 0; iYPos < iHeight; iYPos++) 388 { 389 for (Int iXPos = 0; iXPos < iWidth; iXPos++) 390 { 391 piPelSource[iXPos] = iVal; 392 } 393 piPelSource += iSourceStride; 394 } 395 } 396 #endif 337 397 338 //! \}
Note: See TracChangeset for help on using the changeset viewer.