Changeset 1256 in 3DVCSoftware


Ignore:
Timestamp:
12 Jun 2015, 18:09:57 (10 years ago)
Author:
liu
Message:

-Integration of QTL

Location:
branches/HTM-14.1-update-dev2-Orange
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev2-Orange/source/Lib/TLibCommon/TComPic.cpp

    r1200 r1256  
    7575    m_apcPicYuv[i]      = NULL;
    7676  }
    77 #if H_3D_QTLPC
     77#if NH_3D_QTLPC
    7878  m_bReduceBitsQTL    = 0;
    7979#endif
  • branches/HTM-14.1-update-dev2-Orange/source/Lib/TLibCommon/TComPic.h

    r1200 r1256  
    9494#endif
    9595#endif
    96 #if H_3D_QTLPC
     96#if NH_3D_QTLPC
    9797  Bool                  m_bReduceBitsQTL;
    9898#endif
     
    132132#endif
    133133#endif
    134 #if H_3D_QTLPC
     134#if NH_3D_QTLPC
    135135  Bool          getReduceBitsFlag ()             { return m_bReduceBitsQTL;     }
    136136  Void          setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag;    }
  • branches/HTM-14.1-update-dev2-Orange/source/Lib/TLibCommon/TComRdCost.cpp

    r1225 r1256  
    602602
    603603  cDtParam.bitDepth   = bitDepth;
     604
     605#if NH_3D_IC_FIX
     606  cDtParam.bUseIC       = false;
     607#endif
     608#if H_3D_INTER_SDC_FIX
     609  cDtParam.bUseSDCMRSAD = false;
     610#endif
    604611
    605612  Dist dist = cDtParam.DistFunc( &cDtParam );
  • branches/HTM-14.1-update-dev2-Orange/source/Lib/TLibCommon/TComSlice.h

    r1225 r1256  
    27072707  TComPic*                    getIvPic( Bool depthFlag, Int viewIndex) const         { return  m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ];    }
    27082708#endif                                                                                                                                         
    2709 #if H_3D                                                                                                                                             
     2709#if NH_3D                                                                                                                                             
    27102710  TComPic*                    getTexturePic       ()                                 { return  m_ivPicsCurrPoc[0][ m_viewIndex ];                    }
    27112711#endif                                                                                                                                               
  • branches/HTM-14.1-update-dev2-Orange/source/Lib/TLibCommon/TypeDef.h

    r1226 r1256  
    8585                                              // SEC_IC_NEIGHBOR_CLIP_I0080    // Clipping of neighboring sample position, JCT3V-I0080
    8686                                              // LGE_CHROMA_IC_J0050_J0034
     87
     88#define NH_3D_IC_FIX                      1   // Fix uninitialized value in cDtParam.bUseIC (it happened on intra block)
    8789#define NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC   1   // Full Pel Interpolation for Depth, HHI_FULL_PEL_DEPTH_MAP_MV_ACC
    8890
     91#define NH_3D_QTLPC                       1   // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068
     92                                              // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
     93                                              // MTK_TEX_DEP_PAR_G0055 Texture-partition-dependent depth partition. JCT3V-G0055
    8994
    9095#endif
     
    245250                                              // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding
    246251                                              // SEC_INTER_SDC_G0101 Improved inter SDC with multiple DC candidates
     252#define H_3D_INTER_SDC_FIX                1
    247253#define H_3D_SPIVMP                       1   // H_3D_SPIVMP JCT3V-F0110: Sub-PU level inter-view motion prediction
    248254                                              // SEC_SPIVMP_MCP_SIZE_G0077, Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077
  • branches/HTM-14.1-update-dev2-Orange/source/Lib/TLibDecoder/TDecSbac.cpp

    r1225 r1256  
    721721
    722722  UInt uiSymbol;
    723 #if H_3D_QTLPC
     723#if NH_3D_QTLPC
    724724  Bool bParseSplitFlag    = true;
    725725  Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
     
    736736#endif
    737737  {
    738     TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     738    TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr());
    739739    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
    740740    bParseSplitFlag         = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth);
     
    751751  DTRACE_CABAC_T( "\tSplitFlag\n" )
    752752#endif
    753 #if H_3D_QTLPC
     753#if NH_3D_QTLPC
    754754  }
    755755  else
     
    783783  assert ( pcCU->getSlice()->getSPS()->getLog2DiffMaxMinCodingBlockSize() == log2DiffMaxMinCodingBlockSize);
    784784
    785 #if H_3D_QTLPC
     785#if NH_3D_QTLPC
    786786  Bool bParsePartSize    = true;
    787787
     
    802802#endif
    803803  {
    804     TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     804    TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr());
    805805    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
    806806    if(pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth )
     
    819819  if ( pcCU->isIntra( uiAbsPartIdx ) )
    820820  {
    821 #if H_3D_QTLPC
     821#if NH_3D_QTLPC
    822822    if(bParsePartSize)
    823823    {
     
    832832    }
    833833    eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN;
    834 #if H_3D_QTLPC
     834#if NH_3D_QTLPC
    835835    }
    836836#endif
     
    850850  else
    851851  {
    852 #if H_3D_QTLPC
     852#if NH_3D_QTLPC
    853853    if(bParsePartSize)
    854854    {
     
    894894      }
    895895    }
    896 #if H_3D_QTLPC
     896#if NH_3D_QTLPC
    897897      }
    898898      else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD)
    899899      {
    900900        UInt uiMaxNumBits = 1;
    901         if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     901        if ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )
    902902        {
    903903          uiMaxNumBits ++;
     
    905905        for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
    906906        {
    907           m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
     907          m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) );
    908908          if ( uiSymbol )
    909909          {
     
    913913        }
    914914        eMode = (PartSize) uiMode;
    915         if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==1 )
     915        if(uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==1 )
    916916        {
    917917          eMode = SIZE_2NxN;
    918918        }
    919         else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0  && uiSymbol==0)
     919        else if (uiMode && (( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )==0)  && uiSymbol==0)
    920920        {
    921921          eMode = SIZE_2NxN;
    922922        }
    923         else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==0)
    924         {
    925           m_pcTDecBinIf->decodeBinEP(uiSymbol);
     923        else if (uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==0)
     924        {
     925          m_pcTDecBinIf->decodeBinEP(uiSymbol RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype));
    926926          eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
    927927        }
     
    930930      {
    931931        UInt uiMaxNumBits = 1;
    932         if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     932        if (  ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )
    933933        {
    934934          uiMaxNumBits ++;
     
    936936        for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
    937937        {
    938           m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
     938          m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype));
    939939          if ( uiSymbol )
    940940          {
     
    944944        }
    945945        eMode = (PartSize) uiMode;
    946         if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==1 )
     946        if(uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==1 )
    947947        {
    948948          eMode = SIZE_Nx2N;
    949949        }
    950         else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0  && uiSymbol==0)
     950        else if (uiMode && (( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )==0)  && uiSymbol==0)
    951951        {
    952952          eMode = SIZE_Nx2N;
    953953        }
    954         else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==0)
    955         {
    956           m_pcTDecBinIf->decodeBinEP(uiSymbol);
     954        else if (uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==0)
     955        {
     956          m_pcTDecBinIf->decodeBinEP(uiSymbol RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype));
    957957          eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
    958958        }
     
    966966      DTRACE_CU("part_mode", eMode )
    967967#endif
    968 #if H_3D_QTLPC
     968#if NH_3D_QTLPC
    969969    }
    970970#endif
  • branches/HTM-14.1-update-dev2-Orange/source/Lib/TLibEncoder/TEncCu.cpp

    r1225 r1256  
    413413
    414414
    415 #if H_3D_QTLPC
     415#if NH_3D_QTLPC
    416416  Bool  bLimQtPredFalg    = pcPic->getSlice(0)->getQtPredFlag();
    417417  TComPic *pcTexture      = rpcBestCU->getSlice()->getTexturePic();
     
    429429  m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getCtuRsAddr(), rpcBestCU->getZorderIdxInCtu() );
    430430
    431 #if H_3D_QTLPC 
     431#if NH_3D_QTLPC 
    432432  Bool    bTrySplit     = true;
    433433  Bool    bTrySplitDQP  = true;
     
    529529      }
    530530
    531 #if H_3D_QTLPC
     531#if NH_3D_QTLPC
    532532      bTrySplit    = true;
    533533#endif
     
    547547
    548548      rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    549 #if H_3D_QTLPC
     549#if NH_3D_QTLPC
    550550      //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU
    551551#if H_3D_FCO
     
    555555#endif
    556556      {
    557         TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU
    558         UInt uiCUIdx            = rpcBestCU->getZorderIdxInCU();
     557        TComDataCU* pcTextureCU = pcTexture->getCtu( rpcBestCU->getCtuRsAddr() ); //Corresponding texture LCU
     558        UInt uiCUIdx            = rpcBestCU->getZorderIdxInCtu();
    559559        assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); //Depth cannot be more partitioned than the texture.
    560560        if (pcTextureCU->getDepth(uiCUIdx) > uiDepth || pcTextureCU->getPartitionSize(uiCUIdx) == SIZE_NxN) //Texture was split.
     
    713713#endif
    714714      }
    715 #if H_3D_QTLPC     
     715#if NH_3D_QTLPC     
    716716      if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg ))
    717717      {
     
    768768          {
    769769            if( uiDepth == sps.getLog2DiffMaxMinCodingBlockSize() && doNotBlockPu
    770 #if H_3D_QTLPC
     770#if NH_3D_QTLPC
    771771                && bTrySplit
    772772#endif
     
    788788
    789789          if(doNotBlockPu
    790 #if H_3D_QTLPC
     790#if NH_3D_QTLPC
    791791            && bTryNx2N
    792792#endif
     
    809809          }
    810810          if(doNotBlockPu
    811 #if H_3D_QTLPC
     811#if NH_3D_QTLPC
    812812            && bTry2NxN
    813813#endif
     
    850850            {
    851851              if(doNotBlockPu
    852 #if H_3D_QTLPC
     852#if NH_3D_QTLPC
    853853                && bTry2NxN
    854854#endif
     
    870870              }
    871871              if(doNotBlockPu
    872 #if H_3D_QTLPC
     872#if NH_3D_QTLPC
    873873                && bTry2NxN
    874874#endif
     
    896896            {
    897897              if(doNotBlockPu
    898 #if H_3D_QTLPC
     898#if NH_3D_QTLPC
    899899                && bTry2NxN
    900900#endif
     
    918918              }
    919919              if(doNotBlockPu
    920 #if H_3D_QTLPC
     920#if NH_3D_QTLPC
    921921                && bTry2NxN
    922922#endif
     
    945945            {
    946946              if(doNotBlockPu
    947 #if H_3D_QTLPC
     947#if NH_3D_QTLPC
    948948                && bTryNx2N
    949949#endif
     
    966966              }
    967967              if(doNotBlockPu
    968 #if H_3D_QTLPC
     968#if NH_3D_QTLPC
    969969                && bTryNx2N
    970970#endif
     
    986986            {
    987987              if(doNotBlockPu
    988 #if H_3D_QTLPC
     988#if NH_3D_QTLPC
    989989                && bTryNx2N
    990990#endif
     
    10061006              }
    10071007              if(doNotBlockPu
    1008 #if H_3D_QTLPC
     1008#if NH_3D_QTLPC
    10091009                && bTryNx2N
    10101010#endif
     
    10271027
    10281028#else
    1029 #if H_3D_QTLPC
     1029#if NH_3D_QTLPC
    10301030            if (bTry2NxN)
    10311031            {
     
    10421042              rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10431043#endif
    1044 #if H_3D_QTLPC
     1044#if NH_3D_QTLPC
    10451045            }
    10461046            if (bTryNx2N)
     
    10571057              rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10581058#endif
    1059 #if H_3D_QTLPC
     1059#if NH_3D_QTLPC
    10601060            }
    10611061#endif
     
    11151115          if( uiDepth == sps.getLog2DiffMaxMinCodingBlockSize() )
    11161116          {
    1117 #if H_3D_QTLPC //Try IntraNxN
     1117#if NH_3D_QTLPC //Try IntraNxN
    11181118              if(bTrySplit)
    11191119              {
     
    11311131              rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    11321132            }
    1133 #if H_3D_QTLPC
     1133#if NH_3D_QTLPC
    11341134              }
    11351135#endif
     
    12471247
    12481248    // further split
    1249 #if H_3D_QTLPC
    1250     if( bSubBranch && bTrySplitDQP && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )
     1249#if NH_3D_QTLPC
     1250
     1251    if( bSubBranch && bTrySplitDQP && uiDepth < sps.getLog2DiffMaxMinCodingBlockSize() )
    12511252#else
    12521253    if( bSubBranch && uiDepth < sps.getLog2DiffMaxMinCodingBlockSize() )
  • branches/HTM-14.1-update-dev2-Orange/source/Lib/TLibEncoder/TEncSbac.cpp

    r1225 r1256  
    645645{
    646646  PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
    647 #if H_3D_QTLPC
     647#if NH_3D_QTLPC
    648648  Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
    649649  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
     
    662662#endif
    663663  {
    664     TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
    665     UInt uiCUIdx            = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU();
     664    TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr());
     665    UInt uiCUIdx            = (pcCU->getZorderIdxInCtu() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCtu();
    666666    assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth);
    667667    if(pcTextureCU->getDepth(uiCUIdx) == uiDepth )
     
    694694  DTRACE_CU("part_mode", eSize )
    695695#endif       
    696 #if H_3D_QTLPC
     696#if NH_3D_QTLPC
    697697    if (depthDependent==false || uiTexturePart == SIZE_NxN|| uiTexturePart == SIZE_2Nx2N)
    698698    {
     
    768768    }
    769769  }
    770 #if H_3D_QTLPC
     770#if NH_3D_QTLPC
    771771    }
    772772    else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD)
     
    785785        {
    786786          m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) );
    787           if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     787          if (  pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize )
    788788          {     
    789789            m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 1) );
     
    820820        {
    821821          m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) );
    822           if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     822          if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize )
    823823          {     
    824824            m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 1) );
     
    10261026
    10271027  assert( uiCtx < 3 );
    1028 #if H_3D_QTLPC
     1028#if NH_3D_QTLPC
    10291029  Bool bCodeSplitFlag    = true;
    10301030
     
    10431043#endif
    10441044  {
    1045     TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
    1046     UInt uiCUIdx            = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU();
     1045    TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr());
     1046    UInt uiCUIdx            = (pcCU->getZorderIdxInCtu() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCtu();
    10471047    assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth);
    10481048    bCodeSplitFlag          = (pcTextureCU->getDepth(uiCUIdx) > uiDepth);
  • branches/HTM-14.1-update-dev2-Orange/source/Lib/TLibEncoder/TEncSearch.cpp

    r1226 r1256  
    28942894      const Bool bUseHadamard=pcCU->getCUTransquantBypass(0) == 0;
    28952895      m_pcRdCost->setDistParam(distParam, sps.getBitDepth(CHANNEL_TYPE_LUMA), piOrg, uiStride, piPred, uiStride, puRect.width, puRect.height, bUseHadamard);
     2896
     2897#if NH_3D_IC_FIX
     2898      distParam.bUseIC = false;
     2899#endif
     2900#if H_3D_INTER_SDC_FIX
     2901      distParam.bUseSDCMRSAD = false;
     2902#endif
    28962903      distParam.bApplyWeight = false;
    28972904      for( Int modeIdx = 0; modeIdx < numModesAvailable; modeIdx++ )
  • branches/HTM-14.1-update-dev2-Orange/source/Lib/TLibEncoder/TEncSlice.cpp

    r1225 r1256  
    11941194    }
    11951195
    1196 #if H_3D_QTLPC
    1197     rpcPic->setReduceBitsFlag(true);
     1196#if NH_3D_QTLPC
     1197    pcPic->setReduceBitsFlag(true);
    11981198#endif
    11991199    if ( pcSlice->getSPS()->getUseSAO() )
     
    12661266      }
    12671267    }
    1268 #if H_3D_QTLPC
    1269     rpcPic->setReduceBitsFlag(false);
     1268#if NH_3D_QTLPC
     1269    pcPic->setReduceBitsFlag(false);
    12701270#endif
    12711271  } // CTU-loop
Note: See TracChangeset for help on using the changeset viewer.