Changeset 1303 in 3DVCSoftware for branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSearch.cpp
- Timestamp:
- 28 Jul 2015, 03:59:07 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSearch.cpp
r1287 r1303 44 44 #include <math.h> 45 45 #include <limits> 46 #if H_3D_INTER_SDC47 #include <memory.h>48 #endif49 50 46 51 47 //! \ingroup TLibEncoder … … 372 368 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 373 369 #endif 374 #if H_3D_INTER_SDC370 #if NH_3D_SDC_INTER 375 371 m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag(); 376 372 #endif … … 883 879 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 884 880 #endif 885 #if H_3D_INTER_SDC881 #if NH_3D_SDC_INTER 886 882 m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag(); 887 883 #endif … … 2907 2903 distParam.bUseIC = false; 2908 2904 #endif 2909 #if H_3D_INTER_SDC_FIX2905 #if NH_3D_SDC_INTER 2910 2906 distParam.bUseSDCMRSAD = false; 2911 2907 #endif … … 3847 3843 cDistParam.bUseIC = false; 3848 3844 #endif 3849 #if H_3D_INTER_SDC3845 #if NH_3D_SDC_INTER 3850 3846 cDistParam.bUseSDCMRSAD = false; 3851 3847 #endif … … 5057 5053 pcPatternKey->setICFlag( bICFlag ); 5058 5054 #endif 5059 #if H_3D_INTER_SDC5055 #if NH_3D_SDC_INTER 5060 5056 pcPatternKey->setSDCMRSADFlag( pcCU->getSlice()->getInterSdcFlag() ); 5061 5057 #endif … … 5246 5242 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 5247 5243 #endif 5248 #if H_3D_INTER_SDC5244 #if NH_3D_SDC_INTER 5249 5245 m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag(); 5250 5246 #endif … … 5964 5960 } 5965 5961 5966 #if H_3D_INTER_SDC5962 #if NH_3D_SDC_INTER 5967 5963 Void TEncSearch::encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, TComYuv* pcRec, Int uiOffest, const UInt uiDepth ) 5968 5964 { … … 5978 5974 5979 5975 Pel *pPred, *pOrg; 5980 UInt uiPredStride = pcPred->getStride( );5981 UInt uiOrgStride = pcOrg->getStride( );5976 UInt uiPredStride = pcPred->getStride( COMPONENT_Y ); 5977 UInt uiOrgStride = pcOrg->getStride( COMPONENT_Y ); 5982 5978 UInt uiPelX, uiPelY; 5983 5979 5984 pPred = pcPred->get LumaAddr( 0);5985 pOrg = pcOrg->get LumaAddr( 0);5980 pPred = pcPred->getAddr( COMPONENT_Y ); 5981 pOrg = pcOrg->getAddr( COMPONENT_Y ); 5986 5982 Int pResDC = 0; 5983 Int bitDepthY = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA); 5984 Int bitDepthC = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA); 5987 5985 5988 5986 //calculate dc value for prediction and original signal, and calculate residual and reconstruction … … 6005 6003 6006 6004 Pel *pRec; 6007 UInt uiRecStride = pcRec->getStride( );6008 pPred = pcPred->get LumaAddr( 0);6009 pRec = pcRec->get LumaAddr( 0);6005 UInt uiRecStride = pcRec->getStride( COMPONENT_Y ); 6006 pPred = pcPred->getAddr( COMPONENT_Y ); 6007 pRec = pcRec->getAddr( COMPONENT_Y ); 6010 6008 6011 6009 for( uiPelY = 0; uiPelY < uiHeight; uiPelY++ ) … … 6013 6011 for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ ) 6014 6012 { 6015 pRec[ uiPelX ] = Clip3( 0, ( 1 << g_bitDepthY) - 1, pPred[uiPelX] + pcCU->getSDCSegmentDCOffset(0, 0) );6013 pRec[ uiPelX ] = Clip3( 0, (1 << bitDepthY) - 1, pPred[uiPelX] + pcCU->getSDCSegmentDCOffset(0, 0) ); 6016 6014 } 6017 6015 pPred += uiPredStride; … … 6020 6018 6021 6019 // clear UV 6022 UInt uiStrideC = pcRec->get CStride();6023 Pel *pRecCb = pcRec->get CbAddr();6024 Pel *pRecCr = pcRec->get CrAddr();6020 UInt uiStrideC = pcRec->getStride( COMPONENT_Cb ); 6021 Pel *pRecCb = pcRec->getAddr( COMPONENT_Cb ); 6022 Pel *pRecCr = pcRec->getAddr( COMPONENT_Cr ); 6025 6023 6026 6024 for (Int y=0; y < uiHeight/2; y++) … … 6028 6026 for (Int x=0; x < uiWidth/2; x++) 6029 6027 { 6030 pRecCb[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) );6031 pRecCr[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) );6028 pRecCb[x] = (Pel)( 1 << ( bitDepthC - 1 ) ); 6029 pRecCr[x] = (Pel)( 1 << ( bitDepthC - 1 ) ); 6032 6030 } 6033 6031 … … 6038 6036 Dist ruiDist; 6039 6037 Double rdCost; 6040 #if H_3D_VSO // M136038 #if NH_3D_VSO // M13 6041 6039 if ( m_pcRdCost->getUseVSO() ) 6042 6040 { 6043 ruiDist = m_pcRdCost->getDistPartVSO( pcCU, 0, pcRec->getLumaAddr(), pcRec->getStride(), pcOrg->getLumaAddr(), pcOrg->getStride(), uiWidth, uiHeight , false );6041 ruiDist = m_pcRdCost->getDistPartVSO( pcCU, 0, bitDepthY, pcRec->getAddr( COMPONENT_Y ), pcRec->getStride( COMPONENT_Y ), pcOrg->getAddr( COMPONENT_Y ), pcOrg->getStride( COMPONENT_Y ), uiWidth, uiHeight , false ); 6044 6042 } 6045 6043 else … … 6047 6045 #endif 6048 6046 { 6049 ruiDist = m_pcRdCost->getDistPart( g_bitDepthY, pcRec->getLumaAddr( 0 ), uiRecStride, pcOrg->getLumaAddr( 0 ), uiOrgStride, uiWidth, uiHeight ); 6050 } 6051 #if H_3D_VSO 6052 } 6053 #endif 6054 6055 #if NH_3D_SDC_INTRA 6047 ruiDist = m_pcRdCost->getDistPart( bitDepthY, pcRec->getAddr( COMPONENT_Y ), uiRecStride, pcOrg->getAddr( COMPONENT_Y ), uiOrgStride, uiWidth, uiHeight, COMPONENT_Y ); 6048 } 6049 #if NH_3D_VSO 6050 } 6051 #endif 6052 6056 6053 Bool bNonSkip = false; 6057 #else6058 Bool bNonSkip = true;6059 #endif6060 6054 bNonSkip |= ( pcCU->getSDCSegmentDCOffset( 0, 0 ) != 0 ) ? 1 : 0; 6061 6055 if( !bNonSkip ) … … 6069 6063 //----- determine rate and r-d cost ----- 6070 6064 UInt uiBits = 0; 6071 TComYuv *pDummy = NULL;6072 6065 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[pcCU->getDepth(0)][CI_CURR_BEST] ); 6073 6066 6074 xAddSymbolBitsInter( pcCU, 0, 0, uiBits, pDummy, NULL, pDummy);6075 6076 #if H_3D_VSO //M 146067 xAddSymbolBitsInter( pcCU, uiBits ); 6068 6069 #if NH_3D_VSO //M 14 6077 6070 if ( m_pcRdCost->getUseLambdaScaleVSO() ) 6078 6071 { … … 6092 6085 } 6093 6086 6094 #if H_3D_VSO // necessary? // M156087 #if NH_3D_VSO // necessary? // M15 6095 6088 // set Model 6096 6089 if( !m_pcRdCost->getUseEstimatedVSD() && m_pcRdCost->getUseRenModel() ) 6097 6090 { 6098 Pel* piSrc = pcRec->get LumaAddr();6099 UInt uiSrcStride = pcRec->getStride( );6091 Pel* piSrc = pcRec->getAddr( COMPONENT_Y ); 6092 UInt uiSrcStride = pcRec->getStride( COMPONENT_Y ); 6100 6093 m_pcRdCost->setRenModelData( pcCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 6101 6094 }
Note: See TracChangeset for help on using the changeset viewer.