JPEG中Huffman解码详解


一、简述

         由《JPEG文件中默认Huffman表说明》可得到两张表Huffman_size、Huffman_code。本文即是讲如何根据这两张表,对Huffman编码的数据进行解码。

二、解码过程

1)        将待解码数据转换成二进制的数据流;

2)        遍历表Huffman_size、Huffman_code,从待解码二进制数据流中寻找到长度与Huffman_size相等,内容与Huffman_code相等的二进制数据段,并记录下表的ID(即:是在表的第几个数据中寻找到的)。

3)        将此ID 值除以16,其商为cnt(指之前有cnt个0),其余数即为取数长度Len;

4)        在二进制的数据流中,从与Huffman_code相同的数据流后,开始取数,取数长度为第3步得到的Len,假设取得的数据为data;

5)        根据data的值,转换得到相应的解码数据de_data。(根据最高位,为1则为相应的数,为0则取反后的负值。例,data=100,则解码后数据de_data值为4;data=010,解码后数据de_data为-5。

6)        写上de_data的值,并在前面添加上cnt个0。至此,解码完成。

7)        流程图如下:

JPEG中Huffman解码详解_第1张图片

三、JPEG的Huffman解码

         JPEG中一般会有4张Huffman表数据,因为它根据亮度与色度来分别进行Huffman编码的,而亮度的Huffman编码就会存在DC表与AC表,所以,加上色度的两张表,一般会存在4张表。其表内容如何在JPEG文件中识别,请参见《JPEG格式详解》。而根据每一张DC表或者AC表,又会得到两张Huffman_code、Huffman_size表,参见《JPEG文件中默认Huffman表说明》。

         本节仅介绍如何通过DC、AC表解码Huffman编码的图像数据。

         在JPEG中,Huffman编解码是以一个DCU为单位,一个DCU是一个8*8的矩阵,共64个字节;一般情况下是YCBCR以4:1:1的情况进行编码的,所以,每6个DCU又构成一个MCU进行编解码(详细可参见《JPEG格式详解》)。因此,在解码时,需要注意使用正确的DHT进行解码。

         每一个DCU的第一个字节总是DC值,因此它的解码需要使用DC的DHT方可解出,而后的就需要使用AC的DHT进行解码。但是,要注意的是,进行Huffman编码的DC其实是进行过一次运算的,它是两相邻DCU的DC值之差。

         例:

JPEG中Huffman解码详解_第2张图片

图1 Huffman解码实例

         图1中,红色虚线圈前的数据为data_tmp,红色虚线圈中的数据为de_data,最下面一行为解码后的数据。注意,第一个数据30是采用亮度的DC表解码,后续采用亮度的AC表解码,解码到1010(淡青色底)时,为终止符,表示第1个DCU解码完成。

四、附录

本节含4张表,此表来源请参见《windows默认JPEG文件中Huffman表说明》。

1)        亮度DC表

{ 2,0x0000}, /*               00 */

{ 3,0x0002}, /*              010 */ 

{ 3,0x0003}, /*              011 */ 

{ 3,0x0004}, /*              100 */ 

{ 3,0x0005}, /*              101 */ 

{ 3, 0x0006},/*              110 */ 

{ 4,0x000e}, /*            1110 */ 

{ 5,0x001e}, /*          11110 */ 

{ 6,0x003e}, /*         111110 */ 

{ 7,0x007e}, /*        1111110*/ 

{ 8,0x00fe}, /*       11111110 */ 

{ 9,0x01fe}  /*    111111110 */

2)        亮度AC表

{ 4,0x000a}, /* 0x00:              1010 */

{ 2,0x0000}, /* 0x01:                00 */

{ 2,0x0001}, /* 0x02:                01 */

{ 3,0x0004}, /* 0x03:               100 */

{ 4,0x000b}, /* 0x04:              1011 */

{ 5,0x001a}, /* 0x05:             11010 */

{ 7,0x0078}, /* 0x06:           1111000 */

{ 8,0x00f8}, /* 0x07:          11111000 */

{10,0x03f6}, /* 0x08:        1111110110 */

{16,0xff82}, /* 0x09:  1111111110000010 */

{16,0xff83}, /* 0x0a:  1111111110000011 */

{ 0,0x0000}, /* 0x0b:                   */

{ 0,0x0000}, /* 0x0c:                   */

{ 0,0x0000}, /* 0x0d:                   */

{ 0,0x0000}, /* 0x0e:                   */

{ 0,0x0000}, /* 0x0f:                   */

{ 0,0x0000}, /* 0x10:                   */

{ 4,0x000c}, /* 0x11:              1100 */

{ 5,0x001b}, /* 0x12:             11011 */

{ 7,0x0079}, /* 0x13:           1111001 */

{ 9,0x01f6}, /* 0x14:         111110110 */

{11,0x07f6}, /* 0x15:       11111110110 */

{16,0xff84}, /* 0x16:  1111111110000100 */

{16,0xff85}, /* 0x17:  1111111110000101 */

{16,0xff86}, /* 0x18:  1111111110000110 */

{16,0xff87}, /* 0x19:  1111111110000111 */

{16,0xff88}, /* 0x1a:  1111111110001000 */

{ 0,0x0000}, /* 0x1b:                   */

{ 0,0x0000}, /* 0x1c:                   */

{ 0,0x0000}, /* 0x1d:                   */

{ 0,0x0000}, /* 0x1e:                   */

{ 0,0x0000}, /* 0x1f:                   */

{ 0,0x0000}, /* 0x20:                   */

{ 5,0x001c}, /* 0x21:             11100 */

{ 8,0x00f9}, /* 0x22:          11111001 */

{10,0x03f7}, /* 0x23:        1111110111 */

{12,0x0ff4}, /* 0x24:      111111110100 */

{16,0xff89}, /* 0x25:  1111111110001001 */

{16,0xff8a}, /* 0x26:  1111111110001010 */

{16,0xff8b}, /* 0x27:  1111111110001011 */

{16,0xff8c}, /* 0x28:  1111111110001100 */

{16,0xff8d}, /* 0x29:  1111111110001101 */

{16,0xff8e}, /* 0x2a:  1111111110001110 */

{ 0,0x0000}, /* 0x2b:                   */

{ 0,0x0000}, /* 0x2c:                   */

{ 0,0x0000}, /* 0x2d:                   */

{ 0,0x0000}, /* 0x2e:                   */

{ 0,0x0000}, /* 0x2f:                   */

{ 0,0x0000}, /* 0x30:                   */

{ 6,0x003a}, /* 0x31:            111010 */

{ 9,0x01f7}, /* 0x32:         111110111 */

{12,0x0ff5}, /* 0x33:      111111110101 */

{16,0xff8f}, /* 0x34:  1111111110001111 */

{16,0xff90}, /* 0x35:  1111111110010000 */

{16,0xff91}, /* 0x36:  1111111110010001 */

{16,0xff92}, /* 0x37:  1111111110010010 */

{16,0xff93}, /* 0x38:  1111111110010011 */

{16,0xff94}, /* 0x39:  1111111110010100 */

{16,0xff95}, /* 0x3a:  1111111110010101 */

{ 0,0x0000}, /* 0x3b:                   */

{ 0,0x0000}, /* 0x3c:                   */

{ 0,0x0000}, /* 0x3d:                   */

{ 0,0x0000}, /* 0x3e:                   */

{ 0,0x0000}, /* 0x3f:                   */

{ 0,0x0000}, /* 0x40:                   */

{ 6,0x003b}, /* 0x41:            111011 */

{10,0x03f8}, /* 0x42:        1111111000 */

{16,0xff96}, /* 0x43:  1111111110010110 */

{16,0xff97}, /* 0x44:  1111111110010111 */

{16,0xff98}, /* 0x45:  1111111110011000 */

{16,0xff99}, /* 0x46:  1111111110011001 */

{16,0xff9a}, /* 0x47:  1111111110011010 */

{16,0xff9b}, /* 0x48:  1111111110011011 */

{16,0xff9c}, /* 0x49:  1111111110011100 */

{16,0xff9d}, /* 0x4a:  1111111110011101 */

{ 0,0x0000}, /* 0x4b:                   */

{ 0,0x0000}, /* 0x4c:                   */

{ 0,0x0000}, /* 0x4d:                   */

{ 0,0x0000}, /* 0x4e:                   */

{ 0,0x0000}, /* 0x4f:                   */

{ 0,0x0000}, /* 0x50:                   */

{ 7,0x007a}, /* 0x51:           1111010 */

{11,0x07f7}, /* 0x52:       11111110111 */

{16,0xff9e}, /* 0x53:  1111111110011110 */

{16,0xff9f}, /* 0x54:  1111111110011111 */

{16,0xffa0}, /* 0x55:  1111111110100000 */

{16,0xffa1}, /* 0x56:  1111111110100001 */

{16,0xffa2}, /* 0x57:  1111111110100010 */

{16,0xffa3}, /* 0x58:  1111111110100011 */

{16,0xffa4}, /* 0x59:  1111111110100100 */

{16,0xffa5}, /* 0x5a:  1111111110100101 */

{ 0,0x0000}, /* 0x5b:                   */

{ 0,0x0000}, /* 0x5c:                   */

{ 0,0x0000}, /* 0x5d:                   */

{ 0,0x0000}, /* 0x5e:                   */

{ 0,0x0000}, /* 0x5f:                   */

{ 0,0x0000}, /* 0x60:                   */

{ 7,0x007b}, /* 0x61:           1111011 */

{12,0x0ff6}, /* 0x62:      111111110110 */

{16,0xffa6}, /* 0x63:  1111111110100110 */

{16,0xffa7}, /* 0x64:  1111111110100111 */

{16,0xffa8}, /* 0x65:  1111111110101000 */

{16,0xffa9}, /* 0x66:  1111111110101001 */

{16,0xffaa}, /* 0x67:  1111111110101010 */

{16,0xffab}, /* 0x68:  1111111110101011 */

{16,0xffac}, /* 0x69:  1111111110101100 */

{16,0xffad}, /* 0x6a:  1111111110101101 */

{ 0,0x0000}, /* 0x6b:                   */

{ 0,0x0000}, /* 0x6c:                   */

{ 0,0x0000}, /* 0x6d:                   */

{ 0,0x0000}, /* 0x6e:                   */

{ 0,0x0000}, /* 0x6f:                   */

{ 0,0x0000}, /* 0x70:                   */

{ 8,0x00fa}, /* 0x71:          11111010 */

{12,0x0ff7}, /* 0x72:      111111110111 */

{16,0xffae}, /* 0x73:  1111111110101110 */

{16,0xffaf}, /* 0x74:  1111111110101111 */

{16,0xffb0}, /* 0x75:  1111111110110000 */

{16,0xffb1}, /* 0x76:  1111111110110001 */

{16,0xffb2}, /* 0x77:  1111111110110010 */

{16,0xffb3}, /* 0x78:  1111111110110011 */

{16,0xffb4}, /* 0x79:  1111111110110100 */

{16,0xffb5}, /* 0x7a:  1111111110110101 */

{ 0,0x0000}, /* 0x7b:                   */

{ 0,0x0000}, /* 0x7c:                   */

{ 0,0x0000}, /* 0x7d:                   */

{ 0,0x0000}, /* 0x7e:                   */

{ 0,0x0000}, /* 0x7f:                   */

{ 0,0x0000}, /* 0x80:                   */

{ 9,0x01f8}, /* 0x81:         111111000 */

{15,0x7fc0}, /* 0x82:   111111111000000 */

{16,0xffb6}, /* 0x83:  1111111110110110 */

{16,0xffb7}, /* 0x84:  1111111110110111 */

{16,0xffb8}, /* 0x85:  1111111110111000 */

{16,0xffb9}, /* 0x86:  1111111110111001 */

{16,0xffba}, /* 0x87:  1111111110111010 */

{16,0xffbb}, /* 0x88:  1111111110111011 */

{16,0xffbc}, /* 0x89:  1111111110111100 */

{16,0xffbd}, /* 0x8a:  1111111110111101 */

{ 0,0x0000}, /* 0x8b:                   */

{ 0,0x0000}, /* 0x8c:                   */

{ 0,0x0000}, /* 0x8d:                   */

{ 0,0x0000}, /* 0x8e:                   */

{ 0,0x0000}, /* 0x8f:                   */

{ 0,0x0000}, /* 0x90:                   */

{ 9,0x01f9}, /* 0x91:         111111001 */

{16,0xffbe}, /* 0x92:  1111111110111110 */

{16,0xffbf}, /* 0x93:  1111111110111111 */

{16,0xffc0}, /* 0x94:  1111111111000000 */

{16,0xffc1}, /* 0x95:  1111111111000001 */

{16,0xffc2}, /* 0x96:  1111111111000010 */

{16,0xffc3}, /* 0x97:  1111111111000011 */

{16,0xffc4}, /* 0x98:  1111111111000100 */

{16,0xffc5}, /* 0x99:  1111111111000101 */

{16,0xffc6}, /* 0x9a:  1111111111000110 */

{ 0,0x0000}, /* 0x9b:                   */

{ 0,0x0000}, /* 0x9c:                   */

{ 0,0x0000}, /* 0x9d:                   */

{ 0,0x0000}, /* 0x9e:                   */

{ 0,0x0000}, /* 0x9f:                   */

{ 0,0x0000}, /* 0xa0:                   */

{ 9,0x01fa}, /* 0xa1:         111111010 */

{16,0xffc7}, /* 0xa2:  1111111111000111 */

{16,0xffc8}, /* 0xa3:  1111111111001000 */

{16,0xffc9}, /* 0xa4:  1111111111001001 */

{16,0xffca}, /* 0xa5:  1111111111001010 */

{16,0xffcb}, /* 0xa6:  1111111111001011 */

{16,0xffcc}, /* 0xa7:  1111111111001100 */

{16,0xffcd}, /* 0xa8:  1111111111001101 */

{16,0xffce}, /* 0xa9:  1111111111001110 */

{16,0xffcf}, /* 0xaa:  1111111111001111 */

{ 0,0x0000}, /* 0xab:                   */

{ 0,0x0000}, /* 0xac:                   */

{ 0,0x0000}, /* 0xad:                   */

{ 0,0x0000}, /* 0xae:                   */

{ 0,0x0000}, /* 0xaf:                   */

{ 0,0x0000}, /* 0xb0:                   */

{10,0x03f9}, /* 0xb1:        1111111001 */

{16,0xffd0}, /* 0xb2:  1111111111010000 */

{16,0xffd1}, /* 0xb3:  1111111111010001 */

{16,0xffd2}, /* 0xb4:  1111111111010010 */

{16,0xffd3}, /* 0xb5:  1111111111010011 */

{16,0xffd4}, /* 0xb6:  1111111111010100 */

{16,0xffd5}, /* 0xb7:  1111111111010101 */

{16,0xffd6}, /* 0xb8:  1111111111010110 */

{16,0xffd7}, /* 0xb9:  1111111111010111 */

{16,0xffd8}, /* 0xba:  1111111111011000 */

{ 0,0x0000}, /* 0xbb:                   */

{ 0,0x0000}, /* 0xbc:                   */

{ 0,0x0000}, /* 0xbd:                   */

{ 0,0x0000}, /* 0xbe:                   */

{ 0,0x0000}, /* 0xbf:                   */

{ 0,0x0000}, /* 0xc0:                   */

{10,0x03fa}, /* 0xc1:        1111111010 */

{16,0xffd9}, /* 0xc2:  1111111111011001 */

{16,0xffda}, /* 0xc3:  1111111111011010 */

{16,0xffdb}, /* 0xc4:  1111111111011011 */

{16,0xffdc}, /* 0xc5:  1111111111011100 */

{16,0xffdd}, /* 0xc6:  1111111111011101 */

{16,0xffde}, /* 0xc7:  1111111111011110 */

{16,0xffdf}, /* 0xc8:  1111111111011111 */

{16,0xffe0}, /* 0xc9:  1111111111100000 */

{16,0xffe1}, /* 0xca:  1111111111100001 */

{ 0,0x0000}, /* 0xcb:                   */

{ 0,0x0000}, /* 0xcc:                   */

{ 0,0x0000}, /* 0xcd:                   */

{ 0,0x0000}, /* 0xce:                   */

{ 0,0x0000}, /* 0xcf:                   */

{ 0,0x0000}, /* 0xd0:                   */

{11,0x07f8}, /* 0xd1:       11111111000 */

{16,0xffe2}, /* 0xd2:  1111111111100010 */

{16,0xffe3}, /* 0xd3:  1111111111100011 */

{16,0xffe4}, /* 0xd4:  1111111111100100 */

{16,0xffe5}, /* 0xd5:  1111111111100101 */

{16,0xffe6}, /* 0xd6:  1111111111100110 */

{16,0xffe7}, /* 0xd7:  1111111111100111 */

{16,0xffe8}, /* 0xd8:  1111111111101000 */

{16,0xffe9}, /* 0xd9:  1111111111101001 */

{16,0xffea}, /* 0xda:  1111111111101010 */

{ 0,0x0000}, /* 0xdb:                   */

{ 0,0x0000}, /* 0xdc:                   */

{ 0,0x0000}, /* 0xdd:                   */

{ 0,0x0000}, /* 0xde:                   */

{ 0,0x0000}, /* 0xdf:                   */

{ 0,0x0000}, /* 0xe0:                   */

{16,0xffeb}, /* 0xe1:  1111111111101011 */

{16,0xffec}, /* 0xe2:  1111111111101100 */

{16,0xffed}, /* 0xe3:  1111111111101101 */

{16,0xffee}, /* 0xe4:  1111111111101110 */

{16,0xffef}, /* 0xe5:  1111111111101111 */

{16,0xfff0}, /* 0xe6:  1111111111110000 */

{16,0xfff1}, /* 0xe7:  1111111111110001 */

{16,0xfff2}, /* 0xe8:  1111111111110010 */

{16,0xfff3}, /* 0xe9:  1111111111110011 */

{16,0xfff4}, /* 0xea:  1111111111110100 */

{ 0,0x0000}, /* 0xeb:                   */

{ 0,0x0000}, /* 0xec:                   */

{ 0,0x0000}, /* 0xed:                   */

{ 0,0x0000}, /* 0xee:                   */

{ 0,0x0000}, /* 0xef:                   */

{11,0x07f9}, /* 0xf0:       11111111001 */

{16,0xfff5}, /* 0xf1:  1111111111110101 */

{16,0xfff6}, /* 0xf2:  1111111111110110 */

{16,0xfff7}, /* 0xf3:  1111111111110111 */

{16,0xfff8}, /* 0xf4:  1111111111111000 */

{16,0xfff9}, /* 0xf5:  1111111111111001 */

{16,0xfffa}, /* 0xf6:  1111111111111010 */

{16,0xfffb}, /* 0xf7:  1111111111111011 */

{16,0xfffc}, /* 0xf8:  1111111111111100 */

{16,0xfffd}, /* 0xf9:  1111111111111101 */

{16,0xfffe}, /* 0xfa:  1111111111111110 */

{ 0,0x0000}, /* 0xfb:                   */

{ 0,0x0000}, /* 0xfc:                   */

{ 0,0x0000}, /* 0xfd:                   */

{ 0,0x0000}, /* 0xfe:                   */

         { 0, 0x0000},/* 0xff:                   */

3)        色度DC表

{ 2,0x0000}, /*               00 */

{ 2,0x0001}, /*               01 */

{ 2,0x0002}, /*               10 */

{ 3,0x0006}, /*              110 */

{ 4,0x000e}, /*             1110 */

{ 5,0x001e}, /*            11110 */

{ 6,0x003e}, /*           111110 */

{ 7,0x007e}, /*          1111110 */

{ 8,0x00fe}, /*         11111110 */

{ 9,0x01fe}, /*        111111110 */

{10,0x03fe}, /*       1111111110 */

         {11,0x07fe}  /*      11111111110 */

4)        色度AC表

{ 2,0x0000}, /* 0x00:                00 */

{ 2,0x0001}, /* 0x01:                01 */

{ 3,0x0004}, /* 0x02:               100 */

{ 4,0x000a}, /* 0x03:              1010 */

{ 5,0x0018}, /* 0x04:             11000 */

{ 5,0x0019}, /* 0x05:             11001 */

{ 6,0x0038}, /* 0x06:            111000 */

{ 7,0x0078}, /* 0x07:           1111000 */

{ 9,0x01f4}, /* 0x08:         111110100 */

{10,0x03f6}, /* 0x09:        1111110110 */

{12,0x0ff4}, /* 0x0a:      111111110100 */

{ 0,0x0000}, /* 0x0b:                   */

{ 0,0x0000}, /* 0x0c:                   */

{ 0,0x0000}, /* 0x0d:                   */

{ 0,0x0000}, /* 0x0e:                   */

{ 0,0x0000}, /* 0x0f:                   */

{ 0,0x0000}, /* 0x10:                   */

{ 4,0x000b}, /* 0x11:              1011 */

{ 6,0x0039}, /* 0x12:            111001 */

{ 8,0x00f6}, /* 0x13:          11110110 */

{ 9,0x01f5}, /* 0x14:         111110101 */

{11,0x07f6}, /* 0x15:       11111110110 */

{12,0x0ff5}, /* 0x16:      111111110101 */

{16,0xff88}, /* 0x17:  1111111110001000 */

{16,0xff89}, /* 0x18:  1111111110001001 */

{16,0xff8a}, /* 0x19:  1111111110001010 */

{16,0xff8b}, /* 0x1a:  1111111110001011 */

{ 0,0x0000}, /* 0x1b:                   */

{ 0,0x0000}, /* 0x1c:                   */

{ 0,0x0000}, /* 0x1d:                   */

{ 0,0x0000}, /* 0x1e:                   */

{ 0,0x0000}, /* 0x1f:                   */

{ 0,0x0000}, /* 0x20:                   */

{ 5,0x001a}, /* 0x21:             11010 */

{ 8,0x00f7}, /* 0x22:          11110111 */

{10,0x03f7}, /* 0x23:        1111110111 */

{12,0x0ff6}, /* 0x24:      111111110110 */

{15,0x7fc2}, /* 0x25:   111111111000010 */

{16,0xff8c}, /* 0x26:  1111111110001100 */

{16,0xff8d}, /* 0x27:  1111111110001101 */

{16,0xff8e}, /* 0x28:  1111111110001110 */

{16,0xff8f}, /* 0x29:  1111111110001111 */

{16,0xff90}, /* 0x2a:  1111111110010000 */

{ 0,0x0000}, /* 0x2b:                   */

{ 0,0x0000}, /* 0x2c:                   */

{ 0,0x0000}, /* 0x2d:                   */

{ 0,0x0000}, /* 0x2e:                   */

{ 0,0x0000}, /* 0x2f:                   */

{ 0,0x0000}, /* 0x30:                   */

{ 5,0x001b}, /* 0x31:             11011 */

{ 8,0x00f8}, /* 0x32:          11111000 */

{10,0x03f8}, /* 0x33:        1111111000 */

{12,0x0ff7}, /* 0x34:      111111110111 */

{16,0xff91}, /* 0x35:  1111111110010001 */

{16,0xff92}, /* 0x36:  1111111110010010 */

{16,0xff93}, /* 0x37:  1111111110010011 */

{16,0xff94}, /* 0x38:  1111111110010100 */

{16,0xff95}, /* 0x39:  1111111110010101 */

{16,0xff96}, /* 0x3a:  1111111110010110 */

{ 0,0x0000}, /* 0x3b:                   */

{ 0,0x0000}, /* 0x3c:                   */

{ 0,0x0000}, /* 0x3d:                   */

{ 0,0x0000}, /* 0x3e:                   */

{ 0,0x0000}, /* 0x3f:                   */

{ 0,0x0000}, /* 0x40:                   */

{ 6,0x003a}, /* 0x41:            111010 */

{ 9,0x01f6}, /* 0x42:         111110110 */

{16,0xff97}, /* 0x43:  1111111110010111 */

{16,0xff98}, /* 0x44:  1111111110011000 */

{16,0xff99}, /* 0x45:  1111111110011001 */

{16,0xff9a}, /* 0x46:  1111111110011010 */

{16,0xff9b}, /* 0x47:  1111111110011011 */

{16,0xff9c}, /* 0x48:  1111111110011100 */

{16,0xff9d}, /* 0x49:  1111111110011101 */

{16,0xff9e}, /* 0x4a:  1111111110011110 */

{ 0,0x0000}, /* 0x4b:                   */

{ 0,0x0000}, /* 0x4c:                   */

{ 0,0x0000}, /* 0x4d:                   */

{ 0,0x0000}, /* 0x4e:                   */

{ 0,0x0000}, /* 0x4f:                   */

{ 0,0x0000}, /* 0x50:                   */

{ 6,0x003b}, /* 0x51:            111011 */

{10,0x03f9}, /* 0x52:        1111111001 */

{16,0xff9f}, /* 0x53:  1111111110011111 */

{16,0xffa0}, /* 0x54:  1111111110100000 */

{16,0xffa1}, /* 0x55:  1111111110100001 */

{16,0xffa2}, /* 0x56:  1111111110100010 */

{16,0xffa3}, /* 0x57:  1111111110100011 */

{16,0xffa4}, /* 0x58:  1111111110100100 */

{16,0xffa5}, /* 0x59:  1111111110100101 */

{16,0xffa6}, /* 0x5a:  1111111110100110 */

{ 0,0x0000}, /* 0x5b:                   */

{ 0,0x0000}, /* 0x5c:                   */

{ 0,0x0000}, /* 0x5d:                   */

{ 0,0x0000}, /* 0x5e:                   */

{ 0,0x0000}, /* 0x5f:                   */

{ 0,0x0000}, /* 0x60:                   */

{ 7,0x0079}, /* 0x61:           1111001 */

{11,0x07f7}, /* 0x62:       11111110111 */

{16,0xffa7}, /* 0x63:  1111111110100111 */

{16,0xffa8}, /* 0x64:  1111111110101000 */

{16,0xffa9}, /* 0x65:  1111111110101001 */

{16,0xffaa}, /* 0x66:  1111111110101010 */

{16,0xffab}, /* 0x67:  1111111110101011 */

{16,0xffac}, /* 0x68:  1111111110101100 */

{16,0xffad}, /* 0x69:  1111111110101101 */

{16,0xffae}, /* 0x6a:  1111111110101110 */

{ 0,0x0000}, /* 0x6b:                   */

{ 0,0x0000}, /* 0x6c:                   */

{ 0,0x0000}, /* 0x6d:                   */

{ 0,0x0000}, /* 0x6e:                   */

{ 0,0x0000}, /* 0x6f:                   */

{ 0,0x0000}, /* 0x70:                   */

{ 7,0x007a}, /* 0x71:           1111010 */

{11,0x07f8}, /* 0x72:       11111111000 */

{16,0xffaf}, /* 0x73:  1111111110101111 */

{16,0xffb0}, /* 0x74:  1111111110110000 */

{16,0xffb1}, /* 0x75:  1111111110110001 */

{16,0xffb2}, /* 0x76:  1111111110110010 */

{16,0xffb3}, /* 0x77:  1111111110110011 */

{16,0xffb4}, /* 0x78:  1111111110110100 */

{16,0xffb5}, /* 0x79:  1111111110110101 */

{16,0xffb6}, /* 0x7a:  1111111110110110 */

{ 0,0x0000}, /* 0x7b:                   */

{ 0,0x0000}, /* 0x7c:                   */

{ 0,0x0000}, /* 0x7d:                   */

{ 0,0x0000}, /* 0x7e:                   */

{ 0,0x0000}, /* 0x7f:                   */

{ 0,0x0000}, /* 0x80:                   */

{ 8,0x00f9}, /* 0x81:          11111001 */

{16,0xffb7}, /* 0x82:  1111111110110111 */

{16,0xffb8}, /* 0x83:  1111111110111000 */

{16,0xffb9}, /* 0x84:  1111111110111001 */

{16,0xffba}, /* 0x85:  1111111110111010 */

{16,0xffbb}, /* 0x86:  1111111110111011 */

{16,0xffbc}, /* 0x87:  1111111110111100 */

{16,0xffbd}, /* 0x88:  1111111110111101 */

{16,0xffbe}, /* 0x89:  1111111110111110 */

{16,0xffbf}, /* 0x8a:  1111111110111111 */

{ 0,0x0000}, /* 0x8b:                   */

{ 0,0x0000}, /* 0x8c:                   */

{ 0,0x0000}, /* 0x8d:                   */

{ 0,0x0000}, /* 0x8e:                   */

{ 0,0x0000}, /* 0x8f:                   */

{ 0,0x0000}, /* 0x90:                   */

{ 9,0x01f7}, /* 0x91:         111110111 */

{16,0xffc0}, /* 0x92:  1111111111000000 */

{16,0xffc1}, /* 0x93:  1111111111000001 */

{16,0xffc2}, /* 0x94:  1111111111000010 */

{16,0xffc3}, /* 0x95:  1111111111000011 */

{16,0xffc4}, /* 0x96:  1111111111000100 */

{16,0xffc5}, /* 0x97:  1111111111000101 */

{16,0xffc6}, /* 0x98:  1111111111000110 */

{16,0xffc7}, /* 0x99:  1111111111000111 */

{16,0xffc8}, /* 0x9a:  1111111111001000 */

{ 0,0x0000}, /* 0x9b:                   */

{ 0,0x0000}, /* 0x9c:                   */

{ 0,0x0000}, /* 0x9d:                   */

{ 0,0x0000}, /* 0x9e:                   */

{ 0,0x0000}, /* 0x9f:                   */

{ 0,0x0000}, /* 0xa0:                   */

{ 9,0x01f8}, /* 0xa1:         111111000 */

{16,0xffc9}, /* 0xa2:  1111111111001001 */

{16,0xffca}, /* 0xa3:  1111111111001010 */

{16,0xffcb}, /* 0xa4:  1111111111001011 */

{16,0xffcc}, /* 0xa5:  1111111111001100 */

{16,0xffcd}, /* 0xa6:  1111111111001101 */

{16,0xffce}, /* 0xa7:  1111111111001110 */

{16,0xffcf}, /* 0xa8:  1111111111001111 */

{16,0xffd0}, /* 0xa9:  1111111111010000 */

{16,0xffd1}, /* 0xaa:  1111111111010001 */

{ 0,0x0000}, /* 0xab:                   */

{ 0,0x0000}, /* 0xac:                   */

{ 0,0x0000}, /* 0xad:                   */

{ 0,0x0000}, /* 0xae:                   */

{ 0,0x0000}, /* 0xaf:                   */

{ 0,0x0000}, /* 0xb0:                   */

{ 9,0x01f9}, /* 0xb1:         111111001 */

{16,0xffd2}, /* 0xb2:  1111111111010010 */

{16,0xffd3}, /* 0xb3:  1111111111010011 */

{16,0xffd4}, /* 0xb4:  1111111111010100 */

{16,0xffd5}, /* 0xb5:  1111111111010101 */

{16,0xffd6}, /* 0xb6:  1111111111010110 */

{16,0xffd7}, /* 0xb7:  1111111111010111 */

{16,0xffd8}, /* 0xb8:  1111111111011000 */

{16,0xffd9}, /* 0xb9:  1111111111011001 */

{16,0xffda}, /* 0xba:  1111111111011010 */

{ 0,0x0000}, /* 0xbb:                   */

{ 0,0x0000}, /* 0xbc:                   */

{ 0,0x0000}, /* 0xbd:                   */

{ 0,0x0000}, /* 0xbe:                   */

{ 0,0x0000}, /* 0xbf:                   */

{ 0,0x0000}, /* 0xc0:                   */

{ 9,0x01fa}, /* 0xc1:         111111010 */

{16,0xffdb}, /* 0xc2:  1111111111011011 */

{16,0xffdc}, /* 0xc3:  1111111111011100 */

{16,0xffdd}, /* 0xc4:  1111111111011101 */

{16,0xffde}, /* 0xc5:  1111111111011110 */

{16,0xffdf}, /* 0xc6:  1111111111011111 */

{16,0xffe0}, /* 0xc7:  1111111111100000 */

{16,0xffe1}, /* 0xc8:  1111111111100001 */

{16,0xffe2}, /* 0xc9:  1111111111100010 */

{16,0xffe3}, /* 0xca:  1111111111100011 */

{ 0,0x0000}, /* 0xcb:                   */

{ 0,0x0000}, /* 0xcc:                   */

{ 0,0x0000}, /* 0xcd:                   */

{ 0,0x0000}, /* 0xce:                   */

{ 0,0x0000}, /* 0xcf:                   */

{ 0,0x0000}, /* 0xd0:                   */

{11,0x07f9}, /* 0xd1:       11111111001 */

{16,0xffe4}, /* 0xd2:  1111111111100100 */

{16,0xffe5}, /* 0xd3:  1111111111100101 */

{16,0xffe6}, /* 0xd4:  1111111111100110 */

{16,0xffe7}, /* 0xd5:  1111111111100111 */

{16,0xffe8}, /* 0xd6:  1111111111101000 */

{16,0xffe9}, /* 0xd7:  1111111111101001 */

{16,0xffea}, /* 0xd8:  1111111111101010 */

{16,0xffeb}, /* 0xd9:  1111111111101011 */

{16,0xffec}, /* 0xda:  1111111111101100 */

{ 0,0x0000}, /* 0xdb:                   */

{ 0,0x0000}, /* 0xdc:                   */

{ 0,0x0000}, /* 0xdd:                   */

{ 0,0x0000}, /* 0xde:                   */

{ 0,0x0000}, /* 0xdf:                   */

{ 0,0x0000}, /* 0xe0:                   */

{14,0x3fe0}, /* 0xe1:    11111111100000 */

{16,0xffed}, /* 0xe2:  1111111111101101 */

{16,0xffee}, /* 0xe3:  1111111111101110 */

{16,0xffef}, /* 0xe4:  1111111111101111 */

{16,0xfff0}, /* 0xe5:  1111111111110000 */

{16,0xfff1}, /* 0xe6:  1111111111110001 */

{16,0xfff2}, /* 0xe7:  1111111111110010 */

{16,0xfff3}, /* 0xe8:  1111111111110011 */

{16,0xfff4}, /* 0xe9:  1111111111110100 */

{16,0xfff5}, /* 0xea:  1111111111110101 */

{ 0,0x0000}, /* 0xeb:                   */

{ 0,0x0000}, /* 0xec:                   */

{ 0,0x0000}, /* 0xed:                   */

{ 0,0x0000}, /* 0xee:                   */

{ 0,0x0000}, /* 0xef:                   */

{10,0x03fa}, /* 0xf0:        1111111010 */

{15,0x7fc3}, /* 0xf1:   111111111000011 */

{16,0xfff6}, /* 0xf2:  1111111111110110 */

{16,0xfff7}, /* 0xf3:  1111111111110111 */

{16,0xfff8}, /* 0xf4:  1111111111111000 */

{16,0xfff9}, /* 0xf5:  1111111111111001 */

{16,0xfffa}, /* 0xf6:  1111111111111010 */

{16,0xfffb}, /* 0xf7:  1111111111111011 */

{16,0xfffc}, /* 0xf8:  1111111111111100 */

{16,0xfffd}, /* 0xf9:  1111111111111101 */

{16,0xfffe}, /* 0xfa:  1111111111111110 */

{ 0,0x0000}, /* 0xfb:                   */

{ 0,0x0000}, /* 0xfc:                   */

{ 0,0x0000}, /* 0xfd:                   */

{ 0,0x0000}, /* 0xfe:                   */

{ 0,0x0000}  /* 0xff:                   */

你可能感兴趣的:(图像处理)