Introduction

If you ever need to develop a JPEG application that uses quantization tables, theres probably a little bit of information you need to know here. Quantization tables are used by the JPEG application after DCT, and are applied against chrominance and luminance tables respectively.

Default Tables

The default JPEG quality (Q) facator is %75, and usually is settable in most JPEG applications. The following are the values used in the luminance and chrominance tables.

Luminance table
Luminance table

 

Chrominance table
Chrominance table

 

DC Component Only

You may wish to set only DC component of the quantization table, and this simply means setting the first element of both tables to the user required value. See the sample below.

DC Component
DC Component

 

Constant Values

The last option you might choose is a constant value. This sets all elements of the table to the same value, although you could have different constant values for luminance and chrominance.

 

Zig Zag Ordering

Normally zig zag ordering is done after quantization, but your application may require the quantization table to be in zig zag order. The zig zag starts from the upper left and ends at the bottom right, just like the picture below.

Zig zag ordering
Zig zag ordering

In this case I’m showing the default luminace quantization table; and thus the zig zag order would be as follows:

16, 11, 12, 14, 12, 10, 16, 14, 13, 14, 18, 17, 16, 19, 24, 40, 26, 24, 22, 22, 24, 49, 35, 37, 29, 40, 58, 51, 61, 60, 57, 51, 56, 55, 64, 72, 92, 78, 64, 68, 87, 69, 55, 56, 80,109, 81, 87, 95, 98,103,104,103, 62, 77,113, 121,112,100,120, 92,101,103, 99

 

 

Advertisement