Changeset 371 in SHVCSoftware for branches


Ignore:
Timestamp:
28 Aug 2013, 04:08:11 (11 years ago)
Author:
seregin
Message:

remove alternative implementation of getBaseColCU

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.1-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r370 r371  
    39493949TComDataCU*  TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase )
    39503950{
    3951 #if 1 // it should provide identical resutls
    39523951  UInt uiPelX = getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiCuAbsPartIdx] ];
    39533952  UInt uiPelY = getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiCuAbsPartIdx] ];
    39543953
    39553954  return getBaseColCU( refLayerIdc, uiPelX, uiPelY, uiCUAddrBase, uiAbsPartIdxBase );
    3956 #else
    3957   TComPic* cBaseColPic = m_pcSlice->getBaseColPic();
    3958 
    3959 #if SVC_UPSAMPLING
    3960   Int widthBL   = cBaseColPic->getPicYuvRec()->getWidth () - cBaseColPic->getPicYuvRec()->getPicCropLeftOffset() - cBaseColPic->getPicYuvRec()->getPicCropRightOffset();
    3961   Int heightBL  = cBaseColPic->getPicYuvRec()->getHeight() - cBaseColPic->getPicYuvRec()->getPicCropTopOffset() - cBaseColPic->getPicYuvRec()->getPicCropBottomOffset();
    3962 
    3963   Int widthEL   = m_pcPic->getPicYuvRec()->getWidth() - m_pcPic->getPicYuvRec()->getPicCropLeftOffset() - m_pcPic->getPicYuvRec()->getPicCropRightOffset();
    3964   Int heightEL  = m_pcPic->getPicYuvRec()->getHeight() - m_pcPic->getPicYuvRec()->getPicCropTopOffset() - m_pcPic->getPicYuvRec()->getPicCropBottomOffset();
    3965 #else
    3966   Int widthBL   = cBaseColPic->getPicYuvRec()->getWidth();
    3967   Int heightBL  = cBaseColPic->getPicYuvRec()->getHeight();
    3968 
    3969   Int widthEL   = m_pcPic->getPicYuvRec()->getWidth();
    3970   Int heightEL  = m_pcPic->getPicYuvRec()->getHeight();
    3971 #endif
    3972 
    3973   if (widthBL == widthEL && heightEL == heightBL)
    3974   {
    3975     uiAbsPartIdxBase = uiCuAbsPartIdx + m_uiAbsIdxInLCU;
    3976     uiCUAddrBase = m_uiCUAddr;
    3977   }
    3978   else
    3979   {
    3980     UInt uiMinUnitSize = m_pcPic->getMinCUWidth();
    3981     UInt uiRasterAddr  = g_auiZscanToRaster[uiCuAbsPartIdx];
    3982     UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth();
    3983 
    3984     Int iEX = m_uiCUPelX + uiMinUnitSize*(uiRasterAddr%uiNumPartInCUWidth);
    3985     Int iEY = m_uiCUPelY + uiMinUnitSize*(uiRasterAddr/uiNumPartInCUWidth);
    3986 
    3987     Int iBX = (iEX*widthBL + widthEL/2)/widthEL;
    3988     Int iBY = (iEY*heightBL+ heightEL/2)/heightEL;
    3989 
    3990     uiCUAddrBase = (iBY/g_uiMaxCUHeight)*cBaseColPic->getFrameWidthInCU() + (iBX/g_uiMaxCUWidth);
    3991 
    3992     assert(uiCUAddrBase < cBaseColPic->getNumCUsInFrame());
    3993    
    3994     UInt uiRasterAddrBase = (iBY - (iBY/g_uiMaxCUHeight)*g_uiMaxCUHeight)/uiMinUnitSize*cBaseColPic->getNumPartInWidth()
    3995                           + (iBX - (iBX/g_uiMaxCUWidth)*g_uiMaxCUWidth)/uiMinUnitSize;
    3996 
    3997     uiAbsPartIdxBase = g_auiRasterToZscan[uiRasterAddrBase];
    3998   }
    3999 
    4000   return cBaseColPic->getCU(uiCUAddrBase);
    4001 #endif
    40023955}
    40033956
Note: See TracChangeset for help on using the changeset viewer.