Changeset 460 in 3DVCSoftware


Ignore:
Timestamp:
6 Jun 2013, 12:10:16 (11 years ago)
Author:
hhi
Message:

Integation of depth intra methods in macro H_3D_DIM, including:

  • Encoder optimizations in H_3D_DIM_ENC.
Location:
branches/HTM-DEV-0.3-dev1/source/Lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibCommon/TypeDef.h

    r459 r460  
    105105///// ***** DEPTH INTRA MODES *********
    106106#if H_3D_DIM
    107 #define H_3D_DIM_DMM                   1 // Depth Modeling Modes
    108 #define H_3D_DIM_RBC                   1 // Region Boundary Chain mode
    109 #define H_3D_DIM_SDC                   0 // Simplified Depth Coding method
    110 #define H_3D_DIM_DLT                   0 // Depth Lookup Table
     107#define H_3D_DIM_DMM                      1   // Depth Modeling Modes
     108#define H_3D_DIM_RBC                      1   // Region Boundary Chain mode
     109#define H_3D_DIM_SDC                      0   // Simplified Depth Coding method
     110#define H_3D_DIM_DLT                      0   // Depth Lookup Table
     111#define H_3D_DIM_ENC                      1   // Depth Intra encoder optimizations, includes:
     112                                              // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
     113                                              // LG_ZEROINTRADEPTHRESI_A0087
    111114#endif
    112115
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibEncoder/TEncCu.cpp

    r446 r460  
    517517      m_LCUPredictionSAD += m_temporalSAD;
    518518      m_addSADDepth = uiDepth;
     519    }
     520#endif
     521
     522#if H_3D_DIM_ENC
     523    if( rpcBestCU->getSlice()->getIsDepth() && rpcBestCU->getSlice()->isIRAP() )
     524    {
     525      earlyDetectionSkipMode = false;
    519526    }
    520527#endif
     
    682689
    683690        // do normal intra modes
     691#if H_3D_DIM_ENC
     692        if ( !bEarlySkip || ( rpcBestCU->getSlice()->getIsDepth() && rpcBestCU->getSlice()->isIRAP() ) )
     693#else
    684694        if ( !bEarlySkip )
     695#endif
    685696        {
    686697          // speedup for inter frames
     
    688699            rpcBestCU->getCbf( 0, TEXT_LUMA     ) != 0   ||
    689700            rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0   ||
    690             rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0     ) // avoid very complex intra if it is unlikely
     701              rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0     
     702#if H_3D_DIM_ENC
     703            || ( rpcBestCU->getSlice()->getIsDepth() && rpcBestCU->getSlice()->isIRAP() )
     704#endif
     705            ) // avoid very complex intra if it is unlikely
    691706          {
    692707            xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N );
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibEncoder/TEncSearch.cpp

    r459 r460  
    10131013                                UInt&       ruiDist,
    10141014#endif
    1015                                 Int        default0Save1Load2 )
     1015                                Int        default0Save1Load2
     1016#if H_3D_DIM_ENC
     1017                                , Bool       zeroResi
     1018#endif
     1019                                )
    10161020{
    10171021  UInt    uiLumaPredMode    = pcCU     ->getLumaIntraDir     ( uiAbsPartIdx );
     
    10991103    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
    11001104    {
     1105#if H_3D_DIM_ENC
     1106      if( zeroResi )
     1107      {
     1108        memset( pResi, 0, sizeof( Pel ) * uiWidth );
     1109        pResi += uiStride;
     1110      }
     1111      else
     1112      {
     1113#endif
    11011114      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
    11021115      {
     
    11061119      pResi += uiStride;
    11071120      pPred += uiStride;
     1121#if H_3D_DIM_ENC
     1122      }
     1123#endif
    11081124    }
    11091125  }
     
    14041420                                Bool         bCheckFirst,
    14051421#endif
    1406                                 Double&      dRDCost )
     1422                                Double&      dRDCost
     1423#if H_3D_DIM_ENC
     1424                                , Bool        zeroResi
     1425#endif
     1426                                )
    14071427{
    14081428  UInt    uiFullDepth   = pcCU->getDepth( 0 ) +  uiTrDepth;
     
    15141534        }
    15151535        //----- code luma block with given intra prediction mode and store Cbf-----
     1536#if H_3D_DIM_ENC
     1537        xIntraCodingLumaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcOrgYuv, pcPredYuv, pcResiYuv, singleDistYTmp, default0Save1Load2, zeroResi );
     1538#else
    15161539        xIntraCodingLumaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcOrgYuv, pcPredYuv, pcResiYuv, singleDistYTmp,default0Save1Load2);
     1540#endif
    15171541        singleCbfYTmp = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth );
    15181542        //----- code chroma blocks with given intra prediction mode and store Cbf-----
     
    27442768    for( UInt uiMode = 0; uiMode < numModesForFullRD; uiMode++ )
    27452769    {
     2770#if H_3D_DIM_ENC
     2771      for( UInt testZeroResi = 0; testZeroResi <= ((pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->isIRAP()) ? 1 : 0 ); testZeroResi++ )
     2772      {
     2773#endif
    27462774      // set luma prediction mode
    27472775      UInt uiOrgMode = uiRdModeList[uiMode];
     
    27702798#endif
    27712799#if HHI_RQT_INTRA_SPEEDUP
     2800#if H_3D_DIM_ENC
     2801      xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost, (testZeroResi != 0) );
     2802#else
    27722803      xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost );
     2804#endif
     2805#else
     2806#if H_3D_DIM_ENC
     2807      xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, dPUCost, (testZeroResi != 0) );
    27732808#else
    27742809      xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, dPUCost );
     2810#endif
    27752811#endif
    27762812     
     
    28032839        uiSecondBestMode  = uiOrgMode;
    28042840        dSecondBestPUCost = dPUCost;
     2841      }
     2842#endif
     2843#if H_3D_DIM_ENC
    28052844      }
    28062845#endif
     
    67616800      if( m_pcRdCost->getUseVSO() )
    67626801      {
    6763         if( m_pcRdCost->getUseEstimatedVSD() )
     6802        if( m_pcRdCost->getUseEstimatedVSD() ) //PM: use VSO instead of VSD here?
    67646803        {
    67656804          uiActDist = m_pcRdCost->getDistPartVSD( pcCU, uiAbsPtIdx, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false );
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibEncoder/TEncSearch.h

    r459 r460  
    261261                                    UInt&        ruiDist,
    262262#endif
    263                                     Int         default0Save1Load2 = 0);
     263                                    Int         default0Save1Load2 = 0
     264#if H_3D_DIM_ENC
     265                                  , Bool          zeroResi = false
     266#endif
     267                                    );
    264268  Void  xIntraCodingChromaBlk     ( TComDataCU*  pcCU,
    265269                                    UInt         uiTrDepth,
     
    288292                                   Bool         bCheckFirst,
    289293#endif
    290                                    Double&      dRDCost );
     294                                   Double&      dRDCost
     295#if H_3D_DIM_ENC
     296                                   , Bool          zeroResi = false
     297#endif
     298                                   );
    291299 
    292300  Void  xSetIntraResultQT         ( TComDataCU*  pcCU,
Note: See TracChangeset for help on using the changeset viewer.