Ignore:
Timestamp:
16 Jun 2015, 04:13:09 (9 years ago)
Author:
mediatek-htm
Message:

The reactivation of depth intra skip mode (DIS), the MACRO is "NH_3D_DIS".

by Yi-Wen Chen (yiwen.chen@…)

File:
1 edited

Legend:

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

    r1243 r1258  
    5555
    5656  m_skipFlag           = NULL;
    57 #if H_3D
     57#if NH_3D_DIS
    5858  m_bDISFlag           = NULL;
    59   m_uiDISType          = NULL;
     59  m_ucDISType          = NULL;
    6060#endif
    6161  m_pePartSize         = NULL;
     
    169169    m_ChromaQpAdj        = new UChar[ uiNumPartition ];
    170170    m_skipFlag           = new Bool[ uiNumPartition ];
    171 #if H_3D
     171#if NH_3D_DIS
    172172    m_bDISFlag           = new Bool[ uiNumPartition ];
    173     m_uiDISType          = (UInt*)xMalloc(UInt, uiNumPartition);
     173    m_ucDISType          = (UChar*)xMalloc(UChar, uiNumPartition);
    174174#endif
    175175    m_pePartSize         = new Char[ uiNumPartition ];
     
    321321    }
    322322
    323 #if H_3D
     323#if NH_3D_DIS
    324324    if ( m_bDISFlag           ) { delete[] m_bDISFlag;   m_bDISFlag     = NULL; }
    325     if ( m_uiDISType         ) { xFree(m_uiDISType);  m_uiDISType    = NULL; }
     325    if ( m_ucDISType         ) { xFree(m_ucDISType);  m_ucDISType    = NULL; }
    326326#endif
    327327
     
    570570  memset( m_skipFlag          , false,                      m_uiNumPartition * sizeof( *m_skipFlag ) );
    571571
    572 #if H_3D
    573     m_bDISFlag[ui]   = pcFrom->getDISFlag(ui);
    574     m_uiDISType[ui]  = pcFrom->getDISType(ui);
     572#if NH_3D_DIS
     573    memset( m_bDISFlag        , false,                      m_uiNumPartition * sizeof( *m_bDISFlag ) );
     574    memset( m_ucDISType       , false,                      m_uiNumPartition * sizeof( *m_ucDISType ) );
    575575#endif
    576576
     
    619619#if H_3D_DBBP
    620620    m_pbDBBPFlag[ui] = pcFrom->m_pbDBBPFlag[ui];
    621 #endif
    622 #if H_3D
    623     memset( m_bDISFlag          + firstElement, false,                    numElements * sizeof( *m_bDISFlag ) );
    624     memset( m_uiDISType         + firstElement,     0,                    numElements * sizeof( *m_uiDISType) );
    625621#endif
    626622#if H_3D_VSP
     
    762758    }
    763759    m_skipFlag[ui]      = false;
    764 #if H_3D
    765       m_bDISFlag[ui]   = false;
    766       m_uiDISType[ui]  = 0;
     760#if NH_3D_DIS
     761    m_bDISFlag[ui]      = false;
     762    m_ucDISType[ui]     = 0;
    767763#endif
    768764    m_pePartSize[ui]    = NUMBER_OF_PART_SIZES;
     
    921917  {
    922918    m_skipFlag[ui]   = false;
    923 #if H_3D
     919#if NH_3D_DIS
    924920    m_bDISFlag[ui]   = false;
    925     m_uiDISType[ui]  = 0;
     921    m_ucDISType[ui]  = 0;
    926922#endif
    927923
     
    937933      m_apiMVPNum[rpl][ui] = -1;
    938934    }
    939 #if H_3D
     935#if NH_3D_DIS
    940936      m_bDISFlag[ui]    = pcCU->getDISFlag(uiPartOffset+ui);
    941       m_uiDISType[ui]   = pcCU->getDISType(uiPartOffset+ui);
     937      m_ucDISType[ui]   = pcCU->getDISType(uiPartOffset+ui);
    942938#endif
    943939#if H_3D_VSP
     
    10281024
    10291025  m_skipFlag=pcCU->getSkipFlag()          + uiPart;
    1030 #if H_3D
     1026#if NH_3D_DIS
    10311027  m_bDISFlag     = pcCU->getDISFlag()     + uiPart;
    1032   m_uiDISType    = pcCU->getDISType()     + uiPart;
     1028  m_ucDISType    = pcCU->getDISType()     + uiPart;
    10331029#endif
    10341030
     
    11661162
    11671163  m_skipFlag           = pcCU->getSkipFlag ()             + uiAbsPartIdx;
    1168 #if H_3D
     1164#if NH_3D_DIS
    11691165  m_bDISFlag           = pcCU->getDISFlag ()              + uiAbsPartIdx;
    1170   m_uiDISType          = pcCU->getDISType()               + uiAbsPartIdx;
     1166  m_ucDISType          = pcCU->getDISType()               + uiAbsPartIdx;
    11711167#endif
    11721168
     
    12401236  Int sizeInChar  = sizeof( Char ) * uiNumPartition;
    12411237  memcpy( m_skipFlag   + uiOffset, pcCU->getSkipFlag(),       sizeof( *m_skipFlag )   * uiNumPartition );
    1242 #if H_3D
    1243   memcpy( m_bDISFlag   + uiOffset, pcCU->getDISFlag(),       sizeof( *m_bDISFlag )   * uiNumPartition );
    1244   memcpy( m_uiDISType  + uiOffset, pcCU->getDISType(),       sizeof( *m_uiDISType )  * uiNumPartition);
     1238#if NH_3D_DIS
     1239  memcpy( m_bDISFlag   + uiOffset, pcCU->getDISFlag(),        sizeof( *m_bDISFlag )   * uiNumPartition );
     1240  memcpy( m_ucDISType  + uiOffset, pcCU->getDISType(),        sizeof( *m_ucDISType )  * uiNumPartition);
    12451241#endif
    12461242  memcpy( m_phQP       + uiOffset, pcCU->getQP(),             sizeInChar                        );
     
    13571353
    13581354  memcpy( pCtu->getSkipFlag() + m_absZIdxInCtu, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition );
    1359 #if H_3D
    1360   memcpy( rpcCU->getDISFlag()  + m_uiAbsIdxInLCU, m_bDISFlag,    sizeof( *m_bDISFlag )  * m_uiNumPartition );
    1361   memcpy( rpcCU->getDISType()  + m_uiAbsIdxInLCU, m_uiDISType,   sizeof( *m_uiDISType ) * m_uiNumPartition );
     1355#if NH_3D_DIS
     1356  memcpy( pCtu->getDISFlag()  + m_absZIdxInCtu, m_bDISFlag, sizeof( *m_bDISFlag )  * m_uiNumPartition );
     1357  memcpy( pCtu->getDISType()  + m_absZIdxInCtu, m_ucDISType, sizeof( *m_ucDISType ) * m_uiNumPartition );
    13621358#endif
    13631359
     
    14551451  pCtu->getTotalBins() = m_uiTotalBins;
    14561452}
    1457 
    1458 #if H_3D
    1459   memcpy( rpcCU->getDISFlag()  + uiPartOffset, m_bDISFlag,    sizeof( *m_bDISFlag )   * uiQNumPart );
    1460   memcpy( rpcCU->getDISType()  + uiPartOffset, m_uiDISType,   sizeof( *m_uiDISType )  * uiQNumPart );
    1461 #endif
    1462 
    14631453#if H_3D_VSP
    14641454  memcpy( rpcCU->getVSPFlag()           + uiPartOffset, m_piVSPFlag,           sizeof(Char) * uiQNumPart );
     
    22052195}
    22062196
    2207 #if H_3D
    2208 Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt absPartIdx, UInt depth )
     2197#if NH_3D_DIS
     2198Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt uiAbsPartIdx, UInt uiDepth )
    22092199{
    22102200    assert( sizeof( *m_bDISFlag) == 1 );
    2211     memset( m_bDISFlag + absPartIdx, bDIS, m_pcPic->getNumPartInCU() >> ( 2 * depth ) );
    2212 }
    2213 
    2214 Void TComDataCU::setDISTypeSubParts(UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth )
    2215 {
    2216     setSubPartT( uiDISType, m_uiDISType, uiAbsPartIdx, uiDepth, uiPUIdx );
     2201    memset( m_bDISFlag + uiAbsPartIdx, bDIS, m_pcPic->getNumPartitionsInCtu() >> ( 2 * uiDepth ) );
     2202}
     2203
     2204Void TComDataCU::setDISTypeSubParts(UChar ucDISType, UInt uiAbsPartIdx, UInt uiDepth )
     2205{
     2206  assert( sizeof( *m_ucDISType) == 1 );
     2207  memset( m_ucDISType + uiAbsPartIdx, ucDISType, m_pcPic->getNumPartitionsInCtu() >> ( 2 * uiDepth ) );
    22172208}
    22182209#endif
     
    56045595#endif
    56055596
    5606 #if H_3D
     5597#if NH_3D_DIS
    56075598Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index )
    56085599{
    5609   UInt  uiPartIdxLT, uiPartIdxRT;
    5610   this->deriveLeftRightTopIdxAdi( uiPartIdxLT, uiPartIdxRT, 0, 0 );
     5600  assert(uiPartIdx==0);
     5601  const UInt uiPartIdxLT      = getZorderIdxInCtu() + uiPartAddr;
     5602  const Int  iPartIdxStride   = getPic()->getNumPartInCtuWidth();
     5603 
    56115604  UInt uiMidPart, uiPartNeighbor; 
    56125605  TComDataCU* pcCUNeighbor;
    56135606  Bool bDepAvail = false;
    5614   Pel *pDepth  = this->getPic()->getPicYuvRec()->getLumaAddr();
    5615   Int iDepStride =  this->getPic()->getPicYuvRec()->getStride();
     5607  Pel *pDepth  = this->getPic()->getPicYuvRec()->getAddr(COMPONENT_Y);
     5608  Int iDepStride =  this->getPic()->getPicYuvRec()->getStride(COMPONENT_Y);
    56165609
    56175610  Int xP, yP, nPSW, nPSH;
     
    56215614  {
    56225615  case 0: // Mid Left
    5623     uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSH>>1) / this->getPic()->getMinCUHeight() * this->getPic()->getNumPartInWidth();
     5616    uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSH>>1) / this->getPic()->getMinCUHeight() * iPartIdxStride;
    56245617    pcCUNeighbor = this->getPULeft( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] );
    56255618    if ( pcCUNeighbor )
Note: See TracChangeset for help on using the changeset viewer.