Changeset 1179 in 3DVCSoftware for trunk/source/Lib/TLibCommon


Ignore:
Timestamp:
7 Apr 2015, 17:05:30 (10 years ago)
Author:
tech
Message:

Merged branch 13.1-dev0@1178.

Location:
trunk/source/Lib/TLibCommon
Files:
55 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/AccessUnit.h

    r872 r1179  
    44 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/CommonDef.h

    r1134 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/ContextModel.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/ContextModel.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/ContextModel3DBuffer.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/ContextModel3DBuffer.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/ContextTables.h

    r1084 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    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] =
  • trunk/source/Lib/TLibCommon/NAL.h

    r872 r1179  
    44 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/SEI.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/SEI.h

    r1084 r1179  
    44 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComBitCounter.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComBitStream.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComBitStream.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComCABACTables.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComCABACTables.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComDataCU.cpp

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    6060 
    6161  m_skipFlag           = NULL;
     62#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     63  m_bDISFlag           = NULL;
     64  m_uiDISType          = NULL;
     65#else
    6266#if H_3D_SINGLE_DEPTH
    6367  m_singleDepthFlag     = NULL;
    6468  m_apSingleDepthValue  = NULL;
    65 #endif 
     69#endif
     70#endif
    6671  m_pePartSize         = NULL;
    6772  m_pePredMode         = NULL;
     
    181186
    182187    m_skipFlag           = new Bool[ uiNumPartition ];
     188#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     189    m_bDISFlag           = new Bool[ uiNumPartition ];
     190    m_uiDISType          = (UInt*)xMalloc(UInt, uiNumPartition);
     191#else
    183192#if H_3D_SINGLE_DEPTH
    184193    m_singleDepthFlag     = new Bool[ uiNumPartition ];
    185194    m_apSingleDepthValue  = (Pel*)xMalloc(Pel, uiNumPartition);
     195#endif
    186196#endif
    187197    m_pePartSize         = new Char[ uiNumPartition ];
     
    327337
    328338    if ( m_skipFlag           ) { delete[] m_skipFlag;          m_skipFlag          = NULL; }
     339#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     340    if ( m_bDISFlag           ) { delete[] m_bDISFlag;   m_bDISFlag     = NULL; }
     341    if ( m_uiDISType         ) { xFree(m_uiDISType);  m_uiDISType    = NULL; }
     342#else
    329343#if H_3D_SINGLE_DEPTH
    330344    if ( m_singleDepthFlag    ) { delete[] m_singleDepthFlag;   m_singleDepthFlag     = NULL; }
    331345    if ( m_apSingleDepthValue ) { xFree(m_apSingleDepthValue);  m_apSingleDepthValue  = NULL; }
     346#endif
    332347#endif
    333348    if ( m_pePartSize         ) { delete[] m_pePartSize;        m_pePartSize        = NULL; }
     
    491506    TComDataCU * pcFrom = pcPic->getCU(getAddr());
    492507    m_skipFlag[ui]   = pcFrom->getSkipFlag(ui);
     508#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     509    m_bDISFlag[ui]   = pcFrom->getDISFlag(ui);
     510    m_uiDISType[ui]  = pcFrom->getDISType(ui);
     511#else
    493512#if H_3D_SINGLE_DEPTH
    494513    m_singleDepthFlag[ui]    = pcFrom->getSingleDepthFlag(ui);
    495514    m_apSingleDepthValue[ui] = pcFrom->getSingleDepthValue(ui);
     515#endif
    496516#endif
    497517    m_pePartSize[ui] = pcFrom->getPartitionSize(ui);
     
    546566  {
    547567    memset( m_skipFlag          + firstElement, false,                    numElements * sizeof( *m_skipFlag ) );
     568#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     569    memset( m_bDISFlag          + firstElement, false,                    numElements * sizeof( *m_bDISFlag ) );
     570    memset( m_uiDISType         + firstElement,     0,                    numElements * sizeof( *m_uiDISType) );
     571#else
    548572#if H_3D_SINGLE_DEPTH
    549573    memset( m_singleDepthFlag     + firstElement, false,                  numElements * sizeof( *m_singleDepthFlag ) );
    550574    memset( m_apSingleDepthValue  + firstElement,     0,                  numElements * sizeof( *m_apSingleDepthValue ) );
     575#endif
    551576#endif
    552577    memset( m_pePartSize        + firstElement, SIZE_NONE,                numElements * sizeof( *m_pePartSize ) );
     
    733758      m_puhTransformSkip[2][ui] = 0;
    734759      m_skipFlag[ui]   = false;
     760#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     761      m_bDISFlag[ui]   = false;
     762      m_uiDISType[ui]  = 0;
     763#else
    735764#if H_3D_SINGLE_DEPTH
    736765      m_singleDepthFlag[ui]     = false;
    737766      m_apSingleDepthValue[ui]  = 0;
     767#endif
    738768#endif
    739769      m_pePartSize[ui] = SIZE_NONE;
     
    861891  memset( m_puhCbf[2],          0, iSizeInUchar );
    862892  memset( m_puhDepth,     uiDepth, iSizeInUchar );
    863 #if H_3D_NBDV
     893#if H_3D_NBDV && !SEC_ARP_REM_ENC_RESTRICT_K0035
    864894  m_pDvInfo->bDV = false;
    865895#endif
     
    904934  {
    905935    m_skipFlag[ui]   = false;
     936#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     937    m_bDISFlag[ui]   = false;
     938    m_uiDISType[ui]  = 0;
     939#else
    906940#if H_3D_SINGLE_DEPTH
    907941    m_singleDepthFlag[ui]   = false;
    908942    m_apSingleDepthValue[ui]= 0;
     943#endif
    909944#endif
    910945    m_pePartSize[ui] = SIZE_NONE;
     
    929964      m_puhTransformSkip[2][ui] = pcCU->getTransformSkip(uiPartOffset+ui,TEXT_CHROMA_V);
    930965      m_skipFlag[ui]   = pcCU->getSkipFlag(uiPartOffset+ui);
     966#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     967      m_bDISFlag[ui]    = pcCU->getDISFlag(uiPartOffset+ui);
     968      m_uiDISType[ui]   = pcCU->getDISType(uiPartOffset+ui);
     969#else
    931970#if H_3D_SINGLE_DEPTH
    932971      m_singleDepthFlag[ui]    = pcCU->getSingleDepthFlag(uiPartOffset+ui);
    933972      m_apSingleDepthValue[ui] = pcCU->getSingleDepthValue(uiPartOffset+ui);
     973#endif
    934974#endif
    935975      m_pePartSize[ui] = pcCU->getPartitionSize(uiPartOffset+ui);
     
    10781118 
    10791119  m_skipFlag=pcCU->getSkipFlag()          + uiPart;
     1120#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1121  m_bDISFlag     = pcCU->getDISFlag()     + uiPart;
     1122  m_uiDISType    = pcCU->getDISType()     + uiPart;
     1123#else
    10801124#if H_3D_SINGLE_DEPTH
    10811125  m_singleDepthFlag     = pcCU->getSingleDepthFlag()   + uiPart;
    10821126  m_apSingleDepthValue  = pcCU->getSingleDepthValue()  + uiPart;
    1083 #endif 
     1127#endif
     1128#endif
    10841129  m_phQP=pcCU->getQP()                    + uiPart;
    10851130  m_pePartSize = pcCU->getPartitionSize() + uiPart;
     
    12151260 
    12161261  m_skipFlag           = pcCU->getSkipFlag ()             + uiAbsPartIdx;
     1262#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1263  m_bDISFlag           = pcCU->getDISFlag ()              + uiAbsPartIdx;
     1264  m_uiDISType          = pcCU->getDISType()               + uiAbsPartIdx;
     1265#else
    12171266#if H_3D_SINGLE_DEPTH
    12181267  m_singleDepthFlag     = pcCU->getSingleDepthFlag ()             + uiAbsPartIdx;
    12191268  m_apSingleDepthValue  = pcCU->getSingleDepthValue ()            + uiAbsPartIdx;
    1220 #endif 
     1269#endif
     1270#endif
    12211271  m_pePartSize         = pcCU->getPartitionSize ()        + uiAbsPartIdx;
    12221272#if H_3D_NBDV
     
    12901340  Int sizeInChar  = sizeof( Char ) * uiNumPartition;
    12911341  memcpy( m_skipFlag   + uiOffset, pcCU->getSkipFlag(),       sizeof( *m_skipFlag )   * uiNumPartition );
     1342#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1343  memcpy( m_bDISFlag   + uiOffset, pcCU->getDISFlag(),       sizeof( *m_bDISFlag )   * uiNumPartition );
     1344  memcpy( m_uiDISType  + uiOffset, pcCU->getDISType(),       sizeof( *m_uiDISType )  * uiNumPartition);
     1345#else
    12921346#if H_3D_SINGLE_DEPTH
    12931347  memcpy( m_singleDepthFlag     + uiOffset, pcCU->getSingleDepthFlag(),       sizeof( *m_singleDepthFlag )   * uiNumPartition );
    12941348  memcpy( m_apSingleDepthValue  + uiOffset, pcCU->getSingleDepthValue(),      sizeof( *m_apSingleDepthValue ) * uiNumPartition);
     1349#endif
    12951350#endif
    12961351  memcpy( m_phQP       + uiOffset, pcCU->getQP(),             sizeInChar                        );
     
    14101465
    14111466  memcpy( rpcCU->getSkipFlag() + m_uiAbsIdxInLCU, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition );
     1467#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1468  memcpy( rpcCU->getDISFlag()  + m_uiAbsIdxInLCU, m_bDISFlag,    sizeof( *m_bDISFlag )  * m_uiNumPartition );
     1469  memcpy( rpcCU->getDISType()  + m_uiAbsIdxInLCU, m_uiDISType,   sizeof( *m_uiDISType ) * m_uiNumPartition );
     1470#else
    14121471#if H_3D_SINGLE_DEPTH
    14131472  memcpy( rpcCU->getSingleDepthFlag()  + m_uiAbsIdxInLCU, m_singleDepthFlag,    sizeof( *m_singleDepthFlag ) * m_uiNumPartition );
    14141473  memcpy( rpcCU->getSingleDepthValue() + m_uiAbsIdxInLCU, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * m_uiNumPartition);
     1474#endif
    14151475#endif
    14161476  memcpy( rpcCU->getQP() + m_uiAbsIdxInLCU, m_phQP, sizeInChar  );
     
    15251585  Int sizeInChar  = sizeof( Char ) * uiQNumPart;
    15261586  memcpy( rpcCU->getSkipFlag()       + uiPartOffset, m_skipFlag,   sizeof( *m_skipFlag )   * uiQNumPart );
     1587#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1588  memcpy( rpcCU->getDISFlag()  + uiPartOffset, m_bDISFlag,    sizeof( *m_bDISFlag )   * uiQNumPart );
     1589  memcpy( rpcCU->getDISType()  + uiPartOffset, m_uiDISType,   sizeof( *m_uiDISType )  * uiQNumPart );
     1590#else
    15271591#if H_3D_SINGLE_DEPTH
    15281592  memcpy( rpcCU->getSingleDepthFlag()  + uiPartOffset, m_singleDepthFlag,    sizeof( *m_singleDepthFlag )   * uiQNumPart );
    15291593  memcpy( rpcCU->getSingleDepthValue() + uiPartOffset, m_apSingleDepthValue, sizeof( *m_apSingleDepthValue ) * uiQNumPart);
     1594#endif
    15301595#endif
    15311596  memcpy( rpcCU->getQP() + uiPartOffset, m_phQP, sizeInChar );
     
    23232388    Int iPictureHeight = depthPicYuv->getHeight();
    23242389   
     2390#if !HS_DBBP_CLEAN_K0048
    23252391    Int iWidth  = uiWidth;
    23262392    Int iHeight = uiHeight;
     2393#endif
    23272394   
    23282395    Bool depthRefineFlag = false;
     
    23372404    }
    23382405   
     2406#if HS_DBBP_CLEAN_K0048
     2407    Int depthPosX = Clip3(0,   iPictureWidth - 1,  iBlkX + ((cDv.getHor()+2)>>2));
     2408    Int depthPosY = Clip3(0,   iPictureHeight - 1, iBlkY + ((cDv.getVer()+2)>>2));
     2409#else
    23392410    Int depthPosX = Clip3(0,   iPictureWidth - iWidth,  iBlkX + ((cDv.getHor()+2)>>2));
    23402411    Int depthPosY = Clip3(0,   iPictureHeight- iHeight, iBlkY + ((cDv.getVer()+2)>>2));
     2412#endif
    23412413   
    23422414    pDepthPels = depthPicYuv->getLumaAddr() + depthPosX + depthPosY * uiDepthStride;
     
    23822454Void TComDataCU::setCbfSubParts( UInt uiCbf, TextType eTType, UInt uiAbsPartIdx, UInt uiDepth )
    23832455{
     2456
    23842457  UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
    23852458  memset( m_puhCbf[g_aucConvertTxtTypeToIdx[eTType]] + uiAbsPartIdx, uiCbf, sizeof( UChar ) * uiCurrPartNumb );
     
    24272500  memset( m_skipFlag + absPartIdx, skip, m_pcPic->getNumPartInCU() >> ( 2 * depth ) );
    24282501}
     2502
     2503#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2504Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt absPartIdx, UInt depth )
     2505{
     2506    assert( sizeof( *m_bDISFlag) == 1 );
     2507    memset( m_bDISFlag + absPartIdx, bDIS, m_pcPic->getNumPartInCU() >> ( 2 * depth ) );
     2508}
     2509
     2510Void TComDataCU::setDISTypeSubParts(UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth )
     2511{
     2512    setSubPartT( uiDISType, m_uiDISType, uiAbsPartIdx, uiDepth, uiPUIdx );
     2513}
     2514#else
    24292515#if H_3D_SINGLE_DEPTH
    24302516Void TComDataCU::setSingleDepthFlagSubParts( Bool singleDepth, UInt absPartIdx, UInt depth )
     
    24392525}
    24402526#endif
     2527#endif
     2528
    24412529Void TComDataCU::setPredModeSubParts( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth )
    24422530{
     
    41094197              }
    41104198            }
     4199#if !SHARP_SUBBLOCK_CLEAN_K0044
    41114200            if (iPUHeight + iPUWidth == 12)
    41124201            {
     
    41174206              }
    41184207            }
     4208#endif
    41194209
    41204210            iPartition ++;
     
    53325422}
    53335423
     5424#if SONY_MV_V_CONST_C0078
     5425Void TComDataCU::checkMV_V (TComMv&  rcMv,  RefPicList eRefPicList, int iRefIdx )
     5426{
     5427  if ( getSlice()->getSPS()->getInterViewMvVertConstraintFlag() )
     5428  {
     5429    if ( getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC() == getSlice()->getPOC() )
     5430    {
     5431        //When inter_view_mv_vert_constraint_flag is equal to 1,
     5432        //the vertical component of the motion vectors used for inter-layer prediction
     5433        //shall be equal to or less than 56 in units of luma samples
     5434        assert ( rcMv.getVer() <= (56<<2) );
     5435    }
     5436  }
     5437}
     5438#endif
     5439
    53345440UInt TComDataCU::getIntraSizeIdx(UInt uiAbsPartIdx)
    53355441{
     
    56745780  }
    56755781
    5676   if ( bIsCurrRefLongTerm || bIsColRefLongTerm )
     5782  if ( bIsCurrRefLongTerm || bIsColRefLongTerm ) // CY: this condition equals to both bIsCurrRefLongTerm and bIsColRefLongTerm being 1
    56775783  {
    56785784#if H_3D_TMVP
     5785#if !H_3D_FIX_TMVP_SCALING_VIEW_ID
    56795786    Int iCurrViewId    = m_pcSlice->getViewIndex ();
    56805787    Int iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewIndex ();
    56815788    Int iColViewId     = pColCU->getSlice()->getViewIndex();
    56825789    Int iColRefViewId  = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewIndex();
    5683     iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId );
    5684 
     5790#else
     5791    Int iCurrViewId    = m_pcSlice->getViewId ();
     5792    Int iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId ();
     5793    Int iColViewId     = pColCU->getSlice()->getViewId();
     5794    Int iColRefViewId  = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId();
     5795#endif
     5796#if H_3D_TMVP_SCALING_FIX_K0053
     5797    iScale = 4096;
     5798    if ( iCurrRefViewId != iCurrViewId && iColViewId != iColRefViewId )
     5799#endif
     5800      iScale = xGetDistScaleFactor( iCurrViewId, iCurrRefViewId, iColViewId, iColRefViewId );
     5801#if H_3D_TMVP_FIX_TICKET_97
     5802    if ( bMRG && iScale != 4096 && m_pcSlice->getIvMvScalingFlag( ) )
     5803#else
    56855804    if ( iScale != 4096 && m_pcSlice->getIvMvScalingFlag( ) )
     5805#endif
    56865806    {
    56875807      rcMv = cColMv.scaleMv( iScale );
     
    56955815#endif
    56965816  }
    5697   else
     5817  else // CY: both bIsCurrRefLongTerm and bIsColRefLongTerm are 0
    56985818  {
    56995819    iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
     
    58605980#endif
    58615981#if H_3D_IV_MERGE
     5982#if SEC_ARP_REM_ENC_RESTRICT_K0035
     5983Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
     5984#else
    58625985Bool TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
     5986#endif
    58635987{
    58645988
     
    58766000      pDisp->m_acNBDV = cMv;
    58776001      pDisp->m_aVIdxCan = iViewIdx;
    5878 
     6002#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    58796003      return true;
    5880   }
     6004#endif
     6005  }
     6006#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    58816007  return false;
    5882 }
    5883 #endif
    5884 
    5885 #if H_3D_SINGLE_DEPTH
    5886 Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index)
    5887 {
    5888 
     6008#endif
     6009}
     6010#endif
     6011
     6012#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     6013Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index )
     6014{
     6015#if NEIGHBORING_PIX_AVAILABILITY_FIX
     6016  UInt  uiPartIdxLT, uiPartIdxRT;
     6017  this->deriveLeftRightTopIdxAdi( uiPartIdxLT, uiPartIdxRT, 0, 0 );
     6018  UInt uiMidPart, uiPartNeighbor; 
     6019  TComDataCU* pcCUNeighbor;
     6020  Bool bDepAvail = false;
     6021  Pel *pDepth  = this->getPic()->getPicYuvRec()->getLumaAddr();
     6022  Int iDepStride =  this->getPic()->getPicYuvRec()->getStride();
     6023
     6024  Int xP, yP, nPSW, nPSH;
     6025  this->getPartPosition( uiPartIdx, xP, yP, nPSW, nPSH );
     6026
     6027  switch( index )
     6028  {
     6029  case 0: // Mid Left
     6030    uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSH>>1) / this->getPic()->getMinCUHeight() * this->getPic()->getNumPartInWidth();
     6031    pcCUNeighbor = this->getPULeft( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] );
     6032    if ( pcCUNeighbor )
     6033    {
     6034      if( !this->getSlice()->getPPS()->getConstrainedIntraPred() )
     6035      {
     6036        *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ];
     6037        bDepAvail = true;
     6038      }
     6039      else if ( pcCUNeighbor->getPredictionMode( uiPartNeighbor ) == MODE_INTRA )
     6040      {
     6041        *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ];
     6042        bDepAvail = true;
     6043      }
     6044    }
     6045    break;
     6046  case 1: // Mid Above
     6047    uiMidPart = g_auiZscanToRaster[uiPartIdxLT] + (nPSW>>1) / this->getPic()->getMinCUWidth();
     6048    pcCUNeighbor = this->getPUAbove( uiPartNeighbor, g_auiRasterToZscan[uiMidPart] );
     6049    if( pcCUNeighbor )
     6050    {
     6051      if( !this->getSlice()->getPPS()->getConstrainedIntraPred() )
     6052      {
     6053        *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ];
     6054        bDepAvail = true;
     6055      }
     6056      else if ( pcCUNeighbor->getPredictionMode( uiPartNeighbor ) == MODE_INTRA )
     6057      {
     6058        *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ];
     6059        bDepAvail = true;
     6060      }
     6061    }
     6062    break;
     6063  default:
     6064    break;
     6065  }
     6066
     6067  return bDepAvail;
     6068#else
    58896069  Bool bDepAvail = false;
    58906070  Pel *pDepth  = this->getPic()->getPicYuvRec()->getLumaAddr();
     
    59126092    break;
    59136093  default:
     6094    break;
     6095  }
     6096  return bDepAvail;
     6097#endif
     6098}
     6099#else
     6100#if H_3D_SINGLE_DEPTH
     6101Bool TComDataCU::getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index)
     6102{
     6103
     6104  Bool bDepAvail = false;
     6105  Pel *pDepth  = this->getPic()->getPicYuvRec()->getLumaAddr();
     6106  Int iDepStride =  this->getPic()->getPicYuvRec()->getStride();
     6107
     6108  Int xP, yP, nPSW, nPSH;
     6109  this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH);
     6110  UInt PicHeight=this->getPic()->getPicYuvRec()->getHeight();
     6111  UInt PicWidth=this->getPic()->getPicYuvRec()->getWidth();
     6112  switch(index)
     6113  {
     6114  case 0: // Mid Left
     6115    if( ( xP != 0 ) && ( ( yP + ( nPSH >> 1 ) ) < PicHeight ) )
     6116    {
     6117      *pNeighDepth = pDepth[ (yP+(nPSH>>1)) * iDepStride + (xP-1) ];
     6118      bDepAvail = true;
     6119    }
     6120    break;
     6121  case 1: // Mid Above
     6122    if( ( yP != 0 ) && ( ( xP + ( nPSW >> 1 ) ) < PicWidth ) )
     6123    {
     6124      *pNeighDepth = pDepth[ (yP-1) * iDepStride + (xP + (nPSW>>1)) ];
     6125      bDepAvail = true;
     6126    }
     6127    break;
     6128  default:
    59146129      break;
    59156130  }
    59166131  return bDepAvail;
    59176132}
    5918 
    5919 #endif
     6133#endif
     6134#endif
     6135
    59206136#if H_3D_NBDV
    59216137//Notes from QC:
     
    59236139//TBD#2: set of DvMCP values need to be done as part of inter-view motion prediction process. Remove this comment once merge related integration is done
    59246140//To be checked: Parallel Merge features for NBDV, related to DV_DERIVATION_PARALLEL_B0096 and LGE_IVMP_PARALLEL_MERGE_B0136 are not integrated. The need of these features due to the adoption of CU-based NBDV is not clear. We need confirmation on this, especially by proponents
     6141#if SEC_ARP_REM_ENC_RESTRICT_K0035
     6142Void TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo
     6143#else
    59256144Bool TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo
     6145#endif
    59266146#if H_3D_NBDV_REF
    59276147, Bool bDepthRefine
     
    59316151  //// ******* Init variables ******* /////
    59326152  // Init disparity struct for results
     6153#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    59336154  pDInfo->bDV = false;   
     6155#endif
    59346156  pDInfo->m_aVIdxCan = -1;
    59356157
     
    60266248        pDInfo->m_acDoNBDV  = cColMv;
    60276249#endif //H_3D_NBDV_REF
     6250#if SEC_ARP_REM_ENC_RESTRICT_K0035
     6251        return;
     6252#else
    60286253        return true;
     6254#endif
    60296255      }
    60306256    }
     
    60436269#endif
    60446270    ) )
     6271#if SEC_ARP_REM_ENC_RESTRICT_K0035
     6272    return;
     6273#else
    60456274    return true;
     6275#endif
    60466276
    60476277  //// ******* Get disparity from above block ******* /////
     
    60556285#endif
    60566286      ) )
     6287#if SEC_ARP_REM_ENC_RESTRICT_K0035
     6288      return;
     6289#else
    60576290      return true;
     6291#endif
    60586292  }
    60596293
     
    61016335          pDInfo->m_acDoNBDV = cDispVec;
    61026336#endif
     6337#if SEC_ARP_REM_ENC_RESTRICT_K0035
     6338          return;
     6339#else
    61036340          return true;
     6341#endif
    61046342        }
    61056343      }
     
    61376375      pDInfo->m_acDoNBDV = defaultDV;
    61386376#endif
     6377#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    61396378      return true;
    6140   }
     6379#endif
     6380  }
     6381#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    61416382  return false;
     6383#endif
    61426384}
    61436385
     
    67126954
    67136955              }
     6956#if !SHARP_SUBBLOCK_CLEAN_K0044
    67146957              if (iSPHeight + iSPWidth == 12)
    67156958              {
     
    67206963                }
    67216964              }
     6965#endif
    67226966              iPartition ++;
    67236967            }
     
    67526996      Int         iBaseAbsPartIdx;
    67536997
     6998#if SEC_SHIFTED_IVMC_POS_K0036
     6999      Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth  * 2 );
     7000      Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2 );
     7001#else
    67547002      Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 );
    67557003      Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 );
     7004#endif
    67567005
    67577006      Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
  • trunk/source/Lib/TLibCommon/TComDataCU.h

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    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
     
    308313  TComPic*      getPic                ()                        { return m_pcPic;           }
    309314  TComSlice*    getSlice              ()                        { return m_pcSlice;         }
     315#if H_3D_DISABLE_CHROMA
     316  Void         setSlice              ( TComSlice* pcSlice)     { m_pcSlice = pcSlice;       }
     317#endif
    310318  UInt&         getAddr               ()                        { return m_uiCUAddr;        }
    311319  UInt&         getZorderIdxInCU      ()                        { return m_uiAbsIdxInLCU; }
     
    342350  Void         setSkipFlag           ( UInt idx, Bool skip)     { m_skipFlag[idx] = skip;   }
    343351  Void         setSkipFlagSubParts   ( Bool skip, UInt absPartIdx, UInt depth );
     352#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     353  Bool*        getDISFlag            ()                         { return m_bDISFlag;          }
     354  Bool         getDISFlag            ( UInt idx)                { return m_bDISFlag[idx];     }
     355  Void         setDISFlag            ( UInt idx, Bool bDIS)     { m_bDISFlag[idx] = bDIS;   }
     356  Void         setDISFlagSubParts    ( Bool bDIS, UInt absPartIdx, UInt depth );
     357
     358  UInt*        getDISType            ()                         { return m_uiDISType; }
     359  UInt         getDISType            ( UInt idx)                { return m_uiDISType[idx];     }
     360  Void         getDISType            ( UInt idx, UInt uiDISType)     { m_uiDISType[idx] = uiDISType;   }
     361  Void         setDISTypeSubParts    ( UInt uiDISType, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth );
     362#else
    344363#if H_3D_SINGLE_DEPTH
    345364  Bool*        getSingleDepthFlag            ()                        { return m_singleDepthFlag;          }
     
    353372  Void         setSingleDepthValueSubParts   (Pel singleDepthValue, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth );
    354373#endif 
     374#endif
    355375  Char*         getPredictionMode     ()                        { return m_pePredMode;        }
    356376  PredMode      getPredictionMode     ( UInt uiIdx )            { return static_cast<PredMode>( m_pePredMode[uiIdx] ); }
     
    418438  UChar         getCbf    ( UInt uiIdx, TextType eType )                  { return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx];  }
    419439  UChar*        getCbf    ( TextType eType )                              { return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]];         }
     440
    420441  UChar         getCbf    ( UInt uiIdx, TextType eType, UInt uiTrDepth )  { return ( ( getCbf( uiIdx, eType ) >> uiTrDepth ) & 0x1 ); }
    421442  Void          setCbf    ( UInt uiIdx, TextType eType, UChar uh )        { m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx] = uh;    }
     443
    422444  Void          clearCbf  ( UInt uiIdx, TextType eType, UInt uiNumParts );
    423445  UChar         getQtRootCbf          ( UInt uiIdx )                      { return getCbf( uiIdx, TEXT_LUMA, 0 ) || getCbf( uiIdx, TEXT_CHROMA_U, 0 ) || getCbf( uiIdx, TEXT_CHROMA_V, 0 ); }
     
    484506  );
    485507  Bool          xGetColDisMV      ( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx );
     508#if SEC_ARP_REM_ENC_RESTRICT_K0035
     509  Void          getDisMvpCandNBDV ( DisInfo* pDInfo
     510#else
    486511  Bool          getDisMvpCandNBDV ( DisInfo* pDInfo
     512#endif
    487513#if H_3D_NBDV_REF
    488514   , Bool bDepthRefine = false
     
    491517   
    492518#if H_3D
     519#if SEC_ARP_REM_ENC_RESTRICT_K0035
     520  Void          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
     521#else
    493522  Bool          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
     523#endif
    494524  Bool          getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm );
    495525#endif
     526#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     527   Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
     528#else
    496529#if H_3D_SINGLE_DEPTH
    497530   Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
     531#endif
    498532#endif
    499533#if H_3D_NBDV_REF
     
    591625 
    592626  Void          clipMv                ( TComMv&     rcMv     );
     627#if SONY_MV_V_CONST_C0078
     628  Void          checkMV_V (TComMv&  rcMv,  RefPicList eRefPicList, int iRefIdx );
     629#endif
    593630  Void          getMvPredLeft         ( TComMv&     rcMvPred )   { rcMvPred = m_cMvFieldA.getMv(); }
    594631  Void          getMvPredAbove        ( TComMv&     rcMvPred )   { rcMvPred = m_cMvFieldB.getMv(); }
  • trunk/source/Lib/TLibCommon/TComInterpolationFilter.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComInterpolationFilter.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComList.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComLoopFilter.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComLoopFilter.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComMotionInfo.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComMotionInfo.h

    r1084 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    6363typedef struct _DisCand
    6464{
     65#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    6566  Bool bDV;
     67#endif
    6668  TComMv m_acNBDV;              // DV from NBDV
    6769#if H_3D_NBDV_REF
  • trunk/source/Lib/TLibCommon/TComMv.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComPattern.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComPattern.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComPic.cpp

    r976 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComPic.h

    r976 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComPicSym.cpp

    r1084 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComPicSym.h

    r1084 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComPicYuv.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComPicYuv.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComPicYuvMD5.cpp

    r872 r1179  
    44 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComPrediction.cpp

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    630630
    631631#if H_3D_DBBP
     632#if HS_DBBP_CLEAN_K0048
     633PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU)
     634#else
    632635PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize)
     636#endif
    633637{
    634638  // find virtual partitioning for this CU based on depth block
     
    639643  Int iSumDepth = 0;
    640644  Int iSubSample = 4;
     645#if HS_DBBP_CLEAN_K0048
     646  Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth();
     647  Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight();
     648  TComMv cDv = pcCU->getSlice()->getDepthRefinementFlag(  ) ? pcCU->getDvInfo(0).m_acDoNBDV : pcCU->getDvInfo(0).m_acNBDV;
     649  if( pcCU->getSlice()->getDepthRefinementFlag(  ) )
     650  {
     651    cDv.setVer(0);
     652  }
     653  Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2);
     654  Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2);
     655  UInt t=0;
     656
     657  for (Int y=0; y<uiSize; y+=iSubSample)
     658   {
     659    for (Int x=0; x<uiSize; x+=iSubSample)
     660   {
     661if (iBlkX+x>iPictureWidth)
     662{
     663    Int depthPel = pDepthPels[t];
     664    iSumDepth += depthPel;
     665}
     666else
     667{
     668    Int depthPel = pDepthPels[x];
     669    t=x;
     670    iSumDepth += depthPel;
     671}
     672   }
     673   
     674    // next row
     675    if (!(iBlkY+y+4>iPictureHeight))
     676    pDepthPels += uiDepthStride*iSubSample;
     677#else
    641678  for (Int y=0; y<uiSize; y+=iSubSample)
    642679  {
     
    650687    // next row
    651688    pDepthPels += uiDepthStride*iSubSample;
     689#endif
    652690  }
    653691 
     
    667705    for (Int x=0; x<uiSize; x+=iSubSample)
    668706    {
     707#if HS_DBBP_CLEAN_K0048
     708      Int depthPel = 0;
     709if (iBlkX+x>iPictureWidth)
     710{
     711    depthPel = pDepthPels[t];
     712}
     713else
     714{
     715    depthPel = pDepthPels[x];
     716     t=x;
     717}
     718#else
    669719      Int depthPel = pDepthPels[x];
     720#endif
    670721     
    671722      // decide which segment this pixel belongs to
     
    696747   
    697748    // next row
     749#if HS_DBBP_CLEAN_K0048
     750    if (!(iBlkY+y+4>iPictureHeight))
     751#endif
    698752    pDepthPels += uiDepthStride*iSubSample;
    699753  }
     
    719773}
    720774
     775#if HS_DBBP_CLEAN_K0048
     776Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU)
     777#else
    721778Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask )
     779#endif
    722780{
    723781  // segmentation of texture block --> mask IDs
    724782  Pel*  pDepthBlockStart      = pDepthPels;
    725  
     783
    726784  // first compute average of depth block for thresholding
    727785  Int iSumDepth = 0;
    728786  Int uiMinDepth = MAX_INT;
    729787  Int uiMaxDepth = 0;
    730 
     788#if HS_DBBP_CLEAN_K0048
     789  uiMinDepth = pDepthPels[ 0 ];
     790  uiMaxDepth = pDepthPels[ 0 ];
     791  iSumDepth  = pDepthPels[ 0 ];
     792  UInt t=0;
     793  Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth();
     794  Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); 
     795  TComMv cDv = pcCU->getSlice()->getDepthRefinementFlag(  ) ? pcCU->getDvInfo(0).m_acDoNBDV : pcCU->getDvInfo(0).m_acNBDV;
     796  if( pcCU->getSlice()->getDepthRefinementFlag(  ) )
     797  {
     798    cDv.setVer(0);
     799  }
     800  Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2);
     801  Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2);
     802  if (iBlkX>(Int)(iPictureWidth - uiWidth))
     803  {
     804    iSumDepth += pDepthPels[ iPictureWidth - iBlkX - 1 ];
     805    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]);
     806    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]);
     807  }
     808  else
     809  {
     810    iSumDepth += pDepthPels[ uiWidth - 1 ];
     811    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiWidth - 1 ]);
     812    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiWidth - 1 ]);
     813  }
     814  if (iBlkY>(Int)(iPictureHeight - uiHeight))
     815  {
     816    iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ];
     817    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]);
     818    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]);
     819  }
     820  else
     821  {
     822    iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) ];
     823    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);
     824    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);
     825  }
     826  if (iBlkY>(Int)(iPictureHeight - uiHeight) && iBlkX>(Int)(iPictureWidth - uiWidth))
     827  {
     828    iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ];
     829    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]);
     830    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]);
     831  }
     832  else if (iBlkY>(Int)(iPictureHeight - uiHeight))
     833  {
     834    iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ];
     835    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]);
     836    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]);
     837  }
     838  else if (iBlkX>(Int)(iPictureWidth - uiWidth))
     839  {
     840    iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ];
     841    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]);
     842    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]);
     843  }
     844  else
     845  {
     846    iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ];
     847    uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);
     848    uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);
     849  }
     850#else
    731851  iSumDepth  = pDepthPels[ 0 ];
    732852  iSumDepth += pDepthPels[ uiWidth - 1 ];
     
    743863  uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);
    744864  uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);
    745 
    746  
     865#endif
     866
    747867  // don't generate mask for blocks with small depth range (encoder decision)
    748868  if( uiMaxDepth - uiMinDepth < 10 )
     
    750870    return false;
    751871  }
    752  
     872
    753873  AOF(uiWidth==uiHeight);
    754874  Int iMean = iSumDepth >> 2;
    755  
     875
    756876  // start again for segmentation
    757877  pDepthPels = pDepthBlockStart;
    758  
     878
    759879  Bool bInvertMask = pDepthPels[0]>iMean; // top-left segment needs to be mapped to partIdx 0
    760  
     880
    761881  // generate mask
    762882  UInt uiSumPix[2] = {0,0};
     
    765885    for (Int x=0; x<uiHeight; x++)
    766886    {
     887#if HS_DBBP_CLEAN_K0048
     888      Int depthPel = 0;
     889      if (iBlkX+x>iPictureWidth)
     890      {
     891        depthPel = pDepthPels[t];
     892      }
     893      else
     894      {
     895        depthPel = pDepthPels[x];
     896        t=x;
     897      }
     898#else
    767899      Int depthPel = pDepthPels[x];
    768      
     900#endif
     901
    769902      // decide which segment this pixel belongs to
    770903      Int ucSegment = (Int)(depthPel>iMean);
    771      
     904
    772905      if( bInvertMask )
    773906      {
    774907        ucSegment = 1-ucSegment;
    775908      }
    776      
     909
    777910      // count pixels for each segment
    778911      uiSumPix[ucSegment]++;
    779      
     912
    780913      // set mask value
    781914      pMask[x] = (Bool)ucSegment;
    782915    }
    783    
     916
    784917    // next row
    785     pDepthPels += uiDepthStride;
     918#if HS_DBBP_CLEAN_K0048
     919    if (!(iBlkY+y+1>iPictureHeight))
     920#endif
     921      pDepthPels += uiDepthStride;
    786922    pMask += MAX_CU_SIZE;
    787923  }
    788  
     924
    789925  // don't generate valid mask for tiny segments (encoder decision)
    790926  // each segment needs to cover at least 1/8th of block
     
    794930    return false;
    795931  }
    796  
     932
    797933  // all good
    798934  return true;
     
    11571293  TComMv      cMv         = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr );
    11581294  pcCU->clipMv(cMv);
    1159 
     1295#if SONY_MV_V_CONST_C0078
     1296  pcCU->checkMV_V(cMv, eRefPicList, iRefIdx );
     1297#endif
    11601298#if H_3D_ARP
    11611299  if(pcCU->getARPW( uiPartAddr ) > 0  && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC())
     
    12551393#if H_3D_NBDV
    12561394  DisInfo cDistparity;
     1395#if SEC_ARP_REM_ENC_RESTRICT_K0035
     1396  cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV;
     1397  cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan;
     1398#else
    12571399  cDistparity.bDV           = pcCU->getDvInfo(uiPartAddr).bDV;
    12581400  if( cDistparity.bDV )
     
    12621404    cDistparity.m_aVIdxCan = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan;
    12631405  }
     1406#endif
    12641407#else
    12651408  assert(0); // ARP can be applied only when a DV is available
    12661409#endif
    1267 
     1410#if SEC_ARP_REM_ENC_RESTRICT_K0035
     1411  UChar dW = pcCU->getARPW ( uiPartAddr );
     1412#else
    12681413  UChar dW = cDistparity.bDV ? pcCU->getARPW ( uiPartAddr ) : 0;
    1269 
     1414#endif
     1415
     1416#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    12701417  if( cDistparity.bDV )
     1418#endif
    12711419  {
    12721420    Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList);
     
    13201468      pYuvB0->clear(); pYuvB1->clear();
    13211469    }
    1322 
     1470#if !SEC_ARP_REM_ENC_RESTRICT_K0035
    13231471    assert ( cDistparity.bDV );
    1324    
     1472#endif   
    13251473    TComMv cNBDV = cDistparity.m_acNBDV;
    13261474    pcCU->clipMv( cNBDV );
  • trunk/source/Lib/TLibCommon/TComPrediction.h

    r1084 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    175175 
    176176#if H_3D_DBBP
     177#if HS_DBBP_CLEAN_K0048
     178  PartSize      getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU);
     179  Bool          getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU);
     180#else
    177181  PartSize      getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize);
    178182  Bool          getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask );
     183#endif
    179184  Void          combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize );
    180185#endif
  • trunk/source/Lib/TLibCommon/TComRdCost.cpp

    r884 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    341341    else if( eDFunc >= DF_HADS && eDFunc <= DF_HADS16N )
    342342    {
     343#if !RWTH_DBBP_NO_SATD_K0028
    343344      rcDistParam.DistFunc = TComRdCost::xGetMaskedHADs;
     345#else
     346      rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD;
     347#endif
    344348    }
    345349    else if( eDFunc >= DF_VSD && eDFunc <= DF_VSD16N )
     
    441445  if( m_bUseMask )
    442446  {
     447#if !RWTH_DBBP_NO_SATD_K0028
    443448    rcDistParam.DistFunc = (bHADME)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD;
     449#else
     450    rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD;
     451#endif
    444452  }
    445453#endif
     
    464472  if( m_bUseMask )
    465473  {
     474#if !RWTH_DBBP_NO_SATD_K0028
    466475    rcDP.DistFunc = (bHadamard)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD;
     476#else
     477    rcDP.DistFunc = TComRdCost::xGetMaskedSAD;
     478#endif
    467479  }
    468480#endif
     
    717729}
    718730
     731#if !RWTH_DBBP_NO_SATD_K0028
    719732UInt TComRdCost::xGetMaskedHADs( DistParam* pcDtParam )
    720733{
     
    834847  return uiSum >> DISTORTION_PRECISION_ADJUSTMENT(pcDtParam->bitDepth-8);
    835848}
     849#endif
    836850
    837851UInt TComRdCost::xGetMaskedVSD( DistParam* pcDtParam )
  • trunk/source/Lib/TLibCommon/TComRdCost.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    320320  static UInt xGetMaskedSSE     ( DistParam* pcDtParam );
    321321  static UInt xGetMaskedSAD     ( DistParam* pcDtParam );
     322#if !RWTH_DBBP_NO_SATD_K0028
    322323  static UInt xGetMaskedHADs    ( DistParam* pcDtParam );
     324#endif
    323325  static UInt xGetMaskedVSD     ( DistParam* pcDtParam );
    324326#endif
  • trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComRom.cpp

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    391391Bool g_tracePU = false;
    392392Bool g_traceTU = false;
     393Bool g_disableNumbering = false;
    393394Bool g_disableHLSTrace = false;
    394 UInt64 g_stopAtCounter       = 0;
     395UInt64 g_stopAtCounter       = 937234;
    395396Bool g_traceCopyBack         = false;
    396397Bool g_decTraceDispDer       = false;
    397398Bool g_decTraceMvFromMerge   = false;
    398399Bool g_decTracePicOutput     = false;
    399 Bool g_stopAtPos             = false;
    400 Bool g_outputPos             = false;
     400Bool g_stopAtPos             = true;
     401Bool g_outputPos             = true;   
     402Bool g_traceCameraParameters = false;
     403Bool g_encNumberOfWrittenBits     = true;
    401404#endif
    402405#endif
     
    600603
    601604  Bool stopFlag = false;
    602   if ( g_stopAtPos && poc == 0 && layerId == 1 )
     605  if ( g_stopAtPos && poc == 0 && layerId == 2 )
    603606  {
    604607    Bool stopAtCU = true;
    605608    if ( stopAtCU )        // Stop at CU with specific size
    606609    {   
    607       stopFlag = ( cuPelX  == 888 ) && ( cuPelY  == 248 ) && ( cuWidth == 8 ) && ( cuHeight == 8);
     610      stopFlag = ( cuPelX  == 0 ) && ( cuPelY  == 0 ) && ( cuWidth == 8 ) && ( cuHeight == 8 );
    608611    }
    609612    else
     
    633636      std::cout << "Break point here." << std::endl;
    634637    }
    635     fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     638    if ( !g_disableNumbering )
     639    { 
     640      fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
     641    }
    636642    fprintf( g_hTrace, "%-50s       : %d\n", symbolName, val );     
    637643    fflush ( g_hTrace );
     
    739745  assert( uiWidth == uiHeight );
    740746
     747#if SHARP_DMM_CLEAN_K0042
     748  Int posStart = 0, posEnd = 0;
     749#else
    741750  UChar    uhStartX = 0,    uhStartY = 0,    uhEndX = 0,    uhEndY = 0;
    742751  Int   iStepStartX = 0, iStepStartY = 0, iStepEndX = 0, iStepEndY = 0;
     752#endif
    743753
    744754  UInt uiBlockSize = 0;
     
    752762  for( UInt uiOri = 0; uiOri < 6; uiOri++ )
    753763  {
     764#if !SHARP_DMM_CLEAN_K0042
    754765    // init the edge line parameters for each of the 6 wedgelet types
    755766    switch( uiOri )
     
    762773    case( 5 ): {  uhStartX = (uiBlockSize-1); uhStartY = 0;               uhEndX = 0;               uhEndY = 0;               iStepStartX =  0; iStepStartY = +1; iStepEndX =  0; iStepEndY = +1; break; }
    763774    }
    764 
     775#endif
     776
     777#if SHARP_DMM_CLEAN_K0042
     778    posEnd = (Int) racWedgeList.size();
     779    if (uiOri == 0 || uiOri == 4)
     780    {
     781#endif
    765782    for( Int iK = 0; iK < uiBlockSize; iK += (uiWidth>=16 ?2:1))
    766783    {
    767784      for( Int iL = 0; iL < uiBlockSize; iL += ((uiWidth>=16 && uiOri<4)?2:1) )
    768785      {
     786#if SHARP_DMM_CLEAN_K0042
     787        Int xS = iK;
     788        Int yS = 0;
     789        Int xE = (uiOri == 0) ? 0 : iL;
     790        Int yE = (uiOri == 0) ? iL : uiBlockSize - 1;
     791        cTempWedgelet.setWedgelet( xS, yS, xE, yE, uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) );
     792#else
    769793        cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) );
     794#endif
    770795        addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList );
    771796      }
    772797    }
     798#if SHARP_DMM_CLEAN_K0042
     799    }
     800    else
     801    {
     802      for (Int pos = posStart; pos < posEnd; pos++)
     803      {
     804        cTempWedgelet.generateWedgePatternByRotate(racWedgeList[pos], uiOri);
     805        addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList );
     806      }
     807    }
     808    posStart = posEnd;
     809#endif
    773810  }
    774811
  • trunk/source/Lib/TLibCommon/TComRom.h

    r1084 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    230230
    231231#ifndef ENC_DEC_TRACE
    232 #define ENC_DEC_TRACE   0
     232#define ENC_DEC_TRACE   0 
    233233#endif
    234234
     
    257257 extern Bool   g_traceTU;
    258258 extern Bool   g_disableHLSTrace;       // USE g_HLSTraceEnable to toggle HLS trace. Not this one!
     259 extern Bool   g_disableNumbering;      // Don't print numbers to trace file
    259260 extern UInt64 g_stopAtCounter;         // Counter to set breakpoint.
    260261 extern Bool   g_traceCopyBack;         // Output samples on copy back 
     
    264265 extern Bool   g_stopAtPos;             // Stop at position
    265266 extern Bool   g_outputPos;             // Output position
     267 extern Bool   g_traceCameraParameters; // Trace camera parameters
     268 extern Bool   g_encNumberOfWrittenBits;// Trace number of written bits
    266269
    267270#define DTRACE_CU(x,y)             writeToTraceFile( x,y, g_traceCU );
  • trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp

    r964 r1179  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2014, ITU/ISO/IEC
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h

    r964 r1179  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2014, ITU/ISO/IEC
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComSlice.cpp

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    137137#endif
    138138#if H_3D
     139#if HHI_INTER_COMP_PRED_K0052
     140, m_inCmpPredFlag                 ( false )
     141#endif
     142#if HHI_CAM_PARA_K0052
     143, m_numViews                        ( 0    )
     144#endif
    139145, m_depthToDisparityB             ( NULL )
    140146, m_depthToDisparityF             ( NULL )
    141147#endif
     148#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     149, m_bApplyDIS                     (false)
     150#else
    142151#if H_3D_SINGLE_DEPTH
    143152, m_bApplySingleDepthMode         (false)
     153#endif
    144154#endif
    145155#endif
     
    181191  m_iDefaultRefViewIdx = -1;
    182192  m_bDefaultRefViewIdxAvailableFlag = false;
     193#if HHI_INTER_COMP_PRED_K0052
     194  m_ivMvPredFlag           = false;
     195  m_ivMvScalingFlag        = false;
     196  m_ivResPredFlag          = false; 
     197  m_depthRefinementFlag    = false;
     198  m_viewSynthesisPredFlag  = false;
     199  m_depthBasedBlkPartFlag  = false;
     200  m_mpiFlag                = false;
     201  m_intraContourFlag       = false;
     202  m_intraSdcWedgeFlag      = false;
     203  m_qtPredFlag             = false;
     204  m_interSdcFlag           = false;
     205  m_depthIntraSkipFlag     = false;
     206  m_subPbSize              =  1 << 6;
     207  m_mpiSubPbSize           =  1 << 6;
     208#endif
    183209}
    184210
     
    188214  m_puiSubstreamSizes = NULL;
    189215#if H_3D
     216#if HHI_CAM_PARA_K0052   
     217  for( UInt i = 0; i < m_numViews; i++ )
     218#else
    190219  for( UInt i = 0; i < getViewIndex(); i++ )
     220#endif
    191221  {
    192222    if ( m_depthToDisparityB && m_depthToDisparityB[ i ] )
     
    198228    {
    199229      delete[] m_depthToDisparityF [ i ];
    200   }
     230    }
    201231  }
    202232
     
    575605  Int i;
    576606
     607#if HHI_RES_PRED_K0052
     608  m_pocsInCurrRPSs.clear();
     609#endif
     610
    577611  for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++)
    578612  {
     
    585619      NumPocStCurr0++;
    586620      pcRefPic->setCheckLTMSBPresent(false); 
     621#if HHI_RES_PRED_K0052
     622      m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() );
     623#endif
    587624    }
    588625  }
     
    598635      NumPocStCurr1++;
    599636      pcRefPic->setCheckLTMSBPresent(false); 
     637#if HHI_RES_PRED_K0052
     638      m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() );
     639#endif
    600640    }
    601641  }
     
    610650      RefPicSetLtCurr[NumPocLtCurr] = pcRefPic;
    611651      NumPocLtCurr++;
     652#if HHI_RES_PRED_K0052
     653      m_pocsInCurrRPSs.push_back( pcRefPic->getPOC() );
     654#endif
    612655    }
    613656    if(pcRefPic==NULL)
     
    619662
    620663  Int numPocInterCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr;
     664#if HHI_RES_PRED_K0052
     665  assert( numPocInterCurr == (Int) m_pocsInCurrRPSs.size() );
     666#endif
    621667  numPocTotalCurr = numPocInterCurr + getNumActiveRefLayerPics( );
    622668  assert( numPocTotalCurr == getNumRpsCurrTempList() );
     
    791837Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset )
    792838
     839#if HHI_CAM_PARA_K0052
     840  Int voiInVps      = m_pcVPS->getVoiInVps(getViewIndex() );
     841  if( m_pcVPS->getNumCp( voiInVps ) > 0 )
     842  {   
     843    if( m_pcVPS->getCpInSliceSegmentHeaderFlag( voiInVps ) )
     844    {
     845      for( Int m = 0; m < m_pcVPS->getNumCp( voiInVps ); m++ )
     846      {     
     847        Int j      = m_pcVPS->getCpRefVoi( voiInVps, m );
     848        Int jInVps = m_pcVPS->getVoiInVps( j );
     849
     850        setCpScale   ( jInVps , aaiScale [ jInVps   ][ voiInVps ]);
     851        setCpInvScale( jInVps , aaiScale [ voiInVps ][ jInVps   ]);
     852        setCpOff     ( jInVps , aaiOffset[ jInVps   ][ voiInVps ]);
     853        setCpInvOff  ( jInVps , aaiOffset[ voiInVps ][ jInVps   ]);
     854      }
     855    }
     856  }
     857#else
    793858  if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) )
    794859  {   
     
    801866    }
    802867  }
     868#endif
    803869}
    804870#endif
     
    10991165  }
    11001166#endif
     1167#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1168  m_bApplyDIS = pSrc->m_bApplyDIS;
     1169#else
    11011170#if H_3D_SINGLE_DEPTH
    11021171  m_bApplySingleDepthMode = pSrc->m_bApplySingleDepthMode;
     1172#endif
    11031173#endif
    11041174#if H_3D_IC
     
    21472217{
    21482218  m_numViews = 1;
    2149 #if HHI_VIEW_ID_LIST_I5_J0107
     2219#if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052
    21502220#if H_3D
    21512221  AOF( m_viewOIdxList.size() == 0 );
     2222 
    21522223  m_viewOIdxList.push_back( 0 );       
    21532224#endif
     
    21702241      {
    21712242        m_numViews++;
    2172 #if HHI_VIEW_ID_LIST_I5_J0107
     2243#if HHI_VIEW_ID_LIST_I5_J0107  || HHI_INTER_COMP_PRED_K0052
    21732244#if H_3D
    21742245        m_viewOIdxList.push_back( getViewOrderIdx( lId ) );       
     
    22102281  Int i = 0, j = 0;
    22112282
     2283#if HHI_CAM_PARA_K0052
     2284  m_numCp    = new Int [ iNumViews ];
     2285  m_cpRefVoi = new Int*[ iNumViews ];
     2286  m_cpInSliceSegmentHeaderFlag = new Bool[ iNumViews ];
     2287
     2288  m_cpPresentFlag  = new Bool*[ iNumViews ];
     2289#else
    22122290  m_bCamParPresent = new Bool[ iNumViews ];
    22132291  m_bCamParInSliceHeader = new Bool[ iNumViews ];
     2292#endif
     2293 
    22142294
    22152295  m_aaaiCodedScale = new Int**[ iNumViews ];
     
    22172297  for ( i = 0; i < iNumViews ; i++ )
    22182298  {
     2299#if HHI_CAM_PARA_K0052
     2300    m_cpInSliceSegmentHeaderFlag[i] = false;     
     2301#else
    22192302    m_bCamParPresent[i] = false;
    22202303    m_bCamParInSliceHeader[i] = false;
     2304#endif
     2305   
    22212306    m_aaaiCodedScale[i] = new Int*[ 2 ];
    22222307    m_aaaiCodedOffset[i] = new Int*[ 2 ];
     2308
     2309#if HHI_CAM_PARA_K0052
     2310    m_numCp   [i] = 0;
     2311    m_cpRefVoi[i] = new Int[ iNumViews ];
     2312    m_cpPresentFlag[i] = new Bool[ iNumViews ];
     2313    for ( j = 0; j < iNumViews; j++)
     2314    {
     2315      m_cpRefVoi[i][j] = 0;
     2316      m_cpPresentFlag[i][j] = false;
     2317    }
     2318#endif
    22232319    for ( j = 0; j < 2; j++ )
    22242320    {
     
    22392335  Int i = 0, j = 0;
    22402336
     2337#if !HHI_CAM_PARA_K0052
    22412338  if ( m_bCamParPresent != NULL )
    22422339  {
     
    22472344    delete [] m_bCamParInSliceHeader;
    22482345  }
     2346#else
     2347  if ( m_numCp != NULL )
     2348  {
     2349    delete [] m_numCp;
     2350  }
     2351
     2352  if ( m_cpRefVoi != NULL )
     2353  {
     2354    for ( i = 0; i < iNumViews ; i++ )
     2355    {
     2356      delete [] m_cpRefVoi[i];
     2357    }
     2358    delete[] m_cpRefVoi;
     2359  }
     2360
     2361  if ( m_cpPresentFlag != NULL )
     2362  {
     2363    for ( i = 0; i < iNumViews ; i++ )
     2364    {
     2365      delete [] m_cpPresentFlag[i];
     2366    }
     2367    delete[] m_cpPresentFlag;
     2368  }
     2369
     2370
     2371  if ( m_cpInSliceSegmentHeaderFlag != NULL )
     2372  {
     2373    delete [] m_cpInSliceSegmentHeaderFlag;
     2374  }
     2375#endif
     2376
    22492377
    22502378  if ( m_aaaiCodedScale != NULL )
     
    22762404
    22772405
    2278 Void
    2279   TComVPS::initCamParaVPS( UInt uiViewIndex, Bool bCamParPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )
     2406#if !HHI_CAM_PARA_K0052
     2407Void TComVPS::initCamParaVPS( UInt uiViewIndex, Bool bCamParPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset )
    22802408{
    22812409  AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); 
     
    22962424  }
    22972425}
     2426#endif
    22982427
    22992428#endif // H_3D
     
    27302859#endif
    27312860#if H_3D
     2861#if !HHI_CAM_PARA_K0052
    27322862, m_bCamParInSliceHeader      (false)
     2863#endif
    27332864#endif
    27342865{
     
    37543885      {
    37553886        Int layerIdInNuh = getRefPicLayerId( i );
     3887#if HHI_RES_PRED_K0052
     3888        TComPic* picV = getIvPic( getIsDepth(), getVPS()->getViewIndex( layerIdInNuh ) );
     3889        assert( picV != NULL );
     3890        std::vector<Int> pocsInCurrRPSsPicV = picV->getSlice(0)->getPocsInCurrRPSs();
     3891        Bool refRpRefAvailFlag = false;
     3892        for (Int idx = 0; idx < pocsInCurrRPSsPicV.size(); idx++)
     3893        {
     3894          if ( pocsInCurrRPSsPicV[idx] == prevPOC )
     3895          {
     3896            refRpRefAvailFlag = true;
     3897            break;
     3898          }
     3899        }
     3900
     3901        if (getFirstTRefIdx(eRefPicList) >= 0 && refRpRefAvailFlag )
     3902#else
    37563903        Int viewIdx = getVPS()->getViewId( layerIdInNuh );
    37573904        TComPic*pcPicPrev = ivPicLists->getPic(viewIdx, 0, prevPOC);
    37583905        if (getFirstTRefIdx(eRefPicList) >= 0 && pcPicPrev && pcPicPrev->getSlice( 0 )->isReferenced())
     3906#endif
    37593907        {
    37603908          m_arpRefPicAvailable[eRefPicList][layerIdInNuh] = true;
     
    39294077#if H_3D_NBDV_REF
    39304078  setupLUT = setupLUT || getDepthRefinementFlag( );
    3931 #endif
     4079#endif  
    39324080
    39334081#if H_3D_IV_MERGE
     
    39394087    return;
    39404088
     4089#if HHI_CAM_PARA_K0052
     4090  m_numViews = getVPS()->getNumViews();
     4091#endif
    39414092  /// GT: Allocation should be moved to a better place later;
    39424093  if ( m_depthToDisparityB == NULL )
    39434094  {
     4095#if HHI_CAM_PARA_K0052   
     4096    m_depthToDisparityB = new Int*[ m_numViews ];
     4097    for ( Int i = 0; i < getVPS()->getNumViews(); i++ )
     4098#else
    39444099    m_depthToDisparityB = new Int*[ getViewIndex() ];
    39454100    for ( Int i = 0; i < getViewIndex(); i++ )
     4101#endif
    39464102    {
    39474103      m_depthToDisparityB[ i ] = new Int[ Int(1 << g_bitDepthY) ];
     
    39494105  }
    39504106
     4107 
    39514108  if ( m_depthToDisparityF == NULL )
    39524109  {
     4110#if HHI_CAM_PARA_K0052   
     4111    m_depthToDisparityF = new Int*[ m_numViews ];
     4112    for ( Int i = 0; i < m_numViews; i++ )
     4113#else
    39534114    m_depthToDisparityF= new Int*[ getViewIndex() ];
    39544115    for ( Int i = 0; i < getViewIndex(); i++ )
     4116#endif
    39554117    {
    39564118      m_depthToDisparityF[ i ] = new Int[ Int(1 << g_bitDepthY) ];
     
    39634125  TComVPS* vps = getVPS();
    39644126
     4127#if HHI_CAM_PARA_K0052
     4128  Int log2Div = g_bitDepthY - 1 + vps->getCpPrecision();
     4129  Int voiInVps = vps->getVoiInVps( getViewIndex() );
     4130  Bool camParaSH = vps->getCpInSliceSegmentHeaderFlag( voiInVps ); 
     4131
     4132  Int* codScale     = camParaSH ? m_aaiCodedScale [ 0 ] : vps->getCodedScale    ( voiInVps );
     4133  Int* codOffset    = camParaSH ? m_aaiCodedOffset[ 0 ] : vps->getCodedOffset   ( voiInVps );
     4134  Int* invCodScale  = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( voiInVps );
     4135  Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( voiInVps );
     4136
     4137
     4138  for (Int i = 0; i < voiInVps; i++)
     4139  {
     4140    Int iInVoi = vps->getVoiInVps( i );
     4141#if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC
     4142    if ( g_traceCameraParameters )
     4143    {
     4144      std::cout << std::endl << "Cp: " << codScale   [ iInVoi ] << " " <<    codOffset[ iInVoi ] << " "
     4145                << invCodScale[ iInVoi ] << " " << invCodOffset[ iInVoi ] << " " << log2Div;
     4146    }
     4147#endif
     4148    for ( Int d = 0; d <= ( ( 1 << g_bitDepthY ) - 1 ); d++ )
     4149    {     
     4150      Int offset =    ( codOffset  [ iInVoi ] << g_bitDepthY ) + ( ( 1 << log2Div ) >> 1 );         
     4151      m_depthToDisparityB[ iInVoi ][ d ] = ( codScale [ iInVoi ] * d + offset ) >> log2Div;
     4152
     4153      Int invOffset = ( invCodOffset[ iInVoi ] << g_bitDepthY ) + ( ( 1 << log2Div ) >> 1 );         
     4154      m_depthToDisparityF[ iInVoi ][ d ] = ( invCodScale[ iInVoi ] * d + invOffset ) >> log2Div;
     4155    }
     4156  }
     4157#else
    39654158  Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision();
     4159
    39664160  Int viewIndex = getViewIndex();
    39674161
     
    39844178    }
    39854179  }
     4180#endif
    39864181}
    39874182#endif
     
    40234218
    40244219#if H_3D
    4025 
    40264220Void TComSlice::init3dToolParameters()
    40274221{
    40284222  Bool depthFlag = getIsDepth();
    40294223
     4224#if !HHI_INTER_COMP_PRED_K0052
    40304225  Bool depthOfRefViewsAvailFlag = false;
    40314226  Bool textOfCurViewAvailFlag = false;
     
    40724267    }
    40734268  }
     4269
    40744270
    40754271  Bool lidG0  = ( getLayerId() > 0 );
     
    40884284  m_intraSdcWedgeFlag      = sps3dExt->getIntraSdcWedgeFlag    ( depthFlag ) && lidG0                                     ;                         
    40894285  m_qtPredFlag             = sps3dExt->getQtPredFlag           ( depthFlag ) && lidG0           &&   textOfCurViewAvailFlag;
    4090   m_interSdcFlag           = sps3dExt->getInterSdcFlag         ( depthFlag ) && lidG0                                    ;                               
     4286  m_interSdcFlag           = sps3dExt->getInterSdcFlag         ( depthFlag ) && lidG0                                    ; 
     4287#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     4288  m_depthIntraSkipFlag     = sps3dExt->getDepthIntraSkipFlag   ( depthFlag ) && lidG0                                    ;                         
     4289#else
    40914290  m_intraSingleFlag        = sps3dExt->getIntraSingleFlag      ( depthFlag ) && lidG0                                    ;                         
     4291#endif
    40924292
    40934293  m_subPbSize              = lidG0 ? ( 1 << ( sps3dExt->getLog2SubPbSizeMinus3   ( depthFlag ) + 3 ) ) : getSPS()->getMaxCUWidth(); 
    40944294  m_mpiSubPbSize           = 1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 );
     4295#else
     4296  Bool nRLLG0 =  ( getVPS()->getNumRefListLayers( getLayerId() ) > 0 );     
     4297
     4298  TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension();
     4299
     4300  m_ivMvPredFlag           = sps3dExt->getIvMvPredFlag         ( depthFlag ) && nRLLG0                       ;                             
     4301  m_ivMvScalingFlag        = sps3dExt->getIvMvScalingFlag      ( depthFlag )                                 ;                             
     4302  m_ivResPredFlag          = sps3dExt->getIvResPredFlag        ( depthFlag ) && nRLLG0                       ;                               
     4303#if HHI_CAM_PARA_K0052
     4304  m_depthRefinementFlag    = sps3dExt->getDepthRefinementFlag  ( depthFlag )           && getInCompPredFlag() && m_cpAvailableFlag;
     4305  m_viewSynthesisPredFlag  = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag() && m_cpAvailableFlag;
     4306#else
     4307  m_depthRefinementFlag    = sps3dExt->getDepthRefinementFlag  ( depthFlag )           && getInCompPredFlag();                           
     4308  m_viewSynthesisPredFlag  = sps3dExt->getViewSynthesisPredFlag( depthFlag ) && nRLLG0 && getInCompPredFlag();                           
     4309#endif
     4310  m_depthBasedBlkPartFlag  = sps3dExt->getDepthBasedBlkPartFlag( depthFlag )           && getInCompPredFlag();                         
     4311  m_mpiFlag                = sps3dExt->getMpiFlag              ( depthFlag )           && getInCompPredFlag();
     4312  m_intraContourFlag       = sps3dExt->getIntraContourFlag     ( depthFlag )           && getInCompPredFlag();
     4313  m_intraSdcWedgeFlag      = sps3dExt->getIntraSdcWedgeFlag    ( depthFlag )                                 ;                         
     4314  m_qtPredFlag             = sps3dExt->getQtPredFlag           ( depthFlag )           && getInCompPredFlag();
     4315  m_interSdcFlag           = sps3dExt->getInterSdcFlag         ( depthFlag )                                 ; 
     4316  m_depthIntraSkipFlag     = sps3dExt->getDepthIntraSkipFlag   ( depthFlag )                                 ;                         
     4317
     4318  m_subPbSize              =  1 << ( sps3dExt->getLog2SubPbSizeMinus3   ( depthFlag ) + 3 ); 
     4319  m_mpiSubPbSize           =  1 << ( sps3dExt->getLog2MpiSubPbSizeMinus3( depthFlag ) + 3 );
     4320
     4321#endif
    40954322
    40964323#if H_3D_OUTPUT_ACTIVE_TOOLS
     
    40984325  std::cout << "DepthFlag:              :" << getIsDepth()             << std::endl;
    40994326  std::cout << "ViewOrderIdx:           :" << getViewIndex()           << std::endl;
     4327#if HHI_INTER_COMP_PRED_K0052
     4328  std::cout << "InterCmpPredAvailableFlag:" << getInCmpPredAvailFlag() << std::endl;
     4329  std::cout << "InterCompPredFlag       :"  << getInCompPredFlag()     << std::endl;
     4330  //std::cout << "TextOfCurViewAvailFlag  :" << textOfCurViewAvailFlag   << std::endl;
     4331#else
    41004332  std::cout << "DepthOfRefViewsAvailFlag:" << depthOfRefViewsAvailFlag << std::endl;
    41014333  std::cout << "TextOfCurViewAvailFlag  :" << textOfCurViewAvailFlag   << std::endl;
     4334#endif
    41024335 
    41034336  std::cout << "ivMvPredFlag            :" << m_ivMvPredFlag           << std::endl;
     
    41124345  std::cout << "qtPredFlag              :" << m_qtPredFlag             << std::endl;
    41134346  std::cout << "interSdcFlag            :" << m_interSdcFlag           << std::endl;
     4347#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     4348  std::cout << "depthIntraSkipFlag      :" << m_depthIntraSkipFlag     << std::endl;   
     4349#else
    41144350  std::cout << "intraSingleFlag         :" << m_intraSingleFlag        << std::endl;   
     4351#endif
    41154352  std::cout << "subPbSize               :" << m_subPbSize              << std::endl;
    41164353  std::cout << "mpiSubPbSize            :" << m_mpiSubPbSize           << std::endl;
  • trunk/source/Lib/TLibCommon/TComSlice.h

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    914914  // VPS EXTENSION 2 SYNTAX ELEMENTS
    915915#if H_3D
     916#if HHI_CAM_PARA_K0052 
     917  Int*        m_numCp; 
     918  Int**       m_cpRefVoi;
     919  Bool**      m_cpPresentFlag;
     920  Int         m_cpPrecision;
     921  Bool*       m_cpInSliceSegmentHeaderFlag;
     922#else
    916923  UInt        m_uiCamParPrecision;
    917924  Bool*       m_bCamParInSliceHeader;
    918925  Bool*       m_bCamParPresent;
     926#endif
    919927  Int         ***m_aaaiCodedScale ;
    920928  Int         ***m_aaaiCodedOffset;
    921929
    922 #if HHI_VIEW_ID_LIST_I5_J0107
     930#if HHI_VIEW_ID_LIST_I5_J0107 ||  HHI_INTER_COMP_PRED_K0052
    923931  std::vector<Int>  m_viewOIdxList;
    924932#endif
    925 
     933#if HHI_INTER_COMP_PRED_K0052
     934  std::vector< std::vector<Bool> > m_viewCompLayerPresentFlag;
     935  std::vector< std::vector<Int>  > m_viewCompLayerId;
     936#endif
    926937#endif
    927938
     
    11521163  Int     getNumViews()                                                    { return m_numViews; }
    11531164  Void    initNumViews();
    1154 #if HHI_VIEW_ID_LIST_I5_J0107
     1165#if HHI_INTER_COMP_PRED_K0052
     1166#if H_3D
     1167  Void   initViewCompLayer( )
     1168  {
     1169    assert( m_viewCompLayerId.size() == 0 && m_viewCompLayerPresentFlag.size() == 0  );
     1170    for( Int i = 0; i < getNumViews(); i++ )
     1171    {
     1172      m_viewCompLayerId         .push_back( std::vector<Int>(0)  );
     1173      m_viewCompLayerPresentFlag.push_back( std::vector<Bool>(0) );     
     1174
     1175      for( Int depFlag = 0; depFlag  <=  1; depFlag++ )
     1176      {
     1177        Int iViewOIdx = getViewOIdxList( i );
     1178        Int layerId = -1;
     1179        for( Int j = 0; j  <=  getMaxLayersMinus1(); j++ )
     1180        {
     1181          Int jNuhLId = getLayerIdInNuh( j );
     1182          if( getVpsDepthFlag( jNuhLId ) == ( (Bool) depFlag )  &&  getViewOrderIdx( jNuhLId )  ==  iViewOIdx 
     1183            &&  getDependencyId( jNuhLId )  ==  0  &&  getAuxId( jNuhLId )  ==  0 )
     1184          {
     1185            layerId = jNuhLId;
     1186          }
     1187        }
     1188        m_viewCompLayerPresentFlag[ i ].push_back( layerId  !=  -1 );
     1189        m_viewCompLayerId         [ i ].push_back( layerId );       
     1190      }
     1191    }
     1192  };
     1193#endif
     1194#endif
     1195
     1196#if HHI_VIEW_ID_LIST_I5_J0107 || HHI_INTER_COMP_PRED_K0052
    11551197  Int     getViewOIdxList( Int i )                                         { return m_viewOIdxList[i]; }
    1156 #endif
    1157 
     1198#if HHI_CAM_PARA_K0052
     1199  std::vector<Int> getViewOIdxList( )                                               { return m_viewOIdxList; }
     1200#endif
     1201#endif
     1202
     1203#if HHI_INTER_COMP_PRED_K0052
     1204#if HHI_CAM_PARA_K0052
     1205  Int     getVoiInVps( Int viewOIdx )                                     
     1206#else
     1207  Int     getInvViewOIdxList( Int viewOIdx )                                     
     1208#endif
     1209  {   
     1210    for ( Int i = 0; i < m_viewOIdxList.size(); i++ )
     1211    {
     1212      if  ( m_viewOIdxList[ i ] == viewOIdx )
     1213      {
     1214        return i;
     1215      }
     1216    }
     1217    assert( 0 );   
     1218    return -1;
     1219  };
     1220
     1221#if HHI_CAM_PARA_K0052
     1222  Bool    getViewCompLayerPresentFlag (Int i, Bool d ) { return  m_viewCompLayerPresentFlag[ getVoiInVps(i) ][d]; }
     1223  Bool    getViewCompLayerId          (Int i, Bool d ) { return  m_viewCompLayerId         [ getVoiInVps(i) ][d]; }
     1224#else
     1225  Bool    getViewCompLayerPresentFlag (Int i, Bool d ) { return  m_viewCompLayerPresentFlag[ getInvViewOIdxList(i) ][d]; }
     1226  Bool    getViewCompLayerId          (Int i, Bool d ) { return  m_viewCompLayerId         [ getInvViewOIdxList(i) ][d]; }
     1227#endif
     1228#endif
    11581229  Bool    getDependencyFlag( Int i, Int j )                                { return m_dependencyFlag[i][j]; }
    11591230  Int     getNumDirectRefLayers( Int layerIdInNuh )                        { return m_numDirectRefLayers[ layerIdInNuh ];  };                               
     
    12761347  Void createCamPars(Int iNumViews);
    12771348  Void deleteCamPars();
     1349#if HHI_CAM_PARA_K0052
     1350  Void initCamParaVPS( Int vOIdxInVps, Int numCp, Bool cpInSliceSegmentHeaderFlag, Int* cpRefVoi, Int** aaiScale, Int** aaiOffset );
     1351#else
    12781352  Void initCamParaVPS      (  UInt uiViewIndex, Bool bCamParPresent = false, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 );
     1353#endif
     1354 
     1355#if HHI_CAM_PARA_K0052
     1356
     1357  Void setCpPrecision( Int  val ) { m_cpPrecision = val; }
     1358  Int  getCpPrecision(  ) { return m_cpPrecision; }
     1359
     1360  Void setNumCp( Int i, Int  val ) { m_numCp[i] = val; }
     1361  Int  getNumCp( Int i )           { return m_numCp[i]; }
     1362
     1363  Void setCpRefVoi( Int i, Int m, Int  val ) { m_cpRefVoi[i][m] = val; }
     1364  Int  getCpRefVoi( Int i, Int m )           { return m_cpRefVoi[i][m]; }   
     1365 
     1366  Void setCpInSliceSegmentHeaderFlag( Int i, Bool flag ) { m_cpInSliceSegmentHeaderFlag[i] = flag; }
     1367  Bool getCpInSliceSegmentHeaderFlag( Int i )            { return m_cpInSliceSegmentHeaderFlag[i]; }
     1368 
     1369  Void setVpsCpScale( Int i, Int j, Int  val ) { m_aaaiCodedScale [i][0][j] = val; }
     1370  Int  getVpsCpScale( Int i, Int j ) { return m_aaaiCodedScale[i][0][j]; }
     1371
     1372  Void setVpsCpOff( Int i, Int j, Int  val ) { m_aaaiCodedOffset[i][0][j] = val; }
     1373  Int  getVpsCpOff( Int i, Int j ) { return m_aaaiCodedOffset[i][0][j]; }
     1374
     1375  Void setVpsCpInvScale( Int i, Int j, Int  val ) { m_aaaiCodedScale[i][1][j] = val; }
     1376  Int  getVpsCpInvScale( Int i, Int j ) { return m_aaaiCodedScale[i][1][j]; }
     1377
     1378  Void setVpsCpInvOff( Int i, Int j, Int  val ) { m_aaaiCodedOffset[i][1][j] = val; }
     1379  Int  getVpsCpInvOff( Int i, Int j ) { return m_aaaiCodedOffset[i][1][j]; }
     1380
     1381// Derived
     1382  Void deriveCpPresentFlag( )
     1383  {
     1384    for( Int nInVps = 0; nInVps < getNumViews(); nInVps++  )
     1385    {
     1386      for( Int mInVps = 0; mInVps < getNumViews(); mInVps++ )
     1387      {
     1388        m_cpPresentFlag[nInVps][mInVps] = 0;
     1389      }
     1390    }
     1391
     1392   for( Int n = 1; n < getNumViews(); n++ )
     1393   {
     1394      Int iInVps = getVoiInVps(  getViewOIdxList( n ) );     
     1395      for( Int m = 0; m < getNumCp( iInVps ); m++ )
     1396      {
     1397         m_cpPresentFlag[ iInVps ][ getVoiInVps( getCpRefVoi( iInVps, m ) ) ] = 1;
     1398      }
     1399    }
     1400  }
     1401
     1402  Void setCpPresentFlag( Int i, Int m, Bool flag ) { m_cpPresentFlag[i][m] = flag; }
     1403  Bool getCpPresentFlag( Int i, Int m )           { return m_cpPresentFlag[i][m]; }   
     1404
     1405#else
    12791406  UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
     1407
    12801408  Bool getCamParPresent      ( Int viewIndex )  { return m_bCamParPresent[viewIndex]; }
    12811409  Void setCamParPresent      ( Int viewIndex, Bool val )  { m_bCamParPresent[viewIndex] = val; }
    12821410  Bool hasCamParInSliceHeader( Int viewIndex )  { return m_bCamParInSliceHeader[viewIndex]; }
    12831411  Void setHasCamParInSliceHeader( Int viewIndex, Bool b )  { m_bCamParInSliceHeader[viewIndex] = b; }
     1412#endif
     1413
     1414
    12841415  Int* getCodedScale         ( Int viewIndex )  { return m_aaaiCodedScale [viewIndex][0]; }
    12851416  Int* getCodedOffset        ( Int viewIndex )  { return m_aaaiCodedOffset[viewIndex][0]; }
     
    15741705      m_qtPredFlag            [d] = false;
    15751706      m_interSdcFlag          [d] = false;
    1576       m_intraSingleFlag       [d] = false;   
     1707#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1708      m_depthIntraSkipFlag    [d] = false;   
     1709#else
     1710      m_intraSingleFlag       [d] = false;
     1711#endif
    15771712    }
    15781713  }
     
    16171752  Bool getInterSdcFlag( Int d ) { return m_interSdcFlag[d]; }
    16181753
     1754#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1755  Void setDepthIntraSkipFlag( Int d, Bool flag ) { m_depthIntraSkipFlag[d] = flag; }
     1756  Bool getDepthIntraSkipFlag( Int d ) { return m_depthIntraSkipFlag[d]; }
     1757#else
    16191758  Void setIntraSingleFlag( Int d, Bool flag ) { m_intraSingleFlag[d] = flag; }
    16201759  Bool getIntraSingleFlag( Int d ) { return m_intraSingleFlag[d]; }
     1760#endif
    16211761
    16221762private:
     
    16351775  Bool        m_qtPredFlag            [2];
    16361776  Bool        m_interSdcFlag          [2];
     1777#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     1778  Bool        m_depthIntraSkipFlag    [2]; 
     1779#else
    16371780  Bool        m_intraSingleFlag       [2]; 
     1781#endif
    16381782};
    16391783
     
    17401884#if H_3D
    17411885  TComSps3dExtension m_sps3dExtension;
     1886#if !HHI_CAM_PARA_K0052
    17421887  UInt        m_uiCamParPrecision;
    17431888  Bool        m_bCamParInSliceHeader;
     1889#endif
    17441890  Int         m_aaiCodedScale [2][MAX_NUM_LAYERS];
    17451891  Int         m_aaiCodedOffset[2][MAX_NUM_LAYERS];
     
    17591905  Void setChromaFormatIdc (Int i)    { m_chromaFormatIdc = i;          }
    17601906
     1907#if H_3D_DISABLE_CHROMA
     1908  static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc];      }
     1909  static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc >= 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc];      }
     1910#else
    17611911  static Int getWinUnitX (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitX[chromaFormatIdc];      }
    17621912  static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc];      }
     1913#endif
    17631914 
    17641915  // structure
     
    23662517  UInt                 m_nARPStepNum;
    23672518  Int         m_aiFirstTRefIdx    [2];
     2519#if HHI_RES_PRED_K0052
     2520  std::vector<Int> m_pocsInCurrRPSs;
     2521#endif
    23682522#endif
    23692523#if H_3D_IC
     
    23722526#endif
    23732527#if H_3D
     2528#if HHI_INTER_COMP_PRED_K0052
     2529  std::vector<Int> m_inCmpRefViewIdcs;
     2530  Bool       m_inCmpPredAvailFlag;
     2531  Bool       m_inCmpPredFlag;
     2532#endif
     2533#if HHI_CAM_PARA_K0052
     2534  Bool       m_cpAvailableFlag;
     2535  Int        m_numViews;
     2536#endif
    23742537  TComPic*   m_ivPicsCurrPoc [2][MAX_NUM_LAYERS]; 
    23752538  Int**      m_depthToDisparityB;
     
    23772540#endif
    23782541#endif
     2542#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2543  Bool      m_bApplyDIS;
     2544#else
    23792545#if H_3D_SINGLE_DEPTH
    23802546  Bool      m_bApplySingleDepthMode;
     2547#endif
    23812548#endif
    23822549#if H_3D_IC
     
    23982565  Bool m_qtPredFlag           ;
    23992566  Bool m_interSdcFlag         ;
     2567#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     2568  Bool m_depthIntraSkipFlag   ;
     2569#else
    24002570  Bool m_intraSingleFlag      ;
    2401 
     2571#endif
    24022572  Int  m_mpiSubPbSize         ;
    24032573  Int  m_subPbSize            ;
     
    24672637  Int       getRefPOC           ( RefPicList e, Int iRefIdx)    { return  m_aiRefPOCList[e][iRefIdx];   }
    24682638#if H_3D
     2639#if HHI_INTER_COMP_PRED_K0052
     2640  Bool      getInCmpPredAvailFlag( )                             { return m_inCmpPredAvailFlag;    }
     2641#if HHI_CAM_PARA_K0052
     2642  Bool      getCpAvailableFlag( )                             { return m_cpAvailableFlag;    }
     2643#endif
     2644  Bool      getInCompPredFlag( )                                 { return m_inCmpPredFlag;         }   
     2645  Void      setInCompPredFlag( Bool b )                          { m_inCmpPredFlag = b;            }   
     2646  Int       getInCmpRefViewIdcs( Int i )                         { return m_inCmpRefViewIdcs  [i]; }
     2647  Int       getNumCurCmpLIds( )                                  { return (Int) m_inCmpRefViewIdcs.size(); }
     2648#endif
    24692649  TComPic*  getIvPic            ( Bool depthFlag, Int viewIndex){ return  m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; }
    24702650#endif
     
    25682748  UInt getTLayer             ()                            { return m_uiTLayer;                      }
    25692749  Void setTLayer             ( UInt uiTLayer )             { m_uiTLayer = uiTLayer;                  }
     2750#if H_MV
     2751  Int getTemporalId          ( )                           { return (Int) m_uiTLayer;                }
     2752#endif
    25702753
    25712754  Void setTLayerInfo( UInt uiTLayer );
     
    26922875  Void      setFirstTRefIdx        ( RefPicList e, Int i )         { m_aiFirstTRefIdx[e]    = i;      }
    26932876  Bool      getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; }
     2877#if HHI_RES_PRED_K0052
     2878  std::vector<Int> getPocsInCurrRPSs()                             { return m_pocsInCurrRPSs; };
     2879#endif
    26942880#endif
    26952881  Void      setIsDepth            ( Bool isDepth )   { m_isDepth = isDepth; }
     
    27002886  Int*      getInvCodedScale      ()  { return m_aaiCodedScale [1]; }
    27012887  Int*      getInvCodedOffset     ()  { return m_aaiCodedOffset[1]; }
     2888#if HHI_CAM_PARA_K0052
     2889  Void      setCpScale( Int j, Int  val ) { m_aaiCodedScale[0][j] = val; }
     2890  Int       getCpScale( Int j ) { return m_aaiCodedScale[0][j]; }
     2891           
     2892  Void      setCpOff( Int j, Int  val ) { m_aaiCodedOffset[0][j] = val; }
     2893  Int       getCpOff( Int j ) { return m_aaiCodedOffset[0][j]; }
     2894           
     2895  Void      setCpInvScale( Int j, Int  val ) { m_aaiCodedScale[1][j] = val; }
     2896  Int       getCpInvScale( Int j ) { return m_aaiCodedScale[1][j]; }
     2897           
     2898  Void      setCpInvOff( Int j, Int  val ) { m_aaiCodedOffset[1][j] = val; }
     2899  Int       getCpInvOff( Int j ) { return m_aaiCodedOffset[1][j]; }
     2900#endif
     2901
    27022902#endif
    27032903#endif
     
    27062906  Void    setDepthToDisparityLUTs();
    27072907
     2908#if HHI_CAM_PARA_K0052
     2909  Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ getVPS()->getVoiInVps( refViewIdx) ]; };
     2910  Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ getVPS()->getVoiInVps( refViewIdx) ]; };
     2911#else
    27082912  Int* getDepthToDisparityB( Int refViewIdx ) { return m_depthToDisparityB[ refViewIdx ]; };
    27092913  Int* getDepthToDisparityF( Int refViewIdx ) { return m_depthToDisparityF[ refViewIdx ]; };
     2914#endif
    27102915#endif
    27112916#if H_3D_IC
     
    28103015#if H_3D
    28113016  // 3D-HEVC tool parameters
     3017#if HHI_INTER_COMP_PRED_K0052
     3018  Void deriveInCmpPredAndCpAvailFlag()
     3019  {
     3020    Int numCurCmpLIds = getIsDepth() ? 1 : getNumActiveRefLayerPics();
     3021    std::vector<Int> curCmpLIds;
     3022    if ( getIsDepth() )
     3023    {
     3024      curCmpLIds.push_back( getLayerId() );
     3025    }
     3026    else
     3027    {
     3028      for (Int i = 0; i < numCurCmpLIds; i++)
     3029      {
     3030        curCmpLIds.push_back( getRefPicLayerId( i ) );
     3031      }
     3032    }
     3033
     3034#if HHI_CAM_PARA_K0052
     3035    m_cpAvailableFlag = true;
     3036    m_inCmpRefViewIdcs.clear();
     3037#endif
     3038    Bool allRefCmpLayersAvailFlag = true;
     3039
     3040    for( Int i = 0; i <= numCurCmpLIds - 1; i++ )
     3041    {     
     3042      m_inCmpRefViewIdcs.push_back( getVPS()->getViewOrderIdx( curCmpLIds[ i ] ));
     3043#if HHI_CAM_PARA_K0052
     3044      if( !getVPS()->getCpPresentFlag( getVPS()->getVoiInVps( getViewIndex() ),  getVPS()->getVoiInVps( m_inCmpRefViewIdcs[ i ] ) ) )
     3045      {
     3046        m_cpAvailableFlag = false;
     3047      }
     3048#endif
     3049      Bool refCmpCurLIdAvailFlag = false;
     3050      if( getVPS()->getViewCompLayerPresentFlag( m_inCmpRefViewIdcs[ i ], !getIsDepth() ) )
     3051      {
     3052        Int j = getVPS()->getLayerIdInVps( getVPS()->getViewCompLayerId( m_inCmpRefViewIdcs[ i ],  !getIsDepth() ) );
     3053        if  ( getVPS()->getDirectDependencyFlag( getVPS()->getLayerIdInVps( getLayerId() ) ,  j ) &&
     3054          getVPS()->getSubLayersVpsMaxMinus1( j ) >= getTemporalId()   &&
     3055          ( getTemporalId() == 0 || getVPS()->getMaxTidIlRefPicsPlus1( j , getVPS()->getLayerIdInVps( getLayerId() ) ) > getTemporalId() )       
     3056          )
     3057        {
     3058          refCmpCurLIdAvailFlag = true;
     3059        }
     3060      }
     3061      if( !refCmpCurLIdAvailFlag )
     3062      {
     3063        allRefCmpLayersAvailFlag = false;
     3064      }
     3065    }
     3066
     3067    if( !allRefCmpLayersAvailFlag )
     3068    {
     3069      m_inCmpPredAvailFlag = false;
     3070    } 
     3071    else
     3072    {
     3073      TComSps3dExtension* sps3dExt = getSPS()->getSps3dExtension();
     3074      if( !getIsDepth() )
     3075      {
     3076        m_inCmpPredAvailFlag = sps3dExt->getViewSynthesisPredFlag( getIsDepth() ) ||
     3077          sps3dExt->getDepthBasedBlkPartFlag( getIsDepth() ) ||
     3078          sps3dExt->getDepthRefinementFlag  ( getIsDepth() );                           
     3079      }
     3080      else
     3081      {
     3082        m_inCmpPredAvailFlag = sps3dExt->getIntraContourFlag( getIsDepth() ) ||
     3083          sps3dExt->getQtPredFlag( getIsDepth() ) ||
     3084          sps3dExt->getMpiFlag( getIsDepth() );                                 
     3085      }
     3086    } 
     3087  };
     3088
     3089#endif
     3090
    28123091  Void init3dToolParameters();   
     3092#if HHI_INTER_COMP_PRED_K0052
     3093  Void checkInCompPredRefLayers()
     3094  {
     3095    if ( getInCompPredFlag() )
     3096    {
     3097      for (Int i = 0; i < getNumCurCmpLIds(); i++ )
     3098      {
     3099        assert( getIvPic(!getIsDepth(), getInCmpRefViewIdcs( i ) ) != NULL );       
     3100        //  It is a requirement of bitstream conformance that there
     3101        //  is a picture in the DPB with PicOrderCntVal equal to the PicOrderCntVal of the current picture,
     3102        //  and a nuh_layer_id value equal to ViewCompLayerId[ inCmpRefViewIdcs[ i ] ][ !DepthFlag ].
     3103      }
     3104    }
     3105  };
     3106
     3107#endif
    28133108  Bool getIvMvPredFlag           ( ) { return m_ivMvPredFlag           ; };
    28143109  Bool getIvMvScalingFlag        ( ) { return m_ivMvScalingFlag        ; };
     
    28223117  Bool getQtPredFlag             ( ) { return m_qtPredFlag             ; };
    28233118  Bool getInterSdcFlag           ( ) { return m_interSdcFlag           ; };
     3119#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     3120  Bool getDepthIntraSkipFlag     ( ) { return m_depthIntraSkipFlag     ; };
     3121#else
    28243122  Bool getIntraSingleFlag        ( ) { return m_intraSingleFlag        ; };
     3123#endif
    28253124
    28263125  Int  getMpiSubPbSize           ( ) { return m_mpiSubPbSize           ; };
  • trunk/source/Lib/TLibCommon/TComTrQuant.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComTrQuant.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComWedgelet.cpp

    r1084 r1179  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2011, ISO/IEC
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    177177}
    178178
     179#if SHARP_DMM_CLEAN_K0042
     180Void TComWedgelet::generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate)
     181{
     182  Int stride = m_uiWidth;
     183  Int sinc, offsetI, offsetJ;
     184 
     185  sinc = 1;
     186  offsetI = ( sinc) < 0 ? stride-1 : 0; // 0
     187  offsetJ = (-sinc) < 0 ? stride-1 : 0; // stride - 1
     188
     189  for (Int y = 0; y < stride; y++)
     190  {
     191    for (Int x = 0; x < stride; x++)
     192    {
     193      Int i = offsetI + sinc * y; // y
     194      Int j = offsetJ - sinc * x; // stride - 1 - x
     195      m_pbPattern[(y * stride) + x] = !rcWedge.m_pbPattern[(j * stride) + i];
     196    }
     197  }
     198  Int blocksize = rcWedge.m_uiWidth * (rcWedge.m_eWedgeRes == HALF_PEL ? 2 : 1);
     199  Int offsetX = (-sinc) < 0 ? blocksize - 1 : 0;
     200  Int offsetY = ( sinc) < 0 ? blocksize - 1 : 0;
     201  m_uhXs = offsetX - sinc * rcWedge.m_uhYs;
     202  m_uhYs = offsetY + sinc * rcWedge.m_uhXs;
     203  m_uhXe = offsetX - sinc * rcWedge.m_uhYe;
     204  m_uhYe = offsetY + sinc * rcWedge.m_uhXe;
     205  m_uhOri = rotate;
     206  m_eWedgeRes = rcWedge.m_eWedgeRes;
     207  m_bIsCoarse = rcWedge.m_bIsCoarse;
     208  m_uiAng = rcWedge.m_uiAng;
     209  m_uiWidth  = rcWedge.m_uiWidth;
     210  m_uiHeight = rcWedge.m_uiHeight;
     211}
     212#endif
     213
    179214Void TComWedgelet::xGenerateWedgePattern()
    180215{
     
    193228  xDrawEdgeLine( uhXs, uhYs, uhXe, uhYe, pbTempPattern, iTempStride );
    194229
     230#if SHARP_DMM_CLEAN_K0042
     231  Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0;
     232  Int endPos = uhYe>>shift;
     233  for (Int y = 0; y <= endPos; y++)
     234  {
     235    for (Int x = 0; x < m_uiWidth && pbTempPattern[(y * m_uiWidth) + x] == 0; x++)
     236    {
     237      pbTempPattern[(y * m_uiWidth) + x] = true;
     238    }
     239  }
     240  for( UInt k = 0; k < (m_uiWidth * m_uiHeight); k++ )
     241  {
     242    m_pbPattern[k] = pbTempPattern[k];
     243  };
     244#else
    195245  switch( m_uhOri )
    196246  {
     
    252302    break;
    253303  }
     304#endif
    254305
    255306  if( pbTempPattern )
     
    294345  for( Int x = x0; x <= x1; x++ )
    295346  {
     347#if SHARP_DMM_CLEAN_K0042
     348    Int shift = (m_eWedgeRes == HALF_PEL) ? 1 : 0;
     349    Int stride = iPatternStride >> shift;
     350    if( steep ) { pbPattern[((x>>shift) * stride) + (y>>shift)] = true; }
     351    else        { pbPattern[((y>>shift) * stride) + (x>>shift)] = true; }
     352#else
    296353    if( steep ) { pbPattern[(x * iPatternStride) + y] = true; }
    297354    else        { pbPattern[(y * iPatternStride) + x] = true; }
     355#endif
    298356
    299357    error += deltaerr;
  • trunk/source/Lib/TLibCommon/TComWedgelet.h

    r1084 r1179  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2011, ISO/IEC
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    124124  Bool*           getScaledPattern(UInt uiWidth);
    125125
     126#if SHARP_DMM_CLEAN_K0042
     127  Void  generateWedgePatternByRotate(const TComWedgelet &rcWedge, Int rotate);
     128#endif
    126129  Void  setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false );
    127130  Void  findClosestAngle();
  • trunk/source/Lib/TLibCommon/TComWeightPrediction.cpp

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComWeightPrediction.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComYuv.cpp

    r1084 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TComYuv.h

    r872 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • trunk/source/Lib/TLibCommon/TypeDef.h

    r1133 r1179  
    44 * granted under this license. 
    55 *
    6 * Copyright (c) 2010-2014, ITU/ISO/IEC
     6* Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    6565#define H_3D          ( HEVC_EXT == 2)
    6666
     67#if H_MV
     68#define SONY_MV_V_CONST_C0078            1   // Control disparity vector search range via configuration file
     69#define H_MV_FIX_CONF_WINDOW             1   
     70#endif
     71
    6772#define NTT_BUG_FIX_TK54    1
    6873#define BUG_FIX_TK65        1
    6974
    7075#define MTK_I0093           1
     76
     77#define RWTH_DBBP_NO_SATD_K0028       1
    7178/////////////////////////////////////////////////////////////////////////////////////////
    7279///////////////////////////////////   MAJOR DEFINES   /////////////////////////////////// 
     
    7885
    7986#if H_3D
     87#define SEC_DEPTH_INTRA_SKIP_MODE_K0033   1   // Depth intra skip mode
     88
     89#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     90#define NEIGHBORING_PIX_AVAILABILITY_FIX  1
     91#endif
     92
     93
    8094#define H_3D_QTLPC                        1   // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068
    8195                                              // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
     
    117131#define SEC_ARP_VIEW_REF_CHECK_J0037      1   // Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1
    118132
     133#define SEC_ARP_REM_ENC_RESTRICT_K0035    1   // Removal of encoder restriction of ARP, JCT3V-K0035
     134
    119135#define H_3D_IC                           1   // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060
    120136                                              // Unifying rounding offset, for IC part, JCT3V-D0135
     
    185201                                              // SEC_SIMP_SHIFTED_DV_I0086     Simplification of Shifted DV candidate, JCT3V-I0086
    186202
    187 
     203#define SEC_SHIFTED_IVMC_POS_K0036        1   // Position Derivation for Shifted-IVMC, JCT3V-K0036
    188204
    189205
    190206#define H_3D_TMVP                         1   // QC_TMVP_C0047
    191207                                              // Sony_M23639
     208#if H_3D_TMVP
     209#define H_3D_TMVP_SCALING_FIX_K0053       1   // QC/CY for K0053
     210#endif
    192211
    193212#define H_3D_DIM                          1   // DIM, Depth intra modes, includes:
     
    239258                                              // SHARP_DLT_SIMP_J0029              1   // DLT(DepthValue2Idx[]) table derivation cleanup
    240259
     260#if !SEC_DEPTH_INTRA_SKIP_MODE_K0033
    241261#define H_3D_SINGLE_DEPTH                 1   // Single depth mode proposed in JCT3V-I0095
    242262                                              // HS_SP_SIMP_J0066
    243263                                              // SINGLE_DEPTH_SIMP_J0115           1
    244264                                              // MTK_SINGLE_DEPTH_VPS_FLAG_J0060   1   // Add VPS control flags and remove slice header control flag for single depth, JCT3V-J0060
     265#endif
    245266
    246267#define H_3D_INTER_SDC                    1   // INTER SDC, Inter simplified depth coding
     
    265286                                              // SEC_DBBP_DMM4_THRESHOLD_I0076     Simplification of threshold derivation for DBBP and DMM4, JCT3V-I0076
    266287                                              // SEC_DBBP_VIEW_REF_CHECK_J0037     1   // Signaling dbbp_flag when the current slice has view reference picture(s), JCT3V-J0037 item4
     288#define HS_DBBP_CLEAN_K0048     1
    267289
    268290#define H_3D_DDD                          1   // Disparity derived depth coding
     
    305327// Fixes
    306328
     329#define FIX_TICKET_95                          1   // pps_scaling_list_ref_layer_id parsing
    307330
    308331#if H_3D
     332#define H_3D_DISABLE_CHROMA                    1
    309333#define HHI_VIEW_ID_LIST_I5_J0107              0
     334#define HHI_INTER_COMP_PRED_K0052              1
     335#define HHI_RES_PRED_K0052                     1
     336#define HHI_CAM_PARA_K0052                     1
     337#define HHI_MOVE_SYN_K0052                     1
     338#define H_3D_ANNEX_SELECTION_FIX               1
     339#define H_3D_TMVP_FIX_TICKET_97                1
     340#define H_3D_DIRECT_DEP_TYPE                   1
     341#define H_3D_FIX_TMVP_SCALING_VIEW_ID          1
    310342#endif
    311343#define H_MV_FIX_REF_LAYER_PIC_FLAG            1
     
    313345#define H_3D_OUTPUT_ACTIVE_TOOLS               0
    314346
     347#if !SEC_DEPTH_INTRA_SKIP_MODE_K0033
    315348///// ***** SINGLE DEPTH MODE *********
    316349#if H_3D_SINGLE_DEPTH
    317350#define SINGLE_DEPTH_MODE_CAND_LIST_SIZE            2 // size of the sample candidate list
    318351
     352#endif
    319353#endif
    320354
     
    350384                                              // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
    351385                                              // LG_ZEROINTRADEPTHRESI_A0087
     386#define SHARP_DMM_CLEAN_K0042             1   // Generate DMM pattern with rotation
    352387
    353388#define TICKET083_IVPFLAG_FIX             1
     389#define SHARP_SUBBLOCK_CLEAN_K0044        1   // Remove unused bipred restriction
     390
    354391#endif
    355392///// ***** VIEW SYNTHESIS PREDICTION *********
Note: See TracChangeset for help on using the changeset viewer.