Ignore:
Timestamp:
19 Jul 2013, 17:02:35 (11 years ago)
Author:
orange
Message:

Integrated QTLPC and added new line mark at the end of TComWedgelet.cpp for MERL

File:
1 edited

Legend:

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

    r537 r539  
    388388  TComPic* pcPic = rpcBestCU->getPic();
    389389
     390#if H_3D_QTLPC
     391  TComSPS *sps            = pcPic->getSlice(0)->getSPS();
     392  TComPic *pcTexture      = rpcBestCU->getSlice()->getTexturePic();
     393
     394  Bool  depthMapDetect    = (pcTexture != NULL);
     395  Bool  bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE);
     396
     397  Bool rapPic             = (rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || rpcBestCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA);
     398
     399  Bool bTry2NxN           = true;
     400  Bool bTryNx2N           = true;
     401#endif
     402
    390403  // get Original YUV data from picture
    391404  m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
     
    481494
    482495      rpcTempCU->initEstData( uiDepth, iQP );
     496
     497#if H_3D_QTLPC
     498      //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU
     499
     500      if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL())
     501      {
     502        TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU
     503        UInt uiCUIdx            = rpcBestCU->getZorderIdxInCU();
     504        assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); //Depth cannot be more partitionned than the texture.
     505        if (pcTextureCU->getDepth(uiCUIdx) > uiDepth || pcTextureCU->getPartitionSize(uiCUIdx) == SIZE_NxN) //Texture was split.
     506        {
     507          bTrySplit = true;
     508          bTryNx2N  = true;
     509          bTry2NxN  = true;
     510        }
     511        else
     512        {
     513          bTrySplit = false;
     514          bTryNx2N  = false;
     515          bTry2NxN  = false;
     516        }
     517      }
     518#endif
     519
    483520#if H_3D_NBDV
    484521      DisInfo DvInfo;
     
    575612      }
    576613
    577       if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() )
    578       {
    579         if(iQP == iBaseQP)
     614#if H_3D_QTLPC
     615      if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL())
     616      {
     617        bTrySplitDQP = bTrySplit;
     618      }
     619      else
     620      {
     621#endif
     622        if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() )
     623        {
     624          if(iQP == iBaseQP)
     625          {
     626            bTrySplitDQP = bTrySplit;
     627          }
     628        }
     629        else
    580630        {
    581631          bTrySplitDQP = bTrySplit;
    582632        }
    583       }
    584       else
    585       {
    586         bTrySplitDQP = bTrySplit;
    587       }
     633#if H_3D_QTLPC
     634      }
     635#endif
    588636      if (isAddLowestQP && (iQP == lowestQP))
    589637      {
     
    625673            if(!( (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) ))
    626674            {
    627               if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu)
     675              if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu
     676#if H_3D_QTLPC
     677                && bTrySplit
     678#endif
     679                )
    628680              {
    629681                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN   );
     
    634686
    635687          // 2NxN, Nx2N
    636           if(doNotBlockPu)
     688          if(doNotBlockPu
     689#if H_3D_QTLPC
     690            && bTryNx2N
     691#endif
     692            )
    637693          {
    638694            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N  );
     
    643699            }
    644700          }
    645           if(doNotBlockPu)
     701          if(doNotBlockPu
     702#if H_3D_QTLPC
     703            && bTry2NxN
     704#endif
     705            )
    646706          {
    647707            xCheckRDCostInter      ( rpcBestCU, rpcTempCU, SIZE_2NxN  );
     
    671731            if ( bTestAMP_Hor )
    672732            {
    673               if(doNotBlockPu)
     733              if(doNotBlockPu
     734#if H_3D_QTLPC
     735                && bTry2NxN
     736#endif
     737                )
    674738              {
    675739                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU );
     
    680744                }
    681745              }
    682               if(doNotBlockPu)
     746              if(doNotBlockPu
     747#if H_3D_QTLPC
     748                && bTry2NxN
     749#endif
     750                )
    683751              {
    684752                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD );
     
    693761            else if ( bTestMergeAMP_Hor )
    694762            {
    695               if(doNotBlockPu)
     763              if(doNotBlockPu
     764#if H_3D_QTLPC
     765                && bTry2NxN
     766#endif
     767                )
    696768              {
    697769                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true );
     
    702774                }
    703775              }
    704               if(doNotBlockPu)
     776              if(doNotBlockPu
     777#if H_3D_QTLPC
     778                && bTry2NxN
     779#endif
     780                )
    705781              {
    706782                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true );
     
    717793            if ( bTestAMP_Ver )
    718794            {
    719               if(doNotBlockPu)
     795              if(doNotBlockPu
     796#if H_3D_QTLPC
     797                && bTryNx2N
     798#endif
     799                )
    720800              {
    721801                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N );
     
    726806                }
    727807              }
    728               if(doNotBlockPu)
     808              if(doNotBlockPu
     809#if H_3D_QTLPC
     810                && bTryNx2N
     811#endif
     812                )
    729813              {
    730814                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N );
     
    735819            else if ( bTestMergeAMP_Ver )
    736820            {
    737               if(doNotBlockPu)
     821              if(doNotBlockPu
     822#if H_3D_QTLPC
     823                && bTryNx2N
     824#endif
     825                )
    738826              {
    739827                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true );
     
    744832                }
    745833              }
    746               if(doNotBlockPu)
     834              if(doNotBlockPu
     835#if H_3D_QTLPC
     836                && bTryNx2N
     837#endif
     838                )
    747839              {
    748840                xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true );
     
    753845
    754846#else
    755             xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU );
    756             rpcTempCU->initEstData( uiDepth, iQP );
    757             xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD );
    758             rpcTempCU->initEstData( uiDepth, iQP );
    759             xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N );
    760             rpcTempCU->initEstData( uiDepth, iQP );
    761 
    762             xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N );
    763             rpcTempCU->initEstData( uiDepth, iQP );
     847#if H_3D_QTLPC
     848            if (bTry2NxN)
     849            {
     850#endif
     851              xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU );
     852              rpcTempCU->initEstData( uiDepth, iQP );
     853              xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD );
     854              rpcTempCU->initEstData( uiDepth, iQP );
     855#if H_3D_QTLPC
     856            }
     857            if (bTryNx2N)
     858            {
     859#endif
     860              xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N );
     861              rpcTempCU->initEstData( uiDepth, iQP );
     862              xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N );
     863              rpcTempCU->initEstData( uiDepth, iQP );
     864#if H_3D_QTLPC
     865            }
     866#endif
    764867
    765868#endif
     
    789892            if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
    790893            {
    791               if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
     894#if H_3D_QTLPC //Try IntraNxN
     895              if(bTrySplit)
    792896              {
    793                 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );
    794                 rpcTempCU->initEstData( uiDepth, iQP );
     897#endif
     898                if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
     899                {
     900                  xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );
     901                  rpcTempCU->initEstData( uiDepth, iQP );
     902                }
     903#if H_3D_QTLPC
    795904              }
     905#endif
    796906            }
    797907          }
Note: See TracChangeset for help on using the changeset viewer.