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-2011, 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 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 | |
---|
35 | |
---|
36 | /** \file TComDataCU.h |
---|
37 | \brief CU data structure (header) |
---|
38 | \todo not all entities are documented |
---|
39 | */ |
---|
40 | |
---|
41 | #ifndef _TCOMDATACU_ |
---|
42 | #define _TCOMDATACU_ |
---|
43 | |
---|
44 | #include <assert.h> |
---|
45 | |
---|
46 | // Include files |
---|
47 | #include "CommonDef.h" |
---|
48 | #include "TComMotionInfo.h" |
---|
49 | #include "TComSlice.h" |
---|
50 | #include "TComRdCost.h" |
---|
51 | #include "TComPattern.h" |
---|
52 | #include "TComYuv.h" |
---|
53 | |
---|
54 | #include <algorithm> |
---|
55 | #include <vector> |
---|
56 | |
---|
57 | // ==================================================================================================================== |
---|
58 | // Class definition |
---|
59 | // ==================================================================================================================== |
---|
60 | |
---|
61 | /// CU data structure class |
---|
62 | class TComDataCU |
---|
63 | { |
---|
64 | private: |
---|
65 | |
---|
66 | // ------------------------------------------------------------------------------------------------------------------- |
---|
67 | // class pointers |
---|
68 | // ------------------------------------------------------------------------------------------------------------------- |
---|
69 | |
---|
70 | TComPic* m_pcPic; ///< picture class pointer |
---|
71 | TComSlice* m_pcSlice; ///< slice header pointer |
---|
72 | TComPattern* m_pcPattern; ///< neighbour access class pointer |
---|
73 | |
---|
74 | // ------------------------------------------------------------------------------------------------------------------- |
---|
75 | // CU description |
---|
76 | // ------------------------------------------------------------------------------------------------------------------- |
---|
77 | |
---|
78 | UInt m_uiCUAddr; ///< CU address in a slice |
---|
79 | UInt m_uiAbsIdxInLCU; ///< absolute address in a CU. It's Z scan order |
---|
80 | UInt m_uiCUPelX; ///< CU position in a pixel (X) |
---|
81 | UInt m_uiCUPelY; ///< CU position in a pixel (Y) |
---|
82 | UInt m_uiNumPartition; ///< total number of minimum partitions in a CU |
---|
83 | UChar* m_puhWidth; ///< array of widths |
---|
84 | UChar* m_puhHeight; ///< array of heights |
---|
85 | UChar* m_puhDepth; ///< array of depths |
---|
86 | #if HHI_MPI |
---|
87 | Int* m_piTextureModeDepth; ///< at which depth is prediction data inherited from texture picture ( -1 : none ) |
---|
88 | #endif |
---|
89 | |
---|
90 | // ------------------------------------------------------------------------------------------------------------------- |
---|
91 | // CU data |
---|
92 | // ------------------------------------------------------------------------------------------------------------------- |
---|
93 | |
---|
94 | PartSize* m_pePartSize; ///< array of partition sizes |
---|
95 | PredMode* m_pePredMode; ///< array of prediction modes |
---|
96 | UChar* m_phQP; ///< array of QP values |
---|
97 | UChar* m_puhTrIdx; ///< array of transform indices |
---|
98 | UChar* m_puhCbf[3]; ///< array of coded block flags (CBF) |
---|
99 | TComCUMvField m_acCUMvField[2]; ///< array of motion vectors |
---|
100 | TCoeff* m_pcTrCoeffY; ///< transformed coefficient buffer (Y) |
---|
101 | TCoeff* m_pcTrCoeffCb; ///< transformed coefficient buffer (Cb) |
---|
102 | TCoeff* m_pcTrCoeffCr; ///< transformed coefficient buffer (Cr) |
---|
103 | #if SNY_DQP |
---|
104 | Bool m_bdQP; ///< signal if LCU dQP encoded |
---|
105 | #endif//SNY_DQP |
---|
106 | |
---|
107 | #if POZNAN_DBMP_CALC_PRED_DATA |
---|
108 | TComCUMvField m_acCUMvField2nd[2]; ///< array of motion vectors selected for points with no MP prediction available |
---|
109 | #endif |
---|
110 | |
---|
111 | // ------------------------------------------------------------------------------------------------------------------- |
---|
112 | // neighbour access variables |
---|
113 | // ------------------------------------------------------------------------------------------------------------------- |
---|
114 | |
---|
115 | TComDataCU* m_pcCUAboveLeft; ///< pointer of above-left CU |
---|
116 | TComDataCU* m_pcCUAboveRight; ///< pointer of above-right CU |
---|
117 | TComDataCU* m_pcCUAbove; ///< pointer of above CU |
---|
118 | TComDataCU* m_pcCULeft; ///< pointer of left CU |
---|
119 | TComDataCU* m_apcCUColocated[2]; ///< pointer of temporally colocated CU's for both directions |
---|
120 | TComMvField m_cMvFieldA; ///< motion vector of position A |
---|
121 | TComMvField m_cMvFieldB; ///< motion vector of position B |
---|
122 | TComMvField m_cMvFieldC; ///< motion vector of position C |
---|
123 | TComMv m_cMvPred; ///< motion vector predictor |
---|
124 | |
---|
125 | // ------------------------------------------------------------------------------------------------------------------- |
---|
126 | // coding tool information |
---|
127 | // ------------------------------------------------------------------------------------------------------------------- |
---|
128 | |
---|
129 | Bool* m_pbMergeFlag; ///< array of merge flags |
---|
130 | UChar* m_puhMergeIndex; ///< array of merge candidate indices |
---|
131 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
132 | Bool* m_pbResPredAvailable; ///< array of residual prediction available flags |
---|
133 | Bool* m_pbResPredFlag; ///< array of residual prediction flags |
---|
134 | #endif |
---|
135 | UChar* m_apuhNeighbourCandIdx[ MRG_MAX_NUM_CANDS ];///< array of motion vector predictor candidates indices |
---|
136 | UChar* m_puhLumaIntraDir; ///< array of intra directions (luma) |
---|
137 | UChar* m_puhChromaIntraDir; ///< array of intra directions (chroma) |
---|
138 | UChar* m_puhInterDir; ///< array of inter directions |
---|
139 | Int* m_apiMVPIdx[2]; ///< array of motion vector predictor candidates |
---|
140 | Int* m_apiMVPNum[2]; ///< array of number of possible motion vectors predictors |
---|
141 | UInt* m_puiAlfCtrlFlag; ///< array of ALF flags |
---|
142 | UInt* m_puiTmpAlfCtrlFlag; ///< temporal array of ALF flags |
---|
143 | #if HHI_DMM_WEDGE_INTRA |
---|
144 | UInt* m_puiWedgeFullTabIdx; |
---|
145 | Int* m_piWedgeFullDeltaDC1; |
---|
146 | Int* m_piWedgeFullDeltaDC2; |
---|
147 | |
---|
148 | UInt* m_puiWedgePredDirTabIdx; |
---|
149 | Int* m_piWedgePredDirDeltaDC1; |
---|
150 | Int* m_piWedgePredDirDeltaDC2; |
---|
151 | Int* m_piWedgePredDirDeltaEnd; |
---|
152 | #endif |
---|
153 | #if HHI_DMM_PRED_TEX |
---|
154 | UInt* m_puiWedgePredTexTabIdx; |
---|
155 | Int* m_piWedgePredTexDeltaDC1; |
---|
156 | Int* m_piWedgePredTexDeltaDC2; |
---|
157 | |
---|
158 | Int* m_piContourPredTexDeltaDC1; |
---|
159 | Int* m_piContourPredTexDeltaDC2; |
---|
160 | #endif |
---|
161 | |
---|
162 | // ------------------------------------------------------------------------------------------------------------------- |
---|
163 | // misc. variables |
---|
164 | // ------------------------------------------------------------------------------------------------------------------- |
---|
165 | |
---|
166 | Bool m_bDecSubCu; ///< indicates decoder-mode |
---|
167 | Double m_dTotalCost; ///< sum of partition RD costs |
---|
168 | Dist m_uiTotalDistortion; ///< sum of partition distortion |
---|
169 | UInt m_uiTotalBits; ///< sum of partition bits |
---|
170 | UInt m_uiSliceStartCU; ///< Start CU address of current slice |
---|
171 | UInt m_uiEntropySliceStartCU; ///< Start CU address of current slice |
---|
172 | |
---|
173 | protected: |
---|
174 | |
---|
175 | /// add possible motion vector predictor candidates |
---|
176 | Bool xAddMVPCand ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); |
---|
177 | #if MTK_AMVP_SMVP_DERIVATION |
---|
178 | Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); |
---|
179 | #endif |
---|
180 | |
---|
181 | #if MTK_TMVP_H_MRG || MTK_TMVP_H_AMVP |
---|
182 | Void deriveRightBottomIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxRB ); |
---|
183 | Bool xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx ); |
---|
184 | #endif |
---|
185 | |
---|
186 | /// remove redundant candidates |
---|
187 | Void xUniqueMVPCand ( AMVPInfo* pInfo ); |
---|
188 | |
---|
189 | Void xCheckCornerCand( TComDataCU* pcCorner, UInt uiCornerIdx, UInt uiIter, Bool& rbValidCand ); |
---|
190 | /// compute required bits to encode MVD (used in AMVP) |
---|
191 | UInt xGetMvdBits ( TComMv cMvd ); |
---|
192 | UInt xGetComponentBits ( Int iVal ); |
---|
193 | |
---|
194 | /// compute scaling factor from POC difference |
---|
195 | Int xGetDistScaleFactor ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC ); |
---|
196 | |
---|
197 | /// calculate all CBF's from coefficients |
---|
198 | Void xCalcCuCbf ( UChar* puhCbf, UInt uiTrDepth, UInt uiCbfDepth, UInt uiCuDepth ); |
---|
199 | |
---|
200 | #if FT_TCTR_AMVP || FT_TCTR_MRG |
---|
201 | Void xDeriveCenterIdx( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxCenter ); |
---|
202 | Bool xGetCenterCol( UInt uiPartIdx, RefPicList eRefPicList, int iRefIdx, TComMv *pcMv ); |
---|
203 | #endif |
---|
204 | |
---|
205 | public: |
---|
206 | TComDataCU(); |
---|
207 | virtual ~TComDataCU(); |
---|
208 | |
---|
209 | // ------------------------------------------------------------------------------------------------------------------- |
---|
210 | // create / destroy / initialize / copy |
---|
211 | // ------------------------------------------------------------------------------------------------------------------- |
---|
212 | |
---|
213 | Void create ( UInt uiNumPartition, UInt uiWidth, UInt uiHeight, Bool bDecSubCu ); |
---|
214 | Void destroy (); |
---|
215 | |
---|
216 | Void initCU ( TComPic* pcPic, UInt uiCUAddr ); |
---|
217 | Void initEstData (); |
---|
218 | Void initSubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth ); |
---|
219 | |
---|
220 | Void copySubCU ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth ); |
---|
221 | Void copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList ); |
---|
222 | Void copyPartFrom ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth ); |
---|
223 | |
---|
224 | Void copyToPic ( UChar uiDepth ); |
---|
225 | Void copyToPic ( UChar uiDepth, UInt uiPartIdx, UInt uiPartDepth ); |
---|
226 | |
---|
227 | // ------------------------------------------------------------------------------------------------------------------- |
---|
228 | // member functions for CU description |
---|
229 | // ------------------------------------------------------------------------------------------------------------------- |
---|
230 | |
---|
231 | TComPic* getPic () { return m_pcPic; } |
---|
232 | TComSlice* getSlice () { return m_pcSlice; } |
---|
233 | UInt& getAddr () { return m_uiCUAddr; } |
---|
234 | UInt& getZorderIdxInCU () { return m_uiAbsIdxInLCU; } |
---|
235 | UInt getCUPelX () { return m_uiCUPelX; } |
---|
236 | UInt getCUPelY () { return m_uiCUPelY; } |
---|
237 | TComPattern* getPattern () { return m_pcPattern; } |
---|
238 | |
---|
239 | UChar* getDepth () { return m_puhDepth; } |
---|
240 | UChar getDepth ( UInt uiIdx ) { return m_puhDepth[uiIdx]; } |
---|
241 | Void setDepth ( UInt uiIdx, UChar uh ) { m_puhDepth[uiIdx] = uh; } |
---|
242 | |
---|
243 | #if HHI_MPI |
---|
244 | Int* getTextureModeDepth () { return m_piTextureModeDepth; } |
---|
245 | Int getTextureModeDepth ( UInt uiIdx ) { return m_piTextureModeDepth[uiIdx]; } |
---|
246 | Void setTextureModeDepth ( UInt uiIdx, Int iTextureModeDepth ){ m_piTextureModeDepth[uiIdx] = iTextureModeDepth; } |
---|
247 | Void setTextureModeDepthSubParts( Int iTextureModeDepth, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
248 | Void copyTextureMotionDataFrom( TComDataCU* pcCU, UInt uiDepth, UInt uiAbsPartIdxSrc, UInt uiAbsPartIdxDst = 0 ); |
---|
249 | #endif |
---|
250 | |
---|
251 | Void setDepthSubParts ( UInt uiDepth, UInt uiAbsPartIdx ); |
---|
252 | Void getPosInPic ( UInt uiAbsPartIndex, Int& riPosX, Int& riPosY ); |
---|
253 | |
---|
254 | // ------------------------------------------------------------------------------------------------------------------- |
---|
255 | // member functions for CU data |
---|
256 | // ------------------------------------------------------------------------------------------------------------------- |
---|
257 | |
---|
258 | PartSize* getPartitionSize () { return m_pePartSize; } |
---|
259 | PartSize getPartitionSize ( UInt uiIdx ) { return m_pePartSize[uiIdx]; } |
---|
260 | Void setPartitionSize ( UInt uiIdx, PartSize uh){ m_pePartSize[uiIdx] = uh; } |
---|
261 | Void setPartSizeSubParts ( PartSize eMode, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
262 | |
---|
263 | PredMode* getPredictionMode () { return m_pePredMode; } |
---|
264 | PredMode getPredictionMode ( UInt uiIdx ) { return m_pePredMode[uiIdx]; } |
---|
265 | Void setPredictionMode ( UInt uiIdx, PredMode uh){ m_pePredMode[uiIdx] = uh; } |
---|
266 | Void setPredModeSubParts ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
267 | |
---|
268 | UChar* getWidth () { return m_puhWidth; } |
---|
269 | UChar getWidth ( UInt uiIdx ) { return m_puhWidth[uiIdx]; } |
---|
270 | Void setWidth ( UInt uiIdx, UChar uh ) { m_puhWidth[uiIdx] = uh; } |
---|
271 | |
---|
272 | UChar* getHeight () { return m_puhHeight; } |
---|
273 | UChar getHeight ( UInt uiIdx ) { return m_puhHeight[uiIdx]; } |
---|
274 | Void setHeight ( UInt uiIdx, UChar uh ) { m_puhHeight[uiIdx] = uh; } |
---|
275 | |
---|
276 | Void setSizeSubParts ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
277 | |
---|
278 | UChar* getQP () { return m_phQP; } |
---|
279 | UChar getQP ( UInt uiIdx ) { return m_phQP[uiIdx]; } |
---|
280 | Void setQP ( UInt uiIdx, UChar uh ) { m_phQP[uiIdx] = uh; } |
---|
281 | Void setQPSubParts ( UInt uiQP, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
282 | #if SNY_DQP |
---|
283 | Bool getdQPFlag () { return m_bdQP; } |
---|
284 | Void setdQPFlag ( Bool b ) { m_bdQP = b; } |
---|
285 | #endif//SNY_DQP |
---|
286 | |
---|
287 | UChar* getTransformIdx () { return m_puhTrIdx; } |
---|
288 | UChar getTransformIdx ( UInt uiIdx ) { return m_puhTrIdx[uiIdx]; } |
---|
289 | Void setTrIdxSubParts ( UInt uiTrIdx, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
290 | |
---|
291 | UInt getQuadtreeTULog2MinSizeInCU( UInt uiIdx ); |
---|
292 | |
---|
293 | #if HHI_RQT_FORCE_SPLIT_ACC2_PU || HHI_RQT_DISABLE_SUB |
---|
294 | UInt getQuadtreeTULog2RootSizeInCU( UInt uiIdx ); |
---|
295 | #endif |
---|
296 | |
---|
297 | TComCUMvField* getCUMvField ( RefPicList e ) { return &m_acCUMvField[e]; } |
---|
298 | |
---|
299 | TCoeff*& getCoeffY () { return m_pcTrCoeffY; } |
---|
300 | TCoeff*& getCoeffCb () { return m_pcTrCoeffCb; } |
---|
301 | TCoeff*& getCoeffCr () { return m_pcTrCoeffCr; } |
---|
302 | |
---|
303 | UChar getCbf ( UInt uiIdx, TextType eType ) { return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx]; } |
---|
304 | UChar* getCbf ( TextType eType ) { return m_puhCbf[g_aucConvertTxtTypeToIdx[eType]]; } |
---|
305 | UChar getCbf ( UInt uiIdx, TextType eType, UInt uiTrDepth ) { return ( ( getCbf( uiIdx, eType ) >> uiTrDepth ) & 0x1 ); } |
---|
306 | Void setCbf ( UInt uiIdx, TextType eType, UChar uh ) { m_puhCbf[g_aucConvertTxtTypeToIdx[eType]][uiIdx] = uh; } |
---|
307 | Void clearCbf ( UInt uiIdx, TextType eType, UInt uiNumParts ); |
---|
308 | UChar getQtRootCbf ( UInt uiIdx ) { return getCbf( uiIdx, TEXT_LUMA, 0 ) || getCbf( uiIdx, TEXT_CHROMA_U, 0 ) || getCbf( uiIdx, TEXT_CHROMA_V, 0 ); } |
---|
309 | |
---|
310 | Void setCbfSubParts ( UInt uiCbfY, UInt uiCbfU, UInt uiCbfV, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
311 | Void setCbfSubParts ( UInt uiCbf, TextType eTType, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
312 | #if HHI_MRG_SKIP |
---|
313 | Void setCbfSubParts ( UInt uiCbf, TextType eTType, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
314 | #endif |
---|
315 | |
---|
316 | #if POZNAN_DBMP_CALC_PRED_DATA |
---|
317 | TComCUMvField* getCUMvField2nd ( RefPicList e ) { return &m_acCUMvField2nd[e]; } |
---|
318 | #endif |
---|
319 | |
---|
320 | // ------------------------------------------------------------------------------------------------------------------- |
---|
321 | // member functions for coding tool information |
---|
322 | // ------------------------------------------------------------------------------------------------------------------- |
---|
323 | |
---|
324 | Bool* getMergeFlag () { return m_pbMergeFlag; } |
---|
325 | Bool getMergeFlag ( UInt uiIdx ) { return m_pbMergeFlag[uiIdx]; } |
---|
326 | Void setMergeFlag ( UInt uiIdx, Bool b ) { m_pbMergeFlag[uiIdx] = b; } |
---|
327 | Void setMergeFlagSubParts ( Bool bMergeFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
328 | |
---|
329 | UChar* getMergeIndex () { return m_puhMergeIndex; } |
---|
330 | UChar getMergeIndex ( UInt uiIdx ) { return m_puhMergeIndex[uiIdx]; } |
---|
331 | Void setMergeIndex ( UInt uiIdx, UInt uiMergeIndex ) { m_puhMergeIndex[uiIdx] = uiMergeIndex; } |
---|
332 | Void setMergeIndexSubParts ( UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
333 | |
---|
334 | UChar* getNeighbourCandIdx ( UInt uiCandIdx ) { return m_apuhNeighbourCandIdx[uiCandIdx]; } |
---|
335 | UChar getNeighbourCandIdx ( UInt uiCandIdx, UInt uiIdx ){ return m_apuhNeighbourCandIdx[uiCandIdx][uiIdx]; } |
---|
336 | Void setNeighbourCandIdx ( UInt uiCandIdx, UInt uiIdx, UChar uhNeighCands ) { m_apuhNeighbourCandIdx[uiCandIdx][uiIdx] = uhNeighCands;} |
---|
337 | Void setNeighbourCandIdxSubParts ( UInt uiCandIdx, UChar uhNumCands, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
338 | |
---|
339 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
340 | Bool* getResPredAvail () { return m_pbResPredAvailable; } |
---|
341 | Bool getResPredAvail ( UInt uiIdx ) { return m_pbResPredAvailable[uiIdx]; } |
---|
342 | Void setResPredAvail ( UInt uiIdx, Bool b ) { m_pbResPredAvailable[uiIdx] = b; } |
---|
343 | Void setResPredAvailSubParts ( Bool b, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
344 | |
---|
345 | Bool* getResPredFlag () { return m_pbResPredFlag; } |
---|
346 | Bool getResPredFlag ( UInt uiIdx ) { return m_pbResPredFlag[uiIdx]; } |
---|
347 | Void setResPredFlag ( UInt uiIdx, Bool b ) { m_pbResPredFlag[uiIdx] = b; } |
---|
348 | Void setResPredFlagSubParts ( Bool b, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
349 | |
---|
350 | Void setResPredIndicator ( Bool bAv, Bool bRP ) { m_pbResPredAvailable[0] = bAv; m_pbResPredFlag[0] = bRP; } |
---|
351 | #endif |
---|
352 | |
---|
353 | Void setSubPartBool ( Bool bParameter, Bool* pbBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ); |
---|
354 | Void setSubPartUChar ( UInt bParameter, UChar* pbBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ); |
---|
355 | |
---|
356 | UChar* getLumaIntraDir () { return m_puhLumaIntraDir; } |
---|
357 | UChar getLumaIntraDir ( UInt uiIdx ) { return m_puhLumaIntraDir[uiIdx]; } |
---|
358 | Void setLumaIntraDir ( UInt uiIdx, UChar uh ) { m_puhLumaIntraDir[uiIdx] = uh; } |
---|
359 | Void setLumaIntraDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
360 | |
---|
361 | UChar* getChromaIntraDir () { return m_puhChromaIntraDir; } |
---|
362 | UChar getChromaIntraDir ( UInt uiIdx ) { return m_puhChromaIntraDir[uiIdx]; } |
---|
363 | Void setChromaIntraDir ( UInt uiIdx, UChar uh ) { m_puhChromaIntraDir[uiIdx] = uh; } |
---|
364 | Void setChromIntraDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
365 | |
---|
366 | UChar* getInterDir () { return m_puhInterDir; } |
---|
367 | UChar getInterDir ( UInt uiIdx ) { return m_puhInterDir[uiIdx]; } |
---|
368 | Void setInterDir ( UInt uiIdx, UChar uh ) { m_puhInterDir[uiIdx] = uh; } |
---|
369 | Void setInterDirSubParts ( UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
370 | |
---|
371 | UInt* getAlfCtrlFlag () { return m_puiAlfCtrlFlag; } |
---|
372 | UInt getAlfCtrlFlag ( UInt uiIdx ) { return m_puiAlfCtrlFlag[uiIdx]; } |
---|
373 | Void setAlfCtrlFlag ( UInt uiIdx, UInt uiFlag){ m_puiAlfCtrlFlag[uiIdx] = uiFlag; } |
---|
374 | Void setAlfCtrlFlagSubParts( UInt uiFlag, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
375 | |
---|
376 | Void createTmpAlfCtrlFlag (); |
---|
377 | Void destroyTmpAlfCtrlFlag (); |
---|
378 | Void copyAlfCtrlFlagToTmp (); |
---|
379 | Void copyAlfCtrlFlagFromTmp(); |
---|
380 | |
---|
381 | #if HHI_DMM_WEDGE_INTRA |
---|
382 | UInt* getWedgeFullTabIdx () { return m_puiWedgeFullTabIdx; } |
---|
383 | UInt getWedgeFullTabIdx ( UInt uiIdx ) { return m_puiWedgeFullTabIdx[uiIdx]; } |
---|
384 | Void setWedgeFullTabIdx ( UInt uiIdx, UInt uh ) { m_puiWedgeFullTabIdx[uiIdx] = uh; } |
---|
385 | Void setWedgeFullTabIdxSubParts ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
386 | |
---|
387 | Int* getWedgeFullDeltaDC1 () { return m_piWedgeFullDeltaDC1; } |
---|
388 | Int getWedgeFullDeltaDC1 ( UInt uiIdx ) { return m_piWedgeFullDeltaDC1[uiIdx]; } |
---|
389 | Void setWedgeFullDeltaDC1 ( UInt uiIdx, Int i ) { m_piWedgeFullDeltaDC1[uiIdx] = i; } |
---|
390 | Void setWedgeFullDeltaDC1SubParts( Int iDC1, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
391 | |
---|
392 | Int* getWedgeFullDeltaDC2 () { return m_piWedgeFullDeltaDC2; } |
---|
393 | Int getWedgeFullDeltaDC2 ( UInt uiIdx ) { return m_piWedgeFullDeltaDC2[uiIdx]; } |
---|
394 | Void setWedgeFullDeltaDC2 ( UInt uiIdx, Int i ) { m_piWedgeFullDeltaDC2[uiIdx] = i; } |
---|
395 | Void setWedgeFullDeltaDC2SubParts( Int iDC2, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
396 | |
---|
397 | UInt* getWedgePredDirTabIdx () { return m_puiWedgePredDirTabIdx; } |
---|
398 | UInt getWedgePredDirTabIdx ( UInt uiIdx ) { return m_puiWedgePredDirTabIdx[uiIdx]; } |
---|
399 | Void setWedgePredDirTabIdx ( UInt uiIdx, UInt uh ) { m_puiWedgePredDirTabIdx[uiIdx] = uh; } |
---|
400 | Void setWedgePredDirTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
401 | |
---|
402 | Int* getWedgePredDirDeltaDC1 () { return m_piWedgePredDirDeltaDC1; } |
---|
403 | Int getWedgePredDirDeltaDC1 ( UInt uiIdx ) { return m_piWedgePredDirDeltaDC1[uiIdx]; } |
---|
404 | Void setWedgePredDirDeltaDC1 ( UInt uiIdx, Int i ) { m_piWedgePredDirDeltaDC1[uiIdx] = i; } |
---|
405 | Void setWedgePredDirDeltaDC1SubParts( Int iDC1, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
406 | |
---|
407 | Int* getWedgePredDirDeltaDC2 () { return m_piWedgePredDirDeltaDC2; } |
---|
408 | Int getWedgePredDirDeltaDC2 ( UInt uiIdx ) { return m_piWedgePredDirDeltaDC2[uiIdx]; } |
---|
409 | Void setWedgePredDirDeltaDC2 ( UInt uiIdx, Int i ) { m_piWedgePredDirDeltaDC2[uiIdx] = i; } |
---|
410 | Void setWedgePredDirDeltaDC2SubParts( Int iDC2, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
411 | |
---|
412 | Int* getWedgePredDirDeltaEnd () { return m_piWedgePredDirDeltaEnd; } |
---|
413 | Int getWedgePredDirDeltaEnd ( UInt uiIdx ) { return m_piWedgePredDirDeltaEnd[uiIdx]; } |
---|
414 | Void setWedgePredDirDeltaEnd ( UInt uiIdx, Int iD ) { m_piWedgePredDirDeltaEnd[uiIdx] = iD; } |
---|
415 | Void setWedgePredDirDeltaEndSubParts( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
416 | #endif |
---|
417 | #if HHI_DMM_PRED_TEX |
---|
418 | UInt* getWedgePredTexTabIdx () { return m_puiWedgePredTexTabIdx; } |
---|
419 | UInt getWedgePredTexTabIdx ( UInt uiIdx ) { return m_puiWedgePredTexTabIdx[uiIdx]; } |
---|
420 | Void setWedgePredTexTabIdx ( UInt uiIdx, UInt uh ) { m_puiWedgePredTexTabIdx[uiIdx] = uh; } |
---|
421 | Void setWedgePredTexTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
422 | |
---|
423 | Int* getWedgePredTexDeltaDC1 () { return m_piWedgePredTexDeltaDC1; } |
---|
424 | Int getWedgePredTexDeltaDC1 ( UInt uiIdx ) { return m_piWedgePredTexDeltaDC1[uiIdx]; } |
---|
425 | Void setWedgePredTexDeltaDC1 ( UInt uiIdx, Int i ) { m_piWedgePredTexDeltaDC1[uiIdx] = i; } |
---|
426 | Void setWedgePredTexDeltaDC1SubParts( Int iDC1, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
427 | |
---|
428 | Int* getWedgePredTexDeltaDC2 () { return m_piWedgePredTexDeltaDC2; } |
---|
429 | Int getWedgePredTexDeltaDC2 ( UInt uiIdx ) { return m_piWedgePredTexDeltaDC2[uiIdx]; } |
---|
430 | Void setWedgePredTexDeltaDC2 ( UInt uiIdx, Int i ) { m_piWedgePredTexDeltaDC2[uiIdx] = i; } |
---|
431 | Void setWedgePredTexDeltaDC2SubParts( Int iDC2, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
432 | |
---|
433 | Int* getContourPredTexDeltaDC1 () { return m_piContourPredTexDeltaDC1; } |
---|
434 | Int getContourPredTexDeltaDC1 ( UInt uiIdx ) { return m_piContourPredTexDeltaDC1[uiIdx]; } |
---|
435 | Void setContourPredTexDeltaDC1 ( UInt uiIdx, Int i ) { m_piContourPredTexDeltaDC1[uiIdx] = i; } |
---|
436 | Void setContourPredTexDeltaDC1SubParts( Int iDC1, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
437 | |
---|
438 | Int* getContourPredTexDeltaDC2 () { return m_piContourPredTexDeltaDC2; } |
---|
439 | Int getContourPredTexDeltaDC2 ( UInt uiIdx ) { return m_piContourPredTexDeltaDC2[uiIdx]; } |
---|
440 | Void setContourPredTexDeltaDC2 ( UInt uiIdx, Int i ) { m_piContourPredTexDeltaDC2[uiIdx] = i; } |
---|
441 | Void setContourPredTexDeltaDC2SubParts( Int iDC2, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
442 | #endif |
---|
443 | |
---|
444 | #if HHI_INTER_VIEW_MOTION_PRED |
---|
445 | Int getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ); |
---|
446 | Bool getPdmMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false ); |
---|
447 | Bool getIViewOrgDepthMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv ); |
---|
448 | #endif |
---|
449 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
450 | Bool getResidualSamples( UInt uiPartIdx, TComYuv* pcYuv = 0 ); |
---|
451 | #endif |
---|
452 | |
---|
453 | // ------------------------------------------------------------------------------------------------------------------- |
---|
454 | // member functions for accessing partition information |
---|
455 | // ------------------------------------------------------------------------------------------------------------------- |
---|
456 | |
---|
457 | Void getPartIndexAndSize ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight ); |
---|
458 | UChar getNumPartInter (); |
---|
459 | Bool isFirstAbsZorderIdxInDepth (UInt uiAbsPartIdx, UInt uiDepth); |
---|
460 | |
---|
461 | // ------------------------------------------------------------------------------------------------------------------- |
---|
462 | // member functions for motion vector |
---|
463 | // ------------------------------------------------------------------------------------------------------------------- |
---|
464 | |
---|
465 | Void getMvField ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField& rcMvField ); |
---|
466 | |
---|
467 | AMVP_MODE getAMVPMode ( UInt uiIdx ); |
---|
468 | Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); |
---|
469 | #if DCM_SIMPLIFIED_MVP==0 |
---|
470 | Bool clearMVPCand ( TComMv cMvd, AMVPInfo* pInfo ); |
---|
471 | #endif |
---|
472 | Int searchMVPIdx ( TComMv cMv, AMVPInfo* pInfo ); |
---|
473 | |
---|
474 | Void setMVPIdx ( RefPicList eRefPicList, UInt uiIdx, Int iMVPIdx) { m_apiMVPIdx[eRefPicList][uiIdx] = iMVPIdx; } |
---|
475 | Int getMVPIdx ( RefPicList eRefPicList, UInt uiIdx) { return m_apiMVPIdx[eRefPicList][uiIdx]; } |
---|
476 | Int* getMVPIdx ( RefPicList eRefPicList ) { return m_apiMVPIdx[eRefPicList]; } |
---|
477 | |
---|
478 | Void setMVPNum ( RefPicList eRefPicList, UInt uiIdx, Int iMVPNum ) { m_apiMVPNum[eRefPicList][uiIdx] = iMVPNum; } |
---|
479 | Int getMVPNum ( RefPicList eRefPicList, UInt uiIdx ) { return m_apiMVPNum[eRefPicList][uiIdx]; } |
---|
480 | Int* getMVPNum ( RefPicList eRefPicList ) { return m_apiMVPNum[eRefPicList]; } |
---|
481 | |
---|
482 | Void setMVPIdxSubParts ( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
483 | Void setMVPNumSubParts ( Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); |
---|
484 | |
---|
485 | Void clipMv ( TComMv& rcMv ); |
---|
486 | Void getMvPredLeft ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldA.getMv(); } |
---|
487 | Void getMvPredAbove ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldB.getMv(); } |
---|
488 | Void getMvPredAboveRight ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldC.getMv(); } |
---|
489 | |
---|
490 | #if AMVP_BUFFERCOMPRESS |
---|
491 | Void compressMV (); |
---|
492 | #endif |
---|
493 | |
---|
494 | // ------------------------------------------------------------------------------------------------------------------- |
---|
495 | // utility functions for neighbouring information |
---|
496 | // ------------------------------------------------------------------------------------------------------------------- |
---|
497 | |
---|
498 | TComDataCU* getCULeft () { return m_pcCULeft; } |
---|
499 | TComDataCU* getCUAbove () { return m_pcCUAbove; } |
---|
500 | TComDataCU* getCUAboveLeft () { return m_pcCUAboveLeft; } |
---|
501 | TComDataCU* getCUAboveRight () { return m_pcCUAboveRight; } |
---|
502 | TComDataCU* getCUColocated ( RefPicList eRefPicList ) { return m_apcCUColocated[eRefPicList]; } |
---|
503 | |
---|
504 | TComDataCU* getPULeft ( UInt& uiLPartUnitIdx , UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
505 | TComDataCU* getPUAbove ( UInt& uiAPartUnitIdx , UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
506 | TComDataCU* getPUAboveLeft ( UInt& uiALPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
507 | TComDataCU* getPUAboveRight ( UInt& uiARPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
508 | TComDataCU* getPUBelowLeft ( UInt& uiBLPartUnitIdx, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
509 | |
---|
510 | #if CONSTRAINED_INTRA_PRED |
---|
511 | TComDataCU* getPUAboveRightAdi ( UInt& uiARPartUnitIdx, UInt uiPuWidth, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
512 | TComDataCU* getPUBelowLeftAdi ( UInt& uiBLPartUnitIdx, UInt uiPuHeight, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
513 | #else |
---|
514 | TComDataCU* getPUAboveRightAdi ( UInt& uiARPartUnitIdx, UInt uiPuWidth, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
515 | TComDataCU* getPUBelowLeftAdi ( UInt& uiBLPartUnitIdx, UInt uiPuHeight, UInt uiCurrPartUnitIdx, Bool bEnforceSliceRestriction=true, Bool bEnforceEntropySliceRestriction=true ); |
---|
516 | #endif |
---|
517 | |
---|
518 | Void deriveLeftRightTopIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); |
---|
519 | Void deriveLeftBottomIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxLB ); |
---|
520 | |
---|
521 | Void deriveLeftRightTopIdxAdi ( UInt& ruiPartIdxLT, UInt& ruiPartIdxRT, UInt uiPartOffset, UInt uiPartDepth ); |
---|
522 | Void deriveLeftBottomIdxAdi ( UInt& ruiPartIdxLB, UInt uiPartOffset, UInt uiPartDepth ); |
---|
523 | |
---|
524 | Bool hasEqualMotion ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ); |
---|
525 | Bool avoidMergeCandidate ( UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ); |
---|
526 | Bool hasEqualMotion ( UInt uiAbsPartIdx, UInt uiCandInterDir, Int* paiCandRefIdx, TComMv* pacCandMv ); |
---|
527 | Bool avoidMergeCandidate ( UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth, UInt uiCandInterDir, Int* paiCandRefIdx, TComMv* pacCandMv ); |
---|
528 | Void getInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, UInt* puiNeighbourCandIdx ); |
---|
529 | Void deriveLeftRightTopIdxGeneral ( PartSize eCUMode, UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); |
---|
530 | Void deriveLeftBottomIdxGeneral ( PartSize eCUMode, UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLB ); |
---|
531 | |
---|
532 | |
---|
533 | // ------------------------------------------------------------------------------------------------------------------- |
---|
534 | // member functions for modes |
---|
535 | // ------------------------------------------------------------------------------------------------------------------- |
---|
536 | |
---|
537 | Bool isIntra ( UInt uiPartIdx ) { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; } |
---|
538 | Bool isSkipped ( UInt uiPartIdx ); ///< SKIP (no residual) |
---|
539 | #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU |
---|
540 | Bool isCUSkiped( UInt uiPartIdx ) { return m_pePredMode[ uiPartIdx ] == MODE_SYNTH; } |
---|
541 | #endif |
---|
542 | |
---|
543 | // ------------------------------------------------------------------------------------------------------------------- |
---|
544 | // member functions for symbol prediction (most probable / mode conversion) |
---|
545 | // ------------------------------------------------------------------------------------------------------------------- |
---|
546 | |
---|
547 | Int getMostProbableIntraDirLuma ( UInt uiAbsPartIdx ); |
---|
548 | |
---|
549 | UInt getIntraSizeIdx ( UInt uiAbsPartIdx ); |
---|
550 | Void convertTransIdx ( UInt uiAbsPartIdx, UInt uiTrIdx, UInt& ruiLumaTrMode, UInt& ruiChromaTrMode ); |
---|
551 | |
---|
552 | #if LCEC_INTRA_MODE |
---|
553 | Int getLeftIntraDirLuma ( UInt uiAbsPartIdx ); |
---|
554 | Int getAboveIntraDirLuma ( UInt uiAbsPartIdx ); |
---|
555 | #endif |
---|
556 | |
---|
557 | #if MTK_DCM_MPM |
---|
558 | Int getIntraDirLumaPredictor ( UInt uiAbsPartIdx, Int uiIntraDirPred[] ); |
---|
559 | #endif |
---|
560 | |
---|
561 | #if MS_LCEC_LOOKUP_TABLE_EXCEPTION |
---|
562 | Bool isSuroundingRefIdxException ( UInt uiAbsPartIdx ); |
---|
563 | #endif |
---|
564 | |
---|
565 | // ------------------------------------------------------------------------------------------------------------------- |
---|
566 | // member functions for SBAC context |
---|
567 | // ------------------------------------------------------------------------------------------------------------------- |
---|
568 | |
---|
569 | UInt getCtxSplitFlag ( UInt uiAbsPartIdx, UInt uiDepth ); |
---|
570 | UInt getCtxCbf ( UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth ); |
---|
571 | UInt getCtxQtCbf ( UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth ); |
---|
572 | UInt getCtxQtRootCbf ( UInt uiAbsPartIdx ); |
---|
573 | UInt getCtxRefIdx ( UInt uiAbsPartIdx, RefPicList eRefPicList ); |
---|
574 | UInt getCtxSkipFlag ( UInt uiAbsPartIdx ); |
---|
575 | UInt getCtxAlfCtrlFlag ( UInt uiAbsPartIdx ); |
---|
576 | UInt getCtxInterDir ( UInt uiAbsPartIdx ); |
---|
577 | UInt getCtxIntraDirChroma ( UInt uiAbsPartIdx ); |
---|
578 | UInt getCtxMergeFlag ( UInt uiAbsPartIdx ); |
---|
579 | |
---|
580 | Void setSliceStartCU ( UInt uiStartCU ) { m_uiSliceStartCU = uiStartCU; } |
---|
581 | UInt getSliceStartCU () { return m_uiSliceStartCU; } |
---|
582 | Void setEntropySliceStartCU ( UInt uiStartCU ) { m_uiEntropySliceStartCU = uiStartCU; } |
---|
583 | UInt getEntropySliceStartCU () { return m_uiEntropySliceStartCU; } |
---|
584 | |
---|
585 | // ------------------------------------------------------------------------------------------------------------------- |
---|
586 | // member functions for RD cost storage |
---|
587 | // ------------------------------------------------------------------------------------------------------------------- |
---|
588 | |
---|
589 | Double& getTotalCost() { return m_dTotalCost; } |
---|
590 | Dist& getTotalDistortion() { return m_uiTotalDistortion; } |
---|
591 | UInt& getTotalBits() { return m_uiTotalBits; } |
---|
592 | UInt& getTotalNumPart() { return m_uiNumPartition; } |
---|
593 | |
---|
594 | #if QC_MDCS |
---|
595 | UInt getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra); |
---|
596 | #endif //QC_MDCS |
---|
597 | |
---|
598 | #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH |
---|
599 | Int CuQpIncrementFunction ( Pel uiBlockMax ); |
---|
600 | Int getQpOffsetForTextCU ( UInt uiPartIdx, Bool bIsIntra ); |
---|
601 | Pel getDepthLumaCodingBlockMedian ( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx ); |
---|
602 | Pel getDepthLumaCodingBlockMax ( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx ); |
---|
603 | Void sortDepthLumaCodingBlock ( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx, Pel * pSortTable, Int& TUWidth, Int& TUHeight); |
---|
604 | Pel maxDepthLumaCodingBlock ( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx ); |
---|
605 | Pel getDepthLumaTransformBlockMedian ( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx ); |
---|
606 | Pel getDepthLumaTransformBlockMax ( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx ); |
---|
607 | Void sortDepthLumaTransformBlock ( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx , Pel * pSortTable, Int& TUWidth, Int& TUHeight); |
---|
608 | Pel maxDepthLumaTransformBlock ( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx ); |
---|
609 | Pel getDepthLumaPredictionBlockMedian( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx ); |
---|
610 | Pel getDepthLumaPredictionBlockMax ( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx ); |
---|
611 | Void sortDepthLumaPredictionBlock ( TComPicYuv * pcDepthPicYUV/*TComDataCU* rpcCUDepth*/, UInt iCuAddr, UInt uiPartIdx , Pel * pSortTable, Int& PUWidth, Int& PUHeight); |
---|
612 | #endif |
---|
613 | }; |
---|
614 | |
---|
615 | #endif |
---|
616 | |
---|