HEVC Test Model (HM)  HM-16.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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-2017, 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
109 #endif
110 
112 
113  // -------------------------------------------------------------------------------------------------------------------
114  // neighbour access variables
115  // -------------------------------------------------------------------------------------------------------------------
116 
125 
126  // -------------------------------------------------------------------------------------------------------------------
127  // coding tool information
128  // -------------------------------------------------------------------------------------------------------------------
129 
132 #if AMP_MRG
134 #endif
140 #if MCTS_ENC_CHECK
142 #endif
143 
144  // -------------------------------------------------------------------------------------------------------------------
145  // misc. variables
146  // -------------------------------------------------------------------------------------------------------------------
147 
155 
156 protected:
157 
159  Bool xAddMVPCandUnscaled ( AMVPInfo &info, const RefPicList eRefPicList, const Int iRefIdx, const UInt uiPartUnitIdx, const MVP_DIR eDir ) const;
160  Bool xAddMVPCandWithScaling ( AMVPInfo &info, const RefPicList eRefPicList, const Int iRefIdx, const UInt uiPartUnitIdx, const MVP_DIR eDir ) const;
161 
162  Void deriveRightBottomIdx ( UInt uiPartIdx, UInt& ruiPartIdxRB ) const;
163  Bool xGetColMVP ( const RefPicList eRefPicList, const Int ctuRsAddr, const Int partUnitIdx, TComMv& rcMv, const Int refIdx ) const;
164 
166  static Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC );
167 
168  Void xDeriveCenterIdx ( UInt uiPartIdx, UInt& ruiPartIdxCenter ) const;
169 
170 public:
171  TComDataCU();
172  virtual ~TComDataCU();
173 
174  // -------------------------------------------------------------------------------------------------------------------
175  // create / destroy / initialize / copy
176  // -------------------------------------------------------------------------------------------------------------------
177 
178  Void create ( ChromaFormat chromaFormatIDC, UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize
180  , TCoeff *pParentARLBuffer = 0
181 #endif
182  );
183  Void destroy ( );
184 
185  Void initCtu ( TComPic* pcPic, UInt ctuRsAddr );
186  Void initEstData ( const UInt uiDepth, const Int qp, const Bool bTransquantBypass );
187  Void initSubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp );
188  Void setOutsideCUPart ( UInt uiAbsPartIdx, UInt uiDepth );
189 
190  Void copySubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx );
191  Void copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList );
192  Void copyPartFrom ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth );
193 
194  Void copyToPic ( UChar uiDepth );
195 
196  // -------------------------------------------------------------------------------------------------------------------
197  // member functions for CU description
198  // -------------------------------------------------------------------------------------------------------------------
199 
200  TComPic* getPic ( ) { return m_pcPic; }
201  const TComPic* getPic ( ) const { return m_pcPic; }
202  TComSlice* getSlice ( ) { return m_pcSlice; }
203  const TComSlice* getSlice ( ) const { return m_pcSlice; }
204  UInt& getCtuRsAddr ( ) { return m_ctuRsAddr; }
205  UInt getCtuRsAddr ( ) const { return m_ctuRsAddr; }
206  UInt getZorderIdxInCtu ( ) const { return m_absZIdxInCtu; }
207  UInt getCUPelX ( ) const { return m_uiCUPelX; }
208  UInt getCUPelY ( ) const { return m_uiCUPelY; }
209 
210  UChar* getDepth ( ) { return m_puhDepth; }
211  UChar getDepth ( UInt uiIdx ) const { return m_puhDepth[uiIdx]; }
212  Void setDepth ( UInt uiIdx, UChar uh ) { m_puhDepth[uiIdx] = uh; }
213 
214  Void setDepthSubParts ( UInt uiDepth, UInt uiAbsPartIdx );
215 
216 #if MCTS_ENC_CHECK
219  Bool isLastColumnCTUInTile() const;
220 #endif
221 
222  // -------------------------------------------------------------------------------------------------------------------
223  // member functions for CU data
224  // -------------------------------------------------------------------------------------------------------------------
225 
227  PartSize getPartitionSize ( UInt uiIdx ) const { return static_cast<PartSize>( m_pePartSize[uiIdx] ); }
228  Void setPartitionSize ( UInt uiIdx, PartSize uh ) { m_pePartSize[uiIdx] = uh; }
229  Void setPartSizeSubParts ( PartSize eMode, UInt uiAbsPartIdx, UInt uiDepth );
230  Void setCUTransquantBypassSubParts ( Bool flag, UInt uiAbsPartIdx, UInt uiDepth );
231 
232  Bool* getSkipFlag ( ) { return m_skipFlag; }
233  Bool getSkipFlag ( UInt idx ) const { return m_skipFlag[idx]; }
234  Void setSkipFlag ( UInt idx, Bool skip ) { m_skipFlag[idx] = skip; }
235  Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth );
236 
238  PredMode getPredictionMode ( UInt uiIdx ) const { return static_cast<PredMode>( m_pePredMode[uiIdx] ); }
239  Void setPredictionMode ( UInt uiIdx, PredMode uh ) { m_pePredMode[uiIdx] = uh; }
240  Void setPredModeSubParts ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth );
241 
244 
246  Bool getCUTransquantBypass ( UInt uiIdx ) const { return m_CUTransquantBypass[uiIdx]; }
247 
248  UChar* getWidth ( ) { return m_puhWidth; }
249  UChar getWidth ( UInt uiIdx ) const { return m_puhWidth[uiIdx]; }
250  Void setWidth ( UInt uiIdx, UChar uh ) { m_puhWidth[uiIdx] = uh; }
251 
252  UChar* getHeight ( ) { return m_puhHeight; }
253  UChar getHeight ( UInt uiIdx ) const { return m_puhHeight[uiIdx]; }
254  Void setHeight ( UInt uiIdx, UChar uh ) { m_puhHeight[uiIdx] = uh; }
255 
256  Void setSizeSubParts ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, UInt uiDepth );
257 
258  SChar* getQP ( ) { return m_phQP; }
259  SChar getQP ( UInt uiIdx ) const { return m_phQP[uiIdx]; }
260  Void setQP ( UInt uiIdx, SChar value ) { m_phQP[uiIdx] = value; }
261  Void setQPSubParts ( Int qp, UInt uiAbsPartIdx, UInt uiDepth );
262  Int getLastValidPartIdx ( Int iAbsPartIdx ) const;
263  SChar getLastCodedQP ( UInt uiAbsPartIdx ) const;
264  Void setQPSubCUs ( Int qp, UInt absPartIdx, UInt depth, Bool &foundNonZeroCbf );
265  Void setCodedQP ( SChar qp ) { m_codedQP = qp; }
266  SChar getCodedQP ( ) const { return m_codedQP; }
267 
269  UChar getChromaQpAdj ( Int idx ) const { return m_ChromaQpAdj[idx]; }
270  Void setChromaQpAdj ( Int idx, UChar val ) { m_ChromaQpAdj[idx] = val; }
271  Void setChromaQpAdjSubParts ( UChar val, Int absPartIdx, Int depth );
274 
275  Bool isLosslessCoded ( UInt absPartIdx ) const;
276 
278  UChar getTransformIdx ( UInt uiIdx ) const { return m_puhTrIdx[uiIdx]; }
279  Void setTrIdxSubParts ( UInt uiTrIdx, UInt uiAbsPartIdx, UInt uiDepth );
280 
281  UChar* getTransformSkip ( ComponentID compID ) { return m_puhTransformSkip[compID]; }
282  UChar getTransformSkip ( UInt uiIdx, ComponentID compID ) const { return m_puhTransformSkip[compID][uiIdx]; }
283  Void setTransformSkipSubParts ( UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiDepth );
284  Void setTransformSkipSubParts ( const UInt useTransformSkip[MAX_NUM_COMPONENT], UInt uiAbsPartIdx, UInt uiDepth );
285 
286  UChar* getExplicitRdpcmMode ( ComponentID component ) { return m_explicitRdpcmMode[component]; }
287  UChar getExplicitRdpcmMode ( ComponentID component, UInt partIdx ) const { return m_explicitRdpcmMode[component][partIdx]; }
288  Void setExplicitRdpcmModePartRange ( UInt rdpcmMode, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );
289 
291 
292  Void setCrossComponentPredictionAlphaPartRange ( SChar alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );
293  Void setTransformSkipPartRange ( UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );
294 
295  UInt getQuadtreeTULog2MinSizeInCU ( UInt uiIdx ) const;
296 
298  const TComCUMvField* getCUMvField ( RefPicList e ) const { return &m_acCUMvField[e]; }
299 
300  TCoeff* getCoeff ( ComponentID component ) { return m_pcTrCoeff[component]; }
301 
302 #if ADAPTIVE_QP_SELECTION
303  TCoeff* getArlCoeff ( ComponentID component ) { return m_pcArlCoeff[component]; }
304 #endif
305  Pel* getPCMSample ( ComponentID component ) { return m_pcIPCMSample[component]; }
306 
307  UChar getCbf ( UInt uiIdx, ComponentID eType ) const { return m_puhCbf[eType][uiIdx]; }
308  UChar* getCbf ( ComponentID eType ) { return m_puhCbf[eType]; }
309  UChar getCbf ( UInt uiIdx, ComponentID eType, UInt uiTrDepth ) const { return ( ( getCbf( uiIdx, eType ) >> uiTrDepth ) & 0x1 ); }
310  Void setCbf ( UInt uiIdx, ComponentID eType, UChar uh ) { m_puhCbf[eType][uiIdx] = uh; }
311  Void clearCbf ( UInt uiIdx, ComponentID eType, UInt uiNumParts );
312  UChar getQtRootCbf ( UInt uiIdx ) const;
313 
314  Void setCbfSubParts ( const UInt uiCbf[MAX_NUM_COMPONENT], UInt uiAbsPartIdx, UInt uiDepth );
315  Void setCbfSubParts ( UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiDepth );
316  Void setCbfSubParts ( UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
317 
318  Void setCbfPartRange ( UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );
319  Void bitwiseOrCbfPartRange ( UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );
320 
321  // -------------------------------------------------------------------------------------------------------------------
322  // member functions for coding tool information
323  // -------------------------------------------------------------------------------------------------------------------
324 
325  Bool* getMergeFlag ( ) { return m_pbMergeFlag; }
326  Bool getMergeFlag ( UInt uiIdx ) const { return m_pbMergeFlag[uiIdx]; }
327  Void setMergeFlag ( UInt uiIdx, Bool b ) { m_pbMergeFlag[uiIdx] = b; }
328  Void setMergeFlagSubParts ( Bool bMergeFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
329 
331  UChar getMergeIndex ( UInt uiIdx ) const { return m_puhMergeIndex[uiIdx]; }
332  Void setMergeIndex ( UInt uiIdx, UInt uiMergeIndex ) { m_puhMergeIndex[uiIdx] = uiMergeIndex; }
333  Void setMergeIndexSubParts ( UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
334  template <typename T>
335  Void setSubPart ( T bParameter, T* pbBaseCtu, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
336 
337 #if AMP_MRG
339  Bool getMergeAMP ( ) const { return m_bIsMergeAMP; }
340 #endif
341 
342  UChar* getIntraDir ( const ChannelType channelType ) const { return m_puhIntraDir[channelType]; }
343  UChar getIntraDir ( const ChannelType channelType, const UInt uiIdx ) const { return m_puhIntraDir[channelType][uiIdx]; }
344 
345  Void setIntraDirSubParts ( const ChannelType channelType,
346  const UInt uiDir,
347  const UInt uiAbsPartIdx,
348  const UInt uiDepth );
349 
350  UChar* getInterDir ( ) { return m_puhInterDir; }
351  UChar getInterDir ( UInt uiIdx ) const { return m_puhInterDir[uiIdx]; }
352  Void setInterDir ( UInt uiIdx, UChar uh ) { m_puhInterDir[uiIdx] = uh; }
353  Void setInterDirSubParts ( UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
354  Bool* getIPCMFlag ( ) { return m_pbIPCMFlag; }
355  Bool getIPCMFlag ( UInt uiIdx ) const { return m_pbIPCMFlag[uiIdx]; }
356  Void setIPCMFlag ( UInt uiIdx, Bool b ) { m_pbIPCMFlag[uiIdx] = b; }
357  Void setIPCMFlagSubParts ( Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth );
358 
359  // -------------------------------------------------------------------------------------------------------------------
360  // member functions for accessing partition information
361  // -------------------------------------------------------------------------------------------------------------------
362 
363  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
364  UChar getNumPartitions ( const UInt uiAbsPartIdx = 0 ) const;
365  Bool isFirstAbsZorderIdxInDepth ( UInt uiAbsPartIdx, UInt uiDepth ) const;
366 
367  // -------------------------------------------------------------------------------------------------------------------
368  // member functions for motion vector
369  // -------------------------------------------------------------------------------------------------------------------
370 
371  static Void getMvField ( const TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField& rcMvField );
372 
373  Void fillMvpCand ( const UInt uiPartIdx, const UInt uiPartAddr, const RefPicList eRefPicList, const Int iRefIdx, AMVPInfo* pInfo ) const;
374  Bool isDiffMER ( Int xN, Int yN, Int xP, Int yP ) const;
375  Void getPartPosition ( UInt partIdx, Int& xP, Int& yP, Int& nPSW, Int& nPSH ) const;
376 
377  Void setMVPIdx ( RefPicList eRefPicList, UInt uiIdx, Int iMVPIdx) { m_apiMVPIdx[eRefPicList][uiIdx] = iMVPIdx; }
378  Int getMVPIdx ( RefPicList eRefPicList, UInt uiIdx) const { return m_apiMVPIdx[eRefPicList][uiIdx]; }
379  SChar* getMVPIdx ( RefPicList eRefPicList ) { return m_apiMVPIdx[eRefPicList]; }
380 
381  Void setMVPNum ( RefPicList eRefPicList, UInt uiIdx, Int iMVPNum ) { m_apiMVPNum[eRefPicList][uiIdx] = iMVPNum; }
382  Int getMVPNum ( RefPicList eRefPicList, UInt uiIdx ) const { return m_apiMVPNum[eRefPicList][uiIdx]; }
383  SChar* getMVPNum ( RefPicList eRefPicList ) { return m_apiMVPNum[eRefPicList]; }
384 
385  Void setMVPIdxSubParts ( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
386  Void setMVPNumSubParts ( Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
387 
388  Void clipMv ( TComMv& rcMv ) const;
389  Void getMvPredLeft ( TComMv& rcMvPred ) const { rcMvPred = m_cMvFieldA.getMv(); }
390  Void getMvPredAbove ( TComMv& rcMvPred ) const { rcMvPred = m_cMvFieldB.getMv(); }
391  Void getMvPredAboveRight ( TComMv& rcMvPred ) const { rcMvPred = m_cMvFieldC.getMv(); }
392 
393  Void compressMV ();
394 
395  // -------------------------------------------------------------------------------------------------------------------
396  // utility functions for neighbouring information
397  // -------------------------------------------------------------------------------------------------------------------
398 
403  Bool CUIsFromSameSlice ( const TComDataCU *pCU /* Can be NULL */ ) const { return ( pCU!=NULL && pCU->getSlice()->getSliceCurStartCtuTsAddr() == getSlice()->getSliceCurStartCtuTsAddr() ); }
404  Bool CUIsFromSameTile ( const TComDataCU *pCU /* Can be NULL */ ) const;
405  Bool CUIsFromSameSliceAndTile ( const TComDataCU *pCU /* Can be NULL */ ) const;
406  Bool CUIsFromSameSliceTileAndWavefrontRow( const TComDataCU *pCU /* Can be NULL */ ) const;
407  Bool isLastSubCUOfCtu ( const UInt absPartIdx ) const;
408 
409 
410  const TComDataCU* getPULeft ( UInt& uiLPartUnitIdx,
411  UInt uiCurrPartUnitIdx,
412  Bool bEnforceSliceRestriction=true,
413  Bool bEnforceTileRestriction=true ) const;
414 
415  const TComDataCU* getPUAbove ( UInt& uiAPartUnitIdx,
416  UInt uiCurrPartUnitIdx,
417  Bool bEnforceSliceRestriction=true,
418  Bool planarAtCTUBoundary = false,
419  Bool bEnforceTileRestriction=true ) const;
420 
421  const TComDataCU* getPUAboveLeft ( UInt& uiALPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true ) const;
422 
423  const TComDataCU* getQpMinCuLeft ( UInt& uiLPartUnitIdx, UInt uiCurrAbsIdxInCtu ) const;
424  const TComDataCU* getQpMinCuAbove ( UInt& uiAPartUnitIdx, UInt uiCurrAbsIdxInCtu ) const;
425 
427  const TComDataCU* getPUAboveRight ( UInt& uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true ) const;
429  const TComDataCU* getPUBelowLeft ( UInt& uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true ) const;
430 
431  SChar getRefQP ( UInt uiCurrAbsIdxInCtu ) const;
432 
433  Void deriveLeftRightTopIdx ( UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ) const;
434  Void deriveLeftBottomIdx ( UInt uiPartIdx, UInt& ruiPartIdxLB ) const;
435 
436  Bool hasEqualMotion ( UInt uiAbsPartIdx, const TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ) const;
437 #if MCTS_ENC_CHECK
438  Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, UInt& numSpatialMergeCandidates , Int mrgCandIdx = -1) const;
439 #else
440  Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 ) const;
441 #endif
442 
443  Void deriveLeftRightTopIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ) const;
444  Void deriveLeftBottomIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLB ) const;
445 
446  // -------------------------------------------------------------------------------------------------------------------
447  // member functions for modes
448  // -------------------------------------------------------------------------------------------------------------------
449 
450  Bool isIntra ( UInt uiPartIdx ) const { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; }
451  Bool isInter ( UInt uiPartIdx ) const { return m_pePredMode[ uiPartIdx ] == MODE_INTER; }
452  Bool isSkipped ( UInt uiPartIdx ) const;
453  Bool isBipredRestriction ( UInt puIdx ) const;
454 
455  // -------------------------------------------------------------------------------------------------------------------
456  // member functions for symbol prediction (most probable / mode conversion)
457  // -------------------------------------------------------------------------------------------------------------------
458 
459  UInt getIntraSizeIdx ( UInt uiAbsPartIdx ) const;
460 
461  Void getAllowedChromaDir ( UInt uiAbsPartIdx, UInt* uiModeList ) const;
462  Void getIntraDirPredictor ( UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int* piMode = NULL ) const;
463 
464  // -------------------------------------------------------------------------------------------------------------------
465  // member functions for SBAC context
466  // -------------------------------------------------------------------------------------------------------------------
467 
468  UInt getCtxSplitFlag ( UInt uiAbsPartIdx, UInt uiDepth ) const;
469  UInt getCtxQtCbf ( TComTU &rTu, const ChannelType chType ) const;
470 
471  UInt getCtxSkipFlag ( UInt uiAbsPartIdx ) const;
472  UInt getCtxInterDir ( UInt uiAbsPartIdx ) const;
473 
474  UInt& getTotalBins ( ) { return m_uiTotalBins; }
475  // -------------------------------------------------------------------------------------------------------------------
476  // member functions for RD cost storage
477  // -------------------------------------------------------------------------------------------------------------------
478 
481  UInt& getTotalBits ( ) { return m_uiTotalBits; }
483 
484  UInt getCoefScanIdx ( const UInt uiAbsPartIdx, const UInt uiWidth, const UInt uiHeight, const ComponentID compID ) const ;
485 
486 };
487 
488 namespace RasterAddress
489 {
496  static inline Bool isEqualCol( Int addrA, Int addrB, Int numUnitsPerRow )
497  {
498  // addrA % numUnitsPerRow == addrB % numUnitsPerRow
499  return (( addrA ^ addrB ) & ( numUnitsPerRow - 1 ) ) == 0;
500  }
501 
508  static inline Bool isEqualRow( Int addrA, Int addrB, Int numUnitsPerRow )
509  {
510  // addrA / numUnitsPerRow == addrB / numUnitsPerRow
511  return (( addrA ^ addrB ) &~ ( numUnitsPerRow - 1 ) ) == 0;
512  }
513 
520  static inline Bool isEqualRowOrCol( Int addrA, Int addrB, Int numUnitsPerRow )
521  {
522  return isEqualCol( addrA, addrB, numUnitsPerRow ) | isEqualRow( addrA, addrB, numUnitsPerRow );
523  }
524 
530  static inline Bool isZeroCol( Int addr, Int numUnitsPerRow )
531  {
532  // addr % numUnitsPerRow == 0
533  return ( addr & ( numUnitsPerRow - 1 ) ) == 0;
534  }
535 
541  static inline Bool isZeroRow( Int addr, Int numUnitsPerRow )
542  {
543  // addr / numUnitsPerRow == 0
544  return ( addr &~ ( numUnitsPerRow - 1 ) ) == 0;
545  }
546 
553  static inline Bool lessThanCol( Int addr, Int val, Int numUnitsPerRow )
554  {
555  // addr % numUnitsPerRow < val
556  return ( addr & ( numUnitsPerRow - 1 ) ) < val;
557  }
558 
565  static inline Bool lessThanRow( Int addr, Int val, Int numUnitsPerRow )
566  {
567  // addr / numUnitsPerRow < val
568  return addr < val * numUnitsPerRow;
569  }
570 }
571 
573 
574 #endif
Void copyPartFrom(TComDataCU *pcCU, UInt uiPartUnitIdx, UInt uiDepth)
Definition: TComDataCU.cpp:821
UInt getQuadtreeTULog2MinSizeInCU(UInt uiIdx) const
UChar getNumPartitions(const UInt uiAbsPartIdx=0) const
Void setMVPNumSubParts(Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth)
UChar getMergeIndex(UInt uiIdx) const
Definition: TComDataCU.h:331
Void initEstData(const UInt uiDepth, const Int qp, const Bool bTransquantBypass)
Definition: TComDataCU.cpp:525
SChar * getMVPIdx(RefPicList eRefPicList)
Definition: TComDataCU.h:379
UChar getWidth(UInt uiIdx) const
Definition: TComDataCU.h:249
Void setIPCMFlag(UInt uiIdx, Bool b)
Definition: TComDataCU.h:356
Int getMVPIdx(RefPicList eRefPicList, UInt uiIdx) const
Definition: TComDataCU.h:378
SChar * m_crossComponentPredictionAlpha[MAX_NUM_COMPONENT]
array of cross-component prediction alpha values
Definition: TComDataCU.h:96
UInt m_absZIdxInCtu
absolute address in a CTU. It&#39;s Z scan order
Definition: TComDataCU.h:80
Void setSkipFlagSubParts(Bool skip, UInt absPartIdx, UInt depth)
UInt m_uiTotalBins
sum of partition bins
Definition: TComDataCU.h:152
UInt & getTotalBins()
Definition: TComDataCU.h:474
SChar * getPartitionSize()
Definition: TComDataCU.h:226
Bool getIPCMFlag(UInt uiIdx) const
Definition: TComDataCU.h:355
CU data structure class.
Definition: TComDataCU.h:64
SChar m_codedQP
Definition: TComDataCU.h:153
TCoeff * getArlCoeff(ComponentID component)
Definition: TComDataCU.h:303
ChannelType
Definition: TypeDef.h:301
Bool getSkipFlag(UInt idx) const
Definition: TComDataCU.h:233
UChar * m_puhDepth
array of depths
Definition: TComDataCU.h:86
Bool CUIsFromSameTile(const TComDataCU *pCU) const
Definition: TComDataCU.cpp:371
picture class (symbol + YUV buffers)
Definition: TComPic.h:56
UChar getCbf(UInt uiIdx, ComponentID eType, UInt uiTrDepth) const
Definition: TComDataCU.h:309
Void initSubCU(TComDataCU *pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp)
Definition: TComDataCU.cpp:596
Defines version information, constants and small in-line functions.
UInt Distortion
distortion measurement
Definition: TypeDef.h:260
Void getMvPredLeft(TComMv &rcMvPred) const
Definition: TComDataCU.h:389
void Void
Definition: TypeDef.h:203
UChar getDepth(UInt uiIdx) const
Definition: TComDataCU.h:211
Void getInterMergeCandidates(UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField *pcMFieldNeighbours, UChar *puhInterDirNeighbours, Int &numValidMergeCand, UInt &numSpatialMergeCandidates, Int mrgCandIdx=-1) const
Construct a list of merging candidates.
UChar * getExplicitRdpcmMode(ComponentID component)
Definition: TComDataCU.h:286
Void deriveRightBottomIdx(UInt uiPartIdx, UInt &ruiPartIdxRB) const
Void deriveLeftBottomIdx(UInt uiPartIdx, UInt &ruiPartIdxLB) const
const TComSPSRExt & getSpsRangeExtension() const
Definition: TComSlice.h:941
SChar * getCrossComponentPredictionAlpha(ComponentID compID)
Definition: TComDataCU.h:242
Void deriveLeftRightTopIdxGeneral(UInt uiAbsPartIdx, UInt uiPartIdx, UInt &ruiPartIdxLT, UInt &ruiPartIdxRT) const
const TComDataCU * getPUBelowLeft(UInt &uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset=1, Bool bEnforceSliceRestriction=true) const
returns CU and part index of the PU left of the lefthand column of the current uiCurrPartUnitIdx of t...
Int getMVPNum(RefPicList eRefPicList, UInt uiIdx) const
Definition: TComDataCU.h:382
Void fillMvpCand(const UInt uiPartIdx, const UInt uiPartAddr, const RefPicList eRefPicList, const Int iRefIdx, AMVPInfo *pInfo) const
Void setMergeFlagSubParts(Bool bMergeFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth)
UChar * getTransformIdx()
Definition: TComDataCU.h:277
Void setPredictionMode(UInt uiIdx, PredMode uh)
Definition: TComDataCU.h:239
#define NULL
Definition: CommonDef.h:107
UChar getQtRootCbf(UInt uiIdx) const
TComMv const & getMv() const
Void initCtu(TComPic *pcPic, UInt ctuRsAddr)
Definition: TComDataCU.cpp:422
Void setMergeFlag(UInt uiIdx, Bool b)
Definition: TComDataCU.h:327
class for motion vector with reference index
static Bool isEqualCol(Int addrA, Int addrB, Int numUnitsPerRow)
Definition: TComDataCU.h:496
slice header and SPS class (header)
UInt m_uiTotalBits
sum of partition bits
Definition: TComDataCU.h:151
PartSize getPartitionSize(UInt uiIdx) const
Definition: TComDataCU.h:227
Bool isLastColumnCTUInTile() const
RD cost computation classes (header)
unsigned int UInt
Definition: TypeDef.h:212
PredMode getPredictionMode(UInt uiIdx) const
Definition: TComDataCU.h:238
Bool * getSkipFlag()
Definition: TComDataCU.h:232
SChar * getPredictionMode()
Definition: TComDataCU.h:237
Void setExplicitRdpcmModePartRange(UInt rdpcmMode, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes)
TComPic * m_pcPic
picture class pointer
Definition: TComDataCU.h:72
TComDataCU * getCtuAboveLeft()
Definition: TComDataCU.h:401
Void setQPSubCUs(Int qp, UInt absPartIdx, UInt depth, Bool &foundNonZeroCbf)
Short Pel
pixel type
Definition: TypeDef.h:249
Void setTransformSkipPartRange(UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes)
Bool getTMctsMvpIsValid()
Definition: TComDataCU.h:218
Bool CUIsFromSameSliceTileAndWavefrontRow(const TComDataCU *pCU) const
Definition: TComDataCU.cpp:387
TComDataCU * getCtuAboveRight()
Definition: TComDataCU.h:402
static Bool isEqualRowOrCol(Int addrA, Int addrB, Int numUnitsPerRow)
Definition: TComDataCU.h:520
Bool getCUTransquantBypass(UInt uiIdx) const
Definition: TComDataCU.h:246
Void setCbfPartRange(UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes)
Bool xAddMVPCandUnscaled(AMVPInfo &info, const RefPicList eRefPicList, const Int iRefIdx, const UInt uiPartUnitIdx, const MVP_DIR eDir) const
adds a single possible motion vector predictor candidate
UChar * m_puhCbf[MAX_NUM_COMPONENT]
array of coded block flags (CBF)
Definition: TComDataCU.h:103
UInt getCtxSkipFlag(UInt uiAbsPartIdx) const
UChar * m_puhMergeIndex
array of merge candidate indices
Definition: TComDataCU.h:131
Void copyInterPredInfoFrom(TComDataCU *pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList)
Definition: TComDataCU.cpp:782
UChar getCbf(UInt uiIdx, ComponentID eType) const
Definition: TComDataCU.h:307
UChar * getMergeIndex()
Definition: TComDataCU.h:330
TComMvField m_cMvFieldA
motion vector of position A
Definition: TComDataCU.h:121
UInt getCtxInterDir(UInt uiAbsPartIdx) const
UChar * getInterDir()
Definition: TComDataCU.h:350
Void setWidth(UInt uiIdx, UChar uh)
Definition: TComDataCU.h:250
const TComDataCU * getPUAboveRight(UInt &uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset=1, Bool bEnforceSliceRestriction=true) const
returns CU and part index of the PU above the top row of the current uiCurrPartUnitIdx of the CU...
Void setPartitionSize(UInt uiIdx, PartSize uh)
Definition: TComDataCU.h:228
UChar * m_puhTrIdx
array of transform indices
Definition: TComDataCU.h:101
Void clearCbf(UInt uiIdx, ComponentID eType, UInt uiNumParts)
UInt getZorderIdxInCtu() const
Definition: TComDataCU.h:206
Distortion & getTotalDistortion()
Definition: TComDataCU.h:480
virtual ~TComDataCU()
Definition: TComDataCU.cpp:105
Bool m_bDecSubCu
indicates decoder-mode
Definition: TComDataCU.h:148
static Bool lessThanCol(Int addr, Int val, Int numUnitsPerRow)
Definition: TComDataCU.h:553
Void getAllowedChromaDir(UInt uiAbsPartIdx, UInt *uiModeList) const
Void setCUTransquantBypassSubParts(Bool flag, UInt uiAbsPartIdx, UInt uiDepth)
Bool CUIsFromSameSlice(const TComDataCU *pCU) const
Definition: TComDataCU.h:403
TComDataCU * m_pCtuAboveRight
pointer of above-right CTU.
Definition: TComDataCU.h:118
Bool isInter(UInt uiPartIdx) const
Definition: TComDataCU.h:451
const TComDataCU * getQpMinCuAbove(UInt &uiAPartUnitIdx, UInt uiCurrAbsIdxInCtu) const
Void setInterDirSubParts(UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth)
SChar * m_pePartSize
array of partition sizes
Definition: TComDataCU.h:94
Void setOutsideCUPart(UInt uiAbsPartIdx, UInt uiDepth)
Definition: TComDataCU.cpp:684
class for motion information in one CU
static Bool isEqualRow(Int addrA, Int addrB, Int numUnitsPerRow)
Definition: TComDataCU.h:508
SChar * m_apiMVPIdx[NUM_REF_PIC_LIST_01]
array of motion vector predictor candidates
Definition: TComDataCU.h:137
const TComDataCU * getQpMinCuLeft(UInt &uiLPartUnitIdx, UInt uiCurrAbsIdxInCtu) const
Void setChromaQpAdjSubParts(UChar val, Int absPartIdx, Int depth)
PartSize
supported partition shape
Definition: TypeDef.h:348
TComMvField m_cMvFieldB
motion vector of position B
Definition: TComDataCU.h:122
Void setDepthSubParts(UInt uiDepth, UInt uiAbsPartIdx)
UInt m_uiCUPelY
CU position in a pixel (Y)
Definition: TComDataCU.h:82
Bool hasEqualMotion(UInt uiAbsPartIdx, const TComDataCU *pcCandCU, UInt uiCandAbsPartIdx) const
Bool * getIPCMFlag()
Definition: TComDataCU.h:354
Double & getTotalCost()
Definition: TComDataCU.h:479
UInt getIntraSizeIdx(UInt uiAbsPartIdx) const
UInt getCoefScanIdx(const UInt uiAbsPartIdx, const UInt uiWidth, const UInt uiHeight, const ComponentID compID) const
UChar * getIntraDir(const ChannelType channelType) const
Definition: TComDataCU.h:342
Bool m_bIsMergeAMP
Definition: TComDataCU.h:133
Void setSkipFlag(UInt idx, Bool skip)
Definition: TComDataCU.h:234
UChar * m_puhInterDir
array of inter directions
Definition: TComDataCU.h:136
Void setCrossComponentPredictionAlphaPartRange(SChar alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes)
signed char SChar
Definition: TypeDef.h:207
static Bool lessThanRow(Int addr, Int val, Int numUnitsPerRow)
Definition: TComDataCU.h:565
bool Bool
Definition: TypeDef.h:204
Bool isIntra(UInt uiPartIdx) const
Definition: TComDataCU.h:450
Void setPartSizeSubParts(PartSize eMode, UInt uiAbsPartIdx, UInt uiDepth)
Void setTMctsMvpIsValid(Bool b)
Definition: TComDataCU.h:217
Void setTransformSkipSubParts(UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiDepth)
TComDataCU * m_pCtuAbove
pointer of above CTU.
Definition: TComDataCU.h:119
const TComDataCU * getPULeft(UInt &uiLPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceTileRestriction=true) const
Definition: TComDataCU.cpp:985
Bool m_tMctsMvpIsValid
Definition: TComDataCU.h:141
#define ADAPTIVE_QP_SELECTION
G382: Adaptive reconstruction levels, non-normative part for adaptive QP selection.
Definition: TypeDef.h:112
Double m_dTotalCost
sum of partition RD costs
Definition: TComDataCU.h:149
Void clipMv(TComMv &rcMv) const
TCoeff * m_pcTrCoeff[MAX_NUM_COMPONENT]
array of transform coefficient buffers (0-&gt;Y, 1-&gt;Cb, 2-&gt;Cr)
Definition: TComDataCU.h:105
Pel * m_pcIPCMSample[MAX_NUM_COMPONENT]
PCM sample buffer (0-&gt;Y, 1-&gt;Cb, 2-&gt;Cr)
Definition: TComDataCU.h:111
Bool isLosslessCoded(UInt absPartIdx) const
static Bool isZeroRow(Int addr, Int numUnitsPerRow)
Definition: TComDataCU.h:541
Void setIntraDirSubParts(const ChannelType channelType, const UInt uiDir, const UInt uiAbsPartIdx, const UInt uiDepth)
Bool isRDPCMEnabled(UInt uiAbsPartIdx) const
Definition: TComDataCU.h:290
UInt getCtxSplitFlag(UInt uiAbsPartIdx, UInt uiDepth) const
Void compressMV()
Void getPartPosition(UInt partIdx, Int &xP, Int &yP, Int &nPSW, Int &nPSH) const
Bool isFirstAbsZorderIdxInDepth(UInt uiAbsPartIdx, UInt uiDepth) const
motion information handling classes (header)
parameters for AMVP
MVP_DIR
motion vector predictor direction used in AMVP
Definition: TypeDef.h:439
UInt & getCtuRsAddr()
Definition: TComDataCU.h:204
TComDataCU * getCtuLeft()
Definition: TComDataCU.h:399
Void getIntraDirPredictor(UInt uiAbsPartIdx, Int uiIntraDirPred[NUM_MOST_PROBABLE_MODES], const ComponentID compID, Int *piMode=0) const
UInt getCUPelY() const
Definition: TComDataCU.h:208
UChar * m_puhTransformSkip[MAX_NUM_COMPONENT]
array of transform skipping flags
Definition: TComDataCU.h:102
Int TCoeff
transform coefficient
Definition: TypeDef.h:250
UChar getInterDir(UInt uiIdx) const
Definition: TComDataCU.h:351
Void setMergeIndex(UInt uiIdx, UInt uiMergeIndex)
Definition: TComDataCU.h:332
UChar * m_ChromaQpAdj
array of chroma QP adjustments (indexed). when value = 0, cu_chroma_qp_offset_flag=0; when value&gt;0...
Definition: TComDataCU.h:99
RefPicList
reference list index
Definition: TypeDef.h:370
ChromaFormat
chroma formats (according to semantics of chroma_format_idc)
Definition: TypeDef.h:292
Void getMvPredAboveRight(TComMv &rcMvPred) const
Definition: TComDataCU.h:391
intra-prediction mode
Definition: TypeDef.h:365
unsigned char UChar
Definition: TypeDef.h:208
SChar getCrossComponentPredictionAlpha(UInt uiIdx, ComponentID compID)
Definition: TComDataCU.h:243
Void setSubPart(T bParameter, T *pbBaseCtu, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx)
Distortion m_uiTotalDistortion
sum of partition distortion
Definition: TComDataCU.h:150
UInt m_uiCUPelX
CU position in a pixel (X)
Definition: TComDataCU.h:81
UChar * getDepth()
Definition: TComDataCU.h:210
Void setCodedChromaQpAdj(SChar qp)
Definition: TComDataCU.h:272
TComCUMvField m_acCUMvField[NUM_REF_PIC_LIST_01]
array of motion vectors.
Definition: TComDataCU.h:104
Bool isSkipped(UInt uiPartIdx) const
returns true, if the partiton is skipped
Void setQPSubParts(Int qp, UInt uiAbsPartIdx, UInt uiDepth)
UInt & getTotalBits()
Definition: TComDataCU.h:481
Void copyToPic(UChar uiDepth)
Definition: TComDataCU.cpp:906
Void copySubCU(TComDataCU *pcCU, UInt uiPartUnitIdx)
Definition: TComDataCU.cpp:700
UInt getCUPelX() const
Definition: TComDataCU.h:207
static Void getMvField(const TComDataCU *pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField &rcMvField)
UChar * getTransformSkip(ComponentID compID)
Definition: TComDataCU.h:281
Void setIPCMFlagSubParts(Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth)
Void getPartIndexAndSize(UInt uiPartIdx, UInt &ruiPartAddr, Int &riWidth, Int &riHeight) const
SChar getCodedQP() const
Definition: TComDataCU.h:266
UChar * getHeight()
Definition: TComDataCU.h:252
static Int xGetDistScaleFactor(Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC)
compute scaling factor from POC difference
SChar getCodedChromaQpAdj() const
Definition: TComDataCU.h:273
TComDataCU * m_pCtuLeft
pointer of left CTU
Definition: TComDataCU.h:120
Void setSizeSubParts(UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, UInt uiDepth)
Void xDeriveCenterIdx(UInt uiPartIdx, UInt &ruiPartIdxCenter) const
static Bool isZeroCol(Int addr, Int numUnitsPerRow)
Definition: TComDataCU.h:530
UInt m_codedChromaQpAdj
Definition: TComDataCU.h:100
Bool * getCUTransquantBypass()
Definition: TComDataCU.h:245
UInt getSliceCurStartCtuTsAddr() const
Definition: TComSlice.h:1481
Bool xGetColMVP(const RefPicList eRefPicList, const Int ctuRsAddr, const Int partUnitIdx, TComMv &rcMv, const Int refIdx) const
Bool xAddMVPCandWithScaling(AMVPInfo &info, const RefPicList eRefPicList, const Int iRefIdx, const UInt uiPartUnitIdx, const MVP_DIR eDir) const
UChar * m_puhWidth
array of widths
Definition: TComDataCU.h:84
Void setDepth(UInt uiIdx, UChar uh)
Definition: TComDataCU.h:212
TComPic * getPic()
Definition: TComDataCU.h:200
Bool isDiffMER(Int xN, Int yN, Int xP, Int yP) const
const TComDataCU * getPUAboveLeft(UInt &uiALPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true) const
Void create(ChromaFormat chromaFormatIDC, UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize, TCoeff *pParentARLBuffer=0)
Definition: TComDataCU.cpp:109
Void setHeight(UInt uiIdx, UChar uh)
Definition: TComDataCU.h:254
Definition: TComTU.h:48
UInt m_uiNumPartition
total number of minimum partitions in a CU
Definition: TComDataCU.h:83
neighbouring pixel access classes (header)
UChar getTransformSkip(UInt uiIdx, ComponentID compID) const
Definition: TComDataCU.h:282
const TComDataCU * getPUAbove(UInt &uiAPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool planarAtCTUBoundary=false, Bool bEnforceTileRestriction=true) const
UChar getTransformIdx(UInt uiIdx) const
Definition: TComDataCU.h:278
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
Int getLastValidPartIdx(Int iAbsPartIdx) const
UChar getIntraDir(const ChannelType channelType, const UInt uiIdx) const
Definition: TComDataCU.h:343
UChar getChromaQpAdj(Int idx) const
When value = 0, cu_chroma_qp_offset_flag=0; when value&gt;0, indicates cu_chroma_qp_offset_flag=1 and cu...
Definition: TComDataCU.h:269
TComMvField m_cMvFieldC
motion vector of position C
Definition: TComDataCU.h:123
Bool getRdpcmEnabledFlag(const RDPCMSignallingMode signallingMode) const
Definition: TComSlice.h:720
TComDataCU * getCtuAbove()
Definition: TComDataCU.h:400
Void setQP(UInt uiIdx, SChar value)
Definition: TComDataCU.h:260
Bool m_ArlCoeffIsAliasedAllocation
ARL coefficient buffer is an alias of the global buffer and must not be free()&#39;d. ...
Definition: TComDataCU.h:108
Void setCbfSubParts(const UInt uiCbf[MAX_NUM_COMPONENT], UInt uiAbsPartIdx, UInt uiDepth)
SChar * m_pePredMode
array of prediction modes
Definition: TComDataCU.h:95
UInt getCtxQtCbf(TComTU &rTu, const ChannelType chType) const
Void setInterDir(UInt uiIdx, UChar uh)
Definition: TComDataCU.h:352
Void setCbf(UInt uiIdx, ComponentID eType, UChar uh)
Definition: TComDataCU.h:310
TComCUMvField * getCUMvField(RefPicList e)
Definition: TComDataCU.h:297
UChar * getWidth()
Definition: TComDataCU.h:248
TCoeff * getCoeff(ComponentID component)
Definition: TComDataCU.h:300
Void destroy()
Definition: TComDataCU.cpp:208
Bool isLastSubCUOfCtu(const UInt absPartIdx) const
Definition: TComDataCU.cpp:393
Bool * m_CUTransquantBypass
array of cu_transquant_bypass flags
Definition: TComDataCU.h:97
int Int
Definition: TypeDef.h:211
basic motion vector class
Definition: TComMv.h:51
Void setMergeAMP(Bool b)
Definition: TComDataCU.h:338
Bool CUIsFromSameSliceAndTile(const TComDataCU *pCU) const
Definition: TComDataCU.cpp:378
SChar getLastCodedQP(UInt uiAbsPartIdx) const
SChar * getMVPNum(RefPicList eRefPicList)
Definition: TComDataCU.h:383
UInt & getTotalNumPart()
Definition: TComDataCU.h:482
ComponentID
Definition: TypeDef.h:308
PredMode
supported prediction type
Definition: TypeDef.h:362
Void setMVPIdx(RefPicList eRefPicList, UInt uiIdx, Int iMVPIdx)
Definition: TComDataCU.h:377
UInt getCtuRsAddr() const
Definition: TComDataCU.h:205
Void setMVPNum(RefPicList eRefPicList, UInt uiIdx, Int iMVPNum)
Definition: TComDataCU.h:381
Bool * getMergeFlag()
Definition: TComDataCU.h:325
Void deriveLeftRightTopIdx(UInt uiPartIdx, UInt &ruiPartIdxLT, UInt &ruiPartIdxRT) const
Void setPredModeSubParts(PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth)
TCoeff * m_pcArlCoeff[MAX_NUM_COMPONENT]
ARL coefficient buffer (0-&gt;Y, 1-&gt;Cb, 2-&gt;Cr)
Definition: TComDataCU.h:107
Void setMergeIndexSubParts(UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth)
TComSlice * m_pcSlice
slice header pointer
Definition: TComDataCU.h:73
SChar * getQP()
Definition: TComDataCU.h:258
Bool isBipredRestriction(UInt puIdx) const
Void setChromaQpAdj(Int idx, UChar val)
When val = 0, cu_chroma_qp_offset_flag=0; when val&gt;0, indicates cu_chroma_qp_offset_flag=1 and cu_chr...
Definition: TComDataCU.h:270
SChar getRefQP(UInt uiCurrAbsIdxInCtu) const
Bool getMergeAMP() const
Definition: TComDataCU.h:339
Void getMvPredAbove(TComMv &rcMvPred) const
Definition: TComDataCU.h:390
TComDataCU * m_pCtuAboveLeft
pointer of above-left CTU.
Definition: TComDataCU.h:117
UChar * m_puhHeight
array of heights
Definition: TComDataCU.h:85
Bool * m_skipFlag
array of skip flags
Definition: TComDataCU.h:93
UChar getHeight(UInt uiIdx) const
Definition: TComDataCU.h:253
inter-prediction mode
Definition: TypeDef.h:364
Pel * getPCMSample(ComponentID component)
Definition: TComDataCU.h:305
UChar * getCbf(ComponentID eType)
Definition: TComDataCU.h:308
double Double
Definition: TypeDef.h:213
Bool * m_pbIPCMFlag
array of intra_pcm flags
Definition: TComDataCU.h:139
SChar * m_phQP
array of QP values
Definition: TComDataCU.h:98
Void setMVPIdxSubParts(Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth)
TComMv m_cMvPred
motion vector predictor
Definition: TComDataCU.h:124
slice header class
Definition: TComSlice.h:1225
UChar getExplicitRdpcmMode(ComponentID component, UInt partIdx) const
Definition: TComDataCU.h:287
Bool getMergeFlag(UInt uiIdx) const
Definition: TComDataCU.h:326
static const UInt NUM_MOST_PROBABLE_MODES
Definition: TComDataCU.h:57
const TComCUMvField * getCUMvField(RefPicList e) const
Definition: TComDataCU.h:298
UChar * getChromaQpAdj()
array of chroma QP adjustments (indexed). when value = 0, cu_chroma_qp_offset_flag=0; when value&gt;0...
Definition: TComDataCU.h:268
const TComSlice * getSlice() const
Definition: TComDataCU.h:203
Int m_unitSize
size of a &quot;minimum partition&quot;
Definition: TComDataCU.h:87
SChar getQP(UInt uiIdx) const
Definition: TComDataCU.h:259
Void setCodedQP(SChar qp)
Definition: TComDataCU.h:265
Void bitwiseOrCbfPartRange(UInt uiCbf, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes)
UChar * m_explicitRdpcmMode[MAX_NUM_COMPONENT]
Stores the explicit RDPCM mode for all TUs belonging to this CU.
Definition: TComDataCU.h:154
Void deriveLeftBottomIdxGeneral(UInt uiAbsPartIdx, UInt uiPartIdx, UInt &ruiPartIdxLB) const
Bool * m_pbMergeFlag
array of merge flags
Definition: TComDataCU.h:130
const TComPic * getPic() const
Definition: TComDataCU.h:201
TComSlice * getSlice()
Definition: TComDataCU.h:202
const TComSPS * getSPS() const
Definition: TComSlice.h:1329
SChar * m_apiMVPNum[NUM_REF_PIC_LIST_01]
array of number of possible motion vectors predictors
Definition: TComDataCU.h:138
Void setTrIdxSubParts(UInt uiTrIdx, UInt uiAbsPartIdx, UInt uiDepth)
UChar * m_puhIntraDir[MAX_NUM_CHANNEL_TYPE]
Definition: TComDataCU.h:135