Last change
on this file since 47 was
2,
checked in by hhi, 13 years ago
|
inital import
|
-
Property svn:eol-style set to
native
|
File size:
1.6 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | /** \file TEncBinCoderCABAC.h |
---|
4 | \brief binary entropy encoder of CABAC |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef __TENC_BIN_CODER_CABAC__ |
---|
8 | #define __TENC_BIN_CODER_CABAC__ |
---|
9 | |
---|
10 | #include "../TLibCommon/TComCABACTables.h" |
---|
11 | #include "TEncBinCoder.h" |
---|
12 | |
---|
13 | |
---|
14 | class TEncBinCABAC : public TEncBinIf |
---|
15 | { |
---|
16 | public: |
---|
17 | TEncBinCABAC (); |
---|
18 | virtual ~TEncBinCABAC(); |
---|
19 | |
---|
20 | Void init ( TComBitIf* pcTComBitIf ); |
---|
21 | Void uninit (); |
---|
22 | |
---|
23 | Void start (); |
---|
24 | Void finish (); |
---|
25 | Void copyState ( TEncBinIf* pcTEncBinIf ); |
---|
26 | |
---|
27 | Void resetBits (); |
---|
28 | UInt getNumWrittenBits (); |
---|
29 | |
---|
30 | Void encodeBin ( UInt uiBin, ContextModel& rcCtxModel ); |
---|
31 | Void encodeBinEP ( UInt uiBin ); |
---|
32 | Void encodeBinTrm ( UInt uiBin ); |
---|
33 | |
---|
34 | TEncBinCABAC* getTEncBinCABAC() { return this; } |
---|
35 | |
---|
36 | Void setBinsCoded ( UInt uiVal ) { m_uiBinsCoded = uiVal; } |
---|
37 | UInt getBinsCoded () { return m_uiBinsCoded; } |
---|
38 | Void setBinCountingEnableFlag ( Bool bFlag ) { m_bBinCountingEnabled = bFlag; } |
---|
39 | Bool getBinCountingEnableFlag () { return m_bBinCountingEnabled; } |
---|
40 | protected: |
---|
41 | Void xWriteBit ( UInt uiBit ); |
---|
42 | Void xWriteBitAndBitsToFollow( UInt uiBit ); |
---|
43 | |
---|
44 | private: |
---|
45 | TComBitIf* m_pcTComBitIf; |
---|
46 | UInt m_uiLow; |
---|
47 | UInt m_uiRange; |
---|
48 | UInt m_uiBitsToFollow; |
---|
49 | UInt m_uiByte; |
---|
50 | UInt m_uiBitsLeft; |
---|
51 | UInt m_uiBinsCoded; |
---|
52 | Bool m_bBinCountingEnabled; |
---|
53 | }; |
---|
54 | |
---|
55 | |
---|
56 | #endif |
---|
57 | |
---|
Note: See
TracBrowser for help on using the repository browser.