Ignore:
Timestamp:
13 Jul 2015, 15:22:02 (9 years ago)
Author:
tech
Message:

Merged 14.1-update-dev4-Qualcomm@1266

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev3/source/Lib/TLibCommon/TComDataCU.cpp

    r1268 r1270  
    134134  m_pbSPIVMPFlag         = NULL;
    135135#endif
    136 #if H_3D_ARP
     136#if NH_3D_ARP
    137137  m_puhARPW              = NULL;
    138138#endif
     
    142142#if H_3D_INTER_SDC
    143143#endif
    144 #if H_3D_DBBP
     144#if NH_3D_DBBP
    145145  m_pbDBBPFlag         = NULL;
    146146#endif
     
    249249    }
    250250
    251 #if H_3D_ARP
    252     m_puhARPW            = new UChar[ uiNumPartition];
     251#if NH_3D_ARP
     252    m_puhARPW            = (UChar*  )xMalloc(UChar,   uiNumPartition);
    253253#endif
    254254#if H_3D_IC
     
    273273#endif
    274274#endif
    275 #if H_3D_DBBP
     275#if NH_3D_DBBP
    276276    m_pbDBBPFlag         = (Bool*  )xMalloc(Bool,   uiNumPartition);
    277277#endif
     
    472472
    473473
    474 #if H_3D_ARP
    475     if ( m_puhARPW            ) { delete[] m_puhARPW;           m_puhARPW           = NULL; }
     474#if NH_3D_ARP
     475    if ( m_puhARPW            ) { xFree(m_puhARPW);             m_puhARPW           = NULL; }
    476476#endif
    477477#if H_3D_IC
     
    497497#endif   
    498498#endif   
    499 #if H_3D_DBBP
     499#if NH_3D_DBBP
    500500    if ( m_pbDBBPFlag         ) { xFree(m_pbDBBPFlag);          m_pbDBBPFlag        = NULL; }
    501501#endif
     
    602602  memset( m_puhHeight         , maxCUHeight,                m_uiNumPartition * sizeof( *m_puhHeight ) );
    603603
    604 #if H_3D_ARP
    605     m_puhARPW   [ui] = pcFrom->getARPW( ui );
    606 #endif
    607604#if H_3D_IC
    608605    m_pbICFlag[ui]   =  pcFrom->m_pbICFlag[ui];
     
    636633    m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui];
    637634#endif
    638 #if H_3D_DBBP
    639     m_pbDBBPFlag[ui] = pcFrom->m_pbDBBPFlag[ui];
     635#if NH_3D_DBBP
     636  memset( m_pbDBBPFlag , false, m_uiNumPartition * sizeof( *m_pbDBBPFlag ));
    640637#endif
    641638#if H_3D
     
    649646  }
    650647
    651 #if H_3D_ARP
    652     memset( m_puhARPW           + firstElement, 0,                        numElements * sizeof( UChar )         );
     648#if NH_3D_ARP
     649  memset( m_puhARPW      ,      0,        m_uiNumPartition * sizeof( *m_puhARPW )         );
    653650#endif
    654651#if H_3D_IC
     
    676673    m_apDmmPredictor[0] = 0;
    677674    m_apDmmPredictor[1] = 0;
    678 #endif
    679 #if H_3D_DBBP
    680     memset( m_pbDBBPFlag        + firstElement, false,                    numElements * sizeof( *m_pbDBBPFlag ) );
    681675#endif
    682676
     
    810804      m_puhCbf[comp][ui] = 0;
    811805    }
    812 #if H_3D_ARP
     806#if NH_3D_ARP
    813807      m_puhARPW[ui] = 0;
    814808#endif
     
    838832      m_apDmmPredictor[1] = 0;
    839833#endif
    840 #if H_3D_DBBP
     834#if NH_3D_DBBP
    841835      m_pbDBBPFlag[ui] = false;
    842836#endif
     
    916910    memset( m_explicitRdpcmMode[comp],             NUMBER_OF_RDPCM_MODES, iSizeInUchar );
    917911  }
    918 #if H_3D_ARP
    919   memset( m_puhARPW,            0, iSizeInUchar  );
    920 #endif
    921912
    922913  memset( m_puhDepth,     uiDepth, iSizeInUchar );
     
    924915  memset( m_puhHeight,         uhHeight, iSizeInUchar );
    925916  memset( m_pbIPCMFlag,        0, iSizeInBool  );
     917#if NH_3D_ARP
     918  memset( m_puhARPW,           0, iSizeInUchar  );
     919#endif
    926920#if H_3D_IC
    927921  memset( m_pbICFlag,          0, iSizeInBool  );
     
    947941  m_apDmmPredictor[1] = 0;
    948942#endif
    949 #if H_3D_DBBP
    950   memset( m_pbDBBPFlag,         0, iSizeInBool  );
     943#if NH_3D_DBBP
     944  memset( m_pbDBBPFlag,         0, sizeof(Bool) * m_uiNumPartition  );
    951945#endif
    952946
     
    981975    m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui];
    982976#endif
    983 #if H_3D_ARP
     977#if NH_3D_ARP
    984978      m_puhARPW           [ui] = pcCU->getARPW( uiPartOffset+ui );
    985979#endif
     
    1005999#endif
    10061000#endif
    1007 #if H_3D_DBBP
     1001#if NH_3D_DBBP
    10081002      m_pbDBBPFlag[ui]=pcCU->m_pbDBBPFlag[uiPartOffset+ui];
    10091003#endif
     
    10881082  m_pbSPIVMPFlag        = pcCU->getSPIVMPFlag()          + uiPart;
    10891083#endif
    1090 #if H_3D_ARP
     1084#if NH_3D_ARP
    10911085  m_puhARPW             = pcCU->getARPW()             + uiPart;
    10921086#endif
     
    11281122#endif 
    11291123#endif 
    1130 #if H_3D_DBBP
     1124#if NH_3D_DBBP
    11311125  m_pbDBBPFlag              = pcCU->getDBBPFlag()         + uiPart;
    11321126#endif
     
    12461240  m_apiMVPIdx[eRefPicList] = pcCU->getMVPIdx(eRefPicList) + uiAbsPartIdx;
    12471241  m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx;
    1248 #if H_3D_ARP
     1242#if NH_3D_ARP
    12491243  m_puhARPW            = pcCU->getARPW()                  + uiAbsPartIdx;
    12501244#endif   
    1251 #if H_3D_DBBP
     1245#if NH_3D_DBBP
    12521246  m_pbDBBPFlag       = pcCU->getDBBPFlag()              + uiAbsPartIdx;
    12531247#endif
     
    12981292  memcpy( m_pDvInfo             + uiOffset, pcCU->getDvInfo(),            sizeof( *m_pDvInfo ) * uiNumPartition );
    12991293#endif
    1300 #if NH_3D_SPIVMP
     1294#if NH_3D_SPIVMP  || NH_3D_DBBP
    13011295  memcpy( m_pbSPIVMPFlag        + uiOffset, pcCU->getSPIVMPFlag(),        sizeof( Bool ) * uiNumPartition );
    13021296#endif
     
    13351329#endif
    13361330#endif
    1337 #if H_3D_DBBP
     1331#if NH_3D_DBBP
    13381332  memcpy( m_pbDBBPFlag          + uiOffset, pcCU->getDBBPFlag(),          iSizeInBool  );
     1333#endif
     1334#if NH_3D_ARP
     1335  memcpy( m_puhARPW             + uiOffset, pcCU->getARPW(),              iSizeInUchar );
    13391336#endif
    13401337
     
    13781375  }
    13791376
    1380 #if H_3D_ARP
    1381   memcpy( m_puhARPW             + uiOffset, pcCU->getARPW(),              iSizeInUchar );
    1382 #endif
    13831377#if H_3D_IC
    13841378  memcpy( m_pbICFlag            + uiOffset, pcCU->getICFlag(),            iSizeInBool );
     
    14241418  memcpy( pCtu->getVSPFlag()           + m_absZIdxInCtu, m_piVSPFlag,           sizeof( Char ) * m_uiNumPartition );
    14251419#endif
     1420#if NH_3D_DBBP
     1421  memcpy( pCtu->getDvInfo()            + m_absZIdxInCtu, m_pDvInfo,             sizeof( *m_pDvInfo ) * m_uiNumPartition );
     1422#endif
    14261423#if NH_3D_SPIVMP
    14271424  memcpy( pCtu->getSPIVMPFlag()        + m_absZIdxInCtu, m_pbSPIVMPFlag,        sizeof( Bool ) * m_uiNumPartition );
     
    14621459#endif
    14631460#endif
    1464 #if H_3D_DBBP
    1465   memcpy( rpcCU->getDBBPFlag()          + m_uiAbsIdxInLCU, m_pbDBBPFlag,          iSizeInBool  );
     1461#if NH_3D_DBBP
     1462  memcpy( pCtu->getDBBPFlag()          + m_absZIdxInCtu, m_pbDBBPFlag,          iSizeInBool  );
     1463#endif
     1464#if NH_3D_ARP
     1465  memcpy( pCtu->getARPW()              + m_absZIdxInCtu, m_puhARPW,             iSizeInUchar );
    14661466#endif
    14671467
     
    14981498  }
    14991499
    1500 #if H_3D_ARP
    1501   memcpy( rpcCU->getARPW()             + m_uiAbsIdxInLCU, m_puhARPW,             iSizeInUchar );
    1502 #endif
    15031500#if H_3D_IC
    15041501  memcpy( rpcCU->getICFlag()           + m_uiAbsIdxInLCU, m_pbICFlag,            iSizeInBool );
     
    15331530  memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart);
    15341531#endif
    1535 #endif
    1536 #if H_3D_DBBP
    1537   memcpy( rpcCU->getDBBPFlag()          + uiPartOffset, m_pbDBBPFlag,          iSizeInBool  );
    1538 #endif
    1539 #if H_3D_ARP
    1540   memcpy( rpcCU->getARPW()             + uiPartOffset, m_puhARPW,             iSizeInUchar );
    15411532#endif
    15421533#if H_3D_IC
     
    20942085  return uiCtx;
    20952086}
    2096 #if H_3D_ARP
     2087#if NH_3D_ARP
    20972088UInt TComDataCU::getCTXARPWFlag( UInt uiAbsPartIdx )
    20982089{
     
    21012092  UInt        uiCtx = 0;
    21022093 
    2103   pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
     2094  pcTempCU = getPULeft( uiTempPartIdx, m_absZIdxInCtu + uiAbsPartIdx );
    21042095  uiCtx    = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0;
    21052096    return uiCtx;
    21062097}
    21072098#endif
    2108 #if H_3D_DBBP
     2099#if NH_3D_DBBP
    21092100Pel* TComDataCU::getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride)
    21102101{
     2102  const TComSPS* sps = getSlice()->getSPS();
     2103  UInt uiMaxCUWidth = sps->getMaxCUWidth();
     2104  UInt uiMaxCUHeight = sps->getMaxCUHeight();
     2105 
    21112106  // get coded and reconstructed depth view
    21122107  TComPicYuv* depthPicYuv = NULL;
     
    21142109 
    21152110  // DBBP is a texture coding tool
    2116   if( getSlice()->getIsDepth() )
    2117   {
    2118     return NULL;
    2119   } 
     2111  assert( !getSlice()->getIsDepth() );
     2112 
    21202113#if H_3D_FCO
    21212114  TComPic* depthPic = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
     
    21442137    depthPicYuv   = baseDepthPic->getPicYuvRec();
    21452138    depthPicYuv->extendPicBorder();
    2146     uiDepthStride = depthPicYuv->getStride();
     2139    uiDepthStride = depthPicYuv->getStride(COMPONENT_Y);
    21472140   
    2148     Int iBlkX = ( getAddr() % baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ];
    2149     Int iBlkY = ( getAddr() / baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ];
     2141    Int iBlkX = ( getCtuRsAddr() % baseDepthPic->getFrameWidthInCtus() ) * uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ getZorderIdxInCtu()+uiAbsPartIdx ] ];
     2142    Int iBlkY = ( getCtuRsAddr() / baseDepthPic->getFrameWidthInCtus() ) * uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ getZorderIdxInCtu()+uiAbsPartIdx ] ];
    21502143   
    2151     Int iPictureWidth  = depthPicYuv->getWidth();
    2152     Int iPictureHeight = depthPicYuv->getHeight();
     2144    Int iPictureWidth  = depthPicYuv->getWidth(COMPONENT_Y);
     2145    Int iPictureHeight = depthPicYuv->getHeight(COMPONENT_Y);
    21532146   
    21542147   
     
    21672160    Int depthPosY = Clip3(0,   iPictureHeight - 1, iBlkY + ((cDv.getVer()+2)>>2));
    21682161   
    2169     pDepthPels = depthPicYuv->getLumaAddr() + depthPosX + depthPosY * uiDepthStride;
     2162    pDepthPels = depthPicYuv->getAddr(COMPONENT_Y) + depthPosX + depthPosY * uiDepthStride;
    21702163  }
    21712164#endif
     
    21792172#endif
    21802173
    2181 #if H_3D_DBBP
     2174#if NH_3D_DBBP
    21822175Void TComDataCU::setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    21832176{
     
    27232716
    27242717// This is for use by a leaf/sub CU object only, with no additional AbsPartIdx
    2725 #if H_3D_IC | NH_3D_VSP
     2718#if H_3D_IC || NH_3D_VSP
    27262719Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU)
    27272720{
     
    33383331  Bool bICFlag = getICFlag(uiAbsPartIdx);
    33393332#endif
    3340 #if H_3D_ARP
     3333#if NH_3D_ARP
    33413334  Bool bARPFlag = getARPW(uiAbsPartIdx) > 0;
    33423335#endif
    3343 #if H_3D_DBBP
     3336#if NH_3D_DBBP
    33443337  Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx);
    33453338  assert(bDBBPFlag == getDBBPFlag(0)); 
     
    33753368      && !bICFlag
    33763369#endif
    3377 #if H_3D_ARP
     3370#if NH_3D_ARP
    33783371      && !bARPFlag
    33793372#endif
    3380 #if H_3D_DBBP
     3373#if NH_3D_DBBP
    33813374      && !bDBBPFlag
    33823375#endif
     
    37073700        spiMvpFlag = true;
    37083701      }
    3709 #if H_3D_DBBP
     3702#if NH_3D_DBBP
    37103703      spiMvpFlag &= !bDBBPFlag;
    37113704#endif
     
    37413734      !bICFlag &&
    37423735#endif
    3743 #if H_3D_ARP
     3736#if NH_3D_ARP
    37443737      !bARPFlag &&
    37453738#endif
     
    37473740      (nPSW + nPSH > 12) &&
    37483741#endif
    3749 #if H_3D_DBBP
     3742#if NH_3D_DBBP
    37503743      !bDBBPFlag &&
    37513744#endif
     
    44764469  UInt partAddr;
    44774470
    4478 #if H_3D_DBBP
     4471#if NH_3D_DBBP
    44794472  if( getDBBPFlag(0) )
    44804473  {
     
    54795472#if NH_3D_VSP // bug fix
    54805473  UInt uiCurrPartNumb = m_pcPic->getNumPartitionsInCtu() >> (uiDepth << 1);
     5474  assert(m_pcPic->getNumPartitionsInCtu() ==m_pcPic->getNumPartInCtuWidth()*m_pcPic->getNumPartInCtuHeight());
     5475
    54815476#else
    54825477  UInt uiCurrPartNumb = m_pcPic->getNumPartInCtuWidth() >> (uiDepth << 1);
     
    54875482  }
    54885483}
    5489 #if NH_3D_VSP
     5484#if NH_3D_VSP  || NH_3D_DBBP
    54905485Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth )
    54915486{
     
    60376032}
    60386033#endif
    6039 #if H_3D_ARP
     6034#if NH_3D_ARP
    60406035Void TComDataCU::setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth )
    60416036{
    6042   assert( sizeof( *m_puhARPW) == 1 );
    6043   memset( m_puhARPW + uiAbsPartIdx, w, m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ) );
     6037  setSubPart<UChar>( w, m_puhARPW, uiAbsPartIdx, uiDepth, 0 );
    60446038}
    60456039#endif
Note: See TracChangeset for help on using the changeset viewer.