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