Changeset 5 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp


Ignore:
Timestamp:
12 Dec 2011, 18:35:44 (13 years ago)
Author:
hhi
Message:

Clean version with cfg-files

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
    134
    235
     
    145178  xReadFlag( uiCode ); pcSPS->setUseALF ( uiCode ? true : false );
    146179  xReadFlag( uiCode ); pcSPS->setUseDQP ( uiCode ? true : false );
    147 #if !SB_NO_LowDelayCoding
     180#if !HHI_NO_LowDelayCoding
    148181  xReadFlag( uiCode ); pcSPS->setUseLDC ( uiCode ? true : false );
    149182#endif
     
    193226#endif
    194227
    195 #if HHI_DMM_INTRA
     228#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    196229  g_dDeltaDCsQuantOffset = Double(g_uiBitIncrement) -  2.0;
    197230#endif
     
    209242  { // baseview SPS -> set standard values
    210243    pcSPS->initMultiviewSPS         ( 0 );
     244#if DEPTH_MAP_GENERATION
    211245    pcSPS->setPredDepthMapGeneration( 0, false );
     246#endif
     247#if HHI_INTER_VIEW_RESIDUAL_PRED
    212248    pcSPS->setMultiviewResPredMode  ( 0 );
     249#endif
    213250  }
    214251  else
     
    220257      xReadSvlc(  iCode ); // view order index
    221258      pcSPS->initMultiviewSPSDepth    ( uiCode, iCode );
     259#if DEPTH_MAP_GENERATION
    222260      pcSPS->setPredDepthMapGeneration( uiCode, true );
     261#endif
     262#if HHI_INTER_VIEW_RESIDUAL_PRED
    223263      pcSPS->setMultiviewResPredMode  ( 0 );
    224 #if HHI_DMM_INTRA
     264#endif
     265#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    225266      xReadFlag( uiCode );
    226       pcSPS->setUseDepthModelModes( uiCode ? true : false );
    227 #endif
     267      pcSPS->setUseDMM( uiCode ? true : false );
     268#endif
     269#if HHI_MPI
    228270      xReadFlag( uiCode );
    229271      pcSPS->setUseMVI( uiCode ? true : false );
     272#endif
    230273    }
    231274    else
     
    250293      pcSPS->initMultiviewSPS( uiViewId, iVOI, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
    251294     
    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
    253303      xReadUvlc( uiPredDepthMapGeneration );
    254304      if( uiPredDepthMapGeneration )
     
    260310          xReadSvlc( iCode );   m_aaiTempPdmOffset       [ uiViewId ][ uiBaseId ] = iCode;
    261311        }
     312#if HHI_INTER_VIEW_MOTION_PRED
    262313        xReadUvlc  ( uiMultiviewMvPredMode );
     314#endif
     315#if HHI_INTER_VIEW_RESIDUAL_PRED
    263316        xReadFlag  ( uiMultiviewResPredMode );
    264       }
     317#endif
     318      }
     319#if HHI_INTER_VIEW_MOTION_PRED
    265320      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
    266325      pcSPS->setMultiviewResPredMode  ( uiMultiviewResPredMode );
     326#endif
     327#endif
     328#if HHI_MPI
    267329      pcSPS->setUseMVI( false );
     330#endif
    268331    }
    269332  }
     
    844907
    845908  return ;
    846 }
    847 #endif
    848 
    849 #if MW_MVI_SIGNALLING_MODE == 0
    850 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   }
    862909}
    863910#endif
     
    25742621
    25752622
     2623#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    25762624Void
    25772625TDecCavlc::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
    25782626{
    25792627  UInt  uiNumCand = 0;
    2580 #if MW_MVI_SIGNALLING_MODE == 1
     2628#if HHI_MPI
    25812629  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;
    25832631  if( bMVIAvailable )
    25842632    uiNumCand++;
     
    26052653  for( UInt uiIdx = 0; uiIdx <= ruiMergeIndex; uiIdx++ )
    26062654  {
    2607 #if MW_MVI_SIGNALLING_MODE == 1
     2655#if HHI_MPI
    26082656    if( uiIdx > uiMviMergePos )
    26092657    {
     
    26202668    }
    26212669  }
    2622 #if MW_MVI_SIGNALLING_MODE == 1
     2670#if HHI_MPI
    26232671  if( ruiMergeIndex > uiMviMergePos )
    26242672  {
     
    26312679#endif
    26322680}
     2681#endif
    26332682
    26342683
     
    26422691Void TDecCavlc::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
    26432692{
    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    )
    26502703  {
    26512704    parseMergeIndexMV( pcCU, ruiMergeIndex, uiAbsPartIdx, uiDepth );
    26522705    return;
    26532706  }
     2707#endif
    26542708
    26552709  Bool bLeftInvolved = false;
Note: See TracChangeset for help on using the changeset viewer.