kolibrios/programs/develop/libraries/libs-dev/libimg/tiff/huffman.asm
Ivan Baravy 0808796ed5 libimg:
1. tiff (baseline) support
2. pnm (portable anymap) bilevel, grayscale (8bpp), pixmap (24bpp) support
3. xcf: optional layer merging/blending with sse (default is mmx)
4'. new formatting for my old code. more readable for now


git-svn-id: svn://kolibrios.org@2388 a494cfbc-eb01-0410-851d-a64ba20cac60
2012-02-23 22:09:09 +00:00

431 lines
15 KiB
NASM

tiff._.huffman_tree_white.begin:
dd 0x00000000, .0
.1 dd 0x00000000, .10
.11 dd 0x00000000, .110
.111 dd 0x00000000, .1110
.1111 dd 0x80000000 + 7
.1110 dd 0x80000000 + 6
.110 dd 0x00000000, .1100
.1101 dd 0x00000000, .11010
.11011 dd 0x80000000 + 64
.11010 dd 0x00000000, .110100
.110101 dd 0x80000000 + 15
.110100 dd 0x80000000 + 14
.1100 dd 0x80000000 + 5
.10 dd 0x00000000, .100
.101 dd 0x00000000, .1010
.1011 dd 0x80000000 + 4
.1010 dd 0x00000000, .10100
.10101 dd 0x00000000, .101010
.101011 dd 0x80000000 + 17
.101010 dd 0x80000000 + 16
.10100 dd 0x80000000 + 9
.100 dd 0x00000000, .1000
.1001 dd 0x00000000, .10010
.10011 dd 0x80000000 + 8
.10010 dd 0x80000000 + 128
.1000 dd 0x80000000 + 3
.0 dd 0x00000000, .00
.01 dd 0x00000000, .010
.011 dd 0x00000000, .0110
.0111 dd 0x80000000 + 2
.0110 dd 0x00000000, .01100
.01101 dd 0x00000000, .011010
.011011 dd 0x00000000, .0110110
.0110111 dd 0x80000000 + 256
.0110110 dd 0x00000000, .01101100
.01101101 dd 0x00000000, .011011010
.011011011 dd 0x80000000 + 1408
.011011010 dd 0x80000000 + 1344
.01101100 dd 0x00000000, .011011000
.011011001 dd 0x80000000 + 1280
.011011000 dd 0x80000000 + 1216
.011010 dd 0x00000000, .0110100
.0110101 dd 0x00000000, .01101010
.01101011 dd 0x00000000, .011010110
.011010111 dd 0x80000000 + 1152
.011010110 dd 0x80000000 + 1088
.01101010 dd 0x00000000, .011010100
.011010101 dd 0x80000000 + 1024
.011010100 dd 0x80000000 + 960
.0110100 dd 0x00000000, .01101000
.01101001 dd 0x00000000, .011010010
.011010011 dd 0x80000000 + 896
.011010010 dd 0x80000000 + 832
.01101000 dd 0x80000000 + 576
.01100 dd 0x00000000, .011000
.011001 dd 0x00000000, .0110010
.0110011 dd 0x00000000, .01100110
.01100111 dd 0x80000000 + 640
.01100110 dd 0x00000000, .011001100
.011001101 dd 0x80000000 + 768
.011001100 dd 0x80000000 + 704
.0110010 dd 0x00000000, .01100100
.01100101 dd 0x80000000 + 512
.01100100 dd 0x80000000 + 448
.011000 dd 0x80000000 + 1664
.010 dd 0x00000000, .0100
.0101 dd 0x00000000, .01010
.01011 dd 0x00000000, .010110
.010111 dd 0x80000000 + 192
.010110 dd 0x00000000, .0101100
.0101101 dd 0x00000000, .01011010
.01011011 dd 0x80000000 + 58
.01011010 dd 0x80000000 + 57
.0101100 dd 0x00000000, .01011000
.01011001 dd 0x80000000 + 56
.01011000 dd 0x80000000 + 55
.01010 dd 0x00000000, .010100
.010101 dd 0x00000000, .0101010
.0101011 dd 0x80000000 + 25
.0101010 dd 0x00000000, .01010100
.01010101 dd 0x80000000 + 52
.01010100 dd 0x80000000 + 51
.010100 dd 0x00000000, .0101000
.0101001 dd 0x00000000, .01010010
.01010011 dd 0x80000000 + 50
.01010010 dd 0x80000000 + 49
.0101000 dd 0x80000000 + 24
.0100 dd 0x00000000, .01000
.01001 dd 0x00000000, .010010
.010011 dd 0x00000000, .0100110
.0100111 dd 0x80000000 + 18
.0100110 dd 0x00000000, .01001100
.01001101 dd 0x00000000, .010011010
.010011011 dd 0x80000000 + 1728
.010011010 dd 0x80000000 + 1600
.01001100 dd 0x00000000, .010011000
.010011001 dd 0x80000000 + 1536
.010011000 dd 0x80000000 + 1472
.010010 dd 0x00000000, .0100100
.0100101 dd 0x00000000, .01001010
.01001011 dd 0x80000000 + 60
.01001010 dd 0x80000000 + 59
.0100100 dd 0x80000000 + 27
.01000 dd 0x80000000 + 11
.00 dd 0x00000000, .000
.001 dd 0x00000000, .0010
.0011 dd 0x00000000, .00110
.00111 dd 0x80000000 + 10
.00110 dd 0x00000000, .001100
.001101 dd 0x00000000, .0011010
.0011011 dd 0x00000000, .00110110
.00110111 dd 0x80000000 + 384
.00110110 dd 0x80000000 + 320
.0011010 dd 0x00000000, .00110100
.00110101 dd 0x80000000 + 0
.00110100 dd 0x80000000 + 63
.001100 dd 0x00000000, .0011000
.0011001 dd 0x00000000, .00110010
.00110011 dd 0x80000000 + 62
.00110010 dd 0x80000000 + 61
.0011000 dd 0x80000000 + 28
.0010 dd 0x00000000, .00100
.00101 dd 0x00000000, .001010
.001011 dd 0x00000000, .0010110
.0010111 dd 0x80000000 + 21
.0010110 dd 0x00000000, .00101100
.00101101 dd 0x80000000 + 44
.00101100 dd 0x80000000 + 43
.001010 dd 0x00000000, .0010100
.0010101 dd 0x00000000, .00101010
.00101011 dd 0x80000000 + 42
.00101010 dd 0x80000000 + 41
.0010100 dd 0x00000000, .00101000
.00101001 dd 0x80000000 + 40
.00101000 dd 0x80000000 + 39
.00100 dd 0x00000000, .001000
.001001 dd 0x00000000, .0010010
.0010011 dd 0x80000000 + 26
.0010010 dd 0x00000000, .00100100
.00100101 dd 0x80000000 + 54
.00100100 dd 0x80000000 + 53
.001000 dd 0x80000000 + 12
.000 dd 0x00000000, .0000
.0001 dd 0x00000000, .00010
.00011 dd 0x00000000, .000110
.000111 dd 0x80000000 + 1
.000110 dd 0x00000000, .0001100
.0001101 dd 0x00000000, .00011010
.00011011 dd 0x80000000 + 32
.00011010 dd 0x80000000 + 31
.0001100 dd 0x80000000 + 19
.00010 dd 0x00000000, .000100
.000101 dd 0x00000000, .0001010
.0001011 dd 0x00000000, .00010110
.00010111 dd 0x80000000 + 38
.00010110 dd 0x80000000 + 37
.0001010 dd 0x00000000, .00010100
.00010101 dd 0x80000000 + 36
.00010100 dd 0x80000000 + 35
.000100 dd 0x00000000, .0001000
.0001001 dd 0x00000000, .00010010
.00010011 dd 0x80000000 + 34
.00010010 dd 0x80000000 + 33
.0001000 dd 0x80000000 + 20
.0000 dd 0x00000000, .00000
.00001 dd 0x00000000, .000010
.000011 dd 0x80000000 + 13
.000010 dd 0x00000000, .0000100
.0000101 dd 0x00000000, .00001010
.00001011 dd 0x80000000 + 48
.00001010 dd 0x80000000 + 47
.0000100 dd 0x80000000 + 23
.00000 dd 0x00000000, .000000
.000001 dd 0x00000000, .0000010
.0000011 dd 0x80000000 + 22
.0000010 dd 0x00000000, .00000100
.00000101 dd 0x80000000 + 46
.00000100 dd 0x80000000 + 45
.000000 dd 0x00000000, .0000000
.0000001 dd 0x00000000, .00000010
.00000011 dd 0x80000000 + 30
.00000010 dd 0x80000000 + 29
.0000000 dd 0x00000000, .00000000
.00000001 dd 0x00000000, .000000010
.000000011 dd 0x00000000, .0000000110
.0000000111 dd 0x00000000, .00000001110
.00000001111 dd 0x00000000, .000000011110
.000000011111 dd 0x80000000 + 2560
.000000011110 dd 0x80000000 + 2496
.00000001110 dd 0x00000000, .000000011100
.000000011101 dd 0x80000000 + 2432
.000000011100 dd 0x80000000 + 2368
.0000000110 dd 0x00000000, .00000001100
.00000001101 dd 0x80000000 + 1920
.00000001100 dd 0x80000000 + 1856
.000000010 dd 0x00000000, .0000000100
.0000000101 dd 0x00000000, .00000001010
.00000001011 dd 0x00000000, .000000010110
.000000010111 dd 0x80000000 + 2304
.000000010110 dd 0x80000000 + 2240
.00000001010 dd 0x00000000, .000000010100
.000000010101 dd 0x80000000 + 2176
.000000010100 dd 0x80000000 + 2112
.0000000100 dd 0x00000000, .00000001000
.00000001001 dd 0x00000000, .000000010010
.000000010011 dd 0x80000000 + 2048
.000000010010 dd 0x80000000 + 1984
.00000001000 dd 0x80000000 + 1792
.00000000 dd 0x00000010, .000000000
.000000000 dd 0x00000010, .0000000000
.0000000000 dd 0x00000010, .00000000000
.00000000000 dd 0x00000011, .000000000001
.000000000001 dd 0x80000000 + 0xffff
tiff._.huffman_tree_white.end:
tiff._.huffman_tree_black.begin:
dd 0x00000000, .0
.1 dd 0x00000000, .10
.11 dd 0x80000000 + 2
.10 dd 0x80000000 + 3
.0 dd 0x00000000, .00
.01 dd 0x00000000, .010
.011 dd 0x80000000 + 4
.010 dd 0x80000000 + 1
.00 dd 0x00000000, .000
.001 dd 0x00000000, .0010
.0011 dd 0x80000000 + 5
.0010 dd 0x80000000 + 6
.000 dd 0x00000000, .0000
.0001 dd 0x00000000, .00010
.00011 dd 0x80000000 + 7
.00010 dd 0x00000000, .000100
.000101 dd 0x80000000 + 8
.000100 dd 0x80000000 + 9
.0000 dd 0x00000000, .00000
.00001 dd 0x00000000, .000010
.000011 dd 0x00000000, .0000110
.0000111 dd 0x80000000 + 12
.0000110 dd 0x00000000, .00001100
.00001101 dd 0x00000000, .000011010
.000011011 dd 0x00000000, .0000110110
.0000110111 dd 0x80000000 + 0
.0000110110 dd 0x00000000, .00001101100
.00001101101 dd 0x00000000, .000011011010
.000011011011 dd 0x80000000 + 43
.000011011010 dd 0x80000000 + 42
.00001101100 dd 0x80000000 + 21
.000011010 dd 0x00000000, .0000110100
.0000110101 dd 0x00000000, .00001101010
.00001101011 dd 0x00000000, .000011010110
.000011010111 dd 0x80000000 + 39
.000011010110 dd 0x80000000 + 38
.00001101010 dd 0x00000000, .000011010100
.000011010101 dd 0x80000000 + 37
.000011010100 dd 0x80000000 + 36
.0000110100 dd 0x00000000, .00001101000
.00001101001 dd 0x00000000, .000011010010
.000011010011 dd 0x80000000 + 35
.000011010010 dd 0x80000000 + 34
.00001101000 dd 0x80000000 + 20
.00001100 dd 0x00000000, .000011000
.000011001 dd 0x00000000, .0000110010
.0000110011 dd 0x00000000, .00001100110
.00001100111 dd 0x80000000 + 19
.00001100110 dd 0x00000000, .000011001100
.000011001101 dd 0x80000000 + 29
.000011001100 dd 0x80000000 + 28
.0000110010 dd 0x00000000, .00001100100
.00001100101 dd 0x00000000, .000011001010
.000011001011 dd 0x80000000 + 27
.000011001010 dd 0x80000000 + 26
.00001100100 dd 0x00000000, .000011001000
.000011001001 dd 0x80000000 + 192
.000011001000 dd 0x80000000 + 128
.000011000 dd 0x80000000 + 15
.000010 dd 0x00000000, .0000100
.0000101 dd 0x80000000 + 11
.0000100 dd 0x80000000 + 10
.00000 dd 0x00000000, .000000
.000001 dd 0x00000000, .0000010
.0000011 dd 0x00000000, .00000110
.00000111 dd 0x80000000 + 14
.00000110 dd 0x00000000, .000001100
.000001101 dd 0x00000000, .0000011010
.0000011011 dd 0x00000000, .00000110110
.00000110111 dd 0x80000000 + 22
.00000110110 dd 0x00000000, .000001101100
.000001101101 dd 0x80000000 + 41
.000001101100 dd 0x80000000 + 40
.0000011010 dd 0x00000000, .00000110100
.00000110101 dd 0x00000000, .000001101010
.000001101011 dd 0x80000000 + 33
.000001101010 dd 0x80000000 + 32
.00000110100 dd 0x00000000, .000001101000
.000001101001 dd 0x80000000 + 31
.000001101000 dd 0x80000000 + 30
.000001100 dd 0x00000000, .0000011000
.0000011001 dd 0x00000000, .00000110010
.00000110011 dd 0x00000000, .000001100110
.000001100111 dd 0x80000000 + 63
.000001100110 dd 0x80000000 + 62
.00000110010 dd 0x00000000, .000001100100
.000001100101 dd 0x80000000 + 49
.000001100100 dd 0x80000000 + 48
.0000011000 dd 0x80000000 + 17
.0000010 dd 0x00000000, .00000100
.00000101 dd 0x00000000, .000001010
.000001011 dd 0x00000000, .0000010110
.0000010111 dd 0x80000000 + 16
.0000010110 dd 0x00000000, .00000101100
.00000101101 dd 0x00000000, .000001011010
.000001011011 dd 0x80000000 + 256
.000001011010 dd 0x80000000 + 61
.00000101100 dd 0x00000000, .000001011000
.000001011001 dd 0x80000000 + 58
.000001011000 dd 0x80000000 + 57
.000001010 dd 0x00000000, .0000010100
.0000010101 dd 0x00000000, .00000101010
.00000101011 dd 0x00000000, .000001010110
.000001010111 dd 0x80000000 + 47
.000001010110 dd 0x80000000 + 46
.00000101010 dd 0x00000000, .000001010100
.000001010101 dd 0x80000000 + 45
.000001010100 dd 0x80000000 + 44
.0000010100 dd 0x00000000, .00000101000
.00000101001 dd 0x00000000, .000001010010
.000001010011 dd 0x80000000 + 51
.000001010010 dd 0x80000000 + 50
.00000101000 dd 0x80000000 + 23
.00000100 dd 0x80000000 + 13
.000000 dd 0x00000000, .0000000
.0000001 dd 0x00000000, .00000010
.00000011 dd 0x00000000, .000000110
.000000111 dd 0x00000000, .0000001110
.0000001111 dd 0x80000000 + 64
.0000001110 dd 0x00000000, .00000011100
.00000011101 dd 0x00000000, .000000111010
.000000111011 dd 0x00000000, .0000001110110
.0000001110111 dd 0x80000000 + 1216
.0000001110110 dd 0x80000000 + 1152
.000000111010 dd 0x00000000, .0000001110100
.0000001110101 dd 0x80000000 + 1088
.0000001110100 dd 0x80000000 + 1024
.00000011100 dd 0x00000000, .000000111000
.000000111001 dd 0x00000000, .0000001110010
.0000001110011 dd 0x80000000 + 960
.0000001110010 dd 0x80000000 + 896
.000000111000 dd 0x80000000 + 54
.000000110 dd 0x00000000, .0000001100
.0000001101 dd 0x00000000, .00000011010
.00000011011 dd 0x00000000, .000000110110
.000000110111 dd 0x80000000 + 53
.000000110110 dd 0x00000000, .0000001101100
.0000001101101 dd 0x80000000 + 576
.0000001101100 dd 0x80000000 + 512
.00000011010 dd 0x00000000, .000000110100
.000000110101 dd 0x80000000 + 448
.000000110100 dd 0x80000000 + 384
.0000001100 dd 0x00000000, .00000011000
.00000011001 dd 0x00000000, .000000110010
.000000110011 dd 0x80000000 + 320
.000000110010 dd 0x00000000, .0000001100100
.0000001100101 dd 0x80000000 + 1728
.0000001100100 dd 0x80000000 + 1664
.00000011000 dd 0x80000000 + 25
.00000010 dd 0x00000000, .000000100
.000000101 dd 0x00000000, .0000001010
.0000001011 dd 0x00000000, .00000010110
.00000010111 dd 0x80000000 + 24
.00000010110 dd 0x00000000, .000000101100
.000000101101 dd 0x00000000, .0000001011010
.0000001011011 dd 0x80000000 + 1600
.0000001011010 dd 0x80000000 + 1536
.000000101100 dd 0x80000000 + 60
.0000001010 dd 0x00000000, .00000010100
.00000010101 dd 0x00000000, .000000101010
.000000101011 dd 0x80000000 + 59
.000000101010 dd 0x00000000, .0000001010100
.0000001010101 dd 0x80000000 + 1472
.0000001010100 dd 0x80000000 + 1408
.00000010100 dd 0x00000000, .000000101000
.000000101001 dd 0x00000000, .0000001010010
.0000001010011 dd 0x80000000 + 1344
.0000001010010 dd 0x80000000 + 1280
.000000101000 dd 0x80000000 + 56
.000000100 dd 0x00000000, .0000001000
.0000001001 dd 0x00000000, .00000010010
.00000010011 dd 0x00000000, .000000100110
.000000100111 dd 0x80000000 + 55
.000000100110 dd 0x00000000, .0000001001100
.0000001001101 dd 0x80000000 + 832
.0000001001100 dd 0x80000000 + 768
.00000010010 dd 0x00000000, .000000100100
.000000100101 dd 0x00000000, .0000001001010
.0000001001011 dd 0x80000000 + 704
.0000001001010 dd 0x80000000 + 640
.000000100100 dd 0x80000000 + 52
.0000001000 dd 0x80000000 + 18
.0000000 dd 0x00000000, .00000000
.00000001 dd 0x00000000, .000000010
.000000011 dd 0x00000000, .0000000110
.0000000111 dd 0x00000000, .00000001110
.00000001111 dd 0x00000000, .000000011110
.000000011111 dd 0x80000000 + 2560
.000000011110 dd 0x80000000 + 2496
.00000001110 dd 0x00000000, .000000011100
.000000011101 dd 0x80000000 + 2432
.000000011100 dd 0x80000000 + 2368
.0000000110 dd 0x00000000, .00000001100
.00000001101 dd 0x80000000 + 1920
.00000001100 dd 0x80000000 + 1856
.000000010 dd 0x00000000, .0000000100
.0000000101 dd 0x00000000, .00000001010
.00000001011 dd 0x00000000, .000000010110
.000000010111 dd 0x80000000 + 2304
.000000010110 dd 0x80000000 + 2240
.00000001010 dd 0x00000000, .000000010100
.000000010101 dd 0x80000000 + 2176
.000000010100 dd 0x80000000 + 2112
.0000000100 dd 0x00000000, .00000001000
.00000001001 dd 0x00000000, .000000010010
.000000010011 dd 0x80000000 + 2048
.000000010010 dd 0x80000000 + 1984
.00000001000 dd 0x80000000 + 1792
.00000000 dd 0x00000010, .000000000
.000000000 dd 0x00000010, .0000000000
.0000000000 dd 0x00000010, .00000000000
.00000000000 dd 0x80000000 + 0xffff
tiff._.huffman_tree_black.end: