Changeset 1191 in 3DVCSoftware for branches/HTM-14.0-MV-draft-3/source/Lib/TLibCommon/TComRdCost.h
- Timestamp:
- 15 Apr 2015, 11:36:33 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.0-MV-draft-3/source/Lib/TLibCommon/TComRdCost.h
r1179 r1191 46 46 #include "TComSlice.h" 47 47 #include "TComRdCostWeightPrediction.h" 48 #if H_3D49 #include "../TLibRenderer/TRenModel.h"50 #endif51 48 52 49 //! \ingroup TLibCommon … … 57 54 class DistParam; 58 55 class TComPattern; 59 #if H_3D60 class TComRdCost;61 #endif62 56 63 57 // ==================================================================================================================== … … 68 62 typedef UInt (*FpDistFunc) (DistParam*); 69 63 70 #if H_3D71 #if H_3D_VSO72 typedef Dist (TComRdCost::*FpDistFuncVSO) ( Int, Int, Pel*, Int, Pel*, Int, UInt, UInt, Bool );73 #endif74 #endif75 64 // ==================================================================================================================== 76 65 // Class definition … … 85 74 Int iStrideOrg; 86 75 Int iStrideCur; 87 #if H_3D_VSO88 // SAIT_VSO_EST_A003389 Pel* pVirRec;90 Pel* pVirOrg;91 Int iStrideVir;92 #endif93 #if H_3D_IC94 Bool bUseIC;95 #endif96 #if H_3D_INTER_SDC97 Bool bUseSDCMRSAD;98 #endif99 76 Int iRows; 100 77 Int iCols; … … 123 100 iSubShift = 0; 124 101 bitDepth = 0; 125 #if H_3D_VSO126 // SAIT_VSO_EST_A0033127 pVirRec = NULL;128 pVirOrg = NULL;129 iStrideVir = 0;130 #endif131 #if H_3D_INTER_SDC132 bUseSDCMRSAD = false;133 #endif134 102 } 135 103 }; … … 155 123 UInt m_uiLambdaMotionSSE; 156 124 Double m_dFrameLambda; 157 #if H_3D_VSO158 // SAIT_VSO_EST_A0033159 static Double m_dDisparityCoeff;160 #endif161 125 162 126 // for motion cost … … 175 139 #endif 176 140 177 #if H_3D_DBBP178 Bool m_bUseMask;179 #endif180 141 181 142 public: … … 183 144 virtual ~TComRdCost(); 184 145 185 #if H_3D_VSO186 Double calcRdCost ( UInt uiBits, Dist uiDistortion, Bool bFlag = false, DFunc eDFunc = DF_DEFAULT );187 Double calcRdCost64( UInt64 uiBits, Dist64 uiDistortion, Bool bFlag = false, DFunc eDFunc = DF_DEFAULT );188 #else189 146 Double calcRdCost ( UInt uiBits, UInt uiDistortion, Bool bFlag = false, DFunc eDFunc = DF_DEFAULT ); 190 147 Double calcRdCost64( UInt64 uiBits, UInt64 uiDistortion, Bool bFlag = false, DFunc eDFunc = DF_DEFAULT ); 191 #endif192 148 193 149 … … 198 154 199 155 Double getSqrtLambda () { return m_sqrtLambda; } 200 #if H_3D_VSO201 // SAIT_VSO_EST_A0033202 Void setDisparityCoeff( Double dDisparityCoeff ) { m_dDisparityCoeff = dDisparityCoeff; }203 Double getDisparityCoeff() { return m_dDisparityCoeff; }204 #endif205 156 206 157 Double getLambda() { return m_dLambda; } … … 215 166 Void setDistParam( DistParam& rcDP, Int bitDepth, Pel* p1, Int iStride1, Pel* p2, Int iStride2, Int iWidth, Int iHeight, Bool bHadamard = false ); 216 167 217 #if H_3D_DBBP218 Void setUseMask(Bool b) { m_bUseMask = b; }219 #endif220 168 221 169 UInt calcHAD(Int bitDepth, Pel* pi0, Int iStride0, Pel* pi1, Int iStride1, Int iWidth, Int iHeight ); 222 170 223 #if H_3D_FAST_DEPTH_INTRA224 UInt calcVAR(Pel* pi0, Int stride, Int width, Int height, Int cuDepth);225 #endif226 171 // for motion cost 227 172 #if !FIX203 … … 269 214 static UInt xGetSSE64 ( DistParam* pcDtParam ); 270 215 static UInt xGetSSE16N ( DistParam* pcDtParam ); 271 #if H_3D_IC || H_3D_INTER_SDC272 static UInt xGetSADic ( DistParam* pcDtParam );273 static UInt xGetSAD4ic ( DistParam* pcDtParam );274 static UInt xGetSAD8ic ( DistParam* pcDtParam );275 static UInt xGetSAD16ic ( DistParam* pcDtParam );276 static UInt xGetSAD32ic ( DistParam* pcDtParam );277 static UInt xGetSAD64ic ( DistParam* pcDtParam );278 static UInt xGetSAD16Nic ( DistParam* pcDtParam );279 #endif280 216 static UInt xGetSAD ( DistParam* pcDtParam ); 281 217 static UInt xGetSAD4 ( DistParam* pcDtParam ); … … 286 222 static UInt xGetSAD16N ( DistParam* pcDtParam ); 287 223 288 #if H_3D_VSO289 static UInt xGetVSD ( DistParam* pcDtParam );290 static UInt xGetVSD4 ( DistParam* pcDtParam );291 static UInt xGetVSD8 ( DistParam* pcDtParam );292 static UInt xGetVSD16 ( DistParam* pcDtParam );293 static UInt xGetVSD32 ( DistParam* pcDtParam );294 static UInt xGetVSD64 ( DistParam* pcDtParam );295 static UInt xGetVSD16N ( DistParam* pcDtParam );296 #endif297 224 298 225 #if AMP_SAD 299 #if H_3D_IC || H_3D_INTER_SDC300 static UInt xGetSAD12ic ( DistParam* pcDtParam );301 static UInt xGetSAD24ic ( DistParam* pcDtParam );302 static UInt xGetSAD48ic ( DistParam* pcDtParam );303 #endif304 226 static UInt xGetSAD12 ( DistParam* pcDtParam ); 305 227 static UInt xGetSAD24 ( DistParam* pcDtParam ); … … 308 230 #endif 309 231 310 #if H_3D_IC || H_3D_INTER_SDC311 static UInt xGetHADsic ( DistParam* pcDtParam );312 #endif313 232 static UInt xGetHADs4 ( DistParam* pcDtParam ); 314 233 static UInt xGetHADs8 ( DistParam* pcDtParam ); … … 317 236 static UInt xCalcHADs4x4 ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); 318 237 static UInt xCalcHADs8x8 ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); 319 #if H_3D_DBBP320 static UInt xGetMaskedSSE ( DistParam* pcDtParam );321 static UInt xGetMaskedSAD ( DistParam* pcDtParam );322 #if !RWTH_DBBP_NO_SATD_K0028323 static UInt xGetMaskedHADs ( DistParam* pcDtParam );324 #endif325 static UInt xGetMaskedVSD ( DistParam* pcDtParam );326 #endif327 238 328 239 public: … … 333 244 #endif 334 245 335 #if H_3D_VSO336 // SAIT_VSO_EST_A0033337 UInt getDistPartVSD( TComDataCU* pcCu, UInt uiPartOffset, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bHad, DFunc eDFunc = DF_VSD);338 static UInt getVSDEstimate( Int dDM, Pel* pOrg, Int iOrgStride, Pel* pVirRec, Pel* pVirOrg, Int iVirStride, Int x, Int y );339 340 private:341 Double m_dLambdaVSO;342 Double m_dSqrtLambdaVSO;343 UInt m_uiLambdaMotionSADVSO;344 UInt m_uiLambdaMotionSSEVSO;345 Double m_dFrameLambdaVSO;346 Bool m_bAllowNegDist;347 Bool m_bUseVSO;348 Bool m_bUseLambdaScaleVSO;349 UInt m_uiVSOMode;350 351 FpDistFuncVSO m_fpDistortFuncVSO;352 TRenModel* m_pcRenModel;353 354 355 // SAIT_VSO_EST_A0033356 TComPicYuv * m_pcVideoRecPicYuv;357 TComPicYuv * m_pcDepthPicYuv;358 Bool m_bUseEstimatedVSD;359 360 // LGE_WVSO_A0119361 Int m_iDWeight;362 Int m_iVSOWeight;363 Int m_iVSDWeight;364 Bool m_bUseWVSO;365 366 public:367 368 Void setRenModel ( TRenModel* pcRenModel ) { m_pcRenModel = pcRenModel; }369 TRenModel* getRenModel ( ) { return m_pcRenModel; }370 Void setRenModelData ( TComDataCU* pcCU, UInt uiAbsPartIndex, Pel* piData, Int iStride, Int iBlkWidth, Int iBlkHeight );371 Void setLambdaVSO ( Double dLambda );372 Void setFrameLambdaVSO ( Double dLambda ) { m_dFrameLambdaVSO = dLambda; };373 374 375 Void setUseVSO ( Bool bIn ) { m_bUseVSO = bIn; };376 Bool getUseVSO ( ) { return m_bUseVSO;};377 378 Bool getUseRenModel ( ) { return (m_bUseVSO && m_uiVSOMode == 4); };379 Void setUseLambdaScaleVSO(Bool bIn) { m_bUseLambdaScaleVSO = bIn; };380 Bool getUseLambdaScaleVSO( ) { return m_bUseLambdaScaleVSO; };381 382 Void setVSOMode( UInt uiIn);383 UInt getVSOMode( ) { return m_uiVSOMode; }384 Void setAllowNegDist ( Bool bAllowNegDist );385 386 Double getSqrtLambdaVSO () { return m_dSqrtLambdaVSO; }387 Double getLambdaVSO () { return m_dLambdaVSO; }388 389 Dist getDistPartVSO( TComDataCU* pcCU, UInt uiAbsPartIndex, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD );390 Double calcRdCostVSO ( UInt uiBits, Dist uiDistortion, Bool bFlag = false, DFunc eDFunc = DF_DEFAULT );391 392 // SAIT_VSO_EST_A0033393 Bool getUseEstimatedVSD( ) { return m_bUseEstimatedVSD; };394 Void setUseEstimatedVSD( Bool bIn ) { m_bUseEstimatedVSD = bIn; };395 396 TComPicYuv* getVideoRecPicYuv () { return m_pcVideoRecPicYuv; };397 Void setVideoRecPicYuv ( TComPicYuv* pcVideoRecPicYuv ) { m_pcVideoRecPicYuv = pcVideoRecPicYuv; };398 TComPicYuv* getDepthPicYuv () { return m_pcDepthPicYuv; };399 Void setDepthPicYuv ( TComPicYuv* pcDepthPicYuv ) { m_pcDepthPicYuv = pcDepthPicYuv; };400 401 // LGE_WVSO_A0119402 Void setUseWVSO ( Bool bIn ) { m_bUseWVSO = bIn; };403 Bool getUseWVSO ( ) { return m_bUseWVSO;};404 Void setDWeight ( Int iDWeight ) { m_iDWeight = iDWeight; };405 Int getDWeight () { return m_iDWeight; };406 Void setVSOWeight ( Int iVSOWeight ) { m_iVSOWeight = iVSOWeight; };407 Int getVSOWeight () { return m_iVSOWeight; };408 Void setVSDWeight ( Int iVSDWeight ) { m_iVSDWeight = iVSDWeight; };409 Int getVSDWeight () { return m_iVSDWeight; };410 411 private:412 Dist xGetDistVSOMode4( Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD );413 414 #endif // H_3D_VSO415 246 416 247 };// END CLASS DEFINITION TComRdCost
Note: See TracChangeset for help on using the changeset viewer.