| 43 | class ArithmeticBitModel; |
| 44 | |
| 45 | class ArithmeticEncoder |
| 46 | { |
| 47 | public: |
| 48 | |
| 49 | /* Constructor & Destructor */ |
| 50 | ArithmeticEncoder(); |
| 51 | ~ArithmeticEncoder(); |
| 52 | |
| 53 | /* Manage encoding */ |
| 54 | BOOL init(ByteStreamOut* outstream); |
| 55 | void done(); |
| 56 | |
| 57 | /* Manage an entropy model for a single bit */ |
| 58 | ArithmeticBitModel* createBitModel(); |
| 59 | void initBitModel(ArithmeticBitModel* model); |
| 60 | void destroyBitModel(ArithmeticBitModel* model); |
| 61 | |
| 62 | /* Manage an entropy model for n symbols (table optional) */ |
| 63 | ArithmeticModel* createSymbolModel(U32 n); |
| 64 | void initSymbolModel(ArithmeticModel* model, U32 *table=0); |
| 65 | void destroySymbolModel(ArithmeticModel* model); |
| 66 | |
| 67 | /* Encode a bit with modelling */ |
| 68 | void encodeBit(ArithmeticBitModel* model, U32 sym); |
| 69 | |
| 70 | /* Encode a symbol with modelling */ |
| 71 | void encodeSymbol(ArithmeticModel* model, U32 sym); |
| 72 | |
| 73 | /* Encode a bit without modelling */ |
| 74 | void writeBit(U32 sym); |
| 75 | |
| 76 | /* Encode bits without modelling */ |
| 77 | void writeBits(U32 bits, U32 sym); |
| 78 | |
| 79 | /* Encode an unsigned char without modelling */ |
| 80 | void writeByte(U8 sym); |
| 81 | |
| 82 | /* Encode an unsigned short without modelling */ |
| 83 | void writeShort(U16 sym); |
| 84 | |
| 85 | /* Encode an unsigned int without modelling */ |
| 86 | void writeInt(U32 sym); |
| 87 | |
| 88 | /* Encode a float without modelling */ |
| 89 | void writeFloat(F32 sym); |
| 90 | |
| 91 | /* Encode an unsigned 64 bit int without modelling */ |
| 92 | void writeInt64(U64 sym); |
| 93 | |
| 94 | /* Encode a double without modelling */ |
| 95 | void writeDouble(F64 sym); |
| 96 | |
| 97 | /* Only write to outstream if ArithmeticEncoder is dummy */ |
| 98 | ByteStreamOut* getByteStreamOut() const { return outstream; }; |
| 99 | |
| 100 | private: |
| 101 | |
| 102 | ByteStreamOut* outstream; |
nothing calls this directly
no outgoing calls
no test coverage detected