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


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

Clean version with cfg-files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/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  {
Note: See TracChangeset for help on using the changeset viewer.