Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/celt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy B. Terriberry <tterribe@xiph.org>2011-02-07 00:29:00 +0300
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2011-02-07 01:32:58 +0300
commit285bc372cadfc6876b7f4942318e312665729156 (patch)
tree79c41cdfb75ddc856ac6609cc9ad4d86980f2160 /libcelt/entcode.h
parentb570f1a91053c3633fff047134279719d9039c0b (diff)
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.
Diffstat (limited to 'libcelt/entcode.h')
-rw-r--r--libcelt/entcode.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libcelt/entcode.h b/libcelt/entcode.h
index e62a78e..a498d4c 100644
--- a/libcelt/entcode.h
+++ b/libcelt/entcode.h
@@ -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.*/