Changeset 1072 in 3DVCSoftware for branches/HTM-12.1-MV-draft-1/source/Lib/TLibCommon/TComRdCost.h
- Timestamp:
- 13 Oct 2014, 16:44:51 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-12.1-MV-draft-1/source/Lib/TLibCommon/TComRdCost.h
r872 r1072 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 static UInt xGetMaskedHADs ( DistParam* pcDtParam );323 static UInt xGetMaskedVSD ( DistParam* pcDtParam );324 #endif325 238 326 239 public: 327 240 UInt getDistPart(Int bitDepth, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, TextType eText = TEXT_LUMA, DFunc eDFunc = DF_SSE ); 328 241 329 #if KWU_RC_MADPRED_E0227 330 UInt getSADPart ( Int bitDepth, Pel* pelCur, Int curStride, Pel* pelOrg, Int orgStride, UInt width, UInt height ); 331 #endif 332 333 #if H_3D_VSO 334 // SAIT_VSO_EST_A0033 335 UInt getDistPartVSD( TComDataCU* pcCu, UInt uiPartOffset, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bHad, DFunc eDFunc = DF_VSD); 336 static UInt getVSDEstimate( Int dDM, Pel* pOrg, Int iOrgStride, Pel* pVirRec, Pel* pVirOrg, Int iVirStride, Int x, Int y ); 337 338 private: 339 Double m_dLambdaVSO; 340 Double m_dSqrtLambdaVSO; 341 UInt m_uiLambdaMotionSADVSO; 342 UInt m_uiLambdaMotionSSEVSO; 343 Double m_dFrameLambdaVSO; 344 Bool m_bAllowNegDist; 345 Bool m_bUseVSO; 346 Bool m_bUseLambdaScaleVSO; 347 UInt m_uiVSOMode; 348 349 FpDistFuncVSO m_fpDistortFuncVSO; 350 TRenModel* m_pcRenModel; 351 352 353 // SAIT_VSO_EST_A0033 354 TComPicYuv * m_pcVideoRecPicYuv; 355 TComPicYuv * m_pcDepthPicYuv; 356 Bool m_bUseEstimatedVSD; 357 358 // LGE_WVSO_A0119 359 Int m_iDWeight; 360 Int m_iVSOWeight; 361 Int m_iVSDWeight; 362 Bool m_bUseWVSO; 363 364 public: 365 366 Void setRenModel ( TRenModel* pcRenModel ) { m_pcRenModel = pcRenModel; } 367 TRenModel* getRenModel ( ) { return m_pcRenModel; } 368 Void setRenModelData ( TComDataCU* pcCU, UInt uiAbsPartIndex, Pel* piData, Int iStride, Int iBlkWidth, Int iBlkHeight ); 369 Void setLambdaVSO ( Double dLambda ); 370 Void setFrameLambdaVSO ( Double dLambda ) { m_dFrameLambdaVSO = dLambda; }; 371 372 373 Void setUseVSO ( Bool bIn ) { m_bUseVSO = bIn; }; 374 Bool getUseVSO ( ) { return m_bUseVSO;}; 375 376 Bool getUseRenModel ( ) { return (m_bUseVSO && m_uiVSOMode == 4); }; 377 Void setUseLambdaScaleVSO(Bool bIn) { m_bUseLambdaScaleVSO = bIn; }; 378 Bool getUseLambdaScaleVSO( ) { return m_bUseLambdaScaleVSO; }; 379 380 Void setVSOMode( UInt uiIn); 381 UInt getVSOMode( ) { return m_uiVSOMode; } 382 Void setAllowNegDist ( Bool bAllowNegDist ); 383 384 Double getSqrtLambdaVSO () { return m_dSqrtLambdaVSO; } 385 Double getLambdaVSO () { return m_dLambdaVSO; } 386 387 Dist getDistPartVSO( TComDataCU* pcCU, UInt uiAbsPartIndex, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD ); 388 Double calcRdCostVSO ( UInt uiBits, Dist uiDistortion, Bool bFlag = false, DFunc eDFunc = DF_DEFAULT ); 389 390 // SAIT_VSO_EST_A0033 391 Bool getUseEstimatedVSD( ) { return m_bUseEstimatedVSD; }; 392 Void setUseEstimatedVSD( Bool bIn ) { m_bUseEstimatedVSD = bIn; }; 393 394 TComPicYuv* getVideoRecPicYuv () { return m_pcVideoRecPicYuv; }; 395 Void setVideoRecPicYuv ( TComPicYuv* pcVideoRecPicYuv ) { m_pcVideoRecPicYuv = pcVideoRecPicYuv; }; 396 TComPicYuv* getDepthPicYuv () { return m_pcDepthPicYuv; }; 397 Void setDepthPicYuv ( TComPicYuv* pcDepthPicYuv ) { m_pcDepthPicYuv = pcDepthPicYuv; }; 398 399 // LGE_WVSO_A0119 400 Void setUseWVSO ( Bool bIn ) { m_bUseWVSO = bIn; }; 401 Bool getUseWVSO ( ) { return m_bUseWVSO;}; 402 Void setDWeight ( Int iDWeight ) { m_iDWeight = iDWeight; }; 403 Int getDWeight () { return m_iDWeight; }; 404 Void setVSOWeight ( Int iVSOWeight ) { m_iVSOWeight = iVSOWeight; }; 405 Int getVSOWeight () { return m_iVSOWeight; }; 406 Void setVSDWeight ( Int iVSDWeight ) { m_iVSDWeight = iVSDWeight; }; 407 Int getVSDWeight () { return m_iVSDWeight; }; 408 409 private: 410 Dist xGetDistVSOMode4( Int iStartPosX, Int iStartPosY, Pel* piCur, Int iCurStride, Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, Bool bSAD ); 411 412 #endif // H_3D_VSO 242 413 243 414 244 };// END CLASS DEFINITION TComRdCost
Note: See TracChangeset for help on using the changeset viewer.