Thrill
0.1
|
Definition at line 29 of file golomb_bit_stream.hpp.
#include <golomb_bit_stream.hpp>
Public Member Functions | |
GolombBitStreamWriter (BlockWriter &block_writer, const size_t &b) | |
GolombBitStreamWriter (const GolombBitStreamWriter &)=delete | |
non-copyable: delete copy-constructor More... | |
GolombBitStreamWriter (GolombBitStreamWriter &&)=default | |
move-constructor: default More... | |
~GolombBitStreamWriter () | |
GolombBitStreamWriter & | operator= (const GolombBitStreamWriter &)=delete |
non-copyable: delete assignment operator More... | |
GolombBitStreamWriter & | operator= (GolombBitStreamWriter &&)=default |
move-assignment operator: default More... | |
void | Put (size_t value) |
void | PutGolomb (const size_t &value) |
Append new Golomb-encoded value to bitset. More... | |
Public Member Functions inherited from BitStreamWriter< BlockWriter > | |
BitStreamWriter (BlockWriter &block_writer) | |
BitStreamWriter (const BitStreamWriter &)=delete | |
non-copyable: delete copy-constructor More... | |
BitStreamWriter (BitStreamWriter &&)=default | |
move-constructor: default More... | |
~BitStreamWriter () | |
void | FlushBits () |
Flush out buffered bits. More... | |
BitStreamWriter & | operator= (const BitStreamWriter &)=delete |
non-copyable: delete assignment operator More... | |
BitStreamWriter & | operator= (BitStreamWriter &&)=default |
move-assignment operator: default More... | |
void | PutBits (const size_t &value, unsigned bits) |
Append k bits to the data array. More... | |
Private Types | |
enum | : size_t { all_set = ~((size_t)0) } |
using | Super = BitStreamWriter< BlockWriter > |
Private Attributes | |
size_t | b_ |
Golomb code parameter. More... | |
bool | first_call_ = true |
false, when PutGolomb_in was called already More... | |
int | log2b_ |
ceil(log2(b_)) More... | |
size_t | max_little_value_ |
escape value More... | |
Additional Inherited Members | |
Protected Types inherited from BitStreamWriter< BlockWriter > | |
enum | : size_t { buffer_bits_ = sizeof(size_t) * 8 } |
number of bits in buffer_ More... | |
enum | : size_t { mask = buffer_bits_ - 1 } |
modulo mask of number of bits in buffer for pos_ counter More... | |
Protected Attributes inherited from BitStreamWriter< BlockWriter > | |
BlockWriter & | block_writer_ |
Output BlockWriter. More... | |
size_t | buffer_ = 0 |
current buffer of 32/64 bits More... | |
size_t | pos_ = 0 |
currently filled number of bits More... | |
|
private |
Definition at line 32 of file golomb_bit_stream.hpp.
|
private |
Enumerator | |
---|---|
all_set |
Definition at line 36 of file golomb_bit_stream.hpp.
|
inline |
Definition at line 39 of file golomb_bit_stream.hpp.
References die_unless, and GolombBitStreamWriter< BlockWriter >::operator=().
|
delete |
non-copyable: delete copy-constructor
|
default |
move-constructor: default
|
inline |
Definition at line 56 of file golomb_bit_stream.hpp.
References GolombBitStreamWriter< BlockWriter >::all_set, BitStreamWriter< BlockWriter >::buffer_bits_, BitStreamWriter< BlockWriter >::pos_, and BitStreamWriter< BlockWriter >::PutBits().
|
delete |
non-copyable: delete assignment operator
Referenced by GolombBitStreamReader< BlockReader >::GolombBitStreamReader(), and GolombBitStreamWriter< BlockWriter >::GolombBitStreamWriter().
|
default |
move-assignment operator: default
|
inline |
Definition at line 123 of file golomb_bit_stream.hpp.
References GolombBitStreamWriter< BlockWriter >::PutGolomb().
|
inline |
Append new Golomb-encoded value to bitset.
Definition at line 69 of file golomb_bit_stream.hpp.
References GolombBitStreamWriter< BlockWriter >::all_set, GolombBitStreamWriter< BlockWriter >::b_, BitStreamWriter< BlockWriter >::block_writer_, BitStreamWriter< BlockWriter >::buffer_bits_, GolombBitStreamWriter< BlockWriter >::first_call_, GolombBitStreamWriter< BlockWriter >::log2b_, GolombBitStreamWriter< BlockWriter >::max_little_value_, BitStreamWriter< BlockWriter >::PutBits(), and TLX_UNLIKELY.
Referenced by GolombBitStreamWriter< BlockWriter >::Put().
|
private |
Golomb code parameter.
Definition at line 129 of file golomb_bit_stream.hpp.
Referenced by GolombBitStreamReader< BlockReader >::GetGolomb(), and GolombBitStreamWriter< BlockWriter >::PutGolomb().
|
private |
false, when PutGolomb_in was called already
Definition at line 138 of file golomb_bit_stream.hpp.
Referenced by GolombBitStreamReader< BlockReader >::GetGolomb(), GolombBitStreamReader< BlockReader >::HasNext(), and GolombBitStreamWriter< BlockWriter >::PutGolomb().
|
private |
ceil(log2(b_))
Definition at line 132 of file golomb_bit_stream.hpp.
Referenced by GolombBitStreamReader< BlockReader >::GetGolomb(), and GolombBitStreamWriter< BlockWriter >::PutGolomb().
|
private |
escape value
Definition at line 135 of file golomb_bit_stream.hpp.
Referenced by GolombBitStreamReader< BlockReader >::GetGolomb(), and GolombBitStreamWriter< BlockWriter >::PutGolomb().