JPEG-LS: decoder issues

I’ve recently written a very baseline JPEG-LS decoder (grayscale lossless only) and had to deal with some issues, some of them listed in JPEG-LS standard (ISO 14495, ITU T.87), some are not:

  • Bitstream is escape-coded (after each byte 0xFF another zero-bit must be stuffed to avoid false JPEG markers detection). That requires special bitstream reader or another unescaped buffer.
  • There is no definite way to reverse error-mapping of run termination symbol. Even the reference code use another technique.
  • A lot of different modes (different bpps, pallettised images, two interleaving modes)

For now, lossless and near-lossless decoding is OK, plane and line interleaving are supported. With working decoder it will be simplier to write JPEG-LS encoder.

As I recently discovered, there is also ISO/IEC 14495-2 (or ITU T.870) standard – JPEG-LS extensions. For unknown reason ITU don’t send me another 3 free recs ID, yet I’ve managed to find some draft of this standard. Main changes: new mode – visual quantisation, new coding schemes – modified Golomb codes and arithmetic coding. I’m not sure if somebody support this anyway.

February: now grayscale/colour lossless/near-lossless JPEG-LS encoder and decoder are working (or simulate working well enough).

5 Responses to “JPEG-LS: decoder issues”

  1. Catherine says:

    I’v recently written JPEG-LS too. Now I have working model, which is MATLAB -implemented. I had to deal whith ISO/IEC 14495-1:1997.
    I have some problems too – for example, I don’t understand, while the variable C has bounds from -128 to128 for all bpps. I am interested in pbps 10 and 12 and I think that thise bounds of C are only for 8 bpps.
    Also I dont know how I must test my algorithm. You know – there are a lot of branches of algorithm and it’s some difficulty to test all of them. It’s will be very useful for me (may be for you) discuss some problem – I send letter for you by e-mail.
    Exuce me for my poor english, please.

  2. webb says:

    Recently I am doing some image lossless compression work and have to refer to the ISO/IEC 14495-1(ITU-81).
    I have looked for it on the internet for a long time but cann’t find a free one.
    If you have this standard, could u send it to wuswcn@yahoo.com.cn

    Thank u in advance!
    Webb

  3. Jan de Vaan says:

    I know this was written three years ago…

    If you’re interested I have a fairly complete open source JPEG-LS implementation at the URL above.

    Thanks for the tip about the updated version of the standard. I’ll have a look.

    Jan

  4. Sebastian says:

    Hello.
    Maybe I could have a look at your source code? 🙂
    Would be so nice. 🙂

  5. Tani says:

    Hello
    Is it possible to have your standard JPEG-LS source code? i would be happy to send it for me to my e-mail: nrasuly@yahoo.com