entropyencoder.hpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: entropyencoder.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_ENCODER_H
31 #define ENTROPY_ENCODER_H
32 
33 #include "mydefs.hpp"
34 #include "bytestreamout.hpp"
35 
36 class EntropyModel;
37 
39 {
40 public:
41 
42 /* Destructor */
43  virtual ~EntropyEncoder() {};
44 
45 /* Manage decoding */
46  virtual BOOL init(ByteStreamOut* outstream) = 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 /* Encode a bit with modelling */
60  virtual void encodeBit(EntropyModel* model, U32 bit)=0;
61 
62 /* Encode a symbol with modelling */
63  virtual void encodeSymbol(EntropyModel* model, U32 sym)=0;
64 
65 /* Encode a bit without modelling */
66  virtual void writeBit(U32 sym)=0;
67 
68 /* Encode bits without modelling */
69  virtual void writeBits(U32 bits, U32 sym)=0;
70 
71 /* Encode an unsigned char without modelling */
72  virtual void writeByte(U8 sym)=0;
73 
74 /* Encode an unsigned short without modelling */
75  virtual void writeShort(U16 sym)=0;
76 
77 /* Encode an unsigned int without modelling */
78  virtual void writeInt(U32 sym)=0;
79 
80 /* Encode a float without modelling */
81  virtual void writeFloat(F32 sym)=0;
82 
83 /* Encode an unsigned 64 bit int without modelling */
84  virtual void writeInt64(U64 sym)=0;
85 
86 /* Encode a double without modelling */
87  virtual void writeDouble(F64 sym)=0;
88 };
89 
90 #endif
EntropyEncoder::initSymbolModel
virtual void initSymbolModel(EntropyModel *model, U32 *init=0)=0
EntropyEncoder::initBitModel
virtual void initBitModel(EntropyModel *model)=0
EntropyEncoder::writeByte
virtual void writeByte(U8 sym)=0
EntropyEncoder::destroyBitModel
virtual void destroyBitModel(EntropyModel *model)=0
F64
double F64
Definition: mydefs.hpp:52
EntropyEncoder::encodeSymbol
virtual void encodeSymbol(EntropyModel *model, U32 sym)=0
EntropyEncoder::writeInt
virtual void writeInt(U32 sym)=0
EntropyEncoder::destroySymbolModel
virtual void destroySymbolModel(EntropyModel *model)=0
EntropyEncoder::writeDouble
virtual void writeDouble(F64 sym)=0
EntropyEncoder::createBitModel
virtual EntropyModel * createBitModel()=0
EntropyEncoder::encodeBit
virtual void encodeBit(EntropyModel *model, U32 bit)=0
EntropyEncoder::createSymbolModel
virtual EntropyModel * createSymbolModel(U32 n)=0
EntropyEncoder::writeInt64
virtual void writeInt64(U64 sym)=0
EntropyEncoder::writeShort
virtual void writeShort(U16 sym)=0
ByteStreamOut
Definition: bytestreamout.hpp:36
EntropyEncoder::done
virtual void done()=0
mydefs.hpp
bytestreamout.hpp
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
EntropyEncoder::writeBits
virtual void writeBits(U32 bits, U32 sym)=0
F32
float F32
Definition: mydefs.hpp:51
EntropyEncoder::writeBit
virtual void writeBit(U32 sym)=0
U32
unsigned int U32
Definition: mydefs.hpp:39
EntropyEncoder
Definition: entropyencoder.hpp:38
EntropyEncoder::writeFloat
virtual void writeFloat(F32 sym)=0
EntropyEncoder::init
virtual BOOL init(ByteStreamOut *outstream)=0
EntropyEncoder::~EntropyEncoder
virtual ~EntropyEncoder()
Definition: entropyencoder.hpp:43


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