Changeset 5 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecTop.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/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();
Note: See TracChangeset for help on using the changeset viewer.