These were used because the entropy coder originally came from
outside libcelt, and thus did not have a common type system.
It's now undergone enough modification that it's not ever likely to
be used as-is in another codec without some porting effort, so
there's no real reason to maintain the typedefs separately.
Hopefully we'll replace these all again somedate with a common set
of Opus typedefs, but for now this will do.
This fixes an issue caused by commit 6c8acbf1, which moved the
ec_ilog() prototype from entcode.h to ecintrin.h, where the
ec_uint32 typedef was not yet available.
Thanks to John Ridges for the report.
We were trying to normalize bands that didn't actually exist (e.g.,
the last band with 320-sample frames at 32kHz).
Thanks to John Ridges for the report.
This fixes a number of issues for platforms with a 16-bit int, but
by no means all of them.
The type change for ec_window (for platforms where sizeof(size_t)==2)
will break ABI (but not API) compatibility with libsilk and libopus,
and reduce speed on x86-64, but allows the code to work in real-mode
DOS without using the huge memory model, which is useful for testing
16-bit int compliance.
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.
This stores the caps array in 32nd bits/sample instead of 1/2 bits
scaled by LM and the channel count, which is slightly less
less accurate for the last two bands, and much more accurate for
all the other bands.
A constant offset is subtracted to allow it to represent values
larger than 255 in 8 bits (the range of unoffset values is
77...304).
In addition, this replaces the last modeline in the allocation table
with the caps array, allowing the initial interpolation to
allocate 8 bits/sample or more, which was otherwise impossible.