Changeset 296 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComDataCU.h
- Timestamp:
- 20 Feb 2013, 22:07:43 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComDataCU.h
r189 r296 49 49 #include "TComPattern.h" 50 50 51 #if H HI_INTER_VIEW_RESIDUAL_PRED51 #if H3D_IVRP 52 52 #include "TComYuv.h" 53 53 #endif … … 91 91 UInt height; //!< number of pixels in height 92 92 Bool isBorderAvailable[NUM_SGU_BORDER]; //!< the border availabilities 93 #if LCU_SYNTAX_ALF94 93 Bool allBordersAvailable; 95 #endif96 94 97 95 NDBFBlockInfo():tileID(0), sliceID(0), startSU(0), endSU(0) {} //!< constructor … … 143 141 #endif 144 142 Char* m_pePredMode; ///< array of prediction modes 145 #if H0736_AVC_STYLE_QP_RANGE146 143 Char* m_phQP; ///< array of QP values 147 #else148 UChar* m_phQP; ///< array of QP values149 #endif150 144 UChar* m_puhTrIdx; ///< array of transform indices 151 145 UChar* m_nsqtPartIdx; ///< array of absPartIdx mapping table, map zigzag to NSQT … … 197 191 #endif 198 192 UChar* m_puhMergeIndex; ///< array of merge candidate indices 193 #if MERL_VSP_C0152 194 Char* m_piVSPIndex; ///< array of VSP flags to indicate the current block uses synthetic predictor or not 195 ///< value 0: non-VSP, value 1: VSP 196 #endif 199 197 #if AMP_MRG 200 198 Bool m_bIsMergeAMP; … … 210 208 Bool* m_pbIPCMFlag; ///< array of intra_pcm flags 211 209 212 #if BURST_IPCM213 210 Int m_numSucIPCM; ///< the number of succesive IPCM blocks associated with the current log2CUSize 214 211 Bool m_lastCUSucIPCMFlag; ///< True indicates that the last CU is IPCM and shares the same root as the current CU. 215 #endif 216 #if HHI_INTER_VIEW_RESIDUAL_PRED 212 #if H3D_IVRP 217 213 Bool* m_pbResPredAvailable; ///< array of residual prediction available flags 218 214 Bool* m_pbResPredFlag; ///< array of residual prediction flags … … 237 233 Bool m_bDecSubCu; ///< indicates decoder-mode 238 234 Double m_dTotalCost; ///< sum of partition RD costs 239 #if FIX_RDO_NEGDIST240 235 Dist m_uiTotalDistortion; ///< sum of partition distortion 241 #else242 UInt m_uiTotalDistortion; ///< sum of partition distortion243 #endif244 236 UInt m_uiTotalBits; ///< sum of partition bits 245 237 UInt m_uiTotalBins; ///< sum of partition bins … … 262 254 #if HHI_DMM_PRED_TEX 263 255 UInt* m_puiWedgePredTexTabIdx; 256 #if LGE_DMM3_SIMP_C0044 257 UInt* m_puiWedgePredTexIntraTabIdx; 258 #endif 264 259 Int* m_piWedgePredTexDeltaDC1; 265 260 Int* m_piWedgePredTexDeltaDC2; … … 279 274 Bool xAddMVPCand ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 280 275 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 281 276 #if MERL_VSP_C0152 277 inline Bool xAddVspMergeCand ( UChar ucVspMergePos, Int vspIdx, Bool* bVspMvZeroDone, UInt uiDepth, Bool* abCandIsInter, Int& iCount, 278 UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, Int* iVSPIndexTrue, Int mrgCandIdx, DisInfo* pDisInfo ); 279 inline Void xInheritVspMode ( TComDataCU* pcCURef, UInt uiIdx, Bool* bVspMvZeroDone, Int iCount, Int* iVSPIndexTrue, TComMvField* pcMvFieldNeighbours, DisInfo* pDInfo ) ; 280 #endif 282 281 Void deriveRightBottomIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxRB ); 283 Bool xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx ); 284 #if QC_MULTI_DIS_CAN_A0097 282 Bool xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx 283 #if QC_TMVP_MRG_REFIDX_C0047 284 , 285 Bool bMRG = 0 286 #endif 287 ); 288 #if H3D_NBDV 285 289 Bool xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 286 290 #endif 287 291 288 #if !AMVP_PRUNING_SIMPLIFICATION289 /// remove redundant candidates290 Void xUniqueMVPCand ( AMVPInfo* pInfo );291 #endif292 292 293 293 Void xCheckCornerCand( TComDataCU* pcCorner, UInt uiCornerIdx, UInt uiIter, Bool& rbValidCand ); … … 304 304 Void xCheckDuplicateCand(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, bool* pbCandIsInter, UInt& ruiArrayAddr); 305 305 306 #if !BURST_IPCM307 Int getLastValidPartIdx ( Int iAbsPartIdx );308 #endif309 306 310 307 public: … … 324 321 325 322 Void initCU ( TComPic* pcPic, UInt uiCUAddr ); 326 #if H0736_AVC_STYLE_QP_RANGE327 323 Void initEstData ( UInt uiDepth, Int qp ); 328 324 Void initSubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp ); 329 #else330 Void initEstData ( UInt uiDepth, UInt uiQP );331 Void initSubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth, UInt uiQP );332 #endif333 325 Void setOutsideCUPart ( UInt uiAbsPartIdx, UInt uiDepth ); 334 326 … … 366 358 Void copyTextureMotionDataFrom( TComDataCU* pcCU, UInt uiDepth, UInt uiAbsPartIdxSrc, UInt uiAbsPartIdxDst = 0 ); 367 359 #endif 368 369 // -------------------------------------------------------------------------------------------------------------------360 361 // ------------------------------------------------------------------------------------------------------------------- 370 362 // member functions for CU data 371 363 // ------------------------------------------------------------------------------------------------------------------- … … 398 390 Void setSizeSubParts ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, UInt uiDepth ); 399 391 400 #if H0736_AVC_STYLE_QP_RANGE401 392 Char* getQP () { return m_phQP; } 402 393 Char getQP ( UInt uiIdx ) { return m_phQP[uiIdx]; } 403 394 Void setQP ( UInt uiIdx, Char value ){ m_phQP[uiIdx] = value; } 404 395 Void setQPSubParts ( Int qp, UInt uiAbsPartIdx, UInt uiDepth ); 405 #if BURST_IPCM406 396 Int getLastValidPartIdx ( Int iAbsPartIdx ); 407 #endif408 397 Char getLastCodedQP ( UInt uiAbsPartIdx ); 409 #else410 UChar* getQP () { return m_phQP; }411 UChar getQP ( UInt uiIdx ) { return m_phQP[uiIdx]; }412 Void setQP ( UInt uiIdx, UChar uh ) { m_phQP[uiIdx] = uh; }413 Void setQPSubParts ( UInt uiQP, UInt uiAbsPartIdx, UInt uiDepth );414 #if BURST_IPCM415 Int getLastValidPartIdx ( Int iAbsPartIdx );416 #endif417 UChar getLastCodedQP ( UInt uiAbsPartIdx );418 #endif419 398 420 399 #if LOSSLESS_CODING … … 471 450 Void setMergeIndex ( UInt uiIdx, UInt uiMergeIndex ) { m_puhMergeIndex[uiIdx] = uiMergeIndex; } 472 451 Void setMergeIndexSubParts ( UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 452 453 #if MERL_VSP_C0152 454 Char* getVSPIndex () { return m_piVSPIndex; } 455 Char getVSPIndex ( UInt uiIdx ) { return m_piVSPIndex[uiIdx]; } 456 Void setVSPIndex ( UInt uiIdx, Int n ) { m_piVSPIndex[uiIdx] = n; } 457 Void setVSPIndexSubParts( Char bVSPIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 458 #endif 459 473 460 template <typename T> 474 461 Void setSubPart ( T bParameter, T* pbBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ); … … 479 466 Void setICFlag ( UInt uiIdx, Bool uh ) { m_pbICFlag[uiIdx] = uh; } 480 467 Void setICFlagSubParts ( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 468 #if LGE_ILLUCOMP_DEPTH_C0046 469 Bool isICFlagRequired (UInt uiAbsPartIdx, UInt uiDepth); //This modification is not needed after integrating JCT3V-C0137 470 #else 481 471 Bool isICFlagRequired (UInt uiAbsPartIdx); 472 #endif 482 473 #endif 483 474 … … 517 508 Void setIPCMFlagSubParts (Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth); 518 509 519 #if BURST_IPCM520 510 Int getNumSucIPCM () { return m_numSucIPCM; } 521 511 Void setNumSucIPCM ( Int num ) { m_numSucIPCM = num; } 522 512 Bool getLastCUSucIPCMFlag () { return m_lastCUSucIPCMFlag; } 523 513 Void setLastCUSucIPCMFlag ( Bool flg ) { m_lastCUSucIPCMFlag = flg; } 524 #endif525 514 526 515 /// get slice ID for SU … … 539 528 ,Bool bIndependentTileBoundaryEnabled ); 540 529 541 #if HHI_INTER_VIEW_MOTION_PRED 542 #if !QC_MULTI_DIS_CAN_A0097 543 Int getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ); 544 Bool getPdmMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false ); 530 #if H3D_IVMP 531 #if !H3D_NBDV 532 Int getPdmMergeCandidate ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ); 533 Bool getPdmMvPred ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false ); 534 #else //!H3D_NBDV 535 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051 536 Bool getUnifiedMvPredCan ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge ); 537 #else //QC_AMVP_MRG_UNIFY_IVCAN_C0051 538 Bool getPdmMvPredDisCan ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false ); 539 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm ); 540 #endif //QC_AMVP_MRG_UNIFY_IVCAN_C0051 541 Void getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo ); 542 Void getDisMvpCandNBDV( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo , Bool bParMerg = false 543 #if MERL_VSP_C0152 544 , Bool bDepthRefine = false 545 #endif //MERL_VSP_C0152 546 ); 547 #endif // !H3D_NBDV 548 549 550 551 #if MERL_VSP_C0152 552 #if LGE_SIMP_DVP_REFINE_C0112 553 Pel getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec, Bool bSimpleDvpRefine = false); 554 Void estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred, Bool bSimpleDvpRefine = false); 545 555 #else 546 Bool getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false ); 547 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 548 #if QC_MRG_CANS_B0048 549 , Int* iPdm 550 #endif 551 ); 552 Void getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo ); 553 #if LGE_DVMCP_A0126 554 #if QC_SIMPLE_NBDV_B0047 555 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo 556 #if LGE_IVMP_PARALLEL_MERGE_B0136 557 , Bool bParMerg = false 558 #endif 559 ); 560 #else 561 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1 562 #if LGE_IVMP_PARALLEL_MERGE_B0136 563 , Bool bParMerg = false 564 #endif 565 ); 566 #endif 567 #endif 568 556 Pel getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec); 557 Void estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred); 558 #endif 569 559 #endif 570 560 Bool getIViewOrgDepthMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv ); 571 #endif 572 #if H HI_INTER_VIEW_RESIDUAL_PRED561 #endif // H3D_IVMP 562 #if H3D_IVRP 573 563 Bool* getResPredAvail () { return m_pbResPredAvailable; } 574 564 Bool getResPredAvail ( UInt uiIdx ) { return m_pbResPredAvailable[uiIdx]; } … … 583 573 Void setResPredIndicator ( Bool bAv, Bool bRP ) { m_pbResPredAvailable[0] = bAv; m_pbResPredFlag[0] = bRP; } 584 574 #endif 585 #if HHI_INTER_VIEW_RESIDUAL_PRED 586 Bool getResidualSamples( UInt uiPartIdx, 587 #if QC_SIMPLIFIEDIVRP_M24938 588 Bool bRecon , 589 #endif 590 TComYuv* pcYuv = 0 ); 575 #if H3D_IVRP 576 Bool getResidualSamples( UInt uiPartIdx, Bool bRecon, TComYuv* pcYuv = 0 ); 591 577 #endif 592 578 // ------------------------------------------------------------------------------------------------------------------- … … 598 584 Void getPartIndexAndSize ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight ); 599 585 #endif 600 #if LG_RESTRICTEDRESPRED_M24766 586 #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 601 587 Int getResiPredMode(UInt uiPartAddr); 602 588 Void getPUResiPredShift (Int *iPUPredResiShift, UInt uiAbsPartIndex); … … 612 598 613 599 AMVP_MODE getAMVPMode ( UInt uiIdx ); 614 #if SHARP_INTERVIEW_DECOUPLE_B0111600 #if H3D_IVMP 615 601 Void fillMvpCandBase ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); 616 602 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo , Int iMVPIdx=-1); 617 #else 618 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); 619 #endif 620 #if PARALLEL_MERGE 603 #endif 621 604 Bool isDiffMER ( Int xN, Int yN, Int xP, Int yP); 622 605 Void getPartPosition ( UInt partIdx, Int& xP, Int& yP, Int& nPSW, Int& nPSH); 623 #endif624 606 Void setMVPIdx ( RefPicList eRefPicList, UInt uiIdx, Int iMVPIdx) { m_apiMVPIdx[eRefPicList][uiIdx] = iMVPIdx; } 625 607 Int getMVPIdx ( RefPicList eRefPicList, UInt uiIdx) { return m_apiMVPIdx[eRefPicList][uiIdx]; } … … 665 647 666 648 TComDataCU* getQpMinCuLeft ( UInt& uiLPartUnitIdx , UInt uiCurrAbsIdxInLCU, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); 667 #if H0204_QP_PREDICTION668 649 TComDataCU* getQpMinCuAbove ( UInt& aPartUnitIdx , UInt currAbsIdxInLCU, Bool enforceSliceRestriction=true, Bool enforceEntropySliceRestriction=true ); 669 #endif670 #if H0736_AVC_STYLE_QP_RANGE671 650 Char getRefQP ( UInt uiCurrAbsIdxInLCU ); 672 #else673 UChar getRefQP ( UInt uiCurrAbsIdxInLCU );674 #endif675 651 676 652 TComDataCU* getPUAboveRightAdi ( UInt& uiARPartUnitIdx, UInt uiPuWidth, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); … … 684 660 685 661 Bool hasEqualMotion ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ); 686 #if SIMP_MRG_PRUN687 Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 );662 #if MERL_VSP_C0152 663 Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int* uiVSPIndexTrue, Int mrgCandIdx = -1 ); 688 664 #else 689 Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand);690 #endif 691 Void deriveLeftRightTopIdxGeneral 692 Void deriveLeftBottomIdxGeneral 665 Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 ); 666 #endif 667 Void deriveLeftRightTopIdxGeneral( PartSize eCUMode, UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); 668 Void deriveLeftBottomIdxGeneral ( PartSize eCUMode, UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLB ); 693 669 694 670 … … 723 699 UInt getCtxInterDir ( UInt uiAbsPartIdx ); 724 700 725 #if H HI_INTER_VIEW_RESIDUAL_PRED701 #if H3D_IVRP 726 702 UInt getCtxResPredFlag ( UInt uiAbsPartIdx ); 727 703 #endif … … 740 716 741 717 Double& getTotalCost() { return m_dTotalCost; } 742 #if FIX_RDO_NEGDIST743 718 Dist& getTotalDistortion() { return m_uiTotalDistortion; } 744 #else745 UInt& getTotalDistortion() { return m_uiTotalDistortion; }746 #endif747 719 UInt& getTotalBits() { return m_uiTotalBits; } 748 720 UInt& getTotalNumPart() { return m_uiNumPartition; } … … 796 768 Void setWedgePredTexTabIdx ( UInt uiIdx, UInt uh ) { m_puiWedgePredTexTabIdx[uiIdx] = uh; } 797 769 Void setWedgePredTexTabIdxSubParts ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ); 770 #if LGE_DMM3_SIMP_C0044 771 UInt* getWedgePredTexIntraTabIdx () { return m_puiWedgePredTexIntraTabIdx; } 772 UInt getWedgePredTexIntraTabIdx ( UInt uiIdx ) { return m_puiWedgePredTexIntraTabIdx[uiIdx]; } 773 Void setWedgePredTexIntraTabIdx ( UInt uiIdx, UInt uh ) { m_puiWedgePredTexIntraTabIdx[uiIdx] = uh; } 774 Void setWedgePredTexIntraTabIdxSubParts ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ); 775 #endif 798 776 Int* getWedgePredTexDeltaDC1 () { return m_piWedgePredTexDeltaDC1; } 799 777 Int getWedgePredTexDeltaDC1 ( UInt uiIdx ) { return m_piWedgePredTexDeltaDC1[uiIdx]; }
Note: See TracChangeset for help on using the changeset viewer.