Changeset 5 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 12 Dec 2011, 18:35:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
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 … … 145 178 xReadFlag( uiCode ); pcSPS->setUseALF ( uiCode ? true : false ); 146 179 xReadFlag( uiCode ); pcSPS->setUseDQP ( uiCode ? true : false ); 147 #if ! SB_NO_LowDelayCoding180 #if !HHI_NO_LowDelayCoding 148 181 xReadFlag( uiCode ); pcSPS->setUseLDC ( uiCode ? true : false ); 149 182 #endif … … 193 226 #endif 194 227 195 #if HHI_DMM_ INTRA228 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 196 229 g_dDeltaDCsQuantOffset = Double(g_uiBitIncrement) - 2.0; 197 230 #endif … … 209 242 { // baseview SPS -> set standard values 210 243 pcSPS->initMultiviewSPS ( 0 ); 244 #if DEPTH_MAP_GENERATION 211 245 pcSPS->setPredDepthMapGeneration( 0, false ); 246 #endif 247 #if HHI_INTER_VIEW_RESIDUAL_PRED 212 248 pcSPS->setMultiviewResPredMode ( 0 ); 249 #endif 213 250 } 214 251 else … … 220 257 xReadSvlc( iCode ); // view order index 221 258 pcSPS->initMultiviewSPSDepth ( uiCode, iCode ); 259 #if DEPTH_MAP_GENERATION 222 260 pcSPS->setPredDepthMapGeneration( uiCode, true ); 261 #endif 262 #if HHI_INTER_VIEW_RESIDUAL_PRED 223 263 pcSPS->setMultiviewResPredMode ( 0 ); 224 #if HHI_DMM_INTRA 264 #endif 265 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 225 266 xReadFlag( uiCode ); 226 pcSPS->setUseDepthModelModes( uiCode ? true : false ); 227 #endif 267 pcSPS->setUseDMM( uiCode ? true : false ); 268 #endif 269 #if HHI_MPI 228 270 xReadFlag( uiCode ); 229 271 pcSPS->setUseMVI( uiCode ? true : false ); 272 #endif 230 273 } 231 274 else … … 250 293 pcSPS->initMultiviewSPS( uiViewId, iVOI, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 251 294 252 UInt uiPredDepthMapGeneration = 0, uiMultiviewMvPredMode = 0, uiPdmPrecision = 0, uiMultiviewResPredMode = 0; 295 #if DEPTH_MAP_GENERATION 296 UInt uiPredDepthMapGeneration = 0, uiPdmPrecision = 0; 297 #if HHI_INTER_VIEW_MOTION_PRED 298 UInt uiMultiviewMvPredMode = 0; 299 #endif 300 #if HHI_INTER_VIEW_RESIDUAL_PRED 301 UInt uiMultiviewResPredMode = 0; 302 #endif 253 303 xReadUvlc( uiPredDepthMapGeneration ); 254 304 if( uiPredDepthMapGeneration ) … … 260 310 xReadSvlc( iCode ); m_aaiTempPdmOffset [ uiViewId ][ uiBaseId ] = iCode; 261 311 } 312 #if HHI_INTER_VIEW_MOTION_PRED 262 313 xReadUvlc ( uiMultiviewMvPredMode ); 314 #endif 315 #if HHI_INTER_VIEW_RESIDUAL_PRED 263 316 xReadFlag ( uiMultiviewResPredMode ); 264 } 317 #endif 318 } 319 #if HHI_INTER_VIEW_MOTION_PRED 265 320 pcSPS->setPredDepthMapGeneration( uiViewId, false, uiPredDepthMapGeneration, uiMultiviewMvPredMode, uiPdmPrecision, m_aaiTempPdmScaleNomDelta, m_aaiTempPdmOffset ); 321 #else 322 pcSPS->setPredDepthMapGeneration( uiViewId, false, uiPredDepthMapGeneration, 0, uiPdmPrecision, m_aaiTempPdmScaleNomDelta, m_aaiTempPdmOffset ); 323 #endif 324 #if HHI_INTER_VIEW_RESIDUAL_PRED 266 325 pcSPS->setMultiviewResPredMode ( uiMultiviewResPredMode ); 326 #endif 327 #endif 328 #if HHI_MPI 267 329 pcSPS->setUseMVI( false ); 330 #endif 268 331 } 269 332 } … … 844 907 845 908 return ; 846 }847 #endif848 849 #if MW_MVI_SIGNALLING_MODE == 0850 Void TDecCavlc::parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )851 {852 const Int iTextureModeDepth = pcCU->getTextureModeDepth( uiAbsPartIdx );853 if( iTextureModeDepth != -1 && uiDepth > iTextureModeDepth )854 return;855 856 UInt uiSymbol;857 xReadFlag( uiSymbol );858 if( uiSymbol == 1 )859 {860 pcCU->setTextureModeDepthSubParts( uiDepth, uiAbsPartIdx, uiDepth );861 }862 909 } 863 910 #endif … … 2574 2621 2575 2622 2623 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 2576 2624 Void 2577 2625 TDecCavlc::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) 2578 2626 { 2579 2627 UInt uiNumCand = 0; 2580 #if MW_MVI_SIGNALLING_MODE == 12628 #if HHI_MPI 2581 2629 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 2582 const UInt uiMviMergePos = bMVIAvailable ? MVI_MERGE_POS : MRG_MAX_NUM_CANDS;2630 const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : MRG_MAX_NUM_CANDS; 2583 2631 if( bMVIAvailable ) 2584 2632 uiNumCand++; … … 2605 2653 for( UInt uiIdx = 0; uiIdx <= ruiMergeIndex; uiIdx++ ) 2606 2654 { 2607 #if MW_MVI_SIGNALLING_MODE == 12655 #if HHI_MPI 2608 2656 if( uiIdx > uiMviMergePos ) 2609 2657 { … … 2620 2668 } 2621 2669 } 2622 #if MW_MVI_SIGNALLING_MODE == 12670 #if HHI_MPI 2623 2671 if( ruiMergeIndex > uiMviMergePos ) 2624 2672 { … … 2631 2679 #endif 2632 2680 } 2681 #endif 2633 2682 2634 2683 … … 2642 2691 Void TDecCavlc::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) 2643 2692 { 2644 #if MW_MVI_SIGNALLING_MODE == 1 2645 if( ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) || 2646 ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ) 2647 #else 2648 if( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) 2649 #endif 2693 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 2694 if( 2695 #if HHI_INTER_VIEW_MOTION_PRED 2696 ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) || 2697 #endif 2698 #if HHI_MPI 2699 ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || 2700 #endif 2701 0 2702 ) 2650 2703 { 2651 2704 parseMergeIndexMV( pcCU, ruiMergeIndex, uiAbsPartIdx, uiDepth ); 2652 2705 return; 2653 2706 } 2707 #endif 2654 2708 2655 2709 Bool bLeftInvolved = false;
Note: See TracChangeset for help on using the changeset viewer.