Changeset 1145 in 3DVCSoftware


Ignore:
Timestamp:
25 Feb 2015, 10:53:42 (9 years ago)
Author:
samsung-htm
Message:

Integration of K0033: Depth intra skip (DIS) mode

Location:
branches/HTM-13.1-dev1-Samsung
Files:
34 edited

Legend:

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

    r1124 r1145  
    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-dev1-Samsung/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg

    r1124 r1145  
    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-dev1-Samsung/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg

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

    r1124 r1145  
    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-dev1-Samsung/cfg/3D-HEVC/baseCfg_2view+depth.cfg

    r1124 r1145  
    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-dev1-Samsung/cfg/3D-HEVC/baseCfg_3view+depth.cfg

    r1124 r1145  
    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-dev1-Samsung/cfg/3D-HEVC/fullCfg.cfg

    r1124 r1145  
    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-dev1-Samsung/source/App/TAppEncoder/TAppEncCfg.cpp

    r1133 r1145  
    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-dev1-Samsung/source/App/TAppEncoder/TAppEncCfg.h

    r1133 r1145  
    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-dev1-Samsung/source/App/TAppEncoder/TAppEncTop.cpp

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibCommon/ContextTables.h

    r1084 r1145  
    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-dev1-Samsung/source/Lib/TLibCommon/TComDataCU.cpp

    r1133 r1145  
    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;
     
    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{
     
    58835963#endif
    58845964
    5885 #if H_3D_SINGLE_DEPTH
    5886 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index)
     5965#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     5966Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index )
    58875967{
    58885968
     
    59125992    break;
    59135993  default:
     5994    break;
     5995  }
     5996  return bDepAvail;
     5997}
     5998#else
     5999#if H_3D_SINGLE_DEPTH
     6000Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index)
     6001{
     6002
     6003  Bool bDepAvail = false;
     6004  Pel *pDepth  = this->getPic()->getPicYuvRec()->getLumaAddr();
     6005  Int iDepStride =  this->getPic()->getPicYuvRec()->getStride();
     6006
     6007  Int xP, yP, nPSW, nPSH;
     6008  this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH);
     6009  UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight();
     6010  UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth();
     6011  switch(index)
     6012  {
     6013  case 0: // Mid Left
     6014    if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) )
     6015    {
     6016      *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ];
     6017      bDepAvail = true;
     6018    }
     6019    break;
     6020  case 1: // Mid Above
     6021    if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) )
     6022    {
     6023      *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ];
     6024      bDepAvail = true;
     6025    }
     6026    break;
     6027  default:
    59146028      break;
    59156029  }
    59166030  return bDepAvail;
    59176031}
    5918 
    5919 #endif
     6032#endif
     6033#endif
     6034
    59206035#if H_3D_NBDV
    59216036//Notes from QC:
  • branches/HTM-13.1-dev1-Samsung/source/Lib/TLibCommon/TComDataCU.h

    r1133 r1145  
    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] ); }
     
    494511  Bool          getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm );
    495512#endif
     513#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     514   Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
     515#else
    496516#if H_3D_SINGLE_DEPTH
    497517   Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
     518#endif
    498519#endif
    499520#if H_3D_NBDV_REF
  • branches/HTM-13.1-dev1-Samsung/source/Lib/TLibCommon/TComSlice.cpp

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibCommon/TComSlice.h

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibCommon/TypeDef.h

    r1133 r1145  
    7878
    7979#if H_3D
     80#define SEC_DEPTH_INTRA_SKIP_MODE_K0033   1   // Depth intra skip mode
     81
    8082#define H_3D_QTLPC                        1   // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068
    8183                                              // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
     
    239241                                              // SHARP_DLT_SIMP_J0029              1   // DLT(DepthValue2Idx[]) table derivation cleanup
    240242
     243#if !SEC_DEPTH_INTRA_SKIP_MODE_K0033
    241244#define H_3D_SINGLE_DEPTH                 1   // Single depth mode proposed in JCT3V-I0095
    242245                                              // HS_SP_SIMP_J0066
    243246                                              // SINGLE_DEPTH_SIMP_J0115           1
    244247                                              // MTK_SINGLE_DEPTH_VPS_FLAG_J0060   1   // Add VPS control flags and remove slice header control flag for single depth, JCT3V-J0060
     248#endif
    245249
    246250#define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
     
    313317#define H_3D_OUTPUT_ACTIVE_TOOLS               0
    314318
     319#if !SEC_DEPTH_INTRA_SKIP_MODE_K0033
    315320///// ***** SINGLE DEPTH MODE *********
    316321#if H_3D_SINGLE_DEPTH
    317322#define SINGLE_DEPTH_MODE_CAND_LIST_SIZE            2 // size of the sample candidate list
    318323
     324#endif
    319325#endif
    320326
  • branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibDecoder/TDecCAVLC.h

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibDecoder/TDecCu.cpp

    r1133 r1145  
    520520    return;
    521521  }
     522#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     523  m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth );
     524  if(!pcCU->getDISFlag(uiAbsPartIdx))
     525  {
     526#else
    522527#if H_3D_SINGLE_DEPTH
    523528  m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
    524529  if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    525530  {
     531#endif
    526532#endif
    527533  m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
     
    554560  m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
    555561  setdQPFlag( bCodeDQP );
     562#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     563  }
     564#else
    556565#if H_3D_SINGLE_DEPTH
    557566  }
     567#endif
    558568#endif
    559569  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
     
    656666      break;
    657667    case MODE_INTRA:
     668#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     669      if( m_ppcCU[uiDepth]->getDISFlag(0) )
     670      {
     671        xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
     672      }
     673#if H_3D_DIM_SDC
     674      else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
     675      {
     676        xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth );
     677      }
     678#endif
     679      else
     680#else
    658681#if H_3D_SINGLE_DEPTH
    659682      if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) )
     
    671694#endif
    672695#endif
     696#endif
    673697      xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
    674698      break;
     
    704728  }
    705729}
     730
     731#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     732Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     733{
     734  UInt uiWidth        = pcCU->getWidth  ( 0 );
     735  UInt uiHeight       = pcCU->getHeight ( 0 );
     736
     737  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
     738
     739  UInt    uiStride    = pcRecoYuv->getStride  ();
     740  Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
     741
     742
     743  AOF( uiWidth == uiHeight );
     744  AOF( uiAbsPartIdx == 0 );
     745
     746  Bool  bAboveAvail = false;
     747  Bool  bLeftAvail  = false;
     748  pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
     749  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0,
     750    m_pcPrediction->getPredicBuf       (),
     751    m_pcPrediction->getPredicBufWidth  (),
     752    m_pcPrediction->getPredicBufHeight (),
     753    bAboveAvail, bLeftAvail
     754    );
     755
     756  if ( pcCU->getDISType(uiAbsPartIdx) == 0 )
     757  {
     758    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     759  }
     760  else if ( pcCU->getDISType(uiAbsPartIdx) == 1 )
     761  {
     762    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     763  }
     764  else if ( pcCU->getDISType(uiAbsPartIdx) == 2 )
     765  {
     766    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     767    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 );
     768    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     769    {
     770      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     771      {
     772        piReco[ uiX ] = pSingleDepth;
     773      }
     774      piReco+= uiStride;
     775    }
     776  }
     777  else if ( pcCU->getDISType(uiAbsPartIdx) == 3 )
     778  {
     779    Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     780    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 );
     781    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     782    {
     783      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     784      {
     785        piReco[ uiX ] = pSingleDepth;
     786      }
     787      piReco+= uiStride;
     788    }
     789  }
     790
     791  // clear UV
     792  UInt  uiStrideC     = pcRecoYuv->getCStride();
     793  Pel   *pRecCb       = pcRecoYuv->getCbAddr();
     794  Pel   *pRecCr       = pcRecoYuv->getCrAddr();
     795
     796  for (Int y=0; y<uiHeight/2; y++)
     797  {
     798    for (Int x=0; x<uiWidth/2; x++)
     799    {
     800      pRecCb[x] = 1<<(g_bitDepthC-1);
     801      pRecCr[x] = 1<<(g_bitDepthC-1);
     802    }
     803
     804    pRecCb += uiStrideC;
     805    pRecCr += uiStrideC;
     806  }
     807}
     808#else
    706809#if H_3D_SINGLE_DEPTH
    707810Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    772875}
    773876#endif
     877#endif
     878
    774879#if H_3D_INTER_SDC
    775880Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
  • branches/HTM-13.1-dev1-Samsung/source/Lib/TLibDecoder/TDecCu.h

    r1084 r1145  
    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-dev1-Samsung/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibDecoder/TDecEntropy.h

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibDecoder/TDecSbac.cpp

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibDecoder/TDecSbac.h

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibEncoder/TEncCavlc.h

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibEncoder/TEncCu.cpp

    r1133 r1145  
    712712    }
    713713#endif
     714#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     715    rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
     716    if( rpcBestCU->getSlice()->getDepthIntraSkipFlag() )
     717    {
     718      xCheckRDCostDIS( rpcBestCU, rpcTempCU, SIZE_2Nx2N );
     719      rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
     720    }
     721#else
    714722#if H_3D_SINGLE_DEPTH
    715723    rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
     
    719727      rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
    720728    }
     729#endif
    721730#endif
    722731    if(!earlyDetectionSkipMode)
     
    15771586    return;
    15781587  }
     1588#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1589  m_pcEntropyCoder->encodeDIS( pcCU, uiAbsPartIdx );
     1590  if(!pcCU->getDISFlag(uiAbsPartIdx))
     1591  {
     1592#else
    15791593#if H_3D_SINGLE_DEPTH
    15801594  m_pcEntropyCoder->encodeSingleDepthMode( pcCU, uiAbsPartIdx );
    15811595  if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))
    15821596  {
     1597#endif
    15831598#endif
    15841599  m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx );
     
    16141629  m_pcEntropyCoder->encodeCoeff( pcCU, uiAbsPartIdx, uiDepth, pcCU->getWidth (uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), bCodeDQP );
    16151630  setdQPFlag( bCodeDQP );
     1631#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1632  }
     1633#else
    16161634#if H_3D_SINGLE_DEPTH
    16171635  }
     1636#endif
    16181637#endif
    16191638  // --- write terminating bit ---
     
    20002019
    20012020          rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );
     2021#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2022          rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2023#else
    20022024#if H_3D_SINGLE_DEPTH
    20032025          rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2026#endif
    20042027#endif
    20052028#if H_3D_VSP // possible bug fix
     
    20422065              }
    20432066              rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
     2067#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2068              rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2069#else
    20442070#if H_3D_SINGLE_DEPTH
    20452071              rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2072#endif
    20462073#endif
    20472074              rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
     
    21932220 
    21942221  rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
     2222#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2223  rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2224#else
    21952225#if H_3D_SINGLE_DEPTH
    21962226  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2227#endif
    21972228#endif
    21982229  rpcTempCU->setPartSizeSubParts  ( ePartSize,  0, uhDepth );
     
    23032334      }
    23042335      rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
     2336#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2337      rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
     2338#else
    23052339#if H_3D_SINGLE_DEPTH
    23062340      rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth );
     2341#endif
    23072342#endif
    23082343      rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
     
    24132448  }
    24142449}
     2450
     2451#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2452Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
     2453{
     2454  UInt uiDepth = rpcTempCU->getDepth( 0 );
     2455  if( !rpcBestCU->getSlice()->getIsDepth() || (eSize != SIZE_2Nx2N))
     2456  {
     2457    return;
     2458  }
     2459
     2460#if H_3D_VSO // M5
     2461  if( m_pcRdCost->getUseRenModel() )
     2462  {
     2463    UInt  uiWidth     = m_ppcOrigYuv[uiDepth]->getWidth   ();
     2464    UInt  uiHeight    = m_ppcOrigYuv[uiDepth]->getHeight  ();
     2465    Pel*  piSrc       = m_ppcOrigYuv[uiDepth]->getLumaAddr();
     2466    UInt  uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride  ();
     2467    m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
     2468  }
     2469#endif
     2470
     2471  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
     2472  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
     2473  rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth );
     2474  rpcTempCU->setCUTransquantBypassSubParts( rpcTempCU->getCUTransquantBypass(0), 0, uiDepth );
     2475
     2476  rpcTempCU->setTrIdxSubParts(0, 0, uiDepth);
     2477  rpcTempCU->setCbfSubParts(0, 1, 1, 0, uiDepth);
     2478  rpcTempCU->setDISFlagSubParts(true, 0, uiDepth);
     2479  rpcTempCU->setLumaIntraDirSubParts (DC_IDX, 0, uiDepth);
     2480#if H_3D_DIM_SDC
     2481  rpcTempCU->setSDCFlagSubParts( false, 0, uiDepth);
     2482#endif
     2483
     2484  UInt uiPreCalcDistC;
     2485  m_pcPredSearch  ->estIntraPredDIS      ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, false );
     2486
     2487
     2488  m_ppcRecoYuvTemp[uiDepth]->copyToPicLuma(rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU() );
     2489
     2490
     2491  m_pcEntropyCoder->resetBits();
     2492  if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
     2493  {
     2494    m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0,          true );
     2495  }
     2496  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
     2497  m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
     2498
     2499
     2500  m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
     2501
     2502  rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits();
     2503  rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
     2504
     2505
     2506#if H_3D_VSO // M6
     2507  if( m_pcRdCost->getUseLambdaScaleVSO()) 
     2508    rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 
     2509  else
     2510#endif
     2511    rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     2512
     2513
     2514  xCheckDQP( rpcTempCU );
     2515  xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
     2516}
     2517#else
    24152518#if H_3D_SINGLE_DEPTH
    24162519Void TEncCu::xCheckRDCostSingleDepth( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
     
    24792582  xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
    24802583}
     2584#endif
    24812585#endif
    24822586
     
    26362740
    26372741  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
     2742#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2743  rpcTempCU->setDISFlagSubParts( false, 0, uiDepth );
     2744#else
    26382745#if H_3D_SINGLE_DEPTH
    26392746  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth );
     2747#endif
    26402748#endif
    26412749  rpcTempCU->setPartSizeSubParts( eSize, 0, uiDepth );
     
    26662774  }
    26672775  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
     2776#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2777  m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
     2778  if(!rpcTempCU->getDISFlag(0))
     2779  {
     2780#else
    26682781#if H_3D_SINGLE_DEPTH
    26692782  m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0,          true );
    26702783  if(!rpcTempCU->getSingleDepthFlag(0))
    26712784  {
     2785#endif
    26722786#endif
    26732787  m_pcEntropyCoder->encodePredMode( rpcTempCU, 0,          true );
     
    26832797  m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP );
    26842798  setdQPFlag( bCodeDQP );
     2799#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2800  }
     2801#else
    26852802#if H_3D_SINGLE_DEPTH
    26862803  }
    2687 #endif       
     2804#endif
     2805#endif
    26882806  m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
    26892807 
     
    27132831
    27142832  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
     2833#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2834  rpcTempCU->setDISFlagSubParts( false, 0, uiDepth );
     2835#else
    27152836#if H_3D_SINGLE_DEPTH
    27162837  rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth );
     2838#endif
    27172839#endif
    27182840  rpcTempCU->setIPCMFlag(0, true);
     
    27322854  }
    27332855  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
     2856#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2857  m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
     2858#else
    27342859#if H_3D_SINGLE_DEPTH
    27352860  m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0,          true );
     2861#endif
    27362862#endif
    27372863  m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0,          true );
  • branches/HTM-13.1-dev1-Samsung/source/Lib/TLibEncoder/TEncCu.h

    r1084 r1145  
    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-dev1-Samsung/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibEncoder/TEncEntropy.h

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibEncoder/TEncSbac.cpp

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibEncoder/TEncSbac.h

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibEncoder/TEncSearch.cpp

    r1133 r1145  
    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-dev1-Samsung/source/Lib/TLibEncoder/TEncSearch.h

    r1084 r1145  
    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.