1 | |
---|
2 | |
---|
3 | /** \file TDecSlice.cpp |
---|
4 | \brief slice decoder class |
---|
5 | */ |
---|
6 | |
---|
7 | #include "TDecSlice.h" |
---|
8 | |
---|
9 | ////////////////////////////////////////////////////////////////////// |
---|
10 | // Construction/Destruction |
---|
11 | ////////////////////////////////////////////////////////////////////// |
---|
12 | |
---|
13 | TDecSlice::TDecSlice() |
---|
14 | { |
---|
15 | } |
---|
16 | |
---|
17 | TDecSlice::~TDecSlice() |
---|
18 | { |
---|
19 | } |
---|
20 | |
---|
21 | Void TDecSlice::create( TComSlice* pcSlice, Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth ) |
---|
22 | { |
---|
23 | } |
---|
24 | |
---|
25 | Void TDecSlice::destroy() |
---|
26 | { |
---|
27 | } |
---|
28 | |
---|
29 | Void TDecSlice::init(TDecEntropy* pcEntropyDecoder, TDecCu* pcCuDecoder) |
---|
30 | { |
---|
31 | m_pcEntropyDecoder = pcEntropyDecoder; |
---|
32 | m_pcCuDecoder = pcCuDecoder; |
---|
33 | } |
---|
34 | |
---|
35 | Void 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 | } |
---|