Ignore:
Timestamp:
9 Aug 2013, 07:59:16 (11 years ago)
Author:
mediatek-htm
Message:

Integration of JCT3V-E0173, fast texture encoding algorithm for dependent views
The MACRO is "MTK_FAST_TEXTURE_ENCODING_E0173"

by Na Zhang (Na.Zhang@…)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibEncoder/TEncCu.cpp

    r541 r559  
    481481  if(!bSliceEnd && !bSliceStart && bInsidePicture )
    482482  {
     483#if  MTK_FAST_TEXTURE_ENCODING_E0173
     484    Bool bIVFMerge = false;
     485    Int  iIVFMaxD = 0;
     486    Bool bFMD = false;
     487#endif
    483488    for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++)
    484489    {
     
    555560        }
    556561      }
     562#if  MTK_FAST_TEXTURE_ENCODING_E0173
     563      if(rpcTempCU->getSlice()->getViewIndex() && !rpcTempCU->getSlice()->getIsDepth())
     564      {
     565        PartSize ePartTemp = rpcTempCU->getPartitionSize(0);
     566        rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
     567        rpcTempCU->getIVNStatus( 0, &DvInfo,  bIVFMerge, iIVFMaxD);
     568        rpcTempCU->setPartSizeSubParts( ePartTemp, 0, uiDepth );
     569      }
     570#endif
    557571#endif
    558572      // do inter modes, SKIP and 2Nx2N
     
    570584          rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    571585#endif
     586#if  MTK_FAST_TEXTURE_ENCODING_E0173
     587          xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFMD );  rpcTempCU->initEstData( uiDepth, iQP );//by Competition for inter_2Nx2N
     588#else
    572589          xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N );  rpcTempCU->initEstData( uiDepth, iQP );//by Competition for inter_2Nx2N
     590#endif
    573591        }
    574592        // SKIP
     
    577595#endif
    578596        xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, &earlyDetectionSkipMode );//by Merge for inter_2Nx2N
     597#if  MTK_FAST_TEXTURE_ENCODING_E0173
     598        bFMD = bIVFMerge && rpcBestCU->isSkipped(0);
     599#endif
    579600        rpcTempCU->initEstData( uiDepth, iQP );
    580601
     
    598619            rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    599620#endif
     621#if  MTK_FAST_TEXTURE_ENCODING_E0173
     622            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFMD );  rpcTempCU->initEstData( uiDepth, iQP );
     623#else
    600624            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N );  rpcTempCU->initEstData( uiDepth, iQP );
     625#endif
    601626            if(m_pcEncCfg->getUseCbfFastMode())
    602627            {
     
    677702                )
    678703              {
     704#if  MTK_FAST_TEXTURE_ENCODING_E0173
     705                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFMD  );
     706#else
    679707                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN   );
     708#endif
    680709                rpcTempCU->initEstData( uiDepth, iQP );
    681710              }
     
    690719            )
    691720          {
     721#if  MTK_FAST_TEXTURE_ENCODING_E0173
     722            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFMD  );
     723#else
    692724            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N  );
     725#endif
    693726            rpcTempCU->initEstData( uiDepth, iQP );
    694727            if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N )
     
    703736            )
    704737          {
     738#if  MTK_FAST_TEXTURE_ENCODING_E0173
     739            xCheckRDCostInter      ( rpcBestCU, rpcTempCU, SIZE_2NxN, bFMD  );
     740#else
    705741            xCheckRDCostInter      ( rpcBestCU, rpcTempCU, SIZE_2NxN  );
     742#endif
    706743            rpcTempCU->initEstData( uiDepth, iQP );
    707744            if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN)
     
    735772                )
    736773              {
     774#if  MTK_FAST_TEXTURE_ENCODING_E0173
     775                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFMD );
     776#else
    737777                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU );
     778#endif
    738779                rpcTempCU->initEstData( uiDepth, iQP );
    739780                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU )
     
    748789                )
    749790              {
     791#if  MTK_FAST_TEXTURE_ENCODING_E0173
     792                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFMD );
     793#else
    750794                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD );
     795#endif
    751796                rpcTempCU->initEstData( uiDepth, iQP );
    752797                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD )
     
    765810                )
    766811              {
     812#if  MTK_FAST_TEXTURE_ENCODING_E0173
     813                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFMD, true );
     814#else
    767815                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true );
     816#endif
    768817                rpcTempCU->initEstData( uiDepth, iQP );
    769818                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU )
     
    778827                )
    779828              {
     829#if  MTK_FAST_TEXTURE_ENCODING_E0173
     830                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFMD, true );
     831#else
    780832                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true );
     833#endif
    781834                rpcTempCU->initEstData( uiDepth, iQP );
    782835                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD )
     
    797850                )
    798851              {
     852#if  MTK_FAST_TEXTURE_ENCODING_E0173
     853                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFMD );
     854#else
    799855                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N );
     856#endif
    800857                rpcTempCU->initEstData( uiDepth, iQP );
    801858                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N )
     
    810867                )
    811868              {
     869#if  MTK_FAST_TEXTURE_ENCODING_E0173
     870                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFMD );
     871#else
    812872                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N );
     873#endif
    813874                rpcTempCU->initEstData( uiDepth, iQP );
    814875              }
     
    823884                )
    824885              {
     886#if  MTK_FAST_TEXTURE_ENCODING_E0173
     887                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFMD, true );
     888#else
    825889                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true );
     890#endif
    826891                rpcTempCU->initEstData( uiDepth, iQP );
    827892                if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N )
     
    836901                )
    837902              {
     903#if  MTK_FAST_TEXTURE_ENCODING_E0173
     904                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFMD, true );
     905#else
    838906                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true );
     907#endif
    839908                rpcTempCU->initEstData( uiDepth, iQP );
    840909              }
     
    868937#endif
    869938        }
    870 
     939#if  MTK_FAST_TEXTURE_ENCODING_E0173
     940        if(!bFMD)
     941        {
     942#endif
    871943        // do normal intra modes
    872944#if H_3D_DIM_ENC
     
    924996          }
    925997        }
     998#if  MTK_FAST_TEXTURE_ENCODING_E0173
     999        }
     1000#endif
    9261001        if (isAddLowestQP && (iQP == lowestQP))
    9271002        {
     
    9661041      bSubBranch = true;
    9671042    }
     1043#if  MTK_FAST_TEXTURE_ENCODING_E0173
     1044    if(rpcBestCU->getSlice()->getViewIndex() && !rpcBestCU->getSlice()->getIsDepth() && (uiDepth >=iIVFMaxD) && rpcBestCU->isSkipped(0))
     1045    {
     1046      bSubBranch = false;
     1047    }
     1048#endif
    9681049  }
    9691050  else if(!(bSliceEnd && bInsidePicture))
     
    17861867
    17871868#if AMP_MRG
     1869#if  MTK_FAST_TEXTURE_ENCODING_E0173
     1870Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bFMD, Bool bUseMRG)
     1871#else
    17881872Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bUseMRG)
     1873#endif
    17891874#else
    17901875Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize )
    17911876#endif
    17921877{
     1878#if  MTK_FAST_TEXTURE_ENCODING_E0173
     1879  if(!(bFMD && (ePartSize == SIZE_2Nx2N)))  //have  motion estimation or merge check
     1880  {
     1881#endif
    17931882  UChar uhDepth = rpcTempCU->getDepth( 0 );
    17941883#if H_3D_ARP
     
    18641953#if AMP_MRG
    18651954  rpcTempCU->setMergeAMP (true);
     1955#if  MTK_FAST_TEXTURE_ENCODING_E0173
     1956  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bFMD, false, bUseMRG );
     1957#else
    18661958  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], false, bUseMRG );
     1959#endif
    18671960#else 
    18681961  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] );
     
    19302023  }
    19312024#endif
     2025#if  MTK_FAST_TEXTURE_ENCODING_E0173
     2026  }
     2027#endif
    19322028}
    19332029
Note: See TracChangeset for help on using the changeset viewer.