HEVC Test Model (HM)  HM-16.3
TComDataCU.h
Go to the documentation of this file.
1 /* The copyright in this software is being made available under the BSD
2  * License, included below. This software may be subject to other third party
3  * and contributor rights, including patent rights, and no such rights are
4  * granted under this license.
5  *
6  * Copyright (c) 2010-2015, ITU/ISO/IEC
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  *
12  * * Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
18  * be used to endorse or promote products derived from this software without
19  * specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
25  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31  * THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
39 #ifndef __TCOMDATACU__
40 #define __TCOMDATACU__
41 
42 #include <algorithm>
43 #include <vector>
44 
45 // Include files
46 #include "CommonDef.h"
47 #include "TComMotionInfo.h"
48 #include "TComSlice.h"
49 #include "TComRdCost.h"
50 #include "TComPattern.h"
51 
54 
55 class TComTU; // forward declaration
56 
58 
59 // ====================================================================================================================
60 // Class definition
61 // ====================================================================================================================
62 
65 {
66 private:
67 
68  // -------------------------------------------------------------------------------------------------------------------
69  // class pointers
70  // -------------------------------------------------------------------------------------------------------------------
71 
74 
75  // -------------------------------------------------------------------------------------------------------------------
76  // CU description
77  // -------------------------------------------------------------------------------------------------------------------
78 
88 
89  // -------------------------------------------------------------------------------------------------------------------
90  // CU data
91  // -------------------------------------------------------------------------------------------------------------------
92 
106 #if ADAPTIVE_QP_SELECTION
107  TCoeff* m_pcArlCoeff[MAX_NUM_COMPONENT]; // ARL coefficient buffer (0->Y, 1->Cb, 2->Cr)
108  static TCoeff* m_pcGlbArlCoeff[MAX_NUM_COMPONENT]; // global ARL buffer
110 #endif
111 
113 
114  // -------------------------------------------------------------------------------------------------------------------
115  // neighbour access variables
116  // -------------------------------------------------------------------------------------------------------------------
117 
127 
128  // -------------------------------------------------------------------------------------------------------------------
129  // coding tool information
130  // -------------------------------------------------------------------------------------------------------------------
131 
134 #if AMP_MRG
136 #endif
137  UChar* m_puhIntraDir[MAX_NUM_CHANNEL_TYPE]; // 0-> Luma, 1-> Chroma
142 
143  // -------------------------------------------------------------------------------------------------------------------
144  // misc. variables
145  // -------------------------------------------------------------------------------------------------------------------
146 
154 
155 protected:
156 
158  Bool xAddMVPCand ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir );
159  Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir );
160 
161  Void deriveRightBottomIdx ( UInt uiPartIdx, UInt& ruiPartIdxRB );
162  Bool xGetColMVP( RefPicList eRefPicList, Int ctuRsAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx );
163 
165  UInt xGetMvdBits ( TComMv cMvd );
166  UInt xGetComponentBits ( Int iVal );
167 
169  Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC );
170 
171  Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter );
172 
173 public:
174  TComDataCU();
175  virtual ~TComDataCU();
176 
177  // -------------------------------------------------------------------------------------------------------------------
178  // create / destroy / initialize / copy
179  // -------------------------------------------------------------------------------------------------------------------
180 
181  Void create ( ChromaFormat chromaFormatIDC, UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize
183  , Bool bGlobalRMARLBuffer = false
184 #endif
185  );
186  Void destroy ();
187 
188  Void initCtu ( TComPic* pcPic, UInt ctuRsAddr );
189  Void initEstData ( const UInt uiDepth, const Int qp, const Bool bTransquantBypass );
190  Void initSubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp );
191  Void setOutsideCUPart ( UInt uiAbsPartIdx, UInt uiDepth );
192 
193  Void copySubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth );
194  Void copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList );
195  Void copyPartFrom ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth );
196 
197  Void copyToPic ( UChar uiDepth );
198 
199  // -------------------------------------------------------------------------------------------------------------------
200  // member functions for CU description
201  // -------------------------------------------------------------------------------------------------------------------
202 
203  TComPic* getPic () { return m_pcPic; }
204  const TComPic* getPic () const { return m_pcPic; }
205  TComSlice* getSlice () { return m_pcSlice; }
206  const TComSlice* getSlice () const { return m_pcSlice; }
207  UInt& getCtuRsAddr () { return m_ctuRsAddr; }
208  UInt getCtuRsAddr () const { return m_ctuRsAddr; }
209  UInt getZorderIdxInCtu () const { return m_absZIdxInCtu; }
210  UInt getCUPelX () const { return m_uiCUPelX; }
211  UInt getCUPelY () const { return m_uiCUPelY; }
212 
213  UChar* getDepth () { return m_puhDepth; }
214  UChar getDepth ( UInt uiIdx ) const { return m_puhDepth[uiIdx]; }
215  Void setDepth ( UInt uiIdx, UChar uh ) { m_puhDepth[uiIdx] = uh; }
216 
217  Void setDepthSubParts ( UInt uiDepth, UInt uiAbsPartIdx );
218 
219  // -------------------------------------------------------------------------------------------------------------------
220  // member functions for CU data
221  // -------------------------------------------------------------------------------------------------------------------
222 
224  PartSize getPartitionSize ( UInt uiIdx ) { return static_cast<PartSize>( m_pePartSize[uiIdx] ); }
225  Void setPartitionSize ( UInt uiIdx, PartSize uh){ m_pePartSize[uiIdx] = uh; }
226  Void setPartSizeSubParts ( PartSize eMode, UInt uiAbsPartIdx, UInt uiDepth );
227  Void setCUTransquantBypassSubParts( Bool flag, UInt uiAbsPartIdx, UInt uiDepth );
228 
229  Bool* getSkipFlag () { return m_skipFlag; }
230  Bool getSkipFlag (UInt idx) { return m_skipFlag[idx]; }
231  Void setSkipFlag ( UInt idx, Bool skip) { m_skipFlag[idx] = skip; }
232  Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth );
233 
235  PredMode getPredictionMode ( UInt uiIdx ) { return static_cast<PredMode>( m_pePredMode[uiIdx] ); }
236  Void setPredictionMode ( UInt uiIdx, PredMode uh){ m_pePredMode[uiIdx] = uh; }
237  Void setPredModeSubParts ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth );
238 
239  Char* getCrossComponentPredictionAlpha( ComponentID compID ) { return m_crossComponentPredictionAlpha[compID]; }
240  Char getCrossComponentPredictionAlpha( UInt uiIdx, ComponentID compID ) { return m_crossComponentPredictionAlpha[compID][uiIdx]; }
241 
243  Bool getCUTransquantBypass( UInt uiIdx ) { return m_CUTransquantBypass[uiIdx]; }
244 
245  UChar* getWidth () { return m_puhWidth; }
246  UChar getWidth ( UInt uiIdx ) { return m_puhWidth[uiIdx]; }
247  Void setWidth ( UInt uiIdx, UChar uh ) { m_puhWidth[uiIdx] = uh; }
248 
249  UChar* getHeight () { return m_puhHeight; }
250  UChar getHeight ( UInt uiIdx ) { return m_puhHeight[uiIdx]; }
251  Void setHeight ( UInt uiIdx, UChar uh ) { m_puhHeight[uiIdx] = uh; }
252 
253  Void setSizeSubParts ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, UInt uiDepth );
254 
255  Char* getQP () { return m_phQP; }
256  Char getQP ( UInt uiIdx ) const { return m_phQP[uiIdx]; }
257  Void setQP ( UInt uiIdx, Char value ){ m_phQP[uiIdx] = value; }
258  Void setQPSubParts ( Int qp, UInt uiAbsPartIdx, UInt uiDepth );
259  Int getLastValidPartIdx ( Int iAbsPartIdx );
260  Char getLastCodedQP ( UInt uiAbsPartIdx );
261  Void setQPSubCUs ( Int qp, UInt absPartIdx, UInt depth, Bool &foundNonZeroCbf );
262  Void setCodedQP ( Char qp ) { m_codedQP = qp; }
263  Char getCodedQP () { return m_codedQP; }
264 
266  UChar getChromaQpAdj (Int idx) const { return m_ChromaQpAdj[idx]; }
267  Void setChromaQpAdj (Int idx, UChar val) { m_ChromaQpAdj[idx] = val; }
268  Void setChromaQpAdjSubParts( UChar val, Int absPartIdx, Int depth );
269  Void setCodedChromaQpAdj ( Char qp ) { m_codedChromaQpAdj = qp; }
271 
272  Bool isLosslessCoded ( UInt absPartIdx );
273 
275  UChar getTransformIdx ( UInt uiIdx ) { return m_puhTrIdx[uiIdx]; }
276  Void setTrIdxSubParts ( UInt uiTrIdx, UInt uiAbsPartIdx, UInt uiDepth );
277 
278  UChar* getTransformSkip ( ComponentID compID ) { return m_puhTransformSkip[compID];}
279  UChar getTransformSkip ( UInt uiIdx, ComponentID compID) { return m_puhTransformSkip[compID][uiIdx];}
280  Void setTransformSkipSubParts ( UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiDepth);
281  Void setTransformSkipSubParts ( const UInt useTransformSkip[MAX_NUM_COMPONENT], UInt uiAbsPartIdx, UInt uiDepth );
282 
283  UChar* getExplicitRdpcmMode ( ComponentID component ) { return m_explicitRdpcmMode[component]; }
284  UChar getExplicitRdpcmMode ( ComponentID component, UInt partIdx ) {return m_explicitRdpcmMode[component][partIdx]; }
285  Void setExplicitRdpcmModePartRange ( UInt rdpcmMode, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );
286 
288 
289  Void setCrossComponentPredictionAlphaPartRange ( Char alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );
290  Void setTransformSkipPartRange ( UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );
291 
293 
294  TComCUMvField* getCUMvField ( RefPicList e ) { return &m_acCUMvField[e]; }
295 
296  TCoeff* getCoeff (ComponentID component) { return m_pcTrCoeff[component]; }
297 
298 #if ADAPTIVE_QP_SELECTION
299  TCoeff* getArlCoeff ( ComponentID component ) { return m_pcArlCoeff[component]; }
300 #endif
301  Pel* getPCMSample ( ComponentID component ) { return m_pcIPCMSample[component]; }
302 
303  UChar getCbf ( UInt uiIdx, ComponentID eType ) { return m_puhCbf[eType][uiIdx]; }
304  UChar* getCbf ( ComponentID eType ) { return m_puhCbf[eType]; }
305  UChar getCbf ( UInt uiIdx, ComponentID eType, UInt uiTrDepth ) { return ( ( getCbf( uiIdx, eType ) >> uiTrDepth ) & 0x1 ); }
306  Void setCbf ( UInt uiIdx, ComponentID eType, UChar uh ) { m_puhCbf[eType][uiIdx] = uh; }
307  Void clearCbf ( UInt uiIdx, ComponentID eType, UInt uiNumParts );
308  UChar getQtRootCbf ( UInt uiIdx );
309 
310  Void setCbfSubParts ( const UInt uiCbf[MAX_NUM_COMPONENT], UInt uiAbsPartIdx, UInt uiDepth );
311  Void setCbfSubParts ( UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiDepth );
312  Void setCbfSubParts ( UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
313 
314  Void setCbfPartRange ( UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );
315  Void bitwiseOrCbfPartRange ( UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );
316 
317  // -------------------------------------------------------------------------------------------------------------------
318  // member functions for coding tool information
319  // -------------------------------------------------------------------------------------------------------------------
320 
322  Bool getMergeFlag ( UInt uiIdx ) { return m_pbMergeFlag[uiIdx]; }
323  Void setMergeFlag ( UInt uiIdx, Bool b ) { m_pbMergeFlag[uiIdx] = b; }
324  Void setMergeFlagSubParts ( Bool bMergeFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
325 
327  UChar getMergeIndex ( UInt uiIdx ) { return m_puhMergeIndex[uiIdx]; }
328  Void setMergeIndex ( UInt uiIdx, UInt uiMergeIndex ) { m_puhMergeIndex[uiIdx] = uiMergeIndex; }
329  Void setMergeIndexSubParts ( UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
330  template <typename T>
331  Void setSubPart ( T bParameter, T* pbBaseCtu, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
332 
333 #if AMP_MRG
334  Void setMergeAMP( Bool b ) { m_bIsMergeAMP = b; }
336 #endif
337 
338  UChar* getIntraDir ( const ChannelType channelType ) const { return m_puhIntraDir[channelType]; }
339  UChar getIntraDir ( const ChannelType channelType, const UInt uiIdx ) const { return m_puhIntraDir[channelType][uiIdx]; }
340 
341  Void setIntraDirSubParts ( const ChannelType channelType,
342  const UInt uiDir,
343  const UInt uiAbsPartIdx,
344  const UInt uiDepth );
345 
347  UChar getInterDir ( UInt uiIdx ) { return m_puhInterDir[uiIdx]; }
348  Void setInterDir ( UInt uiIdx, UChar uh ) { m_puhInterDir[uiIdx] = uh; }
349  Void setInterDirSubParts ( UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
350  Bool* getIPCMFlag () { return m_pbIPCMFlag; }
351  Bool getIPCMFlag (UInt uiIdx ) { return m_pbIPCMFlag[uiIdx]; }
352  Void setIPCMFlag (UInt uiIdx, Bool b ) { m_pbIPCMFlag[uiIdx] = b; }
353  Void setIPCMFlagSubParts (Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth);
354 
355  // -------------------------------------------------------------------------------------------------------------------
356  // member functions for accessing partition information
357  // -------------------------------------------------------------------------------------------------------------------
358 
359  Void getPartIndexAndSize ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight ); // This is for use by a leaf/sub CU object only, with no additional AbsPartIdx
360  UChar getNumPartitions ( const UInt uiAbsPartIdx = 0 );
361  Bool isFirstAbsZorderIdxInDepth (UInt uiAbsPartIdx, UInt uiDepth);
362 
363  // -------------------------------------------------------------------------------------------------------------------
364  // member functions for motion vector
365  // -------------------------------------------------------------------------------------------------------------------
366 
367  Void getMvField ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField& rcMvField );
368 
369  Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo );
370  Bool isDiffMER ( Int xN, Int yN, Int xP, Int yP);
371  Void getPartPosition ( UInt partIdx, Int& xP, Int& yP, Int& nPSW, Int& nPSH);
372 
373  Void setMVPIdx ( RefPicList eRefPicList, UInt uiIdx, Int iMVPIdx) { m_apiMVPIdx[eRefPicList][uiIdx] = iMVPIdx; }
374  Int getMVPIdx ( RefPicList eRefPicList, UInt uiIdx) { return m_apiMVPIdx[eRefPicList][uiIdx]; }
375  Char* getMVPIdx ( RefPicList eRefPicList ) { return m_apiMVPIdx[eRefPicList]; }
376 
377  Void setMVPNum ( RefPicList eRefPicList, UInt uiIdx, Int iMVPNum ) { m_apiMVPNum[eRefPicList][uiIdx] = iMVPNum; }
378  Int getMVPNum ( RefPicList eRefPicList, UInt uiIdx ) { return m_apiMVPNum[eRefPicList][uiIdx]; }
379  Char* getMVPNum ( RefPicList eRefPicList ) { return m_apiMVPNum[eRefPicList]; }
380 
381  Void setMVPIdxSubParts ( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
382  Void setMVPNumSubParts ( Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
383 
384  Void clipMv ( TComMv& rcMv );
385  Void getMvPredLeft ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldA.getMv(); }
386  Void getMvPredAbove ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldB.getMv(); }
387  Void getMvPredAboveRight ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldC.getMv(); }
388 
389  Void compressMV ();
390 
391  // -------------------------------------------------------------------------------------------------------------------
392  // utility functions for neighbouring information
393  // -------------------------------------------------------------------------------------------------------------------
394 
399  TComDataCU* getCUColocated ( RefPicList eRefPicList ) { return m_apcCUColocated[eRefPicList]; }
400  Bool CUIsFromSameSlice ( const TComDataCU *pCU /* Can be NULL */) const { return ( pCU!=NULL && pCU->getSlice()->getSliceCurStartCtuTsAddr() == getSlice()->getSliceCurStartCtuTsAddr() ); }
401  Bool CUIsFromSameTile ( const TComDataCU *pCU /* Can be NULL */) const;
402  Bool CUIsFromSameSliceAndTile ( const TComDataCU *pCU /* Can be NULL */) const;
403  Bool CUIsFromSameSliceTileAndWavefrontRow( const TComDataCU *pCU /* Can be NULL */) const;
404  Bool isLastSubCUOfCtu(const UInt absPartIdx);
405 
406 
407  TComDataCU* getPULeft ( UInt& uiLPartUnitIdx,
408  UInt uiCurrPartUnitIdx,
409  Bool bEnforceSliceRestriction=true,
410  Bool bEnforceTileRestriction=true );
411  TComDataCU* getPUAbove ( UInt& uiAPartUnitIdx,
412  UInt uiCurrPartUnitIdx,
413  Bool bEnforceSliceRestriction=true,
414  Bool planarAtCTUBoundary = false,
415  Bool bEnforceTileRestriction=true );
416  TComDataCU* getPUAboveLeft ( UInt& uiALPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true );
417  TComDataCU* getPUAboveRight ( UInt& uiARPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true );
418  TComDataCU* getPUBelowLeft ( UInt& uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true );
419 
420  TComDataCU* getQpMinCuLeft ( UInt& uiLPartUnitIdx , UInt uiCurrAbsIdxInCtu );
421  TComDataCU* getQpMinCuAbove ( UInt& uiAPartUnitIdx , UInt uiCurrAbsIdxInCtu );
422  Char getRefQP ( UInt uiCurrAbsIdxInCtu );
423 
424  TComDataCU* getPUAboveRightAdi ( UInt& uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true );
425  TComDataCU* getPUBelowLeftAdi ( UInt& uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true );
426 
427  Void deriveLeftRightTopIdx ( UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT );
428  Void deriveLeftBottomIdx ( UInt uiPartIdx, UInt& ruiPartIdxLB );
429 
430  Void deriveLeftRightTopIdxAdi ( UInt& ruiPartIdxLT, UInt& ruiPartIdxRT, UInt uiPartOffset, UInt uiPartDepth );
431  Void deriveLeftBottomIdxAdi ( UInt& ruiPartIdxLB, UInt uiPartOffset, UInt uiPartDepth ); // NOTE: Unused function.
432 
433  Bool hasEqualMotion ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx );
434  Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 );
435 
436  Void deriveLeftRightTopIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT );
437  Void deriveLeftBottomIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLB );
438 
439  // -------------------------------------------------------------------------------------------------------------------
440  // member functions for modes
441  // -------------------------------------------------------------------------------------------------------------------
442 
443  Bool isIntra ( UInt uiPartIdx ) const { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; }
444  Bool isInter ( UInt uiPartIdx ) const { return m_pePredMode[ uiPartIdx ] == MODE_INTER; }
445  Bool isSkipped ( UInt uiPartIdx );
446  Bool isBipredRestriction( UInt puIdx );
447 
448  // -------------------------------------------------------------------------------------------------------------------
449  // member functions for symbol prediction (most probable / mode conversion)
450  // -------------------------------------------------------------------------------------------------------------------
451 
452  UInt getIntraSizeIdx ( UInt uiAbsPartIdx );
453 
454  Void getAllowedChromaDir ( UInt uiAbsPartIdx, UInt* uiModeList );
455  Void getIntraDirPredictor ( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode = NULL );
456 
457  // -------------------------------------------------------------------------------------------------------------------
458  // member functions for SBAC context
459  // -------------------------------------------------------------------------------------------------------------------
460 
461  UInt getCtxSplitFlag ( UInt uiAbsPartIdx, UInt uiDepth );
462  UInt getCtxQtCbf ( TComTU &rTu, const ChannelType chType );
463 
464  UInt getCtxSkipFlag ( UInt uiAbsPartIdx );
465  UInt getCtxInterDir ( UInt uiAbsPartIdx );
466 
468  // -------------------------------------------------------------------------------------------------------------------
469  // member functions for RD cost storage
470  // -------------------------------------------------------------------------------------------------------------------
471 
476 
477  UInt getCoefScanIdx(const UInt uiAbsPartIdx, const UInt uiWidth, const UInt uiHeight, const ComponentID compID) const ;
478 
479 };
480 
481 namespace RasterAddress
482 {
489  static inline Bool isEqualCol( Int addrA, Int addrB, Int numUnitsPerRow )
490  {
491  // addrA % numUnitsPerRow == addrB % numUnitsPerRow
492  return (( addrA ^ addrB ) & ( numUnitsPerRow - 1 ) ) == 0;
493  }
494 
501  static inline Bool isEqualRow( Int addrA, Int addrB, Int numUnitsPerRow )
502  {
503  // addrA / numUnitsPerRow == addrB / numUnitsPerRow
504  return (( addrA ^ addrB ) &~ ( numUnitsPerRow - 1 ) ) == 0;
505  }
506 
513  static inline Bool isEqualRowOrCol( Int addrA, Int addrB, Int numUnitsPerRow )
514  {
515  return isEqualCol( addrA, addrB, numUnitsPerRow ) | isEqualRow( addrA, addrB, numUnitsPerRow );
516  }
517 
523  static inline Bool isZeroCol( Int addr, Int numUnitsPerRow )
524  {
525  // addr % numUnitsPerRow == 0
526  return ( addr & ( numUnitsPerRow - 1 ) ) == 0;
527  }
528 
534  static inline Bool isZeroRow( Int addr, Int numUnitsPerRow )
535  {
536  // addr / numUnitsPerRow == 0
537  return ( addr &~ ( numUnitsPerRow - 1 ) ) == 0;
538  }
539 
546  static inline Bool lessThanCol( Int addr, Int val, Int numUnitsPerRow )
547  {
548  // addr % numUnitsPerRow < val
549  return ( addr & ( numUnitsPerRow - 1 ) ) < val;
550  }
551 
558  static inline Bool lessThanRow( Int addr, Int val, Int numUnitsPerRow )
559  {
560  // addr / numUnitsPerRow < val
561  return addr < val * numUnitsPerRow;
562  }
563 }
564 
566 
567 #endif
Char * m_apiMVPIdx[NUM_REF_PIC_LIST_01]
array of motion vector predictor candidates
Definition: TComDataCU.h:139
TComDataCU * getPUAboveLeft(UInt &uiALPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true)
Void setIPCMFlag(UInt uiIdx, Bool b)
Definition: TComDataCU.h:352
Char * getQP()
Definition: TComDataCU.h:255
UInt m_absZIdxInCtu
absolute address in a CTU. It's Z scan order
Definition: TComDataCU.h:80
Void setMVPNumSubParts(Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth)
UInt m_uiTotalBins
sum of partition bins
Definition: TComDataCU.h:151
UInt & getTotalBins()
Definition: TComDataCU.h:467
CU data structure class.
Definition: TComDataCU.h:64
TCoeff * getArlCoeff(ComponentID component)
Definition: TComDataCU.h:299
ChannelType
Definition: TypeDef.h:361
UChar getQtRootCbf(UInt uiIdx)
UChar * m_puhDepth
array of depths
Definition: TComDataCU.h:86
Char getQP(UInt uiIdx) const
Definition: TComDataCU.h:256
UChar getTransformIdx(UInt uiIdx)
Definition: TComDataCU.h:275
Void setMergeFlagSubParts(Bool bMergeFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth)
picture class (symbol + YUV buffers)
Definition: TComPic.h:56
Defines constants, macros and tool parameters.
UInt Distortion
distortion measurement
Definition: TypeDef.h:703
Char * m_pePartSize
array of partition sizes
Definition: TComDataCU.h:94
void Void
Definition: TypeDef.h:285
UChar getDepth(UInt uiIdx) const
Definition: TComDataCU.h:214
Void create(ChromaFormat chromaFormatIDC, UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize, Bool bGlobalRMARLBuffer=false)
Definition: TComDataCU.cpp:114
Void getMvPredAboveRight(TComMv &rcMvPred)
Definition: TComDataCU.h:387
PartSize getPartitionSize(UInt uiIdx)
Definition: TComDataCU.h:224
UChar * getExplicitRdpcmMode(ComponentID component)
Definition: TComDataCU.h:283
TComDataCU * getPUBelowLeft(UInt &uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true)
UInt getCtxSplitFlag(UInt uiAbsPartIdx, UInt uiDepth)
UChar getCbf(UInt uiIdx, ComponentID eType, UInt uiTrDepth)
Definition: TComDataCU.h:305
UChar * getTransformIdx()
Definition: TComDataCU.h:274
Void setPredictionMode(UInt uiIdx, PredMode uh)
Definition: TComDataCU.h:236
#define NULL
Definition: CommonDef.h:100
TComMv const & getMv() const
Bool isSkipped(UInt uiPartIdx)
returns true, if the partiton is skipped
Void setMergeFlag(UInt uiIdx, Bool b)
Definition: TComDataCU.h:323
Char getCodedChromaQpAdj()
Definition: TComDataCU.h:270
class for motion vector with reference index
static Bool isEqualCol(Int addrA, Int addrB, Int numUnitsPerRow)
Definition: TComDataCU.h:489
slice header and SPS class (header)
UInt m_uiTotalBits
sum of partition bits
Definition: TComDataCU.h:150
Void getMvPredLeft(TComMv &rcMvPred)
Definition: TComDataCU.h:385
PredMode getPredictionMode(UInt uiIdx)
Definition: TComDataCU.h:235
char Char
Definition: TypeDef.h:291
RD cost computation classes (header)
unsigned int UInt
Definition: TypeDef.h:297
Bool * getSkipFlag()
Definition: TComDataCU.h:229
TComDataCU * getPULeft(UInt &uiLPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceTileRestriction=true)
TComPic * m_pcPic
picture class pointer
Definition: TComDataCU.h:72
Bool getMergeFlag(UInt uiIdx)
Definition: TComDataCU.h:322
Bool isRDPCMEnabled(UInt uiAbsPartIdx)
Definition: TComDataCU.h:287
TComDataCU * getCtuAboveLeft()
Definition: TComDataCU.h:397
Bool isFirstAbsZorderIdxInDepth(UInt uiAbsPartIdx, UInt uiDepth)
Short Pel
pixel type
Definition: TypeDef.h:692
Char * getMVPNum(RefPicList eRefPicList)
Definition: TComDataCU.h:379
Bool CUIsFromSameTile(const TComDataCU *pCU) const
Definition: TComDataCU.cpp:396
Void initCtu(TComPic *pcPic, UInt ctuRsAddr)
Definition: TComDataCU.cpp:448
TComDataCU * getCtuAboveRight()
Definition: TComDataCU.h:398
UInt getIntraSizeIdx(UInt uiAbsPartIdx)
static Bool isEqualRowOrCol(Int addrA, Int addrB, Int numUnitsPerRow)
Definition: TComDataCU.h:513
Void initSubCU(TComDataCU *pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp)
Definition: TComDataCU.cpp:635
Char getLastCodedQP(UInt uiAbsPartIdx)
UChar getNumPartitions(const UInt uiAbsPartIdx=0)
UChar * m_puhCbf[MAX_NUM_COMPONENT]
array of coded block flags (CBF)
Definition: TComDataCU.h:103
UChar * m_puhMergeIndex
array of merge candidate indices
Definition: TComDataCU.h:133
Void copyPartFrom(TComDataCU *pcCU, UInt uiPartUnitIdx, UInt uiDepth)
Definition: TComDataCU.cpp:871
UChar getTransformSkip(UInt uiIdx, ComponentID compID)
Definition: TComDataCU.h:279
Void setOutsideCUPart(UInt uiAbsPartIdx, UInt uiDepth)
Definition: TComDataCU.cpp:728
UChar * getMergeIndex()
Definition: TComDataCU.h:326
TComMvField m_cMvFieldA
motion vector of position A
Definition: TComDataCU.h:123
UChar * getInterDir()
Definition: TComDataCU.h:346
Void setWidth(UInt uiIdx, UChar uh)
Definition: TComDataCU.h:247
TComDataCU * getCUColocated(RefPicList eRefPicList)
Definition: TComDataCU.h:399
Void setPartitionSize(UInt uiIdx, PartSize uh)
Definition: TComDataCU.h:225
UChar getCbf(UInt uiIdx, ComponentID eType)
Definition: TComDataCU.h:303
UInt getCtxQtCbf(TComTU &rTu, const ChannelType chType)
UChar * m_puhTrIdx
array of transform indices
Definition: TComDataCU.h:101
Void setIntraDirSubParts(const ChannelType channelType, const UInt uiDir, const UInt uiAbsPartIdx, const UInt uiDepth)
Bool getSkipFlag(UInt idx)
Definition: TComDataCU.h:230
UInt getZorderIdxInCtu() const
Definition: TComDataCU.h:209
Distortion & getTotalDistortion()
Definition: TComDataCU.h:473
Bool m_bDecSubCu
indicates decoder-mode
Definition: TComDataCU.h:147
static Bool lessThanCol(Int addr, Int val, Int numUnitsPerRow)
Definition: TComDataCU.h:546
TComDataCU * m_apcCUColocated[NUM_REF_PIC_LIST_01]
pointer of temporally colocated CU's for both directions
Definition: TComDataCU.h:122
Void setCrossComponentPredictionAlphaPartRange(Char alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes)
Bool CUIsFromSameSlice(const TComDataCU *pCU) const
Definition: TComDataCU.h:400
TComDataCU * m_pCtuAboveRight
pointer of above-right CTU.
Definition: TComDataCU.h:119
Bool isInter(UInt uiPartIdx) const
Definition: TComDataCU.h:444
Void getPartPosition(UInt partIdx, Int &xP, Int &yP, Int &nPSW, Int &nPSH)
Char * m_pePredMode
array of prediction modes
Definition: TComDataCU.h:95
Void setCbfPartRange(UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes)
Void setPartSizeSubParts(PartSize eMode, UInt uiAbsPartIdx, UInt uiDepth)
class for motion information in one CU
static Bool isEqualRow(Int addrA, Int addrB, Int numUnitsPerRow)
Definition: TComDataCU.h:501
Bool getUseResidualDPCM(const RDPCMSignallingMode signallingMode) const
Definition: TComSlice.h:907
Void deriveLeftBottomIdx(UInt uiPartIdx, UInt &ruiPartIdxLB)
Bool getCUTransquantBypass(UInt uiIdx)
Definition: TComDataCU.h:243
Void clearCbf(UInt uiIdx, ComponentID eType, UInt uiNumParts)
PartSize
supported partition shape
Definition: TypeDef.h:393
TComMvField m_cMvFieldB
motion vector of position B
Definition: TComDataCU.h:124
Void setTransformSkipPartRange(UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes)
Char * m_phQP
array of QP values
Definition: TComDataCU.h:98
Bool CUIsFromSameSliceTileAndWavefrontRow(const TComDataCU *pCU) const
Definition: TComDataCU.cpp:412
UInt m_uiCUPelY
CU position in a pixel (Y)
Definition: TComDataCU.h:82
Bool * getIPCMFlag()
Definition: TComDataCU.h:350
Double & getTotalCost()
Definition: TComDataCU.h:472
UChar * getIntraDir(const ChannelType channelType) const
Definition: TComDataCU.h:338
Bool m_bIsMergeAMP
Definition: TComDataCU.h:135
TComDataCU * getPUAboveRightAdi(UInt &uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset=1, Bool bEnforceSliceRestriction=true)
Void setSkipFlag(UInt idx, Bool skip)
Definition: TComDataCU.h:231
UChar * m_puhInterDir
array of inter directions
Definition: TComDataCU.h:138
Int getMVPNum(RefPicList eRefPicList, UInt uiIdx)
Definition: TComDataCU.h:378
UInt xGetMvdBits(TComMv cMvd)
compute required bits to encode MVD (used in AMVP)
Void copyToPic(UChar uiDepth)
Definition: TComDataCU.cpp:957
Bool xAddMVPCand(AMVPInfo *pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir)
add possible motion vector predictor candidates
static Bool lessThanRow(Int addr, Int val, Int numUnitsPerRow)
Definition: TComDataCU.h:558
virtual ~TComDataCU()
Definition: TComDataCU.cpp:110
bool Bool
Definition: TypeDef.h:286
Bool isIntra(UInt uiPartIdx) const
Definition: TComDataCU.h:443
Void setDepthSubParts(UInt uiDepth, UInt uiAbsPartIdx)
Void setQPSubCUs(Int qp, UInt absPartIdx, UInt depth, Bool &foundNonZeroCbf)
UChar getWidth(UInt uiIdx)
Definition: TComDataCU.h:246
Int getLastValidPartIdx(Int iAbsPartIdx)
TComDataCU * m_pCtuAbove
pointer of above CTU.
Definition: TComDataCU.h:120
Void setCUTransquantBypassSubParts(Bool flag, UInt uiAbsPartIdx, UInt uiDepth)
#define ADAPTIVE_QP_SELECTION
G382: Adaptive reconstruction levels, non-normative part for adaptive QP selection.
Definition: TypeDef.h:148
UChar getExplicitRdpcmMode(ComponentID component, UInt partIdx)
Definition: TComDataCU.h:284
Double m_dTotalCost
sum of partition RD costs
Definition: TComDataCU.h:148
Void setInterDirSubParts(UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth)
TCoeff * m_pcTrCoeff[MAX_NUM_COMPONENT]
array of transform coefficient buffers (0->Y, 1->Cb, 2->Cr)
Definition: TComDataCU.h:105
Pel * m_pcIPCMSample[MAX_NUM_COMPONENT]
PCM sample buffer (0->Y, 1->Cb, 2->Cr)
Definition: TComDataCU.h:112
Void setTransformSkipSubParts(UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiDepth)
static Bool isZeroRow(Int addr, Int numUnitsPerRow)
Definition: TComDataCU.h:534
Void copyInterPredInfoFrom(TComDataCU *pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList)
Definition: TComDataCU.cpp:827
Void deriveLeftRightTopIdxGeneral(UInt uiAbsPartIdx, UInt uiPartIdx, UInt &ruiPartIdxLT, UInt &ruiPartIdxRT)
Char getRefQP(UInt uiCurrAbsIdxInCtu)
Void getPartIndexAndSize(UInt uiPartIdx, UInt &ruiPartAddr, Int &riWidth, Int &riHeight)
UInt getCtxInterDir(UInt uiAbsPartIdx)
motion information handling classes (header)
parameters for AMVP
MVP_DIR
motion vector predictor direction used in AMVP
Definition: TypeDef.h:489
UInt & getCtuRsAddr()
Definition: TComDataCU.h:207
Void getAllowedChromaDir(UInt uiAbsPartIdx, UInt *uiModeList)
Void deriveLeftBottomIdxGeneral(UInt uiAbsPartIdx, UInt uiPartIdx, UInt &ruiPartIdxLB)
TComDataCU * getCtuLeft()
Definition: TComDataCU.h:395
UInt getCUPelY() const
Definition: TComDataCU.h:211
UChar * m_puhTransformSkip[MAX_NUM_COMPONENT]
array of transform skipping flags
Definition: TComDataCU.h:102
Int TCoeff
transform coefficient
Definition: TypeDef.h:693
Void setCbfSubParts(const UInt uiCbf[MAX_NUM_COMPONENT], UInt uiAbsPartIdx, UInt uiDepth)
Void setMergeIndex(UInt uiIdx, UInt uiMergeIndex)
Definition: TComDataCU.h:328
UChar * m_ChromaQpAdj
array of chroma QP adjustments (indexed). when value = 0, cu_chroma_qp_offset_flag=0; when value>0...
Definition: TComDataCU.h:99
RefPicList
reference list index
Definition: TypeDef.h:415
UInt getCtxSkipFlag(UInt uiAbsPartIdx)
Void compressMV()
ChromaFormat
chroma formats (according to semantics of chroma_format_idc)
Definition: TypeDef.h:352
intra-prediction mode
Definition: TypeDef.h:410
unsigned char UChar
Definition: TypeDef.h:293
Char * getCrossComponentPredictionAlpha(ComponentID compID)
Definition: TComDataCU.h:239
Bool xGetColMVP(RefPicList eRefPicList, Int ctuRsAddr, Int uiPartUnitIdx, TComMv &rcMv, Int &riRefIdx)
Distortion m_uiTotalDistortion
sum of partition distortion
Definition: TComDataCU.h:149
UInt m_uiCUPelX
CU position in a pixel (X)
Definition: TComDataCU.h:81
Char * m_apiMVPNum[NUM_REF_PIC_LIST_01]
array of number of possible motion vectors predictors
Definition: TComDataCU.h:140
UChar * getDepth()
Definition: TComDataCU.h:213
Void setChromaQpAdjSubParts(UChar val, Int absPartIdx, Int depth)
TComCUMvField m_acCUMvField[NUM_REF_PIC_LIST_01]
array of motion vectors.
Definition: TComDataCU.h:104
Bool isBipredRestriction(UInt puIdx)
Bool hasEqualMotion(UInt uiAbsPartIdx, TComDataCU *pcCandCU, UInt uiCandAbsPartIdx)
UInt & getTotalBits()
Definition: TComDataCU.h:474
UInt getCUPelX() const
Definition: TComDataCU.h:210
Bool CUIsFromSameSliceAndTile(const TComDataCU *pCU) const
Definition: TComDataCU.cpp:403
UChar getInterDir(UInt uiIdx)
Definition: TComDataCU.h:347
Char getCrossComponentPredictionAlpha(UInt uiIdx, ComponentID compID)
Definition: TComDataCU.h:240
UChar * getTransformSkip(ComponentID compID)
Definition: TComDataCU.h:278
UInt getCoefScanIdx(const UInt uiAbsPartIdx, const UInt uiWidth, const UInt uiHeight, const ComponentID compID) const
Void setSubPart(T bParameter, T *pbBaseCtu, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx)
UChar * getHeight()
Definition: TComDataCU.h:249
Void setSizeSubParts(UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, UInt uiDepth)
Void deriveLeftRightTopIdx(UInt uiPartIdx, UInt &ruiPartIdxLT, UInt &ruiPartIdxRT)
TComDataCU * m_pCtuLeft
pointer of left CTU
Definition: TComDataCU.h:121
TComDataCU * getPUAboveRight(UInt &uiARPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true)
static Bool isZeroCol(Int addr, Int numUnitsPerRow)
Definition: TComDataCU.h:523
UInt m_codedChromaQpAdj
Definition: TComDataCU.h:100
Bool * getCUTransquantBypass()
Definition: TComDataCU.h:242
UInt getSliceCurStartCtuTsAddr() const
Definition: TComSlice.h:1467
UChar * m_puhWidth
array of widths
Definition: TComDataCU.h:84
Void setMVPIdxSubParts(Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth)
Void setDepth(UInt uiIdx, UChar uh)
Definition: TComDataCU.h:215
Void getInterMergeCandidates(UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField *pcMFieldNeighbours, UChar *puhInterDirNeighbours, Int &numValidMergeCand, Int mrgCandIdx=-1)
Construct a list of merging candidates.
TComPic * getPic()
Definition: TComDataCU.h:203
Void deriveLeftRightTopIdxAdi(UInt &ruiPartIdxLT, UInt &ruiPartIdxRT, UInt uiPartOffset, UInt uiPartDepth)
Int getMVPIdx(RefPicList eRefPicList, UInt uiIdx)
Definition: TComDataCU.h:374
Void setHeight(UInt uiIdx, UChar uh)
Definition: TComDataCU.h:251
Char * m_crossComponentPredictionAlpha[MAX_NUM_COMPONENT]
array of cross-component prediction alpha values
Definition: TComDataCU.h:96
Definition: TComTU.h:48
Int xGetDistScaleFactor(Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC)
compute scaling factor from POC difference
UInt m_uiNumPartition
total number of minimum partitions in a CU
Definition: TComDataCU.h:83
Void getMvField(TComDataCU *pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField &rcMvField)
neighbouring pixel access classes (header)
Char * getPartitionSize()
Definition: TComDataCU.h:223
Void getIntraDirPredictor(UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int *piMode=0)
UInt m_ctuRsAddr
CTU (also known as LCU) address in a slice (Raster-scan address, as opposed to tile-scan/encoding ord...
Definition: TComDataCU.h:79
Void setIPCMFlagSubParts(Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth)
UChar getIntraDir(const ChannelType channelType, const UInt uiIdx) const
Definition: TComDataCU.h:339
Void setQPSubParts(Int qp, UInt uiAbsPartIdx, UInt uiDepth)
UChar getChromaQpAdj(Int idx) const
When value = 0, cu_chroma_qp_offset_flag=0; when value>0, indicates cu_chroma_qp_offset_flag=1 and cu...
Definition: TComDataCU.h:266
TComMvField m_cMvFieldC
motion vector of position C
Definition: TComDataCU.h:125
Char * getPredictionMode()
Definition: TComDataCU.h:234
TComDataCU * getCtuAbove()
Definition: TComDataCU.h:396
Bool m_ArlCoeffIsAliasedAllocation
ARL coefficient buffer is an alias of the global buffer and must not be free()'d. ...
Definition: TComDataCU.h:109
Void fillMvpCand(UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo *pInfo)
Void setCodedChromaQpAdj(Char qp)
Definition: TComDataCU.h:269
Void setInterDir(UInt uiIdx, UChar uh)
Definition: TComDataCU.h:348
Void copySubCU(TComDataCU *pcCU, UInt uiPartUnitIdx, UInt uiDepth)
Definition: TComDataCU.cpp:744
Void setTrIdxSubParts(UInt uiTrIdx, UInt uiAbsPartIdx, UInt uiDepth)
Void setCbf(UInt uiIdx, ComponentID eType, UChar uh)
Definition: TComDataCU.h:306
TComCUMvField * getCUMvField(RefPicList e)
Definition: TComDataCU.h:294
UChar * getWidth()
Definition: TComDataCU.h:245
TCoeff * getCoeff(ComponentID component)
Definition: TComDataCU.h:296
Void setQP(UInt uiIdx, Char value)
Definition: TComDataCU.h:257
Void bitwiseOrCbfPartRange(UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes)
Bool * m_CUTransquantBypass
array of cu_transquant_bypass flags
Definition: TComDataCU.h:97
int Int
Definition: TypeDef.h:296
basic motion vector class
Definition: TComMv.h:51
Char * getMVPIdx(RefPicList eRefPicList)
Definition: TComDataCU.h:375
Void setMergeAMP(Bool b)
Definition: TComDataCU.h:334
UInt & getTotalNumPart()
Definition: TComDataCU.h:475
ComponentID
Definition: TypeDef.h:368
PredMode
supported prediction type
Definition: TypeDef.h:407
Void setMVPIdx(RefPicList eRefPicList, UInt uiIdx, Int iMVPIdx)
Definition: TComDataCU.h:373
UInt getCtuRsAddr() const
Definition: TComDataCU.h:208
Void setMVPNum(RefPicList eRefPicList, UInt uiIdx, Int iMVPNum)
Definition: TComDataCU.h:377
Bool * getMergeFlag()
Definition: TComDataCU.h:321
TCoeff * m_pcArlCoeff[MAX_NUM_COMPONENT]
Definition: TComDataCU.h:107
static TCoeff * m_pcGlbArlCoeff[MAX_NUM_COMPONENT]
Definition: TComDataCU.h:108
Void deriveRightBottomIdx(UInt uiPartIdx, UInt &ruiPartIdxRB)
TComSlice * m_pcSlice
slice header pointer
Definition: TComDataCU.h:73
Void setSkipFlagSubParts(Bool skip, UInt absPartIdx, UInt depth)
Void setChromaQpAdj(Int idx, UChar val)
When val = 0, cu_chroma_qp_offset_flag=0; when val>0, indicates cu_chroma_qp_offset_flag=1 and cu_chr...
Definition: TComDataCU.h:267
UChar getHeight(UInt uiIdx)
Definition: TComDataCU.h:250
TComDataCU * m_pCtuAboveLeft
pointer of above-left CTU.
Definition: TComDataCU.h:118
TComDataCU * getQpMinCuLeft(UInt &uiLPartUnitIdx, UInt uiCurrAbsIdxInCtu)
UInt getQuadtreeTULog2MinSizeInCU(UInt uiIdx)
UChar * m_puhHeight
array of heights
Definition: TComDataCU.h:85
Bool * m_skipFlag
array of skip flags
Definition: TComDataCU.h:93
inter-prediction mode
Definition: TypeDef.h:409
Pel * getPCMSample(ComponentID component)
Definition: TComDataCU.h:301
UChar * getCbf(ComponentID eType)
Definition: TComDataCU.h:304
double Double
Definition: TypeDef.h:298
Void clipMv(TComMv &rcMv)
Bool * m_pbIPCMFlag
array of intra_pcm flags
Definition: TComDataCU.h:141
Void initEstData(const UInt uiDepth, const Int qp, const Bool bTransquantBypass)
Definition: TComDataCU.cpp:564
TComDataCU * getPUBelowLeftAdi(UInt &uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset=1, Bool bEnforceSliceRestriction=true)
TComMv m_cMvPred
motion vector predictor
Definition: TComDataCU.h:126
slice header class
Definition: TComSlice.h:1198
Bool isLastSubCUOfCtu(const UInt absPartIdx)
Definition: TComDataCU.cpp:418
Void deriveLeftBottomIdxAdi(UInt &ruiPartIdxLB, UInt uiPartOffset, UInt uiPartDepth)
Bool isLosslessCoded(UInt absPartIdx)
UChar getMergeIndex(UInt uiIdx)
Definition: TComDataCU.h:327
Char getCodedQP()
Definition: TComDataCU.h:263
Void xDeriveCenterIdx(UInt uiPartIdx, UInt &ruiPartIdxCenter)
Void setCodedQP(Char qp)
Definition: TComDataCU.h:262
static const UInt NUM_MOST_PROBABLE_MODES
Definition: TComDataCU.h:57
Bool getIPCMFlag(UInt uiIdx)
Definition: TComDataCU.h:351
Char m_codedQP
Definition: TComDataCU.h:152
UChar * getChromaQpAdj()
array of chroma QP adjustments (indexed). when value = 0, cu_chroma_qp_offset_flag=0; when value>0...
Definition: TComDataCU.h:265
const TComSlice * getSlice() const
Definition: TComDataCU.h:206
Int m_unitSize
size of a "minimum partition"
Definition: TComDataCU.h:87
Void setMergeIndexSubParts(UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth)
UChar * m_explicitRdpcmMode[MAX_NUM_COMPONENT]
Stores the explicit RDPCM mode for all TUs belonging to this CU.
Definition: TComDataCU.h:153
Bool getMergeAMP()
Definition: TComDataCU.h:335
Bool * m_pbMergeFlag
array of merge flags
Definition: TComDataCU.h:132
UInt xGetComponentBits(Int iVal)
TComDataCU * getQpMinCuAbove(UInt &uiAPartUnitIdx, UInt uiCurrAbsIdxInCtu)
Void getMvPredAbove(TComMv &rcMvPred)
Definition: TComDataCU.h:386
const TComPic * getPic() const
Definition: TComDataCU.h:204
TComSlice * getSlice()
Definition: TComDataCU.h:205
Bool xAddMVPCandOrder(AMVPInfo *pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir)
Void destroy()
Definition: TComDataCU.cpp:221
const TComSPS * getSPS() const
Definition: TComSlice.h:1306
Void setPredModeSubParts(PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth)
Bool isDiffMER(Int xN, Int yN, Int xP, Int yP)
TComDataCU * getPUAbove(UInt &uiAPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool planarAtCTUBoundary=false, Bool bEnforceTileRestriction=true)
Void setExplicitRdpcmModePartRange(UInt rdpcmMode, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes)
UChar * m_puhIntraDir[MAX_NUM_CHANNEL_TYPE]
Definition: TComDataCU.h:137