arithmeticdecoder.hpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: arithmeticdecoder.hpp
5 
6  CONTENTS:
7 
8  A modular C++ wrapper for an adapted version of Amir Said's FastAC Code.
9  see: http://www.cipr.rpi.edu/~said/FastAC.html
10 
11  PROGRAMMERS:
12 
13  martin.isenburg@gmail.com
14 
15  COPYRIGHT:
16 
17  (c) 2009-2011, Martin Isenburg, LASSO - tools to catch reality
18 
19  This is free software; you can redistribute and/or modify it under the
20  terms of the GNU Lesser General Licence as published by the Free Software
21  Foundation. See the COPYING file for more information.
22 
23  This software is distributed WITHOUT ANY WARRANTY and without even the
24  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25 
26  CHANGE HISTORY:
27 
28  10 January 2011 -- licensing change for LGPL release and liblas integration
29  8 December 2010 -- unified framework for all entropy coders
30  30 October 2009 -- refactoring Amir Said's FastAC code
31 
32 ===============================================================================
33 */
34 #ifndef ARITHMETIC_DECODER_H
35 #define ARITHMETIC_DECODER_H
36 
37 #include "entropydecoder.hpp"
38 
40 {
41 public:
42 
43 /* Constructor & Destructor */
46 
47 /* Manage decoding */
49  void done();
50 
51 /* Manage an entropy model for a single bit */
52  EntropyModel* createBitModel();
53  void initBitModel(EntropyModel* model);
54  void destroyBitModel(EntropyModel* model);
55 
56 /* Manage an entropy model for n symbols (table optional) */
57  EntropyModel* createSymbolModel(U32 n);
58  void initSymbolModel(EntropyModel* model, U32* table=0);
59  void destroySymbolModel(EntropyModel* model);
60 
61 /* Decode a bit with modelling */
62  U32 decodeBit(EntropyModel* model);
63 
64 /* Decode a symbol with modelling */
65  U32 decodeSymbol(EntropyModel* model);
66 
67 /* Decode a bit without modelling */
68  U32 readBit();
69 
70 /* Decode bits without modelling */
71  U32 readBits(U32 bits);
72 
73 /* Decode an unsigned char without modelling */
74  U8 readByte();
75 
76 /* Decode an unsigned short without modelling */
77  U16 readShort();
78 
79 /* Decode an unsigned int without modelling */
80  U32 readInt();
81 
82 /* Decode a float without modelling */
83  F32 readFloat();
84 
85 /* Decode an unsigned 64 bit int without modelling */
86  U64 readInt64();
87 
88 /* Decode a double without modelling */
89  F64 readDouble();
90 
91 private:
92 
94 
95  void renorm_dec_interval();
97 };
98 
99 #endif
int BOOL
Definition: mydefs.hpp:57
BOOL init(ByteStreamIn *instream)
float F32
Definition: mydefs.hpp:51
unsigned int U32
Definition: mydefs.hpp:39
void destroySymbolModel(EntropyModel *model)
ByteStreamIn * instream
void initSymbolModel(EntropyModel *model, U32 *table=0)
EntropyModel * createSymbolModel(U32 n)
unsigned short U16
Definition: mydefs.hpp:40
void destroyBitModel(EntropyModel *model)
unsigned char U8
Definition: mydefs.hpp:41
EntropyModel * createBitModel()
void initBitModel(EntropyModel *model)
U32 decodeSymbol(EntropyModel *model)
U32 decodeBit(EntropyModel *model)
unsigned long long U64
Definition: mydefs.hpp:47
double F64
Definition: mydefs.hpp:52


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:06