Changeset 1163 in 3DVCSoftware


Ignore:
Timestamp:
16 Mar 2015, 12:40:05 (9 years ago)
Author:
tech
Message:

Merged branch 13.1-dev1-Samsung2@1162

Location:
branches/HTM-13.1-dev0
Files:
38 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-13.1-dev0/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg

    r1124 r1163  
    194194InterSdcFlag                        : 1                             # use of inter sdc
    195195MpiFlag                             : 1
    196 IntraSingleFlag                     : 1                 # use of single depth mode
     196DepthIntraSkip                      : 1     
     197
    197198#========== view synthesis optimization (VSO) ==========
    198199
  • branches/HTM-13.1-dev0/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg

    r1124 r1163  
    212212InterSdcFlag                        : 1                             # use of inter sdc
    213213MpiFlag                             : 1
    214 IntraSingleFlag                     : 1                 # use of single depth mode
     214DepthIntraSkip                      : 1     
     215
    215216#========== view synthesis optimization (VSO) ==========
    216217VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string
  • branches/HTM-13.1-dev0/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg

    r1124 r1163  
    260260InterSdcFlag                        : 1                             # use of inter sdc
    261261MpiFlag                             : 1
     262DepthIntraSkip                      : 1 
    262263
    263264#========== view synthesis optimization (VSO) ==========
  • branches/HTM-13.1-dev0/cfg/3D-HEVC/NonCTC/rc/baseCfg_3view+depth_rate_control.cfg

    r1124 r1163  
    273273InterSdcFlag                        : 1                             # use of inter sdc
    274274MpiFlag                             : 1
    275 IntraSingleFlag                     : 1                 # use of single depth mode
     275DepthIntraSkip                      : 1     
     276
    276277#========== view synthesis optimization (VSO) ==========
    277278VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string
  • branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_2view+depth.cfg

    r1124 r1163  
    228228InterSdcFlag                        : 1                             # use of inter sdc
    229229MpiFlag                             : 1
    230 IntraSingleFlag                     : 1                 # use of single depth mode
     230DepthIntraSkip                      : 1     
     231
    231232#========== view synthesis optimization (VSO) ==========
    232233
  • branches/HTM-13.1-dev0/cfg/3D-HEVC/baseCfg_3view+depth.cfg

    r1124 r1163  
    261261InterSdcFlag                        : 1                             # use of inter sdc
    262262MpiFlag                             : 1
    263 IntraSingleFlag                     : 1                 # use of single depth mode
     263DepthIntraSkip                      : 1     
     264
    264265#========== view synthesis optimization (VSO) ==========
    265266VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string
  • branches/HTM-13.1-dev0/cfg/3D-HEVC/fullCfg.cfg

    r1124 r1163  
    337337InterSdcFlag                        : 1                             # use of inter sdc
    338338MpiFlag                             : 1
    339 IntraSingleFlag                     : 1                 # use of single depth mode
     339DepthIntraSkip                      : 1     
     340
    340341#========== view synthesis optimization (VSO) ==========
    341342VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string
  • branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r1133 r1163  
    785785  ("QtPredFlag"            , m_qtPredFlag            , true                                           , "Quad tree prediction from texture to depth")
    786786  ("InterSdcFlag"          , m_interSdcFlag          , true                                           , "Inter depth DCs"                           )
     787#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     788  ("DepthIntraSkip"        , m_depthIntraSkipFlag    , true                                           , "Depth intra skip mode"                     )
     789#else
    787790  ("IntraSingleFlag"       , m_intraSingleFlag       , true                                           , "Intra single mode"                         )
     791#endif
    788792#endif //H_3D
    789793  ;
     
    26042608  printf( "QtPred:%d "                 , m_qtPredFlag             ? 1 : 0 );
    26052609  printf( "InterSdc:%d "               , m_interSdcFlag           ? 1 : 0 );
     2610#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2611  printf( "DepthIntraSkip:%d "         , m_depthIntraSkipFlag     ? 1 : 0 );
     2612#else
    26062613  printf( "IntraSingle:%d "            , m_intraSingleFlag        ? 1 : 0 );
     2614#endif
    26072615#endif
    26082616
  • branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncCfg.h

    r1133 r1163  
    484484  Bool                   m_qtPredFlag;
    485485  Bool                   m_interSdcFlag;
     486#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     487  Bool                   m_depthIntraSkipFlag;
     488#else
    486489  Bool                   m_intraSingleFlag;
    487 
     490#endif
    488491#endif
    489492  // internal member functions
  • branches/HTM-13.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r1133 r1163  
    196196      m_sps3dExtension.setQtPredFlag            ( d, m_qtPredFlag            );
    197197      m_sps3dExtension.setInterSdcFlag          ( d, m_interSdcFlag          );
     198#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     199      m_sps3dExtension.setDepthIntraSkipFlag    ( d, m_depthIntraSkipFlag    ); 
     200#else
    198201      m_sps3dExtension.setIntraSingleFlag       ( d, m_intraSingleFlag       ); 
     202#endif
    199203    }
    200204  }
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/ContextTables.h

    r1084 r1163  
    5151#define NUM_SPLIT_FLAG_CTX            3       ///< number of context models for split flag
    5252#define NUM_SKIP_FLAG_CTX             3       ///< number of context models for skip flag
     53#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     54#define NUM_DIS_FLAG_CTX              1
     55#define NUM_DIS_TYPE_CTX              1       
     56#else
    5357#if H_3D_SINGLE_DEPTH
    5458#define NUM_SINGLEDEPTH_FLAG_CTX                     1
    5559#define NUM_SINGLE_DEPTH_VALUE_DATA_CTX              1       
     60#endif
    5661#endif
    5762#define NUM_MERGE_FLAG_EXT_CTX        1       ///< number of context models for merge flag of merge extended
     
    153158  { CNU,  CNU,  CNU, },
    154159};
     160#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     161static const UChar
     162INIT_DIS_FLAG[3][NUM_DIS_FLAG_CTX] = 
     163{
     164    { 185 },
     165    { 185 },
     166    { 185 },
     167};
     168static const UChar
     169INIT_DIS_TYPE[3][NUM_DIS_TYPE_CTX] =
     170{
     171    { 137 },
     172    { 137 },
     173    { 137 },
     174};
     175#else
    155176#if H_3D_SINGLE_DEPTH
    156177static const UChar
     
    169190};
    170191#endif
     192#endif
    171193static const UChar
    172194INIT_MERGE_FLAG_EXT[3][NUM_MERGE_FLAG_EXT_CTX] =
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp

    r1133 r1163  
    6060 
    6161  m_skipFlag           = NULL;
     62#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     63  m_bDISFlag           = NULL;
     64  m_uiDISType          = NULL;
     65#else
    6266#if H_3D_SINGLE_DEPTH
    6367  m_singleDepthFlag     = NULL;
    6468  m_apSingleDepthValue  = NULL;
    65 #endif 
     69#endif
     70#endif
    6671  m_pePartSize         = NULL;
    6772  m_pePredMode         = NULL;
     
    181186
    182187    m_skipFlag           = new Bool[ uiNumPartition ];
     188#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     189    m_bDISFlag           = new Bool[ uiNumPartition ];
     190    m_uiDISType          = (UInt*)xMalloc(UInt, uiNumPartition);
     191#else
    183192#if H_3D_SINGLE_DEPTH
    184193    m_singleDepthFlag     = new Bool[ uiNumPartition ];
    185194    m_apSingleDepthValue  = (Pel*)xMalloc(Pel, uiNumPartition);
     195#endif
    186196#endif
    187197    m_pePartSize         = new Char[ uiNumPartition ];
     
    327337
    328338    if ( m_skipFlag           ) { delete[] m_skipFlag;          m_skipFlag          = NULL; }
     339#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     340    if ( m_bDISFlag           ) { delete[] m_bDISFlag;   m_bDISFlag     = NULL; }
     341    if ( m_uiDISType         ) { xFree(m_uiDISType);  m_uiDISType    = NULL; }
     342#else
    329343#if H_3D_SINGLE_DEPTH
    330344    if ( m_singleDepthFlag    ) { delete[] m_singleDepthFlag;   m_singleDepthFlag     = NULL; }
    331345    if ( m_apSingleDepthValue ) { xFree(m_apSingleDepthValue);  m_apSingleDepthValue  = NULL; }
     346#endif
    332347#endif
    333348    if ( m_pePartSize         ) { delete[] m_pePartSize;        m_pePartSize        = NULL; }
     
    491506    TComDataCU * pcFrom = pcPic->getCU(getAddr());
    492507    m_skipFlag[ui]   = pcFrom->getSkipFlag(ui);
     508#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     509    m_bDISFlag[ui]   = pcFrom->getDISFlag(ui);
     510    m_uiDISType[ui]  = pcFrom->getDISType(ui);
     511#else
    493512#if H_3D_SINGLE_DEPTH
    494513    m_singleDepthFlag[ui]    = pcFrom->getSingleDepthFlag(ui);
    495514    m_apSingleDepthValue[ui] = pcFrom->getSingleDepthValue(ui);
     515#endif
    496516#endif
    497517    m_pePartSize[ui] = pcFrom->getPartitionSize(ui);
     
    546566  {
    547567    memset( m_skipFlag          + firstElement, false,                    numElements * sizeof( *m_skipFlag ) );
     568#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     569    memset( m_bDISFlag          + firstElement, false,                    numElements * sizeof( *m_bDISFlag ) );
     570    memset( m_uiDISType         + firstElement,     0,                    numElements * sizeof( *m_uiDISType) );
     571#else
    548572#if H_3D_SINGLE_DEPTH
    549573    memset( m_singleDepthFlag     + firstElement, false,                  numElements * sizeof( *m_singleDepthFlag ) );
    550574    memset( m_apSingleDepthValue  + firstElement,     0,                  numElements * sizeof( *m_apSingleDepthValue ) );
     575#endif
    551576#endif
    552577    memset( m_pePartSize        + firstElement, SIZE_NONE,                numElements * sizeof( *m_pePartSize ) );
     
    733758      m_puhTransformSkip[2][ui] = 0;
    734759      m_skipFlag[ui]   = false;
     760#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     761      m_bDISFlag[ui]   = false;
     762      m_uiDISType[ui]  = 0;
     763#else
    735764#if H_3D_SINGLE_DEPTH
    736765      m_singleDepthFlag[ui]     = false;
    737766      m_apSingleDepthValue[ui]  = 0;
     767#endif
    738768#endif
    739769      m_pePartSize[ui] = SIZE_NONE;
     
    861891  memset( m_puhCbf[2],          0, iSizeInUchar );
    862892  memset( m_puhDepth,     uiDepth, iSizeInUchar );
    863 #if H_3D_NBDV
     893#if H_3D_NBDV && !SEC_ARP_REM_ENC_RESTRICT_K0035
    864894  m_pDvInfo->bDV = false;
    865895#endif
     
    904934  {
    905935    m_skipFlag[ui]   = false;
     936#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     937    m_bDISFlag[ui]   = false;
     938    m_uiDISType[ui]  = 0;
     939#else
    906940#if H_3D_SINGLE_DEPTH
    907941    m_singleDepthFlag[ui]   = false;
    908942    m_apSingleDepthValue[ui]= 0;
     943#endif
    909944#endif
    910945    m_pePartSize[ui] = SIZE_NONE;
     
    929964      m_puhTransformSkip[2][ui] = pcCU->getTransformSkip(uiPartOffset+ui,TEXT_CHROMA_V);
    930965      m_skipFlag[ui]   = pcCU->getSkipFlag(uiPartOffset+ui);
     966#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     967      m_bDISFlag[ui]    = pcCU->getDISFlag(uiPartOffset+ui);
     968      m_uiDISType[ui]   = pcCU->getDISType(uiPartOffset+ui);
     969#else
    931970#if H_3D_SINGLE_DEPTH
    932971      m_singleDepthFlag[ui]    = pcCU->getSingleDepthFlag(uiPartOffset+ui);
    933972      m_apSingleDepthValue[ui] = pcCU->getSingleDepthValue(uiPartOffset+ui);
     973#endif
    934974#endif
    935975      m_pePartSize[ui] = pcCU->getPartitionSize(uiPartOffset+ui);
     
    10781118 
    10791119  m_skipFlag=pcCU->getSkipFlag()          + uiPart;
     1120#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1121  m_bDISFlag     = pcCU->getDISFlag()     + uiPart;
     1122  m_uiDISType    = pcCU->getDISType()     + uiPart;
     1123#else
    10801124#if H_3D_SINGLE_DEPTH
    10811125  m_singleDepthFlag     = pcCU->getSingleDepthFlag()   + uiPart;
    10821126  m_apSingleDepthValue  = pcCU->getSingleDepthValue()  + uiPart;
    1083 #endif 
     1127#endif
     1128#endif
    10841129  m_phQP=pcCU->getQP()                    + uiPart;
    10851130  m_pePartSize = pcCU->getPartitionSize() + uiPart;
     
    12151260 
    12161261  m_skipFlag           = pcCU->getSkipFlag ()             + uiAbsPartIdx;
     1262#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1263  m_bDISFlag           = pcCU->getDISFlag ()              + uiAbsPartIdx;
     1264  m_uiDISType          = pcCU->getDISType()               + uiAbsPartIdx;
     1265#else
    12171266#if H_3D_SINGLE_DEPTH
    12181267  m_singleDepthFlag     = pcCU->getSingleDepthFlag ()             + uiAbsPartIdx;
    12191268  m_apSingleDepthValue  = pcCU->getSingleDepthValue ()            + uiAbsPartIdx;
    1220 #endif 
     1269#endif
     1270#endif
    12211271  m_pePartSize         = pcCU->getPartitionSize ()        + uiAbsPartIdx;
    12221272#if H_3D_NBDV
     
    12901340  Int sizeInChar  = sizeof( Char ) * uiNumPartition;
    12911341  memcpy( m_skipFlag   + uiOffset, pcCU->getSkipFlag(),       sizeof( *m_skipFlag )   * uiNumPartition );
     1342#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1343  memcpy( m_bDISFlag   + uiOffset, pcCU->getDISFlag(),       sizeof( *m_bDISFlag )   * uiNumPartition );
     1344  memcpy( m_uiDISType  + uiOffset, pcCU->getDISType(),       sizeof( *m_uiDISType )  * uiNumPartition);
     1345#else
    12921346#if H_3D_SINGLE_DEPTH
    12931347  memcpy( m_singleDepthFlag     + uiOffset, pcCU->getSingleDepthFlag(),       sizeof( *m_singleDepthFlag )   * uiNumPartition );
    12941348  memcpy( m_apSingleDepthValue  + uiOffset, pcCU->getSingleDepthValue(),      sizeof( *m_apSingleDepthValue ) * uiNumPartition);
     1349#endif
    12951350#endif
    12961351  memcpy( m_phQP       + uiOffset, pcCU->getQP(),             sizeInChar                        );
     
    14101465
    14111466  memcpy( rpcCU->getSkipFlag() + m_uiAbsIdxInLCU, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition );
     1467#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1468  memcpy( rpcCU->getDISFlag()  + m_uiAbsIdxInLCU, m_bDISFlag,    sizeof( *m_bDISFlag )  * m_uiNumPartition );
     1469  memcpy( rpcCU->getDISType()  + m_uiAbsIdxInLCU, m_uiDISType,   sizeof( *m_uiDISType ) * m_uiNumPartition );
     1470#else
    14121471#if H_3D_SINGLE_DEPTH
    14131472  memcpy( rpcCU->getSingleDepthFlag()  + m_uiAbsIdxInLCU, m_singleDepthFlag,    sizeof( *m_singleDepthFlag ) * m_uiNumPartition );
    14141473  memcpy( rpcCU->getSingleDepthValue() + m_uiAbsIdxInLCU, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * m_uiNumPartition);
     1474#endif
    14151475#endif
    14161476  memcpy( rpcCU->getQP() + m_uiAbsIdxInLCU, m_phQP, sizeInChar  );
     
    15251585  Int sizeInChar  = sizeof( Char ) * uiQNumPart;
    15261586  memcpy( rpcCU->getSkipFlag()       + uiPartOffset, m_skipFlag,   sizeof( *m_skipFlag )   * uiQNumPart );
     1587#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1588  memcpy( rpcCU->getDISFlag()  + uiPartOffset, m_bDISFlag,    sizeof( *m_bDISFlag )   * uiQNumPart );
     1589  memcpy( rpcCU->getDISType()  + uiPartOffset, m_uiDISType,   sizeof( *m_uiDISType )  * uiQNumPart );
     1590#else
    15271591#if H_3D_SINGLE_DEPTH
    15281592  memcpy( rpcCU->getSingleDepthFlag()  + uiPartOffset, m_singleDepthFlag,    sizeof( *m_singleDepthFlag )   * uiQNumPart );
    15291593  memcpy( rpcCU->getSingleDepthValue() + uiPartOffset, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * uiQNumPart);
     1594#endif
    15301595#endif
    15311596  memcpy( rpcCU->getQP() + uiPartOffset, m_phQP, sizeInChar );
     
    24272492  memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) );
    24282493}
     2494
     2495#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2496Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt absPartIdx, UInt depth )
     2497{
     2498    assert( sizeof( *m_bDISFlag) == 1 );
     2499    memset( m_bDISFlag + absPartIdx, bDIS, m_pcPic->getNumPartInCU() >> ( 2 * depth ) );
     2500}
     2501
     2502Void TComDataCU::setDISTypeSubParts(UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth )
     2503{
     2504    setSubPartT( uiDISType, m_uiDISType, uiAbsPartIdx, uiDepth, uiPUIdx );
     2505}
     2506#else
    24292507#if H_3D_SINGLE_DEPTH
    24302508Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth )
     
    24392517}
    24402518#endif
     2519#endif
     2520
    24412521Void TComDataCU::setPredModeSubParts( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth )
    24422522{
     
    56745754  }
    56755755
    5676   if ( bIsCurrRefLongTerm || bIsColRefLongTerm )
     5756  if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) // CY: this condition equals to both bIsCurrRefLongTerm and bIsColRefLongTerm being 1
    56775757  {
    56785758#if H_3D_TMVP
     
    56815761    Int iColViewId     = pColCU->getSlice()->getViewIndex();
    56825762    Int iColRefViewId  = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewIndex();
     5763#if H_3D_TMVP_SCALING_FIX_K0053
     5764    iScale = 4096;
     5765    if ( iCurrRefViewId != iCurrViewId && iColViewId != iColRefViewId )
     5766#endif
    56835767    iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId );
    56845768
     
    56955779#endif
    56965780  }
    5697   else
     5781  else // CY: both bIsCurrRefLongTerm and bIsColRefLongTerm are 0
    56985782  {
    56995783    iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
     
    58605944#endif
    58615945#if H_3D_IV_MERGE
     5946#if SEC_ARP_REM_ENC_RESTRICT_K0035
     5947Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
     5948#else
    58625949Bool TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
     5950#endif
    58635951{
    58645952
     
    58765964      pDisp->m_acNBDV = cMv;
    58775965      pDisp->m_aVIdxCan = iViewIdx;
    5878 
     5966#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    58795967      return true;
    5880   }
     5968#endif
     5969  }
     5970#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    58815971  return false;
    5882 }
    5883 #endif
    5884 
    5885 #if H_3D_SINGLE_DEPTH
    5886 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index)
    5887 {
    5888 
     5972#endif
     5973}
     5974#endif
     5975
     5976#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     5977Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index )
     5978{
     5979#if NEIGHBORING_PIX_AVAILABILITY_FIX
     5980  UInt  uiPartIdxLT, uiPartIdxRT;
     5981  this->deriveLeftRightTopIdxAdi( uiPartIdxLT, uiPartIdxRT, 0, 0 );
     5982  UInt uiMidPart, uiPartNeighbor; 
     5983  TComDataCU* pcCUNeighbor;
     5984  Bool bDepAvail = false;
     5985  Pel *pDepth  = this->getPic()->getPicYuvRec()->getLumaAddr();
     5986  Int iDepStride =  this->getPic()->getPicYuvRec()->getStride();
     5987
     5988  Int xP, yP, nPSW, nPSH;
     5989  this->getPartPosition( uiPartIdx, xP, yP, nPSW, nPSH );
     5990
     5991  switch( index )
     5992  {
     5993  case 0: // Mid Left
     5994    uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSH>>1) / this->getPic()->getMinCUHeight() * this->getPic()->getNumPartInWidth();
     5995    pcCUNeighbor = this->getPULeft( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] );
     5996    if ( pcCUNeighbor )
     5997    {
     5998      if( !this->getSlice()->getPPS()->getConstrainedIntraPred() )
     5999      {
     6000        *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ];
     6001        bDepAvail = true;
     6002      }
     6003      else if ( pcCUNeighbor->getPredictionMode( uiPartNeighbor ) == MODE_INTRA )
     6004      {
     6005        *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ];
     6006        bDepAvail = true;
     6007      }
     6008    }
     6009    break;
     6010  case 1: // Mid Above
     6011    uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSW>>1) / this->getPic()->getMinCUWidth();
     6012    pcCUNeighbor = this->getPUAbove( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] );
     6013    if( pcCUNeighbor )
     6014    {
     6015      if( !this->getSlice()->getPPS()->getConstrainedIntraPred() )
     6016      {
     6017        *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ];
     6018        bDepAvail = true;
     6019      }
     6020      else if ( pcCUNeighbor->getPredictionMode( uiPartNeighbor ) == MODE_INTRA )
     6021      {
     6022        *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ];
     6023        bDepAvail = true;
     6024      }
     6025    }
     6026    break;
     6027  default:
     6028    break;
     6029  }
     6030
     6031  return bDepAvail;
     6032#else
    58896033  Bool bDepAvail = false;
    58906034  Pel *pDepth  = this->getPic()->getPicYuvRec()->getLumaAddr();
     
    59126056    break;
    59136057  default:
     6058    break;
     6059  }
     6060  return bDepAvail;
     6061#endif
     6062}
     6063#else
     6064#if H_3D_SINGLE_DEPTH
     6065Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index)
     6066{
     6067
     6068  Bool bDepAvail = false;
     6069  Pel *pDepth  = this->getPic()->getPicYuvRec()->getLumaAddr();
     6070  Int iDepStride =  this->getPic()->getPicYuvRec()->getStride();
     6071
     6072  Int xP, yP, nPSW, nPSH;
     6073  this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH);
     6074  UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight();
     6075  UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth();
     6076  switch(index)
     6077  {
     6078  case 0: // Mid Left
     6079    if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) )
     6080    {
     6081      *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ];
     6082      bDepAvail = true;
     6083    }
     6084    break;
     6085  case 1: // Mid Above
     6086    if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) )
     6087    {
     6088      *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ];
     6089      bDepAvail = true;
     6090    }
     6091    break;
     6092  default:
    59146093      break;
    59156094  }
    59166095  return bDepAvail;
    59176096}
    5918 
    5919 #endif
     6097#endif
     6098#endif
     6099
    59206100#if H_3D_NBDV
    59216101//Notes from QC:
     
    59236103//TBD#2: set of DvMCP values need to be done as part of inter-view motion prediction process. Remove this comment once merge related integration is done
    59246104//To be checked: Parallel Merge features for NBDV, related to DV_DERIVATION_PARALLEL_B0096 and LGE_IVMP_PARALLEL_MERGE_B0136 are not integrated. The need of these features due to the adoption of CU-based NBDV is not clear. We need confirmation on this, especially by proponents
     6105#if SEC_ARP_REM_ENC_RESTRICT_K0035
     6106Void TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo
     6107#else
    59256108Bool TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo
     6109#endif
    59266110#if H_3D_NBDV_REF
    59276111, Bool bDepthRefine
     
    59316115  //// ******* Init variables ******* /////
    59326116  // Init disparity struct for results
     6117#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    59336118  pDInfo->bDV = false;   
     6119#endif
    59346120  pDInfo->m_aVIdxCan = -1;
    59356121
     
    60266212        pDInfo->m_acDoNBDV  = cColMv;
    60276213#endif //H_3D_NBDV_REF
     6214#if SEC_ARP_REM_ENC_RESTRICT_K0035
     6215        return;
     6216#else
    60286217        return true;
     6218#endif
    60296219      }
    60306220    }
     
    60436233#endif
    60446234    ) )
     6235#if SEC_ARP_REM_ENC_RESTRICT_K0035
     6236    return;
     6237#else
    60456238    return true;
     6239#endif
    60466240
    60476241  //// ******* Get disparity from above block ******* /////
     
    60556249#endif
    60566250      ) )
     6251#if SEC_ARP_REM_ENC_RESTRICT_K0035
     6252      return;
     6253#else
    60576254      return true;
     6255#endif
    60586256  }
    60596257
     
    61016299          pDInfo->m_acDoNBDV = cDispVec;
    61026300#endif
     6301#if SEC_ARP_REM_ENC_RESTRICT_K0035
     6302          return;
     6303#else
    61036304          return true;
     6305#endif
    61046306        }
    61056307      }
     
    61376339      pDInfo->m_acDoNBDV = defaultDV;
    61386340#endif
     6341#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    61396342      return true;
    6140   }
     6343#endif
     6344  }
     6345#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    61416346  return false;
     6347#endif
    61426348}
    61436349
     
    67526958      Int         iBaseAbsPartIdx;
    67536959
     6960#if SEC_SHIFTED_IVMC_POS_K0036
     6961      Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth  * 2 );
     6962      Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2 );
     6963#else
    67546964      Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 );
    67556965      Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 );
     6966#endif
    67566967
    67576968      Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComDataCU.h

    r1133 r1163  
    110110  // -------------------------------------------------------------------------------------------------------------------
    111111  Bool*         m_skipFlag;           ///< array of skip flags
     112#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     113  Bool*         m_bDISFlag;         
     114  UInt*         m_uiDISType;
     115#else
    112116#if H_3D_SINGLE_DEPTH
    113117  Bool*         m_singleDepthFlag;           ///< array of single depth flags
    114118  Pel*          m_apSingleDepthValue;
     119#endif
    115120#endif
    116121  Char*         m_pePartSize;         ///< array of partition sizes
     
    342347  Void         setSkipFlag           ( UInt idx, Bool skip)     { m_skipFlag[idx] = skip;   }
    343348  Void         setSkipFlagSubParts   ( Bool skip, UInt absPartIdx, UInt depth );
     349#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     350  Bool*        getDISFlag            ()                         { return m_bDISFlag;          }
     351  Bool         getDISFlag            ( UInt idx)                { return m_bDISFlag[idx];     }
     352  Void         setDISFlag            ( UInt idx, Bool bDIS)     { m_bDISFlag[idx] = bDIS;   }
     353  Void         setDISFlagSubParts    ( Bool bDIS, UInt absPartIdx, UInt depth );
     354
     355  UInt*        getDISType            ()                         { return m_uiDISType; }
     356  UInt         getDISType            ( UInt idx)                { return m_uiDISType[idx];     }
     357  Void         getDISType            ( UInt idx, UInt uiDISType)     { m_uiDISType[idx] = uiDISType;   }
     358  Void         setDISTypeSubParts    ( UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth );
     359#else
    344360#if H_3D_SINGLE_DEPTH
    345361  Bool*        getSingleDepthFlag            ()                        { return m_singleDepthFlag;          }
     
    353369  Void         setSingleDepthValueSubParts   (Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth );
    354370#endif 
     371#endif
    355372  Char*         getPredictionMode     ()                        { return m_pePredMode;        }
    356373  PredMode      getPredictionMode     ( UInt uiIdx )            { return static_cast<PredMode>( m_pePredMode[uiIdx] ); }
     
    484501  );
    485502  Bool          xGetColDisMV      ( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx );
     503#if SEC_ARP_REM_ENC_RESTRICT_K0035
     504  Void          getDisMvpCandNBDV ( DisInfo* pDInfo
     505#else
    486506  Bool          getDisMvpCandNBDV ( DisInfo* pDInfo
     507#endif
    487508#if H_3D_NBDV_REF
    488509   , Bool bDepthRefine = false
     
    491512   
    492513#if H_3D
     514#if SEC_ARP_REM_ENC_RESTRICT_K0035
     515  Void          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
     516#else
    493517  Bool          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
     518#endif
    494519  Bool          getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm );
    495520#endif
     521#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     522   Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
     523#else
    496524#if H_3D_SINGLE_DEPTH
    497525   Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
     526#endif
    498527#endif
    499528#if H_3D_NBDV_REF
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComMotionInfo.h

    r1084 r1163  
    6363typedef struct _DisCand
    6464{
     65#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    6566  Bool bDV;
     67#endif
    6668  TComMv m_acNBDV;              // DV from NBDV
    6769#if H_3D_NBDV_REF
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp

    r1133 r1163  
    12551255#if H_3D_NBDV
    12561256  DisInfo cDistparity;
     1257#if SEC_ARP_REM_ENC_RESTRICT_K0035
     1258  cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV;
     1259  cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan;
     1260#else
    12571261  cDistparity.bDV           = pcCU->getDvInfo(uiPartAddr).bDV;
    12581262  if( cDistparity.bDV )
     
    12621266    cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan;
    12631267  }
     1268#endif
    12641269#else
    12651270  assert(0); // ARP can be applied only when a DV is available
    12661271#endif
    1267 
     1272#if SEC_ARP_REM_ENC_RESTRICT_K0035
     1273  UChar dW = pcCU->getARPW ( uiPartAddr );
     1274#else
    12681275  UChar dW = cDistparity.bDV ? pcCU->getARPW ( uiPartAddr ) : 0;
    1269 
     1276#endif
     1277
     1278#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    12701279  if( cDistparity.bDV )
     1280#endif
    12711281  {
    12721282    Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList);
     
    13201330      pYuvB0->clear(); pYuvB1->clear();
    13211331    }
    1322 
     1332#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    13231333    assert ( cDistparity.bDV );
    1324    
     1334#endif   
    13251335    TComMv cNBDV = cDistparity.m_acNBDV;
    13261336    pcCU->clipMv( cNBDV );
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRdCost.cpp

    r884 r1163  
    341341    else if( eDFunc >= DF_HADS && eDFunc <= DF_HADS16N )
    342342    {
     343#if !RWTH_DBBP_NO_SATD_K0028
    343344      rcDistParam.DistFunc = TComRdCost::xGetMaskedHADs;
     345#else
     346      rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD;
     347#endif
    344348    }
    345349    else if( eDFunc >= DF_VSD && eDFunc <= DF_VSD16N )
     
    441445  if( m_bUseMask )
    442446  {
     447#if !RWTH_DBBP_NO_SATD_K0028
    443448    rcDistParam.DistFunc = (bHADME)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD;
     449#else
     450    rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD;
     451#endif
    444452  }
    445453#endif
     
    464472  if( m_bUseMask )
    465473  {
     474#if !RWTH_DBBP_NO_SATD_K0028
    466475    rcDP.DistFunc = (bHadamard)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD;
     476#else
     477    rcDP.DistFunc = TComRdCost::xGetMaskedSAD;
     478#endif
    467479  }
    468480#endif
     
    717729}
    718730
     731#if !RWTH_DBBP_NO_SATD_K0028
    719732UInt TComRdCost::xGetMaskedHADs( DistParam* pcDtParam )
    720733{
     
    834847  return uiSum >> DISTORTION_PRECISION_ADJUSTMENT(pcDtParam->bitDepth-8);
    835848}
     849#endif
    836850
    837851UInt TComRdCost::xGetMaskedVSD( DistParam* pcDtParam )
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRdCost.h

    r872 r1163  
    320320  static UInt xGetMaskedSSE     ( DistParam* pcDtParam );
    321321  static UInt xGetMaskedSAD     ( DistParam* pcDtParam );
     322#if !RWTH_DBBP_NO_SATD_K0028
    322323  static UInt xGetMaskedHADs    ( DistParam* pcDtParam );
     324#endif
    323325  static UInt xGetMaskedVSD     ( DistParam* pcDtParam );
    324326#endif
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.cpp

    r1133 r1163  
    140140, m_depthToDisparityF             ( NULL )
    141141#endif
     142#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     143, m_bApplyDIS                     (false)
     144#else
    142145#if H_3D_SINGLE_DEPTH
    143146, m_bApplySingleDepthMode         (false)
     147#endif
    144148#endif
    145149#endif
     
    10991103  }
    11001104#endif
     1105#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1106  m_bApplyDIS = pSrc->m_bApplyDIS;
     1107#else
    11011108#if H_3D_SINGLE_DEPTH
    11021109  m_bApplySingleDepthMode = pSrc->m_bApplySingleDepthMode;
     1110#endif
    11031111#endif
    11041112#if H_3D_IC
     
    40884096  m_intraSdcWedgeFlag      = sps3dExt->getIntraSdcWedgeFlag    ( depthFlag ) && lidG0                                     ;                         
    40894097  m_qtPredFlag             = sps3dExt->getQtPredFlag           ( depthFlag ) && lidG0           &&   textOfCurViewAvailFlag;
    4090   m_interSdcFlag           = sps3dExt->getInterSdcFlag         ( depthFlag ) && lidG0                                    ;                               
     4098  m_interSdcFlag           = sps3dExt->getInterSdcFlag         ( depthFlag ) && lidG0                                    ; 
     4099#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     4100  m_depthIntraSkipFlag     = sps3dExt->getDepthIntraSkipFlag   ( depthFlag ) && lidG0                                    ;                         
     4101#else
    40914102  m_intraSingleFlag        = sps3dExt->getIntraSingleFlag      ( depthFlag ) && lidG0                                    ;                         
     4103#endif
    40924104
    40934105  m_subPbSize              = lidG0 ? ( 1 << ( sps3dExt->getLog2SubPbSizeMinus3   ( depthFlag ) + 3 ) ) : getSPS()->getMaxCUWidth(); 
     
    41124124  std::cout << "qtPredFlag              :" << m_qtPredFlag             << std::endl;
    41134125  std::cout << "interSdcFlag            :" << m_interSdcFlag           << std::endl;
     4126#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     4127  std::cout << "depthIntraSkipFlag      :" << m_depthIntraSkipFlag     << std::endl;   
     4128#else
    41144129  std::cout << "intraSingleFlag         :" << m_intraSingleFlag        << std::endl;   
     4130#endif
    41154131  std::cout << "subPbSize               :" << m_subPbSize              << std::endl;
    41164132  std::cout << "mpiSubPbSize            :" << m_mpiSubPbSize           << std::endl;
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h

    r1133 r1163  
    15741574      m_qtPredFlag            [d] = false;
    15751575      m_interSdcFlag          [d] = false;
    1576       m_intraSingleFlag       [d] = false;   
     1576#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1577      m_depthIntraSkipFlag    [d] = false;   
     1578#else
     1579      m_intraSingleFlag       [d] = false;
     1580#endif
    15771581    }
    15781582  }
     
    16171621  Bool getInterSdcFlag( Int d ) { return m_interSdcFlag[d]; }
    16181622
     1623#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1624  Void setDepthIntraSkipFlag( Int d, Bool flag ) { m_depthIntraSkipFlag[d] = flag; }
     1625  Bool getDepthIntraSkipFlag( Int d ) { return m_depthIntraSkipFlag[d]; }
     1626#else
    16191627  Void setIntraSingleFlag( Int d, Bool flag ) { m_intraSingleFlag[d] = flag; }
    16201628  Bool getIntraSingleFlag( Int d ) { return m_intraSingleFlag[d]; }
     1629#endif
    16211630
    16221631private:
     
    16351644  Bool        m_qtPredFlag            [2];
    16361645  Bool        m_interSdcFlag          [2];
     1646#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1647  Bool        m_depthIntraSkipFlag    [2]; 
     1648#else
    16371649  Bool        m_intraSingleFlag       [2]; 
     1650#endif
    16381651};
    16391652
     
    23772390#endif
    23782391#endif
     2392#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2393  Bool      m_bApplyDIS;
     2394#else
    23792395#if H_3D_SINGLE_DEPTH
    23802396  Bool      m_bApplySingleDepthMode;
     2397#endif
    23812398#endif
    23822399#if H_3D_IC
     
    23982415  Bool m_qtPredFlag           ;
    23992416  Bool m_interSdcFlag         ;
     2417#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2418  Bool m_depthIntraSkipFlag   ;
     2419#else
    24002420  Bool m_intraSingleFlag      ;
    2401 
     2421#endif
    24022422  Int  m_mpiSubPbSize         ;
    24032423  Int  m_subPbSize            ;
     
    28222842  Bool getQtPredFlag             ( ) { return m_qtPredFlag             ; };
    28232843  Bool getInterSdcFlag           ( ) { return m_interSdcFlag           ; };
     2844#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2845  Bool getDepthIntraSkipFlag     ( ) { return m_depthIntraSkipFlag     ; };
     2846#else
    28242847  Bool getIntraSingleFlag        ( ) { return m_intraSingleFlag        ; };
     2848#endif
    28252849
    28262850  Int  getMpiSubPbSize           ( ) { return m_mpiSubPbSize           ; };
  • branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h

    r1133 r1163  
    6969
    7070#define MTK_I0093           1
     71
     72#define RWTH_DBBP_NO_SATD_K0028       1
    7173/////////////////////////////////////////////////////////////////////////////////////////
    7274///////////////////////////////////   MAJOR DEFINES   /////////////////////////////////// 
     
    7880
    7981#if H_3D
     82#define SEC_DEPTH_INTRA_SKIP_MODE_K0033   1   // Depth intra skip mode
     83#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     84#define NEIGHBORING_PIX_AVAILABILITY_FIX  1
     85#endif
     86
     87
    8088#define H_3D_QTLPC                        1   // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068
    8189                                              // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
     
    117125#define SEC_ARP_VIEW_REF_CHECK_J0037      1   // Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1
    118126
     127#define SEC_ARP_REM_ENC_RESTRICT_K0035    1   // Removal of encoder restriction of ARP, JCT3V-K0035
     128
    119129#define H_3D_IC                           1   // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060
    120130                                              // Unifying rounding offset, for IC part, JCT3V-D0135
     
    185195                                              // SEC_SIMP_SHIFTED_DV_I0086     Simplification of Shifted DV candidate, JCT3V-I0086
    186196
    187 
     197#define SEC_SHIFTED_IVMC_POS_K0036        1   // Position Derivation for Shifted-IVMC, JCT3V-K0036
    188198
    189199
    190200#define H_3D_TMVP                         1   // QC_TMVP_C0047
    191201                                              // Sony_M23639
     202#if H_3D_TMVP
     203#define H_3D_TMVP_SCALING_FIX_K0053       1   // QC/CY for K0053
     204#endif
    192205
    193206#define H_3D_DIM                          1   // DIM, Depth intra modes, includes:
     
    239252                                              // SHARP_DLT_SIMP_J0029              1   // DLT(DepthValue2Idx[]) table derivation cleanup
    240253
     254#if !SEC_DEPTH_INTRA_SKIP_MODE_K0033
    241255#define H_3D_SINGLE_DEPTH                 1   // Single depth mode proposed in JCT3V-I0095
    242256                                              // HS_SP_SIMP_J0066
    243257                                              // SINGLE_DEPTH_SIMP_J0115           1
    244258                                              // MTK_SINGLE_DEPTH_VPS_FLAG_J0060   1   // Add VPS control flags and remove slice header control flag for single depth, JCT3V-J0060
     259#endif
    245260
    246261#define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
     
    313328#define H_3D_OUTPUT_ACTIVE_TOOLS               0
    314329
     330#if !SEC_DEPTH_INTRA_SKIP_MODE_K0033
    315331///// ***** SINGLE DEPTH MODE *********
    316332#if H_3D_SINGLE_DEPTH
    317333#define SINGLE_DEPTH_MODE_CAND_LIST_SIZE            2 // size of the sample candidate list
    318334
     335#endif
    319336#endif
    320337
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1133 r1163  
    10401040      READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 );
    10411041      READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 );
     1042#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1043      READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt->setDepthIntraSkipFlag( d, uiCode == 1 );
     1044#else
    10421045      READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 );
     1046#endif
    10431047    }
    10441048  }
     
    29842988  assert(0);
    29852989}
     2990
     2991#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2992Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
     2993{
     2994  assert(0);
     2995}
     2996#else
    29862997#if H_3D_SINGLE_DEPTH
    29872998Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
     
    29903001}
    29913002#endif
     3003#endif
     3004
    29923005Void TDecCavlc::parseCUTransquantBypassFlag( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    29933006{
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.h

    r1133 r1163  
    124124 
    125125  Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     126#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     127  Void  parseDIS            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     128#else
    126129#if H_3D_SINGLE_DEPTH
    127130  Void  parseSingleDepthMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    128 #endif 
     131#endif
     132#endif
    129133  Void  parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    130134  Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r1133 r1163  
    299299#if H_3D_NBDV
    300300  DisInfo DvInfo;
     301#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    301302  DvInfo.bDV = false;
     303#endif
    302304  DvInfo.m_acNBDV.setZero();
    303305  DvInfo.m_aVIdxCan = 0;
     
    334336      if( pcCU->getSlice()->getIsDepth())
    335337      {
     338#if SEC_ARP_REM_ENC_RESTRICT_K0035
     339        m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
     340#else
    336341        DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);
     342#endif
    337343      }
    338344      else
     
    342348      if( pcCU->getSlice()->getDepthBasedBlkPartFlag() )  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
    343349      {
     350#if SEC_ARP_REM_ENC_RESTRICT_K0035
     351        m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
     352#else
    344353        DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
     354#endif
    345355      }
    346356      else
    347357#endif
    348358      {
     359#if SEC_ARP_REM_ENC_RESTRICT_K0035
     360        m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
     361#else
    349362        DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
     363#endif
    350364      }
    351365#if H_3D_IV_MERGE
     
    520534    return;
    521535  }
     536#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     537  m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth );
     538  if(!pcCU->getDISFlag(uiAbsPartIdx))
     539  {
     540#else
    522541#if H_3D_SINGLE_DEPTH
    523542  m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
    524543  if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    525544  {
     545#endif
    526546#endif
    527547  m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
     
    554574  m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
    555575  setdQPFlag( bCodeDQP );
     576#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     577  }
     578#else
    556579#if H_3D_SINGLE_DEPTH
    557580  }
     581#endif
    558582#endif
    559583  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
     
    656680      break;
    657681    case MODE_INTRA:
     682#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     683      if( m_ppcCU[uiDepth]->getDISFlag(0) )
     684      {
     685        xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
     686      }
     687#if H_3D_DIM_SDC
     688      else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
     689      {
     690        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
     691      }
     692#endif
     693      else
     694#else
    658695#if H_3D_SINGLE_DEPTH
    659696      if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) )
     
    671708#endif
    672709#endif
     710#endif
    673711      xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
    674712      break;
     
    704742  }
    705743}
     744
     745#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     746Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     747{
     748  UInt uiWidth        = pcCU->getWidth  ( 0 );
     749  UInt uiHeight       = pcCU->getHeight ( 0 );
     750
     751  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     752
     753  UInt    uiStride    = pcRecoYuv->getStride  ();
     754  Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
     755
     756
     757  AOF( uiWidth == uiHeight );
     758  AOF( uiAbsPartIdx == 0 );
     759
     760  Bool  bAboveAvail = false;
     761  Bool  bLeftAvail  = false;
     762  pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
     763  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0,
     764    m_pcPrediction->getPredicBuf       (),
     765    m_pcPrediction->getPredicBufWidth  (),
     766    m_pcPrediction->getPredicBufHeight (),
     767    bAboveAvail, bLeftAvail
     768    );
     769
     770  if ( pcCU->getDISType(uiAbsPartIdx) == 0 )
     771  {
     772    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     773  }
     774  else if ( pcCU->getDISType(uiAbsPartIdx) == 1 )
     775  {
     776    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     777  }
     778  else if ( pcCU->getDISType(uiAbsPartIdx) == 2 )
     779  {
     780    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     781    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 );
     782    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     783    {
     784      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     785      {
     786        piReco[ uiX ] = pSingleDepth;
     787      }
     788      piReco+= uiStride;
     789    }
     790  }
     791  else if ( pcCU->getDISType(uiAbsPartIdx) == 3 )
     792  {
     793    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     794    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 );
     795    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     796    {
     797      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     798      {
     799        piReco[ uiX ] = pSingleDepth;
     800      }
     801      piReco+= uiStride;
     802    }
     803  }
     804
     805  // clear UV
     806  UInt  uiStrideC     = pcRecoYuv->getCStride();
     807  Pel   *pRecCb       = pcRecoYuv->getCbAddr();
     808  Pel   *pRecCr       = pcRecoYuv->getCrAddr();
     809
     810  for (Int y=0; y<uiHeight/2; y++)
     811  {
     812    for (Int x=0; x<uiWidth/2; x++)
     813    {
     814      pRecCb[x] = 1<<(g_bitDepthC-1);
     815      pRecCr[x] = 1<<(g_bitDepthC-1);
     816    }
     817
     818    pRecCb += uiStrideC;
     819    pRecCr += uiStrideC;
     820  }
     821}
     822#else
    706823#if H_3D_SINGLE_DEPTH
    707824Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    772889}
    773890#endif
     891#endif
     892
    774893#if H_3D_INTER_SDC
    775894Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCu.h

    r1084 r1163  
    123123  Void setdQPFlag               ( Bool b )                { m_bDecodeDQP = b;           }
    124124  Void xFillPCMBuffer           (TComDataCU* pCU, UInt depth);
     125#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     126  Void xReconDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     127#else
    125128#if H_3D_SINGLE_DEPTH
    126129  Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     130#endif
    127131#endif
    128132#if H_3D_DIM_SDC
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1133 r1163  
    5252  m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
    5353}
     54
     55#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     56Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     57{
     58  if( !pcCU->getSlice()->getDepthIntraSkipFlag() )
     59  {
     60    return;
     61  } 
     62
     63  m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth );
     64}
     65#else
    5466#if H_3D_SINGLE_DEPTH
    5567Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    6375}
    6476#endif
     77#endif
     78
    6579Void TDecEntropy::decodeCUTransquantBypassFlag(TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    6680{
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.h

    r1133 r1163  
    8585public:
    8686  virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     87#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     88  virtual Void parseDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     89#else
    8790#if H_3D_SINGLE_DEPTH
    8891  virtual Void parseSingleDepthMode       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     92#endif
    8993#endif
    9094  virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    171175  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    172176  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     177#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     178  Void decodeDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
     179#else
    173180#if H_3D_SINGLE_DEPTH
    174181  Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
     182#endif
    175183#endif
    176184  Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp

    r1133 r1163  
    5252, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
    5353, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     54#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     55, m_cCUDISFlagSCModel         ( 1,             1,               NUM_DIS_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     56, m_cCUDISTypeSCModel         ( 1,             1,               NUM_DIS_TYPE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     57#else
    5458#if H_3D_SINGLE_DEPTH
    5559, m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    5660, m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
     61#endif
    5762#endif
    5863, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
     
    136141  m_cCUSplitFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    137142  m_cCUSkipFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SKIP_FLAG );
     143#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     144  m_cCUDISFlagSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_FLAG );
     145  m_cCUDISTypeSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_TYPE );
     146#else
    138147#if H_3D_SINGLE_DEPTH
    139148  m_cCUSingleDepthFlagSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    140149  m_cSingleDepthValueSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     150#endif
    141151#endif
    142152  m_cCUMergeFlagExtSCModel.initBuffer    ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
     
    207217  m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG );
    208218  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
     219#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     220  m_cCUDISFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
     221  m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
     222#else
    209223#if H_3D_SINGLE_DEPTH
    210224  m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    211225  m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     226#endif
    212227#endif
    213228  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT );
     
    570585#endif
    571586}
     587
     588#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     589Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     590{
     591  pcCU->setDISFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     592  UInt uiSymbol = 0;
     593  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) );
     594  if( uiSymbol )
     595  {
     596    pcCU->setDISFlagSubParts( true,        uiAbsPartIdx, uiDepth );
     597    pcCU->setSkipFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     598    pcCU->setSDCFlagSubParts( false,        uiAbsPartIdx, uiDepth );
     599    pcCU->setPredModeSubParts( MODE_INTRA,  uiAbsPartIdx, uiDepth );
     600    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     601    pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth );
     602    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     603    pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
     604    pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth);
     605    pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth);
     606
     607    UInt uiUnaryIdx = 0;
     608    UInt uiNumCand  = 4;
     609
     610    if ( uiNumCand > 1 )
     611    {
     612      for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx )
     613      {
     614        UInt uiSymbol2 = 0;
     615        if ( uiUnaryIdx==0 )
     616        {
     617          m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) );
     618        }
     619        else
     620        {
     621          m_pcTDecBinIf->decodeBinEP( uiSymbol2);
     622        }
     623        if( uiSymbol2 == 0 )
     624        {
     625          break;
     626        }
     627      }
     628    }
     629    pcCU->setDISTypeSubParts(uiUnaryIdx, uiAbsPartIdx, 0, uiDepth);
     630  }
     631}
     632#else
    572633#if H_3D_SINGLE_DEPTH
    573634Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    616677  }
    617678}
    618 
    619 #endif
     679#endif
     680#endif
     681
    620682/** parse merge flag
    621683 * \param pcCU
  • branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecSbac.h

    r1133 r1163  
    125125 
    126126  Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     127#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     128  Void parseDIS          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     129#else
    127130#if H_3D_SINGLE_DEPTH 
    128131  Void parseSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    129 #endif 
     132#endif
     133#endif
    130134  Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    131135  Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    178182  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    179183  ContextModel3DBuffer m_cCUSkipFlagSCModel;
     184#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     185  ContextModel3DBuffer m_cCUDISFlagSCModel;
     186  ContextModel3DBuffer m_cCUDISTypeSCModel;
     187#else
    180188#if H_3D_SINGLE_DEPTH
    181189  ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;
    182190  ContextModel3DBuffer m_cSingleDepthValueSCModel;
     191#endif
    183192#endif
    184193  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1133 r1163  
    889889      WRITE_FLAG( sps3dExt->getQtPredFlag( d ) ? 1 : 0 , "qt_pred_flag" );
    890890      WRITE_FLAG( sps3dExt->getInterSdcFlag( d ) ? 1 : 0 , "inter_sdc_flag" );
     891#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     892      WRITE_FLAG( sps3dExt->getDepthIntraSkipFlag( d ) ? 1 : 0 , "depth_intra_skip_flag" );
     893#else
    891894      WRITE_FLAG( sps3dExt->getIntraSingleFlag( d ) ? 1 : 0 , "intra_single_flag" );
     895#endif
    892896    }
    893897  }
     
    24352439  assert(0);
    24362440}
     2441
     2442#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2443Void TEncCavlc::codeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx )
     2444{
     2445  assert(0);
     2446}
     2447#else
    24372448#if H_3D_SINGLE_DEPTH
    24382449Void TEncCavlc::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
     
    24412452}
    24422453#endif
     2454#endif
     2455
    24432456Void TEncCavlc::codeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    24442457{
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCavlc.h

    r1133 r1163  
    127127  Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx );
    128128  Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     129#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     130  Void codeDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     131#else
    129132#if H_3D_SINGLE_DEPTH
    130133  Void codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx );
     134#endif
    131135#endif
    132136  Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp

    r1133 r1163  
    437437#if H_3D_VSP
    438438  DisInfo DvInfo;
     439#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    439440  DvInfo.bDV = false;
     441#endif
    440442  DvInfo.m_acNBDV.setZero();
    441443  DvInfo.m_aVIdxCan = 0;
     
    583585          if (rpcTempCU->getSlice()->getIsDepth() )
    584586          {
     587#if SEC_ARP_REM_ENC_RESTRICT_K0035
     588            rpcTempCU->getDispforDepth(0, 0, &DvInfo);
     589#else
    585590            DvInfo.bDV = rpcTempCU->getDispforDepth(0, 0, &DvInfo);
     591#endif
    586592          }
    587593          else
     
    590596#if H_3D_NBDV_REF
    591597          if( rpcTempCU->getSlice()->getDepthRefinementFlag() )
     598#if SEC_ARP_REM_ENC_RESTRICT_K0035
     599            rpcTempCU->getDisMvpCandNBDV(&DvInfo, true);
     600#else
    592601            DvInfo.bDV = rpcTempCU->getDisMvpCandNBDV(&DvInfo, true);
     602#endif
    593603          else
    594604#endif
     605#if SEC_ARP_REM_ENC_RESTRICT_K0035
     606            rpcTempCU->getDisMvpCandNBDV(&DvInfo);
     607#else
    595608            DvInfo.bDV = rpcTempCU->getDisMvpCandNBDV(&DvInfo);
     609#endif
    596610
    597611#if H_3D_IV_MERGE
     
    712726    }
    713727#endif
     728#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     729    rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
     730    if( rpcBestCU->getSlice()->getDepthIntraSkipFlag() )
     731    {
     732      xCheckRDCostDIS( rpcBestCU, rpcTempCU, SIZE_2Nx2N );
     733      rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
     734    }
     735#else
    714736#if H_3D_SINGLE_DEPTH
    715737    rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
     
    719741      rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
    720742    }
     743#endif
    721744#endif
    722745    if(!earlyDetectionSkipMode)
     
    15771600    return;
    15781601  }
     1602#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1603  m_pcEntropyCoder->encodeDIS( pcCU, uiAbsPartIdx );
     1604  if(!pcCU->getDISFlag(uiAbsPartIdx))
     1605  {
     1606#else
    15791607#if H_3D_SINGLE_DEPTH
    15801608  m_pcEntropyCoder->encodeSingleDepthMode( pcCU, uiAbsPartIdx );
    15811609  if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    15821610  {
     1611#endif
    15831612#endif
    15841613  m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx );
     
    16141643  m_pcEntropyCoder->encodeCoeff( pcCU, uiAbsPartIdx, uiDepth, pcCU->getWidth (uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), bCodeDQP );
    16151644  setdQPFlag( bCodeDQP );
     1645#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1646  }
     1647#else
    16161648#if H_3D_SINGLE_DEPTH
    16171649  }
     1650#endif
    16181651#endif
    16191652  // --- write terminating bit ---
     
    18341867#if H_3D_ARP
    18351868  Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1;
     1869#if SEC_ARP_REM_ENC_RESTRICT_K0035
     1870  if( nARPWMax < 0 || bICFlag )
     1871#else
    18361872  if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV || bICFlag )
     1873#endif
    18371874  {
    18381875    nARPWMax = 0;
     
    20002037
    20012038          rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );
     2039#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2040          rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2041#else
    20022042#if H_3D_SINGLE_DEPTH
    20032043          rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2044#endif
    20042045#endif
    20052046#if H_3D_VSP // possible bug fix
     
    20422083              }
    20432084              rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
     2085#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2086              rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2087#else
    20442088#if H_3D_SINGLE_DEPTH
    20452089              rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2090#endif
    20462091#endif
    20472092              rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
     
    21662211  Bool bFirstTime = true;
    21672212  Int nARPWMax    = rpcTempCU->getSlice()->getARPStepNum() - 1;
    2168 
     2213#if SEC_ARP_REM_ENC_RESTRICT_K0035
     2214  if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || rpcTempCU->getICFlag(0) )
     2215#else
    21692216  if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV || rpcTempCU->getICFlag(0) )
     2217#endif
    21702218  {
    21712219    nARPWMax = 0;
     
    21932241 
    21942242  rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
     2243#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2244  rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2245#else
    21952246#if H_3D_SINGLE_DEPTH
    21962247  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2248#endif
    21972249#endif
    21982250  rpcTempCU->setPartSizeSubParts  ( ePartSize,  0, uhDepth );
     
    23032355      }
    23042356      rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
     2357#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2358      rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2359#else
    23052360#if H_3D_SINGLE_DEPTH
    23062361      rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2362#endif
    23072363#endif
    23082364      rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
     
    24132469  }
    24142470}
     2471
     2472#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2473Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
     2474{
     2475  UInt uiDepth = rpcTempCU->getDepth( 0 );
     2476  if( !rpcBestCU->getSlice()->getIsDepth() || (eSize != SIZE_2Nx2N))
     2477  {
     2478    return;
     2479  }
     2480
     2481#if H_3D_VSO // M5
     2482  if( m_pcRdCost->getUseRenModel() )
     2483  {
     2484    UInt  uiWidth     = m_ppcOrigYuv[uiDepth]->getWidth   ();
     2485    UInt  uiHeight    = m_ppcOrigYuv[uiDepth]->getHeight  ();
     2486    Pel*  piSrc       = m_ppcOrigYuv[uiDepth]->getLumaAddr();
     2487    UInt  uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride  ();
     2488    m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
     2489  }
     2490#endif
     2491
     2492  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
     2493  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
     2494  rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth );
     2495  rpcTempCU->setCUTransquantBypassSubParts( rpcTempCU->getCUTransquantBypass(0), 0, uiDepth );
     2496
     2497  rpcTempCU->setTrIdxSubParts(0, 0, uiDepth);
     2498  rpcTempCU->setCbfSubParts(0, 1, 1, 0, uiDepth);
     2499  rpcTempCU->setDISFlagSubParts(true, 0, uiDepth);
     2500  rpcTempCU->setLumaIntraDirSubParts (DC_IDX, 0, uiDepth);
     2501#if H_3D_DIM_SDC
     2502  rpcTempCU->setSDCFlagSubParts( false, 0, uiDepth);
     2503#endif
     2504
     2505  UInt uiPreCalcDistC;
     2506  m_pcPredSearch  ->estIntraPredDIS      ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, false );
     2507
     2508
     2509  m_ppcRecoYuvTemp[uiDepth]->copyToPicLuma(rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU() );
     2510
     2511
     2512  m_pcEntropyCoder->resetBits();
     2513  if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
     2514  {
     2515    m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0,          true );
     2516  }
     2517  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
     2518  m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
     2519
     2520
     2521  m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
     2522
     2523  rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits();
     2524  rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
     2525
     2526
     2527#if H_3D_VSO // M6
     2528  if( m_pcRdCost->getUseLambdaScaleVSO()) 
     2529    rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 
     2530  else
     2531#endif
     2532    rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     2533
     2534
     2535  xCheckDQP( rpcTempCU );
     2536  xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
     2537}
     2538#else
    24152539#if H_3D_SINGLE_DEPTH
    24162540Void TEncCu::xCheckRDCostSingleDepth( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
     
    24792603  xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
    24802604}
     2605#endif
    24812606#endif
    24822607
     
    26362761
    26372762  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
     2763#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2764  rpcTempCU->setDISFlagSubParts( false, 0, uiDepth );
     2765#else
    26382766#if H_3D_SINGLE_DEPTH
    26392767  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth );
     2768#endif
    26402769#endif
    26412770  rpcTempCU->setPartSizeSubParts( eSize, 0, uiDepth );
     
    26662795  }
    26672796  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
     2797#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2798  m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
     2799  if(!rpcTempCU->getDISFlag(0))
     2800  {
     2801#else
    26682802#if H_3D_SINGLE_DEPTH
    26692803  m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0,          true );
    26702804  if(!rpcTempCU->getSingleDepthFlag(0))
    26712805  {
     2806#endif
    26722807#endif
    26732808  m_pcEntropyCoder->encodePredMode( rpcTempCU, 0,          true );
     
    26832818  m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP );
    26842819  setdQPFlag( bCodeDQP );
     2820#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2821  }
     2822#else
    26852823#if H_3D_SINGLE_DEPTH
    26862824  }
    2687 #endif       
     2825#endif
     2826#endif
    26882827  m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
    26892828 
     
    27132852
    27142853  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
     2854#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2855  rpcTempCU->setDISFlagSubParts( false, 0, uiDepth );
     2856#else
    27152857#if H_3D_SINGLE_DEPTH
    27162858  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth );
     2859#endif
    27172860#endif
    27182861  rpcTempCU->setIPCMFlag(0, true);
     
    27322875  }
    27332876  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
     2877#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2878  m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
     2879#else
    27342880#if H_3D_SINGLE_DEPTH
    27352881  m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0,          true );
     2882#endif
    27362883#endif
    27372884  m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0,          true );
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.h

    r1084 r1163  
    159159  Void  xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false );
    160160#endif
     161#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     162  Void  xCheckRDCostDIS   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize  );
     163#else
    161164#if H_3D_SINGLE_DEPTH
    162165  Void  xCheckRDCostSingleDepth   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize  );
     166#endif
    163167#endif
    164168#if H_3D_DIM
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1133 r1163  
    111111  m_pcEntropyCoderIf->codeSkipFlag( pcCU, uiAbsPartIdx );
    112112}
     113
     114#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     115Void TEncEntropy::encodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
     116{
     117  if ( !pcCU->getSlice()->getIsDepth() )
     118  {
     119    return;
     120  }
     121  if( bRD )
     122  {
     123    uiAbsPartIdx = 0;
     124  }
     125  m_pcEntropyCoderIf->codeDIS( pcCU, uiAbsPartIdx );
     126}
     127#else
    113128#if H_3D_SINGLE_DEPTH
    114129Void TEncEntropy::encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
     
    125140}
    126141#endif
     142#endif
     143
    127144/** encode merge flag
    128145 * \param pcCU
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h

    r1133 r1163  
    8282  virtual Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    8383  virtual Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     84#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     85  virtual Void codeDIS          ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     86#else
    8487#if H_3D_SINGLE_DEPTH
    8588  virtual Void codeSingleDepthMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     89#endif
    8690#endif
    8791  virtual Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     
    166170  Void encodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    167171  Void encodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
     172#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     173  Void encodeDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD=false );
     174#else
    168175#if H_3D_SINGLE_DEPTH
    169176  Void encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD=false );
     177#endif
    170178#endif
    171179  Void encodePUWise       ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp

    r1133 r1163  
    5858, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels )
    5959, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     60#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     61, m_cCUDISFlagSCModel         ( 1,             1,               NUM_DIS_FLAG_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
     62, m_cCUDISTypeSCModel         ( 1,             1,               NUM_DIS_TYPE_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
     63#else
    6064#if H_3D_SINGLE_DEPTH
    6165, m_cCUSingleDepthFlagSCModel        ( 1,             1,               NUM_SINGLEDEPTH_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    6266, m_cSingleDepthValueSCModel         ( 1,             1,               NUM_SINGLE_DEPTH_VALUE_DATA_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
     67#endif
    6368#endif
    6469, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
     
    134139 
    135140  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
     141#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     142  m_cCUDISFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
     143  m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
     144#else
    136145#if H_3D_SINGLE_DEPTH
    137146  m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    138147  m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     148#endif
    139149#endif
    140150  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT);
     
    214224      curCost  = m_cCUSplitFlagSCModel.calcCost       ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    215225      curCost += m_cCUSkipFlagSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG );
     226#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     227      curCost += m_cCUDISFlagSCModel.calcCost         ( curSliceType, qp, (UChar*)INIT_DIS_FLAG );
     228      curCost += m_cCUDISTypeSCModel.calcCost         ( curSliceType, qp, (UChar*)INIT_DIS_TYPE );
     229#else
    216230#if H_3D_SINGLE_DEPTH
    217231      curCost += m_cCUSingleDepthFlagSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    218232      curCost += m_cSingleDepthValueSCModel.calcCost         ( curSliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
     233#endif
    219234#endif
    220235      curCost += m_cCUMergeFlagExtSCModel.calcCost    ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT);
     
    287302 
    288303  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
     304#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     305  m_cCUDISFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
     306  m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
     307#else
    289308#if H_3D_SINGLE_DEPTH
    290309  m_cCUSingleDepthFlagSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );
    291310  m_cSingleDepthValueSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );
    292 #endif 
     311#endif
     312#endif
    293313  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT);
    294314  m_cCUMergeIdxExtSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT);
     
    446466  m_pcBinIf->encodeBinsEP( bins, numBins );
    447467}
     468
     469#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     470Void TEncSbac::codeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx )
     471{
     472  UInt uiSymbol = pcCU->getDISFlag(uiAbsPartIdx ) ? 1 : 0;
     473  m_pcBinIf->encodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) );
     474  if(uiSymbol)
     475  {
     476    UInt uiUnaryIdx = (UInt) pcCU->getDISType(uiAbsPartIdx);
     477    UInt uiNumCand  = 4;
     478
     479    if ( uiNumCand > 1 )
     480    {
     481      for( UInt ui = 0; ui < uiNumCand - 1; ++ui )
     482      {
     483        const UInt uiSymbol2 = ui == uiUnaryIdx ? 0 : 1;
     484        if ( ui == 0 )
     485        {
     486          m_pcBinIf->encodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) );
     487        }
     488        else
     489        {
     490          m_pcBinIf->encodeBinEP( uiSymbol2 );
     491        }
     492        if( uiSymbol2 == 0 )
     493        {
     494          break;
     495        }
     496      }
     497    }
     498  }
     499}
     500#else
    448501#if H_3D_SINGLE_DEPTH
    449502Void TEncSbac::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
     
    477530}
    478531#endif
     532#endif
     533
    479534/** Coding of coeff_abs_level_minus3
    480535 * \param uiSymbol value of coeff_abs_level_minus3
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSbac.h

    r1133 r1163  
    146146  Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx );
    147147  Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     148#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     149  Void codeDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     150#else
    148151#if H_3D_SINGLE_DEPTH
    149152  Void codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx );
     153#endif
    150154#endif
    151155  Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     
    215219  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    216220  ContextModel3DBuffer m_cCUSkipFlagSCModel;
     221#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     222  ContextModel3DBuffer m_cCUDISFlagSCModel;
     223  ContextModel3DBuffer m_cCUDISTypeSCModel;
     224#else
    217225#if H_3D_SINGLE_DEPTH
    218226  ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;
    219227  ContextModel3DBuffer m_cSingleDepthValueSCModel;
     228#endif
    220229#endif
    221230  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r1133 r1163  
    915915        }
    916916        m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true );
     917#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     918        m_pcEntropyCoder->encodeDIS(pcCU, 0, true );
     919        if(!pcCU->getDISFlag(uiAbsPartIdx))
     920#else
    917921#if H_3D_SINGLE_DEPTH
    918922        m_pcEntropyCoder->encodeSingleDepthMode(pcCU, 0, true );
    919923        if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    920924#endif
     925#endif
    921926        m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    922927      }
     928#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     929      else
     930      {
     931        m_pcEntropyCoder->encodeDIS(pcCU, 0, true );
     932      }
     933#else
    923934#if H_3D_SINGLE_DEPTH
    924935      else
     
    926937        m_pcEntropyCoder->encodeSingleDepthMode(pcCU, 0, true );
    927938      }
    928 #endif     
     939#endif
     940#endif
     941#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     942      if(!pcCU->getDISFlag(uiAbsPartIdx))
     943      {
     944#else
    929945#if H_3D_SINGLE_DEPTH
    930946      if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    931947      {
    932948#endif
     949#endif
    933950      m_pcEntropyCoder  ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    934951
     
    945962        }
    946963      }
     964#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     965      }
     966#else
    947967#if H_3D_SINGLE_DEPTH
    948968    }
    949969#endif
    950     }
     970#endif
     971    }
     972#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     973    if(!pcCU->getDISFlag(uiAbsPartIdx))
     974    {
     975#else
    951976#if H_3D_SINGLE_DEPTH
    952977      if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    953978      {
     979#endif
    954980#endif
    955981    // luma prediction mode
     
    9951021    }
    9961022  }
     1023#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1024 }
     1025#else
    9971026#if H_3D_SINGLE_DEPTH
    9981027    }
     1028#endif
    9991029#endif
    10001030  }
     
    18591889  dRDCost  += dSingleCost;
    18601890}
     1891
     1892#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1893Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode )
     1894{
     1895  UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
     1896  UInt    uiHeight          = pcCU     ->getHeight  ( 0 );
     1897  UInt    uiStride          = pcOrgYuv ->getStride  ();
     1898  Pel*    piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
     1899  Pel*    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     1900
     1901  AOF( uiWidth == uiHeight );
     1902  AOF( uiAbsPartIdx == 0 );
     1903  pcCU->setDISTypeSubParts(uiPredMode, uiAbsPartIdx, 0, pcCU->getDepth(0)); 
     1904  //===== reconstruction =====
     1905
     1906  Bool bAboveAvail = false;
     1907  Bool bLeftAvail  = false;
     1908  pcCU->getPattern()->initPattern   ( pcCU, 0, 0 );
     1909  pcCU->getPattern()->initAdiPattern( pcCU, 0, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
     1910
     1911  if ( uiPredMode == 0 )
     1912  {
     1913    predIntraLumaAng( pcCU->getPattern(), VER_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1914  }
     1915  else if ( uiPredMode == 1 )
     1916  {
     1917    predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1918  }
     1919  else if ( uiPredMode == 2 )
     1920  {
     1921    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     1922    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 );
     1923    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     1924    {
     1925      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     1926      {
     1927        piPred[ uiX ] = pSingleDepth;
     1928      }
     1929      piPred+= uiStride;
     1930    }
     1931  }
     1932  else if ( uiPredMode == 3 )
     1933  {
     1934    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     1935    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 );
     1936    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     1937    {
     1938      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     1939      {
     1940        piPred[ uiX ] = pSingleDepth;
     1941      }
     1942      piPred+= uiStride;
     1943    }
     1944  }
     1945
     1946  // clear UV
     1947  UInt  uiStrideC     = pcPredYuv->getCStride();
     1948  Pel   *pRecCb       = pcPredYuv->getCbAddr();
     1949  Pel   *pRecCr       = pcPredYuv->getCrAddr();
     1950
     1951  for (Int y=0; y<uiHeight/2; y++)
     1952  {
     1953    for (Int x=0; x<uiWidth/2; x++)
     1954    {
     1955      pRecCb[x] = 1<<(g_bitDepthC-1);
     1956      pRecCr[x] = 1<<(g_bitDepthC-1);
     1957    }
     1958
     1959    pRecCb += uiStrideC;
     1960    pRecCr += uiStrideC;
     1961  }
     1962
     1963  piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     1964  //===== determine distortion =====
     1965#if H_3D_VSO
     1966  if ( m_pcRdCost->getUseVSO() )
     1967    ruiDist = m_pcRdCost->getDistPartVSO  ( pcCU, uiAbsPartIdx, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false );
     1968  else
     1969#endif
     1970    ruiDist = m_pcRdCost->getDistPart(g_bitDepthY, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight );
     1971
     1972  //===== determine rate and r-d cost =====
     1973  m_pcEntropyCoder->resetBits();
     1974  m_pcEntropyCoder->encodeDIS( pcCU, 0, true );
     1975  UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
     1976
     1977#if H_3D_VSO
     1978  if ( m_pcRdCost->getUseLambdaScaleVSO())
     1979    dRDCost = m_pcRdCost->calcRdCostVSO( uiBits, ruiDist );
     1980  else
     1981#endif
     1982    dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist );
     1983}
     1984#else
    18611985#if H_3D_SINGLE_DEPTH
    18621986Void TEncSearch::xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel *DepthNeighbor )
     
    19212045}
    19222046#endif
     2047#endif
     2048
    19232049#if H_3D_DIM_SDC
    19242050Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi  )
     
    28612987  pcCU->setChromIntraDirSubParts( uiBestMode, 0, pcCU->getDepth( 0 ) );
    28622988}
     2989
     2990#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2991Void TEncSearch::estIntraPredDIS( TComDataCU* pcCU,
     2992                                  TComYuv*    pcOrgYuv,
     2993                                  TComYuv*    pcPredYuv,
     2994                                  TComYuv*    pcResiYuv,
     2995                                  TComYuv*    pcRecoYuv,
     2996                                  UInt&       ruiDistC,
     2997                                  Bool        bLumaOnly )
     2998{
     2999  UInt    uiDepth        = pcCU->getDepth(0);
     3000  UInt    uiWidth        = pcCU->getWidth (0);
     3001  UInt    uiHeight       = pcCU->getHeight(0);
     3002
     3003
     3004  Pel* piOrg         = pcOrgYuv ->getLumaAddr( 0, uiWidth );
     3005  UInt uiStride      = pcPredYuv->getStride();
     3006
     3007  Dist   uiDist = 0;
     3008  Double dCost   = 0.0;
     3009  Dist    uiBestDist = 0;
     3010  Double  dBestCost   = MAX_DOUBLE;
     3011  UInt     uiBestDISType = 0;
     3012
     3013  for( UInt uiPredMode = 0; uiPredMode < 4 ; uiPredMode++ )
     3014  {
     3015    // set context models
     3016    m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );
     3017
     3018    // determine residual for partition
     3019    uiDist = 0;
     3020    dCost   = 0.0;
     3021#if H_3D_VSO // M36
     3022    if( m_pcRdCost->getUseRenModel() )
     3023    {
     3024      m_pcRdCost->setRenModelData( pcCU, 0, piOrg, uiStride, uiWidth, uiHeight );
     3025    }
     3026#endif
     3027    xIntraCodingDIS(pcCU, 0, pcOrgYuv, pcPredYuv, uiDist, dCost, uiPredMode);
     3028    // check r-d cost
     3029    if( dCost < dBestCost )
     3030    {
     3031      uiBestDist = uiDist;
     3032      dBestCost   = dCost;
     3033      uiBestDISType = pcCU->getDISType(0);
     3034      // copy reconstruction
     3035      pcPredYuv->copyPartToPartYuv(pcRecoYuv, 0, uiWidth, uiHeight);
     3036    }
     3037  }
     3038
     3039
     3040  pcCU->setDISTypeSubParts(uiBestDISType, 0, 0, uiDepth); 
     3041  assert(uiBestDISType >= 0);
     3042
     3043  //===== reset context models =====
     3044  m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]);
     3045
     3046  //===== set distortion (rate and r-d costs are determined later) =====
     3047  pcCU->getTotalDistortion() = uiBestDist;
     3048}
     3049#else
    28633050#if H_3D_SINGLE_DEPTH
    28643051Void
     
    29503137
    29513138#endif
     3139#endif
     3140
    29523141Void
    29533142TEncSearch::estIntraPredQT( TComDataCU* pcCU,
     
    72617450    }
    72627451    m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true );
     7452#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     7453    m_pcEntropyCoder->encodeDIS ( pcCU, 0, true );
     7454#else
    72637455#if H_3D_SINGLE_DEPTH
    72647456    m_pcEntropyCoder->encodeSingleDepthMode ( pcCU, 0, true );
     7457#endif
    72657458#endif
    72667459    m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
  • branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSearch.h

    r1084 r1163  
    191191                                  TComYuv*    pcRecoYuv,
    192192                                  UInt        uiPreCalcDistC );
     193#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     194  Void  estIntraPredDIS        ( TComDataCU* pcCU,
     195                                 TComYuv*    pcOrgYuv,
     196                                 TComYuv*    pcPredYuv,
     197                                 TComYuv*    pcResiYuv,
     198                                 TComYuv*    pcRecoYuv,
     199                                 UInt&       ruiDistC,
     200                                 Bool        bLumaOnly );
     201#else
    193202#if H_3D_SINGLE_DEPTH
    194203  Void  estIntraPredSingleDepth  ( TComDataCU* pcCU,
     
    199208                                  UInt&       ruiDistC,
    200209                                  Bool        bLumaOnly );
    201 #endif   
     210#endif
     211#endif
    202212 
    203213  /// encoder estimation - inter prediction (non-skip)
     
    354364                                    UInt         uiAbsPartIdx,
    355365                                    UInt         stateU0V1Both2 );
     366#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     367  Void xIntraCodingDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode );
     368#else
    356369#if H_3D_SINGLE_DEPTH
    357370  Void xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel * DepthNeighbor );
     371#endif
    358372#endif
    359373#if H_3D_DIM
Note: See TracChangeset for help on using the changeset viewer.