Page 211 - DCAP303_MULTIMEDIA_SYSTEMS
P. 211
Unit 12: Image Format
• Segment marker (2). Is always FFD8H notes
• Section length (2). Does not include the segment marker
• Quantization table header (1). Top nibble denotes the precision of the table, low nibble
denotes the Table ID
• Data for relevant table (64). Each entry is one byte each and is ordered as per the zig-zag
method used in quantization.
Steps 3 and 4 are repeated for each Quantization table defined.
start of frame (sof) segment
This segment details information at a lower level such as which component uses what Quantization
table, sampling factors etc. The number in brackets indicates the number of bytes the information
is stored in.
• Segment marker (2). Is always FFC0H
• Section length (2). Does not include the segment marker
• Precision of samples (1). This is always 08H
• Horizontal resolution of image (2).
• Vertical resolution of image (2)
• Number of components in image (1).
• Component ID (1).
• Sampling factor for component (1). High nibble is vertical sampling factor; low nibble is
horizontal sampling factor.
• Quantization table ID for component (1)
Steps 7 through 9 are repeated for each component used in the image. The JFIF also specifies that
if the YCbCr colour format is used, then the component ID for Y should be 01H, the ID for Cb
should be 02H and Cr should be 03H.
Define Huffman Table (DHT) Segment
This segment defines the contents of the Huffman Code Libraries. This entire segment is repeated
once for each Huffman Code Library used. The number in brackets indicates the number of bytes
the information is stored in.
• Segment Marker (2). Is always FFC4H
• Section length (2). Does not include the segment marker
• Table ID (1).
• Number of table entries with a certain code length (n) i.e. first byte is for the number of
codes with 1 bit code length, the second byte is for the number of codes with 2 bit code
length and so on until the biggest code length is reached.
• Symbols for either the SSSS or the RUN-SIZE values calculated in the Huffman coding
procedure (m). The symbols are each one byte and are entered in order of size i.e. the symbol
of code length 1 (if any) is entered first, followed by any symbols of code length 2 and so
on.
Note that if the JPEG Standard Huffman code libraries are being used, then the entries for steps
4 and 5 are defined in the standard (also they are attached to this report as an appendix).
LoveLy professionaL University 205