range coder
- From: avtomatkalashnikov@xxxxxxx
- Date: 9 Oct 2005 02:13:14 -0700
hi all!
i'm fiddling around to implement a range coder as a backend to an acb
style modeller (for education purposes). somehow i reinvented "acb" :D
the range coders i've seen so far look like a low precision arithmetic
(mentioned in some paper, by moffat, i think, can't remember it) coder
with normalization in octets.
my problem is, when i use 32 bit arithmetic for calculations, i lose
too much precision to enable decoding. for example during normalisation
m. schindler's implementation saves the first 8 bits starting at bit 23
of the low register (he uses bit 31 to handle the underflow digit
detection), so we got 8 more bits, which are shifted in to gain
precision. i wanted my implementation to act more like the "classic"
describtion of arithmetic coding: if the first digit (when i say digit,
i mean an octet) doesn't match and the second one in high and low are
looking like an underflow occuring, discard the second significant
digit and use a counter to keep track of the underflow digits. but this
approce doesn't work!
an example:
high = 20 00 10 00
low = 1F FF FF FF
so range is:
range = 10 01
basically range is a 16 bit number, so if i store the cumulative
probabilities as 14 bit integers, the result of
range = range / totals
is a 2 bit integer, which seems to be too less to achieve enough
precision for decoding. but i wanted my frequencies to be represented
by more than 14 bits...
some papers about rangecoders say, we can use more bits for frequencie
counts, is this really true, looking at the example above.
and something, which was always a thorn in my side: why does a range
coder reserve extra code space for the last symbol of the cumulative
probabilieties?!
did i got anything wrong about range coding?
any suggestions would be helpful.
a link to the original paper about rangecoding and the paper about low
precision arithmetic encodng would also be nice.
by the way, cr88192, if you read this, are u german?
greets
.
- Follow-Ups:
- Re: range coder
- From: Matt Mahoney
- Re: range coder
- From: cr88192
- Re: range coder
- Prev by Date: Re: Looking for gzip source under dotnet
- Next by Date: Re: 'Einsteins Standing Wave Ratio Wins Windows Fractal Operating System Squared/Cubed ¥ '
- Previous by thread: OT: decision vector/cube
- Next by thread: Re: range coder
- Index(es):
Relevant Pages
|