[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 |
---|
| 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 | */ |
---|
[2] | 33 | |
---|
| 34 | |
---|
[5] | 35 | |
---|
[2] | 36 | /** \file TComSlice.h |
---|
| 37 | \brief slice header and SPS class (header) |
---|
| 38 | */ |
---|
| 39 | |
---|
| 40 | #ifndef __TCOMSLICE__ |
---|
| 41 | #define __TCOMSLICE__ |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | #include "CommonDef.h" |
---|
| 45 | #ifdef WEIGHT_PRED |
---|
| 46 | #include <string.h> // To avoid compilation failure with some g++ linux compilators... |
---|
| 47 | #endif |
---|
| 48 | #include "TComList.h" |
---|
| 49 | #include <math.h> |
---|
| 50 | |
---|
| 51 | class TComPic; |
---|
[5] | 52 | #if DEPTH_MAP_GENERATION |
---|
[2] | 53 | class TComDepthMapGenerator; |
---|
[5] | 54 | #endif |
---|
| 55 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
[2] | 56 | class TComResidualGenerator; |
---|
[5] | 57 | #endif |
---|
[2] | 58 | |
---|
[28] | 59 | #if POZNAN_MP |
---|
| 60 | //#include "../TLibCommon/TComMP.h" |
---|
| 61 | class TComMP; |
---|
| 62 | #endif |
---|
| 63 | |
---|
[2] | 64 | // ==================================================================================================================== |
---|
| 65 | // Class definition |
---|
| 66 | // ==================================================================================================================== |
---|
| 67 | |
---|
| 68 | /// SPS class |
---|
| 69 | class TComSPS |
---|
| 70 | { |
---|
| 71 | private: |
---|
| 72 | // Structure |
---|
| 73 | UInt m_uiSPSId; |
---|
| 74 | UInt m_uiWidth; |
---|
| 75 | UInt m_uiHeight; |
---|
| 76 | Int m_aiPad[2]; |
---|
| 77 | UInt m_uiMaxCUWidth; |
---|
| 78 | UInt m_uiMaxCUHeight; |
---|
| 79 | UInt m_uiMaxCUDepth; |
---|
| 80 | UInt m_uiMinTrDepth; |
---|
| 81 | UInt m_uiMaxTrDepth; |
---|
[5] | 82 | |
---|
[46] | 83 | #if BITSTREAM_EXTRACTION |
---|
| 84 | UInt m_uiLayerId; |
---|
| 85 | #endif |
---|
[2] | 86 | UInt m_uiViewId; |
---|
| 87 | Int m_iViewOrderIdx; |
---|
| 88 | Bool m_bDepth; |
---|
| 89 | UInt m_uiCamParPrecision; |
---|
| 90 | Bool m_bCamParInSliceHeader; |
---|
| 91 | Int m_aaiCodedScale [2][MAX_NUMBER_VIEWS]; |
---|
| 92 | Int m_aaiCodedOffset[2][MAX_NUMBER_VIEWS]; |
---|
| 93 | |
---|
| 94 | // Tool list |
---|
| 95 | UInt m_uiQuadtreeTULog2MaxSize; |
---|
| 96 | UInt m_uiQuadtreeTULog2MinSize; |
---|
| 97 | UInt m_uiQuadtreeTUMaxDepthInter; |
---|
| 98 | UInt m_uiQuadtreeTUMaxDepthIntra; |
---|
| 99 | Bool m_bUseALF; |
---|
| 100 | Bool m_bUseDQP; |
---|
[5] | 101 | #if !HHI_NO_LowDelayCoding |
---|
[2] | 102 | Bool m_bUseLDC; |
---|
| 103 | #endif |
---|
| 104 | Bool m_bUsePAD; |
---|
| 105 | Bool m_bUseMRG; // SOPH: |
---|
| 106 | |
---|
[5] | 107 | #if LM_CHROMA |
---|
[2] | 108 | Bool m_bUseLMChroma; // JL: |
---|
| 109 | #endif |
---|
| 110 | |
---|
| 111 | #if DCM_COMB_LIST |
---|
| 112 | Bool m_bUseLComb; |
---|
| 113 | Bool m_bLCMod; |
---|
| 114 | #endif |
---|
[5] | 115 | |
---|
[2] | 116 | #if HHI_RMP_SWITCH |
---|
| 117 | Bool m_bUseRMP; |
---|
| 118 | #endif |
---|
| 119 | // Parameter |
---|
| 120 | AMVP_MODE m_aeAMVPMode[MAX_CU_DEPTH]; |
---|
| 121 | UInt m_uiBitDepth; |
---|
| 122 | UInt m_uiBitIncrement; |
---|
[5] | 123 | |
---|
[2] | 124 | // Max physical transform size |
---|
| 125 | UInt m_uiMaxTrSize; |
---|
[5] | 126 | |
---|
[2] | 127 | Int m_iAMPAcc[MAX_CU_DEPTH]; |
---|
| 128 | |
---|
| 129 | #if MTK_NONCROSS_INLOOP_FILTER |
---|
| 130 | Bool m_bLFCrossSliceBoundaryFlag; |
---|
| 131 | #endif |
---|
| 132 | #if MTK_SAO |
---|
[5] | 133 | Bool m_bUseSAO; |
---|
[2] | 134 | #endif |
---|
[5] | 135 | #if HHI_MPI |
---|
[2] | 136 | Bool m_bUseMVI; |
---|
[5] | 137 | #endif |
---|
[2] | 138 | |
---|
| 139 | UInt m_uiCodedPictureBufferSize ; |
---|
| 140 | |
---|
[5] | 141 | #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX |
---|
| 142 | Bool m_bUseDMM; |
---|
[2] | 143 | #endif |
---|
[41] | 144 | #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER |
---|
| 145 | Bool m_bUseDMM34; |
---|
| 146 | #endif |
---|
[2] | 147 | |
---|
[5] | 148 | #if DEPTH_MAP_GENERATION |
---|
[2] | 149 | UInt m_uiPredDepthMapGeneration; |
---|
| 150 | UInt m_uiPdmPrecision; |
---|
| 151 | Int m_aiPdmScaleNomDelta[MAX_NUMBER_VIEWS]; |
---|
| 152 | Int m_aiPdmOffset [MAX_NUMBER_VIEWS]; |
---|
[5] | 153 | #endif |
---|
| 154 | #if HHI_INTER_VIEW_MOTION_PRED |
---|
| 155 | UInt m_uiMultiviewMvPredMode; |
---|
| 156 | #endif |
---|
| 157 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
[2] | 158 | UInt m_uiMultiviewResPredMode; |
---|
[5] | 159 | #endif |
---|
[2] | 160 | |
---|
[28] | 161 | #if POZNAN_DBMP |
---|
| 162 | UInt m_uiDBMP; |
---|
| 163 | #endif |
---|
| 164 | |
---|
| 165 | #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU |
---|
| 166 | UInt m_uiUseCUSkip; |
---|
| 167 | #endif |
---|
| 168 | |
---|
[5] | 169 | #if DEPTH_MAP_GENERATION |
---|
[2] | 170 | TComDepthMapGenerator* m_pcDepthMapGenerator; |
---|
[5] | 171 | #endif |
---|
| 172 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
[2] | 173 | TComResidualGenerator* m_pcResidualGenerator; |
---|
[5] | 174 | #endif |
---|
[2] | 175 | |
---|
[28] | 176 | #if POZNAN_NONLINEAR_DEPTH |
---|
[41] | 177 | TComNonlinearDepthModel m_cNonlinearDepthModel; |
---|
| 178 | Bool m_bUseNonlinearDepth; |
---|
[28] | 179 | #endif |
---|
| 180 | |
---|
| 181 | #if POZNAN_MP |
---|
| 182 | TComMP* m_pcMP; |
---|
| 183 | #endif |
---|
| 184 | #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH |
---|
| 185 | Bool m_bUseTexDqpAccordingToDepth; |
---|
| 186 | #endif |
---|
| 187 | |
---|
[2] | 188 | public: |
---|
| 189 | TComSPS(); |
---|
| 190 | virtual ~TComSPS(); |
---|
[5] | 191 | |
---|
[2] | 192 | // structure |
---|
| 193 | Void setSPSId ( UInt u ) { m_uiSPSId = u; } |
---|
| 194 | UInt getSPSId () { return m_uiSPSId; } |
---|
| 195 | Void setWidth ( UInt u ) { m_uiWidth = u; } |
---|
| 196 | UInt getWidth () { return m_uiWidth; } |
---|
| 197 | Void setHeight ( UInt u ) { m_uiHeight = u; } |
---|
| 198 | UInt getHeight () { return m_uiHeight; } |
---|
| 199 | Void setMaxCUWidth ( UInt u ) { m_uiMaxCUWidth = u; } |
---|
| 200 | UInt getMaxCUWidth () { return m_uiMaxCUWidth; } |
---|
| 201 | Void setMaxCUHeight ( UInt u ) { m_uiMaxCUHeight = u; } |
---|
| 202 | UInt getMaxCUHeight () { return m_uiMaxCUHeight; } |
---|
| 203 | Void setMaxCUDepth ( UInt u ) { m_uiMaxCUDepth = u; } |
---|
| 204 | UInt getMaxCUDepth () { return m_uiMaxCUDepth; } |
---|
| 205 | Void setMinTrDepth ( UInt u ) { m_uiMinTrDepth = u; } |
---|
| 206 | UInt getMinTrDepth () { return m_uiMinTrDepth; } |
---|
| 207 | Void setMaxTrDepth ( UInt u ) { m_uiMaxTrDepth = u; } |
---|
| 208 | UInt getMaxTrDepth () { return m_uiMaxTrDepth; } |
---|
| 209 | Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } |
---|
| 210 | UInt getQuadtreeTULog2MaxSize() { return m_uiQuadtreeTULog2MaxSize; } |
---|
| 211 | Void setQuadtreeTULog2MinSize( UInt u ) { m_uiQuadtreeTULog2MinSize = u; } |
---|
| 212 | UInt getQuadtreeTULog2MinSize() { return m_uiQuadtreeTULog2MinSize; } |
---|
| 213 | Void setQuadtreeTUMaxDepthInter( UInt u ) { m_uiQuadtreeTUMaxDepthInter = u; } |
---|
| 214 | Void setQuadtreeTUMaxDepthIntra( UInt u ) { m_uiQuadtreeTUMaxDepthIntra = u; } |
---|
| 215 | UInt getQuadtreeTUMaxDepthInter() { return m_uiQuadtreeTUMaxDepthInter; } |
---|
| 216 | UInt getQuadtreeTUMaxDepthIntra() { return m_uiQuadtreeTUMaxDepthIntra; } |
---|
| 217 | Void setPad (Int iPad[2]) { m_aiPad[0] = iPad[0]; m_aiPad[1] = iPad[1]; } |
---|
| 218 | Void setPadX ( Int u ) { m_aiPad[0] = u; } |
---|
| 219 | Void setPadY ( Int u ) { m_aiPad[1] = u; } |
---|
| 220 | Int getPad ( Int u ) { assert(u < 2); return m_aiPad[u];} |
---|
| 221 | Int* getPad ( ) { return m_aiPad; } |
---|
[5] | 222 | |
---|
[48] | 223 | #if FLEX_CODING_ORDER |
---|
| 224 | Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0, Bool bDepth = false ); |
---|
| 225 | #else |
---|
[2] | 226 | Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); |
---|
[48] | 227 | #endif |
---|
[2] | 228 | Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx ); |
---|
| 229 | |
---|
| 230 | UInt getViewId () { return m_uiViewId; } |
---|
| 231 | Int getViewOrderIdx () { return m_iViewOrderIdx; } |
---|
| 232 | Bool isDepth () { return m_bDepth; } |
---|
| 233 | UInt getCamParPrecision () { return m_uiCamParPrecision; } |
---|
| 234 | Bool hasCamParInSliceHeader() { return m_bCamParInSliceHeader; } |
---|
| 235 | Int* getCodedScale () { return m_aaiCodedScale [0]; } |
---|
| 236 | Int* getCodedOffset () { return m_aaiCodedOffset[0]; } |
---|
| 237 | Int* getInvCodedScale () { return m_aaiCodedScale [1]; } |
---|
| 238 | Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } |
---|
| 239 | |
---|
| 240 | // physical transform |
---|
| 241 | Void setMaxTrSize ( UInt u ) { m_uiMaxTrSize = u; } |
---|
| 242 | UInt getMaxTrSize () { return m_uiMaxTrSize; } |
---|
[5] | 243 | |
---|
[2] | 244 | // Tool list |
---|
[28] | 245 | #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU |
---|
| 246 | Bool getUseALF () { return (getViewId()>0)?false:m_bUseALF;} //todo fix ALF |
---|
| 247 | #else |
---|
[2] | 248 | Bool getUseALF () { return m_bUseALF; } |
---|
[28] | 249 | #endif |
---|
[2] | 250 | Bool getUseDQP () { return m_bUseDQP; } |
---|
[5] | 251 | |
---|
| 252 | #if !HHI_NO_LowDelayCoding |
---|
[2] | 253 | Bool getUseLDC () { return m_bUseLDC; } |
---|
| 254 | #endif |
---|
| 255 | Bool getUsePAD () { return m_bUsePAD; } |
---|
| 256 | Bool getUseMRG () { return m_bUseMRG; } // SOPH: |
---|
[5] | 257 | |
---|
[2] | 258 | Void setUseALF ( Bool b ) { m_bUseALF = b; } |
---|
| 259 | Void setUseDQP ( Bool b ) { m_bUseDQP = b; } |
---|
[5] | 260 | |
---|
| 261 | #if !HHI_NO_LowDelayCoding |
---|
[2] | 262 | Void setUseLDC ( Bool b ) { m_bUseLDC = b; } |
---|
| 263 | #endif |
---|
| 264 | Void setUsePAD ( Bool b ) { m_bUsePAD = b; } |
---|
| 265 | Void setUseMRG ( Bool b ) { m_bUseMRG = b; } // SOPH: |
---|
| 266 | |
---|
[5] | 267 | #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX |
---|
| 268 | Bool getUseDMM() { return m_bUseDMM; } |
---|
| 269 | Void setUseDMM( Bool b ) { m_bUseDMM = b; } |
---|
[2] | 270 | #endif |
---|
[41] | 271 | #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER |
---|
| 272 | Bool getUseDMM34() { return m_bUseDMM34; } |
---|
| 273 | Void setUseDMM34( Bool b ) { m_bUseDMM34 = b; } |
---|
| 274 | #endif |
---|
[2] | 275 | |
---|
| 276 | #if DCM_COMB_LIST |
---|
| 277 | Void setUseLComb (Bool b) { m_bUseLComb = b; } |
---|
| 278 | Bool getUseLComb () { return m_bUseLComb; } |
---|
| 279 | Void setLCMod (Bool b) { m_bLCMod = b; } |
---|
| 280 | Bool getLCMod () { return m_bLCMod; } |
---|
| 281 | #endif |
---|
| 282 | |
---|
| 283 | #if HHI_RMP_SWITCH |
---|
| 284 | Bool getUseRMP () { return m_bUseRMP; } |
---|
| 285 | Void setUseRMP ( Bool b ) { m_bUseRMP = b; } |
---|
| 286 | #endif |
---|
[5] | 287 | |
---|
| 288 | #if LM_CHROMA |
---|
[2] | 289 | Bool getUseLMChroma () { return m_bUseLMChroma; } |
---|
| 290 | Void setUseLMChroma ( Bool b ) { m_bUseLMChroma = b; } |
---|
| 291 | #endif |
---|
| 292 | |
---|
| 293 | // AMVP mode (for each depth) |
---|
| 294 | AMVP_MODE getAMVPMode ( UInt uiDepth ) { assert(uiDepth < g_uiMaxCUDepth); return m_aeAMVPMode[uiDepth]; } |
---|
| 295 | Void setAMVPMode ( UInt uiDepth, AMVP_MODE eMode) { assert(uiDepth < g_uiMaxCUDepth); m_aeAMVPMode[uiDepth] = eMode; } |
---|
[5] | 296 | |
---|
[2] | 297 | // Bit-depth |
---|
| 298 | UInt getBitDepth () { return m_uiBitDepth; } |
---|
| 299 | Void setBitDepth ( UInt u ) { m_uiBitDepth = u; } |
---|
| 300 | UInt getBitIncrement () { return m_uiBitIncrement; } |
---|
| 301 | Void setBitIncrement ( UInt u ) { m_uiBitIncrement = u; } |
---|
| 302 | |
---|
| 303 | #if MTK_NONCROSS_INLOOP_FILTER |
---|
| 304 | Void setLFCrossSliceBoundaryFlag ( Bool bValue ) { m_bLFCrossSliceBoundaryFlag = bValue; } |
---|
[5] | 305 | Bool getLFCrossSliceBoundaryFlag () { return m_bLFCrossSliceBoundaryFlag; } |
---|
[2] | 306 | #endif |
---|
| 307 | |
---|
| 308 | #if MTK_SAO |
---|
| 309 | Void setUseSAO (Bool bVal) {m_bUseSAO = bVal;} |
---|
[28] | 310 | #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU //todo fix SAO |
---|
[41] | 311 | Bool getUseSAO () { return (getUseCUSkip() && getViewId()>0)?false:m_bUseSAO;} |
---|
[28] | 312 | #else |
---|
[2] | 313 | Bool getUseSAO () {return m_bUseSAO;} |
---|
| 314 | #endif |
---|
[28] | 315 | #endif |
---|
[2] | 316 | |
---|
[5] | 317 | #if HHI_MPI |
---|
[2] | 318 | Void setUseMVI (Bool bVal) {m_bUseMVI = bVal;} |
---|
| 319 | Bool getUseMVI () {return m_bUseMVI;} |
---|
[5] | 320 | #endif |
---|
[2] | 321 | |
---|
| 322 | Void setCodedPictureBufferSize( UInt u ) { m_uiCodedPictureBufferSize = u ;} |
---|
| 323 | UInt getCodedPictureBufferSize( ) { return m_uiCodedPictureBufferSize ;} |
---|
| 324 | |
---|
[5] | 325 | #if DEPTH_MAP_GENERATION |
---|
[2] | 326 | Void setPredDepthMapGeneration( UInt uiViewId, Bool bIsDepth, UInt uiPdmGenMode = 0, UInt uiPdmMvPredMode = 0, UInt uiPdmPrec = 0, Int** aaiPdmScaleNomDelta = 0, Int** aaiPdmOffset = 0 ); |
---|
[5] | 327 | #endif |
---|
| 328 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
[2] | 329 | Void setMultiviewResPredMode ( UInt uiResPrdMode ) { m_uiMultiviewResPredMode = uiResPrdMode; } |
---|
[5] | 330 | #endif |
---|
| 331 | |
---|
[28] | 332 | #if POZNAN_DBMP |
---|
| 333 | Void setDBMP ( UInt uiDBMP ) { m_uiDBMP = uiDBMP; } |
---|
| 334 | #endif |
---|
| 335 | |
---|
| 336 | #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU |
---|
| 337 | Void setUseCUSkip ( UInt uiUseCUSkip ) { m_uiUseCUSkip = uiUseCUSkip; } |
---|
| 338 | #endif |
---|
| 339 | |
---|
[5] | 340 | #if DEPTH_MAP_GENERATION |
---|
[2] | 341 | UInt getPredDepthMapGeneration() { return m_uiPredDepthMapGeneration; } |
---|
| 342 | UInt getPdmPrecision () { return m_uiPdmPrecision; } |
---|
| 343 | Int* getPdmScaleNomDelta () { return m_aiPdmScaleNomDelta; } |
---|
| 344 | Int* getPdmOffset () { return m_aiPdmOffset; } |
---|
[5] | 345 | #endif |
---|
| 346 | #if HHI_INTER_VIEW_MOTION_PRED |
---|
| 347 | UInt getMultiviewMvPredMode () { return m_uiMultiviewMvPredMode; } |
---|
| 348 | #endif |
---|
| 349 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
[2] | 350 | UInt getMultiviewResPredMode () { return m_uiMultiviewResPredMode; } |
---|
[5] | 351 | #endif |
---|
[2] | 352 | |
---|
[28] | 353 | #if POZNAN_DBMP |
---|
| 354 | UInt getDBMP () { return m_uiDBMP; } |
---|
| 355 | #endif |
---|
| 356 | |
---|
| 357 | #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU |
---|
| 358 | UInt getUseCUSkip () { return m_uiUseCUSkip; } |
---|
| 359 | #endif |
---|
| 360 | |
---|
[5] | 361 | #if DEPTH_MAP_GENERATION |
---|
[2] | 362 | Void setDepthMapGenerator( TComDepthMapGenerator* pcDepthMapGenerator ) { m_pcDepthMapGenerator = pcDepthMapGenerator; } |
---|
| 363 | TComDepthMapGenerator* getDepthMapGenerator() { return m_pcDepthMapGenerator; } |
---|
[5] | 364 | #endif |
---|
| 365 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
[2] | 366 | Void setResidualGenerator( TComResidualGenerator* pcResidualGenerator ) { m_pcResidualGenerator = pcResidualGenerator; } |
---|
| 367 | TComResidualGenerator* getResidualGenerator() { return m_pcResidualGenerator; } |
---|
[5] | 368 | #endif |
---|
[28] | 369 | #if POZNAN_NONLINEAR_DEPTH |
---|
[41] | 370 | inline Void setNonlinearDepthModel( TComNonlinearDepthModel &rp ){ m_cNonlinearDepthModel = rp; } |
---|
| 371 | inline TComNonlinearDepthModel& getNonlinearDepthModel() { return m_cNonlinearDepthModel; } |
---|
| 372 | Bool getUseNonlinearDepth() { return m_bUseNonlinearDepth; } |
---|
| 373 | Void setUseNonlinearDepth( Bool bVal ) { m_bUseNonlinearDepth = bVal; } |
---|
[28] | 374 | #endif |
---|
| 375 | #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH |
---|
| 376 | Void setUseTexDqpAccordingToDepth (Bool bVal) {m_bUseTexDqpAccordingToDepth = bVal;} |
---|
| 377 | Bool getUseTexDqpAccordingToDepth () {return m_bUseTexDqpAccordingToDepth;} |
---|
| 378 | #endif |
---|
[46] | 379 | #if BITSTREAM_EXTRACTION |
---|
| 380 | Void setLayerId ( UInt u ) { m_uiLayerId = u; } |
---|
| 381 | UInt getLayerId () { return m_uiLayerId; } |
---|
| 382 | #endif |
---|
[2] | 383 | }; |
---|
| 384 | |
---|
| 385 | /// PPS class |
---|
| 386 | class TComPPS |
---|
| 387 | { |
---|
| 388 | private: |
---|
| 389 | #if CONSTRAINED_INTRA_PRED |
---|
| 390 | Bool m_bConstrainedIntraPred; // constrained_intra_pred_flag |
---|
| 391 | #endif |
---|
| 392 | #ifdef WEIGHT_PRED |
---|
| 393 | Bool m_bUseWeightPred; // Use of Weighting Prediction (P_SLICE) |
---|
| 394 | UInt m_uiBiPredIdc; // Use of Weighting Bi-Prediction (B_SLICE) |
---|
| 395 | #endif |
---|
| 396 | UInt m_uiPPSId; |
---|
| 397 | UInt m_uiSPSId; |
---|
[46] | 398 | #if BITSTREAM_EXTRACTION |
---|
| 399 | UInt m_uiLayerId; |
---|
| 400 | #endif |
---|
[5] | 401 | |
---|
[2] | 402 | public: |
---|
| 403 | TComPPS(); |
---|
| 404 | virtual ~TComPPS(); |
---|
[5] | 405 | |
---|
[2] | 406 | Void setPPSId ( UInt u ) { m_uiPPSId = u; } |
---|
| 407 | UInt getPPSId () { return m_uiPPSId; } |
---|
| 408 | Void setSPSId ( UInt u ) { m_uiSPSId = u; } |
---|
| 409 | UInt getSPSId () { return m_uiSPSId; } |
---|
| 410 | #if CONSTRAINED_INTRA_PRED |
---|
| 411 | Bool getConstrainedIntraPred () { return m_bConstrainedIntraPred; } |
---|
| 412 | Void setConstrainedIntraPred ( Bool b ) { m_bConstrainedIntraPred = b; } |
---|
| 413 | #endif |
---|
| 414 | |
---|
| 415 | #ifdef WEIGHT_PRED |
---|
| 416 | Bool getUseWP () { return m_bUseWeightPred; } |
---|
| 417 | UInt getWPBiPredIdc () { return m_uiBiPredIdc; } |
---|
| 418 | |
---|
| 419 | Void setUseWP ( Bool b ) { m_bUseWeightPred = b; } |
---|
| 420 | Void setWPBiPredIdc ( UInt u ) { m_uiBiPredIdc = u; } |
---|
| 421 | #endif |
---|
[46] | 422 | |
---|
| 423 | #if BITSTREAM_EXTRACTION |
---|
| 424 | Void setLayerId ( UInt u ) { m_uiLayerId = u; } |
---|
| 425 | UInt getLayerId () { return m_uiLayerId; } |
---|
| 426 | #endif |
---|
[2] | 427 | }; |
---|
| 428 | |
---|
| 429 | #ifdef WEIGHT_PRED |
---|
| 430 | typedef struct { |
---|
| 431 | // Explicit weighted prediction parameters parsed in slice header, |
---|
| 432 | // or Implicit weighted prediction parameters (8 bits depth values). |
---|
| 433 | Bool bPresentFlag; |
---|
| 434 | UInt uiLog2WeightDenom; |
---|
| 435 | Int iWeight; |
---|
| 436 | Int iOffset; |
---|
| 437 | |
---|
| 438 | // Weighted prediction scaling values built from above parameters (bitdepth scaled): |
---|
| 439 | Int w, o, offset, shift, round; |
---|
| 440 | } wpScalingParam; |
---|
| 441 | |
---|
| 442 | typedef struct { |
---|
| 443 | Int64 iAC; |
---|
| 444 | Int64 iDC; |
---|
| 445 | } wpACDCParam; |
---|
| 446 | #endif |
---|
| 447 | |
---|
| 448 | /// slice header class |
---|
| 449 | class TComSlice |
---|
| 450 | { |
---|
[5] | 451 | |
---|
[2] | 452 | private: |
---|
| 453 | // Bitstream writing |
---|
| 454 | UInt m_uiPPSId; |
---|
| 455 | Int m_iPOC; |
---|
[46] | 456 | #if BITSTREAM_EXTRACTION |
---|
| 457 | UInt m_uiLayerId; |
---|
| 458 | #endif |
---|
[21] | 459 | #if SONY_COLPIC_AVAILABILITY |
---|
| 460 | Int m_iViewOrderIdx; |
---|
| 461 | #endif |
---|
[2] | 462 | #if DCM_DECODING_REFRESH |
---|
| 463 | NalUnitType m_eNalUnitType; ///< Nal unit type for the slice |
---|
| 464 | #endif |
---|
| 465 | SliceType m_eSliceType; |
---|
| 466 | Int m_iSliceQp; |
---|
| 467 | Int m_iSymbolMode; |
---|
| 468 | Bool m_bLoopFilterDisable; |
---|
[5] | 469 | |
---|
[2] | 470 | #if DCM_COMB_LIST |
---|
| 471 | Int m_aiNumRefIdx [3]; // for multiple reference of current slice |
---|
| 472 | |
---|
| 473 | Int m_iRefIdxOfLC[2][MAX_NUM_REF_LC]; |
---|
| 474 | Int m_eListIdFromIdxOfLC[MAX_NUM_REF_LC]; |
---|
| 475 | Int m_iRefIdxFromIdxOfLC[MAX_NUM_REF_LC]; |
---|
| 476 | Int m_iRefIdxOfL1FromRefIdxOfL0[MAX_NUM_REF_LC]; |
---|
| 477 | Int m_iRefIdxOfL0FromRefIdxOfL1[MAX_NUM_REF_LC]; |
---|
| 478 | Bool m_bRefPicListModificationFlagLC; |
---|
| 479 | Bool m_bRefPicListCombinationFlag; |
---|
| 480 | #else |
---|
| 481 | Int m_aiNumRefIdx [2]; // for multiple reference of current slice |
---|
[5] | 482 | #endif |
---|
[2] | 483 | |
---|
| 484 | // Data |
---|
| 485 | Int m_iSliceQpDelta; |
---|
| 486 | TComPic* m_apcRefPicList [2][MAX_NUM_REF]; |
---|
| 487 | Int m_aiRefPOCList [2][MAX_NUM_REF]; |
---|
| 488 | Int m_iDepth; |
---|
| 489 | TComPic* m_pcTexturePic; |
---|
[41] | 490 | TComPic* m_pcDepthPic; |
---|
[5] | 491 | |
---|
[2] | 492 | // referenced slice? |
---|
| 493 | Bool m_bRefenced; |
---|
| 494 | #ifdef ROUNDING_CONTROL_BIPRED |
---|
| 495 | Bool m_bRounding; |
---|
| 496 | #endif |
---|
[5] | 497 | |
---|
[2] | 498 | // access channel |
---|
| 499 | TComSPS* m_pcSPS; |
---|
| 500 | TComPPS* m_pcPPS; |
---|
| 501 | TComPic* m_pcPic; |
---|
[5] | 502 | |
---|
[2] | 503 | UInt m_uiColDir; // direction to get colocated CUs |
---|
[5] | 504 | |
---|
[2] | 505 | Double m_dLambda; |
---|
[5] | 506 | |
---|
[2] | 507 | Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; |
---|
| 508 | |
---|
| 509 | Int m_iViewIdx; |
---|
| 510 | Int m_aiRefViewList[2][MAX_INPUT_VIEW_NUM]; |
---|
[5] | 511 | |
---|
[2] | 512 | Bool m_bNoBackPredFlag; |
---|
| 513 | #if MS_LCEC_LOOKUP_TABLE_EXCEPTION |
---|
| 514 | Bool m_bRefIdxCombineCoding; |
---|
| 515 | #endif |
---|
| 516 | |
---|
| 517 | Int m_aaiCodedScale [2][MAX_NUMBER_VIEWS]; |
---|
| 518 | Int m_aaiCodedOffset[2][MAX_NUMBER_VIEWS]; |
---|
| 519 | |
---|
| 520 | UInt m_uiSliceMode; |
---|
| 521 | UInt m_uiSliceArgument; |
---|
| 522 | UInt m_uiSliceCurStartCUAddr; |
---|
| 523 | UInt m_uiSliceCurEndCUAddr; |
---|
| 524 | UInt m_uiSliceIdx; |
---|
| 525 | UInt m_uiEntropySliceMode; |
---|
| 526 | UInt m_uiEntropySliceArgument; |
---|
| 527 | UInt m_uiEntropySliceCurStartCUAddr; |
---|
| 528 | UInt m_uiEntropySliceCurEndCUAddr; |
---|
| 529 | Bool m_bNextSlice; |
---|
| 530 | Bool m_bNextEntropySlice; |
---|
| 531 | UInt m_uiSliceBits; |
---|
| 532 | |
---|
| 533 | #ifdef WEIGHT_PRED |
---|
| 534 | wpScalingParam m_weightPredTable[2][MAX_NUM_REF][3]; // [REF_PIC_LIST_0 or REF_PIC_LIST_1][refIdx][0:Y, 1:U, 2:V] |
---|
| 535 | wpACDCParam m_weightACDCParam[3]; // [0:Y, 1:U, 2:V] |
---|
| 536 | #endif |
---|
[5] | 537 | |
---|
[28] | 538 | #if POZNAN_MP |
---|
| 539 | TComMP* m_pcMP; |
---|
| 540 | #endif |
---|
| 541 | |
---|
[2] | 542 | public: |
---|
| 543 | TComSlice(); |
---|
[28] | 544 | #if POZNAN_MP |
---|
| 545 | ~TComSlice(); |
---|
| 546 | #else |
---|
[2] | 547 | virtual ~TComSlice(); |
---|
[28] | 548 | #endif |
---|
[5] | 549 | |
---|
[2] | 550 | Void initSlice (); |
---|
[5] | 551 | |
---|
[2] | 552 | Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } |
---|
| 553 | TComSPS* getSPS () { return m_pcSPS; } |
---|
[5] | 554 | |
---|
[2] | 555 | Void setPPS ( TComPPS* pcPPS ) { m_pcPPS = pcPPS; } |
---|
| 556 | TComPPS* getPPS () { return m_pcPPS; } |
---|
[5] | 557 | |
---|
[2] | 558 | UInt getPPSId () { return m_uiPPSId; } |
---|
| 559 | SliceType getSliceType () { return m_eSliceType; } |
---|
| 560 | Int getPOC () { return m_iPOC; } |
---|
[21] | 561 | #if SONY_COLPIC_AVAILABILITY |
---|
| 562 | Int getViewOrderIdx () { return m_iViewOrderIdx; } |
---|
| 563 | #endif |
---|
[2] | 564 | Int getSliceQp () { return m_iSliceQp; } |
---|
| 565 | Int getSliceQpDelta () { return m_iSliceQpDelta; } |
---|
| 566 | Int getSymbolMode () { return m_iSymbolMode; } |
---|
| 567 | Bool getLoopFilterDisable() { return m_bLoopFilterDisable; } |
---|
| 568 | Int getNumRefIdx ( RefPicList e ) { return m_aiNumRefIdx[e]; } |
---|
| 569 | TComPic* getPic () { return m_pcPic; } |
---|
| 570 | TComPic* getRefPic ( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } |
---|
| 571 | Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } |
---|
| 572 | Int getDepth () { return m_iDepth; } |
---|
| 573 | UInt getColDir () { return m_uiColDir; } |
---|
[5] | 574 | |
---|
| 575 | #if DCM_COMB_LIST |
---|
[2] | 576 | Int getRefIdxOfLC (RefPicList e, Int iRefIdx) { return m_iRefIdxOfLC[e][iRefIdx]; } |
---|
| 577 | Int getListIdFromIdxOfLC(Int iRefIdx) { return m_eListIdFromIdxOfLC[iRefIdx]; } |
---|
| 578 | Int getRefIdxFromIdxOfLC(Int iRefIdx) { return m_iRefIdxFromIdxOfLC[iRefIdx]; } |
---|
| 579 | Int getRefIdxOfL0FromRefIdxOfL1(Int iRefIdx) { return m_iRefIdxOfL0FromRefIdxOfL1[iRefIdx];} |
---|
| 580 | Int getRefIdxOfL1FromRefIdxOfL0(Int iRefIdx) { return m_iRefIdxOfL1FromRefIdxOfL0[iRefIdx];} |
---|
| 581 | Bool getRefPicListModificationFlagLC() {return m_bRefPicListModificationFlagLC;} |
---|
[5] | 582 | Void setRefPicListModificationFlagLC(Bool bflag) {m_bRefPicListModificationFlagLC=bflag;} |
---|
[2] | 583 | Bool getRefPicListCombinationFlag() {return m_bRefPicListCombinationFlag;} |
---|
[5] | 584 | Void setRefPicListCombinationFlag(Bool bflag) {m_bRefPicListCombinationFlag=bflag;} |
---|
[2] | 585 | Void setListIdFromIdxOfLC(Int iRefIdx, UInt uiVal) { m_eListIdFromIdxOfLC[iRefIdx]=uiVal; } |
---|
| 586 | Void setRefIdxFromIdxOfLC(Int iRefIdx, UInt uiVal) { m_iRefIdxFromIdxOfLC[iRefIdx]=uiVal; } |
---|
| 587 | Void setRefIdxOfLC (RefPicList e, Int iRefIdx, Int RefIdxLC) { m_iRefIdxOfLC[e][iRefIdx]=RefIdxLC;} |
---|
| 588 | #endif |
---|
| 589 | |
---|
| 590 | Void setReferenced(Bool b) { m_bRefenced = b; } |
---|
| 591 | Bool isReferenced() { return m_bRefenced; } |
---|
| 592 | #ifdef ROUNDING_CONTROL_BIPRED |
---|
| 593 | Void setRounding(Bool bRound) { m_bRounding = bRound; } |
---|
| 594 | Bool isRounding() { return m_bRounding; } |
---|
| 595 | #endif |
---|
[5] | 596 | |
---|
[2] | 597 | Void setPPSId ( UInt u ) { m_uiPPSId = u; } |
---|
| 598 | Void setPOC ( Int i ) { m_iPOC = i; } |
---|
[21] | 599 | #if SONY_COLPIC_AVAILABILITY |
---|
| 600 | Void setViewOrderIdx ( Int i ) { m_iViewOrderIdx = i; } |
---|
| 601 | #endif |
---|
[2] | 602 | #if DCM_DECODING_REFRESH |
---|
| 603 | Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } |
---|
| 604 | NalUnitType getNalUnitType () { return m_eNalUnitType; } |
---|
| 605 | Void decodingRefreshMarking(UInt& uiPOCCDR, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); |
---|
| 606 | #endif |
---|
| 607 | Void setSliceType ( SliceType e ) { m_eSliceType = e; } |
---|
| 608 | Void setSliceQp ( Int i ) { m_iSliceQp = i; } |
---|
| 609 | Void setSliceQpDelta ( Int i ) { m_iSliceQpDelta = i; } |
---|
| 610 | Void setSymbolMode ( Int b ) { m_iSymbolMode = b; } |
---|
| 611 | Void setLoopFilterDisable( Bool b ) { m_bLoopFilterDisable= b; } |
---|
[5] | 612 | |
---|
[2] | 613 | Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } |
---|
| 614 | Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } |
---|
| 615 | Void setNumRefIdx ( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } |
---|
| 616 | Void setPic ( TComPic* p ) { m_pcPic = p; } |
---|
| 617 | Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } |
---|
[5] | 618 | |
---|
[2] | 619 | Void setRefPicList ( TComList<TComPic*>& rcListPic ); |
---|
| 620 | Void setRefPOCList (); |
---|
| 621 | Void setColDir ( UInt uiDir ) { m_uiColDir = uiDir; } |
---|
[5] | 622 | |
---|
[2] | 623 | Void setRefPicListFromGOPSTring( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcSpatRefPics ); |
---|
| 624 | Void setRefPicListExplicitlyDecoderSided( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcSpatRefPics ); |
---|
| 625 | |
---|
| 626 | Bool isIntra () { return m_eSliceType == I_SLICE; } |
---|
| 627 | Bool isInterB () { return m_eSliceType == B_SLICE; } |
---|
| 628 | Bool isInterP () { return m_eSliceType == P_SLICE; } |
---|
[5] | 629 | |
---|
[2] | 630 | Void setLambda( Double d ) { m_dLambda = d; } |
---|
| 631 | Double getLambda() { return m_dLambda; } |
---|
[5] | 632 | |
---|
[46] | 633 | #if BITSTREAM_EXTRACTION |
---|
| 634 | Void setLayerId( UInt u ) { m_uiLayerId = u; } |
---|
| 635 | UInt getLayerId() { return m_uiLayerId; } |
---|
| 636 | #endif |
---|
| 637 | |
---|
[2] | 638 | Void setViewIdx(Int i) { m_iViewIdx = i; } |
---|
| 639 | Int getViewIdx() { return m_iViewIdx; } |
---|
| 640 | |
---|
| 641 | Void setRefViewIdx ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefViewList[e][iRefIdx] = i; } |
---|
| 642 | Int getRefViewIdx ( RefPicList e, Int iRefIdx) { return m_aiRefViewList[e][iRefIdx]; } |
---|
| 643 | |
---|
| 644 | Void initEqualRef(); |
---|
| 645 | Bool isEqualRef ( RefPicList e, Int iRefIdx1, Int iRefIdx2 ) |
---|
| 646 | { |
---|
| 647 | if (iRefIdx1 < 0 || iRefIdx2 < 0) return false; |
---|
| 648 | return m_abEqualRef[e][iRefIdx1][iRefIdx2]; |
---|
| 649 | } |
---|
[5] | 650 | |
---|
[2] | 651 | Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) |
---|
| 652 | { |
---|
| 653 | m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; |
---|
| 654 | } |
---|
[5] | 655 | |
---|
[2] | 656 | static Void sortPicList ( TComList<TComPic*>& rcListPic ); |
---|
[5] | 657 | |
---|
[2] | 658 | Bool getNoBackPredFlag() { return m_bNoBackPredFlag; } |
---|
| 659 | Void setNoBackPredFlag( Bool b ) { m_bNoBackPredFlag = b; } |
---|
| 660 | #if MS_LCEC_LOOKUP_TABLE_EXCEPTION |
---|
| 661 | Bool getRefIdxCombineCoding() { return m_bRefIdxCombineCoding; } |
---|
| 662 | Void setRefIdxCombineCoding( Bool b ) { m_bRefIdxCombineCoding = b; } |
---|
| 663 | #endif |
---|
| 664 | #if DCM_COMB_LIST |
---|
| 665 | Void generateCombinedList (); |
---|
| 666 | #endif |
---|
| 667 | Void setSliceMode ( UInt uiMode ) { m_uiSliceMode = uiMode; } |
---|
| 668 | UInt getSliceMode () { return m_uiSliceMode; } |
---|
| 669 | Void setSliceArgument ( UInt uiArgument ) { m_uiSliceArgument = uiArgument; } |
---|
| 670 | UInt getSliceArgument () { return m_uiSliceArgument; } |
---|
| 671 | Void setSliceCurStartCUAddr ( UInt uiAddr ) { m_uiSliceCurStartCUAddr = uiAddr; } |
---|
| 672 | UInt getSliceCurStartCUAddr () { return m_uiSliceCurStartCUAddr; } |
---|
| 673 | Void setSliceCurEndCUAddr ( UInt uiAddr ) { m_uiSliceCurEndCUAddr = uiAddr; } |
---|
| 674 | UInt getSliceCurEndCUAddr () { return m_uiSliceCurEndCUAddr; } |
---|
| 675 | Void setSliceIdx ( UInt i) { m_uiSliceIdx = i; } |
---|
| 676 | UInt getSliceIdx () { return m_uiSliceIdx; } |
---|
| 677 | Void copySliceInfo (TComSlice *pcSliceSrc); |
---|
| 678 | Void setEntropySliceMode ( UInt uiMode ) { m_uiEntropySliceMode = uiMode; } |
---|
| 679 | UInt getEntropySliceMode () { return m_uiEntropySliceMode; } |
---|
| 680 | Void setEntropySliceArgument ( UInt uiArgument ) { m_uiEntropySliceArgument = uiArgument; } |
---|
| 681 | UInt getEntropySliceArgument () { return m_uiEntropySliceArgument; } |
---|
| 682 | Void setEntropySliceCurStartCUAddr ( UInt uiAddr ) { m_uiEntropySliceCurStartCUAddr = uiAddr; } |
---|
| 683 | UInt getEntropySliceCurStartCUAddr () { return m_uiEntropySliceCurStartCUAddr; } |
---|
| 684 | Void setEntropySliceCurEndCUAddr ( UInt uiAddr ) { m_uiEntropySliceCurEndCUAddr = uiAddr; } |
---|
| 685 | UInt getEntropySliceCurEndCUAddr () { return m_uiEntropySliceCurEndCUAddr; } |
---|
| 686 | Void setNextSlice ( Bool b ) { m_bNextSlice = b; } |
---|
| 687 | Bool isNextSlice () { return m_bNextSlice; } |
---|
| 688 | Void setNextEntropySlice ( Bool b ) { m_bNextEntropySlice = b; } |
---|
| 689 | Bool isNextEntropySlice () { return m_bNextEntropySlice; } |
---|
| 690 | Void setSliceBits ( UInt uiVal ) { m_uiSliceBits = uiVal; } |
---|
[5] | 691 | UInt getSliceBits () { return m_uiSliceBits; } |
---|
| 692 | |
---|
[2] | 693 | Void initMultiviewSlice ( Int** aaiScale = 0, Int** aaiOffset = 0 ); |
---|
| 694 | |
---|
| 695 | Int* getCodedScale () { return m_aaiCodedScale [0]; } |
---|
| 696 | Int* getCodedOffset () { return m_aaiCodedOffset[0]; } |
---|
| 697 | Int* getInvCodedScale () { return m_aaiCodedScale [1]; } |
---|
| 698 | Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } |
---|
| 699 | |
---|
| 700 | Void setTexturePic( TComPic *pcTexturePic ) { m_pcTexturePic = pcTexturePic; } |
---|
[41] | 701 | Void setDepthPic ( TComPic *pcDepthPic ) { m_pcDepthPic = pcDepthPic; } |
---|
[2] | 702 | TComPic *getTexturePic() const { return m_pcTexturePic; } |
---|
[41] | 703 | TComPic *getDepthPic() const { return m_pcDepthPic; } |
---|
[2] | 704 | |
---|
| 705 | #ifdef WEIGHT_PRED |
---|
| 706 | Void setWpScaling( wpScalingParam wp[2][MAX_NUM_REF][3] ) { memcpy(m_weightPredTable, wp, sizeof(wpScalingParam)*2*MAX_NUM_REF*3); } |
---|
| 707 | Void getWpScaling( RefPicList e, Int iRefIdx, wpScalingParam *&wp); |
---|
| 708 | Void displayWpScaling(); |
---|
| 709 | Void resetWpScaling(wpScalingParam wp[2][MAX_NUM_REF][3]); |
---|
| 710 | Void initWpScaling(wpScalingParam wp[2][MAX_NUM_REF][3]); |
---|
| 711 | Void initWpScaling(); |
---|
| 712 | inline Bool applyWP() { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPredIdc()) ); } |
---|
[5] | 713 | |
---|
[2] | 714 | Void setWpAcDcParam ( wpACDCParam wp[3] ) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam)*3); } |
---|
| 715 | Void getWpAcDcParam ( wpACDCParam *&wp ); |
---|
| 716 | Void initWpAcDcParam(); |
---|
| 717 | #endif |
---|
| 718 | |
---|
[28] | 719 | #if POZNAN_MP |
---|
| 720 | Void setMP(TComMP* pcMP) { m_pcMP = pcMP; } |
---|
| 721 | TComMP* getMP() { return m_pcMP; } |
---|
| 722 | #endif |
---|
| 723 | |
---|
[2] | 724 | protected: |
---|
| 725 | #if 0 |
---|
| 726 | TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, |
---|
| 727 | Bool bDRBFlag, |
---|
| 728 | ERBIndex eERBIndex, |
---|
| 729 | UInt uiPOCCurr, |
---|
| 730 | RefPicList eRefPicList, |
---|
| 731 | UInt uiNthRefPic ); |
---|
| 732 | #endif |
---|
[5] | 733 | |
---|
[2] | 734 | };// END CLASS DEFINITION TComSlice |
---|
| 735 | |
---|
| 736 | |
---|
| 737 | #endif // __TCOMSLICE__ |
---|
| 738 | |
---|