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
Timothy B. Terriberry
43e9406201
Change ec_{enc|dec}_bit_prob to take probabilities in units of 1/65536 instead of 1/256. This allows them to use a single 16x16->32 multiply instead of a 24x8->32 multiply. Also change the time-frequency resolution flag coding to ensure that "0" is always the most-probable symbol (i.e., that prob("1")<50%), as that's where all the rounding error accumulates.
2010-05-29 23:45:28 -04:00
Timothy B. Terriberry
299747ee24
Provide direct implementations ec_{enc|dec}_bit_prob() that do not require a division instead of using the normal entropy coder path. This should be exactly equivalent to the existing code.
2010-05-29 23:45:18 -04:00
Jean-Marc Valin
8b2ff0da5a
Updated copyright notices
2009-10-17 21:40:10 -04:00
Jean-Marc Valin
949a29bf0c
Raw bits encoding/decoding functions renamed to *_raw() and re-introducing
...
original ec_encode_bin()/ec_decode_bin() to optimize performance when ft is
a power of two.
2009-07-25 20:16:01 -04: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
Timothy B. Terriberry
8d940a664e
Change end-of-stream handling in the range coder.
...
Instead of trying to maximize the number of trailing zeros (minimize the number
of bits encoded), we try to maximize the number of trailing bits that can
contain arbitrary data.
Note that this requires ec_enc_tell() and ec_dec_tell() to reserve an extra
bit, since depending on the exact final codeword, as little as half the final
range might be available for storing arbitrary data.
This is the first step needed to start packing literal bits outside the range
coder (for speed and robustness purposes).
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
Timothy B.B Terriberry
d77f61ac22
Fixes some issues in the MF range coder on systems were ints are 16 bits.
2008-10-19 20:01:34 -04:00
Jean-Marc Valin
821945d97c
Defining IMUL32 for 32x32=>32 int multiplications and using it in the range
...
coder
2008-04-10 13:24:48 +10:00
Jean-Marc Valin
fd8fda9937
Making a few functions static inline
2008-03-27 09:00:37 +11:00
Jean-Marc Valin
c2decd39a6
Made a second version of ec_{en|de}code optimised for encoding bits (no div
...
required) and using it in ec_{en|de}c_bits()
2008-03-22 22:58:45 +11:00
Jean-Marc Valin
71a84590e7
Removed unnecessary header inclusions
2008-03-14 11:09:50 +11:00
Jean-Marc Valin
7a455d4ef5
Another 16-bit fix.
2008-02-26 23:59:54 +11:00
Jean-Marc Valin
02fa913c32
More C89 fixes, making sure to include config.h from all source files.
2008-02-20 12:09:29 +11:00
Timothy B. Terriberry
c5eba7b3ec
Don't flush the last buffered symbol if it is zero.
...
When rng starts out 0x80000000, this can cause an extra zero byte to be written
to the stream.
2008-02-19 20:54:55 +11:00
Timothy B. Terriberry
6c87ba6c1b
Fix flushing the final byte in the face of nothing but carry propagation.
2008-02-19 20:54:49 +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