mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Compare commits
1716 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| 0ee2662da6 | |||
| bd394012e8 | |||
| aa4cad80a0 | |||
| cfc593eb0d | |||
| b528348f39 | |||
| 927523bc3d | |||
| a4ec89fb2c | |||
| 249bf008ab | |||
| df262b340c | |||
| eaddfb32de | |||
| 1543b46383 | |||
| efe139667b | |||
| 08890118db | |||
| 4216f3b24c | |||
| e2e6838da3 | |||
| a1bc11c429 | |||
| 76a644372f | |||
| 52ba2e45c4 | |||
| 9cd0c9033f | |||
| 565a8dc30d | |||
| ad6929b6a4 | |||
| 0f21890d7d | |||
| 600ad799c7 | |||
| 5d6c90e166 | |||
| 76354287aa | |||
| c80d205ecf | |||
| 3a88fc5aa9 | |||
| b3f68d29e7 | |||
| 319c20c797 | |||
| a9f2f522e7 | |||
| e6f7e4d83e | |||
| 60b73e7471 | |||
| e7f5978768 | |||
| 83ccdbd0ce | |||
| 6977a89525 | |||
| d015bf6f5e | |||
| 6042c59495 | |||
| 31395b0759 | |||
| 562838e0b5 | |||
| d56b771963 | |||
| 8f5b15b1c3 | |||
| e918877bcf | |||
| 7ef2114107 | |||
| b5eb318ae3 | |||
| dec38e5949 | |||
| afe11f69fb | |||
| 27c23b557c | |||
| cdad4ac7c9 | |||
| 6d3fecd490 | |||
| a72f4474b4 | |||
| 2b6b6f12e2 | |||
| 0584ac525b | |||
| 71729a5967 | |||
| 4d09d62f85 | |||
| a25c27ca05 | |||
| 82cb2ab556 | |||
| 5a2ba94dd6 | |||
| 2a2092092f | |||
| 7c778fc043 | |||
| e4b58ebff5 | |||
| 35344569bf | |||
| fd901d8323 | |||
| 6a13c9efc0 | |||
| d822989c8b | |||
| 00b02f9f6d | |||
| e4965b143f | |||
| 739da31add | |||
| 7fc18fe146 | |||
| 42d830ec23 | |||
| e8b0d27942 | |||
| d60b1f2f82 | |||
| 73ce3ef8c1 | |||
| ea0b57cc23 | |||
| d636c677f4 | |||
| 6c3137a8b5 | |||
| f09ae32796 | |||
| 15e50420bc | |||
| c6685bc9a7 | |||
| 60dd599aea | |||
| 8b67adea98 | |||
| a323da6fd5 | |||
| 981564ffe9 | |||
| 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 | |||
| cd81a13d8b | |||
| c17bd8c11b | |||
| f33d90220d | |||
| 2e2bd55729 | |||
| af6b2e4e96 | |||
| 8bc9e52dcc | |||
| 5df3c44d30 | |||
| fed67b3719 | |||
| 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 | |||
| 3cfa6949d7 | |||
| 2990f23e0c | |||
| 6206908868 | |||
| 677680d82d | |||
| 586d5a6024 | |||
| b1c2cba07c | |||
| 3780685fe6 | |||
| 834a0b518c | |||
| dde8455db2 | |||
| 0809ae562e | |||
| 5c528defb8 | |||
| 314813e51c | |||
| 9399394e6c | |||
| 1a572c8e89 | |||
| 6d498495d3 | |||
| bf27889f04 | |||
| 17d9509e31 | |||
| 29b9070698 | |||
| 74882fe188 | |||
| 48c3cfdfd0 | |||
| ae3c754bb3 | |||
| a20248977c | |||
| aaf043e7ba | |||
| cf25f572a6 | |||
| dad75658f2 | |||
| bb69e03f12 | |||
| b69e08cf51 | |||
| 8c50f3e8ae | |||
| 6903e8f0fd | |||
| d3c73071ea | |||
| 4800d85011 | |||
| 6f32fb025d | |||
| eb4ce67dac | |||
| 40e8d08e8d | |||
| 05de6302fd | |||
| 67b718f1cb | |||
| c492dc6a83 | |||
| 6ca618277c | |||
| bc929a7d46 | |||
| 18a8721f49 | |||
| ddd9a99c66 | |||
| 78329b0dfe | |||
| 4aaaef5967 | |||
| 5c13b8706f | |||
| 2582464e51 | |||
| 71625ad458 | |||
| a61b730238 | |||
| e0c1fb5f76 | |||
| addcd16d8f | |||
| eb2f1f81ed | |||
| 7e698726e4 | |||
| 9d73b5f510 | |||
| 6116049225 | |||
| a71e690b5e | |||
| 3165b22a97 | |||
| eb90882b2d | |||
| ca6d2fe76b | |||
| 2ac9338f87 | |||
| 0e9e0a01db | |||
| 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 | |||
| e309c51430 | |||
| b8804ccc17 | |||
| 639bf3ee8f | |||
| 4a3141accf | |||
| def87eae19 | |||
| e3fc405393 | |||
| b82b4a640d | |||
| 5855c4905e | |||
| 0ba3236ce0 | |||
| 8f3273bf07 | |||
| 00c30681bc | |||
| 5f9e295adf | |||
| a877ecdcf0 | |||
| f620f1ce57 | |||
| 8a5b6ced1a | |||
| d2da219ec0 | |||
| 9275adff81 | |||
| 26fb7603c0 | |||
| 07658aeb74 | |||
| 78915e016c | |||
| 8d135e8ea1 | |||
| 6dde56faf4 | |||
| 3ec3c59197 | |||
| 9bbcebd6b0 | |||
| 8408499c94 | |||
| 9df6e51a5b | |||
| abe16352d6 | |||
| ef478840af | |||
| 52797a55e2 | |||
| 7a7dae3627 | |||
| e794622776 | |||
| 2dafc9a853 | |||
| 91e312958b | |||
| 31723effe7 | |||
| 57e26bde9f | |||
| 3ec43a11ed | |||
| 1313d8a570 | |||
| bae8a88c53 | |||
| fe91d1ca57 | |||
| 962754141a | |||
| 03f122ca88 | |||
| c05ebdffd8 | |||
| 0fecbdde6e | |||
| 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
|
||||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
-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.
|
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
+4
-4
@@ -19,12 +19,12 @@ file(GLOB lib_ext_hdrs jasper/*.h)
|
|||||||
|
|
||||||
add_library(${JASPER_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs})
|
add_library(${JASPER_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs})
|
||||||
|
|
||||||
if(MSVC)
|
if(WIN32 AND NOT MINGW)
|
||||||
add_definitions(-DJAS_WIN_MSVC_BUILD)
|
add_definitions(-DJAS_WIN_MSVC_BUILD)
|
||||||
endif()
|
endif(WIN32 AND NOT MINGW)
|
||||||
|
|
||||||
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 -Wno-implicit-function-declaration -Wno-uninitialized -Wmissing-prototypes -Wmissing-declarations -Wunused -Wshadow -Wsign-compare)
|
||||||
/wd4013 /wd4018 /wd4715 /wd4244 /wd4101 /wd4267)
|
ocv_warnings_disable(CMAKE_C_FLAGS /wd4013 /wd4018 /wd4101 /wd4244 /wd4267 /wd4715) # vs2005
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
|
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
|
||||||
|
|||||||
Vendored
+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
|
||||||
|
|
||||||
Vendored
+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.
|
||||||
|
|
||||||
Vendored
+5
-6
@@ -704,8 +704,7 @@ static int jas_cmpxformseq_resize(jas_cmpxformseq_t *pxformseq, int n)
|
|||||||
{
|
{
|
||||||
jas_cmpxform_t **p;
|
jas_cmpxform_t **p;
|
||||||
assert(n >= pxformseq->numpxforms);
|
assert(n >= pxformseq->numpxforms);
|
||||||
p = (!pxformseq->pxforms) ? jas_malloc(n * sizeof(jas_cmpxform_t *)) :
|
p = jas_realloc2(pxformseq->pxforms, n, sizeof(jas_cmpxform_t *));
|
||||||
jas_realloc(pxformseq->pxforms, n * sizeof(jas_cmpxform_t *));
|
|
||||||
if (!p) {
|
if (!p) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -889,13 +888,13 @@ static int jas_cmshapmatlut_set(jas_cmshapmatlut_t *lut, jas_icccurv_t *curv)
|
|||||||
jas_cmshapmatlut_cleanup(lut);
|
jas_cmshapmatlut_cleanup(lut);
|
||||||
if (curv->numents == 0) {
|
if (curv->numents == 0) {
|
||||||
lut->size = 2;
|
lut->size = 2;
|
||||||
if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))
|
if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t))))
|
||||||
goto error;
|
goto error;
|
||||||
lut->data[0] = 0.0;
|
lut->data[0] = 0.0;
|
||||||
lut->data[1] = 1.0;
|
lut->data[1] = 1.0;
|
||||||
} else if (curv->numents == 1) {
|
} else if (curv->numents == 1) {
|
||||||
lut->size = 256;
|
lut->size = 256;
|
||||||
if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))
|
if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t))))
|
||||||
goto error;
|
goto error;
|
||||||
gamma = curv->ents[0] / 256.0;
|
gamma = curv->ents[0] / 256.0;
|
||||||
for (i = 0; i < lut->size; ++i) {
|
for (i = 0; i < lut->size; ++i) {
|
||||||
@@ -903,7 +902,7 @@ static int jas_cmshapmatlut_set(jas_cmshapmatlut_t *lut, jas_icccurv_t *curv)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
lut->size = curv->numents;
|
lut->size = curv->numents;
|
||||||
if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))
|
if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t))))
|
||||||
goto error;
|
goto error;
|
||||||
for (i = 0; i < lut->size; ++i) {
|
for (i = 0; i < lut->size; ++i) {
|
||||||
lut->data[i] = curv->ents[i] / 65535.0;
|
lut->data[i] = curv->ents[i] / 65535.0;
|
||||||
@@ -953,7 +952,7 @@ static int jas_cmshapmatlut_invert(jas_cmshapmatlut_t *invlut,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(invlut->data = jas_malloc(n * sizeof(jas_cmreal_t))))
|
if (!(invlut->data = jas_alloc2(n, sizeof(jas_cmreal_t))))
|
||||||
return -1;
|
return -1;
|
||||||
invlut->size = n;
|
invlut->size = n;
|
||||||
for (i = 0; i < invlut->size; ++i) {
|
for (i = 0; i < invlut->size; ++i) {
|
||||||
|
|||||||
Vendored
+19
-20
@@ -373,7 +373,7 @@ int jas_iccprof_save(jas_iccprof_t *prof, jas_stream_t *out)
|
|||||||
jas_icctagtab_t *tagtab;
|
jas_icctagtab_t *tagtab;
|
||||||
|
|
||||||
tagtab = &prof->tagtab;
|
tagtab = &prof->tagtab;
|
||||||
if (!(tagtab->ents = jas_malloc(prof->attrtab->numattrs *
|
if (!(tagtab->ents = jas_alloc2(prof->attrtab->numattrs,
|
||||||
sizeof(jas_icctagtabent_t))))
|
sizeof(jas_icctagtabent_t))))
|
||||||
goto error;
|
goto error;
|
||||||
tagtab->numents = prof->attrtab->numattrs;
|
tagtab->numents = prof->attrtab->numattrs;
|
||||||
@@ -522,7 +522,7 @@ static int jas_iccprof_gettagtab(jas_stream_t *in, jas_icctagtab_t *tagtab)
|
|||||||
}
|
}
|
||||||
if (jas_iccgetuint32(in, &tagtab->numents))
|
if (jas_iccgetuint32(in, &tagtab->numents))
|
||||||
goto error;
|
goto error;
|
||||||
if (!(tagtab->ents = jas_malloc(tagtab->numents *
|
if (!(tagtab->ents = jas_alloc2(tagtab->numents,
|
||||||
sizeof(jas_icctagtabent_t))))
|
sizeof(jas_icctagtabent_t))))
|
||||||
goto error;
|
goto error;
|
||||||
tagtabent = tagtab->ents;
|
tagtabent = tagtab->ents;
|
||||||
@@ -743,8 +743,7 @@ static int jas_iccattrtab_resize(jas_iccattrtab_t *tab, int maxents)
|
|||||||
{
|
{
|
||||||
jas_iccattr_t *newattrs;
|
jas_iccattr_t *newattrs;
|
||||||
assert(maxents >= tab->numattrs);
|
assert(maxents >= tab->numattrs);
|
||||||
newattrs = tab->attrs ? jas_realloc(tab->attrs, maxents *
|
newattrs = jas_realloc2(tab->attrs, maxents, sizeof(jas_iccattr_t));
|
||||||
sizeof(jas_iccattr_t)) : jas_malloc(maxents * sizeof(jas_iccattr_t));
|
|
||||||
if (!newattrs)
|
if (!newattrs)
|
||||||
return -1;
|
return -1;
|
||||||
tab->attrs = newattrs;
|
tab->attrs = newattrs;
|
||||||
@@ -999,7 +998,7 @@ static int jas_icccurv_input(jas_iccattrval_t *attrval, jas_stream_t *in,
|
|||||||
|
|
||||||
if (jas_iccgetuint32(in, &curv->numents))
|
if (jas_iccgetuint32(in, &curv->numents))
|
||||||
goto error;
|
goto error;
|
||||||
if (!(curv->ents = jas_malloc(curv->numents * sizeof(jas_iccuint16_t))))
|
if (!(curv->ents = jas_alloc2(curv->numents, sizeof(jas_iccuint16_t))))
|
||||||
goto error;
|
goto error;
|
||||||
for (i = 0; i < curv->numents; ++i) {
|
for (i = 0; i < curv->numents; ++i) {
|
||||||
if (jas_iccgetuint16(in, &curv->ents[i]))
|
if (jas_iccgetuint16(in, &curv->ents[i]))
|
||||||
@@ -1100,7 +1099,7 @@ static int jas_icctxtdesc_input(jas_iccattrval_t *attrval, jas_stream_t *in,
|
|||||||
if (jas_iccgetuint32(in, &txtdesc->uclangcode) ||
|
if (jas_iccgetuint32(in, &txtdesc->uclangcode) ||
|
||||||
jas_iccgetuint32(in, &txtdesc->uclen))
|
jas_iccgetuint32(in, &txtdesc->uclen))
|
||||||
goto error;
|
goto error;
|
||||||
if (!(txtdesc->ucdata = jas_malloc(txtdesc->uclen * 2)))
|
if (!(txtdesc->ucdata = jas_alloc2(txtdesc->uclen, 2)))
|
||||||
goto error;
|
goto error;
|
||||||
if (jas_stream_read(in, txtdesc->ucdata, txtdesc->uclen * 2) !=
|
if (jas_stream_read(in, txtdesc->ucdata, txtdesc->uclen * 2) !=
|
||||||
JAS_CAST(int, txtdesc->uclen * 2))
|
JAS_CAST(int, txtdesc->uclen * 2))
|
||||||
@@ -1292,17 +1291,17 @@ static int jas_icclut8_input(jas_iccattrval_t *attrval, jas_stream_t *in,
|
|||||||
jas_iccgetuint16(in, &lut8->numouttabents))
|
jas_iccgetuint16(in, &lut8->numouttabents))
|
||||||
goto error;
|
goto error;
|
||||||
clutsize = jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans;
|
clutsize = jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans;
|
||||||
if (!(lut8->clut = jas_malloc(clutsize * sizeof(jas_iccuint8_t))) ||
|
if (!(lut8->clut = jas_alloc2(clutsize, sizeof(jas_iccuint8_t))) ||
|
||||||
!(lut8->intabsbuf = jas_malloc(lut8->numinchans *
|
!(lut8->intabsbuf = jas_alloc3(lut8->numinchans,
|
||||||
lut8->numintabents * sizeof(jas_iccuint8_t))) ||
|
lut8->numintabents, sizeof(jas_iccuint8_t))) ||
|
||||||
!(lut8->intabs = jas_malloc(lut8->numinchans *
|
!(lut8->intabs = jas_alloc2(lut8->numinchans,
|
||||||
sizeof(jas_iccuint8_t *))))
|
sizeof(jas_iccuint8_t *))))
|
||||||
goto error;
|
goto error;
|
||||||
for (i = 0; i < lut8->numinchans; ++i)
|
for (i = 0; i < lut8->numinchans; ++i)
|
||||||
lut8->intabs[i] = &lut8->intabsbuf[i * lut8->numintabents];
|
lut8->intabs[i] = &lut8->intabsbuf[i * lut8->numintabents];
|
||||||
if (!(lut8->outtabsbuf = jas_malloc(lut8->numoutchans *
|
if (!(lut8->outtabsbuf = jas_alloc3(lut8->numoutchans,
|
||||||
lut8->numouttabents * sizeof(jas_iccuint8_t))) ||
|
lut8->numouttabents, sizeof(jas_iccuint8_t))) ||
|
||||||
!(lut8->outtabs = jas_malloc(lut8->numoutchans *
|
!(lut8->outtabs = jas_alloc2(lut8->numoutchans,
|
||||||
sizeof(jas_iccuint8_t *))))
|
sizeof(jas_iccuint8_t *))))
|
||||||
goto error;
|
goto error;
|
||||||
for (i = 0; i < lut8->numoutchans; ++i)
|
for (i = 0; i < lut8->numoutchans; ++i)
|
||||||
@@ -1461,17 +1460,17 @@ static int jas_icclut16_input(jas_iccattrval_t *attrval, jas_stream_t *in,
|
|||||||
jas_iccgetuint16(in, &lut16->numouttabents))
|
jas_iccgetuint16(in, &lut16->numouttabents))
|
||||||
goto error;
|
goto error;
|
||||||
clutsize = jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans;
|
clutsize = jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans;
|
||||||
if (!(lut16->clut = jas_malloc(clutsize * sizeof(jas_iccuint16_t))) ||
|
if (!(lut16->clut = jas_alloc2(clutsize, sizeof(jas_iccuint16_t))) ||
|
||||||
!(lut16->intabsbuf = jas_malloc(lut16->numinchans *
|
!(lut16->intabsbuf = jas_alloc3(lut16->numinchans,
|
||||||
lut16->numintabents * sizeof(jas_iccuint16_t))) ||
|
lut16->numintabents, sizeof(jas_iccuint16_t))) ||
|
||||||
!(lut16->intabs = jas_malloc(lut16->numinchans *
|
!(lut16->intabs = jas_alloc2(lut16->numinchans,
|
||||||
sizeof(jas_iccuint16_t *))))
|
sizeof(jas_iccuint16_t *))))
|
||||||
goto error;
|
goto error;
|
||||||
for (i = 0; i < lut16->numinchans; ++i)
|
for (i = 0; i < lut16->numinchans; ++i)
|
||||||
lut16->intabs[i] = &lut16->intabsbuf[i * lut16->numintabents];
|
lut16->intabs[i] = &lut16->intabsbuf[i * lut16->numintabents];
|
||||||
if (!(lut16->outtabsbuf = jas_malloc(lut16->numoutchans *
|
if (!(lut16->outtabsbuf = jas_alloc3(lut16->numoutchans,
|
||||||
lut16->numouttabents * sizeof(jas_iccuint16_t))) ||
|
lut16->numouttabents, sizeof(jas_iccuint16_t))) ||
|
||||||
!(lut16->outtabs = jas_malloc(lut16->numoutchans *
|
!(lut16->outtabs = jas_alloc2(lut16->numoutchans,
|
||||||
sizeof(jas_iccuint16_t *))))
|
sizeof(jas_iccuint16_t *))))
|
||||||
goto error;
|
goto error;
|
||||||
for (i = 0; i < lut16->numoutchans; ++i)
|
for (i = 0; i < lut16->numoutchans; ++i)
|
||||||
|
|||||||
Vendored
+2
-3
@@ -142,7 +142,7 @@ jas_image_t *jas_image_create(int numcmpts, jas_image_cmptparm_t *cmptparms,
|
|||||||
image->inmem_ = true;
|
image->inmem_ = true;
|
||||||
|
|
||||||
/* Allocate memory for the per-component information. */
|
/* Allocate memory for the per-component information. */
|
||||||
if (!(image->cmpts_ = jas_malloc(image->maxcmpts_ *
|
if (!(image->cmpts_ = jas_alloc2(image->maxcmpts_,
|
||||||
sizeof(jas_image_cmpt_t *)))) {
|
sizeof(jas_image_cmpt_t *)))) {
|
||||||
jas_image_destroy(image);
|
jas_image_destroy(image);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -774,8 +774,7 @@ static int jas_image_growcmpts(jas_image_t *image, int maxcmpts)
|
|||||||
jas_image_cmpt_t **newcmpts;
|
jas_image_cmpt_t **newcmpts;
|
||||||
int cmptno;
|
int cmptno;
|
||||||
|
|
||||||
newcmpts = (!image->cmpts_) ? jas_malloc(maxcmpts * sizeof(jas_image_cmpt_t *)) :
|
newcmpts = jas_realloc2(image->cmpts_, maxcmpts, sizeof(jas_image_cmpt_t *));
|
||||||
jas_realloc(image->cmpts_, maxcmpts * sizeof(jas_image_cmpt_t *));
|
|
||||||
if (!newcmpts) {
|
if (!newcmpts) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+44
-7
@@ -76,6 +76,11 @@
|
|||||||
|
|
||||||
/* We need the prototype for memset. */
|
/* We need the prototype for memset. */
|
||||||
#include <string.h>
|
#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"
|
#include "jasper/jas_malloc.h"
|
||||||
|
|
||||||
@@ -113,18 +118,50 @@ void jas_free(void *ptr)
|
|||||||
|
|
||||||
void *jas_realloc(void *ptr, size_t size)
|
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 *jas_calloc(size_t nmemb, size_t size)
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
size_t n;
|
|
||||||
n = nmemb * size;
|
ptr = jas_alloc2(nmemb, size);
|
||||||
if (!(ptr = jas_malloc(n * sizeof(char)))) {
|
if (ptr)
|
||||||
return 0;
|
memset(ptr, 0, nmemb*size);
|
||||||
}
|
|
||||||
memset(ptr, 0, n);
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+3
-3
@@ -114,7 +114,7 @@ jas_matrix_t *jas_matrix_create(int numrows, int numcols)
|
|||||||
matrix->datasize_ = numrows * numcols;
|
matrix->datasize_ = numrows * numcols;
|
||||||
|
|
||||||
if (matrix->maxrows_ > 0) {
|
if (matrix->maxrows_ > 0) {
|
||||||
if (!(matrix->rows_ = jas_malloc(matrix->maxrows_ *
|
if (!(matrix->rows_ = jas_alloc2(matrix->maxrows_,
|
||||||
sizeof(jas_seqent_t *)))) {
|
sizeof(jas_seqent_t *)))) {
|
||||||
jas_matrix_destroy(matrix);
|
jas_matrix_destroy(matrix);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -122,7 +122,7 @@ jas_matrix_t *jas_matrix_create(int numrows, int numcols)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (matrix->datasize_ > 0) {
|
if (matrix->datasize_ > 0) {
|
||||||
if (!(matrix->data_ = jas_malloc(matrix->datasize_ *
|
if (!(matrix->data_ = jas_alloc2(matrix->datasize_,
|
||||||
sizeof(jas_seqent_t)))) {
|
sizeof(jas_seqent_t)))) {
|
||||||
jas_matrix_destroy(matrix);
|
jas_matrix_destroy(matrix);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -220,7 +220,7 @@ void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0, int c0,
|
|||||||
mat0->numrows_ = r1 - r0 + 1;
|
mat0->numrows_ = r1 - r0 + 1;
|
||||||
mat0->numcols_ = c1 - c0 + 1;
|
mat0->numcols_ = c1 - c0 + 1;
|
||||||
mat0->maxrows_ = mat0->numrows_;
|
mat0->maxrows_ = mat0->numrows_;
|
||||||
mat0->rows_ = jas_malloc(mat0->maxrows_ * sizeof(jas_seqent_t *));
|
mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *));
|
||||||
for (i = 0; i < mat0->numrows_; ++i) {
|
for (i = 0; i < mat0->numrows_; ++i) {
|
||||||
mat0->rows_[i] = mat1->rows_[r0 + i] + c0;
|
mat0->rows_[i] = mat1->rows_[r0 + i] + c0;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+16
-10
@@ -212,7 +212,7 @@ jas_stream_t *jas_stream_memopen(char *buf, int bufsize)
|
|||||||
if (buf) {
|
if (buf) {
|
||||||
obj->buf_ = (unsigned char *) buf;
|
obj->buf_ = (unsigned char *) buf;
|
||||||
} else {
|
} else {
|
||||||
obj->buf_ = jas_malloc(obj->bufsize_ * sizeof(char));
|
obj->buf_ = jas_malloc(obj->bufsize_);
|
||||||
obj->myalloc_ = 1;
|
obj->myalloc_ = 1;
|
||||||
}
|
}
|
||||||
if (!obj->buf_) {
|
if (!obj->buf_) {
|
||||||
@@ -361,9 +361,9 @@ jas_stream_t *jas_stream_tmpfile()
|
|||||||
}
|
}
|
||||||
obj->fd = -1;
|
obj->fd = -1;
|
||||||
obj->flags = 0;
|
obj->flags = 0;
|
||||||
obj->pathname[0] = '\0';
|
|
||||||
stream->obj_ = obj;
|
stream->obj_ = obj;
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
/* Choose a file name. */
|
/* Choose a file name. */
|
||||||
tmpnam(obj->pathname);
|
tmpnam(obj->pathname);
|
||||||
|
|
||||||
@@ -373,16 +373,22 @@ jas_stream_t *jas_stream_tmpfile()
|
|||||||
jas_stream_destroy(stream);
|
jas_stream_destroy(stream);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/* Choose a file name. */
|
||||||
|
snprintf(obj->pathname, L_tmpnam, "%s/tmp.XXXXXXXXXX", P_tmpdir);
|
||||||
|
|
||||||
|
/* Open the underlying file. */
|
||||||
|
if ((obj->fd = mkstemp(obj->pathname)) < 0) {
|
||||||
|
jas_stream_destroy(stream);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Unlink the file so that it will disappear if the program
|
/* Unlink the file so that it will disappear if the program
|
||||||
terminates abnormally. */
|
terminates abnormally. */
|
||||||
/* Under UNIX, one can unlink an open file and continue to do I/O
|
|
||||||
on it. Not all operating systems support this functionality, however.
|
|
||||||
For example, under Microsoft Windows the unlink operation will fail,
|
|
||||||
since the file is open. */
|
|
||||||
if (unlink(obj->pathname)) {
|
if (unlink(obj->pathname)) {
|
||||||
/* We will try unlinking the file again after it is closed. */
|
jas_stream_destroy(stream);
|
||||||
obj->flags |= JAS_STREAM_FILEOBJ_DELONCLOSE;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Use full buffering. */
|
/* Use full buffering. */
|
||||||
@@ -553,7 +559,7 @@ int jas_stream_printf(jas_stream_t *stream, const char *fmt, ...)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
ret = vsprintf(buf, fmt, ap);
|
ret = vsnprintf(buf, sizeof buf, fmt, ap);
|
||||||
jas_stream_puts(stream, buf);
|
jas_stream_puts(stream, buf);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return ret;
|
return ret;
|
||||||
@@ -992,7 +998,7 @@ static int mem_resize(jas_stream_memobj_t *m, int bufsize)
|
|||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
|
|
||||||
assert(m->buf_);
|
assert(m->buf_);
|
||||||
if (!(buf = jas_realloc(m->buf_, bufsize * sizeof(unsigned char)))) {
|
if (!(buf = jas_realloc(m->buf_, bufsize))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
m->buf_ = buf;
|
m->buf_ = buf;
|
||||||
|
|||||||
+9
@@ -95,6 +95,9 @@ extern "C" {
|
|||||||
#define jas_free MEMFREE
|
#define jas_free MEMFREE
|
||||||
#define jas_realloc MEMREALLOC
|
#define jas_realloc MEMREALLOC
|
||||||
#define jas_calloc MEMCALLOC
|
#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
|
#endif
|
||||||
|
|
||||||
/******************************************************************************\
|
/******************************************************************************\
|
||||||
@@ -115,6 +118,12 @@ void *jas_realloc(void *ptr, size_t size);
|
|||||||
/* Allocate a block of memory and initialize the contents to zero. */
|
/* Allocate a block of memory and initialize the contents to zero. */
|
||||||
void *jas_calloc(size_t nmemb, size_t size);
|
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
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
+6
-1
@@ -77,6 +77,7 @@
|
|||||||
#include <jasper/jas_config.h>
|
#include <jasper/jas_config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <limits.h>
|
||||||
#if defined(HAVE_FCNTL_H)
|
#if defined(HAVE_FCNTL_H)
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -251,7 +252,11 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
int fd;
|
int fd;
|
||||||
int flags;
|
int flags;
|
||||||
char pathname[L_tmpnam + 1];
|
#if defined _WIN32 && !defined __MINGW__ && !defined __MINGW32__
|
||||||
|
char pathname[MAX_PATH + 1];
|
||||||
|
#else
|
||||||
|
char pathname[PATH_MAX + 1];
|
||||||
|
#endif
|
||||||
} jas_stream_fileobj_t;
|
} jas_stream_fileobj_t;
|
||||||
|
|
||||||
#define JAS_STREAM_FILEOBJ_DELONCLOSE 0x01
|
#define JAS_STREAM_FILEOBJ_DELONCLOSE 0x01
|
||||||
|
|||||||
Vendored
+65
-7
@@ -5,6 +5,11 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Modified by Andrey Kiselev <dron@remotesensing.org> to handle UUID
|
||||||
|
* box properly.
|
||||||
|
*/
|
||||||
|
|
||||||
/* __START_OF_JASPER_LICENSE__
|
/* __START_OF_JASPER_LICENSE__
|
||||||
*
|
*
|
||||||
* JasPer License Version 2.0
|
* JasPer License Version 2.0
|
||||||
@@ -127,6 +132,9 @@ static void jp2_pclr_destroy(jp2_box_t *box);
|
|||||||
static int jp2_pclr_getdata(jp2_box_t *box, jas_stream_t *in);
|
static int jp2_pclr_getdata(jp2_box_t *box, jas_stream_t *in);
|
||||||
static int jp2_pclr_putdata(jp2_box_t *box, jas_stream_t *out);
|
static int jp2_pclr_putdata(jp2_box_t *box, jas_stream_t *out);
|
||||||
static void jp2_pclr_dumpdata(jp2_box_t *box, FILE *out);
|
static void jp2_pclr_dumpdata(jp2_box_t *box, FILE *out);
|
||||||
|
static void jp2_uuid_destroy(jp2_box_t *box);
|
||||||
|
static int jp2_uuid_getdata(jp2_box_t *box, jas_stream_t *in);
|
||||||
|
static int jp2_uuid_putdata(jp2_box_t *box, jas_stream_t *out);
|
||||||
|
|
||||||
/******************************************************************************\
|
/******************************************************************************\
|
||||||
* Local data.
|
* Local data.
|
||||||
@@ -164,7 +172,7 @@ jp2_boxinfo_t jp2_boxinfos[] = {
|
|||||||
{JP2_BOX_XML, "XML", 0,
|
{JP2_BOX_XML, "XML", 0,
|
||||||
{0, 0, 0, 0, 0}},
|
{0, 0, 0, 0, 0}},
|
||||||
{JP2_BOX_UUID, "UUID", 0,
|
{JP2_BOX_UUID, "UUID", 0,
|
||||||
{0, 0, 0, 0, 0}},
|
{0, jp2_uuid_destroy, jp2_uuid_getdata, jp2_uuid_putdata, 0}},
|
||||||
{JP2_BOX_UINF, "UINF", JP2_BOX_SUPER,
|
{JP2_BOX_UINF, "UINF", JP2_BOX_SUPER,
|
||||||
{0, 0, 0, 0, 0}},
|
{0, 0, 0, 0, 0}},
|
||||||
{JP2_BOX_ULST, "ULST", 0,
|
{JP2_BOX_ULST, "ULST", 0,
|
||||||
@@ -372,7 +380,7 @@ static int jp2_bpcc_getdata(jp2_box_t *box, jas_stream_t *in)
|
|||||||
jp2_bpcc_t *bpcc = &box->data.bpcc;
|
jp2_bpcc_t *bpcc = &box->data.bpcc;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
bpcc->numcmpts = box->datalen;
|
bpcc->numcmpts = box->datalen;
|
||||||
if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts * sizeof(uint_fast8_t)))) {
|
if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts, sizeof(uint_fast8_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < bpcc->numcmpts; ++i) {
|
for (i = 0; i < bpcc->numcmpts; ++i) {
|
||||||
@@ -416,7 +424,7 @@ static int jp2_colr_getdata(jp2_box_t *box, jas_stream_t *in)
|
|||||||
break;
|
break;
|
||||||
case JP2_COLR_ICC:
|
case JP2_COLR_ICC:
|
||||||
colr->iccplen = box->datalen - 3;
|
colr->iccplen = box->datalen - 3;
|
||||||
if (!(colr->iccp = jas_malloc(colr->iccplen * sizeof(uint_fast8_t)))) {
|
if (!(colr->iccp = jas_alloc2(colr->iccplen, sizeof(uint_fast8_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (jas_stream_read(in, colr->iccp, colr->iccplen) != colr->iccplen) {
|
if (jas_stream_read(in, colr->iccp, colr->iccplen) != colr->iccplen) {
|
||||||
@@ -453,7 +461,7 @@ static int jp2_cdef_getdata(jp2_box_t *box, jas_stream_t *in)
|
|||||||
if (jp2_getuint16(in, &cdef->numchans)) {
|
if (jp2_getuint16(in, &cdef->numchans)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!(cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t)))) {
|
if (!(cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (channo = 0; channo < cdef->numchans; ++channo) {
|
for (channo = 0; channo < cdef->numchans; ++channo) {
|
||||||
@@ -766,7 +774,7 @@ static int jp2_cmap_getdata(jp2_box_t *box, jas_stream_t *in)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
cmap->numchans = (box->datalen) / 4;
|
cmap->numchans = (box->datalen) / 4;
|
||||||
if (!(cmap->ents = jas_malloc(cmap->numchans * sizeof(jp2_cmapent_t)))) {
|
if (!(cmap->ents = jas_alloc2(cmap->numchans, sizeof(jp2_cmapent_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < cmap->numchans; ++i) {
|
for (i = 0; i < cmap->numchans; ++i) {
|
||||||
@@ -828,10 +836,10 @@ static int jp2_pclr_getdata(jp2_box_t *box, jas_stream_t *in)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
lutsize = pclr->numlutents * pclr->numchans;
|
lutsize = pclr->numlutents * pclr->numchans;
|
||||||
if (!(pclr->lutdata = jas_malloc(lutsize * sizeof(int_fast32_t)))) {
|
if (!(pclr->lutdata = jas_alloc2(lutsize, sizeof(int_fast32_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!(pclr->bpc = jas_malloc(pclr->numchans * sizeof(uint_fast8_t)))) {
|
if (!(pclr->bpc = jas_alloc2(pclr->numchans, sizeof(uint_fast8_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < pclr->numchans; ++i) {
|
for (i = 0; i < pclr->numchans; ++i) {
|
||||||
@@ -876,6 +884,56 @@ static void jp2_pclr_dumpdata(jp2_box_t *box, FILE *out)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void jp2_uuid_destroy(jp2_box_t *box)
|
||||||
|
{
|
||||||
|
jp2_uuid_t *uuid = &box->data.uuid;
|
||||||
|
if (uuid->data)
|
||||||
|
{
|
||||||
|
jas_free(uuid->data);
|
||||||
|
uuid->data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int jp2_uuid_getdata(jp2_box_t *box, jas_stream_t *in)
|
||||||
|
{
|
||||||
|
jp2_uuid_t *uuid = &box->data.uuid;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < 16; i++)
|
||||||
|
{
|
||||||
|
if (jp2_getuint8(in, &uuid->uuid[i]))
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
uuid->datalen = box->datalen - 16;
|
||||||
|
uuid->data = jas_malloc(uuid->datalen * sizeof(uint_fast8_t));
|
||||||
|
for (i = 0; i < uuid->datalen; i++)
|
||||||
|
{
|
||||||
|
if (jp2_getuint8(in, &uuid->data[i]))
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int jp2_uuid_putdata(jp2_box_t *box, jas_stream_t *out)
|
||||||
|
{
|
||||||
|
jp2_uuid_t *uuid = &box->data.uuid;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < 16; i++)
|
||||||
|
{
|
||||||
|
if (jp2_putuint8(out, uuid->uuid[i]))
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < uuid->datalen; i++)
|
||||||
|
{
|
||||||
|
if (jp2_putuint8(out, uuid->data[i]))
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int jp2_getint(jas_stream_t *in, int s, int n, int_fast32_t *val)
|
static int jp2_getint(jas_stream_t *in, int s, int n, int_fast32_t *val)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|||||||
Vendored
+12
@@ -5,6 +5,11 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Modified by Andrey Kiselev <dron@remotesensing.org> to handle UUID
|
||||||
|
* box properly.
|
||||||
|
*/
|
||||||
|
|
||||||
/* __START_OF_JASPER_LICENSE__
|
/* __START_OF_JASPER_LICENSE__
|
||||||
*
|
*
|
||||||
* JasPer License Version 2.0
|
* JasPer License Version 2.0
|
||||||
@@ -229,6 +234,12 @@ typedef struct {
|
|||||||
jp2_cmapent_t *ents;
|
jp2_cmapent_t *ents;
|
||||||
} jp2_cmap_t;
|
} 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_DIRECT 0
|
||||||
#define JP2_CMAP_PALETTE 1
|
#define JP2_CMAP_PALETTE 1
|
||||||
|
|
||||||
@@ -257,6 +268,7 @@ typedef struct {
|
|||||||
jp2_pclr_t pclr;
|
jp2_pclr_t pclr;
|
||||||
jp2_cdef_t cdef;
|
jp2_cdef_t cdef;
|
||||||
jp2_cmap_t cmap;
|
jp2_cmap_t cmap;
|
||||||
|
jp2_uuid_t uuid;
|
||||||
} data;
|
} data;
|
||||||
|
|
||||||
} jp2_box_t;
|
} jp2_box_t;
|
||||||
|
|||||||
Vendored
+2
-2
@@ -336,7 +336,7 @@ jas_image_t *jp2_decode(jas_stream_t *in, char *optstr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate space for the channel-number to component-number LUT. */
|
/* Allocate space for the channel-number to component-number LUT. */
|
||||||
if (!(dec->chantocmptlut = jas_malloc(dec->numchans * sizeof(uint_fast16_t)))) {
|
if (!(dec->chantocmptlut = jas_alloc2(dec->numchans, sizeof(uint_fast16_t)))) {
|
||||||
jas_eprintf("error: no memory\n");
|
jas_eprintf("error: no memory\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@@ -354,7 +354,7 @@ jas_image_t *jp2_decode(jas_stream_t *in, char *optstr)
|
|||||||
if (cmapent->map == JP2_CMAP_DIRECT) {
|
if (cmapent->map == JP2_CMAP_DIRECT) {
|
||||||
dec->chantocmptlut[channo] = channo;
|
dec->chantocmptlut[channo] = channo;
|
||||||
} else if (cmapent->map == JP2_CMAP_PALETTE) {
|
} else if (cmapent->map == JP2_CMAP_PALETTE) {
|
||||||
lutents = jas_malloc(pclrd->numlutents * sizeof(int_fast32_t));
|
lutents = jas_alloc2(pclrd->numlutents, sizeof(int_fast32_t));
|
||||||
for (i = 0; i < pclrd->numlutents; ++i) {
|
for (i = 0; i < pclrd->numlutents; ++i) {
|
||||||
lutents[i] = pclrd->lutdata[cmapent->pcol + i * pclrd->numchans];
|
lutents[i] = pclrd->lutdata[cmapent->pcol + i * pclrd->numchans];
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+53
-8
@@ -5,6 +5,11 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Modified by Andrey Kiselev <dron@remotesensing.org> to handle UUID
|
||||||
|
* box properly.
|
||||||
|
*/
|
||||||
|
|
||||||
/* __START_OF_JASPER_LICENSE__
|
/* __START_OF_JASPER_LICENSE__
|
||||||
*
|
*
|
||||||
* JasPer License Version 2.0
|
* JasPer License Version 2.0
|
||||||
@@ -86,7 +91,7 @@ static int clrspctojp2(jas_clrspc_t clrspc);
|
|||||||
* Functions.
|
* 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_box_t *box;
|
||||||
jp2_ftyp_t *ftyp;
|
jp2_ftyp_t *ftyp;
|
||||||
@@ -97,8 +102,6 @@ int jp2_encode(jas_image_t *image, jas_stream_t *out, char *optstr)
|
|||||||
long len;
|
long len;
|
||||||
uint_fast16_t cmptno;
|
uint_fast16_t cmptno;
|
||||||
jp2_colr_t *colr;
|
jp2_colr_t *colr;
|
||||||
char buf[4096];
|
|
||||||
uint_fast32_t overhead;
|
|
||||||
jp2_cdefchan_t *cdefchanent;
|
jp2_cdefchan_t *cdefchanent;
|
||||||
jp2_cdef_t *cdef;
|
jp2_cdef_t *cdef;
|
||||||
int i;
|
int i;
|
||||||
@@ -191,7 +194,7 @@ int sgnd;
|
|||||||
}
|
}
|
||||||
bpcc = &box->data.bpcc;
|
bpcc = &box->data.bpcc;
|
||||||
bpcc->numcmpts = jas_image_numcmpts(image);
|
bpcc->numcmpts = jas_image_numcmpts(image);
|
||||||
if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts *
|
if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts,
|
||||||
sizeof(uint_fast8_t)))) {
|
sizeof(uint_fast8_t)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@@ -285,7 +288,7 @@ int sgnd;
|
|||||||
}
|
}
|
||||||
cdef = &box->data.cdef;
|
cdef = &box->data.cdef;
|
||||||
cdef->numchans = jas_image_numcmpts(image);
|
cdef->numchans = jas_image_numcmpts(image);
|
||||||
cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t));
|
cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t));
|
||||||
for (i = 0; i < jas_image_numcmpts(image); ++i) {
|
for (i = 0; i < jas_image_numcmpts(image); ++i) {
|
||||||
cdefchanent = &cdef->ents[i];
|
cdefchanent = &cdef->ents[i];
|
||||||
cdefchanent->channo = i;
|
cdefchanent->channo = i;
|
||||||
@@ -326,6 +329,26 @@ int sgnd;
|
|||||||
jas_stream_close(tmpstream);
|
jas_stream_close(tmpstream);
|
||||||
tmpstream = 0;
|
tmpstream = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
abort();
|
||||||
|
|
||||||
|
error:
|
||||||
|
|
||||||
|
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.
|
* Output the contiguous code stream box.
|
||||||
*/
|
*/
|
||||||
@@ -358,12 +381,34 @@ error:
|
|||||||
if (box) {
|
if (box) {
|
||||||
jp2_box_destroy(box);
|
jp2_box_destroy(box);
|
||||||
}
|
}
|
||||||
if (tmpstream) {
|
|
||||||
jas_stream_close(tmpstream);
|
|
||||||
}
|
|
||||||
return -1;
|
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)
|
static uint_fast32_t jp2_gettypeasoc(int colorspace, int ctype)
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
|
|||||||
Vendored
+14
-7
@@ -501,7 +501,7 @@ static int jpc_siz_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate,
|
|||||||
!siz->tileheight || !siz->numcomps) {
|
!siz->tileheight || !siz->numcomps) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!(siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t)))) {
|
if (!(siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < siz->numcomps; ++i) {
|
for (i = 0; i < siz->numcomps; ++i) {
|
||||||
@@ -743,6 +743,10 @@ static int jpc_cox_getcompparms(jpc_ms_t *ms, jpc_cstate_t *cstate,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
compparms->numrlvls = compparms->numdlvls + 1;
|
compparms->numrlvls = compparms->numdlvls + 1;
|
||||||
|
if (compparms->numrlvls > JPC_MAXRLVLS) {
|
||||||
|
jpc_cox_destroycompparms(compparms);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
if (prtflag) {
|
if (prtflag) {
|
||||||
for (i = 0; i < compparms->numrlvls; ++i) {
|
for (i = 0; i < compparms->numrlvls; ++i) {
|
||||||
if (jpc_getuint8(in, &tmp)) {
|
if (jpc_getuint8(in, &tmp)) {
|
||||||
@@ -981,7 +985,10 @@ static int jpc_qcx_getcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate,
|
|||||||
compparms->numstepsizes = (len - n) / 2;
|
compparms->numstepsizes = (len - n) / 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (compparms->numstepsizes > 0) {
|
if (compparms->numstepsizes > 3 * JPC_MAXRLVLS + 1) {
|
||||||
|
jpc_qcx_destroycompparms(compparms);
|
||||||
|
return -1;
|
||||||
|
} else if (compparms->numstepsizes > 0) {
|
||||||
compparms->stepsizes = jas_malloc(compparms->numstepsizes *
|
compparms->stepsizes = jas_malloc(compparms->numstepsizes *
|
||||||
sizeof(uint_fast16_t));
|
sizeof(uint_fast16_t));
|
||||||
assert(compparms->stepsizes);
|
assert(compparms->stepsizes);
|
||||||
@@ -1090,7 +1097,7 @@ static int jpc_ppm_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in
|
|||||||
|
|
||||||
ppm->len = ms->len - 1;
|
ppm->len = ms->len - 1;
|
||||||
if (ppm->len > 0) {
|
if (ppm->len > 0) {
|
||||||
if (!(ppm->data = jas_malloc(ppm->len * sizeof(unsigned char)))) {
|
if (!(ppm->data = jas_malloc(ppm->len))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (JAS_CAST(uint, jas_stream_read(in, ppm->data, ppm->len)) != ppm->len) {
|
if (JAS_CAST(uint, jas_stream_read(in, ppm->data, ppm->len)) != ppm->len) {
|
||||||
@@ -1159,7 +1166,7 @@ static int jpc_ppt_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in
|
|||||||
}
|
}
|
||||||
ppt->len = ms->len - 1;
|
ppt->len = ms->len - 1;
|
||||||
if (ppt->len > 0) {
|
if (ppt->len > 0) {
|
||||||
if (!(ppt->data = jas_malloc(ppt->len * sizeof(unsigned char)))) {
|
if (!(ppt->data = jas_malloc(ppt->len))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (jas_stream_read(in, (char *) ppt->data, ppt->len) != JAS_CAST(int, ppt->len)) {
|
if (jas_stream_read(in, (char *) ppt->data, ppt->len) != JAS_CAST(int, ppt->len)) {
|
||||||
@@ -1222,7 +1229,7 @@ static int jpc_poc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in
|
|||||||
uint_fast8_t tmp;
|
uint_fast8_t tmp;
|
||||||
poc->numpchgs = (cstate->numcomps > 256) ? (ms->len / 9) :
|
poc->numpchgs = (cstate->numcomps > 256) ? (ms->len / 9) :
|
||||||
(ms->len / 7);
|
(ms->len / 7);
|
||||||
if (!(poc->pchgs = jas_malloc(poc->numpchgs * sizeof(jpc_pocpchg_t)))) {
|
if (!(poc->pchgs = jas_alloc2(poc->numpchgs, sizeof(jpc_pocpchg_t)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno,
|
for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno,
|
||||||
@@ -1327,7 +1334,7 @@ static int jpc_crg_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in
|
|||||||
jpc_crgcomp_t *comp;
|
jpc_crgcomp_t *comp;
|
||||||
uint_fast16_t compno;
|
uint_fast16_t compno;
|
||||||
crg->numcomps = cstate->numcomps;
|
crg->numcomps = cstate->numcomps;
|
||||||
if (!(crg->comps = jas_malloc(cstate->numcomps * sizeof(uint_fast16_t)))) {
|
if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(jpc_crgcomp_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (compno = 0, comp = crg->comps; compno < cstate->numcomps;
|
for (compno = 0, comp = crg->comps; compno < cstate->numcomps;
|
||||||
@@ -1466,7 +1473,7 @@ static int jpc_unk_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in
|
|||||||
cstate = 0;
|
cstate = 0;
|
||||||
|
|
||||||
if (ms->len > 0) {
|
if (ms->len > 0) {
|
||||||
if (!(unk->data = jas_malloc(ms->len * sizeof(unsigned char)))) {
|
if (!(unk->data = jas_malloc(ms->len))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (jas_stream_read(in, (char *) unk->data, ms->len) != JAS_CAST(int, ms->len)) {
|
if (jas_stream_read(in, (char *) unk->data, ms->len) != JAS_CAST(int, ms->len)) {
|
||||||
|
|||||||
Vendored
+15
-16
@@ -449,7 +449,7 @@ static int jpc_dec_process_sot(jpc_dec_t *dec, jpc_ms_t *ms)
|
|||||||
|
|
||||||
if (dec->state == JPC_MH) {
|
if (dec->state == JPC_MH) {
|
||||||
|
|
||||||
compinfos = jas_malloc(dec->numcomps * sizeof(jas_image_cmptparm_t));
|
compinfos = jas_alloc2(dec->numcomps, sizeof(jas_image_cmptparm_t));
|
||||||
assert(compinfos);
|
assert(compinfos);
|
||||||
for (cmptno = 0, cmpt = dec->cmpts, compinfo = compinfos;
|
for (cmptno = 0, cmpt = dec->cmpts, compinfo = compinfos;
|
||||||
cmptno < dec->numcomps; ++cmptno, ++cmpt, ++compinfo) {
|
cmptno < dec->numcomps; ++cmptno, ++cmpt, ++compinfo) {
|
||||||
@@ -692,7 +692,7 @@ static int jpc_dec_tileinit(jpc_dec_t *dec, jpc_dec_tile_t *tile)
|
|||||||
tile->realmode = 1;
|
tile->realmode = 1;
|
||||||
}
|
}
|
||||||
tcomp->numrlvls = ccp->numrlvls;
|
tcomp->numrlvls = ccp->numrlvls;
|
||||||
if (!(tcomp->rlvls = jas_malloc(tcomp->numrlvls *
|
if (!(tcomp->rlvls = jas_alloc2(tcomp->numrlvls,
|
||||||
sizeof(jpc_dec_rlvl_t)))) {
|
sizeof(jpc_dec_rlvl_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -764,7 +764,7 @@ rlvl->bands = 0;
|
|||||||
rlvl->cbgheightexpn);
|
rlvl->cbgheightexpn);
|
||||||
|
|
||||||
rlvl->numbands = (!rlvlno) ? 1 : 3;
|
rlvl->numbands = (!rlvlno) ? 1 : 3;
|
||||||
if (!(rlvl->bands = jas_malloc(rlvl->numbands *
|
if (!(rlvl->bands = jas_alloc2(rlvl->numbands,
|
||||||
sizeof(jpc_dec_band_t)))) {
|
sizeof(jpc_dec_band_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -797,7 +797,7 @@ rlvl->bands = 0;
|
|||||||
|
|
||||||
assert(rlvl->numprcs);
|
assert(rlvl->numprcs);
|
||||||
|
|
||||||
if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_dec_prc_t)))) {
|
if (!(band->prcs = jas_alloc2(rlvl->numprcs, sizeof(jpc_dec_prc_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -834,7 +834,7 @@ rlvl->bands = 0;
|
|||||||
if (!(prc->numimsbstagtree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) {
|
if (!(prc->numimsbstagtree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_dec_cblk_t)))) {
|
if (!(prc->cblks = jas_alloc2(prc->numcblks, sizeof(jpc_dec_cblk_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1069,12 +1069,12 @@ static int jpc_dec_tiledecode(jpc_dec_t *dec, jpc_dec_tile_t *tile)
|
|||||||
/* Apply an inverse intercomponent transform if necessary. */
|
/* Apply an inverse intercomponent transform if necessary. */
|
||||||
switch (tile->cp->mctid) {
|
switch (tile->cp->mctid) {
|
||||||
case JPC_MCT_RCT:
|
case JPC_MCT_RCT:
|
||||||
assert(dec->numcomps == 3);
|
assert(dec->numcomps == 3 || dec->numcomps == 4);
|
||||||
jpc_irct(tile->tcomps[0].data, tile->tcomps[1].data,
|
jpc_irct(tile->tcomps[0].data, tile->tcomps[1].data,
|
||||||
tile->tcomps[2].data);
|
tile->tcomps[2].data);
|
||||||
break;
|
break;
|
||||||
case JPC_MCT_ICT:
|
case JPC_MCT_ICT:
|
||||||
assert(dec->numcomps == 3);
|
assert(dec->numcomps == 3 || dec->numcomps == 4);
|
||||||
jpc_iict(tile->tcomps[0].data, tile->tcomps[1].data,
|
jpc_iict(tile->tcomps[0].data, tile->tcomps[1].data,
|
||||||
tile->tcomps[2].data);
|
tile->tcomps[2].data);
|
||||||
break;
|
break;
|
||||||
@@ -1181,7 +1181,7 @@ static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(dec->cmpts = jas_malloc(dec->numcomps * sizeof(jpc_dec_cmpt_t)))) {
|
if (!(dec->cmpts = jas_alloc2(dec->numcomps, sizeof(jpc_dec_cmpt_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1204,7 +1204,7 @@ static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms)
|
|||||||
dec->numhtiles = JPC_CEILDIV(dec->xend - dec->tilexoff, dec->tilewidth);
|
dec->numhtiles = JPC_CEILDIV(dec->xend - dec->tilexoff, dec->tilewidth);
|
||||||
dec->numvtiles = JPC_CEILDIV(dec->yend - dec->tileyoff, dec->tileheight);
|
dec->numvtiles = JPC_CEILDIV(dec->yend - dec->tileyoff, dec->tileheight);
|
||||||
dec->numtiles = dec->numhtiles * dec->numvtiles;
|
dec->numtiles = dec->numhtiles * dec->numvtiles;
|
||||||
if (!(dec->tiles = jas_malloc(dec->numtiles * sizeof(jpc_dec_tile_t)))) {
|
if (!(dec->tiles = jas_alloc2(dec->numtiles, sizeof(jpc_dec_tile_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1228,7 +1228,7 @@ static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms)
|
|||||||
tile->pkthdrstreampos = 0;
|
tile->pkthdrstreampos = 0;
|
||||||
tile->pptstab = 0;
|
tile->pptstab = 0;
|
||||||
tile->cp = 0;
|
tile->cp = 0;
|
||||||
if (!(tile->tcomps = jas_malloc(dec->numcomps *
|
if (!(tile->tcomps = jas_alloc2(dec->numcomps,
|
||||||
sizeof(jpc_dec_tcomp_t)))) {
|
sizeof(jpc_dec_tcomp_t)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -1489,7 +1489,7 @@ static jpc_dec_cp_t *jpc_dec_cp_create(uint_fast16_t numcomps)
|
|||||||
cp->numlyrs = 0;
|
cp->numlyrs = 0;
|
||||||
cp->mctid = 0;
|
cp->mctid = 0;
|
||||||
cp->csty = 0;
|
cp->csty = 0;
|
||||||
if (!(cp->ccps = jas_malloc(cp->numcomps * sizeof(jpc_dec_ccp_t)))) {
|
if (!(cp->ccps = jas_alloc2(cp->numcomps, sizeof(jpc_dec_ccp_t)))) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!(cp->pchglist = jpc_pchglist_create())) {
|
if (!(cp->pchglist = jpc_pchglist_create())) {
|
||||||
@@ -2048,7 +2048,7 @@ jpc_streamlist_t *jpc_streamlist_create()
|
|||||||
}
|
}
|
||||||
streamlist->numstreams = 0;
|
streamlist->numstreams = 0;
|
||||||
streamlist->maxstreams = 100;
|
streamlist->maxstreams = 100;
|
||||||
if (!(streamlist->streams = jas_malloc(streamlist->maxstreams *
|
if (!(streamlist->streams = jas_alloc2(streamlist->maxstreams,
|
||||||
sizeof(jas_stream_t *)))) {
|
sizeof(jas_stream_t *)))) {
|
||||||
jas_free(streamlist);
|
jas_free(streamlist);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -2068,8 +2068,8 @@ int jpc_streamlist_insert(jpc_streamlist_t *streamlist, int streamno,
|
|||||||
/* Grow the array of streams if necessary. */
|
/* Grow the array of streams if necessary. */
|
||||||
if (streamlist->numstreams >= streamlist->maxstreams) {
|
if (streamlist->numstreams >= streamlist->maxstreams) {
|
||||||
newmaxstreams = streamlist->maxstreams + 1024;
|
newmaxstreams = streamlist->maxstreams + 1024;
|
||||||
if (!(newstreams = jas_realloc(streamlist->streams,
|
if (!(newstreams = jas_realloc2(streamlist->streams,
|
||||||
(newmaxstreams + 1024) * sizeof(jas_stream_t *)))) {
|
(newmaxstreams + 1024), sizeof(jas_stream_t *)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (i = streamlist->numstreams; i < streamlist->maxstreams; ++i) {
|
for (i = streamlist->numstreams; i < streamlist->maxstreams; ++i) {
|
||||||
@@ -2155,8 +2155,7 @@ int jpc_ppxstab_grow(jpc_ppxstab_t *tab, int maxents)
|
|||||||
{
|
{
|
||||||
jpc_ppxstabent_t **newents;
|
jpc_ppxstabent_t **newents;
|
||||||
if (tab->maxents < maxents) {
|
if (tab->maxents < maxents) {
|
||||||
newents = (tab->ents) ? jas_realloc(tab->ents, maxents *
|
newents = jas_realloc2(tab->ents, maxents, sizeof(jpc_ppxstabent_t *));
|
||||||
sizeof(jpc_ppxstabent_t *)) : jas_malloc(maxents * sizeof(jpc_ppxstabent_t *));
|
|
||||||
if (!newents) {
|
if (!newents) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+10
-10
@@ -403,7 +403,7 @@ static jpc_enc_cp_t *cp_create(char *optstr, jas_image_t *image)
|
|||||||
vsteplcm *= jas_image_cmptvstep(image, cmptno);
|
vsteplcm *= jas_image_cmptvstep(image, cmptno);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(cp->ccps = jas_malloc(cp->numcmpts * sizeof(jpc_enc_ccp_t)))) {
|
if (!(cp->ccps = jas_alloc2(cp->numcmpts, sizeof(jpc_enc_ccp_t)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
for (cmptno = 0, ccp = cp->ccps; cmptno < JAS_CAST(int, cp->numcmpts); ++cmptno,
|
for (cmptno = 0, ccp = cp->ccps; cmptno < JAS_CAST(int, cp->numcmpts); ++cmptno,
|
||||||
@@ -656,7 +656,7 @@ static jpc_enc_cp_t *cp_create(char *optstr, jas_image_t *image)
|
|||||||
|
|
||||||
if (ilyrrates && numilyrrates > 0) {
|
if (ilyrrates && numilyrrates > 0) {
|
||||||
tcp->numlyrs = numilyrrates + 1;
|
tcp->numlyrs = numilyrrates + 1;
|
||||||
if (!(tcp->ilyrrates = jas_malloc((tcp->numlyrs - 1) *
|
if (!(tcp->ilyrrates = jas_alloc2((tcp->numlyrs - 1),
|
||||||
sizeof(jpc_fix_t)))) {
|
sizeof(jpc_fix_t)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@@ -940,7 +940,7 @@ startoff = jas_stream_getrwcount(enc->out);
|
|||||||
siz->tilewidth = cp->tilewidth;
|
siz->tilewidth = cp->tilewidth;
|
||||||
siz->tileheight = cp->tileheight;
|
siz->tileheight = cp->tileheight;
|
||||||
siz->numcomps = cp->numcmpts;
|
siz->numcomps = cp->numcmpts;
|
||||||
siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t));
|
siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t));
|
||||||
assert(siz->comps);
|
assert(siz->comps);
|
||||||
for (i = 0; i < JAS_CAST(int, cp->numcmpts); ++i) {
|
for (i = 0; i < JAS_CAST(int, cp->numcmpts); ++i) {
|
||||||
siz->comps[i].prec = cp->ccps[i].prec;
|
siz->comps[i].prec = cp->ccps[i].prec;
|
||||||
@@ -977,7 +977,7 @@ startoff = jas_stream_getrwcount(enc->out);
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
crg = &enc->mrk->parms.crg;
|
crg = &enc->mrk->parms.crg;
|
||||||
crg->comps = jas_malloc(crg->numcomps * sizeof(jpc_crgcomp_t));
|
crg->comps = jas_alloc2(crg->numcomps, sizeof(jpc_crgcomp_t));
|
||||||
if (jpc_putms(enc->out, enc->cstate, enc->mrk)) {
|
if (jpc_putms(enc->out, enc->cstate, enc->mrk)) {
|
||||||
jas_eprintf("cannot write CRG marker\n");
|
jas_eprintf("cannot write CRG marker\n");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1955,7 +1955,7 @@ jpc_enc_tile_t *jpc_enc_tile_create(jpc_enc_cp_t *cp, jas_image_t *image, int ti
|
|||||||
tile->mctid = cp->tcp.mctid;
|
tile->mctid = cp->tcp.mctid;
|
||||||
|
|
||||||
tile->numlyrs = cp->tcp.numlyrs;
|
tile->numlyrs = cp->tcp.numlyrs;
|
||||||
if (!(tile->lyrsizes = jas_malloc(tile->numlyrs *
|
if (!(tile->lyrsizes = jas_alloc2(tile->numlyrs,
|
||||||
sizeof(uint_fast32_t)))) {
|
sizeof(uint_fast32_t)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@@ -1964,7 +1964,7 @@ jpc_enc_tile_t *jpc_enc_tile_create(jpc_enc_cp_t *cp, jas_image_t *image, int ti
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate an array for the per-tile-component information. */
|
/* Allocate an array for the per-tile-component information. */
|
||||||
if (!(tile->tcmpts = jas_malloc(cp->numcmpts * sizeof(jpc_enc_tcmpt_t)))) {
|
if (!(tile->tcmpts = jas_alloc2(cp->numcmpts, sizeof(jpc_enc_tcmpt_t)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
/* Initialize a few members critical for error recovery. */
|
/* Initialize a few members critical for error recovery. */
|
||||||
@@ -2110,7 +2110,7 @@ static jpc_enc_tcmpt_t *tcmpt_create(jpc_enc_tcmpt_t *tcmpt, jpc_enc_cp_t *cp,
|
|||||||
jas_seq2d_ystart(tcmpt->data), jas_seq2d_xend(tcmpt->data),
|
jas_seq2d_ystart(tcmpt->data), jas_seq2d_xend(tcmpt->data),
|
||||||
jas_seq2d_yend(tcmpt->data), bandinfos);
|
jas_seq2d_yend(tcmpt->data), bandinfos);
|
||||||
|
|
||||||
if (!(tcmpt->rlvls = jas_malloc(tcmpt->numrlvls * sizeof(jpc_enc_rlvl_t)))) {
|
if (!(tcmpt->rlvls = jas_alloc2(tcmpt->numrlvls, sizeof(jpc_enc_rlvl_t)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls;
|
for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls;
|
||||||
@@ -2213,7 +2213,7 @@ static jpc_enc_rlvl_t *rlvl_create(jpc_enc_rlvl_t *rlvl, jpc_enc_cp_t *cp,
|
|||||||
rlvl->numvprcs = JPC_FLOORDIVPOW2(brprcbry - tlprctly, rlvl->prcheightexpn);
|
rlvl->numvprcs = JPC_FLOORDIVPOW2(brprcbry - tlprctly, rlvl->prcheightexpn);
|
||||||
rlvl->numprcs = rlvl->numhprcs * rlvl->numvprcs;
|
rlvl->numprcs = rlvl->numhprcs * rlvl->numvprcs;
|
||||||
|
|
||||||
if (!(rlvl->bands = jas_malloc(rlvl->numbands * sizeof(jpc_enc_band_t)))) {
|
if (!(rlvl->bands = jas_alloc2(rlvl->numbands, sizeof(jpc_enc_band_t)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands;
|
for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands;
|
||||||
@@ -2290,7 +2290,7 @@ if (bandinfo->xstart != bandinfo->xend && bandinfo->ystart != bandinfo->yend) {
|
|||||||
band->synweight = bandinfo->synenergywt;
|
band->synweight = bandinfo->synenergywt;
|
||||||
|
|
||||||
if (band->data) {
|
if (band->data) {
|
||||||
if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_enc_prc_t)))) {
|
if (!(band->prcs = jas_alloc2(rlvl->numprcs, sizeof(jpc_enc_prc_t)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno,
|
for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno,
|
||||||
@@ -2422,7 +2422,7 @@ if (!rlvlno) {
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_enc_cblk_t)))) {
|
if (!(prc->cblks = jas_alloc2(prc->numcblks, sizeof(jpc_enc_cblk_t)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks;
|
for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks;
|
||||||
|
|||||||
Vendored
+1
-1
@@ -118,7 +118,7 @@ jpc_mqdec_t *jpc_mqdec_create(int maxctxs, jas_stream_t *in)
|
|||||||
mqdec->in = in;
|
mqdec->in = in;
|
||||||
mqdec->maxctxs = maxctxs;
|
mqdec->maxctxs = maxctxs;
|
||||||
/* Allocate memory for the per-context state information. */
|
/* Allocate memory for the per-context state information. */
|
||||||
if (!(mqdec->ctxs = jas_malloc(mqdec->maxctxs * sizeof(jpc_mqstate_t *)))) {
|
if (!(mqdec->ctxs = jas_alloc2(mqdec->maxctxs, sizeof(jpc_mqstate_t *)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
/* Set the current context to the first context. */
|
/* Set the current context to the first context. */
|
||||||
|
|||||||
Vendored
+1
-1
@@ -197,7 +197,7 @@ jpc_mqenc_t *jpc_mqenc_create(int maxctxs, jas_stream_t *out)
|
|||||||
mqenc->maxctxs = maxctxs;
|
mqenc->maxctxs = maxctxs;
|
||||||
|
|
||||||
/* Allocate memory for the per-context state information. */
|
/* Allocate memory for the per-context state information. */
|
||||||
if (!(mqenc->ctxs = jas_malloc(mqenc->maxctxs * sizeof(jpc_mqstate_t *)))) {
|
if (!(mqenc->ctxs = jas_alloc2(mqenc->maxctxs, sizeof(jpc_mqstate_t *)))) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+22
-22
@@ -94,14 +94,14 @@
|
|||||||
#define QMFB_SPLITBUFSIZE 4096
|
#define QMFB_SPLITBUFSIZE 4096
|
||||||
#define QMFB_JOINBUFSIZE 4096
|
#define QMFB_JOINBUFSIZE 4096
|
||||||
|
|
||||||
int jpc_ft_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
|
int jpc_ft_analyze(int *a, int xstart, int ystart, int width, int height,
|
||||||
int stride);
|
int stride);
|
||||||
int jpc_ft_synthesize(int *a, int xstart, int ystart, int width, int height,
|
int jpc_ft_synthesize(int *a, int xstart, int ystart, int width, int height,
|
||||||
int stride);
|
int stride);
|
||||||
|
|
||||||
int jpc_ns_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
|
int jpc_ns_analyze(int *a, int xstart, int ystart, int width, int height,
|
||||||
int stride);
|
int stride);
|
||||||
int jpc_ns_synthesize(jpc_fix_t *a, int xstart, int ystart, int width,
|
int jpc_ns_synthesize(int *a, int xstart, int ystart, int width,
|
||||||
int height, int stride);
|
int height, int stride);
|
||||||
|
|
||||||
void jpc_ft_fwdlift_row(jpc_fix_t *a, int numcols, int parity);
|
void jpc_ft_fwdlift_row(jpc_fix_t *a, int numcols, int parity);
|
||||||
@@ -321,7 +321,7 @@ void jpc_qmfb_split_row(jpc_fix_t *a, int numcols, int parity)
|
|||||||
#if !defined(HAVE_VLA)
|
#if !defined(HAVE_VLA)
|
||||||
/* Get a buffer. */
|
/* Get a buffer. */
|
||||||
if (bufsize > QMFB_SPLITBUFSIZE) {
|
if (bufsize > QMFB_SPLITBUFSIZE) {
|
||||||
if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
|
if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
|
||||||
/* We have no choice but to commit suicide in this case. */
|
/* We have no choice but to commit suicide in this case. */
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@@ -389,7 +389,7 @@ void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride,
|
|||||||
#if !defined(HAVE_VLA)
|
#if !defined(HAVE_VLA)
|
||||||
/* Get a buffer. */
|
/* Get a buffer. */
|
||||||
if (bufsize > QMFB_SPLITBUFSIZE) {
|
if (bufsize > QMFB_SPLITBUFSIZE) {
|
||||||
if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
|
if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
|
||||||
/* We have no choice but to commit suicide in this case. */
|
/* We have no choice but to commit suicide in this case. */
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@@ -460,7 +460,7 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, int numrows, int stride,
|
|||||||
#if !defined(HAVE_VLA)
|
#if !defined(HAVE_VLA)
|
||||||
/* Get a buffer. */
|
/* Get a buffer. */
|
||||||
if (bufsize > QMFB_SPLITBUFSIZE) {
|
if (bufsize > QMFB_SPLITBUFSIZE) {
|
||||||
if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
|
if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
|
||||||
/* We have no choice but to commit suicide in this case. */
|
/* We have no choice but to commit suicide in this case. */
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@@ -549,7 +549,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, int numrows, int numcols,
|
|||||||
#if !defined(HAVE_VLA)
|
#if !defined(HAVE_VLA)
|
||||||
/* Get a buffer. */
|
/* Get a buffer. */
|
||||||
if (bufsize > QMFB_SPLITBUFSIZE) {
|
if (bufsize > QMFB_SPLITBUFSIZE) {
|
||||||
if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
|
if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
|
||||||
/* We have no choice but to commit suicide in this case. */
|
/* We have no choice but to commit suicide in this case. */
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@@ -633,7 +633,7 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int numcols, int parity)
|
|||||||
#if !defined(HAVE_VLA)
|
#if !defined(HAVE_VLA)
|
||||||
/* Allocate memory for the join buffer from the heap. */
|
/* Allocate memory for the join buffer from the heap. */
|
||||||
if (bufsize > QMFB_JOINBUFSIZE) {
|
if (bufsize > QMFB_JOINBUFSIZE) {
|
||||||
if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
|
if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
|
||||||
/* We have no choice but to commit suicide. */
|
/* We have no choice but to commit suicide. */
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@@ -698,7 +698,7 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int numrows, int stride,
|
|||||||
#if !defined(HAVE_VLA)
|
#if !defined(HAVE_VLA)
|
||||||
/* Allocate memory for the join buffer from the heap. */
|
/* Allocate memory for the join buffer from the heap. */
|
||||||
if (bufsize > QMFB_JOINBUFSIZE) {
|
if (bufsize > QMFB_JOINBUFSIZE) {
|
||||||
if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
|
if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
|
||||||
/* We have no choice but to commit suicide. */
|
/* We have no choice but to commit suicide. */
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@@ -766,7 +766,7 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, int numrows, int stride,
|
|||||||
#if !defined(HAVE_VLA)
|
#if !defined(HAVE_VLA)
|
||||||
/* Allocate memory for the join buffer from the heap. */
|
/* Allocate memory for the join buffer from the heap. */
|
||||||
if (bufsize > QMFB_JOINBUFSIZE) {
|
if (bufsize > QMFB_JOINBUFSIZE) {
|
||||||
if (!(buf = jas_malloc(bufsize * JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) {
|
if (!(buf = jas_alloc2(bufsize, JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) {
|
||||||
/* We have no choice but to commit suicide. */
|
/* We have no choice but to commit suicide. */
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@@ -852,7 +852,7 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, int numrows, int numcols,
|
|||||||
#if !defined(HAVE_VLA)
|
#if !defined(HAVE_VLA)
|
||||||
/* Allocate memory for the join buffer from the heap. */
|
/* Allocate memory for the join buffer from the heap. */
|
||||||
if (bufsize > QMFB_JOINBUFSIZE) {
|
if (bufsize > QMFB_JOINBUFSIZE) {
|
||||||
if (!(buf = jas_malloc(bufsize * numcols * sizeof(jpc_fix_t)))) {
|
if (!(buf = jas_alloc3(bufsize, numcols, sizeof(jpc_fix_t)))) {
|
||||||
/* We have no choice but to commit suicide. */
|
/* We have no choice but to commit suicide. */
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@@ -1556,7 +1556,7 @@ void jpc_ft_invlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int jpc_ft_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
|
int jpc_ft_analyze(int *a, int xstart, int ystart, int width, int height,
|
||||||
int stride)
|
int stride)
|
||||||
{
|
{
|
||||||
int numrows = height;
|
int numrows = height;
|
||||||
@@ -1568,7 +1568,7 @@ int jpc_ft_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
|
|||||||
int maxcols;
|
int maxcols;
|
||||||
|
|
||||||
maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE;
|
maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE;
|
||||||
startptr = &a[0];
|
startptr = (jpc_fix_t*)&a[0];
|
||||||
for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) {
|
for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) {
|
||||||
jpc_qmfb_split_colgrp(startptr, numrows, stride, rowparity);
|
jpc_qmfb_split_colgrp(startptr, numrows, stride, rowparity);
|
||||||
jpc_ft_fwdlift_colgrp(startptr, numrows, stride, rowparity);
|
jpc_ft_fwdlift_colgrp(startptr, numrows, stride, rowparity);
|
||||||
@@ -1581,7 +1581,7 @@ int jpc_ft_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
|
|||||||
rowparity);
|
rowparity);
|
||||||
}
|
}
|
||||||
|
|
||||||
startptr = &a[0];
|
startptr = (jpc_fix_t*)&a[0];
|
||||||
for (i = 0; i < numrows; ++i) {
|
for (i = 0; i < numrows; ++i) {
|
||||||
jpc_qmfb_split_row(startptr, numcols, colparity);
|
jpc_qmfb_split_row(startptr, numcols, colparity);
|
||||||
jpc_ft_fwdlift_row(startptr, numcols, colparity);
|
jpc_ft_fwdlift_row(startptr, numcols, colparity);
|
||||||
@@ -1604,7 +1604,7 @@ int jpc_ft_synthesize(int *a, int xstart, int ystart, int width, int height,
|
|||||||
jpc_fix_t *startptr;
|
jpc_fix_t *startptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
startptr = &a[0];
|
startptr = (jpc_fix_t*)&a[0];
|
||||||
for (i = 0; i < numrows; ++i) {
|
for (i = 0; i < numrows; ++i) {
|
||||||
jpc_ft_invlift_row(startptr, numcols, colparity);
|
jpc_ft_invlift_row(startptr, numcols, colparity);
|
||||||
jpc_qmfb_join_row(startptr, numcols, colparity);
|
jpc_qmfb_join_row(startptr, numcols, colparity);
|
||||||
@@ -1612,7 +1612,7 @@ int jpc_ft_synthesize(int *a, int xstart, int ystart, int width, int height,
|
|||||||
}
|
}
|
||||||
|
|
||||||
maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE;
|
maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE;
|
||||||
startptr = &a[0];
|
startptr = (jpc_fix_t*)&a[0];
|
||||||
for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) {
|
for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) {
|
||||||
jpc_ft_invlift_colgrp(startptr, numrows, stride, rowparity);
|
jpc_ft_invlift_colgrp(startptr, numrows, stride, rowparity);
|
||||||
jpc_qmfb_join_colgrp(startptr, numrows, stride, rowparity);
|
jpc_qmfb_join_colgrp(startptr, numrows, stride, rowparity);
|
||||||
@@ -3068,7 +3068,7 @@ void jpc_ns_invlift_col(jpc_fix_t *a, int numrows, int stride,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int jpc_ns_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
|
int jpc_ns_analyze(int *a, int xstart, int ystart, int width, int height,
|
||||||
int stride)
|
int stride)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -3081,7 +3081,7 @@ int jpc_ns_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
|
|||||||
int maxcols;
|
int maxcols;
|
||||||
|
|
||||||
maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE;
|
maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE;
|
||||||
startptr = &a[0];
|
startptr = (jpc_fix_t*)&a[0];
|
||||||
for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) {
|
for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) {
|
||||||
jpc_qmfb_split_colgrp(startptr, numrows, stride, rowparity);
|
jpc_qmfb_split_colgrp(startptr, numrows, stride, rowparity);
|
||||||
jpc_ns_fwdlift_colgrp(startptr, numrows, stride, rowparity);
|
jpc_ns_fwdlift_colgrp(startptr, numrows, stride, rowparity);
|
||||||
@@ -3094,7 +3094,7 @@ int jpc_ns_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
|
|||||||
rowparity);
|
rowparity);
|
||||||
}
|
}
|
||||||
|
|
||||||
startptr = &a[0];
|
startptr = (jpc_fix_t*)&a[0];
|
||||||
for (i = 0; i < numrows; ++i) {
|
for (i = 0; i < numrows; ++i) {
|
||||||
jpc_qmfb_split_row(startptr, numcols, colparity);
|
jpc_qmfb_split_row(startptr, numcols, colparity);
|
||||||
jpc_ns_fwdlift_row(startptr, numcols, colparity);
|
jpc_ns_fwdlift_row(startptr, numcols, colparity);
|
||||||
@@ -3105,7 +3105,7 @@ int jpc_ns_analyze(jpc_fix_t *a, int xstart, int ystart, int width, int height,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int jpc_ns_synthesize(jpc_fix_t *a, int xstart, int ystart, int width,
|
int jpc_ns_synthesize(int *a, int xstart, int ystart, int width,
|
||||||
int height, int stride)
|
int height, int stride)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -3117,7 +3117,7 @@ int jpc_ns_synthesize(jpc_fix_t *a, int xstart, int ystart, int width,
|
|||||||
jpc_fix_t *startptr;
|
jpc_fix_t *startptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
startptr = &a[0];
|
startptr = (jpc_fix_t*)&a[0];
|
||||||
for (i = 0; i < numrows; ++i) {
|
for (i = 0; i < numrows; ++i) {
|
||||||
jpc_ns_invlift_row(startptr, numcols, colparity);
|
jpc_ns_invlift_row(startptr, numcols, colparity);
|
||||||
jpc_qmfb_join_row(startptr, numcols, colparity);
|
jpc_qmfb_join_row(startptr, numcols, colparity);
|
||||||
@@ -3125,7 +3125,7 @@ int jpc_ns_synthesize(jpc_fix_t *a, int xstart, int ystart, int width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE;
|
maxcols = (numcols / JPC_QMFB_COLGRPSIZE) * JPC_QMFB_COLGRPSIZE;
|
||||||
startptr = &a[0];
|
startptr = (jpc_fix_t*)&a[0];
|
||||||
for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) {
|
for (i = 0; i < maxcols; i += JPC_QMFB_COLGRPSIZE) {
|
||||||
jpc_ns_invlift_colgrp(startptr, numrows, stride, rowparity);
|
jpc_ns_invlift_colgrp(startptr, numrows, stride, rowparity);
|
||||||
jpc_qmfb_join_colgrp(startptr, numrows, stride, rowparity);
|
jpc_qmfb_join_colgrp(startptr, numrows, stride, rowparity);
|
||||||
|
|||||||
Vendored
+1
-1
@@ -219,7 +219,7 @@ int jpc_enc_enccblk(jpc_enc_t *enc, jas_stream_t *out, jpc_enc_tcmpt_t *tcmpt, j
|
|||||||
|
|
||||||
cblk->numpasses = (cblk->numbps > 0) ? (3 * cblk->numbps - 2) : 0;
|
cblk->numpasses = (cblk->numbps > 0) ? (3 * cblk->numbps - 2) : 0;
|
||||||
if (cblk->numpasses > 0) {
|
if (cblk->numpasses > 0) {
|
||||||
cblk->passes = jas_malloc(cblk->numpasses * sizeof(jpc_enc_pass_t));
|
cblk->passes = jas_alloc2(cblk->numpasses, sizeof(jpc_enc_pass_t));
|
||||||
assert(cblk->passes);
|
assert(cblk->passes);
|
||||||
} else {
|
} else {
|
||||||
cblk->passes = 0;
|
cblk->passes = 0;
|
||||||
|
|||||||
Vendored
+1
-1
@@ -573,7 +573,7 @@ int jpc_pchglist_insert(jpc_pchglist_t *pchglist, int pchgno, jpc_pchg_t *pchg)
|
|||||||
}
|
}
|
||||||
if (pchglist->numpchgs >= pchglist->maxpchgs) {
|
if (pchglist->numpchgs >= pchglist->maxpchgs) {
|
||||||
newmaxpchgs = pchglist->maxpchgs + 128;
|
newmaxpchgs = pchglist->maxpchgs + 128;
|
||||||
if (!(newpchgs = jas_realloc(pchglist->pchgs, newmaxpchgs * sizeof(jpc_pchg_t *)))) {
|
if (!(newpchgs = jas_realloc2(pchglist->pchgs, newmaxpchgs, sizeof(jpc_pchg_t *)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
pchglist->maxpchgs = newmaxpchgs;
|
pchglist->maxpchgs = newmaxpchgs;
|
||||||
|
|||||||
Vendored
+3
-3
@@ -478,7 +478,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *dec, jpc_dec_tile_t *tile)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pi->numcomps = dec->numcomps;
|
pi->numcomps = dec->numcomps;
|
||||||
if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) {
|
if (!(pi->picomps = jas_alloc2(pi->numcomps, sizeof(jpc_picomp_t)))) {
|
||||||
jpc_pi_destroy(pi);
|
jpc_pi_destroy(pi);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -490,7 +490,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *dec, jpc_dec_tile_t *tile)
|
|||||||
for (compno = 0, tcomp = tile->tcomps, picomp = pi->picomps;
|
for (compno = 0, tcomp = tile->tcomps, picomp = pi->picomps;
|
||||||
compno < pi->numcomps; ++compno, ++tcomp, ++picomp) {
|
compno < pi->numcomps; ++compno, ++tcomp, ++picomp) {
|
||||||
picomp->numrlvls = tcomp->numrlvls;
|
picomp->numrlvls = tcomp->numrlvls;
|
||||||
if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls *
|
if (!(picomp->pirlvls = jas_alloc2(picomp->numrlvls,
|
||||||
sizeof(jpc_pirlvl_t)))) {
|
sizeof(jpc_pirlvl_t)))) {
|
||||||
jpc_pi_destroy(pi);
|
jpc_pi_destroy(pi);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -503,7 +503,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *dec, jpc_dec_tile_t *tile)
|
|||||||
rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl, ++rlvl) {
|
rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl, ++rlvl) {
|
||||||
/* XXX sizeof(long) should be sizeof different type */
|
/* XXX sizeof(long) should be sizeof different type */
|
||||||
pirlvl->numprcs = rlvl->numprcs;
|
pirlvl->numprcs = rlvl->numprcs;
|
||||||
if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs *
|
if (!(pirlvl->prclyrnos = jas_alloc2(pirlvl->numprcs,
|
||||||
sizeof(long)))) {
|
sizeof(long)))) {
|
||||||
jpc_pi_destroy(pi);
|
jpc_pi_destroy(pi);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Vendored
+3
-3
@@ -565,7 +565,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t *cp, jpc_enc_tile_t *tile)
|
|||||||
}
|
}
|
||||||
pi->pktno = -1;
|
pi->pktno = -1;
|
||||||
pi->numcomps = cp->numcmpts;
|
pi->numcomps = cp->numcmpts;
|
||||||
if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) {
|
if (!(pi->picomps = jas_alloc2(pi->numcomps, sizeof(jpc_picomp_t)))) {
|
||||||
jpc_pi_destroy(pi);
|
jpc_pi_destroy(pi);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -577,7 +577,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t *cp, jpc_enc_tile_t *tile)
|
|||||||
for (compno = 0, tcomp = tile->tcmpts, picomp = pi->picomps;
|
for (compno = 0, tcomp = tile->tcmpts, picomp = pi->picomps;
|
||||||
compno < pi->numcomps; ++compno, ++tcomp, ++picomp) {
|
compno < pi->numcomps; ++compno, ++tcomp, ++picomp) {
|
||||||
picomp->numrlvls = tcomp->numrlvls;
|
picomp->numrlvls = tcomp->numrlvls;
|
||||||
if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls *
|
if (!(picomp->pirlvls = jas_alloc2(picomp->numrlvls,
|
||||||
sizeof(jpc_pirlvl_t)))) {
|
sizeof(jpc_pirlvl_t)))) {
|
||||||
jpc_pi_destroy(pi);
|
jpc_pi_destroy(pi);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -591,7 +591,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t *cp, jpc_enc_tile_t *tile)
|
|||||||
/* XXX sizeof(long) should be sizeof different type */
|
/* XXX sizeof(long) should be sizeof different type */
|
||||||
pirlvl->numprcs = rlvl->numprcs;
|
pirlvl->numprcs = rlvl->numprcs;
|
||||||
if (rlvl->numprcs) {
|
if (rlvl->numprcs) {
|
||||||
if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs *
|
if (!(pirlvl->prclyrnos = jas_alloc2(pirlvl->numprcs,
|
||||||
sizeof(long)))) {
|
sizeof(long)))) {
|
||||||
jpc_pi_destroy(pi);
|
jpc_pi_destroy(pi);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Vendored
+1
-1
@@ -125,7 +125,7 @@ jpc_tagtree_t *jpc_tagtree_create(int numleafsh, int numleafsv)
|
|||||||
++numlvls;
|
++numlvls;
|
||||||
} while (n > 1);
|
} while (n > 1);
|
||||||
|
|
||||||
if (!(tree->nodes_ = jas_malloc(tree->numnodes_ * sizeof(jpc_tagtreenode_t)))) {
|
if (!(tree->nodes_ = jas_alloc2(tree->numnodes_, sizeof(jpc_tagtreenode_t)))) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -109,7 +109,7 @@ int jpc_atoaf(char *s, int *numvalues, double **values)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (n) {
|
if (n) {
|
||||||
if (!(vs = jas_malloc(n * sizeof(double)))) {
|
if (!(vs = jas_alloc2(n, sizeof(double)))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
/*#undef const*/
|
/*#undef const*/
|
||||||
#undef CHAR_IS_UNSIGNED
|
#undef CHAR_IS_UNSIGNED
|
||||||
|
|
||||||
#if !defined WIN32 && !defined _WIN32
|
#if defined __MINGW__ || defined __MINGW32__ || (!defined WIN32 && !defined _WIN32)
|
||||||
#define HAVE_STDDEF_H
|
#define HAVE_STDDEF_H
|
||||||
#define HAVE_STDLIB_H
|
#define HAVE_STDLIB_H
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Vendored
+3906
File diff suppressed because it is too large
Load Diff
Vendored
+18
-1
@@ -2,18 +2,35 @@
|
|||||||
# CMake file for libpng. See root CMakeLists.txt
|
# CMake file for libpng. See root CMakeLists.txt
|
||||||
#
|
#
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
project(${PNG_LIBRARY})
|
|
||||||
|
if(NEON)
|
||||||
|
project(${PNG_LIBRARY} ASM)
|
||||||
|
else()
|
||||||
|
project(${PNG_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIR})
|
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
file(GLOB lib_srcs *.c)
|
file(GLOB lib_srcs *.c)
|
||||||
file(GLOB lib_hdrs *.h)
|
file(GLOB lib_hdrs *.h)
|
||||||
|
|
||||||
|
if(NEON)
|
||||||
|
list(APPEND lib_srcs arm/filter_neon.S)
|
||||||
|
add_definitions(-DPNG_ARM_NEON)
|
||||||
|
endif()
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------
|
||||||
# Define the library target:
|
# Define the library target:
|
||||||
# ----------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
add_definitions(-DPNG_CONFIGURE_LIBPNG)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||||
|
endif(MSVC)
|
||||||
|
|
||||||
add_library(${PNG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
add_library(${PNG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
||||||
|
target_link_libraries(${PNG_LIBRARY} ${ZLIB_LIBRARY})
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
|
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
|
||||||
|
|||||||
Vendored
+111
@@ -0,0 +1,111 @@
|
|||||||
|
|
||||||
|
This copy of the libpng notices is provided for your convenience. In case of
|
||||||
|
any discrepancy between this copy and the notices in the file png.h that is
|
||||||
|
included in the libpng distribution, the latter shall prevail.
|
||||||
|
|
||||||
|
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||||
|
|
||||||
|
If you modify libpng you may insert additional notices immediately following
|
||||||
|
this sentence.
|
||||||
|
|
||||||
|
This code is released under the libpng license.
|
||||||
|
|
||||||
|
libpng versions 1.2.6, August 15, 2004, through 1.5.12, July 11, 2012, are
|
||||||
|
Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
|
||||||
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
|
with the following individual added to the list of Contributing Authors
|
||||||
|
|
||||||
|
Cosmin Truta
|
||||||
|
|
||||||
|
libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
|
||||||
|
Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
|
||||||
|
distributed according to the same disclaimer and license as libpng-1.0.6
|
||||||
|
with the following individuals added to the list of Contributing Authors
|
||||||
|
|
||||||
|
Simon-Pierre Cadieux
|
||||||
|
Eric S. Raymond
|
||||||
|
Gilles Vollant
|
||||||
|
|
||||||
|
and with the following additions to the disclaimer:
|
||||||
|
|
||||||
|
There is no warranty against interference with your enjoyment of the
|
||||||
|
library or against infringement. There is no warranty that our
|
||||||
|
efforts or the library will fulfill any of your particular purposes
|
||||||
|
or needs. This library is provided with all faults, and the entire
|
||||||
|
risk of satisfactory quality, performance, accuracy, and effort is with
|
||||||
|
the user.
|
||||||
|
|
||||||
|
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
|
||||||
|
Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
|
||||||
|
distributed according to the same disclaimer and license as libpng-0.96,
|
||||||
|
with the following individuals added to the list of Contributing Authors:
|
||||||
|
|
||||||
|
Tom Lane
|
||||||
|
Glenn Randers-Pehrson
|
||||||
|
Willem van Schaik
|
||||||
|
|
||||||
|
libpng versions 0.89, June 1996, through 0.96, May 1997, are
|
||||||
|
Copyright (c) 1996, 1997 Andreas Dilger
|
||||||
|
Distributed according to the same disclaimer and license as libpng-0.88,
|
||||||
|
with the following individuals added to the list of Contributing Authors:
|
||||||
|
|
||||||
|
John Bowler
|
||||||
|
Kevin Bracey
|
||||||
|
Sam Bushell
|
||||||
|
Magnus Holmgren
|
||||||
|
Greg Roelofs
|
||||||
|
Tom Tanner
|
||||||
|
|
||||||
|
libpng versions 0.5, May 1995, through 0.88, January 1996, are
|
||||||
|
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
|
|
||||||
|
For the purposes of this copyright and license, "Contributing Authors"
|
||||||
|
is defined as the following set of individuals:
|
||||||
|
|
||||||
|
Andreas Dilger
|
||||||
|
Dave Martindale
|
||||||
|
Guy Eric Schalnat
|
||||||
|
Paul Schmidt
|
||||||
|
Tim Wegner
|
||||||
|
|
||||||
|
The PNG Reference Library is supplied "AS IS". The Contributing Authors
|
||||||
|
and Group 42, Inc. disclaim all warranties, expressed or implied,
|
||||||
|
including, without limitation, the warranties of merchantability and of
|
||||||
|
fitness for any purpose. The Contributing Authors and Group 42, Inc.
|
||||||
|
assume no liability for direct, indirect, incidental, special, exemplary,
|
||||||
|
or consequential damages, which may result from the use of the PNG
|
||||||
|
Reference Library, even if advised of the possibility of such damage.
|
||||||
|
|
||||||
|
Permission is hereby granted to use, copy, modify, and distribute this
|
||||||
|
source code, or portions hereof, for any purpose, without fee, subject
|
||||||
|
to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this source code must not be misrepresented.
|
||||||
|
|
||||||
|
2. Altered versions must be plainly marked as such and must not
|
||||||
|
be misrepresented as being the original source.
|
||||||
|
|
||||||
|
3. This Copyright notice may not be removed or altered from any
|
||||||
|
source or altered source distribution.
|
||||||
|
|
||||||
|
The Contributing Authors and Group 42, Inc. specifically permit, without
|
||||||
|
fee, and encourage the use of this source code as a component to
|
||||||
|
supporting the PNG file format in commercial products. If you use this
|
||||||
|
source code in a product, acknowledgment is not required but would be
|
||||||
|
appreciated.
|
||||||
|
|
||||||
|
|
||||||
|
A "png_get_copyright" function is available, for convenient use in "about"
|
||||||
|
boxes and the like:
|
||||||
|
|
||||||
|
printf("%s",png_get_copyright(NULL));
|
||||||
|
|
||||||
|
Also, the PNG logo (in PNG format, of course) is supplied in the
|
||||||
|
files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
|
||||||
|
|
||||||
|
Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
|
||||||
|
certification mark of the Open Source Initiative.
|
||||||
|
|
||||||
|
Glenn Randers-Pehrson
|
||||||
|
glennrp at users.sourceforge.net
|
||||||
|
July 11, 2012
|
||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
README for libpng version 1.5.9 - February 18, 2012 (shared library 15.0)
|
README for libpng version 1.5.12 - July 11, 2012 (shared library 15.0)
|
||||||
See the note about version numbers near the top of png.h
|
See the note about version numbers near the top of png.h
|
||||||
|
|
||||||
See INSTALL for instructions on how to install libpng.
|
See INSTALL for instructions on how to install libpng.
|
||||||
|
|||||||
Vendored
+225
@@ -0,0 +1,225 @@
|
|||||||
|
|
||||||
|
/* filter_neon.S - NEON optimised filter functions
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011 Glenn Randers-Pehrson
|
||||||
|
* Written by Mans Rullgard, 2011.
|
||||||
|
*
|
||||||
|
* This code is released under the libpng license.
|
||||||
|
* For conditions of distribution and use, see the disclaimer
|
||||||
|
* and license in png.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(__linux__) && defined(__ELF__)
|
||||||
|
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __ELF__
|
||||||
|
# define ELF
|
||||||
|
#else
|
||||||
|
# define ELF @
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.arch armv7-a
|
||||||
|
.fpu neon
|
||||||
|
|
||||||
|
.macro func name, export=0
|
||||||
|
.macro endfunc
|
||||||
|
ELF .size \name, . - \name
|
||||||
|
.endfunc
|
||||||
|
.purgem endfunc
|
||||||
|
.endm
|
||||||
|
.text
|
||||||
|
.if \export
|
||||||
|
.global \name
|
||||||
|
.endif
|
||||||
|
ELF .type \name, STT_FUNC
|
||||||
|
.func \name
|
||||||
|
\name:
|
||||||
|
.endm
|
||||||
|
|
||||||
|
func png_read_filter_row_sub4_neon, export=1
|
||||||
|
ldr r3, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
1:
|
||||||
|
vld4.32 {d4[],d5[],d6[],d7[]}, [r1]
|
||||||
|
vadd.u8 d0, d3, d4
|
||||||
|
vadd.u8 d1, d0, d5
|
||||||
|
vadd.u8 d2, d1, d6
|
||||||
|
vadd.u8 d3, d2, d7
|
||||||
|
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1]!
|
||||||
|
subs r3, r3, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_sub3_neon, export=1
|
||||||
|
ldr r3, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
mov r0, r1
|
||||||
|
mov r2, #3
|
||||||
|
mov r12, #12
|
||||||
|
vld1.8 {q11}, [r0], r12
|
||||||
|
1:
|
||||||
|
vext.8 d5, d22, d23, #3
|
||||||
|
vadd.u8 d0, d3, d22
|
||||||
|
vext.8 d6, d22, d23, #6
|
||||||
|
vadd.u8 d1, d0, d5
|
||||||
|
vext.8 d7, d23, d23, #1
|
||||||
|
vld1.8 {q11}, [r0], r12
|
||||||
|
vst1.32 {d0[0]}, [r1], r2
|
||||||
|
vadd.u8 d2, d1, d6
|
||||||
|
vst1.32 {d1[0]}, [r1], r2
|
||||||
|
vadd.u8 d3, d2, d7
|
||||||
|
vst1.32 {d2[0]}, [r1], r2
|
||||||
|
vst1.32 {d3[0]}, [r1], r2
|
||||||
|
subs r3, r3, #12
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_up_neon, export=1
|
||||||
|
ldr r3, [r0, #4] @ rowbytes
|
||||||
|
1:
|
||||||
|
vld1.8 {q0}, [r1]
|
||||||
|
vld1.8 {q1}, [r2]!
|
||||||
|
vadd.u8 q0, q0, q1
|
||||||
|
vst1.8 {q0}, [r1]!
|
||||||
|
subs r3, r3, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_avg4_neon, export=1
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
1:
|
||||||
|
vld4.32 {d4[],d5[],d6[],d7[]}, [r1]
|
||||||
|
vld4.32 {d16[],d17[],d18[],d19[]},[r2]!
|
||||||
|
vhadd.u8 d0, d3, d16
|
||||||
|
vadd.u8 d0, d0, d4
|
||||||
|
vhadd.u8 d1, d0, d17
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
vhadd.u8 d2, d1, d18
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
vhadd.u8 d3, d2, d19
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1]!
|
||||||
|
subs r12, r12, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_avg3_neon, export=1
|
||||||
|
push {r4,lr}
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
mov r0, r1
|
||||||
|
mov r4, #3
|
||||||
|
mov lr, #12
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
1:
|
||||||
|
vld1.8 {q10}, [r2], lr
|
||||||
|
vext.8 d5, d22, d23, #3
|
||||||
|
vhadd.u8 d0, d3, d20
|
||||||
|
vext.8 d17, d20, d21, #3
|
||||||
|
vadd.u8 d0, d0, d22
|
||||||
|
vext.8 d6, d22, d23, #6
|
||||||
|
vhadd.u8 d1, d0, d17
|
||||||
|
vext.8 d18, d20, d21, #6
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
vext.8 d7, d23, d23, #1
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
vst1.32 {d0[0]}, [r1], r4
|
||||||
|
vhadd.u8 d2, d1, d18
|
||||||
|
vst1.32 {d1[0]}, [r1], r4
|
||||||
|
vext.8 d19, d21, d21, #1
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
vhadd.u8 d3, d2, d19
|
||||||
|
vst1.32 {d2[0]}, [r1], r4
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst1.32 {d3[0]}, [r1], r4
|
||||||
|
subs r12, r12, #12
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
pop {r4,pc}
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
.macro paeth rx, ra, rb, rc
|
||||||
|
vaddl.u8 q12, \ra, \rb @ a + b
|
||||||
|
vaddl.u8 q15, \rc, \rc @ 2*c
|
||||||
|
vabdl.u8 q13, \rb, \rc @ pa
|
||||||
|
vabdl.u8 q14, \ra, \rc @ pb
|
||||||
|
vabd.u16 q15, q12, q15 @ pc
|
||||||
|
vcle.u16 q12, q13, q14 @ pa <= pb
|
||||||
|
vcle.u16 q13, q13, q15 @ pa <= pc
|
||||||
|
vcle.u16 q14, q14, q15 @ pb <= pc
|
||||||
|
vand q12, q12, q13 @ pa <= pb && pa <= pc
|
||||||
|
vmovn.u16 d28, q14
|
||||||
|
vmovn.u16 \rx, q12
|
||||||
|
vbsl d28, \rb, \rc
|
||||||
|
vbsl \rx, \ra, d28
|
||||||
|
.endm
|
||||||
|
|
||||||
|
func png_read_filter_row_paeth4_neon, export=1
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
vmov.i8 d20, #0
|
||||||
|
1:
|
||||||
|
vld4.32 {d4[],d5[],d6[],d7[]}, [r1]
|
||||||
|
vld4.32 {d16[],d17[],d18[],d19[]},[r2]!
|
||||||
|
paeth d0, d3, d16, d20
|
||||||
|
vadd.u8 d0, d0, d4
|
||||||
|
paeth d1, d0, d17, d16
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
paeth d2, d1, d18, d17
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
paeth d3, d2, d19, d18
|
||||||
|
vmov d20, d19
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1]!
|
||||||
|
subs r12, r12, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_paeth3_neon, export=1
|
||||||
|
push {r4,lr}
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
vmov.i8 d4, #0
|
||||||
|
mov r0, r1
|
||||||
|
mov r4, #3
|
||||||
|
mov lr, #12
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
1:
|
||||||
|
vld1.8 {q10}, [r2], lr
|
||||||
|
paeth d0, d3, d20, d4
|
||||||
|
vext.8 d5, d22, d23, #3
|
||||||
|
vadd.u8 d0, d0, d22
|
||||||
|
vext.8 d17, d20, d21, #3
|
||||||
|
paeth d1, d0, d17, d20
|
||||||
|
vst1.32 {d0[0]}, [r1], r4
|
||||||
|
vext.8 d6, d22, d23, #6
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
vext.8 d18, d20, d21, #6
|
||||||
|
paeth d2, d1, d18, d17
|
||||||
|
vext.8 d7, d23, d23, #1
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
vst1.32 {d1[0]}, [r1], r4
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
vext.8 d19, d21, d21, #1
|
||||||
|
paeth d3, d2, d19, d18
|
||||||
|
vst1.32 {d2[0]}, [r1], r4
|
||||||
|
vmov d4, d19
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst1.32 {d3[0]}, [r1], r4
|
||||||
|
subs r12, r12, #12
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
pop {r4,pc}
|
||||||
|
endfunc
|
||||||
Vendored
+22
-18
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.7 [December 15, 2011]
|
* Last changed in libpng 1.5.11 [June 14, 2012]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef png_libpng_version_1_5_9 Your_png_h_is_not_version_1_5_9;
|
typedef png_libpng_version_1_5_12 Your_png_h_is_not_version_1_5_12;
|
||||||
|
|
||||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
||||||
* of the PNG file signature. If the PNG data is embedded into another
|
* of the PNG file signature. If the PNG data is embedded into another
|
||||||
@@ -655,14 +655,14 @@ png_get_copyright(png_const_structp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.5.9 - February 18, 2012" PNG_STRING_NEWLINE \
|
"libpng version 1.5.12 - July 11, 2012" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2012 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE;
|
PNG_STRING_NEWLINE;
|
||||||
# else
|
# else
|
||||||
return "libpng version 1.5.9 - February 18, 2012\
|
return "libpng version 1.5.12 - July 11, 2012\
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2012 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||||
# endif
|
# endif
|
||||||
@@ -969,8 +969,8 @@ int png_XYZ_from_xy(png_XYZ *XYZ, png_xy xy)
|
|||||||
* and it is certain that it becomes unstable where the end points are close
|
* and it is certain that it becomes unstable where the end points are close
|
||||||
* together.
|
* together.
|
||||||
*
|
*
|
||||||
* So this code uses the perhaps slighly less optimal but more understandable
|
* So this code uses the perhaps slightly less optimal but more
|
||||||
* and totally obvious approach of calculating color-scale.
|
* understandable and totally obvious approach of calculating color-scale.
|
||||||
*
|
*
|
||||||
* This algorithm depends on the precision in white-scale and that is
|
* This algorithm depends on the precision in white-scale and that is
|
||||||
* (1/white-y), so we can immediately see that as white-y approaches 0 the
|
* (1/white-y), so we can immediately see that as white-y approaches 0 the
|
||||||
@@ -1467,7 +1467,7 @@ static double
|
|||||||
png_pow10(int power)
|
png_pow10(int power)
|
||||||
{
|
{
|
||||||
int recip = 0;
|
int recip = 0;
|
||||||
double d = 1;
|
double d = 1.0;
|
||||||
|
|
||||||
/* Handle negative exponent with a reciprocal at the end because
|
/* Handle negative exponent with a reciprocal at the end because
|
||||||
* 10 is exact whereas .1 is inexact in base 2
|
* 10 is exact whereas .1 is inexact in base 2
|
||||||
@@ -1481,7 +1481,7 @@ png_pow10(int power)
|
|||||||
if (power > 0)
|
if (power > 0)
|
||||||
{
|
{
|
||||||
/* Decompose power bitwise. */
|
/* Decompose power bitwise. */
|
||||||
double mult = 10;
|
double mult = 10.0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (power & 1) d *= mult;
|
if (power & 1) d *= mult;
|
||||||
@@ -1600,7 +1600,8 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
|||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
|
|
||||||
fp *= 10;
|
fp *= 10.0;
|
||||||
|
|
||||||
/* Use modf here, not floor and subtract, so that
|
/* Use modf here, not floor and subtract, so that
|
||||||
* the separation is done in one step. At the end
|
* the separation is done in one step. At the end
|
||||||
* of the loop don't break the number into parts so
|
* of the loop don't break the number into parts so
|
||||||
@@ -1613,7 +1614,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
|||||||
{
|
{
|
||||||
d = floor(fp + .5);
|
d = floor(fp + .5);
|
||||||
|
|
||||||
if (d > 9)
|
if (d > 9.0)
|
||||||
{
|
{
|
||||||
/* Rounding up to 10, handle that here. */
|
/* Rounding up to 10, handle that here. */
|
||||||
if (czero > 0)
|
if (czero > 0)
|
||||||
@@ -1621,9 +1622,10 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
|||||||
--czero, d = 1;
|
--czero, d = 1;
|
||||||
if (cdigits == 0) --clead;
|
if (cdigits == 0) --clead;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (cdigits > 0 && d > 9)
|
while (cdigits > 0 && d > 9.0)
|
||||||
{
|
{
|
||||||
int ch = *--ascii;
|
int ch = *--ascii;
|
||||||
|
|
||||||
@@ -1648,7 +1650,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
|||||||
* exponent but take into account the leading
|
* exponent but take into account the leading
|
||||||
* decimal point.
|
* decimal point.
|
||||||
*/
|
*/
|
||||||
if (d > 9) /* cdigits == 0 */
|
if (d > 9.0) /* cdigits == 0 */
|
||||||
{
|
{
|
||||||
if (exp_b10 == (-1))
|
if (exp_b10 == (-1))
|
||||||
{
|
{
|
||||||
@@ -1669,18 +1671,19 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
|||||||
++exp_b10;
|
++exp_b10;
|
||||||
|
|
||||||
/* In all cases we output a '1' */
|
/* In all cases we output a '1' */
|
||||||
d = 1;
|
d = 1.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fp = 0; /* Guarantees termination below. */
|
fp = 0; /* Guarantees termination below. */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d == 0)
|
if (d == 0.0)
|
||||||
{
|
{
|
||||||
++czero;
|
++czero;
|
||||||
if (cdigits == 0) ++clead;
|
if (cdigits == 0) ++clead;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Included embedded zeros in the digit count. */
|
/* Included embedded zeros in the digit count. */
|
||||||
@@ -1708,6 +1711,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
|
|||||||
above */
|
above */
|
||||||
--exp_b10;
|
--exp_b10;
|
||||||
}
|
}
|
||||||
|
|
||||||
*ascii++ = (char)(48 + (int)d), ++cdigits;
|
*ascii++ = (char)(48 + (int)d), ++cdigits;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2040,7 +2044,7 @@ png_muldiv_warn(png_structp png_ptr, png_fixed_point a, png_int_32 times,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_GAMMA_SUPPORTED /* more fixed point functions for gammma */
|
#ifdef PNG_READ_GAMMA_SUPPORTED /* more fixed point functions for gamma */
|
||||||
/* Calculate a reciprocal, return 0 on div-by-zero or overflow. */
|
/* Calculate a reciprocal, return 0 on div-by-zero or overflow. */
|
||||||
png_fixed_point
|
png_fixed_point
|
||||||
png_reciprocal(png_fixed_point a)
|
png_reciprocal(png_fixed_point a)
|
||||||
|
|||||||
Vendored
+27
-14
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.5.9 - February 18, 2012
|
* libpng version 1.5.12 - July 11, 2012
|
||||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.5.9 - February 18, 2012: Glenn
|
* libpng versions 0.97, January 1998, through 1.5.12 - July 11, 2012: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@@ -172,6 +172,12 @@
|
|||||||
* 1.5.9beta01-02 15 10509 15.so.15.9[.0]
|
* 1.5.9beta01-02 15 10509 15.so.15.9[.0]
|
||||||
* 1.5.9rc01 15 10509 15.so.15.9[.0]
|
* 1.5.9rc01 15 10509 15.so.15.9[.0]
|
||||||
* 1.5.9 15 10509 15.so.15.9[.0]
|
* 1.5.9 15 10509 15.so.15.9[.0]
|
||||||
|
* 1.5.10beta01-05 15 10510 15.so.15.10[.0]
|
||||||
|
* 1.5.10 15 10510 15.so.15.10[.0]
|
||||||
|
* 1.5.11beta01 15 10511 15.so.15.11[.0]
|
||||||
|
* 1.5.11rc01-05 15 10511 15.so.15.11[.0]
|
||||||
|
* 1.5.11 15 10511 15.so.15.11[.0]
|
||||||
|
* 1.5.12 15 10512 15.so.15.12[.0]
|
||||||
*
|
*
|
||||||
* Henceforth the source version will match the shared-library major
|
* Henceforth the source version will match the shared-library major
|
||||||
* and minor numbers; the shared-library major version number will be
|
* and minor numbers; the shared-library major version number will be
|
||||||
@@ -181,7 +187,7 @@
|
|||||||
* to the source version x.y.z (leading zeros in y and z). Beta versions
|
* to the source version x.y.z (leading zeros in y and z). Beta versions
|
||||||
* were given the previous public release number plus a letter, until
|
* were given the previous public release number plus a letter, until
|
||||||
* version 1.0.6j; from then on they were given the upcoming public
|
* version 1.0.6j; from then on they were given the upcoming public
|
||||||
* release number plus "betaNN" or "rcN".
|
* release number plus "betaNN" or "rcNN".
|
||||||
*
|
*
|
||||||
* Binary incompatibility exists only when applications make direct access
|
* Binary incompatibility exists only when applications make direct access
|
||||||
* to the info_ptr or png_ptr members through png.h, and the compiled
|
* to the info_ptr or png_ptr members through png.h, and the compiled
|
||||||
@@ -203,7 +209,7 @@
|
|||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
*
|
*
|
||||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.9, February 18, 2012, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.5.12, July 11, 2012, are
|
||||||
* Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
* with the following individual added to the list of Contributing Authors:
|
* with the following individual added to the list of Contributing Authors:
|
||||||
@@ -315,13 +321,13 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* February 18, 2012
|
* July 11, 2012
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
*
|
*
|
||||||
* This is your unofficial assurance that libpng from version 0.71 and
|
* This is your unofficial assurance that libpng from version 0.71 and
|
||||||
* upward through 1.5.9 are Y2K compliant. It is my belief that
|
* upward through 1.5.12 are Y2K compliant. It is my belief that
|
||||||
* earlier versions were also Y2K compliant.
|
* earlier versions were also Y2K compliant.
|
||||||
*
|
*
|
||||||
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||||
@@ -332,7 +338,8 @@
|
|||||||
* "png_uint_16 year" in png_time_struct.
|
* "png_uint_16 year" in png_time_struct.
|
||||||
*
|
*
|
||||||
* The string is
|
* The string is
|
||||||
* "png_char time_buffer" in png_struct
|
* "char time_buffer[29]" in png_struct. This will be no
|
||||||
|
* longer used in libpng-1.6.0 and will be removed from libpng-1.7.0.
|
||||||
*
|
*
|
||||||
* There are seven time-related functions:
|
* There are seven time-related functions:
|
||||||
* png.c: png_convert_to_rfc_1123() in png.c
|
* png.c: png_convert_to_rfc_1123() in png.c
|
||||||
@@ -379,9 +386,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.5.9"
|
#define PNG_LIBPNG_VER_STRING "1.5.12"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.5.9 - February 18, 2012\n"
|
" libpng version 1.5.12 - July 11, 2012\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 15
|
#define PNG_LIBPNG_VER_SONUM 15
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||||
@@ -389,7 +396,7 @@
|
|||||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||||
#define PNG_LIBPNG_VER_MAJOR 1
|
#define PNG_LIBPNG_VER_MAJOR 1
|
||||||
#define PNG_LIBPNG_VER_MINOR 5
|
#define PNG_LIBPNG_VER_MINOR 5
|
||||||
#define PNG_LIBPNG_VER_RELEASE 9
|
#define PNG_LIBPNG_VER_RELEASE 12
|
||||||
|
|
||||||
/* This should match the numeric part of the final component of
|
/* This should match the numeric part of the final component of
|
||||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
||||||
@@ -412,7 +419,7 @@
|
|||||||
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
|
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
|
||||||
PNG_LIBPNG_BUILD_PRIVATE */
|
PNG_LIBPNG_BUILD_PRIVATE */
|
||||||
|
|
||||||
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
|
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
|
||||||
|
|
||||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||||
* We must not include leading zeros.
|
* We must not include leading zeros.
|
||||||
@@ -420,7 +427,7 @@
|
|||||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
||||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
||||||
*/
|
*/
|
||||||
#define PNG_LIBPNG_VER 10509 /* 1.5.9 */
|
#define PNG_LIBPNG_VER 10512 /* 1.5.12 */
|
||||||
|
|
||||||
/* Library configuration: these options cannot be changed after
|
/* Library configuration: these options cannot be changed after
|
||||||
* the library has been built.
|
* the library has been built.
|
||||||
@@ -542,7 +549,7 @@ extern "C" {
|
|||||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||||
* do not agree upon the version number.
|
* do not agree upon the version number.
|
||||||
*/
|
*/
|
||||||
typedef char* png_libpng_version_1_5_9;
|
typedef char* png_libpng_version_1_5_12;
|
||||||
|
|
||||||
/* Three color definitions. The order of the red, green, and blue, (and the
|
/* Three color definitions. The order of the red, green, and blue, (and the
|
||||||
* exact size) is not important, although the size of the fields need to
|
* exact size) is not important, although the size of the fields need to
|
||||||
@@ -2637,6 +2644,12 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
|
|||||||
: (png_int_32)png_get_uint_32(buf)))
|
: (png_int_32)png_get_uint_32(buf)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \
|
||||||
|
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
|
||||||
|
PNG_EXPORT(234, void, png_set_check_for_invalid_index, (png_structp png_ptr,
|
||||||
|
int allowed));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
|
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
|
||||||
* defs
|
* defs
|
||||||
*/
|
*/
|
||||||
@@ -2646,7 +2659,7 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
|
|||||||
* scripts/symbols.def as well.
|
* scripts/symbols.def as well.
|
||||||
*/
|
*/
|
||||||
#ifdef PNG_EXPORT_LAST_ORDINAL
|
#ifdef PNG_EXPORT_LAST_ORDINAL
|
||||||
PNG_EXPORT_LAST_ORDINAL(233);
|
PNG_EXPORT_LAST_ORDINAL(234);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Vendored
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.5.9 - February 18, 2012
|
* libpng version 1.5.12 - July 11, 2012
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
#ifndef PNG_BUILDING_SYMBOL_TABLE
|
#ifndef PNG_BUILDING_SYMBOL_TABLE
|
||||||
/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C
|
/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C
|
||||||
* definition file for machine specific limits, this may impact the
|
* definition file for machine specific limits, this may impact the
|
||||||
* correctness of the definitons below (see uses of INT_MAX).
|
* correctness of the definitions below (see uses of INT_MAX).
|
||||||
*/
|
*/
|
||||||
# ifndef PNG_NO_LIMITS_H
|
# ifndef PNG_NO_LIMITS_H
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
@@ -51,8 +51,8 @@
|
|||||||
|
|
||||||
/* This controls optimization of the reading of 16 and 32 bit values
|
/* This controls optimization of the reading of 16 and 32 bit values
|
||||||
* from PNG files. It can be set on a per-app-file basis - it
|
* from PNG files. It can be set on a per-app-file basis - it
|
||||||
* just changes whether a macro is used to the function is called.
|
* just changes whether a macro is used when the function is called.
|
||||||
* The library builder sets the default, if read functions are not
|
* The library builder sets the default; if read functions are not
|
||||||
* built into the library the macro implementation is forced on.
|
* built into the library the macro implementation is forced on.
|
||||||
*/
|
*/
|
||||||
#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED
|
#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED
|
||||||
|
|||||||
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
/* pngerror.c - stub functions for i/o and memory allocation
|
/* pngerror.c - stub functions for i/o and memory allocation
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.8 [February 1, 2011]
|
* Last changed in libpng 1.5.8 [February 1, 2011]
|
||||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
|
|||||||
+5
-6
@@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
/* pnglibconf.h - library build configuration */
|
/* pnglibconf.h - library build configuration */
|
||||||
|
|
||||||
/* Libpng 1.5.9 - February 18, 2012 */
|
/* Libpng 1.5.12 - July 11, 2012 */
|
||||||
|
|
||||||
/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
|
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
|
||||||
|
|
||||||
/* This code is released under the libpng license. */
|
/* This code is released under the libpng license. */
|
||||||
/* For conditions of distribution and use, see the disclaimer */
|
/* For conditions of distribution and use, see the disclaimer */
|
||||||
@@ -31,10 +31,6 @@
|
|||||||
#define PNG_QUANTIZE_GREEN_BITS 5
|
#define PNG_QUANTIZE_GREEN_BITS 5
|
||||||
#define PNG_QUANTIZE_RED_BITS 5
|
#define PNG_QUANTIZE_RED_BITS 5
|
||||||
#define PNG_sCAL_PRECISION 5
|
#define PNG_sCAL_PRECISION 5
|
||||||
#define PNG_USER_CHUNK_CACHE_MAX 0
|
|
||||||
#define PNG_USER_CHUNK_MALLOC_MAX 0
|
|
||||||
#define PNG_USER_HEIGHT_MAX 1000000
|
|
||||||
#define PNG_USER_WIDTH_MAX 1000000
|
|
||||||
#define PNG_WEIGHT_SHIFT 8
|
#define PNG_WEIGHT_SHIFT 8
|
||||||
#define PNG_ZBUF_SIZE 8192
|
#define PNG_ZBUF_SIZE 8192
|
||||||
/* end of settings */
|
/* end of settings */
|
||||||
@@ -45,6 +41,7 @@
|
|||||||
#define PNG_bKGD_SUPPORTED
|
#define PNG_bKGD_SUPPORTED
|
||||||
#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
|
#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
|
||||||
#define PNG_CHECK_cHRM_SUPPORTED
|
#define PNG_CHECK_cHRM_SUPPORTED
|
||||||
|
#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
#define PNG_cHRM_SUPPORTED
|
#define PNG_cHRM_SUPPORTED
|
||||||
#define PNG_CONSOLE_IO_SUPPORTED
|
#define PNG_CONSOLE_IO_SUPPORTED
|
||||||
#define PNG_CONVERT_tIME_SUPPORTED
|
#define PNG_CONVERT_tIME_SUPPORTED
|
||||||
@@ -74,6 +71,7 @@
|
|||||||
#define PNG_READ_BACKGROUND_SUPPORTED
|
#define PNG_READ_BACKGROUND_SUPPORTED
|
||||||
#define PNG_READ_BGR_SUPPORTED
|
#define PNG_READ_BGR_SUPPORTED
|
||||||
#define PNG_READ_bKGD_SUPPORTED
|
#define PNG_READ_bKGD_SUPPORTED
|
||||||
|
#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
#define PNG_READ_cHRM_SUPPORTED
|
#define PNG_READ_cHRM_SUPPORTED
|
||||||
#define PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
#define PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||||
#define PNG_READ_COMPRESSED_TEXT_SUPPORTED
|
#define PNG_READ_COMPRESSED_TEXT_SUPPORTED
|
||||||
@@ -145,6 +143,7 @@
|
|||||||
#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
|
#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
|
||||||
#define PNG_WRITE_BGR_SUPPORTED
|
#define PNG_WRITE_BGR_SUPPORTED
|
||||||
#define PNG_WRITE_bKGD_SUPPORTED
|
#define PNG_WRITE_bKGD_SUPPORTED
|
||||||
|
#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
#define PNG_WRITE_cHRM_SUPPORTED
|
#define PNG_WRITE_cHRM_SUPPORTED
|
||||||
#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
|
#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
|
||||||
#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
|
#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
|
||||||
|
|||||||
Vendored
+18
-546
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngpread.c - read a png file in push mode
|
/* pngpread.c - read a png file in push mode
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.9 [February 18, 2012]
|
* Last changed in libpng 1.5.11 [June 14, 2012]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -128,30 +128,6 @@ png_process_some_data(png_structp png_ptr, png_infop info_ptr)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_READ_tEXt_SUPPORTED
|
|
||||||
case PNG_READ_tEXt_MODE:
|
|
||||||
{
|
|
||||||
png_push_read_tEXt(png_ptr, info_ptr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#ifdef PNG_READ_zTXt_SUPPORTED
|
|
||||||
case PNG_READ_zTXt_MODE:
|
|
||||||
{
|
|
||||||
png_push_read_zTXt(png_ptr, info_ptr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#ifdef PNG_READ_iTXt_SUPPORTED
|
|
||||||
case PNG_READ_iTXt_MODE:
|
|
||||||
{
|
|
||||||
png_push_read_iTXt(png_ptr, info_ptr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
case PNG_SKIP_MODE:
|
case PNG_SKIP_MODE:
|
||||||
{
|
{
|
||||||
png_push_crc_finish(png_ptr);
|
png_push_crc_finish(png_ptr);
|
||||||
@@ -196,6 +172,7 @@ png_push_read_sig(png_structp png_ptr, png_infop info_ptr)
|
|||||||
else
|
else
|
||||||
png_error(png_ptr, "PNG file corrupted by ASCII conversion");
|
png_error(png_ptr, "PNG file corrupted by ASCII conversion");
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (png_ptr->sig_bytes >= 8)
|
if (png_ptr->sig_bytes >= 8)
|
||||||
@@ -305,8 +282,8 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
|||||||
png_error(png_ptr, "Missing PLTE before IDAT");
|
png_error(png_ptr, "Missing PLTE before IDAT");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
else if (chunk_name == png_PLTE)
|
else if (chunk_name == png_PLTE)
|
||||||
{
|
{
|
||||||
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
|
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
|
||||||
@@ -543,7 +520,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
png_push_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length);
|
png_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -556,7 +533,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
png_push_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length);
|
png_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -569,10 +546,11 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
png_push_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length);
|
png_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
|
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
|
||||||
@@ -580,7 +558,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
|||||||
png_push_save_buffer(png_ptr);
|
png_push_save_buffer(png_ptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
png_push_handle_unknown(png_ptr, info_ptr, png_ptr->push_length);
|
png_handle_unknown(png_ptr, info_ptr, png_ptr->push_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
|
png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
|
||||||
@@ -620,6 +598,7 @@ png_push_crc_finish(png_structp png_ptr)
|
|||||||
png_ptr->save_buffer_size -= save_size;
|
png_ptr->save_buffer_size -= save_size;
|
||||||
png_ptr->save_buffer_ptr += save_size;
|
png_ptr->save_buffer_ptr += save_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (png_ptr->skip_length && png_ptr->current_buffer_size)
|
if (png_ptr->skip_length && png_ptr->current_buffer_size)
|
||||||
{
|
{
|
||||||
png_size_t save_size = png_ptr->current_buffer_size;
|
png_size_t save_size = png_ptr->current_buffer_size;
|
||||||
@@ -641,6 +620,7 @@ png_push_crc_finish(png_structp png_ptr)
|
|||||||
png_ptr->current_buffer_size -= save_size;
|
png_ptr->current_buffer_size -= save_size;
|
||||||
png_ptr->current_buffer_ptr += save_size;
|
png_ptr->current_buffer_ptr += save_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!png_ptr->skip_length)
|
if (!png_ptr->skip_length)
|
||||||
{
|
{
|
||||||
if (png_ptr->buffer_size < 4)
|
if (png_ptr->buffer_size < 4)
|
||||||
@@ -663,6 +643,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ptr = buffer;
|
ptr = buffer;
|
||||||
|
|
||||||
if (png_ptr->save_buffer_size)
|
if (png_ptr->save_buffer_size)
|
||||||
{
|
{
|
||||||
png_size_t save_size;
|
png_size_t save_size;
|
||||||
@@ -680,6 +661,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
|
|||||||
png_ptr->save_buffer_size -= save_size;
|
png_ptr->save_buffer_size -= save_size;
|
||||||
png_ptr->save_buffer_ptr += save_size;
|
png_ptr->save_buffer_ptr += save_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length && png_ptr->current_buffer_size)
|
if (length && png_ptr->current_buffer_size)
|
||||||
{
|
{
|
||||||
png_size_t save_size;
|
png_size_t save_size;
|
||||||
@@ -709,6 +691,7 @@ png_push_save_buffer(png_structp png_ptr)
|
|||||||
png_bytep dp;
|
png_bytep dp;
|
||||||
|
|
||||||
istop = png_ptr->save_buffer_size;
|
istop = png_ptr->save_buffer_size;
|
||||||
|
|
||||||
for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer;
|
for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer;
|
||||||
i < istop; i++, sp++, dp++)
|
i < istop; i++, sp++, dp++)
|
||||||
{
|
{
|
||||||
@@ -716,6 +699,7 @@ png_push_save_buffer(png_structp png_ptr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (png_ptr->save_buffer_size + png_ptr->current_buffer_size >
|
if (png_ptr->save_buffer_size + png_ptr->current_buffer_size >
|
||||||
png_ptr->save_buffer_max)
|
png_ptr->save_buffer_max)
|
||||||
{
|
{
|
||||||
@@ -742,6 +726,7 @@ png_push_save_buffer(png_structp png_ptr)
|
|||||||
png_free(png_ptr, old_buffer);
|
png_free(png_ptr, old_buffer);
|
||||||
png_ptr->save_buffer_max = new_max;
|
png_ptr->save_buffer_max = new_max;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (png_ptr->current_buffer_size)
|
if (png_ptr->current_buffer_size)
|
||||||
{
|
{
|
||||||
png_memcpy(png_ptr->save_buffer + png_ptr->save_buffer_size,
|
png_memcpy(png_ptr->save_buffer + png_ptr->save_buffer_size,
|
||||||
@@ -749,6 +734,7 @@ png_push_save_buffer(png_structp png_ptr)
|
|||||||
png_ptr->save_buffer_size += png_ptr->current_buffer_size;
|
png_ptr->save_buffer_size += png_ptr->current_buffer_size;
|
||||||
png_ptr->current_buffer_size = 0;
|
png_ptr->current_buffer_size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
png_ptr->save_buffer_ptr = png_ptr->save_buffer;
|
png_ptr->save_buffer_ptr = png_ptr->save_buffer;
|
||||||
png_ptr->buffer_size = 0;
|
png_ptr->buffer_size = 0;
|
||||||
}
|
}
|
||||||
@@ -850,6 +836,7 @@ png_push_read_IDAT(png_structp png_ptr)
|
|||||||
png_ptr->current_buffer_size -= save_size;
|
png_ptr->current_buffer_size -= save_size;
|
||||||
png_ptr->current_buffer_ptr += save_size;
|
png_ptr->current_buffer_ptr += save_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!png_ptr->idat_size)
|
if (!png_ptr->idat_size)
|
||||||
{
|
{
|
||||||
if (png_ptr->buffer_size < 4)
|
if (png_ptr->buffer_size < 4)
|
||||||
@@ -1263,521 +1250,6 @@ png_read_push_finish_row(png_structp png_ptr)
|
|||||||
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_READ_tEXt_SUPPORTED
|
|
||||||
void /* PRIVATE */
|
|
||||||
png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
|
||||||
length)
|
|
||||||
{
|
|
||||||
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
|
|
||||||
{
|
|
||||||
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
|
|
||||||
png_error(png_ptr, "Out of place tEXt");
|
|
||||||
/* NOT REACHED */
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PNG_MAX_MALLOC_64K
|
|
||||||
png_ptr->skip_length = 0; /* This may not be necessary */
|
|
||||||
|
|
||||||
if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */
|
|
||||||
{
|
|
||||||
png_warning(png_ptr, "tEXt chunk too large to fit in memory");
|
|
||||||
png_ptr->skip_length = length - (png_uint_32)65535L;
|
|
||||||
length = (png_uint_32)65535L;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
png_ptr->current_text = (png_charp)png_malloc(png_ptr, length + 1);
|
|
||||||
png_ptr->current_text[length] = '\0';
|
|
||||||
png_ptr->current_text_ptr = png_ptr->current_text;
|
|
||||||
png_ptr->current_text_size = (png_size_t)length;
|
|
||||||
png_ptr->current_text_left = (png_size_t)length;
|
|
||||||
png_ptr->process_mode = PNG_READ_tEXt_MODE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void /* PRIVATE */
|
|
||||||
png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
|
|
||||||
{
|
|
||||||
if (png_ptr->buffer_size && png_ptr->current_text_left)
|
|
||||||
{
|
|
||||||
png_size_t text_size;
|
|
||||||
|
|
||||||
if (png_ptr->buffer_size < png_ptr->current_text_left)
|
|
||||||
text_size = png_ptr->buffer_size;
|
|
||||||
|
|
||||||
else
|
|
||||||
text_size = png_ptr->current_text_left;
|
|
||||||
|
|
||||||
png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);
|
|
||||||
png_ptr->current_text_left -= text_size;
|
|
||||||
png_ptr->current_text_ptr += text_size;
|
|
||||||
}
|
|
||||||
if (!(png_ptr->current_text_left))
|
|
||||||
{
|
|
||||||
png_textp text_ptr;
|
|
||||||
png_charp text;
|
|
||||||
png_charp key;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (png_ptr->buffer_size < 4)
|
|
||||||
{
|
|
||||||
png_push_save_buffer(png_ptr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
png_push_crc_finish(png_ptr);
|
|
||||||
|
|
||||||
#ifdef PNG_MAX_MALLOC_64K
|
|
||||||
if (png_ptr->skip_length)
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
key = png_ptr->current_text;
|
|
||||||
|
|
||||||
for (text = key; *text; text++)
|
|
||||||
/* Empty loop */ ;
|
|
||||||
|
|
||||||
if (text < key + png_ptr->current_text_size)
|
|
||||||
text++;
|
|
||||||
|
|
||||||
text_ptr = (png_textp)png_malloc(png_ptr, png_sizeof(png_text));
|
|
||||||
text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
|
|
||||||
text_ptr->key = key;
|
|
||||||
text_ptr->itxt_length = 0;
|
|
||||||
text_ptr->lang = NULL;
|
|
||||||
text_ptr->lang_key = NULL;
|
|
||||||
text_ptr->text = text;
|
|
||||||
|
|
||||||
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
|
||||||
|
|
||||||
png_free(png_ptr, key);
|
|
||||||
png_free(png_ptr, text_ptr);
|
|
||||||
png_ptr->current_text = NULL;
|
|
||||||
|
|
||||||
if (ret)
|
|
||||||
png_warning(png_ptr, "Insufficient memory to store text chunk");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_zTXt_SUPPORTED
|
|
||||||
void /* PRIVATE */
|
|
||||||
png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
|
||||||
length)
|
|
||||||
{
|
|
||||||
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
|
|
||||||
{
|
|
||||||
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
|
|
||||||
png_error(png_ptr, "Out of place zTXt");
|
|
||||||
/* NOT REACHED */
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PNG_MAX_MALLOC_64K
|
|
||||||
/* We can't handle zTXt chunks > 64K, since we don't have enough space
|
|
||||||
* to be able to store the uncompressed data. Actually, the threshold
|
|
||||||
* is probably around 32K, but it isn't as definite as 64K is.
|
|
||||||
*/
|
|
||||||
if (length > (png_uint_32)65535L)
|
|
||||||
{
|
|
||||||
png_warning(png_ptr, "zTXt chunk too large to fit in memory");
|
|
||||||
png_push_crc_skip(png_ptr, length);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
png_ptr->current_text = (png_charp)png_malloc(png_ptr, length + 1);
|
|
||||||
png_ptr->current_text[length] = '\0';
|
|
||||||
png_ptr->current_text_ptr = png_ptr->current_text;
|
|
||||||
png_ptr->current_text_size = (png_size_t)length;
|
|
||||||
png_ptr->current_text_left = (png_size_t)length;
|
|
||||||
png_ptr->process_mode = PNG_READ_zTXt_MODE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void /* PRIVATE */
|
|
||||||
png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
|
|
||||||
{
|
|
||||||
if (png_ptr->buffer_size && png_ptr->current_text_left)
|
|
||||||
{
|
|
||||||
png_size_t text_size;
|
|
||||||
|
|
||||||
if (png_ptr->buffer_size < (png_uint_32)png_ptr->current_text_left)
|
|
||||||
text_size = png_ptr->buffer_size;
|
|
||||||
|
|
||||||
else
|
|
||||||
text_size = png_ptr->current_text_left;
|
|
||||||
|
|
||||||
png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);
|
|
||||||
png_ptr->current_text_left -= text_size;
|
|
||||||
png_ptr->current_text_ptr += text_size;
|
|
||||||
}
|
|
||||||
if (!(png_ptr->current_text_left))
|
|
||||||
{
|
|
||||||
png_textp text_ptr;
|
|
||||||
png_charp text;
|
|
||||||
png_charp key;
|
|
||||||
int ret;
|
|
||||||
png_size_t text_size, key_size;
|
|
||||||
|
|
||||||
if (png_ptr->buffer_size < 4)
|
|
||||||
{
|
|
||||||
png_push_save_buffer(png_ptr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
png_push_crc_finish(png_ptr);
|
|
||||||
|
|
||||||
key = png_ptr->current_text;
|
|
||||||
|
|
||||||
for (text = key; *text; text++)
|
|
||||||
/* Empty loop */ ;
|
|
||||||
|
|
||||||
/* zTXt can't have zero text */
|
|
||||||
if (text >= key + png_ptr->current_text_size)
|
|
||||||
{
|
|
||||||
png_ptr->current_text = NULL;
|
|
||||||
png_free(png_ptr, key);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
text++;
|
|
||||||
|
|
||||||
if (*text != PNG_TEXT_COMPRESSION_zTXt) /* Check compression byte */
|
|
||||||
{
|
|
||||||
png_ptr->current_text = NULL;
|
|
||||||
png_free(png_ptr, key);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
text++;
|
|
||||||
|
|
||||||
png_ptr->zstream.next_in = (png_bytep)text;
|
|
||||||
png_ptr->zstream.avail_in = (uInt)(png_ptr->current_text_size -
|
|
||||||
(text - key));
|
|
||||||
png_ptr->zstream.next_out = png_ptr->zbuf;
|
|
||||||
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
|
|
||||||
|
|
||||||
key_size = text - key;
|
|
||||||
text_size = 0;
|
|
||||||
text = NULL;
|
|
||||||
ret = Z_STREAM_END;
|
|
||||||
|
|
||||||
while (png_ptr->zstream.avail_in)
|
|
||||||
{
|
|
||||||
ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
|
|
||||||
if (ret != Z_OK && ret != Z_STREAM_END)
|
|
||||||
{
|
|
||||||
inflateReset(&png_ptr->zstream);
|
|
||||||
png_ptr->zstream.avail_in = 0;
|
|
||||||
png_ptr->current_text = NULL;
|
|
||||||
png_free(png_ptr, key);
|
|
||||||
png_free(png_ptr, text);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(png_ptr->zstream.avail_out) || ret == Z_STREAM_END)
|
|
||||||
{
|
|
||||||
if (text == NULL)
|
|
||||||
{
|
|
||||||
text = (png_charp)png_malloc(png_ptr,
|
|
||||||
(png_ptr->zbuf_size
|
|
||||||
- png_ptr->zstream.avail_out + key_size + 1));
|
|
||||||
|
|
||||||
png_memcpy(text + key_size, png_ptr->zbuf,
|
|
||||||
png_ptr->zbuf_size - png_ptr->zstream.avail_out);
|
|
||||||
|
|
||||||
png_memcpy(text, key, key_size);
|
|
||||||
|
|
||||||
text_size = key_size + png_ptr->zbuf_size -
|
|
||||||
png_ptr->zstream.avail_out;
|
|
||||||
|
|
||||||
*(text + text_size) = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
png_charp tmp;
|
|
||||||
|
|
||||||
tmp = text;
|
|
||||||
text = (png_charp)png_malloc(png_ptr, text_size +
|
|
||||||
(png_ptr->zbuf_size
|
|
||||||
- png_ptr->zstream.avail_out + 1));
|
|
||||||
|
|
||||||
png_memcpy(text, tmp, text_size);
|
|
||||||
png_free(png_ptr, tmp);
|
|
||||||
|
|
||||||
png_memcpy(text + text_size, png_ptr->zbuf,
|
|
||||||
png_ptr->zbuf_size - png_ptr->zstream.avail_out);
|
|
||||||
|
|
||||||
text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out;
|
|
||||||
*(text + text_size) = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret != Z_STREAM_END)
|
|
||||||
{
|
|
||||||
png_ptr->zstream.next_out = png_ptr->zbuf;
|
|
||||||
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret == Z_STREAM_END)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
inflateReset(&png_ptr->zstream);
|
|
||||||
png_ptr->zstream.avail_in = 0;
|
|
||||||
|
|
||||||
if (ret != Z_STREAM_END)
|
|
||||||
{
|
|
||||||
png_ptr->current_text = NULL;
|
|
||||||
png_free(png_ptr, key);
|
|
||||||
png_free(png_ptr, text);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
png_ptr->current_text = NULL;
|
|
||||||
png_free(png_ptr, key);
|
|
||||||
key = text;
|
|
||||||
text += key_size;
|
|
||||||
|
|
||||||
text_ptr = (png_textp)png_malloc(png_ptr,
|
|
||||||
png_sizeof(png_text));
|
|
||||||
text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt;
|
|
||||||
text_ptr->key = key;
|
|
||||||
text_ptr->itxt_length = 0;
|
|
||||||
text_ptr->lang = NULL;
|
|
||||||
text_ptr->lang_key = NULL;
|
|
||||||
text_ptr->text = text;
|
|
||||||
|
|
||||||
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
|
||||||
|
|
||||||
png_free(png_ptr, key);
|
|
||||||
png_free(png_ptr, text_ptr);
|
|
||||||
|
|
||||||
if (ret)
|
|
||||||
png_warning(png_ptr, "Insufficient memory to store text chunk");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_iTXt_SUPPORTED
|
|
||||||
void /* PRIVATE */
|
|
||||||
png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
|
||||||
length)
|
|
||||||
{
|
|
||||||
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
|
|
||||||
{
|
|
||||||
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
|
|
||||||
png_error(png_ptr, "Out of place iTXt");
|
|
||||||
/* NOT REACHED */
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PNG_MAX_MALLOC_64K
|
|
||||||
png_ptr->skip_length = 0; /* This may not be necessary */
|
|
||||||
|
|
||||||
if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */
|
|
||||||
{
|
|
||||||
png_warning(png_ptr, "iTXt chunk too large to fit in memory");
|
|
||||||
png_ptr->skip_length = length - (png_uint_32)65535L;
|
|
||||||
length = (png_uint_32)65535L;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
png_ptr->current_text = (png_charp)png_malloc(png_ptr, length + 1);
|
|
||||||
png_ptr->current_text[length] = '\0';
|
|
||||||
png_ptr->current_text_ptr = png_ptr->current_text;
|
|
||||||
png_ptr->current_text_size = (png_size_t)length;
|
|
||||||
png_ptr->current_text_left = (png_size_t)length;
|
|
||||||
png_ptr->process_mode = PNG_READ_iTXt_MODE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void /* PRIVATE */
|
|
||||||
png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (png_ptr->buffer_size && png_ptr->current_text_left)
|
|
||||||
{
|
|
||||||
png_size_t text_size;
|
|
||||||
|
|
||||||
if (png_ptr->buffer_size < png_ptr->current_text_left)
|
|
||||||
text_size = png_ptr->buffer_size;
|
|
||||||
|
|
||||||
else
|
|
||||||
text_size = png_ptr->current_text_left;
|
|
||||||
|
|
||||||
png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size);
|
|
||||||
png_ptr->current_text_left -= text_size;
|
|
||||||
png_ptr->current_text_ptr += text_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(png_ptr->current_text_left))
|
|
||||||
{
|
|
||||||
png_textp text_ptr;
|
|
||||||
png_charp key;
|
|
||||||
int comp_flag;
|
|
||||||
png_charp lang;
|
|
||||||
png_charp lang_key;
|
|
||||||
png_charp text;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (png_ptr->buffer_size < 4)
|
|
||||||
{
|
|
||||||
png_push_save_buffer(png_ptr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
png_push_crc_finish(png_ptr);
|
|
||||||
|
|
||||||
#ifdef PNG_MAX_MALLOC_64K
|
|
||||||
if (png_ptr->skip_length)
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
key = png_ptr->current_text;
|
|
||||||
|
|
||||||
for (lang = key; *lang; lang++)
|
|
||||||
/* Empty loop */ ;
|
|
||||||
|
|
||||||
if (lang < key + png_ptr->current_text_size - 3)
|
|
||||||
lang++;
|
|
||||||
|
|
||||||
comp_flag = *lang++;
|
|
||||||
lang++; /* Skip comp_type, always zero */
|
|
||||||
|
|
||||||
for (lang_key = lang; *lang_key; lang_key++)
|
|
||||||
/* Empty loop */ ;
|
|
||||||
|
|
||||||
lang_key++; /* Skip NUL separator */
|
|
||||||
|
|
||||||
text=lang_key;
|
|
||||||
|
|
||||||
if (lang_key < key + png_ptr->current_text_size - 1)
|
|
||||||
{
|
|
||||||
for (; *text; text++)
|
|
||||||
/* Empty loop */ ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (text < key + png_ptr->current_text_size)
|
|
||||||
text++;
|
|
||||||
|
|
||||||
text_ptr = (png_textp)png_malloc(png_ptr,
|
|
||||||
png_sizeof(png_text));
|
|
||||||
|
|
||||||
text_ptr->compression = comp_flag + 2;
|
|
||||||
text_ptr->key = key;
|
|
||||||
text_ptr->lang = lang;
|
|
||||||
text_ptr->lang_key = lang_key;
|
|
||||||
text_ptr->text = text;
|
|
||||||
text_ptr->text_length = 0;
|
|
||||||
text_ptr->itxt_length = png_strlen(text);
|
|
||||||
|
|
||||||
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
|
|
||||||
|
|
||||||
png_ptr->current_text = NULL;
|
|
||||||
|
|
||||||
png_free(png_ptr, text_ptr);
|
|
||||||
if (ret)
|
|
||||||
png_warning(png_ptr, "Insufficient memory to store iTXt chunk");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This function is called when we haven't found a handler for this
|
|
||||||
* chunk. If there isn't a problem with the chunk itself (ie a bad chunk
|
|
||||||
* name or a critical chunk), the chunk is (currently) silently ignored.
|
|
||||||
*/
|
|
||||||
void /* PRIVATE */
|
|
||||||
png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
|
|
||||||
length)
|
|
||||||
{
|
|
||||||
png_uint_32 skip = 0;
|
|
||||||
png_uint_32 chunk_name = png_ptr->chunk_name;
|
|
||||||
|
|
||||||
if (PNG_CHUNK_CRITICAL(chunk_name))
|
|
||||||
{
|
|
||||||
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
|
||||||
if (png_chunk_unknown_handling(png_ptr, chunk_name) !=
|
|
||||||
PNG_HANDLE_CHUNK_ALWAYS
|
|
||||||
#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
|
|
||||||
&& png_ptr->read_user_chunk_fn == NULL
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
#endif
|
|
||||||
png_chunk_error(png_ptr, "unknown critical chunk");
|
|
||||||
|
|
||||||
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
|
||||||
/* TODO: the code below is apparently just using the
|
|
||||||
* png_struct::unknown_chunk member as a temporarily variable, it should be
|
|
||||||
* possible to eliminate both it and the temporary buffer.
|
|
||||||
*/
|
|
||||||
if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS)
|
|
||||||
{
|
|
||||||
#ifdef PNG_MAX_MALLOC_64K
|
|
||||||
if (length > 65535)
|
|
||||||
{
|
|
||||||
png_warning(png_ptr, "unknown chunk too large to fit in memory");
|
|
||||||
skip = length - 65535;
|
|
||||||
length = 65535;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/* This is just a record for the user; libpng doesn't use the character
|
|
||||||
* form of the name.
|
|
||||||
*/
|
|
||||||
PNG_CSTRING_FROM_CHUNK(png_ptr->unknown_chunk.name, png_ptr->chunk_name);
|
|
||||||
|
|
||||||
png_ptr->unknown_chunk.size = length;
|
|
||||||
|
|
||||||
if (length == 0)
|
|
||||||
png_ptr->unknown_chunk.data = NULL;
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr,
|
|
||||||
png_ptr->unknown_chunk.size);
|
|
||||||
png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data,
|
|
||||||
png_ptr->unknown_chunk.size);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
|
|
||||||
if (png_ptr->read_user_chunk_fn != NULL)
|
|
||||||
{
|
|
||||||
/* Callback to user unknown chunk handler */
|
|
||||||
int ret;
|
|
||||||
ret = (*(png_ptr->read_user_chunk_fn))
|
|
||||||
(png_ptr, &png_ptr->unknown_chunk);
|
|
||||||
|
|
||||||
if (ret < 0)
|
|
||||||
png_chunk_error(png_ptr, "error in user chunk");
|
|
||||||
|
|
||||||
if (ret == 0)
|
|
||||||
{
|
|
||||||
if (PNG_CHUNK_CRITICAL(png_ptr->chunk_name))
|
|
||||||
if (png_chunk_unknown_handling(png_ptr, chunk_name) !=
|
|
||||||
PNG_HANDLE_CHUNK_ALWAYS)
|
|
||||||
png_chunk_error(png_ptr, "unknown critical chunk");
|
|
||||||
png_set_unknown_chunks(png_ptr, info_ptr,
|
|
||||||
&png_ptr->unknown_chunk, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
|
|
||||||
png_free(png_ptr, png_ptr->unknown_chunk.data);
|
|
||||||
png_ptr->unknown_chunk.data = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
skip=length;
|
|
||||||
png_push_crc_skip(png_ptr, skip);
|
|
||||||
}
|
|
||||||
|
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_push_have_info(png_structp png_ptr, png_infop info_ptr)
|
png_push_have_info(png_structp png_ptr, png_infop info_ptr)
|
||||||
{
|
{
|
||||||
|
|||||||
Vendored
+50
-4
@@ -2,11 +2,11 @@
|
|||||||
/* pngpriv.h - private declarations for use inside libpng
|
/* pngpriv.h - private declarations for use inside libpng
|
||||||
*
|
*
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.7 [December 15, 2011]
|
* Last changed in libpng 1.5.10 [March 29, 2012]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@@ -133,6 +133,46 @@
|
|||||||
# define PNG_DLL_EXPORT
|
# define PNG_DLL_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* SECURITY and SAFETY:
|
||||||
|
*
|
||||||
|
* By default libpng is built without any internal limits on image size,
|
||||||
|
* individual heap (png_malloc) allocations or the total amount of memory used.
|
||||||
|
* If PNG_SAFE_LIMITS_SUPPORTED is defined, however, the limits below are used
|
||||||
|
* (unless individually overridden). These limits are believed to be fairly
|
||||||
|
* safe, but builders of secure systems should verify the values against the
|
||||||
|
* real system capabilities.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef PNG_SAFE_LIMITS_SUPPORTED
|
||||||
|
/* 'safe' limits */
|
||||||
|
# ifndef PNG_USER_WIDTH_MAX
|
||||||
|
# define PNG_USER_WIDTH_MAX 1000000
|
||||||
|
# endif
|
||||||
|
# ifndef PNG_USER_HEIGHT_MAX
|
||||||
|
# define PNG_USER_HEIGHT_MAX 1000000
|
||||||
|
# endif
|
||||||
|
# ifndef PNG_USER_CHUNK_CACHE_MAX
|
||||||
|
# define PNG_USER_CHUNK_CACHE_MAX 128
|
||||||
|
# endif
|
||||||
|
# ifndef PNG_USER_CHUNK_MALLOC_MAX
|
||||||
|
# define PNG_USER_CHUNK_MALLOC_MAX 8000000
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
/* values for no limits */
|
||||||
|
# ifndef PNG_USER_WIDTH_MAX
|
||||||
|
# define PNG_USER_WIDTH_MAX 0x7fffffff
|
||||||
|
# endif
|
||||||
|
# ifndef PNG_USER_HEIGHT_MAX
|
||||||
|
# define PNG_USER_HEIGHT_MAX 0x7fffffff
|
||||||
|
# endif
|
||||||
|
# ifndef PNG_USER_CHUNK_CACHE_MAX
|
||||||
|
# define PNG_USER_CHUNK_CACHE_MAX 0
|
||||||
|
# endif
|
||||||
|
# ifndef PNG_USER_CHUNK_MALLOC_MAX
|
||||||
|
# define PNG_USER_CHUNK_MALLOC_MAX 0
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This is used for 16 bit gamma tables - only the top level pointers are const,
|
/* This is used for 16 bit gamma tables - only the top level pointers are const,
|
||||||
* this could be changed:
|
* this could be changed:
|
||||||
*/
|
*/
|
||||||
@@ -426,6 +466,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
|
|||||||
#define PNG_BACKGROUND_IS_GRAY 0x800
|
#define PNG_BACKGROUND_IS_GRAY 0x800
|
||||||
#define PNG_HAVE_PNG_SIGNATURE 0x1000
|
#define PNG_HAVE_PNG_SIGNATURE 0x1000
|
||||||
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
|
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
|
||||||
|
#define PNG_HAVE_iCCP 0x4000
|
||||||
|
|
||||||
/* Flags for the transformations the PNG library does on the image data */
|
/* Flags for the transformations the PNG library does on the image data */
|
||||||
#define PNG_BGR 0x0001
|
#define PNG_BGR 0x0001
|
||||||
@@ -1218,10 +1259,8 @@ PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_uint_32 length));
|
png_uint_32 length));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
|
||||||
PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
|
PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
|
||||||
png_infop info_ptr, png_uint_32 length));
|
png_infop info_ptr, png_uint_32 length));
|
||||||
#endif
|
|
||||||
|
|
||||||
PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
|
PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
|
||||||
png_uint_32 chunk_name));
|
png_uint_32 chunk_name));
|
||||||
@@ -1355,6 +1394,13 @@ PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr,
|
|||||||
int color_type, int interlace_type, int compression_type,
|
int color_type, int interlace_type, int compression_type,
|
||||||
int filter_type));
|
int filter_type));
|
||||||
|
|
||||||
|
/* Added at libpng version 1.5.10 */
|
||||||
|
#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \
|
||||||
|
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
|
||||||
|
PNG_EXTERN void png_do_check_palette_indexes PNGARG((png_structp png_ptr,
|
||||||
|
png_row_infop row_info));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Free all memory used by the read (old method - NOT DLL EXPORTED) */
|
/* Free all memory used by the read (old method - NOT DLL EXPORTED) */
|
||||||
PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr,
|
PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr,
|
||||||
png_infop info_ptr, png_infop end_info_ptr));
|
png_infop info_ptr, png_infop end_info_ptr));
|
||||||
|
|||||||
Vendored
+9
-12
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngread.c - read a PNG file
|
/* pngread.c - read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.7 [December 15, 2011]
|
* Last changed in libpng 1.5.10 [March 8, 2012]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -67,15 +67,11 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
png_ptr->user_width_max = PNG_USER_WIDTH_MAX;
|
png_ptr->user_width_max = PNG_USER_WIDTH_MAX;
|
||||||
png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;
|
png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;
|
||||||
|
|
||||||
# ifdef PNG_USER_CHUNK_CACHE_MAX
|
|
||||||
/* Added at libpng-1.2.43 and 1.4.0 */
|
/* Added at libpng-1.2.43 and 1.4.0 */
|
||||||
png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;
|
png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifdef PNG_SET_USER_CHUNK_MALLOC_MAX
|
|
||||||
/* Added at libpng-1.2.43 and 1.4.1 */
|
/* Added at libpng-1.2.43 and 1.4.1 */
|
||||||
png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX;
|
png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX;
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_SETJMP_SUPPORTED
|
#ifdef PNG_SETJMP_SUPPORTED
|
||||||
@@ -805,6 +801,13 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
|
|
||||||
png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */
|
png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */
|
||||||
|
|
||||||
|
#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
|
/* Report invalid palette index; added at libng-1.5.10 */
|
||||||
|
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
|
||||||
|
png_ptr->num_palette_max > png_ptr->num_palette)
|
||||||
|
png_benign_error(png_ptr, "Read palette index exceeding num_palette");
|
||||||
|
#endif
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
png_uint_32 length = png_read_chunk_header(png_ptr);
|
png_uint_32 length = png_read_chunk_header(png_ptr);
|
||||||
@@ -1070,12 +1073,6 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_free(png_ptr, png_ptr->save_buffer);
|
png_free(png_ptr, png_ptr->save_buffer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
|
||||||
#ifdef PNG_TEXT_SUPPORTED
|
|
||||||
png_free(png_ptr, png_ptr->current_text);
|
|
||||||
#endif /* PNG_TEXT_SUPPORTED */
|
|
||||||
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
|
||||||
|
|
||||||
/* Save the important info out of the png_struct, in case it is
|
/* Save the important info out of the png_struct, in case it is
|
||||||
* being used again.
|
* being used again.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Vendored
+16
-6
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.7 [December 15, 2011]
|
* Last changed in libpng 1.5.11 [June 14, 2012]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -1770,8 +1770,8 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
int num_palette = png_ptr->num_palette;
|
int num_palette = png_ptr->num_palette;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/*NOTE: there are other transformations that should probably be in here
|
/* NOTE: there are other transformations that should probably be in
|
||||||
* too.
|
* here too.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < num_palette; i++)
|
for (i = 0; i < num_palette; i++)
|
||||||
{
|
{
|
||||||
@@ -1830,12 +1830,15 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
|
|
||||||
#ifdef PNG_READ_SHIFT_SUPPORTED
|
#ifdef PNG_READ_SHIFT_SUPPORTED
|
||||||
if ((png_ptr->transformations & PNG_SHIFT) &&
|
if ((png_ptr->transformations & PNG_SHIFT) &&
|
||||||
|
!(png_ptr->transformations & PNG_EXPAND) &&
|
||||||
(png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))
|
(png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int istop = png_ptr->num_palette;
|
int istop = png_ptr->num_palette;
|
||||||
int shift = 8 - png_ptr->sig_bit.red;
|
int shift = 8 - png_ptr->sig_bit.red;
|
||||||
|
|
||||||
|
png_ptr->transformations &= ~PNG_SHIFT;
|
||||||
|
|
||||||
/* significant bits can be in the range 1 to 7 for a meaninful result, if
|
/* significant bits can be in the range 1 to 7 for a meaninful result, if
|
||||||
* the number of significant bits is 0 then no shift is done (this is an
|
* the number of significant bits is 0 then no shift is done (this is an
|
||||||
* error condition which is silently ignored.)
|
* error condition which is silently ignored.)
|
||||||
@@ -2274,7 +2277,7 @@ png_do_read_transformations(png_structp png_ptr, png_row_infop row_info)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
||||||
/*NOTE: moved here in 1.5.4 (from much later in this list.) */
|
/* NOTE: moved here in 1.5.4 (from much later in this list.) */
|
||||||
if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
|
if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
|
||||||
(png_ptr->mode & PNG_BACKGROUND_IS_GRAY))
|
(png_ptr->mode & PNG_BACKGROUND_IS_GRAY))
|
||||||
png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
|
png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
|
||||||
@@ -2296,6 +2299,13 @@ png_do_read_transformations(png_structp png_ptr, png_row_infop row_info)
|
|||||||
png_do_unpack(row_info, png_ptr->row_buf + 1);
|
png_do_unpack(row_info, png_ptr->row_buf + 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
|
/* Added at libpng-1.5.10 */
|
||||||
|
if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
|
||||||
|
png_ptr->num_palette_max >= 0)
|
||||||
|
png_do_check_palette_indexes(png_ptr, row_info);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_BGR_SUPPORTED
|
#ifdef PNG_READ_BGR_SUPPORTED
|
||||||
if (png_ptr->transformations & PNG_BGR)
|
if (png_ptr->transformations & PNG_BGR)
|
||||||
png_do_bgr(row_info, png_ptr->row_buf + 1);
|
png_do_bgr(row_info, png_ptr->row_buf + 1);
|
||||||
@@ -3293,7 +3303,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
|
|||||||
if (red != green || red != blue)
|
if (red != green || red != blue)
|
||||||
{
|
{
|
||||||
rgb_error |= 1;
|
rgb_error |= 1;
|
||||||
/*NOTE: this is the historical approach which simply
|
/* NOTE: this is the historical approach which simply
|
||||||
* truncates the results.
|
* truncates the results.
|
||||||
*/
|
*/
|
||||||
*(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15);
|
*(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15);
|
||||||
|
|||||||
Vendored
+12
-11
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrutil.c - utilities to read a PNG file
|
/* pngrutil.c - utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.9 [February 18, 2012]
|
* Last changed in libpng 1.5.10 [March 8, 2012]
|
||||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -434,14 +434,12 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
|||||||
*/
|
*/
|
||||||
if (prefix_size >= (~(png_size_t)0) - 1 ||
|
if (prefix_size >= (~(png_size_t)0) - 1 ||
|
||||||
expanded_size >= (~(png_size_t)0) - 1 - prefix_size
|
expanded_size >= (~(png_size_t)0) - 1 - prefix_size
|
||||||
#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
|
#ifdef PNG_USER_LIMITS_SUPPORTED
|
||||||
|| (png_ptr->user_chunk_malloc_max &&
|
|| (png_ptr->user_chunk_malloc_max &&
|
||||||
(prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1))
|
(prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1))
|
||||||
#else
|
#else
|
||||||
# ifdef PNG_USER_CHUNK_MALLOC_MAX
|
|
||||||
|| ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
|
|| ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
|
||||||
prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)
|
prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
png_warning(png_ptr, "Exceeded size limit while expanding chunk");
|
png_warning(png_ptr, "Exceeded size limit while expanding chunk");
|
||||||
@@ -1259,13 +1257,16 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
/* Should be an error, but we can cope with it */
|
/* Should be an error, but we can cope with it */
|
||||||
png_warning(png_ptr, "Out of place iCCP chunk");
|
png_warning(png_ptr, "Out of place iCCP chunk");
|
||||||
|
|
||||||
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP))
|
if ((png_ptr->mode & PNG_HAVE_iCCP) || (info_ptr != NULL &&
|
||||||
|
(info_ptr->valid & (PNG_INFO_iCCP|PNG_INFO_sRGB))))
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Duplicate iCCP chunk");
|
png_warning(png_ptr, "Duplicate iCCP chunk");
|
||||||
png_crc_finish(png_ptr, length);
|
png_crc_finish(png_ptr, length);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
png_ptr->mode |= PNG_HAVE_iCCP;
|
||||||
|
|
||||||
#ifdef PNG_MAX_MALLOC_64K
|
#ifdef PNG_MAX_MALLOC_64K
|
||||||
if (length > (png_uint_32)65535L)
|
if (length > (png_uint_32)65535L)
|
||||||
{
|
{
|
||||||
@@ -1795,16 +1796,16 @@ png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
num = length / 2 ;
|
if (length > 2*PNG_MAX_PALETTE_LENGTH ||
|
||||||
|
length != (unsigned int) (2*png_ptr->num_palette))
|
||||||
if (num != (unsigned int)png_ptr->num_palette || num >
|
|
||||||
(unsigned int)PNG_MAX_PALETTE_LENGTH)
|
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Incorrect hIST chunk length");
|
png_warning(png_ptr, "Incorrect hIST chunk length");
|
||||||
png_crc_finish(png_ptr, length);
|
png_crc_finish(png_ptr, length);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
num = length / 2 ;
|
||||||
|
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
png_byte buf[2];
|
png_byte buf[2];
|
||||||
@@ -3661,7 +3662,7 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
|
|||||||
|
|
||||||
#ifdef PNG_ARM_NEON
|
#ifdef PNG_ARM_NEON
|
||||||
|
|
||||||
#ifdef __linux__
|
#if defined __linux__ && !defined __ANDROID__
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <elf.h>
|
#include <elf.h>
|
||||||
#include <asm/hwcap.h>
|
#include <asm/hwcap.h>
|
||||||
@@ -3694,7 +3695,7 @@ static int png_have_hwcap(unsigned cap)
|
|||||||
static void
|
static void
|
||||||
png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
||||||
{
|
{
|
||||||
#ifdef __linux__
|
#if defined __linux__ && !defined __ANDROID__
|
||||||
if (!png_have_hwcap(HWCAP_NEON))
|
if (!png_have_hwcap(HWCAP_NEON))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Vendored
+34
-7
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.7 [December 15, 2011]
|
* Last changed in libpng 1.5.11 [June 14, 2012]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -149,7 +149,7 @@ png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
|
|||||||
* possible for 1/gamma to overflow the limit of 21474 and this means the
|
* possible for 1/gamma to overflow the limit of 21474 and this means the
|
||||||
* gamma value must be at least 5/100000 and hence at most 20000.0. For
|
* gamma value must be at least 5/100000 and hence at most 20000.0. For
|
||||||
* safety the limits here are a little narrower. The values are 0.00016 to
|
* safety the limits here are a little narrower. The values are 0.00016 to
|
||||||
* 6250.0, which are truly ridiculous gammma values (and will produce
|
* 6250.0, which are truly ridiculous gamma values (and will produce
|
||||||
* displays that are all black or all white.)
|
* displays that are all black or all white.)
|
||||||
*/
|
*/
|
||||||
if (file_gamma < 16 || file_gamma > 625000000)
|
if (file_gamma < 16 || file_gamma > 625000000)
|
||||||
@@ -692,24 +692,28 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr,
|
|||||||
*/
|
*/
|
||||||
if (info_ptr->num_text + num_text > info_ptr->max_text)
|
if (info_ptr->num_text + num_text > info_ptr->max_text)
|
||||||
{
|
{
|
||||||
|
int old_max_text = info_ptr->max_text;
|
||||||
|
int old_num_text = info_ptr->num_text;
|
||||||
|
|
||||||
if (info_ptr->text != NULL)
|
if (info_ptr->text != NULL)
|
||||||
{
|
{
|
||||||
png_textp old_text;
|
png_textp old_text;
|
||||||
int old_max;
|
|
||||||
|
|
||||||
old_max = info_ptr->max_text;
|
|
||||||
info_ptr->max_text = info_ptr->num_text + num_text + 8;
|
info_ptr->max_text = info_ptr->num_text + num_text + 8;
|
||||||
old_text = info_ptr->text;
|
old_text = info_ptr->text;
|
||||||
|
|
||||||
info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
|
info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
|
||||||
(png_size_t)(info_ptr->max_text * png_sizeof(png_text)));
|
(png_size_t)(info_ptr->max_text * png_sizeof(png_text)));
|
||||||
|
|
||||||
if (info_ptr->text == NULL)
|
if (info_ptr->text == NULL)
|
||||||
{
|
{
|
||||||
png_free(png_ptr, old_text);
|
/* Restore to previous condition */
|
||||||
|
info_ptr->max_text = old_max_text;
|
||||||
|
info_ptr->text = old_text;
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max *
|
png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max_text *
|
||||||
png_sizeof(png_text)));
|
png_sizeof(png_text)));
|
||||||
png_free(png_ptr, old_text);
|
png_free(png_ptr, old_text);
|
||||||
}
|
}
|
||||||
@@ -721,7 +725,12 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr,
|
|||||||
info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
|
info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
|
||||||
(png_size_t)(info_ptr->max_text * png_sizeof(png_text)));
|
(png_size_t)(info_ptr->max_text * png_sizeof(png_text)));
|
||||||
if (info_ptr->text == NULL)
|
if (info_ptr->text == NULL)
|
||||||
|
{
|
||||||
|
/* Restore to previous condition */
|
||||||
|
info_ptr->num_text = old_num_text;
|
||||||
|
info_ptr->max_text = old_max_text;
|
||||||
return(1);
|
return(1);
|
||||||
|
}
|
||||||
info_ptr->free_me |= PNG_FREE_TEXT;
|
info_ptr->free_me |= PNG_FREE_TEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1281,4 +1290,22 @@ png_set_benign_errors(png_structp png_ptr, int allowed)
|
|||||||
png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN;
|
png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN;
|
||||||
}
|
}
|
||||||
#endif /* PNG_BENIGN_ERRORS_SUPPORTED */
|
#endif /* PNG_BENIGN_ERRORS_SUPPORTED */
|
||||||
|
|
||||||
|
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
|
/* Whether to report invalid palette index; added at libng-1.5.10
|
||||||
|
* allowed - one of 0: disable; 1: enable
|
||||||
|
*/
|
||||||
|
void PNGAPI
|
||||||
|
png_set_check_for_invalid_index(png_structp png_ptr, int allowed)
|
||||||
|
{
|
||||||
|
png_debug(1, "in png_set_check_for_invalid_index");
|
||||||
|
|
||||||
|
if (allowed)
|
||||||
|
png_ptr->num_palette_max = 0;
|
||||||
|
|
||||||
|
else
|
||||||
|
png_ptr->num_palette_max = -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||||
|
|||||||
+8
-8
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngstruct.h - header file for PNG reference library
|
/* pngstruct.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -121,6 +121,12 @@ struct png_struct_def
|
|||||||
png_uint_32 crc; /* current chunk CRC value */
|
png_uint_32 crc; /* current chunk CRC value */
|
||||||
png_colorp palette; /* palette from the input file */
|
png_colorp palette; /* palette from the input file */
|
||||||
png_uint_16 num_palette; /* number of color entries in palette */
|
png_uint_16 num_palette; /* number of color entries in palette */
|
||||||
|
|
||||||
|
/* Added at libpng-1.5.10 */
|
||||||
|
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
|
int num_palette_max; /* maximum palette index found in IDAT */
|
||||||
|
#endif
|
||||||
|
|
||||||
png_uint_16 num_trans; /* number of transparency values */
|
png_uint_16 num_trans; /* number of transparency values */
|
||||||
png_byte compression; /* file compression type (always 0) */
|
png_byte compression; /* file compression type (always 0) */
|
||||||
png_byte filter; /* file filter type (always 0) */
|
png_byte filter; /* file filter type (always 0) */
|
||||||
@@ -211,13 +217,6 @@ struct png_struct_def
|
|||||||
int process_mode; /* what push library is currently doing */
|
int process_mode; /* what push library is currently doing */
|
||||||
int cur_palette; /* current push library palette index */
|
int cur_palette; /* current push library palette index */
|
||||||
|
|
||||||
# ifdef PNG_TEXT_SUPPORTED
|
|
||||||
png_size_t current_text_size; /* current size of text input data */
|
|
||||||
png_size_t current_text_left; /* how much text left to read in input */
|
|
||||||
png_charp current_text; /* current text chunk buffer */
|
|
||||||
png_charp current_text_ptr; /* current location in current_text */
|
|
||||||
# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */
|
|
||||||
|
|
||||||
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
||||||
|
|
||||||
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
|
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
|
||||||
@@ -249,6 +248,7 @@ struct png_struct_def
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_TIME_RFC1123_SUPPORTED
|
#ifdef PNG_TIME_RFC1123_SUPPORTED
|
||||||
|
/* This is going to be unused in libpng16 and removed from libpng17 */
|
||||||
char time_buffer[29]; /* String to hold RFC 1123 time text */
|
char time_buffer[29]; /* String to hold RFC 1123 time text */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Vendored
-1820
File diff suppressed because it is too large
Load Diff
Vendored
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 8.5 KiB |
Vendored
+105
-2
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.4 [July 7, 2011]
|
* Last changed in libpng 1.5.11 [June 14, 2012]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -619,6 +619,109 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
|
|||||||
}
|
}
|
||||||
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
|
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
|
||||||
|
|
||||||
|
#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \
|
||||||
|
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
|
||||||
|
/* Added at libpng-1.5.10 */
|
||||||
|
void /* PRIVATE */
|
||||||
|
png_do_check_palette_indexes(png_structp png_ptr, png_row_infop row_info)
|
||||||
|
{
|
||||||
|
if (png_ptr->num_palette < (1 << row_info->bit_depth) &&
|
||||||
|
png_ptr->num_palette > 0) /* num_palette can be 0 in MNG files */
|
||||||
|
{
|
||||||
|
/* Calculations moved outside switch in an attempt to stop different
|
||||||
|
* compiler warnings. 'padding' is in *bits* within the last byte, it is
|
||||||
|
* an 'int' because pixel_depth becomes an 'int' in the expression below,
|
||||||
|
* and this calculation is used because it avoids warnings that other
|
||||||
|
* forms produced on either GCC or MSVC.
|
||||||
|
*/
|
||||||
|
int padding = (-row_info->pixel_depth * row_info->width) & 7;
|
||||||
|
png_bytep rp = png_ptr->row_buf + row_info->rowbytes;
|
||||||
|
|
||||||
|
switch (row_info->bit_depth)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
/* in this case, all bytes must be 0 so we don't need
|
||||||
|
* to unpack the pixels except for the rightmost one.
|
||||||
|
*/
|
||||||
|
for (; rp > png_ptr->row_buf; rp--)
|
||||||
|
{
|
||||||
|
if (*rp >> padding != 0)
|
||||||
|
png_ptr->num_palette_max = 1;
|
||||||
|
padding = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
for (; rp > png_ptr->row_buf; rp--)
|
||||||
|
{
|
||||||
|
int i = ((*rp >> padding) & 0x03);
|
||||||
|
|
||||||
|
if (i > png_ptr->num_palette_max)
|
||||||
|
png_ptr->num_palette_max = i;
|
||||||
|
|
||||||
|
i = (((*rp >> padding) >> 2) & 0x03);
|
||||||
|
|
||||||
|
if (i > png_ptr->num_palette_max)
|
||||||
|
png_ptr->num_palette_max = i;
|
||||||
|
|
||||||
|
i = (((*rp >> padding) >> 4) & 0x03);
|
||||||
|
|
||||||
|
if (i > png_ptr->num_palette_max)
|
||||||
|
png_ptr->num_palette_max = i;
|
||||||
|
|
||||||
|
i = (((*rp >> padding) >> 6) & 0x03);
|
||||||
|
|
||||||
|
if (i > png_ptr->num_palette_max)
|
||||||
|
png_ptr->num_palette_max = i;
|
||||||
|
|
||||||
|
padding = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
for (; rp > png_ptr->row_buf; rp--)
|
||||||
|
{
|
||||||
|
int i = ((*rp >> padding) & 0x0f);
|
||||||
|
|
||||||
|
if (i > png_ptr->num_palette_max)
|
||||||
|
png_ptr->num_palette_max = i;
|
||||||
|
|
||||||
|
i = (((*rp >> padding) >> 4) & 0x0f);
|
||||||
|
|
||||||
|
if (i > png_ptr->num_palette_max)
|
||||||
|
png_ptr->num_palette_max = i;
|
||||||
|
|
||||||
|
padding = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 8:
|
||||||
|
{
|
||||||
|
for (; rp > png_ptr->row_buf; rp--)
|
||||||
|
{
|
||||||
|
if (*rp > png_ptr->num_palette_max)
|
||||||
|
png_ptr->num_palette_max = (int) *rp;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED */
|
||||||
|
|
||||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
||||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||||
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
|
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
|
||||||
|
|||||||
Vendored
+15
-2
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngwrite.c - general routines to write a PNG file
|
/* pngwrite.c - general routines to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.7 [December 15, 2011]
|
* Last changed in libpng 1.5.11 [June 14, 2012]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -305,6 +305,11 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
if (!(png_ptr->mode & PNG_HAVE_IDAT))
|
if (!(png_ptr->mode & PNG_HAVE_IDAT))
|
||||||
png_error(png_ptr, "No IDATs written into file");
|
png_error(png_ptr, "No IDATs written into file");
|
||||||
|
|
||||||
|
#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
|
if (png_ptr->num_palette_max > png_ptr->num_palette)
|
||||||
|
png_benign_error(png_ptr, "Wrote palette index exceeding num_palette");
|
||||||
|
#endif
|
||||||
|
|
||||||
/* See if user wants us to write information chunks */
|
/* See if user wants us to write information chunks */
|
||||||
if (info_ptr != NULL)
|
if (info_ptr != NULL)
|
||||||
{
|
{
|
||||||
@@ -798,6 +803,14 @@ png_write_row(png_structp png_ptr, png_const_bytep row)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Added at libpng-1.5.10 */
|
||||||
|
#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
|
/* Check for out-of-range palette index */
|
||||||
|
if (row_info.color_type == PNG_COLOR_TYPE_PALETTE &&
|
||||||
|
png_ptr->num_palette_max >= 0)
|
||||||
|
png_do_check_palette_indexes(png_ptr, &row_info);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Find a filter if necessary, filter the row and write it out. */
|
/* Find a filter if necessary, filter the row and write it out. */
|
||||||
png_write_find_filter(png_ptr, &row_info);
|
png_write_find_filter(png_ptr, &row_info);
|
||||||
|
|
||||||
|
|||||||
Vendored
+9
-10
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngwutil.c - utilities to write a PNG file
|
/* pngwutil.c - utilities to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.10 [March 8, 2012]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -569,14 +569,15 @@ png_text_compress(png_structp png_ptr,
|
|||||||
|
|
||||||
/* Ship the compressed text out via chunk writes */
|
/* Ship the compressed text out via chunk writes */
|
||||||
static void /* PRIVATE */
|
static void /* PRIVATE */
|
||||||
png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
|
png_write_compressed_data_out(png_structp png_ptr, compression_state *comp,
|
||||||
|
png_size_t data_len)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Handle the no-compression case */
|
/* Handle the no-compression case */
|
||||||
if (comp->input)
|
if (comp->input)
|
||||||
{
|
{
|
||||||
png_write_chunk_data(png_ptr, comp->input, comp->input_len);
|
png_write_chunk_data(png_ptr, comp->input, data_len);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -585,7 +586,7 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
|
|||||||
/* The zbuf_size test is because the code below doesn't work if zbuf_size is
|
/* The zbuf_size test is because the code below doesn't work if zbuf_size is
|
||||||
* '1'; simply skip it to avoid memory overwrite.
|
* '1'; simply skip it to avoid memory overwrite.
|
||||||
*/
|
*/
|
||||||
if (comp->input_len >= 2 && comp->input_len < 16384 && png_ptr->zbuf_size > 1)
|
if (data_len >= 2 && comp->input_len < 16384 && png_ptr->zbuf_size > 1)
|
||||||
{
|
{
|
||||||
unsigned int z_cmf; /* zlib compression method and flags */
|
unsigned int z_cmf; /* zlib compression method and flags */
|
||||||
|
|
||||||
@@ -1164,8 +1165,7 @@ png_write_iCCP(png_structp png_ptr, png_const_charp name, int compression_type,
|
|||||||
|
|
||||||
if (profile_len)
|
if (profile_len)
|
||||||
{
|
{
|
||||||
comp.input_len = profile_len;
|
png_write_compressed_data_out(png_ptr, &comp, profile_len);
|
||||||
png_write_compressed_data_out(png_ptr, &comp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
png_write_chunk_end(png_ptr);
|
png_write_chunk_end(png_ptr);
|
||||||
@@ -1735,8 +1735,7 @@ png_write_zTXt(png_structp png_ptr, png_const_charp key, png_const_charp text,
|
|||||||
png_write_chunk_data(png_ptr, &buf, (png_size_t)1);
|
png_write_chunk_data(png_ptr, &buf, (png_size_t)1);
|
||||||
|
|
||||||
/* Write the compressed data */
|
/* Write the compressed data */
|
||||||
comp.input_len = text_len;
|
png_write_compressed_data_out(png_ptr, &comp, text_len);
|
||||||
png_write_compressed_data_out(png_ptr, &comp);
|
|
||||||
|
|
||||||
/* Close the chunk */
|
/* Close the chunk */
|
||||||
png_write_chunk_end(png_ptr);
|
png_write_chunk_end(png_ptr);
|
||||||
@@ -1827,7 +1826,7 @@ png_write_iTXt(png_structp png_ptr, int compression, png_const_charp key,
|
|||||||
png_write_chunk_data(png_ptr, (lang_key ? (png_const_bytep)lang_key : cbuf),
|
png_write_chunk_data(png_ptr, (lang_key ? (png_const_bytep)lang_key : cbuf),
|
||||||
(png_size_t)(lang_key_len + 1));
|
(png_size_t)(lang_key_len + 1));
|
||||||
|
|
||||||
png_write_compressed_data_out(png_ptr, &comp);
|
png_write_compressed_data_out(png_ptr, &comp, text_len);
|
||||||
|
|
||||||
png_write_chunk_end(png_ptr);
|
png_write_chunk_end(png_ptr);
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
-1
@@ -89,7 +89,13 @@ endif(WIN32)
|
|||||||
|
|
||||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef -Wunused -Wsign-compare
|
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef -Wunused -Wsign-compare
|
||||||
-Wcast-align -Wshadow -Wno-maybe-uninitialized -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast)
|
-Wcast-align -Wshadow -Wno-maybe-uninitialized -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast)
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations -Wunused-parameter /wd4100 /wd4244 /wd4706 /wd4127 /wd4701 /wd4018 /wd4267 /wd4306 /wd4305 /wd4312 /wd4311)
|
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations -Wunused-parameter)
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4100 /wd4127 /wd4311 /wd4701 /wd4706) # vs2005
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244) # vs2008
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267 /wd4305 /wd4306) # vs2008 Win64
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4703) # vs2012
|
||||||
|
|
||||||
|
ocv_warnings_disable(CMAKE_C_FLAGS /wd4267 /wd4244 /wd4018)
|
||||||
|
|
||||||
if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
|
if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||||
|
|||||||
Vendored
+21
@@ -0,0 +1,21 @@
|
|||||||
|
Copyright (c) 1988-1997 Sam Leffler
|
||||||
|
Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, distribute, and sell this software and
|
||||||
|
its documentation for any purpose is hereby granted without fee, provided
|
||||||
|
that (i) the above copyright notices and this permission notice appear in
|
||||||
|
all copies of the software and related documentation, and (ii) the names of
|
||||||
|
Sam Leffler and Silicon Graphics may not be used in any advertising or
|
||||||
|
publicity relating to the software without the specific, prior written
|
||||||
|
permission of Sam Leffler and Silicon Graphics.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||||
|
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
||||||
|
ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||||
|
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||||
|
WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||||
|
LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||||
|
OF THIS SOFTWARE.
|
||||||
Vendored
+5753
File diff suppressed because it is too large
Load Diff
Vendored
+4
-4
@@ -325,8 +325,8 @@ _TIFFUInt64ToFloat(uint64 ui64)
|
|||||||
if (i.part.high >= 0) {
|
if (i.part.high >= 0) {
|
||||||
return (float)i.value;
|
return (float)i.value;
|
||||||
} else {
|
} else {
|
||||||
double df;
|
long double df;
|
||||||
df = (double)i.value;
|
df = (long double)i.value;
|
||||||
df += 18446744073709551616.0; /* adding 2**64 */
|
df += 18446744073709551616.0; /* adding 2**64 */
|
||||||
return (float)df;
|
return (float)df;
|
||||||
}
|
}
|
||||||
@@ -341,8 +341,8 @@ _TIFFUInt64ToDouble(uint64 ui64)
|
|||||||
if (i.part.high >= 0) {
|
if (i.part.high >= 0) {
|
||||||
return (double)i.value;
|
return (double)i.value;
|
||||||
} else {
|
} else {
|
||||||
double df;
|
long double df;
|
||||||
df = (double)i.value;
|
df = (long double)i.value;
|
||||||
df += 18446744073709551616.0; /* adding 2**64 */
|
df += 18446744073709551616.0; /* adding 2**64 */
|
||||||
return (double)df;
|
return (double)df;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+88
-36
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_dir.c,v 1.108 2012-02-01 01:51:00 fwarmerdam Exp $ */
|
/* $Id: tif_dir.c,v 1.113 2012-06-14 20:32:53 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@@ -122,6 +122,10 @@ setExtraSamples(TIFFDirectory* td, va_list ap, uint32* v)
|
|||||||
#undef EXTRASAMPLE_COREL_UNASSALPHA
|
#undef EXTRASAMPLE_COREL_UNASSALPHA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Confirm we have "samplesperpixel" ink names separated by \0. Returns
|
||||||
|
* zero if the ink names are not as expected.
|
||||||
|
*/
|
||||||
static uint32
|
static uint32
|
||||||
checkInkNamesString(TIFF* tif, uint32 slen, const char* s)
|
checkInkNamesString(TIFF* tif, uint32 slen, const char* s)
|
||||||
{
|
{
|
||||||
@@ -132,7 +136,7 @@ checkInkNamesString(TIFF* tif, uint32 slen, const char* s)
|
|||||||
const char* ep = s+slen;
|
const char* ep = s+slen;
|
||||||
const char* cp = s;
|
const char* cp = s;
|
||||||
for (; i > 0; i--) {
|
for (; i > 0; i--) {
|
||||||
for (; *cp != '\0'; cp++)
|
for (; cp < ep && *cp != '\0'; cp++) {}
|
||||||
if (cp >= ep)
|
if (cp >= ep)
|
||||||
goto bad;
|
goto bad;
|
||||||
cp++; /* skip \0 */
|
cp++; /* skip \0 */
|
||||||
@@ -157,8 +161,20 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
|||||||
int status = 1;
|
int status = 1;
|
||||||
uint32 v32, i, v;
|
uint32 v32, i, v;
|
||||||
char* s;
|
char* s;
|
||||||
|
const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY);
|
||||||
|
uint32 standard_tag = tag;
|
||||||
|
|
||||||
switch (tag) {
|
/*
|
||||||
|
* We want to force the custom code to be used for custom
|
||||||
|
* fields even if the tag happens to match a well known
|
||||||
|
* one - important for reinterpreted handling of standard
|
||||||
|
* tag values in custom directories (ie. EXIF)
|
||||||
|
*/
|
||||||
|
if (fip->field_bit == FIELD_CUSTOM) {
|
||||||
|
standard_tag = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (standard_tag) {
|
||||||
case TIFFTAG_SUBFILETYPE:
|
case TIFFTAG_SUBFILETYPE:
|
||||||
td->td_subfiletype = (uint32) va_arg(ap, uint32);
|
td->td_subfiletype = (uint32) va_arg(ap, uint32);
|
||||||
break;
|
break;
|
||||||
@@ -423,7 +439,6 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
|||||||
default: {
|
default: {
|
||||||
TIFFTagValue *tv;
|
TIFFTagValue *tv;
|
||||||
int tv_size, iCustom;
|
int tv_size, iCustom;
|
||||||
const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This can happen if multiple images are open with different
|
* This can happen if multiple images are open with different
|
||||||
@@ -550,31 +565,29 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fip->field_passcount
|
if (fip->field_tag == TIFFTAG_DOTRANGE
|
||||||
|
&& strcmp(fip->field_name,"DotRange") == 0) {
|
||||||
|
/* TODO: This is an evil exception and should not have been
|
||||||
|
handled this way ... likely best if we move it into
|
||||||
|
the directory structure with an explicit field in
|
||||||
|
libtiff 4.1 and assign it a FIELD_ value */
|
||||||
|
uint16 v[2];
|
||||||
|
v[0] = (uint16)va_arg(ap, int);
|
||||||
|
v[1] = (uint16)va_arg(ap, int);
|
||||||
|
_TIFFmemcpy(tv->value, &v, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (fip->field_passcount
|
||||||
|| fip->field_writecount == TIFF_VARIABLE
|
|| fip->field_writecount == TIFF_VARIABLE
|
||||||
|| fip->field_writecount == TIFF_VARIABLE2
|
|| fip->field_writecount == TIFF_VARIABLE2
|
||||||
|| fip->field_writecount == TIFF_SPP
|
|| fip->field_writecount == TIFF_SPP
|
||||||
|| tv->count > 1)
|
|| tv->count > 1) {
|
||||||
&& fip->field_tag != TIFFTAG_PAGENUMBER
|
|
||||||
&& fip->field_tag != TIFFTAG_HALFTONEHINTS
|
|
||||||
&& fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
|
|
||||||
&& fip->field_tag != TIFFTAG_DOTRANGE) {
|
|
||||||
_TIFFmemcpy(tv->value, va_arg(ap, void *),
|
_TIFFmemcpy(tv->value, va_arg(ap, void *),
|
||||||
tv->count * tv_size);
|
tv->count * tv_size);
|
||||||
} else {
|
} else {
|
||||||
/*
|
|
||||||
* XXX: The following loop required to handle
|
|
||||||
* TIFFTAG_PAGENUMBER, TIFFTAG_HALFTONEHINTS,
|
|
||||||
* TIFFTAG_YCBCRSUBSAMPLING and TIFFTAG_DOTRANGE tags.
|
|
||||||
* These tags are actually arrays and should be passed as
|
|
||||||
* array pointers to TIFFSetField() function, but actually
|
|
||||||
* passed as a list of separate values. This behaviour
|
|
||||||
* must be changed in the future!
|
|
||||||
*/
|
|
||||||
int i;
|
|
||||||
char *val = (char *)tv->value;
|
char *val = (char *)tv->value;
|
||||||
|
assert( tv->count == 1 );
|
||||||
|
|
||||||
for (i = 0; i < tv->count; i++, val += tv_size) {
|
|
||||||
switch (fip->field_type) {
|
switch (fip->field_type) {
|
||||||
case TIFF_BYTE:
|
case TIFF_BYTE:
|
||||||
case TIFF_UNDEFINED:
|
case TIFF_UNDEFINED:
|
||||||
@@ -650,7 +663,6 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (status) {
|
if (status) {
|
||||||
const TIFFField* fip=TIFFFieldWithTag(tif,tag);
|
const TIFFField* fip=TIFFFieldWithTag(tif,tag);
|
||||||
if (fip)
|
if (fip)
|
||||||
@@ -795,8 +807,20 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
|
|||||||
{
|
{
|
||||||
TIFFDirectory* td = &tif->tif_dir;
|
TIFFDirectory* td = &tif->tif_dir;
|
||||||
int ret_val = 1;
|
int ret_val = 1;
|
||||||
|
uint32 standard_tag = tag;
|
||||||
|
const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY);
|
||||||
|
|
||||||
switch (tag) {
|
/*
|
||||||
|
* We want to force the custom code to be used for custom
|
||||||
|
* fields even if the tag happens to match a well known
|
||||||
|
* one - important for reinterpreted handling of standard
|
||||||
|
* tag values in custom directories (ie. EXIF)
|
||||||
|
*/
|
||||||
|
if (fip->field_bit == FIELD_CUSTOM) {
|
||||||
|
standard_tag = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (standard_tag) {
|
||||||
case TIFFTAG_SUBFILETYPE:
|
case TIFFTAG_SUBFILETYPE:
|
||||||
*va_arg(ap, uint32*) = td->td_subfiletype;
|
*va_arg(ap, uint32*) = td->td_subfiletype;
|
||||||
break;
|
break;
|
||||||
@@ -971,8 +995,6 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
const TIFFField* fip =
|
|
||||||
TIFFFindField(tif, tag, TIFF_ANY);
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1013,24 +1035,26 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
|
|||||||
*va_arg(ap, uint16*) = (uint16)tv->count;
|
*va_arg(ap, uint16*) = (uint16)tv->count;
|
||||||
*va_arg(ap, void **) = tv->value;
|
*va_arg(ap, void **) = tv->value;
|
||||||
ret_val = 1;
|
ret_val = 1;
|
||||||
|
} else if (fip->field_tag == TIFFTAG_DOTRANGE
|
||||||
|
&& strcmp(fip->field_name,"DotRange") == 0) {
|
||||||
|
/* TODO: This is an evil exception and should not have been
|
||||||
|
handled this way ... likely best if we move it into
|
||||||
|
the directory structure with an explicit field in
|
||||||
|
libtiff 4.1 and assign it a FIELD_ value */
|
||||||
|
*va_arg(ap, uint16*) = ((uint16 *)tv->value)[0];
|
||||||
|
*va_arg(ap, uint16*) = ((uint16 *)tv->value)[1];
|
||||||
|
ret_val = 1;
|
||||||
} else {
|
} else {
|
||||||
if ((fip->field_type == TIFF_ASCII
|
if (fip->field_type == TIFF_ASCII
|
||||||
|| fip->field_readcount == TIFF_VARIABLE
|
|| fip->field_readcount == TIFF_VARIABLE
|
||||||
|| fip->field_readcount == TIFF_VARIABLE2
|
|| fip->field_readcount == TIFF_VARIABLE2
|
||||||
|| fip->field_readcount == TIFF_SPP
|
|| fip->field_readcount == TIFF_SPP
|
||||||
|| tv->count > 1)
|
|| tv->count > 1) {
|
||||||
&& fip->field_tag != TIFFTAG_PAGENUMBER
|
|
||||||
&& fip->field_tag != TIFFTAG_HALFTONEHINTS
|
|
||||||
&& fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
|
|
||||||
&& fip->field_tag != TIFFTAG_DOTRANGE) {
|
|
||||||
*va_arg(ap, void **) = tv->value;
|
*va_arg(ap, void **) = tv->value;
|
||||||
ret_val = 1;
|
ret_val = 1;
|
||||||
} else {
|
} else {
|
||||||
int j;
|
|
||||||
char *val = (char *)tv->value;
|
char *val = (char *)tv->value;
|
||||||
|
assert( tv->count == 1 );
|
||||||
for (j = 0; j < tv->count;
|
|
||||||
j++, val += _TIFFDataSize(tv->info->field_type)) {
|
|
||||||
switch (fip->field_type) {
|
switch (fip->field_type) {
|
||||||
case TIFF_BYTE:
|
case TIFF_BYTE:
|
||||||
case TIFF_UNDEFINED:
|
case TIFF_UNDEFINED:
|
||||||
@@ -1093,7 +1117,6 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1214,6 +1237,35 @@ TIFFCreateDirectory(TIFF* tif)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
TIFFCreateCustomDirectory(TIFF* tif, const TIFFFieldArray* infoarray)
|
||||||
|
{
|
||||||
|
TIFFDefaultDirectory(tif);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Reset the field definitions to match the application provided list.
|
||||||
|
* Hopefully TIFFDefaultDirectory() won't have done anything irreversable
|
||||||
|
* based on it's assumption this is an image directory.
|
||||||
|
*/
|
||||||
|
_TIFFSetupFields(tif, infoarray);
|
||||||
|
|
||||||
|
tif->tif_diroff = 0;
|
||||||
|
tif->tif_nextdiroff = 0;
|
||||||
|
tif->tif_curoff = 0;
|
||||||
|
tif->tif_row = (uint32) -1;
|
||||||
|
tif->tif_curstrip = (uint32) -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
TIFFCreateEXIFDirectory(TIFF* tif)
|
||||||
|
{
|
||||||
|
const TIFFFieldArray* exifFieldArray;
|
||||||
|
exifFieldArray = _TIFFGetExifFields();
|
||||||
|
return TIFFCreateCustomDirectory(tif, exifFieldArray);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup a default directory structure.
|
* Setup a default directory structure.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Vendored
+2
-1
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_fax3.c,v 1.72 2010-06-09 17:17:13 bfriesen Exp $ */
|
/* $Id: tif_fax3.c,v 1.73 2012-06-13 00:27:20 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1990-1997 Sam Leffler
|
* Copyright (c) 1990-1997 Sam Leffler
|
||||||
@@ -526,6 +526,7 @@ Fax3SetupState(TIFF* tif)
|
|||||||
"for Group 3/4 run arrays");
|
"for Group 3/4 run arrays");
|
||||||
if (dsp->runs == NULL)
|
if (dsp->runs == NULL)
|
||||||
return (0);
|
return (0);
|
||||||
|
memset( dsp->runs, 0, TIFFSafeMultiply(uint32,nruns,2));
|
||||||
dsp->curruns = dsp->runs;
|
dsp->curruns = dsp->runs;
|
||||||
if (needsRefLine)
|
if (needsRefLine)
|
||||||
dsp->refruns = dsp->runs + nruns;
|
dsp->refruns = dsp->runs + nruns;
|
||||||
|
|||||||
Vendored
+67
-5
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_getimage.c,v 1.78 2011-02-23 21:46:09 fwarmerdam Exp $ */
|
/* $Id: tif_getimage.c,v 1.82 2012-06-06 00:17:49 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1991-1997 Sam Leffler
|
* Copyright (c) 1991-1997 Sam Leffler
|
||||||
@@ -692,6 +692,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
|||||||
unsigned char* p2;
|
unsigned char* p2;
|
||||||
unsigned char* pa;
|
unsigned char* pa;
|
||||||
tmsize_t tilesize;
|
tmsize_t tilesize;
|
||||||
|
tmsize_t bufsize;
|
||||||
int32 fromskew, toskew;
|
int32 fromskew, toskew;
|
||||||
int alpha = img->alpha;
|
int alpha = img->alpha;
|
||||||
uint32 nrow;
|
uint32 nrow;
|
||||||
@@ -699,12 +700,17 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
|||||||
int colorchannels;
|
int colorchannels;
|
||||||
|
|
||||||
tilesize = TIFFTileSize(tif);
|
tilesize = TIFFTileSize(tif);
|
||||||
buf = (unsigned char*) _TIFFmalloc((alpha?4:3)*tilesize);
|
bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,tilesize);
|
||||||
|
if (bufsize == 0) {
|
||||||
|
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtTileSeparate");
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
buf = (unsigned char*) _TIFFmalloc(bufsize);
|
||||||
if (buf == 0) {
|
if (buf == 0) {
|
||||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "No space for tile buffer");
|
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "No space for tile buffer");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
_TIFFmemset(buf, 0, (alpha?4:3)*tilesize);
|
_TIFFmemset(buf, 0, bufsize);
|
||||||
p0 = buf;
|
p0 = buf;
|
||||||
p1 = p0 + tilesize;
|
p1 = p0 + tilesize;
|
||||||
p2 = p1 + tilesize;
|
p2 = p1 + tilesize;
|
||||||
@@ -917,17 +923,23 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
|||||||
uint32 rowsperstrip, offset_row;
|
uint32 rowsperstrip, offset_row;
|
||||||
uint32 imagewidth = img->width;
|
uint32 imagewidth = img->width;
|
||||||
tmsize_t stripsize;
|
tmsize_t stripsize;
|
||||||
|
tmsize_t bufsize;
|
||||||
int32 fromskew, toskew;
|
int32 fromskew, toskew;
|
||||||
int alpha = img->alpha;
|
int alpha = img->alpha;
|
||||||
int ret = 1, flip, colorchannels;
|
int ret = 1, flip, colorchannels;
|
||||||
|
|
||||||
stripsize = TIFFStripSize(tif);
|
stripsize = TIFFStripSize(tif);
|
||||||
p0 = buf = (unsigned char *)_TIFFmalloc((alpha?4:3)*stripsize);
|
bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,stripsize);
|
||||||
|
if (bufsize == 0) {
|
||||||
|
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtStripSeparate");
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
p0 = buf = (unsigned char *)_TIFFmalloc(bufsize);
|
||||||
if (buf == 0) {
|
if (buf == 0) {
|
||||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for tile buffer");
|
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for tile buffer");
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
_TIFFmemset(buf, 0, (alpha?4:3)*stripsize);
|
_TIFFmemset(buf, 0, bufsize);
|
||||||
p1 = p0 + stripsize;
|
p1 = p0 + stripsize;
|
||||||
p2 = p1 + stripsize;
|
p2 = p1 + stripsize;
|
||||||
pa = (alpha?(p2+stripsize):NULL);
|
pa = (alpha?(p2+stripsize):NULL);
|
||||||
@@ -1196,6 +1208,26 @@ DECLAREContigPutFunc(putgreytile)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 8-bit greyscale with associated alpha => colormap/RGBA
|
||||||
|
*/
|
||||||
|
DECLAREContigPutFunc(putagreytile)
|
||||||
|
{
|
||||||
|
int samplesperpixel = img->samplesperpixel;
|
||||||
|
uint32** BWmap = img->BWmap;
|
||||||
|
|
||||||
|
(void) y;
|
||||||
|
while (h-- > 0) {
|
||||||
|
for (x = w; x-- > 0;)
|
||||||
|
{
|
||||||
|
*cp++ = BWmap[*pp][0] & (*(pp+1) << 24 | ~A1);
|
||||||
|
pp += samplesperpixel;
|
||||||
|
}
|
||||||
|
cp += toskew;
|
||||||
|
pp += fromskew;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 16-bit greyscale => colormap/RGB
|
* 16-bit greyscale => colormap/RGB
|
||||||
*/
|
*/
|
||||||
@@ -1494,6 +1526,26 @@ DECLARESepPutFunc(putRGBAAseparate8bittile)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 8-bit unpacked CMYK samples => RGBA
|
||||||
|
*/
|
||||||
|
DECLARESepPutFunc(putCMYKseparate8bittile)
|
||||||
|
{
|
||||||
|
(void) img; (void) y;
|
||||||
|
while (h-- > 0) {
|
||||||
|
uint32 rv, gv, bv, kv;
|
||||||
|
for (x = w; x-- > 0;) {
|
||||||
|
kv = 255 - *a++;
|
||||||
|
rv = (kv*(255-*r++))/255;
|
||||||
|
gv = (kv*(255-*g++))/255;
|
||||||
|
bv = (kv*(255-*b++))/255;
|
||||||
|
*cp++ = PACK4(rv,gv,bv,255);
|
||||||
|
}
|
||||||
|
SKEW4(r, g, b, a, fromskew);
|
||||||
|
cp += toskew;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 8-bit unpacked samples => RGBA w/ unassociated alpha
|
* 8-bit unpacked samples => RGBA w/ unassociated alpha
|
||||||
*/
|
*/
|
||||||
@@ -2461,6 +2513,9 @@ PickContigCase(TIFFRGBAImage* img)
|
|||||||
img->put.contig = put16bitbwtile;
|
img->put.contig = put16bitbwtile;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
|
if (img->alpha && img->samplesperpixel == 2)
|
||||||
|
img->put.contig = putagreytile;
|
||||||
|
else
|
||||||
img->put.contig = putgreytile;
|
img->put.contig = putgreytile;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
@@ -2576,6 +2631,13 @@ PickSeparateCase(TIFFRGBAImage* img)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PHOTOMETRIC_SEPARATED:
|
||||||
|
if (img->bitspersample == 8 && img->samplesperpixel == 4)
|
||||||
|
{
|
||||||
|
img->alpha = 1; // Not alpha, but seems like the only way to get 4th band
|
||||||
|
img->put.separate = putCMYKseparate8bittile;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case PHOTOMETRIC_YCBCR:
|
case PHOTOMETRIC_YCBCR:
|
||||||
if ((img->bitspersample==8) && (img->samplesperpixel==3))
|
if ((img->bitspersample==8) && (img->samplesperpixel==3))
|
||||||
{
|
{
|
||||||
|
|||||||
Vendored
+12
-47
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_jpeg.c,v 1.105 2012-02-01 01:51:00 fwarmerdam Exp $ */
|
/* $Id: tif_jpeg.c,v 1.108 2012-06-05 03:24:30 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994-1997 Sam Leffler
|
* Copyright (c) 1994-1997 Sam Leffler
|
||||||
@@ -1095,51 +1095,14 @@ JPEGPreDecode(TIFF* tif, uint16 s)
|
|||||||
/* Component 0 should have expected sampling factors */
|
/* Component 0 should have expected sampling factors */
|
||||||
if (sp->cinfo.d.comp_info[0].h_samp_factor != sp->h_sampling ||
|
if (sp->cinfo.d.comp_info[0].h_samp_factor != sp->h_sampling ||
|
||||||
sp->cinfo.d.comp_info[0].v_samp_factor != sp->v_sampling) {
|
sp->cinfo.d.comp_info[0].v_samp_factor != sp->v_sampling) {
|
||||||
TIFFWarningExt(tif->tif_clientdata, module,
|
TIFFErrorExt(tif->tif_clientdata, module,
|
||||||
"Improper JPEG sampling factors %d,%d\n"
|
"Improper JPEG sampling factors %d,%d\n"
|
||||||
"Apparently should be %d,%d.",
|
"Apparently should be %d,%d.",
|
||||||
sp->cinfo.d.comp_info[0].h_samp_factor,
|
sp->cinfo.d.comp_info[0].h_samp_factor,
|
||||||
sp->cinfo.d.comp_info[0].v_samp_factor,
|
sp->cinfo.d.comp_info[0].v_samp_factor,
|
||||||
sp->h_sampling, sp->v_sampling);
|
sp->h_sampling, sp->v_sampling);
|
||||||
|
|
||||||
/*
|
|
||||||
* There are potential security issues here
|
|
||||||
* for decoders that have already allocated
|
|
||||||
* buffers based on the expected sampling
|
|
||||||
* factors. Lets check the sampling factors
|
|
||||||
* dont exceed what we were expecting.
|
|
||||||
*/
|
|
||||||
if (sp->cinfo.d.comp_info[0].h_samp_factor
|
|
||||||
> sp->h_sampling
|
|
||||||
|| sp->cinfo.d.comp_info[0].v_samp_factor
|
|
||||||
> sp->v_sampling) {
|
|
||||||
TIFFErrorExt(tif->tif_clientdata,
|
|
||||||
module,
|
|
||||||
"Cannot honour JPEG sampling factors"
|
|
||||||
" that exceed those specified.");
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* XXX: Files written by the Intergraph software
|
|
||||||
* has different sampling factors stored in the
|
|
||||||
* TIFF tags and in the JPEG structures. We will
|
|
||||||
* try to deduce Intergraph files by the presense
|
|
||||||
* of the tag 33918.
|
|
||||||
*/
|
|
||||||
if (!TIFFFindField(tif, 33918, TIFF_ANY)) {
|
|
||||||
TIFFWarningExt(tif->tif_clientdata, module,
|
|
||||||
"Decompressor will try reading with "
|
|
||||||
"sampling %d,%d.",
|
|
||||||
sp->cinfo.d.comp_info[0].h_samp_factor,
|
|
||||||
sp->cinfo.d.comp_info[0].v_samp_factor);
|
|
||||||
|
|
||||||
sp->h_sampling = (uint16)
|
|
||||||
sp->cinfo.d.comp_info[0].h_samp_factor;
|
|
||||||
sp->v_sampling = (uint16)
|
|
||||||
sp->cinfo.d.comp_info[0].v_samp_factor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Rest should have sampling factors 1,1 */
|
/* Rest should have sampling factors 1,1 */
|
||||||
for (ci = 1; ci < sp->cinfo.d.num_components; ci++) {
|
for (ci = 1; ci < sp->cinfo.d.num_components; ci++) {
|
||||||
if (sp->cinfo.d.comp_info[ci].h_samp_factor != 1 ||
|
if (sp->cinfo.d.comp_info[ci].h_samp_factor != 1 ||
|
||||||
@@ -1362,7 +1325,7 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
|
|||||||
jpeg_component_info *compptr;
|
jpeg_component_info *compptr;
|
||||||
int ci, clumpoffset;
|
int ci, clumpoffset;
|
||||||
|
|
||||||
if( cc < sp->bytesperline * sp->v_sampling ) {
|
if( cc < sp->bytesperline ) {
|
||||||
TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw",
|
TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw",
|
||||||
"application buffer not large enough for all data.");
|
"application buffer not large enough for all data.");
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1389,12 +1352,17 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
|
|||||||
|
|
||||||
for (ypos = 0; ypos < vsamp; ypos++) {
|
for (ypos = 0; ypos < vsamp; ypos++) {
|
||||||
JSAMPLE *inptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
|
JSAMPLE *inptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
|
||||||
|
JDIMENSION nclump;
|
||||||
#if defined(JPEG_LIB_MK1_OR_12BIT)
|
#if defined(JPEG_LIB_MK1_OR_12BIT)
|
||||||
JSAMPLE *outptr = (JSAMPLE*)tmpbuf + clumpoffset;
|
JSAMPLE *outptr = (JSAMPLE*)tmpbuf + clumpoffset;
|
||||||
#else
|
#else
|
||||||
JSAMPLE *outptr = (JSAMPLE*)buf + clumpoffset;
|
JSAMPLE *outptr = (JSAMPLE*)buf + clumpoffset;
|
||||||
|
if (cc < clumpoffset + samples_per_clump*(clumps_per_line-1) + hsamp) {
|
||||||
|
TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw",
|
||||||
|
"application buffer not large enough for all data, possible subsampling issue");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
JDIMENSION nclump;
|
|
||||||
|
|
||||||
if (hsamp == 1) {
|
if (hsamp == 1) {
|
||||||
/* fast path for at least Cb and Cr */
|
/* fast path for at least Cb and Cr */
|
||||||
@@ -1447,12 +1415,9 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
|
|||||||
|
|
||||||
sp->scancount ++;
|
sp->scancount ++;
|
||||||
tif->tif_row += sp->v_sampling;
|
tif->tif_row += sp->v_sampling;
|
||||||
/*
|
|
||||||
buf += clumps_per_line*samples_per_clump;
|
buf += sp->bytesperline;
|
||||||
cc -= clumps_per_line*samples_per_clump;
|
cc -= sp->bytesperline;
|
||||||
*/
|
|
||||||
buf += sp->bytesperline * sp->v_sampling;
|
|
||||||
cc -= sp->bytesperline * sp->v_sampling;
|
|
||||||
|
|
||||||
nrows -= sp->v_sampling;
|
nrows -= sp->v_sampling;
|
||||||
} while (nrows > 0);
|
} while (nrows > 0);
|
||||||
|
|||||||
Vendored
+9
-2
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_ojpeg.c,v 1.54 2011-05-31 17:05:07 bfriesen Exp $ */
|
/* $Id: tif_ojpeg.c,v 1.56 2012-05-24 03:15:18 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0
|
/* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0
|
||||||
specification is now totally obsolete and deprecated for new applications and
|
specification is now totally obsolete and deprecated for new applications and
|
||||||
@@ -1146,7 +1146,9 @@ OJPEGWriteHeaderInfo(TIFF* tif)
|
|||||||
OJPEGState* sp=(OJPEGState*)tif->tif_data;
|
OJPEGState* sp=(OJPEGState*)tif->tif_data;
|
||||||
uint8** m;
|
uint8** m;
|
||||||
uint32 n;
|
uint32 n;
|
||||||
assert(sp->libjpeg_session_active==0);
|
/* if a previous attempt failed, don't try again */
|
||||||
|
if (sp->libjpeg_session_active != 0)
|
||||||
|
return 0;
|
||||||
sp->out_state=ososSoi;
|
sp->out_state=ososSoi;
|
||||||
sp->restart_index=0;
|
sp->restart_index=0;
|
||||||
jpeg_std_error(&(sp->libjpeg_jpeg_error_mgr));
|
jpeg_std_error(&(sp->libjpeg_jpeg_error_mgr));
|
||||||
@@ -1954,6 +1956,11 @@ OJPEGReadBufferFill(OJPEGState* sp)
|
|||||||
case osibsJpegInterchangeFormat:
|
case osibsJpegInterchangeFormat:
|
||||||
sp->in_buffer_source=osibsStrile;
|
sp->in_buffer_source=osibsStrile;
|
||||||
case osibsStrile:
|
case osibsStrile:
|
||||||
|
if (!_TIFFFillStriles( sp->tif )
|
||||||
|
|| sp->tif->tif_dir.td_stripoffset == NULL
|
||||||
|
|| sp->tif->tif_dir.td_stripbytecount == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (sp->in_buffer_next_strile==sp->in_buffer_strile_count)
|
if (sp->in_buffer_next_strile==sp->in_buffer_strile_count)
|
||||||
sp->in_buffer_source=osibsEof;
|
sp->in_buffer_source=osibsEof;
|
||||||
else
|
else
|
||||||
|
|||||||
Vendored
+37
-37
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_pixarlog.c,v 1.35 2011-01-06 16:00:23 fwarmerdam Exp $ */
|
/* $Id: tif_pixarlog.c,v 1.37 2012-05-24 23:21:45 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1996-1997 Sam Leffler
|
* Copyright (c) 1996-1997 Sam Leffler
|
||||||
@@ -120,9 +120,9 @@ horizontalAccumulateF(uint16 *wp, int n, int stride, float *op,
|
|||||||
if (n >= stride) {
|
if (n >= stride) {
|
||||||
mask = CODE_MASK;
|
mask = CODE_MASK;
|
||||||
if (stride == 3) {
|
if (stride == 3) {
|
||||||
t0 = ToLinearF[cr = wp[0]];
|
t0 = ToLinearF[cr = (wp[0] & mask)];
|
||||||
t1 = ToLinearF[cg = wp[1]];
|
t1 = ToLinearF[cg = (wp[1] & mask)];
|
||||||
t2 = ToLinearF[cb = wp[2]];
|
t2 = ToLinearF[cb = (wp[2] & mask)];
|
||||||
op[0] = t0;
|
op[0] = t0;
|
||||||
op[1] = t1;
|
op[1] = t1;
|
||||||
op[2] = t2;
|
op[2] = t2;
|
||||||
@@ -139,10 +139,10 @@ horizontalAccumulateF(uint16 *wp, int n, int stride, float *op,
|
|||||||
op[2] = t2;
|
op[2] = t2;
|
||||||
}
|
}
|
||||||
} else if (stride == 4) {
|
} else if (stride == 4) {
|
||||||
t0 = ToLinearF[cr = wp[0]];
|
t0 = ToLinearF[cr = (wp[0] & mask)];
|
||||||
t1 = ToLinearF[cg = wp[1]];
|
t1 = ToLinearF[cg = (wp[1] & mask)];
|
||||||
t2 = ToLinearF[cb = wp[2]];
|
t2 = ToLinearF[cb = (wp[2] & mask)];
|
||||||
t3 = ToLinearF[ca = wp[3]];
|
t3 = ToLinearF[ca = (wp[3] & mask)];
|
||||||
op[0] = t0;
|
op[0] = t0;
|
||||||
op[1] = t1;
|
op[1] = t1;
|
||||||
op[2] = t2;
|
op[2] = t2;
|
||||||
@@ -186,9 +186,9 @@ horizontalAccumulate12(uint16 *wp, int n, int stride, int16 *op,
|
|||||||
if (n >= stride) {
|
if (n >= stride) {
|
||||||
mask = CODE_MASK;
|
mask = CODE_MASK;
|
||||||
if (stride == 3) {
|
if (stride == 3) {
|
||||||
t0 = ToLinearF[cr = wp[0]] * SCALE12;
|
t0 = ToLinearF[cr = (wp[0] & mask)] * SCALE12;
|
||||||
t1 = ToLinearF[cg = wp[1]] * SCALE12;
|
t1 = ToLinearF[cg = (wp[1] & mask)] * SCALE12;
|
||||||
t2 = ToLinearF[cb = wp[2]] * SCALE12;
|
t2 = ToLinearF[cb = (wp[2] & mask)] * SCALE12;
|
||||||
op[0] = CLAMP12(t0);
|
op[0] = CLAMP12(t0);
|
||||||
op[1] = CLAMP12(t1);
|
op[1] = CLAMP12(t1);
|
||||||
op[2] = CLAMP12(t2);
|
op[2] = CLAMP12(t2);
|
||||||
@@ -205,10 +205,10 @@ horizontalAccumulate12(uint16 *wp, int n, int stride, int16 *op,
|
|||||||
op[2] = CLAMP12(t2);
|
op[2] = CLAMP12(t2);
|
||||||
}
|
}
|
||||||
} else if (stride == 4) {
|
} else if (stride == 4) {
|
||||||
t0 = ToLinearF[cr = wp[0]] * SCALE12;
|
t0 = ToLinearF[cr = (wp[0] & mask)] * SCALE12;
|
||||||
t1 = ToLinearF[cg = wp[1]] * SCALE12;
|
t1 = ToLinearF[cg = (wp[1] & mask)] * SCALE12;
|
||||||
t2 = ToLinearF[cb = wp[2]] * SCALE12;
|
t2 = ToLinearF[cb = (wp[2] & mask)] * SCALE12;
|
||||||
t3 = ToLinearF[ca = wp[3]] * SCALE12;
|
t3 = ToLinearF[ca = (wp[3] & mask)] * SCALE12;
|
||||||
op[0] = CLAMP12(t0);
|
op[0] = CLAMP12(t0);
|
||||||
op[1] = CLAMP12(t1);
|
op[1] = CLAMP12(t1);
|
||||||
op[2] = CLAMP12(t2);
|
op[2] = CLAMP12(t2);
|
||||||
@@ -250,9 +250,9 @@ horizontalAccumulate16(uint16 *wp, int n, int stride, uint16 *op,
|
|||||||
if (n >= stride) {
|
if (n >= stride) {
|
||||||
mask = CODE_MASK;
|
mask = CODE_MASK;
|
||||||
if (stride == 3) {
|
if (stride == 3) {
|
||||||
op[0] = ToLinear16[cr = wp[0]];
|
op[0] = ToLinear16[cr = (wp[0] & mask)];
|
||||||
op[1] = ToLinear16[cg = wp[1]];
|
op[1] = ToLinear16[cg = (wp[1] & mask)];
|
||||||
op[2] = ToLinear16[cb = wp[2]];
|
op[2] = ToLinear16[cb = (wp[2] & mask)];
|
||||||
n -= 3;
|
n -= 3;
|
||||||
while (n > 0) {
|
while (n > 0) {
|
||||||
wp += 3;
|
wp += 3;
|
||||||
@@ -263,10 +263,10 @@ horizontalAccumulate16(uint16 *wp, int n, int stride, uint16 *op,
|
|||||||
op[2] = ToLinear16[(cb += wp[2]) & mask];
|
op[2] = ToLinear16[(cb += wp[2]) & mask];
|
||||||
}
|
}
|
||||||
} else if (stride == 4) {
|
} else if (stride == 4) {
|
||||||
op[0] = ToLinear16[cr = wp[0]];
|
op[0] = ToLinear16[cr = (wp[0] & mask)];
|
||||||
op[1] = ToLinear16[cg = wp[1]];
|
op[1] = ToLinear16[cg = (wp[1] & mask)];
|
||||||
op[2] = ToLinear16[cb = wp[2]];
|
op[2] = ToLinear16[cb = (wp[2] & mask)];
|
||||||
op[3] = ToLinear16[ca = wp[3]];
|
op[3] = ToLinear16[ca = (wp[3] & mask)];
|
||||||
n -= 4;
|
n -= 4;
|
||||||
while (n > 0) {
|
while (n > 0) {
|
||||||
wp += 4;
|
wp += 4;
|
||||||
@@ -345,9 +345,9 @@ horizontalAccumulate8(uint16 *wp, int n, int stride, unsigned char *op,
|
|||||||
if (n >= stride) {
|
if (n >= stride) {
|
||||||
mask = CODE_MASK;
|
mask = CODE_MASK;
|
||||||
if (stride == 3) {
|
if (stride == 3) {
|
||||||
op[0] = ToLinear8[cr = wp[0]];
|
op[0] = ToLinear8[cr = (wp[0] & mask)];
|
||||||
op[1] = ToLinear8[cg = wp[1]];
|
op[1] = ToLinear8[cg = (wp[1] & mask)];
|
||||||
op[2] = ToLinear8[cb = wp[2]];
|
op[2] = ToLinear8[cb = (wp[2] & mask)];
|
||||||
n -= 3;
|
n -= 3;
|
||||||
while (n > 0) {
|
while (n > 0) {
|
||||||
n -= 3;
|
n -= 3;
|
||||||
@@ -358,10 +358,10 @@ horizontalAccumulate8(uint16 *wp, int n, int stride, unsigned char *op,
|
|||||||
op[2] = ToLinear8[(cb += wp[2]) & mask];
|
op[2] = ToLinear8[(cb += wp[2]) & mask];
|
||||||
}
|
}
|
||||||
} else if (stride == 4) {
|
} else if (stride == 4) {
|
||||||
op[0] = ToLinear8[cr = wp[0]];
|
op[0] = ToLinear8[cr = (wp[0] & mask)];
|
||||||
op[1] = ToLinear8[cg = wp[1]];
|
op[1] = ToLinear8[cg = (wp[1] & mask)];
|
||||||
op[2] = ToLinear8[cb = wp[2]];
|
op[2] = ToLinear8[cb = (wp[2] & mask)];
|
||||||
op[3] = ToLinear8[ca = wp[3]];
|
op[3] = ToLinear8[ca = (wp[3] & mask)];
|
||||||
n -= 4;
|
n -= 4;
|
||||||
while (n > 0) {
|
while (n > 0) {
|
||||||
n -= 4;
|
n -= 4;
|
||||||
@@ -396,9 +396,9 @@ horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op,
|
|||||||
mask = CODE_MASK;
|
mask = CODE_MASK;
|
||||||
if (stride == 3) {
|
if (stride == 3) {
|
||||||
op[0] = 0;
|
op[0] = 0;
|
||||||
t1 = ToLinear8[cb = wp[2]];
|
t1 = ToLinear8[cb = (wp[2] & mask)];
|
||||||
t2 = ToLinear8[cg = wp[1]];
|
t2 = ToLinear8[cg = (wp[1] & mask)];
|
||||||
t3 = ToLinear8[cr = wp[0]];
|
t3 = ToLinear8[cr = (wp[0] & mask)];
|
||||||
op[1] = t1;
|
op[1] = t1;
|
||||||
op[2] = t2;
|
op[2] = t2;
|
||||||
op[3] = t3;
|
op[3] = t3;
|
||||||
@@ -416,10 +416,10 @@ horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op,
|
|||||||
op[3] = t3;
|
op[3] = t3;
|
||||||
}
|
}
|
||||||
} else if (stride == 4) {
|
} else if (stride == 4) {
|
||||||
t0 = ToLinear8[ca = wp[3]];
|
t0 = ToLinear8[ca = (wp[3] & mask)];
|
||||||
t1 = ToLinear8[cb = wp[2]];
|
t1 = ToLinear8[cb = (wp[2] & mask)];
|
||||||
t2 = ToLinear8[cg = wp[1]];
|
t2 = ToLinear8[cg = (wp[1] & mask)];
|
||||||
t3 = ToLinear8[cr = wp[0]];
|
t3 = ToLinear8[cr = (wp[0] & mask)];
|
||||||
op[0] = t0;
|
op[0] = t0;
|
||||||
op[1] = t1;
|
op[1] = t1;
|
||||||
op[2] = t2;
|
op[2] = t2;
|
||||||
@@ -673,7 +673,7 @@ PixarLogSetupDecode(TIFF* tif)
|
|||||||
td->td_rowsperstrip), sizeof(uint16));
|
td->td_rowsperstrip), sizeof(uint16));
|
||||||
if (tbuf_size == 0)
|
if (tbuf_size == 0)
|
||||||
return (0); /* TODO: this is an error return without error report through TIFFErrorExt */
|
return (0); /* TODO: this is an error return without error report through TIFFErrorExt */
|
||||||
sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size);
|
sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size+sizeof(uint16));
|
||||||
if (sp->tbuf == NULL)
|
if (sp->tbuf == NULL)
|
||||||
return (0);
|
return (0);
|
||||||
if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
|
if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
|
||||||
|
|||||||
Vendored
+69
-38
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_print.c,v 1.54 2011-04-02 20:54:09 bfriesen Exp $ */
|
/* $Id: tif_print.c,v 1.59 2012-06-13 01:08:51 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@@ -34,6 +34,9 @@
|
|||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
static void
|
||||||
|
_TIFFprintAsciiBounded(FILE* fd, const char* cp, int max_chars);
|
||||||
|
|
||||||
static const char *photoNames[] = {
|
static const char *photoNames[] = {
|
||||||
"min-is-white", /* PHOTOMETRIC_MINISWHITE */
|
"min-is-white", /* PHOTOMETRIC_MINISWHITE */
|
||||||
"min-is-black", /* PHOTOMETRIC_MINISBLACK */
|
"min-is-black", /* PHOTOMETRIC_MINISBLACK */
|
||||||
@@ -135,14 +138,20 @@ _TIFFPrintField(FILE* fd, const TIFFField *fip,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_TIFFPrettyPrintField(TIFF* tif, FILE* fd, uint32 tag,
|
_TIFFPrettyPrintField(TIFF* tif, const TIFFField *fip, FILE* fd, uint32 tag,
|
||||||
uint32 value_count, void *raw_data)
|
uint32 value_count, void *raw_data)
|
||||||
{
|
{
|
||||||
(void) tif;
|
(void) tif;
|
||||||
|
|
||||||
|
/* do not try to pretty print auto-defined fields */
|
||||||
|
if (strncmp(fip->field_name,"Tag ", 4) == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch (tag)
|
switch (tag)
|
||||||
{
|
{
|
||||||
case TIFFTAG_INKSET:
|
case TIFFTAG_INKSET:
|
||||||
|
if (value_count == 2 && fip->field_type == TIFF_SHORT) {
|
||||||
fprintf(fd, " Ink Set: ");
|
fprintf(fd, " Ink Set: ");
|
||||||
switch (*((uint16*)raw_data)) {
|
switch (*((uint16*)raw_data)) {
|
||||||
case INKSET_CMYK:
|
case INKSET_CMYK:
|
||||||
@@ -155,14 +164,25 @@ _TIFFPrettyPrintField(TIFF* tif, FILE* fd, uint32 tag,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
case TIFFTAG_DOTRANGE:
|
case TIFFTAG_DOTRANGE:
|
||||||
|
if (value_count == 2 && fip->field_type == TIFF_SHORT) {
|
||||||
fprintf(fd, " Dot Range: %u-%u\n",
|
fprintf(fd, " Dot Range: %u-%u\n",
|
||||||
((uint16*)raw_data)[0], ((uint16*)raw_data)[1]);
|
((uint16*)raw_data)[0], ((uint16*)raw_data)[1]);
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
case TIFFTAG_WHITEPOINT:
|
case TIFFTAG_WHITEPOINT:
|
||||||
|
if (value_count == 2 && fip->field_type == TIFF_RATIONAL) {
|
||||||
fprintf(fd, " White Point: %g-%g\n",
|
fprintf(fd, " White Point: %g-%g\n",
|
||||||
((float *)raw_data)[0], ((float *)raw_data)[1]);
|
((float *)raw_data)[0], ((float *)raw_data)[1]);
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
case TIFFTAG_XMLPACKET:
|
case TIFFTAG_XMLPACKET:
|
||||||
{
|
{
|
||||||
uint32 i;
|
uint32 i;
|
||||||
@@ -182,20 +202,26 @@ _TIFFPrettyPrintField(TIFF* tif, FILE* fd, uint32 tag,
|
|||||||
" RichTIFFIPTC Data: <present>, %lu bytes\n",
|
" RichTIFFIPTC Data: <present>, %lu bytes\n",
|
||||||
(unsigned long) value_count * 4);
|
(unsigned long) value_count * 4);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case TIFFTAG_PHOTOSHOP:
|
case TIFFTAG_PHOTOSHOP:
|
||||||
fprintf(fd, " Photoshop Data: <present>, %lu bytes\n",
|
fprintf(fd, " Photoshop Data: <present>, %lu bytes\n",
|
||||||
(unsigned long) value_count);
|
(unsigned long) value_count);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case TIFFTAG_ICCPROFILE:
|
case TIFFTAG_ICCPROFILE:
|
||||||
fprintf(fd, " ICC Profile: <present>, %lu bytes\n",
|
fprintf(fd, " ICC Profile: <present>, %lu bytes\n",
|
||||||
(unsigned long) value_count);
|
(unsigned long) value_count);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case TIFFTAG_STONITS:
|
case TIFFTAG_STONITS:
|
||||||
|
if (value_count == 1 && fip->field_type == TIFF_DOUBLE) {
|
||||||
fprintf(fd,
|
fprintf(fd,
|
||||||
" Sample to Nits conversion factor: %.4e\n",
|
" Sample to Nits conversion factor: %.4e\n",
|
||||||
*((double*)raw_data));
|
*((double*)raw_data));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -364,9 +390,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
|||||||
fprintf(fd, " Ink Names: ");
|
fprintf(fd, " Ink Names: ");
|
||||||
i = td->td_samplesperpixel;
|
i = td->td_samplesperpixel;
|
||||||
sep = "";
|
sep = "";
|
||||||
for (cp = td->td_inknames; i > 0; cp = strchr(cp,'\0')+1, i--) {
|
for (cp = td->td_inknames;
|
||||||
|
i > 0 && cp < td->td_inknames + td->td_inknameslen;
|
||||||
|
cp = strchr(cp,'\0')+1, i--) {
|
||||||
|
int max_chars =
|
||||||
|
td->td_inknameslen - (cp - td->td_inknames);
|
||||||
fputs(sep, fd);
|
fputs(sep, fd);
|
||||||
_TIFFprintAscii(fd, cp);
|
_TIFFprintAsciiBounded(fd, cp, max_chars);
|
||||||
sep = ", ";
|
sep = ", ";
|
||||||
}
|
}
|
||||||
fputs("\n", fd);
|
fputs("\n", fd);
|
||||||
@@ -449,14 +479,16 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
|||||||
if (TIFFFieldSet(tif,FIELD_MAXSAMPLEVALUE))
|
if (TIFFFieldSet(tif,FIELD_MAXSAMPLEVALUE))
|
||||||
fprintf(fd, " Max Sample Value: %u\n", td->td_maxsamplevalue);
|
fprintf(fd, " Max Sample Value: %u\n", td->td_maxsamplevalue);
|
||||||
if (TIFFFieldSet(tif,FIELD_SMINSAMPLEVALUE)) {
|
if (TIFFFieldSet(tif,FIELD_SMINSAMPLEVALUE)) {
|
||||||
|
int count = (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1;
|
||||||
fprintf(fd, " SMin Sample Value:");
|
fprintf(fd, " SMin Sample Value:");
|
||||||
for (i = 0; i < td->td_samplesperpixel; ++i)
|
for (i = 0; i < count; ++i)
|
||||||
fprintf(fd, " %g", td->td_sminsamplevalue[i]);
|
fprintf(fd, " %g", td->td_sminsamplevalue[i]);
|
||||||
fprintf(fd, "\n");
|
fprintf(fd, "\n");
|
||||||
}
|
}
|
||||||
if (TIFFFieldSet(tif,FIELD_SMAXSAMPLEVALUE)) {
|
if (TIFFFieldSet(tif,FIELD_SMAXSAMPLEVALUE)) {
|
||||||
|
int count = (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1;
|
||||||
fprintf(fd, " SMax Sample Value:");
|
fprintf(fd, " SMax Sample Value:");
|
||||||
for (i = 0; i < td->td_samplesperpixel; ++i)
|
for (i = 0; i < count; ++i)
|
||||||
fprintf(fd, " %g", td->td_smaxsamplevalue[i]);
|
fprintf(fd, " %g", td->td_smaxsamplevalue[i]);
|
||||||
fprintf(fd, "\n");
|
fprintf(fd, "\n");
|
||||||
}
|
}
|
||||||
@@ -548,8 +580,19 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(fip->field_passcount) {
|
if(fip->field_passcount) {
|
||||||
|
if (fip->field_readcount == TIFF_VARIABLE2 ) {
|
||||||
if(TIFFGetField(tif, tag, &value_count, &raw_data) != 1)
|
if(TIFFGetField(tif, tag, &value_count, &raw_data) != 1)
|
||||||
continue;
|
continue;
|
||||||
|
} else if (fip->field_readcount == TIFF_VARIABLE2 ) {
|
||||||
|
uint16 small_value_count;
|
||||||
|
if(TIFFGetField(tif, tag, &small_value_count, &raw_data) != 1)
|
||||||
|
continue;
|
||||||
|
value_count = small_value_count;
|
||||||
|
} else {
|
||||||
|
assert (fip->field_readcount == TIFF_VARIABLE
|
||||||
|
|| fip->field_readcount == TIFF_VARIABLE2);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fip->field_readcount == TIFF_VARIABLE
|
if (fip->field_readcount == TIFF_VARIABLE
|
||||||
|| fip->field_readcount == TIFF_VARIABLE2)
|
|| fip->field_readcount == TIFF_VARIABLE2)
|
||||||
@@ -558,21 +601,23 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
|||||||
value_count = td->td_samplesperpixel;
|
value_count = td->td_samplesperpixel;
|
||||||
else
|
else
|
||||||
value_count = fip->field_readcount;
|
value_count = fip->field_readcount;
|
||||||
if ((fip->field_type == TIFF_ASCII
|
if (fip->field_tag == TIFFTAG_DOTRANGE
|
||||||
|
&& strcmp(fip->field_name,"DotRange") == 0) {
|
||||||
|
/* TODO: This is an evil exception and should not have been
|
||||||
|
handled this way ... likely best if we move it into
|
||||||
|
the directory structure with an explicit field in
|
||||||
|
libtiff 4.1 and assign it a FIELD_ value */
|
||||||
|
static uint16 dotrange[2];
|
||||||
|
raw_data = dotrange;
|
||||||
|
TIFFGetField(tif, tag, dotrange+0, dotrange+1);
|
||||||
|
} else if (fip->field_type == TIFF_ASCII
|
||||||
|| fip->field_readcount == TIFF_VARIABLE
|
|| fip->field_readcount == TIFF_VARIABLE
|
||||||
|| fip->field_readcount == TIFF_VARIABLE2
|
|| fip->field_readcount == TIFF_VARIABLE2
|
||||||
|| fip->field_readcount == TIFF_SPP
|
|| fip->field_readcount == TIFF_SPP
|
||||||
|| value_count > 1)
|
|| value_count > 1) {
|
||||||
&& fip->field_tag != TIFFTAG_PAGENUMBER
|
|
||||||
&& fip->field_tag != TIFFTAG_HALFTONEHINTS
|
|
||||||
&& fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
|
|
||||||
&& fip->field_tag != TIFFTAG_DOTRANGE) {
|
|
||||||
if(TIFFGetField(tif, tag, &raw_data) != 1)
|
if(TIFFGetField(tif, tag, &raw_data) != 1)
|
||||||
continue;
|
continue;
|
||||||
} else if (fip->field_tag != TIFFTAG_PAGENUMBER
|
} else {
|
||||||
&& fip->field_tag != TIFFTAG_HALFTONEHINTS
|
|
||||||
&& fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
|
|
||||||
&& fip->field_tag != TIFFTAG_DOTRANGE) {
|
|
||||||
raw_data = _TIFFmalloc(
|
raw_data = _TIFFmalloc(
|
||||||
_TIFFDataSize(fip->field_type)
|
_TIFFDataSize(fip->field_type)
|
||||||
* value_count);
|
* value_count);
|
||||||
@@ -581,26 +626,6 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
|||||||
_TIFFfree(raw_data);
|
_TIFFfree(raw_data);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
* XXX: Should be fixed and removed,
|
|
||||||
* see the notes related to
|
|
||||||
* TIFFTAG_PAGENUMBER,
|
|
||||||
* TIFFTAG_HALFTONEHINTS,
|
|
||||||
* TIFFTAG_YCBCRSUBSAMPLING and
|
|
||||||
* TIFFTAG_DOTRANGE tags in tif_dir.c.
|
|
||||||
*/
|
|
||||||
char *tmp;
|
|
||||||
raw_data = _TIFFmalloc(
|
|
||||||
_TIFFDataSize(fip->field_type)
|
|
||||||
* value_count);
|
|
||||||
tmp = raw_data;
|
|
||||||
mem_alloc = 1;
|
|
||||||
if(TIFFGetField(tif, tag, tmp,
|
|
||||||
tmp + _TIFFDataSize(fip->field_type)) != 1) {
|
|
||||||
_TIFFfree(raw_data);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -610,7 +635,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
|||||||
* _TIFFPrettyPrintField() fall down and print it as
|
* _TIFFPrettyPrintField() fall down and print it as
|
||||||
* any other tag.
|
* any other tag.
|
||||||
*/
|
*/
|
||||||
if (!_TIFFPrettyPrintField(tif, fd, tag, value_count, raw_data))
|
if (!_TIFFPrettyPrintField(tif, fip, fd, tag, value_count, raw_data))
|
||||||
_TIFFPrintField(fd, fip, value_count, raw_data);
|
_TIFFPrintField(fd, fip, value_count, raw_data);
|
||||||
|
|
||||||
if(mem_alloc)
|
if(mem_alloc)
|
||||||
@@ -648,7 +673,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
|||||||
void
|
void
|
||||||
_TIFFprintAscii(FILE* fd, const char* cp)
|
_TIFFprintAscii(FILE* fd, const char* cp)
|
||||||
{
|
{
|
||||||
for (; *cp != '\0'; cp++) {
|
_TIFFprintAsciiBounded( fd, cp, strlen(cp));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_TIFFprintAsciiBounded(FILE* fd, const char* cp, int max_chars)
|
||||||
|
{
|
||||||
|
for (; max_chars > 0 && *cp != '\0'; cp++, max_chars--) {
|
||||||
const char* tp;
|
const char* tp;
|
||||||
|
|
||||||
if (isprint((int)*cp)) {
|
if (isprint((int)*cp)) {
|
||||||
|
|||||||
Vendored
+37
-4
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_read.c,v 1.38 2011-12-09 03:29:10 fwarmerdam Exp $ */
|
/* $Id: tif_read.c,v 1.40 2012-06-01 00:55:09 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@@ -93,6 +93,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
|
|||||||
|
|
||||||
if( unused_data > 0 )
|
if( unused_data > 0 )
|
||||||
{
|
{
|
||||||
|
assert((tif->tif_flags&TIFF_BUFFERMMAP)==0);
|
||||||
memmove( tif->tif_rawdata, tif->tif_rawcp, unused_data );
|
memmove( tif->tif_rawdata, tif->tif_rawcp, unused_data );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,6 +121,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
|
|||||||
- tif->tif_rawdataoff - tif->tif_rawdataloaded;
|
- tif->tif_rawdataoff - tif->tif_rawdataloaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert((tif->tif_flags&TIFF_BUFFERMMAP)==0);
|
||||||
cc = TIFFReadFile(tif, tif->tif_rawdata + unused_data, to_read);
|
cc = TIFFReadFile(tif, tif->tif_rawdata + unused_data, to_read);
|
||||||
|
|
||||||
if (cc != to_read) {
|
if (cc != to_read) {
|
||||||
@@ -145,8 +147,10 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
|
|||||||
tif->tif_rawcp = tif->tif_rawdata;
|
tif->tif_rawcp = tif->tif_rawdata;
|
||||||
|
|
||||||
if (!isFillOrder(tif, td->td_fillorder) &&
|
if (!isFillOrder(tif, td->td_fillorder) &&
|
||||||
(tif->tif_flags & TIFF_NOBITREV) == 0)
|
(tif->tif_flags & TIFF_NOBITREV) == 0) {
|
||||||
|
assert((tif->tif_flags&TIFF_BUFFERMMAP)==0);
|
||||||
TIFFReverseBits(tif->tif_rawdata + unused_data, to_read );
|
TIFFReverseBits(tif->tif_rawdata + unused_data, to_read );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** When starting a strip from the beginning we need to
|
** When starting a strip from the beginning we need to
|
||||||
@@ -522,8 +526,11 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
|
|||||||
* buffer (if they try to, the application will get a
|
* buffer (if they try to, the application will get a
|
||||||
* fault since the file is mapped read-only).
|
* fault since the file is mapped read-only).
|
||||||
*/
|
*/
|
||||||
if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
|
if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) {
|
||||||
_TIFFfree(tif->tif_rawdata);
|
_TIFFfree(tif->tif_rawdata);
|
||||||
|
tif->tif_rawdata = NULL;
|
||||||
|
tif->tif_rawdatasize = 0;
|
||||||
|
}
|
||||||
tif->tif_flags &= ~TIFF_MYBUFFER;
|
tif->tif_flags &= ~TIFF_MYBUFFER;
|
||||||
/*
|
/*
|
||||||
* We must check for overflow, potentially causing
|
* We must check for overflow, potentially causing
|
||||||
@@ -565,6 +572,14 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
|
|||||||
tif->tif_rawdata = tif->tif_base + (tmsize_t)td->td_stripoffset[strip];
|
tif->tif_rawdata = tif->tif_base + (tmsize_t)td->td_stripoffset[strip];
|
||||||
tif->tif_rawdataoff = 0;
|
tif->tif_rawdataoff = 0;
|
||||||
tif->tif_rawdataloaded = (tmsize_t) bytecount;
|
tif->tif_rawdataloaded = (tmsize_t) bytecount;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When we have tif_rawdata reference directly into the memory mapped file
|
||||||
|
* we need to be pretty careful about how we use the rawdata. It is not
|
||||||
|
* a general purpose working buffer as it normally otherwise is. So we
|
||||||
|
* keep track of this fact to avoid using it improperly.
|
||||||
|
*/
|
||||||
|
tif->tif_flags |= TIFF_BUFFERMMAP;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Expand raw data buffer, if needed, to hold data
|
* Expand raw data buffer, if needed, to hold data
|
||||||
@@ -589,6 +604,11 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
|
|||||||
if (!TIFFReadBufferSetup(tif, 0, bytecountm))
|
if (!TIFFReadBufferSetup(tif, 0, bytecountm))
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
if (tif->tif_flags&TIFF_BUFFERMMAP) {
|
||||||
|
tif->tif_curstrip = NOSTRIP;
|
||||||
|
if (!TIFFReadBufferSetup(tif, 0, bytecountm))
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
if (TIFFReadRawStrip1(tif, strip, tif->tif_rawdata,
|
if (TIFFReadRawStrip1(tif, strip, tif->tif_rawdata,
|
||||||
bytecountm, module) != bytecountm)
|
bytecountm, module) != bytecountm)
|
||||||
return (0);
|
return (0);
|
||||||
@@ -809,8 +829,11 @@ TIFFFillTile(TIFF* tif, uint32 tile)
|
|||||||
* buffer (if they try to, the application will get a
|
* buffer (if they try to, the application will get a
|
||||||
* fault since the file is mapped read-only).
|
* fault since the file is mapped read-only).
|
||||||
*/
|
*/
|
||||||
if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
|
if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) {
|
||||||
_TIFFfree(tif->tif_rawdata);
|
_TIFFfree(tif->tif_rawdata);
|
||||||
|
tif->tif_rawdata = NULL;
|
||||||
|
tif->tif_rawdatasize = 0;
|
||||||
|
}
|
||||||
tif->tif_flags &= ~TIFF_MYBUFFER;
|
tif->tif_flags &= ~TIFF_MYBUFFER;
|
||||||
/*
|
/*
|
||||||
* We must check for overflow, potentially causing
|
* We must check for overflow, potentially causing
|
||||||
@@ -831,6 +854,7 @@ TIFFFillTile(TIFF* tif, uint32 tile)
|
|||||||
tif->tif_base + (tmsize_t)td->td_stripoffset[tile];
|
tif->tif_base + (tmsize_t)td->td_stripoffset[tile];
|
||||||
tif->tif_rawdataoff = 0;
|
tif->tif_rawdataoff = 0;
|
||||||
tif->tif_rawdataloaded = (tmsize_t) bytecount;
|
tif->tif_rawdataloaded = (tmsize_t) bytecount;
|
||||||
|
tif->tif_flags |= TIFF_BUFFERMMAP;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Expand raw data buffer, if needed, to hold data
|
* Expand raw data buffer, if needed, to hold data
|
||||||
@@ -855,6 +879,12 @@ TIFFFillTile(TIFF* tif, uint32 tile)
|
|||||||
if (!TIFFReadBufferSetup(tif, 0, bytecountm))
|
if (!TIFFReadBufferSetup(tif, 0, bytecountm))
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
if (tif->tif_flags&TIFF_BUFFERMMAP) {
|
||||||
|
tif->tif_curtile = NOTILE;
|
||||||
|
if (!TIFFReadBufferSetup(tif, 0, bytecountm))
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
if (TIFFReadRawTile1(tif, tile, tif->tif_rawdata,
|
if (TIFFReadRawTile1(tif, tile, tif->tif_rawdata,
|
||||||
bytecountm, module) != bytecountm)
|
bytecountm, module) != bytecountm)
|
||||||
return (0);
|
return (0);
|
||||||
@@ -886,10 +916,13 @@ TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size)
|
|||||||
static const char module[] = "TIFFReadBufferSetup";
|
static const char module[] = "TIFFReadBufferSetup";
|
||||||
|
|
||||||
assert((tif->tif_flags&TIFF_NOREADRAW)==0);
|
assert((tif->tif_flags&TIFF_NOREADRAW)==0);
|
||||||
|
tif->tif_flags &= ~TIFF_BUFFERMMAP;
|
||||||
|
|
||||||
if (tif->tif_rawdata) {
|
if (tif->tif_rawdata) {
|
||||||
if (tif->tif_flags & TIFF_MYBUFFER)
|
if (tif->tif_flags & TIFF_MYBUFFER)
|
||||||
_TIFFfree(tif->tif_rawdata);
|
_TIFFfree(tif->tif_rawdata);
|
||||||
tif->tif_rawdata = NULL;
|
tif->tif_rawdata = NULL;
|
||||||
|
tif->tif_rawdatasize = 0;
|
||||||
}
|
}
|
||||||
if (bp) {
|
if (bp) {
|
||||||
tif->tif_rawdatasize = size;
|
tif->tif_rawdatasize = size;
|
||||||
|
|||||||
Vendored
+1
@@ -28,6 +28,7 @@
|
|||||||
* TIFF Library UNIX-specific Routines.
|
* TIFF Library UNIX-specific Routines.
|
||||||
*/
|
*/
|
||||||
#include "tiffiop.h"
|
#include "tiffiop.h"
|
||||||
|
#include "tiffio.hxx"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#ifndef __VMS
|
#ifndef __VMS
|
||||||
|
|||||||
Vendored
+6
-4
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_strip.c,v 1.34 2011-04-02 20:54:09 bfriesen Exp $ */
|
/* $Id: tif_strip.c,v 1.35 2012-06-06 05:33:55 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1991-1997 Sam Leffler
|
* Copyright (c) 1991-1997 Sam Leffler
|
||||||
@@ -107,11 +107,13 @@ TIFFVStripSize64(TIFF* tif, uint32 nrows)
|
|||||||
}
|
}
|
||||||
TIFFGetFieldDefaulted(tif,TIFFTAG_YCBCRSUBSAMPLING,ycbcrsubsampling+0,
|
TIFFGetFieldDefaulted(tif,TIFFTAG_YCBCRSUBSAMPLING,ycbcrsubsampling+0,
|
||||||
ycbcrsubsampling+1);
|
ycbcrsubsampling+1);
|
||||||
if (((ycbcrsubsampling[0]!=1)&&(ycbcrsubsampling[0]!=2)&&(ycbcrsubsampling[0]!=4)) ||
|
if ((ycbcrsubsampling[0] != 1 && ycbcrsubsampling[0] != 2 && ycbcrsubsampling[0] != 4)
|
||||||
((ycbcrsubsampling[1]!=1)&&(ycbcrsubsampling[1]!=2)&&(ycbcrsubsampling[1]!=4)))
|
||(ycbcrsubsampling[1] != 1 && ycbcrsubsampling[1] != 2 && ycbcrsubsampling[1] != 4))
|
||||||
{
|
{
|
||||||
TIFFErrorExt(tif->tif_clientdata,module,
|
TIFFErrorExt(tif->tif_clientdata,module,
|
||||||
"Invalid YCbCr subsampling");
|
"Invalid YCbCr subsampling (%dx%d)",
|
||||||
|
ycbcrsubsampling[0],
|
||||||
|
ycbcrsubsampling[1] );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
samplingblock_samples=ycbcrsubsampling[0]*ycbcrsubsampling[1]+2;
|
samplingblock_samples=ycbcrsubsampling[0]*ycbcrsubsampling[1]+2;
|
||||||
|
|||||||
Vendored
+6
-5
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_tile.c,v 1.22 2010-07-01 15:33:28 dron Exp $ */
|
/* $Id: tif_tile.c,v 1.23 2012-06-06 05:33:55 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1991-1997 Sam Leffler
|
* Copyright (c) 1991-1997 Sam Leffler
|
||||||
@@ -203,12 +203,13 @@ TIFFVTileSize64(TIFF* tif, uint32 nrows)
|
|||||||
uint64 samplingrow_size;
|
uint64 samplingrow_size;
|
||||||
TIFFGetFieldDefaulted(tif,TIFFTAG_YCBCRSUBSAMPLING,ycbcrsubsampling+0,
|
TIFFGetFieldDefaulted(tif,TIFFTAG_YCBCRSUBSAMPLING,ycbcrsubsampling+0,
|
||||||
ycbcrsubsampling+1);
|
ycbcrsubsampling+1);
|
||||||
assert((ycbcrsubsampling[0]==1)||(ycbcrsubsampling[0]==2)||(ycbcrsubsampling[0]==4));
|
if ((ycbcrsubsampling[0] != 1 && ycbcrsubsampling[0] != 2 && ycbcrsubsampling[0] != 4)
|
||||||
assert((ycbcrsubsampling[1]==1)||(ycbcrsubsampling[1]==2)||(ycbcrsubsampling[1]==4));
|
||(ycbcrsubsampling[1] != 1 && ycbcrsubsampling[1] != 2 && ycbcrsubsampling[1] != 4))
|
||||||
if (ycbcrsubsampling[0]*ycbcrsubsampling[1]==0)
|
|
||||||
{
|
{
|
||||||
TIFFErrorExt(tif->tif_clientdata,module,
|
TIFFErrorExt(tif->tif_clientdata,module,
|
||||||
"Invalid YCbCr subsampling");
|
"Invalid YCbCr subsampling (%dx%d)",
|
||||||
|
ycbcrsubsampling[0],
|
||||||
|
ycbcrsubsampling[1] );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
samplingblock_samples=ycbcrsubsampling[0]*ycbcrsubsampling[1]+2;
|
samplingblock_samples=ycbcrsubsampling[0]*ycbcrsubsampling[1]+2;
|
||||||
|
|||||||
Vendored
+5
-1
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_unix.c,v 1.22 2010-03-10 18:56:49 bfriesen Exp $ */
|
/* $Id: tif_unix.c,v 1.23 2012-06-01 21:40:59 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@@ -186,7 +186,11 @@ TIFFOpen(const char* name, const char* mode)
|
|||||||
|
|
||||||
fd = open(name, m, 0666);
|
fd = open(name, m, 0666);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
if (errno > 0 && strerror(errno) != NULL ) {
|
||||||
|
TIFFErrorExt(0, module, "%s: %s", name, strerror(errno) );
|
||||||
|
} else {
|
||||||
TIFFErrorExt(0, module, "%s: Cannot open", name);
|
TIFFErrorExt(0, module, "%s: Cannot open", name);
|
||||||
|
}
|
||||||
return ((TIFF *)0);
|
return ((TIFF *)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+4
-1
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tiffio.h,v 1.89 2012-02-18 16:20:26 bfriesen Exp $ */
|
/* $Id: tiffio.h,v 1.90 2012-06-06 04:58:00 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@@ -392,6 +392,8 @@ extern int TIFFSetupStrips(TIFF *);
|
|||||||
extern int TIFFWriteCheck(TIFF*, int, const char *);
|
extern int TIFFWriteCheck(TIFF*, int, const char *);
|
||||||
extern void TIFFFreeDirectory(TIFF*);
|
extern void TIFFFreeDirectory(TIFF*);
|
||||||
extern int TIFFCreateDirectory(TIFF*);
|
extern int TIFFCreateDirectory(TIFF*);
|
||||||
|
extern int TIFFCreateCustomDirectory(TIFF*,const TIFFFieldArray*);
|
||||||
|
extern int TIFFCreateEXIFDirectory(TIFF*);
|
||||||
extern int TIFFLastDirectory(TIFF*);
|
extern int TIFFLastDirectory(TIFF*);
|
||||||
extern int TIFFSetDirectory(TIFF*, uint16);
|
extern int TIFFSetDirectory(TIFF*, uint16);
|
||||||
extern int TIFFSetSubDirectory(TIFF*, uint64);
|
extern int TIFFSetSubDirectory(TIFF*, uint64);
|
||||||
@@ -400,6 +402,7 @@ extern int TIFFSetField(TIFF*, uint32, ...);
|
|||||||
extern int TIFFVSetField(TIFF*, uint32, va_list);
|
extern int TIFFVSetField(TIFF*, uint32, va_list);
|
||||||
extern int TIFFUnsetField(TIFF*, uint32);
|
extern int TIFFUnsetField(TIFF*, uint32);
|
||||||
extern int TIFFWriteDirectory(TIFF *);
|
extern int TIFFWriteDirectory(TIFF *);
|
||||||
|
extern int TIFFWriteCustomDirectory(TIFF *, uint64 *);
|
||||||
extern int TIFFCheckpointDirectory(TIFF *);
|
extern int TIFFCheckpointDirectory(TIFF *);
|
||||||
extern int TIFFRewriteDirectory(TIFF *);
|
extern int TIFFRewriteDirectory(TIFF *);
|
||||||
|
|
||||||
|
|||||||
Vendored
+3
-2
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: tiffiop.h,v 1.82 2011-02-18 20:53:05 fwarmerdam Exp $ */
|
/* $Id: tiffiop.h,v 1.84 2012-05-30 01:50:17 fwarmerdam Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@@ -121,6 +121,7 @@ struct tiff {
|
|||||||
#define TIFF_BUF4WRITE 0x100000 /* rawcc bytes are for writing */
|
#define TIFF_BUF4WRITE 0x100000 /* rawcc bytes are for writing */
|
||||||
#define TIFF_DIRTYSTRIP 0x200000 /* stripoffsets/stripbytecount dirty*/
|
#define TIFF_DIRTYSTRIP 0x200000 /* stripoffsets/stripbytecount dirty*/
|
||||||
#define TIFF_PERSAMPLE 0x400000 /* get/set per sample tags as arrays */
|
#define TIFF_PERSAMPLE 0x400000 /* get/set per sample tags as arrays */
|
||||||
|
#define TIFF_BUFFERMMAP 0x800000 /* read buffer (tif_rawdata) points into mmap() memory */
|
||||||
uint64 tif_diroff; /* file offset of current directory */
|
uint64 tif_diroff; /* file offset of current directory */
|
||||||
uint64 tif_nextdiroff; /* file offset of following directory */
|
uint64 tif_nextdiroff; /* file offset of following directory */
|
||||||
uint64* tif_dirlist; /* list of offsets to already seen directories to prevent IFD looping */
|
uint64* tif_dirlist; /* list of offsets to already seen directories to prevent IFD looping */
|
||||||
@@ -250,7 +251,7 @@ struct tiff {
|
|||||||
#define TIFFroundup_64(x, y) (TIFFhowmany_64(x,y)*(y))
|
#define TIFFroundup_64(x, y) (TIFFhowmany_64(x,y)*(y))
|
||||||
|
|
||||||
/* Safe multiply which returns zero if there is an integer overflow */
|
/* Safe multiply which returns zero if there is an integer overflow */
|
||||||
#define TIFFSafeMultiply(t,v,m) ((((t)m != (t)0) && (((t)((v*m)/m)) == (t)v)) ? (t)(v*m) : (t)0)
|
#define TIFFSafeMultiply(t,v,m) ((((t)(m) != (t)0) && (((t)(((v)*(m))/(m))) == (t)(v))) ? (t)((v)*(m)) : (t)0)
|
||||||
|
|
||||||
#define TIFFmax(A,B) ((A)>(B)?(A):(B))
|
#define TIFFmax(A,B) ((A)>(B)?(A):(B))
|
||||||
#define TIFFmin(A,B) ((A)<(B)?(A):(B))
|
#define TIFFmin(A,B) ((A)<(B)?(A):(B))
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.1\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
|
#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.2\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
|
||||||
/*
|
/*
|
||||||
* This define can be used in code that requires
|
* This define can be used in code that requires
|
||||||
* compilation-related definitions specific to a
|
* compilation-related definitions specific to a
|
||||||
@@ -6,4 +6,4 @@
|
|||||||
* version checking should be done based on the
|
* version checking should be done based on the
|
||||||
* string returned by TIFFGetVersion.
|
* string returned by TIFFGetVersion.
|
||||||
*/
|
*/
|
||||||
#define TIFFLIB_VERSION 20120218
|
#define TIFFLIB_VERSION 20120615
|
||||||
|
|||||||
Vendored
+21
@@ -0,0 +1,21 @@
|
|||||||
|
Developers:
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Florian Kainz <kainz@ilm.com>
|
||||||
|
Rod Bogart <rgb@ilm.com>
|
||||||
|
Drew Hess <dhess@ilm.com>
|
||||||
|
Bill Anderson <wja@ilm.com>
|
||||||
|
Wojciech Jarosz <wjarosz@ucsd.edu>
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Rito Trevino
|
||||||
|
Josh Pines
|
||||||
|
Christian Rouet
|
||||||
|
|
||||||
|
Win32 build system:
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Nick Porcino <NPorcino@lucasarts.com>
|
||||||
|
Kimball Thurston
|
||||||
Vendored
+41
@@ -0,0 +1,41 @@
|
|||||||
|
Developers:
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Florian Kainz <kainz@ilm.com>
|
||||||
|
Rod Bogart <rgb@ilm.com>
|
||||||
|
Drew Hess <dhess@ilm.com>
|
||||||
|
Paul Schneider <paultschneider@mac.com>
|
||||||
|
Bill Anderson <wja@ilm.com>
|
||||||
|
Wojciech Jarosz <wjarosz@ucsd.edu>
|
||||||
|
Andrew Kunz <akunz@ilm.com>
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Simon Green <SGreen@nvidia.com>
|
||||||
|
Rito Trevino <etrevino@ilm.com>
|
||||||
|
Josh Pines
|
||||||
|
Christian Rouet
|
||||||
|
Rodrigo Damazio <rdamazio@lsi.usp.br>
|
||||||
|
Greg Ward <gward@lmi.net>
|
||||||
|
Joseph Goldstone <joseph@lp.com>
|
||||||
|
Loren Carpenter, Pixar Animation Studios
|
||||||
|
|
||||||
|
Win32 build system:
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Nick Porcino <NPorcino@lucasarts.com>
|
||||||
|
Kimball Thurston
|
||||||
|
|
||||||
|
Win32 port contributors:
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Dustin Graves <dgraves@computer.org>
|
||||||
|
Jukka Liimatta <jukka.liimatta@twilight3d.com>
|
||||||
|
Baumann Konstantin <Konstantin.Baumann@hpi.uni-potsdam.de>
|
||||||
|
Daniel Koch <daniel@eyeonline.com>
|
||||||
|
E. Scott Larsen <larsene@cs.unc.edu>
|
||||||
|
stephan mantler <step@acm.org>
|
||||||
|
Andreas Kahler <AKahler@nxn-software.com>
|
||||||
|
Frank Jargstorff <fjargstorff@nvidia.com>
|
||||||
|
Lutz Latta
|
||||||
Vendored
+69
@@ -0,0 +1,69 @@
|
|||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# CMake file for openexr
|
||||||
|
#
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
project(openexr CXX)
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
set(HAVE_PTHREAD 1)
|
||||||
|
include(CheckIncludeFile)
|
||||||
|
check_include_file(semaphore.h HAVE_POSIX_SEMAPHORES)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/IlmBaseConfig.h.cmakein"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/IlmBaseConfig.h" @ONLY)
|
||||||
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/OpenEXRConfig.h.cmakein"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/OpenEXRConfig.h" @ONLY)
|
||||||
|
|
||||||
|
set(OPENEXR_INCLUDE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/Half"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Iex"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/IlmThread"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/Imath"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/IlmImf")
|
||||||
|
|
||||||
|
ocv_include_directories("${CMAKE_CURRENT_BINARY_DIR}" ${ZLIB_INCLUDE_DIR} ${OPENEXR_INCLUDE_PATHS})
|
||||||
|
|
||||||
|
file(GLOB lib_srcs Half/half.cpp Iex/*.cpp IlmThread/*.cpp Imath/*.cpp IlmImf/*.cpp)
|
||||||
|
file(GLOB lib_hdrs Half/*.h Iex/Iex*.h IlmThread/IlmThread*.h Imath/Imath*.h IlmImf/*.h)
|
||||||
|
list(APPEND lib_hdrs "${CMAKE_CURRENT_BINARY_DIR}/IlmBaseConfig.h" "${CMAKE_CURRENT_BINARY_DIR}/OpenEXRConfig.h")
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
ocv_list_filterout(lib_srcs Posix.*cpp)
|
||||||
|
else()
|
||||||
|
ocv_list_filterout(lib_srcs Win32.cpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
source_group("Include" FILES ${lib_hdrs} )
|
||||||
|
source_group("Src" FILES ${lib_srcs})
|
||||||
|
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -Wmissing-declarations -Wuninitialized -Wswitch -Wparentheses -Warray-bounds -Wextra)
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4099 /wd4100 /wd4101 /wd4127 /wd4189 /wd4245 /wd4305 /wd4389 /wd4512 /wd4701 /wd4702 /wd4706 /wd4800) # vs2005
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4334) # vs2005 Win64
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244) # vs2008
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267) # vs2008 Win64
|
||||||
|
|
||||||
|
if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(IlmImf STATIC ${lib_hdrs} ${lib_srcs})
|
||||||
|
target_link_libraries(IlmImf ${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
|
set_target_properties(IlmImf
|
||||||
|
PROPERTIES
|
||||||
|
OUTPUT_NAME "IlmImf"
|
||||||
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||||||
|
ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(ENABLE_SOLUTION_FOLDERS)
|
||||||
|
set_target_properties(IlmImf PROPERTIES FOLDER "3rdparty")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
|
install(TARGETS IlmImf ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATHS} PARENT_SCOPE)
|
||||||
|
set(OPENEXR_VERSION "1.7.1" PARENT_SCOPE)
|
||||||
Vendored
+109
@@ -0,0 +1,109 @@
|
|||||||
|
Version 1.0.3
|
||||||
|
* Added support for enabling/disabling large stack optimisations, used in
|
||||||
|
halfFunction.h.
|
||||||
|
(Piotr Stanczyk)
|
||||||
|
* Added ImathNoise.(h/cpp) files. Initializes Perlin noise to match the
|
||||||
|
Renderman implmenetation.
|
||||||
|
(Pixar Contribution)
|
||||||
|
* Fixed a number of missing includes to comply with stricter
|
||||||
|
enforcement by gnu compilers.
|
||||||
|
(Piotr Stanczyk)
|
||||||
|
* Depracated compiler flag: -Wno-long-double since it is no longer
|
||||||
|
supported under OS X.
|
||||||
|
(Piotr Stanczyk)
|
||||||
|
* A minor API change to Imath::Frustum has been made: the functions
|
||||||
|
'near' and 'far' have been renamed to 'nearPlane' and 'farPlane' due
|
||||||
|
to conflicts with certain windows headers. The former alternate
|
||||||
|
accessor names for these values on windows ('hither' and 'yon')
|
||||||
|
remain, though should be considered deprecated.
|
||||||
|
(David Lenihan)
|
||||||
|
* Added SVD, eigenvalue solver, and procrustes fit calculations
|
||||||
|
to ImathMatrixAlgo.
|
||||||
|
(Chris Twigg, Ji Hun Yu)
|
||||||
|
* Added Imath::FrustumTest for frustum visibility testing.
|
||||||
|
(Eric Johnston)
|
||||||
|
* Fixed a stack corruption in the matrix minorOf functions.
|
||||||
|
(Nick Rasmussen)
|
||||||
|
* Visual studio 2008 project files have been added to the vc/vc9
|
||||||
|
directory, and several minor visual studio compile fixes have
|
||||||
|
been applied.
|
||||||
|
(Nick Rasmussen)
|
||||||
|
* Updated the so verison to 7.
|
||||||
|
(Piotr Stanczyk)
|
||||||
|
* Depracated the MacCode_Warrior and Shake submodules.
|
||||||
|
(Piotr Stanczyk)
|
||||||
|
|
||||||
|
Version 1.0.2
|
||||||
|
* Added support for targetting builds on 64bit Windows and minimising
|
||||||
|
number of compiler warnings on Windows. Thanks to Ger Hobbelt for his
|
||||||
|
contributions to CreateDLL.
|
||||||
|
(Ji Hun Yu)
|
||||||
|
* Removed a spurious restrict qualifier in the matrix manipulation code
|
||||||
|
that was causing the 64-bit MS compiler to generate code in release
|
||||||
|
mode that caused incorrect results.
|
||||||
|
(Ji Hun Yu)
|
||||||
|
* Added patches for improving universal binaries on OS X. Thanks to
|
||||||
|
Paul Schneider for the contribution
|
||||||
|
(Piotr Stanczyk)
|
||||||
|
* Imath::Box optimization: remove loops from methods by partially
|
||||||
|
specializing the class, for boxes of two and three dimensions.
|
||||||
|
(Piotr Stanczyk)
|
||||||
|
* Added explicit copy constructors to Imath::Matrix33<T> and
|
||||||
|
ImathMatrix44<T> to make conversions between float and double
|
||||||
|
matrices more convenient.
|
||||||
|
(Florian Kainz)
|
||||||
|
* Added slerpShortestArc() and euclideanInnerProduct() functions
|
||||||
|
to Imath::Quat<T>.
|
||||||
|
(Nick Porcino)
|
||||||
|
* Added 4D vector class template Imath::Vec4<T>.
|
||||||
|
(Nick Porcino)
|
||||||
|
* Copy constructors and assignment operators for Matrix33<T>
|
||||||
|
and Matrix44<T> are up to 25% faster. Added matrix constructors
|
||||||
|
that do not initialize the matrix (this is faster in cases where
|
||||||
|
the initial value of the matrix is immediately overwritten anyway).
|
||||||
|
(Nick Porcino)
|
||||||
|
* Rewrote function closestPointOnBox(point,box). Shortened
|
||||||
|
the code, improved numerical accuracy, fixed a bug where
|
||||||
|
closestPointOnBox(box.center(),box) would return the center
|
||||||
|
of the +Z side of the box, even if the +/-X or +/-Y sides
|
||||||
|
were closer.
|
||||||
|
(Florian Kainz)
|
||||||
|
* Rewrote function findEntryAndExitPoints() in ImathBoxAlgo.h.
|
||||||
|
Results are now consistent with those from intersect(), also
|
||||||
|
in ImathBoxAlgo.h.
|
||||||
|
(Florian Kainz)
|
||||||
|
* Made Vec2<T>::length() and Vec3<T>::length() more accurate for
|
||||||
|
vectors whose length is less than sqrt(limits<T>::smallest());
|
||||||
|
(Florian Kainz)
|
||||||
|
* Made Quat<T>::angle() more accurate for small angles.
|
||||||
|
(Don Hatch)
|
||||||
|
|
||||||
|
Version 1.0.1:
|
||||||
|
* Removed Windows .suo files from distribution.
|
||||||
|
(Eric Wimmer)
|
||||||
|
|
||||||
|
Version 1.0.0:
|
||||||
|
* Bumped DSO version number to 6.0
|
||||||
|
(Florian Kainz)
|
||||||
|
* Rounding during float-to-half conversion now implements
|
||||||
|
"round to nearest even" mode: if the original float value
|
||||||
|
is exactly in the middle between the two closest half values
|
||||||
|
then rounding chooses the half value whose least significant
|
||||||
|
bit is zero.
|
||||||
|
(Florian Kainz)
|
||||||
|
* Installation Tuning:
|
||||||
|
- Corrected version number on dso's (libtool) - now 5.0
|
||||||
|
- Separated ILMBASE_LDFLAGS and ILMBASE_LIBS so that test programs
|
||||||
|
in configure scripts of packages dependent on IlmBase can link
|
||||||
|
with static libraries properly
|
||||||
|
- eliminated some warning messages during install
|
||||||
|
(Andrew Kunz)
|
||||||
|
|
||||||
|
Version 0.9.0:
|
||||||
|
* Initial release of this code as a separate library.
|
||||||
|
Previously the libraries contained were part of
|
||||||
|
version 1.4.0 of OpenEXR
|
||||||
|
* New build scripts for Linux/Unix
|
||||||
|
(Andrew Kunz)
|
||||||
|
* New Windows project files and build scripts
|
||||||
|
(Kimball Thurston)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user