Refactor the entropy coder.
authorTimothy B. Terriberry <tterribe@xiph.org>
Thu, 3 Feb 2011 22:22:15 +0000 (14:22 -0800)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Fri, 4 Feb 2011 02:48:52 +0000 (21:48 -0500)
commita093f4df740b7680443e938775b4db2b0fa24844
tree439682b2f4009e3438095cf7f4d7a932edacd4c9
parentef986e44211bc0fd3820700b61e552828a0d8c65
Refactor the entropy coder.

This unifies the byte buffer, encoder, and decoder into a single
 struct.
The common encoder and decoder functions (such as ec_tell()) can
 operate on either one, simplifying code which uses both.
The precision argument to ec_tell() has been removed.
It now comes in two precisions:
  ec_tell() gives 1 bit precision in two operations, and
  ec_tell_frac() gives 1/8th bit precision in... somewhat more.
ec_{enc|dec}_bit_prob() were removed (they are no longer needed).
Some of the byte buffer access functions were made static and
 removed from the cross-module API.
All of the code in rangeenc.c and rangedec.c was merged into
 entenc.c and entdec.c, respectively, as we are no longer
 considering alternative backends.
rangeenc.c and rangede.c have been removed entirely.

This passes make check, after disabling the modes that we removed
 support for in cf5d3a8c.
19 files changed:
libcelt/Makefile.am
libcelt/bands.c
libcelt/bands.h
libcelt/celt.c
libcelt/entcode.c
libcelt/entcode.h
libcelt/entdec.c
libcelt/entdec.h
libcelt/entenc.c
libcelt/entenc.h
libcelt/quant_bands.c
libcelt/rangedec.c [deleted file]
libcelt/rangeenc.c [deleted file]
libcelt/rate.c
libcelt/rate.h
tests/cwrs32-test.c
tests/ectest.c
tests/laplace-test.c
tests/tandem-test.c