Changeset 226 in 3DVCSoftware for branches/HTM-5.1-dev1-HHI/source/Lib


Ignore:
Timestamp:
24 Jan 2013, 19:24:16 (12 years ago)
Author:
tech
Message:

C0034: No quantization and fast encoder search for DMM delta DC values (HHI_DMM_DELTADC_Q1_C0034)

Location:
branches/HTM-5.1-dev1-HHI/source/Lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev1-HHI/source/Lib/TLibCommon/TComPrediction.cpp

    r210 r226  
    22772277  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    22782278
     2279#if HHI_DMM_DELTADC_Q1_C0034
     2280#else
    22792281  if( bDelta )
    22802282  {
     
    22822284    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    22832285  }
     2286#endif
    22842287
    22852288  // assign wedge pred DCs to prediction
     
    23022305  getWedgePredDCs( pcContourWedge, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    23032306
     2307#if HHI_DMM_DELTADC_Q1_C0034
     2308#else
    23042309  if( bDelta )
    23052310  {
     
    23072312    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    23082313  }
     2314#endif
    23092315
    23102316  // assign wedge pred DCs to prediction
     
    24832489  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    24842490
     2491#if HHI_DMM_DELTADC_Q1_C0034
     2492#else
    24852493  if( bDelta )
    24862494  {
     
    24882496    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    24892497  }
     2498#endif
    24902499
    24912500  // assign wedge pred DCs to prediction
     
    25242533  getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
    25252534
     2535#if HHI_DMM_DELTADC_Q1_C0034
     2536#else
    25262537  if( bDelta )
    25272538  {
     
    25292540    xDeltaDCQuantScaleUp( pcCU, iDeltaDC2 );
    25302541  }
     2542#endif
    25312543
    25322544  // assign wedge pred DCs to prediction
  • branches/HTM-5.1-dev1-HHI/source/Lib/TLibCommon/TypeDef.h

    r225 r226  
    8181#define RWTH_SDC_DLT_B0036                1   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
    8282#define HHIQC_DMMFASTSEARCH_B0039         1   // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3
     83#define HHI_DMM_DELTADC_Q1_C0034          1   // JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values
     84
    8385
    8486///// ***** INTERVIEW MOTION VECTOR PREDICTION *********
  • branches/HTM-5.1-dev1-HHI/source/Lib/TLibEncoder/TEncSearch.cpp

    r210 r226  
    65646564    Int iFullDeltaDC2 = riDeltaDC2;
    65656565
     6566#if HHI_DMM_DELTADC_Q1_C0034
     6567#else
    65666568    xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC1 );
    65676569    xDeltaDCQuantScaleDown( pcCU, iFullDeltaDC2 );
     6570#endif
    65686571
    65696572    Dist uiBestDist     = RDO_DIST_MAX;
     
    65786581    uiDeltaDC2Max += (uiDeltaDC2Max>>1);
    65796582
     6583#if HHI_DMM_DELTADC_Q1_C0034
     6584    // limit search range to [0, IBDI_MAX]
     6585    if( iFullDeltaDC1 <  0 && uiDeltaDC1Max >                abs(iPredDC1) ) { uiDeltaDC1Max =                abs(iPredDC1); }
     6586    if( iFullDeltaDC1 >= 0 && uiDeltaDC1Max > g_uiIBDI_MAX - abs(iPredDC1) ) { uiDeltaDC1Max = g_uiIBDI_MAX - abs(iPredDC1); }
     6587
     6588    if( iFullDeltaDC2 <  0 && uiDeltaDC2Max >                abs(iPredDC2) ) { uiDeltaDC2Max =                abs(iPredDC2); }
     6589    if( iFullDeltaDC2 >= 0 && uiDeltaDC2Max > g_uiIBDI_MAX - abs(iPredDC2) ) { uiDeltaDC2Max = g_uiIBDI_MAX - abs(iPredDC2); }
     6590
     6591    // init dist with original DCs
     6592    assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iDC1, iDC2 );
     6593
     6594    Dist uiOrgDist = RDO_DIST_MAX;
     6595#if SAIT_VSO_EST_A0033
     6596    if ( m_pcRdCost->getUseEstimatedVSD() )
     6597    {         
     6598      TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
     6599      TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
     6600      uiOrgDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
     6601#if LGE_WVSO_A0119
     6602      if ( m_pcRdCost->getUseWVSO() )
     6603      {   
     6604        Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6605        Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6606        Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6607        uiOrgDist = (iDWeight * iD + iVSDWeight * (Dist) uiOrgDist) / ( iDWeight + iVSDWeight);
     6608      }
     6609#endif // LGE_WVSO_A0119
     6610    }
     6611    else       
     6612#endif // SAIT_VSO_EST_A0033
     6613    {       
     6614      uiOrgDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
     6615#if LGE_WVSO_A0119
     6616      if ( m_pcRdCost->getUseWVSO() )
     6617      {   
     6618        Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6619        Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6620        Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6621        uiOrgDist = (iDWeight * iD + iVSOWeight * (Dist) uiOrgDist) / ( iDWeight + iVSOWeight);
     6622      }
     6623#endif // LGE_WVSO_A0119
     6624    }
     6625    uiBestDist     = uiOrgDist;
     6626    uiBestQStepDC1 = abs(iFullDeltaDC1);
     6627    uiBestQStepDC2 = abs(iFullDeltaDC2);
     6628
     6629    // coarse search with step size 4
     6630    for( UInt uiQStepDC1 = 0; uiQStepDC1 < uiDeltaDC1Max; uiQStepDC1 += 4 )
     6631    {
     6632      Int iTestDC1 = Clip( iPredDC1 + ((Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1)) );
     6633      for( UInt uiQStepDC2 = 0; uiQStepDC2 < uiDeltaDC2Max; uiQStepDC2 += 4 )
     6634      {
     6635        Int iTestDC2 = Clip( iPredDC2 + ((Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1)) );
     6636
     6637        assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 );
     6638
     6639        Dist uiAct4Dist = RDO_DIST_MAX;
     6640#if SAIT_VSO_EST_A0033
     6641        if ( m_pcRdCost->getUseEstimatedVSD() )
     6642        {         
     6643          TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
     6644          TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
     6645          uiAct4Dist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
     6646#if LGE_WVSO_A0119
     6647          if ( m_pcRdCost->getUseWVSO() )
     6648          {   
     6649            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6650            Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6651            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6652            uiAct4Dist = (iDWeight * iD + iVSDWeight * (Dist) uiAct4Dist) / ( iDWeight + iVSDWeight);
     6653          }
     6654#endif // LGE_WVSO_A0119
     6655        }
     6656        else       
     6657#endif // SAIT_VSO_EST_A0033
     6658        {       
     6659          uiAct4Dist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
     6660#if LGE_WVSO_A0119
     6661          if ( m_pcRdCost->getUseWVSO() )
     6662          {   
     6663            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6664            Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6665            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6666            uiAct4Dist = (iDWeight * iD + iVSOWeight * (Dist) uiAct4Dist) / ( iDWeight + iVSOWeight);
     6667          }
     6668#endif // LGE_WVSO_A0119
     6669        }
     6670
     6671        if( uiAct4Dist < uiBestDist || uiBestDist == RDO_DIST_MAX )
     6672        {
     6673          uiBestDist     = uiAct4Dist;
     6674          uiBestQStepDC1 = uiQStepDC1;
     6675          uiBestQStepDC2 = uiQStepDC2;
     6676        }
     6677      }
     6678    }
     6679
     6680    // refinement +-3
     6681    for( UInt uiQStepDC1 = (UInt)max(0, ((Int)uiBestQStepDC1-3)); uiQStepDC1 <= (uiBestQStepDC1+3); uiQStepDC1++ )
     6682    {
     6683      Int iTestDC1 = Clip( iPredDC1 + ((Int)(uiQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1)) );
     6684      for( UInt uiQStepDC2 = (UInt)max(0, ((Int)uiBestQStepDC2-3)); uiQStepDC2 <= (uiBestQStepDC2+3); uiQStepDC2++ )
     6685      {
     6686        Int iTestDC2 = Clip( iPredDC2 + ((Int)(uiQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1)) );
     6687
     6688        assignWedgeDCs2Pred( pcWedgelet, piPredic, uiStride, iTestDC1, iTestDC2 );
     6689
     6690        Dist uiActDist = RDO_DIST_MAX;
     6691#if SAIT_VSO_EST_A0033
     6692        if ( m_pcRdCost->getUseEstimatedVSD() )
     6693        {         
     6694          TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
     6695          TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
     6696          uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
     6697#if LGE_WVSO_A0119
     6698          if ( m_pcRdCost->getUseWVSO() )
     6699          {   
     6700            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6701            Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6702            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6703            uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight);
     6704          }
     6705#endif // LGE_WVSO_A0119
     6706        }
     6707        else       
     6708#endif // SAIT_VSO_EST_A0033
     6709        {       
     6710          uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
     6711#if LGE_WVSO_A0119
     6712          if ( m_pcRdCost->getUseWVSO() )
     6713          {   
     6714            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6715            Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6716            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6717            uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight);
     6718          }
     6719#endif // LGE_WVSO_A0119
     6720        }
     6721
     6722        if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
     6723        {
     6724          uiBestDist     = uiActDist;
     6725          uiBestQStepDC1 = uiQStepDC1;
     6726          uiBestQStepDC2 = uiQStepDC2;
     6727        }
     6728      }
     6729    }
     6730#else
    65806731    for( UInt uiQStepDC1 = 1; uiQStepDC1 <= uiDeltaDC1Max; uiQStepDC1++  )
    65816732    {
     
    66336784      }
    66346785    }
    6635 
     6786#endif
    66366787    iFullDeltaDC1 = (Int)(uiBestQStepDC1) * (Int)(( iFullDeltaDC1 < 0 ) ? -1 : 1);
    66376788    iFullDeltaDC2 = (Int)(uiBestQStepDC2) * (Int)(( iFullDeltaDC2 < 0 ) ? -1 : 1);
     6789#if HHI_DMM_DELTADC_Q1_C0034
     6790#else
    66386791    xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC1 );
    66396792    xDeltaDCQuantScaleUp( pcCU, iFullDeltaDC2 );
     6793#endif
    66406794    riDeltaDC1 = iFullDeltaDC1;
    66416795    riDeltaDC2 = iFullDeltaDC2;
     
    66436797#endif
    66446798
     6799#if HHI_DMM_DELTADC_Q1_C0034
     6800#else
    66456801  xDeltaDCQuantScaleDown( pcCU, riDeltaDC1 );
    66466802  xDeltaDCQuantScaleDown( pcCU, riDeltaDC2 );
     6803#endif
    66476804}
    66486805#endif
Note: See TracChangeset for help on using the changeset viewer.