Changeset 1386 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComDataCU.h
- Timestamp:
- 13 Nov 2015, 16:29:39 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComDataCU.h
r1321 r1386 112 112 UChar* m_ucDISType; 113 113 #endif 114 Char* m_pePartSize; ///< array of partition sizes115 Char* m_pePredMode;///< array of prediction modes116 Char*m_crossComponentPredictionAlpha[MAX_NUM_COMPONENT]; ///< array of cross-component prediction alpha values114 SChar* m_pePartSize; ///< array of partition sizes 115 SChar* m_pePredMode; ///< array of prediction modes 116 SChar* m_crossComponentPredictionAlpha[MAX_NUM_COMPONENT]; ///< array of cross-component prediction alpha values 117 117 Bool* m_CUTransquantBypass; ///< array of cu_transquant_bypass flags 118 Char* m_phQP;///< array of QP values118 SChar* m_phQP; ///< array of QP values 119 119 UChar* m_ChromaQpAdj; ///< array of chroma QP adjustments (indexed). when value = 0, cu_chroma_qp_offset_flag=0; when value>0, indicates cu_chroma_qp_offset_flag=1 and cu_chroma_qp_offset_idx=value-1 120 120 UInt m_codedChromaQpAdj; … … 125 125 TCoeff* m_pcTrCoeff[MAX_NUM_COMPONENT]; ///< array of transform coefficient buffers (0->Y, 1->Cb, 2->Cr) 126 126 #if ADAPTIVE_QP_SELECTION 127 TCoeff* m_pcArlCoeff[MAX_NUM_COMPONENT]; //ARL coefficient buffer (0->Y, 1->Cb, 2->Cr)127 TCoeff* m_pcArlCoeff[MAX_NUM_COMPONENT]; ///< ARL coefficient buffer (0->Y, 1->Cb, 2->Cr) 128 128 Bool m_ArlCoeffIsAliasedAllocation; ///< ARL coefficient buffer is an alias of the global buffer and must not be free()'d 129 129 #endif … … 154 154 Bool m_bIsMergeAMP; 155 155 #endif 156 UChar* m_puhIntraDir[MAX_NUM_CHANNEL_TYPE]; // 0-> Luma, 1-> Chroma156 UChar* m_puhIntraDir[MAX_NUM_CHANNEL_TYPE]; 157 157 UChar* m_puhInterDir; ///< array of inter directions 158 Char*m_apiMVPIdx[NUM_REF_PIC_LIST_01]; ///< array of motion vector predictor candidates159 Char*m_apiMVPNum[NUM_REF_PIC_LIST_01]; ///< array of number of possible motion vectors predictors158 SChar* m_apiMVPIdx[NUM_REF_PIC_LIST_01]; ///< array of motion vector predictor candidates 159 SChar* m_apiMVPNum[NUM_REF_PIC_LIST_01]; ///< array of number of possible motion vectors predictors 160 160 Bool* m_pbIPCMFlag; ///< array of intra_pcm flags 161 161 #if NH_3D_NBDV … … 163 163 #endif 164 164 #if NH_3D_VSP 165 Char*m_piVSPFlag; ///< array of VSP flags to indicate whehter a block uses VSP or not ///< 0: non-VSP; 1: VSP165 SChar* m_piVSPFlag; ///< array of VSP flags to indicate whehter a block uses VSP or not ///< 0: non-VSP; 1: VSP 166 166 #endif 167 167 #if NH_3D_SPIVMP … … 208 208 UInt m_uiTotalBits; ///< sum of partition bits 209 209 UInt m_uiTotalBins; ///< sum of partition bins 210 Charm_codedQP;210 SChar m_codedQP; 211 211 #if NH_3D_MLC 212 212 DisInfo m_cDefaultDisInfo; ///< Default disparity information for initializing … … 219 219 protected: 220 220 221 /// add possible motion vector predictor candidates 222 Bool xAddMVPCand ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 223 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 221 /// adds a single possible motion vector predictor candidate 222 Bool xAddMVPCandUnscaled ( AMVPInfo &info, const RefPicList eRefPicList, const Int iRefIdx, const UInt uiPartUnitIdx, const MVP_DIR eDir ) const; 223 Bool xAddMVPCandWithScaling ( AMVPInfo &info, const RefPicList eRefPicList, const Int iRefIdx, const UInt uiPartUnitIdx, const MVP_DIR eDir ) const; 224 224 225 #if NH_3D_VSP 225 226 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount); … … 229 230 #endif 230 231 231 Void deriveRightBottomIdx ( UInt uiPartIdx, UInt& ruiPartIdxRB );232 Bool xGetColMVP( RefPicList eRefPicList, Int ctuRsAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx 232 Void deriveRightBottomIdx ( UInt uiPartIdx, UInt& ruiPartIdxRB ) const; 233 233 234 #if NH_3D_TMVP 234 , Bool bMRG = true235 #e ndif236 );237 235 Bool xGetColMVP ( const RefPicList eRefPicList, const Int ctuRsAddr, const Int partUnitIdx, TComMv& rcMv, Int& refIdx, Bool bMRG = true ) const; 236 #else 237 Bool xGetColMVP ( const RefPicList eRefPicList, const Int ctuRsAddr, const Int partUnitIdx, TComMv& rcMv, const Int refIdx ) const; 238 #endif 238 239 239 240 /// compute scaling factor from POC difference 240 241 #if !NH_3D_ARP 241 Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); 242 #endif 243 244 Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter ); 242 static Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); 243 #endif 244 Void xDeriveCenterIdx ( UInt uiPartIdx, UInt& ruiPartIdxCenter ) const; 245 245 246 246 #if NH_3D_VSP … … 249 249 250 250 public: 251 252 #if NH_3D_ARP 253 static Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); 254 #endif 255 251 256 TComDataCU(); 252 257 virtual ~TComDataCU(); … … 255 260 // create / destroy / initialize / copy 256 261 // ------------------------------------------------------------------------------------------------------------------- 257 #if NH_3D_ARP258 /// compute scaling factor from POC difference259 Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC );260 #endif261 262 Void create ( ChromaFormat chromaFormatIDC, UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize 262 263 #if ADAPTIVE_QP_SELECTION … … 275 276 276 277 Void copySubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx ); 277 Void copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList278 278 #if NH_3D_NBDV 279 , Bool bNBDV = false 280 #endif 281 ); 279 Void copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, Bool bNBDV = false ); 280 #else 281 Void copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList ); 282 #endif 282 283 Void copyPartFrom ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth ); 283 284 … … 315 316 // ------------------------------------------------------------------------------------------------------------------- 316 317 317 Char* getPartitionSize () { return m_pePartSize;}318 PartSize getPartitionSize ( UInt uiIdx ){ return static_cast<PartSize>( m_pePartSize[uiIdx] ); }318 SChar* getPartitionSize ( ) { return m_pePartSize; } 319 PartSize getPartitionSize ( UInt uiIdx ) const { return static_cast<PartSize>( m_pePartSize[uiIdx] ); } 319 320 Void setPartitionSize ( UInt uiIdx, PartSize uh){ m_pePartSize[uiIdx] = uh; } 320 321 Void setPartSizeSubParts ( PartSize eMode, UInt uiAbsPartIdx, UInt uiDepth ); … … 326 327 327 328 Bool* getSkipFlag () { return m_skipFlag; } 328 Bool getSkipFlag (UInt idx) { return m_skipFlag[idx];}329 Bool getSkipFlag ( UInt idx ) const { return m_skipFlag[idx]; } 329 330 Void setSkipFlag ( UInt idx, Bool skip) { m_skipFlag[idx] = skip; } 330 331 Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth ); … … 340 341 Void setDISTypeSubParts ( UChar ucDISType, UInt uiAbsPartIdx, UInt uiDepth ); 341 342 #endif 342 Char* getPredictionMode () { return m_pePredMode;}343 PredMode getPredictionMode ( UInt uiIdx ){ return static_cast<PredMode>( m_pePredMode[uiIdx] ); }343 SChar* getPredictionMode ( ) { return m_pePredMode; } 344 PredMode getPredictionMode ( UInt uiIdx ) const { return static_cast<PredMode>( m_pePredMode[uiIdx] ); } 344 345 Void setPredictionMode ( UInt uiIdx, PredMode uh){ m_pePredMode[uiIdx] = uh; } 345 346 Void setPredModeSubParts ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ); 346 347 347 348 #if NH_3D_DBBP 348 Bool* getDBBPFlag () { return m_pbDBBPFlag; }349 Bool getDBBPFlag ( UInt uiIdx ) { return m_pbDBBPFlag[uiIdx]; }349 Bool* getDBBPFlag () const { return m_pbDBBPFlag; } 350 Bool getDBBPFlag ( UInt uiIdx ) const { return m_pbDBBPFlag[uiIdx]; } 350 351 Void setDBBPFlag ( UInt uiIdx, Bool b ) { m_pbDBBPFlag[uiIdx] = b; } 351 352 Void setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); … … 353 354 #endif 354 355 355 Char* getCrossComponentPredictionAlpha( ComponentID compID ) { return m_crossComponentPredictionAlpha[compID];}356 Char getCrossComponentPredictionAlpha( UInt uiIdx, ComponentID compID ) { return m_crossComponentPredictionAlpha[compID][uiIdx];}356 SChar* getCrossComponentPredictionAlpha( ComponentID compID ) { return m_crossComponentPredictionAlpha[compID]; } 357 SChar getCrossComponentPredictionAlpha( UInt uiIdx, ComponentID compID ) { return m_crossComponentPredictionAlpha[compID][uiIdx]; } 357 358 358 359 Bool* getCUTransquantBypass () { return m_CUTransquantBypass; } 359 Bool getCUTransquantBypass ( UInt uiIdx ) { return m_CUTransquantBypass[uiIdx];}360 Bool getCUTransquantBypass ( UInt uiIdx ) const { return m_CUTransquantBypass[uiIdx]; } 360 361 361 362 UChar* getWidth () { return m_puhWidth; } 362 UChar getWidth ( UInt uiIdx ) { return m_puhWidth[uiIdx];}363 UChar getWidth ( UInt uiIdx ) const { return m_puhWidth[uiIdx]; } 363 364 Void setWidth ( UInt uiIdx, UChar uh ) { m_puhWidth[uiIdx] = uh; } 364 365 365 366 UChar* getHeight () { return m_puhHeight; } 366 UChar getHeight ( UInt uiIdx ) { return m_puhHeight[uiIdx];}367 UChar getHeight ( UInt uiIdx ) const { return m_puhHeight[uiIdx]; } 367 368 Void setHeight ( UInt uiIdx, UChar uh ) { m_puhHeight[uiIdx] = uh; } 368 369 369 370 Void setSizeSubParts ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, UInt uiDepth ); 370 371 371 Char* getQP () { return m_phQP;}372 Char getQP ( UInt uiIdx ) const { return m_phQP[uiIdx];}373 Void setQP ( UInt uiIdx, Char value ){ m_phQP[uiIdx] = value;}372 SChar* getQP ( ) { return m_phQP; } 373 SChar getQP ( UInt uiIdx ) const { return m_phQP[uiIdx]; } 374 Void setQP ( UInt uiIdx, SChar value ) { m_phQP[uiIdx] = value; } 374 375 Void setQPSubParts ( Int qp, UInt uiAbsPartIdx, UInt uiDepth ); 375 Int getLastValidPartIdx ( Int iAbsPartIdx );376 Char getLastCodedQP ( UInt uiAbsPartIdx );376 Int getLastValidPartIdx ( Int iAbsPartIdx ) const; 377 SChar getLastCodedQP ( UInt uiAbsPartIdx ) const; 377 378 Void setQPSubCUs ( Int qp, UInt absPartIdx, UInt depth, Bool &foundNonZeroCbf ); 378 Void setCodedQP ( Char qp ) { m_codedQP = qp;}379 Char getCodedQP () { return m_codedQP;}379 Void setCodedQP ( SChar qp ) { m_codedQP = qp; } 380 SChar getCodedQP ( ) const { return m_codedQP; } 380 381 381 382 UChar* getChromaQpAdj () { return m_ChromaQpAdj; } ///< array of chroma QP adjustments (indexed). when value = 0, cu_chroma_qp_offset_flag=0; when value>0, indicates cu_chroma_qp_offset_flag=1 and cu_chroma_qp_offset_idx=value-1 … … 383 384 Void setChromaQpAdj (Int idx, UChar val) { m_ChromaQpAdj[idx] = val; } ///< When val = 0, cu_chroma_qp_offset_flag=0; when val>0, indicates cu_chroma_qp_offset_flag=1 and cu_chroma_qp_offset_idx=val-1 384 385 Void setChromaQpAdjSubParts( UChar val, Int absPartIdx, Int depth ); 385 Void setCodedChromaQpAdj ( Char qp ) { m_codedChromaQpAdj = qp;}386 Char getCodedChromaQpAdj () { return m_codedChromaQpAdj;}387 388 Bool isLosslessCoded ( UInt absPartIdx );386 Void setCodedChromaQpAdj ( SChar qp ) { m_codedChromaQpAdj = qp; } 387 SChar getCodedChromaQpAdj ( ) const { return m_codedChromaQpAdj; } 388 389 Bool isLosslessCoded ( UInt absPartIdx ) const; 389 390 390 391 UChar* getTransformIdx () { return m_puhTrIdx; } 391 UChar getTransformIdx ( UInt uiIdx ) { return m_puhTrIdx[uiIdx];}392 UChar getTransformIdx ( UInt uiIdx ) const { return m_puhTrIdx[uiIdx]; } 392 393 Void setTrIdxSubParts ( UInt uiTrIdx, UInt uiAbsPartIdx, UInt uiDepth ); 393 394 394 395 UChar* getTransformSkip ( ComponentID compID ) { return m_puhTransformSkip[compID];} 395 UChar getTransformSkip ( UInt uiIdx, ComponentID compID) { return m_puhTransformSkip[compID][uiIdx];}396 UChar getTransformSkip ( UInt uiIdx, ComponentID compID ) const { return m_puhTransformSkip[compID][uiIdx]; } 396 397 Void setTransformSkipSubParts ( UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiDepth); 397 398 Void setTransformSkipSubParts ( const UInt useTransformSkip[MAX_NUM_COMPONENT], UInt uiAbsPartIdx, UInt uiDepth ); 398 399 399 400 UChar* getExplicitRdpcmMode ( ComponentID component ) { return m_explicitRdpcmMode[component]; } 400 UChar getExplicitRdpcmMode ( ComponentID component, UInt partIdx ) {return m_explicitRdpcmMode[component][partIdx]; }401 UChar getExplicitRdpcmMode ( ComponentID component, UInt partIdx ) const { return m_explicitRdpcmMode[component][partIdx]; } 401 402 Void setExplicitRdpcmModePartRange ( UInt rdpcmMode, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); 402 403 403 Bool isRDPCMEnabled ( UInt uiAbsPartIdx ){ return getSlice()->getSPS()->getSpsRangeExtension().getRdpcmEnabledFlag(isIntra(uiAbsPartIdx) ? RDPCM_SIGNAL_IMPLICIT : RDPCM_SIGNAL_EXPLICIT); }404 405 Void setCrossComponentPredictionAlphaPartRange (Char alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );404 Bool isRDPCMEnabled ( UInt uiAbsPartIdx ) const { return getSlice()->getSPS()->getSpsRangeExtension().getRdpcmEnabledFlag(isIntra(uiAbsPartIdx) ? RDPCM_SIGNAL_IMPLICIT : RDPCM_SIGNAL_EXPLICIT); } 405 406 Void setCrossComponentPredictionAlphaPartRange ( SChar alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); 406 407 Void setTransformSkipPartRange ( UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); 407 408 408 UInt getQuadtreeTULog2MinSizeInCU ( UInt uiIdx );409 UInt getQuadtreeTULog2MinSizeInCU ( UInt uiIdx ) const; 409 410 410 411 TComCUMvField* getCUMvField ( RefPicList e ) { return &m_acCUMvField[e]; } 412 const TComCUMvField* getCUMvField ( RefPicList e ) const { return &m_acCUMvField[e]; } 411 413 412 414 TCoeff* getCoeff (ComponentID component) { return m_pcTrCoeff[component]; } … … 417 419 Pel* getPCMSample ( ComponentID component ) { return m_pcIPCMSample[component]; } 418 420 419 UChar getCbf ( UInt uiIdx, ComponentID eType ) { return m_puhCbf[eType][uiIdx];}421 UChar getCbf ( UInt uiIdx, ComponentID eType ) const { return m_puhCbf[eType][uiIdx]; } 420 422 UChar* getCbf ( ComponentID eType ) { return m_puhCbf[eType]; } 421 UChar getCbf ( UInt uiIdx, ComponentID eType, UInt uiTrDepth ){ return ( ( getCbf( uiIdx, eType ) >> uiTrDepth ) & 0x1 ); }423 UChar getCbf ( UInt uiIdx, ComponentID eType, UInt uiTrDepth ) const { return ( ( getCbf( uiIdx, eType ) >> uiTrDepth ) & 0x1 ); } 422 424 Void setCbf ( UInt uiIdx, ComponentID eType, UChar uh ) { m_puhCbf[eType][uiIdx] = uh; } 423 425 Void clearCbf ( UInt uiIdx, ComponentID eType, UInt uiNumParts ); 424 UChar getQtRootCbf ( UInt uiIdx );426 UChar getQtRootCbf ( UInt uiIdx ) const; 425 427 426 428 Void setCbfSubParts ( const UInt uiCbf[MAX_NUM_COMPONENT], UInt uiAbsPartIdx, UInt uiDepth ); … … 436 438 437 439 Bool* getMergeFlag () { return m_pbMergeFlag; } 438 Bool getMergeFlag ( UInt uiIdx ) { return m_pbMergeFlag[uiIdx];}440 Bool getMergeFlag ( UInt uiIdx ) const { return m_pbMergeFlag[uiIdx]; } 439 441 Void setMergeFlag ( UInt uiIdx, Bool b ) { m_pbMergeFlag[uiIdx] = b; } 440 442 Void setMergeFlagSubParts ( Bool bMergeFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 441 443 442 444 UChar* getMergeIndex () { return m_puhMergeIndex; } 443 UChar getMergeIndex ( UInt uiIdx ) { return m_puhMergeIndex[uiIdx];}445 UChar getMergeIndex ( UInt uiIdx ) const { return m_puhMergeIndex[uiIdx]; } 444 446 Void setMergeIndex ( UInt uiIdx, UInt uiMergeIndex ) { m_puhMergeIndex[uiIdx] = uiMergeIndex; } 445 447 Void setMergeIndexSubParts ( UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); … … 453 455 #if AMP_MRG 454 456 Void setMergeAMP( Bool b ) { m_bIsMergeAMP = b; } 455 Bool getMergeAMP ( ) { return m_bIsMergeAMP;}457 Bool getMergeAMP ( ) const { return m_bIsMergeAMP; } 456 458 #endif 457 459 … … 465 467 466 468 UChar* getInterDir () { return m_puhInterDir; } 467 UChar getInterDir ( UInt uiIdx ) { return m_puhInterDir[uiIdx];}469 UChar getInterDir ( UInt uiIdx ) const { return m_puhInterDir[uiIdx]; } 468 470 Void setInterDir ( UInt uiIdx, UChar uh ) { m_puhInterDir[uiIdx] = uh; } 469 471 Void setInterDirSubParts ( UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 470 472 Bool* getIPCMFlag () { return m_pbIPCMFlag; } 471 Bool getIPCMFlag (UInt uiIdx ) { return m_pbIPCMFlag[uiIdx];}473 Bool getIPCMFlag ( UInt uiIdx ) const { return m_pbIPCMFlag[uiIdx]; } 472 474 Void setIPCMFlag (UInt uiIdx, Bool b ) { m_pbIPCMFlag[uiIdx] = b; } 473 475 Void setIPCMFlagSubParts (Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth); … … 482 484 #if NH_3D_NBDV 483 485 Void xDeriveRightBottomNbIdx(Int &uiLCUIdxRBNb, Int &uiPartIdxRBNb ); 484 Bool xCheckSpatialNBDV ( TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paMvpDvInfo,486 Bool xCheckSpatialNBDV (const TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paMvpDvInfo, 485 487 UInt uiMvpDvPos 486 488 #if NH_3D_NBDV_REF … … 525 527 #endif 526 528 #if NH_3D_ARP 527 UChar* getARPW () { return m_puhARPW; }528 UChar getARPW ( UInt uiIdx ) { return m_puhARPW[uiIdx]; }529 UChar* getARPW () const { return m_puhARPW; } 530 UChar getARPW ( UInt uiIdx ) const { return m_puhARPW[uiIdx]; } 529 531 Void setARPW ( UInt uiIdx, UChar w ) { m_puhARPW[uiIdx] = w; } 530 532 Void setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth ); … … 536 538 Void setICFlagSubParts ( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 537 539 Bool isICFlagRequired ( UInt uiAbsPartIdx ); 538 Void getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false) ;540 Void getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false) const; 539 541 #elif NH_3D_VSP 540 Void getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false) ;542 Void getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false) const; 541 543 #else 542 544 // ------------------------------------------------------------------------------------------------------------------- … … 544 546 // ------------------------------------------------------------------------------------------------------------------- 545 547 546 Void getPartIndexAndSize ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight ); // This is for use by a leaf/sub CU object only, with no additional AbsPartIdx547 #endif 548 UChar getNumPartitions ( const UInt uiAbsPartIdx = 0 );549 Bool isFirstAbsZorderIdxInDepth (UInt uiAbsPartIdx, UInt uiDepth);548 Void getPartIndexAndSize ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight ) const; // This is for use by a leaf/sub CU object only, with no additional AbsPartIdx 549 #endif 550 UChar getNumPartitions ( const UInt uiAbsPartIdx = 0 ) const; 551 Bool isFirstAbsZorderIdxInDepth ( UInt uiAbsPartIdx, UInt uiDepth ) const; 550 552 551 553 #if NH_3D_DMM … … 575 577 // ------------------------------------------------------------------------------------------------------------------- 576 578 577 Void getMvField (TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField& rcMvField );578 579 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo );580 Bool isDiffMER ( Int xN, Int yN, Int xP, Int yP);581 Void getPartPosition ( UInt partIdx, Int& xP, Int& yP, Int& nPSW, Int& nPSH);579 static Void getMvField ( const TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField& rcMvField ); 580 581 Void fillMvpCand ( const UInt uiPartIdx, const UInt uiPartAddr, const RefPicList eRefPicList, const Int iRefIdx, AMVPInfo* pInfo ) const; 582 Bool isDiffMER ( Int xN, Int yN, Int xP, Int yP ) const; 583 Void getPartPosition ( UInt partIdx, Int& xP, Int& yP, Int& nPSW, Int& nPSH ) const; 582 584 583 585 Void setMVPIdx ( RefPicList eRefPicList, UInt uiIdx, Int iMVPIdx) { m_apiMVPIdx[eRefPicList][uiIdx] = iMVPIdx; } 584 Int getMVPIdx ( RefPicList eRefPicList, UInt uiIdx) { return m_apiMVPIdx[eRefPicList][uiIdx];}585 Char* getMVPIdx ( RefPicList eRefPicList ) { return m_apiMVPIdx[eRefPicList];}586 Int getMVPIdx ( RefPicList eRefPicList, UInt uiIdx) const { return m_apiMVPIdx[eRefPicList][uiIdx]; } 587 SChar* getMVPIdx ( RefPicList eRefPicList ) { return m_apiMVPIdx[eRefPicList]; } 586 588 587 589 Void setMVPNum ( RefPicList eRefPicList, UInt uiIdx, Int iMVPNum ) { m_apiMVPNum[eRefPicList][uiIdx] = iMVPNum; } 588 Int getMVPNum ( RefPicList eRefPicList, UInt uiIdx ) { return m_apiMVPNum[eRefPicList][uiIdx];}589 Char* getMVPNum ( RefPicList eRefPicList ) { return m_apiMVPNum[eRefPicList];}590 Int getMVPNum ( RefPicList eRefPicList, UInt uiIdx ) const { return m_apiMVPNum[eRefPicList][uiIdx]; } 591 SChar* getMVPNum ( RefPicList eRefPicList ) { return m_apiMVPNum[eRefPicList]; } 590 592 591 593 Void setMVPIdxSubParts ( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 592 594 Void setMVPNumSubParts ( Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 593 595 594 Void clipMv ( TComMv& rcMv ); 596 Void clipMv ( TComMv& rcMv ) const; 597 595 598 #if NH_MV 596 599 Void checkMvVertRest (TComMv& rcMv, RefPicList eRefPicList, int iRefIdx ); 597 600 #endif 598 Void getMvPredLeft ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldA.getMv();}599 Void getMvPredAbove ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldB.getMv();}600 Void getMvPredAboveRight ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldC.getMv();}601 Void getMvPredLeft ( TComMv& rcMvPred ) const { rcMvPred = m_cMvFieldA.getMv(); } 602 Void getMvPredAbove ( TComMv& rcMvPred ) const { rcMvPred = m_cMvFieldB.getMv(); } 603 Void getMvPredAboveRight ( TComMv& rcMvPred ) const { rcMvPred = m_cMvFieldC.getMv(); } 601 604 #if NH_3D 602 605 Void compressMV ( Int scale ); … … 618 621 Bool CUIsFromSameSliceAndTile ( const TComDataCU *pCU /* Can be NULL */) const; 619 622 Bool CUIsFromSameSliceTileAndWavefrontRow( const TComDataCU *pCU /* Can be NULL */) const; 620 Bool isLastSubCUOfCtu (const UInt absPartIdx);621 622 623 TComDataCU* getPULeft ( UInt&uiLPartUnitIdx,623 Bool isLastSubCUOfCtu ( const UInt absPartIdx ) const; 624 625 626 const TComDataCU* getPULeft ( UInt& uiLPartUnitIdx, 624 627 UInt uiCurrPartUnitIdx, 625 628 Bool bEnforceSliceRestriction=true, 626 Bool bEnforceTileRestriction=true ); 627 TComDataCU* getPUAbove ( UInt& uiAPartUnitIdx, 629 Bool bEnforceTileRestriction=true ) const; 630 631 const TComDataCU* getPUAbove ( UInt& uiAPartUnitIdx, 628 632 UInt uiCurrPartUnitIdx, 629 633 Bool bEnforceSliceRestriction=true, 630 634 Bool planarAtCTUBoundary = false, 631 Bool bEnforceTileRestriction=true );632 TComDataCU* getPUAboveLeft ( UInt& uiALPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true ); 633 634 TComDataCU* getQpMinCuLeft ( UInt& uiLPartUnitIdx , UInt uiCurrAbsIdxInCtu ); 635 TComDataCU* getQpMinCuAbove ( UInt& uiAPartUnitIdx , UInt uiCurrAbsIdxInCtu );636 Char getRefQP ( UInt uiCurrAbsIdxInCtu );635 Bool bEnforceTileRestriction=true ) const; 636 637 const TComDataCU* getPUAboveLeft ( UInt& uiALPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true ) const; 638 639 const TComDataCU* getQpMinCuLeft ( UInt& uiLPartUnitIdx, UInt uiCurrAbsIdxInCtu ) const; 640 const TComDataCU* getQpMinCuAbove ( UInt& uiAPartUnitIdx, UInt uiCurrAbsIdxInCtu ) const; 637 641 638 642 /// returns CU and part index of the PU above the top row of the current uiCurrPartUnitIdx of the CU, at a horizontal offset (to the right) of uiPartUnitOffset (in parts) 639 TComDataCU* getPUAboveRight ( UInt& uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true );643 const TComDataCU* getPUAboveRight ( UInt& uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true ) const; 640 644 /// returns CU and part index of the PU left of the lefthand column of the current uiCurrPartUnitIdx of the CU, at a vertical offset (below) of uiPartUnitOffset (in parts) 641 TComDataCU* getPUBelowLeft ( UInt& uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true ); 642 643 Void deriveLeftRightTopIdx ( UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); 644 Void deriveLeftBottomIdx ( UInt uiPartIdx, UInt& ruiPartIdxLB ); 645 646 Bool hasEqualMotion ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ); 645 const TComDataCU* getPUBelowLeft ( UInt& uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true ) const; 646 647 SChar getRefQP ( UInt uiCurrAbsIdxInCtu ) const; 648 649 Void deriveLeftRightTopIdx ( UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ) const; 650 Void deriveLeftBottomIdx ( UInt uiPartIdx, UInt& ruiPartIdxLB ) const; 651 647 652 #if NH_3D 648 653 Bool hasEqualMotion ( Int dirA, const TComMvField* mvFieldA, Int dirB, const TComMvField* mvFieldB ); 649 654 #endif 655 Bool hasEqualMotion ( UInt uiAbsPartIdx, const TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ) const; 656 650 657 #if NH_3D_MLC 651 658 Bool getAvailableFlagA1() { return m_bAvailableFlagA1; } … … 670 677 , Int& numValidMergeCand, Int mrgCandIdx = -1 ); 671 678 #endif 679 #if NH_3D 672 680 Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 ); 681 #else 682 Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 ) const; 683 #endif 673 684 674 685 #if NH_3D_VSP 675 686 #if NH_3D_SPIVMP 676 Bool* getSPIVMPFlag () { return m_pbSPIVMPFlag; }677 Bool getSPIVMPFlag ( UInt uiIdx ) { return m_pbSPIVMPFlag[uiIdx]; }687 Bool* getSPIVMPFlag () const { return m_pbSPIVMPFlag; } 688 Bool getSPIVMPFlag ( UInt uiIdx ) const { return m_pbSPIVMPFlag[uiIdx]; } 678 689 Void setSPIVMPFlag ( UInt uiIdx, Bool n ) { m_pbSPIVMPFlag[uiIdx] = n; } 679 690 Void setSPIVMPFlagSubParts( Bool bSPIVMPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 680 691 #endif 681 692 682 Char* getVSPFlag (){ return m_piVSPFlag; }683 Char getVSPFlag ( UInt uiIdx ){ return m_piVSPFlag[uiIdx]; }693 SChar* getVSPFlag () const { return m_piVSPFlag; } 694 SChar getVSPFlag ( UInt uiIdx ) const { return m_piVSPFlag[uiIdx]; } 684 695 Void setVSPFlag ( UInt uiIdx, Int n ) { m_piVSPFlag[uiIdx] = n; } 685 Void setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );696 Void setVSPFlagSubParts( SChar iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 686 697 Void setMvFieldPUForVSP ( TComDataCU* cu, UInt partAddr, Int width, Int height, RefPicList refPicList, Int refIdx, Int &vspSize ); 687 698 #endif 688 Void deriveLeftRightTopIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); 689 Void deriveLeftBottomIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLB ); 690 699 Void deriveLeftRightTopIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ) const; 700 Void deriveLeftBottomIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLB ) const; 691 701 // ------------------------------------------------------------------------------------------------------------------- 692 702 // member functions for modes … … 695 705 Bool isIntra ( UInt uiPartIdx ) const { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; } 696 706 Bool isInter ( UInt uiPartIdx ) const { return m_pePredMode[ uiPartIdx ] == MODE_INTER; } 697 Bool isSkipped ( UInt uiPartIdx );///< returns true, if the partiton is skipped698 Bool isBipredRestriction ( UInt puIdx );707 Bool isSkipped ( UInt uiPartIdx ) const; ///< returns true, if the partiton is skipped 708 Bool isBipredRestriction ( UInt puIdx ) const; 699 709 700 710 // ------------------------------------------------------------------------------------------------------------------- … … 702 712 // ------------------------------------------------------------------------------------------------------------------- 703 713 704 UInt getIntraSizeIdx ( UInt uiAbsPartIdx );705 706 Void getAllowedChromaDir ( UInt uiAbsPartIdx, UInt* uiModeList );707 Void getIntraDirPredictor ( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode = NULL );714 UInt getIntraSizeIdx ( UInt uiAbsPartIdx ) const; 715 716 Void getAllowedChromaDir ( UInt uiAbsPartIdx, UInt* uiModeList ) const; 717 Void getIntraDirPredictor ( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode = NULL ) const; 708 718 709 719 // ------------------------------------------------------------------------------------------------------------------- … … 711 721 // ------------------------------------------------------------------------------------------------------------------- 712 722 713 UInt getCtxSplitFlag ( UInt uiAbsPartIdx, UInt uiDepth );714 UInt getCtxQtCbf ( TComTU &rTu, const ChannelType chType );715 716 UInt getCtxSkipFlag ( UInt uiAbsPartIdx );717 UInt getCtxInterDir ( UInt uiAbsPartIdx );723 UInt getCtxSplitFlag ( UInt uiAbsPartIdx, UInt uiDepth ) const; 724 UInt getCtxQtCbf ( TComTU &rTu, const ChannelType chType ) const; 725 726 UInt getCtxSkipFlag ( UInt uiAbsPartIdx ) const; 727 UInt getCtxInterDir ( UInt uiAbsPartIdx ) const; 718 728 #if NH_3D_ARP 719 729 UInt getCTXARPWFlag ( UInt uiAbsPartIdx );
Note: See TracChangeset for help on using the changeset viewer.