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:
972 bytes
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | /** \file TComBitcounter.h |
---|
4 | \brief class for counting bits (header) |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef __COMBITCOUNTER__ |
---|
8 | #define __COMBITCOUNTER__ |
---|
9 | |
---|
10 | #if _MSC_VER > 1000 |
---|
11 | #pragma once |
---|
12 | #endif // _MSC_VER > 1000 |
---|
13 | |
---|
14 | #include "TComBitStream.h" |
---|
15 | |
---|
16 | // ==================================================================================================================== |
---|
17 | // Class definition |
---|
18 | // ==================================================================================================================== |
---|
19 | |
---|
20 | /// class for counting bits |
---|
21 | class TComBitCounter : public TComBitIf |
---|
22 | { |
---|
23 | protected: |
---|
24 | UInt m_uiBitCounter; |
---|
25 | |
---|
26 | public: |
---|
27 | TComBitCounter() {} |
---|
28 | virtual ~TComBitCounter() {} |
---|
29 | |
---|
30 | Void write ( UInt uiBits, UInt uiNumberOfBits ) { m_uiBitCounter += uiNumberOfBits; } |
---|
31 | Void resetBits () { m_uiBitCounter = 0; } |
---|
32 | UInt getNumberOfWrittenBits() const { return m_uiBitCounter; } |
---|
33 | }; |
---|
34 | |
---|
35 | #endif |
---|
36 | |
---|
Note: See
TracBrowser for help on using the repository browser.