Changeset 5 in 3DVCSoftware for trunk/source/Lib/TLibDecoder


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

Clean version with cfg-files

Location:
trunk/source/Lib/TLibDecoder
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/SEIread.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
  • trunk/source/Lib/TLibDecoder/SEIread.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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecBinCoder.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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.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
  • trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.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
    134
    235
  • 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;
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.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
    134
    235
     
    162195  Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    163196  Void parseMergeIndex      ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
     197#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    164198  Void parseMergeIndexMV    ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
     199#endif
    165200  Void parseResPredFlag     ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth );
    166201  Void parseSplitFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    167 #if MW_MVI_SIGNALLING_MODE == 0
    168   Void parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    169 #endif
    170202  Void parsePartSize        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    171203  Void parsePredMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • trunk/source/Lib/TLibDecoder/TDecCu.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
     
    160193  UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
    161194 
    162 #if MW_MVI_SIGNALLING_MODE == 0
    163   if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE )
    164   {
    165     m_pcEntropyDecoder->decodeMvInheritanceFlag( pcCU, uiAbsPartIdx, uiDepth );
    166 
    167     if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )
    168     {
    169       assert( pcCU->getZorderIdxInCU() == 0 );
    170       TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
    171       pcCU->copyTextureMotionDataFrom( pcTextureCU, uiDepth, pcCU->getZorderIdxInCU() + uiAbsPartIdx, uiAbsPartIdx );
    172 
    173       UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
    174       for( UInt ui = 0; ui < uiCurrPartNumb; ui++ )
    175       {
    176         const UChar uhNewDepth = max( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) );
    177         if( pcCU->getPredictionMode( uiAbsPartIdx + ui ) == MODE_SKIP )
    178           pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_INTER );
    179         assert( pcCU->getPredictionMode( uiAbsPartIdx + ui ) == MODE_INTER );
    180         pcCU->setPartitionSize( uiAbsPartIdx + ui, SIZE_NxN );
    181         pcCU->setDepth( uiAbsPartIdx + ui, uhNewDepth );
    182         pcCU->setWidth( uiAbsPartIdx + ui, g_uiMaxCUWidth>>uhNewDepth );
    183         pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth );
    184       }
    185     }
    186   }
    187 #endif
    188 
    189195  if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) )
    190196  {
     197#if HHI_MPI
    191198    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) )
     199#endif
    192200      m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
    193201  }
     
    220228 
    221229  // decode CU mode and the partition size
     230#if HHI_MPI
    222231  if( !pcCU->getSlice()->isIntra() && pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 )
     232#else
     233  if( !pcCU->getSlice()->isIntra() )
     234#endif
    223235  {
    224236    m_pcEntropyDecoder->decodeSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
     
    262274    }
    263275#endif
    264 #if MW_MVI_SIGNALLING_MODE == 1
     276#if HHI_MPI
    265277    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )
    266278    {
     
    281293#endif
    282294 
     295#if HHI_INTER_VIEW_RESIDUAL_PRED
    283296    m_pcEntropyDecoder->decodeResPredFlag( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );
     297#endif
    284298    return;
    285299  }
    286300
     301#if HHI_MPI
    287302  if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 )
    288303  {
     304#endif
    289305    m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
    290306
     
    294310    m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    295311
     312#if HHI_MPI
    296313    if( !pcCU->isIntra( uiAbsPartIdx ) )
    297314    {
    298315      m_ppcCU[uiDepth]  ->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
    299316      m_ppcCU[uiDepth]  ->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
     317#if HHI_INTER_VIEW_RESIDUAL_PRED
    300318      m_pcEntropyDecoder->decodeResPredFlag    ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );
    301     }
    302 
    303 #if MW_MVI_SIGNALLING_MODE == 1
     319#endif
     320    }
     321
    304322    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )
    305323    {
     
    335353      }
    336354    }
    337 #endif
    338   }
     355  }
     356#endif
     357
    339358  UInt uiCurrWidth      = pcCU->getWidth ( uiAbsPartIdx );
    340359  UInt uiCurrHeight     = pcCU->getHeight( uiAbsPartIdx );
     
    402421Void TDecCu::xReconInter( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    403422{
    404 #if MW_MVI_SIGNALLING_MODE == 1
     423#if HHI_MPI
    405424  if( pcCU->getTextureModeDepth( 0 ) != -1 )
    406425    pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth );
     
    410429  m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] );
    411430 
    412 #if MW_MVI_SIGNALLING_MODE == 1
     431#if HHI_MPI
    413432  if( pcCU->getTextureModeDepth( 0 ) != -1 )
    414433    pcCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
    415434#endif
    416435 
     436#if HHI_INTER_VIEW_RESIDUAL_PRED
    417437  if( pcCU->getResPredFlag( 0 ) )
    418438  {
     
    422442    m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
    423443  }
    424  
     444#endif
     445
    425446  // inter recon
    426447  xDecodeInterTexture( pcCU, 0, uiDepth );
     
    433454  else
    434455  {
     456#if HHI_INTER_VIEW_RESIDUAL_PRED
    435457    if( pcCU->getResPredFlag( 0 ) )
    436458    {
    437459      m_ppcYuvReco[uiDepth]->clip( pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
    438460    }
     461#endif
    439462    m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 ));
    440463  }
     
    647670                                     bAboveAvail, bLeftAvail );
    648671 
    649 #if HHI_DMM_INTRA
     672#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    650673  if( uiLumaPredMode > MAX_MODE_ID_INTRA_DIR )
    651674  {
  • trunk/source/Lib/TLibDecoder/TDecCu.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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecEntropy.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
     
    371404    }
    372405  }
    373 #if MW_MVI_SIGNALLING_MODE == 1
     406#if HHI_MPI
    374407  if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    375408    uiNumCand++;
     
    416449
    417450
     451#if HHI_INTER_VIEW_RESIDUAL_PRED
    418452Void
    419453TDecEntropy::decodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx )
     
    443477  pcCU->setResPredFlagSubParts  ( bResPredFlag,      uiAbsPartIdx, uiPUIdx, uiDepth );
    444478}
     479#endif
    445480
    446481
     
    449484  m_pcEntropyDecoderIf->parseSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
    450485}
    451 
    452 #if MW_MVI_SIGNALLING_MODE == 0
    453 Void TDecEntropy::decodeMvInheritanceFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    454 {
    455   m_pcEntropyDecoderIf->parseMvInheritanceFlag( pcCU, uiAbsPartIdx, uiDepth );
    456 }
    457 #endif
    458486
    459487Void TDecEntropy::decodePredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     
    18051833#if HHI_MRG_SKIP
    18061834      UInt uiQtRootCbf = 1;
    1807 #if MW_MVI_SIGNALLING_MODE == 1
     1835#if HHI_MPI
    18081836      if( !(pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N &&
    18091837            ( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth == pcCU->getTextureModeDepth( uiAbsPartIdx ) ) ) )
  • trunk/source/Lib/TLibDecoder/TDecEntropy.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
    134
    235
     
    3063  virtual Void setAlfCtrl(Bool bAlfCtrl)  = 0;
    3164  virtual Void setMaxAlfCtrlDepth(UInt uiMaxAlfCtrlDepth)  = 0;
    32  
     65
    3366  virtual Void  resetEntropy          (TComSlice* pcSlice)                = 0;
    3467  virtual Void  setBitstream          ( TComBitstream* p )  = 0;
    35  
    36   virtual Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )  = 0; 
     68
     69  virtual Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )  = 0;
    3770
    3871  virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
     
    4174  virtual Void  parseSliceHeader          ( TComSlice*& rpcSlice )                                = 0;
    4275  virtual Void  parseTerminatingBit       ( UInt& ruilsLast )                                     = 0;
    43  
     76
    4477  virtual Void parseMVPIdx      ( TComDataCU* pcCU, Int& riMVPIdx, Int iMVPNum, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList ) = 0;
    45  
     78
    4679public:
    4780  virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    4881  virtual Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    49 #if MW_MVI_SIGNALLING_MODE == 0
    50   virtual Void parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    51 #endif
    5282  virtual Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0;
    5383  virtual Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    5585  virtual Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    5686  virtual Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    57  
     87
    5888  virtual Void parseIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    59  
     89
    6090  virtual Void parseIntraDirChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    61  
     91
    6292  virtual Void parseInterDir      ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    6393  virtual Void parseRefFrmIdx     ( TComDataCU* pcCU, Int& riRefFrmIdx, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList ) = 0;
    6494  virtual Void parseMvd           ( TComDataCU* pcCU, UInt uiAbsPartAddr, UInt uiPartIdx, UInt uiDepth, RefPicList eRefList ) = 0;
    65  
     95
    6696  virtual Void parseTransformSubdivFlag( UInt& ruiSubdivFlag, UInt uiLog2TransformBlockSize ) = 0;
    6797  virtual Void parseQtCbf         ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth ) = 0;
    6898  virtual Void parseQtRootCbf     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& uiQtRootCbf ) = 0;
    69  
     99
    70100  virtual Void parseDeltaQP       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    71  
     101
    72102  virtual Void parseCbf           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth ) = 0;
    73103  virtual Void parseBlockCbf      ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth, UInt uiQPartNum ) = 0;
     
    75105  virtual Void parseCbfTrdiv      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiTrDepth, UInt uiDepth, UInt& uiSubdiv ) = 0;
    76106#endif
    77  
     107
    78108  virtual Void parseCoeffNxN( TComDataCU* pcCU, TCoeff* pcCoef, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt uiDepth, TextType eTType ) = 0;
    79  
     109
    80110  virtual Void parseAlfFlag       ( UInt& ruiVal           ) = 0;
    81111  virtual Void parseAlfUvlc       ( UInt& ruiVal           ) = 0;
     
    103133  TDecEntropyIf*  m_pcEntropyDecoderIf;
    104134  TComPrediction* m_pcPrediction;
    105  
     135
    106136public:
    107137  Void init (TComPrediction* p) {m_pcPrediction = p;}
     
    112142  Void decodeMvdPU        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    113143  Void decodeMVPIdxPU     ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    114  
     144
    115145  Void    setEntropyDecoder           ( TDecEntropyIf* p );
    116146  Void    setBitstream                ( TComBitstream* p )      { m_pcEntropyDecoderIf->setBitstream(p);                    }
    117147  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
    118148
    119   Void    decodeNalUnitHeader         ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )   
     149  Void    decodeNalUnitHeader         ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )
    120150                                                                { m_pcEntropyDecoderIf->parseNalUnitHeader(eNalUnitType, TemporalId, bOutputFlag ); }
    121151
     
    126156  Void    decodeSliceHeader           ( TComSlice*& rpcSlice )  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice);         }
    127157  Void    decodeTerminatingBit        ( UInt& ruiIsLast )       { m_pcEntropyDecoderIf->parseTerminatingBit(ruiIsLast);     }
    128  
     158
    129159  // Adaptive Loop filter
    130160  Void decodeAlfParam(ALFParam* pAlfParam);
    131161  //--Adaptive Loop filter
    132  
     162
    133163  TDecEntropyIf* getEntropyDecoder() { return m_pcEntropyDecoderIf; }
    134  
     164
    135165public:
    136166  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    137 #if MW_MVI_SIGNALLING_MODE == 0
    138   Void decodeMvInheritanceFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    139 #endif
    140167  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    141168  Void decodeMergeFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    142169  Void decodeMergeIndex        ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth );
     170#if HHI_INTER_VIEW_RESIDUAL_PRED
    143171  Void decodeResPredFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx );
     172#endif
    144173  Void decodeAlfCtrlFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    145174#if TSB_ALF_HEADER
    146175  Void decodeAlfCtrlParam      ( ALFParam *pAlfParam );
    147176#endif
    148  
     177
    149178  Void decodePredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    150179  Void decodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    151  
     180
    152181  Void decodePredInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU );
    153  
     182
    154183  Void decodeIntraDirModeLuma  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    155184  Void decodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    157186  Void decodeRefFrmIdx         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList );
    158187  Void decodeMvd               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList );
    159   // SB
    160188  Void decodeRefViewIdx        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList );
    161189  //
    162190  Void decodeTransformIdx      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    163191  Void decodeQP                ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    164  
     192
    165193  Void decodeViewidx           ( Int& riViewIdx );
    166  
    167  
     194
     195
    168196private:
    169197  Void xDecodeTransformSubdiv  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3 );
    170  
     198
    171199  Void xDecodeCoeff            ( TComDataCU* pcCU, TCoeff* pcCoeff, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, UInt uiTrIdx, UInt uiCurrTrIdx, TextType eType );
    172200public:
    173201  Void decodeCoeff             ( TComDataCU* pcCU                 , UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight );
    174  
     202
    175203  // ALF-related
    176204  Void decodeAux(ALFParam* pAlfParam);
  • trunk/source/Lib/TLibDecoder/TDecGop.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
     
    5386                   TComAdaptiveLoopFilter* pcAdaptiveLoopFilter,
    5487#if MTK_SAO
    55                    TComSampleAdaptiveOffset* pcSAO,
     88                   TComSampleAdaptiveOffset* pcSAO
    5689#endif             
    57                    TComDepthMapGenerator*  pcDepthMapGenerator,
    58                    TComResidualGenerator*  pcResidualGenerator )
     90#if DEPTH_MAP_GENERATION
     91                  ,TComDepthMapGenerator*  pcDepthMapGenerator
     92#endif
     93#if HHI_INTER_VIEW_RESIDUAL_PRED
     94                  ,TComResidualGenerator*  pcResidualGenerator
     95#endif
     96                  )
    5997{
    6098  m_pcEntropyDecoder      = pcEntropyDecoder;
     
    68106  m_pcSAO  = pcSAO;
    69107#endif
     108#if DEPTH_MAP_GENERATION
    70109  m_pcDepthMapGenerator   = pcDepthMapGenerator;
     110#endif
     111#if HHI_INTER_VIEW_RESIDUAL_PRED
    71112  m_pcResidualGenerator   = pcResidualGenerator;
     113#endif
    72114}
    73115
     
    145187    }
    146188   
     189#if DEPTH_MAP_GENERATION
    147190    // init view component and predict virtual depth map
    148191    if( uiStartCUAddr == 0 )
     
    150193      m_pcDepthMapGenerator->initViewComponent( rpcPic );
    151194      m_pcDepthMapGenerator->predictDepthMap  ( rpcPic );
     195#if HHI_INTER_VIEW_RESIDUAL_PRED
    152196      m_pcResidualGenerator->initViewComponent( rpcPic );
    153     }
     197#endif
     198    }
     199#endif
    154200
    155201    // decode slice
     
    160206  else
    161207  {
     208#if HHI_INTER_VIEW_RESIDUAL_PRED
    162209    // set residual picture
    163210    m_pcResidualGenerator->setRecResidualPic( rpcPic );
    164 
     211#endif
     212#if DEPTH_MAP_GENERATION
    165213    // update virtual depth map
    166214    m_pcDepthMapGenerator->updateDepthMap( rpcPic );
     215#endif
    167216
    168217    // deblocking filter
  • trunk/source/Lib/TLibDecoder/TDecGop.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
    134
    235
     
    4679  TComLoopFilter*       m_pcLoopFilter;
    4780
     81#if DEPTH_MAP_GENERATION
    4882  TComDepthMapGenerator*  m_pcDepthMapGenerator;
     83#endif
     84#if HHI_INTER_VIEW_RESIDUAL_PRED
    4985  TComResidualGenerator*  m_pcResidualGenerator;
     86#endif
    5087 
    5188  // Adaptive Loop filter
     
    72109                 TComAdaptiveLoopFilter* pcAdaptiveLoopFilter,
    73110#if MTK_SAO
    74                  TComSampleAdaptiveOffset*                pcSAO,
     111                 TComSampleAdaptiveOffset*                pcSAO
    75112#endif
    76                  TComDepthMapGenerator*  pcDepthMapGenerator,
    77                  TComResidualGenerator*  pcResidualGenerator );
     113#if DEPTH_MAP_GENERATION
     114                ,TComDepthMapGenerator*  pcDepthMapGenerator
     115#endif
     116#if HHI_INTER_VIEW_RESIDUAL_PRED
     117                ,TComResidualGenerator*  pcResidualGenerator
     118#endif
     119                 );
    78120  Void  create  ();
    79121  Void  destroy ();
  • trunk/source/Lib/TLibDecoder/TDecSbac.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
     
    1952, m_cCUSkipFlagSCModel        ( 1,             1,               NUM_SKIP_FLAG_CTX             )
    2053, m_cCUSplitFlagSCModel       ( 1,             1,               NUM_SPLIT_FLAG_CTX            )
    21 #if MW_MVI_SIGNALLING_MODE == 0
    22 , m_cCUMvInheritanceFlagSCModel(1,             1,               NUM_MVI_FLAG_CTX              )
    23 #endif
    2454, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        )
    2555, m_cCUMergeIdxExtSCModel     ( 1,             1,               NUM_MERGE_IDX_EXT_CTX         )
     
    6494#endif
    6595, m_cViewIdxSCModel           ( 1,             1,               NUM_VIEW_IDX_CTX              )
    66 #if HHI_DMM_INTRA
     96#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    6797, m_cIntraDMMSCModel          ( 1,             1,               NUM_DMM_CTX                   )
    6898, m_cIntraWedgeSCModel        ( 1,             1,               NUM_WEDGE_CTX                 )
     
    85115 
    86116  m_cCUSplitFlagSCModel.initBuffer       ( eSliceType, iQp, (Short*)INIT_SPLIT_FLAG );
    87 #if MW_MVI_SIGNALLING_MODE == 0
    88   m_cCUMvInheritanceFlagSCModel.initBuffer( eSliceType, iQp, (Short*)INIT_MVI_FLAG );
    89 #endif
    90117  m_cCUSkipFlagSCModel.initBuffer        ( eSliceType, iQp, (Short*)INIT_SKIP_FLAG );
    91118  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (Short*)INIT_MERGE_FLAG_EXT );
     
    127154  m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (Short*)INIT_TRANS_SUBDIV_FLAG );
    128155  m_cViewIdxSCModel.initBuffer           ( eSliceType, iQp, (Short*)INIT_VIEW_IDX );
    129 #if HHI_DMM_INTRA
     156#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    130157  m_cIntraDMMSCModel.initBuffer          ( eSliceType, iQp, (Short*)INIT_INTRA_DMM );
    131158  m_cIntraWedgeSCModel.initBuffer        ( eSliceType, iQp, (Short*)INIT_INTRA_WEDGELET );
     
    361388  return;
    362389}
    363 #if HHI_DMM_INTRA
     390#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    364391Void TDecSbac::xReadExGolombLevel( UInt& ruiSymbol, ContextModel& rcSCModel  )
    365392{
     
    552579
    553580
     581#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    554582Void TDecSbac::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
    555583{
    556 #if MW_MVI_SIGNALLING_MODE == 1
     584#if HHI_MPI
    557585  const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE;
    558   const UInt uiMviMergePos = bMVIAvailable ? MVI_MERGE_POS : MRG_MAX_NUM_CANDS;
     586  const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : MRG_MAX_NUM_CANDS;
    559587#endif
    560588  //--- set number of candidates and availability ---
     
    563591  for( UInt uiIdx = 0; uiIdx < MRG_MAX_NUM_CANDS; uiIdx++ )
    564592  {
    565 #if MW_MVI_SIGNALLING_MODE == 1
     593#if HHI_MPI
    566594    if( uiIdx == uiMviMergePos )
    567595    {
     
    629657  }
    630658
    631 #if MW_MVI_SIGNALLING_MODE == 1
     659#if HHI_MPI
    632660  if( ruiMergeIndex > uiMviMergePos )
    633661  {
     
    661689  DTRACE_CABAC_T( "\n" );
    662690}
     691#endif
    663692
    664693
    665694Void TDecSbac::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth )
    666695{
    667 #if MW_MVI_SIGNALLING_MODE == 1
    668   if( ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) ||
    669       ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) )
    670 #else
    671   if( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE )
    672 #endif
     696#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
     697  if(
     698#if HHI_INTER_VIEW_MOTION_PRED
     699      ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) ||
     700#endif
     701#if HHI_MPI
     702      ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ||
     703#endif
     704      0
     705    )
    673706  {
    674707    parseMergeIndexMV( pcCU, ruiMergeIndex, uiAbsPartIdx, uiDepth );
    675708    return;
    676709  }
     710#endif
    677711
    678712  Bool bLeftInvolved = false;
     
    827861}
    828862
    829 #if MW_MVI_SIGNALLING_MODE == 0
    830 Void TDecSbac::parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    831 {
    832   const Int iTextureModeDepth = pcCU->getTextureModeDepth( uiAbsPartIdx );
    833   if( iTextureModeDepth != -1 && uiDepth > iTextureModeDepth )
    834     return;
    835 
    836   UInt uiSymbol;
    837   m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUMvInheritanceFlagSCModel.get( 0, 0, pcCU->getCtxMvInheritanceFlag( uiAbsPartIdx, uiDepth ) ) );
    838   if( uiSymbol == 1 )
    839   {
    840     pcCU->setTextureModeDepthSubParts( uiDepth, uiAbsPartIdx, uiDepth );
    841   }
    842 }
    843 #endif
    844 
    845863/** parse partition size
    846864 * \param pcCU
     
    965983}
    966984
    967 #if HHI_DMM_INTRA
     985#if HHI_DMM_WEDGE_INTRA
    968986Void TDecSbac::xParseWedgeFullInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    969987{
     
    11361154  pcCU->setWedgePredDirDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth );
    11371155}
    1138 
     1156#endif
     1157#if HHI_DMM_PRED_TEX
    11391158Void TDecSbac::xParseWedgePredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    11401159{
     
    12041223  UInt uiSymbol;
    12051224 
    1206 #if HHI_DMM_INTRA
     1225#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    12071226  UInt uiFlag = 0;
    1208   if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDepthModelModes() && g_uiMaxCUWidth>>uiDepth < 64 )
     1227  if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDMM() && g_uiMaxCUWidth>>uiDepth < 64 )
    12091228  {
    12101229    m_pcTDecBinIf->decodeBin( uiFlag, m_cIntraDMMSCModel.get(0, 0, 0) );
     
    12141233    UInt uiDMMode;
    12151234
    1216 #if DMM_NO_TEXTURE_MODES
    1217     pcCU->setTextureModeAllowanceSubParts( false, uiAbsPartIdx, uiDepth );
    1218 
     1235#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     1236    m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
     1237    m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1;
    12191238    if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 )
    12201239    {
    1221       m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1222       if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }
    1223 
    1224       if( uiDMMode > 1 )
    1225       {
    1226         uiDMMode += 4;
    1227       }
    1228     }
    1229     else
    1230     {
    1231       m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
     1240      m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2;
    12321241    }
    12331242#else
    1234     TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getTexturePic()->getPicYuvRec();
    1235     Int     iRefStride = pcPicYuvRef->getStride();
    1236     Pel*    piRefY;
    1237 
    1238     TComYuv cTempYuv;
    1239     UInt uiTempStride = 0;
    1240     Pel* piTempY;
    1241 
    1242     UInt uiWidth = g_uiMaxCUWidth>>uiDepth;
    1243     UInt uiHeight = g_uiMaxCUHeight>>uiDepth;
    1244     piRefY = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), uiAbsPartIdx );
    1245     cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear();
    1246     piTempY = cTempYuv.getLumaAddr( 0, uiWidth );
    1247     uiTempStride = cTempYuv.getStride();
    1248 
    1249     for ( Int y = 0; y < uiHeight; y++ )
    1250     {
    1251       ::memcpy(piTempY, piRefY, sizeof(Pel)*uiWidth);
    1252       piTempY += uiTempStride;
    1253       piRefY += iRefStride;
    1254     }
    1255 
    1256     UInt64 uiDCSAD = cTempYuv.getLumaDistDCSAD( uiWidth );
    1257 
    1258     cTempYuv.destroy();
    1259 
    1260     if( uiDCSAD < (UInt)(pcCU->getQP(0))/2 )
    1261     {
    1262       pcCU->setTextureModeAllowanceSubParts( false, uiAbsPartIdx, uiDepth );
    1263 
     1243        m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    12641244      if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 )
    12651245      {
    1266                                         m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1267         if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }
    1268 
    1269         if( uiDMMode > 1 )
    1270         {
    1271           uiDMMode += 4;
    1272         }
    1273       }
    1274       else
    1275       {
    1276         pcCU->setTextureModeAllowanceSubParts( true, uiAbsPartIdx, uiDepth );
    1277 
    1278         m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1279       }
    1280     }
    1281     else
    1282     {
    1283                                       m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1284       if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }
    1285       if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 )
    1286       {
    1287         if( DMM_INTRA_MODE_BITS > 2 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2; }
    1288       }
    1289     }
    1290 #endif
    1291     uiIPredMode = g_aucAdditionalIntraModeList[uiDMMode];
    1292 
     1246      m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1;
     1247    }
     1248#endif
     1249    uiIPredMode = uiDMMode + MAX_MODE_ID_INTRA_DIR + 1;
     1250
     1251#if HHI_DMM_WEDGE_INTRA
    12931252    if( uiIPredMode == DMM_WEDGE_FULL_IDX )          { xParseWedgeFullInfo          ( pcCU, uiAbsPartIdx, uiDepth ); }
    12941253    if( uiIPredMode == DMM_WEDGE_FULL_D_IDX )        { xParseWedgeFullDeltaInfo     ( pcCU, uiAbsPartIdx, uiDepth ); }
    12951254    if( uiIPredMode == DMM_WEDGE_PREDDIR_IDX )       { xParseWedgePredDirInfo       ( pcCU, uiAbsPartIdx, uiDepth ); }
    12961255    if( uiIPredMode == DMM_WEDGE_PREDDIR_D_IDX )     { xParseWedgePredDirDeltaInfo  ( pcCU, uiAbsPartIdx, uiDepth ); }
     1256#endif
     1257#if HHI_DMM_PRED_TEX
    12971258    if( uiIPredMode == DMM_WEDGE_PREDTEX_D_IDX )     { xParseWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx, uiDepth ); }
    12981259    if( uiIPredMode == DMM_CONTOUR_PREDTEX_D_IDX )   { xParseContourPredTexDeltaInfo( pcCU, uiAbsPartIdx, uiDepth ); }
     1260#endif
    12991261  }
    13001262  else
     
    13701332  UInt uiSymbol;
    13711333
    1372 #if HHI_DMM_INTRA
     1334#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    13731335  UInt uiFlag = 0;
    1374   if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDepthModelModes() && g_uiMaxCUWidth>>uiDepth < 64 )
     1336  if ( pcCU->getSlice()->getSPS()->isDepth() && pcCU->getSlice()->getSPS()->getUseDMM() && g_uiMaxCUWidth>>uiDepth < 64 )
    13751337  {
    13761338    m_pcTDecBinIf->decodeBin( uiFlag, m_cIntraDMMSCModel.get(0, 0, 0) );
     
    13791341  {
    13801342    UInt uiDMMode;
    1381     TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getTexturePic()->getPicYuvRec();
    1382     Int     iRefStride = pcPicYuvRef->getStride();
    1383     Pel*    piRefY;
    1384 
    1385     TComYuv cTempYuv;
    1386     UInt uiTempStride = 0;
    1387     Pel* piTempY;
    1388 
    1389     UInt uiWidth = g_uiMaxCUWidth>>uiDepth;
    1390     UInt uiHeight = g_uiMaxCUHeight>>uiDepth;
    1391     piRefY = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), uiAbsPartIdx );
    1392     cTempYuv.create( uiWidth, uiHeight ); cTempYuv.clear();
    1393     piTempY = cTempYuv.getLumaAddr( 0, uiWidth );
    1394     uiTempStride = cTempYuv.getStride();
    1395 
    1396     for ( Int y = 0; y < uiHeight; y++ )
    1397     {
    1398       ::memcpy(piTempY, piRefY, sizeof(Pel)*uiWidth);
    1399       piTempY += uiTempStride;
    1400       piRefY += iRefStride;
    1401     }
    1402 
    1403     UInt64 uiDCSAD = cTempYuv.getLumaDistDCSAD( uiWidth );
    1404 
    1405     if( uiDCSAD < 23 )
    1406     {
     1343
     1344#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
     1345    m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
     1346    m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1;
    14071347      if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 )
    14081348      {
    1409         m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1410         if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }
    1411 
    1412         if( uiDMMode > 1 )
    1413         {
    1414           uiDMMode += 4;
     1349      m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2;
    14151350        }
    1416       }
    1417       else
    1418       {
    1419         m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1420       }
    1421     }
    1422     else
    1423     {
     1351#else
    14241352      m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode  = uiSymbol;
    1425       if( DMM_INTRA_MODE_BITS > 1 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1; }
    14261353      if ( pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN && g_uiMaxCUWidth>>uiDepth > 4 )
    14271354      {
    1428         if( DMM_INTRA_MODE_BITS > 2 ) { m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 2; }
    1429       }
    1430     }
     1355      m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraDMMSCModel.get(0, 0, 1) ); uiDMMode |= uiSymbol << 1;
     1356    }
     1357#endif
    14311358    uiIPredMode = g_aucAdditionalIntraModeList[uiDMMode];
    14321359
     1360#if HHI_DMM_WEDGE_INTRA
    14331361    if( uiIPredMode == DMM_WEDGE_FULL_IDX )          { xParseWedgeFullInfo          ( pcCU, uiAbsPartIdx, uiDepth ); }
    14341362    if( uiIPredMode == DMM_WEDGE_FULL_D_IDX )        { xParseWedgeFullDeltaInfo     ( pcCU, uiAbsPartIdx, uiDepth ); }
    14351363    if( uiIPredMode == DMM_WEDGE_PREDDIR_IDX )       { xParseWedgePredDirInfo       ( pcCU, uiAbsPartIdx, uiDepth ); }
    14361364    if( uiIPredMode == DMM_WEDGE_PREDDIR_D_IDX )     { xParseWedgePredDirDeltaInfo  ( pcCU, uiAbsPartIdx, uiDepth ); }
     1365#endif
     1366#if HHI_DMM_PRED_TEX
    14371367    if( uiIPredMode == DMM_WEDGE_PREDTEX_D_IDX )     { xParseWedgePredTexDeltaInfo  ( pcCU, uiAbsPartIdx, uiDepth ); }
    14381368    if( uiIPredMode == DMM_CONTOUR_PREDTEX_D_IDX )   { xParseContourPredTexDeltaInfo( pcCU, uiAbsPartIdx, uiDepth ); }
     1369#endif
    14391370  }
    14401371  else
  • trunk/source/Lib/TLibDecoder/TDecSbac.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
    134
    235
     
    6699#if E253
    67100  Void  xReadGoRiceExGolomb ( UInt &ruiSymbol, UInt &ruiGoRiceParam );
    68 #if HHI_DMM_INTRA
     101#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    69102  Void  xReadExGolombLevel  ( UInt& ruiSymbol, ContextModel& rcSCModel  );
    70103#endif
     
    81114  Void  xReadExGolombMvd    ( UInt& ruiSymbol, ContextModel* pcSCModel, UInt uiMaxBin );
    82115 
    83 #if HHI_DMM_INTRA
     116#if HHI_DMM_WEDGE_INTRA
    84117  Void xParseWedgeFullInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    85118  Void xParseWedgeFullDeltaInfo     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     119
    86120  Void xParseWedgePredDirInfo       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    87121  Void xParseWedgePredDirDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     122#endif
     123#if HHI_DMM_PRED_TEX
    88124  Void xParseWedgePredTexDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    89125  Void xParseContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    106142  Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    107143  Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    108 #if MW_MVI_SIGNALLING_MODE == 0
    109   Void parseMvInheritanceFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    110 #endif
    111144  Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    112145  Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
     146#if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI
    113147  Void parseMergeIndexMV  ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
     148#endif
    114149  Void parseResPredFlag   ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth );
    115150  Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    149184  ContextModel3DBuffer m_cCUSkipFlagSCModel;
    150185  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    151 #if MW_MVI_SIGNALLING_MODE == 0
    152   ContextModel3DBuffer m_cCUMvInheritanceFlagSCModel;
    153 #endif
    154186  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    155187  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
     
    196228#endif
    197229  ContextModel3DBuffer m_cViewIdxSCModel;
    198 #if HHI_DMM_INTRA
     230#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    199231  ContextModel3DBuffer m_cIntraDMMSCModel;
    200232  ContextModel3DBuffer m_cIntraWedgeSCModel;
  • trunk/source/Lib/TLibDecoder/TDecSlice.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
  • trunk/source/Lib/TLibDecoder/TDecSlice.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
    134
    235
  • trunk/source/Lib/TLibDecoder/TDecTop.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/** \file     TDecTop.cpp
    235    \brief    decoder class
     
    258291  m_cSliceDecoder.destroy();
    259292
     293#if DEPTH_MAP_GENERATION
    260294  m_cDepthMapGenerator.destroy();
     295#endif
     296#if HHI_INTER_VIEW_RESIDUAL_PRED
    261297  m_cResidualGenerator.destroy();
     298#endif
    262299}
    263300
     
    268305    initROM();
    269306#if MTK_SAO
    270   m_cGopDecoder.  init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter, &m_cSAO, &m_cDepthMapGenerator, &m_cResidualGenerator );
     307  m_cGopDecoder.  init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter, &m_cSAO
     308#if DEPTH_MAP_GENERATION
     309                      , &m_cDepthMapGenerator
     310#endif
     311#if HHI_INTER_VIEW_RESIDUAL_PRED
     312                      , &m_cResidualGenerator
     313#endif
     314                      );
    271315#else
    272   m_cGopDecoder.  init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter, &m_cDepthMapGenerator, &m_cResidualGenerator );
     316  m_cGopDecoder.  init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cAdaptiveLoopFilter
     317#if DEPTH_MAP_GENERATION
     318                      , &m_cDepthMapGenerator
     319#endif
     320#if HHI_INTER_VIEW_RESIDUAL_PRED
     321                      , &m_cResidualGenerator
     322#endif
     323                      );
    273324#endif
    274325  m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder );
     
    276327
    277328  m_pcTAppDecTop = pcTAppDecTop;
     329#if DEPTH_MAP_GENERATION
    278330  m_cDepthMapGenerator.init( &m_cPrediction, m_pcTAppDecTop->getSPSAccess(), m_pcTAppDecTop->getAUPicAccess() );
     331#endif
     332#if HHI_INTER_VIEW_RESIDUAL_PRED
    279333  m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator );
     334#endif
    280335}
    281336
     
    283338{
    284339  m_cSPS = cSPS ;
    285 #if SB_MEM_FIX
    286340      if ( !m_cAdaptiveLoopFilter.isCreated())
    287341      {
     
    292346  m_cLoopFilter.        create( g_uiMaxCUDepth );
    293347      }
    294 #else
    295       m_cAdaptiveLoopFilter.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    296 #if MTK_SAO
    297       m_cSAO.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    298 #endif
    299       m_cLoopFilter.        create( g_uiMaxCUDepth );
    300 #endif
    301348  m_uiValidPS |= 1;
    302349}
     
    334381  m_iMaxRefPicNum = getCodedPictureBufferSize( );
    335382
     383#if DEPTH_MAP_GENERATION
    336384  Bool bNeedPrdDepthMapBuffer = ( !pcSlice->getSPS()->isDepth() && ( pcSlice->getSPS()->getViewId() == 0 || pcSlice->getSPS()->getPredDepthMapGeneration() > 0 ) );
     385#endif
    337386
    338387  if (m_cListPic.size() < (UInt)m_iMaxRefPicNum)
     
    340389    rpcPic = new TComPic;
    341390    rpcPic->create ( pcSlice->getSPS()->getWidth(), pcSlice->getSPS()->getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     391#if DEPTH_MAP_GENERATION
    342392    if( bNeedPrdDepthMapBuffer )
    343393    {
    344394      rpcPic->addPrdDepthMapBuffer();
    345395    }
     396#endif
    346397    m_cListPic.pushBack( rpcPic );
    347398
     
    372423  rpcPic->getPicYuvRec()->setBorderExtension(false);
    373424
     425#if DEPTH_MAP_GENERATION
    374426  if( bNeedPrdDepthMapBuffer && !rpcPic->getPredDepthMap() )
    375427  {
    376428    rpcPic->addPrdDepthMapBuffer();
    377429  }
     430#endif
    378431}
    379432
     
    397450  {
    398451    pcPic->removeOriginalBuffer   ();
     452#if HHI_INTER_VIEW_MOTION_PRED
    399453    pcPic->removeOrgDepthMapBuffer();
     454#endif
     455#if HHI_INTER_VIEW_RESIDUAL_PRED
    400456    pcPic->removeResidualBuffer   ();
     457#endif
     458#if HHI_INTERVIEW_SKIP
    401459    pcPic->removeUsedPelsMapBuffer();
    402   }
    403 }
    404 
     460#endif
     461  }
     462}
    405463
    406464#if AMVP_BUFFERCOMPRESS
     
    492550
    493551      // create ALF temporary buffer
    494 #if SB_MEM_FIX
    495552      if ( !m_cAdaptiveLoopFilter.isCreated())
    496553      {
     
    501558      m_cLoopFilter.        create( g_uiMaxCUDepth );
    502559      }
    503 #else
    504       m_cAdaptiveLoopFilter.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    505 #if MTK_SAO
    506       m_cSAO.create( m_cSPS.getWidth(), m_cSPS.getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    507 #endif
    508       m_cLoopFilter.        create( g_uiMaxCUDepth );
    509 #endif
    510560      m_uiValidPS |= 1;
    511561
     
    594644        m_cSliceDecoder.create( m_apcSlicePilot, m_apcSlicePilot->getSPS()->getWidth(), m_apcSlicePilot->getSPS()->getHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    595645
     646#if DEPTH_MAP_GENERATION
    596647        m_cDepthMapGenerator.create( true, m_apcSlicePilot->getSPS()->getWidth(), m_apcSlicePilot->getSPS()->getHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
     648#endif
     649#if HHI_INTER_VIEW_RESIDUAL_PRED
    597650        m_cResidualGenerator.create( true, m_apcSlicePilot->getSPS()->getWidth(), m_apcSlicePilot->getSPS()->getHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
     651#endif
    598652      }
    599653
     
    663717      pcPic->setCurrSliceIdx(m_uiSliceIdx);
    664718
    665 #if HHI_DMM_INTRA
    666     if ( m_cSPS.getUseDepthModelModes() && g_aacWedgeLists.empty() && m_bIsDepth )
     719#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     720    if ( m_cSPS.getUseDMM() && g_aacWedgeLists.empty() && m_bIsDepth )
    667721      {
    668722        initWedgeLists();
  • trunk/source/Lib/TLibDecoder/TDecTop.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
    134
    235
     
    6699  Bool                    m_bGopSizeSet;
    67100  int                     m_iMaxRefPicNum;
    68  
     101
    69102#if DCM_DECODING_REFRESH
    70103  Bool                    m_bRefreshPending;    ///< refresh pending flag
     
    80113  TComPPS                 m_cPPS;
    81114  TComSlice*              m_apcSlicePilot;
    82  
     115
    83116  SEImessages *m_SEIs; ///< "all" SEI messages.  If not NULL, we own the object.
    84117
     
    98131  TComSampleAdaptiveOffset m_cSAO;
    99132#endif
     133#if DEPTH_MAP_GENERATION
    100134  TComDepthMapGenerator   m_cDepthMapGenerator;
     135#endif
     136#if HHI_INTER_VIEW_RESIDUAL_PRED
    101137  TComResidualGenerator   m_cResidualGenerator;
     138#endif
    102139
    103140  Bool                    m_bIsDepth;
     
    119156  TDecTop();
    120157  virtual ~TDecTop();
    121  
     158
    122159  Void  create  ();
    123160  Void  destroy ();
    124161
    125162  void setPictureDigestEnabled(bool enabled) { m_cGopDecoder.setPictureDigestEnabled(enabled); }
    126  
     163
    127164  Void  init( TAppDecTop* pcTAppDecTop, Bool bFirstInstance = true );
    128165#if DCM_SKIP_DECODING_FRAMES
     
    131168  Void  decode ( Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS );
    132169#endif
    133  
     170
    134171  TComSPS *getSPS() { return (m_uiValidPS & 1) ? &m_cSPS : NULL; }
    135  
     172
    136173  Void  deletePicBuffer();
    137174
     
    149186  Void setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
    150187
    151   // SB
    152188  TComList<TComPic*>*     getListPic            () { return  &m_cListPic;             }
    153189  TAppDecTop*             getDecTop           ( ){ return  m_pcTAppDecTop ;};
     
    161197protected:
    162198  Void  xGetNewPicBuffer  (TComSlice* pcSlice, TComPic*& rpcPic);
    163  
     199
    164200};// END CLASS DEFINITION TDecTop
    165201
Note: See TracChangeset for help on using the changeset viewer.