Changeset 779 in 3DVCSoftware


Ignore:
Timestamp:
20 Jan 2014, 04:09:40 (10 years ago)
Author:
qualcomm
Message:

integration of JCT3V-G0119 by Qualcomm

Location:
branches/HTM-9.3-dev1-Qualcomm
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.3-dev1-Qualcomm/cfg/3D-HEVC/baseCfg_2view+depth.cfg

    r735 r779  
    202202IvMvScaling                         : 1                # Interview motion vector scaling
    203203SubPULog2Size                       : 3                # Log2 of sub-PU size for IvMvPred (2...6)
    204 
     204SubPUMPILog2Size                    : 3             # Log2 of sub-PU size for MPI (3...6)
    205205
    206206#========== depth coding tools ==========
  • branches/HTM-9.3-dev1-Qualcomm/cfg/3D-HEVC/baseCfg_3view+depth.cfg

    r724 r779  
    232232IvMvScaling                         : 1                # Interview motion vector scaling
    233233SubPULog2Size                       : 3                            # Log2 of sub-PU size for IvMvPred (2...6)
    234 
     234SubPUMPILog2Size                    : 3             # Log2 of sub-PU size for MPI (3...6)
    235235
    236236#========== depth coding tools ==========
  • branches/HTM-9.3-dev1-Qualcomm/source/App/TAppEncoder/TAppEncCfg.cpp

    r773 r779  
    513513  ("SubPULog2Size", m_iSubPULog2Size, (Int)3, "Sub-PU size index: 2^n")
    514514#endif
    515 
     515#if QC_SPIVMP_MPI_G0119
     516  ("SubPUMPILog2Size", m_iSubPUMPILog2Size, (Int)3, "Sub-PU MPI size index: 2^n")
     517#endif
    516518#if H_3D_IC
    517519  ("IlluCompEnable",           m_abUseIC, true, "Enable illumination compensation")
     
    15161518  xConfirmPara( m_iSubPULog2Size > 6,                                        "SubPULog2Size must be 6 or smaller.");
    15171519  xConfirmPara( (1<<m_iSubPULog2Size) > m_uiMaxCUWidth,                      "SubPULog2Size must be log2(maxCUSize) or smaller.");
     1520#endif
     1521#if QC_SPIVMP_MPI_G0119
     1522  xConfirmPara( m_iSubPUMPILog2Size < 3,                                        "SubPUMPILog2Size must be 3 or greater.");
     1523  xConfirmPara( m_iSubPUMPILog2Size > 6,                                        "SubPUMPILog2Size must be 6 or smaller.");
     1524  xConfirmPara( ( 1 << m_iSubPUMPILog2Size ) > m_uiMaxCUWidth,                  "SubPUMPILog2Size must be log2(maxCUSize) or smaller.");
    15181525#endif
    15191526#if ADAPTIVE_QP_SELECTION
     
    24742481#endif
    24752482#endif
     2483#if QC_SPIVMP_MPI_G0119
     2484  printf(" SubPUMPILog2Size:%d  " , m_iSubPUMPILog2Size  );
     2485#endif
    24762486#if H_3D_ARP
    24772487  printf(" ARP:%d  ", m_uiUseAdvResPred  );
  • branches/HTM-9.3-dev1-Qualcomm/source/App/TAppEncoder/TAppEncCfg.h

    r773 r779  
    130130  Int                    m_iSubPULog2Size;                   
    131131#endif
     132#endif
     133#if QC_SPIVMP_MPI_G0119
     134  Int                    m_iSubPUMPILog2Size;                   
    132135#endif
    133136#if H_3D_ARP                                                  /// < flag and number of weighting factors in ARP
  • branches/HTM-9.3-dev1-Qualcomm/source/App/TAppEncoder/TAppEncTop.cpp

    r773 r779  
    184184#if H_3D_SPIVMP
    185185    m_cTEncTop.setSubPULog2Size                 (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size   );
     186#endif
     187#if QC_SPIVMP_MPI_G0119
     188    m_cTEncTop.setSubPUMPILog2Size              ( !isDepth ? 0 : m_iSubPUMPILog2Size   );
    186189#endif
    187190#if H_3D_IC
     
    19111914#endif
    19121915  } 
     1916#if QC_SPIVMP_MPI_G0119
     1917  vps.setSubPUMPILog2Size( m_iSubPUMPILog2Size );
     1918#endif
    19131919#if H_3D
    19141920  vps.setIvMvScalingFlag( m_ivMvScalingFlag );   
  • branches/HTM-9.3-dev1-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp

    r773 r779  
    40754075  if( bMPIFlag)
    40764076  {
     4077#if QC_SPIVMP_MPI_G0119
     4078    tmpMV[0].setMvField( cZeroMv, NOT_VALID );
     4079    tmpMV[1].setMvField( cZeroMv, NOT_VALID );
     4080    tmpDir        =  0;
     4081
     4082    TComPic * pcTexPic = m_pcSlice->getTexturePic();
     4083#if H_3D_FCO
     4084    if (pcTexturePic->getReconMark())
     4085    {
     4086#endif   
     4087      TComPicYuv*   pcTexRec = pcTexPic->getPicYuvRec  ();
     4088      UInt          uiPartAddr;
     4089      Int           iWidth, iHeight;
     4090      Int           iCurrPosX, iCurrPosY;
     4091
     4092      this->getPartIndexAndSize( uiPUIdx, uiPartAddr, iWidth, iHeight );
     4093      pcTexRec->getTopLeftSamplePos( this->getAddr(), this->getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
     4094
     4095      Int iPUWidth, iPUHeight, iNumPart, iNumPartLine;
     4096      this->getSPPara(iWidth, iHeight, iNumPart, iNumPartLine, iPUWidth, iPUHeight);
     4097
     4098      for (Int i=0; i<iNumPart; i++)
     4099      {
     4100        puhInterDirSP[i] = 0;
     4101        pcMvFieldSP[2*i].getMv().set(0, 0);
     4102        pcMvFieldSP[2*i+1].getMv().set(0, 0);
     4103        pcMvFieldSP[2*i].setRefIdx(-1);
     4104        pcMvFieldSP[2*i+1].setRefIdx(-1);
     4105      }
     4106
     4107      Int         iTexCUAddr;
     4108      Int         iTexAbsPartIdx;
     4109      TComDataCU* pcTexCU;
     4110      Int iPartition = 0;
     4111      Int iInterDirSaved = 0;
     4112      TComMvField cMvFieldSaved[2];
     4113
     4114      Int iOffsetX = iPUWidth/2;;
     4115      Int iOffsetY = iPUHeight/2;
     4116
     4117      Int         iTexPosX, iTexPosY;
     4118      const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
     4119      for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight)
     4120      {
     4121        for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iPUWidth)
     4122        {
     4123          iTexPosX     = j + iOffsetX;
     4124          iTexPosY     = i + iOffsetY;
     4125          pcTexRec->getCUAddrAndPartIdx( iTexPosX, iTexPosY, iTexCUAddr, iTexAbsPartIdx );
     4126          pcTexCU  = pcTexPic->getCU( iTexCUAddr );
     4127
     4128          if( pcTexCU && !pcTexCU->isIntra(iTexAbsPartIdx) )
     4129          {
     4130            for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ )
     4131            {
     4132              RefPicList  eCurrRefPicList = RefPicList( uiCurrRefListId );
     4133              TComMvField cTexMvField;
     4134              pcTexCU->getMvField( pcTexCU, iTexAbsPartIdx, eCurrRefPicList, cTexMvField );
     4135              Int iValidDepRef = getPic()->isTextRefValid( eCurrRefPicList, cTexMvField.getRefIdx() );
     4136              if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) )
     4137              {
     4138                TComMv cMv = cTexMvField.getMv() + cMvRounding;
     4139                cMv >>=2;
     4140                this->clipMv( cMv );
     4141                pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef);
     4142              }
     4143            }
     4144          }
     4145          puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0);
     4146          if (puhInterDirSP[iPartition] == 0)
     4147          {
     4148            if (iInterDirSaved != 0)
     4149            {
     4150              puhInterDirSP[iPartition] = iInterDirSaved;
     4151              pcMvFieldSP[2*iPartition] = cMvFieldSaved[0];
     4152              pcMvFieldSP[2*iPartition + 1] = cMvFieldSaved[1];
     4153            }
     4154          }
     4155          else
     4156          {
     4157            if (iInterDirSaved ==0)
     4158            {
     4159              pbSPIVMPFlag[iCount] = true;
     4160              tmpDir = puhInterDirSP[iPartition];
     4161              tmpMV[0] = pcMvFieldSP[2*iPartition];
     4162              tmpMV[1] = pcMvFieldSP[2*iPartition+1];
     4163
     4164              if (iPartition != 0)
     4165              {
     4166                for (Int iPart = iPartition-1; iPart >= 0; iPart--)
     4167                {
     4168                  puhInterDirSP[iPart] = puhInterDirSP[iPartition];
     4169                  pcMvFieldSP[2*iPart] = pcMvFieldSP[2*iPartition];
     4170                  pcMvFieldSP[2*iPart + 1] = pcMvFieldSP[2*iPartition + 1];
     4171                }
     4172              }
     4173            }
     4174            iInterDirSaved = puhInterDirSP[iPartition];
     4175            cMvFieldSaved[0] = pcMvFieldSP[2*iPartition];
     4176            cMvFieldSaved[1] = pcMvFieldSP[2*iPartition + 1];
     4177          }
     4178          iPartition ++;
     4179        }
     4180      }
     4181#if H_3D_FCO
     4182    }
     4183#endif
     4184#else
    40774185    UInt uiPartIdxCenter;
    40784186    xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter );   
     
    41314239        tmpDir += ((tmpMV[1].getRefIdx()>=0)?2:0);
    41324240      }
    4133 
     4241#endif
    41344242      if( tmpDir != 0 )
    41354243      {
     
    41904298          }
    41914299        }
    4192 
     4300#if QC_SPIVMP_MPI_G0119
     4301        pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tmpMV[0].getRefIdx());
     4302        pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tmpMV[1].getRefIdx());
     4303#else
    41934304        if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) )
    41944305        {
     
    42024313          }
    42034314        }
     4315#endif
    42044316        puhInterDirNeighbours[iCount] = tmpDir;
    42054317
     
    42104322        iCount ++;
    42114323      }
    4212     }
     4324#if !QC_SPIVMP_MPI_G0119
     4325    }
     4326#endif
    42134327  }
    42144328
     
    43394453    if (bIvMC)
    43404454    {
     4455#if QC_SPIVMP_MPI_G0119
     4456      if(!m_pcSlice->getIsDepth())
     4457#endif
    43414458      pbSPIVMPFlag[iCount] = true;
    43424459      if( ( ivCandDir[0] & 1 ) == 1 )
     
    69457062{
    69467063  Int iSubPUSize = 1<<getSlice()->getVPS()->getSubPULog2Size(getSlice()->getLayerId());
     7064#if QC_SPIVMP_MPI_G0119
     7065  if( getSlice()->getIsDepth() )
     7066  {
     7067    iSubPUSize = 1 << getSlice()->getVPS()->getSubPUMPILog2Size();
     7068  }
     7069#endif
    69477070  iNumSPInOneLine = iPUWidth/iSubPUSize;
    69487071  iNumSPInOneLine = iNumSPInOneLine < 1 ? 1: iNumSPInOneLine;
     
    70387161  //////////sub-PU IvMC///////////
    70397162  ////////////////////////////////
    7040  
     7163#if QC_SPIVMP_MPI_G0119
     7164  if(!m_pcSlice->getIsDepth())
     7165  {
     7166#endif 
    70417167  Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
    70427168  getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
     
    71587284  iCurrPosX  += ( iWidth  >> 1 );
    71597285  iCurrPosY  += ( iHeight >> 1 );
     7286#if QC_SPIVMP_MPI_G0119
     7287 }
     7288#endif
    71607289#endif
    71617290
     
    71657294
    71667295#if H_3D_SPIVMP
     7296#if QC_SPIVMP_MPI_G0119
     7297 if(m_pcSlice->getIsDepth())
     7298 {
     7299   iCurrPosX  += ( iWidth  >> 1 );
     7300   iCurrPosY  += ( iHeight >> 1 );
     7301 }
     7302 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < 2; iLoopCan ++)
     7303#else
    71677304  for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)
     7305#endif
    71687306#else
    71697307  for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
     
    71737311    // iLoopCan == 1 --> IvMCShift
    71747312
    7175 #if !H_3D_SPIVMP
     7313#if !H_3D_SPIVMP || QC_SPIVMP_MPI_G0119
    71767314    Int         iBaseCUAddr;
    71777315    Int         iBaseAbsPartIdx;
     
    71817319    Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 );
    71827320
    7183 #if H_3D_SPIVMP
     7321#if H_3D_SPIVMP && !QC_SPIVMP_MPI_G0119
    71847322    iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
    71857323    iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );
     
    71907328    pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );
    71917329
    7192 #if H_3D_SPIVMP
     7330#if H_3D_SPIVMP && !QC_SPIVMP_MPI_G0119
    71937331    pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
    71947332#else
     
    72487386  }
    72497387#if H_3D_SPIVMP
     7388#if QC_SPIVMP_MPI_G0119
     7389  for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < 2; iLoopCan ++)
     7390#else
    72507391  for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)
     7392#endif
    72517393#else
    72527394  for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
  • branches/HTM-9.3-dev1-Qualcomm/source/Lib/TLibCommon/TComSlice.h

    r773 r779  
    783783#endif
    784784#endif
     785#if QC_SPIVMP_MPI_G0119
     786  Int         m_iSubPUMPILog2Size;
     787#endif
    785788#if H_3D_VSP
    786789  Bool        m_viewSynthesisPredFlag    [ MAX_NUM_LAYERS ];
     
    10571060  Void    setSubPULog2Size(Int layerIdInVps, Int u)    { m_iSubPULog2Size[layerIdInVps] = u;}
    10581061#endif
     1062#endif
     1063#if QC_SPIVMP_MPI_G0119
     1064  Int     getSubPUMPILog2Size( )           { return m_iSubPUMPILog2Size; }
     1065  Void    setSubPUMPILog2Size( Int u )     { m_iSubPUMPILog2Size = u;    }
    10591066#endif
    10601067#if H_3D_VSP
  • branches/HTM-9.3-dev1-Qualcomm/source/Lib/TLibCommon/TypeDef.h

    r773 r779  
    224224#if H_3D_ARP
    225225#define H_3D_ARP_WFNR                     3
     226#endif
     227
     228#if H_3D_SPIVMP
     229#define QC_SPIVMP_MPI_G0119               1 // Sub-PU level MPI merge candidate
    226230#endif
    227231
  • branches/HTM-9.3-dev1-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r773 r779  
    17621762    }
    17631763  }
    1764 
     1764#if QC_SPIVMP_MPI_G0119
     1765  READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3");              pcVPS->setSubPUMPILog2Size( uiCode + 3 );
     1766#endif
    17651767  READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );
    17661768}
  • branches/HTM-9.3-dev1-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp

    r773 r779  
    15551555    }
    15561556  }
     1557#if QC_SPIVMP_MPI_G0119
     1558  WRITE_UVLC( pcVPS->getSubPUMPILog2Size( ) - 3, "log2_sub_PU_MPI_size_minus3");
     1559#endif
    15571560#if H_3D_TMVP
    15581561  WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 ,          "iv_mv_scaling_flag" );
  • branches/HTM-9.3-dev1-Qualcomm/source/Lib/TLibEncoder/TEncCfg.h

    r773 r779  
    411411  Int      m_iSubPULog2Size;
    412412#endif
     413#if QC_SPIVMP_MPI_G0119
     414  Int      m_iSubPUMPILog2Size;
     415#endif
    413416#if H_3D_IC
    414417  Bool      m_bUseIC;
     
    515518  Void       setSubPULog2Size                   (Int u)              { m_iSubPULog2Size = u; }     
    516519#endif
    517 
     520#if QC_SPIVMP_MPI_G0119
     521  Int        getSubPUMPILog2Size            ()               { return m_iSubPUMPILog2Size;}
     522  Void       setSubPUMPILog2Size            (Int u)          { m_iSubPUMPILog2Size = u;   }     
     523#endif
    518524#if H_3D_IC
    519525  Void       setUseIC                       ( Bool bVal )    { m_bUseIC = bVal; }
Note: See TracChangeset for help on using the changeset viewer.