16-bit int fixes.
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 commit is contained in:
parent
b570f1a910
commit
285bc372ca
5 changed files with 17 additions and 16 deletions
|
@ -41,14 +41,15 @@
|
|||
|
||||
typedef celt_int32 ec_int32;
|
||||
typedef celt_uint32 ec_uint32;
|
||||
typedef size_t ec_window;
|
||||
typedef celt_uint32 ec_window;
|
||||
typedef struct ec_ctx ec_ctx;
|
||||
typedef struct ec_ctx ec_enc;
|
||||
typedef struct ec_ctx ec_dec;
|
||||
|
||||
|
||||
|
||||
/*This must be at least 32 bits.*/
|
||||
/*OPT: This must be at least 32 bits, but if you have fast arithmetic on a
|
||||
larger type, you can speed up the decoder by using it for ec_window.*/
|
||||
# define EC_WINDOW_SIZE ((int)sizeof(ec_window)*CHAR_BIT)
|
||||
|
||||
/*The number of bits to use for the range-coded part of unsigned integers.*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue