Changeset 1258 in 3DVCSoftware for branches/HTM-14.1-update-dev1-MediaTek/source


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

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

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

Location:
branches/HTM-14.1-update-dev1-MediaTek/source/Lib
Files:
27 edited

Legend:

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

    r1227 r1258  
    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 H_3D
     53#if NH_3D_DIS
    5454#define NUM_DIS_FLAG_CTX              1
    5555#define NUM_DIS_TYPE_CTX              1       
     
    218218  { CNU,  CNU,  CNU, },
    219219};
    220 #if H_3D
     220#if NH_3D_DIS
    221221static const UChar
    222222INIT_DIS_FLAG[3][NUM_DIS_FLAG_CTX] = 
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/Debug.h

    r1200 r1258  
    4646#include <sstream>
    4747#include <TLibCommon/CommonDef.h>
    48 
    4948#if DEBUG_STRING
    5049extern const Char *debug_reorder_data_inter_token[MAX_NUM_COMPONENT+1];
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/SEI.h

    r1200 r1258  
    4242#include "CommonDef.h"
    4343#include "libmd5/MD5.h"
    44 
    4544//! \ingroup TLibCommon
    4645//! \{
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp

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

    r1243 r1258  
    116116
    117117  Bool*          m_skipFlag;           ///< array of skip flags
    118 #if H_3D
    119   Bool*         m_bDISFlag;         
    120   UInt*         m_uiDISType;
     118#if NH_3D_DIS
     119  Bool*          m_bDISFlag;         
     120  UChar*         m_ucDISType;
    121121#endif
    122122  Char*          m_pePartSize;         ///< array of partition sizes
     
    334334  Void          setSkipFlag           ( UInt idx, Bool skip)     { m_skipFlag[idx] = skip;   }
    335335  Void          setSkipFlagSubParts   ( Bool skip, UInt absPartIdx, UInt depth );
    336 #if H_3D
     336#if NH_3D_DIS
    337337  Bool*        getDISFlag            ()                         { return m_bDISFlag;          }
    338338  Bool         getDISFlag            ( UInt idx)                { return m_bDISFlag[idx];     }
    339339  Void         setDISFlag            ( UInt idx, Bool bDIS)     { m_bDISFlag[idx] = bDIS;   }
    340   Void         setDISFlagSubParts    ( Bool bDIS, UInt absPartIdx, UInt depth );
    341 
    342   UInt*        getDISType            ()                         { return m_uiDISType; }
    343   UInt         getDISType            ( UInt idx)                { return m_uiDISType[idx];     }
    344   Void         getDISType            ( UInt idx, UInt uiDISType)     { m_uiDISType[idx] = uiDISType;   }
    345   Void         setDISTypeSubParts    ( UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth );
     340  Void         setDISFlagSubParts    ( Bool bDIS, UInt uiAbsPartIdx, UInt uiDepth );
     341
     342  UChar*       getDISType            ()                         { return m_ucDISType; }
     343  UChar        getDISType            ( UInt idx)                { return m_ucDISType[idx];     }
     344  Void         getDISType            ( UInt idx, UChar ucDISType)     { m_ucDISType[idx] = ucDISType;   }
     345  Void         setDISTypeSubParts    ( UChar ucDISType, UInt uiAbsPartIdx, UInt uiDepth );
    346346#endif
    347347  Char*         getPredictionMode     ()                        { return m_pePredMode;        }
     
    501501  Void          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
    502502  Bool          getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm );
    503 
    504    Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
    505503#endif
    506504#if H_3D_NBDV_REF
     
    508506  Void          estimateDVFromDM(Int refViewIdx, UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred );
    509507#endif //H_3D_NBDV_REF
     508#endif
     509#if NH_3D_DIS
     510   Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
    510511#endif
    511512#if  H_3D_FAST_TEXTURE_ENCODING
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/TComSlice.cpp

    r1251 r1258  
    150150, m_depthToDisparityF             (NULL)
    151151#endif
    152 #if H_3D
     152#if NH_3D_DIS
    153153, m_bApplyDIS                     (false)
    154154#endif
     
    11681168  }
    11691169#endif
    1170 #if H_3D
     1170#if NH_3D_DIS
    11711171  m_bApplyDIS = pSrc->m_bApplyDIS;
    11721172#endif
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibCommon/TypeDef.h

    r1247 r1258  
    6161#define NH_3D          ( HEVC_EXT == 2)
    6262
     63
    6364/////////////////////////////////////////////////////////////////////////////////////////
    6465///////////////////////////////////   MAJOR DEFINES   /////////////////////////////////// 
     
    7879                                              // HHI_DMM4_ENC_I0066
    7980                                              // H_3D_FAST_DEPTH_INTRA
     81#define NH_3D_DIS                         1
    8082#endif
    8183
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/NALread.h

    r1200 r1258  
    4141#ifndef __NALREAD__
    4242#define __NALREAD__
    43 
    4443#include "TLibCommon/CommonDef.h"
    4544#include "TLibCommon/TComBitStream.h"
    4645#include "TLibCommon/NAL.h"
    47 
    4846//! \ingroup TLibDecoder
    4947//! \{
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/SyntaxElementParser.h

    r1200 r1258  
    4242#pragma once
    4343#endif // _MSC_VER > 1000
    44 
    4544#include "TLibCommon/TComRom.h"
    46 
    4745#if ENC_DEC_TRACE
    4846
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1247 r1258  
    32243224}
    32253225
    3226 #if H_3D
     3226#if NH_3D_DIS
    32273227Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    32283228{
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecCAVLC.h

    r1227 r1258  
    111111       
    112112  Void  parseSkipFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    113 #if H_3D
    114   Void  parseDIS            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     113#if NH_3D_DIS
     114  Void  parseDIS             ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    115115#endif
    116116  Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecCu.cpp

    r1243 r1258  
    512512    return;
    513513  }
    514 #if H_3D
     514#if NH_3D_DIS
    515515  m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth );
    516516  if(!pcCU->getDISFlag(uiAbsPartIdx))
     
    547547  setIsChromaQpAdjCoded( isChromaQpAdjCoded );
    548548  setdQPFlag( bCodeDQP );
    549 #if H_3D
     549#if NH_3D_DIS
    550550  }
    551551#endif
     
    643643    case MODE_INTRA:
    644644#if NH_3D
    645     if( false /*m_ppcCU[uiDepth]->getDISFlag(0)*/ )
    646     {
    647       //xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
    648     }
     645#if NH_3D_DIS
     646    if( m_ppcCU[uiDepth]->getDISFlag(0) )
     647    {
     648      xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
     649    }
     650#else
     651    if(false )
     652    {
     653     // xReconDIS( m_ppcCU[uiDepth], 0, uiDepth );
     654    }
     655#endif
    649656#if NH_3D_SDC_INTRA
    650657    else if( m_ppcCU[uiDepth]->getSDCFlag(0) )
     
    723730}
    724731
    725 #if H_3D
     732#if NH_3D_DIS
    726733Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    727734{
     
    731738  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
    732739
    733   UInt    uiStride    = pcRecoYuv->getStride  ();
    734   Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
     740  UInt    uiStride    = pcRecoYuv->getStride  (COMPONENT_Y);
     741  Pel*    piReco      = pcRecoYuv->getAddr( COMPONENT_Y, uiAbsPartIdx );
    735742
    736743
     
    740747  Bool  bAboveAvail = false;
    741748  Bool  bLeftAvail  = false;
    742   pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
    743   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0,
    744     m_pcPrediction->getPredicBuf       (),
    745     m_pcPrediction->getPredicBufWidth  (),
    746     m_pcPrediction->getPredicBufHeight (),
    747     bAboveAvail, bLeftAvail
    748     );
     749 
     750  TComTURecurse rTu(pcCU, 0);
     751  const ChromaFormat chFmt     = rTu.GetChromaFormat();
    749752
    750753  if ( pcCU->getDISType(uiAbsPartIdx) == 0 )
    751754  {
    752     m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), VER_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     755    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, VER_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
     756    m_pcPrediction->initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     757    m_pcPrediction->predIntraAng( COMPONENT_Y,   VER_IDX, 0 /* Decoder does not have an original image */, 0, piReco, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
    753758  }
    754759  else if ( pcCU->getDISType(uiAbsPartIdx) == 1 )
    755760  {
    756     m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piReco, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     761    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, HOR_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
     762    m_pcPrediction->initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     763    m_pcPrediction->predIntraAng( COMPONENT_Y,   HOR_IDX, 0 /* Decoder does not have an original image */, 0, piReco, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
    757764  }
    758765  else if ( pcCU->getDISType(uiAbsPartIdx) == 2 )
    759766  {
    760     Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     767    Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 );
    761768    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 );
    762769    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     
    771778  else if ( pcCU->getDISType(uiAbsPartIdx) == 3 )
    772779  {
    773     Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     780    Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 );
    774781    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 );
    775782    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     
    784791
    785792  // clear UV
    786   UInt  uiStrideC     = pcRecoYuv->getCStride();
    787   Pel   *pRecCb       = pcRecoYuv->getCbAddr();
    788   Pel   *pRecCr       = pcRecoYuv->getCrAddr();
     793  UInt  uiStrideC     = pcRecoYuv->getStride(COMPONENT_Cb);
     794  Pel   *pRecCb       = pcRecoYuv->getAddr(COMPONENT_Cb);
     795  Pel   *pRecCr       = pcRecoYuv->getAddr(COMPONENT_Cr);
    789796
    790797  for (Int y=0; y<uiHeight/2; y++)
     
    792799    for (Int x=0; x<uiWidth/2; x++)
    793800    {
    794       pRecCb[x] = 1<<(g_bitDepthC-1);
    795       pRecCr[x] = 1<<(g_bitDepthC-1);
     801      pRecCb[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1);
     802      pRecCr[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1);
    796803    }
    797804
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecCu.h

    r1227 r1258  
    124124  Void xFillPCMBuffer           (TComDataCU* pCU, UInt depth);
    125125
    126 #if H_3D
     126#if NH_3D_DIS
    127127  Void xReconDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    128128#endif
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1227 r1258  
    6060  m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
    6161}
    62 #if H_3D
     62#if NH_3D_DIS
    6363Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    6464{
     
    6767    return;
    6868  } 
    69 
    7069  m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth );
    7170}
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecEntropy.h

    r1227 r1258  
    3838#ifndef __TDECENTROPY__
    3939#define __TDECENTROPY__
    40 
    4140#include "TLibCommon/CommonDef.h"
    4241#include "TLibCommon/TComBitStream.h"
     
    4544#include "TLibCommon/TComSampleAdaptiveOffset.h"
    4645#include "TLibCommon/TComRectangle.h"
    47 
    4846class TDecSbac;
    4947class TDecCavlc;
     
    7876public:
    7977  virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    80 #if H_3D
     78#if NH_3D_DIS
    8179  virtual Void parseDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    8280#endif
     
    167165  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    168166  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    169 #if H_3D
     167#if NH_3D_DIS
    170168  Void decodeDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
    171169#endif
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecSbac.cpp

    r1239 r1258  
    6767, m_cCUSplitFlagSCModel                      ( 1,             1,                      NUM_SPLIT_FLAG_CTX                   , m_contextModels + m_numContextModels, m_numContextModels)
    6868, m_cCUSkipFlagSCModel                       ( 1,             1,                      NUM_SKIP_FLAG_CTX                    , m_contextModels + m_numContextModels, m_numContextModels)
    69 #if H_3D
    70 , m_cCUDISFlagSCModel         ( 1,             1,               NUM_DIS_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    71 , m_cCUDISTypeSCModel         ( 1,             1,               NUM_DIS_TYPE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     69#if NH_3D_DIS
     70, m_cCUDISFlagSCModel                        ( 1,             1,                      NUM_DIS_FLAG_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
     71, m_cCUDISTypeSCModel                        ( 1,             1,                      NUM_DIS_TYPE_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
    7272#endif
    7373, m_cCUMergeFlagExtSCModel                   ( 1,             1,                      NUM_MERGE_FLAG_EXT_CTX               , m_contextModels + m_numContextModels, m_numContextModels)
     
    159159  m_cCUSplitFlagSCModel.initBuffer                ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    160160  m_cCUSkipFlagSCModel.initBuffer                 ( sliceType, qp, (UChar*)INIT_SKIP_FLAG );
    161 #if H_3D
    162   m_cCUDISFlagSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_FLAG );
    163   m_cCUDISTypeSCModel.initBuffer         ( sliceType, qp, (UChar*)INIT_DIS_TYPE );
     161#if NH_3D_DIS
     162  m_cCUDISFlagSCModel.initBuffer                  ( sliceType, qp, (UChar*)INIT_DIS_FLAG );
     163  m_cCUDISTypeSCModel.initBuffer                  ( sliceType, qp, (UChar*)INIT_DIS_TYPE );
    164164#endif
    165165  m_cCUMergeFlagExtSCModel.initBuffer             ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
     
    238238}
    239239
    240 #if H_3D
    241   m_cCUDISFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
    242   m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
    243 #endif
    244240#if H_3D_ARP
    245241  m_cCUPUARPWSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_ARPW );
     
    525521
    526522}
    527 #if H_3D
     523#if NH_3D_DIS
    528524Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    529525{
    530526  pcCU->setDISFlagSubParts( false,        uiAbsPartIdx, uiDepth );
    531527  UInt uiSymbol = 0;
    532   m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) );
     528  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUDISFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__SKIP_FLAG) );
    533529  if( uiSymbol )
    534530  {
     
    538534    pcCU->setPredModeSubParts( MODE_INTRA,  uiAbsPartIdx, uiDepth );
    539535    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    540     pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth );
    541     pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
     536    pcCU->setIntraDirSubParts(CHANNEL_TYPE_LUMA, DC_IDX, uiAbsPartIdx, uiDepth );
     537    pcCU->setSizeSubParts( pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth, pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth );
    542538    pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
    543539    pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth);
    544     pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth);
     540    pcCU->setCbfSubParts(0, COMPONENT_Y, uiAbsPartIdx, uiDepth);
    545541
    546542    UInt uiUnaryIdx = 0;
     
    554550        if ( uiUnaryIdx==0 )
    555551        {
    556           m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) );
     552          m_pcTDecBinIf->decodeBin( uiSymbol2, m_cCUDISTypeSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__SKIP_FLAG) );
    557553        }
    558554        else
    559555        {
    560           m_pcTDecBinIf->decodeBinEP( uiSymbol2);
     556          m_pcTDecBinIf->decodeBinEP( uiSymbol2 RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__SKIP_FLAG));
    561557        }
    562558        if( uiSymbol2 == 0 )
     
    566562      }
    567563    }
    568     pcCU->setDISTypeSubParts(uiUnaryIdx, uiAbsPartIdx, 0, uiDepth);
     564    pcCU->setDISTypeSubParts((UChar)uiUnaryIdx, uiAbsPartIdx, uiDepth);
    569565  }
    570566}
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibDecoder/TDecSbac.h

    r1227 r1258  
    133133
    134134  Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    135 #if H_3D
     135#if NH_3D_DIS
    136136  Void parseDIS          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    137137#endif
     
    182182  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    183183  ContextModel3DBuffer m_cCUSkipFlagSCModel;
    184 #if H_3D
     184#if NH_3D_DIS
    185185  ContextModel3DBuffer m_cCUDISFlagSCModel;
    186186  ContextModel3DBuffer m_cCUDISTypeSCModel;
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1247 r1258  
    25502550  assert(0);
    25512551}
    2552 #if H_3D
     2552#if NH_3D_DIS
    25532553Void TEncCavlc::codeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx )
    25542554{
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncCavlc.h

    r1227 r1258  
    121121  Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx );
    122122  Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    123 #if H_3D
     123#if NH_3D_DIS
    124124  Void codeDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    125125#endif
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncCu.cpp

    r1227 r1258  
    739739    }
    740740#endif
    741 #if H_3D
     741#if NH_3D_DIS
    742742    rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP  );
    743743    if( rpcBestCU->getSlice()->getDepthIntraSkipFlag() )
     
    15831583  }
    15841584
    1585 #if H_3D
     1585#if NH_3D_DIS
    15861586  m_pcEntropyCoder->encodeDIS( pcCU, uiAbsPartIdx );
    15871587  if(!pcCU->getDISFlag(uiAbsPartIdx))
     
    16281628  setCodeChromaQpAdjFlag( codeChromaQpAdj );
    16291629  setdQPFlag( bCodeDQP );
    1630 #if H_3D
     1630#if NH_3D_DIS
    16311631  }
    16321632#endif
     
    20212021            mergeCandBuffer[uiMergeCand] = 1;
    20222022          }
    2023 #if H_3D
     2023#if NH_3D_DIS
    20242024          rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
    20252025#endif
     
    20632063              }
    20642064              rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
    2065 #if H_3D
     2065#if NH_3D_DIS
    20662066              rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
    20672067#endif
     
    22142214      }
    22152215#endif
    2216 #if H_3D
     2216#if NH_3D_DIS
    22172217      rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
    22182218#endif
     
    23312331          }
    23322332          rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
    2333 #if H_3D
     2333#if NH_3D_DIS
    23342334          rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
    23352335#endif
     
    24402440    pMask   += 2*uiMaskStride;
    24412441  }
    2442 }
    2443 
    2444 Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
    2445 {
    2446   UInt uiDepth = rpcTempCU->getDepth( 0 );
    2447   if( !rpcBestCU->getSlice()->getIsDepth() || (eSize != SIZE_2Nx2N))
    2448   {
    2449     return;
    2450   }
    2451 
    2452 #if NH_3D_VSO // M5
    2453   if( m_pcRdCost->getUseRenModel() )
    2454   {
    2455     UInt  uiWidth     = m_ppcOrigYuv[uiDepth]->getWidth   ( COMPONENT_Y );
    2456     UInt  uiHeight    = m_ppcOrigYuv[uiDepth]->getHeight  ( COMPONENT_Y );
    2457     Pel*  piSrc       = m_ppcOrigYuv[uiDepth]->getAddr    ( COMPONENT_Y );
    2458     UInt  uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride  ( COMPONENT_Y );
    2459     m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
    2460   }
    2461 #endif
    2462 
    2463   rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
    2464   rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
    2465   rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth );
    2466   rpcTempCU->setCUTransquantBypassSubParts( rpcTempCU->getCUTransquantBypass(0), 0, uiDepth );
    2467 
    2468   rpcTempCU->setTrIdxSubParts(0, 0, uiDepth);
    2469   rpcTempCU->setCbfSubParts(0, 1, 1, 0, uiDepth);
    2470   rpcTempCU->setDISFlagSubParts(true, 0, uiDepth);
    2471   rpcTempCU->setLumaIntraDirSubParts (DC_IDX, 0, uiDepth);
    2472 #if NH_3D_SDC_INTRA
    2473   rpcTempCU->setSDCFlagSubParts( false, 0, uiDepth);
    2474 #endif
    2475 
    2476   UInt uiPreCalcDistC;
    2477   m_pcPredSearch  ->estIntraPredDIS      ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, false );
    2478 
    2479 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC
    2480   Int oldTraceCopyBack = g_traceCopyBack;
    2481   g_traceCopyBack = false; 
    2482 #endif
    2483   m_ppcRecoYuvTemp[uiDepth]->copyToPicLuma(rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU() );
    2484   #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 
    2485     g_traceCopyBack = oldTraceCopyBack;
    2486   #endif
    2487 
    2488 
    2489   m_pcEntropyCoder->resetBits();
    2490   if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
    2491   {
    2492     m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0,          true );
    2493   }
    2494   m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
    2495   m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
    2496 
    2497 
    2498   m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
    2499 
    2500   rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits();
    2501   rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
    2502 
    2503 
    2504 #if NH_3D_VSO // M6
    2505   if( m_pcRdCost->getUseLambdaScaleVSO())
    2506   {
    2507     rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 
    2508   }
    2509   else
    2510 #endif
    2511     rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    2512 
    2513 
    2514   xCheckDQP( rpcTempCU );
    2515   xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
    25162442}
    25172443
     
    26512577}
    26522578#endif
    2653 
     2579#if NH_3D_DIS
     2580Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
     2581{
     2582  UInt uiDepth = rpcTempCU->getDepth( 0 );
     2583  if( !rpcBestCU->getSlice()->getIsDepth() || (eSize != SIZE_2Nx2N))
     2584  {
     2585    return;
     2586  }
     2587
     2588#if NH_3D_VSO // M5
     2589  if( m_pcRdCost->getUseRenModel() )
     2590  {
     2591    UInt  uiWidth     = m_ppcOrigYuv[uiDepth]->getWidth   ( COMPONENT_Y );
     2592    UInt  uiHeight    = m_ppcOrigYuv[uiDepth]->getHeight  ( COMPONENT_Y );
     2593    Pel*  piSrc       = m_ppcOrigYuv[uiDepth]->getAddr    ( COMPONENT_Y );
     2594    UInt  uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride  ( COMPONENT_Y );
     2595    m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
     2596  }
     2597#endif
     2598
     2599  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
     2600  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
     2601  rpcTempCU->setPredModeSubParts( MODE_INTRA, 0, uiDepth );
     2602  rpcTempCU->setCUTransquantBypassSubParts( rpcTempCU->getCUTransquantBypass(0), 0, uiDepth );
     2603
     2604  rpcTempCU->setTrIdxSubParts(0, 0, uiDepth);
     2605  rpcTempCU->setCbfSubParts(0, COMPONENT_Y, 0, uiDepth);
     2606  rpcTempCU->setDISFlagSubParts(true, 0, uiDepth);
     2607  rpcTempCU->setIntraDirSubParts(CHANNEL_TYPE_LUMA, DC_IDX, 0, uiDepth);
     2608#if NH_3D_SDC_INTRA
     2609  rpcTempCU->setSDCFlagSubParts( false, 0, uiDepth);
     2610#endif
     2611
     2612  UInt uiPreCalcDistC;
     2613  m_pcPredSearch  ->estIntraPredDIS      ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, false );
     2614
     2615#if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC
     2616  Int oldTraceCopyBack = g_traceCopyBack;
     2617  g_traceCopyBack = false; 
     2618#endif
     2619  m_ppcRecoYuvTemp[uiDepth]->copyToPicComponent(COMPONENT_Y, rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getCtuRsAddr(), rpcTempCU->getZorderIdxInCtu() );
     2620#if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 
     2621  g_traceCopyBack = oldTraceCopyBack;
     2622#endif
     2623
     2624  m_pcEntropyCoder->resetBits();
     2625  if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
     2626  {
     2627    m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0,          true );
     2628  }
     2629  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
     2630  m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
     2631
     2632  m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
     2633
     2634  rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits();
     2635  rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
     2636
     2637#if NH_3D_VSO // M6
     2638  if( m_pcRdCost->getUseLambdaScaleVSO())
     2639  {
     2640    rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 
     2641  }
     2642  else
     2643#endif
     2644  rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     2645
     2646  xCheckDQP( rpcTempCU );
     2647  xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
     2648}
     2649#endif
    26542650Void TEncCu::xCheckRDCostIntra( TComDataCU *&rpcBestCU,
    26552651                                TComDataCU *&rpcTempCU,
     
    26772673
    26782674  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
    2679 #if H_3D
     2675#if NH_3D_DIS
    26802676  rpcTempCU->setDISFlagSubParts( false, 0, uiDepth );
    26812677#endif
     
    27152711    m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0,          true );
    27162712  }
    2717 #if H_3D
     2713#if NH_3D_DIS
    27182714  m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
    27192715  if(!rpcTempCU->getDISFlag(0))
     
    27352731  setCodeChromaQpAdjFlag( codeChromaQpAdjFlag );
    27362732  setdQPFlag( bCodeDQP );
    2737 #if H_3D
     2733#if NH_3D_DIS
    27382734  }
    27392735#endif
     
    27822778
    27832779  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth );
    2784 #if H_3D
     2780#if NH_3D_DIS
    27852781  rpcTempCU->setDISFlagSubParts( false, 0, uiDepth );
    27862782#endif
     
    28042800
    28052801  m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0,          true );
    2806 #if H_3D
     2802#if NH_3D_DIS
    28072803  m_pcEntropyCoder->encodeDIS( rpcTempCU, 0,          true );
    28082804#endif
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncCu.h

    r1209 r1258  
    159159  Void  xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false );
    160160#endif
    161 #if H_3D
     161#if NH_3D_DIS
    162162  Void  xCheckRDCostDIS   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize  );
    163163#endif
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1227 r1258  
    116116  m_pcEntropyCoderIf->codeSkipFlag( pcCU, uiAbsPartIdx );
    117117}
    118 #if H_3D
     118#if NH_3D_DIS
    119119Void TEncEntropy::encodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    120120{
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncEntropy.h

    r1227 r1258  
    7979  virtual Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    8080  virtual Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    81 #if H_3D
     81#if NH_3D_DIS
    8282  virtual Void codeDIS          ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    8383#endif
     
    165165  Void encodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    166166  Void encodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    167 #if H_3D
     167#if NH_3D_DIS
    168168  Void encodeDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD=false );
    169169#endif
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncSbac.cpp

    r1227 r1258  
    6262, m_cCUSplitFlagSCModel                ( 1,             1,                      NUM_SPLIT_FLAG_CTX                   , m_contextModels + m_numContextModels, m_numContextModels)
    6363, m_cCUSkipFlagSCModel                 ( 1,             1,                      NUM_SKIP_FLAG_CTX                    , m_contextModels + m_numContextModels, m_numContextModels)
    64 #if H_3D
     64#if NH_3D_DIS
    6565, m_cCUDISFlagSCModel                  ( 1,             1,                      NUM_DIS_FLAG_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
    6666, m_cCUDISTypeSCModel                  ( 1,             1,                      NUM_DIS_TYPE_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
     
    143143  m_cCUSplitFlagSCModel.initBuffer                ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG );
    144144  m_cCUSkipFlagSCModel.initBuffer                 ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG );
    145 #if H_3D
     145#if NH_3D_DIS
    146146  m_cCUDISFlagSCModel.initBuffer                  ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
    147147  m_cCUDISTypeSCModel.initBuffer                  ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
     
    231231      curCost  = m_cCUSplitFlagSCModel.calcCost                ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG );
    232232      curCost += m_cCUSkipFlagSCModel.calcCost                 ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG );
    233 #if H_3D
     233#if NH_3D_DIS
    234234      curCost += m_cCUDISFlagSCModel.calcCost                  ( curSliceType, qp, (UChar*)INIT_DIS_FLAG );
    235235      curCost += m_cCUDISTypeSCModel.calcCost                  ( curSliceType, qp, (UChar*)INIT_DIS_TYPE );
     
    297297  }
    298298}
    299 
    300 #if H_3D
    301   m_cCUDISFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
    302   m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
    303 #endif
    304299#if H_3D_ARP
    305300  m_cCUPUARPWSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_ARPW );
     
    420415}
    421416
    422 #if H_3D
     417#if NH_3D_DIS
    423418Void TEncSbac::codeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx )
    424419{
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncSbac.h

    r1227 r1258  
    138138  Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx );
    139139  Void codeSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    140 #if H_3D
     140#if NH_3D_DIS
    141141  Void codeDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    142142#endif
     
    204204  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    205205  ContextModel3DBuffer m_cCUSkipFlagSCModel;
    206 #if H_3D
     206#if NH_3D_DIS
    207207  ContextModel3DBuffer m_cCUDISFlagSCModel;
    208208  ContextModel3DBuffer m_cCUDISTypeSCModel;
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.cpp

    r1248 r1258  
    10071007        }
    10081008        m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true );
    1009 #if H_3D
     1009#if NH_3D_DIS
    10101010        m_pcEntropyCoder->encodeDIS(pcCU, 0, true );
    10111011        if(!pcCU->getDISFlag(uiAbsPartIdx))
     
    10131013        m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
    10141014      }
    1015 #if H_3D
     1015#if NH_3D_DIS
    10161016      else
    10171017      {
     
    10191019      }
    10201020#endif
    1021 #if H_3D
     1021#if NH_3D_DIS
    10221022      if(!pcCU->getDISFlag(uiAbsPartIdx))
    10231023      {
     
    10371037        }
    10381038      }
    1039 #if H_3D
    1040     }
    1041 #endif
    1042   }
    1043 #if H_3D
     1039#if NH_3D_DIS
     1040    }
     1041#endif
     1042  }
     1043#if NH_3D_DIS
    10441044    if(!pcCU->getDISFlag(uiAbsPartIdx))
    10451045    {
     
    10801080#endif
    10811081#endif
    1082 #if H_3D
     1082#if NH_3D_DIS
    10831083      }
    10841084#endif
     
    18751875}
    18761876
    1877 #if H_3D
     1877#if NH_3D_DIS
    18781878Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode )
    18791879{
    18801880  UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
    18811881  UInt    uiHeight          = pcCU     ->getHeight  ( 0 );
    1882   UInt    uiStride          = pcOrgYuv ->getStride  ();
    1883   Pel*    piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
    1884   Pel*    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     1882  UInt    uiStride          = pcOrgYuv ->getStride  (COMPONENT_Y);
     1883  Pel*    piOrg             = pcOrgYuv ->getAddr(COMPONENT_Y, uiAbsPartIdx );
     1884  Pel*    piPred            = pcPredYuv->getAddr(COMPONENT_Y, uiAbsPartIdx );
    18851885
    18861886  AOF( uiWidth == uiHeight );
    18871887  AOF( uiAbsPartIdx == 0 );
    1888   pcCU->setDISTypeSubParts(uiPredMode, uiAbsPartIdx, 0, pcCU->getDepth(0)); 
     1888  pcCU->setDISTypeSubParts((UChar)uiPredMode, uiAbsPartIdx, pcCU->getDepth(0)); 
    18891889  //===== reconstruction =====
    18901890
    18911891  Bool bAboveAvail = false;
    18921892  Bool bLeftAvail  = false;
    1893   pcCU->getPattern()->initPattern   ( pcCU, 0, 0 );
    1894   pcCU->getPattern()->initAdiPattern( pcCU, 0, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
     1893
     1894  TComTURecurse rTu(pcCU, 0);
     1895  const ChromaFormat chFmt     = rTu.GetChromaFormat();
    18951896
    18961897  if ( uiPredMode == 0 )
    18971898  {
    1898     predIntraLumaAng( pcCU->getPattern(), VER_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1899    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, VER_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
     1900    initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     1901    predIntraAng( COMPONENT_Y, VER_IDX, 0, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
    18991902  }
    19001903  else if ( uiPredMode == 1 )
    19011904  {
    1902     predIntraLumaAng( pcCU->getPattern(), HOR_IDX, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     1905    const Bool bUseFilteredPredictions=TComPrediction::filteringIntraReferenceSamples(COMPONENT_Y, HOR_IDX, uiWidth, uiHeight, chFmt, pcCU->getSlice()->getSPS()->getSpsRangeExtension().getIntraSmoothingDisabledFlag());
     1906    initIntraPatternChType( rTu, bAboveAvail, bLeftAvail, COMPONENT_Y, bUseFilteredPredictions  DEBUG_STRING_PASS_INTO(sTemp) );
     1907    predIntraAng( COMPONENT_Y, HOR_IDX, 0, uiStride, piPred, uiStride, rTu, bAboveAvail, bLeftAvail, bUseFilteredPredictions );
    19031908  }
    19041909  else if ( uiPredMode == 2 )
    19051910  {
    1906     Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     1911    Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 );
    19071912    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 0 );
    19081913    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     
    19171922  else if ( uiPredMode == 3 )
    19181923  {
    1919     Pel pSingleDepth = 1 << ( g_bitDepthY - 1 );
     1924    Pel pSingleDepth = 1 << ( pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 );
    19201925    pcCU->getNeighDepth ( 0, 0, &pSingleDepth, 1 );
    19211926    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     
    19301935
    19311936  // clear UV
    1932   UInt  uiStrideC     = pcPredYuv->getCStride();
    1933   Pel   *pRecCb       = pcPredYuv->getCbAddr();
    1934   Pel   *pRecCr       = pcPredYuv->getCrAddr();
     1937  UInt  uiStrideC     = pcPredYuv->getStride(COMPONENT_Cb);
     1938  Pel   *pRecCb       = pcPredYuv->getAddr(COMPONENT_Cb);
     1939  Pel   *pRecCr       = pcPredYuv->getAddr(COMPONENT_Cr);
    19351940
    19361941  for (Int y=0; y<uiHeight/2; y++)
     
    19381943    for (Int x=0; x<uiWidth/2; x++)
    19391944    {
    1940       pRecCb[x] = 1<<(g_bitDepthC-1);
    1941       pRecCr[x] = 1<<(g_bitDepthC-1);
     1945      pRecCb[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1);
     1946      pRecCr[x] = 1<<(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA)-1);
    19421947    }
    19431948
     
    19461951  }
    19471952
    1948   piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     1953  piPred            = pcPredYuv->getAddr(COMPONENT_Y, uiAbsPartIdx );
    19491954  //===== determine distortion =====
    1950 #if H_3D_VSO
     1955#if NH_3D_VSO
    19511956  if ( m_pcRdCost->getUseVSO() )
    1952     ruiDist = m_pcRdCost->getDistPartVSO  ( pcCU, uiAbsPartIdx, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false );
     1957    ruiDist = m_pcRdCost->getDistPartVSO  ( pcCU, uiAbsPartIdx, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, false );
    19531958  else
    19541959#endif
    1955     ruiDist = m_pcRdCost->getDistPart(g_bitDepthY, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight );
     1960    ruiDist = m_pcRdCost->getDistPart(pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA), piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, COMPONENT_Y );
    19561961
    19571962  //===== determine rate and r-d cost =====
     
    19601965  UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
    19611966
    1962 #if H_3D_VSO
     1967#if NH_3D_VSO
    19631968  if ( m_pcRdCost->getUseLambdaScaleVSO())
    19641969    dRDCost = m_pcRdCost->calcRdCostVSO( uiBits, ruiDist );
     
    27212726}
    27222727
    2723 #if H_3D
     2728#if NH_3D_DIS
    27242729Void TEncSearch::estIntraPredDIS( TComDataCU* pcCU,
    27252730                                  TComYuv*    pcOrgYuv,
     
    27342739  UInt    uiHeight       = pcCU->getHeight(0);
    27352740
    2736 
    2737   Pel* piOrg         = pcOrgYuv ->getLumaAddr( 0, uiWidth );
    2738   UInt uiStride      = pcPredYuv->getStride();
    2739 
     2741#if NH_3D_VSO // M36
     2742  Pel* piOrg         = pcOrgYuv ->getAddr(COMPONENT_Y, 0, uiWidth );
     2743  UInt uiStride      = pcPredYuv->getStride(COMPONENT_Y);
     2744#endif
    27402745  Dist   uiDist = 0;
    27412746  Double dCost   = 0.0;
     
    27522757    uiDist = 0;
    27532758    dCost   = 0.0;
    2754 #if H_3D_VSO // M36
     2759#if NH_3D_VSO // M36
    27552760    if( m_pcRdCost->getUseRenModel() )
    27562761    {
     
    27712776
    27722777
    2773   pcCU->setDISTypeSubParts(uiBestDISType, 0, 0, uiDepth); 
     2778  pcCU->setDISTypeSubParts((UChar)uiBestDISType, 0, uiDepth); 
    27742779  assert(uiBestDISType >= 0);
    27752780
     
    70917096
    70927097    m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true );
    7093 #if H_3D
     7098#if NH_3D_DIS
    70947099    m_pcEntropyCoder->encodeDIS ( pcCU, 0, true );
    70957100#endif
  • branches/HTM-14.1-update-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.h

    r1243 r1258  
    192192                                  Pel         resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE * MAX_CU_SIZE]
    193193                                  DEBUG_STRING_FN_DECLARE(sDebug));
    194 #if H_3D
     194#if NH_3D_DIS
    195195  Void  estIntraPredDIS        ( TComDataCU* pcCU,
    196196                                 TComYuv*    pcOrgYuv,
     
    344344  Void  xStoreIntraResultQT       ( const ComponentID compID, TComTU &rTu);
    345345  Void  xLoadIntraResultQT        ( const ComponentID compID, TComTU &rTu);
    346 #if H_3D
     346#if NH_3D_DIS
    347347  Void xIntraCodingDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode );
    348348#endif
Note: See TracChangeset for help on using the changeset viewer.