Ignore:
Timestamp:
13 Jul 2013, 15:51:26 (11 years ago)
Author:
tech
Message:

Update to HM 11.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSearch.cpp

    r532 r537  
    10671067    }
    10681068#endif
    1069 
    10701069    // save prediction
    10711070    if(default0Save1Load2 == 1)
     
    14271426#if H_3D_DIM_ENC
    14281427                                , Bool        zeroResi
    1429 #endif
    1430                                 )
     1428#endif                               
     1429)
    14311430{
    14321431  UInt    uiFullDepth   = pcCU->getDepth( 0 ) +  uiTrDepth;
     
    14361435 
    14371436#if HHI_RQT_INTRA_SPEEDUP
    1438 #if L0232_RD_PENALTY
    14391437  Int maxTuSize = pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize();
    14401438  Int isIntraSlice = (pcCU->getSlice()->getSliceType() == I_SLICE);
     
    14531451  }
    14541452  if( bCheckFirst && noSplitIntraMaxTuSize )
     1453  {
     1454    bCheckSplit = false;
     1455  }
    14551456#else
    1456   if( bCheckFirst && bCheckFull )
    1457 #endif
    1458   {
    1459     bCheckSplit = false;
    1460   }
    1461 #else
    1462 #if L0232_RD_PENALTY
    14631457  Int maxTuSize = pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize();
    14641458  Int isIntraSlice = (pcCU->getSlice()->getSliceType() == I_SLICE);
     
    14691463  }
    14701464#endif
    1471 #endif
    14721465#if H_3D_DIM
    14731466  if( isDimMode( pcCU->getLumaIntraDir( uiAbsPartIdx ) ) )
     
    14761469  }
    14771470#endif
    1478 
    14791471  Double  dSingleCost   = MAX_DOUBLE;
    14801472#if H_3D_VSO
     
    16671659      //----- determine rate and r-d cost -----
    16681660      UInt uiSingleBits = xGetIntraBitsQT( pcCU, uiTrDepth, uiAbsPartIdx, true, !bLumaOnly, false );
    1669 #if L0232_RD_PENALTY
    16701661      if(m_pcEncCfg->getRDpenalty() && (uiLog2TrSize==5) && !isIntraSlice)
    16711662      {
    16721663        uiSingleBits=uiSingleBits*4;
    16731664      }
    1674 #endif
    16751665#if H_3D_VSO // M40
    16761666      if ( m_pcRdCost->getUseLambdaScaleVSO())     
     
    18231813    }
    18241814  }
    1825 
    18261815#if H_3D_VSO // M42
    18271816  if ( m_pcRdCost->getUseRenModel() && bCheckFull )
     
    18361825  }
    18371826#endif
    1838 
    18391827  ruiDistY += uiSingleDistY;
    18401828  ruiDistC += uiSingleDistC;
     
    27882776       
    27892777        UInt   iModeBits = xModeBitsIntra( pcCU, uiMode, uiPU, uiPartOffset, uiDepth, uiInitTrDepth );
    2790 
    2791      
    27922778#if H_3D_VSO // M35
    27932779#if H_3D_VSO_FIX // This fix should be enabled after verification
     
    29242910    }
    29252911#endif
    2926 
    29272912    //===== check modes (using r-d costs) =====
    29282913#if HHI_RQT_INTRA_SPEEDUP_MOD
     
    31123097      UInt   uiPUDistC = 0;
    31133098      Double dPUCost   = 0.0;
    3114 
    31153099#if H_3D_VSO // M37
    31163100      // reset Model
     
    31643148    {
    31653149#endif
    3166    
    3167     //--- update transform index and cbf ---
     3150        //--- update transform index and cbf ---
    31683151    UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth(0) + uiInitTrDepth ) << 1 );
    31693152    ::memcpy( pcCU->getTransformIdx()       + uiPartOffset, m_puhQTTempTrIdx,  uiQPartNum * sizeof( UChar ) );
     
    37643747    UInt          uiBitsTempL0[MAX_NUM_REF];
    37653748
    3766 #if L0034_COMBINED_LIST_CLEANUP
    37673749    TComMv        mvValidList1;
    37683750    Int           refIdxValidList1 = 0;
    37693751    UInt          bitsValidList1 = MAX_UINT;
    37703752    UInt          costValidList1 = MAX_UINT;
    3771 #endif
    37723753
    37733754    xGetBlkBits( ePartSize, pcCU->getSlice()->isInterP(), iPartIdx, uiLastMode, uiMbBits);
     
    38213802        uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdx[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS];
    38223803#if ZERO_MVD_EST
    3823 #if L0034_COMBINED_LIST_CLEANUP
    38243804        if ( iRefList == 0 || pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) < 0 )
    3825 #else
    3826         if ((iRefList != 1 || !pcCU->getSlice()->getNoBackPredFlag()) &&
    3827             (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) <= 0 || pcCU->getSlice()->getRefIdxOfLC(eRefPicList, iRefIdxTemp)>=0))
    3828 #endif
    38293805        {
    38303806          uiZeroMvdBitsTemp = uiBitsTemp;
     
    38463822       
    38473823#if GPB_SIMPLE_UNI
    3848 #if L0034_COMBINED_LIST_CLEANUP
    38493824        if ( iRefList == 1 )    // list 1
    38503825        {
     
    38713846        }
    38723847#else
    3873         if ( pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0)
    3874         {
    3875           if ( iRefList && ( pcCU->getSlice()->getNoBackPredFlag() || (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && !pcCU->getSlice()->getNoBackPredFlag() && pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(iRefIdxTemp)>=0 ) ) )
    3876             {
    3877               if ( pcCU->getSlice()->getNoBackPredFlag() )
    3878               {
    3879                 cMvTemp[1][iRefIdxTemp] = cMvTemp[0][iRefIdxTemp];
    3880                 uiCostTemp = uiCostTempL0[iRefIdxTemp];
    3881                 /*first subtract the bit-rate part of the cost of the other list*/
    3882                 uiCostTemp -= m_pcRdCost->getCost( uiBitsTempL0[iRefIdxTemp] );
    3883               }
    3884               else
    3885               {
    3886                 cMvTemp[1][iRefIdxTemp] = cMvTemp[0][pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(iRefIdxTemp)];
    3887                 uiCostTemp = uiCostTempL0[pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(iRefIdxTemp)];
    3888                 /*first subtract the bit-rate part of the cost of the other list*/
    3889                 uiCostTemp -= m_pcRdCost->getCost( uiBitsTempL0[pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(iRefIdxTemp)] );
    3890               }
    3891               /*correct the bit-rate part of the current ref*/
    3892               m_pcRdCost->setPredictor  ( cMvPred[iRefList][iRefIdxTemp] );
    3893               uiBitsTemp += m_pcRdCost->getBits( cMvTemp[1][iRefIdxTemp].getHor(), cMvTemp[1][iRefIdxTemp].getVer() );
    3894               /*calculate the correct cost*/
    3895               uiCostTemp += m_pcRdCost->getCost( uiBitsTemp );
    3896             }
    3897             else
    3898             {
    3899               xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp );
    3900             }
    3901         }
    3902         else
    3903         {
    3904           if (iRefList && pcCU->getSlice()->getNoBackPredFlag())
    3905           {
    3906             uiCostTemp = MAX_UINT;
    3907             cMvTemp[1][iRefIdxTemp] = cMvTemp[0][iRefIdxTemp];
    3908           }
    3909           else
    3910           {
    3911             xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp );
    3912           }       
    3913         }
    3914 #endif
    3915 #else
    39163848        xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp );
    39173849#endif
     
    39193851        xCheckBestMVP(pcCU, eRefPicList, cMvTemp[iRefList][iRefIdxTemp], cMvPred[iRefList][iRefIdxTemp], aaiMvpIdx[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp);
    39203852
    3921 #if L0034_COMBINED_LIST_CLEANUP
    39223853        if ( iRefList == 0 )
    39233854        {
     
    39443875          refIdxValidList1 = iRefIdxTemp;
    39453876        }
    3946 #else
    3947         if(pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && !pcCU->getSlice()->getNoBackPredFlag())
    3948         {
    3949           if(iRefList==REF_PIC_LIST_0)
    3950           {
    3951             uiCostTempL0[iRefIdxTemp] = uiCostTemp;
    3952             uiBitsTempL0[iRefIdxTemp] = uiBitsTemp;
    3953             if(pcCU->getSlice()->getRefIdxOfLC(REF_PIC_LIST_0, iRefIdxTemp)<0)
    3954             {
    3955               uiCostTemp = MAX_UINT;
    3956             }
    3957           }
    3958           else
    3959           {
    3960             if(pcCU->getSlice()->getRefIdxOfLC(REF_PIC_LIST_1, iRefIdxTemp)<0)
    3961             {
    3962               uiCostTemp = MAX_UINT;
    3963             }           
    3964           }
    3965         }
    3966 
    3967         if ( ( iRefList == 0 && uiCostTemp < uiCost[iRefList] ) ||
    3968             ( iRefList == 1 &&  pcCU->getSlice()->getNoBackPredFlag() && iRefIdxTemp == iRefIdx[0] ) ||
    3969             ( iRefList == 1 && (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0) && (iRefIdxTemp==0 || iRefIdxTemp == iRefIdx[0]) && !pcCU->getSlice()->getNoBackPredFlag() && (iRefIdxTemp == pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(iRefIdxTemp)) ) ||
    3970             ( iRefList == 1 && !pcCU->getSlice()->getNoBackPredFlag() && uiCostTemp < uiCost[iRefList] ) )
    3971           {
    3972             uiCost[iRefList] = uiCostTemp;
    3973             uiBits[iRefList] = uiBitsTemp; // storing for bi-prediction
    3974            
    3975             // set motion
    3976             cMv[iRefList]     = cMvTemp[iRefList][iRefIdxTemp];
    3977             iRefIdx[iRefList] = iRefIdxTemp;
    3978             pcCU->getCUMvField(eRefPicList)->setAllMv( cMv[iRefList], ePartSize, uiPartAddr, 0, iPartIdx );
    3979             pcCU->getCUMvField(eRefPicList)->setAllRefIdx( iRefIdx[iRefList], ePartSize, uiPartAddr, 0, iPartIdx );
    3980 
    3981             if(!pcCU->getSlice()->getMvdL1ZeroFlag())
    3982             {
    3983               // storing list 1 prediction signal for iterative bi-directional prediction
    3984               if ( eRefPicList == REF_PIC_LIST_1 )
    3985               {
    3986                 TComYuv*  pcYuvPred = &m_acYuvPred[iRefList];
    3987                 motionCompensation ( pcCU, pcYuvPred, eRefPicList, iPartIdx );
    3988               }
    3989               if ( (pcCU->getSlice()->getNoBackPredFlag() || (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(0)==0 )) && eRefPicList == REF_PIC_LIST_0 )
    3990               {
    3991                 TComYuv*  pcYuvPred = &m_acYuvPred[iRefList];
    3992                 motionCompensation ( pcCU, pcYuvPred, eRefPicList, iPartIdx );
    3993               }
    3994             }
    3995           }
    3996 #endif
    39973877      }
    39983878    }
     
    40583938       
    40593939        Int         iRefList    = iIter % 2;
    4060 #if L0034_COMBINED_LIST_CLEANUP
    40613940        if ( m_pcEncCfg->getUseFastEnc() )
    40623941        {
     
    40813960          motionCompensation ( pcCU, pcYuvPred, RefPicList(1-iRefList), iPartIdx );
    40823961        }
    4083 #else
    4084         if ( m_pcEncCfg->getUseFastEnc() && (pcCU->getSlice()->getNoBackPredFlag() || (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(0)==0 )) )
    4085         {
    4086           iRefList = 1;
    4087         }
    4088 #endif
    40893962        RefPicList  eRefPicList = ( iRefList ? REF_PIC_LIST_1 : REF_PIC_LIST_0 );
    40903963
     
    42214094    UInt uiMEBits = 0;
    42224095    // Set Motion Field_
    4223 #if L0034_COMBINED_LIST_CLEANUP
    42244096    cMv[1] = mvValidList1;
    42254097    iRefIdx[1] = refIdxValidList1;
    42264098    uiBits[1] = bitsValidList1;
    42274099    uiCost[1] = costValidList1;
    4228 #else
    4229     if ( pcCU->getSlice()->getNoBackPredFlag() || (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(0)==0 ) )
    4230     {
    4231       uiCost[1] = MAX_UINT;
    4232     }
    4233 #endif
    42344100#if AMP_MRG
    42354101    if (bTestNormalMC)
Note: See TracChangeset for help on using the changeset viewer.