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-2012, 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 | |
---|
34 | /** \file TComDataCU.h |
---|
35 | \brief CU data structure (header) |
---|
36 | \todo not all entities are documented |
---|
37 | */ |
---|
38 | |
---|
39 | #ifndef _TCOMDATACU_ |
---|
40 | #define _TCOMDATACU_ |
---|
41 | |
---|
42 | #include <assert.h> |
---|
43 | |
---|
44 | // Include files |
---|
45 | #include "CommonDef.h" |
---|
46 | #include "TComMotionInfo.h" |
---|
47 | #include "TComSlice.h" |
---|
48 | #include "TComRdCost.h" |
---|
49 | #include "TComPattern.h" |
---|
50 | |
---|
51 | #if H3D_IVRP |
---|
52 | #include "TComYuv.h" |
---|
53 | #endif |
---|
54 | |
---|
55 | #include <algorithm> |
---|
56 | #include <vector> |
---|
57 | |
---|
58 | //! \ingroup TLibCommon |
---|
59 | //! \{ |
---|
60 | |
---|
61 | // ==================================================================================================================== |
---|
62 | // Non-deblocking in-loop filter processing block data structure |
---|
63 | // ==================================================================================================================== |
---|
64 | |
---|
65 | /// Non-deblocking filter processing block border tag |
---|
66 | enum NDBFBlockBorderTag |
---|
67 | { |
---|
68 | SGU_L = 0, |
---|
69 | SGU_R, |
---|
70 | SGU_T, |
---|
71 | SGU_B, |
---|
72 | SGU_TL, |
---|
73 | SGU_TR, |
---|
74 | SGU_BL, |
---|
75 | SGU_BR, |
---|
76 | NUM_SGU_BORDER |
---|
77 | }; |
---|
78 | |
---|
79 | /// Non-deblocking filter processing block information |
---|
80 | struct NDBFBlockInfo |
---|
81 | { |
---|
82 | Int tileID; //!< tile ID |
---|
83 | Int sliceID; //!< slice ID |
---|
84 | UInt startSU; //!< starting SU z-scan address in LCU |
---|
85 | UInt endSU; //!< ending SU z-scan address in LCU |
---|
86 | UInt widthSU; //!< number of SUs in width |
---|
87 | UInt heightSU; //!< number of SUs in height |
---|
88 | UInt posX; //!< top-left X coordinate in picture |
---|
89 | UInt posY; //!< top-left Y coordinate in picture |
---|
90 | UInt width; //!< number of pixels in width |
---|
91 | UInt height; //!< number of pixels in height |
---|
92 | Bool isBorderAvailable[NUM_SGU_BORDER]; //!< the border availabilities |
---|
93 | Bool allBordersAvailable; |
---|
94 | |
---|
95 | NDBFBlockInfo():tileID(0), sliceID(0), startSU(0), endSU(0) {} //!< constructor |
---|
96 | const NDBFBlockInfo& operator= (const NDBFBlockInfo& src); //!< "=" operator |
---|
97 | }; |
---|
98 | |
---|
99 | |
---|
100 | // ==================================================================================================================== |
---|
101 | // Class definition |
---|
102 | // ==================================================================================================================== |
---|
103 | |
---|
104 | /// CU data structure class |
---|
105 | class TComDataCU |
---|
106 | { |
---|
107 | private: |
---|
108 | |
---|
109 | // ------------------------------------------------------------------------------------------------------------------- |
---|
110 | // class pointers |
---|
111 | // ------------------------------------------------------------------------------------------------------------------- |
---|
112 | |
---|
113 | TComPic* m_pcPic; ///< picture class pointer |
---|
114 | TComSlice* m_pcSlice; ///< slice header pointer |
---|
115 | TComPattern* m_pcPattern; ///< neighbour access class pointer |
---|
116 | |
---|
117 | // ------------------------------------------------------------------------------------------------------------------- |
---|
118 | // CU description |
---|
119 | // ------------------------------------------------------------------------------------------------------------------- |
---|
120 | |
---|
121 | UInt m_uiCUAddr; ///< CU address in a slice |
---|
122 | UInt m_uiAbsIdxInLCU; ///< absolute address in a CU. It's Z scan order |
---|
123 | UInt m_uiCUPelX; ///< CU position in a pixel (X) |
---|
124 | UInt m_uiCUPelY; ///< CU position in a pixel (Y) |
---|
125 | UInt m_uiNumPartition; ///< total number of minimum partitions in a CU |
---|
126 | UChar* m_puhWidth; ///< array of widths |
---|
127 | UChar* m_puhHeight; ///< array of heights |
---|
128 | UChar* m_puhDepth; ///< array of depths |
---|
129 | Int m_unitSize; ///< size of a "minimum partition" |
---|
130 | #if HHI_MPI |
---|
131 | Int* m_piTextureModeDepth; ///< at which depth are prediction data inherited from texture picture ( -1 : none ) |
---|
132 | #endif |
---|
133 | |
---|
134 | // ------------------------------------------------------------------------------------------------------------------- |
---|
135 | // CU data |
---|
136 | // ------------------------------------------------------------------------------------------------------------------- |
---|
137 | |
---|
138 | Char* m_pePartSize; ///< array of partition sizes |
---|
139 | #if HHI_INTERVIEW_SKIP |
---|
140 | Bool* m_pbRenderable; ///< array of merge flags |
---|
141 | #endif |
---|
142 | Char* m_pePredMode; ///< array of prediction modes |
---|
143 | Char* m_phQP; ///< array of QP values |
---|
144 | UChar* m_puhTrIdx; ///< array of transform indices |
---|
145 | UChar* m_nsqtPartIdx; ///< array of absPartIdx mapping table, map zigzag to NSQT |
---|
146 | UChar* m_puhCbf[3]; ///< array of coded block flags (CBF) |
---|
147 | TComCUMvField m_acCUMvField[2]; ///< array of motion vectors |
---|
148 | TCoeff* m_pcTrCoeffY; ///< transformed coefficient buffer (Y) |
---|
149 | TCoeff* m_pcTrCoeffCb; ///< transformed coefficient buffer (Cb) |
---|
150 | TCoeff* m_pcTrCoeffCr; ///< transformed coefficient buffer (Cr) |
---|
151 | #if ADAPTIVE_QP_SELECTION |
---|
152 | Int* m_pcArlCoeffY; ///< ARL coefficient buffer (Y) |
---|
153 | Int* m_pcArlCoeffCb; ///< ARL coefficient buffer (Cb) |
---|
154 | Int* m_pcArlCoeffCr; ///< ARL coefficient buffer (Cr) |
---|
155 | Bool m_ArlCoeffIsAliasedAllocation; ///< ARL coefficient buffer is an alias of the global buffer and must not be free()'d |
---|
156 | |
---|
157 | static Int* m_pcGlbArlCoeffY; ///< ARL coefficient buffer (Y) |
---|
158 | static Int* m_pcGlbArlCoeffCb; ///< ARL coefficient buffer (Cb) |
---|
159 | static Int* m_pcGlbArlCoeffCr; ///< ARL coefficient buffer (Cr) |
---|
160 | |
---|
161 | #endif |
---|
162 | |
---|
163 | Pel* m_pcIPCMSampleY; ///< PCM sample buffer (Y) |
---|
164 | Pel* m_pcIPCMSampleCb; ///< PCM sample buffer (Cb) |
---|
165 | Pel* m_pcIPCMSampleCr; ///< PCM sample buffer (Cr) |
---|
166 | |
---|
167 | Int* m_piSliceSUMap; ///< pointer of slice ID map |
---|
168 | std::vector<NDBFBlockInfo> m_vNDFBlock; |
---|
169 | |
---|
170 | // ------------------------------------------------------------------------------------------------------------------- |
---|
171 | // neighbour access variables |
---|
172 | // ------------------------------------------------------------------------------------------------------------------- |
---|
173 | |
---|
174 | TComDataCU* m_pcCUAboveLeft; ///< pointer of above-left CU |
---|
175 | TComDataCU* m_pcCUAboveRight; ///< pointer of above-right CU |
---|
176 | TComDataCU* m_pcCUAbove; ///< pointer of above CU |
---|
177 | TComDataCU* m_pcCULeft; ///< pointer of left CU |
---|
178 | TComDataCU* m_apcCUColocated[2]; ///< pointer of temporally colocated CU's for both directions |
---|
179 | TComMvField m_cMvFieldA; ///< motion vector of position A |
---|
180 | TComMvField m_cMvFieldB; ///< motion vector of position B |
---|
181 | TComMvField m_cMvFieldC; ///< motion vector of position C |
---|
182 | TComMv m_cMvPred; ///< motion vector predictor |
---|
183 | |
---|
184 | // ------------------------------------------------------------------------------------------------------------------- |
---|
185 | // coding tool information |
---|
186 | // ------------------------------------------------------------------------------------------------------------------- |
---|
187 | |
---|
188 | Bool* m_pbMergeFlag; ///< array of merge flags |
---|
189 | #if LGE_ILLUCOMP_B0045 |
---|
190 | Bool* m_pbICFlag; ///< array of IC flags |
---|
191 | #endif |
---|
192 | UChar* m_puhMergeIndex; ///< array of merge candidate indices |
---|
193 | #if MERL_VSP_C0152 |
---|
194 | Char* m_piVSPIndex; ///< array of VSP flags to indicate the current block uses synthetic predictor or not |
---|
195 | ///< value 0: non-VSP, value 1: VSP |
---|
196 | #endif |
---|
197 | #if AMP_MRG |
---|
198 | Bool m_bIsMergeAMP; |
---|
199 | #endif |
---|
200 | UChar* m_puhLumaIntraDir; ///< array of intra directions (luma) |
---|
201 | UChar* m_puhChromaIntraDir; ///< array of intra directions (chroma) |
---|
202 | UChar* m_puhInterDir; ///< array of inter directions |
---|
203 | Char* m_apiMVPIdx[2]; ///< array of motion vector predictor candidates |
---|
204 | Char* m_apiMVPNum[2]; ///< array of number of possible motion vectors predictors |
---|
205 | Bool* m_puiAlfCtrlFlag; ///< array of ALF flags |
---|
206 | Bool* m_puiTmpAlfCtrlFlag; ///< temporal array of ALF flags |
---|
207 | |
---|
208 | Bool* m_pbIPCMFlag; ///< array of intra_pcm flags |
---|
209 | |
---|
210 | Int m_numSucIPCM; ///< the number of succesive IPCM blocks associated with the current log2CUSize |
---|
211 | Bool m_lastCUSucIPCMFlag; ///< True indicates that the last CU is IPCM and shares the same root as the current CU. |
---|
212 | #if H3D_IVRP |
---|
213 | Bool* m_pbResPredAvailable; ///< array of residual prediction available flags |
---|
214 | Bool* m_pbResPredFlag; ///< array of residual prediction flags |
---|
215 | #endif |
---|
216 | |
---|
217 | #if LGE_EDGE_INTRA_A0070 |
---|
218 | UChar* m_pucEdgeCode; ///< array of edge code |
---|
219 | UChar* m_pucEdgeNumber; ///< total number of edge |
---|
220 | UChar* m_pucEdgeStartPos; ///< starting point position |
---|
221 | Bool* m_pbEdgeLeftFirst; ///< true if edge should be checked in left boundary first |
---|
222 | Bool* m_pbEdgePartition; ///< true if it belongs to region 1, otherwise, region 0 |
---|
223 | #if LGE_EDGE_INTRA_DELTA_DC |
---|
224 | Int* m_piEdgeDeltaDC0; |
---|
225 | Int* m_piEdgeDeltaDC1; |
---|
226 | #endif |
---|
227 | #endif |
---|
228 | |
---|
229 | // ------------------------------------------------------------------------------------------------------------------- |
---|
230 | // misc. variables |
---|
231 | // ------------------------------------------------------------------------------------------------------------------- |
---|
232 | |
---|
233 | Bool m_bDecSubCu; ///< indicates decoder-mode |
---|
234 | Double m_dTotalCost; ///< sum of partition RD costs |
---|
235 | Dist m_uiTotalDistortion; ///< sum of partition distortion |
---|
236 | UInt m_uiTotalBits; ///< sum of partition bits |
---|
237 | UInt m_uiTotalBins; ///< sum of partition bins |
---|
238 | UInt* m_uiSliceStartCU; ///< Start CU address of current slice |
---|
239 | UInt* m_uiEntropySliceStartCU; ///< Start CU address of current slice |
---|
240 | |
---|
241 | // ------------------------------------------------------------------------------------------------------------------- |
---|
242 | // depth model mode data |
---|
243 | // ------------------------------------------------------------------------------------------------------------------- |
---|
244 | #if HHI_DMM_WEDGE_INTRA |
---|
245 | UInt* m_puiWedgeFullTabIdx; |
---|
246 | Int* m_piWedgeFullDeltaDC1; |
---|
247 | Int* m_piWedgeFullDeltaDC2; |
---|
248 | |
---|
249 | UInt* m_puiWedgePredDirTabIdx; |
---|
250 | Int* m_piWedgePredDirDeltaDC1; |
---|
251 | Int* m_piWedgePredDirDeltaDC2; |
---|
252 | Int* m_piWedgePredDirDeltaEnd; |
---|
253 | #endif |
---|
254 | #if HHI_DMM_PRED_TEX |
---|
255 | UInt* m_puiWedgePredTexTabIdx; |
---|
256 | #if LGE_DMM3_SIMP_C0044 |
---|
257 | UInt* m_puiWedgePredTexIntraTabIdx; |
---|
258 | #endif |
---|
259 | Int* m_piWedgePredTexDeltaDC1; |
---|
260 | Int* m_piWedgePredTexDeltaDC2; |
---|
261 | |
---|
262 | Int* m_piContourPredTexDeltaDC1; |
---|
263 | Int* m_piContourPredTexDeltaDC2; |
---|
264 | #endif |
---|
265 | |
---|
266 | #if RWTH_SDC_DLT_B0036 |
---|
267 | Bool* m_pbSDCFlag; |
---|
268 | Pel* m_apSegmentDCOffset[2]; |
---|
269 | #endif |
---|
270 | |
---|
271 | protected: |
---|
272 | |
---|
273 | /// add possible motion vector predictor candidates |
---|
274 | Bool xAddMVPCand ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); |
---|
275 | Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); |
---|
276 | #if MERL_VSP_C0152 |
---|
277 | inline Bool xAddVspMergeCand ( UChar ucVspMergePos, Int vspIdx, Bool* bVspMvZeroDone, UInt uiDepth, Bool* abCandIsInter, Int& iCount, |
---|
278 | UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, Int* iVSPIndexTrue, Int mrgCandIdx, DisInfo* pDisInfo ); |
---|
279 | inline Void xInheritVspMode ( TComDataCU* pcCURef, UInt uiIdx, Bool* bVspMvZeroDone, Int iCount, Int* iVSPIndexTrue, TComMvField* pcMvFieldNeighbours, DisInfo* pDInfo ) ; |
---|
280 | #endif |
---|
281 | Void deriveRightBottomIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxRB ); |
---|
282 | Bool xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx |
---|
283 | #if QC_TMVP_MRG_REFIDX_C0047 |
---|
284 | , |
---|
285 | Bool bMRG = 0 |
---|
286 | #endif |
---|
287 | ); |
---|
288 | #if H3D_NBDV |
---|
289 | Bool xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); |
---|
290 | #endif |
---|
291 | |
---|
292 | |
---|
293 | Void xCheckCornerCand( TComDataCU* pcCorner, UInt uiCornerIdx, UInt uiIter, Bool& rbValidCand ); |
---|
294 | /// compute required bits to encode MVD (used in AMVP) |
---|
295 | UInt xGetMvdBits ( TComMv cMvd ); |
---|
296 | UInt xGetComponentBits ( Int iVal ); |
---|
297 | |
---|
298 | /// compute scaling factor from POC difference |
---|
299 | Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); |
---|
300 | |
---|
301 | Void xDeriveCenterIdx( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxCenter ); |
---|
302 | Bool xGetCenterCol( UInt uiPartIdx, RefPicList eRefPicList, int iRefIdx, TComMv *pcMv ); |
---|
303 | |
---|
304 | Void xCheckDuplicateCand(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, bool* pbCandIsInter, UInt& ruiArrayAddr); |
---|
305 | |
---|
306 | |
---|
307 | public: |
---|
308 | TComDataCU(); |
---|
309 | virtual ~TComDataCU(); |
---|
310 | |
---|
311 | // ------------------------------------------------------------------------------------------------------------------- |
---|
312 | // create / destroy / initialize / copy |
---|
313 | // ------------------------------------------------------------------------------------------------------------------- |
---|
314 | |
---|
315 | Void create ( UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu, Int unitSize |
---|
316 | #if ADAPTIVE_QP_SELECTION |
---|
317 | , Bool bGlobalRMARLBuffer = false |
---|
318 | #endif |
---|
319 | ); |
---|
320 | Void destroy (); |
---|
321 | |
---|
322 | Void initCU ( TComPic* pcPic, UInt uiCUAddr ); |
---|
323 | Void initEstData ( UInt uiDepth, Int qp ); |
---|
324 | Void initSubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp ); |
---|
325 | Void setOutsideCUPart ( UInt uiAbsPartIdx, UInt uiDepth ); |
---|
326 | |
---|
327 | Void copySubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth ); |
---|
328 | Void copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList ); |
---|
329 | Void copyPartFrom ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth ); |
---|
330 | |
---|
331 | Void copyToPic ( UChar uiDepth ); |
---|
332 | Void copyToPic ( UChar uiDepth, UInt uiPartIdx, UInt uiPartDepth ); |
---|
333 | |
---|
334 | // ------------------------------------------------------------------------------------------------------------------- |
---|
335 | // member functions for CU description |
---|
336 | // ------------------------------------------------------------------------------------------------------------------- |
---|
337 | |
---|
338 | TComPic* getPic () { return m_pcPic; } |
---|
339 | TComSlice* getSlice () { return m_pcSlice; } |
---|
340 | UInt& getAddr () { return m_uiCUAddr; } |
---|
341 | UInt& getZorderIdxInCU () { return m_uiAbsIdxInLCU; } |
---|
342 | UInt getSCUAddr (); |
---|
343 | UInt getCUPelX () { return m_uiCUPelX; } |
---|
344 | UInt getCUPelY () { return m_uiCUPelY; } |
---|
345 | TComPattern* getPattern () { return m_pcPattern; } |
---|
346 | |
---|
347 | UChar* getDepth () { return m_puhDepth; } |
---|
348 | UChar getDepth ( UInt uiIdx ) { return m_puhDepth[uiIdx]; } |
---|
349 | Void setDepth ( UInt uiIdx, UChar uh ) { m_puhDepth[uiIdx] = uh; } |
---|
350 | |
---|
351 | Void setDepthSubParts ( UInt uiDepth, UInt uiAbsPartIdx ); |
---|
352 | Void getPosInPic ( UInt uiAbsPartIndex, Int& riPosX, Int& riPosY ); |
---|
353 | #if HHI_MPI |
---|
354 | Int* getTextureModeDepth () { return m_piTextureModeDepth; } |
---|
355 | Int getTextureModeDepth ( UInt uiIdx ) { return m_piTextureModeDepth[uiIdx]; } |
---|
356 | Void setTextureModeDepth ( UInt uiIdx, Int iTextureModeDepth ){ m_piTextureModeDepth[uiIdx] = iTextureModeDepth; } |
---|
357 | Void setTextureModeDepthSubParts( Int iTextureModeDepth, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
358 | Void copyTextureMotionDataFrom( TComDataCU* pcCU, UInt uiDepth, UInt uiAbsPartIdxSrc, UInt uiAbsPartIdxDst = 0 ); |
---|
359 | #endif |
---|
360 | |
---|
361 | // ------------------------------------------------------------------------------------------------------------------- |
---|
362 | // member functions for CU data |
---|
363 | // ------------------------------------------------------------------------------------------------------------------- |
---|
364 | |
---|
365 | Char* getPartitionSize () { return m_pePartSize; } |
---|
366 | PartSize getPartitionSize ( UInt uiIdx ) { return static_cast<PartSize>( m_pePartSize[uiIdx] ); } |
---|
367 | Void setPartitionSize ( UInt uiIdx, PartSize uh){ m_pePartSize[uiIdx] = uh; } |
---|
368 | Void setPartSizeSubParts ( PartSize eMode, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
369 | |
---|
370 | #if HHI_INTERVIEW_SKIP |
---|
371 | Bool* getRenderable () { return m_pbRenderable; } |
---|
372 | Bool getRenderable ( UInt uiIdx ) { return m_pbRenderable[uiIdx]; } |
---|
373 | Void setRenderable ( UInt uiIdx, Bool b ) { m_pbRenderable[uiIdx] = b; } |
---|
374 | Void setRenderableSubParts ( Bool bRenderable, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
375 | #endif |
---|
376 | |
---|
377 | Char* getPredictionMode () { return m_pePredMode; } |
---|
378 | PredMode getPredictionMode ( UInt uiIdx ) { return static_cast<PredMode>( m_pePredMode[uiIdx] ); } |
---|
379 | Void setPredictionMode ( UInt uiIdx, PredMode uh){ m_pePredMode[uiIdx] = uh; } |
---|
380 | Void setPredModeSubParts ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
381 | |
---|
382 | UChar* getWidth () { return m_puhWidth; } |
---|
383 | UChar getWidth ( UInt uiIdx ) { return m_puhWidth[uiIdx]; } |
---|
384 | Void setWidth ( UInt uiIdx, UChar uh ) { m_puhWidth[uiIdx] = uh; } |
---|
385 | |
---|
386 | UChar* getHeight () { return m_puhHeight; } |
---|
387 | UChar getHeight ( UInt uiIdx ) { return m_puhHeight[uiIdx]; } |
---|
388 | Void setHeight ( UInt uiIdx, UChar uh ) { m_puhHeight[uiIdx] = uh; } |
---|
389 | |
---|
390 | Void setSizeSubParts ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
391 | |
---|
392 | Char* getQP () { return m_phQP; } |
---|
393 | Char getQP ( UInt uiIdx ) { return m_phQP[uiIdx]; } |
---|
394 | Void setQP ( UInt uiIdx, Char value ){ m_phQP[uiIdx] = value; } |
---|
395 | Void setQPSubParts ( Int qp, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
396 | Int getLastValidPartIdx ( Int iAbsPartIdx ); |
---|
397 | Char getLastCodedQP ( UInt uiAbsPartIdx ); |
---|
398 | |
---|
399 | #if LOSSLESS_CODING |
---|
400 | Bool isLosslessCoded(UInt absPartIdx); |
---|
401 | #endif |
---|
402 | UChar* getNSQTPartIdx () { return m_nsqtPartIdx; } |
---|
403 | UChar getNSQTPartIdx ( UInt idx ) { return m_nsqtPartIdx[idx]; } |
---|
404 | Void setNSQTIdxSubParts ( UInt absPartIdx, UInt depth ); |
---|
405 | Void setNSQTIdxSubParts ( UInt log2TrafoSize, UInt absPartIdx, UInt absTUPartIdx, UInt trMode ); |
---|
406 | |
---|
407 | UChar* getTransformIdx () { return m_puhTrIdx; } |
---|
408 | UChar getTransformIdx ( UInt uiIdx ) { return m_puhTrIdx[uiIdx]; } |
---|
409 | Void setTrIdxSubParts ( UInt uiTrIdx, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
410 | |
---|
411 | UInt getQuadtreeTULog2MinSizeInCU( UInt absPartIdx ); |
---|
412 | |
---|
413 | TComCUMvField* getCUMvField ( RefPicList e ) { return &m_acCUMvField[e]; } |
---|
414 | |
---|
415 | TCoeff*& getCoeffY () { return m_pcTrCoeffY; } |
---|
416 | TCoeff*& getCoeffCb () { return m_pcTrCoeffCb; } |
---|
417 | TCoeff*& getCoeffCr () { return m_pcTrCoeffCr; } |
---|
418 | #if ADAPTIVE_QP_SELECTION |
---|
419 | Int*& getArlCoeffY () { return m_pcArlCoeffY; } |
---|
420 | Int*& getArlCoeffCb () { return m_pcArlCoeffCb; } |
---|
421 | Int*& getArlCoeffCr () { return m_pcArlCoeffCr; } |
---|
422 | #endif |
---|
423 | |
---|
424 | Pel*& getPCMSampleY () { return m_pcIPCMSampleY; } |
---|
425 | Pel*& getPCMSampleCb () { return m_pcIPCMSampleCb; } |
---|
426 | Pel*& getPCMSampleCr () { return m_pcIPCMSampleCr; } |
---|
427 | |
---|
428 | UChar getCbf ( UInt uiIdx, TextType eType ) { return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx]; } |
---|
429 | UChar* getCbf ( TextType eType ) { return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]]; } |
---|
430 | UChar getCbf ( UInt uiIdx, TextType eType, UInt uiTrDepth ) { return ( ( getCbf( uiIdx, eType ) >> uiTrDepth ) & 0x1 ); } |
---|
431 | Void setCbf ( UInt uiIdx, TextType eType, UChar uh ) { m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx] = uh; } |
---|
432 | Void clearCbf ( UInt uiIdx, TextType eType, UInt uiNumParts ); |
---|
433 | UChar getQtRootCbf ( UInt uiIdx ) { return getCbf( uiIdx, TEXT_LUMA, 0 ) || getCbf( uiIdx, TEXT_CHROMA_U, 0 ) || getCbf( uiIdx, TEXT_CHROMA_V, 0 ); } |
---|
434 | |
---|
435 | Void setCbfSubParts ( UInt uiCbfY, UInt uiCbfU, UInt uiCbfV, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
436 | Void setCbfSubParts ( UInt uiCbf, TextType eTType, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
437 | Void setCbfSubParts ( UInt uiCbf, TextType eTType, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
438 | |
---|
439 | // ------------------------------------------------------------------------------------------------------------------- |
---|
440 | // member functions for coding tool information |
---|
441 | // ------------------------------------------------------------------------------------------------------------------- |
---|
442 | |
---|
443 | Bool* getMergeFlag () { return m_pbMergeFlag; } |
---|
444 | Bool getMergeFlag ( UInt uiIdx ) { return m_pbMergeFlag[uiIdx]; } |
---|
445 | Void setMergeFlag ( UInt uiIdx, Bool b ) { m_pbMergeFlag[uiIdx] = b; } |
---|
446 | Void setMergeFlagSubParts ( Bool bMergeFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
447 | |
---|
448 | UChar* getMergeIndex () { return m_puhMergeIndex; } |
---|
449 | UChar getMergeIndex ( UInt uiIdx ) { return m_puhMergeIndex[uiIdx]; } |
---|
450 | Void setMergeIndex ( UInt uiIdx, UInt uiMergeIndex ) { m_puhMergeIndex[uiIdx] = uiMergeIndex; } |
---|
451 | Void setMergeIndexSubParts ( UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
452 | |
---|
453 | #if MERL_VSP_C0152 |
---|
454 | Char* getVSPIndex () { return m_piVSPIndex; } |
---|
455 | Char getVSPIndex ( UInt uiIdx ) { return m_piVSPIndex[uiIdx]; } |
---|
456 | Void setVSPIndex ( UInt uiIdx, Int n ) { m_piVSPIndex[uiIdx] = n; } |
---|
457 | Void setVSPIndexSubParts( Char bVSPIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
458 | #endif |
---|
459 | |
---|
460 | template <typename T> |
---|
461 | Void setSubPart ( T bParameter, T* pbBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ); |
---|
462 | |
---|
463 | #if LGE_ILLUCOMP_B0045 |
---|
464 | Bool* getICFlag () { return m_pbICFlag; } |
---|
465 | Bool getICFlag ( UInt uiIdx ) { return m_pbICFlag[uiIdx]; } |
---|
466 | Void setICFlag ( UInt uiIdx, Bool uh ) { m_pbICFlag[uiIdx] = uh; } |
---|
467 | Void setICFlagSubParts ( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
468 | #if LGE_ILLUCOMP_DEPTH_C0046 |
---|
469 | Bool isICFlagRequired (UInt uiAbsPartIdx, UInt uiDepth); //This modification is not needed after integrating JCT3V-C0137 |
---|
470 | #else |
---|
471 | Bool isICFlagRequired (UInt uiAbsPartIdx); |
---|
472 | #endif |
---|
473 | #endif |
---|
474 | |
---|
475 | #if AMP_MRG |
---|
476 | Void setMergeAMP( Bool b ) { m_bIsMergeAMP = b; } |
---|
477 | Bool getMergeAMP( ) { return m_bIsMergeAMP; } |
---|
478 | #endif |
---|
479 | |
---|
480 | UChar* getLumaIntraDir () { return m_puhLumaIntraDir; } |
---|
481 | UChar getLumaIntraDir ( UInt uiIdx ) { return m_puhLumaIntraDir[uiIdx]; } |
---|
482 | Void setLumaIntraDir ( UInt uiIdx, UChar uh ) { m_puhLumaIntraDir[uiIdx] = uh; } |
---|
483 | Void setLumaIntraDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
484 | |
---|
485 | UChar* getChromaIntraDir () { return m_puhChromaIntraDir; } |
---|
486 | UChar getChromaIntraDir ( UInt uiIdx ) { return m_puhChromaIntraDir[uiIdx]; } |
---|
487 | Void setChromaIntraDir ( UInt uiIdx, UChar uh ) { m_puhChromaIntraDir[uiIdx] = uh; } |
---|
488 | Void setChromIntraDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
489 | |
---|
490 | UChar* getInterDir () { return m_puhInterDir; } |
---|
491 | UChar getInterDir ( UInt uiIdx ) { return m_puhInterDir[uiIdx]; } |
---|
492 | Void setInterDir ( UInt uiIdx, UChar uh ) { m_puhInterDir[uiIdx] = uh; } |
---|
493 | Void setInterDirSubParts ( UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
494 | |
---|
495 | Bool* getAlfCtrlFlag () { return m_puiAlfCtrlFlag; } |
---|
496 | Bool getAlfCtrlFlag ( UInt uiIdx ) { return m_puiAlfCtrlFlag[uiIdx]; } |
---|
497 | Void setAlfCtrlFlag ( UInt uiIdx, Bool uiFlag){ m_puiAlfCtrlFlag[uiIdx] = uiFlag; } |
---|
498 | Void setAlfCtrlFlagSubParts( Bool uiFlag, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
499 | |
---|
500 | Void createTmpAlfCtrlFlag (); |
---|
501 | Void destroyTmpAlfCtrlFlag (); |
---|
502 | Void copyAlfCtrlFlagToTmp (); |
---|
503 | Void copyAlfCtrlFlagFromTmp(); |
---|
504 | |
---|
505 | Bool* getIPCMFlag () { return m_pbIPCMFlag; } |
---|
506 | Bool getIPCMFlag (UInt uiIdx ) { return m_pbIPCMFlag[uiIdx]; } |
---|
507 | Void setIPCMFlag (UInt uiIdx, Bool b ) { m_pbIPCMFlag[uiIdx] = b; } |
---|
508 | Void setIPCMFlagSubParts (Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth); |
---|
509 | |
---|
510 | Int getNumSucIPCM () { return m_numSucIPCM; } |
---|
511 | Void setNumSucIPCM ( Int num ) { m_numSucIPCM = num; } |
---|
512 | Bool getLastCUSucIPCMFlag () { return m_lastCUSucIPCMFlag; } |
---|
513 | Void setLastCUSucIPCMFlag ( Bool flg ) { m_lastCUSucIPCMFlag = flg; } |
---|
514 | |
---|
515 | /// get slice ID for SU |
---|
516 | Int getSUSliceID (UInt uiIdx) {return m_piSliceSUMap[uiIdx]; } |
---|
517 | |
---|
518 | /// get the pointer of slice ID map |
---|
519 | Int* getSliceSUMap () {return m_piSliceSUMap; } |
---|
520 | |
---|
521 | /// set the pointer of slice ID map |
---|
522 | Void setSliceSUMap (Int *pi) {m_piSliceSUMap = pi; } |
---|
523 | |
---|
524 | std::vector<NDBFBlockInfo>* getNDBFilterBlocks() {return &m_vNDFBlock;} |
---|
525 | Void setNDBFilterBlockBorderAvailability(UInt numLCUInPicWidth, UInt numLCUInPicHeight, UInt numSUInLCUWidth, UInt numSUInLCUHeight, UInt picWidth, UInt picHeight |
---|
526 | ,Bool bIndependentSliceBoundaryEnabled |
---|
527 | ,Bool bTopTileBoundary, Bool bDownTileBoundary, Bool bLeftTileBoundary, Bool bRightTileBoundary |
---|
528 | ,Bool bIndependentTileBoundaryEnabled ); |
---|
529 | |
---|
530 | #if H3D_IVMP |
---|
531 | #if !H3D_NBDV |
---|
532 | Int getPdmMergeCandidate ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ); |
---|
533 | Bool getPdmMvPred ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false ); |
---|
534 | #else //!H3D_NBDV |
---|
535 | #if QC_AMVP_MRG_UNIFY_IVCAN_C0051 |
---|
536 | Bool getUnifiedMvPredCan ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge ); |
---|
537 | #else //QC_AMVP_MRG_UNIFY_IVCAN_C0051 |
---|
538 | Bool getPdmMvPredDisCan ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false ); |
---|
539 | Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm ); |
---|
540 | #endif //QC_AMVP_MRG_UNIFY_IVCAN_C0051 |
---|
541 | Void getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo ); |
---|
542 | Void getDisMvpCandNBDV( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo , Bool bParMerg = false |
---|
543 | #if MERL_VSP_C0152 |
---|
544 | , Bool bDepthRefine = false |
---|
545 | #endif //MERL_VSP_C0152 |
---|
546 | ); |
---|
547 | #endif // !H3D_NBDV |
---|
548 | |
---|
549 | |
---|
550 | |
---|
551 | #if MERL_VSP_C0152 |
---|
552 | #if LGE_SIMP_DVP_REFINE_C0112 |
---|
553 | Pel getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec, Bool bSimpleDvpRefine = false); |
---|
554 | Void estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred, Bool bSimpleDvpRefine = false); |
---|
555 | #else |
---|
556 | Pel getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec); |
---|
557 | Void estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred); |
---|
558 | #endif |
---|
559 | #endif |
---|
560 | Bool getIViewOrgDepthMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv ); |
---|
561 | #endif // H3D_IVMP |
---|
562 | #if H3D_IVRP |
---|
563 | Bool* getResPredAvail () { return m_pbResPredAvailable; } |
---|
564 | Bool getResPredAvail ( UInt uiIdx ) { return m_pbResPredAvailable[uiIdx]; } |
---|
565 | Void setResPredAvail ( UInt uiIdx, Bool b ) { m_pbResPredAvailable[uiIdx] = b; } |
---|
566 | Void setResPredAvailSubParts ( Bool b, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
567 | |
---|
568 | Bool* getResPredFlag () { return m_pbResPredFlag; } |
---|
569 | Bool getResPredFlag ( UInt uiIdx ) { return m_pbResPredFlag[uiIdx]; } |
---|
570 | Void setResPredFlag ( UInt uiIdx, Bool b ) { m_pbResPredFlag[uiIdx] = b; } |
---|
571 | Void setResPredFlagSubParts ( Bool b, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
572 | |
---|
573 | Void setResPredIndicator ( Bool bAv, Bool bRP ) { m_pbResPredAvailable[0] = bAv; m_pbResPredFlag[0] = bRP; } |
---|
574 | #endif |
---|
575 | #if H3D_IVRP |
---|
576 | Bool getResidualSamples( UInt uiPartIdx, Bool bRecon, TComYuv* pcYuv = 0 ); |
---|
577 | #endif |
---|
578 | // ------------------------------------------------------------------------------------------------------------------- |
---|
579 | // member functions for accessing partition information |
---|
580 | // ------------------------------------------------------------------------------------------------------------------- |
---|
581 | #if LG_RESTRICTEDRESPRED_M24766 |
---|
582 | Void getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false); |
---|
583 | #else |
---|
584 | Void getPartIndexAndSize ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight ); |
---|
585 | #endif |
---|
586 | #if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138 |
---|
587 | Int getResiPredMode(UInt uiPartAddr); |
---|
588 | Void getPUResiPredShift (Int *iPUPredResiShift, UInt uiAbsPartIndex); |
---|
589 | #endif |
---|
590 | UChar getNumPartInter (); |
---|
591 | Bool isFirstAbsZorderIdxInDepth (UInt uiAbsPartIdx, UInt uiDepth); |
---|
592 | |
---|
593 | // ------------------------------------------------------------------------------------------------------------------- |
---|
594 | // member functions for motion vector |
---|
595 | // ------------------------------------------------------------------------------------------------------------------- |
---|
596 | |
---|
597 | Void getMvField ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField& rcMvField ); |
---|
598 | |
---|
599 | AMVP_MODE getAMVPMode ( UInt uiIdx ); |
---|
600 | #if H3D_IVMP |
---|
601 | Void fillMvpCandBase ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); |
---|
602 | Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo , Int iMVPIdx=-1); |
---|
603 | #else |
---|
604 | Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); |
---|
605 | #endif |
---|
606 | Bool isDiffMER ( Int xN, Int yN, Int xP, Int yP); |
---|
607 | Void getPartPosition ( UInt partIdx, Int& xP, Int& yP, Int& nPSW, Int& nPSH); |
---|
608 | Void setMVPIdx ( RefPicList eRefPicList, UInt uiIdx, Int iMVPIdx) { m_apiMVPIdx[eRefPicList][uiIdx] = iMVPIdx; } |
---|
609 | Int getMVPIdx ( RefPicList eRefPicList, UInt uiIdx) { return m_apiMVPIdx[eRefPicList][uiIdx]; } |
---|
610 | Char* getMVPIdx ( RefPicList eRefPicList ) { return m_apiMVPIdx[eRefPicList]; } |
---|
611 | |
---|
612 | Void setMVPNum ( RefPicList eRefPicList, UInt uiIdx, Int iMVPNum ) { m_apiMVPNum[eRefPicList][uiIdx] = iMVPNum; } |
---|
613 | Int getMVPNum ( RefPicList eRefPicList, UInt uiIdx ) { return m_apiMVPNum[eRefPicList][uiIdx]; } |
---|
614 | Char* getMVPNum ( RefPicList eRefPicList ) { return m_apiMVPNum[eRefPicList]; } |
---|
615 | |
---|
616 | Void setMVPIdxSubParts ( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
617 | Void setMVPNumSubParts ( Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
618 | |
---|
619 | Void clipMv ( TComMv& rcMv ); |
---|
620 | Void getMvPredLeft ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldA.getMv(); } |
---|
621 | Void getMvPredAbove ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldB.getMv(); } |
---|
622 | Void getMvPredAboveRight ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldC.getMv(); } |
---|
623 | |
---|
624 | Void compressMV (); |
---|
625 | |
---|
626 | // ------------------------------------------------------------------------------------------------------------------- |
---|
627 | // utility functions for neighbouring information |
---|
628 | // ------------------------------------------------------------------------------------------------------------------- |
---|
629 | |
---|
630 | TComDataCU* getCULeft () { return m_pcCULeft; } |
---|
631 | TComDataCU* getCUAbove () { return m_pcCUAbove; } |
---|
632 | TComDataCU* getCUAboveLeft () { return m_pcCUAboveLeft; } |
---|
633 | TComDataCU* getCUAboveRight () { return m_pcCUAboveRight; } |
---|
634 | TComDataCU* getCUColocated ( RefPicList eRefPicList ) { return m_apcCUColocated[eRefPicList]; } |
---|
635 | |
---|
636 | |
---|
637 | TComDataCU* getPULeft ( UInt& uiLPartUnitIdx , UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true |
---|
638 | , Bool bEnforceTileRestriction=true |
---|
639 | ); |
---|
640 | |
---|
641 | TComDataCU* getPUAbove ( UInt& uiAPartUnitIdx , UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true, Bool MotionDataCompresssion = false |
---|
642 | , Bool planarAtLCUBoundary = false |
---|
643 | , Bool bEnforceTileRestriction=true |
---|
644 | ); |
---|
645 | |
---|
646 | TComDataCU* getPUAboveLeft ( UInt& uiALPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true, Bool MotionDataCompresssion = false ); |
---|
647 | TComDataCU* getPUAboveRight ( UInt& uiARPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true, Bool MotionDataCompresssion = false ); |
---|
648 | TComDataCU* getPUBelowLeft ( UInt& uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
649 | |
---|
650 | TComDataCU* getQpMinCuLeft ( UInt& uiLPartUnitIdx , UInt uiCurrAbsIdxInLCU, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
651 | TComDataCU* getQpMinCuAbove ( UInt& aPartUnitIdx , UInt currAbsIdxInLCU, Bool enforceSliceRestriction=true, Bool enforceEntropySliceRestriction=true ); |
---|
652 | Char getRefQP ( UInt uiCurrAbsIdxInLCU ); |
---|
653 | |
---|
654 | TComDataCU* getPUAboveRightAdi ( UInt& uiARPartUnitIdx, UInt uiPuWidth, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
655 | TComDataCU* getPUBelowLeftAdi ( UInt& uiBLPartUnitIdx, UInt uiPuHeight, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
656 | |
---|
657 | Void deriveLeftRightTopIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); |
---|
658 | Void deriveLeftBottomIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxLB ); |
---|
659 | |
---|
660 | Void deriveLeftRightTopIdxAdi ( UInt& ruiPartIdxLT, UInt& ruiPartIdxRT, UInt uiPartOffset, UInt uiPartDepth ); |
---|
661 | Void deriveLeftBottomIdxAdi ( UInt& ruiPartIdxLB, UInt uiPartOffset, UInt uiPartDepth ); |
---|
662 | |
---|
663 | Bool hasEqualMotion ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ); |
---|
664 | #if MERL_VSP_C0152 |
---|
665 | Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int* uiVSPIndexTrue, Int mrgCandIdx = -1 ); |
---|
666 | #else |
---|
667 | Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 ); |
---|
668 | #endif |
---|
669 | Void deriveLeftRightTopIdxGeneral( PartSize eCUMode, UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); |
---|
670 | Void deriveLeftBottomIdxGeneral ( PartSize eCUMode, UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLB ); |
---|
671 | |
---|
672 | |
---|
673 | // ------------------------------------------------------------------------------------------------------------------- |
---|
674 | // member functions for modes |
---|
675 | // ------------------------------------------------------------------------------------------------------------------- |
---|
676 | |
---|
677 | Bool isIntra ( UInt uiPartIdx ) { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; } |
---|
678 | Bool isSkipped ( UInt uiPartIdx ); ///< SKIP (no residual) |
---|
679 | |
---|
680 | // ------------------------------------------------------------------------------------------------------------------- |
---|
681 | // member functions for symbol prediction (most probable / mode conversion) |
---|
682 | // ------------------------------------------------------------------------------------------------------------------- |
---|
683 | |
---|
684 | UInt getIntraSizeIdx ( UInt uiAbsPartIdx ); |
---|
685 | Void convertTransIdx ( UInt uiAbsPartIdx, UInt uiTrIdx, UInt& ruiLumaTrMode, UInt& ruiChromaTrMode ); |
---|
686 | |
---|
687 | Void getAllowedChromaDir ( UInt uiAbsPartIdx, UInt* uiModeList ); |
---|
688 | Int getIntraDirLumaPredictor ( UInt uiAbsPartIdx, Int* uiIntraDirPred, Int* piMode = NULL ); |
---|
689 | |
---|
690 | // ------------------------------------------------------------------------------------------------------------------- |
---|
691 | // member functions for SBAC context |
---|
692 | // ------------------------------------------------------------------------------------------------------------------- |
---|
693 | |
---|
694 | UInt getCtxSplitFlag ( UInt uiAbsPartIdx, UInt uiDepth ); |
---|
695 | UInt getCtxQtCbf ( UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth ); |
---|
696 | |
---|
697 | UInt getCtxSkipFlag ( UInt uiAbsPartIdx ); |
---|
698 | #if LGE_ILLUCOMP_B0045 |
---|
699 | UInt getCtxICFlag ( UInt uiAbsPartIdx ); |
---|
700 | #endif |
---|
701 | UInt getCtxInterDir ( UInt uiAbsPartIdx ); |
---|
702 | |
---|
703 | #if H3D_IVRP |
---|
704 | UInt getCtxResPredFlag ( UInt uiAbsPartIdx ); |
---|
705 | #endif |
---|
706 | |
---|
707 | UInt getSliceStartCU ( UInt pos ) { return m_uiSliceStartCU[pos-m_uiAbsIdxInLCU]; } |
---|
708 | UInt getEntropySliceStartCU ( UInt pos ) { return m_uiEntropySliceStartCU[pos-m_uiAbsIdxInLCU]; } |
---|
709 | UInt& getTotalBins () { return m_uiTotalBins; } |
---|
710 | |
---|
711 | #if LGE_EDGE_INTRA_A0070 |
---|
712 | UInt getCtxEdgeIntra ( UInt uiAbsPartIdx ); |
---|
713 | #endif |
---|
714 | |
---|
715 | // ------------------------------------------------------------------------------------------------------------------- |
---|
716 | // member functions for RD cost storage |
---|
717 | // ------------------------------------------------------------------------------------------------------------------- |
---|
718 | |
---|
719 | Double& getTotalCost() { return m_dTotalCost; } |
---|
720 | Dist& getTotalDistortion() { return m_uiTotalDistortion; } |
---|
721 | UInt& getTotalBits() { return m_uiTotalBits; } |
---|
722 | UInt& getTotalNumPart() { return m_uiNumPartition; } |
---|
723 | |
---|
724 | UInt getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra); |
---|
725 | |
---|
726 | Bool useNonSquareTrans( UInt uiTrMode, Int absPartIdx ); |
---|
727 | Void getNSQTSize(Int trMode, Int absPartIdx, Int &trWidth, Int &trHeight); |
---|
728 | Bool useNonSquarePU ( UInt absPartIdx); |
---|
729 | UInt getInterTUSplitDirection ( Int width, Int height, Int trLastWidth, Int trLastHeight ); |
---|
730 | UInt getNSAbsPartIdx ( UInt log2TrafoSize, UInt absPartIdx, UInt absTUPartIdx, UInt innerQuadIdx, UInt trMode ); |
---|
731 | UInt getNSAddrChroma ( UInt uiLog2TrSizeC, UInt uiTrModeC, UInt uiQuadrant, UInt absTUPartIdx ); |
---|
732 | |
---|
733 | // ------------------------------------------------------------------------------------------------------------------- |
---|
734 | // member functions for depth model modes |
---|
735 | // ------------------------------------------------------------------------------------------------------------------- |
---|
736 | #if HHI_DMM_WEDGE_INTRA |
---|
737 | UInt* getWedgeFullTabIdx () { return m_puiWedgeFullTabIdx; } |
---|
738 | UInt getWedgeFullTabIdx ( UInt uiIdx ) { return m_puiWedgeFullTabIdx[uiIdx]; } |
---|
739 | Void setWedgeFullTabIdx ( UInt uiIdx, UInt uh ) { m_puiWedgeFullTabIdx[uiIdx] = uh; } |
---|
740 | Void setWedgeFullTabIdxSubParts ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
741 | Int* getWedgeFullDeltaDC1 () { return m_piWedgeFullDeltaDC1; } |
---|
742 | Int getWedgeFullDeltaDC1 ( UInt uiIdx ) { return m_piWedgeFullDeltaDC1[uiIdx]; } |
---|
743 | Void setWedgeFullDeltaDC1 ( UInt uiIdx, Int i ) { m_piWedgeFullDeltaDC1[uiIdx] = i; } |
---|
744 | Void setWedgeFullDeltaDC1SubParts ( Int iDC1, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
745 | Int* getWedgeFullDeltaDC2 () { return m_piWedgeFullDeltaDC2; } |
---|
746 | Int getWedgeFullDeltaDC2 ( UInt uiIdx ) { return m_piWedgeFullDeltaDC2[uiIdx]; } |
---|
747 | Void setWedgeFullDeltaDC2 ( UInt uiIdx, Int i ) { m_piWedgeFullDeltaDC2[uiIdx] = i; } |
---|
748 | Void setWedgeFullDeltaDC2SubParts ( Int iDC2, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
749 | |
---|
750 | UInt* getWedgePredDirTabIdx () { return m_puiWedgePredDirTabIdx; } |
---|
751 | UInt getWedgePredDirTabIdx ( UInt uiIdx ) { return m_puiWedgePredDirTabIdx[uiIdx]; } |
---|
752 | Void setWedgePredDirTabIdx ( UInt uiIdx, UInt uh ) { m_puiWedgePredDirTabIdx[uiIdx] = uh; } |
---|
753 | Void setWedgePredDirTabIdxSubParts ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
754 | Int* getWedgePredDirDeltaDC1 () { return m_piWedgePredDirDeltaDC1; } |
---|
755 | Int getWedgePredDirDeltaDC1 ( UInt uiIdx ) { return m_piWedgePredDirDeltaDC1[uiIdx]; } |
---|
756 | Void setWedgePredDirDeltaDC1 ( UInt uiIdx, Int i ) { m_piWedgePredDirDeltaDC1[uiIdx] = i; } |
---|
757 | Void setWedgePredDirDeltaDC1SubParts ( Int iDC1, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
758 | Int* getWedgePredDirDeltaDC2 () { return m_piWedgePredDirDeltaDC2; } |
---|
759 | Int getWedgePredDirDeltaDC2 ( UInt uiIdx ) { return m_piWedgePredDirDeltaDC2[uiIdx]; } |
---|
760 | Void setWedgePredDirDeltaDC2 ( UInt uiIdx, Int i ) { m_piWedgePredDirDeltaDC2[uiIdx] = i; } |
---|
761 | Void setWedgePredDirDeltaDC2SubParts ( Int iDC2, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
762 | Int* getWedgePredDirDeltaEnd () { return m_piWedgePredDirDeltaEnd; } |
---|
763 | Int getWedgePredDirDeltaEnd ( UInt uiIdx ) { return m_piWedgePredDirDeltaEnd[uiIdx]; } |
---|
764 | Void setWedgePredDirDeltaEnd ( UInt uiIdx, Int iD ) { m_piWedgePredDirDeltaEnd[uiIdx] = iD; } |
---|
765 | Void setWedgePredDirDeltaEndSubParts ( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
766 | #endif |
---|
767 | #if HHI_DMM_PRED_TEX |
---|
768 | UInt* getWedgePredTexTabIdx () { return m_puiWedgePredTexTabIdx; } |
---|
769 | UInt getWedgePredTexTabIdx ( UInt uiIdx ) { return m_puiWedgePredTexTabIdx[uiIdx]; } |
---|
770 | Void setWedgePredTexTabIdx ( UInt uiIdx, UInt uh ) { m_puiWedgePredTexTabIdx[uiIdx] = uh; } |
---|
771 | Void setWedgePredTexTabIdxSubParts ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
772 | #if LGE_DMM3_SIMP_C0044 |
---|
773 | UInt* getWedgePredTexIntraTabIdx () { return m_puiWedgePredTexIntraTabIdx; } |
---|
774 | UInt getWedgePredTexIntraTabIdx ( UInt uiIdx ) { return m_puiWedgePredTexIntraTabIdx[uiIdx]; } |
---|
775 | Void setWedgePredTexIntraTabIdx ( UInt uiIdx, UInt uh ) { m_puiWedgePredTexIntraTabIdx[uiIdx] = uh; } |
---|
776 | Void setWedgePredTexIntraTabIdxSubParts ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
777 | #endif |
---|
778 | Int* getWedgePredTexDeltaDC1 () { return m_piWedgePredTexDeltaDC1; } |
---|
779 | Int getWedgePredTexDeltaDC1 ( UInt uiIdx ) { return m_piWedgePredTexDeltaDC1[uiIdx]; } |
---|
780 | Void setWedgePredTexDeltaDC1 ( UInt uiIdx, Int i ) { m_piWedgePredTexDeltaDC1[uiIdx] = i; } |
---|
781 | Void setWedgePredTexDeltaDC1SubParts ( Int iDC1, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
782 | Int* getWedgePredTexDeltaDC2 () { return m_piWedgePredTexDeltaDC2; } |
---|
783 | Int getWedgePredTexDeltaDC2 ( UInt uiIdx ) { return m_piWedgePredTexDeltaDC2[uiIdx]; } |
---|
784 | Void setWedgePredTexDeltaDC2 ( UInt uiIdx, Int i ) { m_piWedgePredTexDeltaDC2[uiIdx] = i; } |
---|
785 | Void setWedgePredTexDeltaDC2SubParts ( Int iDC2, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
786 | |
---|
787 | Int* getContourPredTexDeltaDC1 () { return m_piContourPredTexDeltaDC1; } |
---|
788 | Int getContourPredTexDeltaDC1 ( UInt uiIdx ) { return m_piContourPredTexDeltaDC1[uiIdx]; } |
---|
789 | Void setContourPredTexDeltaDC1 ( UInt uiIdx, Int i ) { m_piContourPredTexDeltaDC1[uiIdx] = i; } |
---|
790 | Void setContourPredTexDeltaDC1SubParts ( Int iDC1, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
791 | Int* getContourPredTexDeltaDC2 () { return m_piContourPredTexDeltaDC2; } |
---|
792 | Int getContourPredTexDeltaDC2 ( UInt uiIdx ) { return m_piContourPredTexDeltaDC2[uiIdx]; } |
---|
793 | Void setContourPredTexDeltaDC2 ( UInt uiIdx, Int i ) { m_piContourPredTexDeltaDC2[uiIdx] = i; } |
---|
794 | Void setContourPredTexDeltaDC2SubParts ( Int iDC2, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
795 | #endif |
---|
796 | |
---|
797 | #if LGE_EDGE_INTRA_A0070 |
---|
798 | UChar* getEdgeCode( UInt uiIdx ) { return &m_pucEdgeCode[uiIdx * LGE_EDGE_INTRA_MAX_EDGE_NUM_PER_4x4]; } |
---|
799 | UChar* getEdgeNumber( ) { return m_pucEdgeNumber; } |
---|
800 | UChar getEdgeNumber( UInt uiIdx ) { return m_pucEdgeNumber[uiIdx]; } |
---|
801 | Void setEdgeNumber( UInt uiIdx, UChar val ) { m_pucEdgeNumber[uiIdx] = val; } |
---|
802 | UChar* getEdgeStartPos( ) { return m_pucEdgeStartPos; } |
---|
803 | UChar getEdgeStartPos( UInt uiIdx ) { return m_pucEdgeStartPos[uiIdx]; } |
---|
804 | Void setEdgeStartPos( UInt uiIdx, UChar val ) { m_pucEdgeStartPos[uiIdx] = val; } |
---|
805 | Bool* getEdgeLeftFirst( ) { return m_pbEdgeLeftFirst; } |
---|
806 | Bool getEdgeLeftFirst( UInt uiIdx ) { return m_pbEdgeLeftFirst[uiIdx]; } |
---|
807 | Void setEdgeLeftFirst( UInt uiIdx, Bool val ) { m_pbEdgeLeftFirst[uiIdx] = val; } |
---|
808 | Bool* getEdgePartition( UInt uiIdx ) { return &m_pbEdgePartition[uiIdx * 16]; } |
---|
809 | Void reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion ); |
---|
810 | |
---|
811 | #if LGE_EDGE_INTRA_DELTA_DC |
---|
812 | Int* getEdgeDeltaDC0( ) { return m_piEdgeDeltaDC0; } |
---|
813 | Int* getEdgeDeltaDC1( ) { return m_piEdgeDeltaDC1; } |
---|
814 | Int getEdgeDeltaDC0( UInt uiIdx ) { return m_piEdgeDeltaDC0[uiIdx]; } |
---|
815 | Int getEdgeDeltaDC1( UInt uiIdx ) { return m_piEdgeDeltaDC1[uiIdx]; } |
---|
816 | Void setEdgeDeltaDC0( UInt uiIdx, Int val ) { m_piEdgeDeltaDC0[uiIdx] = val; } |
---|
817 | Void setEdgeDeltaDC1( UInt uiIdx, Int val ) { m_piEdgeDeltaDC1[uiIdx] = val; } |
---|
818 | #endif |
---|
819 | #endif |
---|
820 | |
---|
821 | #if RWTH_SDC_DLT_B0036 |
---|
822 | Bool* getSDCFlag () { return m_pbSDCFlag; } |
---|
823 | Bool getSDCFlag ( UInt uiIdx ) { return m_pbSDCFlag[uiIdx]; } |
---|
824 | Void setSDCFlagSubParts ( Bool bSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
825 | |
---|
826 | UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); |
---|
827 | |
---|
828 | Bool getSDCAvailable ( UInt uiAbsPartIdx ); |
---|
829 | |
---|
830 | Pel* getSDCSegmentDCOffset( UInt uiSeg ) { return m_apSegmentDCOffset[uiSeg]; } |
---|
831 | Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } |
---|
832 | Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } |
---|
833 | #endif |
---|
834 | }; |
---|
835 | |
---|
836 | namespace RasterAddress |
---|
837 | { |
---|
838 | /** Check whether 2 addresses point to the same column |
---|
839 | * \param addrA First address in raster scan order |
---|
840 | * \param addrB Second address in raters scan order |
---|
841 | * \param numUnitsPerRow Number of units in a row |
---|
842 | * \return Result of test |
---|
843 | */ |
---|
844 | static inline Bool isEqualCol( Int addrA, Int addrB, Int numUnitsPerRow ) |
---|
845 | { |
---|
846 | // addrA % numUnitsPerRow == addrB % numUnitsPerRow |
---|
847 | return (( addrA ^ addrB ) & ( numUnitsPerRow - 1 ) ) == 0; |
---|
848 | } |
---|
849 | |
---|
850 | /** Check whether 2 addresses point to the same row |
---|
851 | * \param addrA First address in raster scan order |
---|
852 | * \param addrB Second address in raters scan order |
---|
853 | * \param numUnitsPerRow Number of units in a row |
---|
854 | * \return Result of test |
---|
855 | */ |
---|
856 | static inline Bool isEqualRow( Int addrA, Int addrB, Int numUnitsPerRow ) |
---|
857 | { |
---|
858 | // addrA / numUnitsPerRow == addrB / numUnitsPerRow |
---|
859 | return (( addrA ^ addrB ) &~ ( numUnitsPerRow - 1 ) ) == 0; |
---|
860 | } |
---|
861 | |
---|
862 | /** Check whether 2 addresses point to the same row or column |
---|
863 | * \param addrA First address in raster scan order |
---|
864 | * \param addrB Second address in raters scan order |
---|
865 | * \param numUnitsPerRow Number of units in a row |
---|
866 | * \return Result of test |
---|
867 | */ |
---|
868 | static inline Bool isEqualRowOrCol( Int addrA, Int addrB, Int numUnitsPerRow ) |
---|
869 | { |
---|
870 | return isEqualCol( addrA, addrB, numUnitsPerRow ) | isEqualRow( addrA, addrB, numUnitsPerRow ); |
---|
871 | } |
---|
872 | |
---|
873 | /** Check whether one address points to the first column |
---|
874 | * \param addr Address in raster scan order |
---|
875 | * \param numUnitsPerRow Number of units in a row |
---|
876 | * \return Result of test |
---|
877 | */ |
---|
878 | static inline Bool isZeroCol( Int addr, Int numUnitsPerRow ) |
---|
879 | { |
---|
880 | // addr % numUnitsPerRow == 0 |
---|
881 | return ( addr & ( numUnitsPerRow - 1 ) ) == 0; |
---|
882 | } |
---|
883 | |
---|
884 | /** Check whether one address points to the first row |
---|
885 | * \param addr Address in raster scan order |
---|
886 | * \param numUnitsPerRow Number of units in a row |
---|
887 | * \return Result of test |
---|
888 | */ |
---|
889 | static inline Bool isZeroRow( Int addr, Int numUnitsPerRow ) |
---|
890 | { |
---|
891 | // addr / numUnitsPerRow == 0 |
---|
892 | return ( addr &~ ( numUnitsPerRow - 1 ) ) == 0; |
---|
893 | } |
---|
894 | |
---|
895 | /** Check whether one address points to a column whose index is smaller than a given value |
---|
896 | * \param addr Address in raster scan order |
---|
897 | * \param val Given column index value |
---|
898 | * \param numUnitsPerRow Number of units in a row |
---|
899 | * \return Result of test |
---|
900 | */ |
---|
901 | static inline Bool lessThanCol( Int addr, Int val, Int numUnitsPerRow ) |
---|
902 | { |
---|
903 | // addr % numUnitsPerRow < val |
---|
904 | return ( addr & ( numUnitsPerRow - 1 ) ) < val; |
---|
905 | } |
---|
906 | |
---|
907 | /** Check whether one address points to a row whose index is smaller than a given value |
---|
908 | * \param addr Address in raster scan order |
---|
909 | * \param val Given row index value |
---|
910 | * \param numUnitsPerRow Number of units in a row |
---|
911 | * \return Result of test |
---|
912 | */ |
---|
913 | static inline Bool lessThanRow( Int addr, Int val, Int numUnitsPerRow ) |
---|
914 | { |
---|
915 | // addr / numUnitsPerRow < val |
---|
916 | return addr < val * numUnitsPerRow; |
---|
917 | } |
---|
918 | }; |
---|
919 | |
---|
920 | //! \} |
---|
921 | |
---|
922 | #endif |
---|