Changeset 5 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComSlice.h
- Timestamp:
- 12 Dec 2011, 18:35:44 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComSlice.h
r2 r5 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2011, ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 1 34 2 35 … … 17 50 18 51 class TComPic; 52 #if DEPTH_MAP_GENERATION 19 53 class TComDepthMapGenerator; 54 #endif 55 #if HHI_INTER_VIEW_RESIDUAL_PRED 20 56 class TComResidualGenerator; 57 #endif 21 58 22 59 // ==================================================================================================================== … … 38 75 UInt m_uiMinTrDepth; 39 76 UInt m_uiMaxTrDepth; 40 77 41 78 UInt m_uiViewId; 42 79 Int m_iViewOrderIdx; … … 54 91 Bool m_bUseALF; 55 92 Bool m_bUseDQP; 56 #if ! SB_NO_LowDelayCoding93 #if !HHI_NO_LowDelayCoding 57 94 Bool m_bUseLDC; 58 95 #endif … … 60 97 Bool m_bUseMRG; // SOPH: 61 98 62 #if LM_CHROMA 99 #if LM_CHROMA 63 100 Bool m_bUseLMChroma; // JL: 64 101 #endif … … 68 105 Bool m_bLCMod; 69 106 #endif 70 107 71 108 #if HHI_RMP_SWITCH 72 109 Bool m_bUseRMP; … … 76 113 UInt m_uiBitDepth; 77 114 UInt m_uiBitIncrement; 78 115 79 116 // Max physical transform size 80 117 UInt m_uiMaxTrSize; 81 118 82 119 Int m_iAMPAcc[MAX_CU_DEPTH]; 83 120 … … 86 123 #endif 87 124 #if MTK_SAO 88 Bool m_bUseSAO; 89 #endif 125 Bool m_bUseSAO; 126 #endif 127 #if HHI_MPI 90 128 Bool m_bUseMVI; 129 #endif 91 130 92 131 UInt m_uiCodedPictureBufferSize ; 93 132 94 #if HHI_DMM_INTRA 95 Bool m_bUseDepthModelModes; 96 #endif 97 133 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 134 Bool m_bUseDMM; 135 #endif 136 137 #if DEPTH_MAP_GENERATION 98 138 UInt m_uiPredDepthMapGeneration; 99 UInt m_uiMultiviewMvPredMode;100 139 UInt m_uiPdmPrecision; 101 140 Int m_aiPdmScaleNomDelta[MAX_NUMBER_VIEWS]; 102 141 Int m_aiPdmOffset [MAX_NUMBER_VIEWS]; 142 #endif 143 #if HHI_INTER_VIEW_MOTION_PRED 144 UInt m_uiMultiviewMvPredMode; 145 #endif 146 #if HHI_INTER_VIEW_RESIDUAL_PRED 103 147 UInt m_uiMultiviewResPredMode; 104 148 #endif 149 150 #if DEPTH_MAP_GENERATION 105 151 TComDepthMapGenerator* m_pcDepthMapGenerator; 152 #endif 153 #if HHI_INTER_VIEW_RESIDUAL_PRED 106 154 TComResidualGenerator* m_pcResidualGenerator; 155 #endif 107 156 108 157 public: 109 158 TComSPS(); 110 159 virtual ~TComSPS(); 111 160 112 161 // structure 113 162 Void setSPSId ( UInt u ) { m_uiSPSId = u; } … … 140 189 Int getPad ( Int u ) { assert(u < 2); return m_aiPad[u];} 141 190 Int* getPad ( ) { return m_aiPad; } 142 191 143 192 Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 144 193 Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx ); … … 157 206 Void setMaxTrSize ( UInt u ) { m_uiMaxTrSize = u; } 158 207 UInt getMaxTrSize () { return m_uiMaxTrSize; } 159 208 160 209 // Tool list 161 210 Bool getUseALF () { return m_bUseALF; } 162 211 Bool getUseDQP () { return m_bUseDQP; } 163 164 #if ! SB_NO_LowDelayCoding212 213 #if !HHI_NO_LowDelayCoding 165 214 Bool getUseLDC () { return m_bUseLDC; } 166 215 #endif 167 216 Bool getUsePAD () { return m_bUsePAD; } 168 217 Bool getUseMRG () { return m_bUseMRG; } // SOPH: 169 218 170 219 Void setUseALF ( Bool b ) { m_bUseALF = b; } 171 220 Void setUseDQP ( Bool b ) { m_bUseDQP = b; } 172 173 #if ! SB_NO_LowDelayCoding221 222 #if !HHI_NO_LowDelayCoding 174 223 Void setUseLDC ( Bool b ) { m_bUseLDC = b; } 175 224 #endif … … 177 226 Void setUseMRG ( Bool b ) { m_bUseMRG = b; } // SOPH: 178 227 179 #if HHI_DMM_ INTRA180 Bool getUseD epthModelModes() { return m_bUseDepthModelModes; }181 Void setUseD epthModelModes( Bool b ) { m_bUseDepthModelModes= b; }228 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 229 Bool getUseDMM() { return m_bUseDMM; } 230 Void setUseDMM( Bool b ) { m_bUseDMM = b; } 182 231 #endif 183 232 … … 194 243 Void setUseRMP ( Bool b ) { m_bUseRMP = b; } 195 244 #endif 196 197 #if LM_CHROMA 245 246 #if LM_CHROMA 198 247 Bool getUseLMChroma () { return m_bUseLMChroma; } 199 248 Void setUseLMChroma ( Bool b ) { m_bUseLMChroma = b; } … … 203 252 AMVP_MODE getAMVPMode ( UInt uiDepth ) { assert(uiDepth < g_uiMaxCUDepth); return m_aeAMVPMode[uiDepth]; } 204 253 Void setAMVPMode ( UInt uiDepth, AMVP_MODE eMode) { assert(uiDepth < g_uiMaxCUDepth); m_aeAMVPMode[uiDepth] = eMode; } 205 254 206 255 // Bit-depth 207 256 UInt getBitDepth () { return m_uiBitDepth; } … … 212 261 #if MTK_NONCROSS_INLOOP_FILTER 213 262 Void setLFCrossSliceBoundaryFlag ( Bool bValue ) { m_bLFCrossSliceBoundaryFlag = bValue; } 214 Bool getLFCrossSliceBoundaryFlag () { return m_bLFCrossSliceBoundaryFlag; } 263 Bool getLFCrossSliceBoundaryFlag () { return m_bLFCrossSliceBoundaryFlag; } 215 264 #endif 216 265 … … 220 269 #endif 221 270 271 #if HHI_MPI 222 272 Void setUseMVI (Bool bVal) {m_bUseMVI = bVal;} 223 273 Bool getUseMVI () {return m_bUseMVI;} 274 #endif 224 275 225 276 Void setCodedPictureBufferSize( UInt u ) { m_uiCodedPictureBufferSize = u ;} 226 277 UInt getCodedPictureBufferSize( ) { return m_uiCodedPictureBufferSize ;} 227 278 279 #if DEPTH_MAP_GENERATION 228 280 Void setPredDepthMapGeneration( UInt uiViewId, Bool bIsDepth, UInt uiPdmGenMode = 0, UInt uiPdmMvPredMode = 0, UInt uiPdmPrec = 0, Int** aaiPdmScaleNomDelta = 0, Int** aaiPdmOffset = 0 ); 281 #endif 282 #if HHI_INTER_VIEW_RESIDUAL_PRED 229 283 Void setMultiviewResPredMode ( UInt uiResPrdMode ) { m_uiMultiviewResPredMode = uiResPrdMode; } 230 284 #endif 285 286 #if DEPTH_MAP_GENERATION 231 287 UInt getPredDepthMapGeneration() { return m_uiPredDepthMapGeneration; } 232 UInt getMultiviewMvPredMode () { return m_uiMultiviewMvPredMode; }233 288 UInt getPdmPrecision () { return m_uiPdmPrecision; } 234 289 Int* getPdmScaleNomDelta () { return m_aiPdmScaleNomDelta; } 235 290 Int* getPdmOffset () { return m_aiPdmOffset; } 291 #endif 292 #if HHI_INTER_VIEW_MOTION_PRED 293 UInt getMultiviewMvPredMode () { return m_uiMultiviewMvPredMode; } 294 #endif 295 #if HHI_INTER_VIEW_RESIDUAL_PRED 236 296 UInt getMultiviewResPredMode () { return m_uiMultiviewResPredMode; } 237 297 #endif 298 299 #if DEPTH_MAP_GENERATION 238 300 Void setDepthMapGenerator( TComDepthMapGenerator* pcDepthMapGenerator ) { m_pcDepthMapGenerator = pcDepthMapGenerator; } 239 301 TComDepthMapGenerator* getDepthMapGenerator() { return m_pcDepthMapGenerator; } 240 302 #endif 303 #if HHI_INTER_VIEW_RESIDUAL_PRED 241 304 Void setResidualGenerator( TComResidualGenerator* pcResidualGenerator ) { m_pcResidualGenerator = pcResidualGenerator; } 242 305 TComResidualGenerator* getResidualGenerator() { return m_pcResidualGenerator; } 306 #endif 243 307 }; 244 308 … … 256 320 UInt m_uiPPSId; 257 321 UInt m_uiSPSId; 258 322 259 323 public: 260 324 TComPPS(); 261 325 virtual ~TComPPS(); 262 326 263 327 Void setPPSId ( UInt u ) { m_uiPPSId = u; } 264 328 UInt getPPSId () { return m_uiPPSId; } … … 301 365 class TComSlice 302 366 { 303 367 304 368 private: 305 369 // Bitstream writing … … 313 377 Int m_iSymbolMode; 314 378 Bool m_bLoopFilterDisable; 315 379 316 380 #if DCM_COMB_LIST 317 381 Int m_aiNumRefIdx [3]; // for multiple reference of current slice … … 326 390 #else 327 391 Int m_aiNumRefIdx [2]; // for multiple reference of current slice 328 #endif 392 #endif 329 393 330 394 // Data … … 334 398 Int m_iDepth; 335 399 TComPic* m_pcTexturePic; 336 400 337 401 // referenced slice? 338 402 Bool m_bRefenced; … … 340 404 Bool m_bRounding; 341 405 #endif 342 406 343 407 // access channel 344 408 TComSPS* m_pcSPS; 345 409 TComPPS* m_pcPPS; 346 410 TComPic* m_pcPic; 347 411 348 412 UInt m_uiColDir; // direction to get colocated CUs 349 413 350 414 Double m_dLambda; 351 415 352 416 Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; 353 417 354 // SB355 418 Int m_iViewIdx; 356 419 Int m_aiRefViewList[2][MAX_INPUT_VIEW_NUM]; 357 420 358 421 Bool m_bNoBackPredFlag; 359 422 #if MS_LCEC_LOOKUP_TABLE_EXCEPTION … … 381 444 wpACDCParam m_weightACDCParam[3]; // [0:Y, 1:U, 2:V] 382 445 #endif 383 446 384 447 public: 385 448 TComSlice(); 386 449 virtual ~TComSlice(); 387 450 388 451 Void initSlice (); 389 452 390 453 Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } 391 454 TComSPS* getSPS () { return m_pcSPS; } 392 455 393 456 Void setPPS ( TComPPS* pcPPS ) { m_pcPPS = pcPPS; } 394 457 TComPPS* getPPS () { return m_pcPPS; } 395 458 396 459 UInt getPPSId () { return m_uiPPSId; } 397 460 SliceType getSliceType () { return m_eSliceType; } … … 407 470 Int getDepth () { return m_iDepth; } 408 471 UInt getColDir () { return m_uiColDir; } 409 410 #if DCM_COMB_LIST 472 473 #if DCM_COMB_LIST 411 474 Int getRefIdxOfLC (RefPicList e, Int iRefIdx) { return m_iRefIdxOfLC[e][iRefIdx]; } 412 475 Int getListIdFromIdxOfLC(Int iRefIdx) { return m_eListIdFromIdxOfLC[iRefIdx]; } … … 415 478 Int getRefIdxOfL1FromRefIdxOfL0(Int iRefIdx) { return m_iRefIdxOfL1FromRefIdxOfL0[iRefIdx];} 416 479 Bool getRefPicListModificationFlagLC() {return m_bRefPicListModificationFlagLC;} 417 Void setRefPicListModificationFlagLC(Bool bflag) {m_bRefPicListModificationFlagLC=bflag;} 480 Void setRefPicListModificationFlagLC(Bool bflag) {m_bRefPicListModificationFlagLC=bflag;} 418 481 Bool getRefPicListCombinationFlag() {return m_bRefPicListCombinationFlag;} 419 Void setRefPicListCombinationFlag(Bool bflag) {m_bRefPicListCombinationFlag=bflag;} 482 Void setRefPicListCombinationFlag(Bool bflag) {m_bRefPicListCombinationFlag=bflag;} 420 483 Void setListIdFromIdxOfLC(Int iRefIdx, UInt uiVal) { m_eListIdFromIdxOfLC[iRefIdx]=uiVal; } 421 484 Void setRefIdxFromIdxOfLC(Int iRefIdx, UInt uiVal) { m_iRefIdxFromIdxOfLC[iRefIdx]=uiVal; } … … 429 492 Bool isRounding() { return m_bRounding; } 430 493 #endif 431 494 432 495 Void setPPSId ( UInt u ) { m_uiPPSId = u; } 433 496 Void setPOC ( Int i ) { m_iPOC = i; } … … 442 505 Void setSymbolMode ( Int b ) { m_iSymbolMode = b; } 443 506 Void setLoopFilterDisable( Bool b ) { m_bLoopFilterDisable= b; } 444 507 445 508 Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } 446 509 Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } … … 448 511 Void setPic ( TComPic* p ) { m_pcPic = p; } 449 512 Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } 450 513 451 514 Void setRefPicList ( TComList<TComPic*>& rcListPic ); 452 515 Void setRefPOCList (); 453 516 Void setColDir ( UInt uiDir ) { m_uiColDir = uiDir; } 454 517 455 518 Void setRefPicListFromGOPSTring( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcSpatRefPics ); 456 519 Void setRefPicListExplicitlyDecoderSided( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcSpatRefPics ); … … 459 522 Bool isInterB () { return m_eSliceType == B_SLICE; } 460 523 Bool isInterP () { return m_eSliceType == P_SLICE; } 461 524 462 525 Void setLambda( Double d ) { m_dLambda = d; } 463 526 Double getLambda() { return m_dLambda; } 464 465 //SB 527 466 528 Void setViewIdx(Int i) { m_iViewIdx = i; } 467 529 Int getViewIdx() { return m_iViewIdx; } … … 476 538 return m_abEqualRef[e][iRefIdx1][iRefIdx2]; 477 539 } 478 540 479 541 Void setEqualRef( RefPicList e, Int iRefIdx1, Int iRefIdx2, Bool b) 480 542 { 481 543 m_abEqualRef[e][iRefIdx1][iRefIdx2] = m_abEqualRef[e][iRefIdx2][iRefIdx1] = b; 482 544 } 483 545 484 546 static Void sortPicList ( TComList<TComPic*>& rcListPic ); 485 547 486 548 Bool getNoBackPredFlag() { return m_bNoBackPredFlag; } 487 549 Void setNoBackPredFlag( Bool b ) { m_bNoBackPredFlag = b; } … … 517 579 Bool isNextEntropySlice () { return m_bNextEntropySlice; } 518 580 Void setSliceBits ( UInt uiVal ) { m_uiSliceBits = uiVal; } 519 UInt getSliceBits () { return m_uiSliceBits; } 520 581 UInt getSliceBits () { return m_uiSliceBits; } 582 521 583 Void initMultiviewSlice ( Int** aaiScale = 0, Int** aaiOffset = 0 ); 522 584 … … 537 599 Void initWpScaling(); 538 600 inline Bool applyWP() { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPredIdc()) ); } 539 601 540 602 Void setWpAcDcParam ( wpACDCParam wp[3] ) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam)*3); } 541 603 Void getWpAcDcParam ( wpACDCParam *&wp ); … … 552 614 UInt uiNthRefPic ); 553 615 #endif 554 616 555 617 };// END CLASS DEFINITION TComSlice 556 618
Note: See TracChangeset for help on using the changeset viewer.