diff options
author | Timothy B. Terriberry <tterribe@xiph.org> | 2010-05-30 06:47:37 +0400 |
---|---|---|
committer | Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> | 2010-05-30 07:45:18 +0400 |
commit | 299747ee24851f2f20a8a466a3a5b58f1b116768 (patch) | |
tree | 4994d7b4972ff6b1de58d771400e977006c03b40 /libcelt/entenc.c | |
parent | 8cc945c53af7fbc42864d76550e429583f6e33b5 (diff) |
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.
Diffstat (limited to 'libcelt/entenc.c')
-rw-r--r-- | libcelt/entenc.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/libcelt/entenc.c b/libcelt/entenc.c index 44353f5..4594daa 100644 --- a/libcelt/entenc.c +++ b/libcelt/entenc.c @@ -100,15 +100,3 @@ void ec_enc_uint(ec_enc *_this,ec_uint32 _fl,ec_uint32 _ft){ ec_encode(_this,_fl,_fl+1,_ft+1); } } - -/* The probability of having a "one" is given in 1/256 */ -void ec_enc_bit_prob(ec_enc *_this,int val,int _prob) -{ - int fl=0, fh=256-_prob; - if (val) - { - fl=fh; - fh=256; - } - ec_encode_bin(_this,fl,fh,8); -} |