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
ArithmeticDecoder::readBits
U32 readBits(U32 bits)
Definition: arithmeticdecoder.cpp:218
ArithmeticDecoder::length
U32 length
Definition: arithmeticdecoder.hpp:96
ArithmeticDecoder::initSymbolModel
void initSymbolModel(EntropyModel *model, U32 *table=0)
Definition: arithmeticdecoder.cpp:123
ArithmeticDecoder::init
BOOL init(ByteStreamIn *instream)
Definition: arithmeticdecoder.cpp:82
ArithmeticDecoder::base
U32 base
Definition: arithmeticdecoder.hpp:96
ArithmeticDecoder::~ArithmeticDecoder
~ArithmeticDecoder()
Definition: arithmeticdecoder.cpp:290
F64
double F64
Definition: mydefs.hpp:52
ArithmeticDecoder::readDouble
F64 readDouble()
Definition: arithmeticdecoder.cpp:283
ArithmeticDecoder::done
void done()
Definition: arithmeticdecoder.cpp:94
EntropyDecoder
Definition: entropydecoder.hpp:38
ArithmeticDecoder::value
U32 value
Definition: arithmeticdecoder.hpp:96
ArithmeticDecoder::readInt
U32 readInt()
Definition: arithmeticdecoder.cpp:262
ArithmeticDecoder::renorm_dec_interval
void renorm_dec_interval()
Definition: arithmeticdecoder.cpp:295
ArithmeticDecoder::readShort
U16 readShort()
Definition: arithmeticdecoder.cpp:250
ArithmeticDecoder::ArithmeticDecoder
ArithmeticDecoder()
Definition: arithmeticdecoder.cpp:77
ArithmeticDecoder
Definition: arithmeticdecoder.hpp:39
ArithmeticDecoder::destroySymbolModel
void destroySymbolModel(EntropyModel *model)
Definition: arithmeticdecoder.cpp:129
ArithmeticDecoder::instream
ByteStreamIn * instream
Definition: arithmeticdecoder.hpp:93
ArithmeticDecoder::initBitModel
void initBitModel(EntropyModel *model)
Definition: arithmeticdecoder.cpp:105
ArithmeticDecoder::createSymbolModel
EntropyModel * createSymbolModel(U32 n)
Definition: arithmeticdecoder.cpp:117
ArithmeticDecoder::readByte
U8 readByte()
Definition: arithmeticdecoder.cpp:238
ArithmeticDecoder::createBitModel
EntropyModel * createBitModel()
Definition: arithmeticdecoder.cpp:99
ArithmeticDecoder::destroyBitModel
void destroyBitModel(EntropyModel *model)
Definition: arithmeticdecoder.cpp:111
ArithmeticDecoder::readInt64
U64 readInt64()
Definition: arithmeticdecoder.cpp:276
ByteStreamIn
Definition: bytestreamin.hpp:36
U16
unsigned short U16
Definition: mydefs.hpp:40
U8
unsigned char U8
Definition: mydefs.hpp:41
BOOL
int BOOL
Definition: mydefs.hpp:57
U64
unsigned long long U64
Definition: mydefs.hpp:47
F32
float F32
Definition: mydefs.hpp:51
ArithmeticDecoder::readFloat
F32 readFloat()
Definition: arithmeticdecoder.cpp:269
ArithmeticDecoder::decodeSymbol
U32 decodeSymbol(EntropyModel *model)
Definition: arithmeticdecoder.cpp:156
U32
unsigned int U32
Definition: mydefs.hpp:39
ArithmeticDecoder::decodeBit
U32 decodeBit(EntropyModel *model)
Definition: arithmeticdecoder.cpp:135
entropydecoder.hpp
ArithmeticDecoder::readBit
U32 readBit()
Definition: arithmeticdecoder.cpp:208


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 Wed Mar 2 2022 00:37:22