亮度DC系数的取值范围及序号:
序号(size) | 取值范围 |
0 | 0 |
1 | -1,1 |
2 | -3,-2,2,3 |
3 | -7~-4,4~7 |
4 | -15~-8,8~15 |
5 | -31~-16,16~31 |
6 | -63~-32,32~63 |
7 | -127~-64,64~127 |
8 | -255~-128,128~255 |
9 | -511~-256,256~511 |
10 | -1023~-512,512~1023 |
11 | -2047~-1024,1024~2047 |
亮度DC系数的huffman编码表:
序号(size) | 码长 | 码字 |
0 | 2 | 00 |
1 | 3 | 010 |
2 | 3 | 011 |
3 | 3 | 100 |
4 | 3 | 101 |
5 | 3 | 110 |
6 | 4 | 1110 |
7 | 5 | 11110 |
8 | 6 | 111110 |
9 | 7 | 1111110 |
10 | 8 | 11111110 |
11 | 9 | 111111110 |
亮度AC系数的取值范围及序号:
序号(size) | 取值范围 |
0 | 0 |
1 | -1,1 |
2 | -3,-2,2,3 |
3 | -7~-4,4~7 |
4 | -15~-8,8~15 |
5 | -31~-16,16~31 |
6 | -63~-32,32~63 |
7 | -127~-64,64~127 |
8 | -255~-128,128~255 |
9 | -511~-256,256~511 |
10 | -1023~-512,512~1023 |
亮度AC系数的huffman编码表:
游程/序号 (rungth/size) |
码长 | 码字 |
游程/序号 (rungth/size) |
码长 | 码字 |
游程/序号 (rungth/size) |
码长 | 码字 |
0/0(EOB) | 4 | 1010 | 5/4 | 16 | 1111111110011111 | A/8 | 16 | 1111111111001101 |
0/1 | 2 | 00 | 5/5 | 16 | 1111111110100000 | A/9 | 16 | 1111111111001110 |
0/2 | 2 | 01 | 5/6 | 16 | 1111111110100001 | A/A | 16 | 1111111111001111 |
0/3 | 3 | 100 | 5/7 | 16 | 1111111110100010 | B/1 | 10 | 1111111001 |
0/4 | 4 | 1011 | 5/8 | 16 | 1111111110100011 | B/2 | 16 | 111111111010000 |
0/5 | 5 | 11010 | 5/9 | 16 | 1111111110100100 | B/3 | 16 | 111111111010001 |
0/6 | 7 | 1111000 | 5/A | 16 | 1111111110100101 | B/4 | 16 | 111111111010010 |
0/7 | 8 | 11111000 | 6/1 | 7 | 1111011 | B/5 | 16 | 111111111010011 |
0/8 | 10 | 1111110110 | 6/2 | 12 | 111111110110 | B/6 | 16 | 111111111010100 |
0/9 | 16 | 1111111110000010 | 6/3 | 16 | 1111111110100110 | B/7 | 16 | 111111111010101 |
0/A | 16 | 1111111110000011 | 6/4 | 16 | 1111111110100111 | B/8 | 16 | 111111111010110 |
1/1 | 4 | 1100 | 6/5 | 16 | 1111111110101000 | B/9 | 16 | 111111111010111 |
1/2 | 5 | 11011 | 6/6 | 16 | 1111111110101001 | B/A | 16 | 111111111011000 |
1/3 | 7 | 1111001 | 6/7 | 16 | 1111111110101010 | C/1 | 10 | 1111111010 |
1/4 | 9 | 111110110 | 6/8 | 16 | 1111111110101011 | C/2 | 16 | 111111111011001 |
1/5 | 11 | 11111110110 | 6/9 | 16 | 1111111110101100 | C/3 | 16 | 111111111011010 |
1/6 | 16 | 1111111110000100 | 6/A | 16 | 1111111110101101 | C/4 | 16 | 111111111011011 |
1/7 | 16 | 1111111110000111 | 7/1 | 8 | 11111010 | C/5 | 16 | 111111111011100 |
1/8 | 16 | 1111111110000110 | 7/2 | 12 | 111111110111 | C/6 | 16 | 111111111011101 |
1/9 | 16 | 1111111110000111 | 7/3 | 16 | 1111111110101110 | C/7 | 16 | 111111111011110 |
1/A | 16 | 1111111110001000 | 7/4 | 16 | 1111111110101111 | C/8 | 16 | 111111111011111 |
2/1 | 5 | 11100 | 7/5 | 16 | 1111111110110000 | C/9 | 16 | 111111111100000 |
2/2 | 8 | 11111001 | 7/6 | 16 | 1111111110110001 | C/A | 16 | 111111111100001 |
2/3 | 10 | 1111110111 | 7/7 | 16 | 1111111110110010 | D/1 | 11 | 111111111000 |
2/4 | 12 | 111111110100 | 7/8 | 16 | 1111111110110011 | D/2 | 16 | 1111111111100010 |
2/5 | 16 | 1111111110001001 | 7/9 | 16 | 1111111110110100 | D/3 | 16 | 1111111111100011 |
2/6 | 16 | 1111111110001010 | 7/A | 16 | 1111111110110101 | D/4 | 16 | 1111111111100100 |
2/7 | 16 | 1111111110001011 | 8/1 | 9 | 111111000 | D/5 | 16 | 1111111111100101 |
2/8 | 16 | 1111111110001100 | 8/2 | 15 | 111111111000000 | D/6 | 16 | 1111111111100110 |
2/9 | 16 | 1111111110001101 | 8/3 | 16 | 1111111110110110 | D/7 | 16 | 1111111111100111 |
2/A | 16 | 1111111110001110 | 8/4 | 16 | 1111111110110111 | D/8 | 16 | 1111111111101000 |
3/1 | 6 | 111010 | 8/5 | 16 | 1111111110111000 | D/9 | 16 | 1111111111101001 |
3/2 | 9 | 111110111 | 8/6 | 16 | 1111111110111001 | D/A | 16 | 1111111111101010 |
3/3 | 10 | 111111110101 | 8/7 | 16 | 1111111110111010 | E/1 | 16 | 1111111111101011 |
3/4 | 16 | 1111111110001111 | 8/8 | 16 | 1111111110111011 | E/2 | 16 | 1111111111101100 |
3/5 | 16 | 1111111110010000 | 8/9 | 16 | 1111111110111100 | E/3 | 16 | 1111111111101101 |
3/6 | 16 | 1111111110010010 | 8/A | 16 | 1111111110111101 | E/4 | 16 | 1111111111101110 |
3/7 | 16 | 1111111110010010 | 9/1 | 9 | 111111001 | E/5 | 16 | 1111111111101111 |
3/8 | 16 | 1111111110010011 | 9/2 | 16 | 1111111110111110 | E/6 | 16 | 1111111111110000 |
3/9 | 16 | 1111111110010100 | 9/3 | 16 | 1111111110111111 | E/7 | 16 | 1111111111110001 |
3/A | 16 | 1111111110010100 | 9/4 | 16 | 1111111111000000 | E/8 | 16 | 1111111111110010 |
4/1 | 6 | 111011 | 9/5 | 16 | 1111111111000001 | E/9 | 16 | 1111111111110011 |
4/2 | 10 | 1111111000 | 9/6 | 16 | 1111111111000010 | E/A | 16 | 1111111111110100 |
4/3 | 16 | 1111111110010110 | 9/7 | 16 | 1111111111000011 | F/0(ZRL) | 11 | 11111111001 |
4/4 | 16 | 1111111110010111 | 9/8 | 16 | 1111111111000100 | F/1 | 16 | 111111111110101 |
4/5 | 16 | 1111111110011000 | 9/9 | 16 | 1111111111000101 | F/2 | 16 | 111111111110110 |
4/6 | 16 | 1111111110011001 | 9/A | 16 | 1111111111000110 | F/3 | 16 | 111111111110111 |
4/7 | 16 | 1111111110011010 | A/1 | 9 | 111111010 | F/4 | 16 | 111111111111000 |
4/8 | 16 | 1111111110011011 | A/2 | 16 | 1111111111000111 | F/5 | 16 | 111111111111001 |
4/9 | 16 | 1111111110011100 | A/3 | 16 | 1111111111001000 | F/6 | 16 | 111111111111010 |
4/A | 16 | 1111111110011101 | A/4 | 16 | 1111111111001001 | F/7 | 16 | 111111111111011 |
5/1 | 7 | 1111010 | A/5 | 16 | 1111111111001010 | F/8 | 16 | 111111111111100 |
5/2 | 11 | 11111110111 | A/6 | 16 | 1111111111001011 | F/9 | 16 | 111111111111101 |
5/3 | 16 | 1111111110011110 | A/7 | 16 | 1111111111001100 | F/A | 16 | 111111111111110 |
色差DC系数的huffman编码表:
序号(size) | 码长 | 码字 |
0 | 2 | 00 |
1 | 2 | 01 |
2 | 2 | 10 |
3 | 3 | 110 |
4 | 4 | 1110 |
5 | 5 | 11110 |
6 | 6 | 111110 |
7 | 7 | 1111110 |
8 | 8 | 11111110 |
9 | 9 | 111111110 |
10 | 10 | 1111111110 |
11 | 11 | 11111111110 |
色差AC系数的huffman编码表:
游程/序号 (rungth/size) |
码长 | 码字 |
游程/序号 (rungth/size) |
码长 | 码字 |
游程/序号 (rungth/size) |
码长 | 码字 |
0/0(EOB) | 2 | 00 | 5/4 | 16 | 1111111110100000 | A/8 | 16 | 11111111111001111 |
0/1 | 2 | 01 | 5/5 | 16 | 1111111110100001 | A/9 | 16 | 11111111111010000 |
0/2 | 3 | 100 | 5/6 | 16 | 1111111110100010 | A/A | 16 | 11111111111010001 |
0/3 | 4 | 1010 | 5/7 | 16 | 1111111110100011 | B/1 | 9 | 1111111001 |
0/4 | 5 | 11000 | 5/8 | 16 | 1111111110100100 | B/2 | 16 | 1111111111010010 |
0/5 | 5 | 11001 | 5/9 | 16 | 1111111110100101 | B/3 | 16 | 1111111111010011 |
0/6 | 6 | 111000 | 5/A | 16 | 1111111110100110 | B/4 | 16 | 1111111111010100 |
0/7 | 7 | 1111000 | 6/1 | 7 | 1111001 | B/5 | 16 | 1111111111010101 |
0/8 | 9 | 111110100 | 6/2 | 11 | 11111110111 | B/6 | 16 | 1111111111010110 |
0/9 | 10 | 1111110110 | 6/3 | 16 | 1111111110100111 | B/7 | 16 | 1111111111010111 |
0/A | 12 | 11111110100 | 6/4 | 16 | 1111111110101000 | B/8 | 16 | 1111111111011000 |
1/1 | 4 | 1011 | 6/5 | 16 | 1111111110101001 | B/9 | 16 | 1111111111011001 |
1/2 | 6 | 111001 | 6/6 | 16 | 1111111110101010 | B/A | 16 | 1111111111011010 |
1/3 | 8 | 11110110 | 6/7 | 16 | 1111111110101011 | C/1 | 9 | 111111010 |
1/4 | 9 | 111110101 | 6/8 | 16 | 1111111110101100 | C/2 | 16 | 1111111111011011 |
1/5 | 11 | 11111110110 | 6/9 | 16 | 1111111110101101 | C/3 | 16 | 1111111111011100 |
1/6 | 12 | 111111110101 | 6/A | 16 | 1111111110101110 | C/4 | 16 | 1111111111011101 |
1/7 | 16 | 1111111110001000 | 7/1 | 7 | 1111010 | C/5 | 16 | 1111111111011110 |
1/8 | 16 | 1111111110001001 | 7/2 | 11 | 11111111000 | C/6 | 16 | 1111111111011111 |
1/9 | 16 | 1111111110001010 | 7/3 | 16 | 1111111110101111 | C/7 | 16 | 1111111111100000 |
1/A | 16 | 1111111110001011 | 7/4 | 16 | 1111111110110000 | C/8 | 16 | 1111111111100001 |
2/1 | 5 | 11010 | 7/5 | 16 | 1111111110110001 | C/9 | 16 | 1111111111100010 |
2/2 | 8 | 11110111 | 7/6 | 16 | 1111111110110010 | C/A | 16 | 1111111111100011 |
2/3 | 10 | 1111110111 | 7/7 | 16 | 1111111110110011 | D/1 | 11 | 11111111001 |
2/4 | 12 | 111111110110 | 7/8 | 16 | 1111111110110100 | D/2 | 16 | 1111111111100100 |
2/5 | 15 | 111111111000010 | 7/9 | 16 | 1111111110110101 | D/3 | 16 | 11111111111100101 |
2/6 | 16 | 1111111110001100 | 7/A | 16 | 1111111110110110 | D/4 | 16 | 11111111111100110 |
2/7 | 16 | 1111111110001101 | 8/1 | 8 | 11111001 | D/5 | 16 | 11111111111100111 |
2/8 | 16 | 1111111110001110 | 8/2 | 16 | 1111111110110111 | D/6 | 16 | 11111111111101000 |
2/9 | 16 | 1111111110001111 | 8/3 | 16 | 1111111110111000 | D/7 | 16 | 11111111111101001 |
2/A | 16 | 1111111110010000 | 8/4 | 16 | 1111111110111001 | D/8 | 16 | 11111111111101010 |
3/1 | 5 | 11011 | 8/5 | 16 | 1111111110111010 | D/9 | 16 | 11111111111101011 |
3/2 | 8 | 11111000 | 8/6 | 16 | 1111111110111011 | D/A | 16 | 11111111111101100 |
3/3 | 10 | 1111111000 | 8/7 | 16 | 1111111110111100 | E/1 | 14 | 11111111100000 |
3/4 | 12 | 111111110111 | 8/8 | 16 | 1111111110111101 | E/2 | 16 | 1111111111101101 |
3/5 | 16 | 1111111110010001 | 8/9 | 16 | 1111111110111110 | E/3 | 16 | 1111111111101110 |
3/6 | 16 | 1111111110010010 | 8/A | 16 | 1111111110111111 | E/4 | 16 | 1111111111101111 |
3/7 | 16 | 1111111110010011 | 9/1 | 9 | 111110111 | E/5 | 16 | 1111111111110000 |
3/8 | 16 | 1111111110010100 | 9/2 | 16 | 1111111111000000 | E/6 | 16 | 1111111111110001 |
3/9 | 16 | 1111111110010101 | 9/3 | 16 | 1111111111000001 | E/7 | 16 | 1111111111110010 |
3/A | 16 | 1111111110010110 | 9/4 | 16 | 1111111111000010 | E/8 | 16 | 1111111111110011 |
4/1 | 6 | 111010 | 9/5 | 16 | 1111111111000011 | E/9 | 16 | 1111111111110100 |
4/2 | 9 | 111110110 | 9/6 | 16 | 1111111111000100 | E/A | 16 | 1111111111110101 |
4/3 | 16 | 1111111110010111 | 9/7 | 16 | 1111111111000101 | F/0(ZRL) | 10 | 1111111010 |
4/4 | 16 | 1111111110011000 | 9/8 | 16 | 1111111111000110 | F/1 | 15 | 111111111000011 |
4/5 | 16 | 1111111110011001 | 9/9 | 16 | 1111111111000111 | F/2 | 16 | 1111111111110110 |
4/6 | 16 | 1111111110011010 | 9/A | 16 | 1111111111001000 | F/3 | 16 | 1111111111110111 |
4/7 | 16 | 1111111110011011 | A/1 | 9 | 111111000 | F/4 | 16 | 1111111111111000 |
4/8 | 16 | 1111111110011100 | A/2 | 16 | 1111111111001001 | F/5 | 16 | 1111111111111001 |
4/9 | 16 | 1111111110011101 | A/3 | 16 | 1111111111001010 | F/6 | 16 | 1111111111111010 |
4/A | 16 | 1111111110011110 | A/4 | 16 | 1111111111001011 | F/7 | 16 | 1111111111111011 |
5/1 | 6 | 111011 | A/5 | 16 | 1111111111001100 | F/8 | 16 | 1111111111111100 |
5/2 | 10 | 1111111001 | A/6 | 16 | 1111111111001101 | F/9 | 16 | 1111111111111101 |
5/3 | 16 | 1111111110011111 | A/7 | 16 | 1111111111001110 | F/A | 16 | 1111111111111110 |
jpeg huffman coding table,布布扣,bubuko.com
原文:http://www.cnblogs.com/dxs959229640/p/3853790.html