Parsing jpeg file, SOS marker

I have a problem parsing a jpeg file. When I hit the SOS marker (start of scanning), there are several bytes, the meaning of which I do not understand. In the figure below, after the SOS marker, there are 2 bytes for the length of the header (part of Ls in the picture). But what does the rest of the data in the image mean (for example, Ns, Cs1, etc.) And where do the clean data begin? SOS jpeg file header

+7
source share
1 answer

Cs1 is an index of a choice of components. This applies to the SOF section (where the horizontal and vertical sampling rates are indicated)

Td1 is the DC table selector for the current component (Cs1)

Ta1 - AC table selector for the current component (Cs1)

Ss, Se Ah, Al ( . , )

Al

,

SOS (2 bytes)
Ls (2 Bytes)
Ns (1 byte)
Component Specific Parameters (Ns * 2 bytes)
Ss (1 byte)
Se (1 byte)
Ah,AL (1 byte)
... scan data ...
+5

All Articles