source: 3DVCSoftware/branches/0.1-poznan-univ/source/Lib/TLibDecoder/TDecSlice.cpp @ 165

Last change on this file since 165 was 2, checked in by hhi, 13 years ago

inital import

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1
2
3/** \file     TDecSlice.cpp
4    \brief    slice decoder class
5*/
6
7#include "TDecSlice.h"
8
9//////////////////////////////////////////////////////////////////////
10// Construction/Destruction
11//////////////////////////////////////////////////////////////////////
12
13TDecSlice::TDecSlice()
14{
15}
16
17TDecSlice::~TDecSlice()
18{
19}
20
21Void TDecSlice::create( TComSlice* pcSlice, Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth )
22{
23}
24
25Void TDecSlice::destroy()
26{
27}
28
29Void TDecSlice::init(TDecEntropy* pcEntropyDecoder, TDecCu* pcCuDecoder)
30{
31  m_pcEntropyDecoder  = pcEntropyDecoder;
32  m_pcCuDecoder       = pcCuDecoder;
33}
34
35Void TDecSlice::decompressSlice(TComBitstream* pcBitstream, TComPic*& rpcPic)
36{
37  TComDataCU* pcCU;
38  UInt        uiIsLast = 0;
39  Int   iStartCUAddr = max(rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getSliceCurStartCUAddr(), rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getEntropySliceCurStartCUAddr());
40
41  // decoder don't need prediction & residual frame buffer
42  rpcPic->setPicYuvPred( 0 );
43  rpcPic->setPicYuvResi( 0 );
44 
45#if ENC_DEC_TRACE
46  g_bJustDoIt = g_bEncDecTraceEnable;
47#endif
48  DTRACE_CABAC_V( g_nSymbolCounter++ );
49  DTRACE_CABAC_T( "\tPOC: " );
50  DTRACE_CABAC_V( rpcPic->getPOC() );
51  DTRACE_CABAC_T( "\n" );
52
53#if ENC_DEC_TRACE
54  g_bJustDoIt = g_bEncDecTraceDisable;
55#endif
56
57  // for all CUs in slice
58  UInt  uiLastCUAddr = iStartCUAddr;
59  for( Int iCUAddr = iStartCUAddr; !uiIsLast && iCUAddr < rpcPic->getNumCUsInFrame(); iCUAddr++, uiLastCUAddr++ )
60  {
61    pcCU = rpcPic->getCU( iCUAddr );
62    pcCU->initCU( rpcPic, iCUAddr );
63   
64#if ENC_DEC_TRACE
65    g_bJustDoIt = g_bEncDecTraceEnable;
66#endif
67    m_pcCuDecoder->decodeCU     ( pcCU, uiIsLast );
68    m_pcCuDecoder->decompressCU ( pcCU );
69   
70#if ENC_DEC_TRACE
71    g_bJustDoIt = g_bEncDecTraceDisable;
72#endif
73  }
74
75
76}
Note: See TracBrowser for help on using the repository browser.