1
votes

I have a question regarding specific processes in JPEG: processes marked with SOF0 - SOF3 are defined by standard as

Nondifferential Huffman coding frames

what does it mean? For example, SOF7 is defined as differential lossless with Huffman coding, and - as far as I know - it is just differential coding preceding Huffman coding, as defined in ITU-T.81 recommendation. Does it mean that SOF3 is just Huffman coding from ITU-T.81 alone? (without previous differential coding?) It does not make any sense to me.

My question is connected with the DICOM standard - as I see, files with Transfer Syntax

JPEG Lossless, Nonhierarchical, First- Order Prediction

use SOF3 JPEG process - I see big inconsitency here: the Transfer Syntax clearly states that first-order predition shall be used, while definition of SOF3 process states that this is nondifferential process (no value predicting then?). What is going on here?

2
Maybe you should ask this on Programmers SE?Vahid Amiri
@VSG24 when referring other sites, it is often helpful to point that cross-posting is frowned upongnat

2 Answers

1
votes

The JPEG standard is bizarre. Imagine a bunch of academics getting together and each promoting his own research project. Instead of one compression method, JPEG ends up with several, only 2 of which are used:

SOF0 and SOF1 Baseline and extended sequential (effectively the same). SOF2: Progressive

The Huffman coding in all three is identical.

All the other JPEG formats are RARELY used and only in special circumstances. SOF3 is used in medical applications.

I have never seen any of the other JPEG SOF markers used.

If you encode a JPEG using something other than SOF0, SOF1, or SOF2, few people would have applications that could decode it.

The others modes are either hierarchical encodings or arithmetic encodings.

1
votes

Jpeg has an obsolete hierarchical process, where first a small image is given, then it is expanded to a larger size. "Differential" refers to differences between calculated and actual expanded versions of frames. It has nothing to do with sample predictors.

Nondifferential and Nonhierarchical are synonymous here. This mode isn't useful because you can get the same functionality by using spectral selection in progressive mode, and use dct-scaling to show smaller versions of the image as scans are decoded. You'd have to change the zig-zag order of dct coefficients to make it an efficient replacement, but even without this, it works well.