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


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:23