[jbig2-dev] Greetings from the ex-editor of JBIG2

Raph Levien raph@casper.ghostscript.com
Mon, 3 Jun 2002 22:40:51 -0700


On Mon, Jun 03, 2002 at 05:38:46PM -0700, William Rucklidge wrote:
> I ran across this list a few days ago while doing a search, and I'm very
> pleased that someone is implementing a JBIG2 decoder.  I presume this is
> because JBIG2 is included in the latest PDF spec?

Yes, that's the immediate motivation.

> Let me introduce myself: I was the editor of JBIG2; I wrote most of the
> specification text, and designed a large fraction of the standard.  I've
> implemented a JBIG2 decoder and encoder (at a previous job, so I no longer
> have access to the code).  I'd be happy to discuss anything related to the
> standard, implementation, and so on.

Great, welcome!

We are currently a bit stuck. We can decode the ubc generic streams
without difficulty, but on the ones with symbol dictionaries we fail
partway through (typically a couple of hundred symbols in). It's very
difficult to tell at what level the problem lies. It could be the
arithmetic coder, the stats, the context logic, or the higher-level
syntax for the symbol dict segment. It's not a gross error, or we
wouldn't be able to get through the first couple hundred symbols.

What would help _enormously_ is some source of trace data from a
known-good implementation. That would help us isolate exactly where
our implementation starts to diverge. I'm not sure if there is any
reaonable way to obtain such trace data - we asked the ubc team, but
our email was ignored.

Failing that, we have a couple of ideas. For one, the MMR/Huffman
variants are probably easier to debug than the arithmetic ones. We
have a partial MMR implementation. Another possibility is to do
black-box testing with an existing coder, directed toward finding the
edge of what works and what fails. Perhaps simply working with smaller
symbol dicts would be instructive.

In any case, thanks for stopping by.

Raph