Commit graph

16 commits

Author SHA1 Message Date
Timothy B. Terriberry
8fcde379ec Clean up some type usage.
ec_byte_read() ec_byte_read_from_end() had different return types.
ec_dec_bits() was storing its return value as int instead of
 ec_uint32, which will break if int is only 16 bits.
2010-12-23 14:33:32 -05:00
Timothy B. Terriberry
30df6cf3f8 Entropy coder clean-up.
This simplifies a good bit of the error handling, and should make it
 impossible to overrun the buffer in the encoder or decoder, while
 still allowing tell() to operate correctly after a bust.
The encoder now tries to keep the range coder data intact after a
 bust instead of corrupting it with extra bits data, though this is
 not a guarantee (too many extra bits may have already been flushed).
It also now correctly reports errors when the bust occurs merging the
 last byte of range coder and extra bits.

A number of abstraction barrier violations were cleaned up, as well.
This patch also includes a number of minor performance improvements:
 ec_{enc|dec}_bits() in particular should be much faster.

Finally, tf_select was changed to be coded with the range coder
 rather than extra bits, so that it is at the front of the packet
 (for unequal error protection robustness).
2010-12-21 14:23:45 -05:00
Jean-Marc Valin
531f2ae7e3 Remove useless use of "long", remove useless prototypes 2010-08-02 09:01:28 -04:00
Jean-Marc Valin
9d785afb67 Encoder now has a way to check whether an error has occurred 2010-07-18 09:42:05 -04:00
Jean-Marc Valin
789fc14163 Removing unused code in the entropy coder 2009-10-23 21:44:54 -04:00
Jean-Marc Valin
8b2ff0da5a Updated copyright notices 2009-10-17 21:40:10 -04:00
Jean-Marc Valin
30f7f813ea Changed all the celt*int*_t types to remove the _t suffix, which is reserved
by POSIX. The other _t types that are not part of the API are still there
for now. Also, got rid of all that was left of the 64-bit types.
2009-10-17 14:35:13 -04:00
Jean-Marc Valin
e610864c74 This fixes a VBR bug introduced by raw bits. We should not write any raw
bit before the rate is decided (otherwise they'll end up at the wrong place)
and we have to shrink the byte buffer before writing raw bits.
2009-08-01 23:05:47 +02:00
Jean-Marc Valin
c08be4485b Implemented "raw bits"
Making it so all the information encoded directly with ec_enc_bits() gets
stored at the end of the stream, without going through the range coder. This
should be both faster and reduce the effects of bit errors.

Conflicts:

	tests/ectest.c
2009-07-23 07:33:24 -04:00
Gregory Maxwell
f40bbf751d Include missing copyright information in various files, for signoff.
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
2009-02-03 23:08:31 -05:00
Jean-Marc Valin
761811d91b re-enable support for resizable buffers in the range coder 2008-10-18 09:11:05 -04:00
Jean-Marc Valin
8679a80ee2 Encoder now writes data directly in the user buffer 2008-10-18 07:44:35 -04:00
Jean-Marc Valin
fd8fda9937 Making a few functions static inline 2008-03-27 09:00:37 +11:00
Jean-Marc Valin
508de38d22 Trying to be nice with 16-bit chips. 2008-02-26 10:28:20 +11:00
Jean-Marc Valin
abe043f0a1 Moving everything to the same type abstraction (sort of). 2008-01-31 14:26:29 +11:00
Jean-Marc Valin
6238bc0ece Moved the content of libentcode into libcelt to reduce dependencies,
especially now that we have a custom version of that code anyway. Moved
the test code to tests/
2008-01-28 22:28:54 +11:00
Renamed from libentcode/entcode.h (Browse further)