Changeset 21 in SHVCSoftware for trunk


Ignore:
Timestamp:
29 Jan 2013, 20:23:17 (12 years ago)
Author:
seregin
Message:

REF_IDX_ME_ZEROMV: use zero motion for inter-layer reference picture without fractional ME (L0051)

Location:
trunk/source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/App/TAppEncoder/TAppEncCfg.cpp

    r2 r21  
    787787#endif
    788788
     789#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV
     790  xConfirmPara( REF_IDX_ME_AROUND_ZEROMV && REF_IDX_ME_ZEROMV, "REF_IDX_ME_AROUND_ZEROMV and REF_IDX_ME_ZEROMV cannot be enabled simultaneously");
     791#endif
    789792  // max CU width and height should be power of 2
    790793  UInt ui = m_uiMaxCUWidth;
     
    13091312  printf("EL_RAP_SliceType: %d ", m_elRapSliceBEnabled);
    13101313  printf("REF_IDX_ME_AROUND_ZEROMV:%d ", REF_IDX_ME_AROUND_ZEROMV);
     1314  printf("REF_IDX_ME_ZEROMV: %d", REF_IDX_ME_ZEROMV);
    13111315#else
    13121316  printf("INTRA_BL:%d ", INTRA_BL);
  • trunk/source/Lib/TLibCommon/TComPic.cpp

    r20 r21  
    6868, m_bSpatialEnhLayer( false )
    6969, m_pcFullPelBaseRec( NULL )
    70 #if REF_IDX_ME_AROUND_ZEROMV || ENCODER_FAST_MODE
     70#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE
    7171, m_bIsILR                                (false)
    7272#endif
  • trunk/source/Lib/TLibCommon/TComPic.h

    r20 r21  
    8888  Bool                  m_bSpatialEnhLayer;       // whether current layer is a spatial enhancement layer,
    8989  TComPicYuv*           m_pcFullPelBaseRec;    // upsampled base layer recontruction for difference domain inter prediction
    90 #if REF_IDX_ME_AROUND_ZEROMV || ENCODER_FAST_MODE
     90#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE
    9191  Bool                  m_bIsILR;                 //  Is ILR picture
    9292#endif
     
    118118  TComPicYuv*   getFullPelBaseRec   ()  { return  m_pcFullPelBaseRec;  }
    119119#endif
    120 #if REF_IDX_ME_AROUND_ZEROMV || ENCODER_FAST_MODE
     120#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE
    121121  Void          setIsILR( Bool bIsILR)      {m_bIsILR = bIsILR;}
    122122  Bool          getIsILR()                  {return m_bIsILR;}
  • trunk/source/Lib/TLibCommon/TypeDef.h

    r20 r21  
    5858#if REF_IDX_FRAMEWORK
    5959#define REF_IDX_ME_AROUND_ZEROMV         0      ///< added ME around zero MV for inter-layer reference picture
     60#define REF_IDX_ME_ZEROMV                1      ///< L0051: use zero motion for inter-layer reference picture (without fractional ME)
    6061#define ENCODER_FAST_MODE                1      ///< L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1.
    6162#else
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r11 r21  
    164164        m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true);
    165165#endif
     166#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV
     167        m_cIlpPic[j]->setIsILR(true);
     168#endif
    166169        for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCUsInFrame(); i++)
    167170        {
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r20 r21  
    44704470  setWpScalingDistParam( pcCU, iRefIdxPred, eRefPicList );
    44714471  //  Do integer search
     4472#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV
    44724473#if REF_IDX_ME_AROUND_ZEROMV
    44734474  if( pcCU->getSlice()->getRefPic(eRefPicList, iRefIdxPred )->getIsILR())  //ILR reference pic
     
    44874488    }
    44884489  }
     4490#endif
     4491#if REF_IDX_ME_ZEROMV
     4492  if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getIsILR())  //ILR reference pic
     4493    rcMv.setZero();  //use Mv(0, 0) for integer ME
     4494  else  //non ILR reference pic
     4495  {
     4496    if ( !m_iFastSearch || bBi )
     4497    {
     4498      xPatternSearch      ( pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost );
     4499    }
     4500    else
     4501    {
     4502      rcMv = *pcMvPred;
     4503      xPatternSearchFast  ( pcCU, pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost );
     4504    }
     4505  }
     4506#endif
    44894507#else
    44904508  if ( !m_iFastSearch || bBi )
     
    45034521 
    45044522  {
     4523#if REF_IDX_ME_ZEROMV
     4524    if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getIsILR())  //ILR reference pic
     4525      xPatternSearchFracDIFMv0( pcCU, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost, bBi );
     4526    else    //non ILR reference pic
     4527      xPatternSearchFracDIF( pcCU, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost, bBi );
     4528#else
    45054529    xPatternSearchFracDIF( pcCU, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost
    45064530                          ,bBi
    45074531                          );
     4532#endif
    45084533  }
    45094534 
     
    48874912}
    48884913
     4914#if REF_IDX_ME_ZEROMV
     4915Void TEncSearch::xPatternSearchFracDIFMv0(TComDataCU* pcCU,
     4916                                          TComPattern* pcPatternKey,
     4917                                          Pel* piRefY,
     4918                                          Int iRefStride,
     4919                                          TComMv* pcMvInt,
     4920                                          TComMv& rcMvHalf,
     4921                                          TComMv& rcMvQter,
     4922                                          UInt& ruiCost,
     4923                                          Bool biPred
     4924                                          )
     4925{
     4926  assert(pcMvInt->getHor() == 0 && pcMvInt->getVer() == 0);
     4927  Int         iOffset    = pcMvInt->getHor() + pcMvInt->getVer() * iRefStride;
     4928  m_pcRdCost->setDistParam( pcPatternKey, piRefY + iOffset, iRefStride, 1, m_cDistParam, m_pcEncCfg->getUseHADME() );
     4929  m_pcRdCost->setCostScale ( 2 );
     4930  setDistParamComp(0);
     4931  ruiCost = m_cDistParam.DistFunc( &m_cDistParam );  //SATD
     4932  ruiCost += m_pcRdCost->getCost( pcMvInt->getHor(), pcMvInt->getVer() );  //SATD rdCost
     4933  rcMvHalf.setZero();
     4934  rcMvQter.setZero();
     4935}
     4936#endif
    48894937/** encode residual and calculate rate-distortion for a CU block
    48904938 * \param pcCU
  • trunk/source/Lib/TLibEncoder/TEncSearch.h

    r20 r21  
    471471#endif
    472472 
     473#if REF_IDX_ME_ZEROMV
     474  Void xPatternSearchFracDIFMv0  ( TComDataCU*   pcCU,
     475                                   TComPattern*  pcPatternKey,
     476                                   Pel*          piRefY,
     477                                   Int           iRefStride,
     478                                   TComMv*       pcMvInt,
     479                                   TComMv&       rcMvHalf,
     480                                   TComMv&       rcMvQter,
     481                                   UInt&         ruiCost,
     482                                   Bool          biPred );
     483#endif
    473484  Void xExtDIFUpSamplingH( TComPattern* pcPattern, Bool biPred  );
    474485  Void xExtDIFUpSamplingQ( TComPattern* pcPatternKey, TComMv halfPelRef, Bool biPred );
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r20 r21  
    394394        m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true);
    395395#endif
    396 #if REF_IDX_ME_AROUND_ZEROMV || ENCODER_FAST_MODE
     396#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE
    397397        m_cIlpPic[j]->setIsILR(true);
    398398#endif
Note: See TracChangeset for help on using the changeset viewer.