Comparar commits
1818 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 6484732509 | |||
| 54f96f045e | |||
| 4224a64264 | |||
| 65c6b81cbc | |||
| 9a08b7be45 | |||
| f2af0e7a57 | |||
| 4ac5223afa | |||
| 828faf4e68 | |||
| 63ee26adda | |||
| 4a2f626d85 | |||
| dbb5a32453 | |||
| 42471c082f | |||
| 97cab339d2 | |||
| a04ef08602 | |||
| 2b7d65d078 | |||
| 61ed591728 | |||
| 1c77f0abfe | |||
| 2efd9b6ad7 | |||
| c5fb2de887 | |||
| 7a5b9a6b7f | |||
| 5ce9965459 | |||
| 358fcbd5b6 | |||
| 09dec4e873 | |||
| 334f6344dd | |||
| 9b92de9a88 | |||
| 57fc5e00f3 | |||
| 3d0c08816d | |||
| 9a01532caa | |||
| d9d4e8df6f | |||
| e3be5f138a | |||
| 34896529d5 | |||
| fd4909360f | |||
| 7267d518d5 | |||
| fc085d9dbd | |||
| a1a2cb0aeb | |||
| b5ecb1d32d | |||
| 74fe158f4b | |||
| a1c96c4b3c | |||
| 3e10e057cb | |||
| f15e49041e | |||
| 849a8c8d20 | |||
| 2045c85ad5 | |||
| da31e12fed | |||
| adc1d94e95 | |||
| 78fd99abdb | |||
| 08ff5f92f4 | |||
| f593616b84 | |||
| e475010e14 | |||
| 3fb90abb76 | |||
| f05f374fb5 | |||
| 3eb4e38735 | |||
| 23bd673598 | |||
| cdc4679b3e | |||
| b0106ca25e | |||
| 0be590d898 | |||
| f3a158c862 | |||
| 9ccdd17376 | |||
| 63bd6f9adf | |||
| d495daf1ed | |||
| ad982f4ed6 | |||
| fcad269e53 | |||
| 84934f7bfc | |||
| d936f06297 | |||
| 83d8bc8c55 | |||
| 016b2cadb0 | |||
| 9217095955 | |||
| bbb2d27add | |||
| 63397e825c | |||
| 42414b5689 | |||
| 2b0072d823 | |||
| 673aa91bac | |||
| 12747068b5 | |||
| ca20228956 | |||
| 6c5922542e | |||
| 734b0da014 | |||
| ae10ecd264 | |||
| e7e14b20cd | |||
| 293063eed3 | |||
| 680fba7e0d | |||
| 4f0f6686d1 | |||
| a94e80bea3 | |||
| 76bcf72ded | |||
| d6aa3bd8ed | |||
| 080b9bbcd3 | |||
| b88323afc3 | |||
| 9b149edde6 | |||
| c1d42664bc | |||
| a942747046 | |||
| 4c06d0834e | |||
| 84856fa2c1 | |||
| a5ee07d340 | |||
| 898320a0f6 | |||
| c64ee44c9e | |||
| 2fd8b51a26 | |||
| d9ea16ce57 | |||
| 873f47654a | |||
| 31763bdcf0 | |||
| 50500e5923 | |||
| 641ee645ab | |||
| 9029acf6f0 | |||
| 68ab3d5be6 | |||
| 8393fd0c9d | |||
| f8bcff8ff3 | |||
| 09901fae2b | |||
| cc3430dbcc | |||
| cd152c3a03 | |||
| 5f1339b319 | |||
| a32004f90c | |||
| 1a500813f6 | |||
| ac96bb357c | |||
| 9751014067 | |||
| afc79e2a02 | |||
| 0072078857 | |||
| 1d8729a7aa | |||
| 15b7b01243 | |||
| 6f08d03322 | |||
| 08e4298a96 | |||
| cd320565dd | |||
| 2d6ff8e946 | |||
| e9ba5c225d | |||
| ed00642600 | |||
| e64bb3654a | |||
| 585f3bc391 | |||
| b45a870d9a | |||
| c13eb07d47 | |||
| 22e352d9cc | |||
| fbe0d6963c | |||
| 781d89829f | |||
| 2e91405833 | |||
| 40030d2ca0 | |||
| 15076f9232 | |||
| d0ec65e80c | |||
| bfa466dcbd | |||
| 9900f8deb2 | |||
| ecb707ca7b | |||
| 769f61f8c7 | |||
| d1d6ce63fc | |||
| eea6fe8e7f | |||
| 1770ba1df7 | |||
| 8e2f729aa7 | |||
| 5df77a841e | |||
| b14f447cc6 | |||
| 99c666691e | |||
| 72c93dabd3 | |||
| b6a2717c2b | |||
| 59452dfc6f | |||
| 40a30b6f30 | |||
| d652cc72f2 | |||
| 2dba13f7d4 | |||
| 8fb6d9f650 | |||
| 546ec2af65 | |||
| 09abcd567e | |||
| 7173c82382 | |||
| ec8fb32336 | |||
| 34b4a35ea7 | |||
| 9a97c74ef3 | |||
| 49397f7946 | |||
| 1341c64290 | |||
| 65d07c56fb | |||
| e1c3ffb23f | |||
| 80f9bd864f | |||
| c40718ab61 | |||
| 908f25bc43 | |||
| 634fedc3cb | |||
| f5742e6cac | |||
| 461b69f6ee | |||
| 57d077b936 | |||
| 04384a71e4 | |||
| f75946a16a | |||
| 69020da607 | |||
| f4e33ea0ba | |||
| 7225f89ea2 | |||
| e5437e5486 | |||
| ed51162568 | |||
| 42c8a42ad3 | |||
| a07cc84436 | |||
| 26bcb3812c | |||
| 971d02cde6 | |||
| edee177ef1 | |||
| 7d6a2f1bca | |||
| 0dc3d61071 | |||
| 5a730d09cd | |||
| 88e9a072ec | |||
| 64b56d7018 | |||
| ebac3a02aa | |||
| d566c6bc86 | |||
| 52e490ef88 | |||
| 58f31819cc | |||
| dbd30d4fba | |||
| a3b1971977 | |||
| 3ffe0f0117 | |||
| c3881ede62 | |||
| aedf56404e | |||
| 5b2271c6fb | |||
| 78a0b9787c | |||
| 460644b8a4 | |||
| b54f59de90 | |||
| 2cda65a782 | |||
| 5f9aedbe01 | |||
| f9ac5e2404 | |||
| c1f2b1fcc4 | |||
| cfe28e3b73 | |||
| e770691522 | |||
| de98da42f7 | |||
| 84176fa027 | |||
| fa368d6202 | |||
| 5474b4d4bc | |||
| 319e861cf2 | |||
| 8d7ac8ad19 | |||
| 800cb9d0e6 | |||
| 4500c48349 | |||
| 5dd1ec98f7 | |||
| b91ca6a73f | |||
| 7bbf8744d6 | |||
| cb58e5a3a4 | |||
| 296aa7c4fb | |||
| 1d3ec99102 | |||
| 2abb67cc92 | |||
| 2e7656dbdf | |||
| 83799d6bf4 | |||
| 304714862f | |||
| 8abcad6b00 | |||
| a390c1e2e6 | |||
| 594ce1c869 | |||
| caebcdcb3d | |||
| a3a658c034 | |||
| bddd06e6c4 | |||
| d64438dcfd | |||
| 8441cf700d | |||
| d72cc06b96 | |||
| 354a5f2686 | |||
| 821de96346 | |||
| b8a67dc0e3 | |||
| 5a524bdfd7 | |||
| a2088d0c52 | |||
| 97640847c5 | |||
| 18295bc778 | |||
| 8f44f25f47 | |||
| a3080636ba | |||
| f41ab3a330 | |||
| 0c70b45625 | |||
| c46affe63e | |||
| 7cb525d63f | |||
| dc4a649513 | |||
| be98693aaf | |||
| df94591336 | |||
| 7ee6040192 | |||
| e435674a90 | |||
| f1e025dc68 | |||
| eb189713ae | |||
| bd4620f04e | |||
| 43e3b83832 | |||
| 8528b0abcd | |||
| 56d3cad326 | |||
| 97156897b2 | |||
| 69fbc6102c | |||
| 1f21b96b9d | |||
| 37ad10bf0d | |||
| 63c9412922 | |||
| 1d68850cb2 | |||
| 354b77e2e1 | |||
| d6a8753124 | |||
| d40083a926 | |||
| 423837ddae | |||
| 0e314163e5 | |||
| 2f4e8ee73e | |||
| 3f61b9792b | |||
| a008d6fc17 | |||
| 9368aa9f7b | |||
| e80cbbb101 | |||
| b28acfc12e | |||
| f88be98ec4 | |||
| 715a0032e0 | |||
| 45190aea47 | |||
| 2243645d36 | |||
| 3de2023c61 | |||
| dce323a67b | |||
| d7ef6f078f | |||
| 3dbfde421c | |||
| 2a277fb777 | |||
| 1e344d7eba | |||
| e46e928429 | |||
| f5d6367ea1 | |||
| 10f1004465 | |||
| a9ab26f799 | |||
| ece77e3930 | |||
| e625d86485 | |||
| 1516a6169a | |||
| cc2d12b3e6 | |||
| a91de25f10 | |||
| 9ad5fd709b | |||
| 006a4ba529 | |||
| cabddaeb4f | |||
| e83ff354bd | |||
| a245161de6 | |||
| 36135fc59d | |||
| 306ed9801a | |||
| a9f36dfcfe | |||
| 56b27bcc7e | |||
| 044d38a051 | |||
| e365726c4a | |||
| a09c88ab16 | |||
| 89de0bebd8 | |||
| 3243ad3483 | |||
| 0afd51253d | |||
| 34bfda10ca | |||
| 8ebd04cbf9 | |||
| 4a53199e7a | |||
| 7cc67701a6 | |||
| 39d6eb7312 | |||
| d970a9159e | |||
| e8a173bcaf | |||
| 9b8c47399a | |||
| 5047f2d64d | |||
| 95b6a103b5 | |||
| 5a5c477be6 | |||
| d4cf9e22cc | |||
| b95923360d | |||
| 9a76573172 | |||
| 705b4724cb | |||
| b0ad424087 | |||
| a135e862c1 | |||
| df8364ce63 | |||
| d54f4e1cfb | |||
| a8c5e35619 | |||
| e2ff0ed1fb | |||
| c146c54bcd | |||
| f8672d49a0 | |||
| 7c71c8fa52 | |||
| 9ab19691d4 | |||
| 4b808b1199 | |||
| 408e0dcbd0 | |||
| c9bcbda827 | |||
| 91a1a71de2 | |||
| a310e2f027 | |||
| a63669f819 | |||
| ca6f2f080f | |||
| 4be8fd7253 | |||
| 0bfa58b68d | |||
| bc0d0c8f31 | |||
| 13bfcd643e | |||
| a3ab6d147d | |||
| 4be7619ce4 | |||
| 618fbf5508 | |||
| 5b31c46c4f | |||
| 9a4265a8d0 | |||
| 4b5bbb7752 | |||
| 2446c9329f | |||
| 8c8ebd9ca6 | |||
| 6151a6ea0b | |||
| 94b97b7a63 | |||
| 25a9b0a255 | |||
| c0f2a8e0cc | |||
| febfdc9fa2 | |||
| 11839e2cc9 | |||
| 601b87e3ed | |||
| cb705aad1a | |||
| 925d0cc769 | |||
| 280ecb68bf | |||
| 2759f026e9 | |||
| 6b19c76233 | |||
| b486a59221 | |||
| 23699acca0 | |||
| 2ec264303e | |||
| c0638aa2e0 | |||
| 73cb77842e | |||
| 2885eb86b8 | |||
| f017ad5943 | |||
| be19150672 | |||
| ab3a5244ba | |||
| 9085fbe1e0 | |||
| 3ebec7448d | |||
| a703df5456 | |||
| 2fd8ad65b9 | |||
| 9218bdcbb4 | |||
| 8d07e92b2c | |||
| cfc09d01c8 | |||
| 5d9d4659ad | |||
| aa400c5837 | |||
| 06a13d9ba0 | |||
| d40a2c28c5 | |||
| 5ffbcf1e16 | |||
| ad58e96581 | |||
| d64d76086e | |||
| 11367e2c3d | |||
| b2bf90e951 | |||
| 4df537bc1c | |||
| 55b1d7c097 | |||
| 46874d40df | |||
| c560a78c65 | |||
| 45593030ab | |||
| 57d9699058 | |||
| a4adf57edc | |||
| c9f1490302 | |||
| 420dd22258 | |||
| dc568d4de1 | |||
| ae4ff999d7 | |||
| 5cf6c5f0b2 | |||
| 06e7101795 | |||
| a8e7f91e34 | |||
| 9ee87bd04b | |||
| c6e741196a | |||
| ed6885dd8b | |||
| eafb024112 | |||
| 8c1550a4ec | |||
| 7236858bea | |||
| 56200dbd37 | |||
| 4e193a3380 | |||
| 317a27e9eb | |||
| 60769f544f | |||
| 6308be2c3e | |||
| b8c185de9f | |||
| 6a3d5a1355 | |||
| f059899329 | |||
| dffba48517 | |||
| 854902b077 | |||
| 3579c61388 | |||
| 09359982b1 | |||
| d09b3828b8 | |||
| 494ae1562d | |||
| da6e3ebff2 | |||
| bfc8a52402 | |||
| 33983bcbb7 | |||
| 0e07b0d73a | |||
| 9c89947433 | |||
| 2627c91c5e | |||
| 077115bd4a | |||
| bb589a590e | |||
| 427ce1247a | |||
| b7b32e74a5 | |||
| 222303f24b | |||
| a8ba2d7f52 | |||
| 3b075a50e9 | |||
| 0abe7f3196 | |||
| f3bc1aede1 | |||
| 46ce5976ae | |||
| 0bde00a88a | |||
| 858f437162 | |||
| 44e8d76d74 | |||
| 8f4ddad52d | |||
| bb3332508e | |||
| 6f175a3c52 | |||
| 2e36338636 | |||
| 82b30963d2 | |||
| 3bad6ac0ee | |||
| 1ded1597e7 | |||
| 738d3fef38 | |||
| 45fd6f509f | |||
| 40d5b026c7 | |||
| 56ac2937d8 | |||
| 54705a009a | |||
| c3c49a317b | |||
| f42b38ac44 | |||
| 87f282eed2 | |||
| 4e07561141 | |||
| d38359620e | |||
| bbe418427e | |||
| 2d334401b1 | |||
| d2613dd9f6 | |||
| 310bd8701c | |||
| b1d14f766d | |||
| 0105d0a241 | |||
| 92b0cc541e | |||
| ada27b54eb | |||
| 556e6c1475 | |||
| fffd263ce4 | |||
| 1017dea332 | |||
| 2a96f28bc1 | |||
| f58c5646b0 | |||
| 5ab3fe489f | |||
| 7e35838849 | |||
| 3c4917555d | |||
| a65cb5d2de | |||
| 58fb8692c3 | |||
| 03daf44848 | |||
| d9e801fbfa | |||
| 37f4ea6be7 | |||
| 7946fcdb69 | |||
| e73089bdb5 | |||
| 089de14ed7 | |||
| f32eb05ea1 | |||
| cd05d9aaad | |||
| fe0d07ae53 | |||
| ece71d6a06 | |||
| 78e89890b0 | |||
| 0e9405e591 | |||
| e9009db667 | |||
| dc5c7ee68f | |||
| d55e114f96 | |||
| 415636a677 | |||
| 8104164c78 | |||
| 9efd7019ad | |||
| 1052a0b4eb | |||
| 538847e8a3 | |||
| 4772c42c66 | |||
| 1e69d47ba5 | |||
| 04e946b2a3 | |||
| 35b671efb5 | |||
| fd77ef7ece | |||
| 7591ee1688 | |||
| af2de86914 | |||
| afe30d0f8a | |||
| ccafed3d90 | |||
| ec8b79cc91 | |||
| c09e2f88df | |||
| 656f06fa74 | |||
| 23244a3565 | |||
| e94cd1ec72 | |||
| 52ede9c84d | |||
| f22a3af483 | |||
| a699594854 | |||
| 84087a8566 | |||
| e975259c06 | |||
| 9956c42804 | |||
| f53d94c645 | |||
| 9ea5b6bb44 | |||
| bbeffcc115 | |||
| bb93651048 | |||
| b3408a9b3a | |||
| fbd9bfba47 | |||
| b1b5e392e6 | |||
| dd1091bbe1 | |||
| a201233b59 | |||
| 36f912261b | |||
| 200a81746e | |||
| 8a8e719690 | |||
| 7d4432df27 | |||
| 98c92f196e | |||
| 86c7e183d2 | |||
| e564a53ccd | |||
| 43a401ba19 | |||
| 1de829c359 | |||
| 7d83db7d4d | |||
| 42f7329c78 | |||
| cfa250eff5 | |||
| f268af8ef0 | |||
| a5e37779fb | |||
| 4bd2c6b50d | |||
| 0ab954a3c4 | |||
| e2d9fc4dcc | |||
| 7c13dc6cb3 | |||
| 0598f33a85 | |||
| 0efa9d4c06 | |||
| a12baf180a | |||
| da167d8f38 | |||
| c07ba32e16 | |||
| b16b50d61b | |||
| 568d9583c1 | |||
| db3a35f901 | |||
| 710e070990 | |||
| 19e1f89cd6 | |||
| 53fdae93bd | |||
| 54a202b3d5 | |||
| 6a112aa87a | |||
| 70234433d3 | |||
| b8adc04545 | |||
| b8767f5fbe | |||
| 2cc262bce4 | |||
| 04e9698685 | |||
| 186f8b7417 | |||
| 36dacc688a | |||
| 283087dd56 | |||
| 037e3ee288 | |||
| a1796469f7 | |||
| 1b6639aa3d | |||
| 3d072dce02 | |||
| 907a9101eb | |||
| 932100c5a3 | |||
| d3501f1545 | |||
| dcdbc638af | |||
| bcd0aefbca | |||
| 66ce62cd0d | |||
| 036258b8da | |||
| 9d1aa37e21 | |||
| 4e0fdf2205 | |||
| 0c10ed26e3 | |||
| ec45453baa | |||
| 5eac0419b2 | |||
| be51e5d1b1 | |||
| 07d92d9e5a | |||
| 8325a28d09 | |||
| 02b33792cb | |||
| b0c7280978 | |||
| af415085d8 | |||
| 53d219c857 | |||
| 16717a8641 | |||
| 959674618f | |||
| dea52eb730 | |||
| bf7295f584 | |||
| e17b70e533 | |||
| 93155c6ae0 | |||
| a74a2302aa | |||
| a08290d843 | |||
| 457c878538 | |||
| 8f8a69d6f5 | |||
| a3125c0b8d | |||
| ac808b51a5 | |||
| c91850ec2e | |||
| 778c31a1c8 | |||
| 67ff95083d | |||
| 6ee7ecb617 | |||
| 52581750fc | |||
| 11b403900e | |||
| c8bfc0fd89 | |||
| 0fdb55a54d | |||
| e402bb496d | |||
| 7280039d8c | |||
| 577d9cdece | |||
| 941391c0be | |||
| 867777f825 | |||
| 21a536f999 | |||
| c9dbb0d314 | |||
| 3fb3851c7a | |||
| ce4ac2d74a | |||
| 44da71daf4 | |||
| f2a486c34b | |||
| 58baf2b455 | |||
| 11bffb0e7d | |||
| ca0609dde3 | |||
| 067744d071 | |||
| fc93518449 | |||
| bd12f636c8 | |||
| 37fe2a252a | |||
| 5a6114e299 | |||
| e5f9f97954 | |||
| 1686b0d9d3 | |||
| 1fde184192 | |||
| 784c09d6f9 | |||
| c77d099018 | |||
| 1a2bbfafba | |||
| 2367a195c5 | |||
| 7ad4c25452 | |||
| 2907eec670 | |||
| ffb3842ef1 | |||
| 6f6e990988 | |||
| 11e16a7204 | |||
| ecd96c8b18 | |||
| f02c1ad688 | |||
| 9f1c10e1c5 | |||
| 52b4b5b052 | |||
| 014106783d | |||
| 85eae7b30d | |||
| 3ca0cc2253 | |||
| 84c4797030 | |||
| da1921b2fc | |||
| 92da6d381b | |||
| b325b2f9a4 | |||
| 13ded36ecb | |||
| 228070a74c | |||
| a6e2acbfee | |||
| 3d4ca2d709 | |||
| b2acf50c81 | |||
| b929012583 | |||
| 44330afc7f | |||
| 29cdddd845 | |||
| 3ae2244bd9 | |||
| a881f165ec | |||
| d8015fd6ed | |||
| 6e6cfdd024 | |||
| 70fed019ae | |||
| c7db1c1cc8 | |||
| 4157a640ba | |||
| d28af08ef3 | |||
| 35a869f6f0 | |||
| e9392d1466 | |||
| 90a3d227c9 | |||
| c6d1421f9b | |||
| ae4718558d | |||
| 3456238c16 | |||
| fba081992d | |||
| 424bc609b6 | |||
| 0ba01afd83 | |||
| a09679044e | |||
| 3d9018f019 | |||
| ee2bebf5f7 | |||
| 429e5367c4 | |||
| 14694343cb | |||
| 0adbead654 | |||
| cd59cf3ab5 | |||
| 6c3e769f32 | |||
| 4d6730dc68 | |||
| 633a8bfacc | |||
| aa2524f41e | |||
| 8dcf52c90b | |||
| 18fc11bc04 | |||
| dc6fa94118 | |||
| f56432559e | |||
| 05630b336b | |||
| 47b9640785 | |||
| 7744b1d600 | |||
| 396e4517ff | |||
| a07e33609b | |||
| e2c9e7c3fb | |||
| 0bd68a70f1 | |||
| 95d54196db | |||
| d421ec26e2 | |||
| 5ee632fe90 | |||
| cc6f1eb824 | |||
| bbbe77e05e | |||
| c0786e9d33 | |||
| bcf8dd510f | |||
| 5c01d13f38 | |||
| c78884c780 | |||
| 4449efb242 | |||
| d3f4c9b2dc | |||
| 0948f4f863 | |||
| 4aa03d4b2b | |||
| eaf75dbc95 | |||
| c9d078ab00 | |||
| a4235948a7 | |||
| d849f51023 | |||
| 4ac2c22776 | |||
| a21df069e0 | |||
| 42a4ed6ebf | |||
| ba862ffdff | |||
| e9e0668549 | |||
| ce11c0d1eb | |||
| 285af48040 | |||
| 71df8906be | |||
| ad35f317f6 | |||
| dd3b09441f | |||
| 62f9c0e140 | |||
| 3c8e151c73 | |||
| 69538c3596 | |||
| 1e25e736f0 | |||
| efc87105a3 | |||
| 526efe6724 | |||
| 8facfd4fc8 | |||
| 6946213ecf | |||
| a053f611a4 | |||
| c24549742b | |||
| 5577485755 | |||
| 2eb1a6d9d6 | |||
| 2315d5988f | |||
| 71f032699d | |||
| b29a639608 | |||
| 5c788df83a | |||
| 9e171c9e26 | |||
| 639bbec44a | |||
| b061d4847f | |||
| afe8fbb018 | |||
| 7b68271e31 | |||
| 1b5903a719 | |||
| 70204a8e68 | |||
| 9be63c50dd | |||
| 56b7ddad09 | |||
| 8c1f9bafdc | |||
| c3f277b7bc | |||
| e60a50c43c | |||
| 290030d030 | |||
| 1baf5209c4 | |||
| 5648e49d59 | |||
| fc307c87dc | |||
| c8a54f67d4 | |||
| d395bf1522 | |||
| c8b7a8c80c | |||
| 6a5d996ca8 | |||
| 4fb15ae1f0 | |||
| d9185ec21b | |||
| bbf679267a | |||
| e95bc7d502 | |||
| da5aaab277 | |||
| 92795ba476 | |||
| f2a02feffa | |||
| 793e8b546d | |||
| 64661ea9cd | |||
| a840d929ac | |||
| 10dcf9ea39 | |||
| 2f1cc018c9 | |||
| 9f016da484 | |||
| 18de45f7bc | |||
| 92edd4fc6e | |||
| 0d2b8f4ba1 | |||
| 017ab51bf4 | |||
| 5acb80a9b1 | |||
| 9314e3266c | |||
| 7eb9fa14d3 | |||
| 6bb509b44a | |||
| ca6e85f526 | |||
| 48aeaf6239 | |||
| b1811a8bf6 | |||
| 44aeff04ae | |||
| a82fc0a046 | |||
| cd062b7cc0 | |||
| 6007bbc82d | |||
| 2c7c9d0915 | |||
| 81d6400f45 | |||
| 94f7c3c592 | |||
| 35754c0c03 | |||
| ee0dd4d496 | |||
| 682dede87e | |||
| 4a1ef53deb | |||
| d8b69d750d | |||
| 8efb84b5a4 | |||
| c26d543e1e | |||
| 1e4012079d | |||
| 3956e42507 | |||
| ec7f9566e0 | |||
| a0aef244d6 | |||
| e7f4dd1a2e | |||
| f17f4bda60 | |||
| 1521340152 | |||
| ede3781e3e | |||
| aeaf1a6f6d | |||
| 9c13b84e35 | |||
| 66eb96d719 | |||
| 122f59560c | |||
| c9f2ff4487 | |||
| 1a621c2916 | |||
| 7d2b7b801a | |||
| ddc7bd7659 | |||
| 4993748c91 | |||
| 1f42de39a3 | |||
| 8e2258c494 | |||
| 4c15465fbb | |||
| a4bffd96c4 | |||
| bf4c1df0d0 | |||
| ff3aa6cbe1 | |||
| 9d6ccecfdd | |||
| 915169e8b7 | |||
| a507d564a4 | |||
| ec8f926686 | |||
| 38ea339990 | |||
| 41b6d25bdd | |||
| 6da9b9f137 | |||
| 93172bab87 | |||
| 00546f24e0 | |||
| 2634dc6cce | |||
| 362df96cb9 | |||
| 6e4eb722a6 | |||
| 2e685dcf0a | |||
| a1d8091e10 | |||
| a091f9e4e2 | |||
| ddca47040b | |||
| cfdeb50335 | |||
| d363d5589c | |||
| 19462c871d | |||
| 528ddb5647 | |||
| 65f8585630 | |||
| 859ee6087c | |||
| b0927397e9 | |||
| e578259a34 | |||
| 8899835886 | |||
| a9fba14898 | |||
| 97731c152d | |||
| db79022b85 | |||
| 36fe62d7a5 | |||
| 456890e9e4 | |||
| 647d4ae1f1 | |||
| 7928cec670 | |||
| 3b07e977a9 | |||
| 6e07a1346c | |||
| a4392e4906 | |||
| 5825c60491 | |||
| c004df234f | |||
| 7ae94c571c | |||
| 34b9bd61a2 | |||
| d861063159 | |||
| 37740fa30e | |||
| d973d571a4 | |||
| c3fa7974e6 | |||
| f1d41d8b94 | |||
| 9201db32eb | |||
| 2b53d2e6a4 | |||
| f4d4b0d742 | |||
| f66ac31d62 | |||
| 14fa645026 | |||
| 1eefc69927 | |||
| 70bb857c7e | |||
| ff90c3eba6 | |||
| d525362cd5 | |||
| 3703722a72 | |||
| 941897aa3d | |||
| 2a1e8e3efd | |||
| 27212fdafe | |||
| 85351389f4 | |||
| 3b70fc6d32 | |||
| 7992203598 | |||
| 27eb5d07cf | |||
| 87737c20c1 | |||
| 4dbc7600e7 | |||
| 9c75ff43ba | |||
| fa78459c56 | |||
| 6bc060fddb | |||
| 45c49a9088 | |||
| 0609f4e9b4 | |||
| b97b48ecb6 | |||
| 0b54739822 | |||
| 7a2eb514fa | |||
| e37b9469da | |||
| cfd80152bb | |||
| 39d6adea17 | |||
| 4fdff6347f | |||
| 136dff5fe4 | |||
| c3ae08a13d | |||
| 9a408c744d | |||
| bbc8605530 | |||
| 8f6a2438a7 | |||
| 575078502f | |||
| 19313923cc | |||
| 7ff04a65f1 | |||
| fa5113f303 | |||
| 6161a3335c | |||
| 45e44442ad | |||
| a682ee40ad | |||
| 40c76b9de2 | |||
| 3f68e5bb0e | |||
| 79ef454c5f | |||
| 827fa850f6 | |||
| 1ecf491373 | |||
| bfd9e6102a | |||
| 7f3296566c | |||
| 77cae11a74 | |||
| ace7e9d842 | |||
| beb3e6ff18 | |||
| 634c9dae46 | |||
| 55f8310cac | |||
| f7f1fb2bd7 | |||
| da38a95de6 | |||
| 9ec96597cd | |||
| 9b16563f44 | |||
| fb5f366459 | |||
| 0ceb9b6a00 | |||
| 42c1d4f4b1 | |||
| 017abbd963 | |||
| c42c3ebc9c | |||
| 1995b1a06c | |||
| 73f720d470 | |||
| 5084511fff | |||
| 3e8c35a347 | |||
| cbfee83b06 | |||
| 490622231a | |||
| c5e92c31ba | |||
| 0f4bdcd708 | |||
| 2fed1fcbff | |||
| 37ca6d378b | |||
| 64e9cf5d75 | |||
| a2df490914 | |||
| 8c3984c5ff | |||
| 7db1f711f6 | |||
| 647b1dd96c | |||
| a29be81d77 | |||
| 0998669d26 | |||
| 0adf68ae62 | |||
| e2eb81bcb2 | |||
| fc8c65ff15 | |||
| 8e274c886c | |||
| e8e7b94443 | |||
| 36d3bbff8b | |||
| bcb499328d | |||
| 8aa2d6cddc | |||
| 4b5f948307 | |||
| c1571e21ff | |||
| 43d46c0e8b | |||
| 7222f2724f | |||
| 85d1c463b9 | |||
| 897c2bbd14 | |||
| a39bce204d | |||
| cd58b7e154 | |||
| 76d46e20de | |||
| ce9b97c78c | |||
| 5100ca7508 | |||
| a3527fc4d8 | |||
| bd33e166d0 | |||
| 1852cb7eab | |||
| 8624d18ca5 | |||
| 5ce896d9ee | |||
| b0461db43f | |||
| 7b025474e2 | |||
| c0d3adef25 | |||
| 0bf10c9a47 | |||
| a9764dd910 | |||
| 51433a9331 | |||
| 350621057f | |||
| 2c8d11071c | |||
| 0d5c694ec4 | |||
| c03ac12fcd | |||
| 7741d585f5 | |||
| 50d13ba5c4 | |||
| 9981b283a6 | |||
| fdc48abd18 | |||
| bc227ab075 | |||
| a717b7cbed | |||
| 2013118971 | |||
| 7d97e8112a | |||
| 505cda43d1 | |||
| 0db69fbe19 | |||
| 9db42aca04 | |||
| 2c2d6fa5fd | |||
| d9dc02541a | |||
| 353c69e017 | |||
| 2ea3dd391a | |||
| 064d022a4b | |||
| 9c0f556d88 | |||
| 5b4297cccf | |||
| 310b1ad7b9 | |||
| fd9069422a | |||
| 687d7639a8 | |||
| 3180bbe3a8 | |||
| 8eeacc8cc8 | |||
| 27c2aa3a4e | |||
| 8d73bbb8b7 | |||
| 1eedcea58d | |||
| ffa8c32348 | |||
| 989631c5cc | |||
| 4a4f90c406 | |||
| fac3d9994c | |||
| 5f2ce22fbf | |||
| 640408ebe7 | |||
| 73f95e59f3 | |||
| d0608c2cd4 | |||
| f1e3bc850b | |||
| 7d63f9f680 | |||
| b43cec3301 | |||
| 4f99f69a29 | |||
| 79d0dc25f4 | |||
| 051adcb786 | |||
| 484e83a9b6 | |||
| 40e65b9603 | |||
| 62a8f6783e | |||
| b9d7c712f5 | |||
| 72a4f1924d | |||
| dea7f92c86 | |||
| e2b9c65b35 | |||
| cf04fed369 | |||
| c0a4105467 | |||
| 4a7e29b3f4 | |||
| 508a029dae | |||
| 1454f3d391 | |||
| f29d73fe86 | |||
| b2deab2175 | |||
| 5983f8008f | |||
| f160c49473 | |||
| 79b45b1392 | |||
| f1690557bf | |||
| f8facadc67 | |||
| f6191cc5bb | |||
| 0f9bbf85e5 | |||
| 88a9f8f919 | |||
| 22673c161a | |||
| 4869e846f3 | |||
| f08996bd37 | |||
| 8506ce06c1 | |||
| fd98520d78 | |||
| 8f41f592d7 | |||
| 966a652142 | |||
| 49b55a7245 | |||
| 318151d75b | |||
| acd19fe36c | |||
| de90033e93 | |||
| 29fee9cab3 | |||
| 2b0c0e71bb | |||
| a39cf2dd28 | |||
| e1e0c46639 | |||
| 4fa282e1a9 | |||
| afc0cf8c4e | |||
| fdfa402428 | |||
| cf92e4b4e0 | |||
| 51f7a3ca81 | |||
| 794b07ba11 | |||
| e16ae33a17 | |||
| e1c7bcab3a | |||
| 6b7470f683 | |||
| 39554ead21 | |||
| c5dbc06158 | |||
| b782d8bb53 | |||
| 54d68da8e7 | |||
| 1efb3c8235 | |||
| 1b7ad93dc9 | |||
| 2dc93574e1 | |||
| 6c3eeb7d7c | |||
| 8fb1f4093b | |||
| 29f86df585 | |||
| e63ab8dec5 | |||
| 5dc7752d54 | |||
| 9f4efab40a | |||
| cfeb28f2ba | |||
| ea96047f78 | |||
| 200357fdf4 | |||
| 2556bb04f0 | |||
| ad7a6ec41f | |||
| 3ce5b01543 | |||
| 99e404fe86 | |||
| 8610ff1b4d | |||
| 63d8eedc51 | |||
| 839761fa3d | |||
| 5112d74cad | |||
| ddcc839519 | |||
| d65920d2f7 | |||
| ec23d9bb5e | |||
| 9f4c5afbbb | |||
| dc68a56bab | |||
| 336dcbcff7 | |||
| e4e00498a8 | |||
| 0c6480d89b | |||
| 92e6aa5f17 | |||
| 4e4db94b6b | |||
| a2430afcac | |||
| 5120d690f0 | |||
| 2c0455da17 | |||
| b9e53ec8ea | |||
| 6dc5cd15ed | |||
| bfe6e2c4b1 | |||
| eb119959e8 | |||
| c94974ccb3 | |||
| 2bd86e2541 | |||
| 7bbc42127e | |||
| 30c611f1d5 | |||
| 9706079ace | |||
| fb3d6ecb98 | |||
| bb51626573 | |||
| be2457c249 | |||
| 722df6a998 | |||
| 438c1444eb | |||
| 017895dd93 | |||
| fbf1973bac | |||
| 3df72fe669 | |||
| 507f546158 | |||
| 76fdbeee8a | |||
| 69296c3333 | |||
| d38f694275 | |||
| 65e2350606 | |||
| 9f0a16c844 | |||
| 76cb051082 | |||
| 06a4553a4f | |||
| f6a4350ddd | |||
| cacf1d1ed3 | |||
| 58c67ccfea | |||
| 965109228d | |||
| 422f650b20 | |||
| 2aacff4c39 | |||
| c5669448a3 | |||
| ffd283b7d5 | |||
| 0b4e96d89c | |||
| 75e0eeab17 | |||
| ed0a158cc1 | |||
| 994f8710f3 | |||
| 7c211796e7 | |||
| 5ec9909b71 | |||
| 3c2691ef96 | |||
| ed1b293d34 | |||
| 469ec7c522 | |||
| bc3fb347a3 | |||
| e68b26e71f | |||
| 84281d284e | |||
| 185673e9e2 | |||
| c52d620817 | |||
| 86d785622b | |||
| b0606b0557 | |||
| 436d2ff1fc | |||
| c474e27c1d | |||
| 6d3db49932 | |||
| d9478252e9 | |||
| a5b60fa532 | |||
| 3869d38671 | |||
| d88bbb3d9d | |||
| 8c9a9f1c94 | |||
| 33d95642d3 | |||
| f094983d49 | |||
| 09269b4cd8 | |||
| 3ac6272c3b | |||
| a2c3c1800a | |||
| c6705fbe20 | |||
| 66aff45e96 | |||
| e900952b87 | |||
| b712bbe9a5 | |||
| 620d122fc2 | |||
| b1eba01afb | |||
| 5f8715c8b4 | |||
| acf356b080 | |||
| bc83011736 | |||
| eb599f6832 | |||
| 6c0af66fd8 | |||
| e496345d33 | |||
| 248f39e13e | |||
| a9718cc79f | |||
| 51f6127e0a | |||
| 4128d5782f | |||
| a53f0f397e | |||
| cdbda45125 | |||
| 13735decf3 | |||
| 0ee2662da6 | |||
| 7c2270bb3b | |||
| f0bff1b64f | |||
| 4ac3eb04c4 | |||
| 892a0e28ad | |||
| 01d08208f6 | |||
| d943c35ef7 | |||
| a5c3c1a7de | |||
| 960a03ca65 | |||
| 4b8863c933 | |||
| 73a798e718 | |||
| 1ba250b69c | |||
| 50c49f73f8 | |||
| 94f05241c5 | |||
| efdc055fb1 | |||
| 5615ec7c97 | |||
| d386667478 | |||
| bd394012e8 | |||
| aa4cad80a0 | |||
| a0ce328f98 | |||
| 7294ccba3c | |||
| 9c60412480 | |||
| e5067bff41 | |||
| 65b53f96d0 | |||
| a78bd92b8e | |||
| c68eb408c0 | |||
| cfc593eb0d | |||
| b528348f39 | |||
| 927523bc3d | |||
| a4ec89fb2c | |||
| de153f0154 | |||
| 81a5415417 | |||
| 249bf008ab | |||
| d2b36d74cd | |||
| df262b340c | |||
| 139cc61001 | |||
| aa911275c3 | |||
| eaddfb32de | |||
| 1543b46383 | |||
| af912f4843 | |||
| 721c24bc1f | |||
| efe139667b | |||
| 08890118db | |||
| 4216f3b24c | |||
| e2e6838da3 | |||
| a66cd5698a | |||
| a1bc11c429 | |||
| cf97209f95 | |||
| 76a644372f | |||
| 52ba2e45c4 | |||
| d4df1e0b5c | |||
| 9cd0c9033f | |||
| 565a8dc30d | |||
| 5a7804d958 | |||
| 088a6597bc | |||
| ad6929b6a4 | |||
| 0f21890d7d | |||
| 600ad799c7 | |||
| 3a40f27655 | |||
| 5d6c90e166 | |||
| b368f99d03 | |||
| 76354287aa | |||
| c80d205ecf | |||
| 3a88fc5aa9 | |||
| b3f68d29e7 | |||
| 319c20c797 | |||
| a9f2f522e7 | |||
| e6f7e4d83e | |||
| 60b73e7471 | |||
| e7f5978768 | |||
| 83ccdbd0ce | |||
| 6977a89525 | |||
| d015bf6f5e | |||
| 6042c59495 | |||
| 31395b0759 | |||
| 562838e0b5 | |||
| d56b771963 | |||
| 8f5b15b1c3 | |||
| e918877bcf | |||
| 7ef2114107 | |||
| b5eb318ae3 | |||
| dec38e5949 | |||
| afe11f69fb | |||
| 27c23b557c | |||
| 304dac7f00 | |||
| cdad4ac7c9 | |||
| 6d3fecd490 | |||
| a72f4474b4 | |||
| 2b6b6f12e2 | |||
| 0584ac525b | |||
| 71729a5967 | |||
| 17fd1c7c61 | |||
| 4d09d62f85 | |||
| a25c27ca05 | |||
| 82cb2ab556 | |||
| 57fb5f0981 | |||
| 5a2ba94dd6 | |||
| 35a31e1c35 | |||
| 2a2092092f | |||
| 37a63523e7 | |||
| a71797c0c4 | |||
| 5715d9ef42 | |||
| ab69f5e091 | |||
| 54ee92e3b0 | |||
| b28b2428f6 | |||
| 2dcb091d94 | |||
| 162f9fd7ea | |||
| b156e2f7ed | |||
| 3def843652 | |||
| 7c778fc043 | |||
| e4b58ebff5 | |||
| 01570fa800 | |||
| 680a44189c | |||
| 35344569bf | |||
| 2777ebb8a0 | |||
| fd901d8323 | |||
| 6cca6a4548 | |||
| 150aeee58f | |||
| 6a13c9efc0 | |||
| d822989c8b | |||
| 00b02f9f6d | |||
| e4965b143f | |||
| 739da31add | |||
| 7fc18fe146 | |||
| 42d830ec23 | |||
| e8b0d27942 | |||
| d60b1f2f82 | |||
| 73ce3ef8c1 | |||
| ea0b57cc23 | |||
| d636c677f4 | |||
| 6c3137a8b5 | |||
| f09ae32796 | |||
| 15e50420bc | |||
| c6685bc9a7 | |||
| 60dd599aea | |||
| 8b67adea98 | |||
| a323da6fd5 | |||
| 59ce0a9f81 | |||
| 981564ffe9 | |||
| 5c19c6cb67 | |||
| c71c82a8f1 | |||
| abde1377f3 | |||
| b987154ebc | |||
| 3804ca3e20 | |||
| 6dffc5332d | |||
| 13b30d7428 | |||
| d636e1128b | |||
| f2e78eed8c | |||
| 69b5972e03 | |||
| a15d97b716 | |||
| 9efc1a689b | |||
| ac6061ee8a | |||
| b962bf75cf | |||
| 369f2c4903 | |||
| 109e308763 | |||
| 0693073b98 | |||
| bd500ff0f7 | |||
| 521b89e69d | |||
| 207f4fc53c | |||
| e7c35b1852 | |||
| 7a858885e6 | |||
| a743eca076 | |||
| 55567582a6 | |||
| f9418853a0 | |||
| e9e66e5796 | |||
| 0f8e271509 | |||
| dd7eeea118 | |||
| a142a3b78a | |||
| ecf6b5a87c | |||
| 700b685575 | |||
| 80febef237 | |||
| 915c81febf | |||
| 6801f475ad | |||
| 71f94e12fb | |||
| 91ba48c5f9 | |||
| e637168e44 | |||
| 143c57064b | |||
| 4a0249f865 | |||
| 4ee236b1b6 | |||
| 7b806f6008 | |||
| d85ef03a42 | |||
| 3a4353f04d | |||
| ed8b6c798b | |||
| d9c74f63e1 | |||
| ec3a7665b0 | |||
| acc031aaba | |||
| d49c697fda | |||
| a3220a446f | |||
| 5f6bbcc89a | |||
| 715b0d181c | |||
| 1ee5c95ee9 | |||
| cfa9aa9206 | |||
| 84d62b69dc | |||
| bd901eb52d | |||
| 74707ec7ae | |||
| a381b95e91 | |||
| cc54226e12 | |||
| cf88b9d00c | |||
| 87d1731714 | |||
| 1365e28a54 | |||
| 02170a0a58 | |||
| 0c65ea976a | |||
| 511d09f587 | |||
| 2984fa751e | |||
| a3be73b5cc | |||
| 0a58d8f139 | |||
| 5e0160d711 | |||
| 952b25f86f | |||
| 25f70e691a | |||
| 3af92a9d92 | |||
| b065c7a296 | |||
| f6ef504ef0 | |||
| e94e5866a1 | |||
| 988c405f79 | |||
| d48d7b2b46 | |||
| 779f4e39de | |||
| 2c786a47d0 | |||
| dc93c21962 | |||
| 43f2682e15 | |||
| e7f6c4b7ef | |||
| 8748cbc232 | |||
| 6620c5c92d | |||
| 18918a5e44 | |||
| 528da9184c | |||
| e8d158a5c8 | |||
| a497e1b37e | |||
| e0df3e27ac | |||
| 9152d3fee2 | |||
| 39f865faf9 | |||
| 7dcbf32532 | |||
| 3b55e0d4e9 | |||
| b4dafa6b58 | |||
| 1736cc9739 | |||
| db08656a38 | |||
| 0f01d8df1c | |||
| f7c1d16b38 | |||
| 81c6adb959 | |||
| 9a9f212db0 | |||
| e69c6fdef4 | |||
| 7c160cdc30 | |||
| a20837fb7c | |||
| f392ab0e08 | |||
| 33d9e2354a | |||
| 000bf4af48 | |||
| 2c9e81a3ec | |||
| 5b0d7a65e6 | |||
| 0942244d6f | |||
| 5d06788305 | |||
| f666bd221f | |||
| cd81a13d8b | |||
| c17bd8c11b | |||
| f33d90220d | |||
| bd0e0b5800 | |||
| 2e2bd55729 | |||
| af6b2e4e96 | |||
| 8bc9e52dcc | |||
| 5df3c44d30 | |||
| fed67b3719 | |||
| 73c152abc4 | |||
| ab20da0f53 | |||
| c5df95d5a9 | |||
| 58aac7ea98 | |||
| 16c94d643f | |||
| 6e1ea0af71 | |||
| 542563c444 | |||
| cddac5d221 | |||
| a82ec18425 | |||
| 1774e73324 | |||
| 913d4541a5 | |||
| a98d6b6217 | |||
| e4d9d5294e | |||
| f273e54be3 | |||
| 8c6dc17a9f | |||
| 7cccc93bdf | |||
| 9dac223039 | |||
| 7dd0067792 | |||
| 827d7ba2e9 | |||
| cd19de45d3 | |||
| 694f0e954f | |||
| f363c835ab | |||
| 7b544d2a6d | |||
| 5349fa0302 | |||
| 16b50fcec7 | |||
| 4ddcf06404 | |||
| 37212f5e00 | |||
| c5aba337e9 | |||
| 02e3afae3a | |||
| dcf2a6b857 | |||
| 08b2bd9174 | |||
| b3c61ee0fe | |||
| cd7d93f362 | |||
| ee1b671279 | |||
| 6727e4cb6d | |||
| 889df76ea7 | |||
| 139e790fbf | |||
| 183e13b359 | |||
| 76f49f3078 | |||
| 09d4d69100 | |||
| f2c30cd90d | |||
| f2d3b9b4a1 | |||
| f6b451c607 | |||
| de23734776 | |||
| 324a642a20 | |||
| 8eadc49a7b | |||
| 1e14d84008 | |||
| e86f0aaea1 | |||
| ffa44fb114 | |||
| 47a4e87784 | |||
| 8720b27d87 | |||
| 018d85dddb | |||
| 2f40905548 | |||
| ec0ec69307 | |||
| 89e3c461ec | |||
| 79df8db76f | |||
| f62028dc16 | |||
| bee982b492 | |||
| 49a1ba6038 | |||
| 0395f7c63f | |||
| 16ef01efda | |||
| 75eedf8b03 | |||
| 9aa3f754b7 | |||
| 83390ea4e1 | |||
| aa8fbc26da | |||
| 5a41c6509e | |||
| 8231d0d11d | |||
| eabd757def | |||
| d192117e86 | |||
| bc54195199 | |||
| 517fc5e2d2 | |||
| da7920ff85 | |||
| 74786075e3 | |||
| a91745558f | |||
| 80a4157f11 | |||
| 455349a0eb | |||
| 03a14bb525 | |||
| f5c7a73143 | |||
| bfb390e82a | |||
| 3c16c9c92d | |||
| df1ca974ca | |||
| 40c779fcf5 | |||
| 5b2db8e75b | |||
| 74ec5d7cbb | |||
| 4b1724aeb9 | |||
| a3c4d1b679 | |||
| 3cfa6949d7 | |||
| e0b1697cc9 | |||
| 059b79f7c2 | |||
| 2990f23e0c | |||
| 6206908868 | |||
| 677680d82d | |||
| 586d5a6024 | |||
| 8159ea3386 | |||
| 50c2443691 | |||
| b1c2cba07c | |||
| 0bd287a8f2 | |||
| 3780685fe6 | |||
| 834a0b518c | |||
| 2ee917c646 | |||
| ca0962c738 | |||
| dde8455db2 | |||
| 0809ae562e | |||
| 5c528defb8 | |||
| daad7900e2 | |||
| 9ad470ba5c | |||
| 314813e51c | |||
| 9399394e6c | |||
| 1a572c8e89 | |||
| 4e4b96e3d9 | |||
| 6d498495d3 | |||
| bf27889f04 | |||
| 17d9509e31 | |||
| 29b9070698 | |||
| 74882fe188 | |||
| 4ddcc31edc | |||
| 81a5988015 | |||
| 052d2dc23a | |||
| 949c4edf41 | |||
| 7b5a45eac4 | |||
| 48c3cfdfd0 | |||
| ae3c754bb3 | |||
| a20248977c | |||
| aaf043e7ba | |||
| cf25f572a6 | |||
| dad75658f2 | |||
| bb69e03f12 | |||
| b69e08cf51 | |||
| 8c50f3e8ae | |||
| 6903e8f0fd | |||
| d3c73071ea | |||
| 4800d85011 | |||
| 72d2311edf | |||
| 6f32fb025d | |||
| eb4ce67dac | |||
| 40e8d08e8d | |||
| 05de6302fd | |||
| 67b718f1cb | |||
| c492dc6a83 | |||
| 6ca618277c | |||
| bc929a7d46 | |||
| 18a8721f49 | |||
| ddd9a99c66 | |||
| 78329b0dfe | |||
| d382fa56c7 | |||
| 4aaaef5967 | |||
| 5c13b8706f | |||
| 2582464e51 | |||
| 71625ad458 | |||
| a61b730238 | |||
| 00117d2a6e | |||
| e0c1fb5f76 | |||
| addcd16d8f | |||
| eb2f1f81ed | |||
| 7e698726e4 | |||
| 9d73b5f510 | |||
| 6116049225 | |||
| a71e690b5e | |||
| 3165b22a97 | |||
| eb90882b2d | |||
| ca6d2fe76b | |||
| 2ac9338f87 | |||
| 0e9e0a01db | |||
| 4ce8de5174 | |||
| 543825f2f5 | |||
| 6c86cce21f | |||
| ab6f0c4e0b | |||
| e161f428a0 | |||
| 6455488ff4 | |||
| 276a3fe01b | |||
| a33d67f48a | |||
| eb28bef2db | |||
| 513080ea12 | |||
| 0fe0a88108 | |||
| 3fe100a093 | |||
| 77f22fe366 | |||
| 159cc29bb5 | |||
| f07250acf3 | |||
| 5cc4d23d1e | |||
| 01169ec826 | |||
| 3108423a37 | |||
| 88c934ea8c | |||
| 6d08d04293 | |||
| 671233cd46 | |||
| e703e8f5a6 | |||
| fc71745caf | |||
| 3c7240024e | |||
| 32878f8577 | |||
| 32c7eeca78 | |||
| b422d078f8 | |||
| 9bddac1099 | |||
| 61fd5ed0e1 | |||
| 1d57911646 | |||
| ddf7fde3b2 | |||
| 4793ca8fbb | |||
| cef18937a2 | |||
| f4f41df756 | |||
| d78aa7c937 | |||
| 8429c109be | |||
| 37d9c3f835 | |||
| 13a79c753f | |||
| 41c932f306 | |||
| fd68cc768a | |||
| 9bc5afd278 | |||
| daec4d88fa | |||
| 47f72b538f | |||
| ac8f61ee91 | |||
| 608855a322 | |||
| decd6c0fab | |||
| 0716ebb7a6 | |||
| c9027fecc0 | |||
| 5a3cbadfe3 | |||
| 4d36be8794 | |||
| 094c32ced7 | |||
| 9961658eab | |||
| d069c062a6 | |||
| f8368ba6da | |||
| 18c52c309b | |||
| 28297c0224 | |||
| 80f1b1478d | |||
| e1c4fd9e1f | |||
| 70166820ea | |||
| aebed446b1 | |||
| c3577a288b | |||
| 50ad690993 | |||
| e309c51430 | |||
| b8804ccc17 | |||
| 639bf3ee8f | |||
| 4a3141accf | |||
| def87eae19 | |||
| e3fc405393 | |||
| caddd398e6 | |||
| b82b4a640d | |||
| 5855c4905e | |||
| 0ba3236ce0 | |||
| 8f3273bf07 | |||
| 00c30681bc | |||
| 5f9e295adf | |||
| a877ecdcf0 | |||
| f620f1ce57 | |||
| 8a5b6ced1a | |||
| d2da219ec0 | |||
| 9275adff81 | |||
| 26fb7603c0 | |||
| 07658aeb74 | |||
| 78915e016c | |||
| 8d135e8ea1 | |||
| 6dde56faf4 | |||
| 3ec3c59197 | |||
| 9bbcebd6b0 | |||
| 8408499c94 | |||
| 9df6e51a5b | |||
| abe16352d6 | |||
| ef478840af | |||
| e62f147edc | |||
| b7c1fd34b9 | |||
| 52797a55e2 | |||
| 7a7dae3627 | |||
| e794622776 | |||
| 2dafc9a853 | |||
| 91e312958b | |||
| ba238562c6 | |||
| 31723effe7 | |||
| 57e26bde9f | |||
| 3ec43a11ed | |||
| 1313d8a570 | |||
| 01e93d57f0 | |||
| 86524b0e4a | |||
| bae8a88c53 | |||
| fe91d1ca57 | |||
| 70f74b70b7 | |||
| 10459a886b | |||
| 962754141a | |||
| 215dd2a41b | |||
| 03f122ca88 | |||
| 025f6674db | |||
| c05ebdffd8 | |||
| 3f5d722f34 | |||
| 0fecbdde6e | |||
| ab4025f8de | |||
| c65b7a9980 | |||
| 860172c626 | |||
| a79c52a28f | |||
| 6e6271d995 | |||
| 3a1f85d4e8 | |||
| 77717e1abc | |||
| ca57239618 | |||
| d5a0088bbe | |||
| 3f1c6d7357 | |||
| 917063b7f7 | |||
| 76dc827648 | |||
| 30431b94d9 | |||
| 54f92013b0 | |||
| 2799f51bf9 | |||
| 02d34bdac2 | |||
| 79e2070606 | |||
| 3e899f6fd7 | |||
| 2270c2f5bd | |||
| 9dfb1f77a0 | |||
| 18fdc6bf1c | |||
| 71391eb76f | |||
| 11eacb9d14 | |||
| 092c1f98f6 | |||
| 4ddde66b48 | |||
| 1fba38d01c | |||
| 5bafb372af | |||
| 70f8b8b5ec | |||
| 95efec7539 | |||
| 6e830cf8f8 | |||
| 44eaeee865 | |||
| c2935a6532 | |||
| f65d841d6f | |||
| 24be840c44 | |||
| 3675ef516a | |||
| 0094b468e6 | |||
| 1eebb4506a | |||
| 36ef599840 | |||
| ae8d377561 | |||
| e49ea39a1f | |||
| f355f798a4 | |||
| f42eea1029 | |||
| ada63d1800 | |||
| 536d36b05a | |||
| 1569c1ed52 | |||
| 1351f4c8ef | |||
| e29d41c885 | |||
| dd6b11b87d | |||
| f4b4665940 | |||
| b0dd192d52 | |||
| ffbee1fe97 | |||
| 70909738f4 | |||
| 4c44ccc3c9 | |||
| dfedaff99b | |||
| 19c30eaa11 | |||
| 2bfaf540a1 | |||
| 0824cf5059 | |||
| 9bb6e899f3 | |||
| 8c4ffc8bb2 | |||
| 306248e444 | |||
| 601d2843f4 | |||
| 40e7990b6b | |||
| c4af85043a | |||
| 2fd1e2ea57 | |||
| 020f9a6047 | |||
| cc0ecf9123 | |||
| df410ce246 | |||
| 04ac6db04a | |||
| 9d871abd32 | |||
| 258afe7cc2 | |||
| ae839df55d | |||
| b5a1bad7a4 | |||
| b549900fe1 | |||
| 673f879ccd | |||
| bf00eba093 | |||
| bf250b6fed | |||
| 63a3211314 | |||
| 302ececf6b | |||
| 39cd13583f | |||
| 30b461a506 | |||
| d9d4755387 | |||
| fa09f3d121 | |||
| f32b645b96 | |||
| fd9a8c609f | |||
| dc8c281fa1 | |||
| a7da9681c3 | |||
| 5ee7596cbc | |||
| 9c44715f50 | |||
| efa0717d01 | |||
| ecb1f0e288 | |||
| 2659453694 | |||
| 42e0214de5 | |||
| 9bfd50e6ae | |||
| 56b5e6d8a8 | |||
| abbfa848ba | |||
| 3e23bb6df6 | |||
| 5fe493474c | |||
| c02c676865 | |||
| 489a1da0ed | |||
| b880bbcc18 |
@@ -0,0 +1,55 @@
|
||||
.git* export-ignore
|
||||
|
||||
* text=auto
|
||||
* whitespace=!indent,trail,space
|
||||
|
||||
*.py text whitespace=tab-in-indent,trail,space,fix
|
||||
*.cpp text whitespace=tab-in-indent,trail,space,fix
|
||||
*.hpp text whitespace=tab-in-indent,trail,space,fix
|
||||
*.cxx text whitespace=tab-in-indent,trail,space,fix
|
||||
*.hxx text whitespace=tab-in-indent,trail,space,fix
|
||||
*.mm text whitespace=tab-in-indent,trail,space,fix
|
||||
*.c text whitespace=tab-in-indent,trail,space,fix
|
||||
*.h text whitespace=tab-in-indent,trail,space,fix
|
||||
*.i text whitespace=tab-in-indent,trail,space,fix
|
||||
*.java text whitespace=tab-in-indent,trail,space,fix
|
||||
*.cu text whitespace=tab-in-indent,trail,space,fix
|
||||
*.cl text whitespace=tab-in-indent,trail,space,fix
|
||||
|
||||
*.cmake text whitespace=tab-in-indent,trail,space,fix
|
||||
*.cmakein text whitespace=tab-in-indent,trail,space,fix
|
||||
*.in text whitespace=tab-in-indent,trail,space,fix
|
||||
CMakeLists.txt text whitespace=tab-in-indent,trail,space,fix
|
||||
|
||||
*.rst text whitespace=tab-in-indent,trail,space,fix
|
||||
|
||||
*.png binary
|
||||
*.jepg binary
|
||||
*.jpg binary
|
||||
*.exr binary
|
||||
*.ico binary
|
||||
|
||||
*.a binary
|
||||
*.so binary
|
||||
*.dll binary
|
||||
|
||||
*.pdf binary
|
||||
*.pbxproj binary
|
||||
*.vec binary
|
||||
*.doc binary
|
||||
|
||||
*.css_t text
|
||||
*.qrc text
|
||||
*.qss text
|
||||
*.S text
|
||||
|
||||
*.xml -text
|
||||
*.yml -text
|
||||
|
||||
*.vcproj text eol=crlf merge=union
|
||||
*.cproject text eol=crlf merge=union
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
*.cmd.tmpl text eol=crlf
|
||||
|
||||
*.sh text eol=lf
|
||||
@@ -0,0 +1,8 @@
|
||||
*.pyc
|
||||
.DS_Store
|
||||
refman.rst
|
||||
OpenCV4Tegra/
|
||||
*.user
|
||||
.sw[a-z]
|
||||
.*.swp
|
||||
tags
|
||||
+10
-10
@@ -1,11 +1,11 @@
|
||||
set(NEW_FFMPEG 1)
|
||||
set(HAVE_FFMPEG_CODEC 1)
|
||||
set(HAVE_FFMPEG_FORMAT 1)
|
||||
set(HAVE_FFMPEG_UTIL 1)
|
||||
set(HAVE_FFMPEG_SWSCALE 1)
|
||||
set(HAVE_GENTOO_FFMPEG 1)
|
||||
|
||||
set(ALIASOF_libavcodec_VERSION 53.61.100)
|
||||
set(ALIASOF_libavformat_VERSION 53.32.100)
|
||||
set(ALIASOF_libavutil_VERSION 51.35.100)
|
||||
set(NEW_FFMPEG 1)
|
||||
set(HAVE_FFMPEG_CODEC 1)
|
||||
set(HAVE_FFMPEG_FORMAT 1)
|
||||
set(HAVE_FFMPEG_UTIL 1)
|
||||
set(HAVE_FFMPEG_SWSCALE 1)
|
||||
set(HAVE_GENTOO_FFMPEG 1)
|
||||
|
||||
set(ALIASOF_libavcodec_VERSION 53.61.100)
|
||||
set(ALIASOF_libavformat_VERSION 53.32.100)
|
||||
set(ALIASOF_libavutil_VERSION 51.35.100)
|
||||
set(ALIASOF_libswscale_VERSION 2.1.100)
|
||||
BIN
Arquivo binário não exibido.
BIN
Arquivo binário não exibido.
externo
-123
@@ -1,123 +0,0 @@
|
||||
ABOUT THE OPENEXR LIBRARIES
|
||||
----------------------------
|
||||
|
||||
Half is a class that encapsulates our 16-bit floating-point format.
|
||||
|
||||
IlmThread is a thread abstraction library for use with IlmImf. It
|
||||
currently supports pthreads and Windows threads.
|
||||
|
||||
IlmImf is our "EXR" file format for storing 16-bit FP images.
|
||||
|
||||
Imath is a math library. IlmImf only uses a subset of it,
|
||||
but we're releasing the full library because it's easier for us to
|
||||
maintain, and we think it'll be useful to others.
|
||||
|
||||
Iex is an exception-handling library.
|
||||
|
||||
See the IlmImfExamples directory for some code that demonstrates how
|
||||
to use the IlmImf library to read and write OpenEXR files. The doc
|
||||
directory contains some high-level documentation and history about the
|
||||
OpenEXR format.
|
||||
|
||||
If you have questions about using the OpenEXR libraries, you may want
|
||||
to join our developer mailing list. See http://www.openexr.com for
|
||||
details.
|
||||
|
||||
|
||||
LICENSE
|
||||
-------
|
||||
|
||||
The OpenEXR source code distribution is free software. See the file
|
||||
named COPYING (included in this distribution) for details.
|
||||
|
||||
|
||||
WHAT'S INCLUDED
|
||||
---------------
|
||||
|
||||
Besides the core OpenEXR libraries, the release includes several
|
||||
utilities for reading, writing, viewing, and manipulating OpenEXR
|
||||
images. These include:
|
||||
|
||||
* exrdisplay, an image viewer.
|
||||
* exrheader, a utility for dumping header information.
|
||||
* exrstdattr, a utility for modifying OpenEXR standard attributes.
|
||||
* exrmaketiled, for generating tiled and rip/mipmapped images.
|
||||
* exrenvmap, for creating OpenEXR environment maps.
|
||||
* exrmakepreview, for creating preview images for OpenEXR files.
|
||||
|
||||
exrdisplay requires FLTK 1.1 or greater and OpenGL. exrdisplay
|
||||
supports fragment shaders if you have the Nvidia Cg SDK and a graphics
|
||||
card capable of running fp30 profile fragment shaders. See
|
||||
exrdisplay/README for details.
|
||||
|
||||
We have also released an OpenEXR display driver for Renderman, a file
|
||||
I/O plugin for Shake, and a file I/O plugin for Adobe Photoshop (on
|
||||
both Windows and MacOS). These are packaged separately. Go to
|
||||
http://www.openexr.com to download them. NOTE: the most recent
|
||||
versions of these applications now have native support for OpenEXR, so
|
||||
you should only use our open-source versions of the plugins if you
|
||||
have an older version of the application.
|
||||
|
||||
|
||||
BUILDING OPENEXR
|
||||
----------------
|
||||
|
||||
Building OpenEXR requires the zlib library. If you want to build the
|
||||
'exrdisplay' image viewer, you'll also need FLTK 1.1, but this program
|
||||
is not required to use OpenEXR's libraries in your application.
|
||||
exrdisplay can also accelerate the display of OpenEXR images if you
|
||||
have the NVIDIA Cg SDK.
|
||||
|
||||
Your OS distribution may already include these libraries, or supply
|
||||
packages for them. That is the preferred way to obtain them for use
|
||||
with OpenEXR. If not, you can obtain the source code for zlib and
|
||||
FLTK from:
|
||||
|
||||
http://www.zlib.net
|
||||
http://www.fltk.org
|
||||
|
||||
and you can download the NVIDIA Cg SDK from
|
||||
http://developer.nvidia.com.
|
||||
|
||||
If you're building OpenEXR on a Windows platform, see README.win32 for
|
||||
instructions on how to build OpenEXR. The remainder of this file
|
||||
applies only to GNU/Linux or other UNIX-like systems.
|
||||
|
||||
After installing the required libraries, to build OpenEXR on
|
||||
GNU/Linux or other UNIX-like systems, do this:
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
unless you obtained OpenEXR directly from CVS, in which case you
|
||||
should first read README.CVS.
|
||||
|
||||
If you have the Nvidia Cg SDK and you want to build support for
|
||||
fragment shaders into exrdisplay, specify the path to the SDK using
|
||||
the "--with-cg-prefix" flag. There are some additional compile-time
|
||||
configuration options available; type `./configure --help` for more
|
||||
information.
|
||||
|
||||
See README.OSX for details on building OpenEXR in MacOS X.
|
||||
|
||||
Do `make check` to run the OpenEXR confidence tests. They should all
|
||||
pass; if you find a test that does not pass on your system, please let
|
||||
us know.
|
||||
|
||||
Other UNIX variants haven't been tested, but should be easy to build.
|
||||
Let us know if you're having problems porting OpenEXR to a particular
|
||||
platform.
|
||||
|
||||
All include files needed to use the OpenEXR libraries are installed in the
|
||||
OpenEXR subdirectory of the install prefix, e.g. /usr/local/include/OpenEXR.
|
||||
|
||||
|
||||
USING OPENEXR IN YOUR APPLICATIONS
|
||||
----------------------------------
|
||||
|
||||
On systems with support for pkg-config, use `pkg-config --cflags
|
||||
OpenEXR` for the C++ flags required to compile against OpenEXR
|
||||
headers; and `pkg-config --libs OpenEXR` for the linker flags required
|
||||
to link against OpenEXR libraries.
|
||||
|
||||
externo
+502
@@ -0,0 +1,502 @@
|
||||
//=============================================================================
|
||||
//
|
||||
// multimon.h -- Stub module that fakes multiple monitor apis on Win32 OSes
|
||||
// without them.
|
||||
//
|
||||
// By using this header your code will get back default values from
|
||||
// GetSystemMetrics() for new metrics, and the new multimonitor APIs
|
||||
// will act like only one display is present on a Win32 OS without
|
||||
// multimonitor APIs.
|
||||
//
|
||||
// Exactly one source must include this with COMPILE_MULTIMON_STUBS defined.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" { // Assume C declarations for C++
|
||||
#endif // __cplusplus
|
||||
|
||||
//
|
||||
// If we are building with Win95/NT4 headers, we need to declare
|
||||
// the multimonitor-related metrics and APIs ourselves.
|
||||
//
|
||||
#ifndef SM_CMONITORS
|
||||
|
||||
#define SM_XVIRTUALSCREEN 76
|
||||
#define SM_YVIRTUALSCREEN 77
|
||||
#define SM_CXVIRTUALSCREEN 78
|
||||
#define SM_CYVIRTUALSCREEN 79
|
||||
#define SM_CMONITORS 80
|
||||
#define SM_SAMEDISPLAYFORMAT 81
|
||||
|
||||
// HMONITOR is already declared if WINVER >= 0x0500 in windef.h
|
||||
// This is for components built with an older version number.
|
||||
//
|
||||
#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
|
||||
DECLARE_HANDLE(HMONITOR);
|
||||
#define HMONITOR_DECLARED
|
||||
#endif
|
||||
|
||||
#define MONITOR_DEFAULTTONULL 0x00000000
|
||||
#define MONITOR_DEFAULTTOPRIMARY 0x00000001
|
||||
#define MONITOR_DEFAULTTONEAREST 0x00000002
|
||||
|
||||
#define MONITORINFOF_PRIMARY 0x00000001
|
||||
|
||||
typedef struct tagMONITORINFO
|
||||
{
|
||||
DWORD cbSize;
|
||||
RECT rcMonitor;
|
||||
RECT rcWork;
|
||||
DWORD dwFlags;
|
||||
} MONITORINFO, *LPMONITORINFO;
|
||||
|
||||
#ifndef CCHDEVICENAME
|
||||
#define CCHDEVICENAME 32
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
typedef struct tagMONITORINFOEXA : public tagMONITORINFO
|
||||
{
|
||||
CHAR szDevice[CCHDEVICENAME];
|
||||
} MONITORINFOEXA, *LPMONITORINFOEXA;
|
||||
typedef struct tagMONITORINFOEXW : public tagMONITORINFO
|
||||
{
|
||||
WCHAR szDevice[CCHDEVICENAME];
|
||||
} MONITORINFOEXW, *LPMONITORINFOEXW;
|
||||
#ifdef UNICODE
|
||||
typedef MONITORINFOEXW MONITORINFOEX;
|
||||
typedef LPMONITORINFOEXW LPMONITORINFOEX;
|
||||
#else
|
||||
typedef MONITORINFOEXA MONITORINFOEX;
|
||||
typedef LPMONITORINFOEXA LPMONITORINFOEX;
|
||||
#endif // UNICODE
|
||||
#else // ndef __cplusplus
|
||||
typedef struct tagMONITORINFOEXA
|
||||
{
|
||||
MONITORINFO;
|
||||
CHAR szDevice[CCHDEVICENAME];
|
||||
} MONITORINFOEXA, *LPMONITORINFOEXA;
|
||||
typedef struct tagMONITORINFOEXW
|
||||
{
|
||||
MONITORINFO;
|
||||
WCHAR szDevice[CCHDEVICENAME];
|
||||
} MONITORINFOEXW, *LPMONITORINFOEXW;
|
||||
#ifdef UNICODE
|
||||
typedef MONITORINFOEXW MONITORINFOEX;
|
||||
typedef LPMONITORINFOEXW LPMONITORINFOEX;
|
||||
#else
|
||||
typedef MONITORINFOEXA MONITORINFOEX;
|
||||
typedef LPMONITORINFOEXA LPMONITORINFOEX;
|
||||
#endif // UNICODE
|
||||
#endif
|
||||
|
||||
typedef BOOL (CALLBACK* MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM);
|
||||
|
||||
#ifndef DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
|
||||
typedef struct _DISPLAY_DEVICEA {
|
||||
DWORD cb;
|
||||
CHAR DeviceName[32];
|
||||
CHAR DeviceString[128];
|
||||
DWORD StateFlags;
|
||||
CHAR DeviceID[128];
|
||||
CHAR DeviceKey[128];
|
||||
} DISPLAY_DEVICEA, *PDISPLAY_DEVICEA, *LPDISPLAY_DEVICEA;
|
||||
typedef struct _DISPLAY_DEVICEW {
|
||||
DWORD cb;
|
||||
WCHAR DeviceName[32];
|
||||
WCHAR DeviceString[128];
|
||||
DWORD StateFlags;
|
||||
WCHAR DeviceID[128];
|
||||
WCHAR DeviceKey[128];
|
||||
} DISPLAY_DEVICEW, *PDISPLAY_DEVICEW, *LPDISPLAY_DEVICEW;
|
||||
#ifdef UNICODE
|
||||
typedef DISPLAY_DEVICEW DISPLAY_DEVICE;
|
||||
typedef PDISPLAY_DEVICEW PDISPLAY_DEVICE;
|
||||
typedef LPDISPLAY_DEVICEW LPDISPLAY_DEVICE;
|
||||
#else
|
||||
typedef DISPLAY_DEVICEA DISPLAY_DEVICE;
|
||||
typedef PDISPLAY_DEVICEA PDISPLAY_DEVICE;
|
||||
typedef LPDISPLAY_DEVICEA LPDISPLAY_DEVICE;
|
||||
#endif // UNICODE
|
||||
|
||||
#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001
|
||||
#define DISPLAY_DEVICE_MULTI_DRIVER 0x00000002
|
||||
#define DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004
|
||||
#define DISPLAY_DEVICE_MIRRORING_DRIVER 0x00000008
|
||||
#define DISPLAY_DEVICE_VGA_COMPATIBLE 0x00000010
|
||||
#endif
|
||||
|
||||
#endif // SM_CMONITORS
|
||||
|
||||
#undef GetMonitorInfo
|
||||
#undef GetSystemMetrics
|
||||
#undef MonitorFromWindow
|
||||
#undef MonitorFromRect
|
||||
#undef MonitorFromPoint
|
||||
#undef EnumDisplayMonitors
|
||||
#undef EnumDisplayDevices
|
||||
|
||||
//
|
||||
// Define COMPILE_MULTIMON_STUBS to compile the stubs;
|
||||
// otherwise, you get the declarations.
|
||||
//
|
||||
#ifdef COMPILE_MULTIMON_STUBS
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Implement the API stubs.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _MULTIMON_USE_SECURE_CRT
|
||||
#if defined(__GOT_SECURE_LIB__) && __GOT_SECURE_LIB__ >= 200402L
|
||||
#define _MULTIMON_USE_SECURE_CRT 1
|
||||
#else
|
||||
#define _MULTIMON_USE_SECURE_CRT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef MULTIMON_FNS_DEFINED
|
||||
|
||||
int (WINAPI* g_pfnGetSystemMetrics)(int) = NULL;
|
||||
HMONITOR (WINAPI* g_pfnMonitorFromWindow)(HWND, DWORD) = NULL;
|
||||
HMONITOR (WINAPI* g_pfnMonitorFromRect)(LPCRECT, DWORD) = NULL;
|
||||
HMONITOR (WINAPI* g_pfnMonitorFromPoint)(POINT, DWORD) = NULL;
|
||||
BOOL (WINAPI* g_pfnGetMonitorInfo)(HMONITOR, LPMONITORINFO) = NULL;
|
||||
BOOL (WINAPI* g_pfnEnumDisplayMonitors)(HDC, LPCRECT, MONITORENUMPROC, LPARAM) = NULL;
|
||||
BOOL (WINAPI* g_pfnEnumDisplayDevices)(PVOID, DWORD, PDISPLAY_DEVICE,DWORD) = NULL;
|
||||
BOOL g_fMultiMonInitDone = FALSE;
|
||||
BOOL g_fMultimonPlatformNT = FALSE;
|
||||
|
||||
#endif
|
||||
|
||||
BOOL IsPlatformNT()
|
||||
{
|
||||
OSVERSIONINFOA osvi = {0};
|
||||
osvi.dwOSVersionInfoSize = sizeof(osvi);
|
||||
GetVersionExA((OSVERSIONINFOA*)&osvi);
|
||||
return (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId);
|
||||
}
|
||||
|
||||
BOOL InitMultipleMonitorStubs(void)
|
||||
{
|
||||
HMODULE hUser32;
|
||||
if (g_fMultiMonInitDone)
|
||||
{
|
||||
return g_pfnGetMonitorInfo != NULL;
|
||||
}
|
||||
|
||||
g_fMultimonPlatformNT = IsPlatformNT();
|
||||
hUser32 = GetModuleHandle(TEXT("USER32"));
|
||||
if (hUser32 &&
|
||||
(*(FARPROC*)&g_pfnGetSystemMetrics = GetProcAddress(hUser32,"GetSystemMetrics")) != NULL &&
|
||||
(*(FARPROC*)&g_pfnMonitorFromWindow = GetProcAddress(hUser32,"MonitorFromWindow")) != NULL &&
|
||||
(*(FARPROC*)&g_pfnMonitorFromRect = GetProcAddress(hUser32,"MonitorFromRect")) != NULL &&
|
||||
(*(FARPROC*)&g_pfnMonitorFromPoint = GetProcAddress(hUser32,"MonitorFromPoint")) != NULL &&
|
||||
(*(FARPROC*)&g_pfnEnumDisplayMonitors = GetProcAddress(hUser32,"EnumDisplayMonitors")) != NULL &&
|
||||
#ifdef UNICODE
|
||||
(*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(hUser32,"EnumDisplayDevicesW")) != NULL &&
|
||||
(*(FARPROC*)&g_pfnGetMonitorInfo = g_fMultimonPlatformNT ? GetProcAddress(hUser32,"GetMonitorInfoW") :
|
||||
GetProcAddress(hUser32,"GetMonitorInfoA")) != NULL
|
||||
#else
|
||||
(*(FARPROC*)&g_pfnGetMonitorInfo = GetProcAddress(hUser32,"GetMonitorInfoA")) != NULL &&
|
||||
(*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(hUser32,"EnumDisplayDevicesA")) != NULL
|
||||
#endif
|
||||
) {
|
||||
g_fMultiMonInitDone = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_pfnGetSystemMetrics = NULL;
|
||||
g_pfnMonitorFromWindow = NULL;
|
||||
g_pfnMonitorFromRect = NULL;
|
||||
g_pfnMonitorFromPoint = NULL;
|
||||
g_pfnGetMonitorInfo = NULL;
|
||||
g_pfnEnumDisplayMonitors = NULL;
|
||||
g_pfnEnumDisplayDevices = NULL;
|
||||
|
||||
g_fMultiMonInitDone = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// fake implementations of Monitor APIs that work with the primary display
|
||||
// no special parameter validation is made since these run in client code
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
int WINAPI
|
||||
xGetSystemMetrics(int nIndex)
|
||||
{
|
||||
if (InitMultipleMonitorStubs())
|
||||
return g_pfnGetSystemMetrics(nIndex);
|
||||
|
||||
switch (nIndex)
|
||||
{
|
||||
case SM_CMONITORS:
|
||||
case SM_SAMEDISPLAYFORMAT:
|
||||
return 1;
|
||||
|
||||
case SM_XVIRTUALSCREEN:
|
||||
case SM_YVIRTUALSCREEN:
|
||||
return 0;
|
||||
|
||||
case SM_CXVIRTUALSCREEN:
|
||||
nIndex = SM_CXSCREEN;
|
||||
break;
|
||||
|
||||
case SM_CYVIRTUALSCREEN:
|
||||
nIndex = SM_CYSCREEN;
|
||||
break;
|
||||
}
|
||||
|
||||
return GetSystemMetrics(nIndex);
|
||||
}
|
||||
|
||||
#define xPRIMARY_MONITOR ((HMONITOR)0x12340042)
|
||||
|
||||
HMONITOR WINAPI
|
||||
xMonitorFromPoint(POINT ptScreenCoords, DWORD dwFlags)
|
||||
{
|
||||
if (InitMultipleMonitorStubs())
|
||||
return g_pfnMonitorFromPoint(ptScreenCoords, dwFlags);
|
||||
|
||||
if ((dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) ||
|
||||
((ptScreenCoords.x >= 0) &&
|
||||
(ptScreenCoords.x < GetSystemMetrics(SM_CXSCREEN)) &&
|
||||
(ptScreenCoords.y >= 0) &&
|
||||
(ptScreenCoords.y < GetSystemMetrics(SM_CYSCREEN))))
|
||||
{
|
||||
return xPRIMARY_MONITOR;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HMONITOR WINAPI
|
||||
xMonitorFromRect(LPCRECT lprcScreenCoords, DWORD dwFlags)
|
||||
{
|
||||
if (InitMultipleMonitorStubs())
|
||||
return g_pfnMonitorFromRect(lprcScreenCoords, dwFlags);
|
||||
|
||||
if ((dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) ||
|
||||
((lprcScreenCoords->right > 0) &&
|
||||
(lprcScreenCoords->bottom > 0) &&
|
||||
(lprcScreenCoords->left < GetSystemMetrics(SM_CXSCREEN)) &&
|
||||
(lprcScreenCoords->top < GetSystemMetrics(SM_CYSCREEN))))
|
||||
{
|
||||
return xPRIMARY_MONITOR;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HMONITOR WINAPI
|
||||
xMonitorFromWindow(HWND hWnd, DWORD dwFlags)
|
||||
{
|
||||
WINDOWPLACEMENT wp;
|
||||
|
||||
if (InitMultipleMonitorStubs())
|
||||
return g_pfnMonitorFromWindow(hWnd, dwFlags);
|
||||
|
||||
if (dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST))
|
||||
return xPRIMARY_MONITOR;
|
||||
|
||||
if (IsIconic(hWnd) ?
|
||||
GetWindowPlacement(hWnd, &wp) :
|
||||
GetWindowRect(hWnd, &wp.rcNormalPosition)) {
|
||||
|
||||
return xMonitorFromRect(&wp.rcNormalPosition, dwFlags);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BOOL WINAPI
|
||||
xGetMonitorInfo(HMONITOR hMonitor, __inout LPMONITORINFO lpMonitorInfo)
|
||||
{
|
||||
RECT rcWork;
|
||||
|
||||
if (InitMultipleMonitorStubs())
|
||||
{
|
||||
BOOL f = g_pfnGetMonitorInfo(hMonitor, lpMonitorInfo);
|
||||
#ifdef UNICODE
|
||||
if (f && !g_fMultimonPlatformNT && (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEX)))
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, 0,
|
||||
(LPSTR)((MONITORINFOEX*)lpMonitorInfo)->szDevice, -1,
|
||||
((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)));
|
||||
}
|
||||
#endif
|
||||
return f;
|
||||
}
|
||||
|
||||
if ((hMonitor == xPRIMARY_MONITOR) &&
|
||||
lpMonitorInfo &&
|
||||
(lpMonitorInfo->cbSize >= sizeof(MONITORINFO)) &&
|
||||
SystemParametersInfoA(SPI_GETWORKAREA, 0, &rcWork, 0))
|
||||
{
|
||||
lpMonitorInfo->rcMonitor.left = 0;
|
||||
lpMonitorInfo->rcMonitor.top = 0;
|
||||
lpMonitorInfo->rcMonitor.right = GetSystemMetrics(SM_CXSCREEN);
|
||||
lpMonitorInfo->rcMonitor.bottom = GetSystemMetrics(SM_CYSCREEN);
|
||||
lpMonitorInfo->rcWork = rcWork;
|
||||
lpMonitorInfo->dwFlags = MONITORINFOF_PRIMARY;
|
||||
|
||||
if (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEX))
|
||||
{
|
||||
#ifdef UNICODE
|
||||
MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, ((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)));
|
||||
#else // UNICODE
|
||||
#if _MULTIMON_USE_SECURE_CRT
|
||||
strncpy_s(((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)), TEXT("DISPLAY"), (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)) - 1);
|
||||
#else
|
||||
lstrcpyn(((MONITORINFOEX*)lpMonitorInfo)->szDevice, TEXT("DISPLAY"), (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)));
|
||||
#endif // _MULTIMON_USE_SECURE_CRT
|
||||
#endif // UNICODE
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL WINAPI
|
||||
xEnumDisplayMonitors(
|
||||
HDC hdcOptionalForPainting,
|
||||
LPCRECT lprcEnumMonitorsThatIntersect,
|
||||
MONITORENUMPROC lpfnEnumProc,
|
||||
LPARAM dwData)
|
||||
{
|
||||
RECT rcLimit;
|
||||
|
||||
if (InitMultipleMonitorStubs()) {
|
||||
return g_pfnEnumDisplayMonitors(
|
||||
hdcOptionalForPainting,
|
||||
lprcEnumMonitorsThatIntersect,
|
||||
lpfnEnumProc,
|
||||
dwData);
|
||||
}
|
||||
|
||||
if (!lpfnEnumProc)
|
||||
return FALSE;
|
||||
|
||||
rcLimit.left = 0;
|
||||
rcLimit.top = 0;
|
||||
rcLimit.right = GetSystemMetrics(SM_CXSCREEN);
|
||||
rcLimit.bottom = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
if (hdcOptionalForPainting)
|
||||
{
|
||||
RECT rcClip;
|
||||
POINT ptOrg;
|
||||
|
||||
switch (GetClipBox(hdcOptionalForPainting, &rcClip))
|
||||
{
|
||||
default:
|
||||
if (!GetDCOrgEx(hdcOptionalForPainting, &ptOrg))
|
||||
return FALSE;
|
||||
|
||||
OffsetRect(&rcLimit, -ptOrg.x, -ptOrg.y);
|
||||
if (IntersectRect(&rcLimit, &rcLimit, &rcClip) &&
|
||||
(!lprcEnumMonitorsThatIntersect ||
|
||||
IntersectRect(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect))) {
|
||||
|
||||
break;
|
||||
}
|
||||
//fall thru
|
||||
case NULLREGION:
|
||||
return TRUE;
|
||||
case ERROR:
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
if ( lprcEnumMonitorsThatIntersect &&
|
||||
!IntersectRect(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect)) {
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return lpfnEnumProc(
|
||||
xPRIMARY_MONITOR,
|
||||
hdcOptionalForPainting,
|
||||
&rcLimit,
|
||||
dwData);
|
||||
}
|
||||
|
||||
BOOL WINAPI
|
||||
xEnumDisplayDevices(
|
||||
PVOID Unused,
|
||||
DWORD iDevNum,
|
||||
__inout PDISPLAY_DEVICE lpDisplayDevice,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
if (InitMultipleMonitorStubs())
|
||||
return g_pfnEnumDisplayDevices(Unused, iDevNum, lpDisplayDevice, dwFlags);
|
||||
|
||||
if (Unused != NULL)
|
||||
return FALSE;
|
||||
|
||||
if (iDevNum != 0)
|
||||
return FALSE;
|
||||
|
||||
if (lpDisplayDevice == NULL || lpDisplayDevice->cb < sizeof(DISPLAY_DEVICE))
|
||||
return FALSE;
|
||||
|
||||
#ifdef UNICODE
|
||||
MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, lpDisplayDevice->DeviceName, (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)));
|
||||
MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, lpDisplayDevice->DeviceString, (sizeof(lpDisplayDevice->DeviceString)/sizeof(TCHAR)));
|
||||
#else // UNICODE
|
||||
#if _MULTIMON_USE_SECURE_CRT
|
||||
strncpy_s((LPTSTR)lpDisplayDevice->DeviceName, (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)), TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)) - 1);
|
||||
strncpy_s((LPTSTR)lpDisplayDevice->DeviceString, (sizeof(lpDisplayDevice->DeviceString)/sizeof(TCHAR)), TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)) - 1);
|
||||
#else
|
||||
lstrcpyn((LPTSTR)lpDisplayDevice->DeviceName, TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)));
|
||||
lstrcpyn((LPTSTR)lpDisplayDevice->DeviceString, TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceString)/sizeof(TCHAR)));
|
||||
#endif // _MULTIMON_USE_SECURE_CRT
|
||||
#endif // UNICODE
|
||||
|
||||
lpDisplayDevice->StateFlags = DISPLAY_DEVICE_ATTACHED_TO_DESKTOP | DISPLAY_DEVICE_PRIMARY_DEVICE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#undef xPRIMARY_MONITOR
|
||||
#undef COMPILE_MULTIMON_STUBS
|
||||
|
||||
#else // COMPILE_MULTIMON_STUBS
|
||||
|
||||
extern int WINAPI xGetSystemMetrics(int);
|
||||
extern HMONITOR WINAPI xMonitorFromWindow(HWND, DWORD);
|
||||
extern HMONITOR WINAPI xMonitorFromRect(LPCRECT, DWORD);
|
||||
extern HMONITOR WINAPI xMonitorFromPoint(POINT, DWORD);
|
||||
extern BOOL WINAPI xGetMonitorInfo(HMONITOR, LPMONITORINFO);
|
||||
extern BOOL WINAPI xEnumDisplayMonitors(HDC, LPCRECT, MONITORENUMPROC, LPARAM);
|
||||
extern BOOL WINAPI xEnumDisplayDevices(PVOID, DWORD, PDISPLAY_DEVICE, DWORD);
|
||||
|
||||
#endif // COMPILE_MULTIMON_STUBS
|
||||
|
||||
//
|
||||
// build defines that replace the regular APIs with our versions
|
||||
//
|
||||
#define GetSystemMetrics xGetSystemMetrics
|
||||
#define MonitorFromWindow xMonitorFromWindow
|
||||
#define MonitorFromRect xMonitorFromRect
|
||||
#define MonitorFromPoint xMonitorFromPoint
|
||||
#define GetMonitorInfo xGetMonitorInfo
|
||||
#define EnumDisplayMonitors xEnumDisplayMonitors
|
||||
#define EnumDisplayDevices xEnumDisplayDevices
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
|
||||
+14
-14
@@ -9,20 +9,20 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum _tagSND_DEVICE_ERROR {
|
||||
SNDDEV_ERROR_Open = 1,
|
||||
SNDDEV_ERROR_Close = 2,
|
||||
SNDDEV_ERROR_GetCaps = 3,
|
||||
SNDDEV_ERROR_PrepareHeader = 4,
|
||||
SNDDEV_ERROR_UnprepareHeader = 5,
|
||||
SNDDEV_ERROR_Reset = 6,
|
||||
SNDDEV_ERROR_Restart = 7,
|
||||
SNDDEV_ERROR_GetPosition = 8,
|
||||
SNDDEV_ERROR_Write = 9,
|
||||
SNDDEV_ERROR_Pause = 10,
|
||||
SNDDEV_ERROR_Stop = 11,
|
||||
SNDDEV_ERROR_Start = 12,
|
||||
SNDDEV_ERROR_AddBuffer = 13,
|
||||
SNDDEV_ERROR_Query = 14
|
||||
SNDDEV_ERROR_Open = 1,
|
||||
SNDDEV_ERROR_Close = 2,
|
||||
SNDDEV_ERROR_GetCaps = 3,
|
||||
SNDDEV_ERROR_PrepareHeader = 4,
|
||||
SNDDEV_ERROR_UnprepareHeader = 5,
|
||||
SNDDEV_ERROR_Reset = 6,
|
||||
SNDDEV_ERROR_Restart = 7,
|
||||
SNDDEV_ERROR_GetPosition = 8,
|
||||
SNDDEV_ERROR_Write = 9,
|
||||
SNDDEV_ERROR_Pause = 10,
|
||||
SNDDEV_ERROR_Stop = 11,
|
||||
SNDDEV_ERROR_Start = 12,
|
||||
SNDDEV_ERROR_AddBuffer = 13,
|
||||
SNDDEV_ERROR_Query = 14
|
||||
} SNDDEV_ERR;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
+9
-9
@@ -10,20 +10,20 @@ extern "C" {
|
||||
|
||||
/*--- DirectShow Reference - DirectShow Enumerated Types */
|
||||
typedef enum {
|
||||
MEDIA_TRANSPORT_PACKET,
|
||||
MEDIA_ELEMENTARY_STREAM,
|
||||
MEDIA_MPEG2_PSI,
|
||||
MEDIA_TRANSPORT_PAYLOAD
|
||||
MEDIA_TRANSPORT_PACKET,
|
||||
MEDIA_ELEMENTARY_STREAM,
|
||||
MEDIA_MPEG2_PSI,
|
||||
MEDIA_TRANSPORT_PAYLOAD
|
||||
} MEDIA_SAMPLE_CONTENT;
|
||||
/*--- DirectShow Reference - DirectShow Structures */
|
||||
typedef struct {
|
||||
DWORD dwOffset;
|
||||
DWORD dwPacketLength;
|
||||
DWORD dwStride;
|
||||
DWORD dwOffset;
|
||||
DWORD dwPacketLength;
|
||||
DWORD dwStride;
|
||||
} MPEG2_TRANSPORT_STRIDE;
|
||||
typedef struct {
|
||||
ULONG ulPID;
|
||||
MEDIA_SAMPLE_CONTENT MediaSampleContent ;
|
||||
ULONG ulPID;
|
||||
MEDIA_SAMPLE_CONTENT MediaSampleContent ;
|
||||
} PID_MAP;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
externo
+114
-114
@@ -322,7 +322,7 @@ typedef struct IDirectDrawGammaControl *LPDIRECTDRAWGAMMACONTROL;
|
||||
#define DDSCAPS_OPTIMIZED 0x80000000
|
||||
|
||||
typedef struct _DDSCAPS {
|
||||
DWORD dwCaps; /* capabilities of surface wanted */
|
||||
DWORD dwCaps; /* capabilities of surface wanted */
|
||||
} DDSCAPS,*LPDDSCAPS;
|
||||
|
||||
/* DDSCAPS2.dwCaps2 */
|
||||
@@ -368,21 +368,21 @@ typedef struct _DDSCAPS {
|
||||
#define DDSCAPS2_STEREOSURFACELEFT 0x00080000
|
||||
|
||||
typedef struct _DDSCAPS2 {
|
||||
DWORD dwCaps; /* capabilities of surface wanted */
|
||||
DWORD dwCaps2; /* additional capabilities */
|
||||
DWORD dwCaps3; /* reserved capabilities */
|
||||
__extension__ union {
|
||||
DWORD dwCaps4; /* low word is the depth for a volume texture */
|
||||
DWORD dwVolumeDepth;
|
||||
} DUMMYUNIONNAME1;
|
||||
DWORD dwCaps; /* capabilities of surface wanted */
|
||||
DWORD dwCaps2; /* additional capabilities */
|
||||
DWORD dwCaps3; /* reserved capabilities */
|
||||
__extension__ union {
|
||||
DWORD dwCaps4; /* low word is the depth for a volume texture */
|
||||
DWORD dwVolumeDepth;
|
||||
} DUMMYUNIONNAME1;
|
||||
} DDSCAPS2,*LPDDSCAPS2;
|
||||
|
||||
typedef struct _DDSCAPSEX {
|
||||
DWORD dwCaps2;
|
||||
DWORD dwCaps3;
|
||||
__extension__ union {
|
||||
DWORD dwCaps4;
|
||||
DWORD dwVolumeDepth;
|
||||
DWORD dwCaps4;
|
||||
DWORD dwVolumeDepth;
|
||||
} DUMMYUNIONNAME1;
|
||||
} DDSCAPSEX,*LPDDSCAPSEX;
|
||||
|
||||
@@ -712,12 +712,12 @@ typedef DDCAPS *LPDDCAPS;
|
||||
|
||||
typedef struct _DDCOLORKEY
|
||||
{
|
||||
DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
|
||||
DWORD dwColorSpaceLowValue;/* low boundary of color space that is to
|
||||
* be treated as Color Key, inclusive
|
||||
*/
|
||||
DWORD dwColorSpaceHighValue;/* high boundary of color space that is
|
||||
*/
|
||||
DWORD dwColorSpaceHighValue;/* high boundary of color space that is
|
||||
* to be treated as Color Key, inclusive
|
||||
*/
|
||||
*/
|
||||
} DDCOLORKEY,*LPDDCOLORKEY;
|
||||
|
||||
/* ddCKEYCAPS bits */
|
||||
@@ -746,40 +746,40 @@ typedef struct _DDPIXELFORMAT {
|
||||
DWORD dwFlags; /* 4: pixel format flags */
|
||||
DWORD dwFourCC; /* 8: (FOURCC code) */
|
||||
__extension__ union {
|
||||
DWORD dwRGBBitCount; /* C: how many bits per pixel */
|
||||
DWORD dwYUVBitCount; /* C: how many bits per pixel */
|
||||
DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
|
||||
DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
|
||||
DWORD dwLuminanceBitCount;
|
||||
DWORD dwBumpBitCount;
|
||||
DWORD dwRGBBitCount; /* C: how many bits per pixel */
|
||||
DWORD dwYUVBitCount; /* C: how many bits per pixel */
|
||||
DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */
|
||||
DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels*/
|
||||
DWORD dwLuminanceBitCount;
|
||||
DWORD dwBumpBitCount;
|
||||
} DUMMYUNIONNAME1;
|
||||
__extension__ union {
|
||||
DWORD dwRBitMask; /* 10: mask for red bit*/
|
||||
DWORD dwYBitMask; /* 10: mask for Y bits*/
|
||||
DWORD dwStencilBitDepth;
|
||||
DWORD dwLuminanceBitMask;
|
||||
DWORD dwBumpDuBitMask;
|
||||
DWORD dwRBitMask; /* 10: mask for red bit*/
|
||||
DWORD dwYBitMask; /* 10: mask for Y bits*/
|
||||
DWORD dwStencilBitDepth;
|
||||
DWORD dwLuminanceBitMask;
|
||||
DWORD dwBumpDuBitMask;
|
||||
} DUMMYUNIONNAME2;
|
||||
__extension__ union {
|
||||
DWORD dwGBitMask; /* 14: mask for green bits*/
|
||||
DWORD dwUBitMask; /* 14: mask for U bits*/
|
||||
DWORD dwZBitMask;
|
||||
DWORD dwBumpDvBitMask;
|
||||
DWORD dwGBitMask; /* 14: mask for green bits*/
|
||||
DWORD dwUBitMask; /* 14: mask for U bits*/
|
||||
DWORD dwZBitMask;
|
||||
DWORD dwBumpDvBitMask;
|
||||
} DUMMYUNIONNAME3;
|
||||
__extension__ union {
|
||||
DWORD dwBBitMask; /* 18: mask for blue bits*/
|
||||
DWORD dwVBitMask; /* 18: mask for V bits*/
|
||||
DWORD dwStencilBitMask;
|
||||
DWORD dwBumpLuminanceBitMask;
|
||||
DWORD dwBBitMask; /* 18: mask for blue bits*/
|
||||
DWORD dwVBitMask; /* 18: mask for V bits*/
|
||||
DWORD dwStencilBitMask;
|
||||
DWORD dwBumpLuminanceBitMask;
|
||||
} DUMMYUNIONNAME4;
|
||||
__extension__ union {
|
||||
DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
|
||||
DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
|
||||
DWORD dwLuminanceAlphaBitMask;
|
||||
DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
|
||||
DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
|
||||
DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */
|
||||
DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */
|
||||
DWORD dwLuminanceAlphaBitMask;
|
||||
DWORD dwRGBZBitMask; /* 1C: mask for Z channel */
|
||||
DWORD dwYUVZBitMask; /* 1C: mask for Z channel */
|
||||
} DUMMYUNIONNAME5;
|
||||
/* 20: next structure */
|
||||
/* 20: next structure */
|
||||
} DDPIXELFORMAT,*LPDDPIXELFORMAT;
|
||||
|
||||
#ifndef MAKEFOURCC
|
||||
@@ -980,79 +980,79 @@ typedef struct _DDPIXELFORMAT {
|
||||
|
||||
typedef struct _DDSURFACEDESC
|
||||
{
|
||||
DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
|
||||
DWORD dwFlags; /* 4: determines what fields are valid*/
|
||||
DWORD dwHeight; /* 8: height of surface to be created*/
|
||||
DWORD dwWidth; /* C: width of input surface*/
|
||||
__extension__ union {
|
||||
LONG lPitch; /* 10: distance to start of next line (return value only)*/
|
||||
DWORD dwLinearSize;
|
||||
} DUMMYUNIONNAME1;
|
||||
DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
|
||||
__extension__ union {
|
||||
DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
|
||||
DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
|
||||
DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
|
||||
} DUMMYUNIONNAME2;
|
||||
DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
|
||||
DWORD dwReserved; /* 20:reserved*/
|
||||
LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
|
||||
DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
|
||||
DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
|
||||
DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
|
||||
DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
|
||||
DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
|
||||
DDSCAPS ddsCaps; /* 68: direct draw surface caps */
|
||||
DWORD dwSize; /* 0: size of the DDSURFACEDESC structure*/
|
||||
DWORD dwFlags; /* 4: determines what fields are valid*/
|
||||
DWORD dwHeight; /* 8: height of surface to be created*/
|
||||
DWORD dwWidth; /* C: width of input surface*/
|
||||
__extension__ union {
|
||||
LONG lPitch; /* 10: distance to start of next line (return value only)*/
|
||||
DWORD dwLinearSize;
|
||||
} DUMMYUNIONNAME1;
|
||||
DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
|
||||
__extension__ union {
|
||||
DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
|
||||
DWORD dwZBufferBitDepth;/*18: depth of Z buffer requested*/
|
||||
DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
|
||||
} DUMMYUNIONNAME2;
|
||||
DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
|
||||
DWORD dwReserved; /* 20:reserved*/
|
||||
LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
|
||||
DDCOLORKEY ddckCKDestOverlay;/* 28: CK for dest overlay use*/
|
||||
DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
|
||||
DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
|
||||
DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
|
||||
DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
|
||||
DDSCAPS ddsCaps; /* 68: direct draw surface caps */
|
||||
} DDSURFACEDESC,*LPDDSURFACEDESC;
|
||||
|
||||
typedef struct _DDSURFACEDESC2
|
||||
{
|
||||
DWORD dwSize; /* 0: size of the DDSURFACEDESC2 structure*/
|
||||
DWORD dwFlags; /* 4: determines what fields are valid*/
|
||||
DWORD dwHeight; /* 8: height of surface to be created*/
|
||||
DWORD dwWidth; /* C: width of input surface*/
|
||||
__extension__ union {
|
||||
LONG lPitch; /*10: distance to start of next line (return value only)*/
|
||||
DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
|
||||
} DUMMYUNIONNAME1;
|
||||
DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
|
||||
__extension__ union {
|
||||
DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
|
||||
DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
|
||||
DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
|
||||
} DUMMYUNIONNAME2;
|
||||
DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
|
||||
DWORD dwReserved; /* 20:reserved*/
|
||||
LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
|
||||
__extension__ union {
|
||||
DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
|
||||
DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
|
||||
} DUMMYUNIONNAME3;
|
||||
DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
|
||||
DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
|
||||
DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
|
||||
DWORD dwSize; /* 0: size of the DDSURFACEDESC2 structure*/
|
||||
DWORD dwFlags; /* 4: determines what fields are valid*/
|
||||
DWORD dwHeight; /* 8: height of surface to be created*/
|
||||
DWORD dwWidth; /* C: width of input surface*/
|
||||
__extension__ union {
|
||||
LONG lPitch; /*10: distance to start of next line (return value only)*/
|
||||
DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */
|
||||
} DUMMYUNIONNAME1;
|
||||
DWORD dwBackBufferCount;/* 14: number of back buffers requested*/
|
||||
__extension__ union {
|
||||
DWORD dwMipMapCount;/* 18:number of mip-map levels requested*/
|
||||
DWORD dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
|
||||
DWORD dwSrcVBHandle;/* 18:source used in VB::Optimize */
|
||||
} DUMMYUNIONNAME2;
|
||||
DWORD dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
|
||||
DWORD dwReserved; /* 20:reserved*/
|
||||
LPVOID lpSurface; /* 24:pointer to the associated surface memory*/
|
||||
__extension__ union {
|
||||
DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use*/
|
||||
DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */
|
||||
} DUMMYUNIONNAME3;
|
||||
DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use*/
|
||||
DDCOLORKEY ddckCKSrcOverlay;/* 38: CK for source overlay use*/
|
||||
DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use*/
|
||||
|
||||
__extension__ union {
|
||||
DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
|
||||
DWORD dwFVF; /* 48: vertex format description of vertex buffers */
|
||||
} DUMMYUNIONNAME4;
|
||||
DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */
|
||||
DWORD dwTextureStage; /* 78: stage in multitexture cascade */
|
||||
__extension__ union {
|
||||
DDPIXELFORMAT ddpfPixelFormat;/* 48: pixel format description of the surface*/
|
||||
DWORD dwFVF; /* 48: vertex format description of vertex buffers */
|
||||
} DUMMYUNIONNAME4;
|
||||
DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */
|
||||
DWORD dwTextureStage; /* 78: stage in multitexture cascade */
|
||||
} DDSURFACEDESC2,*LPDDSURFACEDESC2;
|
||||
|
||||
|
||||
typedef struct _DDARGB {
|
||||
BYTE blue;
|
||||
BYTE green;
|
||||
BYTE red;
|
||||
BYTE alpha;
|
||||
BYTE blue;
|
||||
BYTE green;
|
||||
BYTE red;
|
||||
BYTE alpha;
|
||||
} DDARGB, *LPDDARGB;
|
||||
|
||||
typedef struct _DDRGBA {
|
||||
BYTE red;
|
||||
BYTE green;
|
||||
BYTE blue;
|
||||
BYTE alpha;
|
||||
BYTE red;
|
||||
BYTE green;
|
||||
BYTE blue;
|
||||
BYTE alpha;
|
||||
} DDRGBA, *LPDDRGBA;
|
||||
|
||||
|
||||
@@ -1066,22 +1066,22 @@ typedef struct _DDRGBA {
|
||||
#define DDCOLOR_COLORENABLE 0x00000040
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
LONG lBrightness;
|
||||
LONG lContrast;
|
||||
LONG lHue;
|
||||
LONG lSaturation;
|
||||
LONG lSharpness;
|
||||
LONG lGamma;
|
||||
LONG lColorEnable;
|
||||
DWORD dwReserved1;
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
LONG lBrightness;
|
||||
LONG lContrast;
|
||||
LONG lHue;
|
||||
LONG lSaturation;
|
||||
LONG lSharpness;
|
||||
LONG lGamma;
|
||||
LONG lColorEnable;
|
||||
DWORD dwReserved1;
|
||||
} DDCOLORCONTROL,*LPDDCOLORCONTROL;
|
||||
|
||||
typedef struct {
|
||||
WORD red[256];
|
||||
WORD green[256];
|
||||
WORD blue[256];
|
||||
WORD red[256];
|
||||
WORD green[256];
|
||||
WORD blue[256];
|
||||
} DDGAMMARAMP,*LPDDGAMMARAMP;
|
||||
|
||||
typedef BOOL (CALLBACK *LPDDENUMCALLBACKA)(GUID *, LPSTR, LPSTR, LPVOID);
|
||||
@@ -1161,7 +1161,7 @@ typedef struct _DDBLTFX
|
||||
{
|
||||
DWORD dwFillColor; /* color in RGB or Palettized */
|
||||
DWORD dwFillDepth; /* depth value for z-buffer */
|
||||
DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
|
||||
DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
|
||||
LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */
|
||||
} DUMMYUNIONNAME5;
|
||||
DDCOLORKEY ddckDestColorkey; /* DestColorkey override */
|
||||
|
||||
externo
+18
-18
@@ -932,14 +932,14 @@ DECLARE_INTERFACE_(IDirectSoundNotify,IUnknown)
|
||||
#define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX
|
||||
|
||||
typedef struct _DS3DLISTENER {
|
||||
DWORD dwSize;
|
||||
D3DVECTOR vPosition;
|
||||
D3DVECTOR vVelocity;
|
||||
D3DVECTOR vOrientFront;
|
||||
D3DVECTOR vOrientTop;
|
||||
D3DVALUE flDistanceFactor;
|
||||
D3DVALUE flRolloffFactor;
|
||||
D3DVALUE flDopplerFactor;
|
||||
DWORD dwSize;
|
||||
D3DVECTOR vPosition;
|
||||
D3DVECTOR vVelocity;
|
||||
D3DVECTOR vOrientFront;
|
||||
D3DVECTOR vOrientTop;
|
||||
D3DVALUE flDistanceFactor;
|
||||
D3DVALUE flRolloffFactor;
|
||||
D3DVALUE flDopplerFactor;
|
||||
} DS3DLISTENER, *LPDS3DLISTENER;
|
||||
|
||||
typedef const DS3DLISTENER *LPCDS3DLISTENER;
|
||||
@@ -1019,16 +1019,16 @@ DECLARE_INTERFACE_(IDirectSound3DListener,IUnknown)
|
||||
* IDirectSound3DBuffer interface
|
||||
*/
|
||||
typedef struct _DS3DBUFFER {
|
||||
DWORD dwSize;
|
||||
D3DVECTOR vPosition;
|
||||
D3DVECTOR vVelocity;
|
||||
DWORD dwInsideConeAngle;
|
||||
DWORD dwOutsideConeAngle;
|
||||
D3DVECTOR vConeOrientation;
|
||||
LONG lConeOutsideVolume;
|
||||
D3DVALUE flMinDistance;
|
||||
D3DVALUE flMaxDistance;
|
||||
DWORD dwMode;
|
||||
DWORD dwSize;
|
||||
D3DVECTOR vPosition;
|
||||
D3DVECTOR vVelocity;
|
||||
DWORD dwInsideConeAngle;
|
||||
DWORD dwOutsideConeAngle;
|
||||
D3DVECTOR vConeOrientation;
|
||||
LONG lConeOutsideVolume;
|
||||
D3DVALUE flMinDistance;
|
||||
D3DVALUE flMaxDistance;
|
||||
DWORD dwMode;
|
||||
} DS3DBUFFER, *LPDS3DBUFFER;
|
||||
|
||||
typedef const DS3DBUFFER *LPCDS3DBUFFER;
|
||||
|
||||
+14
-14
@@ -24,24 +24,24 @@
|
||||
#define AMCONTROL_PAD_TO_16x9 0x00000004
|
||||
|
||||
enum AM_MPEG2Level {
|
||||
AM_MPEG2Level_Low = 1,
|
||||
AM_MPEG2Level_Main,
|
||||
AM_MPEG2Level_High1440,
|
||||
AM_MPEG2Level_High
|
||||
AM_MPEG2Level_Low = 1,
|
||||
AM_MPEG2Level_Main,
|
||||
AM_MPEG2Level_High1440,
|
||||
AM_MPEG2Level_High
|
||||
};
|
||||
enum AM_MPEG2Profile {
|
||||
AM_MPEG2Profile_Simple = 1,
|
||||
AM_MPEG2Profile_Main,
|
||||
AM_MPEG2Profile_SNRScalable,
|
||||
AM_MPEG2Profile_SpatiallyScalable,
|
||||
AM_MPEG2Profile_High
|
||||
AM_MPEG2Profile_Simple = 1,
|
||||
AM_MPEG2Profile_Main,
|
||||
AM_MPEG2Profile_SNRScalable,
|
||||
AM_MPEG2Profile_SpatiallyScalable,
|
||||
AM_MPEG2Profile_High
|
||||
};
|
||||
typedef enum {
|
||||
AM_RATE_ChangeRate = 1,
|
||||
AM_RATE_FullDataRateMax = 2,
|
||||
AM_RATE_ReverseDecode = 3,
|
||||
AM_RATE_DecoderPosition = 4,
|
||||
AM_RATE_DecoderVersion = 5
|
||||
AM_RATE_ChangeRate = 1,
|
||||
AM_RATE_FullDataRateMax = 2,
|
||||
AM_RATE_ReverseDecode = 3,
|
||||
AM_RATE_DecoderPosition = 4,
|
||||
AM_RATE_DecoderVersion = 5
|
||||
} AM_PROPERTY_DVD_RATE_CHANGE;
|
||||
|
||||
typedef struct tagVIDEOINFOHEADER2 {
|
||||
|
||||
externo
+2
-2
@@ -58,8 +58,8 @@ extern "C" {
|
||||
#define EC_USER 0x8000
|
||||
/*--- DirectShow Reference - DirectShow Structures */
|
||||
typedef struct {
|
||||
HRESULT hrStatus;
|
||||
void *pData;
|
||||
HRESULT hrStatus;
|
||||
void *pData;
|
||||
} AM_WMT_EVENT_DATA;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
externo
+60
-60
@@ -5,187 +5,187 @@
|
||||
*/
|
||||
|
||||
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_PACK,
|
||||
0x36523B13,0x8EE5,0x11d1,0x8C,0xA3,0x00,0x60,0xB0,0x57,0x66,0x4A)
|
||||
0x36523B13,0x8EE5,0x11d1,0x8C,0xA3,0x00,0x60,0xB0,0x57,0x66,0x4A)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_PES,
|
||||
0xe06d8020,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
|
||||
0xe06d8020,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_WMDRM_TRANSPORT,
|
||||
0x18BEC4EA,0x4676,0x450e,0xB4,0x78,0x0C,0xD8,0x4C,0x54,0xB3,0x27)
|
||||
0x18BEC4EA,0x4676,0x450e,0xB4,0x78,0x0C,0xD8,0x4C,0x54,0xB3,0x27)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_VIDEO,
|
||||
0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
|
||||
0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_MPEG2_VIDEO,
|
||||
0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
|
||||
0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_VIDEOINFO2,
|
||||
0xf72a76A0L,0xeb0a,0x11d0,0xac,0xe4,0x0,0x0,0xc0,0xcc,0x16,0xba)
|
||||
0xf72a76A0L,0xeb0a,0x11d0,0xac,0xe4,0x0,0x0,0xc0,0xcc,0x16,0xba)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_PROGRAM,
|
||||
0xe06d8022,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d8022,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_TRANSPORT,
|
||||
0xe06d8023,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d8023,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_AUDIO,
|
||||
0xe06d802b,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d802b,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DOLBY_AC3,
|
||||
0xe06d802c,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d802c,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_SUBPICTURE,
|
||||
0xe06d802d,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d802d,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_LPCM_AUDIO,
|
||||
0xe06d8032,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d8032,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIATYPE_DVD_ENCRYPTED_PACK,
|
||||
0xed0b916a,0x044d,0x11d1,0xaa,0x78,0x00,0xc0,0x04f,0xc3,0x1d,0x60)
|
||||
0xed0b916a,0x044d,0x11d1,0xaa,0x78,0x00,0xc0,0x04f,0xc3,0x1d,0x60)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIATYPE_DVD_NAVIGATION,
|
||||
0xe06d802e,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d802e,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PCI,
|
||||
0xe06d802f,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d802f,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_DSI,
|
||||
0xe06d8030,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d8030,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PROVIDER,
|
||||
0xe06d8031,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d8031,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_MPEG2Video,
|
||||
0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_DolbyAC3,
|
||||
0xe06d80e4,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d80e4,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_MPEG2Audio,
|
||||
0xe06d80e5,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d80e5,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(FORMAT_DVD_LPCMAudio,
|
||||
0xe06d80e6,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d80e6,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_AC3,
|
||||
0xBFABE720,0x6E1F,0x11D0,0xBC,0xF2,0x44,0x45,0x53,0x54,0x00,0x00)
|
||||
0xBFABE720,0x6E1F,0x11D0,0xBC,0xF2,0x44,0x45,0x53,0x54,0x00,0x00)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_DvdSubPic,
|
||||
0xac390460,0x43af,0x11d0,0xbd,0x6a,0x00,0x35,0x05,0xc1,0x03,0xa9)
|
||||
0xac390460,0x43af,0x11d0,0xbd,0x6a,0x00,0x35,0x05,0xc1,0x03,0xa9)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_CopyProt,
|
||||
0x0E8A0A40,0x6AEF,0x11D0,0x9E,0xD0,0x00,0xA0,0x24,0xCA,0x19,0xB3)
|
||||
0x0E8A0A40,0x6AEF,0x11D0,0x9E,0xD0,0x00,0xA0,0x24,0xCA,0x19,0xB3)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_TSRateChange,
|
||||
0xa503c5c0,0x1d1d,0x11d1,0xad,0x80,0x44,0x45,0x53,0x54,0x0,0x0)
|
||||
0xa503c5c0,0x1d1d,0x11d1,0xad,0x80,0x44,0x45,0x53,0x54,0x0,0x0)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_MPEG4_MediaType_Attributes,
|
||||
0xff6c4bfa,0x7a9,0x4c7b,0xa2,0x37,0x67,0x2f,0x9d,0x68,0x6,0x5f)
|
||||
0xff6c4bfa,0x7a9,0x4c7b,0xa2,0x37,0x67,0x2f,0x9d,0x68,0x6,0x5f)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_CAPTURE,
|
||||
0x65E8773DL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
0x65E8773DL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_RENDER,
|
||||
0x65E8773EL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
0x65E8773EL,0x8F56,0x11D0,0xA3,0xB9,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_DATACOMPRESSOR,
|
||||
0x1E84C900L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
|
||||
0x1E84C900L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_AUDIO,
|
||||
0x6994AD04L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
0x6994AD04L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_VIDEO,
|
||||
0x6994AD05L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
0x6994AD05L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_TVTUNER,
|
||||
0xa799a800L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
|
||||
0xa799a800L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_CROSSBAR,
|
||||
0xa799a801L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
|
||||
0xa799a801L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_TVAUDIO,
|
||||
0xa799a802L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
|
||||
0xa799a802L,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_VBICODEC,
|
||||
0x07dad660L,0x22f1,0x11d1,0xa9,0xf4,0x00,0xc0,0x4f,0xbb,0xde,0x8f)
|
||||
0x07dad660L,0x22f1,0x11d1,0xa9,0xf4,0x00,0xc0,0x4f,0xbb,0xde,0x8f)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_SPLITTER,
|
||||
0x0A4252A0L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
|
||||
0x0A4252A0L,0x7E70,0x11D0,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
|
||||
|
||||
OUR_GUID_ENTRY(IID_IKsInterfaceHandler,
|
||||
0xD3ABC7E0L,0x9A61,0x11D0,0xA4,0x0D,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
0xD3ABC7E0L,0x9A61,0x11D0,0xA4,0x0D,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(IID_IKsDataTypeHandler,
|
||||
0x5FFBAA02L,0x49A3,0x11D0,0x9F,0x36,0x00,0xAA,0x00,0xA2,0x16,0xA1)
|
||||
0x5FFBAA02L,0x49A3,0x11D0,0x9F,0x36,0x00,0xAA,0x00,0xA2,0x16,0xA1)
|
||||
|
||||
OUR_GUID_ENTRY(IID_IKsPin,
|
||||
0xb61178d1L,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1)
|
||||
0xb61178d1L,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1)
|
||||
|
||||
OUR_GUID_ENTRY(IID_IKsControl,
|
||||
0x28F54685L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
0x28F54685L,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(IID_IKsPinFactory,
|
||||
0xCD5EBE6BL,0x8B6E,0x11D1,0x8A,0xE0,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
0xCD5EBE6BL,0x8B6E,0x11D1,0x8A,0xE0,0x00,0xA0,0xC9,0x22,0x31,0x96)
|
||||
|
||||
OUR_GUID_ENTRY(AM_INTERFACESETID_Standard,
|
||||
0x1A8766A0L,0x62CE,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
|
||||
0x1A8766A0L,0x62CE,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00)
|
||||
|
||||
#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
|
||||
OUR_GUID_ENTRY(MEDIATYPE_MPEG2_SECTIONS,
|
||||
0x455f176c,0x4b06,0x47ce,0x9a,0xef,0x8c,0xae,0xf7,0x3d,0xf7,0xb5)
|
||||
0x455f176c,0x4b06,0x47ce,0x9a,0xef,0x8c,0xae,0xf7,0x3d,0xf7,0xb5)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_VERSIONED_TABLES,
|
||||
0x1ed988b0,0x3ffc,0x4523,0x87,0x25,0x34,0x7b,0xee,0xc1,0xa8,0xa0)
|
||||
0x1ed988b0,0x3ffc,0x4523,0x87,0x25,0x34,0x7b,0xee,0xc1,0xa8,0xa0)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ATSC_SI,
|
||||
0xb3c7397c,0xd303,0x414d,0xb3,0x3c,0x4e,0xd2,0xc9,0xd2,0x97,0x33)
|
||||
0xb3c7397c,0xd303,0x414d,0xb3,0x3c,0x4e,0xd2,0xc9,0xd2,0x97,0x33)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DVB_SI,
|
||||
0xe9dd31a3,0x221d,0x4adb,0x85,0x32,0x9a,0xf3,0x9,0xc1,0xa4,0x8)
|
||||
0xe9dd31a3,0x221d,0x4adb,0x85,0x32,0x9a,0xf3,0x9,0xc1,0xa4,0x8)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_ISDB_SI,
|
||||
0xe89ad298,0x3601,0x4b06,0xaa,0xec,0x9d,0xde,0xed,0xcc,0x5b,0xd0)
|
||||
0xe89ad298,0x3601,0x4b06,0xaa,0xec,0x9d,0xde,0xed,0xcc,0x5b,0xd0)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_TIF_SI,
|
||||
0xec232eb2,0xcb96,0x4191,0xb2,0x26,0xe,0xa1,0x29,0xf3,0x82,0x50)
|
||||
0xec232eb2,0xcb96,0x4191,0xb2,0x26,0xe,0xa1,0x29,0xf3,0x82,0x50)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2DATA,
|
||||
0xc892e55b,0x252d,0x42b5,0xa3,0x16,0xd9,0x97,0xe7,0xa5,0xd9,0x95)
|
||||
0xc892e55b,0x252d,0x42b5,0xa3,0x16,0xd9,0x97,0xe7,0xa5,0xd9,0x95)
|
||||
#endif
|
||||
/* ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) ||
|
||||
(NTDDI_VERSION >= NTDDI_WS03SP1) */
|
||||
(NTDDI_VERSION >= NTDDI_WS03SP1) */
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_TRANSPORT_STRIDE,
|
||||
0x138aa9a4,0x1ee2,0x4c5b,0x98,0x8e,0x19,0xab,0xfd,0xbc,0x8a,0x11)
|
||||
0x138aa9a4,0x1ee2,0x4c5b,0x98,0x8e,0x19,0xab,0xfd,0xbc,0x8a,0x11)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_UDCR_TRANSPORT,
|
||||
0x18BEC4EA,0x4676,0x450e,0xB4,0x78,0x0C,0xD8,0x4C,0x54,0xB3,0x27)
|
||||
0x18BEC4EA,0x4676,0x450e,0xB4,0x78,0x0C,0xD8,0x4C,0x54,0xB3,0x27)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_PBDA_TRANSPORT_RAW,
|
||||
0x0d7aed42,0xcb9a,0x11db,0x97,0x5,0x0,0x50,0x56,0xc0,0x0,0x8)
|
||||
0x0d7aed42,0xcb9a,0x11db,0x97,0x5,0x0,0x50,0x56,0xc0,0x0,0x8)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_PBDA_TRANSPORT_PROCESSED,
|
||||
0xaf748dd4,0xd80,0x11db,0x97,0x5,0x0,0x50,0x56,0xc0,0x0,0x8)
|
||||
0xaf748dd4,0xd80,0x11db,0x97,0x5,0x0,0x50,0x56,0xc0,0x0,0x8)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_DTS,
|
||||
0xe06d8033,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d8033,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(MEDIASUBTYPE_SDDS,
|
||||
0xe06d8034,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
0xe06d8034,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x05f,0x6c,0xbb,0xea)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_DVD_RateChange,
|
||||
0x3577eb09,0x9582,0x477f,0xb2,0x9c,0xb0,0xc4,0x52,0xa4,0xff,0x9a)
|
||||
0x3577eb09,0x9582,0x477f,0xb2,0x9c,0xb0,0xc4,0x52,0xa4,0xff,0x9a)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_DvdKaraoke,
|
||||
0xae4720ae,0xaa71,0x42d8,0xb8,0x2a,0xff,0xfd,0xf5,0x8b,0x76,0xfd)
|
||||
0xae4720ae,0xaa71,0x42d8,0xb8,0x2a,0xff,0xfd,0xf5,0x8b,0x76,0xfd)
|
||||
|
||||
OUR_GUID_ENTRY(AM_KSPROPSETID_FrameStep,
|
||||
0xc830acbd,0xab07,0x492f,0x88,0x52,0x45,0xb6,0x98,0x7c,0x29,0x79)
|
||||
0xc830acbd,0xab07,0x492f,0x88,0x52,0x45,0xb6,0x98,0x7c,0x29,0x79)
|
||||
#endif /* NTDDI_VERSION >= NTDDI_WINXP */
|
||||
|
||||
#if (NTDDI_VERSION >= NTDDI_WS03SP1)
|
||||
OUR_GUID_ENTRY(AM_KSCATEGORY_VBICODEC_MI,
|
||||
0x9c24a977,0x951,0x451a,0x80,0x6,0xe,0x49,0xbd,0x28,0xcd,0x5f)
|
||||
0x9c24a977,0x951,0x451a,0x80,0x6,0xe,0x49,0xbd,0x28,0xcd,0x5f)
|
||||
#endif /* NTDDI_VERSION >= NTDDI_WS03SP1 */
|
||||
|
||||
|
||||
externo
+4
-4
@@ -2097,12 +2097,12 @@ typedef LONGLONG REFERENCE_TIME;
|
||||
DWORD dwMerit;
|
||||
union {
|
||||
struct {
|
||||
ULONG cPins;
|
||||
const REGFILTERPINS *rgPins;
|
||||
ULONG cPins;
|
||||
const REGFILTERPINS *rgPins;
|
||||
};
|
||||
struct {
|
||||
ULONG cPins2;
|
||||
const REGFILTERPINS2 *rgPins2;
|
||||
ULONG cPins2;
|
||||
const REGFILTERPINS2 *rgPins2;
|
||||
};
|
||||
};
|
||||
} REGFILTER2;
|
||||
|
||||
externo
+9
-9
@@ -1,32 +1,32 @@
|
||||
// ISO C9x compliant inttypes.h for Microsoft Visual Studio
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Copyright (c) 2006 Alexander Chemeris
|
||||
//
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
//
|
||||
// 3. The name of the author may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MSC_VER // [
|
||||
|
||||
externo
+10
-10
@@ -1,32 +1,32 @@
|
||||
// ISO C9x compliant stdint.h for Microsoft Visual Studio
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Copyright (c) 2006 Alexander Chemeris
|
||||
//
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
//
|
||||
// 3. The name of the author may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MSC_STDINT_H_ // [
|
||||
@@ -39,7 +39,7 @@
|
||||
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
|
||||
#if (_MSC_VER < 1300) && defined(__cplusplus)
|
||||
extern "C++" {
|
||||
#endif
|
||||
#endif
|
||||
# include <wchar.h>
|
||||
#if (_MSC_VER < 1300) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
+15
-26
@@ -7,31 +7,24 @@ project(${JASPER_LIBRARY})
|
||||
|
||||
add_definitions(-DEXCLUDE_MIF_SUPPORT -DEXCLUDE_PNM_SUPPORT -DEXCLUDE_BMP_SUPPORT -DEXCLUDE_RAS_SUPPORT -DEXCLUDE_JPG_SUPPORT -DEXCLUDE_PGX_SUPPORT)
|
||||
|
||||
# List of C++ files:
|
||||
ocv_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# The .cpp files:
|
||||
file(GLOB lib_srcs *.c)
|
||||
file(GLOB lib_hdrs *.h)
|
||||
file(GLOB lib_ext_hdrs jasper/*.h)
|
||||
|
||||
# ----------------------------------------------------------------------------------
|
||||
# Define the library target:
|
||||
# Define the library target:
|
||||
# ----------------------------------------------------------------------------------
|
||||
|
||||
add_library(${JASPER_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs})
|
||||
|
||||
if(MSVC)
|
||||
if(NOT ENABLE_NOISY_WARNINGS)
|
||||
string(REPLACE "/W3" "/W0" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
string(REPLACE "/W4" "/W0" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
if(WIN32 AND NOT MINGW)
|
||||
add_definitions(-DJAS_WIN_MSVC_BUILD)
|
||||
endif()
|
||||
endif(WIN32 AND NOT MINGW)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-uninitialized")
|
||||
endif()
|
||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-implicit-function-declaration -Wno-uninitialized -Wmissing-prototypes -Wmissing-declarations -Wunused -Wshadow -Wsign-compare)
|
||||
ocv_warnings_disable(CMAKE_C_FLAGS /wd4013 /wd4018 /wd4101 /wd4244 /wd4267 /wd4715) # vs2005
|
||||
|
||||
if(UNIX)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
|
||||
@@ -39,22 +32,18 @@ if(UNIX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-implicit-function-declaration -Wno-unused")
|
||||
endif()
|
||||
|
||||
set_target_properties(${JASPER_LIBRARY}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${JASPER_LIBRARY}
|
||||
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/${OPENCV_LIB_INSTALL_PATH}"
|
||||
)
|
||||
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${JASPER_LIBRARY}
|
||||
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
|
||||
)
|
||||
|
||||
if(ENABLE_SOLUTION_FOLDERS)
|
||||
set_target_properties(${JASPER_LIBRARY} PROPERTIES FOLDER "3rdparty")
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
install(TARGETS ${JASPER_LIBRARY} ARCHIVE DESTINATION share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH} COMPONENT main)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
install(TARGETS ${JASPER_LIBRARY} ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main)
|
||||
endif()
|
||||
|
||||
|
||||
externo
+162
@@ -0,0 +1,162 @@
|
||||
jasper (1.900.1-13) unstable; urgency=high
|
||||
|
||||
* Fix CVE-2011-4516 and CVE-2011-4517: Two buffer overflow issues possibly
|
||||
exploitable via specially crafted input files (Closes: #652649)
|
||||
Thanks to Red Hat and Michael Gilbert
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Wed, 04 Jan 2012 19:14:40 +0100
|
||||
|
||||
jasper (1.900.1-12) unstable; urgency=low
|
||||
|
||||
* Added patch to fix filename buffer overflow, thanks to Jonas Smedegard
|
||||
and Alex Cherepanov from ghostscript (Closes: #649833)
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Sun, 27 Nov 2011 19:56:01 +0100
|
||||
|
||||
jasper (1.900.1-11) unstable; urgency=low
|
||||
|
||||
* Added Multiarch support, thanks to Colin Watson (Closes: #645118)
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Wed, 02 Nov 2011 17:16:10 +0100
|
||||
|
||||
jasper (1.900.1-10) unstable; urgency=low
|
||||
|
||||
* Added debian/watch
|
||||
* debian/patches/01-misc-fixes.patch:
|
||||
- Separated out config.{guess,sub}
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Mon, 15 Aug 2011 19:09:29 +0200
|
||||
|
||||
jasper (1.900.1-9) unstable; urgency=low
|
||||
|
||||
* Switch to dpkg-source 3.0 (quilt) format
|
||||
* Using new dh 7 build system
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Tue, 12 Jul 2011 20:21:21 +0200
|
||||
|
||||
jasper (1.900.1-8) unstable; urgency=low
|
||||
|
||||
* Removed unneeded .la file (Closes: #633162)
|
||||
* debian/control:
|
||||
- Standards-Version: 3.9.2
|
||||
- use libjpeg8-dev instead of libjpeg62-dev
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Mon, 11 Jul 2011 21:27:24 +0200
|
||||
|
||||
jasper (1.900.1-7) unstable; urgency=low
|
||||
|
||||
* Acknowledge NMU
|
||||
* Added patch to fix Debian patch for CVE-2008-3521 (Closes: #506739)
|
||||
* debian/control: Standards-Version: 3.8.4
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Sun, 21 Feb 2010 16:09:45 +0100
|
||||
|
||||
jasper (1.900.1-6.1) unstable; urgency=low
|
||||
|
||||
* Non-maintainer upload.
|
||||
* This is a fix for the GeoJP2 patch introduced in 1.900.1-5 which caused
|
||||
GDAL faulting. Thanks Even Rouault. (Closes: #553429)
|
||||
|
||||
-- Francesco Paolo Lovergine <frankie@debian.org> Wed, 28 Oct 2009 09:39:28 +0100
|
||||
|
||||
jasper (1.900.1-6) unstable; urgency=low
|
||||
|
||||
* Reverted to jasper 1.900.1-6 because 1.900.1-5.1 messed up (see #528543)
|
||||
but 1.900.1-5 wasn't available anymore. (Closes: #514296, #528543)
|
||||
* Re-applied patch from #275619 as in 1.900.1-5
|
||||
* debian/control: Standards-Version: 3.8.2
|
||||
* Applied patch by Nico Golde (Closes: #501021)
|
||||
- CVE-2008-3522[0]: Buffer overflow.
|
||||
- CVE-2008-3521[1]: unsecure temporary files handling.
|
||||
- CVE-2008-3520[2]: Multiple integer overflows.
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Sat, 20 Jun 2009 15:21:16 +0200
|
||||
|
||||
jasper (1.900.1-5.1) unstable; urgency=low
|
||||
|
||||
* Non-maintainer upload.
|
||||
* add patches/02_security.dpatch to fix various CVEs (Closes: #501021):
|
||||
+ CVE-2008-3522[0]: Buffer overflow.
|
||||
+ CVE-2008-3521[1]: unsecure temporary files handling.
|
||||
+ CVE-2008-3520[2]: Multiple integer overflows.
|
||||
|
||||
-- Pierre Habouzit <madcoder@debian.org> Sun, 12 Oct 2008 21:40:59 +0200
|
||||
|
||||
jasper (1.900.1-5) unstable; urgency=low
|
||||
|
||||
* Added GeoJP2 patch by Sven Geggus <sven.geggus@iitb.fraunhofer.de>
|
||||
(Closes: #275619)
|
||||
* debian/control: Standards-Version: 3.8.0
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Sun, 08 Jun 2008 13:14:24 +0200
|
||||
|
||||
jasper (1.900.1-4) unstable; urgency=low
|
||||
|
||||
* src/libjasper/jpc/jpc_dec.c: Extended assert() to accept 4 color
|
||||
components (Closes: #469786)
|
||||
* debian/rules: improve "make distclean", thanks to lintian
|
||||
* debian/control:
|
||||
- Standards-Version: 3.7.3
|
||||
- ${Source-Version} -> ${binary:Version}
|
||||
- Removed self-dependencies of libjasper-dev
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Sun, 09 Mar 2008 11:53:44 +0100
|
||||
|
||||
jasper (1.900.1-3) unstable; urgency=low
|
||||
|
||||
* Fixed segfaults on broken images (Closes: #413041)
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Tue, 10 Apr 2007 10:05:10 +0200
|
||||
|
||||
jasper (1.900.1-2) experimental; urgency=low
|
||||
|
||||
* Added jas_tmr.h to -dev package (Closes: #414705)
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Tue, 13 Mar 2007 14:23:58 +0100
|
||||
|
||||
jasper (1.900.1-1) experimental; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* debian/control:
|
||||
- Standards-Version: 3.7.2
|
||||
- Build-Depends: freeglut3-dev instead of libglut3-dev (Closes: #394496)
|
||||
* Renamed packages to libjasper1, libjasper-dev, libjasper-runtime according
|
||||
to upstream shared library naming change
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Fri, 26 Jan 2007 14:22:18 +0100
|
||||
|
||||
jasper (1.701.0-2) unstable; urgency=low
|
||||
|
||||
* Prevent compression of pdf documents in binary packages
|
||||
* Added man pages for the executables (Closes: #250077)
|
||||
* Again renamed binary packages to reflect Policy:
|
||||
- libjasper-1.701-1
|
||||
- libjasper-1.701-dev (Provides, Replaces and Conflicts: libjasper-dev)
|
||||
- libjasper-runtime
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Sun, 20 Jun 2004 13:54:10 +0200
|
||||
|
||||
jasper (1.701.0-1) unstable; urgency=low
|
||||
|
||||
* New maintainer (Closes: #217099)
|
||||
* New upstream release (Closes: #217570)
|
||||
- new DFSG-compliant license (Closes: #218999, #245075)
|
||||
- includes newer libtool related files (Closes: #210383)
|
||||
* debian/control:
|
||||
- Standards-Version: 3.6.1
|
||||
- Changed binary package names, fixed interdependencies (Closes: #211592)
|
||||
libjasper-1.700-2 => libjasper1
|
||||
libjasper-1.700-2-dev => libjasper-dev
|
||||
libjasper-progs => libjasper-runtime
|
||||
(new packages conflicting and replacing the old ones)
|
||||
- Added libxi-dev, libxmu-dev, libxt-dev to Build-Depends
|
||||
(Closes: #250481)
|
||||
|
||||
-- Roland Stigge <stigge@antcom.de> Sat, 19 Jun 2004 23:19:32 +0200
|
||||
|
||||
jasper (1.700.2-1) unstable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
-- Christopher L Cheney <ccheney@debian.org> Fri, 22 Aug 2003 01:30:00 -0500
|
||||
|
||||
externo
+62
@@ -0,0 +1,62 @@
|
||||
This package was debianized by Christopher L Cheney <ccheney@debian.org> on
|
||||
Fri, 22 Aug 2003 01:33:34 -0500.
|
||||
|
||||
The current maintainer is Roland Stigge <stigge@antcom.de>
|
||||
|
||||
It was downloaded from http://www.ece.uvic.ca/~mdadams/jasper/
|
||||
|
||||
Upstream Author: Michael Adams <mdadams@ece.uvic.ca>
|
||||
|
||||
License:
|
||||
|
||||
JasPer License Version 2.0
|
||||
|
||||
Copyright (c) 1999-2000 Image Power, Inc.
|
||||
Copyright (c) 1999-2000 The University of British Columbia
|
||||
Copyright (c) 2001-2003 Michael David Adams
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person (the
|
||||
"User") obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
1. The above copyright notices and this permission notice (which
|
||||
includes the disclaimer below) shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
2. The name of a copyright holder shall not be used to endorse or
|
||||
promote products derived from the Software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO
|
||||
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
|
||||
INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE
|
||||
PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE
|
||||
THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY.
|
||||
EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS
|
||||
BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL
|
||||
PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS
|
||||
GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE
|
||||
ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE
|
||||
IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL
|
||||
SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES,
|
||||
AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL
|
||||
SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH
|
||||
THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH,
|
||||
PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
|
||||
externo
+903
-904
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+36
-36
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -83,22 +83,22 @@ static int jas_dbglevel = 0;
|
||||
/* Set the library debug level. */
|
||||
int jas_setdbglevel(int dbglevel)
|
||||
{
|
||||
int olddbglevel;
|
||||
int olddbglevel;
|
||||
|
||||
/* Save the old debug level. */
|
||||
olddbglevel = jas_dbglevel;
|
||||
/* Save the old debug level. */
|
||||
olddbglevel = jas_dbglevel;
|
||||
|
||||
/* Change the debug level. */
|
||||
jas_dbglevel = dbglevel;
|
||||
/* Change the debug level. */
|
||||
jas_dbglevel = dbglevel;
|
||||
|
||||
/* Return the old debug level. */
|
||||
return olddbglevel;
|
||||
/* Return the old debug level. */
|
||||
return olddbglevel;
|
||||
}
|
||||
|
||||
/* Get the library debug level. */
|
||||
int jas_getdbglevel()
|
||||
{
|
||||
return jas_dbglevel;
|
||||
return jas_dbglevel;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -108,30 +108,30 @@ int jas_getdbglevel()
|
||||
/* Perform formatted output to standard error. */
|
||||
int jas_eprintf(const char *fmt, ...)
|
||||
{
|
||||
int ret;
|
||||
va_list ap;
|
||||
int ret;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
va_start(ap, fmt);
|
||||
ret = vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Dump memory to a stream. */
|
||||
int jas_memdump(FILE *out, void *data, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
size_t j;
|
||||
uchar *dp;
|
||||
dp = data;
|
||||
for (i = 0; i < len; i += 16) {
|
||||
fprintf(out, "%04x:", (int)i);
|
||||
for (j = 0; j < 16; ++j) {
|
||||
if (i + j < len) {
|
||||
fprintf(out, " %02x", dp[i + j]);
|
||||
}
|
||||
}
|
||||
fprintf(out, "\n");
|
||||
}
|
||||
return 0;
|
||||
size_t i;
|
||||
size_t j;
|
||||
uchar *dp;
|
||||
dp = data;
|
||||
for (i = 0; i < len; i += 16) {
|
||||
fprintf(out, "%04x:", (int)i);
|
||||
for (j = 0; j < 16; ++j) {
|
||||
if (i + j < len) {
|
||||
fprintf(out, " %02x", dp[i + j]);
|
||||
}
|
||||
}
|
||||
fprintf(out, "\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
externo
+77
-77
@@ -2,19 +2,19 @@
|
||||
* Copyright (c) 1999-2000, Image Power, Inc. and the University of
|
||||
* British Columbia.
|
||||
* Copyright (c) 2001-2002 Michael David Adams.
|
||||
* All rights reserved.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -91,78 +91,78 @@ char *jas_optarg = 0;
|
||||
|
||||
static jas_opt_t *jas_optlookup(jas_opt_t *opts, char *name)
|
||||
{
|
||||
jas_opt_t *opt;
|
||||
jas_opt_t *opt;
|
||||
|
||||
for (opt = opts; opt->id >= 0 && opt->name; ++opt) {
|
||||
if (!strcmp(opt->name, name)) {
|
||||
return opt;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
for (opt = opts; opt->id >= 0 && opt->name; ++opt) {
|
||||
if (!strcmp(opt->name, name)) {
|
||||
return opt;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int jas_getopt(int argc, char **argv, jas_opt_t *opts)
|
||||
{
|
||||
char *cp;
|
||||
int id;
|
||||
int hasarg;
|
||||
jas_opt_t *opt;
|
||||
char *s;
|
||||
char *cp;
|
||||
int id;
|
||||
int hasarg;
|
||||
jas_opt_t *opt;
|
||||
char *s;
|
||||
|
||||
if (!jas_optind) {
|
||||
jas_optind = JAS_MIN(1, argc);
|
||||
}
|
||||
while (jas_optind < argc) {
|
||||
s = cp = argv[jas_optind];
|
||||
if (*cp == '-') {
|
||||
/* We are processing an option. */
|
||||
++jas_optind;
|
||||
if (*++cp == '-') {
|
||||
/* We are processing a long option. */
|
||||
++cp;
|
||||
if (*cp == '\0') {
|
||||
/* This is the end of the options. */
|
||||
return JAS_GETOPT_EOF;
|
||||
}
|
||||
if (!(opt = jas_optlookup(opts, cp))) {
|
||||
if (jas_opterr) {
|
||||
jas_eprintf("unknown long option %s\n", s);
|
||||
}
|
||||
return JAS_GETOPT_ERR;
|
||||
}
|
||||
hasarg = (opt->flags & JAS_OPT_HASARG) != 0;
|
||||
id = opt->id;
|
||||
} else {
|
||||
/* We are processing a short option. */
|
||||
if (strlen(cp) != 1 ||
|
||||
!(opt = jas_optlookup(opts, cp))) {
|
||||
if (jas_opterr) {
|
||||
jas_eprintf("unknown short option %s\n", s);
|
||||
}
|
||||
return JAS_GETOPT_ERR;
|
||||
}
|
||||
hasarg = (opt->flags & JAS_OPT_HASARG) != 0;
|
||||
id = opt->id;
|
||||
}
|
||||
if (hasarg) {
|
||||
/* The option has an argument. */
|
||||
if (jas_optind >= argc) {
|
||||
if (jas_opterr) {
|
||||
jas_eprintf("missing argument for option %s\n", s);
|
||||
}
|
||||
return JAS_GETOPT_ERR;
|
||||
}
|
||||
jas_optarg = argv[jas_optind];
|
||||
++jas_optind;
|
||||
} else {
|
||||
/* The option does not have an argument. */
|
||||
jas_optarg = 0;
|
||||
}
|
||||
return id;
|
||||
} else {
|
||||
/* We are not processing an option. */
|
||||
return JAS_GETOPT_EOF;
|
||||
}
|
||||
}
|
||||
return JAS_GETOPT_EOF;
|
||||
if (!jas_optind) {
|
||||
jas_optind = JAS_MIN(1, argc);
|
||||
}
|
||||
while (jas_optind < argc) {
|
||||
s = cp = argv[jas_optind];
|
||||
if (*cp == '-') {
|
||||
/* We are processing an option. */
|
||||
++jas_optind;
|
||||
if (*++cp == '-') {
|
||||
/* We are processing a long option. */
|
||||
++cp;
|
||||
if (*cp == '\0') {
|
||||
/* This is the end of the options. */
|
||||
return JAS_GETOPT_EOF;
|
||||
}
|
||||
if (!(opt = jas_optlookup(opts, cp))) {
|
||||
if (jas_opterr) {
|
||||
jas_eprintf("unknown long option %s\n", s);
|
||||
}
|
||||
return JAS_GETOPT_ERR;
|
||||
}
|
||||
hasarg = (opt->flags & JAS_OPT_HASARG) != 0;
|
||||
id = opt->id;
|
||||
} else {
|
||||
/* We are processing a short option. */
|
||||
if (strlen(cp) != 1 ||
|
||||
!(opt = jas_optlookup(opts, cp))) {
|
||||
if (jas_opterr) {
|
||||
jas_eprintf("unknown short option %s\n", s);
|
||||
}
|
||||
return JAS_GETOPT_ERR;
|
||||
}
|
||||
hasarg = (opt->flags & JAS_OPT_HASARG) != 0;
|
||||
id = opt->id;
|
||||
}
|
||||
if (hasarg) {
|
||||
/* The option has an argument. */
|
||||
if (jas_optind >= argc) {
|
||||
if (jas_opterr) {
|
||||
jas_eprintf("missing argument for option %s\n", s);
|
||||
}
|
||||
return JAS_GETOPT_ERR;
|
||||
}
|
||||
jas_optarg = argv[jas_optind];
|
||||
++jas_optind;
|
||||
} else {
|
||||
/* The option does not have an argument. */
|
||||
jas_optarg = 0;
|
||||
}
|
||||
return id;
|
||||
} else {
|
||||
/* We are not processing an option. */
|
||||
return JAS_GETOPT_EOF;
|
||||
}
|
||||
}
|
||||
return JAS_GETOPT_EOF;
|
||||
}
|
||||
|
||||
externo
+1096
-1097
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+451
-451
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -64,454 +64,454 @@
|
||||
|
||||
uchar jas_iccprofdata_srgb[] =
|
||||
{
|
||||
0x00, 0x00, 0x0c, 0x48, 0x4c, 0x69, 0x6e, 0x6f,
|
||||
0x02, 0x10, 0x00, 0x00, 0x6d, 0x6e, 0x74, 0x72,
|
||||
0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5a, 0x20,
|
||||
0x07, 0xce, 0x00, 0x02, 0x00, 0x09, 0x00, 0x06,
|
||||
0x00, 0x31, 0x00, 0x00, 0x61, 0x63, 0x73, 0x70,
|
||||
0x4d, 0x53, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00,
|
||||
0x49, 0x45, 0x43, 0x20, 0x73, 0x52, 0x47, 0x42,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6,
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d,
|
||||
0x48, 0x50, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x11, 0x63, 0x70, 0x72, 0x74,
|
||||
0x00, 0x00, 0x01, 0x50, 0x00, 0x00, 0x00, 0x33,
|
||||
0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x01, 0x84,
|
||||
0x00, 0x00, 0x00, 0x6c, 0x77, 0x74, 0x70, 0x74,
|
||||
0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x14,
|
||||
0x62, 0x6b, 0x70, 0x74, 0x00, 0x00, 0x02, 0x04,
|
||||
0x00, 0x00, 0x00, 0x14, 0x72, 0x58, 0x59, 0x5a,
|
||||
0x00, 0x00, 0x02, 0x18, 0x00, 0x00, 0x00, 0x14,
|
||||
0x67, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x2c,
|
||||
0x00, 0x00, 0x00, 0x14, 0x62, 0x58, 0x59, 0x5a,
|
||||
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x14,
|
||||
0x64, 0x6d, 0x6e, 0x64, 0x00, 0x00, 0x02, 0x54,
|
||||
0x00, 0x00, 0x00, 0x70, 0x64, 0x6d, 0x64, 0x64,
|
||||
0x00, 0x00, 0x02, 0xc4, 0x00, 0x00, 0x00, 0x88,
|
||||
0x76, 0x75, 0x65, 0x64, 0x00, 0x00, 0x03, 0x4c,
|
||||
0x00, 0x00, 0x00, 0x86, 0x76, 0x69, 0x65, 0x77,
|
||||
0x00, 0x00, 0x03, 0xd4, 0x00, 0x00, 0x00, 0x24,
|
||||
0x6c, 0x75, 0x6d, 0x69, 0x00, 0x00, 0x03, 0xf8,
|
||||
0x00, 0x00, 0x00, 0x14, 0x6d, 0x65, 0x61, 0x73,
|
||||
0x00, 0x00, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x24,
|
||||
0x74, 0x65, 0x63, 0x68, 0x00, 0x00, 0x04, 0x30,
|
||||
0x00, 0x00, 0x00, 0x0c, 0x72, 0x54, 0x52, 0x43,
|
||||
0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, 0x08, 0x0c,
|
||||
0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c,
|
||||
0x00, 0x00, 0x08, 0x0c, 0x62, 0x54, 0x52, 0x43,
|
||||
0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, 0x08, 0x0c,
|
||||
0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 0x00, 0x00,
|
||||
0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68,
|
||||
0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x31, 0x39,
|
||||
0x39, 0x38, 0x20, 0x48, 0x65, 0x77, 0x6c, 0x65,
|
||||
0x74, 0x74, 0x2d, 0x50, 0x61, 0x63, 0x6b, 0x61,
|
||||
0x72, 0x64, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61,
|
||||
0x6e, 0x79, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
|
||||
0x73, 0x52, 0x47, 0x42, 0x20, 0x49, 0x45, 0x43,
|
||||
0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e,
|
||||
0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x12, 0x73, 0x52, 0x47,
|
||||
0x42, 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39,
|
||||
0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xf3, 0x51, 0x00, 0x01, 0x00, 0x00,
|
||||
0x00, 0x01, 0x16, 0xcc, 0x58, 0x59, 0x5a, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x6f, 0xa2, 0x00, 0x00, 0x38, 0xf5,
|
||||
0x00, 0x00, 0x03, 0x90, 0x58, 0x59, 0x5a, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x99,
|
||||
0x00, 0x00, 0xb7, 0x85, 0x00, 0x00, 0x18, 0xda,
|
||||
0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x24, 0xa0, 0x00, 0x00, 0x0f, 0x84,
|
||||
0x00, 0x00, 0xb6, 0xcf, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16,
|
||||
0x49, 0x45, 0x43, 0x20, 0x68, 0x74, 0x74, 0x70,
|
||||
0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69,
|
||||
0x65, 0x63, 0x2e, 0x63, 0x68, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x16, 0x49, 0x45, 0x43, 0x20, 0x68, 0x74, 0x74,
|
||||
0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e,
|
||||
0x69, 0x65, 0x63, 0x2e, 0x63, 0x68, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e,
|
||||
0x49, 0x45, 0x43, 0x20, 0x36, 0x31, 0x39, 0x36,
|
||||
0x36, 0x2d, 0x32, 0x2e, 0x31, 0x20, 0x44, 0x65,
|
||||
0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x52, 0x47,
|
||||
0x42, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x75, 0x72,
|
||||
0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x2d,
|
||||
0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x2e, 0x49, 0x45, 0x43, 0x20, 0x36, 0x31, 0x39,
|
||||
0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x20, 0x44,
|
||||
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x52,
|
||||
0x47, 0x42, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x75,
|
||||
0x72, 0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20,
|
||||
0x2d, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c,
|
||||
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
|
||||
0x65, 0x20, 0x56, 0x69, 0x65, 0x77, 0x69, 0x6e,
|
||||
0x67, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x49,
|
||||
0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d,
|
||||
0x32, 0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x52,
|
||||
0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
|
||||
0x20, 0x56, 0x69, 0x65, 0x77, 0x69, 0x6e, 0x67,
|
||||
0x20, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x49, 0x45,
|
||||
0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32,
|
||||
0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x76, 0x69, 0x65, 0x77,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xa4, 0xfe,
|
||||
0x00, 0x14, 0x5f, 0x2e, 0x00, 0x10, 0xcf, 0x14,
|
||||
0x00, 0x03, 0xed, 0xcc, 0x00, 0x04, 0x13, 0x0b,
|
||||
0x00, 0x03, 0x5c, 0x9e, 0x00, 0x00, 0x00, 0x01,
|
||||
0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x4c, 0x09, 0x56, 0x00, 0x50, 0x00, 0x00,
|
||||
0x00, 0x57, 0x1f, 0xe7, 0x6d, 0x65, 0x61, 0x73,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x02, 0x8f, 0x00, 0x00, 0x00, 0x02,
|
||||
0x73, 0x69, 0x67, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x43, 0x52, 0x54, 0x20, 0x63, 0x75, 0x72, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
|
||||
0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x0f,
|
||||
0x00, 0x14, 0x00, 0x19, 0x00, 0x1e, 0x00, 0x23,
|
||||
0x00, 0x28, 0x00, 0x2d, 0x00, 0x32, 0x00, 0x37,
|
||||
0x00, 0x3b, 0x00, 0x40, 0x00, 0x45, 0x00, 0x4a,
|
||||
0x00, 0x4f, 0x00, 0x54, 0x00, 0x59, 0x00, 0x5e,
|
||||
0x00, 0x63, 0x00, 0x68, 0x00, 0x6d, 0x00, 0x72,
|
||||
0x00, 0x77, 0x00, 0x7c, 0x00, 0x81, 0x00, 0x86,
|
||||
0x00, 0x8b, 0x00, 0x90, 0x00, 0x95, 0x00, 0x9a,
|
||||
0x00, 0x9f, 0x00, 0xa4, 0x00, 0xa9, 0x00, 0xae,
|
||||
0x00, 0xb2, 0x00, 0xb7, 0x00, 0xbc, 0x00, 0xc1,
|
||||
0x00, 0xc6, 0x00, 0xcb, 0x00, 0xd0, 0x00, 0xd5,
|
||||
0x00, 0xdb, 0x00, 0xe0, 0x00, 0xe5, 0x00, 0xeb,
|
||||
0x00, 0xf0, 0x00, 0xf6, 0x00, 0xfb, 0x01, 0x01,
|
||||
0x01, 0x07, 0x01, 0x0d, 0x01, 0x13, 0x01, 0x19,
|
||||
0x01, 0x1f, 0x01, 0x25, 0x01, 0x2b, 0x01, 0x32,
|
||||
0x01, 0x38, 0x01, 0x3e, 0x01, 0x45, 0x01, 0x4c,
|
||||
0x01, 0x52, 0x01, 0x59, 0x01, 0x60, 0x01, 0x67,
|
||||
0x01, 0x6e, 0x01, 0x75, 0x01, 0x7c, 0x01, 0x83,
|
||||
0x01, 0x8b, 0x01, 0x92, 0x01, 0x9a, 0x01, 0xa1,
|
||||
0x01, 0xa9, 0x01, 0xb1, 0x01, 0xb9, 0x01, 0xc1,
|
||||
0x01, 0xc9, 0x01, 0xd1, 0x01, 0xd9, 0x01, 0xe1,
|
||||
0x01, 0xe9, 0x01, 0xf2, 0x01, 0xfa, 0x02, 0x03,
|
||||
0x02, 0x0c, 0x02, 0x14, 0x02, 0x1d, 0x02, 0x26,
|
||||
0x02, 0x2f, 0x02, 0x38, 0x02, 0x41, 0x02, 0x4b,
|
||||
0x02, 0x54, 0x02, 0x5d, 0x02, 0x67, 0x02, 0x71,
|
||||
0x02, 0x7a, 0x02, 0x84, 0x02, 0x8e, 0x02, 0x98,
|
||||
0x02, 0xa2, 0x02, 0xac, 0x02, 0xb6, 0x02, 0xc1,
|
||||
0x02, 0xcb, 0x02, 0xd5, 0x02, 0xe0, 0x02, 0xeb,
|
||||
0x02, 0xf5, 0x03, 0x00, 0x03, 0x0b, 0x03, 0x16,
|
||||
0x03, 0x21, 0x03, 0x2d, 0x03, 0x38, 0x03, 0x43,
|
||||
0x03, 0x4f, 0x03, 0x5a, 0x03, 0x66, 0x03, 0x72,
|
||||
0x03, 0x7e, 0x03, 0x8a, 0x03, 0x96, 0x03, 0xa2,
|
||||
0x03, 0xae, 0x03, 0xba, 0x03, 0xc7, 0x03, 0xd3,
|
||||
0x03, 0xe0, 0x03, 0xec, 0x03, 0xf9, 0x04, 0x06,
|
||||
0x04, 0x13, 0x04, 0x20, 0x04, 0x2d, 0x04, 0x3b,
|
||||
0x04, 0x48, 0x04, 0x55, 0x04, 0x63, 0x04, 0x71,
|
||||
0x04, 0x7e, 0x04, 0x8c, 0x04, 0x9a, 0x04, 0xa8,
|
||||
0x04, 0xb6, 0x04, 0xc4, 0x04, 0xd3, 0x04, 0xe1,
|
||||
0x04, 0xf0, 0x04, 0xfe, 0x05, 0x0d, 0x05, 0x1c,
|
||||
0x05, 0x2b, 0x05, 0x3a, 0x05, 0x49, 0x05, 0x58,
|
||||
0x05, 0x67, 0x05, 0x77, 0x05, 0x86, 0x05, 0x96,
|
||||
0x05, 0xa6, 0x05, 0xb5, 0x05, 0xc5, 0x05, 0xd5,
|
||||
0x05, 0xe5, 0x05, 0xf6, 0x06, 0x06, 0x06, 0x16,
|
||||
0x06, 0x27, 0x06, 0x37, 0x06, 0x48, 0x06, 0x59,
|
||||
0x06, 0x6a, 0x06, 0x7b, 0x06, 0x8c, 0x06, 0x9d,
|
||||
0x06, 0xaf, 0x06, 0xc0, 0x06, 0xd1, 0x06, 0xe3,
|
||||
0x06, 0xf5, 0x07, 0x07, 0x07, 0x19, 0x07, 0x2b,
|
||||
0x07, 0x3d, 0x07, 0x4f, 0x07, 0x61, 0x07, 0x74,
|
||||
0x07, 0x86, 0x07, 0x99, 0x07, 0xac, 0x07, 0xbf,
|
||||
0x07, 0xd2, 0x07, 0xe5, 0x07, 0xf8, 0x08, 0x0b,
|
||||
0x08, 0x1f, 0x08, 0x32, 0x08, 0x46, 0x08, 0x5a,
|
||||
0x08, 0x6e, 0x08, 0x82, 0x08, 0x96, 0x08, 0xaa,
|
||||
0x08, 0xbe, 0x08, 0xd2, 0x08, 0xe7, 0x08, 0xfb,
|
||||
0x09, 0x10, 0x09, 0x25, 0x09, 0x3a, 0x09, 0x4f,
|
||||
0x09, 0x64, 0x09, 0x79, 0x09, 0x8f, 0x09, 0xa4,
|
||||
0x09, 0xba, 0x09, 0xcf, 0x09, 0xe5, 0x09, 0xfb,
|
||||
0x0a, 0x11, 0x0a, 0x27, 0x0a, 0x3d, 0x0a, 0x54,
|
||||
0x0a, 0x6a, 0x0a, 0x81, 0x0a, 0x98, 0x0a, 0xae,
|
||||
0x0a, 0xc5, 0x0a, 0xdc, 0x0a, 0xf3, 0x0b, 0x0b,
|
||||
0x0b, 0x22, 0x0b, 0x39, 0x0b, 0x51, 0x0b, 0x69,
|
||||
0x0b, 0x80, 0x0b, 0x98, 0x0b, 0xb0, 0x0b, 0xc8,
|
||||
0x0b, 0xe1, 0x0b, 0xf9, 0x0c, 0x12, 0x0c, 0x2a,
|
||||
0x0c, 0x43, 0x0c, 0x5c, 0x0c, 0x75, 0x0c, 0x8e,
|
||||
0x0c, 0xa7, 0x0c, 0xc0, 0x0c, 0xd9, 0x0c, 0xf3,
|
||||
0x0d, 0x0d, 0x0d, 0x26, 0x0d, 0x40, 0x0d, 0x5a,
|
||||
0x0d, 0x74, 0x0d, 0x8e, 0x0d, 0xa9, 0x0d, 0xc3,
|
||||
0x0d, 0xde, 0x0d, 0xf8, 0x0e, 0x13, 0x0e, 0x2e,
|
||||
0x0e, 0x49, 0x0e, 0x64, 0x0e, 0x7f, 0x0e, 0x9b,
|
||||
0x0e, 0xb6, 0x0e, 0xd2, 0x0e, 0xee, 0x0f, 0x09,
|
||||
0x0f, 0x25, 0x0f, 0x41, 0x0f, 0x5e, 0x0f, 0x7a,
|
||||
0x0f, 0x96, 0x0f, 0xb3, 0x0f, 0xcf, 0x0f, 0xec,
|
||||
0x10, 0x09, 0x10, 0x26, 0x10, 0x43, 0x10, 0x61,
|
||||
0x10, 0x7e, 0x10, 0x9b, 0x10, 0xb9, 0x10, 0xd7,
|
||||
0x10, 0xf5, 0x11, 0x13, 0x11, 0x31, 0x11, 0x4f,
|
||||
0x11, 0x6d, 0x11, 0x8c, 0x11, 0xaa, 0x11, 0xc9,
|
||||
0x11, 0xe8, 0x12, 0x07, 0x12, 0x26, 0x12, 0x45,
|
||||
0x12, 0x64, 0x12, 0x84, 0x12, 0xa3, 0x12, 0xc3,
|
||||
0x12, 0xe3, 0x13, 0x03, 0x13, 0x23, 0x13, 0x43,
|
||||
0x13, 0x63, 0x13, 0x83, 0x13, 0xa4, 0x13, 0xc5,
|
||||
0x13, 0xe5, 0x14, 0x06, 0x14, 0x27, 0x14, 0x49,
|
||||
0x14, 0x6a, 0x14, 0x8b, 0x14, 0xad, 0x14, 0xce,
|
||||
0x14, 0xf0, 0x15, 0x12, 0x15, 0x34, 0x15, 0x56,
|
||||
0x15, 0x78, 0x15, 0x9b, 0x15, 0xbd, 0x15, 0xe0,
|
||||
0x16, 0x03, 0x16, 0x26, 0x16, 0x49, 0x16, 0x6c,
|
||||
0x16, 0x8f, 0x16, 0xb2, 0x16, 0xd6, 0x16, 0xfa,
|
||||
0x17, 0x1d, 0x17, 0x41, 0x17, 0x65, 0x17, 0x89,
|
||||
0x17, 0xae, 0x17, 0xd2, 0x17, 0xf7, 0x18, 0x1b,
|
||||
0x18, 0x40, 0x18, 0x65, 0x18, 0x8a, 0x18, 0xaf,
|
||||
0x18, 0xd5, 0x18, 0xfa, 0x19, 0x20, 0x19, 0x45,
|
||||
0x19, 0x6b, 0x19, 0x91, 0x19, 0xb7, 0x19, 0xdd,
|
||||
0x1a, 0x04, 0x1a, 0x2a, 0x1a, 0x51, 0x1a, 0x77,
|
||||
0x1a, 0x9e, 0x1a, 0xc5, 0x1a, 0xec, 0x1b, 0x14,
|
||||
0x1b, 0x3b, 0x1b, 0x63, 0x1b, 0x8a, 0x1b, 0xb2,
|
||||
0x1b, 0xda, 0x1c, 0x02, 0x1c, 0x2a, 0x1c, 0x52,
|
||||
0x1c, 0x7b, 0x1c, 0xa3, 0x1c, 0xcc, 0x1c, 0xf5,
|
||||
0x1d, 0x1e, 0x1d, 0x47, 0x1d, 0x70, 0x1d, 0x99,
|
||||
0x1d, 0xc3, 0x1d, 0xec, 0x1e, 0x16, 0x1e, 0x40,
|
||||
0x1e, 0x6a, 0x1e, 0x94, 0x1e, 0xbe, 0x1e, 0xe9,
|
||||
0x1f, 0x13, 0x1f, 0x3e, 0x1f, 0x69, 0x1f, 0x94,
|
||||
0x1f, 0xbf, 0x1f, 0xea, 0x20, 0x15, 0x20, 0x41,
|
||||
0x20, 0x6c, 0x20, 0x98, 0x20, 0xc4, 0x20, 0xf0,
|
||||
0x21, 0x1c, 0x21, 0x48, 0x21, 0x75, 0x21, 0xa1,
|
||||
0x21, 0xce, 0x21, 0xfb, 0x22, 0x27, 0x22, 0x55,
|
||||
0x22, 0x82, 0x22, 0xaf, 0x22, 0xdd, 0x23, 0x0a,
|
||||
0x23, 0x38, 0x23, 0x66, 0x23, 0x94, 0x23, 0xc2,
|
||||
0x23, 0xf0, 0x24, 0x1f, 0x24, 0x4d, 0x24, 0x7c,
|
||||
0x24, 0xab, 0x24, 0xda, 0x25, 0x09, 0x25, 0x38,
|
||||
0x25, 0x68, 0x25, 0x97, 0x25, 0xc7, 0x25, 0xf7,
|
||||
0x26, 0x27, 0x26, 0x57, 0x26, 0x87, 0x26, 0xb7,
|
||||
0x26, 0xe8, 0x27, 0x18, 0x27, 0x49, 0x27, 0x7a,
|
||||
0x27, 0xab, 0x27, 0xdc, 0x28, 0x0d, 0x28, 0x3f,
|
||||
0x28, 0x71, 0x28, 0xa2, 0x28, 0xd4, 0x29, 0x06,
|
||||
0x29, 0x38, 0x29, 0x6b, 0x29, 0x9d, 0x29, 0xd0,
|
||||
0x2a, 0x02, 0x2a, 0x35, 0x2a, 0x68, 0x2a, 0x9b,
|
||||
0x2a, 0xcf, 0x2b, 0x02, 0x2b, 0x36, 0x2b, 0x69,
|
||||
0x2b, 0x9d, 0x2b, 0xd1, 0x2c, 0x05, 0x2c, 0x39,
|
||||
0x2c, 0x6e, 0x2c, 0xa2, 0x2c, 0xd7, 0x2d, 0x0c,
|
||||
0x2d, 0x41, 0x2d, 0x76, 0x2d, 0xab, 0x2d, 0xe1,
|
||||
0x2e, 0x16, 0x2e, 0x4c, 0x2e, 0x82, 0x2e, 0xb7,
|
||||
0x2e, 0xee, 0x2f, 0x24, 0x2f, 0x5a, 0x2f, 0x91,
|
||||
0x2f, 0xc7, 0x2f, 0xfe, 0x30, 0x35, 0x30, 0x6c,
|
||||
0x30, 0xa4, 0x30, 0xdb, 0x31, 0x12, 0x31, 0x4a,
|
||||
0x31, 0x82, 0x31, 0xba, 0x31, 0xf2, 0x32, 0x2a,
|
||||
0x32, 0x63, 0x32, 0x9b, 0x32, 0xd4, 0x33, 0x0d,
|
||||
0x33, 0x46, 0x33, 0x7f, 0x33, 0xb8, 0x33, 0xf1,
|
||||
0x34, 0x2b, 0x34, 0x65, 0x34, 0x9e, 0x34, 0xd8,
|
||||
0x35, 0x13, 0x35, 0x4d, 0x35, 0x87, 0x35, 0xc2,
|
||||
0x35, 0xfd, 0x36, 0x37, 0x36, 0x72, 0x36, 0xae,
|
||||
0x36, 0xe9, 0x37, 0x24, 0x37, 0x60, 0x37, 0x9c,
|
||||
0x37, 0xd7, 0x38, 0x14, 0x38, 0x50, 0x38, 0x8c,
|
||||
0x38, 0xc8, 0x39, 0x05, 0x39, 0x42, 0x39, 0x7f,
|
||||
0x39, 0xbc, 0x39, 0xf9, 0x3a, 0x36, 0x3a, 0x74,
|
||||
0x3a, 0xb2, 0x3a, 0xef, 0x3b, 0x2d, 0x3b, 0x6b,
|
||||
0x3b, 0xaa, 0x3b, 0xe8, 0x3c, 0x27, 0x3c, 0x65,
|
||||
0x3c, 0xa4, 0x3c, 0xe3, 0x3d, 0x22, 0x3d, 0x61,
|
||||
0x3d, 0xa1, 0x3d, 0xe0, 0x3e, 0x20, 0x3e, 0x60,
|
||||
0x3e, 0xa0, 0x3e, 0xe0, 0x3f, 0x21, 0x3f, 0x61,
|
||||
0x3f, 0xa2, 0x3f, 0xe2, 0x40, 0x23, 0x40, 0x64,
|
||||
0x40, 0xa6, 0x40, 0xe7, 0x41, 0x29, 0x41, 0x6a,
|
||||
0x41, 0xac, 0x41, 0xee, 0x42, 0x30, 0x42, 0x72,
|
||||
0x42, 0xb5, 0x42, 0xf7, 0x43, 0x3a, 0x43, 0x7d,
|
||||
0x43, 0xc0, 0x44, 0x03, 0x44, 0x47, 0x44, 0x8a,
|
||||
0x44, 0xce, 0x45, 0x12, 0x45, 0x55, 0x45, 0x9a,
|
||||
0x45, 0xde, 0x46, 0x22, 0x46, 0x67, 0x46, 0xab,
|
||||
0x46, 0xf0, 0x47, 0x35, 0x47, 0x7b, 0x47, 0xc0,
|
||||
0x48, 0x05, 0x48, 0x4b, 0x48, 0x91, 0x48, 0xd7,
|
||||
0x49, 0x1d, 0x49, 0x63, 0x49, 0xa9, 0x49, 0xf0,
|
||||
0x4a, 0x37, 0x4a, 0x7d, 0x4a, 0xc4, 0x4b, 0x0c,
|
||||
0x4b, 0x53, 0x4b, 0x9a, 0x4b, 0xe2, 0x4c, 0x2a,
|
||||
0x4c, 0x72, 0x4c, 0xba, 0x4d, 0x02, 0x4d, 0x4a,
|
||||
0x4d, 0x93, 0x4d, 0xdc, 0x4e, 0x25, 0x4e, 0x6e,
|
||||
0x4e, 0xb7, 0x4f, 0x00, 0x4f, 0x49, 0x4f, 0x93,
|
||||
0x4f, 0xdd, 0x50, 0x27, 0x50, 0x71, 0x50, 0xbb,
|
||||
0x51, 0x06, 0x51, 0x50, 0x51, 0x9b, 0x51, 0xe6,
|
||||
0x52, 0x31, 0x52, 0x7c, 0x52, 0xc7, 0x53, 0x13,
|
||||
0x53, 0x5f, 0x53, 0xaa, 0x53, 0xf6, 0x54, 0x42,
|
||||
0x54, 0x8f, 0x54, 0xdb, 0x55, 0x28, 0x55, 0x75,
|
||||
0x55, 0xc2, 0x56, 0x0f, 0x56, 0x5c, 0x56, 0xa9,
|
||||
0x56, 0xf7, 0x57, 0x44, 0x57, 0x92, 0x57, 0xe0,
|
||||
0x58, 0x2f, 0x58, 0x7d, 0x58, 0xcb, 0x59, 0x1a,
|
||||
0x59, 0x69, 0x59, 0xb8, 0x5a, 0x07, 0x5a, 0x56,
|
||||
0x5a, 0xa6, 0x5a, 0xf5, 0x5b, 0x45, 0x5b, 0x95,
|
||||
0x5b, 0xe5, 0x5c, 0x35, 0x5c, 0x86, 0x5c, 0xd6,
|
||||
0x5d, 0x27, 0x5d, 0x78, 0x5d, 0xc9, 0x5e, 0x1a,
|
||||
0x5e, 0x6c, 0x5e, 0xbd, 0x5f, 0x0f, 0x5f, 0x61,
|
||||
0x5f, 0xb3, 0x60, 0x05, 0x60, 0x57, 0x60, 0xaa,
|
||||
0x60, 0xfc, 0x61, 0x4f, 0x61, 0xa2, 0x61, 0xf5,
|
||||
0x62, 0x49, 0x62, 0x9c, 0x62, 0xf0, 0x63, 0x43,
|
||||
0x63, 0x97, 0x63, 0xeb, 0x64, 0x40, 0x64, 0x94,
|
||||
0x64, 0xe9, 0x65, 0x3d, 0x65, 0x92, 0x65, 0xe7,
|
||||
0x66, 0x3d, 0x66, 0x92, 0x66, 0xe8, 0x67, 0x3d,
|
||||
0x67, 0x93, 0x67, 0xe9, 0x68, 0x3f, 0x68, 0x96,
|
||||
0x68, 0xec, 0x69, 0x43, 0x69, 0x9a, 0x69, 0xf1,
|
||||
0x6a, 0x48, 0x6a, 0x9f, 0x6a, 0xf7, 0x6b, 0x4f,
|
||||
0x6b, 0xa7, 0x6b, 0xff, 0x6c, 0x57, 0x6c, 0xaf,
|
||||
0x6d, 0x08, 0x6d, 0x60, 0x6d, 0xb9, 0x6e, 0x12,
|
||||
0x6e, 0x6b, 0x6e, 0xc4, 0x6f, 0x1e, 0x6f, 0x78,
|
||||
0x6f, 0xd1, 0x70, 0x2b, 0x70, 0x86, 0x70, 0xe0,
|
||||
0x71, 0x3a, 0x71, 0x95, 0x71, 0xf0, 0x72, 0x4b,
|
||||
0x72, 0xa6, 0x73, 0x01, 0x73, 0x5d, 0x73, 0xb8,
|
||||
0x74, 0x14, 0x74, 0x70, 0x74, 0xcc, 0x75, 0x28,
|
||||
0x75, 0x85, 0x75, 0xe1, 0x76, 0x3e, 0x76, 0x9b,
|
||||
0x76, 0xf8, 0x77, 0x56, 0x77, 0xb3, 0x78, 0x11,
|
||||
0x78, 0x6e, 0x78, 0xcc, 0x79, 0x2a, 0x79, 0x89,
|
||||
0x79, 0xe7, 0x7a, 0x46, 0x7a, 0xa5, 0x7b, 0x04,
|
||||
0x7b, 0x63, 0x7b, 0xc2, 0x7c, 0x21, 0x7c, 0x81,
|
||||
0x7c, 0xe1, 0x7d, 0x41, 0x7d, 0xa1, 0x7e, 0x01,
|
||||
0x7e, 0x62, 0x7e, 0xc2, 0x7f, 0x23, 0x7f, 0x84,
|
||||
0x7f, 0xe5, 0x80, 0x47, 0x80, 0xa8, 0x81, 0x0a,
|
||||
0x81, 0x6b, 0x81, 0xcd, 0x82, 0x30, 0x82, 0x92,
|
||||
0x82, 0xf4, 0x83, 0x57, 0x83, 0xba, 0x84, 0x1d,
|
||||
0x84, 0x80, 0x84, 0xe3, 0x85, 0x47, 0x85, 0xab,
|
||||
0x86, 0x0e, 0x86, 0x72, 0x86, 0xd7, 0x87, 0x3b,
|
||||
0x87, 0x9f, 0x88, 0x04, 0x88, 0x69, 0x88, 0xce,
|
||||
0x89, 0x33, 0x89, 0x99, 0x89, 0xfe, 0x8a, 0x64,
|
||||
0x8a, 0xca, 0x8b, 0x30, 0x8b, 0x96, 0x8b, 0xfc,
|
||||
0x8c, 0x63, 0x8c, 0xca, 0x8d, 0x31, 0x8d, 0x98,
|
||||
0x8d, 0xff, 0x8e, 0x66, 0x8e, 0xce, 0x8f, 0x36,
|
||||
0x8f, 0x9e, 0x90, 0x06, 0x90, 0x6e, 0x90, 0xd6,
|
||||
0x91, 0x3f, 0x91, 0xa8, 0x92, 0x11, 0x92, 0x7a,
|
||||
0x92, 0xe3, 0x93, 0x4d, 0x93, 0xb6, 0x94, 0x20,
|
||||
0x94, 0x8a, 0x94, 0xf4, 0x95, 0x5f, 0x95, 0xc9,
|
||||
0x96, 0x34, 0x96, 0x9f, 0x97, 0x0a, 0x97, 0x75,
|
||||
0x97, 0xe0, 0x98, 0x4c, 0x98, 0xb8, 0x99, 0x24,
|
||||
0x99, 0x90, 0x99, 0xfc, 0x9a, 0x68, 0x9a, 0xd5,
|
||||
0x9b, 0x42, 0x9b, 0xaf, 0x9c, 0x1c, 0x9c, 0x89,
|
||||
0x9c, 0xf7, 0x9d, 0x64, 0x9d, 0xd2, 0x9e, 0x40,
|
||||
0x9e, 0xae, 0x9f, 0x1d, 0x9f, 0x8b, 0x9f, 0xfa,
|
||||
0xa0, 0x69, 0xa0, 0xd8, 0xa1, 0x47, 0xa1, 0xb6,
|
||||
0xa2, 0x26, 0xa2, 0x96, 0xa3, 0x06, 0xa3, 0x76,
|
||||
0xa3, 0xe6, 0xa4, 0x56, 0xa4, 0xc7, 0xa5, 0x38,
|
||||
0xa5, 0xa9, 0xa6, 0x1a, 0xa6, 0x8b, 0xa6, 0xfd,
|
||||
0xa7, 0x6e, 0xa7, 0xe0, 0xa8, 0x52, 0xa8, 0xc4,
|
||||
0xa9, 0x37, 0xa9, 0xa9, 0xaa, 0x1c, 0xaa, 0x8f,
|
||||
0xab, 0x02, 0xab, 0x75, 0xab, 0xe9, 0xac, 0x5c,
|
||||
0xac, 0xd0, 0xad, 0x44, 0xad, 0xb8, 0xae, 0x2d,
|
||||
0xae, 0xa1, 0xaf, 0x16, 0xaf, 0x8b, 0xb0, 0x00,
|
||||
0xb0, 0x75, 0xb0, 0xea, 0xb1, 0x60, 0xb1, 0xd6,
|
||||
0xb2, 0x4b, 0xb2, 0xc2, 0xb3, 0x38, 0xb3, 0xae,
|
||||
0xb4, 0x25, 0xb4, 0x9c, 0xb5, 0x13, 0xb5, 0x8a,
|
||||
0xb6, 0x01, 0xb6, 0x79, 0xb6, 0xf0, 0xb7, 0x68,
|
||||
0xb7, 0xe0, 0xb8, 0x59, 0xb8, 0xd1, 0xb9, 0x4a,
|
||||
0xb9, 0xc2, 0xba, 0x3b, 0xba, 0xb5, 0xbb, 0x2e,
|
||||
0xbb, 0xa7, 0xbc, 0x21, 0xbc, 0x9b, 0xbd, 0x15,
|
||||
0xbd, 0x8f, 0xbe, 0x0a, 0xbe, 0x84, 0xbe, 0xff,
|
||||
0xbf, 0x7a, 0xbf, 0xf5, 0xc0, 0x70, 0xc0, 0xec,
|
||||
0xc1, 0x67, 0xc1, 0xe3, 0xc2, 0x5f, 0xc2, 0xdb,
|
||||
0xc3, 0x58, 0xc3, 0xd4, 0xc4, 0x51, 0xc4, 0xce,
|
||||
0xc5, 0x4b, 0xc5, 0xc8, 0xc6, 0x46, 0xc6, 0xc3,
|
||||
0xc7, 0x41, 0xc7, 0xbf, 0xc8, 0x3d, 0xc8, 0xbc,
|
||||
0xc9, 0x3a, 0xc9, 0xb9, 0xca, 0x38, 0xca, 0xb7,
|
||||
0xcb, 0x36, 0xcb, 0xb6, 0xcc, 0x35, 0xcc, 0xb5,
|
||||
0xcd, 0x35, 0xcd, 0xb5, 0xce, 0x36, 0xce, 0xb6,
|
||||
0xcf, 0x37, 0xcf, 0xb8, 0xd0, 0x39, 0xd0, 0xba,
|
||||
0xd1, 0x3c, 0xd1, 0xbe, 0xd2, 0x3f, 0xd2, 0xc1,
|
||||
0xd3, 0x44, 0xd3, 0xc6, 0xd4, 0x49, 0xd4, 0xcb,
|
||||
0xd5, 0x4e, 0xd5, 0xd1, 0xd6, 0x55, 0xd6, 0xd8,
|
||||
0xd7, 0x5c, 0xd7, 0xe0, 0xd8, 0x64, 0xd8, 0xe8,
|
||||
0xd9, 0x6c, 0xd9, 0xf1, 0xda, 0x76, 0xda, 0xfb,
|
||||
0xdb, 0x80, 0xdc, 0x05, 0xdc, 0x8a, 0xdd, 0x10,
|
||||
0xdd, 0x96, 0xde, 0x1c, 0xde, 0xa2, 0xdf, 0x29,
|
||||
0xdf, 0xaf, 0xe0, 0x36, 0xe0, 0xbd, 0xe1, 0x44,
|
||||
0xe1, 0xcc, 0xe2, 0x53, 0xe2, 0xdb, 0xe3, 0x63,
|
||||
0xe3, 0xeb, 0xe4, 0x73, 0xe4, 0xfc, 0xe5, 0x84,
|
||||
0xe6, 0x0d, 0xe6, 0x96, 0xe7, 0x1f, 0xe7, 0xa9,
|
||||
0xe8, 0x32, 0xe8, 0xbc, 0xe9, 0x46, 0xe9, 0xd0,
|
||||
0xea, 0x5b, 0xea, 0xe5, 0xeb, 0x70, 0xeb, 0xfb,
|
||||
0xec, 0x86, 0xed, 0x11, 0xed, 0x9c, 0xee, 0x28,
|
||||
0xee, 0xb4, 0xef, 0x40, 0xef, 0xcc, 0xf0, 0x58,
|
||||
0xf0, 0xe5, 0xf1, 0x72, 0xf1, 0xff, 0xf2, 0x8c,
|
||||
0xf3, 0x19, 0xf3, 0xa7, 0xf4, 0x34, 0xf4, 0xc2,
|
||||
0xf5, 0x50, 0xf5, 0xde, 0xf6, 0x6d, 0xf6, 0xfb,
|
||||
0xf7, 0x8a, 0xf8, 0x19, 0xf8, 0xa8, 0xf9, 0x38,
|
||||
0xf9, 0xc7, 0xfa, 0x57, 0xfa, 0xe7, 0xfb, 0x77,
|
||||
0xfc, 0x07, 0xfc, 0x98, 0xfd, 0x29, 0xfd, 0xba,
|
||||
0xfe, 0x4b, 0xfe, 0xdc, 0xff, 0x6d, 0xff, 0xff
|
||||
0x00, 0x00, 0x0c, 0x48, 0x4c, 0x69, 0x6e, 0x6f,
|
||||
0x02, 0x10, 0x00, 0x00, 0x6d, 0x6e, 0x74, 0x72,
|
||||
0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5a, 0x20,
|
||||
0x07, 0xce, 0x00, 0x02, 0x00, 0x09, 0x00, 0x06,
|
||||
0x00, 0x31, 0x00, 0x00, 0x61, 0x63, 0x73, 0x70,
|
||||
0x4d, 0x53, 0x46, 0x54, 0x00, 0x00, 0x00, 0x00,
|
||||
0x49, 0x45, 0x43, 0x20, 0x73, 0x52, 0x47, 0x42,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6,
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d,
|
||||
0x48, 0x50, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x11, 0x63, 0x70, 0x72, 0x74,
|
||||
0x00, 0x00, 0x01, 0x50, 0x00, 0x00, 0x00, 0x33,
|
||||
0x64, 0x65, 0x73, 0x63, 0x00, 0x00, 0x01, 0x84,
|
||||
0x00, 0x00, 0x00, 0x6c, 0x77, 0x74, 0x70, 0x74,
|
||||
0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x14,
|
||||
0x62, 0x6b, 0x70, 0x74, 0x00, 0x00, 0x02, 0x04,
|
||||
0x00, 0x00, 0x00, 0x14, 0x72, 0x58, 0x59, 0x5a,
|
||||
0x00, 0x00, 0x02, 0x18, 0x00, 0x00, 0x00, 0x14,
|
||||
0x67, 0x58, 0x59, 0x5a, 0x00, 0x00, 0x02, 0x2c,
|
||||
0x00, 0x00, 0x00, 0x14, 0x62, 0x58, 0x59, 0x5a,
|
||||
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x14,
|
||||
0x64, 0x6d, 0x6e, 0x64, 0x00, 0x00, 0x02, 0x54,
|
||||
0x00, 0x00, 0x00, 0x70, 0x64, 0x6d, 0x64, 0x64,
|
||||
0x00, 0x00, 0x02, 0xc4, 0x00, 0x00, 0x00, 0x88,
|
||||
0x76, 0x75, 0x65, 0x64, 0x00, 0x00, 0x03, 0x4c,
|
||||
0x00, 0x00, 0x00, 0x86, 0x76, 0x69, 0x65, 0x77,
|
||||
0x00, 0x00, 0x03, 0xd4, 0x00, 0x00, 0x00, 0x24,
|
||||
0x6c, 0x75, 0x6d, 0x69, 0x00, 0x00, 0x03, 0xf8,
|
||||
0x00, 0x00, 0x00, 0x14, 0x6d, 0x65, 0x61, 0x73,
|
||||
0x00, 0x00, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x24,
|
||||
0x74, 0x65, 0x63, 0x68, 0x00, 0x00, 0x04, 0x30,
|
||||
0x00, 0x00, 0x00, 0x0c, 0x72, 0x54, 0x52, 0x43,
|
||||
0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, 0x08, 0x0c,
|
||||
0x67, 0x54, 0x52, 0x43, 0x00, 0x00, 0x04, 0x3c,
|
||||
0x00, 0x00, 0x08, 0x0c, 0x62, 0x54, 0x52, 0x43,
|
||||
0x00, 0x00, 0x04, 0x3c, 0x00, 0x00, 0x08, 0x0c,
|
||||
0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 0x00, 0x00,
|
||||
0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68,
|
||||
0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x31, 0x39,
|
||||
0x39, 0x38, 0x20, 0x48, 0x65, 0x77, 0x6c, 0x65,
|
||||
0x74, 0x74, 0x2d, 0x50, 0x61, 0x63, 0x6b, 0x61,
|
||||
0x72, 0x64, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x61,
|
||||
0x6e, 0x79, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
|
||||
0x73, 0x52, 0x47, 0x42, 0x20, 0x49, 0x45, 0x43,
|
||||
0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32, 0x2e,
|
||||
0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x12, 0x73, 0x52, 0x47,
|
||||
0x42, 0x20, 0x49, 0x45, 0x43, 0x36, 0x31, 0x39,
|
||||
0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xf3, 0x51, 0x00, 0x01, 0x00, 0x00,
|
||||
0x00, 0x01, 0x16, 0xcc, 0x58, 0x59, 0x5a, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x6f, 0xa2, 0x00, 0x00, 0x38, 0xf5,
|
||||
0x00, 0x00, 0x03, 0x90, 0x58, 0x59, 0x5a, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x99,
|
||||
0x00, 0x00, 0xb7, 0x85, 0x00, 0x00, 0x18, 0xda,
|
||||
0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x24, 0xa0, 0x00, 0x00, 0x0f, 0x84,
|
||||
0x00, 0x00, 0xb6, 0xcf, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16,
|
||||
0x49, 0x45, 0x43, 0x20, 0x68, 0x74, 0x74, 0x70,
|
||||
0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69,
|
||||
0x65, 0x63, 0x2e, 0x63, 0x68, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x16, 0x49, 0x45, 0x43, 0x20, 0x68, 0x74, 0x74,
|
||||
0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e,
|
||||
0x69, 0x65, 0x63, 0x2e, 0x63, 0x68, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e,
|
||||
0x49, 0x45, 0x43, 0x20, 0x36, 0x31, 0x39, 0x36,
|
||||
0x36, 0x2d, 0x32, 0x2e, 0x31, 0x20, 0x44, 0x65,
|
||||
0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x52, 0x47,
|
||||
0x42, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x75, 0x72,
|
||||
0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x2d,
|
||||
0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x2e, 0x49, 0x45, 0x43, 0x20, 0x36, 0x31, 0x39,
|
||||
0x36, 0x36, 0x2d, 0x32, 0x2e, 0x31, 0x20, 0x44,
|
||||
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x52,
|
||||
0x47, 0x42, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x75,
|
||||
0x72, 0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20,
|
||||
0x2d, 0x20, 0x73, 0x52, 0x47, 0x42, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c,
|
||||
0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
|
||||
0x65, 0x20, 0x56, 0x69, 0x65, 0x77, 0x69, 0x6e,
|
||||
0x67, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x49,
|
||||
0x45, 0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d,
|
||||
0x32, 0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x52,
|
||||
0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
|
||||
0x20, 0x56, 0x69, 0x65, 0x77, 0x69, 0x6e, 0x67,
|
||||
0x20, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x49, 0x45,
|
||||
0x43, 0x36, 0x31, 0x39, 0x36, 0x36, 0x2d, 0x32,
|
||||
0x2e, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x76, 0x69, 0x65, 0x77,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xa4, 0xfe,
|
||||
0x00, 0x14, 0x5f, 0x2e, 0x00, 0x10, 0xcf, 0x14,
|
||||
0x00, 0x03, 0xed, 0xcc, 0x00, 0x04, 0x13, 0x0b,
|
||||
0x00, 0x03, 0x5c, 0x9e, 0x00, 0x00, 0x00, 0x01,
|
||||
0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x4c, 0x09, 0x56, 0x00, 0x50, 0x00, 0x00,
|
||||
0x00, 0x57, 0x1f, 0xe7, 0x6d, 0x65, 0x61, 0x73,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x02, 0x8f, 0x00, 0x00, 0x00, 0x02,
|
||||
0x73, 0x69, 0x67, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x43, 0x52, 0x54, 0x20, 0x63, 0x75, 0x72, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
|
||||
0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x0f,
|
||||
0x00, 0x14, 0x00, 0x19, 0x00, 0x1e, 0x00, 0x23,
|
||||
0x00, 0x28, 0x00, 0x2d, 0x00, 0x32, 0x00, 0x37,
|
||||
0x00, 0x3b, 0x00, 0x40, 0x00, 0x45, 0x00, 0x4a,
|
||||
0x00, 0x4f, 0x00, 0x54, 0x00, 0x59, 0x00, 0x5e,
|
||||
0x00, 0x63, 0x00, 0x68, 0x00, 0x6d, 0x00, 0x72,
|
||||
0x00, 0x77, 0x00, 0x7c, 0x00, 0x81, 0x00, 0x86,
|
||||
0x00, 0x8b, 0x00, 0x90, 0x00, 0x95, 0x00, 0x9a,
|
||||
0x00, 0x9f, 0x00, 0xa4, 0x00, 0xa9, 0x00, 0xae,
|
||||
0x00, 0xb2, 0x00, 0xb7, 0x00, 0xbc, 0x00, 0xc1,
|
||||
0x00, 0xc6, 0x00, 0xcb, 0x00, 0xd0, 0x00, 0xd5,
|
||||
0x00, 0xdb, 0x00, 0xe0, 0x00, 0xe5, 0x00, 0xeb,
|
||||
0x00, 0xf0, 0x00, 0xf6, 0x00, 0xfb, 0x01, 0x01,
|
||||
0x01, 0x07, 0x01, 0x0d, 0x01, 0x13, 0x01, 0x19,
|
||||
0x01, 0x1f, 0x01, 0x25, 0x01, 0x2b, 0x01, 0x32,
|
||||
0x01, 0x38, 0x01, 0x3e, 0x01, 0x45, 0x01, 0x4c,
|
||||
0x01, 0x52, 0x01, 0x59, 0x01, 0x60, 0x01, 0x67,
|
||||
0x01, 0x6e, 0x01, 0x75, 0x01, 0x7c, 0x01, 0x83,
|
||||
0x01, 0x8b, 0x01, 0x92, 0x01, 0x9a, 0x01, 0xa1,
|
||||
0x01, 0xa9, 0x01, 0xb1, 0x01, 0xb9, 0x01, 0xc1,
|
||||
0x01, 0xc9, 0x01, 0xd1, 0x01, 0xd9, 0x01, 0xe1,
|
||||
0x01, 0xe9, 0x01, 0xf2, 0x01, 0xfa, 0x02, 0x03,
|
||||
0x02, 0x0c, 0x02, 0x14, 0x02, 0x1d, 0x02, 0x26,
|
||||
0x02, 0x2f, 0x02, 0x38, 0x02, 0x41, 0x02, 0x4b,
|
||||
0x02, 0x54, 0x02, 0x5d, 0x02, 0x67, 0x02, 0x71,
|
||||
0x02, 0x7a, 0x02, 0x84, 0x02, 0x8e, 0x02, 0x98,
|
||||
0x02, 0xa2, 0x02, 0xac, 0x02, 0xb6, 0x02, 0xc1,
|
||||
0x02, 0xcb, 0x02, 0xd5, 0x02, 0xe0, 0x02, 0xeb,
|
||||
0x02, 0xf5, 0x03, 0x00, 0x03, 0x0b, 0x03, 0x16,
|
||||
0x03, 0x21, 0x03, 0x2d, 0x03, 0x38, 0x03, 0x43,
|
||||
0x03, 0x4f, 0x03, 0x5a, 0x03, 0x66, 0x03, 0x72,
|
||||
0x03, 0x7e, 0x03, 0x8a, 0x03, 0x96, 0x03, 0xa2,
|
||||
0x03, 0xae, 0x03, 0xba, 0x03, 0xc7, 0x03, 0xd3,
|
||||
0x03, 0xe0, 0x03, 0xec, 0x03, 0xf9, 0x04, 0x06,
|
||||
0x04, 0x13, 0x04, 0x20, 0x04, 0x2d, 0x04, 0x3b,
|
||||
0x04, 0x48, 0x04, 0x55, 0x04, 0x63, 0x04, 0x71,
|
||||
0x04, 0x7e, 0x04, 0x8c, 0x04, 0x9a, 0x04, 0xa8,
|
||||
0x04, 0xb6, 0x04, 0xc4, 0x04, 0xd3, 0x04, 0xe1,
|
||||
0x04, 0xf0, 0x04, 0xfe, 0x05, 0x0d, 0x05, 0x1c,
|
||||
0x05, 0x2b, 0x05, 0x3a, 0x05, 0x49, 0x05, 0x58,
|
||||
0x05, 0x67, 0x05, 0x77, 0x05, 0x86, 0x05, 0x96,
|
||||
0x05, 0xa6, 0x05, 0xb5, 0x05, 0xc5, 0x05, 0xd5,
|
||||
0x05, 0xe5, 0x05, 0xf6, 0x06, 0x06, 0x06, 0x16,
|
||||
0x06, 0x27, 0x06, 0x37, 0x06, 0x48, 0x06, 0x59,
|
||||
0x06, 0x6a, 0x06, 0x7b, 0x06, 0x8c, 0x06, 0x9d,
|
||||
0x06, 0xaf, 0x06, 0xc0, 0x06, 0xd1, 0x06, 0xe3,
|
||||
0x06, 0xf5, 0x07, 0x07, 0x07, 0x19, 0x07, 0x2b,
|
||||
0x07, 0x3d, 0x07, 0x4f, 0x07, 0x61, 0x07, 0x74,
|
||||
0x07, 0x86, 0x07, 0x99, 0x07, 0xac, 0x07, 0xbf,
|
||||
0x07, 0xd2, 0x07, 0xe5, 0x07, 0xf8, 0x08, 0x0b,
|
||||
0x08, 0x1f, 0x08, 0x32, 0x08, 0x46, 0x08, 0x5a,
|
||||
0x08, 0x6e, 0x08, 0x82, 0x08, 0x96, 0x08, 0xaa,
|
||||
0x08, 0xbe, 0x08, 0xd2, 0x08, 0xe7, 0x08, 0xfb,
|
||||
0x09, 0x10, 0x09, 0x25, 0x09, 0x3a, 0x09, 0x4f,
|
||||
0x09, 0x64, 0x09, 0x79, 0x09, 0x8f, 0x09, 0xa4,
|
||||
0x09, 0xba, 0x09, 0xcf, 0x09, 0xe5, 0x09, 0xfb,
|
||||
0x0a, 0x11, 0x0a, 0x27, 0x0a, 0x3d, 0x0a, 0x54,
|
||||
0x0a, 0x6a, 0x0a, 0x81, 0x0a, 0x98, 0x0a, 0xae,
|
||||
0x0a, 0xc5, 0x0a, 0xdc, 0x0a, 0xf3, 0x0b, 0x0b,
|
||||
0x0b, 0x22, 0x0b, 0x39, 0x0b, 0x51, 0x0b, 0x69,
|
||||
0x0b, 0x80, 0x0b, 0x98, 0x0b, 0xb0, 0x0b, 0xc8,
|
||||
0x0b, 0xe1, 0x0b, 0xf9, 0x0c, 0x12, 0x0c, 0x2a,
|
||||
0x0c, 0x43, 0x0c, 0x5c, 0x0c, 0x75, 0x0c, 0x8e,
|
||||
0x0c, 0xa7, 0x0c, 0xc0, 0x0c, 0xd9, 0x0c, 0xf3,
|
||||
0x0d, 0x0d, 0x0d, 0x26, 0x0d, 0x40, 0x0d, 0x5a,
|
||||
0x0d, 0x74, 0x0d, 0x8e, 0x0d, 0xa9, 0x0d, 0xc3,
|
||||
0x0d, 0xde, 0x0d, 0xf8, 0x0e, 0x13, 0x0e, 0x2e,
|
||||
0x0e, 0x49, 0x0e, 0x64, 0x0e, 0x7f, 0x0e, 0x9b,
|
||||
0x0e, 0xb6, 0x0e, 0xd2, 0x0e, 0xee, 0x0f, 0x09,
|
||||
0x0f, 0x25, 0x0f, 0x41, 0x0f, 0x5e, 0x0f, 0x7a,
|
||||
0x0f, 0x96, 0x0f, 0xb3, 0x0f, 0xcf, 0x0f, 0xec,
|
||||
0x10, 0x09, 0x10, 0x26, 0x10, 0x43, 0x10, 0x61,
|
||||
0x10, 0x7e, 0x10, 0x9b, 0x10, 0xb9, 0x10, 0xd7,
|
||||
0x10, 0xf5, 0x11, 0x13, 0x11, 0x31, 0x11, 0x4f,
|
||||
0x11, 0x6d, 0x11, 0x8c, 0x11, 0xaa, 0x11, 0xc9,
|
||||
0x11, 0xe8, 0x12, 0x07, 0x12, 0x26, 0x12, 0x45,
|
||||
0x12, 0x64, 0x12, 0x84, 0x12, 0xa3, 0x12, 0xc3,
|
||||
0x12, 0xe3, 0x13, 0x03, 0x13, 0x23, 0x13, 0x43,
|
||||
0x13, 0x63, 0x13, 0x83, 0x13, 0xa4, 0x13, 0xc5,
|
||||
0x13, 0xe5, 0x14, 0x06, 0x14, 0x27, 0x14, 0x49,
|
||||
0x14, 0x6a, 0x14, 0x8b, 0x14, 0xad, 0x14, 0xce,
|
||||
0x14, 0xf0, 0x15, 0x12, 0x15, 0x34, 0x15, 0x56,
|
||||
0x15, 0x78, 0x15, 0x9b, 0x15, 0xbd, 0x15, 0xe0,
|
||||
0x16, 0x03, 0x16, 0x26, 0x16, 0x49, 0x16, 0x6c,
|
||||
0x16, 0x8f, 0x16, 0xb2, 0x16, 0xd6, 0x16, 0xfa,
|
||||
0x17, 0x1d, 0x17, 0x41, 0x17, 0x65, 0x17, 0x89,
|
||||
0x17, 0xae, 0x17, 0xd2, 0x17, 0xf7, 0x18, 0x1b,
|
||||
0x18, 0x40, 0x18, 0x65, 0x18, 0x8a, 0x18, 0xaf,
|
||||
0x18, 0xd5, 0x18, 0xfa, 0x19, 0x20, 0x19, 0x45,
|
||||
0x19, 0x6b, 0x19, 0x91, 0x19, 0xb7, 0x19, 0xdd,
|
||||
0x1a, 0x04, 0x1a, 0x2a, 0x1a, 0x51, 0x1a, 0x77,
|
||||
0x1a, 0x9e, 0x1a, 0xc5, 0x1a, 0xec, 0x1b, 0x14,
|
||||
0x1b, 0x3b, 0x1b, 0x63, 0x1b, 0x8a, 0x1b, 0xb2,
|
||||
0x1b, 0xda, 0x1c, 0x02, 0x1c, 0x2a, 0x1c, 0x52,
|
||||
0x1c, 0x7b, 0x1c, 0xa3, 0x1c, 0xcc, 0x1c, 0xf5,
|
||||
0x1d, 0x1e, 0x1d, 0x47, 0x1d, 0x70, 0x1d, 0x99,
|
||||
0x1d, 0xc3, 0x1d, 0xec, 0x1e, 0x16, 0x1e, 0x40,
|
||||
0x1e, 0x6a, 0x1e, 0x94, 0x1e, 0xbe, 0x1e, 0xe9,
|
||||
0x1f, 0x13, 0x1f, 0x3e, 0x1f, 0x69, 0x1f, 0x94,
|
||||
0x1f, 0xbf, 0x1f, 0xea, 0x20, 0x15, 0x20, 0x41,
|
||||
0x20, 0x6c, 0x20, 0x98, 0x20, 0xc4, 0x20, 0xf0,
|
||||
0x21, 0x1c, 0x21, 0x48, 0x21, 0x75, 0x21, 0xa1,
|
||||
0x21, 0xce, 0x21, 0xfb, 0x22, 0x27, 0x22, 0x55,
|
||||
0x22, 0x82, 0x22, 0xaf, 0x22, 0xdd, 0x23, 0x0a,
|
||||
0x23, 0x38, 0x23, 0x66, 0x23, 0x94, 0x23, 0xc2,
|
||||
0x23, 0xf0, 0x24, 0x1f, 0x24, 0x4d, 0x24, 0x7c,
|
||||
0x24, 0xab, 0x24, 0xda, 0x25, 0x09, 0x25, 0x38,
|
||||
0x25, 0x68, 0x25, 0x97, 0x25, 0xc7, 0x25, 0xf7,
|
||||
0x26, 0x27, 0x26, 0x57, 0x26, 0x87, 0x26, 0xb7,
|
||||
0x26, 0xe8, 0x27, 0x18, 0x27, 0x49, 0x27, 0x7a,
|
||||
0x27, 0xab, 0x27, 0xdc, 0x28, 0x0d, 0x28, 0x3f,
|
||||
0x28, 0x71, 0x28, 0xa2, 0x28, 0xd4, 0x29, 0x06,
|
||||
0x29, 0x38, 0x29, 0x6b, 0x29, 0x9d, 0x29, 0xd0,
|
||||
0x2a, 0x02, 0x2a, 0x35, 0x2a, 0x68, 0x2a, 0x9b,
|
||||
0x2a, 0xcf, 0x2b, 0x02, 0x2b, 0x36, 0x2b, 0x69,
|
||||
0x2b, 0x9d, 0x2b, 0xd1, 0x2c, 0x05, 0x2c, 0x39,
|
||||
0x2c, 0x6e, 0x2c, 0xa2, 0x2c, 0xd7, 0x2d, 0x0c,
|
||||
0x2d, 0x41, 0x2d, 0x76, 0x2d, 0xab, 0x2d, 0xe1,
|
||||
0x2e, 0x16, 0x2e, 0x4c, 0x2e, 0x82, 0x2e, 0xb7,
|
||||
0x2e, 0xee, 0x2f, 0x24, 0x2f, 0x5a, 0x2f, 0x91,
|
||||
0x2f, 0xc7, 0x2f, 0xfe, 0x30, 0x35, 0x30, 0x6c,
|
||||
0x30, 0xa4, 0x30, 0xdb, 0x31, 0x12, 0x31, 0x4a,
|
||||
0x31, 0x82, 0x31, 0xba, 0x31, 0xf2, 0x32, 0x2a,
|
||||
0x32, 0x63, 0x32, 0x9b, 0x32, 0xd4, 0x33, 0x0d,
|
||||
0x33, 0x46, 0x33, 0x7f, 0x33, 0xb8, 0x33, 0xf1,
|
||||
0x34, 0x2b, 0x34, 0x65, 0x34, 0x9e, 0x34, 0xd8,
|
||||
0x35, 0x13, 0x35, 0x4d, 0x35, 0x87, 0x35, 0xc2,
|
||||
0x35, 0xfd, 0x36, 0x37, 0x36, 0x72, 0x36, 0xae,
|
||||
0x36, 0xe9, 0x37, 0x24, 0x37, 0x60, 0x37, 0x9c,
|
||||
0x37, 0xd7, 0x38, 0x14, 0x38, 0x50, 0x38, 0x8c,
|
||||
0x38, 0xc8, 0x39, 0x05, 0x39, 0x42, 0x39, 0x7f,
|
||||
0x39, 0xbc, 0x39, 0xf9, 0x3a, 0x36, 0x3a, 0x74,
|
||||
0x3a, 0xb2, 0x3a, 0xef, 0x3b, 0x2d, 0x3b, 0x6b,
|
||||
0x3b, 0xaa, 0x3b, 0xe8, 0x3c, 0x27, 0x3c, 0x65,
|
||||
0x3c, 0xa4, 0x3c, 0xe3, 0x3d, 0x22, 0x3d, 0x61,
|
||||
0x3d, 0xa1, 0x3d, 0xe0, 0x3e, 0x20, 0x3e, 0x60,
|
||||
0x3e, 0xa0, 0x3e, 0xe0, 0x3f, 0x21, 0x3f, 0x61,
|
||||
0x3f, 0xa2, 0x3f, 0xe2, 0x40, 0x23, 0x40, 0x64,
|
||||
0x40, 0xa6, 0x40, 0xe7, 0x41, 0x29, 0x41, 0x6a,
|
||||
0x41, 0xac, 0x41, 0xee, 0x42, 0x30, 0x42, 0x72,
|
||||
0x42, 0xb5, 0x42, 0xf7, 0x43, 0x3a, 0x43, 0x7d,
|
||||
0x43, 0xc0, 0x44, 0x03, 0x44, 0x47, 0x44, 0x8a,
|
||||
0x44, 0xce, 0x45, 0x12, 0x45, 0x55, 0x45, 0x9a,
|
||||
0x45, 0xde, 0x46, 0x22, 0x46, 0x67, 0x46, 0xab,
|
||||
0x46, 0xf0, 0x47, 0x35, 0x47, 0x7b, 0x47, 0xc0,
|
||||
0x48, 0x05, 0x48, 0x4b, 0x48, 0x91, 0x48, 0xd7,
|
||||
0x49, 0x1d, 0x49, 0x63, 0x49, 0xa9, 0x49, 0xf0,
|
||||
0x4a, 0x37, 0x4a, 0x7d, 0x4a, 0xc4, 0x4b, 0x0c,
|
||||
0x4b, 0x53, 0x4b, 0x9a, 0x4b, 0xe2, 0x4c, 0x2a,
|
||||
0x4c, 0x72, 0x4c, 0xba, 0x4d, 0x02, 0x4d, 0x4a,
|
||||
0x4d, 0x93, 0x4d, 0xdc, 0x4e, 0x25, 0x4e, 0x6e,
|
||||
0x4e, 0xb7, 0x4f, 0x00, 0x4f, 0x49, 0x4f, 0x93,
|
||||
0x4f, 0xdd, 0x50, 0x27, 0x50, 0x71, 0x50, 0xbb,
|
||||
0x51, 0x06, 0x51, 0x50, 0x51, 0x9b, 0x51, 0xe6,
|
||||
0x52, 0x31, 0x52, 0x7c, 0x52, 0xc7, 0x53, 0x13,
|
||||
0x53, 0x5f, 0x53, 0xaa, 0x53, 0xf6, 0x54, 0x42,
|
||||
0x54, 0x8f, 0x54, 0xdb, 0x55, 0x28, 0x55, 0x75,
|
||||
0x55, 0xc2, 0x56, 0x0f, 0x56, 0x5c, 0x56, 0xa9,
|
||||
0x56, 0xf7, 0x57, 0x44, 0x57, 0x92, 0x57, 0xe0,
|
||||
0x58, 0x2f, 0x58, 0x7d, 0x58, 0xcb, 0x59, 0x1a,
|
||||
0x59, 0x69, 0x59, 0xb8, 0x5a, 0x07, 0x5a, 0x56,
|
||||
0x5a, 0xa6, 0x5a, 0xf5, 0x5b, 0x45, 0x5b, 0x95,
|
||||
0x5b, 0xe5, 0x5c, 0x35, 0x5c, 0x86, 0x5c, 0xd6,
|
||||
0x5d, 0x27, 0x5d, 0x78, 0x5d, 0xc9, 0x5e, 0x1a,
|
||||
0x5e, 0x6c, 0x5e, 0xbd, 0x5f, 0x0f, 0x5f, 0x61,
|
||||
0x5f, 0xb3, 0x60, 0x05, 0x60, 0x57, 0x60, 0xaa,
|
||||
0x60, 0xfc, 0x61, 0x4f, 0x61, 0xa2, 0x61, 0xf5,
|
||||
0x62, 0x49, 0x62, 0x9c, 0x62, 0xf0, 0x63, 0x43,
|
||||
0x63, 0x97, 0x63, 0xeb, 0x64, 0x40, 0x64, 0x94,
|
||||
0x64, 0xe9, 0x65, 0x3d, 0x65, 0x92, 0x65, 0xe7,
|
||||
0x66, 0x3d, 0x66, 0x92, 0x66, 0xe8, 0x67, 0x3d,
|
||||
0x67, 0x93, 0x67, 0xe9, 0x68, 0x3f, 0x68, 0x96,
|
||||
0x68, 0xec, 0x69, 0x43, 0x69, 0x9a, 0x69, 0xf1,
|
||||
0x6a, 0x48, 0x6a, 0x9f, 0x6a, 0xf7, 0x6b, 0x4f,
|
||||
0x6b, 0xa7, 0x6b, 0xff, 0x6c, 0x57, 0x6c, 0xaf,
|
||||
0x6d, 0x08, 0x6d, 0x60, 0x6d, 0xb9, 0x6e, 0x12,
|
||||
0x6e, 0x6b, 0x6e, 0xc4, 0x6f, 0x1e, 0x6f, 0x78,
|
||||
0x6f, 0xd1, 0x70, 0x2b, 0x70, 0x86, 0x70, 0xe0,
|
||||
0x71, 0x3a, 0x71, 0x95, 0x71, 0xf0, 0x72, 0x4b,
|
||||
0x72, 0xa6, 0x73, 0x01, 0x73, 0x5d, 0x73, 0xb8,
|
||||
0x74, 0x14, 0x74, 0x70, 0x74, 0xcc, 0x75, 0x28,
|
||||
0x75, 0x85, 0x75, 0xe1, 0x76, 0x3e, 0x76, 0x9b,
|
||||
0x76, 0xf8, 0x77, 0x56, 0x77, 0xb3, 0x78, 0x11,
|
||||
0x78, 0x6e, 0x78, 0xcc, 0x79, 0x2a, 0x79, 0x89,
|
||||
0x79, 0xe7, 0x7a, 0x46, 0x7a, 0xa5, 0x7b, 0x04,
|
||||
0x7b, 0x63, 0x7b, 0xc2, 0x7c, 0x21, 0x7c, 0x81,
|
||||
0x7c, 0xe1, 0x7d, 0x41, 0x7d, 0xa1, 0x7e, 0x01,
|
||||
0x7e, 0x62, 0x7e, 0xc2, 0x7f, 0x23, 0x7f, 0x84,
|
||||
0x7f, 0xe5, 0x80, 0x47, 0x80, 0xa8, 0x81, 0x0a,
|
||||
0x81, 0x6b, 0x81, 0xcd, 0x82, 0x30, 0x82, 0x92,
|
||||
0x82, 0xf4, 0x83, 0x57, 0x83, 0xba, 0x84, 0x1d,
|
||||
0x84, 0x80, 0x84, 0xe3, 0x85, 0x47, 0x85, 0xab,
|
||||
0x86, 0x0e, 0x86, 0x72, 0x86, 0xd7, 0x87, 0x3b,
|
||||
0x87, 0x9f, 0x88, 0x04, 0x88, 0x69, 0x88, 0xce,
|
||||
0x89, 0x33, 0x89, 0x99, 0x89, 0xfe, 0x8a, 0x64,
|
||||
0x8a, 0xca, 0x8b, 0x30, 0x8b, 0x96, 0x8b, 0xfc,
|
||||
0x8c, 0x63, 0x8c, 0xca, 0x8d, 0x31, 0x8d, 0x98,
|
||||
0x8d, 0xff, 0x8e, 0x66, 0x8e, 0xce, 0x8f, 0x36,
|
||||
0x8f, 0x9e, 0x90, 0x06, 0x90, 0x6e, 0x90, 0xd6,
|
||||
0x91, 0x3f, 0x91, 0xa8, 0x92, 0x11, 0x92, 0x7a,
|
||||
0x92, 0xe3, 0x93, 0x4d, 0x93, 0xb6, 0x94, 0x20,
|
||||
0x94, 0x8a, 0x94, 0xf4, 0x95, 0x5f, 0x95, 0xc9,
|
||||
0x96, 0x34, 0x96, 0x9f, 0x97, 0x0a, 0x97, 0x75,
|
||||
0x97, 0xe0, 0x98, 0x4c, 0x98, 0xb8, 0x99, 0x24,
|
||||
0x99, 0x90, 0x99, 0xfc, 0x9a, 0x68, 0x9a, 0xd5,
|
||||
0x9b, 0x42, 0x9b, 0xaf, 0x9c, 0x1c, 0x9c, 0x89,
|
||||
0x9c, 0xf7, 0x9d, 0x64, 0x9d, 0xd2, 0x9e, 0x40,
|
||||
0x9e, 0xae, 0x9f, 0x1d, 0x9f, 0x8b, 0x9f, 0xfa,
|
||||
0xa0, 0x69, 0xa0, 0xd8, 0xa1, 0x47, 0xa1, 0xb6,
|
||||
0xa2, 0x26, 0xa2, 0x96, 0xa3, 0x06, 0xa3, 0x76,
|
||||
0xa3, 0xe6, 0xa4, 0x56, 0xa4, 0xc7, 0xa5, 0x38,
|
||||
0xa5, 0xa9, 0xa6, 0x1a, 0xa6, 0x8b, 0xa6, 0xfd,
|
||||
0xa7, 0x6e, 0xa7, 0xe0, 0xa8, 0x52, 0xa8, 0xc4,
|
||||
0xa9, 0x37, 0xa9, 0xa9, 0xaa, 0x1c, 0xaa, 0x8f,
|
||||
0xab, 0x02, 0xab, 0x75, 0xab, 0xe9, 0xac, 0x5c,
|
||||
0xac, 0xd0, 0xad, 0x44, 0xad, 0xb8, 0xae, 0x2d,
|
||||
0xae, 0xa1, 0xaf, 0x16, 0xaf, 0x8b, 0xb0, 0x00,
|
||||
0xb0, 0x75, 0xb0, 0xea, 0xb1, 0x60, 0xb1, 0xd6,
|
||||
0xb2, 0x4b, 0xb2, 0xc2, 0xb3, 0x38, 0xb3, 0xae,
|
||||
0xb4, 0x25, 0xb4, 0x9c, 0xb5, 0x13, 0xb5, 0x8a,
|
||||
0xb6, 0x01, 0xb6, 0x79, 0xb6, 0xf0, 0xb7, 0x68,
|
||||
0xb7, 0xe0, 0xb8, 0x59, 0xb8, 0xd1, 0xb9, 0x4a,
|
||||
0xb9, 0xc2, 0xba, 0x3b, 0xba, 0xb5, 0xbb, 0x2e,
|
||||
0xbb, 0xa7, 0xbc, 0x21, 0xbc, 0x9b, 0xbd, 0x15,
|
||||
0xbd, 0x8f, 0xbe, 0x0a, 0xbe, 0x84, 0xbe, 0xff,
|
||||
0xbf, 0x7a, 0xbf, 0xf5, 0xc0, 0x70, 0xc0, 0xec,
|
||||
0xc1, 0x67, 0xc1, 0xe3, 0xc2, 0x5f, 0xc2, 0xdb,
|
||||
0xc3, 0x58, 0xc3, 0xd4, 0xc4, 0x51, 0xc4, 0xce,
|
||||
0xc5, 0x4b, 0xc5, 0xc8, 0xc6, 0x46, 0xc6, 0xc3,
|
||||
0xc7, 0x41, 0xc7, 0xbf, 0xc8, 0x3d, 0xc8, 0xbc,
|
||||
0xc9, 0x3a, 0xc9, 0xb9, 0xca, 0x38, 0xca, 0xb7,
|
||||
0xcb, 0x36, 0xcb, 0xb6, 0xcc, 0x35, 0xcc, 0xb5,
|
||||
0xcd, 0x35, 0xcd, 0xb5, 0xce, 0x36, 0xce, 0xb6,
|
||||
0xcf, 0x37, 0xcf, 0xb8, 0xd0, 0x39, 0xd0, 0xba,
|
||||
0xd1, 0x3c, 0xd1, 0xbe, 0xd2, 0x3f, 0xd2, 0xc1,
|
||||
0xd3, 0x44, 0xd3, 0xc6, 0xd4, 0x49, 0xd4, 0xcb,
|
||||
0xd5, 0x4e, 0xd5, 0xd1, 0xd6, 0x55, 0xd6, 0xd8,
|
||||
0xd7, 0x5c, 0xd7, 0xe0, 0xd8, 0x64, 0xd8, 0xe8,
|
||||
0xd9, 0x6c, 0xd9, 0xf1, 0xda, 0x76, 0xda, 0xfb,
|
||||
0xdb, 0x80, 0xdc, 0x05, 0xdc, 0x8a, 0xdd, 0x10,
|
||||
0xdd, 0x96, 0xde, 0x1c, 0xde, 0xa2, 0xdf, 0x29,
|
||||
0xdf, 0xaf, 0xe0, 0x36, 0xe0, 0xbd, 0xe1, 0x44,
|
||||
0xe1, 0xcc, 0xe2, 0x53, 0xe2, 0xdb, 0xe3, 0x63,
|
||||
0xe3, 0xeb, 0xe4, 0x73, 0xe4, 0xfc, 0xe5, 0x84,
|
||||
0xe6, 0x0d, 0xe6, 0x96, 0xe7, 0x1f, 0xe7, 0xa9,
|
||||
0xe8, 0x32, 0xe8, 0xbc, 0xe9, 0x46, 0xe9, 0xd0,
|
||||
0xea, 0x5b, 0xea, 0xe5, 0xeb, 0x70, 0xeb, 0xfb,
|
||||
0xec, 0x86, 0xed, 0x11, 0xed, 0x9c, 0xee, 0x28,
|
||||
0xee, 0xb4, 0xef, 0x40, 0xef, 0xcc, 0xf0, 0x58,
|
||||
0xf0, 0xe5, 0xf1, 0x72, 0xf1, 0xff, 0xf2, 0x8c,
|
||||
0xf3, 0x19, 0xf3, 0xa7, 0xf4, 0x34, 0xf4, 0xc2,
|
||||
0xf5, 0x50, 0xf5, 0xde, 0xf6, 0x6d, 0xf6, 0xfb,
|
||||
0xf7, 0x8a, 0xf8, 0x19, 0xf8, 0xa8, 0xf9, 0x38,
|
||||
0xf9, 0xc7, 0xfa, 0x57, 0xfa, 0xe7, 0xfb, 0x77,
|
||||
0xfc, 0x07, 0xfc, 0x98, 0xfd, 0x29, 0xfd, 0xba,
|
||||
0xfe, 0x4b, 0xfe, 0xdc, 0xff, 0x6d, 0xff, 0xff
|
||||
};
|
||||
|
||||
int jas_iccprofdata_srgblen = sizeof(jas_iccprofdata_srgb);
|
||||
|
||||
uchar jas_iccprofdata_sgray[] = {
|
||||
0x00, 0x00, 0x01, 0x8a, 0x00, 0x00, 0x00, 0x00,
|
||||
0x02, 0x20, 0x00, 0x00, 0x73, 0x63, 0x6e, 0x72,
|
||||
0x47, 0x52, 0x41, 0x59, 0x58, 0x59, 0x5a, 0x20,
|
||||
0x07, 0xd3, 0x00, 0x01, 0x00, 0x1f, 0x00, 0x0d,
|
||||
0x00, 0x35, 0x00, 0x21, 0x61, 0x63, 0x73, 0x70,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x4b, 0x4f, 0x44, 0x41, 0x73, 0x47, 0x72, 0x79,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6,
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d,
|
||||
0x4a, 0x50, 0x45, 0x47, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x04, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x86,
|
||||
0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x3c,
|
||||
0x00, 0x00, 0x00, 0x2b, 0x77, 0x74, 0x70, 0x74,
|
||||
0x00, 0x00, 0x01, 0x68, 0x00, 0x00, 0x00, 0x14,
|
||||
0x6b, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0x7c,
|
||||
0x00, 0x00, 0x00, 0x0e, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c,
|
||||
0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74,
|
||||
0x65, 0x64, 0x20, 0x49, 0x43, 0x43, 0x20, 0x70,
|
||||
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x64,
|
||||
0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x69, 0x6e,
|
||||
0x67, 0x20, 0x73, 0x52, 0x47, 0x42, 0x2d, 0x67,
|
||||
0x72, 0x65, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x74,
|
||||
0x00, 0x00, 0x00, 0x00, 0x43, 0x6f, 0x70, 0x79,
|
||||
0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30,
|
||||
0x30, 0x33, 0x20, 0x73, 0x52, 0x47, 0x42, 0x2d,
|
||||
0x67, 0x72, 0x65, 0x79, 0x20, 0x52, 0x65, 0x66,
|
||||
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x00, 0x00,
|
||||
0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xf3, 0x54, 0x00, 0x01, 0x00, 0x00,
|
||||
0x00, 0x01, 0x16, 0xcf, 0x63, 0x75, 0x72, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0xcd
|
||||
0x00, 0x00, 0x01, 0x8a, 0x00, 0x00, 0x00, 0x00,
|
||||
0x02, 0x20, 0x00, 0x00, 0x73, 0x63, 0x6e, 0x72,
|
||||
0x47, 0x52, 0x41, 0x59, 0x58, 0x59, 0x5a, 0x20,
|
||||
0x07, 0xd3, 0x00, 0x01, 0x00, 0x1f, 0x00, 0x0d,
|
||||
0x00, 0x35, 0x00, 0x21, 0x61, 0x63, 0x73, 0x70,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x4b, 0x4f, 0x44, 0x41, 0x73, 0x47, 0x72, 0x79,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6,
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d,
|
||||
0x4a, 0x50, 0x45, 0x47, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x04, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x86,
|
||||
0x63, 0x70, 0x72, 0x74, 0x00, 0x00, 0x01, 0x3c,
|
||||
0x00, 0x00, 0x00, 0x2b, 0x77, 0x74, 0x70, 0x74,
|
||||
0x00, 0x00, 0x01, 0x68, 0x00, 0x00, 0x00, 0x14,
|
||||
0x6b, 0x54, 0x52, 0x43, 0x00, 0x00, 0x01, 0x7c,
|
||||
0x00, 0x00, 0x00, 0x0e, 0x64, 0x65, 0x73, 0x63,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c,
|
||||
0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74,
|
||||
0x65, 0x64, 0x20, 0x49, 0x43, 0x43, 0x20, 0x70,
|
||||
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x64,
|
||||
0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x69, 0x6e,
|
||||
0x67, 0x20, 0x73, 0x52, 0x47, 0x42, 0x2d, 0x67,
|
||||
0x72, 0x65, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x74,
|
||||
0x00, 0x00, 0x00, 0x00, 0x43, 0x6f, 0x70, 0x79,
|
||||
0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30,
|
||||
0x30, 0x33, 0x20, 0x73, 0x52, 0x47, 0x42, 0x2d,
|
||||
0x67, 0x72, 0x65, 0x79, 0x20, 0x52, 0x65, 0x66,
|
||||
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x00, 0x00,
|
||||
0x58, 0x59, 0x5a, 0x20, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xf3, 0x54, 0x00, 0x01, 0x00, 0x00,
|
||||
0x00, 0x01, 0x16, 0xcf, 0x63, 0x75, 0x72, 0x76,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0xcd
|
||||
};
|
||||
|
||||
int jas_iccprofdata_sgraylen = sizeof(jas_iccprofdata_sgray);
|
||||
|
||||
externo
+990
-991
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+65
-65
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -74,89 +74,89 @@
|
||||
/* Initialize the image format table. */
|
||||
int jas_init()
|
||||
{
|
||||
jas_image_fmtops_t fmtops;
|
||||
int fmtid;
|
||||
jas_image_fmtops_t fmtops;
|
||||
int fmtid;
|
||||
|
||||
fmtid = 0;
|
||||
fmtid = 0;
|
||||
|
||||
#if !defined(EXCLUDE_MIF_SUPPORT)
|
||||
fmtops.decode = mif_decode;
|
||||
fmtops.encode = mif_encode;
|
||||
fmtops.validate = mif_validate;
|
||||
jas_image_addfmt(fmtid, "mif", "mif", "My Image Format (MIF)", &fmtops);
|
||||
++fmtid;
|
||||
fmtops.decode = mif_decode;
|
||||
fmtops.encode = mif_encode;
|
||||
fmtops.validate = mif_validate;
|
||||
jas_image_addfmt(fmtid, "mif", "mif", "My Image Format (MIF)", &fmtops);
|
||||
++fmtid;
|
||||
#endif
|
||||
|
||||
#if !defined(EXCLUDE_PNM_SUPPORT)
|
||||
fmtops.decode = pnm_decode;
|
||||
fmtops.encode = pnm_encode;
|
||||
fmtops.validate = pnm_validate;
|
||||
jas_image_addfmt(fmtid, "pnm", "pnm", "Portable Graymap/Pixmap (PNM)",
|
||||
&fmtops);
|
||||
jas_image_addfmt(fmtid, "pnm", "pgm", "Portable Graymap/Pixmap (PNM)",
|
||||
&fmtops);
|
||||
jas_image_addfmt(fmtid, "pnm", "ppm", "Portable Graymap/Pixmap (PNM)",
|
||||
&fmtops);
|
||||
++fmtid;
|
||||
fmtops.decode = pnm_decode;
|
||||
fmtops.encode = pnm_encode;
|
||||
fmtops.validate = pnm_validate;
|
||||
jas_image_addfmt(fmtid, "pnm", "pnm", "Portable Graymap/Pixmap (PNM)",
|
||||
&fmtops);
|
||||
jas_image_addfmt(fmtid, "pnm", "pgm", "Portable Graymap/Pixmap (PNM)",
|
||||
&fmtops);
|
||||
jas_image_addfmt(fmtid, "pnm", "ppm", "Portable Graymap/Pixmap (PNM)",
|
||||
&fmtops);
|
||||
++fmtid;
|
||||
#endif
|
||||
|
||||
#if !defined(EXCLUDE_BMP_SUPPORT)
|
||||
fmtops.decode = bmp_decode;
|
||||
fmtops.encode = bmp_encode;
|
||||
fmtops.validate = bmp_validate;
|
||||
jas_image_addfmt(fmtid, "bmp", "bmp", "Microsoft Bitmap (BMP)", &fmtops);
|
||||
++fmtid;
|
||||
fmtops.decode = bmp_decode;
|
||||
fmtops.encode = bmp_encode;
|
||||
fmtops.validate = bmp_validate;
|
||||
jas_image_addfmt(fmtid, "bmp", "bmp", "Microsoft Bitmap (BMP)", &fmtops);
|
||||
++fmtid;
|
||||
#endif
|
||||
|
||||
#if !defined(EXCLUDE_RAS_SUPPORT)
|
||||
fmtops.decode = ras_decode;
|
||||
fmtops.encode = ras_encode;
|
||||
fmtops.validate = ras_validate;
|
||||
jas_image_addfmt(fmtid, "ras", "ras", "Sun Rasterfile (RAS)", &fmtops);
|
||||
++fmtid;
|
||||
fmtops.decode = ras_decode;
|
||||
fmtops.encode = ras_encode;
|
||||
fmtops.validate = ras_validate;
|
||||
jas_image_addfmt(fmtid, "ras", "ras", "Sun Rasterfile (RAS)", &fmtops);
|
||||
++fmtid;
|
||||
#endif
|
||||
|
||||
#if !defined(EXCLUDE_JP2_SUPPORT)
|
||||
fmtops.decode = jp2_decode;
|
||||
fmtops.encode = jp2_encode;
|
||||
fmtops.validate = jp2_validate;
|
||||
jas_image_addfmt(fmtid, "jp2", "jp2",
|
||||
"JPEG-2000 JP2 File Format Syntax (ISO/IEC 15444-1)", &fmtops);
|
||||
++fmtid;
|
||||
fmtops.decode = jpc_decode;
|
||||
fmtops.encode = jpc_encode;
|
||||
fmtops.validate = jpc_validate;
|
||||
jas_image_addfmt(fmtid, "jpc", "jpc",
|
||||
"JPEG-2000 Code Stream Syntax (ISO/IEC 15444-1)", &fmtops);
|
||||
++fmtid;
|
||||
fmtops.decode = jp2_decode;
|
||||
fmtops.encode = jp2_encode;
|
||||
fmtops.validate = jp2_validate;
|
||||
jas_image_addfmt(fmtid, "jp2", "jp2",
|
||||
"JPEG-2000 JP2 File Format Syntax (ISO/IEC 15444-1)", &fmtops);
|
||||
++fmtid;
|
||||
fmtops.decode = jpc_decode;
|
||||
fmtops.encode = jpc_encode;
|
||||
fmtops.validate = jpc_validate;
|
||||
jas_image_addfmt(fmtid, "jpc", "jpc",
|
||||
"JPEG-2000 Code Stream Syntax (ISO/IEC 15444-1)", &fmtops);
|
||||
++fmtid;
|
||||
#endif
|
||||
|
||||
#if !defined(EXCLUDE_JPG_SUPPORT)
|
||||
fmtops.decode = jpg_decode;
|
||||
fmtops.encode = jpg_encode;
|
||||
fmtops.validate = jpg_validate;
|
||||
jas_image_addfmt(fmtid, "jpg", "jpg", "JPEG (ISO/IEC 10918-1)", &fmtops);
|
||||
++fmtid;
|
||||
fmtops.decode = jpg_decode;
|
||||
fmtops.encode = jpg_encode;
|
||||
fmtops.validate = jpg_validate;
|
||||
jas_image_addfmt(fmtid, "jpg", "jpg", "JPEG (ISO/IEC 10918-1)", &fmtops);
|
||||
++fmtid;
|
||||
#endif
|
||||
|
||||
#if !defined(EXCLUDE_PGX_SUPPORT)
|
||||
fmtops.decode = pgx_decode;
|
||||
fmtops.encode = pgx_encode;
|
||||
fmtops.validate = pgx_validate;
|
||||
jas_image_addfmt(fmtid, "pgx", "pgx", "JPEG-2000 VM Format (PGX)", &fmtops);
|
||||
++fmtid;
|
||||
fmtops.decode = pgx_decode;
|
||||
fmtops.encode = pgx_encode;
|
||||
fmtops.validate = pgx_validate;
|
||||
jas_image_addfmt(fmtid, "pgx", "pgx", "JPEG-2000 VM Format (PGX)", &fmtops);
|
||||
++fmtid;
|
||||
#endif
|
||||
|
||||
/* We must not register the JasPer library exit handler until after
|
||||
at least one memory allocation is performed. This is desirable
|
||||
as it ensures that the JasPer exit handler is called before the
|
||||
debug memory allocator exit handler. */
|
||||
atexit(jas_cleanup);
|
||||
/* We must not register the JasPer library exit handler until after
|
||||
at least one memory allocation is performed. This is desirable
|
||||
as it ensures that the JasPer exit handler is called before the
|
||||
debug memory allocator exit handler. */
|
||||
atexit(jas_cleanup);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void jas_cleanup()
|
||||
{
|
||||
jas_image_clearfmts();
|
||||
jas_image_clearfmts();
|
||||
}
|
||||
|
||||
externo
+61
-24
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -76,6 +76,11 @@
|
||||
|
||||
/* We need the prototype for memset. */
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#if !defined _WIN32 || defined __MINGW__ || defined __MINGW32__
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "jasper/jas_malloc.h"
|
||||
|
||||
@@ -96,36 +101,68 @@
|
||||
void *jas_malloc(size_t size)
|
||||
{
|
||||
#if defined(MEMALLOC_ALIGN2)
|
||||
void *ptr;
|
||||
void *ptr;
|
||||
abort();
|
||||
if (posix_memalign(&ptr, MEMALLOC_ALIGNMENT, size)) {
|
||||
return 0;
|
||||
}
|
||||
return ptr;
|
||||
if (posix_memalign(&ptr, MEMALLOC_ALIGNMENT, size)) {
|
||||
return 0;
|
||||
}
|
||||
return ptr;
|
||||
#endif
|
||||
return malloc(size);
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void jas_free(void *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void *jas_realloc(void *ptr, size_t size)
|
||||
{
|
||||
return realloc(ptr, size);
|
||||
return ptr ? realloc(ptr, size) : malloc(size);
|
||||
}
|
||||
|
||||
void *jas_realloc2(void *ptr, size_t nmemb, size_t size)
|
||||
{
|
||||
if (!ptr)
|
||||
return jas_alloc2(nmemb, size);
|
||||
if (nmemb && SIZE_MAX / nmemb < size) {
|
||||
errno = ENOMEM;
|
||||
return NULL;
|
||||
}
|
||||
return jas_realloc(ptr, nmemb * size);
|
||||
|
||||
}
|
||||
|
||||
void *jas_alloc2(size_t nmemb, size_t size)
|
||||
{
|
||||
if (nmemb && SIZE_MAX / nmemb < size) {
|
||||
errno = ENOMEM;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return jas_malloc(nmemb * size);
|
||||
}
|
||||
|
||||
void *jas_alloc3(size_t a, size_t b, size_t c)
|
||||
{
|
||||
size_t n;
|
||||
|
||||
if (a && SIZE_MAX / a < b) {
|
||||
errno = ENOMEM;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return jas_alloc2(a*b, c);
|
||||
}
|
||||
|
||||
void *jas_calloc(size_t nmemb, size_t size)
|
||||
{
|
||||
void *ptr;
|
||||
size_t n;
|
||||
n = nmemb * size;
|
||||
if (!(ptr = jas_malloc(n * sizeof(char)))) {
|
||||
return 0;
|
||||
}
|
||||
memset(ptr, 0, n);
|
||||
return ptr;
|
||||
void *ptr;
|
||||
|
||||
ptr = jas_alloc2(nmemb, size);
|
||||
if (ptr)
|
||||
memset(ptr, 0, nmemb*size);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
externo
+273
-273
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -85,108 +85,108 @@
|
||||
|
||||
jas_matrix_t *jas_seq2d_create(int xstart, int ystart, int xend, int yend)
|
||||
{
|
||||
jas_matrix_t *matrix;
|
||||
assert(xstart <= xend && ystart <= yend);
|
||||
if (!(matrix = jas_matrix_create(yend - ystart, xend - xstart))) {
|
||||
return 0;
|
||||
}
|
||||
matrix->xstart_ = xstart;
|
||||
matrix->ystart_ = ystart;
|
||||
matrix->xend_ = xend;
|
||||
matrix->yend_ = yend;
|
||||
return matrix;
|
||||
jas_matrix_t *matrix;
|
||||
assert(xstart <= xend && ystart <= yend);
|
||||
if (!(matrix = jas_matrix_create(yend - ystart, xend - xstart))) {
|
||||
return 0;
|
||||
}
|
||||
matrix->xstart_ = xstart;
|
||||
matrix->ystart_ = ystart;
|
||||
matrix->xend_ = xend;
|
||||
matrix->yend_ = yend;
|
||||
return matrix;
|
||||
}
|
||||
|
||||
jas_matrix_t *jas_matrix_create(int numrows, int numcols)
|
||||
{
|
||||
jas_matrix_t *matrix;
|
||||
int i;
|
||||
jas_matrix_t *matrix;
|
||||
int i;
|
||||
|
||||
if (!(matrix = jas_malloc(sizeof(jas_matrix_t)))) {
|
||||
return 0;
|
||||
}
|
||||
matrix->flags_ = 0;
|
||||
matrix->numrows_ = numrows;
|
||||
matrix->numcols_ = numcols;
|
||||
matrix->rows_ = 0;
|
||||
matrix->maxrows_ = numrows;
|
||||
matrix->data_ = 0;
|
||||
matrix->datasize_ = numrows * numcols;
|
||||
if (!(matrix = jas_malloc(sizeof(jas_matrix_t)))) {
|
||||
return 0;
|
||||
}
|
||||
matrix->flags_ = 0;
|
||||
matrix->numrows_ = numrows;
|
||||
matrix->numcols_ = numcols;
|
||||
matrix->rows_ = 0;
|
||||
matrix->maxrows_ = numrows;
|
||||
matrix->data_ = 0;
|
||||
matrix->datasize_ = numrows * numcols;
|
||||
|
||||
if (matrix->maxrows_ > 0) {
|
||||
if (!(matrix->rows_ = jas_malloc(matrix->maxrows_ *
|
||||
sizeof(jas_seqent_t *)))) {
|
||||
jas_matrix_destroy(matrix);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (matrix->maxrows_ > 0) {
|
||||
if (!(matrix->rows_ = jas_alloc2(matrix->maxrows_,
|
||||
sizeof(jas_seqent_t *)))) {
|
||||
jas_matrix_destroy(matrix);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (matrix->datasize_ > 0) {
|
||||
if (!(matrix->data_ = jas_malloc(matrix->datasize_ *
|
||||
sizeof(jas_seqent_t)))) {
|
||||
jas_matrix_destroy(matrix);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (matrix->datasize_ > 0) {
|
||||
if (!(matrix->data_ = jas_alloc2(matrix->datasize_,
|
||||
sizeof(jas_seqent_t)))) {
|
||||
jas_matrix_destroy(matrix);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < numrows; ++i) {
|
||||
matrix->rows_[i] = &matrix->data_[i * matrix->numcols_];
|
||||
}
|
||||
for (i = 0; i < numrows; ++i) {
|
||||
matrix->rows_[i] = &matrix->data_[i * matrix->numcols_];
|
||||
}
|
||||
|
||||
for (i = 0; i < matrix->datasize_; ++i) {
|
||||
matrix->data_[i] = 0;
|
||||
}
|
||||
for (i = 0; i < matrix->datasize_; ++i) {
|
||||
matrix->data_[i] = 0;
|
||||
}
|
||||
|
||||
matrix->xstart_ = 0;
|
||||
matrix->ystart_ = 0;
|
||||
matrix->xend_ = matrix->numcols_;
|
||||
matrix->yend_ = matrix->numrows_;
|
||||
matrix->xstart_ = 0;
|
||||
matrix->ystart_ = 0;
|
||||
matrix->xend_ = matrix->numcols_;
|
||||
matrix->yend_ = matrix->numrows_;
|
||||
|
||||
return matrix;
|
||||
return matrix;
|
||||
}
|
||||
|
||||
void jas_matrix_destroy(jas_matrix_t *matrix)
|
||||
{
|
||||
if (matrix->data_) {
|
||||
assert(!(matrix->flags_ & JAS_MATRIX_REF));
|
||||
jas_free(matrix->data_);
|
||||
matrix->data_ = 0;
|
||||
}
|
||||
if (matrix->rows_) {
|
||||
jas_free(matrix->rows_);
|
||||
matrix->rows_ = 0;
|
||||
}
|
||||
jas_free(matrix);
|
||||
if (matrix->data_) {
|
||||
assert(!(matrix->flags_ & JAS_MATRIX_REF));
|
||||
jas_free(matrix->data_);
|
||||
matrix->data_ = 0;
|
||||
}
|
||||
if (matrix->rows_) {
|
||||
jas_free(matrix->rows_);
|
||||
matrix->rows_ = 0;
|
||||
}
|
||||
jas_free(matrix);
|
||||
}
|
||||
|
||||
jas_seq2d_t *jas_seq2d_copy(jas_seq2d_t *x)
|
||||
{
|
||||
jas_matrix_t *y;
|
||||
int i;
|
||||
int j;
|
||||
y = jas_seq2d_create(jas_seq2d_xstart(x), jas_seq2d_ystart(x), jas_seq2d_xend(x),
|
||||
jas_seq2d_yend(x));
|
||||
assert(y);
|
||||
for (i = 0; i < x->numrows_; ++i) {
|
||||
for (j = 0; j < x->numcols_; ++j) {
|
||||
*jas_matrix_getref(y, i, j) = jas_matrix_get(x, i, j);
|
||||
}
|
||||
}
|
||||
return y;
|
||||
jas_matrix_t *y;
|
||||
int i;
|
||||
int j;
|
||||
y = jas_seq2d_create(jas_seq2d_xstart(x), jas_seq2d_ystart(x), jas_seq2d_xend(x),
|
||||
jas_seq2d_yend(x));
|
||||
assert(y);
|
||||
for (i = 0; i < x->numrows_; ++i) {
|
||||
for (j = 0; j < x->numcols_; ++j) {
|
||||
*jas_matrix_getref(y, i, j) = jas_matrix_get(x, i, j);
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
jas_matrix_t *jas_matrix_copy(jas_matrix_t *x)
|
||||
{
|
||||
jas_matrix_t *y;
|
||||
int i;
|
||||
int j;
|
||||
y = jas_matrix_create(x->numrows_, x->numcols_);
|
||||
for (i = 0; i < x->numrows_; ++i) {
|
||||
for (j = 0; j < x->numcols_; ++j) {
|
||||
*jas_matrix_getref(y, i, j) = jas_matrix_get(x, i, j);
|
||||
}
|
||||
}
|
||||
return y;
|
||||
jas_matrix_t *y;
|
||||
int i;
|
||||
int j;
|
||||
y = jas_matrix_create(x->numrows_, x->numcols_);
|
||||
for (i = 0; i < x->numrows_; ++i) {
|
||||
for (j = 0; j < x->numcols_; ++j) {
|
||||
*jas_matrix_getref(y, i, j) = jas_matrix_get(x, i, j);
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -196,39 +196,39 @@ jas_matrix_t *jas_matrix_copy(jas_matrix_t *x)
|
||||
void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart, int ystart,
|
||||
int xend, int yend)
|
||||
{
|
||||
jas_matrix_bindsub(s, s1, ystart - s1->ystart_, xstart - s1->xstart_,
|
||||
yend - s1->ystart_ - 1, xend - s1->xstart_ - 1);
|
||||
jas_matrix_bindsub(s, s1, ystart - s1->ystart_, xstart - s1->xstart_,
|
||||
yend - s1->ystart_ - 1, xend - s1->xstart_ - 1);
|
||||
}
|
||||
|
||||
void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0, int c0,
|
||||
int r1, int c1)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
|
||||
if (mat0->data_) {
|
||||
if (!(mat0->flags_ & JAS_MATRIX_REF)) {
|
||||
jas_free(mat0->data_);
|
||||
}
|
||||
mat0->data_ = 0;
|
||||
mat0->datasize_ = 0;
|
||||
}
|
||||
if (mat0->rows_) {
|
||||
jas_free(mat0->rows_);
|
||||
mat0->rows_ = 0;
|
||||
}
|
||||
mat0->flags_ |= JAS_MATRIX_REF;
|
||||
mat0->numrows_ = r1 - r0 + 1;
|
||||
mat0->numcols_ = c1 - c0 + 1;
|
||||
mat0->maxrows_ = mat0->numrows_;
|
||||
mat0->rows_ = jas_malloc(mat0->maxrows_ * sizeof(jas_seqent_t *));
|
||||
for (i = 0; i < mat0->numrows_; ++i) {
|
||||
mat0->rows_[i] = mat1->rows_[r0 + i] + c0;
|
||||
}
|
||||
if (mat0->data_) {
|
||||
if (!(mat0->flags_ & JAS_MATRIX_REF)) {
|
||||
jas_free(mat0->data_);
|
||||
}
|
||||
mat0->data_ = 0;
|
||||
mat0->datasize_ = 0;
|
||||
}
|
||||
if (mat0->rows_) {
|
||||
jas_free(mat0->rows_);
|
||||
mat0->rows_ = 0;
|
||||
}
|
||||
mat0->flags_ |= JAS_MATRIX_REF;
|
||||
mat0->numrows_ = r1 - r0 + 1;
|
||||
mat0->numcols_ = c1 - c0 + 1;
|
||||
mat0->maxrows_ = mat0->numrows_;
|
||||
mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *));
|
||||
for (i = 0; i < mat0->numrows_; ++i) {
|
||||
mat0->rows_[i] = mat1->rows_[r0 + i] + c0;
|
||||
}
|
||||
|
||||
mat0->xstart_ = mat1->xstart_ + c0;
|
||||
mat0->ystart_ = mat1->ystart_ + r0;
|
||||
mat0->xend_ = mat0->xstart_ + mat0->numcols_;
|
||||
mat0->yend_ = mat0->ystart_ + mat0->numrows_;
|
||||
mat0->xstart_ = mat1->xstart_ + c0;
|
||||
mat0->ystart_ = mat1->ystart_ + r0;
|
||||
mat0->xend_ = mat0->xstart_ + mat0->numcols_;
|
||||
mat0->yend_ = mat0->ystart_ + mat0->numrows_;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -237,102 +237,102 @@ void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0, int c0,
|
||||
|
||||
int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int i;
|
||||
int j;
|
||||
|
||||
if (mat0->numrows_ != mat1->numrows_ || mat0->numcols_ !=
|
||||
mat1->numcols_) {
|
||||
return 1;
|
||||
}
|
||||
for (i = 0; i < mat0->numrows_; i++) {
|
||||
for (j = 0; j < mat0->numcols_; j++) {
|
||||
if (jas_matrix_get(mat0, i, j) != jas_matrix_get(mat1, i, j)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
if (mat0->numrows_ != mat1->numrows_ || mat0->numcols_ !=
|
||||
mat1->numcols_) {
|
||||
return 1;
|
||||
}
|
||||
for (i = 0; i < mat0->numrows_; i++) {
|
||||
for (j = 0; j < mat0->numcols_; j++) {
|
||||
if (jas_matrix_get(mat0, i, j) != jas_matrix_get(mat1, i, j)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void jas_matrix_divpow2(jas_matrix_t *matrix, int n)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t *rowstart;
|
||||
int rowstep;
|
||||
jas_seqent_t *data;
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t *rowstart;
|
||||
int rowstep;
|
||||
jas_seqent_t *data;
|
||||
|
||||
rowstep = jas_matrix_rowstep(matrix);
|
||||
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
|
||||
rowstart += rowstep) {
|
||||
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
|
||||
++data) {
|
||||
*data = (*data >= 0) ? ((*data) >> n) :
|
||||
(-((-(*data)) >> n));
|
||||
}
|
||||
}
|
||||
rowstep = jas_matrix_rowstep(matrix);
|
||||
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
|
||||
rowstart += rowstep) {
|
||||
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
|
||||
++data) {
|
||||
*data = (*data >= 0) ? ((*data) >> n) :
|
||||
(-((-(*data)) >> n));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void jas_matrix_clip(jas_matrix_t *matrix, jas_seqent_t minval, jas_seqent_t maxval)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t v;
|
||||
jas_seqent_t *rowstart;
|
||||
jas_seqent_t *data;
|
||||
int rowstep;
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t v;
|
||||
jas_seqent_t *rowstart;
|
||||
jas_seqent_t *data;
|
||||
int rowstep;
|
||||
|
||||
rowstep = jas_matrix_rowstep(matrix);
|
||||
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
|
||||
rowstart += rowstep) {
|
||||
data = rowstart;
|
||||
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
|
||||
++data) {
|
||||
v = *data;
|
||||
if (v < minval) {
|
||||
*data = minval;
|
||||
} else if (v > maxval) {
|
||||
*data = maxval;
|
||||
}
|
||||
}
|
||||
}
|
||||
rowstep = jas_matrix_rowstep(matrix);
|
||||
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
|
||||
rowstart += rowstep) {
|
||||
data = rowstart;
|
||||
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
|
||||
++data) {
|
||||
v = *data;
|
||||
if (v < minval) {
|
||||
*data = minval;
|
||||
} else if (v > maxval) {
|
||||
*data = maxval;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void jas_matrix_asr(jas_matrix_t *matrix, int n)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t *rowstart;
|
||||
int rowstep;
|
||||
jas_seqent_t *data;
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t *rowstart;
|
||||
int rowstep;
|
||||
jas_seqent_t *data;
|
||||
|
||||
assert(n >= 0);
|
||||
rowstep = jas_matrix_rowstep(matrix);
|
||||
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
|
||||
rowstart += rowstep) {
|
||||
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
|
||||
++data) {
|
||||
*data >>= n;
|
||||
}
|
||||
}
|
||||
assert(n >= 0);
|
||||
rowstep = jas_matrix_rowstep(matrix);
|
||||
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
|
||||
rowstart += rowstep) {
|
||||
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
|
||||
++data) {
|
||||
*data >>= n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void jas_matrix_asl(jas_matrix_t *matrix, int n)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t *rowstart;
|
||||
int rowstep;
|
||||
jas_seqent_t *data;
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t *rowstart;
|
||||
int rowstep;
|
||||
jas_seqent_t *data;
|
||||
|
||||
rowstep = jas_matrix_rowstep(matrix);
|
||||
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
|
||||
rowstart += rowstep) {
|
||||
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
|
||||
++data) {
|
||||
*data <<= n;
|
||||
}
|
||||
}
|
||||
rowstep = jas_matrix_rowstep(matrix);
|
||||
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
|
||||
rowstart += rowstep) {
|
||||
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
|
||||
++data) {
|
||||
*data <<= n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -341,114 +341,114 @@ void jas_matrix_asl(jas_matrix_t *matrix, int n)
|
||||
|
||||
int jas_matrix_resize(jas_matrix_t *matrix, int numrows, int numcols)
|
||||
{
|
||||
int size;
|
||||
int i;
|
||||
int size;
|
||||
int i;
|
||||
|
||||
size = numrows * numcols;
|
||||
if (size > matrix->datasize_ || numrows > matrix->maxrows_) {
|
||||
return -1;
|
||||
}
|
||||
size = numrows * numcols;
|
||||
if (size > matrix->datasize_ || numrows > matrix->maxrows_) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
matrix->numrows_ = numrows;
|
||||
matrix->numcols_ = numcols;
|
||||
matrix->numrows_ = numrows;
|
||||
matrix->numcols_ = numcols;
|
||||
|
||||
for (i = 0; i < numrows; ++i) {
|
||||
matrix->rows_[i] = &matrix->data_[numcols * i];
|
||||
}
|
||||
for (i = 0; i < numrows; ++i) {
|
||||
matrix->rows_[i] = &matrix->data_[numcols * i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void jas_matrix_setall(jas_matrix_t *matrix, jas_seqent_t val)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t *rowstart;
|
||||
int rowstep;
|
||||
jas_seqent_t *data;
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t *rowstart;
|
||||
int rowstep;
|
||||
jas_seqent_t *data;
|
||||
|
||||
rowstep = jas_matrix_rowstep(matrix);
|
||||
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
|
||||
rowstart += rowstep) {
|
||||
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
|
||||
++data) {
|
||||
*data = val;
|
||||
}
|
||||
}
|
||||
rowstep = jas_matrix_rowstep(matrix);
|
||||
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
|
||||
rowstart += rowstep) {
|
||||
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
|
||||
++data) {
|
||||
*data = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jas_matrix_t *jas_seq2d_input(FILE *in)
|
||||
{
|
||||
jas_matrix_t *matrix;
|
||||
int i;
|
||||
int j;
|
||||
long x;
|
||||
int numrows;
|
||||
int numcols;
|
||||
int xoff;
|
||||
int yoff;
|
||||
jas_matrix_t *matrix;
|
||||
int i;
|
||||
int j;
|
||||
long x;
|
||||
int numrows;
|
||||
int numcols;
|
||||
int xoff;
|
||||
int yoff;
|
||||
|
||||
if (fscanf(in, "%d %d", &xoff, &yoff) != 2)
|
||||
return 0;
|
||||
if (fscanf(in, "%d %d", &numcols, &numrows) != 2)
|
||||
return 0;
|
||||
if (!(matrix = jas_seq2d_create(xoff, yoff, xoff + numcols, yoff + numrows)))
|
||||
return 0;
|
||||
if (fscanf(in, "%d %d", &xoff, &yoff) != 2)
|
||||
return 0;
|
||||
if (fscanf(in, "%d %d", &numcols, &numrows) != 2)
|
||||
return 0;
|
||||
if (!(matrix = jas_seq2d_create(xoff, yoff, xoff + numcols, yoff + numrows)))
|
||||
return 0;
|
||||
|
||||
if (jas_matrix_numrows(matrix) != numrows || jas_matrix_numcols(matrix) != numcols) {
|
||||
abort();
|
||||
}
|
||||
if (jas_matrix_numrows(matrix) != numrows || jas_matrix_numcols(matrix) != numcols) {
|
||||
abort();
|
||||
}
|
||||
|
||||
/* Get matrix data. */
|
||||
for (i = 0; i < jas_matrix_numrows(matrix); i++) {
|
||||
for (j = 0; j < jas_matrix_numcols(matrix); j++) {
|
||||
if (fscanf(in, "%ld", &x) != 1) {
|
||||
jas_matrix_destroy(matrix);
|
||||
return 0;
|
||||
}
|
||||
jas_matrix_set(matrix, i, j, JAS_CAST(jas_seqent_t, x));
|
||||
}
|
||||
}
|
||||
/* Get matrix data. */
|
||||
for (i = 0; i < jas_matrix_numrows(matrix); i++) {
|
||||
for (j = 0; j < jas_matrix_numcols(matrix); j++) {
|
||||
if (fscanf(in, "%ld", &x) != 1) {
|
||||
jas_matrix_destroy(matrix);
|
||||
return 0;
|
||||
}
|
||||
jas_matrix_set(matrix, i, j, JAS_CAST(jas_seqent_t, x));
|
||||
}
|
||||
}
|
||||
|
||||
return matrix;
|
||||
return matrix;
|
||||
}
|
||||
|
||||
int jas_seq2d_output(jas_matrix_t *matrix, FILE *out)
|
||||
{
|
||||
#define MAXLINELEN 80
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t x;
|
||||
char buf[MAXLINELEN + 1];
|
||||
char sbuf[MAXLINELEN + 1];
|
||||
int n;
|
||||
int i;
|
||||
int j;
|
||||
jas_seqent_t x;
|
||||
char buf[MAXLINELEN + 1];
|
||||
char sbuf[MAXLINELEN + 1];
|
||||
int n;
|
||||
|
||||
fprintf(out, "%d %d\n", (int)jas_seq2d_xstart(matrix),
|
||||
(int)jas_seq2d_ystart(matrix));
|
||||
fprintf(out, "%d %d\n", (int)jas_matrix_numcols(matrix),
|
||||
(int)jas_matrix_numrows(matrix));
|
||||
fprintf(out, "%d %d\n", (int)jas_seq2d_xstart(matrix),
|
||||
(int)jas_seq2d_ystart(matrix));
|
||||
fprintf(out, "%d %d\n", (int)jas_matrix_numcols(matrix),
|
||||
(int)jas_matrix_numrows(matrix));
|
||||
|
||||
buf[0] = '\0';
|
||||
for (i = 0; i < jas_matrix_numrows(matrix); ++i) {
|
||||
for (j = 0; j < jas_matrix_numcols(matrix); ++j) {
|
||||
x = jas_matrix_get(matrix, i, j);
|
||||
sprintf(sbuf, "%s%4ld", (strlen(buf) > 0) ? " " : "",
|
||||
JAS_CAST(long, x));
|
||||
n = strlen(buf);
|
||||
if (n + strlen(sbuf) > MAXLINELEN) {
|
||||
fputs(buf, out);
|
||||
fputs("\n", out);
|
||||
buf[0] = '\0';
|
||||
}
|
||||
strcat(buf, sbuf);
|
||||
if (j == jas_matrix_numcols(matrix) - 1) {
|
||||
fputs(buf, out);
|
||||
fputs("\n", out);
|
||||
buf[0] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
fputs(buf, out);
|
||||
buf[0] = '\0';
|
||||
for (i = 0; i < jas_matrix_numrows(matrix); ++i) {
|
||||
for (j = 0; j < jas_matrix_numcols(matrix); ++j) {
|
||||
x = jas_matrix_get(matrix, i, j);
|
||||
sprintf(sbuf, "%s%4ld", (strlen(buf) > 0) ? " " : "",
|
||||
JAS_CAST(long, x));
|
||||
n = strlen(buf);
|
||||
if (n + strlen(sbuf) > MAXLINELEN) {
|
||||
fputs(buf, out);
|
||||
fputs("\n", out);
|
||||
buf[0] = '\0';
|
||||
}
|
||||
strcat(buf, sbuf);
|
||||
if (j == jas_matrix_numcols(matrix) - 1) {
|
||||
fputs(buf, out);
|
||||
fputs("\n", out);
|
||||
buf[0] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
fputs(buf, out);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
externo
+724
-718
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+16
-16
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -85,12 +85,12 @@
|
||||
|
||||
char *jas_strdup(const char *s)
|
||||
{
|
||||
int n;
|
||||
char *p;
|
||||
n = strlen(s) + 1;
|
||||
if (!(p = jas_malloc(n * sizeof(char)))) {
|
||||
return 0;
|
||||
}
|
||||
strcpy(p, s);
|
||||
return p;
|
||||
int n;
|
||||
char *p;
|
||||
n = strlen(s) + 1;
|
||||
if (!(p = jas_malloc(n * sizeof(char)))) {
|
||||
return 0;
|
||||
}
|
||||
strcpy(p, s);
|
||||
return p;
|
||||
}
|
||||
|
||||
externo
+32
-32
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -83,51 +83,51 @@
|
||||
|
||||
void jas_tmr_start(jas_tmr_t *tmr)
|
||||
{
|
||||
if (gettimeofday(&tmr->start, 0)) {
|
||||
abort();
|
||||
}
|
||||
if (gettimeofday(&tmr->start, 0)) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
void jas_tmr_stop(jas_tmr_t *tmr)
|
||||
{
|
||||
if (gettimeofday(&tmr->stop, 0)) {
|
||||
abort();
|
||||
}
|
||||
if (gettimeofday(&tmr->stop, 0)) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
double jas_tmr_get(jas_tmr_t *tmr)
|
||||
{
|
||||
double t0;
|
||||
double t1;
|
||||
t0 = ((double) tmr->start.tv_sec) + ((double) tmr->start.tv_usec) / 1e6;
|
||||
t1 = ((double) tmr->stop.tv_sec) + ((double) tmr->stop.tv_usec) / 1e6;
|
||||
return t1 - t0;
|
||||
double t0;
|
||||
double t1;
|
||||
t0 = ((double) tmr->start.tv_sec) + ((double) tmr->start.tv_usec) / 1e6;
|
||||
t1 = ((double) tmr->stop.tv_sec) + ((double) tmr->stop.tv_usec) / 1e6;
|
||||
return t1 - t0;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_GETRUSAGE)
|
||||
|
||||
void jas_tmr_start(jas_tmr_t *tmr)
|
||||
{
|
||||
if (getrusage(RUSAGE_SELF, &tmr->start) < 0) {
|
||||
abort();
|
||||
}
|
||||
if (getrusage(RUSAGE_SELF, &tmr->start) < 0) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
void jas_tmr_stop(jas_tmr_t *tmr)
|
||||
{
|
||||
if (getrusage(RUSAGE_SELF, &tmr->stop) < 0) {
|
||||
abort();
|
||||
}
|
||||
if (getrusage(RUSAGE_SELF, &tmr->stop) < 0) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
double jas_tmr_get(jas_tmr_t *tmr)
|
||||
{
|
||||
double t;
|
||||
t = ((tmr->stop.ru_utime.tv_sec * 1e6 + tmr->stop.ru_utime.tv_usec) -
|
||||
(tmr->start.ru_utime.tv_sec * 1e6 + tmr->start.ru_utime.tv_usec)) / 1e6;
|
||||
t += ((tmr->stop.ru_stime.tv_sec * 1e6 + tmr->stop.ru_stime.tv_usec) -
|
||||
(tmr->start.ru_stime.tv_sec * 1e6 + tmr->start.ru_stime.tv_usec)) / 1e6;
|
||||
return t;
|
||||
double t;
|
||||
t = ((tmr->stop.ru_utime.tv_sec * 1e6 + tmr->stop.ru_utime.tv_usec) -
|
||||
(tmr->start.ru_utime.tv_sec * 1e6 + tmr->start.ru_utime.tv_usec)) / 1e6;
|
||||
t += ((tmr->stop.ru_stime.tv_sec * 1e6 + tmr->stop.ru_stime.tv_usec) -
|
||||
(tmr->start.ru_stime.tv_sec * 1e6 + tmr->start.ru_stime.tv_usec)) / 1e6;
|
||||
return t;
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -142,7 +142,7 @@ void jas_tmr_stop(jas_tmr_t *tmr)
|
||||
|
||||
double jas_tmr_get(jas_tmr_t *tmr)
|
||||
{
|
||||
return 0.0;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
externo
+96
-96
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
/* Is the specified character valid for a tag name? */
|
||||
#define JAS_TVP_ISTAG(x) \
|
||||
(isalpha(x) || (x) == '_' || isdigit(x))
|
||||
(isalpha(x) || (x) == '_' || isdigit(x))
|
||||
|
||||
/******************************************************************************\
|
||||
* Code for creating and destroying a tag-value parser.
|
||||
@@ -92,26 +92,26 @@
|
||||
|
||||
jas_tvparser_t *jas_tvparser_create(const char *s)
|
||||
{
|
||||
jas_tvparser_t *tvp;
|
||||
if (!(tvp = jas_malloc(sizeof(jas_tvparser_t)))) {
|
||||
return 0;
|
||||
}
|
||||
if (!(tvp->buf = jas_strdup(s))) {
|
||||
jas_tvparser_destroy(tvp);
|
||||
return 0;
|
||||
}
|
||||
tvp->pos = tvp->buf;
|
||||
tvp->tag = 0;
|
||||
tvp->val = 0;
|
||||
return tvp;
|
||||
jas_tvparser_t *tvp;
|
||||
if (!(tvp = jas_malloc(sizeof(jas_tvparser_t)))) {
|
||||
return 0;
|
||||
}
|
||||
if (!(tvp->buf = jas_strdup(s))) {
|
||||
jas_tvparser_destroy(tvp);
|
||||
return 0;
|
||||
}
|
||||
tvp->pos = tvp->buf;
|
||||
tvp->tag = 0;
|
||||
tvp->val = 0;
|
||||
return tvp;
|
||||
}
|
||||
|
||||
void jas_tvparser_destroy(jas_tvparser_t *tvp)
|
||||
{
|
||||
if (tvp->buf) {
|
||||
jas_free(tvp->buf);
|
||||
}
|
||||
jas_free(tvp);
|
||||
if (tvp->buf) {
|
||||
jas_free(tvp->buf);
|
||||
}
|
||||
jas_free(tvp);
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -121,73 +121,73 @@ void jas_tvparser_destroy(jas_tvparser_t *tvp)
|
||||
/* Get the next tag-value pair. */
|
||||
int jas_tvparser_next(jas_tvparser_t *tvp)
|
||||
{
|
||||
char *p;
|
||||
char *tag;
|
||||
char *val;
|
||||
char *p;
|
||||
char *tag;
|
||||
char *val;
|
||||
|
||||
/* Skip any leading whitespace. */
|
||||
p = tvp->pos;
|
||||
while (*p != '\0' && isspace(*p)) {
|
||||
++p;
|
||||
}
|
||||
/* Skip any leading whitespace. */
|
||||
p = tvp->pos;
|
||||
while (*p != '\0' && isspace(*p)) {
|
||||
++p;
|
||||
}
|
||||
|
||||
/* Has the end of the input data been reached? */
|
||||
if (*p == '\0') {
|
||||
/* No more tags are present. */
|
||||
tvp->pos = p;
|
||||
return 1;
|
||||
}
|
||||
/* Has the end of the input data been reached? */
|
||||
if (*p == '\0') {
|
||||
/* No more tags are present. */
|
||||
tvp->pos = p;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Does the tag name begin with a valid character? */
|
||||
if (!JAS_TVP_ISTAG(*p)) {
|
||||
return -1;
|
||||
}
|
||||
/* Does the tag name begin with a valid character? */
|
||||
if (!JAS_TVP_ISTAG(*p)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Remember where the tag name begins. */
|
||||
tag = p;
|
||||
/* Remember where the tag name begins. */
|
||||
tag = p;
|
||||
|
||||
/* Find the end of the tag name. */
|
||||
while (*p != '\0' && JAS_TVP_ISTAG(*p)) {
|
||||
++p;
|
||||
}
|
||||
/* Find the end of the tag name. */
|
||||
while (*p != '\0' && JAS_TVP_ISTAG(*p)) {
|
||||
++p;
|
||||
}
|
||||
|
||||
/* Has the end of the input data been reached? */
|
||||
if (*p == '\0') {
|
||||
/* The value field is empty. */
|
||||
tvp->tag = tag;
|
||||
tvp->val = "";
|
||||
tvp->pos = p;
|
||||
return 0;
|
||||
}
|
||||
/* Has the end of the input data been reached? */
|
||||
if (*p == '\0') {
|
||||
/* The value field is empty. */
|
||||
tvp->tag = tag;
|
||||
tvp->val = "";
|
||||
tvp->pos = p;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Is a value field not present? */
|
||||
if (*p != '=') {
|
||||
if (*p != '\0' && !isspace(*p)) {
|
||||
return -1;
|
||||
}
|
||||
*p++ = '\0';
|
||||
tvp->tag = tag;
|
||||
tvp->val = "";
|
||||
tvp->pos = p;
|
||||
return 0;
|
||||
}
|
||||
/* Is a value field not present? */
|
||||
if (*p != '=') {
|
||||
if (*p != '\0' && !isspace(*p)) {
|
||||
return -1;
|
||||
}
|
||||
*p++ = '\0';
|
||||
tvp->tag = tag;
|
||||
tvp->val = "";
|
||||
tvp->pos = p;
|
||||
return 0;
|
||||
}
|
||||
|
||||
*p++ = '\0';
|
||||
*p++ = '\0';
|
||||
|
||||
val = p;
|
||||
while (*p != '\0' && !isspace(*p)) {
|
||||
++p;
|
||||
}
|
||||
val = p;
|
||||
while (*p != '\0' && !isspace(*p)) {
|
||||
++p;
|
||||
}
|
||||
|
||||
if (*p != '\0') {
|
||||
*p++ = '\0';
|
||||
}
|
||||
if (*p != '\0') {
|
||||
*p++ = '\0';
|
||||
}
|
||||
|
||||
tvp->pos = p;
|
||||
tvp->tag = tag;
|
||||
tvp->val = val;
|
||||
tvp->pos = p;
|
||||
tvp->tag = tag;
|
||||
tvp->val = val;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -197,13 +197,13 @@ int jas_tvparser_next(jas_tvparser_t *tvp)
|
||||
/* Get the current tag. */
|
||||
char *jas_tvparser_gettag(jas_tvparser_t *tvp)
|
||||
{
|
||||
return tvp->tag;
|
||||
return tvp->tag;
|
||||
}
|
||||
|
||||
/* Get the current value. */
|
||||
char *jas_tvparser_getval(jas_tvparser_t *tvp)
|
||||
{
|
||||
return tvp->val;
|
||||
return tvp->val;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -213,15 +213,15 @@ char *jas_tvparser_getval(jas_tvparser_t *tvp)
|
||||
/* Lookup a tag by name. */
|
||||
jas_taginfo_t *jas_taginfos_lookup(jas_taginfo_t *taginfos, const char *name)
|
||||
{
|
||||
jas_taginfo_t *taginfo;
|
||||
taginfo = taginfos;
|
||||
while (taginfo->id >= 0) {
|
||||
if (!strcmp(taginfo->name, name)) {
|
||||
return taginfo;
|
||||
}
|
||||
++taginfo;
|
||||
}
|
||||
return 0;
|
||||
jas_taginfo_t *taginfo;
|
||||
taginfo = taginfos;
|
||||
while (taginfo->id >= 0) {
|
||||
if (!strcmp(taginfo->name, name)) {
|
||||
return taginfo;
|
||||
}
|
||||
++taginfo;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This function is simply for convenience. */
|
||||
@@ -229,9 +229,9 @@ jas_taginfo_t *jas_taginfos_lookup(jas_taginfo_t *taginfos, const char *name)
|
||||
using this function. This function never returns a null pointer. */
|
||||
jas_taginfo_t *jas_taginfo_nonull(jas_taginfo_t *taginfo)
|
||||
{
|
||||
static jas_taginfo_t invalidtaginfo = {
|
||||
-1, 0
|
||||
};
|
||||
|
||||
return taginfo ? taginfo : &invalidtaginfo;
|
||||
static jas_taginfo_t invalidtaginfo = {
|
||||
-1, 0
|
||||
};
|
||||
|
||||
return taginfo ? taginfo : &invalidtaginfo;
|
||||
}
|
||||
|
||||
externo
+9
-9
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -63,5 +63,5 @@
|
||||
|
||||
const char *jas_getversion()
|
||||
{
|
||||
return JAS_VERSION;
|
||||
return JAS_VERSION;
|
||||
}
|
||||
|
||||
+51
-51
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -139,72 +139,72 @@ typedef double jas_cmreal_t;
|
||||
struct jas_cmpxform_s;
|
||||
|
||||
typedef struct {
|
||||
long *buf;
|
||||
int prec;
|
||||
int sgnd;
|
||||
int width;
|
||||
int height;
|
||||
long *buf;
|
||||
int prec;
|
||||
int sgnd;
|
||||
int width;
|
||||
int height;
|
||||
} jas_cmcmptfmt_t;
|
||||
|
||||
typedef struct {
|
||||
int numcmpts;
|
||||
jas_cmcmptfmt_t *cmptfmts;
|
||||
int numcmpts;
|
||||
jas_cmcmptfmt_t *cmptfmts;
|
||||
} jas_cmpixmap_t;
|
||||
|
||||
typedef struct {
|
||||
void (*destroy)(struct jas_cmpxform_s *pxform);
|
||||
int (*apply)(struct jas_cmpxform_s *pxform, jas_cmreal_t *in, jas_cmreal_t *out, int cnt);
|
||||
void (*dump)(struct jas_cmpxform_s *pxform);
|
||||
void (*destroy)(struct jas_cmpxform_s *pxform);
|
||||
int (*apply)(struct jas_cmpxform_s *pxform, jas_cmreal_t *in, jas_cmreal_t *out, int cnt);
|
||||
void (*dump)(struct jas_cmpxform_s *pxform);
|
||||
} jas_cmpxformops_t;
|
||||
|
||||
typedef struct {
|
||||
jas_cmreal_t *data;
|
||||
int size;
|
||||
jas_cmreal_t *data;
|
||||
int size;
|
||||
} jas_cmshapmatlut_t;
|
||||
|
||||
typedef struct {
|
||||
int mono;
|
||||
int order;
|
||||
int useluts;
|
||||
int usemat;
|
||||
jas_cmshapmatlut_t luts[3];
|
||||
jas_cmreal_t mat[3][4];
|
||||
int mono;
|
||||
int order;
|
||||
int useluts;
|
||||
int usemat;
|
||||
jas_cmshapmatlut_t luts[3];
|
||||
jas_cmreal_t mat[3][4];
|
||||
} jas_cmshapmat_t;
|
||||
|
||||
typedef struct {
|
||||
int order;
|
||||
int order;
|
||||
} jas_cmshaplut_t;
|
||||
|
||||
typedef struct {
|
||||
int inclrspc;
|
||||
int outclrspc;
|
||||
int inclrspc;
|
||||
int outclrspc;
|
||||
} jas_cmclrspcconv_t;
|
||||
|
||||
#define jas_align_t double
|
||||
|
||||
typedef struct jas_cmpxform_s {
|
||||
int refcnt;
|
||||
jas_cmpxformops_t *ops;
|
||||
int numinchans;
|
||||
int numoutchans;
|
||||
union {
|
||||
jas_align_t dummy;
|
||||
jas_cmshapmat_t shapmat;
|
||||
jas_cmshaplut_t shaplut;
|
||||
jas_cmclrspcconv_t clrspcconv;
|
||||
} data;
|
||||
int refcnt;
|
||||
jas_cmpxformops_t *ops;
|
||||
int numinchans;
|
||||
int numoutchans;
|
||||
union {
|
||||
jas_align_t dummy;
|
||||
jas_cmshapmat_t shapmat;
|
||||
jas_cmshaplut_t shaplut;
|
||||
jas_cmclrspcconv_t clrspcconv;
|
||||
} data;
|
||||
} jas_cmpxform_t;
|
||||
|
||||
typedef struct {
|
||||
int numpxforms;
|
||||
int maxpxforms;
|
||||
jas_cmpxform_t **pxforms;
|
||||
int numpxforms;
|
||||
int maxpxforms;
|
||||
jas_cmpxform_t **pxforms;
|
||||
} jas_cmpxformseq_t;
|
||||
|
||||
typedef struct {
|
||||
int numinchans;
|
||||
int numoutchans;
|
||||
jas_cmpxformseq_t *pxformseq;
|
||||
int numinchans;
|
||||
int numoutchans;
|
||||
jas_cmpxformseq_t *pxformseq;
|
||||
} jas_cmxform_t;
|
||||
|
||||
#define JAS_CMPROF_TYPE_DEV 1
|
||||
@@ -213,12 +213,12 @@ typedef struct {
|
||||
#define JAS_CMPROF_NUMPXFORMSEQS 13
|
||||
|
||||
typedef struct {
|
||||
int clrspc;
|
||||
int numchans;
|
||||
int refclrspc;
|
||||
int numrefchans;
|
||||
jas_iccprof_t *iccprof;
|
||||
jas_cmpxformseq_t *pxformseqs[JAS_CMPROF_NUMPXFORMSEQS];
|
||||
int clrspc;
|
||||
int numchans;
|
||||
int refclrspc;
|
||||
int numrefchans;
|
||||
jas_iccprof_t *iccprof;
|
||||
jas_cmpxformseq_t *pxformseqs[JAS_CMPROF_NUMPXFORMSEQS];
|
||||
} jas_cmprof_t;
|
||||
|
||||
/* Create a profile. */
|
||||
|
||||
+8
-8
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
|
||||
+9
-9
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -90,7 +90,7 @@ extern "C" {
|
||||
level is set sufficiently high. */
|
||||
#if defined(DEBUG)
|
||||
#define JAS_DBGLOG(n, x) \
|
||||
((jas_getdbglevel() >= (n)) ? (jas_eprintf x) : 0)
|
||||
((jas_getdbglevel() >= (n)) ? (jas_eprintf x) : 0)
|
||||
#else
|
||||
#define JAS_DBGLOG(n, x)
|
||||
#endif
|
||||
|
||||
+58
-58
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -91,15 +91,15 @@ extern "C" {
|
||||
|
||||
/* The representation of the value zero. */
|
||||
#define JAS_FIX_ZERO(fix_t, fracbits) \
|
||||
JAS_CAST(fix_t, 0)
|
||||
JAS_CAST(fix_t, 0)
|
||||
|
||||
/* The representation of the value one. */
|
||||
#define JAS_FIX_ONE(fix_t, fracbits) \
|
||||
(JAS_CAST(fix_t, 1) << (fracbits))
|
||||
(JAS_CAST(fix_t, 1) << (fracbits))
|
||||
|
||||
/* The representation of the value one half. */
|
||||
#define JAS_FIX_HALF(fix_t, fracbits) \
|
||||
(JAS_CAST(fix_t, 1) << ((fracbits) - 1))
|
||||
(JAS_CAST(fix_t, 1) << ((fracbits) - 1))
|
||||
|
||||
/******************************************************************************\
|
||||
* Conversion operations.
|
||||
@@ -107,19 +107,19 @@ extern "C" {
|
||||
|
||||
/* Convert an int to a fixed-point number. */
|
||||
#define JAS_INTTOFIX(fix_t, fracbits, x) \
|
||||
JAS_CAST(fix_t, (x) << (fracbits))
|
||||
JAS_CAST(fix_t, (x) << (fracbits))
|
||||
|
||||
/* Convert a fixed-point number to an int. */
|
||||
#define JAS_FIXTOINT(fix_t, fracbits, x) \
|
||||
JAS_CAST(int, (x) >> (fracbits))
|
||||
JAS_CAST(int, (x) >> (fracbits))
|
||||
|
||||
/* Convert a fixed-point number to a double. */
|
||||
#define JAS_FIXTODBL(fix_t, fracbits, x) \
|
||||
(JAS_CAST(double, x) / (JAS_CAST(fix_t, 1) << (fracbits)))
|
||||
(JAS_CAST(double, x) / (JAS_CAST(fix_t, 1) << (fracbits)))
|
||||
|
||||
/* Convert a double to a fixed-point number. */
|
||||
#define JAS_DBLTOFIX(fix_t, fracbits, x) \
|
||||
JAS_CAST(fix_t, ((x) * JAS_CAST(double, JAS_CAST(fix_t, 1) << (fracbits))))
|
||||
JAS_CAST(fix_t, ((x) * JAS_CAST(double, JAS_CAST(fix_t, 1) << (fracbits))))
|
||||
|
||||
/******************************************************************************\
|
||||
* Basic arithmetic operations.
|
||||
@@ -143,11 +143,11 @@ extern "C" {
|
||||
|
||||
/* Calculate the sum of two fixed-point numbers with overflow checking. */
|
||||
#define JAS_FIX_ADD_OFLOW(fix_t, fracbits, x, y) \
|
||||
((x) >= 0) ? \
|
||||
(((y) >= 0) ? ((x) + (y) >= 0 || JAS_FIX_OFLOW(), (x) + (y)) : \
|
||||
((x) + (y))) : \
|
||||
(((y) >= 0) ? ((x) + (y)) : ((x) + (y) < 0 || JAS_FIX_OFLOW(), \
|
||||
(x) + (y)))
|
||||
((x) >= 0) ? \
|
||||
(((y) >= 0) ? ((x) + (y) >= 0 || JAS_FIX_OFLOW(), (x) + (y)) : \
|
||||
((x) + (y))) : \
|
||||
(((y) >= 0) ? ((x) + (y)) : ((x) + (y) < 0 || JAS_FIX_OFLOW(), \
|
||||
(x) + (y)))
|
||||
|
||||
/* Calculate the product of two fixed-point numbers. */
|
||||
#if !defined(DEBUG_OVERFLOW)
|
||||
@@ -159,17 +159,17 @@ extern "C" {
|
||||
/* Calculate the product of two fixed-point numbers without overflow
|
||||
checking. */
|
||||
#define JAS_FIX_MUL_FAST(fix_t, fracbits, bigfix_t, x, y) \
|
||||
JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y)) >> \
|
||||
(fracbits))
|
||||
JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y)) >> \
|
||||
(fracbits))
|
||||
|
||||
/* Calculate the product of two fixed-point numbers with overflow
|
||||
checking. */
|
||||
#define JAS_FIX_MUL_OFLOW(fix_t, fracbits, bigfix_t, x, y) \
|
||||
((JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> (fracbits)) == \
|
||||
JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \
|
||||
(fracbits))) ? \
|
||||
JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \
|
||||
(fracbits))) : JAS_FIX_OFLOW())
|
||||
((JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> (fracbits)) == \
|
||||
JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \
|
||||
(fracbits))) ? \
|
||||
JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \
|
||||
(fracbits))) : JAS_FIX_OFLOW())
|
||||
|
||||
/* Calculate the product of a fixed-point number and an int. */
|
||||
#if !defined(DEBUG_OVERFLOW)
|
||||
@@ -181,12 +181,12 @@ extern "C" {
|
||||
/* Calculate the product of a fixed-point number and an int without overflow
|
||||
checking. */
|
||||
#define JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y) \
|
||||
JAS_CAST(fix_t, ((x) * (y)))
|
||||
JAS_CAST(fix_t, ((x) * (y)))
|
||||
|
||||
/* Calculate the product of a fixed-point number and an int with overflow
|
||||
checking. */
|
||||
#define JAS_FIX_MULBYINT_OFLOW(fix_t, fracbits, x, y) \
|
||||
JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y)
|
||||
JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y)
|
||||
|
||||
/* Calculate the quotient of two fixed-point numbers. */
|
||||
#if !defined(DEBUG_OVERFLOW)
|
||||
@@ -198,12 +198,12 @@ extern "C" {
|
||||
/* Calculate the quotient of two fixed-point numbers without underflow
|
||||
checking. */
|
||||
#define JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y) \
|
||||
JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) << (fracbits)) / (y))
|
||||
JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) << (fracbits)) / (y))
|
||||
|
||||
/* Calculate the quotient of two fixed-point numbers with underflow
|
||||
checking. */
|
||||
#define JAS_FIX_DIV_UFLOW(fix_t, fracbits, bigfix_t, x, y) \
|
||||
JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y)
|
||||
JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y)
|
||||
|
||||
/* Negate a fixed-point number. */
|
||||
#if !defined(DEBUG_OVERFLOW)
|
||||
@@ -214,13 +214,13 @@ extern "C" {
|
||||
|
||||
/* Negate a fixed-point number without overflow checking. */
|
||||
#define JAS_FIX_NEG_FAST(fix_t, fracbits, x) \
|
||||
(-(x))
|
||||
(-(x))
|
||||
|
||||
/* Negate a fixed-point number with overflow checking. */
|
||||
/* Yes, overflow is actually possible for two's complement representations,
|
||||
although highly unlikely to occur. */
|
||||
#define JAS_FIX_NEG_OFLOW(fix_t, fracbits, x) \
|
||||
(((x) < 0) ? (-(x) > 0 || JAS_FIX_OFLOW(), -(x)) : (-(x)))
|
||||
(((x) < 0) ? (-(x) > 0 || JAS_FIX_OFLOW(), -(x)) : (-(x)))
|
||||
|
||||
/* Perform an arithmetic shift left of a fixed-point number. */
|
||||
#if !defined(DEBUG_OVERFLOW)
|
||||
@@ -232,12 +232,12 @@ extern "C" {
|
||||
/* Perform an arithmetic shift left of a fixed-point number without overflow
|
||||
checking. */
|
||||
#define JAS_FIX_ASL_FAST(fix_t, fracbits, x, n) \
|
||||
((x) << (n))
|
||||
((x) << (n))
|
||||
|
||||
/* Perform an arithmetic shift left of a fixed-point number with overflow
|
||||
checking. */
|
||||
#define JAS_FIX_ASL_OFLOW(fix_t, fracbits, x, n) \
|
||||
((((x) << (n)) >> (n)) == (x) || JAS_FIX_OFLOW(), (x) << (n))
|
||||
((((x) << (n)) >> (n)) == (x) || JAS_FIX_OFLOW(), (x) << (n))
|
||||
|
||||
/* Perform an arithmetic shift right of a fixed-point number. */
|
||||
#if !defined(DEBUG_OVERFLOW)
|
||||
@@ -249,12 +249,12 @@ extern "C" {
|
||||
/* Perform an arithmetic shift right of a fixed-point number without underflow
|
||||
checking. */
|
||||
#define JAS_FIX_ASR_FAST(fix_t, fracbits, x, n) \
|
||||
((x) >> (n))
|
||||
((x) >> (n))
|
||||
|
||||
/* Perform an arithmetic shift right of a fixed-point number with underflow
|
||||
checking. */
|
||||
#define JAS_FIX_ASR_UFLOW(fix_t, fracbits, x, n) \
|
||||
JAS_FIX_ASR_FAST(fix_t, fracbits, x, n)
|
||||
JAS_FIX_ASR_FAST(fix_t, fracbits, x, n)
|
||||
|
||||
/******************************************************************************\
|
||||
* Other basic arithmetic operations.
|
||||
@@ -262,19 +262,19 @@ extern "C" {
|
||||
|
||||
/* Calculate the difference between two fixed-point numbers. */
|
||||
#define JAS_FIX_SUB(fix_t, fracbits, x, y) \
|
||||
JAS_FIX_ADD(fix_t, fracbits, x, JAS_FIX_NEG(fix_t, fracbits, y))
|
||||
JAS_FIX_ADD(fix_t, fracbits, x, JAS_FIX_NEG(fix_t, fracbits, y))
|
||||
|
||||
/* Add one fixed-point number to another. */
|
||||
#define JAS_FIX_PLUSEQ(fix_t, fracbits, x, y) \
|
||||
((x) = JAS_FIX_ADD(fix_t, fracbits, x, y))
|
||||
((x) = JAS_FIX_ADD(fix_t, fracbits, x, y))
|
||||
|
||||
/* Subtract one fixed-point number from another. */
|
||||
#define JAS_FIX_MINUSEQ(fix_t, fracbits, x, y) \
|
||||
((x) = JAS_FIX_SUB(fix_t, fracbits, x, y))
|
||||
((x) = JAS_FIX_SUB(fix_t, fracbits, x, y))
|
||||
|
||||
/* Multiply one fixed-point number by another. */
|
||||
#define JAS_FIX_MULEQ(fix_t, fracbits, bigfix_t, x, y) \
|
||||
((x) = JAS_FIX_MUL(fix_t, fracbits, bigfix_t, x, y))
|
||||
((x) = JAS_FIX_MUL(fix_t, fracbits, bigfix_t, x, y))
|
||||
|
||||
/******************************************************************************\
|
||||
* Miscellaneous operations.
|
||||
@@ -282,15 +282,15 @@ extern "C" {
|
||||
|
||||
/* Calculate the absolute value of a fixed-point number. */
|
||||
#define JAS_FIX_ABS(fix_t, fracbits, x) \
|
||||
(((x) >= 0) ? (x) : (JAS_FIX_NEG(fix_t, fracbits, x)))
|
||||
(((x) >= 0) ? (x) : (JAS_FIX_NEG(fix_t, fracbits, x)))
|
||||
|
||||
/* Is a fixed-point number an integer? */
|
||||
#define JAS_FIX_ISINT(fix_t, fracbits, x) \
|
||||
(JAS_FIX_FLOOR(fix_t, fracbits, x) == (x))
|
||||
(JAS_FIX_FLOOR(fix_t, fracbits, x) == (x))
|
||||
|
||||
/* Get the sign of a fixed-point number. */
|
||||
#define JAS_FIX_SGN(fix_t, fracbits, x) \
|
||||
((x) >= 0 ? 1 : (-1))
|
||||
((x) >= 0 ? 1 : (-1))
|
||||
|
||||
/******************************************************************************\
|
||||
* Relational operations.
|
||||
@@ -298,23 +298,23 @@ extern "C" {
|
||||
|
||||
/* Compare two fixed-point numbers. */
|
||||
#define JAS_FIX_CMP(fix_t, fracbits, x, y) \
|
||||
((x) > (y) ? 1 : (((x) == (y)) ? 0 : (-1)))
|
||||
((x) > (y) ? 1 : (((x) == (y)) ? 0 : (-1)))
|
||||
|
||||
/* Less than. */
|
||||
#define JAS_FIX_LT(fix_t, fracbits, x, y) \
|
||||
((x) < (y))
|
||||
((x) < (y))
|
||||
|
||||
/* Less than or equal. */
|
||||
#define JAS_FIX_LTE(fix_t, fracbits, x, y) \
|
||||
((x) <= (y))
|
||||
((x) <= (y))
|
||||
|
||||
/* Greater than. */
|
||||
#define JAS_FIX_GT(fix_t, fracbits, x, y) \
|
||||
((x) > (y))
|
||||
((x) > (y))
|
||||
|
||||
/* Greater than or equal. */
|
||||
#define JAS_FIX_GTE(fix_t, fracbits, x, y) \
|
||||
((x) >= (y))
|
||||
((x) >= (y))
|
||||
|
||||
/******************************************************************************\
|
||||
* Rounding functions.
|
||||
@@ -322,21 +322,21 @@ extern "C" {
|
||||
|
||||
/* Round a fixed-point number to the nearest integer. */
|
||||
#define JAS_FIX_ROUND(fix_t, fracbits, x) \
|
||||
(((x) < 0) ? JAS_FIX_FLOOR(fix_t, fracbits, JAS_FIX_ADD(fix_t, fracbits, \
|
||||
(x), JAS_FIX_HALF(fix_t, fracbits))) : \
|
||||
JAS_FIX_NEG(fix_t, fracbits, JAS_FIX_FLOOR(fix_t, fracbits, \
|
||||
JAS_FIX_ADD(fix_t, fracbits, (-(x)), JAS_FIX_HALF(fix_t, fracbits)))))
|
||||
(((x) < 0) ? JAS_FIX_FLOOR(fix_t, fracbits, JAS_FIX_ADD(fix_t, fracbits, \
|
||||
(x), JAS_FIX_HALF(fix_t, fracbits))) : \
|
||||
JAS_FIX_NEG(fix_t, fracbits, JAS_FIX_FLOOR(fix_t, fracbits, \
|
||||
JAS_FIX_ADD(fix_t, fracbits, (-(x)), JAS_FIX_HALF(fix_t, fracbits)))))
|
||||
|
||||
/* Round a fixed-point number to the nearest integer in the direction of
|
||||
negative infinity (i.e., the floor function). */
|
||||
#define JAS_FIX_FLOOR(fix_t, fracbits, x) \
|
||||
((x) & (~((JAS_CAST(fix_t, 1) << (fracbits)) - 1)))
|
||||
((x) & (~((JAS_CAST(fix_t, 1) << (fracbits)) - 1)))
|
||||
|
||||
/* Round a fixed-point number to the nearest integer in the direction
|
||||
of zero. */
|
||||
#define JAS_FIX_TRUNC(fix_t, fracbits, x) \
|
||||
(((x) >= 0) ? JAS_FIX_FLOOR(fix_t, fracbits, x) : \
|
||||
JAS_FIX_CEIL(fix_t, fracbits, x))
|
||||
(((x) >= 0) ? JAS_FIX_FLOOR(fix_t, fracbits, x) : \
|
||||
JAS_FIX_CEIL(fix_t, fracbits, x))
|
||||
|
||||
/******************************************************************************\
|
||||
* The below macros are for internal library use only. Do not invoke them
|
||||
@@ -345,11 +345,11 @@ extern "C" {
|
||||
|
||||
/* Handle overflow. */
|
||||
#define JAS_FIX_OFLOW() \
|
||||
jas_eprintf("overflow error: file %s, line %d\n", __FILE__, __LINE__)
|
||||
jas_eprintf("overflow error: file %s, line %d\n", __FILE__, __LINE__)
|
||||
|
||||
/* Handle underflow. */
|
||||
#define JAS_FIX_UFLOW() \
|
||||
jas_eprintf("underflow error: file %s, line %d\n", __FILE__, __LINE__)
|
||||
jas_eprintf("underflow error: file %s, line %d\n", __FILE__, __LINE__)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+14
-14
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -93,14 +93,14 @@ extern "C" {
|
||||
/* Command line option type. */
|
||||
typedef struct {
|
||||
|
||||
int id;
|
||||
/* The unique identifier for this option. */
|
||||
int id;
|
||||
/* The unique identifier for this option. */
|
||||
|
||||
char *name;
|
||||
/* The name of this option. */
|
||||
char *name;
|
||||
/* The name of this option. */
|
||||
|
||||
int flags;
|
||||
/* option flags. */
|
||||
int flags;
|
||||
/* option flags. */
|
||||
|
||||
} jas_opt_t;
|
||||
|
||||
|
||||
+100
-100
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -225,152 +225,152 @@ typedef jas_iccsig_t jas_iccattrname_t;
|
||||
|
||||
/* Date/time type. */
|
||||
typedef struct {
|
||||
jas_iccuint16_t year;
|
||||
jas_iccuint16_t month;
|
||||
jas_iccuint16_t day;
|
||||
jas_iccuint16_t hour;
|
||||
jas_iccuint16_t min;
|
||||
jas_iccuint16_t sec;
|
||||
jas_iccuint16_t year;
|
||||
jas_iccuint16_t month;
|
||||
jas_iccuint16_t day;
|
||||
jas_iccuint16_t hour;
|
||||
jas_iccuint16_t min;
|
||||
jas_iccuint16_t sec;
|
||||
} jas_icctime_t;
|
||||
|
||||
/* XYZ type. */
|
||||
typedef struct {
|
||||
jas_iccs15fixed16_t x;
|
||||
jas_iccs15fixed16_t y;
|
||||
jas_iccs15fixed16_t z;
|
||||
jas_iccs15fixed16_t x;
|
||||
jas_iccs15fixed16_t y;
|
||||
jas_iccs15fixed16_t z;
|
||||
} jas_iccxyz_t;
|
||||
|
||||
/* Curve type. */
|
||||
typedef struct {
|
||||
jas_iccuint32_t numents;
|
||||
jas_iccuint16_t *ents;
|
||||
jas_iccuint32_t numents;
|
||||
jas_iccuint16_t *ents;
|
||||
} jas_icccurv_t;
|
||||
|
||||
/* Text description type. */
|
||||
typedef struct {
|
||||
jas_iccuint32_t asclen;
|
||||
char *ascdata; /* ASCII invariant description */
|
||||
jas_iccuint32_t uclangcode; /* Unicode language code */
|
||||
jas_iccuint32_t uclen; /* Unicode localizable description count */
|
||||
uchar *ucdata; /* Unicode localizable description */
|
||||
jas_iccuint16_t sccode; /* ScriptCode code */
|
||||
jas_iccuint8_t maclen; /* Localizable Macintosh description count */
|
||||
uchar macdata[69]; /* Localizable Macintosh description */
|
||||
jas_iccuint32_t asclen;
|
||||
char *ascdata; /* ASCII invariant description */
|
||||
jas_iccuint32_t uclangcode; /* Unicode language code */
|
||||
jas_iccuint32_t uclen; /* Unicode localizable description count */
|
||||
uchar *ucdata; /* Unicode localizable description */
|
||||
jas_iccuint16_t sccode; /* ScriptCode code */
|
||||
jas_iccuint8_t maclen; /* Localizable Macintosh description count */
|
||||
uchar macdata[69]; /* Localizable Macintosh description */
|
||||
} jas_icctxtdesc_t;
|
||||
|
||||
/* Text type. */
|
||||
typedef struct {
|
||||
char *string; /* ASCII character string */
|
||||
char *string; /* ASCII character string */
|
||||
} jas_icctxt_t;
|
||||
|
||||
typedef struct {
|
||||
jas_iccuint8_t numinchans;
|
||||
jas_iccuint8_t numoutchans;
|
||||
jas_iccsint32_t e[3][3];
|
||||
jas_iccuint8_t clutlen;
|
||||
jas_iccuint8_t *clut;
|
||||
jas_iccuint16_t numintabents;
|
||||
jas_iccuint8_t **intabs;
|
||||
jas_iccuint8_t *intabsbuf;
|
||||
jas_iccuint16_t numouttabents;
|
||||
jas_iccuint8_t **outtabs;
|
||||
jas_iccuint8_t *outtabsbuf;
|
||||
jas_iccuint8_t numinchans;
|
||||
jas_iccuint8_t numoutchans;
|
||||
jas_iccsint32_t e[3][3];
|
||||
jas_iccuint8_t clutlen;
|
||||
jas_iccuint8_t *clut;
|
||||
jas_iccuint16_t numintabents;
|
||||
jas_iccuint8_t **intabs;
|
||||
jas_iccuint8_t *intabsbuf;
|
||||
jas_iccuint16_t numouttabents;
|
||||
jas_iccuint8_t **outtabs;
|
||||
jas_iccuint8_t *outtabsbuf;
|
||||
} jas_icclut8_t;
|
||||
|
||||
typedef struct {
|
||||
jas_iccuint8_t numinchans;
|
||||
jas_iccuint8_t numoutchans;
|
||||
jas_iccsint32_t e[3][3];
|
||||
jas_iccuint8_t clutlen;
|
||||
jas_iccuint16_t *clut;
|
||||
jas_iccuint16_t numintabents;
|
||||
jas_iccuint16_t **intabs;
|
||||
jas_iccuint16_t *intabsbuf;
|
||||
jas_iccuint16_t numouttabents;
|
||||
jas_iccuint16_t **outtabs;
|
||||
jas_iccuint16_t *outtabsbuf;
|
||||
jas_iccuint8_t numinchans;
|
||||
jas_iccuint8_t numoutchans;
|
||||
jas_iccsint32_t e[3][3];
|
||||
jas_iccuint8_t clutlen;
|
||||
jas_iccuint16_t *clut;
|
||||
jas_iccuint16_t numintabents;
|
||||
jas_iccuint16_t **intabs;
|
||||
jas_iccuint16_t *intabsbuf;
|
||||
jas_iccuint16_t numouttabents;
|
||||
jas_iccuint16_t **outtabs;
|
||||
jas_iccuint16_t *outtabsbuf;
|
||||
} jas_icclut16_t;
|
||||
|
||||
struct jas_iccattrval_s;
|
||||
|
||||
typedef struct {
|
||||
void (*destroy)(struct jas_iccattrval_s *);
|
||||
int (*copy)(struct jas_iccattrval_s *, struct jas_iccattrval_s *);
|
||||
int (*input)(struct jas_iccattrval_s *, jas_stream_t *, int);
|
||||
int (*output)(struct jas_iccattrval_s *, jas_stream_t *);
|
||||
int (*getsize)(struct jas_iccattrval_s *);
|
||||
void (*dump)(struct jas_iccattrval_s *, FILE *);
|
||||
void (*destroy)(struct jas_iccattrval_s *);
|
||||
int (*copy)(struct jas_iccattrval_s *, struct jas_iccattrval_s *);
|
||||
int (*input)(struct jas_iccattrval_s *, jas_stream_t *, int);
|
||||
int (*output)(struct jas_iccattrval_s *, jas_stream_t *);
|
||||
int (*getsize)(struct jas_iccattrval_s *);
|
||||
void (*dump)(struct jas_iccattrval_s *, FILE *);
|
||||
} jas_iccattrvalops_t;
|
||||
|
||||
/* Attribute value type (type and value information). */
|
||||
typedef struct jas_iccattrval_s {
|
||||
int refcnt; /* reference count */
|
||||
jas_iccsig_t type; /* type */
|
||||
jas_iccattrvalops_t *ops; /* type-dependent operations */
|
||||
union {
|
||||
jas_iccxyz_t xyz;
|
||||
jas_icccurv_t curv;
|
||||
jas_icctxtdesc_t txtdesc;
|
||||
jas_icctxt_t txt;
|
||||
jas_icclut8_t lut8;
|
||||
jas_icclut16_t lut16;
|
||||
} data; /* value */
|
||||
int refcnt; /* reference count */
|
||||
jas_iccsig_t type; /* type */
|
||||
jas_iccattrvalops_t *ops; /* type-dependent operations */
|
||||
union {
|
||||
jas_iccxyz_t xyz;
|
||||
jas_icccurv_t curv;
|
||||
jas_icctxtdesc_t txtdesc;
|
||||
jas_icctxt_t txt;
|
||||
jas_icclut8_t lut8;
|
||||
jas_icclut16_t lut16;
|
||||
} data; /* value */
|
||||
} jas_iccattrval_t;
|
||||
|
||||
/* Header type. */
|
||||
typedef struct {
|
||||
jas_iccuint32_t size; /* profile size */
|
||||
jas_iccsig_t cmmtype; /* CMM type signature */
|
||||
jas_iccuint32_t version; /* profile version */
|
||||
jas_iccsig_t clas; /* profile/device class signature */
|
||||
jas_iccsig_t colorspc; /* color space of data */
|
||||
jas_iccsig_t refcolorspc; /* profile connection space */
|
||||
jas_icctime_t ctime; /* creation time */
|
||||
jas_iccsig_t magic; /* profile file signature */
|
||||
jas_iccsig_t platform; /* primary platform */
|
||||
jas_iccuint32_t flags; /* profile flags */
|
||||
jas_iccsig_t maker; /* device manufacturer signature */
|
||||
jas_iccsig_t model; /* device model signature */
|
||||
jas_iccuint64_t attr; /* device setup attributes */
|
||||
jas_iccsig_t intent; /* rendering intent */
|
||||
jas_iccxyz_t illum; /* illuminant */
|
||||
jas_iccsig_t creator; /* profile creator signature */
|
||||
jas_iccuint32_t size; /* profile size */
|
||||
jas_iccsig_t cmmtype; /* CMM type signature */
|
||||
jas_iccuint32_t version; /* profile version */
|
||||
jas_iccsig_t clas; /* profile/device class signature */
|
||||
jas_iccsig_t colorspc; /* color space of data */
|
||||
jas_iccsig_t refcolorspc; /* profile connection space */
|
||||
jas_icctime_t ctime; /* creation time */
|
||||
jas_iccsig_t magic; /* profile file signature */
|
||||
jas_iccsig_t platform; /* primary platform */
|
||||
jas_iccuint32_t flags; /* profile flags */
|
||||
jas_iccsig_t maker; /* device manufacturer signature */
|
||||
jas_iccsig_t model; /* device model signature */
|
||||
jas_iccuint64_t attr; /* device setup attributes */
|
||||
jas_iccsig_t intent; /* rendering intent */
|
||||
jas_iccxyz_t illum; /* illuminant */
|
||||
jas_iccsig_t creator; /* profile creator signature */
|
||||
} jas_icchdr_t;
|
||||
|
||||
typedef struct {
|
||||
jas_iccsig_t name;
|
||||
jas_iccattrval_t *val;
|
||||
jas_iccsig_t name;
|
||||
jas_iccattrval_t *val;
|
||||
} jas_iccattr_t;
|
||||
|
||||
typedef struct {
|
||||
int numattrs;
|
||||
int maxattrs;
|
||||
jas_iccattr_t *attrs;
|
||||
int numattrs;
|
||||
int maxattrs;
|
||||
jas_iccattr_t *attrs;
|
||||
} jas_iccattrtab_t;
|
||||
|
||||
typedef struct jas_icctagtabent_s {
|
||||
jas_iccuint32_t tag;
|
||||
jas_iccuint32_t off;
|
||||
jas_iccuint32_t len;
|
||||
void *data;
|
||||
struct jas_icctagtabent_s *first;
|
||||
jas_iccuint32_t tag;
|
||||
jas_iccuint32_t off;
|
||||
jas_iccuint32_t len;
|
||||
void *data;
|
||||
struct jas_icctagtabent_s *first;
|
||||
} jas_icctagtabent_t;
|
||||
|
||||
typedef struct {
|
||||
jas_iccuint32_t numents;
|
||||
jas_icctagtabent_t *ents;
|
||||
jas_iccuint32_t numents;
|
||||
jas_icctagtabent_t *ents;
|
||||
} jas_icctagtab_t;
|
||||
|
||||
/* ICC profile type. */
|
||||
typedef struct {
|
||||
jas_icchdr_t hdr;
|
||||
jas_icctagtab_t tagtab;
|
||||
jas_iccattrtab_t *attrtab;
|
||||
jas_icchdr_t hdr;
|
||||
jas_icctagtab_t tagtab;
|
||||
jas_iccattrtab_t *attrtab;
|
||||
} jas_iccprof_t;
|
||||
|
||||
typedef struct {
|
||||
jas_iccuint32_t type;
|
||||
jas_iccattrvalops_t ops;
|
||||
jas_iccuint32_t type;
|
||||
jas_iccattrvalops_t ops;
|
||||
} jas_iccattrvalinfo_t;
|
||||
|
||||
jas_iccprof_t *jas_iccprof_load(jas_stream_t *in);
|
||||
|
||||
+110
-110
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -137,44 +137,44 @@ typedef int_fast16_t jas_image_smpltype_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
jas_image_coord_t tlx_;
|
||||
/* The x-coordinate of the top-left corner of the component. */
|
||||
jas_image_coord_t tlx_;
|
||||
/* The x-coordinate of the top-left corner of the component. */
|
||||
|
||||
jas_image_coord_t tly_;
|
||||
/* The y-coordinate of the top-left corner of the component. */
|
||||
jas_image_coord_t tly_;
|
||||
/* The y-coordinate of the top-left corner of the component. */
|
||||
|
||||
jas_image_coord_t hstep_;
|
||||
/* The horizontal sampling period in units of the reference grid. */
|
||||
jas_image_coord_t hstep_;
|
||||
/* The horizontal sampling period in units of the reference grid. */
|
||||
|
||||
jas_image_coord_t vstep_;
|
||||
/* The vertical sampling period in units of the reference grid. */
|
||||
jas_image_coord_t vstep_;
|
||||
/* The vertical sampling period in units of the reference grid. */
|
||||
|
||||
jas_image_coord_t width_;
|
||||
/* The component width in samples. */
|
||||
jas_image_coord_t width_;
|
||||
/* The component width in samples. */
|
||||
|
||||
jas_image_coord_t height_;
|
||||
/* The component height in samples. */
|
||||
jas_image_coord_t height_;
|
||||
/* The component height in samples. */
|
||||
|
||||
#ifdef FIX_ME
|
||||
int smpltype_;
|
||||
int smpltype_;
|
||||
#else
|
||||
int prec_;
|
||||
/* The precision of the sample data (i.e., the number of bits per
|
||||
sample). If the samples are signed values, this quantity
|
||||
includes the sign bit. */
|
||||
int prec_;
|
||||
/* The precision of the sample data (i.e., the number of bits per
|
||||
sample). If the samples are signed values, this quantity
|
||||
includes the sign bit. */
|
||||
|
||||
int sgnd_;
|
||||
/* The signedness of the sample data. */
|
||||
int sgnd_;
|
||||
/* The signedness of the sample data. */
|
||||
#endif
|
||||
|
||||
jas_stream_t *stream_;
|
||||
/* The stream containing the component data. */
|
||||
jas_stream_t *stream_;
|
||||
/* The stream containing the component data. */
|
||||
|
||||
int cps_;
|
||||
/* The number of characters per sample in the stream. */
|
||||
int cps_;
|
||||
/* The number of characters per sample in the stream. */
|
||||
|
||||
jas_image_cmpttype_t type_;
|
||||
/* The type of component (e.g., opacity, red, green, blue, luma). */
|
||||
jas_image_cmpttype_t type_;
|
||||
/* The type of component (e.g., opacity, red, green, blue, luma). */
|
||||
|
||||
} jas_image_cmpt_t;
|
||||
|
||||
@@ -182,35 +182,35 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
jas_image_coord_t tlx_;
|
||||
/* The x-coordinate of the top-left corner of the image bounding box. */
|
||||
jas_image_coord_t tlx_;
|
||||
/* The x-coordinate of the top-left corner of the image bounding box. */
|
||||
|
||||
jas_image_coord_t tly_;
|
||||
/* The y-coordinate of the top-left corner of the image bounding box. */
|
||||
jas_image_coord_t tly_;
|
||||
/* The y-coordinate of the top-left corner of the image bounding box. */
|
||||
|
||||
jas_image_coord_t brx_;
|
||||
/* The x-coordinate of the bottom-right corner of the image bounding
|
||||
box (plus one). */
|
||||
jas_image_coord_t brx_;
|
||||
/* The x-coordinate of the bottom-right corner of the image bounding
|
||||
box (plus one). */
|
||||
|
||||
jas_image_coord_t bry_;
|
||||
/* The y-coordinate of the bottom-right corner of the image bounding
|
||||
box (plus one). */
|
||||
jas_image_coord_t bry_;
|
||||
/* The y-coordinate of the bottom-right corner of the image bounding
|
||||
box (plus one). */
|
||||
|
||||
int numcmpts_;
|
||||
/* The number of components. */
|
||||
int numcmpts_;
|
||||
/* The number of components. */
|
||||
|
||||
int maxcmpts_;
|
||||
/* The maximum number of components that this image can have (i.e., the
|
||||
allocated size of the components array). */
|
||||
int maxcmpts_;
|
||||
/* The maximum number of components that this image can have (i.e., the
|
||||
allocated size of the components array). */
|
||||
|
||||
jas_image_cmpt_t **cmpts_;
|
||||
/* Per-component information. */
|
||||
jas_image_cmpt_t **cmpts_;
|
||||
/* Per-component information. */
|
||||
|
||||
jas_clrspc_t clrspc_;
|
||||
jas_clrspc_t clrspc_;
|
||||
|
||||
jas_cmprof_t *cmprof_;
|
||||
jas_cmprof_t *cmprof_;
|
||||
|
||||
bool inmem_;
|
||||
bool inmem_;
|
||||
|
||||
} jas_image_t;
|
||||
|
||||
@@ -220,32 +220,32 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
jas_image_coord_t tlx;
|
||||
/* The x-coordinate of the top-left corner of the component. */
|
||||
jas_image_coord_t tlx;
|
||||
/* The x-coordinate of the top-left corner of the component. */
|
||||
|
||||
jas_image_coord_t tly;
|
||||
/* The y-coordinate of the top-left corner of the component. */
|
||||
jas_image_coord_t tly;
|
||||
/* The y-coordinate of the top-left corner of the component. */
|
||||
|
||||
jas_image_coord_t hstep;
|
||||
/* The horizontal sampling period in units of the reference grid. */
|
||||
jas_image_coord_t hstep;
|
||||
/* The horizontal sampling period in units of the reference grid. */
|
||||
|
||||
jas_image_coord_t vstep;
|
||||
/* The vertical sampling period in units of the reference grid. */
|
||||
jas_image_coord_t vstep;
|
||||
/* The vertical sampling period in units of the reference grid. */
|
||||
|
||||
jas_image_coord_t width;
|
||||
/* The width of the component in samples. */
|
||||
jas_image_coord_t width;
|
||||
/* The width of the component in samples. */
|
||||
|
||||
jas_image_coord_t height;
|
||||
/* The height of the component in samples. */
|
||||
jas_image_coord_t height;
|
||||
/* The height of the component in samples. */
|
||||
|
||||
#ifdef FIX_ME
|
||||
int smpltype;
|
||||
int smpltype;
|
||||
#else
|
||||
int prec;
|
||||
/* The precision of the component sample data. */
|
||||
int prec;
|
||||
/* The precision of the component sample data. */
|
||||
|
||||
int sgnd;
|
||||
/* The signedness of the component sample data. */
|
||||
int sgnd;
|
||||
/* The signedness of the component sample data. */
|
||||
#endif
|
||||
|
||||
} jas_image_cmptparm_t;
|
||||
@@ -261,14 +261,14 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
jas_image_t *(*decode)(jas_stream_t *in, char *opts);
|
||||
/* Decode image data from a stream. */
|
||||
jas_image_t *(*decode)(jas_stream_t *in, char *opts);
|
||||
/* Decode image data from a stream. */
|
||||
|
||||
int (*encode)(jas_image_t *image, jas_stream_t *out, char *opts);
|
||||
/* Encode image data to a stream. */
|
||||
int (*encode)(jas_image_t *image, jas_stream_t *out, char *opts);
|
||||
/* Encode image data to a stream. */
|
||||
|
||||
int (*validate)(jas_stream_t *in);
|
||||
/* Determine if stream data is in a particular format. */
|
||||
int (*validate)(jas_stream_t *in);
|
||||
/* Determine if stream data is in a particular format. */
|
||||
|
||||
} jas_image_fmtops_t;
|
||||
|
||||
@@ -276,20 +276,20 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
int id;
|
||||
/* The ID for this format. */
|
||||
int id;
|
||||
/* The ID for this format. */
|
||||
|
||||
char *name;
|
||||
/* The name by which this format is identified. */
|
||||
char *name;
|
||||
/* The name by which this format is identified. */
|
||||
|
||||
char *ext;
|
||||
/* The file name extension associated with this format. */
|
||||
char *ext;
|
||||
/* The file name extension associated with this format. */
|
||||
|
||||
char *desc;
|
||||
/* A brief description of the format. */
|
||||
char *desc;
|
||||
/* A brief description of the format. */
|
||||
|
||||
jas_image_fmtops_t ops;
|
||||
/* The operations for this format. */
|
||||
jas_image_fmtops_t ops;
|
||||
/* The operations for this format. */
|
||||
|
||||
} jas_image_fmtinfo_t;
|
||||
|
||||
@@ -312,92 +312,92 @@ void jas_image_destroy(jas_image_t *image);
|
||||
|
||||
/* Get the width of the image in units of the image reference grid. */
|
||||
#define jas_image_width(image) \
|
||||
((image)->brx_ - (image)->tlx_)
|
||||
((image)->brx_ - (image)->tlx_)
|
||||
|
||||
/* Get the height of the image in units of the image reference grid. */
|
||||
#define jas_image_height(image) \
|
||||
((image)->bry_ - (image)->tly_)
|
||||
((image)->bry_ - (image)->tly_)
|
||||
|
||||
/* Get the x-coordinate of the top-left corner of the image bounding box
|
||||
on the reference grid. */
|
||||
#define jas_image_tlx(image) \
|
||||
((image)->tlx_)
|
||||
((image)->tlx_)
|
||||
|
||||
/* Get the y-coordinate of the top-left corner of the image bounding box
|
||||
on the reference grid. */
|
||||
#define jas_image_tly(image) \
|
||||
((image)->tly_)
|
||||
((image)->tly_)
|
||||
|
||||
/* Get the x-coordinate of the bottom-right corner of the image bounding box
|
||||
on the reference grid (plus one). */
|
||||
#define jas_image_brx(image) \
|
||||
((image)->brx_)
|
||||
((image)->brx_)
|
||||
|
||||
/* Get the y-coordinate of the bottom-right corner of the image bounding box
|
||||
on the reference grid (plus one). */
|
||||
#define jas_image_bry(image) \
|
||||
((image)->bry_)
|
||||
((image)->bry_)
|
||||
|
||||
/* Get the number of image components. */
|
||||
#define jas_image_numcmpts(image) \
|
||||
((image)->numcmpts_)
|
||||
((image)->numcmpts_)
|
||||
|
||||
/* Get the color model used by the image. */
|
||||
#define jas_image_clrspc(image) \
|
||||
((image)->clrspc_)
|
||||
((image)->clrspc_)
|
||||
|
||||
/* Set the color model for an image. */
|
||||
#define jas_image_setclrspc(image, clrspc) \
|
||||
((image)->clrspc_ = (clrspc))
|
||||
((image)->clrspc_ = (clrspc))
|
||||
|
||||
#define jas_image_cmpttype(image, cmptno) \
|
||||
((image)->cmpts_[(cmptno)]->type_)
|
||||
((image)->cmpts_[(cmptno)]->type_)
|
||||
#define jas_image_setcmpttype(image, cmptno, type) \
|
||||
((image)->cmpts_[(cmptno)]->type_ = (type))
|
||||
((image)->cmpts_[(cmptno)]->type_ = (type))
|
||||
|
||||
/* Get the width of a component. */
|
||||
#define jas_image_cmptwidth(image, cmptno) \
|
||||
((image)->cmpts_[cmptno]->width_)
|
||||
((image)->cmpts_[cmptno]->width_)
|
||||
|
||||
/* Get the height of a component. */
|
||||
#define jas_image_cmptheight(image, cmptno) \
|
||||
((image)->cmpts_[cmptno]->height_)
|
||||
((image)->cmpts_[cmptno]->height_)
|
||||
|
||||
/* Get the signedness of the sample data for a component. */
|
||||
#define jas_image_cmptsgnd(image, cmptno) \
|
||||
((image)->cmpts_[cmptno]->sgnd_)
|
||||
((image)->cmpts_[cmptno]->sgnd_)
|
||||
|
||||
/* Get the precision of the sample data for a component. */
|
||||
#define jas_image_cmptprec(image, cmptno) \
|
||||
((image)->cmpts_[cmptno]->prec_)
|
||||
((image)->cmpts_[cmptno]->prec_)
|
||||
|
||||
/* Get the horizontal subsampling factor for a component. */
|
||||
#define jas_image_cmpthstep(image, cmptno) \
|
||||
((image)->cmpts_[cmptno]->hstep_)
|
||||
((image)->cmpts_[cmptno]->hstep_)
|
||||
|
||||
/* Get the vertical subsampling factor for a component. */
|
||||
#define jas_image_cmptvstep(image, cmptno) \
|
||||
((image)->cmpts_[cmptno]->vstep_)
|
||||
((image)->cmpts_[cmptno]->vstep_)
|
||||
|
||||
/* Get the x-coordinate of the top-left corner of a component. */
|
||||
#define jas_image_cmpttlx(image, cmptno) \
|
||||
((image)->cmpts_[cmptno]->tlx_)
|
||||
((image)->cmpts_[cmptno]->tlx_)
|
||||
|
||||
/* Get the y-coordinate of the top-left corner of a component. */
|
||||
#define jas_image_cmpttly(image, cmptno) \
|
||||
((image)->cmpts_[cmptno]->tly_)
|
||||
((image)->cmpts_[cmptno]->tly_)
|
||||
|
||||
/* Get the x-coordinate of the bottom-right corner of a component
|
||||
(plus "one"). */
|
||||
#define jas_image_cmptbrx(image, cmptno) \
|
||||
((image)->cmpts_[cmptno]->tlx_ + (image)->cmpts_[cmptno]->width_ * \
|
||||
(image)->cmpts_[cmptno]->hstep_)
|
||||
((image)->cmpts_[cmptno]->tlx_ + (image)->cmpts_[cmptno]->width_ * \
|
||||
(image)->cmpts_[cmptno]->hstep_)
|
||||
|
||||
/* Get the y-coordinate of the bottom-right corner of a component
|
||||
(plus "one"). */
|
||||
#define jas_image_cmptbry(image, cmptno) \
|
||||
((image)->cmpts_[cmptno]->tly_ + (image)->cmpts_[cmptno]->height_ * \
|
||||
(image)->cmpts_[cmptno]->vstep_)
|
||||
((image)->cmpts_[cmptno]->tly_ + (image)->cmpts_[cmptno]->height_ * \
|
||||
(image)->cmpts_[cmptno]->vstep_)
|
||||
|
||||
/* Get the raw size of an image (i.e., the nominal size of the image without
|
||||
any compression. */
|
||||
@@ -439,7 +439,7 @@ int jas_image_copycmpt(jas_image_t *dstimage, int dstcmptno,
|
||||
#define JAS_IMAGE_CDT_SETPREC(dtype) ((dtype) & 0x7f)
|
||||
|
||||
#define jas_image_cmptdtype(image, cmptno) \
|
||||
(JAS_IMAGE_CDT_SETSGND((image)->cmpts_[cmptno]->sgnd_) | JAS_IMAGE_CDT_SETPREC((image)->cmpts_[cmptno]->prec_))
|
||||
(JAS_IMAGE_CDT_SETSGND((image)->cmpts_[cmptno]->sgnd_) | JAS_IMAGE_CDT_SETPREC((image)->cmpts_[cmptno]->prec_))
|
||||
|
||||
int jas_image_depalettize(jas_image_t *image, int cmptno, int numlutents,
|
||||
int_fast32_t *lutents, int dtype, int newcmptno);
|
||||
|
||||
+8
-8
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
|
||||
+17
-8
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -95,6 +95,9 @@ extern "C" {
|
||||
#define jas_free MEMFREE
|
||||
#define jas_realloc MEMREALLOC
|
||||
#define jas_calloc MEMCALLOC
|
||||
#define jas_alloc2(a, b) MEMALLOC((a)*(b))
|
||||
#define jas_alloc3(a, b, c) MEMALLOC((a)*(b)*(c))
|
||||
#define jas_realloc2(p, a, b) MEMREALLOC((p), (a)*(b))
|
||||
#endif
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -115,6 +118,12 @@ void *jas_realloc(void *ptr, size_t size);
|
||||
/* Allocate a block of memory and initialize the contents to zero. */
|
||||
void *jas_calloc(size_t nmemb, size_t size);
|
||||
|
||||
/* size-checked double allocation .*/
|
||||
void *jas_alloc2(size_t, size_t);
|
||||
|
||||
void *jas_alloc3(size_t, size_t, size_t);
|
||||
|
||||
void *jas_realloc2(void *, size_t, size_t);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
+12
-12
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -90,20 +90,20 @@ extern "C" {
|
||||
|
||||
/* Compute the absolute value. */
|
||||
#define JAS_ABS(x) \
|
||||
(((x) >= 0) ? (x) : (-(x)))
|
||||
(((x) >= 0) ? (x) : (-(x)))
|
||||
|
||||
/* Compute the minimum of two values. */
|
||||
#define JAS_MIN(x, y) \
|
||||
(((x) < (y)) ? (x) : (y))
|
||||
(((x) < (y)) ? (x) : (y))
|
||||
|
||||
/* Compute the maximum of two values. */
|
||||
#define JAS_MAX(x, y) \
|
||||
(((x) > (y)) ? (x) : (y))
|
||||
(((x) > (y)) ? (x) : (y))
|
||||
|
||||
/* Compute the remainder from division (where division is defined such
|
||||
that the remainder is always nonnegative). */
|
||||
#define JAS_MOD(x, y) \
|
||||
(((x) < 0) ? (((-x) % (y)) ? ((y) - ((-(x)) % (y))) : (0)) : ((x) % (y)))
|
||||
(((x) < 0) ? (((-x) % (y)) ? ((y) - ((-(x)) % (y))) : (0)) : ((x) % (y)))
|
||||
|
||||
/* Compute the integer with the specified number of least significant bits
|
||||
set to one. */
|
||||
|
||||
+63
-63
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -104,38 +104,38 @@ typedef int_fast32_t jas_matent_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* Additional state information. */
|
||||
int flags_;
|
||||
/* Additional state information. */
|
||||
int flags_;
|
||||
|
||||
/* The starting horizontal index. */
|
||||
int_fast32_t xstart_;
|
||||
/* The starting horizontal index. */
|
||||
int_fast32_t xstart_;
|
||||
|
||||
/* The starting vertical index. */
|
||||
int_fast32_t ystart_;
|
||||
/* The starting vertical index. */
|
||||
int_fast32_t ystart_;
|
||||
|
||||
/* The ending horizontal index. */
|
||||
int_fast32_t xend_;
|
||||
/* The ending horizontal index. */
|
||||
int_fast32_t xend_;
|
||||
|
||||
/* The ending vertical index. */
|
||||
int_fast32_t yend_;
|
||||
/* The ending vertical index. */
|
||||
int_fast32_t yend_;
|
||||
|
||||
/* The number of rows in the matrix. */
|
||||
int_fast32_t numrows_;
|
||||
/* The number of rows in the matrix. */
|
||||
int_fast32_t numrows_;
|
||||
|
||||
/* The number of columns in the matrix. */
|
||||
int_fast32_t numcols_;
|
||||
/* The number of columns in the matrix. */
|
||||
int_fast32_t numcols_;
|
||||
|
||||
/* Pointers to the start of each row. */
|
||||
jas_seqent_t **rows_;
|
||||
/* Pointers to the start of each row. */
|
||||
jas_seqent_t **rows_;
|
||||
|
||||
/* The allocated size of the rows array. */
|
||||
int_fast32_t maxrows_;
|
||||
/* The allocated size of the rows array. */
|
||||
int_fast32_t maxrows_;
|
||||
|
||||
/* The matrix data buffer. */
|
||||
jas_seqent_t *data_;
|
||||
/* The matrix data buffer. */
|
||||
jas_seqent_t *data_;
|
||||
|
||||
/* The allocated size of the data array. */
|
||||
int_fast32_t datasize_;
|
||||
/* The allocated size of the data array. */
|
||||
int_fast32_t datasize_;
|
||||
|
||||
} jas_matrix_t;
|
||||
|
||||
@@ -148,39 +148,39 @@ typedef jas_matrix_t jas_seq_t;
|
||||
|
||||
/* Get the number of rows. */
|
||||
#define jas_matrix_numrows(matrix) \
|
||||
((matrix)->numrows_)
|
||||
((matrix)->numrows_)
|
||||
|
||||
/* Get the number of columns. */
|
||||
#define jas_matrix_numcols(matrix) \
|
||||
((matrix)->numcols_)
|
||||
((matrix)->numcols_)
|
||||
|
||||
/* Get a matrix element. */
|
||||
#define jas_matrix_get(matrix, i, j) \
|
||||
((matrix)->rows_[i][j])
|
||||
((matrix)->rows_[i][j])
|
||||
|
||||
/* Set a matrix element. */
|
||||
#define jas_matrix_set(matrix, i, j, v) \
|
||||
((matrix)->rows_[i][j] = (v))
|
||||
((matrix)->rows_[i][j] = (v))
|
||||
|
||||
/* Get an element from a matrix that is known to be a row or column vector. */
|
||||
#define jas_matrix_getv(matrix, i) \
|
||||
(((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i]) : \
|
||||
((matrix)->rows_[i][0]))
|
||||
(((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i]) : \
|
||||
((matrix)->rows_[i][0]))
|
||||
|
||||
/* Set an element in a matrix that is known to be a row or column vector. */
|
||||
#define jas_matrix_setv(matrix, i, v) \
|
||||
(((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i] = (v)) : \
|
||||
((matrix)->rows_[i][0] = (v)))
|
||||
(((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i] = (v)) : \
|
||||
((matrix)->rows_[i][0] = (v)))
|
||||
|
||||
/* Get the address of an element in a matrix. */
|
||||
#define jas_matrix_getref(matrix, i, j) \
|
||||
(&(matrix)->rows_[i][j])
|
||||
(&(matrix)->rows_[i][j])
|
||||
|
||||
#define jas_matrix_getvref(matrix, i) \
|
||||
(((matrix)->numrows_ > 1) ? jas_matrix_getref(matrix, i, 0) : jas_matrix_getref(matrix, 0, i))
|
||||
(((matrix)->numrows_ > 1) ? jas_matrix_getref(matrix, i, 0) : jas_matrix_getref(matrix, 0, i))
|
||||
|
||||
#define jas_matrix_length(matrix) \
|
||||
(max((matrix)->numrows_, (matrix)->numcols_))
|
||||
(max((matrix)->numrows_, (matrix)->numcols_))
|
||||
|
||||
/* Create a matrix with the specified dimensions. */
|
||||
jas_matrix_t *jas_matrix_create(int numrows, int numcols);
|
||||
@@ -223,11 +223,11 @@ void jas_matrix_setall(jas_matrix_t *matrix, jas_seqent_t val);
|
||||
|
||||
/* The spacing between rows of a matrix. */
|
||||
#define jas_matrix_rowstep(matrix) \
|
||||
(((matrix)->numrows_ > 1) ? ((matrix)->rows_[1] - (matrix)->rows_[0]) : (0))
|
||||
(((matrix)->numrows_ > 1) ? ((matrix)->rows_[1] - (matrix)->rows_[0]) : (0))
|
||||
|
||||
/* The spacing between columns of a matrix. */
|
||||
#define jas_matrix_step(matrix) \
|
||||
(((matrix)->numrows_ > 1) ? (jas_matrix_rowstep(matrix)) : (1))
|
||||
(((matrix)->numrows_ > 1) ? (jas_matrix_rowstep(matrix)) : (1))
|
||||
|
||||
/* Compare two matrices for equality. */
|
||||
int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1);
|
||||
@@ -245,30 +245,30 @@ jas_seq2d_t *jas_seq2d_copy(jas_seq2d_t *x);
|
||||
jas_matrix_t *jas_seq2d_create(int xstart, int ystart, int xend, int yend);
|
||||
|
||||
#define jas_seq2d_destroy(s) \
|
||||
jas_matrix_destroy(s)
|
||||
jas_matrix_destroy(s)
|
||||
|
||||
#define jas_seq2d_xstart(s) \
|
||||
((s)->xstart_)
|
||||
((s)->xstart_)
|
||||
#define jas_seq2d_ystart(s) \
|
||||
((s)->ystart_)
|
||||
((s)->ystart_)
|
||||
#define jas_seq2d_xend(s) \
|
||||
((s)->xend_)
|
||||
((s)->xend_)
|
||||
#define jas_seq2d_yend(s) \
|
||||
((s)->yend_)
|
||||
((s)->yend_)
|
||||
#define jas_seq2d_getref(s, x, y) \
|
||||
(jas_matrix_getref(s, (y) - (s)->ystart_, (x) - (s)->xstart_))
|
||||
(jas_matrix_getref(s, (y) - (s)->ystart_, (x) - (s)->xstart_))
|
||||
#define jas_seq2d_get(s, x, y) \
|
||||
(jas_matrix_get(s, (y) - (s)->ystart_, (x) - (s)->xstart_))
|
||||
(jas_matrix_get(s, (y) - (s)->ystart_, (x) - (s)->xstart_))
|
||||
#define jas_seq2d_rowstep(s) \
|
||||
jas_matrix_rowstep(s)
|
||||
jas_matrix_rowstep(s)
|
||||
#define jas_seq2d_width(s) \
|
||||
((s)->xend_ - (s)->xstart_)
|
||||
((s)->xend_ - (s)->xstart_)
|
||||
#define jas_seq2d_height(s) \
|
||||
((s)->yend_ - (s)->ystart_)
|
||||
((s)->yend_ - (s)->ystart_)
|
||||
#define jas_seq2d_setshift(s, x, y) \
|
||||
((s)->xstart_ = (x), (s)->ystart_ = (y), \
|
||||
(s)->xend_ = (s)->xstart_ + (s)->numcols_, \
|
||||
(s)->yend_ = (s)->ystart_ + (s)->numrows_)
|
||||
((s)->xstart_ = (x), (s)->ystart_ = (y), \
|
||||
(s)->xend_ = (s)->xstart_ + (s)->numcols_, \
|
||||
(s)->yend_ = (s)->ystart_ + (s)->numrows_)
|
||||
|
||||
void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart,
|
||||
int ystart, int xend, int yend);
|
||||
@@ -278,21 +278,21 @@ void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart,
|
||||
\******************************************************************************/
|
||||
|
||||
#define jas_seq_create(start, end) \
|
||||
(jas_seq2d_create(start, 0, end, 1))
|
||||
(jas_seq2d_create(start, 0, end, 1))
|
||||
|
||||
#define jas_seq_destroy(seq) \
|
||||
(jas_seq2d_destroy(seq))
|
||||
(jas_seq2d_destroy(seq))
|
||||
|
||||
#define jas_seq_set(seq, i, v) \
|
||||
((seq)->rows_[0][(i) - (seq)->xstart_] = (v))
|
||||
((seq)->rows_[0][(i) - (seq)->xstart_] = (v))
|
||||
#define jas_seq_getref(seq, i) \
|
||||
(&(seq)->rows_[0][(i) - (seq)->xstart_])
|
||||
(&(seq)->rows_[0][(i) - (seq)->xstart_])
|
||||
#define jas_seq_get(seq, i) \
|
||||
((seq)->rows_[0][(i) - (seq)->xstart_])
|
||||
((seq)->rows_[0][(i) - (seq)->xstart_])
|
||||
#define jas_seq_start(seq) \
|
||||
((seq)->xstart_)
|
||||
((seq)->xstart_)
|
||||
#define jas_seq_end(seq) \
|
||||
((seq)->xend_)
|
||||
((seq)->xend_)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+87
-82
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
#include <jasper/jas_config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#if defined(HAVE_FCNTL_H)
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
@@ -148,7 +149,7 @@ extern "C" {
|
||||
#define JAS_STREAM_RWLIMIT 0x0004
|
||||
/* The error mask. */
|
||||
#define JAS_STREAM_ERRMASK \
|
||||
(JAS_STREAM_EOF | JAS_STREAM_ERR | JAS_STREAM_RWLIMIT)
|
||||
(JAS_STREAM_EOF | JAS_STREAM_ERR | JAS_STREAM_RWLIMIT)
|
||||
|
||||
/*
|
||||
* Other miscellaneous constants.
|
||||
@@ -178,17 +179,17 @@ typedef void jas_stream_obj_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* Read characters from a file object. */
|
||||
int (*read_)(jas_stream_obj_t *obj, char *buf, int cnt);
|
||||
/* Read characters from a file object. */
|
||||
int (*read_)(jas_stream_obj_t *obj, char *buf, int cnt);
|
||||
|
||||
/* Write characters to a file object. */
|
||||
int (*write_)(jas_stream_obj_t *obj, char *buf, int cnt);
|
||||
/* Write characters to a file object. */
|
||||
int (*write_)(jas_stream_obj_t *obj, char *buf, int cnt);
|
||||
|
||||
/* Set the position for a file object. */
|
||||
long (*seek_)(jas_stream_obj_t *obj, long offset, int origin);
|
||||
/* Set the position for a file object. */
|
||||
long (*seek_)(jas_stream_obj_t *obj, long offset, int origin);
|
||||
|
||||
/* Close a file object. */
|
||||
int (*close_)(jas_stream_obj_t *obj);
|
||||
/* Close a file object. */
|
||||
int (*close_)(jas_stream_obj_t *obj);
|
||||
|
||||
} jas_stream_ops_t;
|
||||
|
||||
@@ -198,46 +199,46 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The mode in which the stream was opened. */
|
||||
int openmode_;
|
||||
/* The mode in which the stream was opened. */
|
||||
int openmode_;
|
||||
|
||||
/* The buffering mode. */
|
||||
int bufmode_;
|
||||
/* The buffering mode. */
|
||||
int bufmode_;
|
||||
|
||||
/* The stream status. */
|
||||
int flags_;
|
||||
/* The stream status. */
|
||||
int flags_;
|
||||
|
||||
/* The start of the buffer area to use for reading/writing. */
|
||||
uchar *bufbase_;
|
||||
/* The start of the buffer area to use for reading/writing. */
|
||||
uchar *bufbase_;
|
||||
|
||||
/* The start of the buffer area excluding the extra initial space for
|
||||
character putback. */
|
||||
uchar *bufstart_;
|
||||
/* The start of the buffer area excluding the extra initial space for
|
||||
character putback. */
|
||||
uchar *bufstart_;
|
||||
|
||||
/* The buffer size. */
|
||||
int bufsize_;
|
||||
/* The buffer size. */
|
||||
int bufsize_;
|
||||
|
||||
/* The current position in the buffer. */
|
||||
uchar *ptr_;
|
||||
/* The current position in the buffer. */
|
||||
uchar *ptr_;
|
||||
|
||||
/* The number of characters that must be read/written before
|
||||
the buffer needs to be filled/flushed. */
|
||||
int cnt_;
|
||||
/* The number of characters that must be read/written before
|
||||
the buffer needs to be filled/flushed. */
|
||||
int cnt_;
|
||||
|
||||
/* A trivial buffer to be used for unbuffered operation. */
|
||||
uchar tinybuf_[JAS_STREAM_MAXPUTBACK + 1];
|
||||
/* A trivial buffer to be used for unbuffered operation. */
|
||||
uchar tinybuf_[JAS_STREAM_MAXPUTBACK + 1];
|
||||
|
||||
/* The operations for the underlying stream file object. */
|
||||
jas_stream_ops_t *ops_;
|
||||
/* The operations for the underlying stream file object. */
|
||||
jas_stream_ops_t *ops_;
|
||||
|
||||
/* The underlying stream file object. */
|
||||
jas_stream_obj_t *obj_;
|
||||
/* The underlying stream file object. */
|
||||
jas_stream_obj_t *obj_;
|
||||
|
||||
/* The number of characters read/written. */
|
||||
long rwcnt_;
|
||||
/* The number of characters read/written. */
|
||||
long rwcnt_;
|
||||
|
||||
/* The maximum number of characters that may be read/written. */
|
||||
long rwlimit_;
|
||||
/* The maximum number of characters that may be read/written. */
|
||||
long rwlimit_;
|
||||
|
||||
} jas_stream_t;
|
||||
|
||||
@@ -249,9 +250,13 @@ typedef struct {
|
||||
* File descriptor file object.
|
||||
*/
|
||||
typedef struct {
|
||||
int fd;
|
||||
int flags;
|
||||
char pathname[L_tmpnam + 1];
|
||||
int fd;
|
||||
int flags;
|
||||
#if defined _WIN32 && !defined __MINGW__ && !defined __MINGW32__
|
||||
char pathname[MAX_PATH + 1];
|
||||
#else
|
||||
char pathname[PATH_MAX + 1];
|
||||
#endif
|
||||
} jas_stream_fileobj_t;
|
||||
|
||||
#define JAS_STREAM_FILEOBJ_DELONCLOSE 0x01
|
||||
@@ -263,23 +268,23 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The data associated with this file. */
|
||||
uchar *buf_;
|
||||
/* The data associated with this file. */
|
||||
uchar *buf_;
|
||||
|
||||
/* The allocated size of the buffer for holding file data. */
|
||||
int bufsize_;
|
||||
/* The allocated size of the buffer for holding file data. */
|
||||
int bufsize_;
|
||||
|
||||
/* The length of the file. */
|
||||
int_fast32_t len_;
|
||||
/* The length of the file. */
|
||||
int_fast32_t len_;
|
||||
|
||||
/* The seek position. */
|
||||
int_fast32_t pos_;
|
||||
/* The seek position. */
|
||||
int_fast32_t pos_;
|
||||
|
||||
/* Is the buffer growable? */
|
||||
int growable_;
|
||||
/* Is the buffer growable? */
|
||||
int growable_;
|
||||
|
||||
/* Was the buffer allocated internally? */
|
||||
int myalloc_;
|
||||
/* Was the buffer allocated internally? */
|
||||
int myalloc_;
|
||||
|
||||
} jas_stream_memobj_t;
|
||||
|
||||
@@ -311,26 +316,26 @@ int jas_stream_close(jas_stream_t *stream);
|
||||
|
||||
/* Get the EOF indicator for a stream. */
|
||||
#define jas_stream_eof(stream) \
|
||||
(((stream)->flags_ & JAS_STREAM_EOF) != 0)
|
||||
(((stream)->flags_ & JAS_STREAM_EOF) != 0)
|
||||
|
||||
/* Get the error indicator for a stream. */
|
||||
#define jas_stream_error(stream) \
|
||||
(((stream)->flags_ & JAS_STREAM_ERR) != 0)
|
||||
(((stream)->flags_ & JAS_STREAM_ERR) != 0)
|
||||
|
||||
/* Clear the error indicator for a stream. */
|
||||
#define jas_stream_clearerr(stream) \
|
||||
((stream)->flags_ &= ~(JAS_STREAM_ERR | JAS_STREAM_EOF))
|
||||
((stream)->flags_ &= ~(JAS_STREAM_ERR | JAS_STREAM_EOF))
|
||||
|
||||
/* Get the read/write limit for a stream. */
|
||||
#define jas_stream_getrwlimit(stream) \
|
||||
(((const jas_stream_t *)(stream))->rwlimit_)
|
||||
(((const jas_stream_t *)(stream))->rwlimit_)
|
||||
|
||||
/* Set the read/write limit for a stream. */
|
||||
int jas_stream_setrwlimit(jas_stream_t *stream, long rwlimit);
|
||||
|
||||
/* Get the read/write count for a stream. */
|
||||
#define jas_stream_getrwcount(stream) \
|
||||
(((const jas_stream_t *)(stream))->rwcnt_)
|
||||
(((const jas_stream_t *)(stream))->rwcnt_)
|
||||
|
||||
/* Set the read/write count for a stream. */
|
||||
long jas_stream_setrwcount(jas_stream_t *stream, long rwcnt);
|
||||
@@ -371,8 +376,8 @@ char *jas_stream_gets(jas_stream_t *stream, char *buf, int bufsize);
|
||||
/* Look at the next character to be read from a stream without actually
|
||||
removing it from the stream. */
|
||||
#define jas_stream_peekc(stream) \
|
||||
(((stream)->cnt_ <= 0) ? jas_stream_fillbuf(stream, 0) : \
|
||||
((int)(*(stream)->ptr_)))
|
||||
(((stream)->cnt_ <= 0) ? jas_stream_fillbuf(stream, 0) : \
|
||||
((int)(*(stream)->ptr_)))
|
||||
|
||||
/* Put a character back on a stream. */
|
||||
int jas_stream_ungetc(jas_stream_t *stream, int c);
|
||||
@@ -429,26 +434,26 @@ directly, you will die a horrible, miserable, and painful death! */
|
||||
|
||||
/* Read a character from a stream. */
|
||||
#define jas_stream_getc_macro(stream) \
|
||||
((!((stream)->flags_ & (JAS_STREAM_ERR | JAS_STREAM_EOF | \
|
||||
JAS_STREAM_RWLIMIT))) ? \
|
||||
(((stream)->rwlimit_ >= 0 && (stream)->rwcnt_ >= (stream)->rwlimit_) ? \
|
||||
(stream->flags_ |= JAS_STREAM_RWLIMIT, EOF) : \
|
||||
jas_stream_getc2(stream)) : EOF)
|
||||
((!((stream)->flags_ & (JAS_STREAM_ERR | JAS_STREAM_EOF | \
|
||||
JAS_STREAM_RWLIMIT))) ? \
|
||||
(((stream)->rwlimit_ >= 0 && (stream)->rwcnt_ >= (stream)->rwlimit_) ? \
|
||||
(stream->flags_ |= JAS_STREAM_RWLIMIT, EOF) : \
|
||||
jas_stream_getc2(stream)) : EOF)
|
||||
#define jas_stream_getc2(stream) \
|
||||
((--(stream)->cnt_ < 0) ? jas_stream_fillbuf(stream, 1) : \
|
||||
(++(stream)->rwcnt_, (int)(*(stream)->ptr_++)))
|
||||
((--(stream)->cnt_ < 0) ? jas_stream_fillbuf(stream, 1) : \
|
||||
(++(stream)->rwcnt_, (int)(*(stream)->ptr_++)))
|
||||
|
||||
/* Write a character to a stream. */
|
||||
#define jas_stream_putc_macro(stream, c) \
|
||||
((!((stream)->flags_ & (JAS_STREAM_ERR | JAS_STREAM_EOF | \
|
||||
JAS_STREAM_RWLIMIT))) ? \
|
||||
(((stream)->rwlimit_ >= 0 && (stream)->rwcnt_ >= (stream)->rwlimit_) ? \
|
||||
(stream->flags_ |= JAS_STREAM_RWLIMIT, EOF) : \
|
||||
jas_stream_putc2(stream, c)) : EOF)
|
||||
((!((stream)->flags_ & (JAS_STREAM_ERR | JAS_STREAM_EOF | \
|
||||
JAS_STREAM_RWLIMIT))) ? \
|
||||
(((stream)->rwlimit_ >= 0 && (stream)->rwcnt_ >= (stream)->rwlimit_) ? \
|
||||
(stream->flags_ |= JAS_STREAM_RWLIMIT, EOF) : \
|
||||
jas_stream_putc2(stream, c)) : EOF)
|
||||
#define jas_stream_putc2(stream, c) \
|
||||
(((stream)->bufmode_ |= JAS_STREAM_WRBUF, --(stream)->cnt_ < 0) ? \
|
||||
jas_stream_flushbuf((stream), (uchar)(c)) : \
|
||||
(++(stream)->rwcnt_, (int)(*(stream)->ptr_++ = (c))))
|
||||
(((stream)->bufmode_ |= JAS_STREAM_WRBUF, --(stream)->cnt_ < 0) ? \
|
||||
jas_stream_flushbuf((stream), (uchar)(c)) : \
|
||||
(++(stream)->rwcnt_, (int)(*(stream)->ptr_++ = (c))))
|
||||
|
||||
/* These prototypes need to be here for the sake of the stream_getc and
|
||||
stream_putc macros. */
|
||||
|
||||
+8
-8
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
|
||||
+12
-12
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -75,15 +75,15 @@ extern "C" {
|
||||
#if defined(HAVE_GETTIMEOFDAY)
|
||||
|
||||
typedef struct {
|
||||
struct timeval start;
|
||||
struct timeval stop;
|
||||
struct timeval start;
|
||||
struct timeval stop;
|
||||
} jas_tmr_t;
|
||||
|
||||
#elif defined(HAVE_GETRUSAGE)
|
||||
|
||||
typedef struct {
|
||||
struct rusage start;
|
||||
struct rusage stop;
|
||||
struct rusage start;
|
||||
struct rusage stop;
|
||||
} jas_tmr_t;
|
||||
|
||||
#else
|
||||
|
||||
+20
-20
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -86,11 +86,11 @@ extern "C" {
|
||||
|
||||
typedef struct {
|
||||
|
||||
int id;
|
||||
/* The ID for the tag. */
|
||||
int id;
|
||||
/* The ID for the tag. */
|
||||
|
||||
char *name;
|
||||
/* The name of the tag. */
|
||||
char *name;
|
||||
/* The name of the tag. */
|
||||
|
||||
} jas_taginfo_t;
|
||||
|
||||
@@ -98,17 +98,17 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
char *buf;
|
||||
/* The parsing buffer. */
|
||||
char *buf;
|
||||
/* The parsing buffer. */
|
||||
|
||||
char *tag;
|
||||
/* The current tag name. */
|
||||
char *tag;
|
||||
/* The current tag name. */
|
||||
|
||||
char *val;
|
||||
/* The current value. */
|
||||
char *val;
|
||||
/* The current value. */
|
||||
|
||||
char *pos;
|
||||
/* The current position in the parsing buffer. */
|
||||
char *pos;
|
||||
/* The current position in the parsing buffer. */
|
||||
|
||||
} jas_tvparser_t;
|
||||
|
||||
|
||||
+9
-9
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -215,7 +215,7 @@ typedef ulonglong uint_fast64_t;
|
||||
macro, type casts can be easily located in the source code with
|
||||
tools like "grep". */
|
||||
#define JAS_CAST(t, e) \
|
||||
((t) (e))
|
||||
((t) (e))
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+24
-24
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -85,24 +85,24 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define JAS_COPYRIGHT \
|
||||
"Copyright (c) 2001-2006 Michael David Adams.\n" \
|
||||
"Copyright (c) 1999-2000 Image Power, Inc. and the University of\n" \
|
||||
" British Columbia.\n" \
|
||||
"All rights reserved.\n"
|
||||
"Copyright (c) 2001-2006 Michael David Adams.\n" \
|
||||
"Copyright (c) 1999-2000 Image Power, Inc. and the University of\n" \
|
||||
" British Columbia.\n" \
|
||||
"All rights reserved.\n"
|
||||
|
||||
#define JAS_NOTES \
|
||||
"For more information about this software, please visit the following\n" \
|
||||
"web sites/pages:\n" \
|
||||
" http://www.ece.uvic.ca/~mdadams/jasper\n" \
|
||||
" http://www.jpeg.org/software\n" \
|
||||
"To be added to the (moderated) JasPer software announcements\n" \
|
||||
"mailing list, send an email to:\n" \
|
||||
" jasper-announce-subscribe@yahoogroups.com\n" \
|
||||
"To be added to the (unmoderated) JasPer software discussion\n" \
|
||||
"mailing list, send an email to:\n" \
|
||||
" jasper-discussion-subscribe@yahoogroups.com\n" \
|
||||
"Please send any bug reports to:\n" \
|
||||
" mdadams@ieee.org\n"
|
||||
"For more information about this software, please visit the following\n" \
|
||||
"web sites/pages:\n" \
|
||||
" http://www.ece.uvic.ca/~mdadams/jasper\n" \
|
||||
" http://www.jpeg.org/software\n" \
|
||||
"To be added to the (moderated) JasPer software announcements\n" \
|
||||
"mailing list, send an email to:\n" \
|
||||
" jasper-announce-subscribe@yahoogroups.com\n" \
|
||||
"To be added to the (unmoderated) JasPer software discussion\n" \
|
||||
"mailing list, send an email to:\n" \
|
||||
" jasper-discussion-subscribe@yahoogroups.com\n" \
|
||||
"Please send any bug reports to:\n" \
|
||||
" mdadams@ieee.org\n"
|
||||
|
||||
/******************************************************************************\
|
||||
* Functions.
|
||||
|
||||
+8
-8
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
|
||||
externo
+616
-558
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+82
-70
@@ -5,16 +5,21 @@
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by Andrey Kiselev <dron@remotesensing.org> to handle UUID
|
||||
* box properly.
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +27,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +62,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -81,7 +86,7 @@
|
||||
\******************************************************************************/
|
||||
|
||||
#define JP2_SPTOBPC(s, p) \
|
||||
((((p) - 1) & 0x7f) | (((s) & 1) << 7))
|
||||
((((p) - 1) & 0x7f) | (((s) & 1) << 7))
|
||||
|
||||
/******************************************************************************\
|
||||
* Box class.
|
||||
@@ -119,7 +124,7 @@
|
||||
#define JP2_JP_LEN 12
|
||||
|
||||
typedef struct {
|
||||
uint_fast32_t magic;
|
||||
uint_fast32_t magic;
|
||||
} jp2_jp_t;
|
||||
|
||||
/* FTYP box data. */
|
||||
@@ -130,10 +135,10 @@ typedef struct {
|
||||
#define JP2_FTYP_COMPATCODE JP2_FTYP_MAJVER
|
||||
|
||||
typedef struct {
|
||||
uint_fast32_t majver;
|
||||
uint_fast32_t minver;
|
||||
uint_fast32_t numcompatcodes;
|
||||
uint_fast32_t compatcodes[JP2_FTYP_MAXCOMPATCODES];
|
||||
uint_fast32_t majver;
|
||||
uint_fast32_t minver;
|
||||
uint_fast32_t numcompatcodes;
|
||||
uint_fast32_t compatcodes[JP2_FTYP_MAXCOMPATCODES];
|
||||
} jp2_ftyp_t;
|
||||
|
||||
/* IHDR box data. */
|
||||
@@ -142,20 +147,20 @@ typedef struct {
|
||||
#define JP2_IHDR_BPCNULL 255
|
||||
|
||||
typedef struct {
|
||||
uint_fast32_t width;
|
||||
uint_fast32_t height;
|
||||
uint_fast16_t numcmpts;
|
||||
uint_fast8_t bpc;
|
||||
uint_fast8_t comptype;
|
||||
uint_fast8_t csunk;
|
||||
uint_fast8_t ipr;
|
||||
uint_fast32_t width;
|
||||
uint_fast32_t height;
|
||||
uint_fast16_t numcmpts;
|
||||
uint_fast8_t bpc;
|
||||
uint_fast8_t comptype;
|
||||
uint_fast8_t csunk;
|
||||
uint_fast8_t ipr;
|
||||
} jp2_ihdr_t;
|
||||
|
||||
/* BPCC box data. */
|
||||
|
||||
typedef struct {
|
||||
uint_fast16_t numcmpts;
|
||||
uint_fast8_t *bpcs;
|
||||
uint_fast16_t numcmpts;
|
||||
uint_fast8_t *bpcs;
|
||||
} jp2_bpcc_t;
|
||||
|
||||
/* COLR box data. */
|
||||
@@ -169,22 +174,22 @@ typedef struct {
|
||||
#define JP2_COLR_SYCC 18
|
||||
|
||||
typedef struct {
|
||||
uint_fast8_t method;
|
||||
uint_fast8_t pri;
|
||||
uint_fast8_t approx;
|
||||
uint_fast32_t csid;
|
||||
uint_fast8_t *iccp;
|
||||
int iccplen;
|
||||
/* XXX - Someday we ought to add ICC profile data here. */
|
||||
uint_fast8_t method;
|
||||
uint_fast8_t pri;
|
||||
uint_fast8_t approx;
|
||||
uint_fast32_t csid;
|
||||
uint_fast8_t *iccp;
|
||||
int iccplen;
|
||||
/* XXX - Someday we ought to add ICC profile data here. */
|
||||
} jp2_colr_t;
|
||||
|
||||
/* PCLR box data. */
|
||||
|
||||
typedef struct {
|
||||
uint_fast16_t numlutents;
|
||||
uint_fast8_t numchans;
|
||||
int_fast32_t *lutdata;
|
||||
uint_fast8_t *bpc;
|
||||
uint_fast16_t numlutents;
|
||||
uint_fast8_t numchans;
|
||||
int_fast32_t *lutdata;
|
||||
uint_fast8_t *bpc;
|
||||
} jp2_pclr_t;
|
||||
|
||||
/* CDEF box per-channel data. */
|
||||
@@ -206,29 +211,35 @@ typedef struct {
|
||||
#define JP2_CDEF_ASOC_NONE 65535
|
||||
|
||||
typedef struct {
|
||||
uint_fast16_t channo;
|
||||
uint_fast16_t type;
|
||||
uint_fast16_t assoc;
|
||||
uint_fast16_t channo;
|
||||
uint_fast16_t type;
|
||||
uint_fast16_t assoc;
|
||||
} jp2_cdefchan_t;
|
||||
|
||||
/* CDEF box data. */
|
||||
|
||||
typedef struct {
|
||||
uint_fast16_t numchans;
|
||||
jp2_cdefchan_t *ents;
|
||||
uint_fast16_t numchans;
|
||||
jp2_cdefchan_t *ents;
|
||||
} jp2_cdef_t;
|
||||
|
||||
typedef struct {
|
||||
uint_fast16_t cmptno;
|
||||
uint_fast8_t map;
|
||||
uint_fast8_t pcol;
|
||||
uint_fast16_t cmptno;
|
||||
uint_fast8_t map;
|
||||
uint_fast8_t pcol;
|
||||
} jp2_cmapent_t;
|
||||
|
||||
typedef struct {
|
||||
uint_fast16_t numchans;
|
||||
jp2_cmapent_t *ents;
|
||||
uint_fast16_t numchans;
|
||||
jp2_cmapent_t *ents;
|
||||
} jp2_cmap_t;
|
||||
|
||||
typedef struct {
|
||||
uint_fast32_t datalen;
|
||||
uint_fast8_t uuid[16];
|
||||
uint_fast8_t *data;
|
||||
} jp2_uuid_t;
|
||||
|
||||
#define JP2_CMAP_DIRECT 0
|
||||
#define JP2_CMAP_PALETTE 1
|
||||
|
||||
@@ -237,36 +248,37 @@ typedef struct {
|
||||
struct jp2_boxops_s;
|
||||
typedef struct {
|
||||
|
||||
struct jp2_boxops_s *ops;
|
||||
struct jp2_boxinfo_s *info;
|
||||
struct jp2_boxops_s *ops;
|
||||
struct jp2_boxinfo_s *info;
|
||||
|
||||
uint_fast32_t type;
|
||||
uint_fast32_t type;
|
||||
|
||||
/* The length of the box including the (variable-length) header. */
|
||||
uint_fast32_t len;
|
||||
/* The length of the box including the (variable-length) header. */
|
||||
uint_fast32_t len;
|
||||
|
||||
/* The length of the box data. */
|
||||
uint_fast32_t datalen;
|
||||
/* The length of the box data. */
|
||||
uint_fast32_t datalen;
|
||||
|
||||
union {
|
||||
jp2_jp_t jp;
|
||||
jp2_ftyp_t ftyp;
|
||||
jp2_ihdr_t ihdr;
|
||||
jp2_bpcc_t bpcc;
|
||||
jp2_colr_t colr;
|
||||
jp2_pclr_t pclr;
|
||||
jp2_cdef_t cdef;
|
||||
jp2_cmap_t cmap;
|
||||
} data;
|
||||
union {
|
||||
jp2_jp_t jp;
|
||||
jp2_ftyp_t ftyp;
|
||||
jp2_ihdr_t ihdr;
|
||||
jp2_bpcc_t bpcc;
|
||||
jp2_colr_t colr;
|
||||
jp2_pclr_t pclr;
|
||||
jp2_cdef_t cdef;
|
||||
jp2_cmap_t cmap;
|
||||
jp2_uuid_t uuid;
|
||||
} data;
|
||||
|
||||
} jp2_box_t;
|
||||
|
||||
typedef struct jp2_boxops_s {
|
||||
void (*init)(jp2_box_t *box);
|
||||
void (*destroy)(jp2_box_t *box);
|
||||
int (*getdata)(jp2_box_t *box, jas_stream_t *in);
|
||||
int (*putdata)(jp2_box_t *box, jas_stream_t *out);
|
||||
void (*dumpdata)(jp2_box_t *box, FILE *out);
|
||||
void (*init)(jp2_box_t *box);
|
||||
void (*destroy)(jp2_box_t *box);
|
||||
int (*getdata)(jp2_box_t *box, jas_stream_t *in);
|
||||
int (*putdata)(jp2_box_t *box, jas_stream_t *out);
|
||||
void (*dumpdata)(jp2_box_t *box, FILE *out);
|
||||
} jp2_boxops_t;
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -274,10 +286,10 @@ typedef struct jp2_boxops_s {
|
||||
\******************************************************************************/
|
||||
|
||||
typedef struct jp2_boxinfo_s {
|
||||
int type;
|
||||
char *name;
|
||||
int flags;
|
||||
jp2_boxops_t ops;
|
||||
int type;
|
||||
char *name;
|
||||
int flags;
|
||||
jp2_boxops_t ops;
|
||||
} jp2_boxinfo_t;
|
||||
|
||||
/******************************************************************************\
|
||||
|
||||
externo
+441
-441
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -95,509 +95,509 @@ static int jp2_getct(int colorspace, int type, int assoc);
|
||||
|
||||
jas_image_t *jp2_decode(jas_stream_t *in, char *optstr)
|
||||
{
|
||||
jp2_box_t *box;
|
||||
int found;
|
||||
jas_image_t *image;
|
||||
jp2_dec_t *dec;
|
||||
bool samedtype;
|
||||
int dtype;
|
||||
unsigned int i;
|
||||
jp2_cmap_t *cmapd;
|
||||
jp2_pclr_t *pclrd;
|
||||
jp2_cdef_t *cdefd;
|
||||
unsigned int channo;
|
||||
int newcmptno;
|
||||
int_fast32_t *lutents;
|
||||
jp2_box_t *box;
|
||||
int found;
|
||||
jas_image_t *image;
|
||||
jp2_dec_t *dec;
|
||||
bool samedtype;
|
||||
int dtype;
|
||||
unsigned int i;
|
||||
jp2_cmap_t *cmapd;
|
||||
jp2_pclr_t *pclrd;
|
||||
jp2_cdef_t *cdefd;
|
||||
unsigned int channo;
|
||||
int newcmptno;
|
||||
int_fast32_t *lutents;
|
||||
#if 0
|
||||
jp2_cdefchan_t *cdefent;
|
||||
int cmptno;
|
||||
jp2_cdefchan_t *cdefent;
|
||||
int cmptno;
|
||||
#endif
|
||||
jp2_cmapent_t *cmapent;
|
||||
jas_icchdr_t icchdr;
|
||||
jas_iccprof_t *iccprof;
|
||||
jp2_cmapent_t *cmapent;
|
||||
jas_icchdr_t icchdr;
|
||||
jas_iccprof_t *iccprof;
|
||||
|
||||
dec = 0;
|
||||
box = 0;
|
||||
image = 0;
|
||||
dec = 0;
|
||||
box = 0;
|
||||
image = 0;
|
||||
|
||||
if (!(dec = jp2_dec_create())) {
|
||||
goto error;
|
||||
}
|
||||
if (!(dec = jp2_dec_create())) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Get the first box. This should be a JP box. */
|
||||
if (!(box = jp2_box_get(in))) {
|
||||
jas_eprintf("error: cannot get box\n");
|
||||
goto error;
|
||||
}
|
||||
if (box->type != JP2_BOX_JP) {
|
||||
jas_eprintf("error: expecting signature box\n");
|
||||
goto error;
|
||||
}
|
||||
if (box->data.jp.magic != JP2_JP_MAGIC) {
|
||||
jas_eprintf("incorrect magic number\n");
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
/* Get the first box. This should be a JP box. */
|
||||
if (!(box = jp2_box_get(in))) {
|
||||
jas_eprintf("error: cannot get box\n");
|
||||
goto error;
|
||||
}
|
||||
if (box->type != JP2_BOX_JP) {
|
||||
jas_eprintf("error: expecting signature box\n");
|
||||
goto error;
|
||||
}
|
||||
if (box->data.jp.magic != JP2_JP_MAGIC) {
|
||||
jas_eprintf("incorrect magic number\n");
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
|
||||
/* Get the second box. This should be a FTYP box. */
|
||||
if (!(box = jp2_box_get(in))) {
|
||||
goto error;
|
||||
}
|
||||
if (box->type != JP2_BOX_FTYP) {
|
||||
jas_eprintf("expecting file type box\n");
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
/* Get the second box. This should be a FTYP box. */
|
||||
if (!(box = jp2_box_get(in))) {
|
||||
goto error;
|
||||
}
|
||||
if (box->type != JP2_BOX_FTYP) {
|
||||
jas_eprintf("expecting file type box\n");
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
|
||||
/* Get more boxes... */
|
||||
found = 0;
|
||||
while ((box = jp2_box_get(in))) {
|
||||
if (jas_getdbglevel() >= 1) {
|
||||
jas_eprintf("box type %s\n", box->info->name);
|
||||
}
|
||||
switch (box->type) {
|
||||
case JP2_BOX_JP2C:
|
||||
found = 1;
|
||||
break;
|
||||
case JP2_BOX_IHDR:
|
||||
if (!dec->ihdr) {
|
||||
dec->ihdr = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
case JP2_BOX_BPCC:
|
||||
if (!dec->bpcc) {
|
||||
dec->bpcc = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
case JP2_BOX_CDEF:
|
||||
if (!dec->cdef) {
|
||||
dec->cdef = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
case JP2_BOX_PCLR:
|
||||
if (!dec->pclr) {
|
||||
dec->pclr = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
case JP2_BOX_CMAP:
|
||||
if (!dec->cmap) {
|
||||
dec->cmap = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
case JP2_BOX_COLR:
|
||||
if (!dec->colr) {
|
||||
dec->colr = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (box) {
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
}
|
||||
if (found) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Get more boxes... */
|
||||
found = 0;
|
||||
while ((box = jp2_box_get(in))) {
|
||||
if (jas_getdbglevel() >= 1) {
|
||||
jas_eprintf("box type %s\n", box->info->name);
|
||||
}
|
||||
switch (box->type) {
|
||||
case JP2_BOX_JP2C:
|
||||
found = 1;
|
||||
break;
|
||||
case JP2_BOX_IHDR:
|
||||
if (!dec->ihdr) {
|
||||
dec->ihdr = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
case JP2_BOX_BPCC:
|
||||
if (!dec->bpcc) {
|
||||
dec->bpcc = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
case JP2_BOX_CDEF:
|
||||
if (!dec->cdef) {
|
||||
dec->cdef = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
case JP2_BOX_PCLR:
|
||||
if (!dec->pclr) {
|
||||
dec->pclr = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
case JP2_BOX_CMAP:
|
||||
if (!dec->cmap) {
|
||||
dec->cmap = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
case JP2_BOX_COLR:
|
||||
if (!dec->colr) {
|
||||
dec->colr = box;
|
||||
box = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (box) {
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
}
|
||||
if (found) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
jas_eprintf("error: no code stream found\n");
|
||||
goto error;
|
||||
}
|
||||
if (!found) {
|
||||
jas_eprintf("error: no code stream found\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!(dec->image = jpc_decode(in, optstr))) {
|
||||
jas_eprintf("error: cannot decode code stream\n");
|
||||
goto error;
|
||||
}
|
||||
if (!(dec->image = jpc_decode(in, optstr))) {
|
||||
jas_eprintf("error: cannot decode code stream\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* An IHDR box must be present. */
|
||||
if (!dec->ihdr) {
|
||||
jas_eprintf("error: missing IHDR box\n");
|
||||
goto error;
|
||||
}
|
||||
/* An IHDR box must be present. */
|
||||
if (!dec->ihdr) {
|
||||
jas_eprintf("error: missing IHDR box\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Does the number of components indicated in the IHDR box match
|
||||
the value specified in the code stream? */
|
||||
if (dec->ihdr->data.ihdr.numcmpts != JAS_CAST(uint, jas_image_numcmpts(dec->image))) {
|
||||
jas_eprintf("warning: number of components mismatch\n");
|
||||
}
|
||||
/* Does the number of components indicated in the IHDR box match
|
||||
the value specified in the code stream? */
|
||||
if (dec->ihdr->data.ihdr.numcmpts != JAS_CAST(uint, jas_image_numcmpts(dec->image))) {
|
||||
jas_eprintf("warning: number of components mismatch\n");
|
||||
}
|
||||
|
||||
/* At least one component must be present. */
|
||||
if (!jas_image_numcmpts(dec->image)) {
|
||||
jas_eprintf("error: no components\n");
|
||||
goto error;
|
||||
}
|
||||
/* At least one component must be present. */
|
||||
if (!jas_image_numcmpts(dec->image)) {
|
||||
jas_eprintf("error: no components\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Determine if all components have the same data type. */
|
||||
samedtype = true;
|
||||
dtype = jas_image_cmptdtype(dec->image, 0);
|
||||
for (i = 1; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) {
|
||||
if (jas_image_cmptdtype(dec->image, i) != dtype) {
|
||||
samedtype = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Determine if all components have the same data type. */
|
||||
samedtype = true;
|
||||
dtype = jas_image_cmptdtype(dec->image, 0);
|
||||
for (i = 1; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) {
|
||||
if (jas_image_cmptdtype(dec->image, i) != dtype) {
|
||||
samedtype = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Is the component data type indicated in the IHDR box consistent
|
||||
with the data in the code stream? */
|
||||
if ((samedtype && dec->ihdr->data.ihdr.bpc != JP2_DTYPETOBPC(dtype)) ||
|
||||
(!samedtype && dec->ihdr->data.ihdr.bpc != JP2_IHDR_BPCNULL)) {
|
||||
jas_eprintf("warning: component data type mismatch\n");
|
||||
}
|
||||
/* Is the component data type indicated in the IHDR box consistent
|
||||
with the data in the code stream? */
|
||||
if ((samedtype && dec->ihdr->data.ihdr.bpc != JP2_DTYPETOBPC(dtype)) ||
|
||||
(!samedtype && dec->ihdr->data.ihdr.bpc != JP2_IHDR_BPCNULL)) {
|
||||
jas_eprintf("warning: component data type mismatch\n");
|
||||
}
|
||||
|
||||
/* Is the compression type supported? */
|
||||
if (dec->ihdr->data.ihdr.comptype != JP2_IHDR_COMPTYPE) {
|
||||
jas_eprintf("error: unsupported compression type\n");
|
||||
goto error;
|
||||
}
|
||||
/* Is the compression type supported? */
|
||||
if (dec->ihdr->data.ihdr.comptype != JP2_IHDR_COMPTYPE) {
|
||||
jas_eprintf("error: unsupported compression type\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (dec->bpcc) {
|
||||
/* Is the number of components indicated in the BPCC box
|
||||
consistent with the code stream data? */
|
||||
if (dec->bpcc->data.bpcc.numcmpts != JAS_CAST(uint, jas_image_numcmpts(
|
||||
dec->image))) {
|
||||
jas_eprintf("warning: number of components mismatch\n");
|
||||
}
|
||||
/* Is the component data type information indicated in the BPCC
|
||||
box consistent with the code stream data? */
|
||||
if (!samedtype) {
|
||||
for (i = 0; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) {
|
||||
if (jas_image_cmptdtype(dec->image, i) != JP2_BPCTODTYPE(dec->bpcc->data.bpcc.bpcs[i])) {
|
||||
jas_eprintf("warning: component data type mismatch\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
jas_eprintf("warning: superfluous BPCC box\n");
|
||||
}
|
||||
}
|
||||
if (dec->bpcc) {
|
||||
/* Is the number of components indicated in the BPCC box
|
||||
consistent with the code stream data? */
|
||||
if (dec->bpcc->data.bpcc.numcmpts != JAS_CAST(uint, jas_image_numcmpts(
|
||||
dec->image))) {
|
||||
jas_eprintf("warning: number of components mismatch\n");
|
||||
}
|
||||
/* Is the component data type information indicated in the BPCC
|
||||
box consistent with the code stream data? */
|
||||
if (!samedtype) {
|
||||
for (i = 0; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) {
|
||||
if (jas_image_cmptdtype(dec->image, i) != JP2_BPCTODTYPE(dec->bpcc->data.bpcc.bpcs[i])) {
|
||||
jas_eprintf("warning: component data type mismatch\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
jas_eprintf("warning: superfluous BPCC box\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* A COLR box must be present. */
|
||||
if (!dec->colr) {
|
||||
jas_eprintf("error: no COLR box\n");
|
||||
goto error;
|
||||
}
|
||||
/* A COLR box must be present. */
|
||||
if (!dec->colr) {
|
||||
jas_eprintf("error: no COLR box\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
switch (dec->colr->data.colr.method) {
|
||||
case JP2_COLR_ENUM:
|
||||
jas_image_setclrspc(dec->image, jp2_getcs(&dec->colr->data.colr));
|
||||
break;
|
||||
case JP2_COLR_ICC:
|
||||
iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp,
|
||||
dec->colr->data.colr.iccplen);
|
||||
assert(iccprof);
|
||||
jas_iccprof_gethdr(iccprof, &icchdr);
|
||||
jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc);
|
||||
jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc));
|
||||
dec->image->cmprof_ = jas_cmprof_createfromiccprof(iccprof);
|
||||
assert(dec->image->cmprof_);
|
||||
jas_iccprof_destroy(iccprof);
|
||||
break;
|
||||
}
|
||||
switch (dec->colr->data.colr.method) {
|
||||
case JP2_COLR_ENUM:
|
||||
jas_image_setclrspc(dec->image, jp2_getcs(&dec->colr->data.colr));
|
||||
break;
|
||||
case JP2_COLR_ICC:
|
||||
iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp,
|
||||
dec->colr->data.colr.iccplen);
|
||||
assert(iccprof);
|
||||
jas_iccprof_gethdr(iccprof, &icchdr);
|
||||
jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc);
|
||||
jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc));
|
||||
dec->image->cmprof_ = jas_cmprof_createfromiccprof(iccprof);
|
||||
assert(dec->image->cmprof_);
|
||||
jas_iccprof_destroy(iccprof);
|
||||
break;
|
||||
}
|
||||
|
||||
/* If a CMAP box is present, a PCLR box must also be present. */
|
||||
if (dec->cmap && !dec->pclr) {
|
||||
jas_eprintf("warning: missing PCLR box or superfluous CMAP box\n");
|
||||
jp2_box_destroy(dec->cmap);
|
||||
dec->cmap = 0;
|
||||
}
|
||||
/* If a CMAP box is present, a PCLR box must also be present. */
|
||||
if (dec->cmap && !dec->pclr) {
|
||||
jas_eprintf("warning: missing PCLR box or superfluous CMAP box\n");
|
||||
jp2_box_destroy(dec->cmap);
|
||||
dec->cmap = 0;
|
||||
}
|
||||
|
||||
/* If a CMAP box is not present, a PCLR box must not be present. */
|
||||
if (!dec->cmap && dec->pclr) {
|
||||
jas_eprintf("warning: missing CMAP box or superfluous PCLR box\n");
|
||||
jp2_box_destroy(dec->pclr);
|
||||
dec->pclr = 0;
|
||||
}
|
||||
/* If a CMAP box is not present, a PCLR box must not be present. */
|
||||
if (!dec->cmap && dec->pclr) {
|
||||
jas_eprintf("warning: missing CMAP box or superfluous PCLR box\n");
|
||||
jp2_box_destroy(dec->pclr);
|
||||
dec->pclr = 0;
|
||||
}
|
||||
|
||||
/* Determine the number of channels (which is essentially the number
|
||||
of components after any palette mappings have been applied). */
|
||||
dec->numchans = dec->cmap ? dec->cmap->data.cmap.numchans : JAS_CAST(uint, jas_image_numcmpts(dec->image));
|
||||
/* Determine the number of channels (which is essentially the number
|
||||
of components after any palette mappings have been applied). */
|
||||
dec->numchans = dec->cmap ? dec->cmap->data.cmap.numchans : JAS_CAST(uint, jas_image_numcmpts(dec->image));
|
||||
|
||||
/* Perform a basic sanity check on the CMAP box if present. */
|
||||
if (dec->cmap) {
|
||||
for (i = 0; i < dec->numchans; ++i) {
|
||||
/* Is the component number reasonable? */
|
||||
if (dec->cmap->data.cmap.ents[i].cmptno >= JAS_CAST(uint, jas_image_numcmpts(dec->image))) {
|
||||
jas_eprintf("error: invalid component number in CMAP box\n");
|
||||
goto error;
|
||||
}
|
||||
/* Is the LUT index reasonable? */
|
||||
if (dec->cmap->data.cmap.ents[i].pcol >= dec->pclr->data.pclr.numchans) {
|
||||
jas_eprintf("error: invalid CMAP LUT index\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Perform a basic sanity check on the CMAP box if present. */
|
||||
if (dec->cmap) {
|
||||
for (i = 0; i < dec->numchans; ++i) {
|
||||
/* Is the component number reasonable? */
|
||||
if (dec->cmap->data.cmap.ents[i].cmptno >= JAS_CAST(uint, jas_image_numcmpts(dec->image))) {
|
||||
jas_eprintf("error: invalid component number in CMAP box\n");
|
||||
goto error;
|
||||
}
|
||||
/* Is the LUT index reasonable? */
|
||||
if (dec->cmap->data.cmap.ents[i].pcol >= dec->pclr->data.pclr.numchans) {
|
||||
jas_eprintf("error: invalid CMAP LUT index\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Allocate space for the channel-number to component-number LUT. */
|
||||
if (!(dec->chantocmptlut = jas_malloc(dec->numchans * sizeof(uint_fast16_t)))) {
|
||||
jas_eprintf("error: no memory\n");
|
||||
goto error;
|
||||
}
|
||||
/* Allocate space for the channel-number to component-number LUT. */
|
||||
if (!(dec->chantocmptlut = jas_alloc2(dec->numchans, sizeof(uint_fast16_t)))) {
|
||||
jas_eprintf("error: no memory\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!dec->cmap) {
|
||||
for (i = 0; i < dec->numchans; ++i) {
|
||||
dec->chantocmptlut[i] = i;
|
||||
}
|
||||
} else {
|
||||
cmapd = &dec->cmap->data.cmap;
|
||||
pclrd = &dec->pclr->data.pclr;
|
||||
cdefd = &dec->cdef->data.cdef;
|
||||
for (channo = 0; channo < cmapd->numchans; ++channo) {
|
||||
cmapent = &cmapd->ents[channo];
|
||||
if (cmapent->map == JP2_CMAP_DIRECT) {
|
||||
dec->chantocmptlut[channo] = channo;
|
||||
} else if (cmapent->map == JP2_CMAP_PALETTE) {
|
||||
lutents = jas_malloc(pclrd->numlutents * sizeof(int_fast32_t));
|
||||
for (i = 0; i < pclrd->numlutents; ++i) {
|
||||
lutents[i] = pclrd->lutdata[cmapent->pcol + i * pclrd->numchans];
|
||||
}
|
||||
newcmptno = jas_image_numcmpts(dec->image);
|
||||
jas_image_depalettize(dec->image, cmapent->cmptno, pclrd->numlutents, lutents, JP2_BPCTODTYPE(pclrd->bpc[cmapent->pcol]), newcmptno);
|
||||
dec->chantocmptlut[channo] = newcmptno;
|
||||
jas_free(lutents);
|
||||
if (!dec->cmap) {
|
||||
for (i = 0; i < dec->numchans; ++i) {
|
||||
dec->chantocmptlut[i] = i;
|
||||
}
|
||||
} else {
|
||||
cmapd = &dec->cmap->data.cmap;
|
||||
pclrd = &dec->pclr->data.pclr;
|
||||
cdefd = &dec->cdef->data.cdef;
|
||||
for (channo = 0; channo < cmapd->numchans; ++channo) {
|
||||
cmapent = &cmapd->ents[channo];
|
||||
if (cmapent->map == JP2_CMAP_DIRECT) {
|
||||
dec->chantocmptlut[channo] = channo;
|
||||
} else if (cmapent->map == JP2_CMAP_PALETTE) {
|
||||
lutents = jas_alloc2(pclrd->numlutents, sizeof(int_fast32_t));
|
||||
for (i = 0; i < pclrd->numlutents; ++i) {
|
||||
lutents[i] = pclrd->lutdata[cmapent->pcol + i * pclrd->numchans];
|
||||
}
|
||||
newcmptno = jas_image_numcmpts(dec->image);
|
||||
jas_image_depalettize(dec->image, cmapent->cmptno, pclrd->numlutents, lutents, JP2_BPCTODTYPE(pclrd->bpc[cmapent->pcol]), newcmptno);
|
||||
dec->chantocmptlut[channo] = newcmptno;
|
||||
jas_free(lutents);
|
||||
#if 0
|
||||
if (dec->cdef) {
|
||||
cdefent = jp2_cdef_lookup(cdefd, channo);
|
||||
if (!cdefent) {
|
||||
abort();
|
||||
}
|
||||
jas_image_setcmpttype(dec->image, newcmptno, jp2_getct(jas_image_clrspc(dec->image), cdefent->type, cdefent->assoc));
|
||||
} else {
|
||||
jas_image_setcmpttype(dec->image, newcmptno, jp2_getct(jas_image_clrspc(dec->image), 0, channo + 1));
|
||||
}
|
||||
if (dec->cdef) {
|
||||
cdefent = jp2_cdef_lookup(cdefd, channo);
|
||||
if (!cdefent) {
|
||||
abort();
|
||||
}
|
||||
jas_image_setcmpttype(dec->image, newcmptno, jp2_getct(jas_image_clrspc(dec->image), cdefent->type, cdefent->assoc));
|
||||
} else {
|
||||
jas_image_setcmpttype(dec->image, newcmptno, jp2_getct(jas_image_clrspc(dec->image), 0, channo + 1));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Mark all components as being of unknown type. */
|
||||
/* Mark all components as being of unknown type. */
|
||||
|
||||
for (i = 0; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) {
|
||||
jas_image_setcmpttype(dec->image, i, JAS_IMAGE_CT_UNKNOWN);
|
||||
}
|
||||
for (i = 0; i < JAS_CAST(uint, jas_image_numcmpts(dec->image)); ++i) {
|
||||
jas_image_setcmpttype(dec->image, i, JAS_IMAGE_CT_UNKNOWN);
|
||||
}
|
||||
|
||||
/* Determine the type of each component. */
|
||||
if (dec->cdef) {
|
||||
for (i = 0; i < dec->numchans; ++i) {
|
||||
jas_image_setcmpttype(dec->image,
|
||||
dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo],
|
||||
jp2_getct(jas_image_clrspc(dec->image),
|
||||
dec->cdef->data.cdef.ents[i].type, dec->cdef->data.cdef.ents[i].assoc));
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < dec->numchans; ++i) {
|
||||
jas_image_setcmpttype(dec->image, dec->chantocmptlut[i],
|
||||
jp2_getct(jas_image_clrspc(dec->image), 0, i + 1));
|
||||
}
|
||||
}
|
||||
/* Determine the type of each component. */
|
||||
if (dec->cdef) {
|
||||
for (i = 0; i < dec->numchans; ++i) {
|
||||
jas_image_setcmpttype(dec->image,
|
||||
dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo],
|
||||
jp2_getct(jas_image_clrspc(dec->image),
|
||||
dec->cdef->data.cdef.ents[i].type, dec->cdef->data.cdef.ents[i].assoc));
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < dec->numchans; ++i) {
|
||||
jas_image_setcmpttype(dec->image, dec->chantocmptlut[i],
|
||||
jp2_getct(jas_image_clrspc(dec->image), 0, i + 1));
|
||||
}
|
||||
}
|
||||
|
||||
/* Delete any components that are not of interest. */
|
||||
for (i = jas_image_numcmpts(dec->image); i > 0; --i) {
|
||||
if (jas_image_cmpttype(dec->image, i - 1) == JAS_IMAGE_CT_UNKNOWN) {
|
||||
jas_image_delcmpt(dec->image, i - 1);
|
||||
}
|
||||
}
|
||||
/* Delete any components that are not of interest. */
|
||||
for (i = jas_image_numcmpts(dec->image); i > 0; --i) {
|
||||
if (jas_image_cmpttype(dec->image, i - 1) == JAS_IMAGE_CT_UNKNOWN) {
|
||||
jas_image_delcmpt(dec->image, i - 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure that some components survived. */
|
||||
if (!jas_image_numcmpts(dec->image)) {
|
||||
jas_eprintf("error: no components\n");
|
||||
goto error;
|
||||
}
|
||||
/* Ensure that some components survived. */
|
||||
if (!jas_image_numcmpts(dec->image)) {
|
||||
jas_eprintf("error: no components\n");
|
||||
goto error;
|
||||
}
|
||||
#if 0
|
||||
jas_eprintf("no of components is %d\n", jas_image_numcmpts(dec->image));
|
||||
#endif
|
||||
|
||||
/* Prevent the image from being destroyed later. */
|
||||
image = dec->image;
|
||||
dec->image = 0;
|
||||
/* Prevent the image from being destroyed later. */
|
||||
image = dec->image;
|
||||
dec->image = 0;
|
||||
|
||||
jp2_dec_destroy(dec);
|
||||
jp2_dec_destroy(dec);
|
||||
|
||||
return image;
|
||||
return image;
|
||||
|
||||
error:
|
||||
if (box) {
|
||||
jp2_box_destroy(box);
|
||||
}
|
||||
if (dec) {
|
||||
jp2_dec_destroy(dec);
|
||||
}
|
||||
return 0;
|
||||
if (box) {
|
||||
jp2_box_destroy(box);
|
||||
}
|
||||
if (dec) {
|
||||
jp2_dec_destroy(dec);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int jp2_validate(jas_stream_t *in)
|
||||
{
|
||||
char buf[JP2_VALIDATELEN];
|
||||
int i;
|
||||
int n;
|
||||
char buf[JP2_VALIDATELEN];
|
||||
int i;
|
||||
int n;
|
||||
#if 0
|
||||
jas_stream_t *tmpstream;
|
||||
jp2_box_t *box;
|
||||
jas_stream_t *tmpstream;
|
||||
jp2_box_t *box;
|
||||
#endif
|
||||
|
||||
assert(JAS_STREAM_MAXPUTBACK >= JP2_VALIDATELEN);
|
||||
assert(JAS_STREAM_MAXPUTBACK >= JP2_VALIDATELEN);
|
||||
|
||||
/* Read the validation data (i.e., the data used for detecting
|
||||
the format). */
|
||||
if ((n = jas_stream_read(in, buf, JP2_VALIDATELEN)) < 0) {
|
||||
return -1;
|
||||
}
|
||||
/* Read the validation data (i.e., the data used for detecting
|
||||
the format). */
|
||||
if ((n = jas_stream_read(in, buf, JP2_VALIDATELEN)) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Put the validation data back onto the stream, so that the
|
||||
stream position will not be changed. */
|
||||
for (i = n - 1; i >= 0; --i) {
|
||||
if (jas_stream_ungetc(in, buf[i]) == EOF) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
/* Put the validation data back onto the stream, so that the
|
||||
stream position will not be changed. */
|
||||
for (i = n - 1; i >= 0; --i) {
|
||||
if (jas_stream_ungetc(in, buf[i]) == EOF) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Did we read enough data? */
|
||||
if (n < JP2_VALIDATELEN) {
|
||||
return -1;
|
||||
}
|
||||
/* Did we read enough data? */
|
||||
if (n < JP2_VALIDATELEN) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Is the box type correct? */
|
||||
if (((buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7]) !=
|
||||
JP2_BOX_JP)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
/* Is the box type correct? */
|
||||
if (((buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7]) !=
|
||||
JP2_BOX_JP)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static jp2_dec_t *jp2_dec_create(void)
|
||||
{
|
||||
jp2_dec_t *dec;
|
||||
jp2_dec_t *dec;
|
||||
|
||||
if (!(dec = jas_malloc(sizeof(jp2_dec_t)))) {
|
||||
return 0;
|
||||
}
|
||||
dec->ihdr = 0;
|
||||
dec->bpcc = 0;
|
||||
dec->cdef = 0;
|
||||
dec->pclr = 0;
|
||||
dec->image = 0;
|
||||
dec->chantocmptlut = 0;
|
||||
dec->cmap = 0;
|
||||
dec->colr = 0;
|
||||
return dec;
|
||||
if (!(dec = jas_malloc(sizeof(jp2_dec_t)))) {
|
||||
return 0;
|
||||
}
|
||||
dec->ihdr = 0;
|
||||
dec->bpcc = 0;
|
||||
dec->cdef = 0;
|
||||
dec->pclr = 0;
|
||||
dec->image = 0;
|
||||
dec->chantocmptlut = 0;
|
||||
dec->cmap = 0;
|
||||
dec->colr = 0;
|
||||
return dec;
|
||||
}
|
||||
|
||||
static void jp2_dec_destroy(jp2_dec_t *dec)
|
||||
{
|
||||
if (dec->ihdr) {
|
||||
jp2_box_destroy(dec->ihdr);
|
||||
}
|
||||
if (dec->bpcc) {
|
||||
jp2_box_destroy(dec->bpcc);
|
||||
}
|
||||
if (dec->cdef) {
|
||||
jp2_box_destroy(dec->cdef);
|
||||
}
|
||||
if (dec->pclr) {
|
||||
jp2_box_destroy(dec->pclr);
|
||||
}
|
||||
if (dec->image) {
|
||||
jas_image_destroy(dec->image);
|
||||
}
|
||||
if (dec->cmap) {
|
||||
jp2_box_destroy(dec->cmap);
|
||||
}
|
||||
if (dec->colr) {
|
||||
jp2_box_destroy(dec->colr);
|
||||
}
|
||||
if (dec->chantocmptlut) {
|
||||
jas_free(dec->chantocmptlut);
|
||||
}
|
||||
jas_free(dec);
|
||||
if (dec->ihdr) {
|
||||
jp2_box_destroy(dec->ihdr);
|
||||
}
|
||||
if (dec->bpcc) {
|
||||
jp2_box_destroy(dec->bpcc);
|
||||
}
|
||||
if (dec->cdef) {
|
||||
jp2_box_destroy(dec->cdef);
|
||||
}
|
||||
if (dec->pclr) {
|
||||
jp2_box_destroy(dec->pclr);
|
||||
}
|
||||
if (dec->image) {
|
||||
jas_image_destroy(dec->image);
|
||||
}
|
||||
if (dec->cmap) {
|
||||
jp2_box_destroy(dec->cmap);
|
||||
}
|
||||
if (dec->colr) {
|
||||
jp2_box_destroy(dec->colr);
|
||||
}
|
||||
if (dec->chantocmptlut) {
|
||||
jas_free(dec->chantocmptlut);
|
||||
}
|
||||
jas_free(dec);
|
||||
}
|
||||
|
||||
static int jp2_getct(int colorspace, int type, int assoc)
|
||||
{
|
||||
if (type == 1 && assoc == 0) {
|
||||
return JAS_IMAGE_CT_OPACITY;
|
||||
}
|
||||
if (type == 0 && assoc >= 1 && assoc <= 65534) {
|
||||
switch (colorspace) {
|
||||
case JAS_CLRSPC_FAM_RGB:
|
||||
switch (assoc) {
|
||||
case JP2_CDEF_RGB_R:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R);
|
||||
break;
|
||||
case JP2_CDEF_RGB_G:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G);
|
||||
break;
|
||||
case JP2_CDEF_RGB_B:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_YCBCR:
|
||||
switch (assoc) {
|
||||
case JP2_CDEF_YCBCR_Y:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_Y);
|
||||
break;
|
||||
case JP2_CDEF_YCBCR_CB:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CB);
|
||||
break;
|
||||
case JP2_CDEF_YCBCR_CR:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CR);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_GRAY:
|
||||
switch (assoc) {
|
||||
case JP2_CDEF_GRAY_Y:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return JAS_IMAGE_CT_COLOR(assoc - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return JAS_IMAGE_CT_UNKNOWN;
|
||||
if (type == 1 && assoc == 0) {
|
||||
return JAS_IMAGE_CT_OPACITY;
|
||||
}
|
||||
if (type == 0 && assoc >= 1 && assoc <= 65534) {
|
||||
switch (colorspace) {
|
||||
case JAS_CLRSPC_FAM_RGB:
|
||||
switch (assoc) {
|
||||
case JP2_CDEF_RGB_R:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R);
|
||||
break;
|
||||
case JP2_CDEF_RGB_G:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G);
|
||||
break;
|
||||
case JP2_CDEF_RGB_B:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_YCBCR:
|
||||
switch (assoc) {
|
||||
case JP2_CDEF_YCBCR_Y:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_Y);
|
||||
break;
|
||||
case JP2_CDEF_YCBCR_CB:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CB);
|
||||
break;
|
||||
case JP2_CDEF_YCBCR_CR:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CR);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_GRAY:
|
||||
switch (assoc) {
|
||||
case JP2_CDEF_GRAY_Y:
|
||||
return JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_GRAY_Y);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return JAS_IMAGE_CT_COLOR(assoc - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return JAS_IMAGE_CT_UNKNOWN;
|
||||
}
|
||||
|
||||
static int jp2_getcs(jp2_colr_t *colr)
|
||||
{
|
||||
if (colr->method == JP2_COLR_ENUM) {
|
||||
switch (colr->csid) {
|
||||
case JP2_COLR_SRGB:
|
||||
return JAS_CLRSPC_SRGB;
|
||||
break;
|
||||
case JP2_COLR_SYCC:
|
||||
return JAS_CLRSPC_SYCBCR;
|
||||
break;
|
||||
case JP2_COLR_SGRAY:
|
||||
return JAS_CLRSPC_SGRAY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return JAS_CLRSPC_UNKNOWN;
|
||||
if (colr->method == JP2_COLR_ENUM) {
|
||||
switch (colr->csid) {
|
||||
case JP2_COLR_SRGB:
|
||||
return JAS_CLRSPC_SRGB;
|
||||
break;
|
||||
case JP2_COLR_SYCC:
|
||||
return JAS_CLRSPC_SYCBCR;
|
||||
break;
|
||||
case JP2_COLR_SGRAY:
|
||||
return JAS_CLRSPC_SGRAY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return JAS_CLRSPC_UNKNOWN;
|
||||
}
|
||||
|
||||
static int fromiccpcs(int cs)
|
||||
{
|
||||
switch (cs) {
|
||||
case ICC_CS_RGB:
|
||||
return JAS_CLRSPC_GENRGB;
|
||||
break;
|
||||
case ICC_CS_YCBCR:
|
||||
return JAS_CLRSPC_GENYCBCR;
|
||||
break;
|
||||
case ICC_CS_GRAY:
|
||||
return JAS_CLRSPC_GENGRAY;
|
||||
break;
|
||||
}
|
||||
return JAS_CLRSPC_UNKNOWN;
|
||||
switch (cs) {
|
||||
case ICC_CS_RGB:
|
||||
return JAS_CLRSPC_GENRGB;
|
||||
break;
|
||||
case ICC_CS_YCBCR:
|
||||
return JAS_CLRSPC_GENYCBCR;
|
||||
break;
|
||||
case ICC_CS_GRAY:
|
||||
return JAS_CLRSPC_GENGRAY;
|
||||
break;
|
||||
}
|
||||
return JAS_CLRSPC_UNKNOWN;
|
||||
}
|
||||
|
||||
externo
+17
-17
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -70,15 +70,15 @@
|
||||
|
||||
typedef struct {
|
||||
|
||||
jp2_box_t *pclr;
|
||||
jp2_box_t *cdef;
|
||||
jp2_box_t *ihdr;
|
||||
jp2_box_t *bpcc;
|
||||
jp2_box_t *cmap;
|
||||
jp2_box_t *colr;
|
||||
jas_image_t *image;
|
||||
uint_fast16_t numchans;
|
||||
uint_fast16_t *chantocmptlut;
|
||||
jp2_box_t *pclr;
|
||||
jp2_box_t *cdef;
|
||||
jp2_box_t *ihdr;
|
||||
jp2_box_t *bpcc;
|
||||
jp2_box_t *cmap;
|
||||
jp2_box_t *colr;
|
||||
jas_image_t *image;
|
||||
uint_fast16_t numchans;
|
||||
uint_fast16_t *chantocmptlut;
|
||||
|
||||
} jp2_dec_t;
|
||||
|
||||
|
||||
externo
+355
-310
@@ -5,16 +5,21 @@
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by Andrey Kiselev <dron@remotesensing.org> to handle UUID
|
||||
* box properly.
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +27,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +62,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -86,23 +91,21 @@ static int clrspctojp2(jas_clrspc_t clrspc);
|
||||
* Functions.
|
||||
\******************************************************************************/
|
||||
|
||||
int jp2_encode(jas_image_t *image, jas_stream_t *out, char *optstr)
|
||||
int jp2_write_header(jas_image_t *image, jas_stream_t *out)
|
||||
{
|
||||
jp2_box_t *box;
|
||||
jp2_ftyp_t *ftyp;
|
||||
jp2_ihdr_t *ihdr;
|
||||
jas_stream_t *tmpstream;
|
||||
int allcmptssame;
|
||||
jp2_bpcc_t *bpcc;
|
||||
long len;
|
||||
uint_fast16_t cmptno;
|
||||
jp2_colr_t *colr;
|
||||
char buf[4096];
|
||||
uint_fast32_t overhead;
|
||||
jp2_cdefchan_t *cdefchanent;
|
||||
jp2_cdef_t *cdef;
|
||||
int i;
|
||||
uint_fast32_t typeasoc;
|
||||
jp2_box_t *box;
|
||||
jp2_ftyp_t *ftyp;
|
||||
jp2_ihdr_t *ihdr;
|
||||
jas_stream_t *tmpstream;
|
||||
int allcmptssame;
|
||||
jp2_bpcc_t *bpcc;
|
||||
long len;
|
||||
uint_fast16_t cmptno;
|
||||
jp2_colr_t *colr;
|
||||
jp2_cdefchan_t *cdefchanent;
|
||||
jp2_cdef_t *cdef;
|
||||
int i;
|
||||
uint_fast32_t typeasoc;
|
||||
jas_iccprof_t *iccprof;
|
||||
jas_stream_t *iccstream;
|
||||
int pos;
|
||||
@@ -110,327 +113,369 @@ int needcdef;
|
||||
int prec;
|
||||
int sgnd;
|
||||
|
||||
box = 0;
|
||||
tmpstream = 0;
|
||||
box = 0;
|
||||
tmpstream = 0;
|
||||
|
||||
allcmptssame = 1;
|
||||
sgnd = jas_image_cmptsgnd(image, 0);
|
||||
prec = jas_image_cmptprec(image, 0);
|
||||
for (i = 1; i < jas_image_numcmpts(image); ++i) {
|
||||
if (jas_image_cmptsgnd(image, i) != sgnd ||
|
||||
jas_image_cmptprec(image, i) != prec) {
|
||||
allcmptssame = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
allcmptssame = 1;
|
||||
sgnd = jas_image_cmptsgnd(image, 0);
|
||||
prec = jas_image_cmptprec(image, 0);
|
||||
for (i = 1; i < jas_image_numcmpts(image); ++i) {
|
||||
if (jas_image_cmptsgnd(image, i) != sgnd ||
|
||||
jas_image_cmptprec(image, i) != prec) {
|
||||
allcmptssame = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Output the signature box. */
|
||||
/* Output the signature box. */
|
||||
|
||||
if (!(box = jp2_box_create(JP2_BOX_JP))) {
|
||||
goto error;
|
||||
}
|
||||
box->data.jp.magic = JP2_JP_MAGIC;
|
||||
if (jp2_box_put(box, out)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
if (!(box = jp2_box_create(JP2_BOX_JP))) {
|
||||
goto error;
|
||||
}
|
||||
box->data.jp.magic = JP2_JP_MAGIC;
|
||||
if (jp2_box_put(box, out)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
|
||||
/* Output the file type box. */
|
||||
/* Output the file type box. */
|
||||
|
||||
if (!(box = jp2_box_create(JP2_BOX_FTYP))) {
|
||||
goto error;
|
||||
}
|
||||
ftyp = &box->data.ftyp;
|
||||
ftyp->majver = JP2_FTYP_MAJVER;
|
||||
ftyp->minver = JP2_FTYP_MINVER;
|
||||
ftyp->numcompatcodes = 1;
|
||||
ftyp->compatcodes[0] = JP2_FTYP_COMPATCODE;
|
||||
if (jp2_box_put(box, out)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
if (!(box = jp2_box_create(JP2_BOX_FTYP))) {
|
||||
goto error;
|
||||
}
|
||||
ftyp = &box->data.ftyp;
|
||||
ftyp->majver = JP2_FTYP_MAJVER;
|
||||
ftyp->minver = JP2_FTYP_MINVER;
|
||||
ftyp->numcompatcodes = 1;
|
||||
ftyp->compatcodes[0] = JP2_FTYP_COMPATCODE;
|
||||
if (jp2_box_put(box, out)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
|
||||
/*
|
||||
* Generate the data portion of the JP2 header box.
|
||||
* We cannot simply output the header for this box
|
||||
* since we do not yet know the correct value for the length
|
||||
* field.
|
||||
*/
|
||||
/*
|
||||
* Generate the data portion of the JP2 header box.
|
||||
* We cannot simply output the header for this box
|
||||
* since we do not yet know the correct value for the length
|
||||
* field.
|
||||
*/
|
||||
|
||||
if (!(tmpstream = jas_stream_memopen(0, 0))) {
|
||||
goto error;
|
||||
}
|
||||
if (!(tmpstream = jas_stream_memopen(0, 0))) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Generate image header box. */
|
||||
/* Generate image header box. */
|
||||
|
||||
if (!(box = jp2_box_create(JP2_BOX_IHDR))) {
|
||||
goto error;
|
||||
}
|
||||
ihdr = &box->data.ihdr;
|
||||
ihdr->width = jas_image_width(image);
|
||||
ihdr->height = jas_image_height(image);
|
||||
ihdr->numcmpts = jas_image_numcmpts(image);
|
||||
ihdr->bpc = allcmptssame ? JP2_SPTOBPC(jas_image_cmptsgnd(image, 0),
|
||||
jas_image_cmptprec(image, 0)) : JP2_IHDR_BPCNULL;
|
||||
ihdr->comptype = JP2_IHDR_COMPTYPE;
|
||||
ihdr->csunk = 0;
|
||||
ihdr->ipr = 0;
|
||||
if (jp2_box_put(box, tmpstream)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
if (!(box = jp2_box_create(JP2_BOX_IHDR))) {
|
||||
goto error;
|
||||
}
|
||||
ihdr = &box->data.ihdr;
|
||||
ihdr->width = jas_image_width(image);
|
||||
ihdr->height = jas_image_height(image);
|
||||
ihdr->numcmpts = jas_image_numcmpts(image);
|
||||
ihdr->bpc = allcmptssame ? JP2_SPTOBPC(jas_image_cmptsgnd(image, 0),
|
||||
jas_image_cmptprec(image, 0)) : JP2_IHDR_BPCNULL;
|
||||
ihdr->comptype = JP2_IHDR_COMPTYPE;
|
||||
ihdr->csunk = 0;
|
||||
ihdr->ipr = 0;
|
||||
if (jp2_box_put(box, tmpstream)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
|
||||
/* Generate bits per component box. */
|
||||
/* Generate bits per component box. */
|
||||
|
||||
if (!allcmptssame) {
|
||||
if (!(box = jp2_box_create(JP2_BOX_BPCC))) {
|
||||
goto error;
|
||||
}
|
||||
bpcc = &box->data.bpcc;
|
||||
bpcc->numcmpts = jas_image_numcmpts(image);
|
||||
if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts *
|
||||
sizeof(uint_fast8_t)))) {
|
||||
goto error;
|
||||
}
|
||||
for (cmptno = 0; cmptno < bpcc->numcmpts; ++cmptno) {
|
||||
bpcc->bpcs[cmptno] = JP2_SPTOBPC(jas_image_cmptsgnd(image,
|
||||
cmptno), jas_image_cmptprec(image, cmptno));
|
||||
}
|
||||
if (jp2_box_put(box, tmpstream)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
}
|
||||
if (!allcmptssame) {
|
||||
if (!(box = jp2_box_create(JP2_BOX_BPCC))) {
|
||||
goto error;
|
||||
}
|
||||
bpcc = &box->data.bpcc;
|
||||
bpcc->numcmpts = jas_image_numcmpts(image);
|
||||
if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts,
|
||||
sizeof(uint_fast8_t)))) {
|
||||
goto error;
|
||||
}
|
||||
for (cmptno = 0; cmptno < bpcc->numcmpts; ++cmptno) {
|
||||
bpcc->bpcs[cmptno] = JP2_SPTOBPC(jas_image_cmptsgnd(image,
|
||||
cmptno), jas_image_cmptprec(image, cmptno));
|
||||
}
|
||||
if (jp2_box_put(box, tmpstream)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
}
|
||||
|
||||
/* Generate color specification box. */
|
||||
/* Generate color specification box. */
|
||||
|
||||
if (!(box = jp2_box_create(JP2_BOX_COLR))) {
|
||||
goto error;
|
||||
}
|
||||
colr = &box->data.colr;
|
||||
switch (jas_image_clrspc(image)) {
|
||||
case JAS_CLRSPC_SRGB:
|
||||
case JAS_CLRSPC_SYCBCR:
|
||||
case JAS_CLRSPC_SGRAY:
|
||||
colr->method = JP2_COLR_ENUM;
|
||||
colr->csid = clrspctojp2(jas_image_clrspc(image));
|
||||
colr->pri = JP2_COLR_PRI;
|
||||
colr->approx = 0;
|
||||
break;
|
||||
default:
|
||||
colr->method = JP2_COLR_ICC;
|
||||
colr->pri = JP2_COLR_PRI;
|
||||
colr->approx = 0;
|
||||
iccprof = jas_iccprof_createfromcmprof(jas_image_cmprof(image));
|
||||
assert(iccprof);
|
||||
iccstream = jas_stream_memopen(0, 0);
|
||||
assert(iccstream);
|
||||
if (jas_iccprof_save(iccprof, iccstream))
|
||||
abort();
|
||||
if ((pos = jas_stream_tell(iccstream)) < 0)
|
||||
abort();
|
||||
colr->iccplen = pos;
|
||||
colr->iccp = jas_malloc(pos);
|
||||
assert(colr->iccp);
|
||||
jas_stream_rewind(iccstream);
|
||||
if (jas_stream_read(iccstream, colr->iccp, colr->iccplen) != colr->iccplen)
|
||||
abort();
|
||||
jas_stream_close(iccstream);
|
||||
jas_iccprof_destroy(iccprof);
|
||||
break;
|
||||
}
|
||||
if (jp2_box_put(box, tmpstream)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
if (!(box = jp2_box_create(JP2_BOX_COLR))) {
|
||||
goto error;
|
||||
}
|
||||
colr = &box->data.colr;
|
||||
switch (jas_image_clrspc(image)) {
|
||||
case JAS_CLRSPC_SRGB:
|
||||
case JAS_CLRSPC_SYCBCR:
|
||||
case JAS_CLRSPC_SGRAY:
|
||||
colr->method = JP2_COLR_ENUM;
|
||||
colr->csid = clrspctojp2(jas_image_clrspc(image));
|
||||
colr->pri = JP2_COLR_PRI;
|
||||
colr->approx = 0;
|
||||
break;
|
||||
default:
|
||||
colr->method = JP2_COLR_ICC;
|
||||
colr->pri = JP2_COLR_PRI;
|
||||
colr->approx = 0;
|
||||
iccprof = jas_iccprof_createfromcmprof(jas_image_cmprof(image));
|
||||
assert(iccprof);
|
||||
iccstream = jas_stream_memopen(0, 0);
|
||||
assert(iccstream);
|
||||
if (jas_iccprof_save(iccprof, iccstream))
|
||||
abort();
|
||||
if ((pos = jas_stream_tell(iccstream)) < 0)
|
||||
abort();
|
||||
colr->iccplen = pos;
|
||||
colr->iccp = jas_malloc(pos);
|
||||
assert(colr->iccp);
|
||||
jas_stream_rewind(iccstream);
|
||||
if (jas_stream_read(iccstream, colr->iccp, colr->iccplen) != colr->iccplen)
|
||||
abort();
|
||||
jas_stream_close(iccstream);
|
||||
jas_iccprof_destroy(iccprof);
|
||||
break;
|
||||
}
|
||||
if (jp2_box_put(box, tmpstream)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
|
||||
needcdef = 1;
|
||||
switch (jas_clrspc_fam(jas_image_clrspc(image))) {
|
||||
case JAS_CLRSPC_FAM_RGB:
|
||||
if (jas_image_cmpttype(image, 0) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R) &&
|
||||
jas_image_cmpttype(image, 1) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G) &&
|
||||
jas_image_cmpttype(image, 2) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B))
|
||||
needcdef = 0;
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_YCBCR:
|
||||
if (jas_image_cmpttype(image, 0) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_Y) &&
|
||||
jas_image_cmpttype(image, 1) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CB) &&
|
||||
jas_image_cmpttype(image, 2) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CR))
|
||||
needcdef = 0;
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_GRAY:
|
||||
if (jas_image_cmpttype(image, 0) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_GRAY_Y))
|
||||
needcdef = 0;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
needcdef = 1;
|
||||
switch (jas_clrspc_fam(jas_image_clrspc(image))) {
|
||||
case JAS_CLRSPC_FAM_RGB:
|
||||
if (jas_image_cmpttype(image, 0) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_R) &&
|
||||
jas_image_cmpttype(image, 1) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_G) &&
|
||||
jas_image_cmpttype(image, 2) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_RGB_B))
|
||||
needcdef = 0;
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_YCBCR:
|
||||
if (jas_image_cmpttype(image, 0) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_Y) &&
|
||||
jas_image_cmpttype(image, 1) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CB) &&
|
||||
jas_image_cmpttype(image, 2) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_CLRSPC_CHANIND_YCBCR_CR))
|
||||
needcdef = 0;
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_GRAY:
|
||||
if (jas_image_cmpttype(image, 0) ==
|
||||
JAS_IMAGE_CT_COLOR(JAS_IMAGE_CT_GRAY_Y))
|
||||
needcdef = 0;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
|
||||
if (needcdef) {
|
||||
if (!(box = jp2_box_create(JP2_BOX_CDEF))) {
|
||||
goto error;
|
||||
}
|
||||
cdef = &box->data.cdef;
|
||||
cdef->numchans = jas_image_numcmpts(image);
|
||||
cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t));
|
||||
for (i = 0; i < jas_image_numcmpts(image); ++i) {
|
||||
cdefchanent = &cdef->ents[i];
|
||||
cdefchanent->channo = i;
|
||||
typeasoc = jp2_gettypeasoc(jas_image_clrspc(image), jas_image_cmpttype(image, i));
|
||||
cdefchanent->type = typeasoc >> 16;
|
||||
cdefchanent->assoc = typeasoc & 0x7fff;
|
||||
}
|
||||
if (jp2_box_put(box, tmpstream)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
}
|
||||
if (needcdef) {
|
||||
if (!(box = jp2_box_create(JP2_BOX_CDEF))) {
|
||||
goto error;
|
||||
}
|
||||
cdef = &box->data.cdef;
|
||||
cdef->numchans = jas_image_numcmpts(image);
|
||||
cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t));
|
||||
for (i = 0; i < jas_image_numcmpts(image); ++i) {
|
||||
cdefchanent = &cdef->ents[i];
|
||||
cdefchanent->channo = i;
|
||||
typeasoc = jp2_gettypeasoc(jas_image_clrspc(image), jas_image_cmpttype(image, i));
|
||||
cdefchanent->type = typeasoc >> 16;
|
||||
cdefchanent->assoc = typeasoc & 0x7fff;
|
||||
}
|
||||
if (jp2_box_put(box, tmpstream)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
}
|
||||
|
||||
/* Determine the total length of the JP2 header box. */
|
||||
/* Determine the total length of the JP2 header box. */
|
||||
|
||||
len = jas_stream_tell(tmpstream);
|
||||
jas_stream_rewind(tmpstream);
|
||||
len = jas_stream_tell(tmpstream);
|
||||
jas_stream_rewind(tmpstream);
|
||||
|
||||
/*
|
||||
* Output the JP2 header box and all of the boxes which it contains.
|
||||
*/
|
||||
/*
|
||||
* Output the JP2 header box and all of the boxes which it contains.
|
||||
*/
|
||||
|
||||
if (!(box = jp2_box_create(JP2_BOX_JP2H))) {
|
||||
goto error;
|
||||
}
|
||||
box->len = len + JP2_BOX_HDRLEN(false);
|
||||
if (jp2_box_put(box, out)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
if (!(box = jp2_box_create(JP2_BOX_JP2H))) {
|
||||
goto error;
|
||||
}
|
||||
box->len = len + JP2_BOX_HDRLEN(false);
|
||||
if (jp2_box_put(box, out)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
|
||||
if (jas_stream_copy(out, tmpstream, len)) {
|
||||
goto error;
|
||||
}
|
||||
if (jas_stream_copy(out, tmpstream, len)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
jas_stream_close(tmpstream);
|
||||
tmpstream = 0;
|
||||
jas_stream_close(tmpstream);
|
||||
tmpstream = 0;
|
||||
|
||||
/*
|
||||
* Output the contiguous code stream box.
|
||||
*/
|
||||
|
||||
if (!(box = jp2_box_create(JP2_BOX_JP2C))) {
|
||||
goto error;
|
||||
}
|
||||
box->len = 0;
|
||||
if (jp2_box_put(box, out)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
|
||||
/* Output the JPEG-2000 code stream. */
|
||||
|
||||
overhead = jas_stream_getrwcount(out);
|
||||
sprintf(buf, "%s\n_jp2overhead=%lu\n", (optstr ? optstr : ""),
|
||||
(unsigned long) overhead);
|
||||
|
||||
if (jpc_encode(image, out, buf)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
return 0;
|
||||
abort();
|
||||
return 0;
|
||||
abort();
|
||||
|
||||
error:
|
||||
|
||||
if (box) {
|
||||
jp2_box_destroy(box);
|
||||
}
|
||||
if (tmpstream) {
|
||||
jas_stream_close(tmpstream);
|
||||
}
|
||||
return -1;
|
||||
if (box) {
|
||||
jp2_box_destroy(box);
|
||||
}
|
||||
if (tmpstream) {
|
||||
jas_stream_close(tmpstream);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int jp2_write_codestream(jas_image_t *image, jas_stream_t *out, char *optstr)
|
||||
{
|
||||
jp2_box_t *box;
|
||||
char buf[4096];
|
||||
uint_fast32_t overhead;
|
||||
|
||||
/*
|
||||
* Output the contiguous code stream box.
|
||||
*/
|
||||
|
||||
if (!(box = jp2_box_create(JP2_BOX_JP2C))) {
|
||||
goto error;
|
||||
}
|
||||
box->len = 0;
|
||||
if (jp2_box_put(box, out)) {
|
||||
goto error;
|
||||
}
|
||||
jp2_box_destroy(box);
|
||||
box = 0;
|
||||
|
||||
/* Output the JPEG-2000 code stream. */
|
||||
|
||||
overhead = jas_stream_getrwcount(out);
|
||||
sprintf(buf, "%s\n_jp2overhead=%lu\n", (optstr ? optstr : ""),
|
||||
(unsigned long) overhead);
|
||||
|
||||
if (jpc_encode(image, out, buf)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
return 0;
|
||||
abort();
|
||||
|
||||
error:
|
||||
|
||||
if (box) {
|
||||
jp2_box_destroy(box);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int jp2_encode(jas_image_t *image, jas_stream_t *out, char *optstr)
|
||||
{
|
||||
if (jp2_write_header(image, out) < 0)
|
||||
return -1;
|
||||
if (jp2_write_codestream(image, out, optstr) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int jp2_encode_uuid(jas_image_t *image, jas_stream_t *out,
|
||||
char *optstr, jp2_box_t *uuid)
|
||||
{
|
||||
if (jp2_write_header(image, out) < 0)
|
||||
return -1;
|
||||
if (uuid) {
|
||||
if (jp2_box_put(uuid, out))
|
||||
return -1;
|
||||
}
|
||||
if (jp2_write_codestream(image, out, optstr) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint_fast32_t jp2_gettypeasoc(int colorspace, int ctype)
|
||||
{
|
||||
int type;
|
||||
int asoc;
|
||||
int type;
|
||||
int asoc;
|
||||
|
||||
if (ctype & JAS_IMAGE_CT_OPACITY) {
|
||||
type = JP2_CDEF_TYPE_OPACITY;
|
||||
asoc = JP2_CDEF_ASOC_ALL;
|
||||
goto done;
|
||||
}
|
||||
if (ctype & JAS_IMAGE_CT_OPACITY) {
|
||||
type = JP2_CDEF_TYPE_OPACITY;
|
||||
asoc = JP2_CDEF_ASOC_ALL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
type = JP2_CDEF_TYPE_UNSPEC;
|
||||
asoc = JP2_CDEF_ASOC_NONE;
|
||||
switch (jas_clrspc_fam(colorspace)) {
|
||||
case JAS_CLRSPC_FAM_RGB:
|
||||
switch (JAS_IMAGE_CT_COLOR(ctype)) {
|
||||
case JAS_IMAGE_CT_RGB_R:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_RGB_R;
|
||||
break;
|
||||
case JAS_IMAGE_CT_RGB_G:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_RGB_G;
|
||||
break;
|
||||
case JAS_IMAGE_CT_RGB_B:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_RGB_B;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_YCBCR:
|
||||
switch (JAS_IMAGE_CT_COLOR(ctype)) {
|
||||
case JAS_IMAGE_CT_YCBCR_Y:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_YCBCR_Y;
|
||||
break;
|
||||
case JAS_IMAGE_CT_YCBCR_CB:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_YCBCR_CB;
|
||||
break;
|
||||
case JAS_IMAGE_CT_YCBCR_CR:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_YCBCR_CR;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_GRAY:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_GRAY_Y;
|
||||
break;
|
||||
}
|
||||
type = JP2_CDEF_TYPE_UNSPEC;
|
||||
asoc = JP2_CDEF_ASOC_NONE;
|
||||
switch (jas_clrspc_fam(colorspace)) {
|
||||
case JAS_CLRSPC_FAM_RGB:
|
||||
switch (JAS_IMAGE_CT_COLOR(ctype)) {
|
||||
case JAS_IMAGE_CT_RGB_R:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_RGB_R;
|
||||
break;
|
||||
case JAS_IMAGE_CT_RGB_G:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_RGB_G;
|
||||
break;
|
||||
case JAS_IMAGE_CT_RGB_B:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_RGB_B;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_YCBCR:
|
||||
switch (JAS_IMAGE_CT_COLOR(ctype)) {
|
||||
case JAS_IMAGE_CT_YCBCR_Y:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_YCBCR_Y;
|
||||
break;
|
||||
case JAS_IMAGE_CT_YCBCR_CB:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_YCBCR_CB;
|
||||
break;
|
||||
case JAS_IMAGE_CT_YCBCR_CR:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_YCBCR_CR;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case JAS_CLRSPC_FAM_GRAY:
|
||||
type = JP2_CDEF_TYPE_COLOR;
|
||||
asoc = JP2_CDEF_GRAY_Y;
|
||||
break;
|
||||
}
|
||||
|
||||
done:
|
||||
return (type << 16) | asoc;
|
||||
return (type << 16) | asoc;
|
||||
}
|
||||
|
||||
static int clrspctojp2(jas_clrspc_t clrspc)
|
||||
{
|
||||
switch (clrspc) {
|
||||
case JAS_CLRSPC_SRGB:
|
||||
return JP2_COLR_SRGB;
|
||||
case JAS_CLRSPC_SYCBCR:
|
||||
return JP2_COLR_SYCC;
|
||||
case JAS_CLRSPC_SGRAY:
|
||||
return JP2_COLR_SGRAY;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
switch (clrspc) {
|
||||
case JAS_CLRSPC_SRGB:
|
||||
return JP2_COLR_SRGB;
|
||||
case JAS_CLRSPC_SYCBCR:
|
||||
return JP2_COLR_SYCC;
|
||||
case JAS_CLRSPC_SGRAY:
|
||||
return JP2_COLR_SGRAY;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
externo
+245
-245
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -94,73 +94,73 @@ static jpc_bitstream_t *jpc_bitstream_alloc(void);
|
||||
/* Open a bit stream from a stream. */
|
||||
jpc_bitstream_t *jpc_bitstream_sopen(jas_stream_t *stream, char *mode)
|
||||
{
|
||||
jpc_bitstream_t *bitstream;
|
||||
jpc_bitstream_t *bitstream;
|
||||
|
||||
/* Ensure that the open mode is valid. */
|
||||
/* Ensure that the open mode is valid. */
|
||||
#if 1
|
||||
/* This causes a string literal too long error (with c99 pedantic mode). */
|
||||
assert(!strcmp(mode, "r") || !strcmp(mode, "w") || !strcmp(mode, "r+")
|
||||
|| !strcmp(mode, "w+"));
|
||||
assert(!strcmp(mode, "r") || !strcmp(mode, "w") || !strcmp(mode, "r+")
|
||||
|| !strcmp(mode, "w+"));
|
||||
#endif
|
||||
|
||||
if (!(bitstream = jpc_bitstream_alloc())) {
|
||||
return 0;
|
||||
}
|
||||
if (!(bitstream = jpc_bitstream_alloc())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* By default, do not close the underlying (character) stream, upon
|
||||
the close of the bit stream. */
|
||||
bitstream->flags_ = JPC_BITSTREAM_NOCLOSE;
|
||||
/* By default, do not close the underlying (character) stream, upon
|
||||
the close of the bit stream. */
|
||||
bitstream->flags_ = JPC_BITSTREAM_NOCLOSE;
|
||||
|
||||
bitstream->stream_ = stream;
|
||||
bitstream->openmode_ = (mode[0] == 'w') ? JPC_BITSTREAM_WRITE :
|
||||
JPC_BITSTREAM_READ;
|
||||
bitstream->stream_ = stream;
|
||||
bitstream->openmode_ = (mode[0] == 'w') ? JPC_BITSTREAM_WRITE :
|
||||
JPC_BITSTREAM_READ;
|
||||
|
||||
/* Mark the data buffer as empty. */
|
||||
bitstream->cnt_ = (bitstream->openmode_ == JPC_BITSTREAM_READ) ? 0 : 8;
|
||||
bitstream->buf_ = 0;
|
||||
/* Mark the data buffer as empty. */
|
||||
bitstream->cnt_ = (bitstream->openmode_ == JPC_BITSTREAM_READ) ? 0 : 8;
|
||||
bitstream->buf_ = 0;
|
||||
|
||||
return bitstream;
|
||||
return bitstream;
|
||||
}
|
||||
|
||||
/* Close a bit stream. */
|
||||
int jpc_bitstream_close(jpc_bitstream_t *bitstream)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret = 0;
|
||||
|
||||
/* Align to the next byte boundary while considering the effects of
|
||||
bit stuffing. */
|
||||
if (jpc_bitstream_align(bitstream)) {
|
||||
ret = -1;
|
||||
}
|
||||
/* Align to the next byte boundary while considering the effects of
|
||||
bit stuffing. */
|
||||
if (jpc_bitstream_align(bitstream)) {
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
/* If necessary, close the underlying (character) stream. */
|
||||
if (!(bitstream->flags_ & JPC_BITSTREAM_NOCLOSE) && bitstream->stream_) {
|
||||
if (jas_stream_close(bitstream->stream_)) {
|
||||
ret = -1;
|
||||
}
|
||||
bitstream->stream_ = 0;
|
||||
}
|
||||
/* If necessary, close the underlying (character) stream. */
|
||||
if (!(bitstream->flags_ & JPC_BITSTREAM_NOCLOSE) && bitstream->stream_) {
|
||||
if (jas_stream_close(bitstream->stream_)) {
|
||||
ret = -1;
|
||||
}
|
||||
bitstream->stream_ = 0;
|
||||
}
|
||||
|
||||
jas_free(bitstream);
|
||||
return ret;
|
||||
jas_free(bitstream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Allocate a new bit stream. */
|
||||
static jpc_bitstream_t *jpc_bitstream_alloc()
|
||||
{
|
||||
jpc_bitstream_t *bitstream;
|
||||
jpc_bitstream_t *bitstream;
|
||||
|
||||
/* Allocate memory for the new bit stream object. */
|
||||
if (!(bitstream = jas_malloc(sizeof(jpc_bitstream_t)))) {
|
||||
return 0;
|
||||
}
|
||||
/* Initialize all of the data members. */
|
||||
bitstream->stream_ = 0;
|
||||
bitstream->cnt_ = 0;
|
||||
bitstream->flags_ = 0;
|
||||
bitstream->openmode_ = 0;
|
||||
/* Allocate memory for the new bit stream object. */
|
||||
if (!(bitstream = jas_malloc(sizeof(jpc_bitstream_t)))) {
|
||||
return 0;
|
||||
}
|
||||
/* Initialize all of the data members. */
|
||||
bitstream->stream_ = 0;
|
||||
bitstream->cnt_ = 0;
|
||||
bitstream->flags_ = 0;
|
||||
bitstream->openmode_ = 0;
|
||||
|
||||
return bitstream;
|
||||
return bitstream;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -170,64 +170,64 @@ static jpc_bitstream_t *jpc_bitstream_alloc()
|
||||
/* Get a bit from a bit stream. */
|
||||
int jpc_bitstream_getbit_func(jpc_bitstream_t *bitstream)
|
||||
{
|
||||
int ret;
|
||||
JAS_DBGLOG(1000, ("jpc_bitstream_getbit_func(%p)\n", bitstream));
|
||||
ret = jpc_bitstream_getbit_macro(bitstream);
|
||||
JAS_DBGLOG(1000, ("jpc_bitstream_getbit_func -> %d\n", ret));
|
||||
return ret;
|
||||
int ret;
|
||||
JAS_DBGLOG(1000, ("jpc_bitstream_getbit_func(%p)\n", bitstream));
|
||||
ret = jpc_bitstream_getbit_macro(bitstream);
|
||||
JAS_DBGLOG(1000, ("jpc_bitstream_getbit_func -> %d\n", ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Put a bit to a bit stream. */
|
||||
int jpc_bitstream_putbit_func(jpc_bitstream_t *bitstream, int b)
|
||||
{
|
||||
int ret;
|
||||
JAS_DBGLOG(1000, ("jpc_bitstream_putbit_func(%p, %d)\n", bitstream, b));
|
||||
ret = jpc_bitstream_putbit_macro(bitstream, b);
|
||||
JAS_DBGLOG(1000, ("jpc_bitstream_putbit_func() -> %d\n", ret));
|
||||
return ret;
|
||||
int ret;
|
||||
JAS_DBGLOG(1000, ("jpc_bitstream_putbit_func(%p, %d)\n", bitstream, b));
|
||||
ret = jpc_bitstream_putbit_macro(bitstream, b);
|
||||
JAS_DBGLOG(1000, ("jpc_bitstream_putbit_func() -> %d\n", ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Get one or more bits from a bit stream. */
|
||||
long jpc_bitstream_getbits(jpc_bitstream_t *bitstream, int n)
|
||||
{
|
||||
long v;
|
||||
int u;
|
||||
long v;
|
||||
int u;
|
||||
|
||||
/* We can reliably get at most 31 bits since ISO/IEC 9899 only
|
||||
guarantees that a long can represent values up to 2^31-1. */
|
||||
assert(n >= 0 && n < 32);
|
||||
/* We can reliably get at most 31 bits since ISO/IEC 9899 only
|
||||
guarantees that a long can represent values up to 2^31-1. */
|
||||
assert(n >= 0 && n < 32);
|
||||
|
||||
/* Get the number of bits requested from the specified bit stream. */
|
||||
v = 0;
|
||||
while (--n >= 0) {
|
||||
if ((u = jpc_bitstream_getbit(bitstream)) < 0) {
|
||||
return -1;
|
||||
}
|
||||
v = (v << 1) | u;
|
||||
}
|
||||
return v;
|
||||
/* Get the number of bits requested from the specified bit stream. */
|
||||
v = 0;
|
||||
while (--n >= 0) {
|
||||
if ((u = jpc_bitstream_getbit(bitstream)) < 0) {
|
||||
return -1;
|
||||
}
|
||||
v = (v << 1) | u;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
/* Put one or more bits to a bit stream. */
|
||||
int jpc_bitstream_putbits(jpc_bitstream_t *bitstream, int n, long v)
|
||||
{
|
||||
int m;
|
||||
int m;
|
||||
|
||||
/* We can reliably put at most 31 bits since ISO/IEC 9899 only
|
||||
guarantees that a long can represent values up to 2^31-1. */
|
||||
assert(n >= 0 && n < 32);
|
||||
/* Ensure that only the bits to be output are nonzero. */
|
||||
assert(!(v & (~JAS_ONES(n))));
|
||||
/* We can reliably put at most 31 bits since ISO/IEC 9899 only
|
||||
guarantees that a long can represent values up to 2^31-1. */
|
||||
assert(n >= 0 && n < 32);
|
||||
/* Ensure that only the bits to be output are nonzero. */
|
||||
assert(!(v & (~JAS_ONES(n))));
|
||||
|
||||
/* Put the desired number of bits to the specified bit stream. */
|
||||
m = n - 1;
|
||||
while (--n >= 0) {
|
||||
if (jpc_bitstream_putbit(bitstream, (v >> m) & 1) == EOF) {
|
||||
return EOF;
|
||||
}
|
||||
v <<= 1;
|
||||
}
|
||||
return 0;
|
||||
/* Put the desired number of bits to the specified bit stream. */
|
||||
m = n - 1;
|
||||
while (--n >= 0) {
|
||||
if (jpc_bitstream_putbit(bitstream, (v >> m) & 1) == EOF) {
|
||||
return EOF;
|
||||
}
|
||||
v <<= 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -237,30 +237,30 @@ int jpc_bitstream_putbits(jpc_bitstream_t *bitstream, int n, long v)
|
||||
/* Fill the buffer for a bit stream. */
|
||||
int jpc_bitstream_fillbuf(jpc_bitstream_t *bitstream)
|
||||
{
|
||||
int c;
|
||||
/* Note: The count has already been decremented by the caller. */
|
||||
assert(bitstream->openmode_ & JPC_BITSTREAM_READ);
|
||||
assert(bitstream->cnt_ <= 0);
|
||||
int c;
|
||||
/* Note: The count has already been decremented by the caller. */
|
||||
assert(bitstream->openmode_ & JPC_BITSTREAM_READ);
|
||||
assert(bitstream->cnt_ <= 0);
|
||||
|
||||
if (bitstream->flags_ & JPC_BITSTREAM_ERR) {
|
||||
bitstream->cnt_ = 0;
|
||||
return -1;
|
||||
}
|
||||
if (bitstream->flags_ & JPC_BITSTREAM_ERR) {
|
||||
bitstream->cnt_ = 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (bitstream->flags_ & JPC_BITSTREAM_EOF) {
|
||||
bitstream->buf_ = 0x7f;
|
||||
bitstream->cnt_ = 7;
|
||||
return 1;
|
||||
}
|
||||
if (bitstream->flags_ & JPC_BITSTREAM_EOF) {
|
||||
bitstream->buf_ = 0x7f;
|
||||
bitstream->cnt_ = 7;
|
||||
return 1;
|
||||
}
|
||||
|
||||
bitstream->buf_ = (bitstream->buf_ << 8) & 0xffff;
|
||||
if ((c = jas_stream_getc((bitstream)->stream_)) == EOF) {
|
||||
bitstream->flags_ |= JPC_BITSTREAM_EOF;
|
||||
return 1;
|
||||
}
|
||||
bitstream->cnt_ = (bitstream->buf_ == 0xff00) ? 6 : 7;
|
||||
bitstream->buf_ |= c & ((1 << (bitstream->cnt_ + 1)) - 1);
|
||||
return (bitstream->buf_ >> bitstream->cnt_) & 1;
|
||||
bitstream->buf_ = (bitstream->buf_ << 8) & 0xffff;
|
||||
if ((c = jas_stream_getc((bitstream)->stream_)) == EOF) {
|
||||
bitstream->flags_ |= JPC_BITSTREAM_EOF;
|
||||
return 1;
|
||||
}
|
||||
bitstream->cnt_ = (bitstream->buf_ == 0xff00) ? 6 : 7;
|
||||
bitstream->buf_ |= c & ((1 << (bitstream->cnt_ + 1)) - 1);
|
||||
return (bitstream->buf_ >> bitstream->cnt_) & 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -272,169 +272,169 @@ int jpc_bitstream_fillbuf(jpc_bitstream_t *bitstream)
|
||||
the effects of bit stuffing)? */
|
||||
int jpc_bitstream_needalign(jpc_bitstream_t *bitstream)
|
||||
{
|
||||
if (bitstream->openmode_ & JPC_BITSTREAM_READ) {
|
||||
/* The bit stream is open for reading. */
|
||||
/* If there are any bits buffered for reading, or the
|
||||
previous byte forced a stuffed bit, alignment is
|
||||
required. */
|
||||
if ((bitstream->cnt_ < 8 && bitstream->cnt_ > 0) ||
|
||||
((bitstream->buf_ >> 8) & 0xff) == 0xff) {
|
||||
return 1;
|
||||
}
|
||||
} else if (bitstream->openmode_ & JPC_BITSTREAM_WRITE) {
|
||||
/* The bit stream is open for writing. */
|
||||
/* If there are any bits buffered for writing, or the
|
||||
previous byte forced a stuffed bit, alignment is
|
||||
required. */
|
||||
if ((bitstream->cnt_ < 8 && bitstream->cnt_ >= 0) ||
|
||||
((bitstream->buf_ >> 8) & 0xff) == 0xff) {
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
/* This should not happen. Famous last words, eh? :-) */
|
||||
assert(0);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
if (bitstream->openmode_ & JPC_BITSTREAM_READ) {
|
||||
/* The bit stream is open for reading. */
|
||||
/* If there are any bits buffered for reading, or the
|
||||
previous byte forced a stuffed bit, alignment is
|
||||
required. */
|
||||
if ((bitstream->cnt_ < 8 && bitstream->cnt_ > 0) ||
|
||||
((bitstream->buf_ >> 8) & 0xff) == 0xff) {
|
||||
return 1;
|
||||
}
|
||||
} else if (bitstream->openmode_ & JPC_BITSTREAM_WRITE) {
|
||||
/* The bit stream is open for writing. */
|
||||
/* If there are any bits buffered for writing, or the
|
||||
previous byte forced a stuffed bit, alignment is
|
||||
required. */
|
||||
if ((bitstream->cnt_ < 8 && bitstream->cnt_ >= 0) ||
|
||||
((bitstream->buf_ >> 8) & 0xff) == 0xff) {
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
/* This should not happen. Famous last words, eh? :-) */
|
||||
assert(0);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* How many additional bytes would be output if we align the bit stream? */
|
||||
int jpc_bitstream_pending(jpc_bitstream_t *bitstream)
|
||||
{
|
||||
if (bitstream->openmode_ & JPC_BITSTREAM_WRITE) {
|
||||
/* The bit stream is being used for writing. */
|
||||
if (bitstream->openmode_ & JPC_BITSTREAM_WRITE) {
|
||||
/* The bit stream is being used for writing. */
|
||||
#if 1
|
||||
/* XXX - Is this really correct? Check someday... */
|
||||
if (bitstream->cnt_ < 8) {
|
||||
return 1;
|
||||
}
|
||||
/* XXX - Is this really correct? Check someday... */
|
||||
if (bitstream->cnt_ < 8) {
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
if (bitstream->cnt_ < 8) {
|
||||
if (((bitstream->buf_ >> 8) & 0xff) == 0xff) {
|
||||
return 2;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (bitstream->cnt_ < 8) {
|
||||
if (((bitstream->buf_ >> 8) & 0xff) == 0xff) {
|
||||
return 2;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
} else {
|
||||
/* This operation should not be invoked on a bit stream that
|
||||
is being used for reading. */
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
/* This operation should not be invoked on a bit stream that
|
||||
is being used for reading. */
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Align the bit stream to a byte boundary. */
|
||||
int jpc_bitstream_align(jpc_bitstream_t *bitstream)
|
||||
{
|
||||
int ret;
|
||||
if (bitstream->openmode_ & JPC_BITSTREAM_READ) {
|
||||
ret = jpc_bitstream_inalign(bitstream, 0, 0);
|
||||
} else if (bitstream->openmode_ & JPC_BITSTREAM_WRITE) {
|
||||
ret = jpc_bitstream_outalign(bitstream, 0);
|
||||
} else {
|
||||
abort();
|
||||
}
|
||||
return ret;
|
||||
int ret;
|
||||
if (bitstream->openmode_ & JPC_BITSTREAM_READ) {
|
||||
ret = jpc_bitstream_inalign(bitstream, 0, 0);
|
||||
} else if (bitstream->openmode_ & JPC_BITSTREAM_WRITE) {
|
||||
ret = jpc_bitstream_outalign(bitstream, 0);
|
||||
} else {
|
||||
abort();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Align a bit stream in the input case. */
|
||||
int jpc_bitstream_inalign(jpc_bitstream_t *bitstream, int fillmask,
|
||||
int filldata)
|
||||
{
|
||||
int n;
|
||||
int v;
|
||||
int u;
|
||||
int numfill;
|
||||
int m;
|
||||
int n;
|
||||
int v;
|
||||
int u;
|
||||
int numfill;
|
||||
int m;
|
||||
|
||||
numfill = 7;
|
||||
m = 0;
|
||||
v = 0;
|
||||
if (bitstream->cnt_ > 0) {
|
||||
n = bitstream->cnt_;
|
||||
} else if (!bitstream->cnt_) {
|
||||
n = ((bitstream->buf_ & 0xff) == 0xff) ? 7 : 0;
|
||||
} else {
|
||||
n = 0;
|
||||
}
|
||||
if (n > 0) {
|
||||
if ((u = jpc_bitstream_getbits(bitstream, n)) < 0) {
|
||||
return -1;
|
||||
}
|
||||
m += n;
|
||||
v = (v << n) | u;
|
||||
}
|
||||
if ((bitstream->buf_ & 0xff) == 0xff) {
|
||||
if ((u = jpc_bitstream_getbits(bitstream, 7)) < 0) {
|
||||
return -1;
|
||||
}
|
||||
v = (v << 7) | u;
|
||||
m += 7;
|
||||
}
|
||||
if (m > numfill) {
|
||||
v >>= m - numfill;
|
||||
} else {
|
||||
filldata >>= numfill - m;
|
||||
fillmask >>= numfill - m;
|
||||
}
|
||||
if (((~(v ^ filldata)) & fillmask) != fillmask) {
|
||||
/* The actual fill pattern does not match the expected one. */
|
||||
return 1;
|
||||
}
|
||||
numfill = 7;
|
||||
m = 0;
|
||||
v = 0;
|
||||
if (bitstream->cnt_ > 0) {
|
||||
n = bitstream->cnt_;
|
||||
} else if (!bitstream->cnt_) {
|
||||
n = ((bitstream->buf_ & 0xff) == 0xff) ? 7 : 0;
|
||||
} else {
|
||||
n = 0;
|
||||
}
|
||||
if (n > 0) {
|
||||
if ((u = jpc_bitstream_getbits(bitstream, n)) < 0) {
|
||||
return -1;
|
||||
}
|
||||
m += n;
|
||||
v = (v << n) | u;
|
||||
}
|
||||
if ((bitstream->buf_ & 0xff) == 0xff) {
|
||||
if ((u = jpc_bitstream_getbits(bitstream, 7)) < 0) {
|
||||
return -1;
|
||||
}
|
||||
v = (v << 7) | u;
|
||||
m += 7;
|
||||
}
|
||||
if (m > numfill) {
|
||||
v >>= m - numfill;
|
||||
} else {
|
||||
filldata >>= numfill - m;
|
||||
fillmask >>= numfill - m;
|
||||
}
|
||||
if (((~(v ^ filldata)) & fillmask) != fillmask) {
|
||||
/* The actual fill pattern does not match the expected one. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Align a bit stream in the output case. */
|
||||
int jpc_bitstream_outalign(jpc_bitstream_t *bitstream, int filldata)
|
||||
{
|
||||
int n;
|
||||
int v;
|
||||
int n;
|
||||
int v;
|
||||
|
||||
/* Ensure that this bit stream is open for writing. */
|
||||
assert(bitstream->openmode_ & JPC_BITSTREAM_WRITE);
|
||||
/* Ensure that this bit stream is open for writing. */
|
||||
assert(bitstream->openmode_ & JPC_BITSTREAM_WRITE);
|
||||
|
||||
/* Ensure that the first bit of fill data is zero. */
|
||||
/* Note: The first bit of fill data must be zero. If this were not
|
||||
the case, the fill data itself could cause further bit stuffing to
|
||||
be required (which would cause numerous complications). */
|
||||
assert(!(filldata & (~0x3f)));
|
||||
/* Ensure that the first bit of fill data is zero. */
|
||||
/* Note: The first bit of fill data must be zero. If this were not
|
||||
the case, the fill data itself could cause further bit stuffing to
|
||||
be required (which would cause numerous complications). */
|
||||
assert(!(filldata & (~0x3f)));
|
||||
|
||||
if (!bitstream->cnt_) {
|
||||
if ((bitstream->buf_ & 0xff) == 0xff) {
|
||||
n = 7;
|
||||
v = filldata;
|
||||
} else {
|
||||
n = 0;
|
||||
v = 0;
|
||||
}
|
||||
} else if (bitstream->cnt_ > 0 && bitstream->cnt_ < 8) {
|
||||
n = bitstream->cnt_;
|
||||
v = filldata >> (7 - n);
|
||||
} else {
|
||||
n = 0;
|
||||
v = 0;
|
||||
return 0;
|
||||
}
|
||||
if (!bitstream->cnt_) {
|
||||
if ((bitstream->buf_ & 0xff) == 0xff) {
|
||||
n = 7;
|
||||
v = filldata;
|
||||
} else {
|
||||
n = 0;
|
||||
v = 0;
|
||||
}
|
||||
} else if (bitstream->cnt_ > 0 && bitstream->cnt_ < 8) {
|
||||
n = bitstream->cnt_;
|
||||
v = filldata >> (7 - n);
|
||||
} else {
|
||||
n = 0;
|
||||
v = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Write the appropriate fill data to the bit stream. */
|
||||
if (n > 0) {
|
||||
if (jpc_bitstream_putbits(bitstream, n, v)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (bitstream->cnt_ < 8) {
|
||||
assert(bitstream->cnt_ >= 0 && bitstream->cnt_ < 8);
|
||||
assert((bitstream->buf_ & 0xff) != 0xff);
|
||||
/* Force the pending byte of output to be written to the
|
||||
underlying (character) stream. */
|
||||
if (jas_stream_putc(bitstream->stream_, bitstream->buf_ & 0xff) == EOF) {
|
||||
return -1;
|
||||
}
|
||||
bitstream->cnt_ = 8;
|
||||
bitstream->buf_ = (bitstream->buf_ << 8) & 0xffff;
|
||||
}
|
||||
/* Write the appropriate fill data to the bit stream. */
|
||||
if (n > 0) {
|
||||
if (jpc_bitstream_putbits(bitstream, n, v)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (bitstream->cnt_ < 8) {
|
||||
assert(bitstream->cnt_ >= 0 && bitstream->cnt_ < 8);
|
||||
assert((bitstream->buf_ & 0xff) != 0xff);
|
||||
/* Force the pending byte of output to be written to the
|
||||
underlying (character) stream. */
|
||||
if (jas_stream_putc(bitstream->stream_, bitstream->buf_ & 0xff) == EOF) {
|
||||
return -1;
|
||||
}
|
||||
bitstream->cnt_ = 8;
|
||||
bitstream->buf_ = (bitstream->buf_ << 8) & 0xffff;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
externo
+36
-36
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -111,20 +111,20 @@
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* Some miscellaneous flags. */
|
||||
int flags_;
|
||||
/* Some miscellaneous flags. */
|
||||
int flags_;
|
||||
|
||||
/* The input/output buffer. */
|
||||
uint_fast16_t buf_;
|
||||
/* The input/output buffer. */
|
||||
uint_fast16_t buf_;
|
||||
|
||||
/* The number of bits remaining in the byte being read/written. */
|
||||
int cnt_;
|
||||
/* The number of bits remaining in the byte being read/written. */
|
||||
int cnt_;
|
||||
|
||||
/* The underlying stream associated with this bit stream. */
|
||||
jas_stream_t *stream_;
|
||||
/* The underlying stream associated with this bit stream. */
|
||||
jas_stream_t *stream_;
|
||||
|
||||
/* The mode in which this bit stream was opened. */
|
||||
int openmode_;
|
||||
/* The mode in which this bit stream was opened. */
|
||||
int openmode_;
|
||||
|
||||
} jpc_bitstream_t;
|
||||
|
||||
@@ -145,19 +145,19 @@ int jpc_bitstream_close(jpc_bitstream_t *bitstream);
|
||||
/* Read a bit from a bit stream. */
|
||||
#if defined(DEBUG)
|
||||
#define jpc_bitstream_getbit(bitstream) \
|
||||
jpc_bitstream_getbit_func(bitstream)
|
||||
jpc_bitstream_getbit_func(bitstream)
|
||||
#else
|
||||
#define jpc_bitstream_getbit(bitstream) \
|
||||
jpc_bitstream_getbit_macro(bitstream)
|
||||
jpc_bitstream_getbit_macro(bitstream)
|
||||
#endif
|
||||
|
||||
/* Write a bit to a bit stream. */
|
||||
#if defined(DEBUG)
|
||||
#define jpc_bitstream_putbit(bitstream, v) \
|
||||
jpc_bitstream_putbit_func(bitstream, v)
|
||||
jpc_bitstream_putbit_func(bitstream, v)
|
||||
#else
|
||||
#define jpc_bitstream_putbit(bitstream, v) \
|
||||
jpc_bitstream_putbit_macro(bitstream, v)
|
||||
jpc_bitstream_putbit_macro(bitstream, v)
|
||||
#endif
|
||||
|
||||
/* Read one or more bits from a bit stream. */
|
||||
@@ -196,7 +196,7 @@ int jpc_bitstream_pending(jpc_bitstream_t *bitstream);
|
||||
|
||||
/* Has EOF been encountered on a bit stream? */
|
||||
#define jpc_bitstream_eof(bitstream) \
|
||||
((bitstream)->flags_ & JPC_BITSTREAM_EOF)
|
||||
((bitstream)->flags_ & JPC_BITSTREAM_EOF)
|
||||
|
||||
/******************************************************************************\
|
||||
* Internals.
|
||||
@@ -212,20 +212,20 @@ int jpc_bitstream_putbit_func(jpc_bitstream_t *bitstream, int v);
|
||||
int jpc_bitstream_fillbuf(jpc_bitstream_t *bitstream);
|
||||
|
||||
#define jpc_bitstream_getbit_macro(bitstream) \
|
||||
(assert((bitstream)->openmode_ & JPC_BITSTREAM_READ), \
|
||||
(--(bitstream)->cnt_ >= 0) ? \
|
||||
((int)(((bitstream)->buf_ >> (bitstream)->cnt_) & 1)) : \
|
||||
jpc_bitstream_fillbuf(bitstream))
|
||||
(assert((bitstream)->openmode_ & JPC_BITSTREAM_READ), \
|
||||
(--(bitstream)->cnt_ >= 0) ? \
|
||||
((int)(((bitstream)->buf_ >> (bitstream)->cnt_) & 1)) : \
|
||||
jpc_bitstream_fillbuf(bitstream))
|
||||
|
||||
#define jpc_bitstream_putbit_macro(bitstream, bit) \
|
||||
(assert((bitstream)->openmode_ & JPC_BITSTREAM_WRITE), \
|
||||
(--(bitstream)->cnt_ < 0) ? \
|
||||
((bitstream)->buf_ = ((bitstream)->buf_ << 8) & 0xffff, \
|
||||
(bitstream)->cnt_ = ((bitstream)->buf_ == 0xff00) ? 6 : 7, \
|
||||
(bitstream)->buf_ |= ((bit) & 1) << (bitstream)->cnt_, \
|
||||
(jas_stream_putc((bitstream)->stream_, (bitstream)->buf_ >> 8) == EOF) \
|
||||
? (EOF) : ((bit) & 1)) : \
|
||||
((bitstream)->buf_ |= ((bit) & 1) << (bitstream)->cnt_, \
|
||||
(bit) & 1))
|
||||
(assert((bitstream)->openmode_ & JPC_BITSTREAM_WRITE), \
|
||||
(--(bitstream)->cnt_ < 0) ? \
|
||||
((bitstream)->buf_ = ((bitstream)->buf_ << 8) & 0xffff, \
|
||||
(bitstream)->cnt_ = ((bitstream)->buf_ == 0xff00) ? 6 : 7, \
|
||||
(bitstream)->buf_ |= ((bit) & 1) << (bitstream)->cnt_, \
|
||||
(jas_stream_putc((bitstream)->stream_, (bitstream)->buf_ >> 8) == EOF) \
|
||||
? (EOF) : ((bit) & 1)) : \
|
||||
((bitstream)->buf_ |= ((bit) & 1) << (bitstream)->cnt_, \
|
||||
(bit) & 1))
|
||||
|
||||
#endif
|
||||
|
||||
externo
+8
-8
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
|
||||
externo
+1025
-1018
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+203
-203
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -125,8 +125,8 @@
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The number of components. */
|
||||
uint_fast16_t numcomps;
|
||||
/* The number of components. */
|
||||
uint_fast16_t numcomps;
|
||||
|
||||
} jpc_cstate_t;
|
||||
|
||||
@@ -136,18 +136,18 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The tile number. */
|
||||
uint_fast16_t tileno;
|
||||
/* The tile number. */
|
||||
uint_fast16_t tileno;
|
||||
|
||||
/* The combined length of the marker segment and its auxilary data
|
||||
(i.e., packet data). */
|
||||
uint_fast32_t len;
|
||||
/* The combined length of the marker segment and its auxilary data
|
||||
(i.e., packet data). */
|
||||
uint_fast32_t len;
|
||||
|
||||
/* The tile-part instance. */
|
||||
uint_fast8_t partno;
|
||||
/* The tile-part instance. */
|
||||
uint_fast8_t partno;
|
||||
|
||||
/* The number of tile-parts. */
|
||||
uint_fast8_t numparts;
|
||||
/* The number of tile-parts. */
|
||||
uint_fast8_t numparts;
|
||||
|
||||
} jpc_sot_t;
|
||||
|
||||
@@ -159,19 +159,19 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The precision of the samples. */
|
||||
uint_fast8_t prec;
|
||||
/* The precision of the samples. */
|
||||
uint_fast8_t prec;
|
||||
|
||||
/* The signedness of the samples. */
|
||||
uint_fast8_t sgnd;
|
||||
/* The signedness of the samples. */
|
||||
uint_fast8_t sgnd;
|
||||
|
||||
/* The horizontal separation of samples with respect to the reference
|
||||
grid. */
|
||||
uint_fast8_t hsamp;
|
||||
/* The horizontal separation of samples with respect to the reference
|
||||
grid. */
|
||||
uint_fast8_t hsamp;
|
||||
|
||||
/* The vertical separation of samples with respect to the reference
|
||||
grid. */
|
||||
uint_fast8_t vsamp;
|
||||
/* The vertical separation of samples with respect to the reference
|
||||
grid. */
|
||||
uint_fast8_t vsamp;
|
||||
|
||||
} jpc_sizcomp_t;
|
||||
|
||||
@@ -179,42 +179,42 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The code stream capabilities. */
|
||||
uint_fast16_t caps;
|
||||
/* The code stream capabilities. */
|
||||
uint_fast16_t caps;
|
||||
|
||||
/* The width of the image in units of the reference grid. */
|
||||
uint_fast32_t width;
|
||||
/* The width of the image in units of the reference grid. */
|
||||
uint_fast32_t width;
|
||||
|
||||
/* The height of the image in units of the reference grid. */
|
||||
uint_fast32_t height;
|
||||
/* The height of the image in units of the reference grid. */
|
||||
uint_fast32_t height;
|
||||
|
||||
/* The horizontal offset from the origin of the reference grid to the
|
||||
left side of the image area. */
|
||||
uint_fast32_t xoff;
|
||||
/* The horizontal offset from the origin of the reference grid to the
|
||||
left side of the image area. */
|
||||
uint_fast32_t xoff;
|
||||
|
||||
/* The vertical offset from the origin of the reference grid to the
|
||||
top side of the image area. */
|
||||
uint_fast32_t yoff;
|
||||
/* The vertical offset from the origin of the reference grid to the
|
||||
top side of the image area. */
|
||||
uint_fast32_t yoff;
|
||||
|
||||
/* The nominal width of a tile in units of the reference grid. */
|
||||
uint_fast32_t tilewidth;
|
||||
/* The nominal width of a tile in units of the reference grid. */
|
||||
uint_fast32_t tilewidth;
|
||||
|
||||
/* The nominal height of a tile in units of the reference grid. */
|
||||
uint_fast32_t tileheight;
|
||||
/* The nominal height of a tile in units of the reference grid. */
|
||||
uint_fast32_t tileheight;
|
||||
|
||||
/* The horizontal offset from the origin of the reference grid to the
|
||||
left side of the first tile. */
|
||||
uint_fast32_t tilexoff;
|
||||
/* The horizontal offset from the origin of the reference grid to the
|
||||
left side of the first tile. */
|
||||
uint_fast32_t tilexoff;
|
||||
|
||||
/* The vertical offset from the origin of the reference grid to the
|
||||
top side of the first tile. */
|
||||
uint_fast32_t tileyoff;
|
||||
/* The vertical offset from the origin of the reference grid to the
|
||||
top side of the first tile. */
|
||||
uint_fast32_t tileyoff;
|
||||
|
||||
/* The number of components. */
|
||||
uint_fast16_t numcomps;
|
||||
/* The number of components. */
|
||||
uint_fast16_t numcomps;
|
||||
|
||||
/* The per-component information. */
|
||||
jpc_sizcomp_t *comps;
|
||||
/* The per-component information. */
|
||||
jpc_sizcomp_t *comps;
|
||||
|
||||
} jpc_siz_t;
|
||||
|
||||
@@ -278,11 +278,11 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The packet partition width. */
|
||||
uint_fast8_t parwidthval;
|
||||
/* The packet partition width. */
|
||||
uint_fast8_t parwidthval;
|
||||
|
||||
/* The packet partition height. */
|
||||
uint_fast8_t parheightval;
|
||||
/* The packet partition height. */
|
||||
uint_fast8_t parheightval;
|
||||
|
||||
} jpc_coxrlvl_t;
|
||||
|
||||
@@ -290,29 +290,29 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The coding style. */
|
||||
uint_fast8_t csty;
|
||||
/* The coding style. */
|
||||
uint_fast8_t csty;
|
||||
|
||||
/* The number of decomposition levels. */
|
||||
uint_fast8_t numdlvls;
|
||||
/* The number of decomposition levels. */
|
||||
uint_fast8_t numdlvls;
|
||||
|
||||
/* The nominal code block width specifier. */
|
||||
uint_fast8_t cblkwidthval;
|
||||
/* The nominal code block width specifier. */
|
||||
uint_fast8_t cblkwidthval;
|
||||
|
||||
/* The nominal code block height specifier. */
|
||||
uint_fast8_t cblkheightval;
|
||||
/* The nominal code block height specifier. */
|
||||
uint_fast8_t cblkheightval;
|
||||
|
||||
/* The style of coding passes. */
|
||||
uint_fast8_t cblksty;
|
||||
/* The style of coding passes. */
|
||||
uint_fast8_t cblksty;
|
||||
|
||||
/* The QMFB employed. */
|
||||
uint_fast8_t qmfbid;
|
||||
/* The QMFB employed. */
|
||||
uint_fast8_t qmfbid;
|
||||
|
||||
/* The number of resolution levels. */
|
||||
int numrlvls;
|
||||
/* The number of resolution levels. */
|
||||
int numrlvls;
|
||||
|
||||
/* The per-resolution-level information. */
|
||||
jpc_coxrlvl_t rlvls[JPC_MAXRLVLS];
|
||||
/* The per-resolution-level information. */
|
||||
jpc_coxrlvl_t rlvls[JPC_MAXRLVLS];
|
||||
|
||||
} jpc_coxcp_t;
|
||||
|
||||
@@ -320,20 +320,20 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The general coding style. */
|
||||
uint_fast8_t csty;
|
||||
/* The general coding style. */
|
||||
uint_fast8_t csty;
|
||||
|
||||
/* The progression order. */
|
||||
uint_fast8_t prg;
|
||||
/* The progression order. */
|
||||
uint_fast8_t prg;
|
||||
|
||||
/* The number of layers. */
|
||||
uint_fast16_t numlyrs;
|
||||
/* The number of layers. */
|
||||
uint_fast16_t numlyrs;
|
||||
|
||||
/* The multicomponent transform. */
|
||||
uint_fast8_t mctrans;
|
||||
/* The multicomponent transform. */
|
||||
uint_fast8_t mctrans;
|
||||
|
||||
/* Component-related parameters. */
|
||||
jpc_coxcp_t compparms;
|
||||
/* Component-related parameters. */
|
||||
jpc_coxcp_t compparms;
|
||||
|
||||
} jpc_cod_t;
|
||||
|
||||
@@ -341,11 +341,11 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The component number. */
|
||||
uint_fast16_t compno;
|
||||
/* The component number. */
|
||||
uint_fast16_t compno;
|
||||
|
||||
/* Component-related parameters. */
|
||||
jpc_coxcp_t compparms;
|
||||
/* Component-related parameters. */
|
||||
jpc_coxcp_t compparms;
|
||||
|
||||
} jpc_coc_t;
|
||||
|
||||
@@ -358,14 +358,14 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The component to which the marker applies. */
|
||||
uint_fast16_t compno;
|
||||
/* The component to which the marker applies. */
|
||||
uint_fast16_t compno;
|
||||
|
||||
/* The ROI style. */
|
||||
uint_fast8_t roisty;
|
||||
/* The ROI style. */
|
||||
uint_fast8_t roisty;
|
||||
|
||||
/* The ROI shift value. */
|
||||
uint_fast8_t roishift;
|
||||
/* The ROI shift value. */
|
||||
uint_fast8_t roishift;
|
||||
|
||||
} jpc_rgn_t;
|
||||
|
||||
@@ -394,17 +394,17 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The quantization style. */
|
||||
uint_fast8_t qntsty;
|
||||
/* The quantization style. */
|
||||
uint_fast8_t qntsty;
|
||||
|
||||
/* The number of step sizes. */
|
||||
int numstepsizes;
|
||||
/* The number of step sizes. */
|
||||
int numstepsizes;
|
||||
|
||||
/* The step sizes. */
|
||||
uint_fast16_t *stepsizes;
|
||||
/* The step sizes. */
|
||||
uint_fast16_t *stepsizes;
|
||||
|
||||
/* The number of guard bits. */
|
||||
uint_fast8_t numguard;
|
||||
/* The number of guard bits. */
|
||||
uint_fast8_t numguard;
|
||||
|
||||
} jpc_qcxcp_t;
|
||||
|
||||
@@ -412,11 +412,11 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The component associated with this marker segment. */
|
||||
uint_fast16_t compno;
|
||||
/* The component associated with this marker segment. */
|
||||
uint_fast16_t compno;
|
||||
|
||||
/* The parameters. */
|
||||
jpc_qcxcp_t compparms;
|
||||
/* The parameters. */
|
||||
jpc_qcxcp_t compparms;
|
||||
|
||||
} jpc_qcc_t;
|
||||
|
||||
@@ -424,8 +424,8 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The parameters. */
|
||||
jpc_qcxcp_t compparms;
|
||||
/* The parameters. */
|
||||
jpc_qcxcp_t compparms;
|
||||
|
||||
} jpc_qcd_t;
|
||||
|
||||
@@ -435,28 +435,28 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The progression order. */
|
||||
uint_fast8_t prgord;
|
||||
/* The progression order. */
|
||||
uint_fast8_t prgord;
|
||||
|
||||
/* The lower bound (inclusive) on the resolution level for the
|
||||
progression order volume. */
|
||||
uint_fast8_t rlvlnostart;
|
||||
/* The lower bound (inclusive) on the resolution level for the
|
||||
progression order volume. */
|
||||
uint_fast8_t rlvlnostart;
|
||||
|
||||
/* The upper bound (exclusive) on the resolution level for the
|
||||
progression order volume. */
|
||||
uint_fast8_t rlvlnoend;
|
||||
/* The upper bound (exclusive) on the resolution level for the
|
||||
progression order volume. */
|
||||
uint_fast8_t rlvlnoend;
|
||||
|
||||
/* The lower bound (inclusive) on the component for the progression
|
||||
order volume. */
|
||||
uint_fast16_t compnostart;
|
||||
/* The lower bound (inclusive) on the component for the progression
|
||||
order volume. */
|
||||
uint_fast16_t compnostart;
|
||||
|
||||
/* The upper bound (exclusive) on the component for the progression
|
||||
order volume. */
|
||||
uint_fast16_t compnoend;
|
||||
/* The upper bound (exclusive) on the component for the progression
|
||||
order volume. */
|
||||
uint_fast16_t compnoend;
|
||||
|
||||
/* The upper bound (exclusive) on the layer for the progression
|
||||
order volume. */
|
||||
uint_fast16_t lyrnoend;
|
||||
/* The upper bound (exclusive) on the layer for the progression
|
||||
order volume. */
|
||||
uint_fast16_t lyrnoend;
|
||||
|
||||
} jpc_pocpchg_t;
|
||||
|
||||
@@ -467,11 +467,11 @@ typedef jpc_pocpchg_t jpc_pchg_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The number of progression order changes. */
|
||||
int numpchgs;
|
||||
/* The number of progression order changes. */
|
||||
int numpchgs;
|
||||
|
||||
/* The per-progression-order-change information. */
|
||||
jpc_pocpchg_t *pchgs;
|
||||
/* The per-progression-order-change information. */
|
||||
jpc_pocpchg_t *pchgs;
|
||||
|
||||
} jpc_poc_t;
|
||||
|
||||
@@ -483,14 +483,14 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The index. */
|
||||
uint_fast8_t ind;
|
||||
/* The index. */
|
||||
uint_fast8_t ind;
|
||||
|
||||
/* The length. */
|
||||
uint_fast16_t len;
|
||||
/* The length. */
|
||||
uint_fast16_t len;
|
||||
|
||||
/* The data. */
|
||||
uchar *data;
|
||||
/* The data. */
|
||||
uchar *data;
|
||||
|
||||
} jpc_ppm_t;
|
||||
|
||||
@@ -498,14 +498,14 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The index. */
|
||||
uint_fast8_t ind;
|
||||
/* The index. */
|
||||
uint_fast8_t ind;
|
||||
|
||||
/* The length. */
|
||||
uint_fast32_t len;
|
||||
/* The length. */
|
||||
uint_fast32_t len;
|
||||
|
||||
/* The data. */
|
||||
unsigned char *data;
|
||||
/* The data. */
|
||||
unsigned char *data;
|
||||
|
||||
} jpc_ppt_t;
|
||||
|
||||
@@ -522,14 +522,14 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The registration ID. */
|
||||
uint_fast16_t regid;
|
||||
/* The registration ID. */
|
||||
uint_fast16_t regid;
|
||||
|
||||
/* The length of the data in bytes. */
|
||||
uint_fast16_t len;
|
||||
/* The length of the data in bytes. */
|
||||
uint_fast16_t len;
|
||||
|
||||
/* The data. */
|
||||
uchar *data;
|
||||
/* The data. */
|
||||
uchar *data;
|
||||
|
||||
} jpc_com_t;
|
||||
|
||||
@@ -539,8 +539,8 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The sequence number. */
|
||||
uint_fast16_t seqno;
|
||||
/* The sequence number. */
|
||||
uint_fast16_t seqno;
|
||||
|
||||
} jpc_sop_t;
|
||||
|
||||
@@ -552,21 +552,21 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The horizontal offset. */
|
||||
uint_fast16_t hoff;
|
||||
/* The horizontal offset. */
|
||||
uint_fast16_t hoff;
|
||||
|
||||
/* The vertical offset. */
|
||||
uint_fast16_t voff;
|
||||
/* The vertical offset. */
|
||||
uint_fast16_t voff;
|
||||
|
||||
} jpc_crgcomp_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The number of components. */
|
||||
int numcomps;
|
||||
/* The number of components. */
|
||||
int numcomps;
|
||||
|
||||
/* Per component information. */
|
||||
jpc_crgcomp_t *comps;
|
||||
/* Per component information. */
|
||||
jpc_crgcomp_t *comps;
|
||||
|
||||
} jpc_crg_t;
|
||||
|
||||
@@ -576,11 +576,11 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The data. */
|
||||
uchar *data;
|
||||
/* The data. */
|
||||
uchar *data;
|
||||
|
||||
/* The length. */
|
||||
uint_fast16_t len;
|
||||
/* The length. */
|
||||
uint_fast16_t len;
|
||||
|
||||
} jpc_unk_t;
|
||||
|
||||
@@ -589,26 +589,26 @@ typedef struct {
|
||||
\**************************************/
|
||||
|
||||
typedef union {
|
||||
int soc; /* unused */
|
||||
jpc_sot_t sot;
|
||||
int sod; /* unused */
|
||||
int eoc; /* unused */
|
||||
jpc_siz_t siz;
|
||||
jpc_cod_t cod;
|
||||
jpc_coc_t coc;
|
||||
jpc_rgn_t rgn;
|
||||
jpc_qcd_t qcd;
|
||||
jpc_qcc_t qcc;
|
||||
jpc_poc_t poc;
|
||||
/* jpc_plm_t plm; */
|
||||
/* jpc_plt_t plt; */
|
||||
jpc_ppm_t ppm;
|
||||
jpc_ppt_t ppt;
|
||||
jpc_sop_t sop;
|
||||
int eph; /* unused */
|
||||
jpc_com_t com;
|
||||
jpc_crg_t crg;
|
||||
jpc_unk_t unk;
|
||||
int soc; /* unused */
|
||||
jpc_sot_t sot;
|
||||
int sod; /* unused */
|
||||
int eoc; /* unused */
|
||||
jpc_siz_t siz;
|
||||
jpc_cod_t cod;
|
||||
jpc_coc_t coc;
|
||||
jpc_rgn_t rgn;
|
||||
jpc_qcd_t qcd;
|
||||
jpc_qcc_t qcc;
|
||||
jpc_poc_t poc;
|
||||
/* jpc_plm_t plm; */
|
||||
/* jpc_plt_t plt; */
|
||||
jpc_ppm_t ppm;
|
||||
jpc_ppt_t ppt;
|
||||
jpc_sop_t sop;
|
||||
int eph; /* unused */
|
||||
jpc_com_t com;
|
||||
jpc_crg_t crg;
|
||||
jpc_unk_t unk;
|
||||
} jpc_msparms_t;
|
||||
|
||||
/**************************************\
|
||||
@@ -667,20 +667,20 @@ struct jpc_msops_s;
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The type of marker segment. */
|
||||
uint_fast16_t id;
|
||||
/* The type of marker segment. */
|
||||
uint_fast16_t id;
|
||||
|
||||
/* The length of the marker segment. */
|
||||
uint_fast16_t len;
|
||||
/* The length of the marker segment. */
|
||||
uint_fast16_t len;
|
||||
|
||||
/* The starting offset within the stream. */
|
||||
uint_fast32_t off;
|
||||
/* The starting offset within the stream. */
|
||||
uint_fast32_t off;
|
||||
|
||||
/* The parameters of the marker segment. */
|
||||
jpc_msparms_t parms;
|
||||
/* The parameters of the marker segment. */
|
||||
jpc_msparms_t parms;
|
||||
|
||||
/* The marker segment operations. */
|
||||
struct jpc_msops_s *ops;
|
||||
/* The marker segment operations. */
|
||||
struct jpc_msops_s *ops;
|
||||
|
||||
} jpc_ms_t;
|
||||
|
||||
@@ -688,17 +688,17 @@ typedef struct {
|
||||
|
||||
typedef struct jpc_msops_s {
|
||||
|
||||
/* Destroy the marker segment parameters. */
|
||||
void (*destroyparms)(jpc_ms_t *ms);
|
||||
/* Destroy the marker segment parameters. */
|
||||
void (*destroyparms)(jpc_ms_t *ms);
|
||||
|
||||
/* Get the marker segment parameters from a stream. */
|
||||
int (*getparms)(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in);
|
||||
/* Get the marker segment parameters from a stream. */
|
||||
int (*getparms)(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in);
|
||||
|
||||
/* Put the marker segment parameters to a stream. */
|
||||
int (*putparms)(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out);
|
||||
/* Put the marker segment parameters to a stream. */
|
||||
int (*putparms)(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out);
|
||||
|
||||
/* Dump the marker segment parameters (for debugging). */
|
||||
int (*dumpparms)(jpc_ms_t *ms, FILE *out);
|
||||
/* Dump the marker segment parameters (for debugging). */
|
||||
int (*dumpparms)(jpc_ms_t *ms, FILE *out);
|
||||
|
||||
} jpc_msops_t;
|
||||
|
||||
@@ -720,12 +720,12 @@ void jpc_ms_destroy(jpc_ms_t *ms);
|
||||
|
||||
/* Does a marker segment have parameters? */
|
||||
#define JPC_MS_HASPARMS(x) \
|
||||
(!((x) == JPC_MS_SOC || (x) == JPC_MS_SOD || (x) == JPC_MS_EOC || \
|
||||
(x) == JPC_MS_EPH || ((x) >= 0xff30 && (x) <= 0xff3f)))
|
||||
(!((x) == JPC_MS_SOC || (x) == JPC_MS_SOD || (x) == JPC_MS_EOC || \
|
||||
(x) == JPC_MS_EPH || ((x) >= 0xff30 && (x) <= 0xff3f)))
|
||||
|
||||
/* Get the marker segment type. */
|
||||
#define jpc_ms_gettype(ms) \
|
||||
((ms)->id)
|
||||
((ms)->id)
|
||||
|
||||
/* Read a marker segment from a stream. */
|
||||
jpc_ms_t *jpc_getms(jas_stream_t *in, jpc_cstate_t *cstate);
|
||||
|
||||
externo
+1645
-1646
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+338
-338
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -92,14 +92,14 @@
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The index for this entry. */
|
||||
uint_fast16_t ind;
|
||||
/* The index for this entry. */
|
||||
uint_fast16_t ind;
|
||||
|
||||
/* The data length. */
|
||||
uint_fast32_t len;
|
||||
/* The data length. */
|
||||
uint_fast32_t len;
|
||||
|
||||
/* The data. */
|
||||
uchar *data;
|
||||
/* The data. */
|
||||
uchar *data;
|
||||
|
||||
} jpc_ppxstabent_t;
|
||||
|
||||
@@ -107,15 +107,15 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The number of entries. */
|
||||
int numents;
|
||||
/* The number of entries. */
|
||||
int numents;
|
||||
|
||||
/* The maximum number of entries (i.e., the allocated size of the array
|
||||
below). */
|
||||
int maxents;
|
||||
/* The maximum number of entries (i.e., the allocated size of the array
|
||||
below). */
|
||||
int maxents;
|
||||
|
||||
/* The table entries. */
|
||||
jpc_ppxstabent_t **ents;
|
||||
/* The table entries. */
|
||||
jpc_ppxstabent_t **ents;
|
||||
|
||||
} jpc_ppxstab_t;
|
||||
|
||||
@@ -123,15 +123,15 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The number of streams in this list. */
|
||||
int numstreams;
|
||||
/* The number of streams in this list. */
|
||||
int numstreams;
|
||||
|
||||
/* The maximum number of streams that can be accomodated without
|
||||
growing the streams array. */
|
||||
int maxstreams;
|
||||
/* The maximum number of streams that can be accomodated without
|
||||
growing the streams array. */
|
||||
int maxstreams;
|
||||
|
||||
/* The streams. */
|
||||
jas_stream_t **streams;
|
||||
/* The streams. */
|
||||
jas_stream_t **streams;
|
||||
|
||||
} jpc_streamlist_t;
|
||||
|
||||
@@ -143,47 +143,47 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* How were various coding parameters set? */
|
||||
int flags;
|
||||
/* How were various coding parameters set? */
|
||||
int flags;
|
||||
|
||||
/* Per-component coding style parameters (e.g., explicit precinct sizes) */
|
||||
uint_fast8_t csty;
|
||||
/* Per-component coding style parameters (e.g., explicit precinct sizes) */
|
||||
uint_fast8_t csty;
|
||||
|
||||
/* The number of resolution levels. */
|
||||
uint_fast8_t numrlvls;
|
||||
/* The number of resolution levels. */
|
||||
uint_fast8_t numrlvls;
|
||||
|
||||
/* The code block width exponent. */
|
||||
uint_fast8_t cblkwidthexpn;
|
||||
/* The code block width exponent. */
|
||||
uint_fast8_t cblkwidthexpn;
|
||||
|
||||
/* The code block height exponent. */
|
||||
uint_fast8_t cblkheightexpn;
|
||||
/* The code block height exponent. */
|
||||
uint_fast8_t cblkheightexpn;
|
||||
|
||||
/* The QMFB ID. */
|
||||
uint_fast8_t qmfbid;
|
||||
/* The QMFB ID. */
|
||||
uint_fast8_t qmfbid;
|
||||
|
||||
/* The quantization style. */
|
||||
uint_fast8_t qsty;
|
||||
/* The quantization style. */
|
||||
uint_fast8_t qsty;
|
||||
|
||||
/* The number of quantizer step sizes. */
|
||||
uint_fast16_t numstepsizes;
|
||||
/* The number of quantizer step sizes. */
|
||||
uint_fast16_t numstepsizes;
|
||||
|
||||
/* The step sizes. */
|
||||
uint_fast16_t stepsizes[3 * JPC_MAXRLVLS + 1];
|
||||
/* The step sizes. */
|
||||
uint_fast16_t stepsizes[3 * JPC_MAXRLVLS + 1];
|
||||
|
||||
/* The number of guard bits. */
|
||||
uint_fast8_t numguardbits;
|
||||
/* The number of guard bits. */
|
||||
uint_fast8_t numguardbits;
|
||||
|
||||
/* The ROI shift value. */
|
||||
uint_fast8_t roishift;
|
||||
/* The ROI shift value. */
|
||||
uint_fast8_t roishift;
|
||||
|
||||
/* The code block parameters. */
|
||||
uint_fast8_t cblkctx;
|
||||
/* The code block parameters. */
|
||||
uint_fast8_t cblkctx;
|
||||
|
||||
/* The precinct width exponents. */
|
||||
uint_fast8_t prcwidthexpns[JPC_MAXRLVLS];
|
||||
/* The precinct width exponents. */
|
||||
uint_fast8_t prcwidthexpns[JPC_MAXRLVLS];
|
||||
|
||||
/* The precinct height exponents. */
|
||||
uint_fast8_t prcheightexpns[JPC_MAXRLVLS];
|
||||
/* The precinct height exponents. */
|
||||
uint_fast8_t prcheightexpns[JPC_MAXRLVLS];
|
||||
|
||||
} jpc_dec_ccp_t;
|
||||
|
||||
@@ -191,29 +191,29 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* How were these coding parameters set? */
|
||||
int flags;
|
||||
/* How were these coding parameters set? */
|
||||
int flags;
|
||||
|
||||
/* Progression change list. */
|
||||
jpc_pchglist_t *pchglist;
|
||||
/* Progression change list. */
|
||||
jpc_pchglist_t *pchglist;
|
||||
|
||||
/* Progression order. */
|
||||
uint_fast8_t prgord;
|
||||
/* Progression order. */
|
||||
uint_fast8_t prgord;
|
||||
|
||||
/* The number of layers. */
|
||||
uint_fast16_t numlyrs;
|
||||
/* The number of layers. */
|
||||
uint_fast16_t numlyrs;
|
||||
|
||||
/* The MCT ID. */
|
||||
uint_fast8_t mctid;
|
||||
/* The MCT ID. */
|
||||
uint_fast8_t mctid;
|
||||
|
||||
/* The coding style parameters (e.g., SOP, EPH). */
|
||||
uint_fast8_t csty;
|
||||
/* The coding style parameters (e.g., SOP, EPH). */
|
||||
uint_fast8_t csty;
|
||||
|
||||
/* The number of components. */
|
||||
int numcomps;
|
||||
/* The number of components. */
|
||||
int numcomps;
|
||||
|
||||
/* The per-component coding parameters. */
|
||||
jpc_dec_ccp_t *ccps;
|
||||
/* The per-component coding parameters. */
|
||||
jpc_dec_ccp_t *ccps;
|
||||
|
||||
} jpc_dec_cp_t;
|
||||
|
||||
@@ -225,38 +225,38 @@ typedef struct {
|
||||
|
||||
typedef struct jpc_dec_seg_s {
|
||||
|
||||
/* The next segment in the list. */
|
||||
struct jpc_dec_seg_s *next;
|
||||
/* The next segment in the list. */
|
||||
struct jpc_dec_seg_s *next;
|
||||
|
||||
/* The previous segment in the list. */
|
||||
struct jpc_dec_seg_s *prev;
|
||||
/* The previous segment in the list. */
|
||||
struct jpc_dec_seg_s *prev;
|
||||
|
||||
/* The starting pass number for this segment. */
|
||||
int passno;
|
||||
/* The starting pass number for this segment. */
|
||||
int passno;
|
||||
|
||||
/* The number of passes in this segment. */
|
||||
int numpasses;
|
||||
/* The number of passes in this segment. */
|
||||
int numpasses;
|
||||
|
||||
/* The maximum number of passes in this segment. */
|
||||
int maxpasses;
|
||||
/* The maximum number of passes in this segment. */
|
||||
int maxpasses;
|
||||
|
||||
/* The type of data in this segment (i.e., MQ or raw). */
|
||||
int type;
|
||||
/* The type of data in this segment (i.e., MQ or raw). */
|
||||
int type;
|
||||
|
||||
/* A stream containing the data for this segment. */
|
||||
jas_stream_t *stream;
|
||||
/* A stream containing the data for this segment. */
|
||||
jas_stream_t *stream;
|
||||
|
||||
/* The number of bytes destined for this segment from the packet
|
||||
currently being decoded. */
|
||||
int cnt;
|
||||
/* The number of bytes destined for this segment from the packet
|
||||
currently being decoded. */
|
||||
int cnt;
|
||||
|
||||
/* A flag indicating if this segment has been terminated. */
|
||||
int complete;
|
||||
/* A flag indicating if this segment has been terminated. */
|
||||
int complete;
|
||||
|
||||
/* The layer number to which this segment belongs. */
|
||||
/* If the segment spans multiple layers, then the largest layer number
|
||||
spanned by the segment is used. */
|
||||
int lyrno;
|
||||
/* The layer number to which this segment belongs. */
|
||||
/* If the segment spans multiple layers, then the largest layer number
|
||||
spanned by the segment is used. */
|
||||
int lyrno;
|
||||
|
||||
} jpc_dec_seg_t;
|
||||
|
||||
@@ -264,11 +264,11 @@ typedef struct jpc_dec_seg_s {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The first entry in the list. */
|
||||
jpc_dec_seg_t *head;
|
||||
/* The first entry in the list. */
|
||||
jpc_dec_seg_t *head;
|
||||
|
||||
/* The last entry in the list. */
|
||||
jpc_dec_seg_t *tail;
|
||||
/* The last entry in the list. */
|
||||
jpc_dec_seg_t *tail;
|
||||
|
||||
} jpc_dec_seglist_t;
|
||||
|
||||
@@ -276,35 +276,35 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The number of passes. */
|
||||
int numpasses;
|
||||
/* The number of passes. */
|
||||
int numpasses;
|
||||
|
||||
/* A list of segments that still need to be decoded. */
|
||||
jpc_dec_seglist_t segs;
|
||||
/* A list of segments that still need to be decoded. */
|
||||
jpc_dec_seglist_t segs;
|
||||
|
||||
/* The first incomplete/partial segment. */
|
||||
jpc_dec_seg_t *curseg;
|
||||
/* The first incomplete/partial segment. */
|
||||
jpc_dec_seg_t *curseg;
|
||||
|
||||
/* The number of leading insignificant bit planes for this code block. */
|
||||
int numimsbs;
|
||||
/* The number of leading insignificant bit planes for this code block. */
|
||||
int numimsbs;
|
||||
|
||||
/* The number of bits used to encode pass data lengths. */
|
||||
int numlenbits;
|
||||
/* The number of bits used to encode pass data lengths. */
|
||||
int numlenbits;
|
||||
|
||||
/* The first pass number containing data for this code block. */
|
||||
int firstpassno;
|
||||
/* The first pass number containing data for this code block. */
|
||||
int firstpassno;
|
||||
|
||||
/* The MQ decoder. */
|
||||
jpc_mqdec_t *mqdec;
|
||||
/* The MQ decoder. */
|
||||
jpc_mqdec_t *mqdec;
|
||||
|
||||
/* The raw bit stream decoder. */
|
||||
jpc_bitstream_t *nulldec;
|
||||
/* The raw bit stream decoder. */
|
||||
jpc_bitstream_t *nulldec;
|
||||
|
||||
/* The per-sample state information for this code block. */
|
||||
jas_matrix_t *flags;
|
||||
/* The per-sample state information for this code block. */
|
||||
jas_matrix_t *flags;
|
||||
|
||||
/* The sample data associated with this code block. */
|
||||
jas_matrix_t *data;
|
||||
/* The sample data associated with this code block. */
|
||||
jas_matrix_t *data;
|
||||
|
||||
} jpc_dec_cblk_t;
|
||||
|
||||
@@ -312,39 +312,39 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The x-coordinate of the top-left corner of the precinct. */
|
||||
uint_fast32_t xstart;
|
||||
/* The x-coordinate of the top-left corner of the precinct. */
|
||||
uint_fast32_t xstart;
|
||||
|
||||
/* The y-coordinate of the top-left corner of the precinct. */
|
||||
uint_fast32_t ystart;
|
||||
/* The y-coordinate of the top-left corner of the precinct. */
|
||||
uint_fast32_t ystart;
|
||||
|
||||
/* The x-coordinate of the bottom-right corner of the precinct
|
||||
(plus one). */
|
||||
uint_fast32_t xend;
|
||||
/* The x-coordinate of the bottom-right corner of the precinct
|
||||
(plus one). */
|
||||
uint_fast32_t xend;
|
||||
|
||||
/* The y-coordinate of the bottom-right corner of the precinct
|
||||
(plus one). */
|
||||
uint_fast32_t yend;
|
||||
/* The y-coordinate of the bottom-right corner of the precinct
|
||||
(plus one). */
|
||||
uint_fast32_t yend;
|
||||
|
||||
/* The number of code blocks spanning this precinct in the horizontal
|
||||
direction. */
|
||||
int numhcblks;
|
||||
/* The number of code blocks spanning this precinct in the horizontal
|
||||
direction. */
|
||||
int numhcblks;
|
||||
|
||||
/* The number of code blocks spanning this precinct in the vertical
|
||||
direction. */
|
||||
int numvcblks;
|
||||
/* The number of code blocks spanning this precinct in the vertical
|
||||
direction. */
|
||||
int numvcblks;
|
||||
|
||||
/* The total number of code blocks in this precinct. */
|
||||
int numcblks;
|
||||
/* The total number of code blocks in this precinct. */
|
||||
int numcblks;
|
||||
|
||||
/* The per code block information. */
|
||||
jpc_dec_cblk_t *cblks;
|
||||
/* The per code block information. */
|
||||
jpc_dec_cblk_t *cblks;
|
||||
|
||||
/* The inclusion tag tree. */
|
||||
jpc_tagtree_t *incltagtree;
|
||||
/* The inclusion tag tree. */
|
||||
jpc_tagtree_t *incltagtree;
|
||||
|
||||
/* The insignificant MSBs tag tree. */
|
||||
jpc_tagtree_t *numimsbstagtree;
|
||||
/* The insignificant MSBs tag tree. */
|
||||
jpc_tagtree_t *numimsbstagtree;
|
||||
|
||||
} jpc_dec_prc_t;
|
||||
|
||||
@@ -352,29 +352,29 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The per-code-block-group state information. */
|
||||
jpc_dec_prc_t *prcs;
|
||||
/* The per-code-block-group state information. */
|
||||
jpc_dec_prc_t *prcs;
|
||||
|
||||
/* The sample data associated with this band. */
|
||||
jas_matrix_t *data;
|
||||
/* The sample data associated with this band. */
|
||||
jas_matrix_t *data;
|
||||
|
||||
/* The orientation of this band (i.e., LL, LH, HL, or HH). */
|
||||
int orient;
|
||||
/* The orientation of this band (i.e., LL, LH, HL, or HH). */
|
||||
int orient;
|
||||
|
||||
/* The encoded quantizer step size. */
|
||||
int stepsize;
|
||||
/* The encoded quantizer step size. */
|
||||
int stepsize;
|
||||
|
||||
/* The absolute quantizer step size. */
|
||||
jpc_fix_t absstepsize;
|
||||
/* The absolute quantizer step size. */
|
||||
jpc_fix_t absstepsize;
|
||||
|
||||
/* The number of bit planes for this band. */
|
||||
int numbps;
|
||||
/* The number of bit planes for this band. */
|
||||
int numbps;
|
||||
|
||||
/* The analysis gain associated with this band. */
|
||||
int analgain;
|
||||
/* The analysis gain associated with this band. */
|
||||
int analgain;
|
||||
|
||||
/* The ROI shift value for this band. */
|
||||
int roishift;
|
||||
/* The ROI shift value for this band. */
|
||||
int roishift;
|
||||
|
||||
} jpc_dec_band_t;
|
||||
|
||||
@@ -382,60 +382,60 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The number of bands associated with this resolution level. */
|
||||
int numbands;
|
||||
/* The number of bands associated with this resolution level. */
|
||||
int numbands;
|
||||
|
||||
/* The per-band information. */
|
||||
jpc_dec_band_t *bands;
|
||||
/* The per-band information. */
|
||||
jpc_dec_band_t *bands;
|
||||
|
||||
/* The x-coordinate of the top-left corner of the tile-component
|
||||
at this resolution. */
|
||||
uint_fast32_t xstart;
|
||||
/* The x-coordinate of the top-left corner of the tile-component
|
||||
at this resolution. */
|
||||
uint_fast32_t xstart;
|
||||
|
||||
/* The y-coordinate of the top-left corner of the tile-component
|
||||
at this resolution. */
|
||||
uint_fast32_t ystart;
|
||||
/* The y-coordinate of the top-left corner of the tile-component
|
||||
at this resolution. */
|
||||
uint_fast32_t ystart;
|
||||
|
||||
/* The x-coordinate of the bottom-right corner of the tile-component
|
||||
at this resolution (plus one). */
|
||||
uint_fast32_t xend;
|
||||
/* The x-coordinate of the bottom-right corner of the tile-component
|
||||
at this resolution (plus one). */
|
||||
uint_fast32_t xend;
|
||||
|
||||
/* The y-coordinate of the bottom-right corner of the tile-component
|
||||
at this resolution (plus one). */
|
||||
uint_fast32_t yend;
|
||||
/* The y-coordinate of the bottom-right corner of the tile-component
|
||||
at this resolution (plus one). */
|
||||
uint_fast32_t yend;
|
||||
|
||||
/* The exponent value for the nominal precinct width measured
|
||||
relative to the associated LL band. */
|
||||
int prcwidthexpn;
|
||||
/* The exponent value for the nominal precinct width measured
|
||||
relative to the associated LL band. */
|
||||
int prcwidthexpn;
|
||||
|
||||
/* The exponent value for the nominal precinct height measured
|
||||
relative to the associated LL band. */
|
||||
int prcheightexpn;
|
||||
/* The exponent value for the nominal precinct height measured
|
||||
relative to the associated LL band. */
|
||||
int prcheightexpn;
|
||||
|
||||
/* The number of precincts in the horizontal direction. */
|
||||
int numhprcs;
|
||||
/* The number of precincts in the horizontal direction. */
|
||||
int numhprcs;
|
||||
|
||||
/* The number of precincts in the vertical direction. */
|
||||
int numvprcs;
|
||||
/* The number of precincts in the vertical direction. */
|
||||
int numvprcs;
|
||||
|
||||
/* The total number of precincts. */
|
||||
int numprcs;
|
||||
/* The total number of precincts. */
|
||||
int numprcs;
|
||||
|
||||
/* The exponent value for the nominal code block group width.
|
||||
This quantity is associated with the next lower resolution level
|
||||
(assuming that there is one). */
|
||||
int cbgwidthexpn;
|
||||
/* The exponent value for the nominal code block group width.
|
||||
This quantity is associated with the next lower resolution level
|
||||
(assuming that there is one). */
|
||||
int cbgwidthexpn;
|
||||
|
||||
/* The exponent value for the nominal code block group height
|
||||
This quantity is associated with the next lower resolution level
|
||||
(assuming that there is one). */
|
||||
int cbgheightexpn;
|
||||
/* The exponent value for the nominal code block group height
|
||||
This quantity is associated with the next lower resolution level
|
||||
(assuming that there is one). */
|
||||
int cbgheightexpn;
|
||||
|
||||
/* The exponent value for the code block width. */
|
||||
uint_fast16_t cblkwidthexpn;
|
||||
/* The exponent value for the code block width. */
|
||||
uint_fast16_t cblkwidthexpn;
|
||||
|
||||
/* The exponent value for the code block height. */
|
||||
uint_fast16_t cblkheightexpn;
|
||||
/* The exponent value for the code block height. */
|
||||
uint_fast16_t cblkheightexpn;
|
||||
|
||||
} jpc_dec_rlvl_t;
|
||||
|
||||
@@ -443,33 +443,33 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The x-coordinate of the top-left corner of the tile-component
|
||||
in the coordinate system of the tile-component. */
|
||||
uint_fast32_t xstart;
|
||||
/* The x-coordinate of the top-left corner of the tile-component
|
||||
in the coordinate system of the tile-component. */
|
||||
uint_fast32_t xstart;
|
||||
|
||||
/* The y-coordinate of the top-left corner of the tile-component
|
||||
in the coordinate system of the tile-component. */
|
||||
uint_fast32_t ystart;
|
||||
/* The y-coordinate of the top-left corner of the tile-component
|
||||
in the coordinate system of the tile-component. */
|
||||
uint_fast32_t ystart;
|
||||
|
||||
/* The x-coordinate of the bottom-right corner of the tile-component
|
||||
in the coordinate system of the tile-component (plus one). */
|
||||
uint_fast32_t xend;
|
||||
/* The x-coordinate of the bottom-right corner of the tile-component
|
||||
in the coordinate system of the tile-component (plus one). */
|
||||
uint_fast32_t xend;
|
||||
|
||||
/* The y-coordinate of the bottom-right corner of the tile-component
|
||||
in the coordinate system of the tile-component (plus one). */
|
||||
uint_fast32_t yend;
|
||||
/* The y-coordinate of the bottom-right corner of the tile-component
|
||||
in the coordinate system of the tile-component (plus one). */
|
||||
uint_fast32_t yend;
|
||||
|
||||
/* The component data for the current tile. */
|
||||
jas_matrix_t *data;
|
||||
/* The component data for the current tile. */
|
||||
jas_matrix_t *data;
|
||||
|
||||
/* The number of resolution levels. */
|
||||
int numrlvls;
|
||||
/* The number of resolution levels. */
|
||||
int numrlvls;
|
||||
|
||||
/* The per resolution level information. */
|
||||
jpc_dec_rlvl_t *rlvls;
|
||||
/* The per resolution level information. */
|
||||
jpc_dec_rlvl_t *rlvls;
|
||||
|
||||
/* The TSFB. */
|
||||
jpc_tsfb_t *tsfb;
|
||||
/* The TSFB. */
|
||||
jpc_tsfb_t *tsfb;
|
||||
|
||||
} jpc_dec_tcomp_t;
|
||||
|
||||
@@ -486,51 +486,51 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The processing state for this tile. */
|
||||
int state;
|
||||
/* The processing state for this tile. */
|
||||
int state;
|
||||
|
||||
/* The x-coordinate of the top-left corner of the tile on the reference
|
||||
grid. */
|
||||
uint_fast32_t xstart;
|
||||
/* The x-coordinate of the top-left corner of the tile on the reference
|
||||
grid. */
|
||||
uint_fast32_t xstart;
|
||||
|
||||
/* The y-coordinate of the top-left corner of the tile on the reference
|
||||
grid. */
|
||||
uint_fast32_t ystart;
|
||||
/* The y-coordinate of the top-left corner of the tile on the reference
|
||||
grid. */
|
||||
uint_fast32_t ystart;
|
||||
|
||||
/* The x-coordinate of the bottom-right corner of the tile on the
|
||||
reference grid (plus one). */
|
||||
uint_fast32_t xend;
|
||||
/* The x-coordinate of the bottom-right corner of the tile on the
|
||||
reference grid (plus one). */
|
||||
uint_fast32_t xend;
|
||||
|
||||
/* The y-coordinate of the bottom-right corner of the tile on the
|
||||
reference grid (plus one). */
|
||||
uint_fast32_t yend;
|
||||
/* The y-coordinate of the bottom-right corner of the tile on the
|
||||
reference grid (plus one). */
|
||||
uint_fast32_t yend;
|
||||
|
||||
/* The packed packet header data for this tile. */
|
||||
jpc_ppxstab_t *pptstab;
|
||||
/* The packed packet header data for this tile. */
|
||||
jpc_ppxstab_t *pptstab;
|
||||
|
||||
/* A stream containing the packed packet header data for this tile. */
|
||||
jas_stream_t *pkthdrstream;
|
||||
/* A stream containing the packed packet header data for this tile. */
|
||||
jas_stream_t *pkthdrstream;
|
||||
|
||||
/* The current position within the packed packet header stream. */
|
||||
long pkthdrstreampos;
|
||||
/* The current position within the packed packet header stream. */
|
||||
long pkthdrstreampos;
|
||||
|
||||
/* The coding parameters for this tile. */
|
||||
jpc_dec_cp_t *cp;
|
||||
/* The coding parameters for this tile. */
|
||||
jpc_dec_cp_t *cp;
|
||||
|
||||
/* The per tile-component information. */
|
||||
jpc_dec_tcomp_t *tcomps;
|
||||
/* The per tile-component information. */
|
||||
jpc_dec_tcomp_t *tcomps;
|
||||
|
||||
/* The next expected tile-part number. */
|
||||
int partno;
|
||||
/* The next expected tile-part number. */
|
||||
int partno;
|
||||
|
||||
/* The number of tile-parts. */
|
||||
int numparts;
|
||||
/* The number of tile-parts. */
|
||||
int numparts;
|
||||
|
||||
/* The coding mode. */
|
||||
int realmode;
|
||||
/* The coding mode. */
|
||||
int realmode;
|
||||
|
||||
/* The packet iterator for this tile. */
|
||||
jpc_pi_t *pi;
|
||||
/* The packet iterator for this tile. */
|
||||
jpc_pi_t *pi;
|
||||
|
||||
} jpc_dec_tile_t;
|
||||
|
||||
@@ -538,29 +538,29 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The horizontal sampling period. */
|
||||
uint_fast32_t hstep;
|
||||
/* The horizontal sampling period. */
|
||||
uint_fast32_t hstep;
|
||||
|
||||
/* The vertical sampling period. */
|
||||
uint_fast32_t vstep;
|
||||
/* The vertical sampling period. */
|
||||
uint_fast32_t vstep;
|
||||
|
||||
/* The number of samples in the horizontal direction. */
|
||||
uint_fast32_t width;
|
||||
/* The number of samples in the horizontal direction. */
|
||||
uint_fast32_t width;
|
||||
|
||||
/* The number of samples in the vertical direction. */
|
||||
uint_fast32_t height;
|
||||
/* The number of samples in the vertical direction. */
|
||||
uint_fast32_t height;
|
||||
|
||||
/* The precision of the sample data. */
|
||||
uint_fast16_t prec;
|
||||
/* The precision of the sample data. */
|
||||
uint_fast16_t prec;
|
||||
|
||||
/* The signedness of the sample data. */
|
||||
bool sgnd;
|
||||
/* The signedness of the sample data. */
|
||||
bool sgnd;
|
||||
|
||||
/* The sample alignment horizontal offset. */
|
||||
uint_fast32_t hsubstep;
|
||||
|
||||
/* The sample alignment vertical offset. */
|
||||
uint_fast32_t vsubstep;
|
||||
/* The sample alignment horizontal offset. */
|
||||
uint_fast32_t hsubstep;
|
||||
|
||||
/* The sample alignment vertical offset. */
|
||||
uint_fast32_t vsubstep;
|
||||
|
||||
} jpc_dec_cmpt_t;
|
||||
|
||||
@@ -568,96 +568,96 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The decoded image. */
|
||||
jas_image_t *image;
|
||||
/* The decoded image. */
|
||||
jas_image_t *image;
|
||||
|
||||
/* The x-coordinate of the top-left corner of the image area on
|
||||
the reference grid. */
|
||||
uint_fast32_t xstart;
|
||||
/* The x-coordinate of the top-left corner of the image area on
|
||||
the reference grid. */
|
||||
uint_fast32_t xstart;
|
||||
|
||||
/* The y-coordinate of the top-left corner of the image area on
|
||||
the reference grid. */
|
||||
uint_fast32_t ystart;
|
||||
/* The y-coordinate of the top-left corner of the image area on
|
||||
the reference grid. */
|
||||
uint_fast32_t ystart;
|
||||
|
||||
/* The x-coordinate of the bottom-right corner of the image area on
|
||||
the reference grid (plus one). */
|
||||
uint_fast32_t xend;
|
||||
/* The x-coordinate of the bottom-right corner of the image area on
|
||||
the reference grid (plus one). */
|
||||
uint_fast32_t xend;
|
||||
|
||||
/* The y-coordinate of the bottom-right corner of the image area on
|
||||
the reference grid (plus one). */
|
||||
uint_fast32_t yend;
|
||||
/* The y-coordinate of the bottom-right corner of the image area on
|
||||
the reference grid (plus one). */
|
||||
uint_fast32_t yend;
|
||||
|
||||
/* The nominal tile width in units of the image reference grid. */
|
||||
uint_fast32_t tilewidth;
|
||||
/* The nominal tile width in units of the image reference grid. */
|
||||
uint_fast32_t tilewidth;
|
||||
|
||||
/* The nominal tile height in units of the image reference grid. */
|
||||
uint_fast32_t tileheight;
|
||||
/* The nominal tile height in units of the image reference grid. */
|
||||
uint_fast32_t tileheight;
|
||||
|
||||
/* The horizontal offset from the origin of the reference grid to the
|
||||
left side of the first tile. */
|
||||
uint_fast32_t tilexoff;
|
||||
/* The horizontal offset from the origin of the reference grid to the
|
||||
left side of the first tile. */
|
||||
uint_fast32_t tilexoff;
|
||||
|
||||
/* The vertical offset from the origin of the reference grid to the
|
||||
top side of the first tile. */
|
||||
uint_fast32_t tileyoff;
|
||||
/* The vertical offset from the origin of the reference grid to the
|
||||
top side of the first tile. */
|
||||
uint_fast32_t tileyoff;
|
||||
|
||||
/* The number of tiles spanning the image area in the vertical
|
||||
direction. */
|
||||
int numhtiles;
|
||||
/* The number of tiles spanning the image area in the vertical
|
||||
direction. */
|
||||
int numhtiles;
|
||||
|
||||
/* The number of tiles spanning the image area in the horizontal
|
||||
direction. */
|
||||
int numvtiles;
|
||||
/* The number of tiles spanning the image area in the horizontal
|
||||
direction. */
|
||||
int numvtiles;
|
||||
|
||||
/* The total number of tiles. */
|
||||
int numtiles;
|
||||
/* The total number of tiles. */
|
||||
int numtiles;
|
||||
|
||||
/* The per-tile information. */
|
||||
jpc_dec_tile_t *tiles;
|
||||
/* The per-tile information. */
|
||||
jpc_dec_tile_t *tiles;
|
||||
|
||||
/* The tile currently being processed. */
|
||||
jpc_dec_tile_t *curtile;
|
||||
/* The tile currently being processed. */
|
||||
jpc_dec_tile_t *curtile;
|
||||
|
||||
/* The number of components. */
|
||||
int numcomps;
|
||||
/* The number of components. */
|
||||
int numcomps;
|
||||
|
||||
/* The stream containing the input JPEG-2000 code stream data. */
|
||||
jas_stream_t *in;
|
||||
/* The stream containing the input JPEG-2000 code stream data. */
|
||||
jas_stream_t *in;
|
||||
|
||||
/* The default coding parameters for all tiles. */
|
||||
jpc_dec_cp_t *cp;
|
||||
/* The default coding parameters for all tiles. */
|
||||
jpc_dec_cp_t *cp;
|
||||
|
||||
/* The maximum number of layers that may be decoded. */
|
||||
int maxlyrs;
|
||||
/* The maximum number of layers that may be decoded. */
|
||||
int maxlyrs;
|
||||
|
||||
/* The maximum number of packets that may be decoded. */
|
||||
int maxpkts;
|
||||
/* The maximum number of packets that may be decoded. */
|
||||
int maxpkts;
|
||||
|
||||
/* The number of packets decoded so far in the processing of the entire
|
||||
code stream. */
|
||||
int numpkts;
|
||||
/* The number of packets decoded so far in the processing of the entire
|
||||
code stream. */
|
||||
int numpkts;
|
||||
|
||||
/* The next expected PPM marker segment sequence number. */
|
||||
int ppmseqno;
|
||||
/* The next expected PPM marker segment sequence number. */
|
||||
int ppmseqno;
|
||||
|
||||
/* The current state for code stream processing. */
|
||||
int state;
|
||||
/* The current state for code stream processing. */
|
||||
int state;
|
||||
|
||||
/* The per-component information. */
|
||||
jpc_dec_cmpt_t *cmpts;
|
||||
/* The per-component information. */
|
||||
jpc_dec_cmpt_t *cmpts;
|
||||
|
||||
/* The information from PPM marker segments. */
|
||||
jpc_ppxstab_t *ppmstab;
|
||||
/* The information from PPM marker segments. */
|
||||
jpc_ppxstab_t *ppmstab;
|
||||
|
||||
/* A list of streams containing packet header data from PPM marker
|
||||
segments. */
|
||||
jpc_streamlist_t *pkthdrstreams;
|
||||
/* A list of streams containing packet header data from PPM marker
|
||||
segments. */
|
||||
jpc_streamlist_t *pkthdrstreams;
|
||||
|
||||
/* The expected ending offset for a tile-part. */
|
||||
long curtileendoff;
|
||||
/* The expected ending offset for a tile-part. */
|
||||
long curtileendoff;
|
||||
|
||||
/* This is required by the tier-2 decoder. */
|
||||
jpc_cstate_t *cstate;
|
||||
/* This is required by the tier-2 decoder. */
|
||||
jpc_cstate_t *cstate;
|
||||
|
||||
} jpc_dec_t;
|
||||
|
||||
@@ -665,14 +665,14 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The debug level for the decoder. */
|
||||
int debug;
|
||||
/* The debug level for the decoder. */
|
||||
int debug;
|
||||
|
||||
/* The maximum number of layers to decode. */
|
||||
int maxlyrs;
|
||||
/* The maximum number of layers to decode. */
|
||||
int maxlyrs;
|
||||
|
||||
/* The maximum number of packets to decode. */
|
||||
int maxpkts;
|
||||
/* The maximum number of packets to decode. */
|
||||
int maxpkts;
|
||||
|
||||
} jpc_dec_importopts_t;
|
||||
|
||||
|
||||
externo
+1997
-1997
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+335
-335
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -100,29 +100,29 @@
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The horizontal sampling period. */
|
||||
uint_fast8_t sampgrdstepx;
|
||||
/* The horizontal sampling period. */
|
||||
uint_fast8_t sampgrdstepx;
|
||||
|
||||
/* The vertical sampling period. */
|
||||
uint_fast8_t sampgrdstepy;
|
||||
/* The vertical sampling period. */
|
||||
uint_fast8_t sampgrdstepy;
|
||||
|
||||
/* The sample alignment horizontal offset. */
|
||||
uint_fast8_t sampgrdsubstepx;
|
||||
/* The sample alignment horizontal offset. */
|
||||
uint_fast8_t sampgrdsubstepx;
|
||||
|
||||
/* The sample alignment vertical offset. */
|
||||
uint_fast8_t sampgrdsubstepy;
|
||||
/* The sample alignment vertical offset. */
|
||||
uint_fast8_t sampgrdsubstepy;
|
||||
|
||||
/* The precision of the samples. */
|
||||
uint_fast8_t prec;
|
||||
/* The precision of the samples. */
|
||||
uint_fast8_t prec;
|
||||
|
||||
/* The signedness of the samples. */
|
||||
bool sgnd;
|
||||
/* The signedness of the samples. */
|
||||
bool sgnd;
|
||||
|
||||
/* The number of step sizes. */
|
||||
uint_fast16_t numstepsizes;
|
||||
/* The number of step sizes. */
|
||||
uint_fast16_t numstepsizes;
|
||||
|
||||
/* The quantizer step sizes. */
|
||||
uint_fast16_t stepsizes[JPC_MAXBANDS];
|
||||
/* The quantizer step sizes. */
|
||||
uint_fast16_t stepsizes[JPC_MAXBANDS];
|
||||
|
||||
} jpc_enc_ccp_t;
|
||||
|
||||
@@ -130,24 +130,24 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The coding mode. */
|
||||
bool intmode;
|
||||
/* The coding mode. */
|
||||
bool intmode;
|
||||
|
||||
/* The coding style (i.e., SOP, EPH). */
|
||||
uint_fast8_t csty;
|
||||
/* The coding style (i.e., SOP, EPH). */
|
||||
uint_fast8_t csty;
|
||||
|
||||
/* The progression order. */
|
||||
uint_fast8_t prg;
|
||||
/* The progression order. */
|
||||
uint_fast8_t prg;
|
||||
|
||||
/* The multicomponent transform. */
|
||||
uint_fast8_t mctid;
|
||||
/* The multicomponent transform. */
|
||||
uint_fast8_t mctid;
|
||||
|
||||
/* The number of layers. */
|
||||
uint_fast16_t numlyrs;
|
||||
/* The number of layers. */
|
||||
uint_fast16_t numlyrs;
|
||||
|
||||
/* The normalized bit rates associated with the various
|
||||
intermediate layers. */
|
||||
jpc_fix_t *ilyrrates;
|
||||
/* The normalized bit rates associated with the various
|
||||
intermediate layers. */
|
||||
jpc_fix_t *ilyrrates;
|
||||
|
||||
} jpc_enc_tcp_t;
|
||||
|
||||
@@ -155,33 +155,33 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The coding style (i.e., explicit precinct sizes). */
|
||||
uint_fast8_t csty;
|
||||
/* The coding style (i.e., explicit precinct sizes). */
|
||||
uint_fast8_t csty;
|
||||
|
||||
/* The maximum number of resolution levels allowed. */
|
||||
uint_fast8_t maxrlvls;
|
||||
/* The maximum number of resolution levels allowed. */
|
||||
uint_fast8_t maxrlvls;
|
||||
|
||||
/* The exponent for the nominal code block width. */
|
||||
uint_fast16_t cblkwidthexpn;
|
||||
/* The exponent for the nominal code block width. */
|
||||
uint_fast16_t cblkwidthexpn;
|
||||
|
||||
/* The exponent for the nominal code block height. */
|
||||
uint_fast16_t cblkheightexpn;
|
||||
/* The exponent for the nominal code block height. */
|
||||
uint_fast16_t cblkheightexpn;
|
||||
|
||||
/* The code block style parameters (e.g., lazy, terminate all,
|
||||
segmentation symbols, causal, reset probability models). */
|
||||
uint_fast8_t cblksty;
|
||||
/* The code block style parameters (e.g., lazy, terminate all,
|
||||
segmentation symbols, causal, reset probability models). */
|
||||
uint_fast8_t cblksty;
|
||||
|
||||
/* The QMFB. */
|
||||
uint_fast8_t qmfbid;
|
||||
/* The QMFB. */
|
||||
uint_fast8_t qmfbid;
|
||||
|
||||
/* The precinct width values. */
|
||||
uint_fast16_t prcwidthexpns[JPC_MAXRLVLS];
|
||||
/* The precinct width values. */
|
||||
uint_fast16_t prcwidthexpns[JPC_MAXRLVLS];
|
||||
|
||||
/* The precinct height values. */
|
||||
uint_fast16_t prcheightexpns[JPC_MAXRLVLS];
|
||||
/* The precinct height values. */
|
||||
uint_fast16_t prcheightexpns[JPC_MAXRLVLS];
|
||||
|
||||
/* The number of guard bits. */
|
||||
uint_fast8_t numgbits;
|
||||
/* The number of guard bits. */
|
||||
uint_fast8_t numgbits;
|
||||
|
||||
} jpc_enc_tccp_t;
|
||||
|
||||
@@ -189,67 +189,67 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The debug level. */
|
||||
int debug;
|
||||
/* The debug level. */
|
||||
int debug;
|
||||
|
||||
/* The horizontal offset from the origin of the reference grid to the
|
||||
left edge of the image area. */
|
||||
uint_fast32_t imgareatlx;
|
||||
/* The horizontal offset from the origin of the reference grid to the
|
||||
left edge of the image area. */
|
||||
uint_fast32_t imgareatlx;
|
||||
|
||||
/* The vertical offset from the origin of the reference grid to the
|
||||
top edge of the image area. */
|
||||
uint_fast32_t imgareatly;
|
||||
/* The vertical offset from the origin of the reference grid to the
|
||||
top edge of the image area. */
|
||||
uint_fast32_t imgareatly;
|
||||
|
||||
/* The horizontal offset from the origin of the reference grid to the
|
||||
right edge of the image area (plus one). */
|
||||
uint_fast32_t refgrdwidth;
|
||||
/* The horizontal offset from the origin of the reference grid to the
|
||||
right edge of the image area (plus one). */
|
||||
uint_fast32_t refgrdwidth;
|
||||
|
||||
/* The vertical offset from the origin of the reference grid to the
|
||||
bottom edge of the image area (plus one). */
|
||||
uint_fast32_t refgrdheight;
|
||||
/* The vertical offset from the origin of the reference grid to the
|
||||
bottom edge of the image area (plus one). */
|
||||
uint_fast32_t refgrdheight;
|
||||
|
||||
/* The horizontal offset from the origin of the tile grid to the
|
||||
origin of the reference grid. */
|
||||
uint_fast32_t tilegrdoffx;
|
||||
/* The horizontal offset from the origin of the tile grid to the
|
||||
origin of the reference grid. */
|
||||
uint_fast32_t tilegrdoffx;
|
||||
|
||||
/* The vertical offset from the origin of the tile grid to the
|
||||
origin of the reference grid. */
|
||||
uint_fast32_t tilegrdoffy;
|
||||
/* The vertical offset from the origin of the tile grid to the
|
||||
origin of the reference grid. */
|
||||
uint_fast32_t tilegrdoffy;
|
||||
|
||||
/* The nominal tile width in units of the image reference grid. */
|
||||
uint_fast32_t tilewidth;
|
||||
/* The nominal tile width in units of the image reference grid. */
|
||||
uint_fast32_t tilewidth;
|
||||
|
||||
/* The nominal tile height in units of the image reference grid. */
|
||||
uint_fast32_t tileheight;
|
||||
/* The nominal tile height in units of the image reference grid. */
|
||||
uint_fast32_t tileheight;
|
||||
|
||||
/* The number of tiles spanning the image area in the horizontal
|
||||
direction. */
|
||||
uint_fast32_t numhtiles;
|
||||
/* The number of tiles spanning the image area in the horizontal
|
||||
direction. */
|
||||
uint_fast32_t numhtiles;
|
||||
|
||||
/* The number of tiles spanning the image area in the vertical
|
||||
direction. */
|
||||
uint_fast32_t numvtiles;
|
||||
/* The number of tiles spanning the image area in the vertical
|
||||
direction. */
|
||||
uint_fast32_t numvtiles;
|
||||
|
||||
/* The number of tiles. */
|
||||
uint_fast32_t numtiles;
|
||||
/* The number of tiles. */
|
||||
uint_fast32_t numtiles;
|
||||
|
||||
/* The number of components. */
|
||||
uint_fast16_t numcmpts;
|
||||
/* The number of components. */
|
||||
uint_fast16_t numcmpts;
|
||||
|
||||
/* The per-component coding parameters. */
|
||||
jpc_enc_ccp_t *ccps;
|
||||
/* The per-component coding parameters. */
|
||||
jpc_enc_ccp_t *ccps;
|
||||
|
||||
/* The per-tile coding parameters. */
|
||||
jpc_enc_tcp_t tcp;
|
||||
/* The per-tile coding parameters. */
|
||||
jpc_enc_tcp_t tcp;
|
||||
|
||||
/* The per-tile-component coding parameters. */
|
||||
jpc_enc_tccp_t tccp;
|
||||
/* The per-tile-component coding parameters. */
|
||||
jpc_enc_tccp_t tccp;
|
||||
|
||||
/* The target code stream length in bytes. */
|
||||
uint_fast32_t totalsize;
|
||||
/* The target code stream length in bytes. */
|
||||
uint_fast32_t totalsize;
|
||||
|
||||
/* The raw (i.e., uncompressed) size of the image in bytes. */
|
||||
uint_fast32_t rawsize;
|
||||
/* The raw (i.e., uncompressed) size of the image in bytes. */
|
||||
uint_fast32_t rawsize;
|
||||
|
||||
} jpc_enc_cp_t;
|
||||
|
||||
@@ -261,35 +261,35 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The starting offset for this pass. */
|
||||
int start;
|
||||
/* The starting offset for this pass. */
|
||||
int start;
|
||||
|
||||
/* The ending offset for this pass. */
|
||||
int end;
|
||||
/* The ending offset for this pass. */
|
||||
int end;
|
||||
|
||||
/* The type of data in this pass (i.e., MQ or raw). */
|
||||
int type;
|
||||
/* The type of data in this pass (i.e., MQ or raw). */
|
||||
int type;
|
||||
|
||||
/* Flag indicating that this pass is terminated. */
|
||||
int term;
|
||||
/* Flag indicating that this pass is terminated. */
|
||||
int term;
|
||||
|
||||
/* The entropy coder state after coding this pass. */
|
||||
jpc_mqencstate_t mqencstate;
|
||||
/* The entropy coder state after coding this pass. */
|
||||
jpc_mqencstate_t mqencstate;
|
||||
|
||||
/* The layer to which this pass has been assigned. */
|
||||
int lyrno;
|
||||
/* The layer to which this pass has been assigned. */
|
||||
int lyrno;
|
||||
|
||||
/* The R-D slope for this pass. */
|
||||
jpc_flt_t rdslope;
|
||||
/* The R-D slope for this pass. */
|
||||
jpc_flt_t rdslope;
|
||||
|
||||
/* The weighted MSE reduction associated with this pass. */
|
||||
jpc_flt_t wmsedec;
|
||||
/* The weighted MSE reduction associated with this pass. */
|
||||
jpc_flt_t wmsedec;
|
||||
|
||||
/* The cumulative weighted MSE reduction. */
|
||||
jpc_flt_t cumwmsedec;
|
||||
/* The cumulative weighted MSE reduction. */
|
||||
jpc_flt_t cumwmsedec;
|
||||
|
||||
/* The normalized MSE reduction. */
|
||||
long nmsedec;
|
||||
/* The normalized MSE reduction. */
|
||||
long nmsedec;
|
||||
|
||||
} jpc_enc_pass_t;
|
||||
|
||||
@@ -297,53 +297,53 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The number of passes. */
|
||||
int numpasses;
|
||||
/* The number of passes. */
|
||||
int numpasses;
|
||||
|
||||
/* The per-pass information. */
|
||||
jpc_enc_pass_t *passes;
|
||||
/* The per-pass information. */
|
||||
jpc_enc_pass_t *passes;
|
||||
|
||||
/* The number of passes encoded so far. */
|
||||
int numencpasses;
|
||||
/* The number of passes encoded so far. */
|
||||
int numencpasses;
|
||||
|
||||
/* The number of insignificant MSBs. */
|
||||
int numimsbs;
|
||||
/* The number of insignificant MSBs. */
|
||||
int numimsbs;
|
||||
|
||||
/* The number of bits used to encode pass data lengths. */
|
||||
int numlenbits;
|
||||
/* The number of bits used to encode pass data lengths. */
|
||||
int numlenbits;
|
||||
|
||||
/* The byte stream for this code block. */
|
||||
jas_stream_t *stream;
|
||||
/* The byte stream for this code block. */
|
||||
jas_stream_t *stream;
|
||||
|
||||
/* The entropy encoder. */
|
||||
jpc_mqenc_t *mqenc;
|
||||
/* The entropy encoder. */
|
||||
jpc_mqenc_t *mqenc;
|
||||
|
||||
/* The data for this code block. */
|
||||
jas_matrix_t *data;
|
||||
/* The data for this code block. */
|
||||
jas_matrix_t *data;
|
||||
|
||||
/* The state for this code block. */
|
||||
jas_matrix_t *flags;
|
||||
/* The state for this code block. */
|
||||
jas_matrix_t *flags;
|
||||
|
||||
/* The number of bit planes required for this code block. */
|
||||
int numbps;
|
||||
/* The number of bit planes required for this code block. */
|
||||
int numbps;
|
||||
|
||||
/* The next pass to be encoded. */
|
||||
jpc_enc_pass_t *curpass;
|
||||
/* The next pass to be encoded. */
|
||||
jpc_enc_pass_t *curpass;
|
||||
|
||||
/* The per-code-block-group state information. */
|
||||
struct jpc_enc_prc_s *prc;
|
||||
/* The per-code-block-group state information. */
|
||||
struct jpc_enc_prc_s *prc;
|
||||
|
||||
/* The saved current pass. */
|
||||
/* This is used by the rate control code. */
|
||||
jpc_enc_pass_t *savedcurpass;
|
||||
/* The saved current pass. */
|
||||
/* This is used by the rate control code. */
|
||||
jpc_enc_pass_t *savedcurpass;
|
||||
|
||||
/* The saved length indicator size. */
|
||||
/* This is used by the rate control code. */
|
||||
int savednumlenbits;
|
||||
/* The saved length indicator size. */
|
||||
/* This is used by the rate control code. */
|
||||
int savednumlenbits;
|
||||
|
||||
/* The saved number of encoded passes. */
|
||||
/* This is used by the rate control code. */
|
||||
int savednumencpasses;
|
||||
/* The saved number of encoded passes. */
|
||||
/* This is used by the rate control code. */
|
||||
int savednumencpasses;
|
||||
|
||||
} jpc_enc_cblk_t;
|
||||
|
||||
@@ -351,50 +351,50 @@ typedef struct {
|
||||
|
||||
typedef struct jpc_enc_prc_s {
|
||||
|
||||
/* The x-coordinate of the top-left corner of the precinct. */
|
||||
uint_fast32_t tlx;
|
||||
/* The x-coordinate of the top-left corner of the precinct. */
|
||||
uint_fast32_t tlx;
|
||||
|
||||
/* The y-coordinate of the top-left corner of the precinct. */
|
||||
uint_fast32_t tly;
|
||||
/* The y-coordinate of the top-left corner of the precinct. */
|
||||
uint_fast32_t tly;
|
||||
|
||||
/* The x-coordinate of the bottom-right corner of the precinct
|
||||
(plus one). */
|
||||
uint_fast32_t brx;
|
||||
/* The x-coordinate of the bottom-right corner of the precinct
|
||||
(plus one). */
|
||||
uint_fast32_t brx;
|
||||
|
||||
/* The y-coordinate of the bottom-right corner of the precinct
|
||||
(plus one). */
|
||||
uint_fast32_t bry;
|
||||
/* The y-coordinate of the bottom-right corner of the precinct
|
||||
(plus one). */
|
||||
uint_fast32_t bry;
|
||||
|
||||
/* The number of code blocks spanning the precinct in the horizontal
|
||||
direction. */
|
||||
int numhcblks;
|
||||
/* The number of code blocks spanning the precinct in the horizontal
|
||||
direction. */
|
||||
int numhcblks;
|
||||
|
||||
/* The number of code blocks spanning the precinct in the vertical
|
||||
direction. */
|
||||
int numvcblks;
|
||||
/* The number of code blocks spanning the precinct in the vertical
|
||||
direction. */
|
||||
int numvcblks;
|
||||
|
||||
/* The total number of code blocks. */
|
||||
int numcblks;
|
||||
/* The total number of code blocks. */
|
||||
int numcblks;
|
||||
|
||||
/* The per-code-block information. */
|
||||
jpc_enc_cblk_t *cblks;
|
||||
/* The per-code-block information. */
|
||||
jpc_enc_cblk_t *cblks;
|
||||
|
||||
/* The inclusion tag tree. */
|
||||
jpc_tagtree_t *incltree;
|
||||
/* The inclusion tag tree. */
|
||||
jpc_tagtree_t *incltree;
|
||||
|
||||
/* The insignifcant MSBs tag tree. */
|
||||
jpc_tagtree_t *nlibtree;
|
||||
/* The insignifcant MSBs tag tree. */
|
||||
jpc_tagtree_t *nlibtree;
|
||||
|
||||
/* The per-band information. */
|
||||
struct jpc_enc_band_s *band;
|
||||
/* The per-band information. */
|
||||
struct jpc_enc_band_s *band;
|
||||
|
||||
/* The saved inclusion tag tree. */
|
||||
/* This is used by rate control. */
|
||||
jpc_tagtree_t *savincltree;
|
||||
/* The saved inclusion tag tree. */
|
||||
/* This is used by rate control. */
|
||||
jpc_tagtree_t *savincltree;
|
||||
|
||||
/* The saved leading-insignificant-bit-planes tag tree. */
|
||||
/* This is used by rate control. */
|
||||
jpc_tagtree_t *savnlibtree;
|
||||
/* The saved leading-insignificant-bit-planes tag tree. */
|
||||
/* This is used by rate control. */
|
||||
jpc_tagtree_t *savnlibtree;
|
||||
|
||||
} jpc_enc_prc_t;
|
||||
|
||||
@@ -402,33 +402,33 @@ typedef struct jpc_enc_prc_s {
|
||||
|
||||
typedef struct jpc_enc_band_s {
|
||||
|
||||
/* The per precinct information. */
|
||||
jpc_enc_prc_t *prcs;
|
||||
/* The per precinct information. */
|
||||
jpc_enc_prc_t *prcs;
|
||||
|
||||
/* The coefficient data for this band. */
|
||||
jas_matrix_t *data;
|
||||
/* The coefficient data for this band. */
|
||||
jas_matrix_t *data;
|
||||
|
||||
/* The orientation of this band (i.e., LL, LH, HL, or HH). */
|
||||
int orient;
|
||||
/* The orientation of this band (i.e., LL, LH, HL, or HH). */
|
||||
int orient;
|
||||
|
||||
/* The number of bit planes associated with this band. */
|
||||
int numbps;
|
||||
/* The number of bit planes associated with this band. */
|
||||
int numbps;
|
||||
|
||||
/* The quantizer step size. */
|
||||
jpc_fix_t absstepsize;
|
||||
/* The quantizer step size. */
|
||||
jpc_fix_t absstepsize;
|
||||
|
||||
/* The encoded quantizer step size. */
|
||||
int stepsize;
|
||||
/* The encoded quantizer step size. */
|
||||
int stepsize;
|
||||
|
||||
/* The L2 norm of the synthesis basis functions associated with
|
||||
this band. (The MCT is not considered in this value.) */
|
||||
jpc_fix_t synweight;
|
||||
/* The L2 norm of the synthesis basis functions associated with
|
||||
this band. (The MCT is not considered in this value.) */
|
||||
jpc_fix_t synweight;
|
||||
|
||||
/* The analysis gain for this band. */
|
||||
int analgain;
|
||||
/* The analysis gain for this band. */
|
||||
int analgain;
|
||||
|
||||
/* The per-resolution-level information. */
|
||||
struct jpc_enc_rlvl_s *rlvl;
|
||||
/* The per-resolution-level information. */
|
||||
struct jpc_enc_rlvl_s *rlvl;
|
||||
|
||||
} jpc_enc_band_t;
|
||||
|
||||
@@ -436,65 +436,65 @@ typedef struct jpc_enc_band_s {
|
||||
|
||||
typedef struct jpc_enc_rlvl_s {
|
||||
|
||||
/* The x-coordinate of the top-left corner of the tile-component
|
||||
at this resolution. */
|
||||
uint_fast32_t tlx;
|
||||
/* The x-coordinate of the top-left corner of the tile-component
|
||||
at this resolution. */
|
||||
uint_fast32_t tlx;
|
||||
|
||||
/* The y-coordinate of the top-left corner of the tile-component
|
||||
at this resolution. */
|
||||
uint_fast32_t tly;
|
||||
/* The y-coordinate of the top-left corner of the tile-component
|
||||
at this resolution. */
|
||||
uint_fast32_t tly;
|
||||
|
||||
/* The x-coordinate of the bottom-right corner of the tile-component
|
||||
at this resolution (plus one). */
|
||||
uint_fast32_t brx;
|
||||
/* The x-coordinate of the bottom-right corner of the tile-component
|
||||
at this resolution (plus one). */
|
||||
uint_fast32_t brx;
|
||||
|
||||
/* The y-coordinate of the bottom-right corner of the tile-component
|
||||
at this resolution (plus one). */
|
||||
uint_fast32_t bry;
|
||||
/* The y-coordinate of the bottom-right corner of the tile-component
|
||||
at this resolution (plus one). */
|
||||
uint_fast32_t bry;
|
||||
|
||||
/* The exponent value for the nominal precinct width measured
|
||||
relative to the associated LL band. */
|
||||
int prcwidthexpn;
|
||||
/* The exponent value for the nominal precinct width measured
|
||||
relative to the associated LL band. */
|
||||
int prcwidthexpn;
|
||||
|
||||
/* The exponent value for the nominal precinct height measured
|
||||
relative to the associated LL band. */
|
||||
int prcheightexpn;
|
||||
/* The exponent value for the nominal precinct height measured
|
||||
relative to the associated LL band. */
|
||||
int prcheightexpn;
|
||||
|
||||
/* The number of precincts spanning the resolution level in the
|
||||
horizontal direction. */
|
||||
int numhprcs;
|
||||
/* The number of precincts spanning the resolution level in the
|
||||
horizontal direction. */
|
||||
int numhprcs;
|
||||
|
||||
/* The number of precincts spanning the resolution level in the
|
||||
vertical direction. */
|
||||
int numvprcs;
|
||||
/* The number of precincts spanning the resolution level in the
|
||||
vertical direction. */
|
||||
int numvprcs;
|
||||
|
||||
/* The total number of precincts. */
|
||||
int numprcs;
|
||||
/* The total number of precincts. */
|
||||
int numprcs;
|
||||
|
||||
/* The exponent value for the nominal code block group width.
|
||||
This quantity is associated with the next lower resolution level
|
||||
(assuming that there is one). */
|
||||
int cbgwidthexpn;
|
||||
/* The exponent value for the nominal code block group width.
|
||||
This quantity is associated with the next lower resolution level
|
||||
(assuming that there is one). */
|
||||
int cbgwidthexpn;
|
||||
|
||||
/* The exponent value for the nominal code block group height.
|
||||
This quantity is associated with the next lower resolution level
|
||||
(assuming that there is one). */
|
||||
int cbgheightexpn;
|
||||
/* The exponent value for the nominal code block group height.
|
||||
This quantity is associated with the next lower resolution level
|
||||
(assuming that there is one). */
|
||||
int cbgheightexpn;
|
||||
|
||||
/* The exponent value for the code block width. */
|
||||
uint_fast16_t cblkwidthexpn;
|
||||
/* The exponent value for the code block width. */
|
||||
uint_fast16_t cblkwidthexpn;
|
||||
|
||||
/* The exponent value for the code block height. */
|
||||
uint_fast16_t cblkheightexpn;
|
||||
/* The exponent value for the code block height. */
|
||||
uint_fast16_t cblkheightexpn;
|
||||
|
||||
/* The number of bands associated with this resolution level. */
|
||||
int numbands;
|
||||
/* The number of bands associated with this resolution level. */
|
||||
int numbands;
|
||||
|
||||
/* The per-band information. */
|
||||
jpc_enc_band_t *bands;
|
||||
/* The per-band information. */
|
||||
jpc_enc_band_t *bands;
|
||||
|
||||
/* The parent tile-component. */
|
||||
struct jpc_enc_tcmpt_s *tcmpt;
|
||||
/* The parent tile-component. */
|
||||
struct jpc_enc_tcmpt_s *tcmpt;
|
||||
|
||||
} jpc_enc_rlvl_t;
|
||||
|
||||
@@ -502,53 +502,53 @@ typedef struct jpc_enc_rlvl_s {
|
||||
|
||||
typedef struct jpc_enc_tcmpt_s {
|
||||
|
||||
/* The number of resolution levels. */
|
||||
int numrlvls;
|
||||
/* The number of resolution levels. */
|
||||
int numrlvls;
|
||||
|
||||
/* The per-resolution-level information. */
|
||||
jpc_enc_rlvl_t *rlvls;
|
||||
/* The per-resolution-level information. */
|
||||
jpc_enc_rlvl_t *rlvls;
|
||||
|
||||
/* The tile-component data. */
|
||||
jas_matrix_t *data;
|
||||
/* The tile-component data. */
|
||||
jas_matrix_t *data;
|
||||
|
||||
/* The QMFB. */
|
||||
int qmfbid;
|
||||
/* The QMFB. */
|
||||
int qmfbid;
|
||||
|
||||
/* The number of bands. */
|
||||
int numbands;
|
||||
/* The number of bands. */
|
||||
int numbands;
|
||||
|
||||
/* The TSFB. */
|
||||
jpc_tsfb_t *tsfb;
|
||||
/* The TSFB. */
|
||||
jpc_tsfb_t *tsfb;
|
||||
|
||||
/* The synthesis energy weight (for the MCT). */
|
||||
jpc_fix_t synweight;
|
||||
/* The synthesis energy weight (for the MCT). */
|
||||
jpc_fix_t synweight;
|
||||
|
||||
/* The precinct width exponents. */
|
||||
int prcwidthexpns[JPC_MAXRLVLS];
|
||||
/* The precinct width exponents. */
|
||||
int prcwidthexpns[JPC_MAXRLVLS];
|
||||
|
||||
/* The precinct height exponents. */
|
||||
int prcheightexpns[JPC_MAXRLVLS];
|
||||
/* The precinct height exponents. */
|
||||
int prcheightexpns[JPC_MAXRLVLS];
|
||||
|
||||
/* The code block width exponent. */
|
||||
int cblkwidthexpn;
|
||||
/* The code block width exponent. */
|
||||
int cblkwidthexpn;
|
||||
|
||||
/* The code block height exponent. */
|
||||
int cblkheightexpn;
|
||||
/* The code block height exponent. */
|
||||
int cblkheightexpn;
|
||||
|
||||
/* Coding style (i.e., explicit precinct sizes). */
|
||||
int csty;
|
||||
/* Coding style (i.e., explicit precinct sizes). */
|
||||
int csty;
|
||||
|
||||
/* Code block style. */
|
||||
int cblksty;
|
||||
/* Code block style. */
|
||||
int cblksty;
|
||||
|
||||
/* The number of quantizer step sizes. */
|
||||
int numstepsizes;
|
||||
/* The number of quantizer step sizes. */
|
||||
int numstepsizes;
|
||||
|
||||
/* The encoded quantizer step sizes. */
|
||||
uint_fast16_t stepsizes[JPC_MAXBANDS];
|
||||
/* The encoded quantizer step sizes. */
|
||||
uint_fast16_t stepsizes[JPC_MAXBANDS];
|
||||
|
||||
/* The parent tile. */
|
||||
struct jpc_enc_tile_s *tile;
|
||||
/* The parent tile. */
|
||||
struct jpc_enc_tile_s *tile;
|
||||
|
||||
} jpc_enc_tcmpt_t;
|
||||
|
||||
@@ -556,55 +556,55 @@ typedef struct jpc_enc_tcmpt_s {
|
||||
|
||||
typedef struct jpc_enc_tile_s {
|
||||
|
||||
/* The tile number. */
|
||||
uint_fast32_t tileno;
|
||||
/* The tile number. */
|
||||
uint_fast32_t tileno;
|
||||
|
||||
/* The x-coordinate of the top-left corner of the tile measured with
|
||||
respect to the reference grid. */
|
||||
uint_fast32_t tlx;
|
||||
/* The x-coordinate of the top-left corner of the tile measured with
|
||||
respect to the reference grid. */
|
||||
uint_fast32_t tlx;
|
||||
|
||||
/* The y-coordinate of the top-left corner of the tile measured with
|
||||
respect to the reference grid. */
|
||||
uint_fast32_t tly;
|
||||
/* The y-coordinate of the top-left corner of the tile measured with
|
||||
respect to the reference grid. */
|
||||
uint_fast32_t tly;
|
||||
|
||||
/* The x-coordinate of the bottom-right corner of the tile measured
|
||||
with respect to the reference grid (plus one). */
|
||||
uint_fast32_t brx;
|
||||
/* The x-coordinate of the bottom-right corner of the tile measured
|
||||
with respect to the reference grid (plus one). */
|
||||
uint_fast32_t brx;
|
||||
|
||||
/* The y-coordinate of the bottom-right corner of the tile measured
|
||||
with respect to the reference grid (plus one). */
|
||||
uint_fast32_t bry;
|
||||
/* The y-coordinate of the bottom-right corner of the tile measured
|
||||
with respect to the reference grid (plus one). */
|
||||
uint_fast32_t bry;
|
||||
|
||||
/* The coding style. */
|
||||
uint_fast8_t csty;
|
||||
/* The coding style. */
|
||||
uint_fast8_t csty;
|
||||
|
||||
/* The progression order. */
|
||||
uint_fast8_t prg;
|
||||
/* The progression order. */
|
||||
uint_fast8_t prg;
|
||||
|
||||
/* The number of layers. */
|
||||
int numlyrs;
|
||||
/* The number of layers. */
|
||||
int numlyrs;
|
||||
|
||||
/* The MCT to employ (if any). */
|
||||
uint_fast8_t mctid;
|
||||
/* The MCT to employ (if any). */
|
||||
uint_fast8_t mctid;
|
||||
|
||||
/* The packet iterator (used to determine the order of packet
|
||||
generation). */
|
||||
jpc_pi_t *pi;
|
||||
/* The packet iterator (used to determine the order of packet
|
||||
generation). */
|
||||
jpc_pi_t *pi;
|
||||
|
||||
/* The coding mode (i.e., integer or real). */
|
||||
bool intmode;
|
||||
/* The coding mode (i.e., integer or real). */
|
||||
bool intmode;
|
||||
|
||||
/* The number of bytes to allocate to the various layers. */
|
||||
uint_fast32_t *lyrsizes;
|
||||
/* The number of bytes to allocate to the various layers. */
|
||||
uint_fast32_t *lyrsizes;
|
||||
|
||||
/* The number of tile-components. */
|
||||
int numtcmpts;
|
||||
/* The number of tile-components. */
|
||||
int numtcmpts;
|
||||
|
||||
/* The per tile-component information. */
|
||||
jpc_enc_tcmpt_t *tcmpts;
|
||||
/* The per tile-component information. */
|
||||
jpc_enc_tcmpt_t *tcmpts;
|
||||
|
||||
/* The raw (i.e., uncompressed) size of this tile. */
|
||||
uint_fast32_t rawsize;
|
||||
/* The raw (i.e., uncompressed) size of this tile. */
|
||||
uint_fast32_t rawsize;
|
||||
|
||||
} jpc_enc_tile_t;
|
||||
|
||||
@@ -612,34 +612,34 @@ typedef struct jpc_enc_tile_s {
|
||||
|
||||
typedef struct jpc_enc_s {
|
||||
|
||||
/* The image being encoded. */
|
||||
jas_image_t *image;
|
||||
/* The image being encoded. */
|
||||
jas_image_t *image;
|
||||
|
||||
/* The output stream. */
|
||||
jas_stream_t *out;
|
||||
/* The output stream. */
|
||||
jas_stream_t *out;
|
||||
|
||||
/* The coding parameters. */
|
||||
jpc_enc_cp_t *cp;
|
||||
/* The coding parameters. */
|
||||
jpc_enc_cp_t *cp;
|
||||
|
||||
/* The tile currently being processed. */
|
||||
jpc_enc_tile_t *curtile;
|
||||
/* The tile currently being processed. */
|
||||
jpc_enc_tile_t *curtile;
|
||||
|
||||
/* The code stream state. */
|
||||
jpc_cstate_t *cstate;
|
||||
/* The code stream state. */
|
||||
jpc_cstate_t *cstate;
|
||||
|
||||
/* The number of bytes output so far. */
|
||||
uint_fast32_t len;
|
||||
/* The number of bytes output so far. */
|
||||
uint_fast32_t len;
|
||||
|
||||
/* The number of bytes available for the main body of the code stream. */
|
||||
/* This is used for rate allocation purposes. */
|
||||
uint_fast32_t mainbodysize;
|
||||
/* The number of bytes available for the main body of the code stream. */
|
||||
/* This is used for rate allocation purposes. */
|
||||
uint_fast32_t mainbodysize;
|
||||
|
||||
/* The marker segment currently being processed. */
|
||||
/* This member is a convenience for making cleanup easier. */
|
||||
jpc_ms_t *mrk;
|
||||
/* The marker segment currently being processed. */
|
||||
/* This member is a convenience for making cleanup easier. */
|
||||
jpc_ms_t *mrk;
|
||||
|
||||
/* The stream used to temporarily hold tile-part data. */
|
||||
jas_stream_t *tmpstream;
|
||||
/* The stream used to temporarily hold tile-part data. */
|
||||
jas_stream_t *tmpstream;
|
||||
|
||||
} jpc_enc_t;
|
||||
|
||||
|
||||
externo
+12
-12
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -113,11 +113,11 @@ typedef int_fast64_t jpc_fix_big_t;
|
||||
#define jpc_fix_add(x, y) JAS_FIX_ADD(jpc_fix_t, JPC_FIX_FRACBITS, x, y)
|
||||
#define jpc_fix_sub(x, y) JAS_FIX_SUB(jpc_fix_t, JPC_FIX_FRACBITS, x, y)
|
||||
#define jpc_fix_mul(x, y) \
|
||||
JAS_FIX_MUL(jpc_fix_t, JPC_FIX_FRACBITS, jpc_fix_big_t, x, y)
|
||||
JAS_FIX_MUL(jpc_fix_t, JPC_FIX_FRACBITS, jpc_fix_big_t, x, y)
|
||||
#define jpc_fix_mulbyint(x, y) \
|
||||
JAS_FIX_MULBYINT(jpc_fix_t, JPC_FIX_FRACBITS, x, y)
|
||||
JAS_FIX_MULBYINT(jpc_fix_t, JPC_FIX_FRACBITS, x, y)
|
||||
#define jpc_fix_div(x, y) \
|
||||
JAS_FIX_DIV(jpc_fix_t, JPC_FIX_FRACBITS, jpc_fix_big_t, x, y)
|
||||
JAS_FIX_DIV(jpc_fix_t, JPC_FIX_FRACBITS, jpc_fix_big_t, x, y)
|
||||
#define jpc_fix_neg(x) JAS_FIX_NEG(jpc_fix_t, JPC_FIX_FRACBITS, x)
|
||||
#define jpc_fix_asl(x, n) JAS_FIX_ASL(jpc_fix_t, JPC_FIX_FRACBITS, x, n)
|
||||
#define jpc_fix_asr(x, n) JAS_FIX_ASR(jpc_fix_t, JPC_FIX_FRACBITS, x, n)
|
||||
@@ -125,7 +125,7 @@ typedef int_fast64_t jpc_fix_big_t;
|
||||
#define jpc_fix_pluseq(x, y) JAS_FIX_PLUSEQ(jpc_fix_t, JPC_FIX_FRACBITS, x, y)
|
||||
#define jpc_fix_minuseq(x, y) JAS_FIX_MINUSEQ(jpc_fix_t, JPC_FIX_FRACBITS, x, y)
|
||||
#define jpc_fix_muleq(x, y) \
|
||||
JAS_FIX_MULEQ(jpc_fix_t, JPC_FIX_FRACBITS, jpc_fix_big_t, x, y)
|
||||
JAS_FIX_MULEQ(jpc_fix_t, JPC_FIX_FRACBITS, jpc_fix_big_t, x, y)
|
||||
|
||||
#define jpc_fix_abs(x) JAS_FIX_ABS(jpc_fix_t, JPC_FIX_FRACBITS, x)
|
||||
#define jpc_fix_isint(x) JAS_FIX_ISINT(jpc_fix_t, JPC_FIX_FRACBITS, x)
|
||||
|
||||
externo
+8
-8
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
|
||||
externo
+26
-26
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -88,17 +88,17 @@
|
||||
integer. */
|
||||
int jpc_floorlog2(int x)
|
||||
{
|
||||
int y;
|
||||
int y;
|
||||
|
||||
/* The argument must be positive. */
|
||||
assert(x > 0);
|
||||
/* The argument must be positive. */
|
||||
assert(x > 0);
|
||||
|
||||
y = 0;
|
||||
while (x > 1) {
|
||||
x >>= 1;
|
||||
++y;
|
||||
}
|
||||
return y;
|
||||
y = 0;
|
||||
while (x > 1) {
|
||||
x >>= 1;
|
||||
++y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
/* Calculate the bit position of the first leading one in a nonnegative
|
||||
@@ -107,15 +107,15 @@ int jpc_floorlog2(int x)
|
||||
allowable range for x is slightly different. */
|
||||
int jpc_firstone(int x)
|
||||
{
|
||||
int n;
|
||||
int n;
|
||||
|
||||
/* The argument must be nonnegative. */
|
||||
assert(x >= 0);
|
||||
/* The argument must be nonnegative. */
|
||||
assert(x >= 0);
|
||||
|
||||
n = -1;
|
||||
while (x > 0) {
|
||||
x >>= 1;
|
||||
++n;
|
||||
}
|
||||
return n;
|
||||
n = -1;
|
||||
while (x > 0) {
|
||||
x >>= 1;
|
||||
++n;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
externo
+8
-8
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -20,15 +20,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -55,7 +55,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
|
||||
externo
+180
-180
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -86,206 +86,206 @@
|
||||
|
||||
void jpc_rct(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2)
|
||||
{
|
||||
int numrows;
|
||||
int numcols;
|
||||
int i;
|
||||
int j;
|
||||
jpc_fix_t *c0p;
|
||||
jpc_fix_t *c1p;
|
||||
jpc_fix_t *c2p;
|
||||
int numrows;
|
||||
int numcols;
|
||||
int i;
|
||||
int j;
|
||||
jpc_fix_t *c0p;
|
||||
jpc_fix_t *c1p;
|
||||
jpc_fix_t *c2p;
|
||||
|
||||
numrows = jas_matrix_numrows(c0);
|
||||
numcols = jas_matrix_numcols(c0);
|
||||
numrows = jas_matrix_numrows(c0);
|
||||
numcols = jas_matrix_numcols(c0);
|
||||
|
||||
/* All three matrices must have the same dimensions. */
|
||||
assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numcols(c1) == numcols
|
||||
&& jas_matrix_numrows(c2) == numrows && jas_matrix_numcols(c2) == numcols);
|
||||
/* All three matrices must have the same dimensions. */
|
||||
assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numcols(c1) == numcols
|
||||
&& jas_matrix_numrows(c2) == numrows && jas_matrix_numcols(c2) == numcols);
|
||||
|
||||
for (i = 0; i < numrows; i++) {
|
||||
c0p = jas_matrix_getref(c0, i, 0);
|
||||
c1p = jas_matrix_getref(c1, i, 0);
|
||||
c2p = jas_matrix_getref(c2, i, 0);
|
||||
for (j = numcols; j > 0; --j) {
|
||||
int r;
|
||||
int g;
|
||||
int b;
|
||||
int y;
|
||||
int u;
|
||||
int v;
|
||||
r = *c0p;
|
||||
g = *c1p;
|
||||
b = *c2p;
|
||||
y = (r + (g << 1) + b) >> 2;
|
||||
u = b - g;
|
||||
v = r - g;
|
||||
*c0p++ = y;
|
||||
*c1p++ = u;
|
||||
*c2p++ = v;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < numrows; i++) {
|
||||
c0p = jas_matrix_getref(c0, i, 0);
|
||||
c1p = jas_matrix_getref(c1, i, 0);
|
||||
c2p = jas_matrix_getref(c2, i, 0);
|
||||
for (j = numcols; j > 0; --j) {
|
||||
int r;
|
||||
int g;
|
||||
int b;
|
||||
int y;
|
||||
int u;
|
||||
int v;
|
||||
r = *c0p;
|
||||
g = *c1p;
|
||||
b = *c2p;
|
||||
y = (r + (g << 1) + b) >> 2;
|
||||
u = b - g;
|
||||
v = r - g;
|
||||
*c0p++ = y;
|
||||
*c1p++ = u;
|
||||
*c2p++ = v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Compute the inverse RCT. */
|
||||
|
||||
void jpc_irct(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2)
|
||||
{
|
||||
int numrows;
|
||||
int numcols;
|
||||
int i;
|
||||
int j;
|
||||
jpc_fix_t *c0p;
|
||||
jpc_fix_t *c1p;
|
||||
jpc_fix_t *c2p;
|
||||
int numrows;
|
||||
int numcols;
|
||||
int i;
|
||||
int j;
|
||||
jpc_fix_t *c0p;
|
||||
jpc_fix_t *c1p;
|
||||
jpc_fix_t *c2p;
|
||||
|
||||
numrows = jas_matrix_numrows(c0);
|
||||
numcols = jas_matrix_numcols(c0);
|
||||
numrows = jas_matrix_numrows(c0);
|
||||
numcols = jas_matrix_numcols(c0);
|
||||
|
||||
/* All three matrices must have the same dimensions. */
|
||||
assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numcols(c1) == numcols
|
||||
&& jas_matrix_numrows(c2) == numrows && jas_matrix_numcols(c2) == numcols);
|
||||
/* All three matrices must have the same dimensions. */
|
||||
assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numcols(c1) == numcols
|
||||
&& jas_matrix_numrows(c2) == numrows && jas_matrix_numcols(c2) == numcols);
|
||||
|
||||
for (i = 0; i < numrows; i++) {
|
||||
c0p = jas_matrix_getref(c0, i, 0);
|
||||
c1p = jas_matrix_getref(c1, i, 0);
|
||||
c2p = jas_matrix_getref(c2, i, 0);
|
||||
for (j = numcols; j > 0; --j) {
|
||||
int r;
|
||||
int g;
|
||||
int b;
|
||||
int y;
|
||||
int u;
|
||||
int v;
|
||||
y = *c0p;
|
||||
u = *c1p;
|
||||
v = *c2p;
|
||||
g = y - ((u + v) >> 2);
|
||||
r = v + g;
|
||||
b = u + g;
|
||||
*c0p++ = r;
|
||||
*c1p++ = g;
|
||||
*c2p++ = b;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < numrows; i++) {
|
||||
c0p = jas_matrix_getref(c0, i, 0);
|
||||
c1p = jas_matrix_getref(c1, i, 0);
|
||||
c2p = jas_matrix_getref(c2, i, 0);
|
||||
for (j = numcols; j > 0; --j) {
|
||||
int r;
|
||||
int g;
|
||||
int b;
|
||||
int y;
|
||||
int u;
|
||||
int v;
|
||||
y = *c0p;
|
||||
u = *c1p;
|
||||
v = *c2p;
|
||||
g = y - ((u + v) >> 2);
|
||||
r = v + g;
|
||||
b = u + g;
|
||||
*c0p++ = r;
|
||||
*c1p++ = g;
|
||||
*c2p++ = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void jpc_ict(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2)
|
||||
{
|
||||
int numrows;
|
||||
int numcols;
|
||||
int i;
|
||||
int j;
|
||||
jpc_fix_t r;
|
||||
jpc_fix_t g;
|
||||
jpc_fix_t b;
|
||||
jpc_fix_t y;
|
||||
jpc_fix_t u;
|
||||
jpc_fix_t v;
|
||||
jpc_fix_t *c0p;
|
||||
jpc_fix_t *c1p;
|
||||
jpc_fix_t *c2p;
|
||||
int numrows;
|
||||
int numcols;
|
||||
int i;
|
||||
int j;
|
||||
jpc_fix_t r;
|
||||
jpc_fix_t g;
|
||||
jpc_fix_t b;
|
||||
jpc_fix_t y;
|
||||
jpc_fix_t u;
|
||||
jpc_fix_t v;
|
||||
jpc_fix_t *c0p;
|
||||
jpc_fix_t *c1p;
|
||||
jpc_fix_t *c2p;
|
||||
|
||||
numrows = jas_matrix_numrows(c0);
|
||||
assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numrows(c2) == numrows);
|
||||
numcols = jas_matrix_numcols(c0);
|
||||
assert(jas_matrix_numcols(c1) == numcols && jas_matrix_numcols(c2) == numcols);
|
||||
for (i = 0; i < numrows; ++i) {
|
||||
c0p = jas_matrix_getref(c0, i, 0);
|
||||
c1p = jas_matrix_getref(c1, i, 0);
|
||||
c2p = jas_matrix_getref(c2, i, 0);
|
||||
for (j = numcols; j > 0; --j) {
|
||||
r = *c0p;
|
||||
g = *c1p;
|
||||
b = *c2p;
|
||||
y = jpc_fix_add3(jpc_fix_mul(jpc_dbltofix(0.299), r), jpc_fix_mul(jpc_dbltofix(0.587), g),
|
||||
jpc_fix_mul(jpc_dbltofix(0.114), b));
|
||||
u = jpc_fix_add3(jpc_fix_mul(jpc_dbltofix(-0.16875), r), jpc_fix_mul(jpc_dbltofix(-0.33126), g),
|
||||
jpc_fix_mul(jpc_dbltofix(0.5), b));
|
||||
v = jpc_fix_add3(jpc_fix_mul(jpc_dbltofix(0.5), r), jpc_fix_mul(jpc_dbltofix(-0.41869), g),
|
||||
jpc_fix_mul(jpc_dbltofix(-0.08131), b));
|
||||
*c0p++ = y;
|
||||
*c1p++ = u;
|
||||
*c2p++ = v;
|
||||
}
|
||||
}
|
||||
numrows = jas_matrix_numrows(c0);
|
||||
assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numrows(c2) == numrows);
|
||||
numcols = jas_matrix_numcols(c0);
|
||||
assert(jas_matrix_numcols(c1) == numcols && jas_matrix_numcols(c2) == numcols);
|
||||
for (i = 0; i < numrows; ++i) {
|
||||
c0p = jas_matrix_getref(c0, i, 0);
|
||||
c1p = jas_matrix_getref(c1, i, 0);
|
||||
c2p = jas_matrix_getref(c2, i, 0);
|
||||
for (j = numcols; j > 0; --j) {
|
||||
r = *c0p;
|
||||
g = *c1p;
|
||||
b = *c2p;
|
||||
y = jpc_fix_add3(jpc_fix_mul(jpc_dbltofix(0.299), r), jpc_fix_mul(jpc_dbltofix(0.587), g),
|
||||
jpc_fix_mul(jpc_dbltofix(0.114), b));
|
||||
u = jpc_fix_add3(jpc_fix_mul(jpc_dbltofix(-0.16875), r), jpc_fix_mul(jpc_dbltofix(-0.33126), g),
|
||||
jpc_fix_mul(jpc_dbltofix(0.5), b));
|
||||
v = jpc_fix_add3(jpc_fix_mul(jpc_dbltofix(0.5), r), jpc_fix_mul(jpc_dbltofix(-0.41869), g),
|
||||
jpc_fix_mul(jpc_dbltofix(-0.08131), b));
|
||||
*c0p++ = y;
|
||||
*c1p++ = u;
|
||||
*c2p++ = v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void jpc_iict(jas_matrix_t *c0, jas_matrix_t *c1, jas_matrix_t *c2)
|
||||
{
|
||||
int numrows;
|
||||
int numcols;
|
||||
int i;
|
||||
int j;
|
||||
jpc_fix_t r;
|
||||
jpc_fix_t g;
|
||||
jpc_fix_t b;
|
||||
jpc_fix_t y;
|
||||
jpc_fix_t u;
|
||||
jpc_fix_t v;
|
||||
jpc_fix_t *c0p;
|
||||
jpc_fix_t *c1p;
|
||||
jpc_fix_t *c2p;
|
||||
int numrows;
|
||||
int numcols;
|
||||
int i;
|
||||
int j;
|
||||
jpc_fix_t r;
|
||||
jpc_fix_t g;
|
||||
jpc_fix_t b;
|
||||
jpc_fix_t y;
|
||||
jpc_fix_t u;
|
||||
jpc_fix_t v;
|
||||
jpc_fix_t *c0p;
|
||||
jpc_fix_t *c1p;
|
||||
jpc_fix_t *c2p;
|
||||
|
||||
numrows = jas_matrix_numrows(c0);
|
||||
assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numrows(c2) == numrows);
|
||||
numcols = jas_matrix_numcols(c0);
|
||||
assert(jas_matrix_numcols(c1) == numcols && jas_matrix_numcols(c2) == numcols);
|
||||
for (i = 0; i < numrows; ++i) {
|
||||
c0p = jas_matrix_getref(c0, i, 0);
|
||||
c1p = jas_matrix_getref(c1, i, 0);
|
||||
c2p = jas_matrix_getref(c2, i, 0);
|
||||
for (j = numcols; j > 0; --j) {
|
||||
y = *c0p;
|
||||
u = *c1p;
|
||||
v = *c2p;
|
||||
r = jpc_fix_add(y, jpc_fix_mul(jpc_dbltofix(1.402), v));
|
||||
g = jpc_fix_add3(y, jpc_fix_mul(jpc_dbltofix(-0.34413), u),
|
||||
jpc_fix_mul(jpc_dbltofix(-0.71414), v));
|
||||
b = jpc_fix_add(y, jpc_fix_mul(jpc_dbltofix(1.772), u));
|
||||
*c0p++ = r;
|
||||
*c1p++ = g;
|
||||
*c2p++ = b;
|
||||
}
|
||||
}
|
||||
numrows = jas_matrix_numrows(c0);
|
||||
assert(jas_matrix_numrows(c1) == numrows && jas_matrix_numrows(c2) == numrows);
|
||||
numcols = jas_matrix_numcols(c0);
|
||||
assert(jas_matrix_numcols(c1) == numcols && jas_matrix_numcols(c2) == numcols);
|
||||
for (i = 0; i < numrows; ++i) {
|
||||
c0p = jas_matrix_getref(c0, i, 0);
|
||||
c1p = jas_matrix_getref(c1, i, 0);
|
||||
c2p = jas_matrix_getref(c2, i, 0);
|
||||
for (j = numcols; j > 0; --j) {
|
||||
y = *c0p;
|
||||
u = *c1p;
|
||||
v = *c2p;
|
||||
r = jpc_fix_add(y, jpc_fix_mul(jpc_dbltofix(1.402), v));
|
||||
g = jpc_fix_add3(y, jpc_fix_mul(jpc_dbltofix(-0.34413), u),
|
||||
jpc_fix_mul(jpc_dbltofix(-0.71414), v));
|
||||
b = jpc_fix_add(y, jpc_fix_mul(jpc_dbltofix(1.772), u));
|
||||
*c0p++ = r;
|
||||
*c1p++ = g;
|
||||
*c2p++ = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jpc_fix_t jpc_mct_getsynweight(int mctid, int cmptno)
|
||||
{
|
||||
jpc_fix_t synweight;
|
||||
jpc_fix_t synweight;
|
||||
|
||||
synweight = JPC_FIX_ONE;
|
||||
switch (mctid) {
|
||||
case JPC_MCT_RCT:
|
||||
switch (cmptno) {
|
||||
case 0:
|
||||
synweight = jpc_dbltofix(sqrt(3.0));
|
||||
break;
|
||||
case 1:
|
||||
synweight = jpc_dbltofix(sqrt(0.6875));
|
||||
break;
|
||||
case 2:
|
||||
synweight = jpc_dbltofix(sqrt(0.6875));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case JPC_MCT_ICT:
|
||||
switch (cmptno) {
|
||||
case 0:
|
||||
synweight = jpc_dbltofix(sqrt(3.0000));
|
||||
break;
|
||||
case 1:
|
||||
synweight = jpc_dbltofix(sqrt(3.2584));
|
||||
break;
|
||||
case 2:
|
||||
synweight = jpc_dbltofix(sqrt(2.4755));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
synweight = JPC_FIX_ONE;
|
||||
switch (mctid) {
|
||||
case JPC_MCT_RCT:
|
||||
switch (cmptno) {
|
||||
case 0:
|
||||
synweight = jpc_dbltofix(sqrt(3.0));
|
||||
break;
|
||||
case 1:
|
||||
synweight = jpc_dbltofix(sqrt(0.6875));
|
||||
break;
|
||||
case 2:
|
||||
synweight = jpc_dbltofix(sqrt(0.6875));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case JPC_MCT_ICT:
|
||||
switch (cmptno) {
|
||||
case 0:
|
||||
synweight = jpc_dbltofix(sqrt(3.0000));
|
||||
break;
|
||||
case 1:
|
||||
synweight = jpc_dbltofix(sqrt(3.2584));
|
||||
break;
|
||||
case 2:
|
||||
synweight = jpc_dbltofix(sqrt(2.4755));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#if 0
|
||||
default:
|
||||
synweight = JPC_FIX_ONE;
|
||||
break;
|
||||
default:
|
||||
synweight = JPC_FIX_ONE;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return synweight;
|
||||
return synweight;
|
||||
}
|
||||
|
||||
externo
+8
-8
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
|
||||
externo
+102
-102
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -82,98 +82,98 @@
|
||||
/* MQ coder per-state information. */
|
||||
|
||||
jpc_mqstate_t jpc_mqstates[47 * 2] = {
|
||||
{0x5601, 0, &jpc_mqstates[ 2], &jpc_mqstates[ 3]},
|
||||
{0x5601, 1, &jpc_mqstates[ 3], &jpc_mqstates[ 2]},
|
||||
{0x3401, 0, &jpc_mqstates[ 4], &jpc_mqstates[12]},
|
||||
{0x3401, 1, &jpc_mqstates[ 5], &jpc_mqstates[13]},
|
||||
{0x1801, 0, &jpc_mqstates[ 6], &jpc_mqstates[18]},
|
||||
{0x1801, 1, &jpc_mqstates[ 7], &jpc_mqstates[19]},
|
||||
{0x0ac1, 0, &jpc_mqstates[ 8], &jpc_mqstates[24]},
|
||||
{0x0ac1, 1, &jpc_mqstates[ 9], &jpc_mqstates[25]},
|
||||
{0x0521, 0, &jpc_mqstates[10], &jpc_mqstates[58]},
|
||||
{0x0521, 1, &jpc_mqstates[11], &jpc_mqstates[59]},
|
||||
{0x0221, 0, &jpc_mqstates[76], &jpc_mqstates[66]},
|
||||
{0x0221, 1, &jpc_mqstates[77], &jpc_mqstates[67]},
|
||||
{0x5601, 0, &jpc_mqstates[14], &jpc_mqstates[13]},
|
||||
{0x5601, 1, &jpc_mqstates[15], &jpc_mqstates[12]},
|
||||
{0x5401, 0, &jpc_mqstates[16], &jpc_mqstates[28]},
|
||||
{0x5401, 1, &jpc_mqstates[17], &jpc_mqstates[29]},
|
||||
{0x4801, 0, &jpc_mqstates[18], &jpc_mqstates[28]},
|
||||
{0x4801, 1, &jpc_mqstates[19], &jpc_mqstates[29]},
|
||||
{0x3801, 0, &jpc_mqstates[20], &jpc_mqstates[28]},
|
||||
{0x3801, 1, &jpc_mqstates[21], &jpc_mqstates[29]},
|
||||
{0x3001, 0, &jpc_mqstates[22], &jpc_mqstates[34]},
|
||||
{0x3001, 1, &jpc_mqstates[23], &jpc_mqstates[35]},
|
||||
{0x2401, 0, &jpc_mqstates[24], &jpc_mqstates[36]},
|
||||
{0x2401, 1, &jpc_mqstates[25], &jpc_mqstates[37]},
|
||||
{0x1c01, 0, &jpc_mqstates[26], &jpc_mqstates[40]},
|
||||
{0x1c01, 1, &jpc_mqstates[27], &jpc_mqstates[41]},
|
||||
{0x1601, 0, &jpc_mqstates[58], &jpc_mqstates[42]},
|
||||
{0x1601, 1, &jpc_mqstates[59], &jpc_mqstates[43]},
|
||||
{0x5601, 0, &jpc_mqstates[30], &jpc_mqstates[29]},
|
||||
{0x5601, 1, &jpc_mqstates[31], &jpc_mqstates[28]},
|
||||
{0x5401, 0, &jpc_mqstates[32], &jpc_mqstates[28]},
|
||||
{0x5401, 1, &jpc_mqstates[33], &jpc_mqstates[29]},
|
||||
{0x5101, 0, &jpc_mqstates[34], &jpc_mqstates[30]},
|
||||
{0x5101, 1, &jpc_mqstates[35], &jpc_mqstates[31]},
|
||||
{0x4801, 0, &jpc_mqstates[36], &jpc_mqstates[32]},
|
||||
{0x4801, 1, &jpc_mqstates[37], &jpc_mqstates[33]},
|
||||
{0x3801, 0, &jpc_mqstates[38], &jpc_mqstates[34]},
|
||||
{0x3801, 1, &jpc_mqstates[39], &jpc_mqstates[35]},
|
||||
{0x3401, 0, &jpc_mqstates[40], &jpc_mqstates[36]},
|
||||
{0x3401, 1, &jpc_mqstates[41], &jpc_mqstates[37]},
|
||||
{0x3001, 0, &jpc_mqstates[42], &jpc_mqstates[38]},
|
||||
{0x3001, 1, &jpc_mqstates[43], &jpc_mqstates[39]},
|
||||
{0x2801, 0, &jpc_mqstates[44], &jpc_mqstates[38]},
|
||||
{0x2801, 1, &jpc_mqstates[45], &jpc_mqstates[39]},
|
||||
{0x2401, 0, &jpc_mqstates[46], &jpc_mqstates[40]},
|
||||
{0x2401, 1, &jpc_mqstates[47], &jpc_mqstates[41]},
|
||||
{0x2201, 0, &jpc_mqstates[48], &jpc_mqstates[42]},
|
||||
{0x2201, 1, &jpc_mqstates[49], &jpc_mqstates[43]},
|
||||
{0x1c01, 0, &jpc_mqstates[50], &jpc_mqstates[44]},
|
||||
{0x1c01, 1, &jpc_mqstates[51], &jpc_mqstates[45]},
|
||||
{0x1801, 0, &jpc_mqstates[52], &jpc_mqstates[46]},
|
||||
{0x1801, 1, &jpc_mqstates[53], &jpc_mqstates[47]},
|
||||
{0x1601, 0, &jpc_mqstates[54], &jpc_mqstates[48]},
|
||||
{0x1601, 1, &jpc_mqstates[55], &jpc_mqstates[49]},
|
||||
{0x1401, 0, &jpc_mqstates[56], &jpc_mqstates[50]},
|
||||
{0x1401, 1, &jpc_mqstates[57], &jpc_mqstates[51]},
|
||||
{0x1201, 0, &jpc_mqstates[58], &jpc_mqstates[52]},
|
||||
{0x1201, 1, &jpc_mqstates[59], &jpc_mqstates[53]},
|
||||
{0x1101, 0, &jpc_mqstates[60], &jpc_mqstates[54]},
|
||||
{0x1101, 1, &jpc_mqstates[61], &jpc_mqstates[55]},
|
||||
{0x0ac1, 0, &jpc_mqstates[62], &jpc_mqstates[56]},
|
||||
{0x0ac1, 1, &jpc_mqstates[63], &jpc_mqstates[57]},
|
||||
{0x09c1, 0, &jpc_mqstates[64], &jpc_mqstates[58]},
|
||||
{0x09c1, 1, &jpc_mqstates[65], &jpc_mqstates[59]},
|
||||
{0x08a1, 0, &jpc_mqstates[66], &jpc_mqstates[60]},
|
||||
{0x08a1, 1, &jpc_mqstates[67], &jpc_mqstates[61]},
|
||||
{0x0521, 0, &jpc_mqstates[68], &jpc_mqstates[62]},
|
||||
{0x0521, 1, &jpc_mqstates[69], &jpc_mqstates[63]},
|
||||
{0x0441, 0, &jpc_mqstates[70], &jpc_mqstates[64]},
|
||||
{0x0441, 1, &jpc_mqstates[71], &jpc_mqstates[65]},
|
||||
{0x02a1, 0, &jpc_mqstates[72], &jpc_mqstates[66]},
|
||||
{0x02a1, 1, &jpc_mqstates[73], &jpc_mqstates[67]},
|
||||
{0x0221, 0, &jpc_mqstates[74], &jpc_mqstates[68]},
|
||||
{0x0221, 1, &jpc_mqstates[75], &jpc_mqstates[69]},
|
||||
{0x0141, 0, &jpc_mqstates[76], &jpc_mqstates[70]},
|
||||
{0x0141, 1, &jpc_mqstates[77], &jpc_mqstates[71]},
|
||||
{0x0111, 0, &jpc_mqstates[78], &jpc_mqstates[72]},
|
||||
{0x0111, 1, &jpc_mqstates[79], &jpc_mqstates[73]},
|
||||
{0x0085, 0, &jpc_mqstates[80], &jpc_mqstates[74]},
|
||||
{0x0085, 1, &jpc_mqstates[81], &jpc_mqstates[75]},
|
||||
{0x0049, 0, &jpc_mqstates[82], &jpc_mqstates[76]},
|
||||
{0x0049, 1, &jpc_mqstates[83], &jpc_mqstates[77]},
|
||||
{0x0025, 0, &jpc_mqstates[84], &jpc_mqstates[78]},
|
||||
{0x0025, 1, &jpc_mqstates[85], &jpc_mqstates[79]},
|
||||
{0x0015, 0, &jpc_mqstates[86], &jpc_mqstates[80]},
|
||||
{0x0015, 1, &jpc_mqstates[87], &jpc_mqstates[81]},
|
||||
{0x0009, 0, &jpc_mqstates[88], &jpc_mqstates[82]},
|
||||
{0x0009, 1, &jpc_mqstates[89], &jpc_mqstates[83]},
|
||||
{0x0005, 0, &jpc_mqstates[90], &jpc_mqstates[84]},
|
||||
{0x0005, 1, &jpc_mqstates[91], &jpc_mqstates[85]},
|
||||
{0x0001, 0, &jpc_mqstates[90], &jpc_mqstates[86]},
|
||||
{0x0001, 1, &jpc_mqstates[91], &jpc_mqstates[87]},
|
||||
{0x5601, 0, &jpc_mqstates[92], &jpc_mqstates[92]},
|
||||
{0x5601, 1, &jpc_mqstates[93], &jpc_mqstates[93]},
|
||||
{0x5601, 0, &jpc_mqstates[ 2], &jpc_mqstates[ 3]},
|
||||
{0x5601, 1, &jpc_mqstates[ 3], &jpc_mqstates[ 2]},
|
||||
{0x3401, 0, &jpc_mqstates[ 4], &jpc_mqstates[12]},
|
||||
{0x3401, 1, &jpc_mqstates[ 5], &jpc_mqstates[13]},
|
||||
{0x1801, 0, &jpc_mqstates[ 6], &jpc_mqstates[18]},
|
||||
{0x1801, 1, &jpc_mqstates[ 7], &jpc_mqstates[19]},
|
||||
{0x0ac1, 0, &jpc_mqstates[ 8], &jpc_mqstates[24]},
|
||||
{0x0ac1, 1, &jpc_mqstates[ 9], &jpc_mqstates[25]},
|
||||
{0x0521, 0, &jpc_mqstates[10], &jpc_mqstates[58]},
|
||||
{0x0521, 1, &jpc_mqstates[11], &jpc_mqstates[59]},
|
||||
{0x0221, 0, &jpc_mqstates[76], &jpc_mqstates[66]},
|
||||
{0x0221, 1, &jpc_mqstates[77], &jpc_mqstates[67]},
|
||||
{0x5601, 0, &jpc_mqstates[14], &jpc_mqstates[13]},
|
||||
{0x5601, 1, &jpc_mqstates[15], &jpc_mqstates[12]},
|
||||
{0x5401, 0, &jpc_mqstates[16], &jpc_mqstates[28]},
|
||||
{0x5401, 1, &jpc_mqstates[17], &jpc_mqstates[29]},
|
||||
{0x4801, 0, &jpc_mqstates[18], &jpc_mqstates[28]},
|
||||
{0x4801, 1, &jpc_mqstates[19], &jpc_mqstates[29]},
|
||||
{0x3801, 0, &jpc_mqstates[20], &jpc_mqstates[28]},
|
||||
{0x3801, 1, &jpc_mqstates[21], &jpc_mqstates[29]},
|
||||
{0x3001, 0, &jpc_mqstates[22], &jpc_mqstates[34]},
|
||||
{0x3001, 1, &jpc_mqstates[23], &jpc_mqstates[35]},
|
||||
{0x2401, 0, &jpc_mqstates[24], &jpc_mqstates[36]},
|
||||
{0x2401, 1, &jpc_mqstates[25], &jpc_mqstates[37]},
|
||||
{0x1c01, 0, &jpc_mqstates[26], &jpc_mqstates[40]},
|
||||
{0x1c01, 1, &jpc_mqstates[27], &jpc_mqstates[41]},
|
||||
{0x1601, 0, &jpc_mqstates[58], &jpc_mqstates[42]},
|
||||
{0x1601, 1, &jpc_mqstates[59], &jpc_mqstates[43]},
|
||||
{0x5601, 0, &jpc_mqstates[30], &jpc_mqstates[29]},
|
||||
{0x5601, 1, &jpc_mqstates[31], &jpc_mqstates[28]},
|
||||
{0x5401, 0, &jpc_mqstates[32], &jpc_mqstates[28]},
|
||||
{0x5401, 1, &jpc_mqstates[33], &jpc_mqstates[29]},
|
||||
{0x5101, 0, &jpc_mqstates[34], &jpc_mqstates[30]},
|
||||
{0x5101, 1, &jpc_mqstates[35], &jpc_mqstates[31]},
|
||||
{0x4801, 0, &jpc_mqstates[36], &jpc_mqstates[32]},
|
||||
{0x4801, 1, &jpc_mqstates[37], &jpc_mqstates[33]},
|
||||
{0x3801, 0, &jpc_mqstates[38], &jpc_mqstates[34]},
|
||||
{0x3801, 1, &jpc_mqstates[39], &jpc_mqstates[35]},
|
||||
{0x3401, 0, &jpc_mqstates[40], &jpc_mqstates[36]},
|
||||
{0x3401, 1, &jpc_mqstates[41], &jpc_mqstates[37]},
|
||||
{0x3001, 0, &jpc_mqstates[42], &jpc_mqstates[38]},
|
||||
{0x3001, 1, &jpc_mqstates[43], &jpc_mqstates[39]},
|
||||
{0x2801, 0, &jpc_mqstates[44], &jpc_mqstates[38]},
|
||||
{0x2801, 1, &jpc_mqstates[45], &jpc_mqstates[39]},
|
||||
{0x2401, 0, &jpc_mqstates[46], &jpc_mqstates[40]},
|
||||
{0x2401, 1, &jpc_mqstates[47], &jpc_mqstates[41]},
|
||||
{0x2201, 0, &jpc_mqstates[48], &jpc_mqstates[42]},
|
||||
{0x2201, 1, &jpc_mqstates[49], &jpc_mqstates[43]},
|
||||
{0x1c01, 0, &jpc_mqstates[50], &jpc_mqstates[44]},
|
||||
{0x1c01, 1, &jpc_mqstates[51], &jpc_mqstates[45]},
|
||||
{0x1801, 0, &jpc_mqstates[52], &jpc_mqstates[46]},
|
||||
{0x1801, 1, &jpc_mqstates[53], &jpc_mqstates[47]},
|
||||
{0x1601, 0, &jpc_mqstates[54], &jpc_mqstates[48]},
|
||||
{0x1601, 1, &jpc_mqstates[55], &jpc_mqstates[49]},
|
||||
{0x1401, 0, &jpc_mqstates[56], &jpc_mqstates[50]},
|
||||
{0x1401, 1, &jpc_mqstates[57], &jpc_mqstates[51]},
|
||||
{0x1201, 0, &jpc_mqstates[58], &jpc_mqstates[52]},
|
||||
{0x1201, 1, &jpc_mqstates[59], &jpc_mqstates[53]},
|
||||
{0x1101, 0, &jpc_mqstates[60], &jpc_mqstates[54]},
|
||||
{0x1101, 1, &jpc_mqstates[61], &jpc_mqstates[55]},
|
||||
{0x0ac1, 0, &jpc_mqstates[62], &jpc_mqstates[56]},
|
||||
{0x0ac1, 1, &jpc_mqstates[63], &jpc_mqstates[57]},
|
||||
{0x09c1, 0, &jpc_mqstates[64], &jpc_mqstates[58]},
|
||||
{0x09c1, 1, &jpc_mqstates[65], &jpc_mqstates[59]},
|
||||
{0x08a1, 0, &jpc_mqstates[66], &jpc_mqstates[60]},
|
||||
{0x08a1, 1, &jpc_mqstates[67], &jpc_mqstates[61]},
|
||||
{0x0521, 0, &jpc_mqstates[68], &jpc_mqstates[62]},
|
||||
{0x0521, 1, &jpc_mqstates[69], &jpc_mqstates[63]},
|
||||
{0x0441, 0, &jpc_mqstates[70], &jpc_mqstates[64]},
|
||||
{0x0441, 1, &jpc_mqstates[71], &jpc_mqstates[65]},
|
||||
{0x02a1, 0, &jpc_mqstates[72], &jpc_mqstates[66]},
|
||||
{0x02a1, 1, &jpc_mqstates[73], &jpc_mqstates[67]},
|
||||
{0x0221, 0, &jpc_mqstates[74], &jpc_mqstates[68]},
|
||||
{0x0221, 1, &jpc_mqstates[75], &jpc_mqstates[69]},
|
||||
{0x0141, 0, &jpc_mqstates[76], &jpc_mqstates[70]},
|
||||
{0x0141, 1, &jpc_mqstates[77], &jpc_mqstates[71]},
|
||||
{0x0111, 0, &jpc_mqstates[78], &jpc_mqstates[72]},
|
||||
{0x0111, 1, &jpc_mqstates[79], &jpc_mqstates[73]},
|
||||
{0x0085, 0, &jpc_mqstates[80], &jpc_mqstates[74]},
|
||||
{0x0085, 1, &jpc_mqstates[81], &jpc_mqstates[75]},
|
||||
{0x0049, 0, &jpc_mqstates[82], &jpc_mqstates[76]},
|
||||
{0x0049, 1, &jpc_mqstates[83], &jpc_mqstates[77]},
|
||||
{0x0025, 0, &jpc_mqstates[84], &jpc_mqstates[78]},
|
||||
{0x0025, 1, &jpc_mqstates[85], &jpc_mqstates[79]},
|
||||
{0x0015, 0, &jpc_mqstates[86], &jpc_mqstates[80]},
|
||||
{0x0015, 1, &jpc_mqstates[87], &jpc_mqstates[81]},
|
||||
{0x0009, 0, &jpc_mqstates[88], &jpc_mqstates[82]},
|
||||
{0x0009, 1, &jpc_mqstates[89], &jpc_mqstates[83]},
|
||||
{0x0005, 0, &jpc_mqstates[90], &jpc_mqstates[84]},
|
||||
{0x0005, 1, &jpc_mqstates[91], &jpc_mqstates[85]},
|
||||
{0x0001, 0, &jpc_mqstates[90], &jpc_mqstates[86]},
|
||||
{0x0001, 1, &jpc_mqstates[91], &jpc_mqstates[87]},
|
||||
{0x5601, 0, &jpc_mqstates[92], &jpc_mqstates[92]},
|
||||
{0x5601, 1, &jpc_mqstates[93], &jpc_mqstates[93]},
|
||||
};
|
||||
|
||||
externo
+20
-20
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The most probable symbol (MPS). */
|
||||
int mps;
|
||||
/* The most probable symbol (MPS). */
|
||||
int mps;
|
||||
|
||||
/* The state index. */
|
||||
int_fast16_t ind;
|
||||
/* The state index. */
|
||||
int_fast16_t ind;
|
||||
|
||||
} jpc_mqctx_t;
|
||||
|
||||
@@ -100,17 +100,17 @@ typedef struct {
|
||||
|
||||
typedef struct jpc_mqstate_s {
|
||||
|
||||
/* The Qe value. */
|
||||
uint_fast16_t qeval;
|
||||
/* The Qe value. */
|
||||
uint_fast16_t qeval;
|
||||
|
||||
/* The MPS. */
|
||||
int mps;
|
||||
/* The MPS. */
|
||||
int mps;
|
||||
|
||||
/* The NMPS state. */
|
||||
struct jpc_mqstate_s *nmps;
|
||||
/* The NMPS state. */
|
||||
struct jpc_mqstate_s *nmps;
|
||||
|
||||
/* The NLPS state. */
|
||||
struct jpc_mqstate_s *nlps;
|
||||
/* The NLPS state. */
|
||||
struct jpc_mqstate_s *nlps;
|
||||
|
||||
} jpc_mqstate_t;
|
||||
|
||||
|
||||
externo
+125
-125
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define MQDEC_CALL(n, x) \
|
||||
((jas_getdbglevel() >= (n)) ? ((void)(x)) : ((void)0))
|
||||
((jas_getdbglevel() >= (n)) ? ((void)(x)) : ((void)0))
|
||||
#else
|
||||
#define MQDEC_CALL(n, x)
|
||||
#endif
|
||||
@@ -106,49 +106,49 @@ static void jpc_mqdec_bytein(jpc_mqdec_t *mqdec);
|
||||
/* Create a MQ decoder. */
|
||||
jpc_mqdec_t *jpc_mqdec_create(int maxctxs, jas_stream_t *in)
|
||||
{
|
||||
jpc_mqdec_t *mqdec;
|
||||
jpc_mqdec_t *mqdec;
|
||||
|
||||
/* There must be at least one context. */
|
||||
assert(maxctxs > 0);
|
||||
/* There must be at least one context. */
|
||||
assert(maxctxs > 0);
|
||||
|
||||
/* Allocate memory for the MQ decoder. */
|
||||
if (!(mqdec = jas_malloc(sizeof(jpc_mqdec_t)))) {
|
||||
goto error;
|
||||
}
|
||||
mqdec->in = in;
|
||||
mqdec->maxctxs = maxctxs;
|
||||
/* Allocate memory for the per-context state information. */
|
||||
if (!(mqdec->ctxs = jas_malloc(mqdec->maxctxs * sizeof(jpc_mqstate_t *)))) {
|
||||
goto error;
|
||||
}
|
||||
/* Set the current context to the first context. */
|
||||
mqdec->curctx = mqdec->ctxs;
|
||||
/* Allocate memory for the MQ decoder. */
|
||||
if (!(mqdec = jas_malloc(sizeof(jpc_mqdec_t)))) {
|
||||
goto error;
|
||||
}
|
||||
mqdec->in = in;
|
||||
mqdec->maxctxs = maxctxs;
|
||||
/* Allocate memory for the per-context state information. */
|
||||
if (!(mqdec->ctxs = jas_alloc2(mqdec->maxctxs, sizeof(jpc_mqstate_t *)))) {
|
||||
goto error;
|
||||
}
|
||||
/* Set the current context to the first context. */
|
||||
mqdec->curctx = mqdec->ctxs;
|
||||
|
||||
/* If an input stream has been associated with the MQ decoder,
|
||||
initialize the decoder state from the stream. */
|
||||
if (mqdec->in) {
|
||||
jpc_mqdec_init(mqdec);
|
||||
}
|
||||
/* Initialize the per-context state information. */
|
||||
jpc_mqdec_setctxs(mqdec, 0, 0);
|
||||
/* If an input stream has been associated with the MQ decoder,
|
||||
initialize the decoder state from the stream. */
|
||||
if (mqdec->in) {
|
||||
jpc_mqdec_init(mqdec);
|
||||
}
|
||||
/* Initialize the per-context state information. */
|
||||
jpc_mqdec_setctxs(mqdec, 0, 0);
|
||||
|
||||
return mqdec;
|
||||
return mqdec;
|
||||
|
||||
error:
|
||||
/* Oops... Something has gone wrong. */
|
||||
if (mqdec) {
|
||||
jpc_mqdec_destroy(mqdec);
|
||||
}
|
||||
return 0;
|
||||
/* Oops... Something has gone wrong. */
|
||||
if (mqdec) {
|
||||
jpc_mqdec_destroy(mqdec);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Destroy a MQ decoder. */
|
||||
void jpc_mqdec_destroy(jpc_mqdec_t *mqdec)
|
||||
{
|
||||
if (mqdec->ctxs) {
|
||||
jas_free(mqdec->ctxs);
|
||||
}
|
||||
jas_free(mqdec);
|
||||
if (mqdec->ctxs) {
|
||||
jas_free(mqdec->ctxs);
|
||||
}
|
||||
jas_free(mqdec);
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -159,59 +159,59 @@ void jpc_mqdec_destroy(jpc_mqdec_t *mqdec)
|
||||
|
||||
void jpc_mqdec_init(jpc_mqdec_t *mqdec)
|
||||
{
|
||||
int c;
|
||||
int c;
|
||||
|
||||
mqdec->eof = 0;
|
||||
mqdec->creg = 0;
|
||||
/* Get the next byte from the input stream. */
|
||||
if ((c = jas_stream_getc(mqdec->in)) == EOF) {
|
||||
/* We have encountered an I/O error or EOF. */
|
||||
c = 0xff;
|
||||
mqdec->eof = 1;
|
||||
}
|
||||
mqdec->inbuffer = c;
|
||||
mqdec->creg += mqdec->inbuffer << 16;
|
||||
jpc_mqdec_bytein(mqdec);
|
||||
mqdec->creg <<= 7;
|
||||
mqdec->ctreg -= 7;
|
||||
mqdec->areg = 0x8000;
|
||||
mqdec->eof = 0;
|
||||
mqdec->creg = 0;
|
||||
/* Get the next byte from the input stream. */
|
||||
if ((c = jas_stream_getc(mqdec->in)) == EOF) {
|
||||
/* We have encountered an I/O error or EOF. */
|
||||
c = 0xff;
|
||||
mqdec->eof = 1;
|
||||
}
|
||||
mqdec->inbuffer = c;
|
||||
mqdec->creg += mqdec->inbuffer << 16;
|
||||
jpc_mqdec_bytein(mqdec);
|
||||
mqdec->creg <<= 7;
|
||||
mqdec->ctreg -= 7;
|
||||
mqdec->areg = 0x8000;
|
||||
}
|
||||
|
||||
/* Set the input stream for a MQ decoder. */
|
||||
|
||||
void jpc_mqdec_setinput(jpc_mqdec_t *mqdec, jas_stream_t *in)
|
||||
{
|
||||
mqdec->in = in;
|
||||
mqdec->in = in;
|
||||
}
|
||||
|
||||
/* Initialize one or more contexts. */
|
||||
|
||||
void jpc_mqdec_setctxs(jpc_mqdec_t *mqdec, int numctxs, jpc_mqctx_t *ctxs)
|
||||
{
|
||||
jpc_mqstate_t **ctx;
|
||||
int n;
|
||||
jpc_mqstate_t **ctx;
|
||||
int n;
|
||||
|
||||
ctx = mqdec->ctxs;
|
||||
n = JAS_MIN(mqdec->maxctxs, numctxs);
|
||||
while (--n >= 0) {
|
||||
*ctx = &jpc_mqstates[2 * ctxs->ind + ctxs->mps];
|
||||
++ctx;
|
||||
++ctxs;
|
||||
}
|
||||
n = mqdec->maxctxs - numctxs;
|
||||
while (--n >= 0) {
|
||||
*ctx = &jpc_mqstates[0];
|
||||
++ctx;
|
||||
}
|
||||
ctx = mqdec->ctxs;
|
||||
n = JAS_MIN(mqdec->maxctxs, numctxs);
|
||||
while (--n >= 0) {
|
||||
*ctx = &jpc_mqstates[2 * ctxs->ind + ctxs->mps];
|
||||
++ctx;
|
||||
++ctxs;
|
||||
}
|
||||
n = mqdec->maxctxs - numctxs;
|
||||
while (--n >= 0) {
|
||||
*ctx = &jpc_mqstates[0];
|
||||
++ctx;
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize a context. */
|
||||
|
||||
void jpc_mqdec_setctx(jpc_mqdec_t *mqdec, int ctxno, jpc_mqctx_t *ctx)
|
||||
{
|
||||
jpc_mqstate_t **ctxi;
|
||||
ctxi = &mqdec->ctxs[ctxno];
|
||||
*ctxi = &jpc_mqstates[2 * ctx->ind + ctx->mps];
|
||||
jpc_mqstate_t **ctxi;
|
||||
ctxi = &mqdec->ctxs[ctxno];
|
||||
*ctxi = &jpc_mqstates[2 * ctx->ind + ctx->mps];
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -222,36 +222,36 @@ void jpc_mqdec_setctx(jpc_mqdec_t *mqdec, int ctxno, jpc_mqctx_t *ctx)
|
||||
|
||||
int jpc_mqdec_getbit_func(register jpc_mqdec_t *mqdec)
|
||||
{
|
||||
int bit;
|
||||
JAS_DBGLOG(100, ("jpc_mqdec_getbit_func(%p)\n", mqdec));
|
||||
MQDEC_CALL(100, jpc_mqdec_dump(mqdec, stderr));
|
||||
bit = jpc_mqdec_getbit_macro(mqdec);
|
||||
MQDEC_CALL(100, jpc_mqdec_dump(mqdec, stderr));
|
||||
JAS_DBGLOG(100, ("ctx = %d, decoded %d\n", mqdec->curctx -
|
||||
mqdec->ctxs, bit));
|
||||
return bit;
|
||||
int bit;
|
||||
JAS_DBGLOG(100, ("jpc_mqdec_getbit_func(%p)\n", mqdec));
|
||||
MQDEC_CALL(100, jpc_mqdec_dump(mqdec, stderr));
|
||||
bit = jpc_mqdec_getbit_macro(mqdec);
|
||||
MQDEC_CALL(100, jpc_mqdec_dump(mqdec, stderr));
|
||||
JAS_DBGLOG(100, ("ctx = %d, decoded %d\n", mqdec->curctx -
|
||||
mqdec->ctxs, bit));
|
||||
return bit;
|
||||
}
|
||||
|
||||
/* Apply MPS_EXCHANGE algorithm (with RENORMD). */
|
||||
int jpc_mqdec_mpsexchrenormd(register jpc_mqdec_t *mqdec)
|
||||
{
|
||||
int ret;
|
||||
register jpc_mqstate_t *state = *mqdec->curctx;
|
||||
jpc_mqdec_mpsexchange(mqdec->areg, state->qeval, mqdec->curctx, ret);
|
||||
jpc_mqdec_renormd(mqdec->areg, mqdec->creg, mqdec->ctreg, mqdec->in,
|
||||
mqdec->eof, mqdec->inbuffer);
|
||||
return ret;
|
||||
int ret;
|
||||
register jpc_mqstate_t *state = *mqdec->curctx;
|
||||
jpc_mqdec_mpsexchange(mqdec->areg, state->qeval, mqdec->curctx, ret);
|
||||
jpc_mqdec_renormd(mqdec->areg, mqdec->creg, mqdec->ctreg, mqdec->in,
|
||||
mqdec->eof, mqdec->inbuffer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Apply LPS_EXCHANGE algorithm (with RENORMD). */
|
||||
int jpc_mqdec_lpsexchrenormd(register jpc_mqdec_t *mqdec)
|
||||
{
|
||||
int ret;
|
||||
register jpc_mqstate_t *state = *mqdec->curctx;
|
||||
jpc_mqdec_lpsexchange(mqdec->areg, state->qeval, mqdec->curctx, ret);
|
||||
jpc_mqdec_renormd(mqdec->areg, mqdec->creg, mqdec->ctreg, mqdec->in,
|
||||
mqdec->eof, mqdec->inbuffer);
|
||||
return ret;
|
||||
int ret;
|
||||
register jpc_mqstate_t *state = *mqdec->curctx;
|
||||
jpc_mqdec_lpsexchange(mqdec->areg, state->qeval, mqdec->curctx, ret);
|
||||
jpc_mqdec_renormd(mqdec->areg, mqdec->creg, mqdec->ctreg, mqdec->in,
|
||||
mqdec->eof, mqdec->inbuffer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -261,32 +261,32 @@ int jpc_mqdec_lpsexchrenormd(register jpc_mqdec_t *mqdec)
|
||||
/* Apply the BYTEIN algorithm. */
|
||||
static void jpc_mqdec_bytein(jpc_mqdec_t *mqdec)
|
||||
{
|
||||
int c;
|
||||
unsigned char prevbuf;
|
||||
int c;
|
||||
unsigned char prevbuf;
|
||||
|
||||
if (!mqdec->eof) {
|
||||
if ((c = jas_stream_getc(mqdec->in)) == EOF) {
|
||||
mqdec->eof = 1;
|
||||
c = 0xff;
|
||||
}
|
||||
prevbuf = mqdec->inbuffer;
|
||||
mqdec->inbuffer = c;
|
||||
if (prevbuf == 0xff) {
|
||||
if (c > 0x8f) {
|
||||
mqdec->creg += 0xff00;
|
||||
mqdec->ctreg = 8;
|
||||
} else {
|
||||
mqdec->creg += c << 9;
|
||||
mqdec->ctreg = 7;
|
||||
}
|
||||
} else {
|
||||
mqdec->creg += c << 8;
|
||||
mqdec->ctreg = 8;
|
||||
}
|
||||
} else {
|
||||
mqdec->creg += 0xff00;
|
||||
mqdec->ctreg = 8;
|
||||
}
|
||||
if (!mqdec->eof) {
|
||||
if ((c = jas_stream_getc(mqdec->in)) == EOF) {
|
||||
mqdec->eof = 1;
|
||||
c = 0xff;
|
||||
}
|
||||
prevbuf = mqdec->inbuffer;
|
||||
mqdec->inbuffer = c;
|
||||
if (prevbuf == 0xff) {
|
||||
if (c > 0x8f) {
|
||||
mqdec->creg += 0xff00;
|
||||
mqdec->ctreg = 8;
|
||||
} else {
|
||||
mqdec->creg += c << 9;
|
||||
mqdec->ctreg = 7;
|
||||
}
|
||||
} else {
|
||||
mqdec->creg += c << 8;
|
||||
mqdec->ctreg = 8;
|
||||
}
|
||||
} else {
|
||||
mqdec->creg += 0xff00;
|
||||
mqdec->ctreg = 8;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -297,10 +297,10 @@ static void jpc_mqdec_bytein(jpc_mqdec_t *mqdec)
|
||||
|
||||
void jpc_mqdec_dump(jpc_mqdec_t *mqdec, FILE *out)
|
||||
{
|
||||
fprintf(out, "MQDEC A = %08lx, C = %08lx, CT=%08lx, ",
|
||||
(unsigned long) mqdec->areg, (unsigned long) mqdec->creg,
|
||||
(unsigned long) mqdec->ctreg);
|
||||
fprintf(out, "CTX = %d, ", (int)(mqdec->curctx - mqdec->ctxs));
|
||||
fprintf(out, "IND %d, MPS %d, QEVAL %x\n", (int)(*mqdec->curctx -
|
||||
jpc_mqstates), (int)(*mqdec->curctx)->mps, (int)(*mqdec->curctx)->qeval);
|
||||
fprintf(out, "MQDEC A = %08lx, C = %08lx, CT=%08lx, ",
|
||||
(unsigned long) mqdec->areg, (unsigned long) mqdec->creg,
|
||||
(unsigned long) mqdec->ctreg);
|
||||
fprintf(out, "CTX = %d, ", (int)(mqdec->curctx - mqdec->ctxs));
|
||||
fprintf(out, "IND %d, MPS %d, QEVAL %x\n", (int)(*mqdec->curctx -
|
||||
jpc_mqstates), (int)(*mqdec->curctx)->mps, (int)(*mqdec->curctx)->qeval);
|
||||
}
|
||||
|
||||
externo
+92
-92
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -87,32 +87,32 @@
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The C register. */
|
||||
uint_fast32_t creg;
|
||||
/* The C register. */
|
||||
uint_fast32_t creg;
|
||||
|
||||
/* The A register. */
|
||||
uint_fast32_t areg;
|
||||
/* The A register. */
|
||||
uint_fast32_t areg;
|
||||
|
||||
/* The CT register. */
|
||||
uint_fast32_t ctreg;
|
||||
/* The CT register. */
|
||||
uint_fast32_t ctreg;
|
||||
|
||||
/* The current context. */
|
||||
jpc_mqstate_t **curctx;
|
||||
/* The current context. */
|
||||
jpc_mqstate_t **curctx;
|
||||
|
||||
/* The per-context information. */
|
||||
jpc_mqstate_t **ctxs;
|
||||
/* The per-context information. */
|
||||
jpc_mqstate_t **ctxs;
|
||||
|
||||
/* The maximum number of contexts. */
|
||||
int maxctxs;
|
||||
/* The maximum number of contexts. */
|
||||
int maxctxs;
|
||||
|
||||
/* The stream from which to read data. */
|
||||
jas_stream_t *in;
|
||||
/* The stream from which to read data. */
|
||||
jas_stream_t *in;
|
||||
|
||||
/* The last character read. */
|
||||
uchar inbuffer;
|
||||
/* The last character read. */
|
||||
uchar inbuffer;
|
||||
|
||||
/* The EOF indicator. */
|
||||
int eof;
|
||||
/* The EOF indicator. */
|
||||
int eof;
|
||||
|
||||
} jpc_mqdec_t;
|
||||
|
||||
@@ -142,7 +142,7 @@ void jpc_mqdec_init(jpc_mqdec_t *dec);
|
||||
|
||||
/* Set the current context for a MQ decoder. */
|
||||
#define jpc_mqdec_setcurctx(dec, ctxno) \
|
||||
((mqdec)->curctx = &(mqdec)->ctxs[ctxno]);
|
||||
((mqdec)->curctx = &(mqdec)->ctxs[ctxno]);
|
||||
|
||||
/* Set the state information for a particular context of a MQ decoder. */
|
||||
void jpc_mqdec_setctx(jpc_mqdec_t *dec, int ctxno, jpc_mqctx_t *ctx);
|
||||
@@ -157,19 +157,19 @@ void jpc_mqdec_setctxs(jpc_mqdec_t *dec, int numctxs, jpc_mqctx_t *ctxs);
|
||||
/* Decode a symbol. */
|
||||
#if !defined(DEBUG)
|
||||
#define jpc_mqdec_getbit(dec) \
|
||||
jpc_mqdec_getbit_macro(dec)
|
||||
jpc_mqdec_getbit_macro(dec)
|
||||
#else
|
||||
#define jpc_mqdec_getbit(dec) \
|
||||
jpc_mqdec_getbit_func(dec)
|
||||
jpc_mqdec_getbit_func(dec)
|
||||
#endif
|
||||
|
||||
/* Decode a symbol (assuming an unskewed probability distribution). */
|
||||
#if !defined(DEBUG)
|
||||
#define jpc_mqdec_getbitnoskew(dec) \
|
||||
jpc_mqdec_getbit_macro(dec)
|
||||
jpc_mqdec_getbit_macro(dec)
|
||||
#else
|
||||
#define jpc_mqdec_getbitnoskew(dec) \
|
||||
jpc_mqdec_getbit_func(dec)
|
||||
jpc_mqdec_getbit_func(dec)
|
||||
#endif
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -186,82 +186,82 @@ void jpc_mqdec_dump(jpc_mqdec_t *dec, FILE *out);
|
||||
\******************************************************************************/
|
||||
|
||||
#define jpc_mqdec_getbit_macro(dec) \
|
||||
((((dec)->areg -= (*(dec)->curctx)->qeval), \
|
||||
(dec)->creg >> 16 >= (*(dec)->curctx)->qeval) ? \
|
||||
((((dec)->creg -= (*(dec)->curctx)->qeval << 16), \
|
||||
(dec)->areg & 0x8000) ? (*(dec)->curctx)->mps : \
|
||||
jpc_mqdec_mpsexchrenormd(dec)) : \
|
||||
jpc_mqdec_lpsexchrenormd(dec))
|
||||
((((dec)->areg -= (*(dec)->curctx)->qeval), \
|
||||
(dec)->creg >> 16 >= (*(dec)->curctx)->qeval) ? \
|
||||
((((dec)->creg -= (*(dec)->curctx)->qeval << 16), \
|
||||
(dec)->areg & 0x8000) ? (*(dec)->curctx)->mps : \
|
||||
jpc_mqdec_mpsexchrenormd(dec)) : \
|
||||
jpc_mqdec_lpsexchrenormd(dec))
|
||||
|
||||
#define jpc_mqdec_mpsexchange(areg, delta, curctx, bit) \
|
||||
{ \
|
||||
if ((areg) < (delta)) { \
|
||||
register jpc_mqstate_t *state = *(curctx); \
|
||||
/* LPS decoded. */ \
|
||||
(bit) = state->mps ^ 1; \
|
||||
*(curctx) = state->nlps; \
|
||||
} else { \
|
||||
register jpc_mqstate_t *state = *(curctx); \
|
||||
/* MPS decoded. */ \
|
||||
(bit) = state->mps; \
|
||||
*(curctx) = state->nmps; \
|
||||
} \
|
||||
if ((areg) < (delta)) { \
|
||||
register jpc_mqstate_t *state = *(curctx); \
|
||||
/* LPS decoded. */ \
|
||||
(bit) = state->mps ^ 1; \
|
||||
*(curctx) = state->nlps; \
|
||||
} else { \
|
||||
register jpc_mqstate_t *state = *(curctx); \
|
||||
/* MPS decoded. */ \
|
||||
(bit) = state->mps; \
|
||||
*(curctx) = state->nmps; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define jpc_mqdec_lpsexchange(areg, delta, curctx, bit) \
|
||||
{ \
|
||||
if ((areg) >= (delta)) { \
|
||||
register jpc_mqstate_t *state = *(curctx); \
|
||||
(areg) = (delta); \
|
||||
(bit) = state->mps ^ 1; \
|
||||
*(curctx) = state->nlps; \
|
||||
} else { \
|
||||
register jpc_mqstate_t *state = *(curctx); \
|
||||
(areg) = (delta); \
|
||||
(bit) = state->mps; \
|
||||
*(curctx) = state->nmps; \
|
||||
} \
|
||||
if ((areg) >= (delta)) { \
|
||||
register jpc_mqstate_t *state = *(curctx); \
|
||||
(areg) = (delta); \
|
||||
(bit) = state->mps ^ 1; \
|
||||
*(curctx) = state->nlps; \
|
||||
} else { \
|
||||
register jpc_mqstate_t *state = *(curctx); \
|
||||
(areg) = (delta); \
|
||||
(bit) = state->mps; \
|
||||
*(curctx) = state->nmps; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define jpc_mqdec_renormd(areg, creg, ctreg, in, eof, inbuf) \
|
||||
{ \
|
||||
do { \
|
||||
if (!(ctreg)) { \
|
||||
jpc_mqdec_bytein2(creg, ctreg, in, eof, inbuf); \
|
||||
} \
|
||||
(areg) <<= 1; \
|
||||
(creg) <<= 1; \
|
||||
--(ctreg); \
|
||||
} while (!((areg) & 0x8000)); \
|
||||
do { \
|
||||
if (!(ctreg)) { \
|
||||
jpc_mqdec_bytein2(creg, ctreg, in, eof, inbuf); \
|
||||
} \
|
||||
(areg) <<= 1; \
|
||||
(creg) <<= 1; \
|
||||
--(ctreg); \
|
||||
} while (!((areg) & 0x8000)); \
|
||||
}
|
||||
|
||||
#define jpc_mqdec_bytein2(creg, ctreg, in, eof, inbuf) \
|
||||
{ \
|
||||
int c; \
|
||||
unsigned char prevbuf; \
|
||||
if (!(eof)) { \
|
||||
if ((c = jas_stream_getc(in)) == EOF) { \
|
||||
(eof) = 1; \
|
||||
c = 0xff; \
|
||||
} \
|
||||
prevbuf = (inbuf); \
|
||||
(inbuf) = c; \
|
||||
if (prevbuf == 0xff) { \
|
||||
if (c > 0x8f) { \
|
||||
(creg) += 0xff00; \
|
||||
(ctreg) = 8; \
|
||||
} else { \
|
||||
(creg) += c << 9; \
|
||||
(ctreg) = 7; \
|
||||
} \
|
||||
} else { \
|
||||
(creg) += c << 8; \
|
||||
(ctreg) = 8; \
|
||||
} \
|
||||
} else { \
|
||||
(creg) += 0xff00; \
|
||||
(ctreg) = 8; \
|
||||
} \
|
||||
int c; \
|
||||
unsigned char prevbuf; \
|
||||
if (!(eof)) { \
|
||||
if ((c = jas_stream_getc(in)) == EOF) { \
|
||||
(eof) = 1; \
|
||||
c = 0xff; \
|
||||
} \
|
||||
prevbuf = (inbuf); \
|
||||
(inbuf) = c; \
|
||||
if (prevbuf == 0xff) { \
|
||||
if (c > 0x8f) { \
|
||||
(creg) += 0xff00; \
|
||||
(ctreg) = 8; \
|
||||
} else { \
|
||||
(creg) += c << 9; \
|
||||
(ctreg) = 7; \
|
||||
} \
|
||||
} else { \
|
||||
(creg) += c << 8; \
|
||||
(ctreg) = 8; \
|
||||
} \
|
||||
} else { \
|
||||
(creg) += 0xff00; \
|
||||
(ctreg) = 8; \
|
||||
} \
|
||||
}
|
||||
|
||||
int jpc_mqdec_getbit_func(jpc_mqdec_t *dec);
|
||||
|
||||
externo
+191
-191
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -87,90 +87,90 @@
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define JPC_MQENC_CALL(n, x) \
|
||||
((jas_getdbglevel() >= (n)) ? ((void)(x)) : ((void)0))
|
||||
((jas_getdbglevel() >= (n)) ? ((void)(x)) : ((void)0))
|
||||
#else
|
||||
#define JPC_MQENC_CALL(n, x)
|
||||
#endif
|
||||
|
||||
#define jpc_mqenc_codemps9(areg, creg, ctreg, curctx, enc) \
|
||||
{ \
|
||||
jpc_mqstate_t *state = *(curctx); \
|
||||
(areg) -= state->qeval; \
|
||||
if (!((areg) & 0x8000)) { \
|
||||
if ((areg) < state->qeval) { \
|
||||
(areg) = state->qeval; \
|
||||
} else { \
|
||||
(creg) += state->qeval; \
|
||||
} \
|
||||
*(curctx) = state->nmps; \
|
||||
jpc_mqenc_renorme((areg), (creg), (ctreg), (enc)); \
|
||||
} else { \
|
||||
(creg) += state->qeval; \
|
||||
} \
|
||||
jpc_mqstate_t *state = *(curctx); \
|
||||
(areg) -= state->qeval; \
|
||||
if (!((areg) & 0x8000)) { \
|
||||
if ((areg) < state->qeval) { \
|
||||
(areg) = state->qeval; \
|
||||
} else { \
|
||||
(creg) += state->qeval; \
|
||||
} \
|
||||
*(curctx) = state->nmps; \
|
||||
jpc_mqenc_renorme((areg), (creg), (ctreg), (enc)); \
|
||||
} else { \
|
||||
(creg) += state->qeval; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define jpc_mqenc_codelps2(areg, creg, ctreg, curctx, enc) \
|
||||
{ \
|
||||
jpc_mqstate_t *state = *(curctx); \
|
||||
(areg) -= state->qeval; \
|
||||
if ((areg) < state->qeval) { \
|
||||
(creg) += state->qeval; \
|
||||
} else { \
|
||||
(areg) = state->qeval; \
|
||||
} \
|
||||
*(curctx) = state->nlps; \
|
||||
jpc_mqenc_renorme((areg), (creg), (ctreg), (enc)); \
|
||||
jpc_mqstate_t *state = *(curctx); \
|
||||
(areg) -= state->qeval; \
|
||||
if ((areg) < state->qeval) { \
|
||||
(creg) += state->qeval; \
|
||||
} else { \
|
||||
(areg) = state->qeval; \
|
||||
} \
|
||||
*(curctx) = state->nlps; \
|
||||
jpc_mqenc_renorme((areg), (creg), (ctreg), (enc)); \
|
||||
}
|
||||
|
||||
#define jpc_mqenc_renorme(areg, creg, ctreg, enc) \
|
||||
{ \
|
||||
do { \
|
||||
(areg) <<= 1; \
|
||||
(creg) <<= 1; \
|
||||
if (!--(ctreg)) { \
|
||||
jpc_mqenc_byteout((areg), (creg), (ctreg), (enc)); \
|
||||
} \
|
||||
} while (!((areg) & 0x8000)); \
|
||||
do { \
|
||||
(areg) <<= 1; \
|
||||
(creg) <<= 1; \
|
||||
if (!--(ctreg)) { \
|
||||
jpc_mqenc_byteout((areg), (creg), (ctreg), (enc)); \
|
||||
} \
|
||||
} while (!((areg) & 0x8000)); \
|
||||
}
|
||||
|
||||
#define jpc_mqenc_byteout(areg, creg, ctreg, enc) \
|
||||
{ \
|
||||
if ((enc)->outbuf != 0xff) { \
|
||||
if ((creg) & 0x8000000) { \
|
||||
if (++((enc)->outbuf) == 0xff) { \
|
||||
(creg) &= 0x7ffffff; \
|
||||
jpc_mqenc_byteout2(enc); \
|
||||
enc->outbuf = ((creg) >> 20) & 0xff; \
|
||||
(creg) &= 0xfffff; \
|
||||
(ctreg) = 7; \
|
||||
} else { \
|
||||
jpc_mqenc_byteout2(enc); \
|
||||
enc->outbuf = ((creg) >> 19) & 0xff; \
|
||||
(creg) &= 0x7ffff; \
|
||||
(ctreg) = 8; \
|
||||
} \
|
||||
} else { \
|
||||
jpc_mqenc_byteout2(enc); \
|
||||
(enc)->outbuf = ((creg) >> 19) & 0xff; \
|
||||
(creg) &= 0x7ffff; \
|
||||
(ctreg) = 8; \
|
||||
} \
|
||||
} else { \
|
||||
jpc_mqenc_byteout2(enc); \
|
||||
(enc)->outbuf = ((creg) >> 20) & 0xff; \
|
||||
(creg) &= 0xfffff; \
|
||||
(ctreg) = 7; \
|
||||
} \
|
||||
if ((enc)->outbuf != 0xff) { \
|
||||
if ((creg) & 0x8000000) { \
|
||||
if (++((enc)->outbuf) == 0xff) { \
|
||||
(creg) &= 0x7ffffff; \
|
||||
jpc_mqenc_byteout2(enc); \
|
||||
enc->outbuf = ((creg) >> 20) & 0xff; \
|
||||
(creg) &= 0xfffff; \
|
||||
(ctreg) = 7; \
|
||||
} else { \
|
||||
jpc_mqenc_byteout2(enc); \
|
||||
enc->outbuf = ((creg) >> 19) & 0xff; \
|
||||
(creg) &= 0x7ffff; \
|
||||
(ctreg) = 8; \
|
||||
} \
|
||||
} else { \
|
||||
jpc_mqenc_byteout2(enc); \
|
||||
(enc)->outbuf = ((creg) >> 19) & 0xff; \
|
||||
(creg) &= 0x7ffff; \
|
||||
(ctreg) = 8; \
|
||||
} \
|
||||
} else { \
|
||||
jpc_mqenc_byteout2(enc); \
|
||||
(enc)->outbuf = ((creg) >> 20) & 0xff; \
|
||||
(creg) &= 0xfffff; \
|
||||
(ctreg) = 7; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define jpc_mqenc_byteout2(enc) \
|
||||
{ \
|
||||
if (enc->outbuf >= 0) { \
|
||||
if (jas_stream_putc(enc->out, (unsigned char)enc->outbuf) == EOF) { \
|
||||
enc->err |= 1; \
|
||||
} \
|
||||
} \
|
||||
enc->lastbyte = enc->outbuf; \
|
||||
if (enc->outbuf >= 0) { \
|
||||
if (jas_stream_putc(enc->out, (unsigned char)enc->outbuf) == EOF) { \
|
||||
enc->err |= 1; \
|
||||
} \
|
||||
} \
|
||||
enc->lastbyte = enc->outbuf; \
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -187,45 +187,45 @@ static void jpc_mqenc_setbits(jpc_mqenc_t *mqenc);
|
||||
|
||||
jpc_mqenc_t *jpc_mqenc_create(int maxctxs, jas_stream_t *out)
|
||||
{
|
||||
jpc_mqenc_t *mqenc;
|
||||
jpc_mqenc_t *mqenc;
|
||||
|
||||
/* Allocate memory for the MQ encoder. */
|
||||
if (!(mqenc = jas_malloc(sizeof(jpc_mqenc_t)))) {
|
||||
goto error;
|
||||
}
|
||||
mqenc->out = out;
|
||||
mqenc->maxctxs = maxctxs;
|
||||
/* Allocate memory for the MQ encoder. */
|
||||
if (!(mqenc = jas_malloc(sizeof(jpc_mqenc_t)))) {
|
||||
goto error;
|
||||
}
|
||||
mqenc->out = out;
|
||||
mqenc->maxctxs = maxctxs;
|
||||
|
||||
/* Allocate memory for the per-context state information. */
|
||||
if (!(mqenc->ctxs = jas_malloc(mqenc->maxctxs * sizeof(jpc_mqstate_t *)))) {
|
||||
goto error;
|
||||
}
|
||||
/* Allocate memory for the per-context state information. */
|
||||
if (!(mqenc->ctxs = jas_alloc2(mqenc->maxctxs, sizeof(jpc_mqstate_t *)))) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Set the current context to the first one. */
|
||||
mqenc->curctx = mqenc->ctxs;
|
||||
/* Set the current context to the first one. */
|
||||
mqenc->curctx = mqenc->ctxs;
|
||||
|
||||
jpc_mqenc_init(mqenc);
|
||||
jpc_mqenc_init(mqenc);
|
||||
|
||||
/* Initialize the per-context state information to something sane. */
|
||||
jpc_mqenc_setctxs(mqenc, 0, 0);
|
||||
/* Initialize the per-context state information to something sane. */
|
||||
jpc_mqenc_setctxs(mqenc, 0, 0);
|
||||
|
||||
return mqenc;
|
||||
return mqenc;
|
||||
|
||||
error:
|
||||
if (mqenc) {
|
||||
jpc_mqenc_destroy(mqenc);
|
||||
}
|
||||
return 0;
|
||||
if (mqenc) {
|
||||
jpc_mqenc_destroy(mqenc);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Destroy a MQ encoder. */
|
||||
|
||||
void jpc_mqenc_destroy(jpc_mqenc_t *mqenc)
|
||||
{
|
||||
if (mqenc->ctxs) {
|
||||
jas_free(mqenc->ctxs);
|
||||
}
|
||||
jas_free(mqenc);
|
||||
if (mqenc->ctxs) {
|
||||
jas_free(mqenc->ctxs);
|
||||
}
|
||||
jas_free(mqenc);
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -236,33 +236,33 @@ void jpc_mqenc_destroy(jpc_mqenc_t *mqenc)
|
||||
|
||||
void jpc_mqenc_init(jpc_mqenc_t *mqenc)
|
||||
{
|
||||
mqenc->areg = 0x8000;
|
||||
mqenc->outbuf = -1;
|
||||
mqenc->creg = 0;
|
||||
mqenc->ctreg = 12;
|
||||
mqenc->lastbyte = -1;
|
||||
mqenc->err = 0;
|
||||
mqenc->areg = 0x8000;
|
||||
mqenc->outbuf = -1;
|
||||
mqenc->creg = 0;
|
||||
mqenc->ctreg = 12;
|
||||
mqenc->lastbyte = -1;
|
||||
mqenc->err = 0;
|
||||
}
|
||||
|
||||
/* Initialize one or more contexts. */
|
||||
|
||||
void jpc_mqenc_setctxs(jpc_mqenc_t *mqenc, int numctxs, jpc_mqctx_t *ctxs)
|
||||
{
|
||||
jpc_mqstate_t **ctx;
|
||||
int n;
|
||||
jpc_mqstate_t **ctx;
|
||||
int n;
|
||||
|
||||
ctx = mqenc->ctxs;
|
||||
n = JAS_MIN(mqenc->maxctxs, numctxs);
|
||||
while (--n >= 0) {
|
||||
*ctx = &jpc_mqstates[2 * ctxs->ind + ctxs->mps];
|
||||
++ctx;
|
||||
++ctxs;
|
||||
}
|
||||
n = mqenc->maxctxs - numctxs;
|
||||
while (--n >= 0) {
|
||||
*ctx = &jpc_mqstates[0];
|
||||
++ctx;
|
||||
}
|
||||
ctx = mqenc->ctxs;
|
||||
n = JAS_MIN(mqenc->maxctxs, numctxs);
|
||||
while (--n >= 0) {
|
||||
*ctx = &jpc_mqstates[2 * ctxs->ind + ctxs->mps];
|
||||
++ctx;
|
||||
++ctxs;
|
||||
}
|
||||
n = mqenc->maxctxs - numctxs;
|
||||
while (--n >= 0) {
|
||||
*ctx = &jpc_mqstates[0];
|
||||
++ctx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -270,10 +270,10 @@ void jpc_mqenc_setctxs(jpc_mqenc_t *mqenc, int numctxs, jpc_mqctx_t *ctxs)
|
||||
|
||||
void jpc_mqenc_getstate(jpc_mqenc_t *mqenc, jpc_mqencstate_t *state)
|
||||
{
|
||||
state->areg = mqenc->areg;
|
||||
state->creg = mqenc->creg;
|
||||
state->ctreg = mqenc->ctreg;
|
||||
state->lastbyte = mqenc->lastbyte;
|
||||
state->areg = mqenc->areg;
|
||||
state->creg = mqenc->creg;
|
||||
state->ctreg = mqenc->ctreg;
|
||||
state->lastbyte = mqenc->lastbyte;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -284,49 +284,49 @@ void jpc_mqenc_getstate(jpc_mqenc_t *mqenc, jpc_mqencstate_t *state)
|
||||
|
||||
int jpc_mqenc_putbit_func(jpc_mqenc_t *mqenc, int bit)
|
||||
{
|
||||
const jpc_mqstate_t *state;
|
||||
JAS_DBGLOG(100, ("jpc_mqenc_putbit(%p, %d)\n", mqenc, bit));
|
||||
JPC_MQENC_CALL(100, jpc_mqenc_dump(mqenc, stderr));
|
||||
const jpc_mqstate_t *state;
|
||||
JAS_DBGLOG(100, ("jpc_mqenc_putbit(%p, %d)\n", mqenc, bit));
|
||||
JPC_MQENC_CALL(100, jpc_mqenc_dump(mqenc, stderr));
|
||||
|
||||
state = *(mqenc->curctx);
|
||||
state = *(mqenc->curctx);
|
||||
|
||||
if (state->mps == bit) {
|
||||
/* Apply the CODEMPS algorithm as defined in the standard. */
|
||||
mqenc->areg -= state->qeval;
|
||||
if (!(mqenc->areg & 0x8000)) {
|
||||
jpc_mqenc_codemps2(mqenc);
|
||||
} else {
|
||||
mqenc->creg += state->qeval;
|
||||
}
|
||||
} else {
|
||||
/* Apply the CODELPS algorithm as defined in the standard. */
|
||||
jpc_mqenc_codelps2(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc->curctx, mqenc);
|
||||
}
|
||||
if (state->mps == bit) {
|
||||
/* Apply the CODEMPS algorithm as defined in the standard. */
|
||||
mqenc->areg -= state->qeval;
|
||||
if (!(mqenc->areg & 0x8000)) {
|
||||
jpc_mqenc_codemps2(mqenc);
|
||||
} else {
|
||||
mqenc->creg += state->qeval;
|
||||
}
|
||||
} else {
|
||||
/* Apply the CODELPS algorithm as defined in the standard. */
|
||||
jpc_mqenc_codelps2(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc->curctx, mqenc);
|
||||
}
|
||||
|
||||
return jpc_mqenc_error(mqenc) ? (-1) : 0;
|
||||
return jpc_mqenc_error(mqenc) ? (-1) : 0;
|
||||
}
|
||||
|
||||
int jpc_mqenc_codemps2(jpc_mqenc_t *mqenc)
|
||||
{
|
||||
/* Note: This function only performs part of the work associated with
|
||||
the CODEMPS algorithm from the standard. Some of the work is also
|
||||
performed by the caller. */
|
||||
/* Note: This function only performs part of the work associated with
|
||||
the CODEMPS algorithm from the standard. Some of the work is also
|
||||
performed by the caller. */
|
||||
|
||||
jpc_mqstate_t *state = *(mqenc->curctx);
|
||||
if (mqenc->areg < state->qeval) {
|
||||
mqenc->areg = state->qeval;
|
||||
} else {
|
||||
mqenc->creg += state->qeval;
|
||||
}
|
||||
*mqenc->curctx = state->nmps;
|
||||
jpc_mqenc_renorme(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc);
|
||||
return jpc_mqenc_error(mqenc) ? (-1) : 0;
|
||||
jpc_mqstate_t *state = *(mqenc->curctx);
|
||||
if (mqenc->areg < state->qeval) {
|
||||
mqenc->areg = state->qeval;
|
||||
} else {
|
||||
mqenc->creg += state->qeval;
|
||||
}
|
||||
*mqenc->curctx = state->nmps;
|
||||
jpc_mqenc_renorme(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc);
|
||||
return jpc_mqenc_error(mqenc) ? (-1) : 0;
|
||||
}
|
||||
|
||||
int jpc_mqenc_codelps(jpc_mqenc_t *mqenc)
|
||||
{
|
||||
jpc_mqenc_codelps2(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc->curctx, mqenc);
|
||||
return jpc_mqenc_error(mqenc) ? (-1) : 0;
|
||||
jpc_mqenc_codelps2(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc->curctx, mqenc);
|
||||
return jpc_mqenc_error(mqenc) ? (-1) : 0;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -337,56 +337,56 @@ int jpc_mqenc_codelps(jpc_mqenc_t *mqenc)
|
||||
|
||||
int jpc_mqenc_flush(jpc_mqenc_t *mqenc, int termmode)
|
||||
{
|
||||
int_fast16_t k;
|
||||
int_fast16_t k;
|
||||
|
||||
switch (termmode) {
|
||||
case JPC_MQENC_PTERM:
|
||||
k = 11 - mqenc->ctreg + 1;
|
||||
while (k > 0) {
|
||||
mqenc->creg <<= mqenc->ctreg;
|
||||
mqenc->ctreg = 0;
|
||||
jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg,
|
||||
mqenc);
|
||||
k -= mqenc->ctreg;
|
||||
}
|
||||
if (mqenc->outbuf != 0xff) {
|
||||
jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc);
|
||||
}
|
||||
break;
|
||||
case JPC_MQENC_DEFTERM:
|
||||
jpc_mqenc_setbits(mqenc);
|
||||
mqenc->creg <<= mqenc->ctreg;
|
||||
jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc);
|
||||
mqenc->creg <<= mqenc->ctreg;
|
||||
jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc);
|
||||
if (mqenc->outbuf != 0xff) {
|
||||
jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
switch (termmode) {
|
||||
case JPC_MQENC_PTERM:
|
||||
k = 11 - mqenc->ctreg + 1;
|
||||
while (k > 0) {
|
||||
mqenc->creg <<= mqenc->ctreg;
|
||||
mqenc->ctreg = 0;
|
||||
jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg,
|
||||
mqenc);
|
||||
k -= mqenc->ctreg;
|
||||
}
|
||||
if (mqenc->outbuf != 0xff) {
|
||||
jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc);
|
||||
}
|
||||
break;
|
||||
case JPC_MQENC_DEFTERM:
|
||||
jpc_mqenc_setbits(mqenc);
|
||||
mqenc->creg <<= mqenc->ctreg;
|
||||
jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc);
|
||||
mqenc->creg <<= mqenc->ctreg;
|
||||
jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc);
|
||||
if (mqenc->outbuf != 0xff) {
|
||||
jpc_mqenc_byteout(mqenc->areg, mqenc->creg, mqenc->ctreg, mqenc);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void jpc_mqenc_setbits(jpc_mqenc_t *mqenc)
|
||||
{
|
||||
uint_fast32_t tmp = mqenc->creg + mqenc->areg;
|
||||
mqenc->creg |= 0xffff;
|
||||
if (mqenc->creg >= tmp) {
|
||||
mqenc->creg -= 0x8000;
|
||||
}
|
||||
uint_fast32_t tmp = mqenc->creg + mqenc->areg;
|
||||
mqenc->creg |= 0xffff;
|
||||
if (mqenc->creg >= tmp) {
|
||||
mqenc->creg -= 0x8000;
|
||||
}
|
||||
}
|
||||
|
||||
/* Dump a MQ encoder to a stream for debugging. */
|
||||
|
||||
int jpc_mqenc_dump(jpc_mqenc_t *mqenc, FILE *out)
|
||||
{
|
||||
fprintf(out, "AREG = %08x, CREG = %08x, CTREG = %d\n",
|
||||
(unsigned)mqenc->areg, (unsigned)mqenc->creg, (int)mqenc->ctreg);
|
||||
fprintf(out, "IND = %02d, MPS = %d, QEVAL = %04x\n",
|
||||
(int)(*mqenc->curctx - jpc_mqstates), (int)(*mqenc->curctx)->mps,
|
||||
(int)(*mqenc->curctx)->qeval);
|
||||
return 0;
|
||||
fprintf(out, "AREG = %08x, CREG = %08x, CTREG = %d\n",
|
||||
(unsigned)mqenc->areg, (unsigned)mqenc->creg, (int)mqenc->ctreg);
|
||||
fprintf(out, "IND = %02d, MPS = %d, QEVAL = %04x\n",
|
||||
(int)(*mqenc->curctx - jpc_mqstates), (int)(*mqenc->curctx)->mps,
|
||||
(int)(*mqenc->curctx)->qeval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
externo
+43
-43
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -98,53 +98,53 @@
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The C register. */
|
||||
uint_fast32_t creg;
|
||||
/* The C register. */
|
||||
uint_fast32_t creg;
|
||||
|
||||
/* The A register. */
|
||||
uint_fast32_t areg;
|
||||
/* The A register. */
|
||||
uint_fast32_t areg;
|
||||
|
||||
/* The CT register. */
|
||||
uint_fast32_t ctreg;
|
||||
/* The CT register. */
|
||||
uint_fast32_t ctreg;
|
||||
|
||||
/* The maximum number of contexts. */
|
||||
int maxctxs;
|
||||
/* The maximum number of contexts. */
|
||||
int maxctxs;
|
||||
|
||||
/* The per-context information. */
|
||||
jpc_mqstate_t **ctxs;
|
||||
/* The per-context information. */
|
||||
jpc_mqstate_t **ctxs;
|
||||
|
||||
/* The current context. */
|
||||
jpc_mqstate_t **curctx;
|
||||
/* The current context. */
|
||||
jpc_mqstate_t **curctx;
|
||||
|
||||
/* The stream for encoder output. */
|
||||
jas_stream_t *out;
|
||||
/* The stream for encoder output. */
|
||||
jas_stream_t *out;
|
||||
|
||||
/* The byte buffer (i.e., the B variable in the standard). */
|
||||
int_fast16_t outbuf;
|
||||
/* The byte buffer (i.e., the B variable in the standard). */
|
||||
int_fast16_t outbuf;
|
||||
|
||||
/* The last byte output. */
|
||||
int_fast16_t lastbyte;
|
||||
/* The last byte output. */
|
||||
int_fast16_t lastbyte;
|
||||
|
||||
/* The error indicator. */
|
||||
int err;
|
||||
|
||||
/* The error indicator. */
|
||||
int err;
|
||||
|
||||
} jpc_mqenc_t;
|
||||
|
||||
/* MQ arithmetic encoder state information. */
|
||||
|
||||
typedef struct {
|
||||
|
||||
/* The A register. */
|
||||
unsigned areg;
|
||||
/* The A register. */
|
||||
unsigned areg;
|
||||
|
||||
/* The C register. */
|
||||
unsigned creg;
|
||||
/* The C register. */
|
||||
unsigned creg;
|
||||
|
||||
/* The CT register. */
|
||||
unsigned ctreg;
|
||||
/* The CT register. */
|
||||
unsigned ctreg;
|
||||
|
||||
/* The last byte output by the encoder. */
|
||||
int lastbyte;
|
||||
/* The last byte output by the encoder. */
|
||||
int lastbyte;
|
||||
|
||||
} jpc_mqencstate_t;
|
||||
|
||||
@@ -185,7 +185,7 @@ void jpc_mqenc_setctxs(jpc_mqenc_t *enc, int numctxs, jpc_mqctx_t *ctxs);
|
||||
|
||||
/* Get the error state of a MQ encoder. */
|
||||
#define jpc_mqenc_error(enc) \
|
||||
((enc)->err)
|
||||
((enc)->err)
|
||||
|
||||
/* Get the current encoder state. */
|
||||
void jpc_mqenc_getstate(jpc_mqenc_t *enc, jpc_mqencstate_t *state);
|
||||
@@ -217,11 +217,11 @@ int jpc_mqenc_dump(jpc_mqenc_t *mqenc, FILE *out);
|
||||
/* Note: This macro is included only to satisfy the needs of
|
||||
the mqenc_putbit macro. */
|
||||
#define jpc_mqenc_putbit_macro(enc, bit) \
|
||||
(((*((enc)->curctx))->mps == (bit)) ? \
|
||||
(((enc)->areg -= (*(enc)->curctx)->qeval), \
|
||||
((!((enc)->areg & 0x8000)) ? (jpc_mqenc_codemps2(enc)) : \
|
||||
((enc)->creg += (*(enc)->curctx)->qeval))) : \
|
||||
jpc_mqenc_codelps(enc))
|
||||
(((*((enc)->curctx))->mps == (bit)) ? \
|
||||
(((enc)->areg -= (*(enc)->curctx)->qeval), \
|
||||
((!((enc)->areg & 0x8000)) ? (jpc_mqenc_codemps2(enc)) : \
|
||||
((enc)->creg += (*(enc)->curctx)->qeval))) : \
|
||||
jpc_mqenc_codelps(enc))
|
||||
|
||||
/* Note: These function prototypes are included only to satisfy the
|
||||
needs of the mqenc_putbit_macro macro. Do not call any of these
|
||||
|
||||
externo
+2525
-2525
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+12
-12
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -101,10 +101,10 @@ any particular platform. Hopefully, it is not too unreasonable, however. */
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int (*analyze)(int *, int, int, int, int, int);
|
||||
int (*synthesize)(int *, int, int, int, int, int);
|
||||
double *lpenergywts;
|
||||
double *hpenergywts;
|
||||
int (*analyze)(int *, int, int, int, int, int);
|
||||
int (*synthesize)(int *, int, int, int, int, int);
|
||||
double *lpenergywts;
|
||||
double *hpenergywts;
|
||||
} jpc_qmfb2d_t;
|
||||
|
||||
extern jpc_qmfb2d_t jpc_ft_qmfb2d;
|
||||
|
||||
externo
+302
-302
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -114,49 +114,49 @@ void jpc_initmqctxs(void);
|
||||
|
||||
int JPC_PASSTYPE(int passno)
|
||||
{
|
||||
int passtype;
|
||||
switch (passno % 3) {
|
||||
case 0:
|
||||
passtype = JPC_CLNPASS;
|
||||
break;
|
||||
case 1:
|
||||
passtype = JPC_SIGPASS;
|
||||
break;
|
||||
case 2:
|
||||
passtype = JPC_REFPASS;
|
||||
break;
|
||||
default:
|
||||
passtype = -1;
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
return passtype;
|
||||
int passtype;
|
||||
switch (passno % 3) {
|
||||
case 0:
|
||||
passtype = JPC_CLNPASS;
|
||||
break;
|
||||
case 1:
|
||||
passtype = JPC_SIGPASS;
|
||||
break;
|
||||
case 2:
|
||||
passtype = JPC_REFPASS;
|
||||
break;
|
||||
default:
|
||||
passtype = -1;
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
return passtype;
|
||||
}
|
||||
|
||||
int JPC_NOMINALGAIN(int qmfbid, int numlvls, int lvlno, int orient)
|
||||
{
|
||||
/* Avoid compiler warnings about unused parameters. */
|
||||
numlvls = 0;
|
||||
/* Avoid compiler warnings about unused parameters. */
|
||||
numlvls = 0;
|
||||
|
||||
if (qmfbid == JPC_COX_INS) {
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
assert(qmfbid == JPC_COX_RFT);
|
||||
if (lvlno == 0) {
|
||||
assert(orient == JPC_TSFB_LL);
|
||||
return 0;
|
||||
} else {
|
||||
switch (orient) {
|
||||
case JPC_TSFB_LH:
|
||||
case JPC_TSFB_HL:
|
||||
return 1;
|
||||
break;
|
||||
case JPC_TSFB_HH:
|
||||
return 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
abort();
|
||||
assert(qmfbid == JPC_COX_RFT);
|
||||
if (lvlno == 0) {
|
||||
assert(orient == JPC_TSFB_LL);
|
||||
return 0;
|
||||
} else {
|
||||
switch (orient) {
|
||||
case JPC_TSFB_LH:
|
||||
case JPC_TSFB_HL:
|
||||
return 1;
|
||||
break;
|
||||
case JPC_TSFB_HH:
|
||||
return 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
abort();
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -165,66 +165,66 @@ if (qmfbid == JPC_COX_INS) {
|
||||
|
||||
int JPC_SEGTYPE(int passno, int firstpassno, int bypass)
|
||||
{
|
||||
int passtype;
|
||||
if (bypass) {
|
||||
passtype = JPC_PASSTYPE(passno);
|
||||
if (passtype == JPC_CLNPASS) {
|
||||
return JPC_SEG_MQ;
|
||||
}
|
||||
return ((passno < firstpassno + 10) ? JPC_SEG_MQ : JPC_SEG_RAW);
|
||||
} else {
|
||||
return JPC_SEG_MQ;
|
||||
}
|
||||
int passtype;
|
||||
if (bypass) {
|
||||
passtype = JPC_PASSTYPE(passno);
|
||||
if (passtype == JPC_CLNPASS) {
|
||||
return JPC_SEG_MQ;
|
||||
}
|
||||
return ((passno < firstpassno + 10) ? JPC_SEG_MQ : JPC_SEG_RAW);
|
||||
} else {
|
||||
return JPC_SEG_MQ;
|
||||
}
|
||||
}
|
||||
|
||||
int JPC_SEGPASSCNT(int passno, int firstpassno, int numpasses, int bypass, int termall)
|
||||
{
|
||||
int ret;
|
||||
int passtype;
|
||||
int ret;
|
||||
int passtype;
|
||||
|
||||
if (termall) {
|
||||
ret = 1;
|
||||
} else if (bypass) {
|
||||
if (passno < firstpassno + 10) {
|
||||
ret = 10 - (passno - firstpassno);
|
||||
} else {
|
||||
passtype = JPC_PASSTYPE(passno);
|
||||
switch (passtype) {
|
||||
case JPC_SIGPASS:
|
||||
ret = 2;
|
||||
break;
|
||||
case JPC_REFPASS:
|
||||
ret = 1;
|
||||
break;
|
||||
case JPC_CLNPASS:
|
||||
ret = 1;
|
||||
break;
|
||||
default:
|
||||
ret = -1;
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ret = JPC_PREC * 3 - 2;
|
||||
}
|
||||
ret = JAS_MIN(ret, numpasses - passno);
|
||||
return ret;
|
||||
if (termall) {
|
||||
ret = 1;
|
||||
} else if (bypass) {
|
||||
if (passno < firstpassno + 10) {
|
||||
ret = 10 - (passno - firstpassno);
|
||||
} else {
|
||||
passtype = JPC_PASSTYPE(passno);
|
||||
switch (passtype) {
|
||||
case JPC_SIGPASS:
|
||||
ret = 2;
|
||||
break;
|
||||
case JPC_REFPASS:
|
||||
ret = 1;
|
||||
break;
|
||||
case JPC_CLNPASS:
|
||||
ret = 1;
|
||||
break;
|
||||
default:
|
||||
ret = -1;
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ret = JPC_PREC * 3 - 2;
|
||||
}
|
||||
ret = JAS_MIN(ret, numpasses - passno);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int JPC_ISTERMINATED(int passno, int firstpassno, int numpasses, int termall,
|
||||
int lazy)
|
||||
{
|
||||
int ret;
|
||||
int n;
|
||||
if (passno - firstpassno == numpasses - 1) {
|
||||
ret = 1;
|
||||
} else {
|
||||
n = JPC_SEGPASSCNT(passno, firstpassno, numpasses, lazy, termall);
|
||||
ret = (n <= 1) ? 1 : 0;
|
||||
}
|
||||
int ret;
|
||||
int n;
|
||||
if (passno - firstpassno == numpasses - 1) {
|
||||
ret = 1;
|
||||
} else {
|
||||
n = JPC_SEGPASSCNT(passno, firstpassno, numpasses, lazy, termall);
|
||||
ret = (n <= 1) ? 1 : 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************************\
|
||||
@@ -233,265 +233,265 @@ int JPC_ISTERMINATED(int passno, int firstpassno, int numpasses, int termall,
|
||||
|
||||
void jpc_initluts()
|
||||
{
|
||||
int i;
|
||||
int orient;
|
||||
int refine;
|
||||
float u;
|
||||
float v;
|
||||
float t;
|
||||
int i;
|
||||
int orient;
|
||||
int refine;
|
||||
float u;
|
||||
float v;
|
||||
float t;
|
||||
|
||||
/* XXX - hack */
|
||||
jpc_initmqctxs();
|
||||
|
||||
for (orient = 0; orient < 4; ++orient) {
|
||||
for (i = 0; i < 256; ++i) {
|
||||
jpc_zcctxnolut[(orient << 8) | i] = jpc_getzcctxno(i, orient);
|
||||
}
|
||||
}
|
||||
for (orient = 0; orient < 4; ++orient) {
|
||||
for (i = 0; i < 256; ++i) {
|
||||
jpc_zcctxnolut[(orient << 8) | i] = jpc_getzcctxno(i, orient);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 256; ++i) {
|
||||
jpc_spblut[i] = jpc_getspb(i << 4);
|
||||
}
|
||||
for (i = 0; i < 256; ++i) {
|
||||
jpc_spblut[i] = jpc_getspb(i << 4);
|
||||
}
|
||||
|
||||
for (i = 0; i < 256; ++i) {
|
||||
jpc_scctxnolut[i] = jpc_getscctxno(i << 4);
|
||||
}
|
||||
for (i = 0; i < 256; ++i) {
|
||||
jpc_scctxnolut[i] = jpc_getscctxno(i << 4);
|
||||
}
|
||||
|
||||
for (refine = 0; refine < 2; ++refine) {
|
||||
for (i = 0; i < 2048; ++i) {
|
||||
jpc_magctxnolut[(refine << 11) + i] = jpc_getmagctxno((refine ? JPC_REFINE : 0) | i);
|
||||
}
|
||||
}
|
||||
for (refine = 0; refine < 2; ++refine) {
|
||||
for (i = 0; i < 2048; ++i) {
|
||||
jpc_magctxnolut[(refine << 11) + i] = jpc_getmagctxno((refine ? JPC_REFINE : 0) | i);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < (1 << JPC_NMSEDEC_BITS); ++i) {
|
||||
t = i * jpc_pow2i(-JPC_NMSEDEC_FRACBITS);
|
||||
u = t;
|
||||
v = t - 1.5;
|
||||
jpc_signmsedec[i] = jpc_dbltofix(floor((u * u - v * v) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS));
|
||||
for (i = 0; i < (1 << JPC_NMSEDEC_BITS); ++i) {
|
||||
t = i * jpc_pow2i(-JPC_NMSEDEC_FRACBITS);
|
||||
u = t;
|
||||
v = t - 1.5;
|
||||
jpc_signmsedec[i] = jpc_dbltofix(floor((u * u - v * v) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS));
|
||||
/* XXX - this calc is not correct */
|
||||
jpc_signmsedec0[i] = jpc_dbltofix(floor((u * u) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS));
|
||||
u = t - 1.0;
|
||||
if (i & (1 << (JPC_NMSEDEC_BITS - 1))) {
|
||||
v = t - 1.5;
|
||||
} else {
|
||||
v = t - 0.5;
|
||||
}
|
||||
jpc_refnmsedec[i] = jpc_dbltofix(floor((u * u - v * v) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS));
|
||||
jpc_signmsedec0[i] = jpc_dbltofix(floor((u * u) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS));
|
||||
u = t - 1.0;
|
||||
if (i & (1 << (JPC_NMSEDEC_BITS - 1))) {
|
||||
v = t - 1.5;
|
||||
} else {
|
||||
v = t - 0.5;
|
||||
}
|
||||
jpc_refnmsedec[i] = jpc_dbltofix(floor((u * u - v * v) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS));
|
||||
/* XXX - this calc is not correct */
|
||||
jpc_refnmsedec0[i] = jpc_dbltofix(floor((u * u) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS));
|
||||
}
|
||||
jpc_refnmsedec0[i] = jpc_dbltofix(floor((u * u) * jpc_pow2i(JPC_NMSEDEC_FRACBITS) + 0.5) / jpc_pow2i(JPC_NMSEDEC_FRACBITS));
|
||||
}
|
||||
}
|
||||
|
||||
jpc_fix_t jpc_getsignmsedec_func(jpc_fix_t x, int bitpos)
|
||||
{
|
||||
jpc_fix_t y;
|
||||
assert(!(x & (~JAS_ONES(bitpos + 1))));
|
||||
y = jpc_getsignmsedec_macro(x, bitpos);
|
||||
return y;
|
||||
jpc_fix_t y;
|
||||
assert(!(x & (~JAS_ONES(bitpos + 1))));
|
||||
y = jpc_getsignmsedec_macro(x, bitpos);
|
||||
return y;
|
||||
}
|
||||
|
||||
int jpc_getzcctxno(int f, int orient)
|
||||
{
|
||||
int h;
|
||||
int v;
|
||||
int d;
|
||||
int n;
|
||||
int t;
|
||||
int hv;
|
||||
int h;
|
||||
int v;
|
||||
int d;
|
||||
int n;
|
||||
int t;
|
||||
int hv;
|
||||
|
||||
/* Avoid compiler warning. */
|
||||
n = 0;
|
||||
/* Avoid compiler warning. */
|
||||
n = 0;
|
||||
|
||||
h = ((f & JPC_WSIG) != 0) + ((f & JPC_ESIG) != 0);
|
||||
v = ((f & JPC_NSIG) != 0) + ((f & JPC_SSIG) != 0);
|
||||
d = ((f & JPC_NWSIG) != 0) + ((f & JPC_NESIG) != 0) + ((f & JPC_SESIG) != 0) + ((f & JPC_SWSIG) != 0);
|
||||
switch (orient) {
|
||||
case JPC_TSFB_HL:
|
||||
t = h;
|
||||
h = v;
|
||||
v = t;
|
||||
case JPC_TSFB_LL:
|
||||
case JPC_TSFB_LH:
|
||||
if (!h) {
|
||||
if (!v) {
|
||||
if (!d) {
|
||||
n = 0;
|
||||
} else if (d == 1) {
|
||||
n = 1;
|
||||
} else {
|
||||
n = 2;
|
||||
}
|
||||
} else if (v == 1) {
|
||||
n = 3;
|
||||
} else {
|
||||
n = 4;
|
||||
}
|
||||
} else if (h == 1) {
|
||||
if (!v) {
|
||||
if (!d) {
|
||||
n = 5;
|
||||
} else {
|
||||
n = 6;
|
||||
}
|
||||
} else {
|
||||
n = 7;
|
||||
}
|
||||
} else {
|
||||
n = 8;
|
||||
}
|
||||
break;
|
||||
case JPC_TSFB_HH:
|
||||
hv = h + v;
|
||||
if (!d) {
|
||||
if (!hv) {
|
||||
n = 0;
|
||||
} else if (hv == 1) {
|
||||
n = 1;
|
||||
} else {
|
||||
n = 2;
|
||||
}
|
||||
} else if (d == 1) {
|
||||
if (!hv) {
|
||||
n = 3;
|
||||
} else if (hv == 1) {
|
||||
n = 4;
|
||||
} else {
|
||||
n = 5;
|
||||
}
|
||||
} else if (d == 2) {
|
||||
if (!hv) {
|
||||
n = 6;
|
||||
} else {
|
||||
n = 7;
|
||||
}
|
||||
} else {
|
||||
n = 8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
assert(n < JPC_NUMZCCTXS);
|
||||
return JPC_ZCCTXNO + n;
|
||||
h = ((f & JPC_WSIG) != 0) + ((f & JPC_ESIG) != 0);
|
||||
v = ((f & JPC_NSIG) != 0) + ((f & JPC_SSIG) != 0);
|
||||
d = ((f & JPC_NWSIG) != 0) + ((f & JPC_NESIG) != 0) + ((f & JPC_SESIG) != 0) + ((f & JPC_SWSIG) != 0);
|
||||
switch (orient) {
|
||||
case JPC_TSFB_HL:
|
||||
t = h;
|
||||
h = v;
|
||||
v = t;
|
||||
case JPC_TSFB_LL:
|
||||
case JPC_TSFB_LH:
|
||||
if (!h) {
|
||||
if (!v) {
|
||||
if (!d) {
|
||||
n = 0;
|
||||
} else if (d == 1) {
|
||||
n = 1;
|
||||
} else {
|
||||
n = 2;
|
||||
}
|
||||
} else if (v == 1) {
|
||||
n = 3;
|
||||
} else {
|
||||
n = 4;
|
||||
}
|
||||
} else if (h == 1) {
|
||||
if (!v) {
|
||||
if (!d) {
|
||||
n = 5;
|
||||
} else {
|
||||
n = 6;
|
||||
}
|
||||
} else {
|
||||
n = 7;
|
||||
}
|
||||
} else {
|
||||
n = 8;
|
||||
}
|
||||
break;
|
||||
case JPC_TSFB_HH:
|
||||
hv = h + v;
|
||||
if (!d) {
|
||||
if (!hv) {
|
||||
n = 0;
|
||||
} else if (hv == 1) {
|
||||
n = 1;
|
||||
} else {
|
||||
n = 2;
|
||||
}
|
||||
} else if (d == 1) {
|
||||
if (!hv) {
|
||||
n = 3;
|
||||
} else if (hv == 1) {
|
||||
n = 4;
|
||||
} else {
|
||||
n = 5;
|
||||
}
|
||||
} else if (d == 2) {
|
||||
if (!hv) {
|
||||
n = 6;
|
||||
} else {
|
||||
n = 7;
|
||||
}
|
||||
} else {
|
||||
n = 8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
assert(n < JPC_NUMZCCTXS);
|
||||
return JPC_ZCCTXNO + n;
|
||||
}
|
||||
|
||||
int jpc_getspb(int f)
|
||||
{
|
||||
int hc;
|
||||
int vc;
|
||||
int n;
|
||||
int hc;
|
||||
int vc;
|
||||
int n;
|
||||
|
||||
hc = JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == JPC_ESIG) + ((f & (JPC_WSIG | JPC_WSGN)) == JPC_WSIG), 1) -
|
||||
JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == (JPC_ESIG | JPC_ESGN)) + ((f & (JPC_WSIG | JPC_WSGN)) == (JPC_WSIG | JPC_WSGN)), 1);
|
||||
vc = JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == JPC_NSIG) + ((f & (JPC_SSIG | JPC_SSGN)) == JPC_SSIG), 1) -
|
||||
JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == (JPC_NSIG | JPC_NSGN)) + ((f & (JPC_SSIG | JPC_SSGN)) == (JPC_SSIG | JPC_SSGN)), 1);
|
||||
if (!hc && !vc) {
|
||||
n = 0;
|
||||
} else {
|
||||
n = (!(hc > 0 || (!hc && vc > 0)));
|
||||
}
|
||||
return n;
|
||||
hc = JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == JPC_ESIG) + ((f & (JPC_WSIG | JPC_WSGN)) == JPC_WSIG), 1) -
|
||||
JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == (JPC_ESIG | JPC_ESGN)) + ((f & (JPC_WSIG | JPC_WSGN)) == (JPC_WSIG | JPC_WSGN)), 1);
|
||||
vc = JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == JPC_NSIG) + ((f & (JPC_SSIG | JPC_SSGN)) == JPC_SSIG), 1) -
|
||||
JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == (JPC_NSIG | JPC_NSGN)) + ((f & (JPC_SSIG | JPC_SSGN)) == (JPC_SSIG | JPC_SSGN)), 1);
|
||||
if (!hc && !vc) {
|
||||
n = 0;
|
||||
} else {
|
||||
n = (!(hc > 0 || (!hc && vc > 0)));
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
int jpc_getscctxno(int f)
|
||||
{
|
||||
int hc;
|
||||
int vc;
|
||||
int n;
|
||||
int hc;
|
||||
int vc;
|
||||
int n;
|
||||
|
||||
/* Avoid compiler warning. */
|
||||
n = 0;
|
||||
/* Avoid compiler warning. */
|
||||
n = 0;
|
||||
|
||||
hc = JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == JPC_ESIG) + ((f & (JPC_WSIG | JPC_WSGN)) == JPC_WSIG),
|
||||
1) - JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == (JPC_ESIG | JPC_ESGN)) +
|
||||
((f & (JPC_WSIG | JPC_WSGN)) == (JPC_WSIG | JPC_WSGN)), 1);
|
||||
vc = JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == JPC_NSIG) + ((f & (JPC_SSIG | JPC_SSGN)) == JPC_SSIG),
|
||||
1) - JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == (JPC_NSIG | JPC_NSGN)) +
|
||||
((f & (JPC_SSIG | JPC_SSGN)) == (JPC_SSIG | JPC_SSGN)), 1);
|
||||
assert(hc >= -1 && hc <= 1 && vc >= -1 && vc <= 1);
|
||||
if (hc < 0) {
|
||||
hc = -hc;
|
||||
vc = -vc;
|
||||
}
|
||||
if (!hc) {
|
||||
if (vc == -1) {
|
||||
n = 1;
|
||||
} else if (!vc) {
|
||||
n = 0;
|
||||
} else {
|
||||
n = 1;
|
||||
}
|
||||
} else if (hc == 1) {
|
||||
if (vc == -1) {
|
||||
n = 2;
|
||||
} else if (!vc) {
|
||||
n = 3;
|
||||
} else {
|
||||
n = 4;
|
||||
}
|
||||
}
|
||||
assert(n < JPC_NUMSCCTXS);
|
||||
return JPC_SCCTXNO + n;
|
||||
hc = JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == JPC_ESIG) + ((f & (JPC_WSIG | JPC_WSGN)) == JPC_WSIG),
|
||||
1) - JAS_MIN(((f & (JPC_ESIG | JPC_ESGN)) == (JPC_ESIG | JPC_ESGN)) +
|
||||
((f & (JPC_WSIG | JPC_WSGN)) == (JPC_WSIG | JPC_WSGN)), 1);
|
||||
vc = JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == JPC_NSIG) + ((f & (JPC_SSIG | JPC_SSGN)) == JPC_SSIG),
|
||||
1) - JAS_MIN(((f & (JPC_NSIG | JPC_NSGN)) == (JPC_NSIG | JPC_NSGN)) +
|
||||
((f & (JPC_SSIG | JPC_SSGN)) == (JPC_SSIG | JPC_SSGN)), 1);
|
||||
assert(hc >= -1 && hc <= 1 && vc >= -1 && vc <= 1);
|
||||
if (hc < 0) {
|
||||
hc = -hc;
|
||||
vc = -vc;
|
||||
}
|
||||
if (!hc) {
|
||||
if (vc == -1) {
|
||||
n = 1;
|
||||
} else if (!vc) {
|
||||
n = 0;
|
||||
} else {
|
||||
n = 1;
|
||||
}
|
||||
} else if (hc == 1) {
|
||||
if (vc == -1) {
|
||||
n = 2;
|
||||
} else if (!vc) {
|
||||
n = 3;
|
||||
} else {
|
||||
n = 4;
|
||||
}
|
||||
}
|
||||
assert(n < JPC_NUMSCCTXS);
|
||||
return JPC_SCCTXNO + n;
|
||||
}
|
||||
|
||||
int jpc_getmagctxno(int f)
|
||||
{
|
||||
int n;
|
||||
int n;
|
||||
|
||||
if (!(f & JPC_REFINE)) {
|
||||
n = (f & (JPC_OTHSIGMSK)) ? 1 : 0;
|
||||
} else {
|
||||
n = 2;
|
||||
}
|
||||
if (!(f & JPC_REFINE)) {
|
||||
n = (f & (JPC_OTHSIGMSK)) ? 1 : 0;
|
||||
} else {
|
||||
n = 2;
|
||||
}
|
||||
|
||||
assert(n < JPC_NUMMAGCTXS);
|
||||
return JPC_MAGCTXNO + n;
|
||||
assert(n < JPC_NUMMAGCTXS);
|
||||
return JPC_MAGCTXNO + n;
|
||||
}
|
||||
|
||||
void jpc_initctxs(jpc_mqctx_t *ctxs)
|
||||
{
|
||||
jpc_mqctx_t *ctx;
|
||||
int i;
|
||||
jpc_mqctx_t *ctx;
|
||||
int i;
|
||||
|
||||
ctx = ctxs;
|
||||
for (i = 0; i < JPC_NUMCTXS; ++i) {
|
||||
ctx->mps = 0;
|
||||
switch (i) {
|
||||
case JPC_UCTXNO:
|
||||
ctx->ind = 46;
|
||||
break;
|
||||
case JPC_ZCCTXNO:
|
||||
ctx->ind = 4;
|
||||
break;
|
||||
case JPC_AGGCTXNO:
|
||||
ctx->ind = 3;
|
||||
break;
|
||||
default:
|
||||
ctx->ind = 0;
|
||||
break;
|
||||
}
|
||||
++ctx;
|
||||
}
|
||||
ctx = ctxs;
|
||||
for (i = 0; i < JPC_NUMCTXS; ++i) {
|
||||
ctx->mps = 0;
|
||||
switch (i) {
|
||||
case JPC_UCTXNO:
|
||||
ctx->ind = 46;
|
||||
break;
|
||||
case JPC_ZCCTXNO:
|
||||
ctx->ind = 4;
|
||||
break;
|
||||
case JPC_AGGCTXNO:
|
||||
ctx->ind = 3;
|
||||
break;
|
||||
default:
|
||||
ctx->ind = 0;
|
||||
break;
|
||||
}
|
||||
++ctx;
|
||||
}
|
||||
}
|
||||
|
||||
void jpc_initmqctxs()
|
||||
{
|
||||
jpc_initctxs(jpc_mqctxs);
|
||||
jpc_initctxs(jpc_mqctxs);
|
||||
}
|
||||
|
||||
/* Calculate the real quantity exp2(n), where x is an integer. */
|
||||
double jpc_pow2i(int n)
|
||||
{
|
||||
double x;
|
||||
double a;
|
||||
double x;
|
||||
double a;
|
||||
|
||||
x = 1.0;
|
||||
if (n < 0) {
|
||||
a = 0.5;
|
||||
n = -n;
|
||||
} else {
|
||||
a = 2.0;
|
||||
}
|
||||
while (--n >= 0) {
|
||||
x *= a;
|
||||
}
|
||||
return x;
|
||||
x = 1.0;
|
||||
if (n < 0) {
|
||||
a = 0.5;
|
||||
n = -n;
|
||||
} else {
|
||||
a = 2.0;
|
||||
}
|
||||
while (--n >= 0) {
|
||||
x *= a;
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
externo
+49
-49
@@ -6,15 +6,15 @@
|
||||
*/
|
||||
|
||||
/* __START_OF_JASPER_LICENSE__
|
||||
*
|
||||
*
|
||||
* JasPer License Version 2.0
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2001-2006 Michael David Adams
|
||||
* Copyright (c) 1999-2000 Image Power, Inc.
|
||||
* Copyright (c) 1999-2000 The University of British Columbia
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person (the
|
||||
* "User") obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
@@ -22,15 +22,15 @@
|
||||
* publish, distribute, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
*
|
||||
* 1. The above copyright notices and this permission notice (which
|
||||
* includes the disclaimer below) shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* 2. The name of a copyright holder shall not be used to endorse or
|
||||
* promote products derived from the Software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
*
|
||||
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
|
||||
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
|
||||
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||
@@ -57,7 +57,7 @@
|
||||
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
|
||||
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
|
||||
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
|
||||
*
|
||||
*
|
||||
* __END_OF_JASPER_LICENSE__
|
||||
*/
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
#define JPC_WSIG 0x0080
|
||||
/* The significance mask for 8-connected neighbours. */
|
||||
#define JPC_OTHSIGMSK \
|
||||
(JPC_NSIG | JPC_NESIG | JPC_ESIG | JPC_SESIG | JPC_SSIG | JPC_SWSIG | JPC_WSIG | JPC_NWSIG)
|
||||
(JPC_NSIG | JPC_NESIG | JPC_ESIG | JPC_SESIG | JPC_SSIG | JPC_SWSIG | JPC_WSIG | JPC_NWSIG)
|
||||
/* The significance mask for 4-connected neighbours. */
|
||||
#define JPC_PRIMSIGMSK (JPC_NSIG | JPC_ESIG | JPC_SSIG | JPC_WSIG)
|
||||
|
||||
@@ -201,75 +201,75 @@ void jpc_initctxs(jpc_mqctx_t *ctxs);
|
||||
/* Get the zero coding context. */
|
||||
int jpc_getzcctxno(int f, int orient);
|
||||
#define JPC_GETZCCTXNO(f, orient) \
|
||||
(jpc_zcctxnolut[((orient) << 8) | ((f) & JPC_OTHSIGMSK)])
|
||||
(jpc_zcctxnolut[((orient) << 8) | ((f) & JPC_OTHSIGMSK)])
|
||||
|
||||
/* Get the sign prediction bit. */
|
||||
int jpc_getspb(int f);
|
||||
#define JPC_GETSPB(f) \
|
||||
(jpc_spblut[((f) & (JPC_PRIMSIGMSK | JPC_SGNMSK)) >> 4])
|
||||
(jpc_spblut[((f) & (JPC_PRIMSIGMSK | JPC_SGNMSK)) >> 4])
|
||||
|
||||
/* Get the sign coding context. */
|
||||
int jpc_getscctxno(int f);
|
||||
#define JPC_GETSCCTXNO(f) \
|
||||
(jpc_scctxnolut[((f) & (JPC_PRIMSIGMSK | JPC_SGNMSK)) >> 4])
|
||||
(jpc_scctxnolut[((f) & (JPC_PRIMSIGMSK | JPC_SGNMSK)) >> 4])
|
||||
|
||||
/* Get the magnitude context. */
|
||||
int jpc_getmagctxno(int f);
|
||||
#define JPC_GETMAGCTXNO(f) \
|
||||
(jpc_magctxnolut[((f) & JPC_OTHSIGMSK) | ((((f) & JPC_REFINE) != 0) << 11)])
|
||||
(jpc_magctxnolut[((f) & JPC_OTHSIGMSK) | ((((f) & JPC_REFINE) != 0) << 11)])
|
||||
|
||||
/* Get the normalized MSE reduction for significance passes. */
|
||||
#define JPC_GETSIGNMSEDEC(x, bitpos) jpc_getsignmsedec_macro(x, bitpos)
|
||||
jpc_fix_t jpc_getsignmsedec_func(jpc_fix_t x, int bitpos);
|
||||
#define jpc_getsignmsedec_macro(x, bitpos) \
|
||||
((bitpos > JPC_NMSEDEC_FRACBITS) ? jpc_signmsedec[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)] : \
|
||||
(jpc_signmsedec0[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)]))
|
||||
((bitpos > JPC_NMSEDEC_FRACBITS) ? jpc_signmsedec[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)] : \
|
||||
(jpc_signmsedec0[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)]))
|
||||
|
||||
/* Get the normalized MSE reduction for refinement passes. */
|
||||
#define JPC_GETREFNMSEDEC(x, bitpos) jpc_getrefnmsedec_macro(x, bitpos)
|
||||
jpc_fix_t jpc_refsignmsedec_func(jpc_fix_t x, int bitpos);
|
||||
#define jpc_getrefnmsedec_macro(x, bitpos) \
|
||||
((bitpos > JPC_NMSEDEC_FRACBITS) ? jpc_refnmsedec[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)] : \
|
||||
(jpc_refnmsedec0[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)]))
|
||||
((bitpos > JPC_NMSEDEC_FRACBITS) ? jpc_refnmsedec[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)] : \
|
||||
(jpc_refnmsedec0[JPC_ASR(x, bitpos - JPC_NMSEDEC_FRACBITS) & JAS_ONES(JPC_NMSEDEC_BITS)]))
|
||||
|
||||
/* Arithmetic shift right (with ability to shift left also). */
|
||||
#define JPC_ASR(x, n) \
|
||||
(((n) >= 0) ? ((x) >> (n)) : ((x) << (-(n))))
|
||||
(((n) >= 0) ? ((x) >> (n)) : ((x) << (-(n))))
|
||||
|
||||
/* Update the per-sample state information. */
|
||||
#define JPC_UPDATEFLAGS4(fp, rowstep, s, vcausalflag) \
|
||||
{ \
|
||||
register jpc_fix_t *np = (fp) - (rowstep); \
|
||||
register jpc_fix_t *sp = (fp) + (rowstep); \
|
||||
if ((vcausalflag)) { \
|
||||
sp[-1] |= JPC_NESIG; \
|
||||
sp[1] |= JPC_NWSIG; \
|
||||
if (s) { \
|
||||
*sp |= JPC_NSIG | JPC_NSGN; \
|
||||
(fp)[-1] |= JPC_ESIG | JPC_ESGN; \
|
||||
(fp)[1] |= JPC_WSIG | JPC_WSGN; \
|
||||
} else { \
|
||||
*sp |= JPC_NSIG; \
|
||||
(fp)[-1] |= JPC_ESIG; \
|
||||
(fp)[1] |= JPC_WSIG; \
|
||||
} \
|
||||
} else { \
|
||||
np[-1] |= JPC_SESIG; \
|
||||
np[1] |= JPC_SWSIG; \
|
||||
sp[-1] |= JPC_NESIG; \
|
||||
sp[1] |= JPC_NWSIG; \
|
||||
if (s) { \
|
||||
*np |= JPC_SSIG | JPC_SSGN; \
|
||||
*sp |= JPC_NSIG | JPC_NSGN; \
|
||||
(fp)[-1] |= JPC_ESIG | JPC_ESGN; \
|
||||
(fp)[1] |= JPC_WSIG | JPC_WSGN; \
|
||||
} else { \
|
||||
*np |= JPC_SSIG; \
|
||||
*sp |= JPC_NSIG; \
|
||||
(fp)[-1] |= JPC_ESIG; \
|
||||
(fp)[1] |= JPC_WSIG; \
|
||||
} \
|
||||
} \
|
||||
register jpc_fix_t *np = (fp) - (rowstep); \
|
||||
register jpc_fix_t *sp = (fp) + (rowstep); \
|
||||
if ((vcausalflag)) { \
|
||||
sp[-1] |= JPC_NESIG; \
|
||||
sp[1] |= JPC_NWSIG; \
|
||||
if (s) { \
|
||||
*sp |= JPC_NSIG | JPC_NSGN; \
|
||||
(fp)[-1] |= JPC_ESIG | JPC_ESGN; \
|
||||
(fp)[1] |= JPC_WSIG | JPC_WSGN; \
|
||||
} else { \
|
||||
*sp |= JPC_NSIG; \
|
||||
(fp)[-1] |= JPC_ESIG; \
|
||||
(fp)[1] |= JPC_WSIG; \
|
||||
} \
|
||||
} else { \
|
||||
np[-1] |= JPC_SESIG; \
|
||||
np[1] |= JPC_SWSIG; \
|
||||
sp[-1] |= JPC_NESIG; \
|
||||
sp[1] |= JPC_NWSIG; \
|
||||
if (s) { \
|
||||
*np |= JPC_SSIG | JPC_SSGN; \
|
||||
*sp |= JPC_NSIG | JPC_NSGN; \
|
||||
(fp)[-1] |= JPC_ESIG | JPC_ESGN; \
|
||||
(fp)[1] |= JPC_WSIG | JPC_WSGN; \
|
||||
} else { \
|
||||
*np |= JPC_SSIG; \
|
||||
*sp |= JPC_NSIG; \
|
||||
(fp)[-1] |= JPC_ESIG; \
|
||||
(fp)[1] |= JPC_WSIG; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Initialize the lookup tables used by the codec. */
|
||||
|
||||
externo
+665
-665
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário