Changeset 821 in 3DVCSoftware


Ignore:
Timestamp:
5 Feb 2014, 12:28:40 (10 years ago)
Author:
rwth
Message:
  • fixed bracketing
  • removed global variable
Location:
branches/HTM-9.3-dev1-RWTH
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.cpp

    r817 r821  
    24322432  // DBBP is a texture coding tool
    24332433  if( getSlice()->getIsDepth() )
     2434  {
    24342435    return NULL;
     2436  }
    24352437 
    24362438#if H_3D_FCO
     
    24542456   
    24552457    if( baseDepthPic == NULL || baseDepthPic->getPicYuvRec() == NULL )
     2458    {
    24562459      return NULL;
     2460    }
    24572461   
    24582462    depthPicYuv   = baseDepthPic->getPicYuvRec();
     
    59395943#if H_3D_DBBP
    59405944  if( getDBBPFlag(0) )
     5945  {
    59415946    return true;
     5947  }
    59425948#endif
    59435949
  • branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.cpp

    r820 r821  
    651651      // SIZE_Nx2N
    652652      if(x<uiHalfSize)  // left
     653      {
    653654        matchedPartSum[0][ucSegment]++;
     655      }
    654656      else  // right
     657      {
    655658        matchedPartSum[0][1-ucSegment]++;
     659      }
    656660     
    657661      // SIZE_2NxN
    658662      if(y<uiHalfSize)  // top
     663      {
    659664        matchedPartSum[1][ucSegment]++;
     665      }
    660666      else  // bottom
     667      {
    661668        matchedPartSum[1][1-ucSegment]++;
     669      }
    662670     
    663671      if( bAMPAvail )
     
    665673        // SIZE_2NxnU
    666674        if(y<uiQuarterSize)  // top (1/4)
     675        {
    667676          matchedPartSum[2][ucSegment]++;
     677        }
    668678        else  // bottom (3/4)
     679        {
    669680          matchedPartSum[2][1-ucSegment]++;
     681        }
    670682       
    671683        // SIZE_2NxnD
    672684        if(y<(uiQuarterSize*3))  // top (3/4)
     685        {
    673686          matchedPartSum[3][ucSegment]++;
     687        }
    674688        else  // bottom (1/4)
     689        {
    675690          matchedPartSum[3][1-ucSegment]++;
     691        }
    676692       
    677693        // SIZE_nLx2N
    678694        if(x<uiQuarterSize)  // left (1/4)
     695        {
    679696          matchedPartSum[4][ucSegment]++;
     697        }
    680698        else  // right (3/4)
     699        {
    681700          matchedPartSum[4][1-ucSegment]++;
     701        }
    682702       
    683703        // SIZE_nRx2N
    684704        if(x<(uiQuarterSize*3))  // left (3/4)
     705        {
    685706          matchedPartSum[5][ucSegment]++;
     707        }
    686708        else  // right (1/4)
     709        {
    687710          matchedPartSum[5][1-ucSegment]++;
     711        }
    688712      }
    689713    }
     
    730754     
    731755      if( depthPel > uiMaxDepth )
     756      {
    732757        uiMaxDepth = depthPel;
     758      }
    733759      if( depthPel < uiMinDepth )
     760      {
    734761        uiMinDepth = depthPel;
     762      }
    735763    }
    736764   
     
    741769  // don't generate mask for blocks with small depth range (encoder decision)
    742770  if( uiMaxDepth - uiMinDepth < 10 )
     771  {
    743772    return false;
     773  }
    744774 
    745775  AOF(uiWidth==uiHeight);
     
    764794     
    765795      if( bInvertMask )
     796      {
    766797        ucSegment = 1-ucSegment;
     798      }
    767799     
    768800      // count pixels for each segment
     
    782814  UInt uiMinPixPerSegment = (uiWidth*uiHeight) >> 3;
    783815  if( !( uiSumPix[0] > uiMinPixPerSegment && uiSumPix[1] > uiMinPixPerSegment ) )
     816  {
    784817    return false;
     818  }
    785819 
    786820  // all good
  • branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComRdCost.cpp

    r816 r821  
    327327 
    328328#if H_3D_DBBP
    329   if( g_bTestVirtualParts )
     329  if( m_bUseMask )
    330330  {
    331331    if( eDFunc >= DF_SSE && eDFunc <= DF_SSE16N )
     332    {
    332333      rcDistParam.DistFunc = TComRdCost::xGetMaskedSSE;
     334    }
    333335    else if( eDFunc >= DF_SAD && eDFunc <= DF_SADS16N )
     336    {
    334337      rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD;
     338    }
    335339    else if( eDFunc >= DF_HADS && eDFunc <= DF_HADS16N )
     340    {
    336341      rcDistParam.DistFunc = TComRdCost::xGetMaskedHADs;
     342    }
    337343    else if( eDFunc >= DF_VSD && eDFunc <= DF_VSD16N )
     344    {
    338345      rcDistParam.DistFunc = TComRdCost::xGetMaskedVSD;
     346    }
    339347    else if( eDFunc >= DF_SAD12 && eDFunc <= DF_SADS48 )
     348    {
    340349      rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD;
     350    }
    341351  }
    342352#endif
     
    377387 
    378388#if H_3D_DBBP
    379   if( g_bTestVirtualParts )
     389  if( m_bUseMask )
    380390  {
    381391    rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD;
     
    436446 
    437447#if H_3D_DBBP
    438   if( g_bTestVirtualParts )
    439   {
    440     if( !bHADME )
    441       rcDistParam.DistFunc = TComRdCost::xGetMaskedSAD;
    442     else
    443       rcDistParam.DistFunc = TComRdCost::xGetMaskedHADs;
     448  if( m_bUseMask )
     449  {
     450    rcDistParam.DistFunc = (bHADME)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD;
    444451  }
    445452#endif
     
    468475 
    469476#if H_3D_DBBP
    470   if( g_bTestVirtualParts )
    471   {
    472     if( !bHadamard )
    473       rcDP.DistFunc = TComRdCost::xGetMaskedSAD;
    474     else
    475       rcDP.DistFunc = TComRdCost::xGetMaskedHADs;
     477  if( m_bUseMask )
     478  {
     479    rcDP.DistFunc = (bHadamard)?TComRdCost::xGetMaskedHADs:TComRdCost::xGetMaskedSAD;
    476480  }
    477481#endif
     
    735739    {
    736740      if( piOrg[n] != DBBP_INVALID_SHORT )
     741      {
    737742        uiSum += abs( piOrg[n] - piCur[n] );
     743      }
    738744    }
    739745    piOrg += iStrideOrg;
     
    775781        {
    776782          if( piOrg[x] != DBBP_INVALID_SHORT )
     783          {
    777784            uiSum += xCalcHADs8x8( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );
     785          }
    778786        }
    779787        piOrg += iOffsetOrg;
     
    791799        {
    792800          if( piOrg[x] != DBBP_INVALID_SHORT )
     801          {
    793802            uiSum += xCalcHADs16x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );
     803          }
    794804        }
    795805        piOrg += iOffsetOrg;
     
    806816        {
    807817          if( piOrg[x] != DBBP_INVALID_SHORT )
     818          {
    808819            uiSum += xCalcHADs4x16( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );
     820          }
    809821        }
    810822        piOrg += iOffsetOrg;
     
    823835        {
    824836          if( piOrg[x] != DBBP_INVALID_SHORT )
     837          {
    825838            uiSum += xCalcHADs4x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );
     839          }
    826840        }
    827841        piOrg += iOffsetOrg;
     
    838852        {
    839853          if( piOrg[x] != DBBP_INVALID_SHORT )
     854          {
    840855            uiSum += xCalcHADs2x2( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep );
     856          }
    841857        }
    842858        piOrg += iOffsetOrg;
  • branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComRdCost.h

    r816 r821  
    184184#endif
    185185 
     186#if H_3D_DBBP
     187  Bool                    m_bUseMask;
     188#endif
     189 
    186190public:
    187191  TComRdCost();
     
    229233  Void    setDistParam( TComPattern* pcPatternKey, Pel* piRefY, Int iRefStride, Int iStep, DistParam& rcDistParam, Bool bHADME=false );
    230234  Void    setDistParam( DistParam& rcDP, Int bitDepth, Pel* p1, Int iStride1, Pel* p2, Int iStride2, Int iWidth, Int iHeight, Bool bHadamard = false );
     235#endif
     236 
     237#if H_3D_DBBP
     238  Void    setUseMask(Bool b) { m_bUseMask = b; }
    231239#endif
    232240 
  • branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComRom.cpp

    r816 r821  
    106106// ====================================================================================================================
    107107
    108 #if H_3D_DBBP
    109 Bool g_bTestVirtualParts;
    110 #endif
    111 
    112108UInt g_uiMaxCUWidth  = MAX_CU_SIZE;
    113109UInt g_uiMaxCUHeight = MAX_CU_SIZE;
  • branches/HTM-9.3-dev1-RWTH/source/Lib/TLibCommon/TComRom.h

    r816 r821  
    7272// ====================================================================================================================
    7373
    74 #if H_3D_DBBP
    75 extern       Bool   g_bTestVirtualParts;
    76 #endif
    77 
    7874// flexible conversion from relative to absolute index
    7975extern       UInt   g_auiZscanToRaster[ MAX_NUM_SPU_W*MAX_NUM_SPU_W ];
  • branches/HTM-9.3-dev1-RWTH/source/Lib/TLibEncoder/TEncCu.cpp

    r820 r821  
    24382438 
    24392439  if( !bValidMask )
     2440  {
    24402441    return;
     2442  }
    24412443 
    24422444  // find optimal motion/disparity vector for each segment
     
    24582460   
    24592461    // do motion estimation for this segment
    2460     g_bTestVirtualParts = true;
     2462    m_pcRdCost->setUseMask(true);
    24612463    rpcTempCU->getDBBPTmpData()->eVirtualPartSize = eVirtualPartSize;
    24622464    rpcTempCU->getDBBPTmpData()->uiVirtualPartIndex = uiSegment;
    24632465    m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, false, bUseMRG );
    2464     g_bTestVirtualParts = false;
     2466    m_pcRdCost->setUseMask(false);
    24652467   
    24662468    // extract motion parameters of full block for this segment
Note: See TracChangeset for help on using the changeset viewer.