For Programmers: Free Programming Magazines  


Home > Archive > Compression > January 2006 > arithmetic coding in JPEG-LS









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author arithmetic coding in JPEG-LS
Michael Schöberl

2006-01-11, 6:55 pm

Can anyone help me with Annex A in part2 of JPEG-LS?

I'm trying to understand the arithmetic coding
extension of JPEG-lS and how to derive the binary
context S.


my problem is somewhere in A.5.2 and Figure A.17
where do I start in the code-tree?
what is the function GetBinaryContext()?
is the binary context different from MErrval?


are there any examples?
or papers pointing to details about that?



bye,
Michael
Ignorant

2006-01-15, 7:55 am

Bad luck.
Contact Dr. Paul Howard of AT &T to get the email
of the original contibuter of the binary context model
used in Lossless JBIG.
He had sent me a spreadsheet file with the step
values ..but that was a long time back. The model
has some intrinsic tweaking which "just works". If
you have a lot of brain cells to exercise you may
ponder over the ELS CODEC which also has a similar
binary step coder. I could understand the codec but not the underlying
model.

Michael Schöberl

2006-01-18, 6:56 pm

> Contact Dr. Paul Howard of AT &T to get the email
> of the original contibuter of the binary context model
> used in Lossless JBIG.


I read JBIG2 over and over again and could not find
any similarity that would help me ...
JBIG has a 10 pixel context and the (binary) values
of these pixels are taken as they are and treated as
an integer-value. This value is used as context and
the coding probabilities are trained on that ...

> [...] If
> you have a lot of brain cells to exercise you may
> ponder over the ELS CODEC which also has a similar
> binary step coder.


There is hardly and reference on the net and some
French homepages (but I don't speak French) ...
Do you have a link to that codec?


luckily my problem is solved by now (see the
other posting)


bye,
Michael
Michael Schöberl

2006-01-18, 6:56 pm

> I'm trying to understand the arithmetic coding
> extension of JPEG-lS and how to derive the binary
> context S.


I think I found out how to read these tree diagrams.
Just in case someone is interested (for qbpp=10) ...


The binary context trees produce the same bits as the
regular golomb code but they deliver an aditional
"binary context S" for each bit.

The jump from one line to the next occurs if the unary
representation would have more than 8 1s. This increases
k by one and reduces the value that is still to be encoded
unary.

Each single node in the tree has its unique index which
is used as binary context S.
A binary context S can be calculated from
- the current value k [0...10]
- the current position in the row between [0...7]
- the position in the subtree [1...2^k-1]


The idea is quite nice as the untrained arithmetic coder
can assume a probability of 50% for each bit (producing
as many bits as the golomb-rice coder) ... in case there
is any accumulation of 0s for a context the ac can learn
and improve ...



For the AC there is another problem with the documentation:
In B.1.2.6 the Termination of the encoding is described as
"After encoding all the binary decisions, the encoder outputs
four bytes of Buf[1], Buf[0] and Creg."
This is wrong as this can't be decoded by the default procedure.

BUT: the procedure from Figure B.5 can be applied 4 times in
a row (without checking for Areg < 0x100) ...
this outputs Buf[1] and Buf[0] and 2 *modified* bytes from Creg


bye,
Michael
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com