mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
Compare commits
2438 Commits
3.4.12
...
4.5.2-openvino
| Author | SHA1 | Date | |
|---|---|---|---|
| 898c639f6a | |||
| 9cf89fbe89 | |||
| 130257f8e7 | |||
| fd5337d532 | |||
| 0fe0a0237a | |||
| 6291503793 | |||
| be24659c03 | |||
| 2dc157246b | |||
| b6670f3ac3 | |||
| d2ac304ade | |||
| 16c3522f4e | |||
| 7ac6abe02a | |||
| 6af20d3907 | |||
| a823b06fa5 | |||
| cbb0151303 | |||
| ec4baf337a | |||
| 2ab1f3f166 | |||
| a123c48d4d | |||
| 1c88e1fd19 | |||
| 325bdf952c | |||
| 6fbf93750b | |||
| ba7d0c5b23 | |||
| 5d499a185b | |||
| 65eb946756 | |||
| 137ec1c846 | |||
| b0afb4d63c | |||
| 51fd26b19b | |||
| eab8ac9a71 | |||
| d1c04af603 | |||
| eb82ba36a3 | |||
| 7bcb51eded | |||
| f70e80a6ba | |||
| 19865a26e5 | |||
| 96947c30c0 | |||
| e0265c67c6 | |||
| 19f1bac18c | |||
| b3b80f85fe | |||
| 9695165877 | |||
| 84080c12fd | |||
| 1a855fed8f | |||
| 773262bc09 | |||
| 28c064f345 | |||
| c7f03814ea | |||
| 90623498a2 | |||
| 21b2e33ebb | |||
| fadb25baf8 | |||
| 0553543e6e | |||
| 543379d343 | |||
| 20a46b31cd | |||
| 37eba84056 | |||
| 293e777fce | |||
| b2321576bc | |||
| dd5976162b | |||
| 7328600a7a | |||
| 67b6ef4c2a | |||
| 3d0a421ab4 | |||
| 831d48d971 | |||
| 3a062eed5b | |||
| 52a6a823ad | |||
| 9d61b1e754 | |||
| b89410a266 | |||
| 317db39a5e | |||
| 7ffc4b57aa | |||
| d4d12164aa | |||
| 34d5746553 | |||
| 86cb435adf | |||
| 513f5a8869 | |||
| 1de02b9c57 | |||
| f6bc4fd4c6 | |||
| 9d89edff2f | |||
| 599d64a405 | |||
| 0a6f216f83 | |||
| 9b399f3960 | |||
| 98c2ccfaa3 | |||
| 1d0334fc07 | |||
| 309e1e2b1d | |||
| af13f61a43 | |||
| 6c57428742 | |||
| 0f35412dcd | |||
| d093ac6a0f | |||
| 6d81a88288 | |||
| 96a15434a2 | |||
| 6111935835 | |||
| c131c12fd7 | |||
| 4badf640bf | |||
| ca7518c13b | |||
| 77e26a7db3 | |||
| a7c1838c69 | |||
| 54d80d9168 | |||
| db2cefd12b | |||
| 8f6ba5a089 | |||
| a40d308d6a | |||
| 3dd55d284d | |||
| 5cf08b0722 | |||
| 504ff978c5 | |||
| 0421c3991d | |||
| 50a1a33d07 | |||
| 9a7df7a85d | |||
| 96570820ef | |||
| b5a4bd22fb | |||
| eb90186614 | |||
| 8d21c84e7d | |||
| 0aca3fb5af | |||
| b50c1ba9e6 | |||
| 601851cc7e | |||
| 413c056504 | |||
| 29f55810cf | |||
| f76ba285c9 | |||
| 0a7a54f312 | |||
| 5b16b190c1 | |||
| 0885a79c28 | |||
| 20d5d1c4c2 | |||
| 6d3502833f | |||
| bc8727786b | |||
| 928d5ae315 | |||
| f0445295bd | |||
| 0cdbdfdf9f | |||
| 47426a8ae5 | |||
| cc73c36e32 | |||
| 5a06d679cf | |||
| 76cc034df2 | |||
| cbb230fdfc | |||
| 5d1540f4fc | |||
| fdd5c26eb8 | |||
| a5a421a9f1 | |||
| 743099f9f9 | |||
| ad66b070a7 | |||
| 6f6dd227f8 | |||
| d2d6eba16a | |||
| cceec84139 | |||
| 3d5f9e8b14 | |||
| 2cb48e034e | |||
| c909693d45 | |||
| e5d78960c6 | |||
| fba70f7991 | |||
| 84a290097b | |||
| ba8d20e9ae | |||
| 767127c92e | |||
| 65b5d34aee | |||
| 6ee23c9b85 | |||
| cac5b0fe5a | |||
| 107f233626 | |||
| 0677f3e21c | |||
| 93783df42a | |||
| 1162cef978 | |||
| a3fb64d1cd | |||
| 7079e7ea5e | |||
| 4f39f8a8d0 | |||
| 27bada6737 | |||
| 650836d700 | |||
| c527b3cefd | |||
| 3b9aebee11 | |||
| 847b16fb76 | |||
| 8fa013309e | |||
| 7ab3a80d0a | |||
| e5518ee657 | |||
| 2387813428 | |||
| 0c31c0756c | |||
| 7405075ede | |||
| 6b474c4051 | |||
| a9c954e821 | |||
| b6933dbf3a | |||
| f46b1252c4 | |||
| e6959055b5 | |||
| 0be18f5cb0 | |||
| 7ea21c4b3c | |||
| 9d227641c9 | |||
| 2a2e4e78bf | |||
| fb3b297369 | |||
| 050327a1e2 | |||
| 4f08bb5046 | |||
| 09d2ca17cf | |||
| 83aa711346 | |||
| fcff767a7f | |||
| 7a282a8892 | |||
| 863ecded30 | |||
| 3e34cec96b | |||
| 6ca46afa63 | |||
| 0a86ddc36c | |||
| ab0e1c573a | |||
| 26da491053 | |||
| 674ecc5581 | |||
| 6c1a433c4c | |||
| eced4dd023 | |||
| 23734aff74 | |||
| 0016c25b58 | |||
| 94e1126678 | |||
| 68eb54dc13 | |||
| b08d67c4e1 | |||
| 2b787eb4b8 | |||
| 5ab4623c2a | |||
| cdf73f2e05 | |||
| 30bef20e22 | |||
| 4be077163f | |||
| b9dfffc237 | |||
| c5bf15e009 | |||
| e2949c7d0a | |||
| e448f4f6ef | |||
| e250bae356 | |||
| ebd91459f2 | |||
| 1a5b411ae4 | |||
| 4c7f56263e | |||
| 6be9496d73 | |||
| 46b2da409b | |||
| 694fe3e7d2 | |||
| 900051cd04 | |||
| 34c3f0f495 | |||
| e705414bea | |||
| 467870415b | |||
| ff8a624189 | |||
| 37c12db366 | |||
| 449ebc1b70 | |||
| b73bf03bfc | |||
| 3f14341629 | |||
| ca9cbab532 | |||
| 5c70a2015f | |||
| 8c221981bf | |||
| e85b41f9be | |||
| 573812d0ff | |||
| c12930cdde | |||
| 857f339914 | |||
| b1ffe7a153 | |||
| f54f6627c3 | |||
| 62b60b11bb | |||
| 96e0902f39 | |||
| 1d3207d7c7 | |||
| 13a1105318 | |||
| 8e5e1b62aa | |||
| 19ef9505e8 | |||
| e982ad2284 | |||
| fb0abdeb4f | |||
| 331f1b9961 | |||
| 3cfe7b9af9 | |||
| 37e656082b | |||
| 0c0cf8b19f | |||
| 7825abd540 | |||
| cd59516433 | |||
| bbad38b2c5 | |||
| 413febf657 | |||
| d5447d859f | |||
| 1a3a25f825 | |||
| 38a49f92ab | |||
| b4e941d431 | |||
| ea41f89b40 | |||
| 7a790d0d35 | |||
| 995c308a49 | |||
| 1d5589296e | |||
| 0f968e3b6d | |||
| 8a44e712f8 | |||
| e4e10e54df | |||
| f65d75f5c8 | |||
| d93790717d | |||
| 291dbdfbe6 | |||
| 5e5f47321b | |||
| 6ce9bb6f7a | |||
| 109637e213 | |||
| a0bdb78a99 | |||
| 321f26f450 | |||
| 212815a10d | |||
| 104e64dd0f | |||
| e49ae68524 | |||
| 49127b6a26 | |||
| 255853a819 | |||
| 5967acc9ca | |||
| 28c0cd8460 | |||
| eea4397b12 | |||
| a122a53e72 | |||
| 8215380336 | |||
| 10ef76905c | |||
| af9597f454 | |||
| e43375cc68 | |||
| 63bb2abada | |||
| 235e648bf5 | |||
| 5202186681 | |||
| 98889e41b0 | |||
| 962cdc2d98 | |||
| 71acf078ba | |||
| b3233de1c2 | |||
| 63982d6771 | |||
| 2cd540b9c4 | |||
| bbdae291ed | |||
| f9f33a7bb5 | |||
| d34a34f328 | |||
| 3eaeca58da | |||
| d3bc563c6e | |||
| fbcc532de5 | |||
| 72894a1a90 | |||
| e3856dfe5d | |||
| 62420b900e | |||
| 89ef676613 | |||
| 83e14f602f | |||
| 5389309d40 | |||
| 058460ddf4 | |||
| 380009ac58 | |||
| 2775099a32 | |||
| f98e567f49 | |||
| 9fb48d5f44 | |||
| 8f653ba8de | |||
| 87b3b48fe0 | |||
| 0043d9bf13 | |||
| 2d2d72afbb | |||
| 941a9792f7 | |||
| 646a023ff4 | |||
| 4f9cb3871a | |||
| 005508a07b | |||
| 5b598c1812 | |||
| 701744c621 | |||
| e4c7fca755 | |||
| 8f66dad65b | |||
| bec7b297ed | |||
| ee17b5de6e | |||
| a0041125c6 | |||
| 378a634de8 | |||
| 8a05850302 | |||
| 55f06b76f9 | |||
| ba3f150b14 | |||
| 2f8c62999f | |||
| 3eea3dd46b | |||
| ba2b331461 | |||
| a6f7dca685 | |||
| 282605ea76 | |||
| 6e1da2ef91 | |||
| 244511e434 | |||
| 656b20a169 | |||
| 50bb344a9d | |||
| 1ec2ade65b | |||
| 13148df9f2 | |||
| 5a10261111 | |||
| 064d48771d | |||
| 1c078c59e3 | |||
| 7eeba4d485 | |||
| cd68cc1f46 | |||
| 0681deb3c9 | |||
| e80f6624ed | |||
| 109255a730 | |||
| b13b5d86f6 | |||
| 0ffa78b66a | |||
| 15265918a7 | |||
| ed00088f17 | |||
| 3ed376d103 | |||
| e2930c7898 | |||
| 84676fefe3 | |||
| 1363496c11 | |||
| a029f03edc | |||
| 03df48899c | |||
| b51ae87828 | |||
| 68fb8dd873 | |||
| cdbea6f0a0 | |||
| 8869dc7762 | |||
| 6659d55a9d | |||
| e6c9291e32 | |||
| a6f14ca97c | |||
| c555a6747d | |||
| dd276dbb59 | |||
| 70d82017fe | |||
| 663bd73518 | |||
| c526705f4f | |||
| c84d2cb32a | |||
| ff211371bc | |||
| e9a4734a57 | |||
| 3359bdc464 | |||
| 17faee5d81 | |||
| b4795086fe | |||
| 5cd852f9bd | |||
| 4c75b1c102 | |||
| a6b5771297 | |||
| dac298ef41 | |||
| ef27c11d50 | |||
| cd3939a153 | |||
| 9f5463ce42 | |||
| 3bc1b53962 | |||
| de1b919641 | |||
| 3e9158acd6 | |||
| 03e224ee83 | |||
| c2bc171ef6 | |||
| f8740e124c | |||
| b82700ae41 | |||
| 009860e98a | |||
| 57da381ae3 | |||
| 935cb4076b | |||
| b2ea15da35 | |||
| 9733177083 | |||
| fa665141bb | |||
| 64720f15a2 | |||
| 8df0f13230 | |||
| 624d532000 | |||
| 94e7be3714 | |||
| 9b4adc9acb | |||
| e27162397a | |||
| 99d750d597 | |||
| c51f5e8d76 | |||
| ba7dbca018 | |||
| 8391a23600 | |||
| ec3ef520e6 | |||
| 28aab134db | |||
| 752cc26ad6 | |||
| d159417474 | |||
| 7d7ab462d6 | |||
| c4c21c2fa7 | |||
| e06a497c7c | |||
| 7b0d7d0c9a | |||
| f7cab121fe | |||
| bb59b81d82 | |||
| 7631056b8a | |||
| 4107dc7355 | |||
| b74804f61f | |||
| 50baf76cc2 | |||
| 085a131801 | |||
| 50fed1d774 | |||
| c240355cc6 | |||
| a9edcc1705 | |||
| 4b3d2c8834 | |||
| fcdd69fd97 | |||
| 48d9031efb | |||
| a8adb99e94 | |||
| b01ae2de05 | |||
| 46e275dfe4 | |||
| af71b03000 | |||
| 392991fa0b | |||
| 743f1810c7 | |||
| dd1494eebf | |||
| 1bfc75ac23 | |||
| 5bb45baa6c | |||
| def679554f | |||
| 08b6abd711 | |||
| 33761ee06b | |||
| a04479746a | |||
| d2b8fd6401 | |||
| 8ac304517e | |||
| 4f236d1c50 | |||
| f9f9e2ad4a | |||
| e52291cbcc | |||
| 23c246882e | |||
| f290ff215e | |||
| 79b4dc14a3 | |||
| 8ed0fc6f0c | |||
| 9f01b97e14 | |||
| 1f3255d76b | |||
| fdeac73a59 | |||
| 175cd03ff2 | |||
| 9f52244574 | |||
| d6a7f5e1e0 | |||
| fce8d8e090 | |||
| 8ce08dedfe | |||
| 32377ce57d | |||
| d84a9484b7 | |||
| 8ff27a07bb | |||
| 55a2bcbe15 | |||
| f2422ace7d | |||
| d1ea2ad143 | |||
| 3e5d7e1718 | |||
| de385009ae | |||
| 114848d313 | |||
| 8286d84fb1 | |||
| c42d0c8374 | |||
| 37bfb3c48d | |||
| b3937288e5 | |||
| a55150b1bc | |||
| 7eaa548b6d | |||
| d7e936de5c | |||
| d2bc0e5fe0 | |||
| d8107a5125 | |||
| a82c50eac2 | |||
| 7fa9efbfd8 | |||
| b5a9ef6b7b | |||
| 8ebe320270 | |||
| fe3893ff01 | |||
| f41327df0c | |||
| f77276311d | |||
| e8348e5f64 | |||
| da5bfefc78 | |||
| 619cc01ca1 | |||
| ad94d8cc4f | |||
| c3cebc3ac5 | |||
| fb85974d01 | |||
| 02488c5cbb | |||
| 3377ddaf09 | |||
| 40ca8f4695 | |||
| 962f5c9b82 | |||
| 2c634eeef2 | |||
| c6e60f06eb | |||
| e5d2642780 | |||
| cf28b5e5be | |||
| c79a1528ad | |||
| 31619faa70 | |||
| 9e6b7f5dc1 | |||
| a9f4f8ded4 | |||
| 541a09b7ac | |||
| 26e8048a0a | |||
| 6bfb0dda85 | |||
| d1b5a78171 | |||
| 753ccd6b17 | |||
| 8ae1552a5b | |||
| 08bee40fa2 | |||
| 00f36a3149 | |||
| 461e26b60b | |||
| 6fdb7aee84 | |||
| 12a36b5a94 | |||
| 22d64ae08f | |||
| e371592f75 | |||
| 84a3654371 | |||
| 7e5c4fe1cd | |||
| 5ecf693774 | |||
| 773ccc4bf8 | |||
| b31ce408ae | |||
| 7983c484b2 | |||
| 6502737bd5 | |||
| b98dd728ca | |||
| 7f3ba5963d | |||
| 43e58de918 | |||
| b7a70fda79 | |||
| e309ad8465 | |||
| 2fa624aef0 | |||
| b023fcd264 | |||
| e958600f32 | |||
| 484251c52b | |||
| e98c845f0b | |||
| e4ed1d08f4 | |||
| 8e32566583 | |||
| 512be4ab65 | |||
| 6f8120cb3a | |||
| a3de45741e | |||
| 7d7d907de7 | |||
| c42d47d94a | |||
| d35e2f5339 | |||
| 673e4e20f0 | |||
| 38a4eaf8a3 | |||
| 29b453eb86 | |||
| ef0eed8d3c | |||
| 91ce6ef190 | |||
| 9d37cdaa66 | |||
| 3f686a6ab8 | |||
| db3e3a766a | |||
| 9cef41000a | |||
| fc54853d44 | |||
| 6f5af6eb42 | |||
| eb6d8e6af2 | |||
| 446f344818 | |||
| 3c40f87af3 | |||
| aac30e772f | |||
| 69e1167882 | |||
| acc142d4ba | |||
| e726ff3296 | |||
| 56568dae31 | |||
| 24fac5f56d | |||
| 74b6646737 | |||
| 986ad4ff06 | |||
| 95ce8f45ea | |||
| 4e4458416d | |||
| da2978f607 | |||
| 7521f207b1 | |||
| 2155296a13 | |||
| 23be514886 | |||
| 77b986c7a1 | |||
| f90673ef4c | |||
| df18431b45 | |||
| 7c78c59e64 | |||
| 5c987e4c75 | |||
| 0cc92bd67c | |||
| 7efc0011fd | |||
| 2cf2456f4c | |||
| ece14eae24 | |||
| 3c9d03c36f | |||
| 8c5b3c4150 | |||
| 36d771affc | |||
| 7afd48658c | |||
| 387a76ba59 | |||
| f601e817fe | |||
| 3fd0d0dafb | |||
| f28895cd6b | |||
| d65c6af3a5 | |||
| c08e38acd0 | |||
| 0800f6f91b | |||
| 85b0fb2a9c | |||
| 19d825aa16 | |||
| f4f462c50b | |||
| e1a8fc0417 | |||
| eafe6ccdbe | |||
| 359ecda4fc | |||
| bf0846f0ea | |||
| 0401d5920c | |||
| ac418e999d | |||
| ae42815b7d | |||
| 5a3a915a9b | |||
| 632a08ff40 | |||
| 0f8ab0557e | |||
| 1b3dd8f38b | |||
| ce31c9c448 | |||
| bc434e8f67 | |||
| 0105f8fa38 | |||
| e05c2e0f1d | |||
| 2255973b0f | |||
| ac24a72e66 | |||
| 049b50d9c0 | |||
| 12fd382fec | |||
| c996fd1c06 | |||
| c4c9cdd2b1 | |||
| 34c4e454c5 | |||
| 11cfa64a10 | |||
| adafb20d1e | |||
| bb067c7ebf | |||
| 599bb9c457 | |||
| dbfa1bfba4 | |||
| f8c7862f69 | |||
| b86f129393 | |||
| 12b8d542b7 | |||
| fef23768fe | |||
| 328883b6ea | |||
| 87ed750510 | |||
| cc7f17f011 | |||
| 3c25fd1ba5 | |||
| e8536c4a0e | |||
| 2687a2b6dc | |||
| aab6362705 | |||
| 94e8a08d1d | |||
| ce8027c6fb | |||
| 301c078d19 | |||
| 9485113923 | |||
| 9acbfc6e05 | |||
| 4f3130f562 | |||
| a783bf4a93 | |||
| f7e8dc770a | |||
| 34909d97b4 | |||
| 474a67231c | |||
| a316b11aaa | |||
| b645fc10a3 | |||
| 8e1e08ee38 | |||
| d266fee8bb | |||
| 8357e865bc | |||
| 2c6a2f0381 | |||
| fe9a8ebea2 | |||
| b866d0dc38 | |||
| 2b558a3787 | |||
| 72d06080c6 | |||
| 3cdf926454 | |||
| 23baf1a75e | |||
| 025a9647af | |||
| 32e7ef8a3d | |||
| 2b82f8f12c | |||
| b5c162175b | |||
| 60c76cc289 | |||
| efd556b1a9 | |||
| 3a184ae677 | |||
| b4b2a276c8 | |||
| 464d53bb16 | |||
| 4c9e3723e8 | |||
| 06477743ab | |||
| e4a9ad1730 | |||
| d0b6637c1d | |||
| 58268b6eef | |||
| 14aa8affe5 | |||
| 56074c2eb3 | |||
| 3da1e8b2f8 | |||
| 786cecfe66 | |||
| dde3cb3b99 | |||
| 24f2b7dd3f | |||
| 936530f795 | |||
| cfbdbffcad | |||
| 71db9d3b57 | |||
| b455e1cf52 | |||
| 564d1a0f79 | |||
| 90bea15e35 | |||
| 892cac9e1b | |||
| f58f36dc88 | |||
| 9e84b860f2 | |||
| 2e7ef6f4e8 | |||
| cea137f313 | |||
| 79a82013ad | |||
| 05c011e842 | |||
| 3826158547 | |||
| a7c150ec66 | |||
| 61144f935e | |||
| d23435baac | |||
| 389495f76a | |||
| a3f3fbe05d | |||
| 4d00ed8df7 | |||
| 41e906d1a4 | |||
| 41c2669476 | |||
| 0e4b5b88dc | |||
| 011d8e80d8 | |||
| 1f8f0abe92 | |||
| d9c5b85671 | |||
| 76cf31bee7 | |||
| ed3591ed1f | |||
| d986cc4861 | |||
| 724001aa0f | |||
| 5564d73071 | |||
| 3fc1c73064 | |||
| 1b0dca9c2c | |||
| 5dae278652 | |||
| ef32d7fd16 | |||
| 30d91e8ed6 | |||
| 5f1ca33c6f | |||
| c69417149d | |||
| 08271e5591 | |||
| a104e7c593 | |||
| c3e7a23da5 | |||
| 083edb201c | |||
| df7bf9a048 | |||
| bed5debca6 | |||
| caa1658a4c | |||
| bb5b628cce | |||
| e12adcdf08 | |||
| 127a44f2b9 | |||
| 527cedd848 | |||
| ec5065eb53 | |||
| 90524a8528 | |||
| ad71a1633c | |||
| eb24575e2c | |||
| d9877efe1d | |||
| 7459613623 | |||
| fb69620a27 | |||
| a6e15b2f57 | |||
| 39ecd96b09 | |||
| 21a8d9569d | |||
| 07736c912f | |||
| 24d60da553 | |||
| 039795b405 | |||
| a110ede0a2 | |||
| 2a3cdba724 | |||
| 099ad1a259 | |||
| 6df92b3bca | |||
| 48ccbe39b4 | |||
| 716450ceb5 | |||
| 691c3d1e3c | |||
| ca8bb8d053 | |||
| 56d2b7137c | |||
| d9a62c42e5 | |||
| 97eaddd93b | |||
| e3ce0fbee3 | |||
| 364702b1c9 | |||
| 978f387961 | |||
| 209f6cdcc7 | |||
| 0f7b2eb79f | |||
| 4a0760719e | |||
| d011383a3d | |||
| 1fe276d041 | |||
| f345ed564a | |||
| 3d4563913d | |||
| 93c3775927 | |||
| afbf383ba3 | |||
| 36598677cf | |||
| 0ec94630d4 | |||
| c71f2714c6 | |||
| 71462d9f99 | |||
| 72dfd4846e | |||
| 61a8cf8ba7 | |||
| bd40952097 | |||
| 8869d3212f | |||
| ea1e3fb90d | |||
| 3a99fb9d34 | |||
| e1b56e376e | |||
| aac7c5465b | |||
| 22ee5c0c4d | |||
| e8058b9fdb | |||
| d31b6c3480 | |||
| 95ff928228 | |||
| 510dc17c2e | |||
| 2669d8ce73 | |||
| 7f3d8de26f | |||
| 331b73c8e4 | |||
| 1729297ef3 | |||
| 9138c98b25 | |||
| 456af21d8b | |||
| b87f7a625e | |||
| c3e8790dfd | |||
| bf49149c97 | |||
| 49d5960a32 | |||
| dcfa23d5d2 | |||
| 5ac0712cf1 | |||
| c82417697a | |||
| adac1da64e | |||
| 9c8626bf3c | |||
| ef21fd3cf8 | |||
| bd19f991a5 | |||
| e87ba1d317 | |||
| f9d1f5196a | |||
| b5717f82a0 | |||
| aa51382dbc | |||
| bc6a70c689 | |||
| 1fb6c6e6e5 | |||
| d2dbc9d7a0 | |||
| 8bf451a3e0 | |||
| 0d3e05f9b3 | |||
| 8c4d415412 | |||
| 06a09d5991 | |||
| 57c894f44d | |||
| 7de189114b | |||
| 4c048a487e | |||
| 09a62012b2 | |||
| b494de6a01 | |||
| dbeec7715d | |||
| 25163eb008 | |||
| 1048feac3b | |||
| 96e8b83d41 | |||
| 78476a0fe2 | |||
| d5fd2f0155 | |||
| c8ebe0eb86 | |||
| de93782fab | |||
| 16561ed71e | |||
| 4bfdf7cf2a | |||
| e58da86efc | |||
| 7ed82aea38 | |||
| 2dd2d60955 | |||
| 1b443219ed | |||
| 76be3529f4 | |||
| 6a51e3b39a | |||
| ae265a48c7 | |||
| af2f8c69f0 | |||
| 46ccde82cf | |||
| 537494f4dd | |||
| 39d5e14c1f | |||
| d5dce63254 | |||
| 01981ed290 | |||
| 6f5d56d994 | |||
| 793b2b9ad9 | |||
| 050c960dfc | |||
| aabeb8a18e | |||
| d7d51e4cc7 | |||
| 5224d016e9 | |||
| 199687a1c5 | |||
| b5a6c8e2b2 | |||
| 955909bdb5 | |||
| e3da18121f | |||
| 0c4a8e2ca8 | |||
| a3e7c2d8e3 | |||
| 40b8b58bc6 | |||
| fc1a156262 | |||
| 8cbd20b380 | |||
| 43d306fc2d | |||
| 01e23a2222 | |||
| f88d89ad82 | |||
| b29f73d5e0 | |||
| e998d89e88 | |||
| b91e701f35 | |||
| 295afd5882 | |||
| 8da1b9aafa | |||
| 19f4cc57c1 | |||
| 80d4d4d92c | |||
| 6a7df4e973 | |||
| 098f07664d | |||
| 4dbb8ac4b2 | |||
| e7f2af5fdb | |||
| 4419f4093e | |||
| c945ea125a | |||
| c32e349332 | |||
| 118218754b | |||
| 00c61cf197 | |||
| f6901ab877 | |||
| 862fc06b6f | |||
| 89ed813585 | |||
| 0dc28d3446 | |||
| 50657e2324 | |||
| 7c22cd49a7 | |||
| c012490399 | |||
| e937d9b559 | |||
| 688aea6bec | |||
| 7186c46377 | |||
| 3fc1487cc9 | |||
| 48ddb53332 | |||
| f584c6d723 | |||
| 3ea9022c5f | |||
| 45ee8e2532 | |||
| f7b8f522ff | |||
| f6aa9ac304 | |||
| 6c575e8826 | |||
| f52a2cf5e1 | |||
| 5bfb779d82 | |||
| 95fd61c9b4 | |||
| d1cdef596c | |||
| 7163781639 | |||
| a63cee2139 | |||
| 830d8d6b75 | |||
| a07f064e50 | |||
| ea4b491a73 | |||
| 986bc65e1f | |||
| 5218443784 | |||
| 3b00ee2afb | |||
| 7d832337ae | |||
| a258404a58 | |||
| a3048239b3 | |||
| f787c73841 | |||
| 1604ea3b27 | |||
| b23d377567 | |||
| f445b826d0 | |||
| a12ceb04bb | |||
| 623aaaccd4 | |||
| da0fd62c23 | |||
| a10d289997 | |||
| 750b1aba8d | |||
| a3e8c6e866 | |||
| bfd056ceb1 | |||
| 620629593b | |||
| 05ad3a535f | |||
| 5c76f99fdd | |||
| 36915db699 | |||
| 17640d6008 | |||
| 8711653530 | |||
| 7e019af50d | |||
| 8b61719a9d | |||
| 5ae9892170 | |||
| 6426101433 | |||
| cf8322c0d3 | |||
| 0384eb7d8c | |||
| 0c84b91dde | |||
| 7a796b20ea | |||
| 71f665bd8c | |||
| 2129c72bc0 | |||
| 0428dce27d | |||
| 60354e3901 | |||
| 2e6e9c14b5 | |||
| 721ab68bec | |||
| 192e5c8166 | |||
| bce5d364df | |||
| 2dfb163281 | |||
| 417d7a38de | |||
| ba147d2be2 | |||
| 1192cbe4ab | |||
| 458bd1652d | |||
| e5e08ec523 | |||
| 3547ac4b49 | |||
| f6c2bf21c8 | |||
| 397ba2d9aa | |||
| da555a2c9b | |||
| 8cc2cbf1c4 | |||
| d696d7f9ea | |||
| 41548a091b | |||
| c9e1386e44 | |||
| 5108e3ced6 | |||
| 8753203df0 | |||
| a66f61748f | |||
| b45273eccb | |||
| 7fe87d9a5b | |||
| a37f7cce52 | |||
| 949fe93d5a | |||
| b4e9b4fe7d | |||
| c3ced6db4e | |||
| 0b38571920 | |||
| 2ffe15f22f | |||
| 31ddd98c8e | |||
| 759c9522fd | |||
| f0149cdae2 | |||
| bedabc15ae | |||
| 565f14655c | |||
| 760e7e8efa | |||
| fa25faa2d2 | |||
| dbab8d8c38 | |||
| 9f02b8742e | |||
| 422f802ec9 | |||
| 5fd3d36fe8 | |||
| 11eff8bae0 | |||
| 27b2059662 | |||
| e6ec42d462 | |||
| ff4c3873f2 | |||
| 1192734131 | |||
| 29976a04c5 | |||
| a3106d424b | |||
| 77b01deb80 | |||
| f53f491cd2 | |||
| e421233a1d | |||
| a2f7ef9d21 | |||
| c708f506a4 | |||
| ae293f27cf | |||
| afe9993376 | |||
| a9f5c19239 | |||
| 53bfdc318a | |||
| 4cf76754d3 | |||
| b698d0a6ee | |||
| 11fb04c2f7 | |||
| aaf65bb3af | |||
| 9d38a95292 | |||
| 0291dd3ef8 | |||
| a46ca98c57 | |||
| e65e23b9c0 | |||
| d8b2f11cc8 | |||
| c3bb57afea | |||
| 8a480ac3c1 | |||
| ffe0d50447 | |||
| a199d7adf1 | |||
| 348414dc62 | |||
| 243ce78508 | |||
| 33db2ac928 | |||
| 1fabe92ace | |||
| 4564b8a224 | |||
| 971cc3354b | |||
| 9b7b22ee0e | |||
| d17ab271e8 | |||
| a216b8bf87 | |||
| af9ee90091 | |||
| cb2e276bff | |||
| cd0f0384ef | |||
| 5924770504 | |||
| 111cdd7a32 | |||
| 89a17b4232 | |||
| f0c411d8b5 | |||
| e5e767abc1 | |||
| 521aac9665 | |||
| 1949056423 | |||
| 3d50bde46e | |||
| 0b454486cf | |||
| ead1dcf308 | |||
| 553259ef99 | |||
| ff992183b2 | |||
| 37e2afb8f6 | |||
| d0e6d2438c | |||
| a724dc99e8 | |||
| 44d473fba0 | |||
| 988bc804bf | |||
| 52ac3661b0 | |||
| 27f1ab5a70 | |||
| 8bf1b9a422 | |||
| 524a2fffe9 | |||
| 6781ca7d55 | |||
| 0970ef57bd | |||
| f98c97f796 | |||
| 46d3637609 | |||
| 992c908b56 | |||
| cbdaa93e54 | |||
| 4988e131fd | |||
| 657c8d1c65 | |||
| e03891b744 | |||
| a5fdcf9881 | |||
| 62a63021c7 | |||
| 33fab84473 | |||
| 0ccc839397 | |||
| a711e2aa41 | |||
| ab4065fa1c | |||
| ee73b0bd08 | |||
| e58977a3de | |||
| 31bee49371 | |||
| 48ef6df842 | |||
| 98ad7d01d5 | |||
| 206c843f36 | |||
| 4e6a108bda | |||
| c62e63909a | |||
| 7566921364 | |||
| 4cec9e5ff1 | |||
| 59ba33658a | |||
| 085bd5f55f | |||
| 86905754e4 | |||
| 6044395986 | |||
| eff259b047 | |||
| 4f03f70968 | |||
| c81d785ada | |||
| 6fb46bb34b | |||
| 365a10f58c | |||
| 3bdd7bfbea | |||
| 6573b9ace0 | |||
| ee5ff71d55 | |||
| 6e5f0a2a58 | |||
| 721fac5542 | |||
| 99bc35a883 | |||
| 63e92cccf2 | |||
| a74ed58893 | |||
| 5ed65460d1 | |||
| 0eb7060205 | |||
| e3d502310f | |||
| 9ba5581d17 | |||
| 6fdddd53a1 | |||
| 88a187a737 | |||
| 57f5700e18 | |||
| d84b213f59 | |||
| 177fbc7bbb | |||
| 56373428dc | |||
| 13962b8533 | |||
| 04bee3f9b7 | |||
| 305a245530 | |||
| 74113737f3 | |||
| c244b456f0 | |||
| 87ab4ee567 | |||
| 0cbaaba4b1 | |||
| 6fbf7042b5 | |||
| 265acccd56 | |||
| c6638d62e6 | |||
| 55ca0fcc27 | |||
| 25f3a11a16 | |||
| b1706bc7e5 | |||
| 579d74d35b | |||
| 7ce518106b | |||
| 171cba4947 | |||
| fd498501d6 | |||
| 51bfe74ce1 | |||
| 5f3012fc9a | |||
| 0f3c82e73b | |||
| 02385472b6 | |||
| f30b5995b6 | |||
| 89a6937c00 | |||
| 08a3eef62a | |||
| 434014b05e | |||
| 29ff1129fb | |||
| 5906b49bd1 | |||
| b03ed532cf | |||
| 7d30e19b3e | |||
| b083c20eb2 | |||
| 7722a2b8a8 | |||
| 977e5afbac | |||
| a17d1843fb | |||
| c3e8a82c9c | |||
| d3aaf2d3a3 | |||
| 515a06cedf | |||
| 9f177b2bcd | |||
| 765f333a1d | |||
| 4e97c69792 | |||
| 88d8a48b09 | |||
| 6202556fc0 | |||
| be9f3826d7 | |||
| 7f453ade73 | |||
| b3a261c7ce | |||
| 6b0fff72d9 | |||
| 21e28adb87 | |||
| 57ca10636c | |||
| e96a58f091 | |||
| e02318d384 | |||
| 9039284d96 | |||
| 593af7287b | |||
| c0f435349a | |||
| 5ecf5f106a | |||
| 5b095dfcb6 | |||
| 7c41b54e3d | |||
| 486de65067 | |||
| 06bff34a6b | |||
| 77ddfa2fc9 | |||
| 7386d8523b | |||
| 713577b257 | |||
| 583f4b9633 | |||
| 45a6386e45 | |||
| 3c35b563d7 | |||
| d981d04c76 | |||
| 666be238d8 | |||
| 3e3d4ad797 | |||
| 6e5437a582 | |||
| 09799402f9 | |||
| c722625f28 | |||
| 1d30a524fa | |||
| 7f90f04df2 | |||
| 7228d2a824 | |||
| 152e6476d9 | |||
| 15b948d109 | |||
| aff2c7c43c | |||
| 51a42c0647 | |||
| 189fc43765 | |||
| a1641f938e | |||
| 351fb8c058 | |||
| 561421f748 | |||
| 9415560250 | |||
| 511d0fe198 | |||
| bfcc136dc7 | |||
| 94e36d8c8d | |||
| 4ee6852a1e | |||
| 05d5c284f6 | |||
| f19d0ae41d | |||
| 850b1ea2d7 | |||
| 10d2bcc8a2 | |||
| 7ce1bd5d88 | |||
| 2cef100303 | |||
| fecebea2e3 | |||
| 07a0274507 | |||
| 8ff0399432 | |||
| dd2c7c5140 | |||
| ca9756f6a1 | |||
| f351653589 | |||
| 0556450801 | |||
| 1537a5f253 | |||
| ce772b346c | |||
| b1f42a6506 | |||
| cb5921b375 | |||
| 016f9ab16e | |||
| 499e20da4f | |||
| d50c21e571 | |||
| 676d1dfd5b | |||
| acede976e4 | |||
| 90e7c29c46 | |||
| ca6a11e4d2 | |||
| b8579f12be | |||
| 31ec9b2aa7 | |||
| 0c2a43923c | |||
| 63320aba6c | |||
| 2fe9c87433 | |||
| ab4dbff150 | |||
| 01a85736e6 | |||
| 7d5a8053d7 | |||
| b8cf5d8d5f | |||
| 43df944eb4 | |||
| 763a1d7392 | |||
| 5db3092a1f | |||
| be1615b1c3 | |||
| ca9fd66744 | |||
| bdc95d2c66 | |||
| a10385543b | |||
| e80adc0bc6 | |||
| 1b5730a799 | |||
| 01dcfb0825 | |||
| 01b2c5a77c | |||
| 3a45a65625 | |||
| c8776e6ebd | |||
| cf2a3c8e74 | |||
| 277f0d270f | |||
| 3ffed0bf6e | |||
| 557ac3dbaf | |||
| d448a636f8 | |||
| 3c5fec6746 | |||
| 95a07ca11c | |||
| 72c5ac37de | |||
| 1eba7f60c2 | |||
| 0c00d082cf | |||
| faceb05775 | |||
| 8d78400052 | |||
| b4b4d21212 | |||
| 99502e99cc | |||
| 99436bb8cf | |||
| c303aaa94d | |||
| b0563ce368 | |||
| 673eb2b006 | |||
| ef395c3866 | |||
| 4d3d6230c5 | |||
| ea34b2fefb | |||
| 978666c816 | |||
| 0b4c101e8a | |||
| 4e8cd4629c | |||
| 4dfa798e75 | |||
| 2aeb32d2d1 | |||
| 760e9e0943 | |||
| 4cdb4652cf | |||
| 020be63df5 | |||
| 31d624f9a8 | |||
| dbb30134bc | |||
| 8fe9674301 | |||
| 2160f9b20e | |||
| 034a43e7f7 | |||
| ca23c0e630 | |||
| c48473dfe4 | |||
| 7e7bb3027c | |||
| 2a52e44bc6 | |||
| 3af63fe052 | |||
| a1230ad0a0 | |||
| 448a5452d0 | |||
| 4cebef9090 | |||
| d3b68b059b | |||
| 866b15ddb8 | |||
| 7d1c42afe1 | |||
| d594e72586 | |||
| 3ba6b41961 | |||
| 034a5f140c | |||
| 11b08b5ff3 | |||
| 850414a501 | |||
| a560ebf09d | |||
| 72fedbe096 | |||
| d00e58cdb0 | |||
| 3c85745e22 | |||
| 3befdb4ae8 | |||
| 27b71d6368 | |||
| 9b3be01b83 | |||
| 44560c3e50 | |||
| 198b5096aa | |||
| 619180dffd | |||
| 6271192a32 | |||
| c9296e599f | |||
| 90a4d67e8d | |||
| 23bc89d6fc | |||
| 73ddc091a2 | |||
| bce9837604 | |||
| f3a50224f2 | |||
| d4a17da7b2 | |||
| bc036e1e86 | |||
| 8ed89bae84 | |||
| 29d214474f | |||
| 8808aaccff | |||
| 831153d5fb | |||
| 333a767be4 | |||
| db5f1c3554 | |||
| 9c4b1d0a51 | |||
| 98b5fb4b9f | |||
| e93c51762b | |||
| b16c1096d1 | |||
| 4d8d152461 | |||
| cc0066d38d | |||
| b17e9c614b | |||
| 45d073f889 | |||
| 95aa6d7307 | |||
| 2617c9aa64 | |||
| 84bb67e49b | |||
| f2d3edec80 | |||
| 53c0189ed7 | |||
| 43a907ddda | |||
| 5e082ab852 | |||
| 8eafddf211 | |||
| c23ab37355 | |||
| 102ef39a27 | |||
| a41cbbdc99 | |||
| 96b26dc8f4 | |||
| 4fdf4d380c | |||
| 1f695c4532 | |||
| 77dd40c96c | |||
| dae1fc8889 | |||
| a6ef9b4584 | |||
| f3237fdc6e | |||
| cc259e49f6 | |||
| 3efa78311a | |||
| aa2777ed61 | |||
| 8a588f2c0b | |||
| a631196155 | |||
| 98d96f2cc8 | |||
| bd6ab6d38e | |||
| f791cf825f | |||
| 7d998336d3 | |||
| d0d676929d | |||
| 4dffcbd9f0 | |||
| 5baa2c0706 | |||
| 225566da7b | |||
| 0dd1ce1a4f | |||
| c56e91dcc0 | |||
| 20fb9281f4 | |||
| a173ea36f7 | |||
| e569e9dcbd | |||
| 01c1b341a8 | |||
| a9a33d9a5f | |||
| 57c9991413 | |||
| bf2f7b0f8b | |||
| 27edba495a | |||
| 0d456f9111 | |||
| 2ced568d34 | |||
| e037800e46 | |||
| 5542dcb2bc | |||
| 560f85f8e5 | |||
| f856c964e2 | |||
| 5d01821d9f | |||
| 4b2363de5c | |||
| 5265db82c7 | |||
| 1358c0ae66 | |||
| e5ed22bd5b | |||
| 3d14dd4e39 | |||
| 3fe9dfaa2e | |||
| 8b3042da63 | |||
| 65ccafd494 | |||
| 6c93e42d94 | |||
| 7dad0f23d6 | |||
| b3a07166ba | |||
| 282fcb90dc | |||
| a696348ec5 | |||
| d85e67d3ec | |||
| c30af724ef | |||
| 1f8802b94d | |||
| 2b9cfe1e1c | |||
| ed377ac1e8 | |||
| ced3df73da | |||
| 4057e81b76 | |||
| 24ca53183d | |||
| fd369a5004 | |||
| a90dacdf75 | |||
| 4e2ef8c8f5 | |||
| afc8dd5661 | |||
| 52f930cca7 | |||
| 4cb9faf6c9 | |||
| f163778da7 | |||
| 55f2370f36 | |||
| fb61f88b9c | |||
| 1e32781b54 | |||
| e57ceea3d3 | |||
| 1f2b2c5242 | |||
| e4a64760db | |||
| 43a91f82fe | |||
| ccfca869e5 | |||
| f6ec467f19 | |||
| 1996ae4a42 | |||
| dec25e8531 | |||
| 48eecafc89 | |||
| 7b12cbd7dc | |||
| 01f97f150c | |||
| 17a35587e1 | |||
| d76f24567b | |||
| 03a602b6ef | |||
| 9ec3d76b21 | |||
| c4c94f891e | |||
| 4ebd91e637 | |||
| 659ffaddb4 | |||
| 2da7360b63 | |||
| 16bc505d26 | |||
| 89d3f95a8e | |||
| bda89a6469 | |||
| ee4feb4b09 | |||
| 1fac1421e5 | |||
| 4de1efd3c8 | |||
| 545f8a8c93 | |||
| 97b6068c46 | |||
| 71ef76ecad | |||
| 4c86fc13cb | |||
| b379969c63 | |||
| b8e0898c7c | |||
| 61969dc158 | |||
| 8f910d2d49 | |||
| fd4fac946a | |||
| 287874a444 | |||
| c6c8783c60 | |||
| a11f9e1963 | |||
| d427cebd12 | |||
| e5b58b1020 | |||
| 2c0d9fa81f | |||
| cf93df41fc | |||
| ba7b0f4c54 | |||
| 17c485eb03 | |||
| 5b0b59ecfb | |||
| c2b6c67431 | |||
| 4a4ff6749b | |||
| f270e8d040 | |||
| 3cd8976493 | |||
| 92b9888837 | |||
| 121bc50ca9 | |||
| 0d19fa0720 | |||
| b8ef2036b0 | |||
| 8b9982a0a5 | |||
| 6b6c2f6087 | |||
| 9a18330f3a | |||
| c89780dfe0 | |||
| 3fddd3bf93 | |||
| b505cf84de | |||
| 476a02739e | |||
| 544ceedcac | |||
| e0e683aedf | |||
| dd3f517fe9 | |||
| 65d606630d | |||
| ad56838040 | |||
| 202ba124a5 | |||
| a91eca6ec2 | |||
| c0503718cd | |||
| 1ddcfc5c68 | |||
| 9b8ddba4d1 | |||
| b2b6f52d14 | |||
| 15621532b8 | |||
| 774d28efb1 | |||
| c3023fb52b | |||
| ccf415c341 | |||
| 8108fb0575 | |||
| b4a3c92867 | |||
| 72315e7b00 | |||
| 1633c29f29 | |||
| 529a241a26 | |||
| 5e3a7ac8a7 | |||
| 63b154396a | |||
| fbb3f64a1a | |||
| 0dc0bc80ae | |||
| 4b0132ed7a | |||
| 78c5e41c23 | |||
| 01a28db949 | |||
| 53b6fb465c | |||
| a7acb8805f | |||
| fb5e7964b3 | |||
| d9efb55d29 | |||
| 9276f1910b | |||
| ad0ab4109a | |||
| a4d16acd00 | |||
| 744798aadd | |||
| 318cba4ce3 | |||
| cf93217365 | |||
| 0867e3188d | |||
| 1261559305 | |||
| af230ec133 | |||
| fc41c18c6f | |||
| 1acadd363b | |||
| ac2dc29525 | |||
| d1c4e4b5a5 | |||
| beb14c70da | |||
| b5426a8679 | |||
| 7a52a4c134 | |||
| 363976694e | |||
| b6a58818bb | |||
| 5dd3e6052e | |||
| 3d47e043af | |||
| 895fc72a0b | |||
| f42d5399aa | |||
| ad5874779c | |||
| d19bccad74 | |||
| 417034518c | |||
| dcf72e49e2 | |||
| c4c4ac28dc | |||
| a165f55579 | |||
| 0d7f770996 | |||
| 0ca5f68d72 | |||
| 48073e6d95 | |||
| 469addeca3 | |||
| c394847c35 | |||
| ea64bb58a5 | |||
| ea5499fa51 | |||
| 278b4ca40c | |||
| cd6d79d106 | |||
| 02f4d6ca53 | |||
| 8dfba51884 | |||
| 055ffc0425 | |||
| 87a692b89e | |||
| 09619c1c45 | |||
| 8bf5bed0a9 | |||
| 5ffeebabad | |||
| e89c1103ff | |||
| fe4f27b99b | |||
| 471b40040a | |||
| 613c12e590 | |||
| 8ec6544624 | |||
| da0fec7308 | |||
| 2477103707 | |||
| 2ff12c4981 | |||
| 194304bbe4 | |||
| cc9b199ecb | |||
| a84969bdcd | |||
| 823e767eed | |||
| e42560bed5 | |||
| d6630ab35b | |||
| 2f30c3fd4f | |||
| 2f9351d995 | |||
| 230e44b01d | |||
| 46206b4814 | |||
| 4c71dbf0af | |||
| 0cf77c3916 | |||
| 9efafc3e33 | |||
| 65573784c4 | |||
| 40215f99d7 | |||
| 9ab5e52f04 | |||
| ec37364762 | |||
| 23288b7cb5 | |||
| 626bfbf309 | |||
| c54753c185 | |||
| 8115b004b9 | |||
| 4429352125 | |||
| c9b2cedebd | |||
| f0058bbed3 | |||
| 3c50d24d8e | |||
| 53c88f0f9e | |||
| d50babfc99 | |||
| 3fb6617d62 | |||
| 3133bb49aa | |||
| 06067efa3f | |||
| 6aa689f87c | |||
| fba9fdfd27 | |||
| 507ca291e1 | |||
| bc927f9788 | |||
| e2a5a6a05c | |||
| 9f4f9000bc | |||
| 6e246ee58c | |||
| 2fef9bc1d8 | |||
| bab8addcbb | |||
| a74fe2ec01 | |||
| a052567db8 | |||
| 2d2330382d | |||
| ee23a7575d | |||
| 9fa6c2ac04 | |||
| 3ece62cb9c | |||
| cd7fa04985 | |||
| b8d4664e6e | |||
| bd5d16ce36 | |||
| e98852a389 | |||
| 08e4ffdf79 | |||
| b4c5b50a3e | |||
| 3ddb005480 | |||
| 1e410ed826 | |||
| 95a55250a7 | |||
| 349f0cf5e9 | |||
| 57b16a4b6e | |||
| 758156a9b6 | |||
| 8747082091 | |||
| 4de115c08c | |||
| 60488ffbbd | |||
| 8b42995e8b | |||
| 84c3bbd934 | |||
| a0d227714e | |||
| bea2c75452 | |||
| 00f36a261b | |||
| b17d16623a | |||
| 61cc855564 | |||
| e736f590f7 | |||
| 6d669dcd7d | |||
| 55c1720719 | |||
| 07f0225ca6 | |||
| f7b5900671 | |||
| 8a7e74673e | |||
| 3c62f3a8e3 | |||
| 48d41ab088 | |||
| e98e58c65a | |||
| 3b9f981358 | |||
| 1661e83939 | |||
| 834c992553 | |||
| 1ae001d10a | |||
| 4e67eb6c42 | |||
| a7b954f655 | |||
| 576644a197 | |||
| 410583e5f9 | |||
| ccecd3405a | |||
| 4700722444 | |||
| 0e92ac2af7 | |||
| b77a0039ee | |||
| b2274a63cd | |||
| 6a439ae53d | |||
| 19a4b51371 | |||
| a41b79d43e | |||
| ec43292e1e | |||
| ea667d82b3 | |||
| 0a02dd5f58 | |||
| 32aba5e64b | |||
| dbf8e22fad | |||
| 0b5d0b83be | |||
| 35e5f00cac | |||
| 290da93845 | |||
| f6bb900259 | |||
| f7f2438478 | |||
| 2ad0487cec | |||
| 72ccb5fe6e | |||
| bf0765fc7f | |||
| 59de4d9ad8 | |||
| 4c168e95de | |||
| 183fc43a67 | |||
| c95407f1bc | |||
| f1ea9d86b9 | |||
| e06efd5329 | |||
| 358d69956a | |||
| 212f0fb509 | |||
| 487d331d74 | |||
| 5e527d22e3 | |||
| 816929c704 | |||
| a9839af903 | |||
| 174b4ce29d | |||
| bca49b99ca | |||
| 6427744063 | |||
| 0757a51e2b | |||
| 290078e0d0 | |||
| 59b0314a0e | |||
| 95eb199f41 | |||
| d659eb9327 | |||
| f17a6b478b | |||
| f18cbd036a | |||
| f9cefc84a3 | |||
| fc85f3644d | |||
| 304e3ac12f | |||
| 778f42ad34 | |||
| f482050f9a | |||
| 4e998c9ade | |||
| 3debb98805 | |||
| ddbd10c001 | |||
| 7c0a43d425 | |||
| 0cf479dd5c | |||
| 1f736a95a7 | |||
| 79859ebca3 | |||
| 5691d998ea | |||
| b10ec8ef8b | |||
| 8313209704 | |||
| 89f23a35c5 | |||
| 293729f48a | |||
| 79310a0051 | |||
| b69bf8a897 | |||
| 426482e05b | |||
| 2734291b35 | |||
| 95c65aff75 | |||
| 3361c59576 | |||
| 8936d55675 | |||
| 199ddff13b | |||
| 985e5014bc | |||
| 8b341884d2 | |||
| a897fc91ec | |||
| e7bb0ecee0 | |||
| 4a28ef8034 | |||
| f6ec0cd827 | |||
| add1df4bcb | |||
| 65d148d9a8 | |||
| c9bd43c0f6 | |||
| c11423df1e | |||
| e629785a97 | |||
| 3a2a74b655 | |||
| 97e88bd769 | |||
| d4501f08b8 | |||
| 2df7736562 | |||
| ee1de8f30d | |||
| bee510dbce | |||
| 571b69bdb6 | |||
| 095f44f4b2 | |||
| 95415ac3a5 | |||
| f6c573880e | |||
| f663e8f903 | |||
| de4d304d90 | |||
| 2a9521661e | |||
| 693877212d | |||
| 8408587341 | |||
| 0fc584961c | |||
| d7744aca02 | |||
| db211446f3 | |||
| 43eba3d750 | |||
| ad49138fae | |||
| 097d81363b | |||
| 2bf8793632 | |||
| bff90d4684 | |||
| 65552bf403 | |||
| 6fdce865b8 | |||
| 453466eb1a | |||
| 49805f976a | |||
| 1666195984 | |||
| 3d345ca4c4 | |||
| 8dd596b7ba | |||
| 719912e46e | |||
| 75c567b6ab | |||
| 0e9a865bbf | |||
| b95e93c20a | |||
| b58b2c5ae8 | |||
| de60600126 | |||
| f4ca2c8e72 | |||
| 46205a7235 | |||
| 974491f93d | |||
| 442bc80cd7 | |||
| f84b08ff08 | |||
| f33f88de31 | |||
| e69ff71302 | |||
| 2b2633c11f | |||
| 729848caeb | |||
| 9cb239247d | |||
| 1b7b2c3a62 | |||
| 7c0a9ff4c1 | |||
| 8d75bfae47 | |||
| 1d2ef6b2a1 | |||
| 7f9a9f2a09 | |||
| 26dfa5e77c | |||
| 7b099e0fe2 | |||
| 66d7956e67 | |||
| 3df83dce7e | |||
| d3c0f4ef98 | |||
| cf9bddcb89 | |||
| 3af1b6ecdc | |||
| 4623e6220f | |||
| ae31115017 | |||
| 6389303c1c | |||
| 5015829ce8 | |||
| 81fad9e247 | |||
| e7dbc4ff28 | |||
| b4d3ff378e | |||
| 6c8ffe81d0 | |||
| 1706a7609a | |||
| d60ac98ef2 | |||
| 3f67623c26 | |||
| 59f4a2e0f3 | |||
| d3d13c41c4 | |||
| f6230ae019 | |||
| 11b020b9f9 | |||
| 987061d800 | |||
| f99f58d99f | |||
| 1aefa6779f | |||
| ddcf388270 | |||
| f3de2b4be7 | |||
| 25e4bce1a6 | |||
| e329c84d5e | |||
| 03a3be0844 | |||
| 76fca0e755 | |||
| db900af8c7 | |||
| 9fd95b93f7 | |||
| ae279966c2 | |||
| 3ccb1d67c2 | |||
| d2d8535a31 | |||
| 419a6d51b3 | |||
| 9f68376c91 | |||
| 216988b0b1 | |||
| 53c771551c | |||
| 43467a2ac7 | |||
| ed96864892 | |||
| d1615ba11a | |||
| 6c6dd16acf | |||
| a6144b8e1a | |||
| 166ecaeda8 | |||
| 2080e06f7b | |||
| 1050b5351e | |||
| 8bf9dda604 | |||
| 54ff72a1cc | |||
| cbb699efd2 | |||
| d9dac9cd1b | |||
| bcf7286ad9 | |||
| 935c02c0a3 | |||
| de977cc9c8 | |||
| e4b9a58c15 | |||
| 3c1267dbe6 | |||
| b4ec8fe3ef | |||
| 6fc6207e93 | |||
| 9003b60d65 | |||
| d93588dfeb | |||
| e21262deba | |||
| b8f9076de0 | |||
| d784b40e24 | |||
| 50af4df1d7 | |||
| b2abd8ca41 | |||
| 2aed9aea47 | |||
| c2e26c1527 | |||
| 610f5481c1 | |||
| 03ec1ca0a4 | |||
| 04caf0549d | |||
| 0e1dd63f5e | |||
| e28e3c9491 | |||
| 076ee65c85 | |||
| 834d438d6e | |||
| f5801ee7da | |||
| faca45a7ea | |||
| e8ac7a34dd | |||
| c9f3f4d1d3 | |||
| 7b8ce63730 | |||
| ffaf4d5da4 | |||
| fb326a3589 | |||
| f81886d17c | |||
| d0032b0717 | |||
| 8120595c3e | |||
| 44bd849697 | |||
| 8af96248bf | |||
| f439fc4306 | |||
| 25247b9f6e | |||
| c024edb9a8 | |||
| 1f517b8a02 | |||
| 7ad5d21900 | |||
| dfb9832a25 | |||
| a56c12278e | |||
| 4635356435 | |||
| d68e722b71 | |||
| 5cb0eded64 | |||
| 15bb0b86ce | |||
| 64168fc20a | |||
| 072b524e02 | |||
| 371bba8f54 | |||
| 2eaf35eb63 | |||
| 0b9d53829f | |||
| c9fc27b337 | |||
| aa1359dc19 | |||
| 4c2100e02c | |||
| 473941c341 | |||
| 4001346a30 | |||
| ee7255aac4 | |||
| 5dc606097c | |||
| 14843679af | |||
| 785a540ebd | |||
| d2854448c2 | |||
| cd6d8048bb | |||
| 3d7a3a51a7 | |||
| b4e2c99346 | |||
| 33dde339fe | |||
| 066c074b66 | |||
| 142a524d2f | |||
| 7142f46d1c | |||
| f2803aba07 | |||
| 45428b897f | |||
| 50a6f9d251 | |||
| 360758e8ae | |||
| 8afb2f0cb7 | |||
| 7442100caa | |||
| 52cd1dacbf | |||
| 62775660d1 | |||
| f75152a597 | |||
| b761ec0132 | |||
| c7c987843c | |||
| 73191ad3ec | |||
| 769d2f4c44 | |||
| 90df5e00b4 | |||
| 8c25a8eb7b | |||
| f147ba16e2 | |||
| c43371f190 | |||
| fbed33cc1f | |||
| a509ec0d91 | |||
| 40da61a314 | |||
| f473b61585 | |||
| 6501cb93a4 | |||
| 0d1a0b126b | |||
| 9a202c1522 | |||
| e8a0bc5794 | |||
| e783e6677e | |||
| 8518d078d7 | |||
| 3a1ccd5f43 | |||
| 6e90b85cae | |||
| dd2823aaec | |||
| 00171ca935 | |||
| 9c748beef5 | |||
| 26087e28ad | |||
| 17ad33c919 | |||
| 1ed47900d8 | |||
| d338644159 | |||
| bd1fd59fc1 | |||
| 1fa3d21f6a | |||
| 3f42122387 | |||
| f73b4f4a26 | |||
| a534af68b8 | |||
| 6e2ede8c56 | |||
| 8c0b0714e7 | |||
| 55f02d8c66 | |||
| 49093d6d38 | |||
| d71977b4dd | |||
| a1ef612662 | |||
| 4f9a99141e | |||
| 713d91b04e | |||
| 332c37f332 | |||
| b46fa2e556 | |||
| 25a9a32f8e | |||
| 11fd9e5fdc | |||
| 403f11fdbf | |||
| b4cba524d3 | |||
| 746cd1e1e6 | |||
| 19cf511895 | |||
| 6b31f58092 | |||
| 7444f0c651 | |||
| dd37c10d4a | |||
| dd262b7087 | |||
| 65e76adeda | |||
| c0d41f05d6 | |||
| 9a6f2630b2 | |||
| 939ea4ba30 | |||
| c3cf35ab63 | |||
| 4188e8aaf9 | |||
| 9702987209 | |||
| 8bde6aea4b | |||
| f1d9666a20 | |||
| c0076b58cd | |||
| 00e8c7810f | |||
| 322115bfcf | |||
| a6160b6994 | |||
| abfcb60118 | |||
| 406392e13d | |||
| 7b7d21ebef | |||
| 54a1bbe1c4 | |||
| caf438c63b | |||
| dfef04b325 | |||
| f8ac46ba07 | |||
| 997b7b18af | |||
| f414c16c13 | |||
| c6f39870ff | |||
| b1cc114b7b | |||
| 766fd20faa | |||
| 315e7fbbee | |||
| fcec053d59 | |||
| d073215f10 | |||
| 665408e57f | |||
| ea3dc78986 | |||
| a65ccc0603 | |||
| e2dbf054ac | |||
| 62f3c9bfa9 | |||
| 287ee9d0ea | |||
| 3c6d5aba22 | |||
| eeb6f7726e | |||
| 631b246881 | |||
| e1c8256602 | |||
| 5728679fd5 | |||
| a6af9c75e9 | |||
| 6de86e325f | |||
| 48e471fdd4 | |||
| e5917a8fa5 | |||
| 49a43dfc8f | |||
| 40959fcc61 | |||
| 55770c9853 | |||
| 2ea4626911 | |||
| c8a89134a7 | |||
| 53c2ebf7f6 | |||
| 7e2ebecd52 | |||
| 581d0ef8a9 | |||
| a9c1af39d6 | |||
| 5f419c014f | |||
| ed7607935e | |||
| 78da679472 | |||
| 2f89158339 | |||
| 27d15894d8 | |||
| 79e13be04c | |||
| c72a855214 | |||
| fd08d0d80d | |||
| d93ec07dd8 | |||
| 6b96512d46 | |||
| a9cf01113a | |||
| 85ade61ef7 | |||
| 3d44e9ad92 | |||
| a8fb72a807 | |||
| 73959fed45 | |||
| e267342108 | |||
| 757411bffc | |||
| 6142b21dd5 | |||
| b363489702 | |||
| dae03273cd | |||
| be6a837e15 | |||
| e1f5b886fb | |||
| c9ad5779f2 | |||
| 26c5b0c71f | |||
| 1dee705074 | |||
| f9c951440d | |||
| 578ea4bae9 | |||
| 6bcf0b5519 | |||
| e82d03ef61 | |||
| eedd7bfd50 | |||
| cbf80117af | |||
| 2b35c1708b | |||
| e093a19c70 | |||
| 6fbcb283b9 | |||
| 7fb70e1701 | |||
| 2fb409b286 | |||
| d5f430cc11 | |||
| fd27d5ea00 | |||
| 493611ace5 | |||
| e058febaad | |||
| d7f60f69f1 | |||
| 4b33910449 | |||
| 0c16d8f6c3 | |||
| 5340073770 | |||
| 384ac63490 | |||
| d38676085a | |||
| d8583b2c7a | |||
| 82227b5ace | |||
| c8f934b5b1 | |||
| a4111fab39 | |||
| 54de51ef3c | |||
| 0915df5b18 | |||
| 81e7c7d8c8 | |||
| ea64e860de | |||
| e70786e05e | |||
| cab15f6c5e | |||
| e82e672a93 | |||
| 93971a53d9 | |||
| 09b3dcb6db | |||
| ef42baf9f0 | |||
| e55ad25355 | |||
| 80a3d7bffa | |||
| 6481397710 | |||
| 388ccda85d | |||
| 2e0150e601 | |||
| 2dc5e245d0 | |||
| ea3a5950a3 | |||
| 4e8311085f | |||
| cf0be1a0af | |||
| c577c2cc6a | |||
| 905d96dd4a | |||
| 197285d12a | |||
| ab430b8c87 | |||
| d1029faa90 | |||
| 6374b99a1a | |||
| 4fb9bce79f | |||
| 487f631243 | |||
| c928c21fe7 | |||
| 59fa477edb | |||
| 992d5b8bcd | |||
| 6808d33b2f | |||
| 966f27df34 | |||
| 21bb17e3ee | |||
| 4ba4901ca9 | |||
| 9de63c1edd | |||
| 51cc78b2a2 | |||
| 8f4e5c2fb8 | |||
| db1c8b3f9e | |||
| f07856eab9 | |||
| dd952f6d68 | |||
| e63efe2978 | |||
| fb6929ac3d | |||
| 4e65283081 | |||
| c6daa4aa16 | |||
| c0016d7fe9 | |||
| a518e7063d | |||
| de8696aa43 | |||
| 02cc1cd6e6 | |||
| 0e6cf41923 | |||
| 7579cd8068 | |||
| b6a447798a | |||
| 9344d0d0e3 | |||
| 7fa7fa0226 | |||
| a3df05d93b | |||
| 798e2779f2 | |||
| 1b13df5368 | |||
| 083332f85f | |||
| 6757c2c5a6 | |||
| 59e2ca16d9 | |||
| 75ed282b20 | |||
| 754956857c | |||
| f6ee03471d | |||
| a4ab60920f | |||
| a574788e89 | |||
| 22dbcf98c5 | |||
| d7540c9a3c | |||
| bea312bd65 | |||
| 3705648c9b | |||
| 940dc1f2b7 | |||
| f54b230906 | |||
| 3bbc4e44c3 | |||
| f81370232a | |||
| 85fad1504a | |||
| 1d10d56651 | |||
| ef5d921eac | |||
| 8409aa9eba | |||
| ca9aa180c1 | |||
| ce46cc9852 | |||
| 39f327acdb | |||
| 6189b47648 | |||
| dd6f5949c2 | |||
| a62539489d | |||
| d6b2739525 | |||
| 846a500fb4 | |||
| 8b7f805642 | |||
| cc5190eb91 | |||
| 4eff798270 | |||
| 4e40e5bb88 | |||
| a456b968cf | |||
| a6387c3012 | |||
| 5f2074d757 | |||
| 2a9c81eb25 | |||
| 65fb8ae33e | |||
| dc88c9f3a2 | |||
| fc3fc6005e | |||
| 27fd913c86 | |||
| e0e828ef5c | |||
| 9992c4d275 | |||
| ab65b9745b | |||
| 4e3ab026fe | |||
| f5b212a9d4 | |||
| e31eb46123 | |||
| 326be0d7ba | |||
| e5c39ed48a | |||
| 0d65397ae7 | |||
| a7f30391d0 | |||
| c96850ba59 | |||
| 5459c11e99 | |||
| e755a2a6e4 | |||
| 1913482cf5 | |||
| c7d04c6c5c | |||
| 1ba7c728a6 | |||
| be9b676db3 | |||
| 75a6eaf147 | |||
| 10e1c2b3cd | |||
| a1dd30ed50 | |||
| f74f1a94fe | |||
| 96bf26611e | |||
| 841741aa52 | |||
| 8f15a609af | |||
| 8cdf7bb84b | |||
| 6fb780eae6 | |||
| 858ba6c798 | |||
| 386733aea1 | |||
| 11eafca3e2 | |||
| 5087ff0814 | |||
| ebc8015638 | |||
| 35c7cab742 | |||
| c1921f1b12 | |||
| 9b978afaa2 | |||
| 997ad12730 | |||
| 777eaa7352 | |||
| bb61a2547a | |||
| 5869415a57 | |||
| b5248da826 | |||
| b059a361dd | |||
| 3c99dc96b1 | |||
| dadba232de | |||
| 787f5236a9 | |||
| 31498ebbea | |||
| 9636ffc471 | |||
| b17e1531d2 | |||
| 05dc645b81 | |||
| d4f038dfcc | |||
| c972c94662 | |||
| 33c9d57c6f | |||
| 2c6f1ab57d | |||
| 000110e760 | |||
| 7a686a0c43 | |||
| 835e4b6de9 | |||
| 0a5301bc5b | |||
| 3a4bc0d41e | |||
| cfb02b5370 | |||
| b8175f8976 | |||
| 182f43b6f9 | |||
| 6d2a97e954 | |||
| 66e4ace39f | |||
| a920ed9e1e | |||
| 6c8ec5336f | |||
| 687fa6a8ca | |||
| 32797515de | |||
| 0f622206e4 | |||
| ca55982669 | |||
| ea67060081 | |||
| 2dfaad3259 | |||
| 06ffa408ce | |||
| 34e9d1eb3c | |||
| 3914c17b0d | |||
| c92e0838c1 | |||
| 443fed796a | |||
| 08536943ad | |||
| 936523ae52 | |||
| 7fff245f87 | |||
| 6e3ea8b49d | |||
| 220b278575 | |||
| 2b022311a4 | |||
| 853f5111c2 | |||
| 65ab6ed59f | |||
| 389aae59ae | |||
| c9abb823a7 | |||
| e6dd9a78ae | |||
| e0c888acf7 | |||
| 50bec53afc | |||
| 828091cfbb | |||
| eb981cc7d7 | |||
| 31be03a805 | |||
| ca3848d773 | |||
| e6d9486a6c | |||
| 9a8e47a766 | |||
| 13f244b6a5 | |||
| 28556f1498 | |||
| 0ccd810738 | |||
| e959f449ae | |||
| e4aea680b9 | |||
| 5d3822f15e | |||
| 465ae048a0 | |||
| 71009c9b4d | |||
| dbed39a931 | |||
| ea31c09384 | |||
| 329a1fb781 | |||
| 043e7e3516 | |||
| 9c23f2f1a6 | |||
| 5e9750d1f5 | |||
| 2180a67670 | |||
| 1188c6fe14 | |||
| a2e754c136 | |||
| 5339ef3004 | |||
| 6a2b3c8d4c | |||
| edacd91a27 | |||
| 5dd46b54c1 | |||
| ea502b6e84 | |||
| 954536073d | |||
| cc45c10f3d | |||
| 13aa23f706 | |||
| 78b51fb574 | |||
| 922d5796b9 | |||
| f0ddc2a53c | |||
| d5d059690f | |||
| fd832bb57d | |||
| 09cb329d73 | |||
| 4a9291fd89 | |||
| 5115e5decb | |||
| 1ed9ff17e1 | |||
| f1fdfa1a51 | |||
| 0f3fe957f5 | |||
| fc4679d4cf | |||
| 35c53204cb | |||
| f731515628 | |||
| 59bf2a34fa | |||
| abbb73e894 | |||
| dada5a422d | |||
| 8bb3d363a4 | |||
| 1522722fab | |||
| 8f1f4273a2 | |||
| a9c8a526cf | |||
| 699db77293 | |||
| 690fb0544c | |||
| ae4c72a153 | |||
| ea92c2b1a6 | |||
| 9ac7aea930 | |||
| 5f17cc1abd | |||
| 8f6695acc7 | |||
| 9524abcd28 | |||
| 83efde6243 | |||
| 8eb987e393 | |||
| 2c6ab65476 | |||
| 66fdddc339 | |||
| 5575171652 | |||
| a8b0db4e5d | |||
| e104fcc000 | |||
| e4f71994c2 | |||
| 29e88e50ff | |||
| 852f061b26 | |||
| f0d277e452 | |||
| 2e8483bd1c | |||
| 3eec8fd0eb | |||
| d8d025c33b | |||
| 8811dabbac | |||
| efca746d36 | |||
| e0f524d3b7 | |||
| d1c842cf29 | |||
| 4d23a5d92d | |||
| 0739d1c2eb | |||
| 475c775b25 | |||
| b7e8ce4523 | |||
| e8fcd721b8 | |||
| ef5579dc86 | |||
| 84ae8097b1 | |||
| 295b988657 | |||
| 68942affdb | |||
| e0980c4d73 | |||
| c5920df159 | |||
| 86ddff0b88 | |||
| 908978d00b | |||
| a956732874 | |||
| 879e046b22 | |||
| 5fb0f34e8a | |||
| 861415133e | |||
| fce75cd858 | |||
| b6d5565df1 | |||
| 53ad291ef1 | |||
| 145d3ba99d | |||
| e6171d17f8 | |||
| aa1c86f95e | |||
| 699565828d | |||
| 38de2a8754 | |||
| 8b661cde15 | |||
| e628fd7bce | |||
| 808ba552c5 | |||
| a024593fa6 | |||
| 87b5737293 | |||
| b80c978f5d | |||
| 10ae0c4364 | |||
| cb3ae1232b | |||
| e73e393c82 | |||
| b01f63835e | |||
| 6d7f5871db | |||
| 89720ae24d | |||
| 9097ccf515 | |||
| dca657a2fd | |||
| df8b057b44 | |||
| 64b3c1e691 | |||
| 15aee09c7f | |||
| 80610ca054 | |||
| fd0df5a89b | |||
| b487e2df0b | |||
| c6ed2bf9aa | |||
| 40b1dc12de | |||
| 8eba3c1e7e | |||
| b50c70bbfa | |||
| af021e79d9 | |||
| 73bfe68821 | |||
| 4a73b4859f | |||
| f5d181db3a | |||
| da7e1cfb49 | |||
| 43b64140ae | |||
| d74b98c3d9 | |||
| e0bfe44cac | |||
| 10fb88d027 | |||
| f826709452 | |||
| f10fd64630 | |||
| 09837928d9 | |||
| dce4e94f02 | |||
| ee6415bd1c | |||
| 78835ad87a | |||
| 4e6be21a44 | |||
| f89e4e7dd0 | |||
| dfa8467a08 | |||
| 669ee0415a | |||
| 367668710c | |||
| 94dea84915 | |||
| 9f1218b00b | |||
| fcfa488250 | |||
| 2bbe31a8f6 | |||
| 7cdb0eafeb | |||
| 90f47eb952 | |||
| 15e57d28f5 | |||
| 532eace7d6 | |||
| d4ac4fcde1 | |||
| c1db75e0c7 | |||
| acfdd0e1fc | |||
| 9fb8f6347f | |||
| 7f73b105ca | |||
| ae8dcdf40d | |||
| ee1e1ce377 | |||
| 6d165dae5e | |||
| 335e61dc47 | |||
| 64380baa85 | |||
| b5eb65e53e | |||
| f1ca05c822 | |||
| 900df21b7d | |||
| 93bad514a8 | |||
| d8cd1d8fcc | |||
| 6356403964 | |||
| e8a14a775e | |||
| 7b90a1e85a | |||
| 49283ec035 | |||
| 7d4bb9428b | |||
| 76eb389761 | |||
| e9a1ccb89a | |||
| db262fa76a | |||
| 4e59d6fd12 | |||
| e136c11c7c | |||
| 0e80f56e44 | |||
| 94758c18de | |||
| e76b375a31 | |||
| 9f5f64e14e | |||
| 4eb2966559 | |||
| 293facbae7 | |||
| 053259fd92 | |||
| da41ac9e60 | |||
| 82c477c9f7 | |||
| 57bead3a5e | |||
| d044ac1c66 | |||
| 9787ab598b | |||
| 7e9b5d9e30 | |||
| 3d141280aa | |||
| 9df7517dea | |||
| 4560909a5e | |||
| 3f65924c45 | |||
| 5e31c82b5b | |||
| 4382bdc859 | |||
| fa66c6b797 | |||
| 2da96be217 | |||
| 43f821afb9 | |||
| 3165baa1f1 | |||
| 9a8a964b69 | |||
| 17888ce0fd | |||
| 051b40f956 | |||
| cc8db99695 | |||
| b39cd06249 | |||
| 46def2fdc1 | |||
| 2195f0cc62 | |||
| 387e92353c | |||
| 2047abd9c3 | |||
| 64f2b1b250 | |||
| 577546ccd9 | |||
| e858c21e1f | |||
| 0d6518aaa0 | |||
| d1a598c652 | |||
| bfc227b8d4 | |||
| 45dd575ed2 | |||
| 80709697e5 | |||
| 1b53a4fccc | |||
| 4bb220bb90 | |||
| e1b3cf5c14 | |||
| 0f298a4203 | |||
| 5e68f35500 | |||
| ba1bd64bf9 | |||
| db88cd1b25 | |||
| 936d2963a2 | |||
| 4378b4d03d | |||
| 6ddef3b7a9 | |||
| 68c92908d5 | |||
| 51e543050c | |||
| 000a13b6a3 | |||
| 84b3b5b4a4 | |||
| 4e83f4c579 | |||
| cd2b188c9a | |||
| 1e0a60be2a | |||
| fc5bba66af | |||
| 4d7d630e92 | |||
| 4b2d1aaeea | |||
| 7e5581cd86 | |||
| 8b6a6d4546 | |||
| 7ae83df8aa | |||
| 779a42678d | |||
| 10ba6a93a6 | |||
| c917be2189 | |||
| c6aa97c9aa | |||
| 250941bd47 | |||
| 5b17a60dde | |||
| b07f772f36 | |||
| d4688e6474 | |||
| e7e29cb63c | |||
| ca922443db | |||
| 2385a5870e | |||
| e567135ed3 | |||
| 98c8584b88 | |||
| 2b2fa58f97 | |||
| 2d54fed3cc | |||
| 964a4d75b4 |
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
|
||||
If you have a question rather than reporting a bug please go to https://forum.opencv.org where you get much faster responses.
|
||||
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).
|
||||
|
||||
This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
|
||||
@@ -7,9 +7,9 @@ This is a template helping you to create an issue which can be processed as quic
|
||||
|
||||
##### System information (version)
|
||||
<!-- Example
|
||||
- OpenCV => 3.1
|
||||
- OpenCV => 4.2
|
||||
- Operating System / Platform => Windows 64 Bit
|
||||
- Compiler => Visual Studio 2015
|
||||
- Compiler => Visual Studio 2017
|
||||
-->
|
||||
|
||||
- OpenCV => :grey_question:
|
||||
@@ -27,4 +27,43 @@ This is a template helping you to create an issue which can be processed as quic
|
||||
// C++ code example
|
||||
```
|
||||
or attach as .txt or .zip file
|
||||
-->
|
||||
-->
|
||||
|
||||
##### Issue submission checklist
|
||||
|
||||
- [ ] I report the issue, it's not a question
|
||||
<!--
|
||||
OpenCV team works with forum.opencv.org, Stack Overflow and other communities
|
||||
to discuss problems. Tickets with question without real issue statement will be
|
||||
closed.
|
||||
-->
|
||||
- [ ] I checked the problem with documentation, FAQ, open issues,
|
||||
forum.opencv.org, Stack Overflow, etc and have not found solution
|
||||
<!--
|
||||
Places to check:
|
||||
* OpenCV documentation: https://docs.opencv.org
|
||||
* FAQ page: https://github.com/opencv/opencv/wiki/FAQ
|
||||
* OpenCV forum: https://forum.opencv.org
|
||||
* OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
|
||||
* Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
|
||||
-->
|
||||
- [ ] I updated to latest OpenCV version and the issue is still there
|
||||
<!--
|
||||
master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
|
||||
OpenCV team supports only latest release for each branch.
|
||||
The ticket is closed, if the problem is not reproduced with modern version.
|
||||
-->
|
||||
- [ ] There is reproducer code and related data files: videos, images, onnx, etc
|
||||
<!--
|
||||
The best reproducer -- test case for OpenCV that we can add to the library.
|
||||
Recommendations for media files and binary files:
|
||||
* Try to reproduce the issue with images and videos in opencv_extra repository
|
||||
to reduce attachment size
|
||||
* Use PNG for images, if you report some CV related bug, but not image reader
|
||||
issue
|
||||
* Attach the image as archive to the ticket, if you report some reader issue.
|
||||
Image hosting services compress images and it breaks the repro code.
|
||||
* Provide ONNX file for some public model or ONNX file with with random weights,
|
||||
if you report ONNX parsing or handling issue. Architecture details diagram
|
||||
from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
|
||||
-->
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<!-- Please use this line to close one or multiple issues when this pullrequest gets merged
|
||||
You can add another line right under the first one:
|
||||
resolves #1234
|
||||
resolves #1235
|
||||
-->
|
||||
### Pull Request Readiness Checklist
|
||||
|
||||
### This pullrequest changes
|
||||
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
|
||||
|
||||
<!-- Please describe what your pullrequest is changing -->
|
||||
- [ ] I agree to contribute to the project under Apache 2 License.
|
||||
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
|
||||
- [ ] The PR is proposed to proper branch
|
||||
- [ ] There is reference to original bug report and related work
|
||||
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
|
||||
Patch to opencv_extra has the same branch name.
|
||||
- [ ] The feature is well documented and sample code can be built with the project CMake
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
name: arm64 build checks
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install dependency packages
|
||||
run: |
|
||||
sudo sed -i -E 's|^deb ([^ ]+) (.*)$|deb [arch=amd64] \1 \2\ndeb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ \2|' /etc/apt/sources.list
|
||||
sudo dpkg --add-architecture arm64
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
crossbuild-essential-arm64 \
|
||||
git \
|
||||
cmake \
|
||||
libpython-dev:arm64 \
|
||||
libpython3-dev:arm64 \
|
||||
python-numpy \
|
||||
python3-numpy
|
||||
|
||||
- name: Fetch opencv_contrib
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/opencv/opencv_contrib.git ../opencv_contrib
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DPYTHON2_INCLUDE_PATH=/usr/include/python2.7/ \
|
||||
-DPYTHON2_LIBRARIES=/usr/lib/aarch64-linux-gnu/libpython2.7.so \
|
||||
-DPYTHON2_NUMPY_INCLUDE_DIRS=/usr/lib/python2.7/dist-packages/numpy/core/include \
|
||||
-DPYTHON3_INCLUDE_PATH=/usr/include/python3.6m/ \
|
||||
-DPYTHON3_LIBRARIES=/usr/lib/aarch64-linux-gnu/libpython3.6m.so \
|
||||
-DPYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include \
|
||||
-DCMAKE_TOOLCHAIN_FILE=../platforms/linux/aarch64-gnu.toolchain.cmake \
|
||||
-DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
|
||||
../
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd build
|
||||
make -j$(nproc --all)
|
||||
@@ -24,3 +24,4 @@ bin/
|
||||
build
|
||||
node_modules
|
||||
CMakeSettings.json
|
||||
xcuserdata/
|
||||
|
||||
Vendored
+2
-2
@@ -27,7 +27,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(carotene_objs OBJECT
|
||||
add_library(carotene_objs OBJECT EXCLUDE_FROM_ALL
|
||||
${carotene_headers}
|
||||
${carotene_sources}
|
||||
)
|
||||
@@ -41,4 +41,4 @@ if(WITH_NEON)
|
||||
endif()
|
||||
|
||||
# we add dummy file to fix XCode build
|
||||
add_library(carotene STATIC EXCLUDE_FROM_ALL "$<TARGET_OBJECTS:carotene_objs>" "${CAROTENE_SOURCE_DIR}/dummy.cpp")
|
||||
add_library(carotene STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} "$<TARGET_OBJECTS:carotene_objs>" "${CAROTENE_SOURCE_DIR}/dummy.cpp")
|
||||
|
||||
Vendored
+2
@@ -12,6 +12,8 @@ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64.*|AARCH64.*")
|
||||
set(AARCH64 TRUE)
|
||||
endif()
|
||||
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wunused-function)
|
||||
|
||||
set(TEGRA_COMPILER_FLAGS "")
|
||||
|
||||
if(CV_GCC OR CV_CLANG)
|
||||
|
||||
+4
-4
@@ -49,12 +49,12 @@ namespace {
|
||||
|
||||
enum
|
||||
{
|
||||
SHIFT = 14,
|
||||
SHIFT = 15,
|
||||
SHIFT_DELTA = 1 << (SHIFT - 1),
|
||||
|
||||
R2Y_BT601 = 4899,
|
||||
G2Y_BT601 = 9617,
|
||||
B2Y_BT601 = 1868,
|
||||
R2Y_BT601 = 9798,
|
||||
G2Y_BT601 = 19235,
|
||||
B2Y_BT601 = 3735,
|
||||
|
||||
R2Y_BT709 = 3483,
|
||||
G2Y_BT709 = 11718,
|
||||
|
||||
Vendored
+22
-36
@@ -151,6 +151,10 @@ void div(const Size2D &size,
|
||||
typedef typename internal::VecTraits<T>::vec128 vec128;
|
||||
typedef typename internal::VecTraits<T>::vec64 vec64;
|
||||
|
||||
#if defined(__GNUC__) && (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
|
||||
static_assert(std::numeric_limits<T>::is_integer, "template implementation is for integer types only");
|
||||
#endif
|
||||
|
||||
if (scale == 0.0f ||
|
||||
(std::numeric_limits<T>::is_integer &&
|
||||
(scale * std::numeric_limits<T>::max()) < 1.0f &&
|
||||
@@ -311,6 +315,10 @@ void recip(const Size2D &size,
|
||||
typedef typename internal::VecTraits<T>::vec128 vec128;
|
||||
typedef typename internal::VecTraits<T>::vec64 vec64;
|
||||
|
||||
#if defined(__GNUC__) && (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
|
||||
static_assert(std::numeric_limits<T>::is_integer, "template implementation is for integer types only");
|
||||
#endif
|
||||
|
||||
if (scale == 0.0f ||
|
||||
(std::numeric_limits<T>::is_integer &&
|
||||
scale < 1.0f &&
|
||||
@@ -463,8 +471,6 @@ void div(const Size2D &size,
|
||||
return;
|
||||
}
|
||||
|
||||
float32x4_t v_zero = vdupq_n_f32(0.0f);
|
||||
|
||||
size_t roiw128 = size.width >= 3 ? size.width - 3 : 0;
|
||||
size_t roiw64 = size.width >= 1 ? size.width - 1 : 0;
|
||||
|
||||
@@ -485,9 +491,7 @@ void div(const Size2D &size,
|
||||
float32x4_t v_src0 = vld1q_f32(src0 + j);
|
||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||
|
||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
||||
vreinterpretq_u32_f32(vmulq_f32(v_src0, internal::vrecpq_f32(v_src1))), v_mask)));
|
||||
vst1q_f32(dst + j, vmulq_f32(v_src0, internal::vrecpq_f32(v_src1)));
|
||||
}
|
||||
|
||||
for (; j < roiw64; j += 2)
|
||||
@@ -495,14 +499,12 @@ void div(const Size2D &size,
|
||||
float32x2_t v_src0 = vld1_f32(src0 + j);
|
||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||
|
||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
||||
vreinterpret_u32_f32(vmul_f32(v_src0, internal::vrecp_f32(v_src1))), v_mask)));
|
||||
vst1_f32(dst + j, vmul_f32(v_src0, internal::vrecp_f32(v_src1)));
|
||||
}
|
||||
|
||||
for (; j < size.width; j++)
|
||||
{
|
||||
dst[j] = src1[j] ? src0[j] / src1[j] : 0.0f;
|
||||
dst[j] = src0[j] / src1[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -523,10 +525,8 @@ void div(const Size2D &size,
|
||||
float32x4_t v_src0 = vld1q_f32(src0 + j);
|
||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||
|
||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
||||
vreinterpretq_u32_f32(vmulq_f32(vmulq_n_f32(v_src0, scale),
|
||||
internal::vrecpq_f32(v_src1))), v_mask)));
|
||||
vst1q_f32(dst + j, vmulq_f32(vmulq_n_f32(v_src0, scale),
|
||||
internal::vrecpq_f32(v_src1)));
|
||||
}
|
||||
|
||||
for (; j < roiw64; j += 2)
|
||||
@@ -534,15 +534,13 @@ void div(const Size2D &size,
|
||||
float32x2_t v_src0 = vld1_f32(src0 + j);
|
||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||
|
||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
||||
vreinterpret_u32_f32(vmul_f32(vmul_n_f32(v_src0, scale),
|
||||
internal::vrecp_f32(v_src1))), v_mask)));
|
||||
vst1_f32(dst + j, vmul_f32(vmul_n_f32(v_src0, scale),
|
||||
internal::vrecp_f32(v_src1)));
|
||||
}
|
||||
|
||||
for (; j < size.width; j++)
|
||||
{
|
||||
dst[j] = src1[j] ? src0[j] * scale / src1[j] : 0.0f;
|
||||
dst[j] = src0[j] * scale / src1[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -620,8 +618,6 @@ void reciprocal(const Size2D &size,
|
||||
return;
|
||||
}
|
||||
|
||||
float32x4_t v_zero = vdupq_n_f32(0.0f);
|
||||
|
||||
size_t roiw128 = size.width >= 3 ? size.width - 3 : 0;
|
||||
size_t roiw64 = size.width >= 1 ? size.width - 1 : 0;
|
||||
|
||||
@@ -639,23 +635,19 @@ void reciprocal(const Size2D &size,
|
||||
|
||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||
|
||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
||||
vreinterpretq_u32_f32(internal::vrecpq_f32(v_src1)), v_mask)));
|
||||
vst1q_f32(dst + j, internal::vrecpq_f32(v_src1));
|
||||
}
|
||||
|
||||
for (; j < roiw64; j += 2)
|
||||
{
|
||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||
|
||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
||||
vreinterpret_u32_f32(internal::vrecp_f32(v_src1)), v_mask)));
|
||||
vst1_f32(dst + j, internal::vrecp_f32(v_src1));
|
||||
}
|
||||
|
||||
for (; j < size.width; j++)
|
||||
{
|
||||
dst[j] = src1[j] ? 1.0f / src1[j] : 0;
|
||||
dst[j] = 1.0f / src1[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -673,25 +665,19 @@ void reciprocal(const Size2D &size,
|
||||
|
||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||
|
||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
||||
vreinterpretq_u32_f32(vmulq_n_f32(internal::vrecpq_f32(v_src1),
|
||||
scale)),v_mask)));
|
||||
vst1q_f32(dst + j, vmulq_n_f32(internal::vrecpq_f32(v_src1), scale));
|
||||
}
|
||||
|
||||
for (; j < roiw64; j += 2)
|
||||
{
|
||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||
|
||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
||||
vreinterpret_u32_f32(vmul_n_f32(internal::vrecp_f32(v_src1),
|
||||
scale)), v_mask)));
|
||||
vst1_f32(dst + j, vmul_n_f32(internal::vrecp_f32(v_src1), scale));
|
||||
}
|
||||
|
||||
for (; j < size.width; j++)
|
||||
{
|
||||
dst[j] = src1[j] ? scale / src1[j] : 0;
|
||||
dst[j] = scale / src1[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -758,7 +758,7 @@ inline void resizeAreaRounding(const Size2D &ssize, const Size2D &dsize,
|
||||
}
|
||||
else if (channels == 3)
|
||||
{
|
||||
if ((wr == 2.0f) && (wr == 2.0f))
|
||||
if ((wr == 2.0f) && (hr == 2.0f))
|
||||
{
|
||||
#ifndef __ANDROID__
|
||||
size_t roiw16 = dsize.width >= 15 ? (dsize.width - 15) * 3 : 0;
|
||||
|
||||
Vendored
+2
-2
@@ -14,7 +14,7 @@ if(NOT DEFINED CPUFEATURES_SOURCES)
|
||||
endif()
|
||||
|
||||
include_directories(${CPUFEATURES_INCLUDE_DIRS})
|
||||
add_library(${OPENCV_CPUFEATURES_TARGET_NAME} STATIC ${CPUFEATURES_SOURCES})
|
||||
add_library(${OPENCV_CPUFEATURES_TARGET_NAME} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${CPUFEATURES_SOURCES})
|
||||
|
||||
set_target_properties(${OPENCV_CPUFEATURES_TARGET_NAME}
|
||||
PROPERTIES OUTPUT_NAME cpufeatures
|
||||
@@ -29,7 +29,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(${OPENCV_CPUFEATURES_TARGET_NAME} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
ocv_install_target(${OPENCV_CPUFEATURES_TARGET_NAME} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||
endif()
|
||||
|
||||
ocv_install_3rdparty_licenses(cpufeatures LICENSE README.md)
|
||||
|
||||
Vendored
+1
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
$url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/@FFMPEG_BINARIES_COMMIT@/ffmpeg/opencv_ffmpeg_64.dll"
|
||||
$url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/@FFMPEG_BINARIES_COMMIT@/ffmpeg/opencv_videoio_ffmpeg_64.dll"
|
||||
$expected_md5 = "@FFMPEG_FILE_HASH_BIN64@"
|
||||
$output = "$PSScriptRoot\@OPENCV_BIN_INSTALL_PATH@\opencv_ffmpeg@OPENCV_DLLVERSION@_64.dll"
|
||||
$output = "$PSScriptRoot\@OPENCV_BIN_INSTALL_PATH@\opencv_videoio_ffmpeg@OPENCV_DLLVERSION@_64.dll"
|
||||
|
||||
Write-Output ("=" * 120)
|
||||
try {
|
||||
|
||||
Vendored
+8
-8
@@ -1,16 +1,16 @@
|
||||
# Binaries branch name: ffmpeg/3.4_20200907
|
||||
# Binaries were created for OpenCV: 03bee14372f5537daa56c62e771ec16181ca1f98
|
||||
ocv_update(FFMPEG_BINARIES_COMMIT "2a96257b743695a47f8012aab1ffb995a1dee8b4")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN32 "5e68a3ff82f43ac6524e50e448a34c9c")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN64 "205db629d893e7d4865fd1459807ff47")
|
||||
ocv_update(FFMPEG_FILE_HASH_CMAKE "3b90f67f4b429e77d3da36698cef700c")
|
||||
# Binaries branch name: ffmpeg/master_20210303
|
||||
# Binaries were created for OpenCV: 7ac6abe02a33bef445a5b77214ad31964e2c5cc1
|
||||
ocv_update(FFMPEG_BINARIES_COMMIT "629590c3ba09fb0c8eaa9ab858ff13d3a84ca1aa")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN32 "638065d5a0dab8a828879942375dcac4")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN64 "7f10ae2e6a080ba3714f7a38ee03ae15")
|
||||
ocv_update(FFMPEG_FILE_HASH_CMAKE "f8e65dbe4a3b4eedc0d2997e07c3f3fd")
|
||||
|
||||
function(download_win_ffmpeg script_var)
|
||||
set(${script_var} "" PARENT_SCOPE)
|
||||
|
||||
set(ids BIN32 BIN64 CMAKE)
|
||||
set(name_BIN32 "opencv_ffmpeg.dll")
|
||||
set(name_BIN64 "opencv_ffmpeg_64.dll")
|
||||
set(name_BIN32 "opencv_videoio_ffmpeg.dll")
|
||||
set(name_BIN64 "opencv_videoio_ffmpeg_64.dll")
|
||||
set(name_CMAKE "ffmpeg_version.cmake")
|
||||
|
||||
set(FFMPEG_DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/3rdparty/ffmpeg")
|
||||
|
||||
Vendored
+4
-4
@@ -13,10 +13,10 @@
|
||||
|
||||
* On Windows OpenCV uses pre-built ffmpeg binaries, built with proper flags (without GPL components) and
|
||||
wrapped with simple, stable OpenCV-compatible API.
|
||||
The binaries are opencv_ffmpeg.dll (version for 32-bit Windows) and
|
||||
opencv_ffmpeg_64.dll (version for 64-bit Windows).
|
||||
The binaries are opencv_videoio_ffmpeg.dll (version for 32-bit Windows) and
|
||||
opencv_videoio_ffmpeg_64.dll (version for 64-bit Windows).
|
||||
|
||||
The pre-built opencv_ffmpeg*.dll is:
|
||||
The pre-built opencv_videoio_ffmpeg*.dll is:
|
||||
* LGPL library, not BSD libraries.
|
||||
* Loaded at runtime by opencv_videoio module.
|
||||
If it succeeds, ffmpeg can be used to decode/encode videos;
|
||||
@@ -30,7 +30,7 @@
|
||||
Or you can specify location of binary file via OPENH264_LIBRARY environment variable.
|
||||
|
||||
If LGPL/GPL software can not be supplied with your OpenCV-based product, simply exclude
|
||||
opencv_ffmpeg*.dll from your distribution; OpenCV will stay fully functional except for the ability to
|
||||
opencv_videoio_ffmpeg*.dll from your distribution; OpenCV will stay fully functional except for the ability to
|
||||
decode/encode videos using FFMPEG (though, it may still be able to do that using other API,
|
||||
such as Video for Windows, Windows Media Foundation or our self-contained motion jpeg codec).
|
||||
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2020 The Khronos Group Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
******************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_va_api_media_sharing_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
|
||||
#define __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
#include <va/va.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************
|
||||
* cl_intel_va_api_media_sharing extension *
|
||||
*******************************************/
|
||||
|
||||
#define cl_intel_va_api_media_sharing 1
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -1098
|
||||
#define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -1099
|
||||
#define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -1100
|
||||
#define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -1101
|
||||
|
||||
/* cl_va_api_device_source_intel */
|
||||
#define CL_VA_API_DISPLAY_INTEL 0x4094
|
||||
|
||||
/* cl_va_api_device_set_intel */
|
||||
#define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x4095
|
||||
#define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x4096
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x4097
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x4098
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_VA_API_PLANE_INTEL 0x4099
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A
|
||||
#define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B
|
||||
|
||||
typedef cl_uint cl_va_api_device_source_intel;
|
||||
typedef cl_uint cl_va_api_device_set_intel;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromVA_APIMediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H */
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// File: vk_platform.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2014-2017 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef VK_PLATFORM_H_
|
||||
#define VK_PLATFORM_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
/*
|
||||
***************************************************************************************************
|
||||
* Platform-specific directives and type declarations
|
||||
***************************************************************************************************
|
||||
*/
|
||||
|
||||
/* Platform-specific calling convention macros.
|
||||
*
|
||||
* Platforms should define these so that Vulkan clients call Vulkan commands
|
||||
* with the same calling conventions that the Vulkan implementation expects.
|
||||
*
|
||||
* VKAPI_ATTR - Placed before the return type in function declarations.
|
||||
* Useful for C++11 and GCC/Clang-style function attribute syntax.
|
||||
* VKAPI_CALL - Placed after the return type in function declarations.
|
||||
* Useful for MSVC-style calling convention syntax.
|
||||
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
|
||||
*
|
||||
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
|
||||
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
// On Windows, Vulkan commands use the stdcall convention
|
||||
#define VKAPI_ATTR
|
||||
#define VKAPI_CALL __stdcall
|
||||
#define VKAPI_PTR VKAPI_CALL
|
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||
#error "Vulkan isn't supported for the 'armeabi' NDK ABI"
|
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
|
||||
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
||||
// calling convention, i.e. float parameters are passed in registers. This
|
||||
// is true even if the rest of the application passes floats on the stack,
|
||||
// as it does by default when compiling for the armeabi-v7a NDK ABI.
|
||||
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
|
||||
#define VKAPI_CALL
|
||||
#define VKAPI_PTR VKAPI_ATTR
|
||||
#else
|
||||
// On other platforms, use the default calling convention
|
||||
#define VKAPI_ATTR
|
||||
#define VKAPI_CALL
|
||||
#define VKAPI_PTR
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#if !defined(VK_NO_STDINT_H)
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#endif // !defined(VK_NO_STDINT_H)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
||||
Vendored
+83
@@ -0,0 +1,83 @@
|
||||
#ifndef VULKAN_H_
|
||||
#define VULKAN_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
#include "vk_platform.h"
|
||||
#include "vulkan_core.h"
|
||||
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
#include "vulkan_android.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_FUCHSIA
|
||||
#include <zircon/types.h>
|
||||
#include "vulkan_fuchsia.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_IOS_MVK
|
||||
#include "vulkan_ios.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MACOS_MVK
|
||||
#include "vulkan_macos.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MIR_KHR
|
||||
#include <mir_toolkit/client_types.h>
|
||||
#include "vulkan_mir.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_VI_NN
|
||||
#include "vulkan_vi.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
#include <wayland-client.h>
|
||||
#include "vulkan_wayland.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||
#include <windows.h>
|
||||
#include "vulkan_win32.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||
#include <xcb/xcb.h>
|
||||
#include "vulkan_xcb.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||
#include <X11/Xlib.h>
|
||||
#include "vulkan_xlib.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#include "vulkan_xlib_xrandr.h"
|
||||
#endif
|
||||
|
||||
#endif // VULKAN_H_
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
#ifndef VULKAN_ANDROID_H_
|
||||
#define VULKAN_ANDROID_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_android_surface 1
|
||||
struct ANativeWindow;
|
||||
|
||||
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
|
||||
|
||||
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAndroidSurfaceCreateFlagsKHR flags;
|
||||
struct ANativeWindow* window;
|
||||
} VkAndroidSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
||||
struct AHardwareBuffer;
|
||||
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
||||
|
||||
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint64_t androidHardwareBufferUsage;
|
||||
} VkAndroidHardwareBufferUsageANDROID;
|
||||
|
||||
typedef struct VkAndroidHardwareBufferPropertiesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkDeviceSize allocationSize;
|
||||
uint32_t memoryTypeBits;
|
||||
} VkAndroidHardwareBufferPropertiesANDROID;
|
||||
|
||||
typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFormat format;
|
||||
uint64_t externalFormat;
|
||||
VkFormatFeatureFlags formatFeatures;
|
||||
VkComponentMapping samplerYcbcrConversionComponents;
|
||||
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
||||
VkSamplerYcbcrRange suggestedYcbcrRange;
|
||||
VkChromaLocation suggestedXChromaOffset;
|
||||
VkChromaLocation suggestedYChromaOffset;
|
||||
} VkAndroidHardwareBufferFormatPropertiesANDROID;
|
||||
|
||||
typedef struct VkImportAndroidHardwareBufferInfoANDROID {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
struct AHardwareBuffer* buffer;
|
||||
} VkImportAndroidHardwareBufferInfoANDROID;
|
||||
|
||||
typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
} VkMemoryGetAndroidHardwareBufferInfoANDROID;
|
||||
|
||||
typedef struct VkExternalFormatANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint64_t externalFormat;
|
||||
} VkExternalFormatANDROID;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
|
||||
VkDevice device,
|
||||
const struct AHardwareBuffer* buffer,
|
||||
VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
|
||||
VkDevice device,
|
||||
const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
|
||||
struct AHardwareBuffer** pBuffer);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+8524
File diff suppressed because it is too large
Load Diff
+58
@@ -0,0 +1,58 @@
|
||||
#ifndef VULKAN_FUCHSIA_H_
|
||||
#define VULKAN_FUCHSIA_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_FUCHSIA_imagepipe_surface 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
|
||||
|
||||
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
|
||||
|
||||
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkImagePipeSurfaceCreateFlagsFUCHSIA flags;
|
||||
zx_handle_t imagePipeHandle;
|
||||
} VkImagePipeSurfaceCreateInfoFUCHSIA;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
|
||||
VkInstance instance,
|
||||
const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
+58
@@ -0,0 +1,58 @@
|
||||
#ifndef VULKAN_IOS_H_
|
||||
#define VULKAN_IOS_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_MVK_ios_surface 1
|
||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
|
||||
|
||||
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
|
||||
|
||||
typedef struct VkIOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkIOSSurfaceCreateFlagsMVK flags;
|
||||
const void* pView;
|
||||
} VkIOSSurfaceCreateInfoMVK;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
|
||||
VkInstance instance,
|
||||
const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
#ifndef VULKAN_MACOS_H_
|
||||
#define VULKAN_MACOS_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_MVK_macos_surface 1
|
||||
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
|
||||
|
||||
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
|
||||
|
||||
typedef struct VkMacOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkMacOSSurfaceCreateFlagsMVK flags;
|
||||
const void* pView;
|
||||
} VkMacOSSurfaceCreateInfoMVK;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
|
||||
VkInstance instance,
|
||||
const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
+65
@@ -0,0 +1,65 @@
|
||||
#ifndef VULKAN_MIR_H_
|
||||
#define VULKAN_MIR_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_mir_surface 1
|
||||
#define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
|
||||
#define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface"
|
||||
|
||||
typedef VkFlags VkMirSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkMirSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkMirSurfaceCreateFlagsKHR flags;
|
||||
MirConnection* connection;
|
||||
MirSurface* mirSurface;
|
||||
} VkMirSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkMirSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
MirConnection* connection);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
+58
@@ -0,0 +1,58 @@
|
||||
#ifndef VULKAN_VI_H_
|
||||
#define VULKAN_VI_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_NN_vi_surface 1
|
||||
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
|
||||
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
|
||||
|
||||
typedef VkFlags VkViSurfaceCreateFlagsNN;
|
||||
|
||||
typedef struct VkViSurfaceCreateInfoNN {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkViSurfaceCreateFlagsNN flags;
|
||||
void* window;
|
||||
} VkViSurfaceCreateInfoNN;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
|
||||
VkInstance instance,
|
||||
const VkViSurfaceCreateInfoNN* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
#ifndef VULKAN_WAYLAND_H_
|
||||
#define VULKAN_WAYLAND_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_wayland_surface 1
|
||||
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
|
||||
|
||||
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkWaylandSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkWaylandSurfaceCreateFlagsKHR flags;
|
||||
struct wl_display* display;
|
||||
struct wl_surface* surface;
|
||||
} VkWaylandSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
struct wl_display* display);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+276
@@ -0,0 +1,276 @@
|
||||
#ifndef VULKAN_WIN32_H_
|
||||
#define VULKAN_WIN32_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_win32_surface 1
|
||||
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
|
||||
|
||||
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkWin32SurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkWin32SurfaceCreateFlagsKHR flags;
|
||||
HINSTANCE hinstance;
|
||||
HWND hwnd;
|
||||
} VkWin32SurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex);
|
||||
#endif
|
||||
|
||||
#define VK_KHR_external_memory_win32 1
|
||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
|
||||
|
||||
typedef struct VkImportMemoryWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportMemoryWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportMemoryWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportMemoryWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkMemoryWin32HandlePropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t memoryTypeBits;
|
||||
} VkMemoryWin32HandlePropertiesKHR;
|
||||
|
||||
typedef struct VkMemoryGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
} VkMemoryGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
|
||||
VkDevice device,
|
||||
VkExternalMemoryHandleTypeFlagBits handleType,
|
||||
HANDLE handle,
|
||||
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||
#endif
|
||||
|
||||
#define VK_KHR_win32_keyed_mutex 1
|
||||
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
|
||||
|
||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t acquireCount;
|
||||
const VkDeviceMemory* pAcquireSyncs;
|
||||
const uint64_t* pAcquireKeys;
|
||||
const uint32_t* pAcquireTimeouts;
|
||||
uint32_t releaseCount;
|
||||
const VkDeviceMemory* pReleaseSyncs;
|
||||
const uint64_t* pReleaseKeys;
|
||||
} VkWin32KeyedMutexAcquireReleaseInfoKHR;
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_external_semaphore_win32 1
|
||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
|
||||
|
||||
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkSemaphoreImportFlags flags;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportSemaphoreWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportSemaphoreWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportSemaphoreWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkD3D12FenceSubmitInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t waitSemaphoreValuesCount;
|
||||
const uint64_t* pWaitSemaphoreValues;
|
||||
uint32_t signalSemaphoreValuesCount;
|
||||
const uint64_t* pSignalSemaphoreValues;
|
||||
} VkD3D12FenceSubmitInfoKHR;
|
||||
|
||||
typedef struct VkSemaphoreGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
} VkSemaphoreGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
#define VK_KHR_external_fence_win32 1
|
||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
|
||||
|
||||
typedef struct VkImportFenceWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFence fence;
|
||||
VkFenceImportFlags flags;
|
||||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportFenceWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportFenceWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportFenceWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkFenceGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFence fence;
|
||||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
} VkFenceGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
#define VK_NV_external_memory_win32 1
|
||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
|
||||
|
||||
typedef struct VkImportMemoryWin32HandleInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkExternalMemoryHandleTypeFlagsNV handleType;
|
||||
HANDLE handle;
|
||||
} VkImportMemoryWin32HandleInfoNV;
|
||||
|
||||
typedef struct VkExportMemoryWin32HandleInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
} VkExportMemoryWin32HandleInfoNV;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
|
||||
VkDevice device,
|
||||
VkDeviceMemory memory,
|
||||
VkExternalMemoryHandleTypeFlagsNV handleType,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
#define VK_NV_win32_keyed_mutex 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
|
||||
|
||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t acquireCount;
|
||||
const VkDeviceMemory* pAcquireSyncs;
|
||||
const uint64_t* pAcquireKeys;
|
||||
const uint32_t* pAcquireTimeoutMilliseconds;
|
||||
uint32_t releaseCount;
|
||||
const VkDeviceMemory* pReleaseSyncs;
|
||||
const uint64_t* pReleaseKeys;
|
||||
} VkWin32KeyedMutexAcquireReleaseInfoNV;
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
+66
@@ -0,0 +1,66 @@
|
||||
#ifndef VULKAN_XCB_H_
|
||||
#define VULKAN_XCB_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_xcb_surface 1
|
||||
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
|
||||
|
||||
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkXcbSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkXcbSurfaceCreateFlagsKHR flags;
|
||||
xcb_connection_t* connection;
|
||||
xcb_window_t window;
|
||||
} VkXcbSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
xcb_connection_t* connection,
|
||||
xcb_visualid_t visual_id);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
#ifndef VULKAN_XLIB_H_
|
||||
#define VULKAN_XLIB_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_xlib_surface 1
|
||||
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
|
||||
|
||||
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkXlibSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkXlibSurfaceCreateFlagsKHR flags;
|
||||
Display* dpy;
|
||||
Window window;
|
||||
} VkXlibSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
Display* dpy,
|
||||
VisualID visualID);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
#ifndef VULKAN_XLIB_XRANDR_H_
|
||||
#define VULKAN_XLIB_XRANDR_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_EXT_acquire_xlib_display 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
Display* dpy,
|
||||
VkDisplayKHR display);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
Display* dpy,
|
||||
RROutput rrOutput,
|
||||
VkDisplayKHR* pDisplay);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
+2
-2
@@ -17,7 +17,7 @@ file(GLOB lib_hdrs ${IPP_IW_PATH}/include/*.h ${IPP_IW_PATH}/include/iw/*.h ${IP
|
||||
# Define the library target:
|
||||
# ----------------------------------------------------------------------------------
|
||||
|
||||
add_library(${IPP_IW_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
||||
add_library(${IPP_IW_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
|
||||
|
||||
if(UNIX)
|
||||
if(CV_GCC OR CV_CLANG OR CV_ICC)
|
||||
@@ -41,5 +41,5 @@ if(ENABLE_SOLUTION_FOLDERS)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(${IPP_IW_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
ocv_install_target(${IPP_IW_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||
endif()
|
||||
|
||||
Vendored
+2
-2
@@ -37,7 +37,7 @@ set(ITT_SRCS
|
||||
src/ittnotify/jitprofiling.c
|
||||
)
|
||||
|
||||
add_library(${ITT_LIBRARY} STATIC ${ITT_SRCS} ${ITT_PUBLIC_HDRS} ${ITT_PRIVATE_HDRS})
|
||||
add_library(${ITT_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${ITT_SRCS} ${ITT_PUBLIC_HDRS} ${ITT_PRIVATE_HDRS})
|
||||
|
||||
if(NOT WIN32)
|
||||
if(HAVE_DL_LIBRARY)
|
||||
@@ -60,7 +60,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(${ITT_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
ocv_install_target(${ITT_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||
endif()
|
||||
|
||||
ocv_install_3rdparty_licenses(ittnotify src/ittnotify/LICENSE.BSD src/ittnotify/LICENSE.GPL)
|
||||
|
||||
Vendored
+2
-2
@@ -17,7 +17,7 @@ file(GLOB lib_ext_hdrs jasper/*.h)
|
||||
# Define the library target:
|
||||
# ----------------------------------------------------------------------------------
|
||||
|
||||
add_library(${JASPER_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs})
|
||||
add_library(${JASPER_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs})
|
||||
|
||||
if(WIN32 AND NOT MINGW)
|
||||
add_definitions(-DJAS_WIN_MSVC_BUILD)
|
||||
@@ -46,7 +46,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(${JASPER_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
ocv_install_target(${JASPER_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||
endif()
|
||||
|
||||
ocv_install_3rdparty_licenses(jasper LICENSE README copyright)
|
||||
|
||||
+4
-4
@@ -4,9 +4,9 @@ ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter -Wsign-compare -Wshorten-6
|
||||
|
||||
set(VERSION_MAJOR 2)
|
||||
set(VERSION_MINOR 0)
|
||||
set(VERSION_REVISION 5)
|
||||
set(VERSION_REVISION 6)
|
||||
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION})
|
||||
set(LIBJPEG_TURBO_VERSION_NUMBER 2000005)
|
||||
set(LIBJPEG_TURBO_VERSION_NUMBER 2000006)
|
||||
|
||||
string(TIMESTAMP BUILD "opencv-${OPENCV_VERSION}-libjpeg-turbo")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
@@ -106,7 +106,7 @@ set(JPEG_SOURCES ${JPEG_SOURCES} jsimd_none.c)
|
||||
|
||||
ocv_list_add_prefix(JPEG_SOURCES src/)
|
||||
|
||||
add_library(${JPEG_LIBRARY} STATIC ${JPEG_SOURCES} ${SIMD_OBJS})
|
||||
add_library(${JPEG_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${JPEG_SOURCES} ${SIMD_OBJS})
|
||||
|
||||
set_target_properties(${JPEG_LIBRARY}
|
||||
PROPERTIES OUTPUT_NAME ${JPEG_LIBRARY}
|
||||
@@ -121,7 +121,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(${JPEG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
ocv_install_target(${JPEG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||
endif()
|
||||
|
||||
ocv_install_3rdparty_licenses(libjpeg-turbo README.md LICENSE.md README.ijg)
|
||||
|
||||
Vendored
+1
-1
@@ -91,7 +91,7 @@ best of our understanding.
|
||||
The Modified (3-clause) BSD License
|
||||
===================================
|
||||
|
||||
Copyright (C)2009-2019 D. R. Commander. All Rights Reserved.
|
||||
Copyright (C)2009-2020 D. R. Commander. All Rights Reserved.
|
||||
Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
Vendored
+8
-14
@@ -223,12 +223,12 @@ https://www.iso.org/standard/54989.html and http://www.itu.int/rec/T-REC-T.871.
|
||||
A PDF file of the older JFIF 1.02 specification is available at
|
||||
http://www.w3.org/Graphics/JPEG/jfif3.pdf.
|
||||
|
||||
The TIFF 6.0 file format specification can be obtained by FTP from
|
||||
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
|
||||
found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
|
||||
IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
|
||||
Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
|
||||
(Compression tag 7). Copies of this Note can be obtained from
|
||||
The TIFF 6.0 file format specification can be obtained from
|
||||
http://mirrors.ctan.org/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation
|
||||
scheme found in the TIFF 6.0 spec of 3-June-92 has a number of serious
|
||||
problems. IJG does not recommend use of the TIFF 6.0 design (TIFF Compression
|
||||
tag 6). Instead, we recommend the JPEG design proposed by TIFF Technical Note
|
||||
#2 (Compression tag 7). Copies of this Note can be obtained from
|
||||
http://www.ijg.org/files/. It is expected that the next revision
|
||||
of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
|
||||
Although IJG's own code does not support TIFF/JPEG, the free libtiff library
|
||||
@@ -243,14 +243,8 @@ The most recent released version can always be found there in
|
||||
directory "files".
|
||||
|
||||
The JPEG FAQ (Frequently Asked Questions) article is a source of some
|
||||
general information about JPEG.
|
||||
It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
|
||||
and other news.answers archive sites, including the official news.answers
|
||||
archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
|
||||
If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu
|
||||
with body
|
||||
send usenet/news.answers/jpeg-faq/part1
|
||||
send usenet/news.answers/jpeg-faq/part2
|
||||
general information about JPEG. It is available at
|
||||
http://www.faqs.org/faqs/jpeg-faq.
|
||||
|
||||
|
||||
FILE FORMAT COMPATIBILITY
|
||||
|
||||
Vendored
+11
-10
@@ -2,7 +2,7 @@ Background
|
||||
==========
|
||||
|
||||
libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate
|
||||
baseline JPEG compression and decompression on x86, x86-64, ARM, PowerPC, and
|
||||
baseline JPEG compression and decompression on x86, x86-64, Arm, PowerPC, and
|
||||
MIPS systems, as well as progressive JPEG compression on x86 and x86-64
|
||||
systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg,
|
||||
all else being equal. On other types of systems, libjpeg-turbo can still
|
||||
@@ -179,8 +179,8 @@ supported and which aren't.
|
||||
|
||||
NOTE: As of this writing, extensive research has been conducted into the
|
||||
usefulness of DCT scaling as a means of data reduction and SmartScale as a
|
||||
means of quality improvement. The reader is invited to peruse the research at
|
||||
<http://www.libjpeg-turbo.org/About/SmartScale> and draw his/her own conclusions,
|
||||
means of quality improvement. Readers are invited to peruse the research at
|
||||
<http://www.libjpeg-turbo.org/About/SmartScale> and draw their own conclusions,
|
||||
but it is the general belief of our project that these features have not
|
||||
demonstrated sufficient usefulness to justify inclusion in libjpeg-turbo.
|
||||
|
||||
@@ -287,12 +287,13 @@ following reasons:
|
||||
(and slightly faster) floating point IDCT algorithm introduced in libjpeg
|
||||
v8a as opposed to the algorithm used in libjpeg v6b. It should be noted,
|
||||
however, that this algorithm basically brings the accuracy of the floating
|
||||
point IDCT in line with the accuracy of the slow integer IDCT. The floating
|
||||
point DCT/IDCT algorithms are mainly a legacy feature, and they do not
|
||||
produce significantly more accuracy than the slow integer algorithms (to put
|
||||
numbers on this, the typical difference in PNSR between the two algorithms
|
||||
is less than 0.10 dB, whereas changing the quality level by 1 in the upper
|
||||
range of the quality scale is typically more like a 1.0 dB difference.)
|
||||
point IDCT in line with the accuracy of the accurate integer IDCT. The
|
||||
floating point DCT/IDCT algorithms are mainly a legacy feature, and they do
|
||||
not produce significantly more accuracy than the accurate integer algorithms
|
||||
(to put numbers on this, the typical difference in PNSR between the two
|
||||
algorithms is less than 0.10 dB, whereas changing the quality level by 1 in
|
||||
the upper range of the quality scale is typically more like a 1.0 dB
|
||||
difference.)
|
||||
|
||||
- If the floating point algorithms in libjpeg-turbo are not implemented using
|
||||
SIMD instructions on a particular platform, then the accuracy of the
|
||||
@@ -340,7 +341,7 @@ The algorithm used by the SIMD-accelerated quantization function cannot produce
|
||||
correct results whenever the fast integer forward DCT is used along with a JPEG
|
||||
quality of 98-100. Thus, libjpeg-turbo must use the non-SIMD quantization
|
||||
function in those cases. This causes performance to drop by as much as 40%.
|
||||
It is therefore strongly advised that you use the slow integer forward DCT
|
||||
It is therefore strongly advised that you use the accurate integer forward DCT
|
||||
whenever encoding images with a JPEG quality of 98 or higher.
|
||||
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -34,10 +34,10 @@
|
||||
* memory footprint by 64k, which is important for some mobile applications
|
||||
* that create many isolated instances of libjpeg-turbo (web browsers, for
|
||||
* instance.) This may improve performance on some mobile platforms as well.
|
||||
* This feature is enabled by default only on ARM processors, because some x86
|
||||
* This feature is enabled by default only on Arm processors, because some x86
|
||||
* chips have a slow implementation of bsr, and the use of clz/bsr cannot be
|
||||
* shown to have a significant performance impact even on the x86 chips that
|
||||
* have a fast implementation of it. When building for ARMv6, you can
|
||||
* have a fast implementation of it. When building for Armv6, you can
|
||||
* explicitly disable the use of clz/bsr by adding -mthumb to the compiler
|
||||
* flags (this defines __thumb__).
|
||||
*/
|
||||
|
||||
Vendored
+4
-1
@@ -1,8 +1,10 @@
|
||||
/*
|
||||
* jcinit.c
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
@@ -19,6 +21,7 @@
|
||||
#define JPEG_INTERNALS
|
||||
#include "jinclude.h"
|
||||
#include "jpeglib.h"
|
||||
#include "jpegcomp.h"
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Vendored
+2
-2
@@ -43,10 +43,10 @@
|
||||
* memory footprint by 64k, which is important for some mobile applications
|
||||
* that create many isolated instances of libjpeg-turbo (web browsers, for
|
||||
* instance.) This may improve performance on some mobile platforms as well.
|
||||
* This feature is enabled by default only on ARM processors, because some x86
|
||||
* This feature is enabled by default only on Arm processors, because some x86
|
||||
* chips have a slow implementation of bsr, and the use of clz/bsr cannot be
|
||||
* shown to have a significant performance impact even on the x86 chips that
|
||||
* have a fast implementation of it. When building for ARMv6, you can
|
||||
* have a fast implementation of it. When building for Armv6, you can
|
||||
* explicitly disable the use of clz/bsr by adding -mthumb to the compiler
|
||||
* flags (this defines __thumb__).
|
||||
*/
|
||||
|
||||
Vendored
+3
-2
@@ -4,8 +4,8 @@
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1995-1998, Thomas G. Lane.
|
||||
* Modified 2000-2009 by Guido Vollbeding.
|
||||
* It was modified by The libjpeg-turbo Project to include only code relevant
|
||||
* to libjpeg-turbo.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
@@ -17,6 +17,7 @@
|
||||
#define JPEG_INTERNALS
|
||||
#include "jinclude.h"
|
||||
#include "jpeglib.h"
|
||||
#include "jpegcomp.h"
|
||||
|
||||
|
||||
/* Forward declarations */
|
||||
|
||||
+36
-9
@@ -4,7 +4,7 @@
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2010, 2015-2018, D. R. Commander.
|
||||
* Copyright (C) 2010, 2015-2018, 2020, D. R. Commander.
|
||||
* Copyright (C) 2015, Google, Inc.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "jinclude.h"
|
||||
#include "jdmainct.h"
|
||||
#include "jdcoefct.h"
|
||||
#include "jdmaster.h"
|
||||
#include "jdmerge.h"
|
||||
#include "jdsample.h"
|
||||
#include "jmemsys.h"
|
||||
|
||||
@@ -316,6 +318,8 @@ LOCAL(void)
|
||||
read_and_discard_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines)
|
||||
{
|
||||
JDIMENSION n;
|
||||
my_master_ptr master = (my_master_ptr)cinfo->master;
|
||||
JSAMPARRAY scanlines = NULL;
|
||||
void (*color_convert) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
JDIMENSION input_row, JSAMPARRAY output_buf,
|
||||
int num_rows) = NULL;
|
||||
@@ -332,8 +336,13 @@ read_and_discard_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines)
|
||||
cinfo->cquantize->color_quantize = noop_quantize;
|
||||
}
|
||||
|
||||
if (master->using_merged_upsample && cinfo->max_v_samp_factor == 2) {
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
scanlines = &upsample->spare_row;
|
||||
}
|
||||
|
||||
for (n = 0; n < num_lines; n++)
|
||||
jpeg_read_scanlines(cinfo, NULL, 1);
|
||||
jpeg_read_scanlines(cinfo, scanlines, 1);
|
||||
|
||||
if (color_convert)
|
||||
cinfo->cconvert->color_convert = color_convert;
|
||||
@@ -353,6 +362,12 @@ increment_simple_rowgroup_ctr(j_decompress_ptr cinfo, JDIMENSION rows)
|
||||
{
|
||||
JDIMENSION rows_left;
|
||||
my_main_ptr main_ptr = (my_main_ptr)cinfo->main;
|
||||
my_master_ptr master = (my_master_ptr)cinfo->master;
|
||||
|
||||
if (master->using_merged_upsample && cinfo->max_v_samp_factor == 2) {
|
||||
read_and_discard_scanlines(cinfo, rows);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Increment the counter to the next row group after the skipped rows. */
|
||||
main_ptr->rowgroup_ctr += rows / cinfo->max_v_samp_factor;
|
||||
@@ -382,21 +397,27 @@ jpeg_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines)
|
||||
{
|
||||
my_main_ptr main_ptr = (my_main_ptr)cinfo->main;
|
||||
my_coef_ptr coef = (my_coef_ptr)cinfo->coef;
|
||||
my_master_ptr master = (my_master_ptr)cinfo->master;
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
JDIMENSION i, x;
|
||||
int y;
|
||||
JDIMENSION lines_per_iMCU_row, lines_left_in_iMCU_row, lines_after_iMCU_row;
|
||||
JDIMENSION lines_to_skip, lines_to_read;
|
||||
|
||||
/* Two-pass color quantization is not supported. */
|
||||
if (cinfo->quantize_colors && cinfo->two_pass_quantize)
|
||||
ERREXIT(cinfo, JERR_NOTIMPL);
|
||||
|
||||
if (cinfo->global_state != DSTATE_SCANNING)
|
||||
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
|
||||
|
||||
/* Do not skip past the bottom of the image. */
|
||||
if (cinfo->output_scanline + num_lines >= cinfo->output_height) {
|
||||
num_lines = cinfo->output_height - cinfo->output_scanline;
|
||||
cinfo->output_scanline = cinfo->output_height;
|
||||
(*cinfo->inputctl->finish_input_pass) (cinfo);
|
||||
cinfo->inputctl->eoi_reached = TRUE;
|
||||
return cinfo->output_height - cinfo->output_scanline;
|
||||
return num_lines;
|
||||
}
|
||||
|
||||
if (num_lines == 0)
|
||||
@@ -445,8 +466,10 @@ jpeg_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines)
|
||||
main_ptr->buffer_full = FALSE;
|
||||
main_ptr->rowgroup_ctr = 0;
|
||||
main_ptr->context_state = CTX_PREPARE_FOR_IMCU;
|
||||
upsample->next_row_out = cinfo->max_v_samp_factor;
|
||||
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
||||
if (!master->using_merged_upsample) {
|
||||
upsample->next_row_out = cinfo->max_v_samp_factor;
|
||||
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
||||
}
|
||||
}
|
||||
|
||||
/* Skipping is much simpler when context rows are not required. */
|
||||
@@ -458,8 +481,10 @@ jpeg_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines)
|
||||
cinfo->output_scanline += lines_left_in_iMCU_row;
|
||||
main_ptr->buffer_full = FALSE;
|
||||
main_ptr->rowgroup_ctr = 0;
|
||||
upsample->next_row_out = cinfo->max_v_samp_factor;
|
||||
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
||||
if (!master->using_merged_upsample) {
|
||||
upsample->next_row_out = cinfo->max_v_samp_factor;
|
||||
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,7 +519,8 @@ jpeg_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines)
|
||||
cinfo->output_iMCU_row += lines_to_skip / lines_per_iMCU_row;
|
||||
increment_simple_rowgroup_ctr(cinfo, lines_to_read);
|
||||
}
|
||||
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
||||
if (!master->using_merged_upsample)
|
||||
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
||||
return num_lines;
|
||||
}
|
||||
|
||||
@@ -535,7 +561,8 @@ jpeg_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines)
|
||||
* bit odd, since "rows_to_go" seems to be redundantly keeping track of
|
||||
* output_scanline.
|
||||
*/
|
||||
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
||||
if (!master->using_merged_upsample)
|
||||
upsample->rows_to_go = cinfo->output_height - cinfo->output_scanline;
|
||||
|
||||
/* Always skip the requested number of lines. */
|
||||
return num_lines;
|
||||
|
||||
+5
-3
@@ -6,7 +6,7 @@
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
||||
* Copyright (C) 2010, 2015-2016, D. R. Commander.
|
||||
* Copyright (C) 2015, Google, Inc.
|
||||
* Copyright (C) 2015, 2020, Google, Inc.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
@@ -495,11 +495,13 @@ decompress_smooth_data(j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
|
||||
if (first_row && block_row == 0)
|
||||
prev_block_row = buffer_ptr;
|
||||
else
|
||||
prev_block_row = buffer[block_row - 1];
|
||||
prev_block_row = buffer[block_row - 1] +
|
||||
cinfo->master->first_MCU_col[ci];
|
||||
if (last_row && block_row == block_rows - 1)
|
||||
next_block_row = buffer_ptr;
|
||||
else
|
||||
next_block_row = buffer[block_row + 1];
|
||||
next_block_row = buffer[block_row + 1] +
|
||||
cinfo->master->first_MCU_col[ci];
|
||||
/* We fetch the surrounding DC values using a sliding-register approach.
|
||||
* Initialize all nine here so as to do the right thing on narrow pics.
|
||||
*/
|
||||
|
||||
Vendored
+4
-5
@@ -571,11 +571,10 @@ ycck_cmyk_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
* RGB565 conversion
|
||||
*/
|
||||
|
||||
#define PACK_SHORT_565_LE(r, g, b) ((((r) << 8) & 0xF800) | \
|
||||
(((g) << 3) & 0x7E0) | ((b) >> 3))
|
||||
#define PACK_SHORT_565_BE(r, g, b) (((r) & 0xF8) | ((g) >> 5) | \
|
||||
(((g) << 11) & 0xE000) | \
|
||||
(((b) << 5) & 0x1F00))
|
||||
#define PACK_SHORT_565_LE(r, g, b) \
|
||||
((((r) << 8) & 0xF800) | (((g) << 3) & 0x7E0) | ((b) >> 3))
|
||||
#define PACK_SHORT_565_BE(r, g, b) \
|
||||
(((r) & 0xF8) | ((g) >> 5) | (((g) << 11) & 0xE000) | (((b) << 5) & 0x1F00))
|
||||
|
||||
#define PACK_TWO_PIXELS_LE(l, r) ((r << 16) | l)
|
||||
#define PACK_TWO_PIXELS_BE(l, r) ((l << 16) | r)
|
||||
|
||||
Vendored
+13
-42
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
||||
* Copyright (C) 2009, 2011, 2014-2015, D. R. Commander.
|
||||
* Copyright (C) 2009, 2011, 2014-2015, 2020, D. R. Commander.
|
||||
* Copyright (C) 2013, Linaro Limited.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
@@ -40,41 +40,13 @@
|
||||
#define JPEG_INTERNALS
|
||||
#include "jinclude.h"
|
||||
#include "jpeglib.h"
|
||||
#include "jdmerge.h"
|
||||
#include "jsimd.h"
|
||||
#include "jconfigint.h"
|
||||
|
||||
#ifdef UPSAMPLE_MERGING_SUPPORTED
|
||||
|
||||
|
||||
/* Private subobject */
|
||||
|
||||
typedef struct {
|
||||
struct jpeg_upsampler pub; /* public fields */
|
||||
|
||||
/* Pointer to routine to do actual upsampling/conversion of one row group */
|
||||
void (*upmethod) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
|
||||
|
||||
/* Private state for YCC->RGB conversion */
|
||||
int *Cr_r_tab; /* => table for Cr to R conversion */
|
||||
int *Cb_b_tab; /* => table for Cb to B conversion */
|
||||
JLONG *Cr_g_tab; /* => table for Cr to G conversion */
|
||||
JLONG *Cb_g_tab; /* => table for Cb to G conversion */
|
||||
|
||||
/* For 2:1 vertical sampling, we produce two output rows at a time.
|
||||
* We need a "spare" row buffer to hold the second output row if the
|
||||
* application provides just a one-row buffer; we also use the spare
|
||||
* to discard the dummy last row if the image height is odd.
|
||||
*/
|
||||
JSAMPROW spare_row;
|
||||
boolean spare_full; /* T if spare buffer is occupied */
|
||||
|
||||
JDIMENSION out_row_width; /* samples per output row */
|
||||
JDIMENSION rows_to_go; /* counts rows remaining in image */
|
||||
} my_upsampler;
|
||||
|
||||
typedef my_upsampler *my_upsample_ptr;
|
||||
|
||||
#define SCALEBITS 16 /* speediest right-shift on some machines */
|
||||
#define ONE_HALF ((JLONG)1 << (SCALEBITS - 1))
|
||||
#define FIX(x) ((JLONG)((x) * (1L << SCALEBITS) + 0.5))
|
||||
@@ -189,7 +161,7 @@ typedef my_upsampler *my_upsample_ptr;
|
||||
LOCAL(void)
|
||||
build_ycc_rgb_table(j_decompress_ptr cinfo)
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
int i;
|
||||
JLONG x;
|
||||
SHIFT_TEMPS
|
||||
@@ -232,7 +204,7 @@ build_ycc_rgb_table(j_decompress_ptr cinfo)
|
||||
METHODDEF(void)
|
||||
start_pass_merged_upsample(j_decompress_ptr cinfo)
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
|
||||
/* Mark the spare buffer empty */
|
||||
upsample->spare_full = FALSE;
|
||||
@@ -254,7 +226,7 @@ merged_2v_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
|
||||
/* 2:1 vertical sampling case: may need a spare row. */
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
JSAMPROW work_ptrs[2];
|
||||
JDIMENSION num_rows; /* number of rows returned to caller */
|
||||
|
||||
@@ -305,7 +277,7 @@ merged_1v_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)
|
||||
/* 1:1 vertical sampling case: much easier, never need a spare row. */
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
|
||||
/* Just do the upsampling. */
|
||||
(*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr,
|
||||
@@ -420,11 +392,10 @@ h2v2_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
* RGB565 conversion
|
||||
*/
|
||||
|
||||
#define PACK_SHORT_565_LE(r, g, b) ((((r) << 8) & 0xF800) | \
|
||||
(((g) << 3) & 0x7E0) | ((b) >> 3))
|
||||
#define PACK_SHORT_565_BE(r, g, b) (((r) & 0xF8) | ((g) >> 5) | \
|
||||
(((g) << 11) & 0xE000) | \
|
||||
(((b) << 5) & 0x1F00))
|
||||
#define PACK_SHORT_565_LE(r, g, b) \
|
||||
((((r) << 8) & 0xF800) | (((g) << 3) & 0x7E0) | ((b) >> 3))
|
||||
#define PACK_SHORT_565_BE(r, g, b) \
|
||||
(((r) & 0xF8) | ((g) >> 5) | (((g) << 11) & 0xE000) | (((b) << 5) & 0x1F00))
|
||||
|
||||
#define PACK_TWO_PIXELS_LE(l, r) ((r << 16) | l)
|
||||
#define PACK_TWO_PIXELS_BE(l, r) ((l << 16) | r)
|
||||
@@ -566,11 +537,11 @@ h2v2_merged_upsample_565D(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
GLOBAL(void)
|
||||
jinit_merged_upsampler(j_decompress_ptr cinfo)
|
||||
{
|
||||
my_upsample_ptr upsample;
|
||||
my_merged_upsample_ptr upsample;
|
||||
|
||||
upsample = (my_upsample_ptr)
|
||||
upsample = (my_merged_upsample_ptr)
|
||||
(*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE,
|
||||
sizeof(my_upsampler));
|
||||
sizeof(my_merged_upsampler));
|
||||
cinfo->upsample = (struct jpeg_upsampler *)upsample;
|
||||
upsample->pub.start_pass = start_pass_merged_upsample;
|
||||
upsample->pub.need_context_rows = FALSE;
|
||||
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* jdmerge.h
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*/
|
||||
|
||||
#define JPEG_INTERNALS
|
||||
#include "jpeglib.h"
|
||||
|
||||
#ifdef UPSAMPLE_MERGING_SUPPORTED
|
||||
|
||||
|
||||
/* Private subobject */
|
||||
|
||||
typedef struct {
|
||||
struct jpeg_upsampler pub; /* public fields */
|
||||
|
||||
/* Pointer to routine to do actual upsampling/conversion of one row group */
|
||||
void (*upmethod) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
|
||||
|
||||
/* Private state for YCC->RGB conversion */
|
||||
int *Cr_r_tab; /* => table for Cr to R conversion */
|
||||
int *Cb_b_tab; /* => table for Cb to B conversion */
|
||||
JLONG *Cr_g_tab; /* => table for Cr to G conversion */
|
||||
JLONG *Cb_g_tab; /* => table for Cb to G conversion */
|
||||
|
||||
/* For 2:1 vertical sampling, we produce two output rows at a time.
|
||||
* We need a "spare" row buffer to hold the second output row if the
|
||||
* application provides just a one-row buffer; we also use the spare
|
||||
* to discard the dummy last row if the image height is odd.
|
||||
*/
|
||||
JSAMPROW spare_row;
|
||||
boolean spare_full; /* T if spare buffer is occupied */
|
||||
|
||||
JDIMENSION out_row_width; /* samples per output row */
|
||||
JDIMENSION rows_to_go; /* counts rows remaining in image */
|
||||
} my_merged_upsampler;
|
||||
|
||||
typedef my_merged_upsampler *my_merged_upsample_ptr;
|
||||
|
||||
#endif /* UPSAMPLE_MERGING_SUPPORTED */
|
||||
+5
-5
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2013, Linaro Limited.
|
||||
* Copyright (C) 2014-2015, 2018, D. R. Commander.
|
||||
* Copyright (C) 2014-2015, 2018, 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
@@ -19,7 +19,7 @@ h2v1_merged_upsample_565_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
JDIMENSION in_row_group_ctr,
|
||||
JSAMPARRAY output_buf)
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
register int y, cred, cgreen, cblue;
|
||||
int cb, cr;
|
||||
register JSAMPROW outptr;
|
||||
@@ -90,7 +90,7 @@ h2v1_merged_upsample_565D_internal(j_decompress_ptr cinfo,
|
||||
JDIMENSION in_row_group_ctr,
|
||||
JSAMPARRAY output_buf)
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
register int y, cred, cgreen, cblue;
|
||||
int cb, cr;
|
||||
register JSAMPROW outptr;
|
||||
@@ -163,7 +163,7 @@ h2v2_merged_upsample_565_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
JDIMENSION in_row_group_ctr,
|
||||
JSAMPARRAY output_buf)
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
register int y, cred, cgreen, cblue;
|
||||
int cb, cr;
|
||||
register JSAMPROW outptr0, outptr1;
|
||||
@@ -259,7 +259,7 @@ h2v2_merged_upsample_565D_internal(j_decompress_ptr cinfo,
|
||||
JDIMENSION in_row_group_ctr,
|
||||
JSAMPARRAY output_buf)
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
register int y, cred, cgreen, cblue;
|
||||
int cb, cr;
|
||||
register JSAMPROW outptr0, outptr1;
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2011, 2015, D. R. Commander.
|
||||
* Copyright (C) 2011, 2015, 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
@@ -25,7 +25,7 @@ h2v1_merged_upsample_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
JDIMENSION in_row_group_ctr,
|
||||
JSAMPARRAY output_buf)
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
register int y, cred, cgreen, cblue;
|
||||
int cb, cr;
|
||||
register JSAMPROW outptr;
|
||||
@@ -97,7 +97,7 @@ h2v2_merged_upsample_internal(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
|
||||
JDIMENSION in_row_group_ctr,
|
||||
JSAMPARRAY output_buf)
|
||||
{
|
||||
my_upsample_ptr upsample = (my_upsample_ptr)cinfo->upsample;
|
||||
my_merged_upsample_ptr upsample = (my_merged_upsample_ptr)cinfo->upsample;
|
||||
register int y, cred, cgreen, cblue;
|
||||
int cb, cr;
|
||||
register JSAMPROW outptr0, outptr1;
|
||||
|
||||
Vendored
+3
-2
@@ -3,8 +3,8 @@
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1995-1997, Thomas G. Lane.
|
||||
* It was modified by The libjpeg-turbo Project to include only code relevant
|
||||
* to libjpeg-turbo.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
@@ -16,6 +16,7 @@
|
||||
#define JPEG_INTERNALS
|
||||
#include "jinclude.h"
|
||||
#include "jpeglib.h"
|
||||
#include "jpegcomp.h"
|
||||
|
||||
|
||||
/* Forward declarations */
|
||||
|
||||
+2
-2
@@ -4,11 +4,11 @@
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1991-1996, Thomas G. Lane.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2015, D. R. Commander.
|
||||
* Copyright (C) 2015, 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file contains a slow-but-accurate integer implementation of the
|
||||
* This file contains a slower but more accurate integer implementation of the
|
||||
* forward DCT (Discrete Cosine Transform).
|
||||
*
|
||||
* A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT
|
||||
|
||||
+2
-2
@@ -5,11 +5,11 @@
|
||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
* Modification developed 2002-2009 by Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2015, D. R. Commander.
|
||||
* Copyright (C) 2015, 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file contains a slow-but-accurate integer implementation of the
|
||||
* This file contains a slower but more accurate integer implementation of the
|
||||
* inverse DCT (Discrete Cosine Transform). In the IJG code, this routine
|
||||
* must also perform dequantization of the input coefficients.
|
||||
*
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 1997-2009 by Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2009, 2011, 2014-2015, 2018, D. R. Commander.
|
||||
* Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
@@ -273,9 +273,9 @@ typedef int boolean;
|
||||
|
||||
/* Capability options common to encoder and decoder: */
|
||||
|
||||
#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
|
||||
#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */
|
||||
#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
|
||||
#define DCT_ISLOW_SUPPORTED /* accurate integer method */
|
||||
#define DCT_IFAST_SUPPORTED /* less accurate int method [legacy feature] */
|
||||
#define DCT_FLOAT_SUPPORTED /* floating-point method [legacy feature] */
|
||||
|
||||
/* Encoder capability options: */
|
||||
|
||||
|
||||
+2
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* jpegcomp.h
|
||||
*
|
||||
* Copyright (C) 2010, D. R. Commander.
|
||||
* Copyright (C) 2010, 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
@@ -19,6 +19,7 @@
|
||||
#define _min_DCT_v_scaled_size min_DCT_v_scaled_size
|
||||
#define _jpeg_width jpeg_width
|
||||
#define _jpeg_height jpeg_height
|
||||
#define JERR_ARITH_NOTIMPL JERR_NOT_COMPILED
|
||||
#else
|
||||
#define _DCT_scaled_size DCT_scaled_size
|
||||
#define _DCT_h_scaled_size DCT_scaled_size
|
||||
|
||||
Vendored
+4
-4
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
* Modified 2002-2009 by Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2009-2011, 2013-2014, 2016-2017, D. R. Commander.
|
||||
* Copyright (C) 2009-2011, 2013-2014, 2016-2017, 2020, D. R. Commander.
|
||||
* Copyright (C) 2015, Google, Inc.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
@@ -244,9 +244,9 @@ typedef enum {
|
||||
/* DCT/IDCT algorithm options. */
|
||||
|
||||
typedef enum {
|
||||
JDCT_ISLOW, /* slow but accurate integer algorithm */
|
||||
JDCT_IFAST, /* faster, less accurate integer method */
|
||||
JDCT_FLOAT /* floating-point: accurate, fast on fast HW */
|
||||
JDCT_ISLOW, /* accurate integer method */
|
||||
JDCT_IFAST, /* less accurate integer method [legacy feature] */
|
||||
JDCT_FLOAT /* floating-point method [legacy feature] */
|
||||
} J_DCT_METHOD;
|
||||
|
||||
#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */
|
||||
|
||||
Vendored
+3
-3
@@ -4,7 +4,7 @@
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1991-1996, Thomas G. Lane.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2009, 2014-2015, D. R. Commander.
|
||||
* Copyright (C) 2009, 2014-2015, 2020, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
@@ -1145,7 +1145,7 @@ start_pass_2_quant(j_decompress_ptr cinfo, boolean is_pre_scan)
|
||||
int i;
|
||||
|
||||
/* Only F-S dithering or no dithering is supported. */
|
||||
/* If user asks for ordered dither, give him F-S. */
|
||||
/* If user asks for ordered dither, give them F-S. */
|
||||
if (cinfo->dither_mode != JDITHER_NONE)
|
||||
cinfo->dither_mode = JDITHER_FS;
|
||||
|
||||
@@ -1263,7 +1263,7 @@ jinit_2pass_quantizer(j_decompress_ptr cinfo)
|
||||
cquantize->sv_colormap = NULL;
|
||||
|
||||
/* Only F-S dithering or no dithering is supported. */
|
||||
/* If user asks for ordered dither, give him F-S. */
|
||||
/* If user asks for ordered dither, give them F-S. */
|
||||
if (cinfo->dither_mode != JDITHER_NONE)
|
||||
cinfo->dither_mode = JDITHER_FS;
|
||||
|
||||
|
||||
+8
-6
@@ -30,23 +30,25 @@
|
||||
* NOTE: It is our convention to place the authors in the following order:
|
||||
* - libjpeg-turbo authors (2009-) in descending order of the date of their
|
||||
* most recent contribution to the project, then in ascending order of the
|
||||
* date of their first contribution to the project
|
||||
* date of their first contribution to the project, then in alphabetical
|
||||
* order
|
||||
* - Upstream authors in descending order of the date of the first inclusion of
|
||||
* their code
|
||||
*/
|
||||
|
||||
#define JCOPYRIGHT \
|
||||
"Copyright (C) 2009-2020 D. R. Commander\n" \
|
||||
"Copyright (C) 2011-2016 Siarhei Siamashka\n" \
|
||||
"Copyright (C) 2015, 2020 Google, Inc.\n" \
|
||||
"Copyright (C) 2019 Arm Limited\n" \
|
||||
"Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \
|
||||
"Copyright (C) 2011-2016 Siarhei Siamashka\n" \
|
||||
"Copyright (C) 2015 Intel Corporation\n" \
|
||||
"Copyright (C) 2015 Google, Inc.\n" \
|
||||
"Copyright (C) 2013-2014 Linaro Limited\n" \
|
||||
"Copyright (C) 2013-2014 MIPS Technologies, Inc.\n" \
|
||||
"Copyright (C) 2013 Linaro Limited\n" \
|
||||
"Copyright (C) 2009, 2012 Pierre Ossman for Cendio AB\n" \
|
||||
"Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)\n" \
|
||||
"Copyright (C) 2009 Pierre Ossman for Cendio AB\n" \
|
||||
"Copyright (C) 1999-2006 MIYASAKA Masaru\n" \
|
||||
"Copyright (C) 1991-2016 Thomas G. Lane, Guido Vollbeding"
|
||||
"Copyright (C) 1991-2017 Thomas G. Lane, Guido Vollbeding"
|
||||
|
||||
#define JCOPYRIGHT_SHORT \
|
||||
"Copyright (C) 1991-2020 The libjpeg-turbo Project and many others"
|
||||
|
||||
Vendored
+2
-2
@@ -19,7 +19,7 @@ endif()
|
||||
# Define the library target:
|
||||
# ----------------------------------------------------------------------------------
|
||||
|
||||
add_library(${JPEG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
||||
add_library(${JPEG_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
|
||||
|
||||
if(CV_GCC OR CV_CLANG)
|
||||
set_source_files_properties(jcdctmgr.c PROPERTIES COMPILE_FLAGS "-O1")
|
||||
@@ -42,7 +42,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(${JPEG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
ocv_install_target(${JPEG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||
endif()
|
||||
|
||||
ocv_install_3rdparty_licenses(libjpeg README)
|
||||
|
||||
Vendored
+2
-2
@@ -74,7 +74,7 @@ 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 ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
|
||||
target_link_libraries(${PNG_LIBRARY} ${ZLIB_LIBRARIES})
|
||||
|
||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wundef -Wcast-align -Wimplicit-fallthrough -Wunused-parameter -Wsign-compare)
|
||||
@@ -92,7 +92,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(${PNG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
ocv_install_target(${PNG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||
endif()
|
||||
|
||||
ocv_install_3rdparty_licenses(libpng LICENSE README)
|
||||
|
||||
Vendored
+8
-17
@@ -20,9 +20,8 @@
|
||||
# Author: qtang@openailab.com or https://github.com/BUG1989
|
||||
# qli@openailab.com
|
||||
# sqfu@openailab.com
|
||||
#
|
||||
|
||||
SET(TENGINE_COMMIT_VERSION "8a4c58e0e05cd850f4bb0936a330edc86dc0e28c")
|
||||
SET(TENGINE_COMMIT_VERSION "e89cf8870de2ff0a80cfe626c0b52b2a16fb302e")
|
||||
SET(OCV_TENGINE_DIR "${OpenCV_BINARY_DIR}/3rdparty/libtengine")
|
||||
SET(OCV_TENGINE_SOURCE_PATH "${OCV_TENGINE_DIR}/Tengine-${TENGINE_COMMIT_VERSION}")
|
||||
|
||||
@@ -32,11 +31,10 @@ IF(EXISTS "${OCV_TENGINE_SOURCE_PATH}")
|
||||
SET(Tengine_FOUND ON)
|
||||
SET(BUILD_TENGINE ON)
|
||||
ELSE()
|
||||
SET(OCV_TENGINE_FILENAME "${TENGINE_COMMIT_VERSION}.zip")#name2
|
||||
SET(OCV_TENGINE_URL "https://github.com/OAID/Tengine/archive/") #url2
|
||||
SET(tengine_md5sum f51ca8f3963faeeff3f019a6f6edc206) #md5sum2
|
||||
SET(OCV_TENGINE_FILENAME "${TENGINE_COMMIT_VERSION}.zip")#name
|
||||
SET(OCV_TENGINE_URL "https://github.com/OAID/Tengine/archive/") #url
|
||||
SET(tengine_md5sum 23f61ebb1dd419f1207d8876496289c5) #md5sum
|
||||
|
||||
#MESSAGE(STATUS "**** TENGINE DOWNLOAD BEGIN ****")
|
||||
ocv_download(FILENAME ${OCV_TENGINE_FILENAME}
|
||||
HASH ${tengine_md5sum}
|
||||
URL
|
||||
@@ -62,24 +60,17 @@ ENDIF()
|
||||
if(BUILD_TENGINE)
|
||||
SET(HAVE_TENGINE 1)
|
||||
|
||||
# android system
|
||||
if(ANDROID)
|
||||
if(${ANDROID_ABI} STREQUAL "armeabi-v7a")
|
||||
SET(CONFIG_ARCH_ARM32 ON)
|
||||
elseif(${ANDROID_ABI} STREQUAL "arm64-v8a")
|
||||
SET(CONFIG_ARCH_ARM64 ON)
|
||||
endif()
|
||||
else()
|
||||
if(NOT ANDROID)
|
||||
# linux system
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL arm)
|
||||
SET(CONFIG_ARCH_ARM32 ON)
|
||||
SET(TENGINE_TOOLCHAIN_FLAG "-march=armv7-a")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64) ## AARCH64
|
||||
SET(CONFIG_ARCH_ARM64 ON)
|
||||
SET(TENGINE_TOOLCHAIN_FLAG "-march=armv8-a")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
SET(BUILT_IN_OPENCV ON) ## set for tengine compile discern .
|
||||
SET(Tengine_INCLUDE_DIR "${OCV_TENGINE_SOURCE_PATH}/core/include" CACHE INTERNAL "")
|
||||
SET(Tengine_INCLUDE_DIR "${OCV_TENGINE_SOURCE_PATH}/include" CACHE INTERNAL "")
|
||||
if(EXISTS "${OCV_TENGINE_SOURCE_PATH}/CMakeLists.txt")
|
||||
add_subdirectory("${OCV_TENGINE_SOURCE_PATH}" "${OCV_TENGINE_DIR}/build")
|
||||
else()
|
||||
|
||||
Vendored
+5
-2
@@ -239,6 +239,9 @@ if(HOST_BIG_ENDIAN)
|
||||
else()
|
||||
set(HOST_BIG_ENDIAN 0)
|
||||
endif()
|
||||
if(HOST_BIG_ENDIAN)
|
||||
add_definitions(-DWORDS_BIGENDIAN)
|
||||
endif()
|
||||
|
||||
# IEEE floating point
|
||||
set(HAVE_IEEEFP 1 CACHE STRING "IEEE floating point is available")
|
||||
@@ -462,7 +465,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456 /wd4457 /wd4312) # vs2015
|
||||
|
||||
ocv_warnings_disable(CMAKE_C_FLAGS /wd4267 /wd4244 /wd4018 /wd4311 /wd4312)
|
||||
|
||||
add_library(${TIFF_LIBRARY} STATIC ${lib_srcs})
|
||||
add_library(${TIFF_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs})
|
||||
target_link_libraries(${TIFF_LIBRARY} ${ZLIB_LIBRARIES})
|
||||
|
||||
set_target_properties(${TIFF_LIBRARY}
|
||||
@@ -479,7 +482,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(${TIFF_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
ocv_install_target(${TIFF_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||
endif()
|
||||
|
||||
ocv_install_3rdparty_licenses(libtiff COPYRIGHT)
|
||||
|
||||
Vendored
+2326
File diff suppressed because it is too large
Load Diff
Vendored
+8
-4
@@ -24,6 +24,10 @@
|
||||
#ifndef _LIBPORT_
|
||||
#define _LIBPORT_
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include <tif_config.h>
|
||||
#endif
|
||||
|
||||
int getopt(int argc, char * const argv[], const char *optstring);
|
||||
extern char *optarg;
|
||||
extern int opterr;
|
||||
@@ -36,16 +40,16 @@ int strcasecmp(const char *s1, const char *s2);
|
||||
# define HAVE_GETOPT 1
|
||||
#endif
|
||||
|
||||
#if HAVE_STRTOL
|
||||
#if !defined(HAVE_STRTOL)
|
||||
long strtol(const char *nptr, char **endptr, int base);
|
||||
#endif
|
||||
#if HAVE_STRTOLL
|
||||
#if !defined(HAVE_STRTOLL)
|
||||
long long strtoll(const char *nptr, char **endptr, int base);
|
||||
#endif
|
||||
#if HAVE_STRTOUL
|
||||
#if !defined(HAVE_STRTOUL)
|
||||
unsigned long strtoul(const char *nptr, char **endptr, int base);
|
||||
#endif
|
||||
#if HAVE_STRTOULL
|
||||
#if !defined(HAVE_STRTOULL)
|
||||
unsigned long long strtoull(const char *nptr, char **endptr, int base);
|
||||
#endif
|
||||
|
||||
|
||||
Vendored
+62
-27
@@ -35,27 +35,61 @@
|
||||
uint32
|
||||
_TIFFMultiply32(TIFF* tif, uint32 first, uint32 second, const char* where)
|
||||
{
|
||||
uint32 bytes = first * second;
|
||||
|
||||
if (second && bytes / second != first) {
|
||||
if (second && first > TIFF_UINT32_MAX / second) {
|
||||
TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where);
|
||||
bytes = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return bytes;
|
||||
return first * second;
|
||||
}
|
||||
|
||||
uint64
|
||||
_TIFFMultiply64(TIFF* tif, uint64 first, uint64 second, const char* where)
|
||||
{
|
||||
uint64 bytes = first * second;
|
||||
|
||||
if (second && bytes / second != first) {
|
||||
if (second && first > TIFF_UINT64_MAX / second) {
|
||||
TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where);
|
||||
bytes = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return bytes;
|
||||
return first * second;
|
||||
}
|
||||
|
||||
tmsize_t
|
||||
_TIFFMultiplySSize(TIFF* tif, tmsize_t first, tmsize_t second, const char* where)
|
||||
{
|
||||
if( first <= 0 || second <= 0 )
|
||||
{
|
||||
if( tif != NULL && where != NULL )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, where,
|
||||
"Invalid argument to _TIFFMultiplySSize() in %s", where);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( first > TIFF_TMSIZE_T_MAX / second )
|
||||
{
|
||||
if( tif != NULL && where != NULL )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, where,
|
||||
"Integer overflow in %s", where);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return first * second;
|
||||
}
|
||||
|
||||
tmsize_t _TIFFCastUInt64ToSSize(TIFF* tif, uint64 val, const char* module)
|
||||
{
|
||||
if( val > (uint64)TIFF_TMSIZE_T_MAX )
|
||||
{
|
||||
if( tif != NULL && module != NULL )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return (tmsize_t)val;
|
||||
}
|
||||
|
||||
void*
|
||||
@@ -63,13 +97,14 @@ _TIFFCheckRealloc(TIFF* tif, void* buffer,
|
||||
tmsize_t nmemb, tmsize_t elem_size, const char* what)
|
||||
{
|
||||
void* cp = NULL;
|
||||
tmsize_t bytes = nmemb * elem_size;
|
||||
|
||||
tmsize_t count = _TIFFMultiplySSize(tif, nmemb, elem_size, NULL);
|
||||
/*
|
||||
* XXX: Check for integer overflow.
|
||||
* Check for integer overflow.
|
||||
*/
|
||||
if (nmemb && elem_size && bytes / elem_size == nmemb)
|
||||
cp = _TIFFrealloc(buffer, bytes);
|
||||
if (count != 0)
|
||||
{
|
||||
cp = _TIFFrealloc(buffer, count);
|
||||
}
|
||||
|
||||
if (cp == NULL) {
|
||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
||||
@@ -235,7 +270,7 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap)
|
||||
return (1);
|
||||
case TIFFTAG_EXTRASAMPLES:
|
||||
*va_arg(ap, uint16 *) = td->td_extrasamples;
|
||||
*va_arg(ap, uint16 **) = td->td_sampleinfo;
|
||||
*va_arg(ap, const uint16 **) = td->td_sampleinfo;
|
||||
return (1);
|
||||
case TIFFTAG_MATTEING:
|
||||
*va_arg(ap, uint16 *) =
|
||||
@@ -257,8 +292,8 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap)
|
||||
case TIFFTAG_YCBCRCOEFFICIENTS:
|
||||
{
|
||||
/* defaults are from CCIR Recommendation 601-1 */
|
||||
static float ycbcrcoeffs[] = { 0.299f, 0.587f, 0.114f };
|
||||
*va_arg(ap, float **) = ycbcrcoeffs;
|
||||
static const float ycbcrcoeffs[] = { 0.299f, 0.587f, 0.114f };
|
||||
*va_arg(ap, const float **) = ycbcrcoeffs;
|
||||
return 1;
|
||||
}
|
||||
case TIFFTAG_YCBCRSUBSAMPLING:
|
||||
@@ -270,14 +305,14 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap)
|
||||
return (1);
|
||||
case TIFFTAG_WHITEPOINT:
|
||||
{
|
||||
static float whitepoint[2];
|
||||
|
||||
/* TIFF 6.0 specification tells that it is no default
|
||||
value for the WhitePoint, but AdobePhotoshop TIFF
|
||||
Technical Note tells that it should be CIE D50. */
|
||||
whitepoint[0] = D50_X0 / (D50_X0 + D50_Y0 + D50_Z0);
|
||||
whitepoint[1] = D50_Y0 / (D50_X0 + D50_Y0 + D50_Z0);
|
||||
*va_arg(ap, float **) = whitepoint;
|
||||
static const float whitepoint[] = {
|
||||
D50_X0 / (D50_X0 + D50_Y0 + D50_Z0),
|
||||
D50_Y0 / (D50_X0 + D50_Y0 + D50_Z0)
|
||||
};
|
||||
*va_arg(ap, const float **) = whitepoint;
|
||||
return 1;
|
||||
}
|
||||
case TIFFTAG_TRANSFERFUNCTION:
|
||||
@@ -286,16 +321,16 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap)
|
||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "No space for \"TransferFunction\" tag");
|
||||
return (0);
|
||||
}
|
||||
*va_arg(ap, uint16 **) = td->td_transferfunction[0];
|
||||
*va_arg(ap, const uint16 **) = td->td_transferfunction[0];
|
||||
if (td->td_samplesperpixel - td->td_extrasamples > 1) {
|
||||
*va_arg(ap, uint16 **) = td->td_transferfunction[1];
|
||||
*va_arg(ap, uint16 **) = td->td_transferfunction[2];
|
||||
*va_arg(ap, const uint16 **) = td->td_transferfunction[1];
|
||||
*va_arg(ap, const uint16 **) = td->td_transferfunction[2];
|
||||
}
|
||||
return (1);
|
||||
case TIFFTAG_REFERENCEBLACKWHITE:
|
||||
if (!td->td_refblackwhite && !TIFFDefaultRefBlackWhite(td))
|
||||
return (0);
|
||||
*va_arg(ap, float **) = td->td_refblackwhite;
|
||||
*va_arg(ap, const float **) = td->td_refblackwhite;
|
||||
return (1);
|
||||
}
|
||||
return 0;
|
||||
|
||||
Vendored
+1
-1
@@ -264,7 +264,7 @@ TIFFGetConfiguredCODECs()
|
||||
return NULL;
|
||||
}
|
||||
codecs = new_codecs;
|
||||
_TIFFmemcpy(codecs + i - 1, cd, sizeof(TIFFCodec));
|
||||
_TIFFmemcpy(codecs + i - 1, cd->info, sizeof(TIFFCodec));
|
||||
i++;
|
||||
}
|
||||
for (c = _TIFFBuiltinCODECS; c->name; c++) {
|
||||
|
||||
Vendored
+79
-28
@@ -29,6 +29,7 @@
|
||||
* (and also some miscellaneous stuff)
|
||||
*/
|
||||
#include "tiffiop.h"
|
||||
#include <float.h> /*--: for Rational2Double */
|
||||
|
||||
/*
|
||||
* These are used in the backwards compatibility code...
|
||||
@@ -46,8 +47,8 @@ setByteArray(void** vpp, void* vp, size_t nmemb, size_t elem_size)
|
||||
*vpp = 0;
|
||||
}
|
||||
if (vp) {
|
||||
tmsize_t bytes = (tmsize_t)(nmemb * elem_size);
|
||||
if (elem_size && bytes / elem_size == nmemb)
|
||||
tmsize_t bytes = _TIFFMultiplySSize(NULL, nmemb, elem_size, NULL);
|
||||
if (bytes)
|
||||
*vpp = (void*) _TIFFmalloc(bytes);
|
||||
if (*vpp)
|
||||
_TIFFmemcpy(*vpp, vp, bytes);
|
||||
@@ -123,7 +124,7 @@ setExtraSamples(TIFF* tif, va_list ap, uint32* v)
|
||||
{
|
||||
TIFFWarningExt(tif->tif_clientdata,module,
|
||||
"ExtraSamples tag value is changing, "
|
||||
"but TransferFunction was read with a different value. Cancelling it");
|
||||
"but TransferFunction was read with a different value. Canceling it");
|
||||
TIFFClrFieldBit(tif,FIELD_TRANSFERFUNCTION);
|
||||
_TIFFfree(td->td_transferfunction[0]);
|
||||
td->td_transferfunction[0] = NULL;
|
||||
@@ -205,7 +206,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
/*
|
||||
* If the data require post-decoding processing to byte-swap
|
||||
* samples, set it up here. Note that since tags are required
|
||||
* to be ordered, compression code can override this behaviour
|
||||
* to be ordered, compression code can override this behavior
|
||||
* in the setup method if it wants to roll the post decoding
|
||||
* work in with its normal work.
|
||||
*/
|
||||
@@ -275,7 +276,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
{
|
||||
TIFFWarningExt(tif->tif_clientdata,module,
|
||||
"SamplesPerPixel tag value is changing, "
|
||||
"but SMinSampleValue tag was read with a different value. Cancelling it");
|
||||
"but SMinSampleValue tag was read with a different value. Canceling it");
|
||||
TIFFClrFieldBit(tif,FIELD_SMINSAMPLEVALUE);
|
||||
_TIFFfree(td->td_sminsamplevalue);
|
||||
td->td_sminsamplevalue = NULL;
|
||||
@@ -284,7 +285,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
{
|
||||
TIFFWarningExt(tif->tif_clientdata,module,
|
||||
"SamplesPerPixel tag value is changing, "
|
||||
"but SMaxSampleValue tag was read with a different value. Cancelling it");
|
||||
"but SMaxSampleValue tag was read with a different value. Canceling it");
|
||||
TIFFClrFieldBit(tif,FIELD_SMAXSAMPLEVALUE);
|
||||
_TIFFfree(td->td_smaxsamplevalue);
|
||||
td->td_smaxsamplevalue = NULL;
|
||||
@@ -296,7 +297,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
{
|
||||
TIFFWarningExt(tif->tif_clientdata,module,
|
||||
"SamplesPerPixel tag value is changing, "
|
||||
"but TransferFunction was read with a different value. Cancelling it");
|
||||
"but TransferFunction was read with a different value. Canceling it");
|
||||
TIFFClrFieldBit(tif,FIELD_TRANSFERFUNCTION);
|
||||
_TIFFfree(td->td_transferfunction[0]);
|
||||
td->td_transferfunction[0] = NULL;
|
||||
@@ -393,7 +394,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
if (tif->tif_mode != O_RDONLY)
|
||||
goto badvalue32;
|
||||
TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
|
||||
"Nonstandard tile width %d, convert file", v32);
|
||||
"Nonstandard tile width %u, convert file", v32);
|
||||
}
|
||||
td->td_tilewidth = v32;
|
||||
tif->tif_flags |= TIFF_ISTILED;
|
||||
@@ -404,7 +405,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
if (tif->tif_mode != O_RDONLY)
|
||||
goto badvalue32;
|
||||
TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
|
||||
"Nonstandard tile length %d, convert file", v32);
|
||||
"Nonstandard tile length %u, convert file", v32);
|
||||
}
|
||||
td->td_tilelength = v32;
|
||||
tif->tif_flags |= TIFF_ISTILED;
|
||||
@@ -559,6 +560,10 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
* Set custom value ... save a copy of the custom tag value.
|
||||
*/
|
||||
tv_size = _TIFFDataSize(fip->field_type);
|
||||
/*--: Rational2Double: For Rationals evaluate "set_field_type" to determine internal storage size. */
|
||||
if (fip->field_type == TIFF_RATIONAL || fip->field_type == TIFF_SRATIONAL) {
|
||||
tv_size = _TIFFSetGetFieldSize(fip->set_field_type);
|
||||
}
|
||||
if (tv_size == 0) {
|
||||
status = 0;
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
@@ -638,6 +643,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
|| fip->field_writecount == TIFF_VARIABLE2
|
||||
|| fip->field_writecount == TIFF_SPP
|
||||
|| tv->count > 1) {
|
||||
/*--: Rational2Double: For Rationals tv_size is set above to 4 or 8 according to fip->set_field_type! */
|
||||
_TIFFmemcpy(tv->value, va_arg(ap, void *),
|
||||
tv->count * tv_size);
|
||||
} else {
|
||||
@@ -698,6 +704,22 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
break;
|
||||
case TIFF_RATIONAL:
|
||||
case TIFF_SRATIONAL:
|
||||
/*-- Rational2Double: For Rationals tv_size is set above to 4 or 8 according to fip->set_field_type! */
|
||||
{
|
||||
if (tv_size == 8) {
|
||||
double v2 = va_arg(ap, double);
|
||||
_TIFFmemcpy(val, &v2, tv_size);
|
||||
} else {
|
||||
/*-- default should be tv_size == 4 */
|
||||
float v3 = (float)va_arg(ap, double);
|
||||
_TIFFmemcpy(val, &v3, tv_size);
|
||||
/*-- ToDo: After Testing, this should be removed and tv_size==4 should be set as default. */
|
||||
if (tv_size != 4) {
|
||||
TIFFErrorExt(0,"TIFFLib: _TIFFVSetField()", "Rational2Double: .set_field_type in not 4 but %d", tv_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TIFF_FLOAT:
|
||||
{
|
||||
float v2 = _TIFFClampDoubleToFloat(va_arg(ap, double));
|
||||
@@ -1011,19 +1033,19 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
*va_arg(ap, uint16*) = td->td_halftonehints[1];
|
||||
break;
|
||||
case TIFFTAG_COLORMAP:
|
||||
*va_arg(ap, uint16**) = td->td_colormap[0];
|
||||
*va_arg(ap, uint16**) = td->td_colormap[1];
|
||||
*va_arg(ap, uint16**) = td->td_colormap[2];
|
||||
*va_arg(ap, const uint16**) = td->td_colormap[0];
|
||||
*va_arg(ap, const uint16**) = td->td_colormap[1];
|
||||
*va_arg(ap, const uint16**) = td->td_colormap[2];
|
||||
break;
|
||||
case TIFFTAG_STRIPOFFSETS:
|
||||
case TIFFTAG_TILEOFFSETS:
|
||||
_TIFFFillStriles( tif );
|
||||
*va_arg(ap, uint64**) = td->td_stripoffset;
|
||||
*va_arg(ap, const uint64**) = td->td_stripoffset_p;
|
||||
break;
|
||||
case TIFFTAG_STRIPBYTECOUNTS:
|
||||
case TIFFTAG_TILEBYTECOUNTS:
|
||||
_TIFFFillStriles( tif );
|
||||
*va_arg(ap, uint64**) = td->td_stripbytecount;
|
||||
*va_arg(ap, const uint64**) = td->td_stripbytecount_p;
|
||||
break;
|
||||
case TIFFTAG_MATTEING:
|
||||
*va_arg(ap, uint16*) =
|
||||
@@ -1032,7 +1054,7 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
break;
|
||||
case TIFFTAG_EXTRASAMPLES:
|
||||
*va_arg(ap, uint16*) = td->td_extrasamples;
|
||||
*va_arg(ap, uint16**) = td->td_sampleinfo;
|
||||
*va_arg(ap, const uint16**) = td->td_sampleinfo;
|
||||
break;
|
||||
case TIFFTAG_TILEWIDTH:
|
||||
*va_arg(ap, uint32*) = td->td_tilewidth;
|
||||
@@ -1067,7 +1089,7 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
break;
|
||||
case TIFFTAG_SUBIFD:
|
||||
*va_arg(ap, uint16*) = td->td_nsubifd;
|
||||
*va_arg(ap, uint64**) = td->td_subifd;
|
||||
*va_arg(ap, const uint64**) = td->td_subifd;
|
||||
break;
|
||||
case TIFFTAG_YCBCRPOSITIONING:
|
||||
*va_arg(ap, uint16*) = td->td_ycbcrpositioning;
|
||||
@@ -1077,20 +1099,20 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
*va_arg(ap, uint16*) = td->td_ycbcrsubsampling[1];
|
||||
break;
|
||||
case TIFFTAG_TRANSFERFUNCTION:
|
||||
*va_arg(ap, uint16**) = td->td_transferfunction[0];
|
||||
*va_arg(ap, const uint16**) = td->td_transferfunction[0];
|
||||
if (td->td_samplesperpixel - td->td_extrasamples > 1) {
|
||||
*va_arg(ap, uint16**) = td->td_transferfunction[1];
|
||||
*va_arg(ap, uint16**) = td->td_transferfunction[2];
|
||||
*va_arg(ap, const uint16**) = td->td_transferfunction[1];
|
||||
*va_arg(ap, const uint16**) = td->td_transferfunction[2];
|
||||
} else {
|
||||
*va_arg(ap, uint16**) = NULL;
|
||||
*va_arg(ap, uint16**) = NULL;
|
||||
*va_arg(ap, const uint16**) = NULL;
|
||||
*va_arg(ap, const uint16**) = NULL;
|
||||
}
|
||||
break;
|
||||
case TIFFTAG_REFERENCEBLACKWHITE:
|
||||
*va_arg(ap, float**) = td->td_refblackwhite;
|
||||
*va_arg(ap, const float**) = td->td_refblackwhite;
|
||||
break;
|
||||
case TIFFTAG_INKNAMES:
|
||||
*va_arg(ap, char**) = td->td_inknames;
|
||||
*va_arg(ap, const char**) = td->td_inknames;
|
||||
break;
|
||||
default:
|
||||
{
|
||||
@@ -1132,7 +1154,7 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
*va_arg(ap, uint32*) = (uint32)tv->count;
|
||||
else /* Assume TIFF_VARIABLE */
|
||||
*va_arg(ap, uint16*) = (uint16)tv->count;
|
||||
*va_arg(ap, void **) = tv->value;
|
||||
*va_arg(ap, const void **) = tv->value;
|
||||
ret_val = 1;
|
||||
} else if (fip->field_tag == TIFFTAG_DOTRANGE
|
||||
&& strcmp(fip->field_name,"DotRange") == 0) {
|
||||
@@ -1200,6 +1222,23 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
break;
|
||||
case TIFF_RATIONAL:
|
||||
case TIFF_SRATIONAL:
|
||||
{
|
||||
/*-- Rational2Double: For Rationals evaluate "set_field_type" to determine internal storage size and return value size. */
|
||||
int tv_size = _TIFFSetGetFieldSize(fip->set_field_type);
|
||||
if (tv_size == 8) {
|
||||
*va_arg(ap, double*) = *(double *)val;
|
||||
ret_val = 1;
|
||||
} else {
|
||||
/*-- default should be tv_size == 4 */
|
||||
*va_arg(ap, float*) = *(float *)val;
|
||||
ret_val = 1;
|
||||
/*-- ToDo: After Testing, this should be removed and tv_size==4 should be set as default. */
|
||||
if (tv_size != 4) {
|
||||
TIFFErrorExt(0,"TIFFLib: _TIFFVGetField()", "Rational2Double: .set_field_type in not 4 but %d", tv_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TIFF_FLOAT:
|
||||
*va_arg(ap, float*) =
|
||||
*(float *)val;
|
||||
@@ -1282,8 +1321,9 @@ TIFFFreeDirectory(TIFF* tif)
|
||||
CleanupField(td_transferfunction[0]);
|
||||
CleanupField(td_transferfunction[1]);
|
||||
CleanupField(td_transferfunction[2]);
|
||||
CleanupField(td_stripoffset);
|
||||
CleanupField(td_stripbytecount);
|
||||
CleanupField(td_stripoffset_p);
|
||||
CleanupField(td_stripbytecount_p);
|
||||
td->td_stripoffsetbyteallocsize = 0;
|
||||
TIFFClrFieldBit(tif, FIELD_YCBCRSUBSAMPLING);
|
||||
TIFFClrFieldBit(tif, FIELD_YCBCRPOSITIONING);
|
||||
|
||||
@@ -1296,10 +1336,8 @@ TIFFFreeDirectory(TIFF* tif)
|
||||
td->td_customValueCount = 0;
|
||||
CleanupField(td_customValues);
|
||||
|
||||
#if defined(DEFER_STRILE_LOAD)
|
||||
_TIFFmemset( &(td->td_stripoffset_entry), 0, sizeof(TIFFDirEntry));
|
||||
_TIFFmemset( &(td->td_stripbytecount_entry), 0, sizeof(TIFFDirEntry));
|
||||
#endif
|
||||
}
|
||||
#undef CleanupField
|
||||
|
||||
@@ -1365,6 +1403,17 @@ TIFFCreateEXIFDirectory(TIFF* tif)
|
||||
return TIFFCreateCustomDirectory(tif, exifFieldArray);
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates the EXIF GPS custom directory
|
||||
*/
|
||||
int
|
||||
TIFFCreateGPSDirectory(TIFF* tif)
|
||||
{
|
||||
const TIFFFieldArray* gpsFieldArray;
|
||||
gpsFieldArray = _TIFFGetGpsFields();
|
||||
return TIFFCreateCustomDirectory(tif, gpsFieldArray);
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup a default directory structure.
|
||||
*/
|
||||
@@ -1387,7 +1436,9 @@ TIFFDefaultDirectory(TIFF* tif)
|
||||
td->td_tilewidth = 0;
|
||||
td->td_tilelength = 0;
|
||||
td->td_tiledepth = 1;
|
||||
#ifdef STRIPBYTECOUNTSORTED_UNUSED
|
||||
td->td_stripbytecountsorted = 1; /* Our own arrays always sorted. */
|
||||
#endif
|
||||
td->td_resolutionunit = RESUNIT_INCH;
|
||||
td->td_sampleformat = SAMPLEFORMAT_UINT;
|
||||
td->td_imagedepth = 1;
|
||||
|
||||
Vendored
+10
-4
@@ -58,6 +58,7 @@ typedef struct {
|
||||
uint32 toff_long;
|
||||
uint64 toff_long8;
|
||||
} tdir_offset; /* either offset or the data itself if fits */
|
||||
uint8 tdir_ignore; /* flag status to ignore tag when parsing tags in tif_dirread.c */
|
||||
} TIFFDirEntry;
|
||||
|
||||
/*
|
||||
@@ -97,13 +98,14 @@ typedef struct {
|
||||
* number of striles */
|
||||
uint32 td_stripsperimage;
|
||||
uint32 td_nstrips; /* size of offset & bytecount arrays */
|
||||
uint64* td_stripoffset;
|
||||
uint64* td_stripbytecount;
|
||||
uint64* td_stripoffset_p; /* should be accessed with TIFFGetStrileOffset */
|
||||
uint64* td_stripbytecount_p; /* should be accessed with TIFFGetStrileByteCount */
|
||||
uint32 td_stripoffsetbyteallocsize; /* number of elements currently allocated for td_stripoffset/td_stripbytecount. Only used if TIFF_LAZYSTRILELOAD is set */
|
||||
#ifdef STRIPBYTECOUNTSORTED_UNUSED
|
||||
int td_stripbytecountsorted; /* is the bytecount array sorted ascending? */
|
||||
#if defined(DEFER_STRILE_LOAD)
|
||||
#endif
|
||||
TIFFDirEntry td_stripoffset_entry; /* for deferred loading */
|
||||
TIFFDirEntry td_stripbytecount_entry; /* for deferred loading */
|
||||
#endif
|
||||
uint16 td_nsubifd;
|
||||
uint64* td_subifd;
|
||||
/* YCbCr parameters */
|
||||
@@ -118,6 +120,8 @@ typedef struct {
|
||||
|
||||
int td_customValueCount;
|
||||
TIFFTagValue *td_customValues;
|
||||
|
||||
unsigned char td_deferstrilearraywriting; /* see TIFFDeferStrileArrayWriting() */
|
||||
} TIFFDirectory;
|
||||
|
||||
/*
|
||||
@@ -257,6 +261,7 @@ extern "C" {
|
||||
|
||||
extern const TIFFFieldArray* _TIFFGetFields(void);
|
||||
extern const TIFFFieldArray* _TIFFGetExifFields(void);
|
||||
extern const TIFFFieldArray* _TIFFGetGpsFields(void);
|
||||
extern void _TIFFSetupFields(TIFF* tif, const TIFFFieldArray* infoarray);
|
||||
extern void _TIFFPrintFieldInfo(TIFF*, FILE*);
|
||||
|
||||
@@ -265,6 +270,7 @@ extern int _TIFFFillStriles(TIFF*);
|
||||
typedef enum {
|
||||
tfiatImage,
|
||||
tfiatExif,
|
||||
tfiatGps, /* EXIF-GPS fields array type */
|
||||
tfiatOther
|
||||
} TIFFFieldArrayType;
|
||||
|
||||
|
||||
Vendored
+207
-37
@@ -47,9 +47,19 @@
|
||||
#endif
|
||||
static const TIFFFieldArray tiffFieldArray;
|
||||
static const TIFFFieldArray exifFieldArray;
|
||||
static const TIFFFieldArray gpsFieldArray;
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
/*--: Rational2Double: --
|
||||
* The Rational2Double upgraded libtiff functionality allows the definition and achievement of true double-precision accuracy
|
||||
* for TIFF tags of RATIONAL type and field_bit=FIELD_CUSTOM using the set_field_type = TIFF_SETGET_DOUBLE.
|
||||
* Unfortunately, that changes the old implemented interface for TIFFGetField().
|
||||
* In order to keep the old TIFFGetField() interface behavior those tags have to be redefined with set_field_type = TIFF_SETGET_FLOAT!
|
||||
*
|
||||
* Rational custom arrays are already defined as _Cxx_FLOAT, thus can stay.
|
||||
*
|
||||
*/
|
||||
|
||||
static const TIFFField
|
||||
tiffFields[] = {
|
||||
@@ -75,12 +85,12 @@ tiffFields[] = {
|
||||
{ TIFFTAG_STRIPBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "StripByteCounts", NULL },
|
||||
{ TIFFTAG_MINSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_MINSAMPLEVALUE, 1, 0, "MinSampleValue", NULL },
|
||||
{ TIFFTAG_MAXSAMPLEVALUE, -2, -1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_MAXSAMPLEVALUE, 1, 0, "MaxSampleValue", NULL },
|
||||
{ TIFFTAG_XRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "XResolution", NULL },
|
||||
{ TIFFTAG_YRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "YResolution", NULL },
|
||||
{ TIFFTAG_XRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "XResolution", NULL },
|
||||
{ TIFFTAG_YRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_RESOLUTION, 1, 0, "YResolution", NULL },
|
||||
{ TIFFTAG_PLANARCONFIG, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_PLANARCONFIG, 0, 0, "PlanarConfiguration", NULL },
|
||||
{ TIFFTAG_PAGENAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PageName", NULL },
|
||||
{ TIFFTAG_XPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "XPosition", NULL },
|
||||
{ TIFFTAG_YPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "YPosition", NULL },
|
||||
{ TIFFTAG_XPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "XPosition", NULL },
|
||||
{ TIFFTAG_YPOSITION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_POSITION, 1, 0, "YPosition", NULL },
|
||||
{ TIFFTAG_FREEOFFSETS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeOffsets", NULL },
|
||||
{ TIFFTAG_FREEBYTECOUNTS, -1, -1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 0, 0, "FreeByteCounts", NULL },
|
||||
{ TIFFTAG_GRAYRESPONSEUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_IGNORE, 1, 0, "GrayResponseUnit", NULL },
|
||||
@@ -135,14 +145,18 @@ tiffFields[] = {
|
||||
{ TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToScreen", NULL },
|
||||
{ TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToCamera", NULL },
|
||||
{ TIFFTAG_CFAREPEATPATTERNDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFARepeatPatternDim", NULL },
|
||||
{ TIFFTAG_CFAPATTERN, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFAPattern" , NULL},
|
||||
{ TIFFTAG_CFAPATTERN, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CFAPattern" , NULL},
|
||||
{ TIFFTAG_COPYRIGHT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Copyright", NULL },
|
||||
/* end Pixar tags */
|
||||
{ TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_LONG, 0, TIFF_SETGET_C32_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "RichTIFFIPTC", NULL },
|
||||
{ TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "RichTIFFIPTC", NULL },
|
||||
{ TIFFTAG_PHOTOSHOP, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "Photoshop", NULL },
|
||||
{ TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "EXIFIFDOffset", (TIFFFieldArray*) &exifFieldArray },
|
||||
/*--: EXIFIFD and GPSIFD specified as TIFF_LONG by Aware-Systems and not TIFF_IFD8 as in original LibTiff.
|
||||
* However, for IFD-like tags, libtiff uses the data type TIFF_IFD8 in tiffFields[]-tag definition combined with
|
||||
* a special handling procedure in order to write either a 32-bit value and the TIFF_IFD type-id into ClassicTIFF files
|
||||
* or a 64-bit value and the TIFF_IFD8 type-id into BigTIFF files. */
|
||||
{ TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "EXIFIFDOffset", (TIFFFieldArray*) &exifFieldArray },
|
||||
{ TIFFTAG_ICCPROFILE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ICC Profile", NULL },
|
||||
{ TIFFTAG_GPSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "GPSIFDOffset", NULL },
|
||||
{ TIFFTAG_GPSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "GPSIFDOffset", (TIFFFieldArray*) &gpsFieldArray },
|
||||
{ TIFFTAG_FAXRECVPARAMS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvParams", NULL },
|
||||
{ TIFFTAG_FAXSUBADDRESS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxSubAddress", NULL },
|
||||
{ TIFFTAG_FAXRECVTIME, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvTime", NULL },
|
||||
@@ -163,7 +177,7 @@ tiffFields[] = {
|
||||
{ TIFFTAG_BLACKLEVELDELTAV, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "BlackLevelDeltaV", NULL },
|
||||
{ TIFFTAG_WHITELEVEL, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "WhiteLevel", NULL },
|
||||
{ TIFFTAG_DEFAULTSCALE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultScale", NULL },
|
||||
{ TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BestQualityScale", NULL },
|
||||
{ TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BestQualityScale", NULL },
|
||||
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultCropOrigin", NULL },
|
||||
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultCropSize", NULL },
|
||||
{ TIFFTAG_COLORMATRIX1, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ColorMatrix1", NULL },
|
||||
@@ -175,16 +189,16 @@ tiffFields[] = {
|
||||
{ TIFFTAG_ANALOGBALANCE, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AnalogBalance", NULL },
|
||||
{ TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_RATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AsShotNeutral", NULL },
|
||||
{ TIFFTAG_ASSHOTWHITEXY, 2, 2, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "AsShotWhiteXY", NULL },
|
||||
{ TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineExposure", NULL },
|
||||
{ TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineNoise", NULL },
|
||||
{ TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineSharpness", NULL },
|
||||
{ TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineExposure", NULL },
|
||||
{ TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineNoise", NULL },
|
||||
{ TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineSharpness", NULL },
|
||||
{ TIFFTAG_BAYERGREENSPLIT, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BayerGreenSplit", NULL },
|
||||
{ TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "LinearResponseLimit", NULL },
|
||||
{ TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "LinearResponseLimit", NULL },
|
||||
{ TIFFTAG_CAMERASERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraSerialNumber", NULL },
|
||||
{ TIFFTAG_LENSINFO, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "LensInfo", NULL },
|
||||
{ TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ChromaBlurRadius", NULL },
|
||||
{ TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "AntiAliasStrength", NULL },
|
||||
{ TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ShadowScale", NULL },
|
||||
{ TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ChromaBlurRadius", NULL },
|
||||
{ TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "AntiAliasStrength", NULL },
|
||||
{ TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ShadowScale", NULL },
|
||||
{ TIFFTAG_DNGPRIVATEDATA, -1, -1, TIFF_BYTE, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "DNGPrivateData", NULL },
|
||||
{ TIFFTAG_MAKERNOTESAFETY, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "MakerNoteSafety", NULL },
|
||||
{ TIFFTAG_CALIBRATIONILLUMINANT1, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CalibrationIlluminant1", NULL },
|
||||
@@ -217,47 +231,68 @@ tiffFields[] = {
|
||||
/* begin pseudo tags */
|
||||
};
|
||||
|
||||
/*
|
||||
* EXIF tags (Version 2.31, July 2016 plus version 2.32 May 2019)
|
||||
*/
|
||||
static const TIFFField
|
||||
exifFields[] = {
|
||||
{ EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureTime", NULL },
|
||||
{ EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FNumber", NULL },
|
||||
{ EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureTime", NULL },
|
||||
{ EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FNumber", NULL },
|
||||
{ EXIFTAG_EXPOSUREPROGRAM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureProgram", NULL },
|
||||
{ EXIFTAG_SPECTRALSENSITIVITY, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SpectralSensitivity", NULL },
|
||||
{ EXIFTAG_ISOSPEEDRATINGS, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "ISOSpeedRatings", NULL },
|
||||
{ EXIFTAG_OECF, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OptoelectricConversionFactor", NULL },
|
||||
{ EXIFTAG_SENSITIVITYTYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SensitivityType", NULL },
|
||||
{ EXIFTAG_STANDARDOUTPUTSENSITIVITY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "StandardOutputSensitivity", NULL },
|
||||
{ EXIFTAG_RECOMMENDEDEXPOSUREINDEX, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RecommendedExposureIndex", NULL },
|
||||
{ EXIFTAG_ISOSPEED, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ISOSpeed", NULL },
|
||||
{ EXIFTAG_ISOSPEEDLATITUDEYYY, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ISOSpeedLatitudeyyy", NULL },
|
||||
{ EXIFTAG_ISOSPEEDLATITUDEZZZ, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ISOSpeedLatitudezzz", NULL },
|
||||
{ EXIFTAG_EXIFVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExifVersion", NULL },
|
||||
{ EXIFTAG_DATETIMEORIGINAL, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateTimeOriginal", NULL },
|
||||
{ EXIFTAG_DATETIMEDIGITIZED, 20, 20, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DateTimeDigitized", NULL },
|
||||
{ EXIFTAG_OFFSETTIME, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OffsetTime", NULL },
|
||||
{ EXIFTAG_OFFSETTIMEORIGINAL, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OffsetTimeOriginal", NULL },
|
||||
{ EXIFTAG_OFFSETTIMEDIGITIZED, 7, 7, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "OffsetTimeDigitized", NULL },
|
||||
{ EXIFTAG_COMPONENTSCONFIGURATION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ComponentsConfiguration", NULL },
|
||||
{ EXIFTAG_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CompressedBitsPerPixel", NULL },
|
||||
{ EXIFTAG_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ShutterSpeedValue", NULL },
|
||||
{ EXIFTAG_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ApertureValue", NULL },
|
||||
{ EXIFTAG_BRIGHTNESSVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BrightnessValue", NULL },
|
||||
{ EXIFTAG_EXPOSUREBIASVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureBiasValue", NULL },
|
||||
{ EXIFTAG_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MaxApertureValue", NULL },
|
||||
{ EXIFTAG_SUBJECTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectDistance", NULL },
|
||||
{ EXIFTAG_COMPRESSEDBITSPERPIXEL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CompressedBitsPerPixel", NULL },
|
||||
{ EXIFTAG_SHUTTERSPEEDVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ShutterSpeedValue", NULL },
|
||||
{ EXIFTAG_APERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ApertureValue", NULL },
|
||||
{ EXIFTAG_BRIGHTNESSVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BrightnessValue", NULL },
|
||||
{ EXIFTAG_EXPOSUREBIASVALUE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureBiasValue", NULL },
|
||||
{ EXIFTAG_MAXAPERTUREVALUE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MaxApertureValue", NULL },
|
||||
/*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of "-1" if numerator equals 4294967295 (0xFFFFFFFF) to indicate infinite distance!
|
||||
* However, there are two other EXIF tags where numerator indicates a special value and six other cases where the denominator indicates special values,
|
||||
* which are not treated within LibTiff!! */
|
||||
{ EXIFTAG_SUBJECTDISTANCE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectDistance", NULL },
|
||||
{ EXIFTAG_METERINGMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MeteringMode", NULL },
|
||||
{ EXIFTAG_LIGHTSOURCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LightSource", NULL },
|
||||
{ EXIFTAG_FLASH, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Flash", NULL },
|
||||
{ EXIFTAG_FOCALLENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalLength", NULL },
|
||||
{ EXIFTAG_FOCALLENGTH, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalLength", NULL },
|
||||
{ EXIFTAG_SUBJECTAREA, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "SubjectArea", NULL },
|
||||
{ EXIFTAG_MAKERNOTE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "MakerNote", NULL },
|
||||
{ EXIFTAG_USERCOMMENT, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "UserComment", NULL },
|
||||
{ EXIFTAG_SUBSECTIME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTime", NULL },
|
||||
{ EXIFTAG_SUBSECTIMEORIGINAL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTimeOriginal", NULL },
|
||||
{ EXIFTAG_SUBSECTIMEDIGITIZED, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubSecTimeDigitized", NULL },
|
||||
{ EXIFTAG_TEMPERATURE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Temperature", NULL },
|
||||
{ EXIFTAG_HUMIDITY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Humidity", NULL },
|
||||
{ EXIFTAG_PRESSURE, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Pressure", NULL },
|
||||
{ EXIFTAG_WATERDEPTH, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "WaterDepth", NULL },
|
||||
{ EXIFTAG_ACCELERATION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Acceleration", NULL },
|
||||
{ EXIFTAG_CAMERAELEVATIONANGLE, 1, 1, TIFF_SRATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraElevationAngle", NULL },
|
||||
{ EXIFTAG_FLASHPIXVERSION, 4, 4, TIFF_UNDEFINED, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FlashpixVersion", NULL },
|
||||
{ EXIFTAG_COLORSPACE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ColorSpace", NULL },
|
||||
{ EXIFTAG_PIXELXDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PixelXDimension", NULL },
|
||||
{ EXIFTAG_PIXELYDIMENSION, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "PixelYDimension", NULL },
|
||||
{ EXIFTAG_RELATEDSOUNDFILE, 13, 13, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "RelatedSoundFile", NULL },
|
||||
{ EXIFTAG_FLASHENERGY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FlashEnergy", NULL },
|
||||
{ EXIFTAG_FLASHENERGY, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FlashEnergy", NULL },
|
||||
{ EXIFTAG_SPATIALFREQUENCYRESPONSE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "SpatialFrequencyResponse", NULL },
|
||||
{ EXIFTAG_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneXResolution", NULL },
|
||||
{ EXIFTAG_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneYResolution", NULL },
|
||||
{ EXIFTAG_FOCALPLANEXRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneXResolution", NULL },
|
||||
{ EXIFTAG_FOCALPLANEYRESOLUTION, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneYResolution", NULL },
|
||||
{ EXIFTAG_FOCALPLANERESOLUTIONUNIT, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalPlaneResolutionUnit", NULL },
|
||||
{ EXIFTAG_SUBJECTLOCATION, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectLocation", NULL },
|
||||
{ EXIFTAG_EXPOSUREINDEX, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureIndex", NULL },
|
||||
{ EXIFTAG_EXPOSUREINDEX, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureIndex", NULL },
|
||||
{ EXIFTAG_SENSINGMETHOD, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SensingMethod", NULL },
|
||||
{ EXIFTAG_FILESOURCE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FileSource", NULL },
|
||||
{ EXIFTAG_SCENETYPE, 1, 1, TIFF_UNDEFINED, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SceneType", NULL },
|
||||
@@ -265,22 +300,79 @@ exifFields[] = {
|
||||
{ EXIFTAG_CUSTOMRENDERED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CustomRendered", NULL },
|
||||
{ EXIFTAG_EXPOSUREMODE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureMode", NULL },
|
||||
{ EXIFTAG_WHITEBALANCE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "WhiteBalance", NULL },
|
||||
{ EXIFTAG_DIGITALZOOMRATIO, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DigitalZoomRatio", NULL },
|
||||
{ EXIFTAG_DIGITALZOOMRATIO, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "DigitalZoomRatio", NULL },
|
||||
{ EXIFTAG_FOCALLENGTHIN35MMFILM, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FocalLengthIn35mmFilm", NULL },
|
||||
{ EXIFTAG_SCENECAPTURETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SceneCaptureType", NULL },
|
||||
{ EXIFTAG_GAINCONTROL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "GainControl", NULL },
|
||||
{ EXIFTAG_GAINCONTROL, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "GainControl", NULL },
|
||||
{ EXIFTAG_CONTRAST, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Contrast", NULL },
|
||||
{ EXIFTAG_SATURATION, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Saturation", NULL },
|
||||
{ EXIFTAG_SHARPNESS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Sharpness", NULL },
|
||||
{ EXIFTAG_DEVICESETTINGDESCRIPTION, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "DeviceSettingDescription", NULL },
|
||||
{ EXIFTAG_SUBJECTDISTANCERANGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SubjectDistanceRange", NULL },
|
||||
{ EXIFTAG_IMAGEUNIQUEID, 33, 33, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageUniqueID", NULL }
|
||||
{ EXIFTAG_IMAGEUNIQUEID, 33, 33, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageUniqueID", NULL },
|
||||
{ EXIFTAG_CAMERAOWNERNAME, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraOwnerName", NULL },
|
||||
{ EXIFTAG_BODYSERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "BodySerialNumber", NULL },
|
||||
{ EXIFTAG_LENSSPECIFICATION, 4, 4, TIFF_RATIONAL, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensSpecification", NULL },
|
||||
{ EXIFTAG_LENSMAKE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensMake", NULL },
|
||||
{ EXIFTAG_LENSMODEL, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensModel", NULL },
|
||||
{ EXIFTAG_LENSSERIALNUMBER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "LensSerialNumber", NULL },
|
||||
{ EXIFTAG_GAMMA, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Gamma", NULL },
|
||||
{ EXIFTAG_COMPOSITEIMAGE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CompositeImage", NULL },
|
||||
{ EXIFTAG_SOURCEIMAGENUMBEROFCOMPOSITEIMAGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "SourceImageNumberOfCompositeImage", NULL },
|
||||
{ EXIFTAG_SOURCEEXPOSURETIMESOFCOMPOSITEIMAGE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "SourceExposureTimesOfCompositeImage", NULL }
|
||||
};
|
||||
/*
|
||||
* EXIF-GPS tags (Version 2.31, July 2016; nothing changed for version 2.32 May 2019)
|
||||
*/
|
||||
|
||||
static TIFFField
|
||||
gpsFields[] = {
|
||||
/* For the GPS tag definitions in gpsFields[] the standard definition for Rationals is TIFF_SETGET_DOUBLE and TIFF_SETGET_C0_FLOAT.
|
||||
*-- ATTENTION: After the upgrade with Rational2Double, the GPSTAG values can now be written and also read in double precision!
|
||||
* In order to achieve double precision for GPS tags:
|
||||
* Standard definitions for GPSTAG is kept to TIFF_SETGET_DOUBLE
|
||||
* and TIFF_SETGET_C0_FLOAT is changed to TIFF_SETGET_C0_DOUBLE.
|
||||
*/
|
||||
{ GPSTAG_VERSIONID , 4, 4, TIFF_BYTE , 0, TIFF_SETGET_C0_UINT8 , TIFF_SETGET_UINT8 , FIELD_CUSTOM , 1, 0, "VersionID", NULL },
|
||||
{ GPSTAG_LATITUDEREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "LatitudeRef", NULL },
|
||||
{ GPSTAG_LATITUDE , 3, 3, TIFF_RATIONAL , 0, TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Latitude", NULL },
|
||||
{ GPSTAG_LONGITUDEREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "LongitudeRef", NULL },
|
||||
{ GPSTAG_LONGITUDE , 3, 3, TIFF_RATIONAL , 0, TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Longitude", NULL },
|
||||
{ GPSTAG_ALTITUDEREF , 1, 1, TIFF_BYTE , 0, TIFF_SETGET_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "AltitudeRef", NULL },
|
||||
{ GPSTAG_ALTITUDE , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Altitude", NULL },
|
||||
{ GPSTAG_TIMESTAMP , 3, 3, TIFF_RATIONAL , 0, TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "TimeStamp", NULL },
|
||||
{ GPSTAG_SATELLITES , -1, -1, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Satellites", NULL },
|
||||
{ GPSTAG_STATUS , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Status", NULL },
|
||||
{ GPSTAG_MEASUREMODE , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "MeasureMode", NULL },
|
||||
{ GPSTAG_DOP , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DOP", NULL },
|
||||
{ GPSTAG_SPEEDREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "SpeedRef", NULL },
|
||||
{ GPSTAG_SPEED , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Speed", NULL },
|
||||
{ GPSTAG_TRACKREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "TrackRef", NULL },
|
||||
{ GPSTAG_TRACK , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Track", NULL },
|
||||
{ GPSTAG_IMGDIRECTIONREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "ImgDirectionRef", NULL },
|
||||
{ GPSTAG_IMGDIRECTION , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "ImgDirection", NULL },
|
||||
{ GPSTAG_MAPDATUM , -1, -1, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "MapDatum", NULL },
|
||||
{ GPSTAG_DESTLATITUDEREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestLatitudeRef", NULL },
|
||||
{ GPSTAG_DESTLATITUDE , 3, 3, TIFF_RATIONAL , 0, TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestLatitude", NULL },
|
||||
{ GPSTAG_DESTLONGITUDEREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestLongitudeRef", NULL },
|
||||
{ GPSTAG_DESTLONGITUDE , 3, 3, TIFF_RATIONAL , 0, TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestLongitude", NULL },
|
||||
{ GPSTAG_DESTBEARINGREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestBearingRef", NULL },
|
||||
{ GPSTAG_DESTBEARING , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestBearing", NULL },
|
||||
{ GPSTAG_DESTDISTANCEREF , 2, 2, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestDistanceRef", NULL },
|
||||
{ GPSTAG_DESTDISTANCE , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DestDistance", NULL },
|
||||
{ GPSTAG_PROCESSINGMETHOD , -1, -1, TIFF_UNDEFINED , 0, TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 1, "ProcessingMethod", NULL },
|
||||
{ GPSTAG_AREAINFORMATION , -1, -1, TIFF_UNDEFINED , 0, TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 1, "AreaInformation", NULL },
|
||||
{ GPSTAG_DATESTAMP , 11, 11, TIFF_ASCII , 0, TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "DateStamp", NULL },
|
||||
{ GPSTAG_DIFFERENTIAL , 1, 1, TIFF_SHORT , 0, TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "Differential", NULL },
|
||||
{ GPSTAG_GPSHPOSITIONINGERROR , 1, 1, TIFF_RATIONAL , 0, TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1, 0, "HorizontalPositioningError", NULL }
|
||||
};
|
||||
|
||||
static const TIFFFieldArray
|
||||
tiffFieldArray = { tfiatImage, 0, TIFFArrayCount(tiffFields), (TIFFField*) tiffFields };
|
||||
static const TIFFFieldArray
|
||||
exifFieldArray = { tfiatExif, 0, TIFFArrayCount(exifFields), (TIFFField*) exifFields };
|
||||
static const TIFFFieldArray
|
||||
gpsFieldArray = { tfiatGps, 0, TIFFArrayCount(gpsFields), (TIFFField*) gpsFields };
|
||||
|
||||
/*
|
||||
* We have our own local lfind() equivalent to avoid subtle differences
|
||||
@@ -313,6 +405,12 @@ _TIFFGetExifFields(void)
|
||||
return(&exifFieldArray);
|
||||
}
|
||||
|
||||
const TIFFFieldArray*
|
||||
_TIFFGetGpsFields(void)
|
||||
{
|
||||
return(&gpsFieldArray);
|
||||
}
|
||||
|
||||
void
|
||||
_TIFFSetupFields(TIFF* tif, const TIFFFieldArray* fieldarray)
|
||||
{
|
||||
@@ -502,6 +600,82 @@ _TIFFDataSize(TIFFDataType type)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Rational2Double:
|
||||
* Return size of TIFFSetGetFieldType in bytes.
|
||||
*
|
||||
* XXX: TIFF_RATIONAL values for FIELD_CUSTOM are stored internally as 4-byte float.
|
||||
* However, some of them should be stored internally as 8-byte double.
|
||||
* This is now managed by the SetGetField of the tag-definition!
|
||||
*/
|
||||
int
|
||||
_TIFFSetGetFieldSize(TIFFSetGetFieldType setgettype)
|
||||
{
|
||||
switch (setgettype)
|
||||
{
|
||||
case TIFF_SETGET_UNDEFINED:
|
||||
case TIFF_SETGET_ASCII:
|
||||
case TIFF_SETGET_C0_ASCII:
|
||||
case TIFF_SETGET_C16_ASCII:
|
||||
case TIFF_SETGET_C32_ASCII:
|
||||
case TIFF_SETGET_OTHER:
|
||||
return 0;
|
||||
case TIFF_SETGET_UINT8:
|
||||
case TIFF_SETGET_SINT8:
|
||||
case TIFF_SETGET_C0_UINT8:
|
||||
case TIFF_SETGET_C0_SINT8:
|
||||
case TIFF_SETGET_C16_UINT8:
|
||||
case TIFF_SETGET_C16_SINT8:
|
||||
case TIFF_SETGET_C32_UINT8:
|
||||
case TIFF_SETGET_C32_SINT8:
|
||||
return 1;
|
||||
case TIFF_SETGET_UINT16:
|
||||
case TIFF_SETGET_SINT16:
|
||||
case TIFF_SETGET_C0_UINT16:
|
||||
case TIFF_SETGET_C0_SINT16:
|
||||
case TIFF_SETGET_C16_UINT16:
|
||||
case TIFF_SETGET_C16_SINT16:
|
||||
case TIFF_SETGET_C32_UINT16:
|
||||
case TIFF_SETGET_C32_SINT16:
|
||||
return 2;
|
||||
case TIFF_SETGET_INT:
|
||||
case TIFF_SETGET_UINT32:
|
||||
case TIFF_SETGET_SINT32:
|
||||
case TIFF_SETGET_FLOAT:
|
||||
case TIFF_SETGET_UINT16_PAIR:
|
||||
case TIFF_SETGET_C0_UINT32:
|
||||
case TIFF_SETGET_C0_SINT32:
|
||||
case TIFF_SETGET_C0_FLOAT:
|
||||
case TIFF_SETGET_C16_UINT32:
|
||||
case TIFF_SETGET_C16_SINT32:
|
||||
case TIFF_SETGET_C16_FLOAT:
|
||||
case TIFF_SETGET_C32_UINT32:
|
||||
case TIFF_SETGET_C32_SINT32:
|
||||
case TIFF_SETGET_C32_FLOAT:
|
||||
return 4;
|
||||
case TIFF_SETGET_UINT64:
|
||||
case TIFF_SETGET_SINT64:
|
||||
case TIFF_SETGET_DOUBLE:
|
||||
case TIFF_SETGET_IFD8:
|
||||
case TIFF_SETGET_C0_UINT64:
|
||||
case TIFF_SETGET_C0_SINT64:
|
||||
case TIFF_SETGET_C0_DOUBLE:
|
||||
case TIFF_SETGET_C0_IFD8:
|
||||
case TIFF_SETGET_C16_UINT64:
|
||||
case TIFF_SETGET_C16_SINT64:
|
||||
case TIFF_SETGET_C16_DOUBLE:
|
||||
case TIFF_SETGET_C16_IFD8:
|
||||
case TIFF_SETGET_C32_UINT64:
|
||||
case TIFF_SETGET_C32_SINT64:
|
||||
case TIFF_SETGET_C32_DOUBLE:
|
||||
case TIFF_SETGET_C32_IFD8:
|
||||
return 8;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
} /*-- _TIFFSetGetFieldSize --- */
|
||||
|
||||
|
||||
const TIFFField*
|
||||
TIFFFindField(TIFF* tif, uint32 tag, TIFFDataType dt)
|
||||
{
|
||||
@@ -1062,10 +1236,6 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
|
||||
if (tag == TIFFTAG_LERC_PARAMETERS)
|
||||
return 1;
|
||||
break;
|
||||
case COMPRESSION_WEBP:
|
||||
if (tag == TIFFTAG_PREDICTOR)
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Vendored
+852
-359
File diff suppressed because it is too large
Load Diff
Vendored
+786
-55
File diff suppressed because it is too large
Load Diff
Vendored
+86
-28
@@ -73,6 +73,7 @@ typedef struct {
|
||||
int EOLcnt; /* count of EOL codes recognized */
|
||||
TIFFFaxFillFunc fill; /* fill routine */
|
||||
uint32* runs; /* b&w runs for current/previous row */
|
||||
uint32 nruns; /* size of the refruns / curruns arrays */
|
||||
uint32* refruns; /* runs for reference line */
|
||||
uint32* curruns; /* runs for current line */
|
||||
|
||||
@@ -160,7 +161,9 @@ Fax3PreDecode(TIFF* tif, uint16 s)
|
||||
*/
|
||||
sp->bitmap =
|
||||
TIFFGetBitRevTable(tif->tif_dir.td_fillorder != FILLORDER_LSB2MSB);
|
||||
sp->curruns = sp->runs;
|
||||
if (sp->refruns) { /* init reference line to white */
|
||||
sp->refruns = sp->runs + sp->nruns;
|
||||
sp->refruns[0] = (uint32) sp->b.rowpixels;
|
||||
sp->refruns[1] = 0;
|
||||
}
|
||||
@@ -218,8 +221,12 @@ Fax3PrematureEOF(const char* module, TIFF* tif, uint32 line, uint32 a0)
|
||||
|
||||
#define Nop
|
||||
|
||||
/*
|
||||
/**
|
||||
* Decode the requested amount of G3 1D-encoded data.
|
||||
* @param buf destination buffer
|
||||
* @param occ available bytes in destination buffer
|
||||
* @param s number of planes (ignored)
|
||||
* @returns 1 for success, -1 in case of error
|
||||
*/
|
||||
static int
|
||||
Fax3Decode1D(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
|
||||
@@ -300,7 +307,9 @@ Fax3Decode2D(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
|
||||
else
|
||||
EXPAND2D(EOF2Da);
|
||||
(*sp->fill)(buf, thisrun, pa, lastx);
|
||||
SETVALUE(0); /* imaginary change for reference */
|
||||
if (pa < thisrun + sp->nruns) {
|
||||
SETVALUE(0); /* imaginary change for reference */
|
||||
}
|
||||
SWAP(uint32*, sp->curruns, sp->refruns);
|
||||
buf += sp->b.rowbytes;
|
||||
occ -= sp->b.rowbytes;
|
||||
@@ -506,7 +515,7 @@ Fax3SetupState(TIFF* tif)
|
||||
int needsRefLine;
|
||||
Fax3CodecState* dsp = (Fax3CodecState*) Fax3State(tif);
|
||||
tmsize_t rowbytes;
|
||||
uint32 rowpixels, nruns;
|
||||
uint32 rowpixels;
|
||||
|
||||
if (td->td_bitspersample != 1) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
@@ -523,6 +532,13 @@ Fax3SetupState(TIFF* tif)
|
||||
rowbytes = TIFFScanlineSize(tif);
|
||||
rowpixels = td->td_imagewidth;
|
||||
}
|
||||
if ((uint64)rowbytes < ((uint64)rowpixels + 7) / 8)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Inconsistent number of bytes per row : rowbytes=%lu rowpixels=%lu",
|
||||
(unsigned long)(rowbytes), (unsigned long)(rowpixels));
|
||||
return (0);
|
||||
}
|
||||
sp->rowbytes = rowbytes;
|
||||
sp->rowpixels = rowpixels;
|
||||
/*
|
||||
@@ -539,26 +555,26 @@ Fax3SetupState(TIFF* tif)
|
||||
TIFFroundup and TIFFSafeMultiply return zero on integer overflow
|
||||
*/
|
||||
dsp->runs=(uint32*) NULL;
|
||||
nruns = TIFFroundup_32(rowpixels,32);
|
||||
dsp->nruns = TIFFroundup_32(rowpixels,32);
|
||||
if (needsRefLine) {
|
||||
nruns = TIFFSafeMultiply(uint32,nruns,2);
|
||||
dsp->nruns = TIFFSafeMultiply(uint32,dsp->nruns,2);
|
||||
}
|
||||
if ((nruns == 0) || (TIFFSafeMultiply(uint32,nruns,2) == 0)) {
|
||||
if ((dsp->nruns == 0) || (TIFFSafeMultiply(uint32,dsp->nruns,2) == 0)) {
|
||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
||||
"Row pixels integer overflow (rowpixels %u)",
|
||||
rowpixels);
|
||||
return (0);
|
||||
}
|
||||
dsp->runs = (uint32*) _TIFFCheckMalloc(tif,
|
||||
TIFFSafeMultiply(uint32,nruns,2),
|
||||
TIFFSafeMultiply(uint32,dsp->nruns,2),
|
||||
sizeof (uint32),
|
||||
"for Group 3/4 run arrays");
|
||||
if (dsp->runs == NULL)
|
||||
return (0);
|
||||
memset( dsp->runs, 0, TIFFSafeMultiply(uint32,nruns,2)*sizeof(uint32));
|
||||
memset( dsp->runs, 0, TIFFSafeMultiply(uint32,dsp->nruns,2)*sizeof(uint32));
|
||||
dsp->curruns = dsp->runs;
|
||||
if (needsRefLine)
|
||||
dsp->refruns = dsp->runs + nruns;
|
||||
dsp->refruns = dsp->runs + dsp->nruns;
|
||||
else
|
||||
dsp->refruns = NULL;
|
||||
if (td->td_compression == COMPRESSION_CCITTFAX3
|
||||
@@ -594,15 +610,19 @@ Fax3SetupState(TIFF* tif)
|
||||
*/
|
||||
|
||||
#define Fax3FlushBits(tif, sp) { \
|
||||
if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \
|
||||
(void) TIFFFlushData1(tif); \
|
||||
if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) { \
|
||||
if( !TIFFFlushData1(tif) ) \
|
||||
return 0; \
|
||||
} \
|
||||
*(tif)->tif_rawcp++ = (uint8) (sp)->data; \
|
||||
(tif)->tif_rawcc++; \
|
||||
(sp)->data = 0, (sp)->bit = 8; \
|
||||
}
|
||||
#define _FlushBits(tif) { \
|
||||
if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) \
|
||||
(void) TIFFFlushData1(tif); \
|
||||
if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize) { \
|
||||
if( !TIFFFlushData1(tif) ) \
|
||||
return 0; \
|
||||
} \
|
||||
*(tif)->tif_rawcp++ = (uint8) data; \
|
||||
(tif)->tif_rawcc++; \
|
||||
data = 0, bit = 8; \
|
||||
@@ -627,7 +647,7 @@ static const int _msbmask[9] =
|
||||
* the output stream. Values are
|
||||
* assumed to be at most 16 bits.
|
||||
*/
|
||||
static void
|
||||
static int
|
||||
Fax3PutBits(TIFF* tif, unsigned int bits, unsigned int length)
|
||||
{
|
||||
Fax3CodecState* sp = EncoderState(tif);
|
||||
@@ -638,6 +658,7 @@ Fax3PutBits(TIFF* tif, unsigned int bits, unsigned int length)
|
||||
|
||||
sp->data = data;
|
||||
sp->bit = bit;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -662,7 +683,7 @@ Fax3PutBits(TIFF* tif, unsigned int bits, unsigned int length)
|
||||
* appropriate table that holds the make-up and
|
||||
* terminating codes is supplied.
|
||||
*/
|
||||
static void
|
||||
static int
|
||||
putspan(TIFF* tif, int32 span, const tableentry* tab)
|
||||
{
|
||||
Fax3CodecState* sp = EncoderState(tif);
|
||||
@@ -700,6 +721,8 @@ putspan(TIFF* tif, int32 span, const tableentry* tab)
|
||||
|
||||
sp->data = data;
|
||||
sp->bit = bit;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -708,7 +731,7 @@ putspan(TIFF* tif, int32 span, const tableentry* tab)
|
||||
* here. We also handle writing the tag bit for the next
|
||||
* scanline when doing 2d encoding.
|
||||
*/
|
||||
static void
|
||||
static int
|
||||
Fax3PutEOL(TIFF* tif)
|
||||
{
|
||||
Fax3CodecState* sp = EncoderState(tif);
|
||||
@@ -742,6 +765,8 @@ Fax3PutEOL(TIFF* tif)
|
||||
|
||||
sp->data = data;
|
||||
sp->bit = bit;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -991,12 +1016,14 @@ Fax3Encode1DRow(TIFF* tif, unsigned char* bp, uint32 bits)
|
||||
|
||||
for (;;) {
|
||||
span = find0span(bp, bs, bits); /* white span */
|
||||
putspan(tif, span, TIFFFaxWhiteCodes);
|
||||
if( !putspan(tif, span, TIFFFaxWhiteCodes) )
|
||||
return 0;
|
||||
bs += span;
|
||||
if (bs >= bits)
|
||||
break;
|
||||
span = find1span(bp, bs, bits); /* black span */
|
||||
putspan(tif, span, TIFFFaxBlackCodes);
|
||||
if( !putspan(tif, span, TIFFFaxBlackCodes) )
|
||||
return 0;
|
||||
bs += span;
|
||||
if (bs >= bits)
|
||||
break;
|
||||
@@ -1048,21 +1075,28 @@ Fax3Encode2DRow(TIFF* tif, unsigned char* bp, unsigned char* rp, uint32 bits)
|
||||
(b1 < a1 && a1 - b1 <= 3U) ? -(int32)(a1 - b1) : 0x7FFFFFFF;
|
||||
if (!(-3 <= d && d <= 3)) { /* horizontal mode */
|
||||
a2 = finddiff2(bp, a1, bits, PIXEL(bp,a1));
|
||||
putcode(tif, &horizcode);
|
||||
if( !putcode(tif, &horizcode) )
|
||||
return 0;
|
||||
if (a0+a1 == 0 || PIXEL(bp, a0) == 0) {
|
||||
putspan(tif, a1-a0, TIFFFaxWhiteCodes);
|
||||
putspan(tif, a2-a1, TIFFFaxBlackCodes);
|
||||
if( !putspan(tif, a1-a0, TIFFFaxWhiteCodes) )
|
||||
return 0;
|
||||
if( !putspan(tif, a2-a1, TIFFFaxBlackCodes) )
|
||||
return 0;
|
||||
} else {
|
||||
putspan(tif, a1-a0, TIFFFaxBlackCodes);
|
||||
putspan(tif, a2-a1, TIFFFaxWhiteCodes);
|
||||
if( !putspan(tif, a1-a0, TIFFFaxBlackCodes) )
|
||||
return 0;
|
||||
if( !putspan(tif, a2-a1, TIFFFaxWhiteCodes) )
|
||||
return 0;
|
||||
}
|
||||
a0 = a2;
|
||||
} else { /* vertical mode */
|
||||
putcode(tif, &vcodes[d+3]);
|
||||
if( !putcode(tif, &vcodes[d+3]) )
|
||||
return 0;
|
||||
a0 = a1;
|
||||
}
|
||||
} else { /* pass mode */
|
||||
putcode(tif, &passcode);
|
||||
if( !putcode(tif, &passcode) )
|
||||
return 0;
|
||||
a0 = b2;
|
||||
}
|
||||
if (a0 >= bits)
|
||||
@@ -1091,7 +1125,10 @@ Fax3Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
}
|
||||
while (cc > 0) {
|
||||
if ((sp->b.mode & FAXMODE_NOEOL) == 0)
|
||||
Fax3PutEOL(tif);
|
||||
{
|
||||
if( !Fax3PutEOL(tif) )
|
||||
return 0;
|
||||
}
|
||||
if (is2DEncoding(sp)) {
|
||||
if (sp->tag == G3_1D) {
|
||||
if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels))
|
||||
@@ -1128,8 +1165,8 @@ Fax3PostEncode(TIFF* tif)
|
||||
return (1);
|
||||
}
|
||||
|
||||
static void
|
||||
Fax3Close(TIFF* tif)
|
||||
static int
|
||||
_Fax3Close(TIFF* tif)
|
||||
{
|
||||
if ((Fax3State(tif)->mode & FAXMODE_NORTC) == 0 && tif->tif_rawcp) {
|
||||
Fax3CodecState* sp = EncoderState(tif);
|
||||
@@ -1145,6 +1182,13 @@ Fax3Close(TIFF* tif)
|
||||
Fax3PutBits(tif, code, length);
|
||||
Fax3FlushBits(tif, sp);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
Fax3Close(TIFF* tif)
|
||||
{
|
||||
_Fax3Close(tif);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1453,6 +1497,13 @@ Fax4Decode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
|
||||
EXPAND2D(EOFG4);
|
||||
if (EOLcnt)
|
||||
goto EOFG4;
|
||||
if (((lastx + 7) >> 3) > (int)occ) /* check for buffer overrun */
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Buffer overrun detected : %d bytes available, %d bits needed",
|
||||
(int)occ, lastx);
|
||||
return -1;
|
||||
}
|
||||
(*sp->fill)(buf, thisrun, pa, lastx);
|
||||
SETVALUE(0); /* imaginary change for reference */
|
||||
SWAP(uint32*, sp->curruns, sp->refruns);
|
||||
@@ -1468,6 +1519,13 @@ Fax4Decode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
|
||||
fputs( "Bad EOFB\n", stderr );
|
||||
#endif
|
||||
ClrBits( 13 );
|
||||
if (((lastx + 7) >> 3) > (int)occ) /* check for buffer overrun */
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Buffer overrun detected : %d bytes available, %d bits needed",
|
||||
(int)occ, lastx);
|
||||
return -1;
|
||||
}
|
||||
(*sp->fill)(buf, thisrun, pa, lastx);
|
||||
UNCACHE_STATE(tif, sp);
|
||||
return ( sp->line ? 1 : -1); /* don't error on badly-terminated strips */
|
||||
|
||||
Vendored
+34
-5
@@ -240,6 +240,11 @@ static const char* StateNames[] = {
|
||||
* current row and reset decoding state.
|
||||
*/
|
||||
#define SETVALUE(x) do { \
|
||||
if (pa >= thisrun + sp->nruns) { \
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \
|
||||
sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \
|
||||
return (-1); \
|
||||
} \
|
||||
*pa++ = RunLength + (x); \
|
||||
a0 += (x); \
|
||||
RunLength = 0; \
|
||||
@@ -377,6 +382,11 @@ done1d: \
|
||||
*/
|
||||
#define CHECK_b1 do { \
|
||||
if (pa != thisrun) while (b1 <= a0 && b1 < lastx) { \
|
||||
if( pb + 1 >= sp->refruns + sp->nruns) { \
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \
|
||||
sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \
|
||||
return (-1); \
|
||||
} \
|
||||
b1 += pb[0] + pb[1]; \
|
||||
pb += 2; \
|
||||
} \
|
||||
@@ -387,10 +397,20 @@ done1d: \
|
||||
*/
|
||||
#define EXPAND2D(eoflab) do { \
|
||||
while (a0 < lastx) { \
|
||||
if (pa >= thisrun + sp->nruns) { \
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \
|
||||
sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \
|
||||
return (-1); \
|
||||
} \
|
||||
LOOKUP8(7, TIFFFaxMainTable, eof2d); \
|
||||
switch (TabEnt->State) { \
|
||||
case S_Pass: \
|
||||
CHECK_b1; \
|
||||
if( pb + 1 >= sp->refruns + sp->nruns) { \
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \
|
||||
sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \
|
||||
return (-1); \
|
||||
} \
|
||||
b1 += *pb++; \
|
||||
RunLength += b1 - a0; \
|
||||
a0 = b1; \
|
||||
@@ -469,20 +489,28 @@ done1d: \
|
||||
case S_V0: \
|
||||
CHECK_b1; \
|
||||
SETVALUE(b1 - a0); \
|
||||
if( pb >= sp->refruns + sp->nruns) { \
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \
|
||||
sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \
|
||||
return (-1); \
|
||||
} \
|
||||
b1 += *pb++; \
|
||||
break; \
|
||||
case S_VR: \
|
||||
CHECK_b1; \
|
||||
SETVALUE(b1 - a0 + TabEnt->Param); \
|
||||
if( pb >= sp->refruns + sp->nruns) { \
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "Buffer overflow at line %u of %s %u", \
|
||||
sp->line, isTiled(tif) ? "tile" : "strip", isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip); \
|
||||
return (-1); \
|
||||
} \
|
||||
b1 += *pb++; \
|
||||
break; \
|
||||
case S_VL: \
|
||||
CHECK_b1; \
|
||||
if (b1 <= (int) (a0 + TabEnt->Param)) { \
|
||||
if (b1 < (int) (a0 + TabEnt->Param) || pa != thisrun) { \
|
||||
unexpected("VL", a0); \
|
||||
goto eol2d; \
|
||||
} \
|
||||
if (b1 < (int) (a0 + TabEnt->Param)) { \
|
||||
unexpected("VL", a0); \
|
||||
goto eol2d; \
|
||||
} \
|
||||
SETVALUE(b1 - a0 - TabEnt->Param); \
|
||||
b1 -= *--pb; \
|
||||
@@ -529,6 +557,7 @@ eol2d: \
|
||||
CLEANUP_RUNS(); \
|
||||
} while (0)
|
||||
#endif /* _FAX3_ */
|
||||
/* vim: set ts=8 sts=4 sw=4 noet: */
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
/* WARNING, this file was automatically generated by the
|
||||
mkg3states program */
|
||||
#include <stdint.h>
|
||||
#include "tiff.h"
|
||||
#include "tif_fax3.h"
|
||||
const TIFFFaxTabEnt TIFFFaxMainTable[128] = {
|
||||
|
||||
Vendored
+88
-30
@@ -45,36 +45,8 @@ TIFFFlush(TIFF* tif)
|
||||
&& !(tif->tif_flags & TIFF_DIRTYDIRECT)
|
||||
&& tif->tif_mode == O_RDWR )
|
||||
{
|
||||
uint64 *offsets=NULL, *sizes=NULL;
|
||||
|
||||
if( TIFFIsTiled(tif) )
|
||||
{
|
||||
if( TIFFGetField( tif, TIFFTAG_TILEOFFSETS, &offsets )
|
||||
&& TIFFGetField( tif, TIFFTAG_TILEBYTECOUNTS, &sizes )
|
||||
&& _TIFFRewriteField( tif, TIFFTAG_TILEOFFSETS, TIFF_LONG8,
|
||||
tif->tif_dir.td_nstrips, offsets )
|
||||
&& _TIFFRewriteField( tif, TIFFTAG_TILEBYTECOUNTS, TIFF_LONG8,
|
||||
tif->tif_dir.td_nstrips, sizes ) )
|
||||
{
|
||||
tif->tif_flags &= ~TIFF_DIRTYSTRIP;
|
||||
tif->tif_flags &= ~TIFF_BEENWRITING;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( TIFFGetField( tif, TIFFTAG_STRIPOFFSETS, &offsets )
|
||||
&& TIFFGetField( tif, TIFFTAG_STRIPBYTECOUNTS, &sizes )
|
||||
&& _TIFFRewriteField( tif, TIFFTAG_STRIPOFFSETS, TIFF_LONG8,
|
||||
tif->tif_dir.td_nstrips, offsets )
|
||||
&& _TIFFRewriteField( tif, TIFFTAG_STRIPBYTECOUNTS, TIFF_LONG8,
|
||||
tif->tif_dir.td_nstrips, sizes ) )
|
||||
{
|
||||
tif->tif_flags &= ~TIFF_DIRTYSTRIP;
|
||||
tif->tif_flags &= ~TIFF_BEENWRITING;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if( TIFFForceStrileArrayWriting(tif) )
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((tif->tif_flags & (TIFF_DIRTYDIRECT|TIFF_DIRTYSTRIP))
|
||||
@@ -84,6 +56,92 @@ TIFFFlush(TIFF* tif)
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is an advanced writing function that must be used in a particular
|
||||
* sequence, and together with TIFFDeferStrileArrayWriting(),
|
||||
* to make its intended effect. Its aim is to force the writing of
|
||||
* the [Strip/Tile][Offsets/ByteCounts] arrays at the end of the file, when
|
||||
* they have not yet been rewritten.
|
||||
*
|
||||
* The typical sequence of calls is:
|
||||
* TIFFOpen()
|
||||
* [ TIFFCreateDirectory(tif) ]
|
||||
* Set fields with calls to TIFFSetField(tif, ...)
|
||||
* TIFFDeferStrileArrayWriting(tif)
|
||||
* TIFFWriteCheck(tif, ...)
|
||||
* TIFFWriteDirectory(tif)
|
||||
* ... potentially create other directories and come back to the above directory
|
||||
* TIFFForceStrileArrayWriting(tif)
|
||||
*
|
||||
* Returns 1 in case of success, 0 otherwise.
|
||||
*/
|
||||
int TIFFForceStrileArrayWriting(TIFF* tif)
|
||||
{
|
||||
static const char module[] = "TIFFForceStrileArrayWriting";
|
||||
const int isTiled = TIFFIsTiled(tif);
|
||||
|
||||
if (tif->tif_mode == O_RDONLY)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
|
||||
"File opened in read-only mode");
|
||||
return 0;
|
||||
}
|
||||
if( tif->tif_diroff == 0 )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Directory has not yet been written");
|
||||
return 0;
|
||||
}
|
||||
if( (tif->tif_flags & TIFF_DIRTYDIRECT) != 0 )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Directory has changes other than the strile arrays. "
|
||||
"TIFFRewriteDirectory() should be called instead");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( !(tif->tif_flags & TIFF_DIRTYSTRIP) )
|
||||
{
|
||||
if( !(tif->tif_dir.td_stripoffset_entry.tdir_tag != 0 &&
|
||||
tif->tif_dir.td_stripoffset_entry.tdir_count == 0 &&
|
||||
tif->tif_dir.td_stripoffset_entry.tdir_type == 0 &&
|
||||
tif->tif_dir.td_stripoffset_entry.tdir_offset.toff_long8 == 0 &&
|
||||
tif->tif_dir.td_stripbytecount_entry.tdir_tag != 0 &&
|
||||
tif->tif_dir.td_stripbytecount_entry.tdir_count == 0 &&
|
||||
tif->tif_dir.td_stripbytecount_entry.tdir_type == 0 &&
|
||||
tif->tif_dir.td_stripbytecount_entry.tdir_offset.toff_long8 == 0) )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Function not called together with "
|
||||
"TIFFDeferStrileArrayWriting()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (tif->tif_dir.td_stripoffset_p == NULL && !TIFFSetupStrips(tif))
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( _TIFFRewriteField( tif,
|
||||
isTiled ? TIFFTAG_TILEOFFSETS :
|
||||
TIFFTAG_STRIPOFFSETS,
|
||||
TIFF_LONG8,
|
||||
tif->tif_dir.td_nstrips,
|
||||
tif->tif_dir.td_stripoffset_p )
|
||||
&& _TIFFRewriteField( tif,
|
||||
isTiled ? TIFFTAG_TILEBYTECOUNTS :
|
||||
TIFFTAG_STRIPBYTECOUNTS,
|
||||
TIFF_LONG8,
|
||||
tif->tif_dir.td_nstrips,
|
||||
tif->tif_dir.td_stripbytecount_p ) )
|
||||
{
|
||||
tif->tif_flags &= ~TIFF_DIRTYSTRIP;
|
||||
tif->tif_flags &= ~TIFF_BEENWRITING;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Flush buffered data to the file.
|
||||
*
|
||||
|
||||
Vendored
+52
-15
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
#include "tiffiop.h"
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
static int gtTileContig(TIFFRGBAImage*, uint32*, uint32, uint32);
|
||||
static int gtTileSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
|
||||
@@ -645,12 +646,20 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
|
||||
flip = setorientation(img);
|
||||
if (flip & FLIP_VERTICALLY) {
|
||||
y = h - 1;
|
||||
toskew = -(int32)(tw + w);
|
||||
if ((tw + w) > INT_MAX) {
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)");
|
||||
return (0);
|
||||
}
|
||||
y = h - 1;
|
||||
toskew = -(int32)(tw + w);
|
||||
}
|
||||
else {
|
||||
y = 0;
|
||||
toskew = -(int32)(tw - w);
|
||||
if (tw > (INT_MAX + w)) {
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)");
|
||||
return (0);
|
||||
}
|
||||
y = 0;
|
||||
toskew = -(int32)(tw - w);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -755,9 +764,8 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
uint32 leftmost_tw;
|
||||
|
||||
tilesize = TIFFTileSize(tif);
|
||||
bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,tilesize);
|
||||
bufsize = _TIFFMultiplySSize(tif, alpha?4:3,tilesize, "gtTileSeparate");
|
||||
if (bufsize == 0) {
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtTileSeparate");
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -766,10 +774,18 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
|
||||
flip = setorientation(img);
|
||||
if (flip & FLIP_VERTICALLY) {
|
||||
if ((tw + w) > INT_MAX) {
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)");
|
||||
return (0);
|
||||
}
|
||||
y = h - 1;
|
||||
toskew = -(int32)(tw + w);
|
||||
}
|
||||
else {
|
||||
if (tw > (INT_MAX + w)) {
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "unsupported tile size (too wide)");
|
||||
return (0);
|
||||
}
|
||||
y = 0;
|
||||
toskew = -(int32)(tw - w);
|
||||
}
|
||||
@@ -937,6 +953,10 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
|
||||
flip = setorientation(img);
|
||||
if (flip & FLIP_VERTICALLY) {
|
||||
if ( w > INT_MAX ) {
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Width overflow");
|
||||
return (0);
|
||||
}
|
||||
y = h - 1;
|
||||
toskew = -(int32)(w + w);
|
||||
} else {
|
||||
@@ -950,16 +970,23 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
fromskew = (w < imagewidth ? imagewidth - w : 0);
|
||||
for (row = 0; row < h; row += nrow)
|
||||
{
|
||||
uint32 temp;
|
||||
rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
|
||||
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
||||
nrowsub = nrow;
|
||||
if ((nrowsub%subsamplingver)!=0)
|
||||
nrowsub+=subsamplingver-nrowsub%subsamplingver;
|
||||
temp = (row + img->row_offset)%rowsperstrip + nrowsub;
|
||||
if( scanline > 0 && temp > (size_t)(TIFF_TMSIZE_T_MAX / scanline) )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in gtStripContig");
|
||||
return 0;
|
||||
}
|
||||
if (_TIFFReadEncodedStripAndAllocBuffer(tif,
|
||||
TIFFComputeStrip(tif,row+img->row_offset, 0),
|
||||
(void**)(&buf),
|
||||
maxstripsize,
|
||||
((row + img->row_offset)%rowsperstrip + nrowsub) * scanline)==(tmsize_t)(-1)
|
||||
temp * scanline)==(tmsize_t)(-1)
|
||||
&& (buf == NULL || img->stoponerr))
|
||||
{
|
||||
ret = 0;
|
||||
@@ -1019,14 +1046,17 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
uint16 colorchannels;
|
||||
|
||||
stripsize = TIFFStripSize(tif);
|
||||
bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,stripsize);
|
||||
bufsize = _TIFFMultiplySSize(tif,alpha?4:3,stripsize, "gtStripSeparate");
|
||||
if (bufsize == 0) {
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtStripSeparate");
|
||||
return (0);
|
||||
}
|
||||
|
||||
flip = setorientation(img);
|
||||
if (flip & FLIP_VERTICALLY) {
|
||||
if ( w > INT_MAX ) {
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Width overflow");
|
||||
return (0);
|
||||
}
|
||||
y = h - 1;
|
||||
toskew = -(int32)(w + w);
|
||||
}
|
||||
@@ -1053,15 +1083,22 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
fromskew = (w < imagewidth ? imagewidth - w : 0);
|
||||
for (row = 0; row < h; row += nrow)
|
||||
{
|
||||
uint32 temp;
|
||||
rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
|
||||
nrow = (row + rowstoread > h ? h - row : rowstoread);
|
||||
offset_row = row + img->row_offset;
|
||||
temp = (row + img->row_offset)%rowsperstrip + nrow;
|
||||
if( scanline > 0 && temp > (size_t)(TIFF_TMSIZE_T_MAX / scanline) )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in gtStripSeparate");
|
||||
return 0;
|
||||
}
|
||||
if( buf == NULL )
|
||||
{
|
||||
if (_TIFFReadEncodedStripAndAllocBuffer(
|
||||
tif, TIFFComputeStrip(tif, offset_row, 0),
|
||||
(void**) &buf, bufsize,
|
||||
((row + img->row_offset)%rowsperstrip + nrow) * scanline)==(tmsize_t)(-1)
|
||||
temp * scanline)==(tmsize_t)(-1)
|
||||
&& (buf == NULL || img->stoponerr))
|
||||
{
|
||||
ret = 0;
|
||||
@@ -1081,7 +1118,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
}
|
||||
}
|
||||
else if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0),
|
||||
p0, ((row + img->row_offset)%rowsperstrip + nrow) * scanline)==(tmsize_t)(-1)
|
||||
p0, temp * scanline)==(tmsize_t)(-1)
|
||||
&& img->stoponerr)
|
||||
{
|
||||
ret = 0;
|
||||
@@ -1089,7 +1126,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
}
|
||||
if (colorchannels > 1
|
||||
&& TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1),
|
||||
p1, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) == (tmsize_t)(-1)
|
||||
p1, temp * scanline) == (tmsize_t)(-1)
|
||||
&& img->stoponerr)
|
||||
{
|
||||
ret = 0;
|
||||
@@ -1097,7 +1134,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
}
|
||||
if (colorchannels > 1
|
||||
&& TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2),
|
||||
p2, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) == (tmsize_t)(-1)
|
||||
p2, temp * scanline) == (tmsize_t)(-1)
|
||||
&& img->stoponerr)
|
||||
{
|
||||
ret = 0;
|
||||
@@ -1106,7 +1143,7 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
|
||||
if (alpha)
|
||||
{
|
||||
if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, colorchannels),
|
||||
pa, ((row + img->row_offset)%rowsperstrip + nrow) * scanline)==(tmsize_t)(-1)
|
||||
pa, temp * scanline)==(tmsize_t)(-1)
|
||||
&& img->stoponerr)
|
||||
{
|
||||
ret = 0;
|
||||
@@ -2957,7 +2994,7 @@ TIFFReadRGBATileExt(TIFF* tif, uint32 col, uint32 row, uint32 * raster, int stop
|
||||
if( !TIFFIsTiled( tif ) )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif),
|
||||
"Can't use TIFFReadRGBATile() with stripped file.");
|
||||
"Can't use TIFFReadRGBATile() with striped file.");
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
@@ -199,6 +199,7 @@ static int JBIGEncode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s)
|
||||
|
||||
int TIFFInitJBIG(TIFF* tif, int scheme)
|
||||
{
|
||||
(void)scheme;
|
||||
assert(scheme == COMPRESSION_JBIG);
|
||||
|
||||
/*
|
||||
|
||||
Vendored
+42
-38
@@ -466,7 +466,8 @@ std_empty_output_buffer(j_compress_ptr cinfo)
|
||||
}
|
||||
#endif
|
||||
|
||||
TIFFFlushData1(tif);
|
||||
if( !TIFFFlushData1(tif) )
|
||||
return FALSE;
|
||||
sp->dest.next_output_byte = (JOCTET*) tif->tif_rawdata;
|
||||
sp->dest.free_in_buffer = (size_t) tif->tif_rawdatasize;
|
||||
|
||||
@@ -780,12 +781,9 @@ JPEGFixupTagsSubsampling(TIFF* tif)
|
||||
*/
|
||||
static const char module[] = "JPEGFixupTagsSubsampling";
|
||||
struct JPEGFixupTagsSubsamplingData m;
|
||||
uint64 fileoffset = TIFFGetStrileOffset(tif, 0);
|
||||
|
||||
_TIFFFillStriles( tif );
|
||||
|
||||
if( tif->tif_dir.td_stripbytecount == NULL
|
||||
|| tif->tif_dir.td_stripoffset == NULL
|
||||
|| tif->tif_dir.td_stripbytecount[0] == 0 )
|
||||
if( fileoffset == 0 )
|
||||
{
|
||||
/* Do not even try to check if the first strip/tile does not
|
||||
yet exist, as occurs when GDAL has created a new NULL file
|
||||
@@ -804,9 +802,9 @@ JPEGFixupTagsSubsampling(TIFF* tif)
|
||||
}
|
||||
m.buffercurrentbyte=NULL;
|
||||
m.bufferbytesleft=0;
|
||||
m.fileoffset=tif->tif_dir.td_stripoffset[0];
|
||||
m.fileoffset=fileoffset;
|
||||
m.filepositioned=0;
|
||||
m.filebytesleft=tif->tif_dir.td_stripbytecount[0];
|
||||
m.filebytesleft=TIFFGetStrileByteCount(tif, 0);
|
||||
if (!JPEGFixupTagsSubsamplingSec(&m))
|
||||
TIFFWarningExt(tif->tif_clientdata,module,
|
||||
"Unable to auto-correct subsampling values, likely corrupt JPEG compressed data in first strip/tile; auto-correcting skipped");
|
||||
@@ -940,7 +938,10 @@ JPEGFixupTagsSubsamplingReadByte(struct JPEGFixupTagsSubsamplingData* data, uint
|
||||
return(0);
|
||||
if (!data->filepositioned)
|
||||
{
|
||||
TIFFSeekFile(data->tif,data->fileoffset,SEEK_SET);
|
||||
if (TIFFSeekFile(data->tif,data->fileoffset,SEEK_SET) == (toff_t)-1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
data->filepositioned=1;
|
||||
}
|
||||
m=data->buffersize;
|
||||
@@ -1209,35 +1210,37 @@ JPEGPreDecode(TIFF* tif, uint16 s)
|
||||
/* store for all coefficients */
|
||||
/* See call to jinit_d_coef_controller() from master_selection() */
|
||||
/* in libjpeg */
|
||||
toff_t nRequiredMemory = (toff_t)sp->cinfo.d.image_width *
|
||||
sp->cinfo.d.image_height *
|
||||
sp->cinfo.d.num_components *
|
||||
((td->td_bitspersample+7)/8);
|
||||
/* BLOCK_SMOOTHING_SUPPORTED is generally defined, so we need */
|
||||
/* to replicate the logic of jinit_d_coef_controller() */
|
||||
if( sp->cinfo.d.progressive_mode )
|
||||
nRequiredMemory *= 3;
|
||||
|
||||
#ifndef TIFF_LIBJPEG_LARGEST_MEM_ALLOC
|
||||
#define TIFF_LIBJPEG_LARGEST_MEM_ALLOC (100 * 1024 * 1024)
|
||||
#endif
|
||||
/* 1 MB for regular libjpeg usage */
|
||||
toff_t nRequiredMemory = 1024 * 1024;
|
||||
|
||||
if( nRequiredMemory > TIFF_LIBJPEG_LARGEST_MEM_ALLOC &&
|
||||
for (ci = 0; ci < sp->cinfo.d.num_components; ci++) {
|
||||
const jpeg_component_info *compptr = &(sp->cinfo.d.comp_info[ci]);
|
||||
if( compptr->h_samp_factor > 0 && compptr->v_samp_factor > 0 )
|
||||
{
|
||||
nRequiredMemory += (toff_t)(
|
||||
((compptr->width_in_blocks + compptr->h_samp_factor - 1) / compptr->h_samp_factor)) *
|
||||
((compptr->height_in_blocks + compptr->v_samp_factor - 1) / compptr->v_samp_factor) *
|
||||
sizeof(JBLOCK);
|
||||
}
|
||||
}
|
||||
|
||||
if( sp->cinfo.d.mem->max_memory_to_use > 0 &&
|
||||
nRequiredMemory > (toff_t)(sp->cinfo.d.mem->max_memory_to_use) &&
|
||||
getenv("LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC") == NULL )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Reading this strip would require libjpeg to allocate "
|
||||
"at least %u bytes. "
|
||||
"This is disabled since above the %u threshold. "
|
||||
"You may override this restriction by defining the "
|
||||
"LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, "
|
||||
"or recompile libtiff by defining the "
|
||||
"TIFF_LIBJPEG_LARGEST_MEM_ALLOC macro to a value greater "
|
||||
"than %u",
|
||||
(unsigned)nRequiredMemory,
|
||||
(unsigned)TIFF_LIBJPEG_LARGEST_MEM_ALLOC,
|
||||
(unsigned)TIFF_LIBJPEG_LARGEST_MEM_ALLOC);
|
||||
return (0);
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Reading this image would require libjpeg to allocate "
|
||||
"at least %u bytes. "
|
||||
"This is disabled since above the %u threshold. "
|
||||
"You may override this restriction by defining the "
|
||||
"LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC environment variable, "
|
||||
"or setting the JPEGMEM environment variable to a value greater "
|
||||
"or equal to '%uM'",
|
||||
(unsigned)(nRequiredMemory),
|
||||
(unsigned)(sp->cinfo.d.mem->max_memory_to_use),
|
||||
(unsigned)((nRequiredMemory + 1000000 - 1) / 1000000));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1566,7 +1569,7 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
|
||||
JSAMPLE *outptr = (JSAMPLE*)tmpbuf + clumpoffset;
|
||||
#else
|
||||
JSAMPLE *outptr = (JSAMPLE*)buf + clumpoffset;
|
||||
if (cc < (tmsize_t) (clumpoffset + samples_per_clump*(clumps_per_line-1) + hsamp)) {
|
||||
if (cc < (tmsize_t)(clumpoffset + (tmsize_t)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;
|
||||
@@ -2126,8 +2129,8 @@ JPEGEncodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
|
||||
/* data is expected to be supplied in multiples of a clumpline */
|
||||
/* a clumpline is equivalent to v_sampling desubsampled scanlines */
|
||||
/* TODO: the following calculation of bytesperclumpline, should substitute calculation of sp->bytesperline, except that it is per v_sampling lines */
|
||||
bytesperclumpline = (((sp->cinfo.c.image_width+sp->h_sampling-1)/sp->h_sampling)
|
||||
*(sp->h_sampling*sp->v_sampling+2)*sp->cinfo.c.data_precision+7)
|
||||
bytesperclumpline = ((((tmsize_t)sp->cinfo.c.image_width+sp->h_sampling-1)/sp->h_sampling)
|
||||
*((tmsize_t)sp->h_sampling*sp->v_sampling+2)*sp->cinfo.c.data_precision+7)
|
||||
/8;
|
||||
|
||||
nrows = ( cc / bytesperclumpline ) * sp->v_sampling;
|
||||
@@ -2347,7 +2350,7 @@ JPEGVGetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
switch (tag) {
|
||||
case TIFFTAG_JPEGTABLES:
|
||||
*va_arg(ap, uint32*) = sp->jpegtables_length;
|
||||
*va_arg(ap, void**) = sp->jpegtables;
|
||||
*va_arg(ap, const void**) = sp->jpegtables;
|
||||
break;
|
||||
case TIFFTAG_JPEGQUALITY:
|
||||
*va_arg(ap, int*) = sp->jpegquality;
|
||||
@@ -2482,6 +2485,7 @@ TIFFInitJPEG(TIFF* tif, int scheme)
|
||||
{
|
||||
JPEGState* sp;
|
||||
|
||||
(void)scheme;
|
||||
assert(scheme == COMPRESSION_JPEG);
|
||||
|
||||
/*
|
||||
|
||||
Vendored
+21
-21
@@ -193,6 +193,7 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
|
||||
tmsize_t cc;
|
||||
int rc;
|
||||
|
||||
(void)s;
|
||||
assert(s == 0);
|
||||
assert(sp != NULL);
|
||||
|
||||
@@ -266,6 +267,7 @@ LogLuvDecode24(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
|
||||
unsigned char* bp;
|
||||
uint32* tp;
|
||||
|
||||
(void)s;
|
||||
assert(s == 0);
|
||||
assert(sp != NULL);
|
||||
|
||||
@@ -326,6 +328,7 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
|
||||
tmsize_t cc;
|
||||
int rc;
|
||||
|
||||
(void)s;
|
||||
assert(s == 0);
|
||||
sp = DecoderState(tif);
|
||||
assert(sp != NULL);
|
||||
@@ -447,6 +450,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
int rc=0, mask;
|
||||
tmsize_t beg;
|
||||
|
||||
(void)s;
|
||||
assert(s == 0);
|
||||
assert(sp != NULL);
|
||||
npixels = cc / sp->pixel_size;
|
||||
@@ -541,6 +545,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
uint8* op;
|
||||
uint32* tp;
|
||||
|
||||
(void)s;
|
||||
assert(s == 0);
|
||||
assert(sp != NULL);
|
||||
npixels = cc / sp->pixel_size;
|
||||
@@ -598,6 +603,7 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
int rc=0, mask;
|
||||
tmsize_t beg;
|
||||
|
||||
(void)s;
|
||||
assert(s == 0);
|
||||
assert(sp != NULL);
|
||||
|
||||
@@ -742,7 +748,7 @@ LogLuvEncodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
#undef exp2 /* Conflict with C'99 function */
|
||||
#define exp2(x) exp(M_LN2*(x))
|
||||
|
||||
static int itrunc(double x, int m)
|
||||
static int tiff_itrunc(double x, int m)
|
||||
{
|
||||
if( m == SGILOGENCODE_NODITHER )
|
||||
return (int)x;
|
||||
@@ -777,9 +783,9 @@ LogL16fromY(double Y, int em) /* get 16-bit LogL from Y */
|
||||
if (Y <= -1.8371976e19)
|
||||
return (0xffff);
|
||||
if (Y > 5.4136769e-20)
|
||||
return itrunc(256.*(log2(Y) + 64.), em);
|
||||
return tiff_itrunc(256.*(log2(Y) + 64.), em);
|
||||
if (Y < -5.4136769e-20)
|
||||
return (~0x7fff | itrunc(256.*(log2(-Y) + 64.), em));
|
||||
return (~0x7fff | tiff_itrunc(256.*(log2(-Y) + 64.), em));
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -855,7 +861,7 @@ LogL10fromY(double Y, int em) /* get 10-bit LogL from Y */
|
||||
else if (Y <= .00024283)
|
||||
return (0);
|
||||
else
|
||||
return itrunc(64.*(log2(Y) + 12.), em);
|
||||
return tiff_itrunc(64.*(log2(Y) + 12.), em);
|
||||
}
|
||||
|
||||
#define NANGLES 100
|
||||
@@ -925,12 +931,12 @@ uv_encode(double u, double v, int em) /* encode (u',v') coordinates */
|
||||
|
||||
if (v < UV_VSTART)
|
||||
return oog_encode(u, v);
|
||||
vi = itrunc((v - UV_VSTART)*(1./UV_SQSIZ), em);
|
||||
vi = tiff_itrunc((v - UV_VSTART)*(1./UV_SQSIZ), em);
|
||||
if (vi >= UV_NVS)
|
||||
return oog_encode(u, v);
|
||||
if (u < uv_row[vi].ustart)
|
||||
return oog_encode(u, v);
|
||||
ui = itrunc((u - uv_row[vi].ustart)*(1./UV_SQSIZ), em);
|
||||
ui = tiff_itrunc((u - uv_row[vi].ustart)*(1./UV_SQSIZ), em);
|
||||
if (ui >= uv_row[vi].nus)
|
||||
return oog_encode(u, v);
|
||||
|
||||
@@ -1099,7 +1105,7 @@ Luv24fromLuv48(LogLuvState* sp, uint8* op, tmsize_t n)
|
||||
else if (sp->encode_meth == SGILOGENCODE_NODITHER)
|
||||
Le = (luv3[0]-3314) >> 2;
|
||||
else
|
||||
Le = itrunc(.25*(luv3[0]-3314.), sp->encode_meth);
|
||||
Le = tiff_itrunc(.25*(luv3[0]-3314.), sp->encode_meth);
|
||||
|
||||
Ce = uv_encode((luv3[1]+.5)/(1<<15), (luv3[2]+.5)/(1<<15),
|
||||
sp->encode_meth);
|
||||
@@ -1155,10 +1161,10 @@ LogLuv32fromXYZ(float XYZ[3], int em)
|
||||
v = 9.*XYZ[1] / s;
|
||||
}
|
||||
if (u <= 0.) ue = 0;
|
||||
else ue = itrunc(UVSCALE*u, em);
|
||||
else ue = tiff_itrunc(UVSCALE*u, em);
|
||||
if (ue > 255) ue = 255;
|
||||
if (v <= 0.) ve = 0;
|
||||
else ve = itrunc(UVSCALE*v, em);
|
||||
else ve = tiff_itrunc(UVSCALE*v, em);
|
||||
if (ve > 255) ve = 255;
|
||||
/* combine encodings */
|
||||
return (Le << 16 | ue << 8 | ve);
|
||||
@@ -1238,8 +1244,8 @@ Luv32fromLuv48(LogLuvState* sp, uint8* op, tmsize_t n)
|
||||
}
|
||||
while (n-- > 0) {
|
||||
*luv++ = (uint32)luv3[0] << 16 |
|
||||
(itrunc(luv3[1]*(UVSCALE/(1<<15)), sp->encode_meth) << 8 & 0xff00) |
|
||||
(itrunc(luv3[2]*(UVSCALE/(1<<15)), sp->encode_meth) & 0xff);
|
||||
(tiff_itrunc(luv3[1]*(UVSCALE/(1<<15)), sp->encode_meth) << 8 & 0xff00) |
|
||||
(tiff_itrunc(luv3[2]*(UVSCALE/(1<<15)), sp->encode_meth) & 0xff);
|
||||
luv3 += 3;
|
||||
}
|
||||
}
|
||||
@@ -1269,16 +1275,10 @@ LogL16GuessDataFmt(TIFFDirectory *td)
|
||||
return (SGILOGDATAFMT_UNKNOWN);
|
||||
}
|
||||
|
||||
|
||||
#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0))
|
||||
#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1)
|
||||
|
||||
static tmsize_t
|
||||
multiply_ms(tmsize_t m1, tmsize_t m2)
|
||||
{
|
||||
if( m1 == 0 || m2 > TIFF_TMSIZE_T_MAX / m1 )
|
||||
return 0;
|
||||
return m1 * m2;
|
||||
return _TIFFMultiplySSize(NULL, m1, m2, NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1512,7 +1512,7 @@ LogLuvSetupEncode(TIFF* tif)
|
||||
switch (td->td_photometric) {
|
||||
case PHOTOMETRIC_LOGLUV:
|
||||
if (!LogLuvInitState(tif))
|
||||
break;
|
||||
return (0);
|
||||
if (td->td_compression == COMPRESSION_SGILOG24) {
|
||||
tif->tif_encoderow = LogLuvEncode24;
|
||||
switch (sp->user_datafmt) {
|
||||
@@ -1545,7 +1545,7 @@ LogLuvSetupEncode(TIFF* tif)
|
||||
break;
|
||||
case PHOTOMETRIC_LOGL:
|
||||
if (!LogL16InitState(tif))
|
||||
break;
|
||||
return (0);
|
||||
tif->tif_encoderow = LogL16Encode;
|
||||
switch (sp->user_datafmt) {
|
||||
case SGILOGDATAFMT_FLOAT:
|
||||
@@ -1561,7 +1561,7 @@ LogLuvSetupEncode(TIFF* tif)
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Inappropriate photometric interpretation %d for SGILog compression; %s",
|
||||
td->td_photometric, "must be either LogLUV or LogL");
|
||||
break;
|
||||
return (0);
|
||||
}
|
||||
sp->encoder_state = 1;
|
||||
return (1);
|
||||
|
||||
Vendored
+5
-2
@@ -300,7 +300,8 @@ LZMAEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
}
|
||||
if (sp->stream.avail_out == 0) {
|
||||
tif->tif_rawcc = tif->tif_rawdatasize;
|
||||
TIFFFlushData1(tif);
|
||||
if (!TIFFFlushData1(tif))
|
||||
return 0;
|
||||
sp->stream.next_out = tif->tif_rawdata;
|
||||
sp->stream.avail_out = (size_t)tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in LZMAPreEncode */
|
||||
}
|
||||
@@ -328,7 +329,8 @@ LZMAPostEncode(TIFF* tif)
|
||||
if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) {
|
||||
tif->tif_rawcc =
|
||||
tif->tif_rawdatasize - sp->stream.avail_out;
|
||||
TIFFFlushData1(tif);
|
||||
if (!TIFFFlushData1(tif))
|
||||
return 0;
|
||||
sp->stream.next_out = tif->tif_rawdata;
|
||||
sp->stream.avail_out = (size_t)tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in ZIPPreEncode */
|
||||
}
|
||||
@@ -418,6 +420,7 @@ TIFFInitLZMA(TIFF* tif, int scheme)
|
||||
LZMAState* sp;
|
||||
lzma_stream tmp_stream = LZMA_STREAM_INIT;
|
||||
|
||||
(void)scheme;
|
||||
assert( scheme == COMPRESSION_LZMA );
|
||||
|
||||
/*
|
||||
|
||||
Vendored
+5
-7
@@ -214,19 +214,16 @@ LZWSetupDecode(TIFF* tif)
|
||||
return (0);
|
||||
}
|
||||
|
||||
DecoderState(tif)->dec_codetab = NULL;
|
||||
DecoderState(tif)->dec_decode = NULL;
|
||||
sp = DecoderState(tif);
|
||||
sp->dec_codetab = NULL;
|
||||
sp->dec_decode = NULL;
|
||||
|
||||
/*
|
||||
* Setup predictor setup.
|
||||
*/
|
||||
(void) TIFFPredictorInit(tif);
|
||||
|
||||
sp = DecoderState(tif);
|
||||
}
|
||||
|
||||
assert(sp != NULL);
|
||||
|
||||
if (sp->dec_codetab == NULL) {
|
||||
sp->dec_codetab = (code_t*)_TIFFmalloc(CSIZE*sizeof (code_t));
|
||||
if (sp->dec_codetab == NULL) {
|
||||
@@ -1161,6 +1158,7 @@ int
|
||||
TIFFInitLZW(TIFF* tif, int scheme)
|
||||
{
|
||||
static const char module[] = "TIFFInitLZW";
|
||||
(void)scheme;
|
||||
assert(scheme == COMPRESSION_LZW);
|
||||
/*
|
||||
* Allocate state block so tag methods have storage to record values.
|
||||
@@ -1218,7 +1216,7 @@ bad:
|
||||
* from this software without specific prior written permission.
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
#endif /* LZW_SUPPORT */
|
||||
|
||||
|
||||
Vendored
+69
-25
@@ -74,7 +74,7 @@
|
||||
or errors, up to the point where either these values are read, or it's clear they
|
||||
aren't there. This means that some of the data is read twice, but we feel speed
|
||||
in correcting these values is important enough to warrant this sacrifice. Although
|
||||
there is currently no define or other configuration mechanism to disable this behaviour,
|
||||
there is currently no define or other configuration mechanism to disable this behavior,
|
||||
the actual header scanning is build to robustly respond with error report if it
|
||||
should encounter an uncorrected mismatch of subsampling values. See
|
||||
OJPEGReadHeaderInfoSecStreamSof.
|
||||
@@ -243,6 +243,7 @@ typedef enum {
|
||||
typedef struct {
|
||||
TIFF* tif;
|
||||
int decoder_ok;
|
||||
int error_in_raw_data_decoding;
|
||||
#ifndef LIBJPEG_ENCAP_EXTERNAL
|
||||
JMP_BUF exit_jmpbuf;
|
||||
#endif
|
||||
@@ -420,6 +421,7 @@ TIFFInitOJPEG(TIFF* tif, int scheme)
|
||||
static const char module[]="TIFFInitOJPEG";
|
||||
OJPEGState* sp;
|
||||
|
||||
(void)scheme;
|
||||
assert(scheme==COMPRESSION_OJPEG);
|
||||
|
||||
/*
|
||||
@@ -497,15 +499,15 @@ OJPEGVGetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
break;
|
||||
case TIFFTAG_JPEGQTABLES:
|
||||
*va_arg(ap,uint32*)=(uint32)sp->qtable_offset_count;
|
||||
*va_arg(ap,void**)=(void*)sp->qtable_offset;
|
||||
*va_arg(ap,const void**)=(const void*)sp->qtable_offset;
|
||||
break;
|
||||
case TIFFTAG_JPEGDCTABLES:
|
||||
*va_arg(ap,uint32*)=(uint32)sp->dctable_offset_count;
|
||||
*va_arg(ap,void**)=(void*)sp->dctable_offset;
|
||||
*va_arg(ap,const void**)=(const void*)sp->dctable_offset;
|
||||
break;
|
||||
case TIFFTAG_JPEGACTABLES:
|
||||
*va_arg(ap,uint32*)=(uint32)sp->actable_offset_count;
|
||||
*va_arg(ap,void**)=(void*)sp->actable_offset;
|
||||
*va_arg(ap,const void**)=(const void*)sp->actable_offset;
|
||||
break;
|
||||
case TIFFTAG_JPEGPROC:
|
||||
*va_arg(ap,uint16*)=(uint16)sp->jpeg_proc;
|
||||
@@ -657,7 +659,7 @@ static int
|
||||
OJPEGSetupDecode(TIFF* tif)
|
||||
{
|
||||
static const char module[]="OJPEGSetupDecode";
|
||||
TIFFWarningExt(tif->tif_clientdata,module,"Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software");
|
||||
TIFFWarningExt(tif->tif_clientdata,module,"Deprecated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software");
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -678,7 +680,7 @@ OJPEGPreDecode(TIFF* tif, uint16 s)
|
||||
if (OJPEGReadSecondarySos(tif,s)==0)
|
||||
return(0);
|
||||
}
|
||||
if isTiled(tif)
|
||||
if (isTiled(tif))
|
||||
m=tif->tif_curtile;
|
||||
else
|
||||
m=tif->tif_curstrip;
|
||||
@@ -742,6 +744,7 @@ OJPEGPreDecodeSkipRaw(TIFF* tif)
|
||||
}
|
||||
m-=sp->subsampling_convert_clines-sp->subsampling_convert_state;
|
||||
sp->subsampling_convert_state=0;
|
||||
sp->error_in_raw_data_decoding=0;
|
||||
}
|
||||
while (m>=sp->subsampling_convert_clines)
|
||||
{
|
||||
@@ -792,6 +795,10 @@ OJPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Cannot decode: decoder not correctly initialized");
|
||||
return 0;
|
||||
}
|
||||
if( sp->error_in_raw_data_decoding )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (sp->libjpeg_jpeg_query_style==0)
|
||||
{
|
||||
if (OJPEGDecodeRaw(tif,buf,cc)==0)
|
||||
@@ -832,7 +839,10 @@ OJPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc)
|
||||
if (sp->subsampling_convert_state==0)
|
||||
{
|
||||
if (jpeg_read_raw_data_encap(sp,&(sp->libjpeg_jpeg_decompress_struct),sp->subsampling_convert_ycbcrimage,sp->subsampling_ver*8)==0)
|
||||
{
|
||||
sp->error_in_raw_data_decoding = 1;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
oy=sp->subsampling_convert_ybuf+sp->subsampling_convert_state*sp->subsampling_ver*sp->subsampling_convert_ylinelen;
|
||||
ocb=sp->subsampling_convert_cbbuf+sp->subsampling_convert_state*sp->subsampling_convert_clinelen;
|
||||
@@ -990,7 +1000,6 @@ OJPEGSubsamplingCorrect(TIFF* tif)
|
||||
OJPEGState* sp=(OJPEGState*)tif->tif_data;
|
||||
uint8 mh;
|
||||
uint8 mv;
|
||||
_TIFFFillStriles( tif );
|
||||
|
||||
assert(sp->subsamplingcorrect_done==0);
|
||||
if ((tif->tif_dir.td_samplesperpixel!=3) || ((tif->tif_dir.td_photometric!=PHOTOMETRIC_YCBCR) &&
|
||||
@@ -1046,7 +1055,7 @@ OJPEGReadHeaderInfo(TIFF* tif)
|
||||
assert(sp->readheader_done==0);
|
||||
sp->image_width=tif->tif_dir.td_imagewidth;
|
||||
sp->image_length=tif->tif_dir.td_imagelength;
|
||||
if isTiled(tif)
|
||||
if (isTiled(tif))
|
||||
{
|
||||
sp->strile_width=tif->tif_dir.td_tilewidth;
|
||||
sp->strile_length=tif->tif_dir.td_tilelength;
|
||||
@@ -1056,6 +1065,8 @@ OJPEGReadHeaderInfo(TIFF* tif)
|
||||
{
|
||||
sp->strile_width=sp->image_width;
|
||||
sp->strile_length=tif->tif_dir.td_rowsperstrip;
|
||||
if( sp->strile_length == (uint32)-1 )
|
||||
sp->strile_length = sp->image_length;
|
||||
sp->strile_length_total=sp->image_length;
|
||||
}
|
||||
if (tif->tif_dir.td_samplesperpixel==1)
|
||||
@@ -1082,6 +1093,12 @@ OJPEGReadHeaderInfo(TIFF* tif)
|
||||
}
|
||||
if (sp->strile_length<sp->image_length)
|
||||
{
|
||||
if (((sp->subsampling_hor!=1) && (sp->subsampling_hor!=2) && (sp->subsampling_hor!=4)) ||
|
||||
((sp->subsampling_ver!=1) && (sp->subsampling_ver!=2) && (sp->subsampling_ver!=4)))
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Invalid subsampling values");
|
||||
return(0);
|
||||
}
|
||||
if (sp->strile_length%(sp->subsampling_ver*8)!=0)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Incompatible vertical subsampling and image strip/tile length");
|
||||
@@ -1197,7 +1214,13 @@ OJPEGWriteHeaderInfo(TIFF* tif)
|
||||
sp->subsampling_convert_ybuflen=sp->subsampling_convert_ylinelen*sp->subsampling_convert_ylines;
|
||||
sp->subsampling_convert_cbuflen=sp->subsampling_convert_clinelen*sp->subsampling_convert_clines;
|
||||
sp->subsampling_convert_ycbcrbuflen=sp->subsampling_convert_ybuflen+2*sp->subsampling_convert_cbuflen;
|
||||
sp->subsampling_convert_ycbcrbuf=_TIFFmalloc(sp->subsampling_convert_ycbcrbuflen);
|
||||
/* The calloc is not normally necessary, except in some edge/broken cases */
|
||||
/* for example for a tiled image of height 1 with a tile height of 1 and subsampling_hor=subsampling_ver=2 */
|
||||
/* In that case, libjpeg will only fill the 8 first lines of the 16 lines */
|
||||
/* See https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16844 */
|
||||
/* Even if this case is allowed (?), its handling is broken because OJPEGPreDecode() should also likely */
|
||||
/* reset subsampling_convert_state to 0 when changing tile. */
|
||||
sp->subsampling_convert_ycbcrbuf=_TIFFcalloc(1, sp->subsampling_convert_ycbcrbuflen);
|
||||
if (sp->subsampling_convert_ycbcrbuf==0)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Out of memory");
|
||||
@@ -1223,10 +1246,11 @@ OJPEGWriteHeaderInfo(TIFF* tif)
|
||||
*m++=sp->subsampling_convert_cbbuf+n*sp->subsampling_convert_clinelen;
|
||||
for (n=0; n<sp->subsampling_convert_clines; n++)
|
||||
*m++=sp->subsampling_convert_crbuf+n*sp->subsampling_convert_clinelen;
|
||||
sp->subsampling_convert_clinelenout=((sp->strile_width+sp->subsampling_hor-1)/sp->subsampling_hor);
|
||||
sp->subsampling_convert_clinelenout=sp->strile_width/sp->subsampling_hor + ((sp->strile_width % sp->subsampling_hor) != 0 ? 1 : 0);
|
||||
sp->subsampling_convert_state=0;
|
||||
sp->error_in_raw_data_decoding=0;
|
||||
sp->bytes_per_line=sp->subsampling_convert_clinelenout*(sp->subsampling_ver*sp->subsampling_hor+2);
|
||||
sp->lines_per_strile=((sp->strile_length+sp->subsampling_ver-1)/sp->subsampling_ver);
|
||||
sp->lines_per_strile=sp->strile_length/sp->subsampling_ver + ((sp->strile_length % sp->subsampling_ver) != 0 ? 1 : 0);
|
||||
sp->subsampling_convert_log=1;
|
||||
}
|
||||
}
|
||||
@@ -1240,6 +1264,26 @@ OJPEGWriteHeaderInfo(TIFF* tif)
|
||||
}
|
||||
if (jpeg_start_decompress_encap(sp,&(sp->libjpeg_jpeg_decompress_struct))==0)
|
||||
return(0);
|
||||
if(sp->libjpeg_jpeg_decompress_struct.image_width != sp->strile_width ) {
|
||||
TIFFErrorExt(tif->tif_clientdata,module,
|
||||
"jpeg_start_decompress() returned image_width = %d, "
|
||||
"expected %d",
|
||||
sp->libjpeg_jpeg_decompress_struct.image_width,
|
||||
sp->strile_width);
|
||||
return 0;
|
||||
}
|
||||
if(sp->libjpeg_jpeg_decompress_struct.max_h_samp_factor != sp->subsampling_hor ||
|
||||
sp->libjpeg_jpeg_decompress_struct.max_v_samp_factor != sp->subsampling_ver) {
|
||||
TIFFErrorExt(tif->tif_clientdata,module,
|
||||
"jpeg_start_decompress() returned max_h_samp_factor = %d "
|
||||
"and max_v_samp_factor = %d, expected %d and %d",
|
||||
sp->libjpeg_jpeg_decompress_struct.max_h_samp_factor,
|
||||
sp->libjpeg_jpeg_decompress_struct.max_v_samp_factor,
|
||||
sp->subsampling_hor,
|
||||
sp->subsampling_ver);
|
||||
return 0;
|
||||
}
|
||||
|
||||
sp->writeheader_done=1;
|
||||
return(1);
|
||||
}
|
||||
@@ -1272,7 +1316,9 @@ OJPEGReadHeaderInfoSec(TIFF* tif)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((sp->jpeg_interchange_format_length==0) || (sp->jpeg_interchange_format+sp->jpeg_interchange_format_length>sp->file_size))
|
||||
if ((sp->jpeg_interchange_format_length==0) ||
|
||||
(sp->jpeg_interchange_format > TIFF_UINT64_MAX - sp->jpeg_interchange_format_length) ||
|
||||
(sp->jpeg_interchange_format+sp->jpeg_interchange_format_length>sp->file_size))
|
||||
sp->jpeg_interchange_format_length=sp->file_size-sp->jpeg_interchange_format;
|
||||
}
|
||||
}
|
||||
@@ -1989,32 +2035,30 @@ OJPEGReadBufferFill(OJPEGState* sp)
|
||||
sp->in_buffer_source=osibsStrile;
|
||||
break;
|
||||
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)
|
||||
sp->in_buffer_source=osibsEof;
|
||||
else
|
||||
{
|
||||
sp->in_buffer_file_pos=sp->tif->tif_dir.td_stripoffset[sp->in_buffer_next_strile];
|
||||
int err = 0;
|
||||
sp->in_buffer_file_pos=TIFFGetStrileOffsetWithErr(sp->tif, sp->in_buffer_next_strile, &err);
|
||||
if( err )
|
||||
return 0;
|
||||
if (sp->in_buffer_file_pos!=0)
|
||||
{
|
||||
uint64 bytecount = TIFFGetStrileByteCountWithErr(sp->tif, sp->in_buffer_next_strile, &err);
|
||||
if( err )
|
||||
return 0;
|
||||
if (sp->in_buffer_file_pos>=sp->file_size)
|
||||
sp->in_buffer_file_pos=0;
|
||||
else if (sp->tif->tif_dir.td_stripbytecount==NULL)
|
||||
else if (bytecount==0)
|
||||
sp->in_buffer_file_togo=sp->file_size-sp->in_buffer_file_pos;
|
||||
else
|
||||
{
|
||||
if (sp->tif->tif_dir.td_stripbytecount == 0) {
|
||||
TIFFErrorExt(sp->tif->tif_clientdata,sp->tif->tif_name,"Strip byte counts are missing");
|
||||
return(0);
|
||||
}
|
||||
sp->in_buffer_file_togo=sp->tif->tif_dir.td_stripbytecount[sp->in_buffer_next_strile];
|
||||
sp->in_buffer_file_togo=bytecount;
|
||||
if (sp->in_buffer_file_togo==0)
|
||||
sp->in_buffer_file_pos=0;
|
||||
else if (sp->in_buffer_file_pos+sp->in_buffer_file_togo>sp->file_size)
|
||||
else if (sp->in_buffer_file_pos > TIFF_UINT64_MAX - sp->in_buffer_file_togo ||
|
||||
sp->in_buffer_file_pos+sp->in_buffer_file_togo>sp->file_size)
|
||||
sp->in_buffer_file_togo=sp->file_size-sp->in_buffer_file_pos;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+21
-2
@@ -104,6 +104,7 @@ TIFFClientOpen(
|
||||
} n;
|
||||
n.a8[0]=1;
|
||||
n.a8[1]=0;
|
||||
(void)n;
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
assert(n.a16==256);
|
||||
#else
|
||||
@@ -131,6 +132,7 @@ TIFFClientOpen(
|
||||
if (!readproc || !writeproc || !seekproc || !closeproc || !sizeproc) {
|
||||
TIFFErrorExt(clientdata, module,
|
||||
"One of the client procedures is NULL pointer.");
|
||||
_TIFFfree(tif);
|
||||
goto bad2;
|
||||
}
|
||||
tif->tif_readproc = readproc;
|
||||
@@ -164,7 +166,7 @@ TIFFClientOpen(
|
||||
/*
|
||||
* Process library-specific flags in the open mode string.
|
||||
* The following flags may be used to control intrinsic library
|
||||
* behaviour that may or may not be desirable (usually for
|
||||
* behavior that may or may not be desirable (usually for
|
||||
* compatibility with some application that claims to support
|
||||
* TIFF but only supports some brain dead idea of what the
|
||||
* vendor thinks TIFF is):
|
||||
@@ -181,6 +183,8 @@ TIFFClientOpen(
|
||||
* 'h' read TIFF header only, do not load the first IFD
|
||||
* '4' ClassicTIFF for creating a file (default)
|
||||
* '8' BigTIFF for creating a file
|
||||
* 'D' enable use of deferred strip/tile offset/bytecount array loading.
|
||||
* 'O' on-demand loading of values instead of whole array loading (implies D)
|
||||
*
|
||||
* The use of the 'l' and 'b' flags is strongly discouraged.
|
||||
* These flags are provided solely because numerous vendors,
|
||||
@@ -203,7 +207,7 @@ TIFFClientOpen(
|
||||
* not do right now.
|
||||
*
|
||||
* The 'M' and 'm' flags are provided because some virtual memory
|
||||
* systems exhibit poor behaviour when large images are mapped.
|
||||
* systems exhibit poor behavior when large images are mapped.
|
||||
* These options permit clients to control the use of memory-mapped
|
||||
* files on a per-file basis.
|
||||
*
|
||||
@@ -262,7 +266,22 @@ TIFFClientOpen(
|
||||
if (m&O_CREAT)
|
||||
tif->tif_flags |= TIFF_BIGTIFF;
|
||||
break;
|
||||
case 'D':
|
||||
tif->tif_flags |= TIFF_DEFERSTRILELOAD;
|
||||
break;
|
||||
case 'O':
|
||||
if( m == O_RDONLY )
|
||||
tif->tif_flags |= (TIFF_LAZYSTRILELOAD | TIFF_DEFERSTRILELOAD);
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef DEFER_STRILE_LOAD
|
||||
/* Compatibility with old DEFER_STRILE_LOAD compilation flag */
|
||||
/* Probably unneeded, since to the best of my knowledge (E. Rouault) */
|
||||
/* GDAL was the only user of this, and will now use the new 'D' flag */
|
||||
tif->tif_flags |= TIFF_DEFERSTRILELOAD;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Read in TIFF header.
|
||||
*/
|
||||
|
||||
Vendored
+7
-10
@@ -634,16 +634,10 @@ PixarLogGuessDataFmt(TIFFDirectory *td)
|
||||
return guess;
|
||||
}
|
||||
|
||||
#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0))
|
||||
#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1)
|
||||
|
||||
static tmsize_t
|
||||
multiply_ms(tmsize_t m1, tmsize_t m2)
|
||||
{
|
||||
assert(m1 >= 0 && m2 >= 0);
|
||||
if( m1 == 0 || m2 > TIFF_TMSIZE_T_MAX / m1 )
|
||||
return 0;
|
||||
return m1 * m2;
|
||||
return _TIFFMultiplySSize(NULL, m1, m2, NULL);
|
||||
}
|
||||
|
||||
static tmsize_t
|
||||
@@ -1153,7 +1147,7 @@ PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
|
||||
llen = sp->stride * td->td_imagewidth;
|
||||
/* Check against the number of elements (of size uint16) of sp->tbuf */
|
||||
if( n > (tmsize_t)(td->td_rowsperstrip * llen) )
|
||||
if( n > ((tmsize_t)td->td_rowsperstrip * llen) )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Too many input bytes provided");
|
||||
@@ -1206,7 +1200,8 @@ PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
}
|
||||
if (sp->stream.avail_out == 0) {
|
||||
tif->tif_rawcc = tif->tif_rawdatasize;
|
||||
TIFFFlushData1(tif);
|
||||
if (!TIFFFlushData1(tif))
|
||||
return 0;
|
||||
sp->stream.next_out = tif->tif_rawdata;
|
||||
sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in PixarLogPreEncode */
|
||||
}
|
||||
@@ -1236,7 +1231,8 @@ PixarLogPostEncode(TIFF* tif)
|
||||
if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) {
|
||||
tif->tif_rawcc =
|
||||
tif->tif_rawdatasize - sp->stream.avail_out;
|
||||
TIFFFlushData1(tif);
|
||||
if (!TIFFFlushData1(tif))
|
||||
return 0;
|
||||
sp->stream.next_out = tif->tif_rawdata;
|
||||
sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made already in PixarLogPreEncode */
|
||||
}
|
||||
@@ -1404,6 +1400,7 @@ TIFFInitPixarLog(TIFF* tif, int scheme)
|
||||
|
||||
PixarLogState* sp;
|
||||
|
||||
(void)scheme;
|
||||
assert(scheme == COMPRESSION_PIXARLOG);
|
||||
|
||||
/*
|
||||
|
||||
Vendored
+3
-3
@@ -116,7 +116,7 @@ PredictorSetupDecode(TIFF* tif)
|
||||
TIFFDirectory* td = &tif->tif_dir;
|
||||
|
||||
/* Note: when PredictorSetup() fails, the effets of setupdecode() */
|
||||
/* will not be "cancelled" so setupdecode() might be robust to */
|
||||
/* will not be "canceled" so setupdecode() might be robust to */
|
||||
/* be called several times. */
|
||||
if (!(*sp->setupdecode)(tif) || !PredictorSetup(tif))
|
||||
return 0;
|
||||
@@ -270,8 +270,8 @@ PredictorSetupEncode(TIFF* tif)
|
||||
}
|
||||
|
||||
/* Remarks related to C standard compliance in all below functions : */
|
||||
/* - to avoid any undefined behaviour, we only operate on unsigned types */
|
||||
/* since the behaviour of "overflows" is defined (wrap over) */
|
||||
/* - to avoid any undefined behavior, we only operate on unsigned types */
|
||||
/* since the behavior of "overflows" is defined (wrap over) */
|
||||
/* - when storing into the byte stream, we explicitly mask with 0xff so */
|
||||
/* as to make icc -check=conversions happy (not necessary by the standard) */
|
||||
|
||||
|
||||
Vendored
+4
-6
@@ -652,8 +652,6 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
||||
if (tif->tif_tagmethods.printdir)
|
||||
(*tif->tif_tagmethods.printdir)(tif, fd, flags);
|
||||
|
||||
_TIFFFillStriles( tif );
|
||||
|
||||
if ((flags & TIFFPRINT_STRIPS) &&
|
||||
TIFFFieldSet(tif,FIELD_STRIPOFFSETS)) {
|
||||
uint32 s;
|
||||
@@ -665,13 +663,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
||||
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
|
||||
fprintf(fd, " %3lu: [%8I64u, %8I64u]\n",
|
||||
(unsigned long) s,
|
||||
td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0,
|
||||
td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0);
|
||||
(unsigned __int64) TIFFGetStrileOffset(tif, s),
|
||||
(unsigned __int64) TIFFGetStrileByteCount(tif, s));
|
||||
#else
|
||||
fprintf(fd, " %3lu: [%8llu, %8llu]\n",
|
||||
(unsigned long) s,
|
||||
td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0,
|
||||
td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0);
|
||||
(unsigned long long) TIFFGetStrileOffset(tif, s),
|
||||
(unsigned long long) TIFFGetStrileByteCount(tif, s));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+167
-95
@@ -29,9 +29,6 @@
|
||||
#include "tiffiop.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0))
|
||||
#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1)
|
||||
|
||||
int TIFFFillStrip(TIFF* tif, uint32 strip);
|
||||
int TIFFFillTile(TIFF* tif, uint32 tile);
|
||||
static int TIFFStartStrip(TIFF* tif, uint32 strip);
|
||||
@@ -49,6 +46,8 @@ TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* m
|
||||
#define THRESHOLD_MULTIPLIER 10
|
||||
#define MAX_THRESHOLD (THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * INITIAL_THRESHOLD)
|
||||
|
||||
#define TIFF_INT64_MAX ((((int64)0x7FFFFFFF) << 32) | 0xFFFFFFFF)
|
||||
|
||||
/* Read 'size' bytes in tif_rawdata buffer starting at offset 'rawdata_offset'
|
||||
* Returns 1 in case of success, 0 otherwise. */
|
||||
static int TIFFReadAndRealloc( TIFF* tif, tmsize_t size,
|
||||
@@ -61,6 +60,22 @@ static int TIFFReadAndRealloc( TIFF* tif, tmsize_t size,
|
||||
#endif
|
||||
tmsize_t already_read = 0;
|
||||
|
||||
|
||||
#if SIZEOF_SIZE_T != 8
|
||||
/* On 32 bit processes, if the request is large enough, check against */
|
||||
/* file size */
|
||||
if( size > 1000 * 1000 * 1000 )
|
||||
{
|
||||
uint64 filesize = TIFFGetFileSize(tif);
|
||||
if( (uint64)size >= filesize )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Chunk size requested is larger than file size.");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* On 64 bit processes, read first a maximum of 1 MB, then 10 MB, etc */
|
||||
/* so as to avoid allocating too much memory in case the file is too */
|
||||
/* short. We could ask for the file size, but this might be */
|
||||
@@ -175,17 +190,14 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
|
||||
tmsize_t to_read;
|
||||
tmsize_t read_ahead_mod;
|
||||
/* tmsize_t bytecountm; */
|
||||
|
||||
if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
|
||||
return 0;
|
||||
|
||||
|
||||
/*
|
||||
* Expand raw data buffer, if needed, to hold data
|
||||
* strip coming from file (perhaps should set upper
|
||||
* bound on the size of a buffer we'll use?).
|
||||
*/
|
||||
|
||||
/* bytecountm=(tmsize_t) td->td_stripbytecount[strip]; */
|
||||
/* bytecountm=(tmsize_t) TIFFGetStrileByteCount(tif, strip); */
|
||||
|
||||
/* Not completely sure where the * 2 comes from, but probably for */
|
||||
/* an exponentional growth strategy of tif_rawdatasize */
|
||||
@@ -229,7 +241,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
|
||||
/*
|
||||
** Seek to the point in the file where more data should be read.
|
||||
*/
|
||||
read_offset = td->td_stripoffset[strip]
|
||||
read_offset = TIFFGetStrileOffset(tif, strip)
|
||||
+ tif->tif_rawdataoff + tif->tif_rawdataloaded;
|
||||
|
||||
if (!SeekOK(tif, read_offset)) {
|
||||
@@ -246,10 +258,10 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
|
||||
to_read = read_ahead_mod - unused_data;
|
||||
else
|
||||
to_read = tif->tif_rawdatasize - unused_data;
|
||||
if( (uint64) to_read > td->td_stripbytecount[strip]
|
||||
if( (uint64) to_read > TIFFGetStrileByteCount(tif, strip)
|
||||
- tif->tif_rawdataoff - tif->tif_rawdataloaded )
|
||||
{
|
||||
to_read = (tmsize_t) td->td_stripbytecount[strip]
|
||||
to_read = (tmsize_t) TIFFGetStrileByteCount(tif, strip)
|
||||
- tif->tif_rawdataoff - tif->tif_rawdataloaded;
|
||||
}
|
||||
|
||||
@@ -288,7 +300,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
|
||||
/* For JPEG, if there are multiple scans (can generally be known */
|
||||
/* with the read_ahead used), we need to read the whole strip */
|
||||
if( tif->tif_dir.td_compression==COMPRESSION_JPEG &&
|
||||
(uint64)tif->tif_rawcc < td->td_stripbytecount[strip] )
|
||||
(uint64)tif->tif_rawcc < TIFFGetStrileByteCount(tif, strip) )
|
||||
{
|
||||
if( TIFFJPEGIsFullStripRequired(tif) )
|
||||
{
|
||||
@@ -347,9 +359,7 @@ TIFFSeek(TIFF* tif, uint32 row, uint16 sample )
|
||||
* read it a few lines at a time?
|
||||
*/
|
||||
#if defined(CHUNKY_STRIP_READ_SUPPORT)
|
||||
if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
|
||||
return 0;
|
||||
whole_strip = tif->tif_dir.td_stripbytecount[strip] < 10
|
||||
whole_strip = TIFFGetStrileByteCount(tif, strip) < 10
|
||||
|| isMapped(tif);
|
||||
if( td->td_compression == COMPRESSION_LERC ||
|
||||
td->td_compression == COMPRESSION_JBIG )
|
||||
@@ -402,7 +412,7 @@ TIFFSeek(TIFF* tif, uint32 row, uint16 sample )
|
||||
else if( !whole_strip )
|
||||
{
|
||||
if( ((tif->tif_rawdata + tif->tif_rawdataloaded) - tif->tif_rawcp) < read_ahead
|
||||
&& (uint64) tif->tif_rawdataoff+tif->tif_rawdataloaded < td->td_stripbytecount[strip] )
|
||||
&& (uint64) tif->tif_rawdataoff+tif->tif_rawdataloaded < TIFFGetStrileByteCount(tif, strip) )
|
||||
{
|
||||
if( !TIFFFillStripPartial(tif,strip,read_ahead,0) )
|
||||
return 0;
|
||||
@@ -599,16 +609,11 @@ static tmsize_t
|
||||
TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size,
|
||||
const char* module)
|
||||
{
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
|
||||
if (!_TIFFFillStriles( tif ))
|
||||
return ((tmsize_t)(-1));
|
||||
|
||||
assert((tif->tif_flags&TIFF_NOREADRAW)==0);
|
||||
if (!isMapped(tif)) {
|
||||
tmsize_t cc;
|
||||
|
||||
if (!SeekOK(tif, td->td_stripoffset[strip])) {
|
||||
if (!SeekOK(tif, TIFFGetStrileOffset(tif, strip))) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Seek error at scanline %lu, strip %lu",
|
||||
(unsigned long) tif->tif_row, (unsigned long) strip);
|
||||
@@ -634,8 +639,8 @@ TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size,
|
||||
} else {
|
||||
tmsize_t ma = 0;
|
||||
tmsize_t n;
|
||||
if ((td->td_stripoffset[strip] > (uint64)TIFF_TMSIZE_T_MAX)||
|
||||
((ma=(tmsize_t)td->td_stripoffset[strip])>tif->tif_size))
|
||||
if ((TIFFGetStrileOffset(tif, strip) > (uint64)TIFF_TMSIZE_T_MAX)||
|
||||
((ma=(tmsize_t)TIFFGetStrileOffset(tif, strip))>tif->tif_size))
|
||||
{
|
||||
n=0;
|
||||
}
|
||||
@@ -679,12 +684,10 @@ static tmsize_t
|
||||
TIFFReadRawStripOrTile2(TIFF* tif, uint32 strip_or_tile, int is_strip,
|
||||
tmsize_t size, const char* module)
|
||||
{
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
|
||||
assert( !isMapped(tif) );
|
||||
assert((tif->tif_flags&TIFF_NOREADRAW)==0);
|
||||
|
||||
if (!SeekOK(tif, td->td_stripoffset[strip_or_tile])) {
|
||||
if (!SeekOK(tif, TIFFGetStrileOffset(tif, strip_or_tile))) {
|
||||
if( is_strip )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
@@ -720,7 +723,7 @@ TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size)
|
||||
{
|
||||
static const char module[] = "TIFFReadRawStrip";
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
uint64 bytecount;
|
||||
uint64 bytecount64;
|
||||
tmsize_t bytecountm;
|
||||
|
||||
if (!TIFFCheckRead(tif, 0))
|
||||
@@ -738,31 +741,23 @@ TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size)
|
||||
"Compression scheme does not support access to raw uncompressed data");
|
||||
return ((tmsize_t)(-1));
|
||||
}
|
||||
bytecount = td->td_stripbytecount[strip];
|
||||
if ((int64)bytecount <= 0) {
|
||||
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"%I64u: Invalid strip byte count, strip %lu",
|
||||
(unsigned __int64) bytecount,
|
||||
(unsigned long) strip);
|
||||
#else
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"%llu: Invalid strip byte count, strip %lu",
|
||||
(unsigned long long) bytecount,
|
||||
(unsigned long) strip);
|
||||
#endif
|
||||
return ((tmsize_t)(-1));
|
||||
}
|
||||
bytecountm = (tmsize_t)bytecount;
|
||||
if ((uint64)bytecountm!=bytecount) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "Integer overflow");
|
||||
return ((tmsize_t)(-1));
|
||||
}
|
||||
if (size != (tmsize_t)(-1) && size < bytecountm)
|
||||
bytecount64 = TIFFGetStrileByteCount(tif, strip);
|
||||
if (size != (tmsize_t)(-1) && (uint64)size <= bytecount64)
|
||||
bytecountm = size;
|
||||
else
|
||||
bytecountm = _TIFFCastUInt64ToSSize(tif, bytecount64, module);
|
||||
if( bytecountm == 0 ) {
|
||||
return ((tmsize_t)(-1));
|
||||
}
|
||||
return (TIFFReadRawStrip1(tif, strip, buf, bytecountm, module));
|
||||
}
|
||||
|
||||
TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW
|
||||
static uint64 NoSanitizeSubUInt64(uint64 a, uint64 b)
|
||||
{
|
||||
return a - b;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read the specified strip and setup for decoding. The data buffer is
|
||||
* expanded, as necessary, to hold the strip's data.
|
||||
@@ -773,13 +768,10 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
|
||||
static const char module[] = "TIFFFillStrip";
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
|
||||
if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
|
||||
return 0;
|
||||
|
||||
if ((tif->tif_flags&TIFF_NOREADRAW)==0)
|
||||
{
|
||||
uint64 bytecount = td->td_stripbytecount[strip];
|
||||
if ((int64)bytecount <= 0) {
|
||||
uint64 bytecount = TIFFGetStrileByteCount(tif, strip);
|
||||
if( bytecount == 0 || bytecount > (uint64)TIFF_INT64_MAX ) {
|
||||
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Invalid strip byte count %I64u, strip %lu",
|
||||
@@ -806,7 +798,7 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
|
||||
(bytecount - 4096) / 10 > (uint64)stripsize )
|
||||
{
|
||||
uint64 newbytecount = (uint64)stripsize * 10 + 4096;
|
||||
if( (int64)newbytecount >= 0 )
|
||||
if( newbytecount == 0 || newbytecount > (uint64)TIFF_INT64_MAX )
|
||||
{
|
||||
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
|
||||
TIFFWarningExt(tif->tif_clientdata, module,
|
||||
@@ -831,13 +823,13 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
|
||||
* We must check for overflow, potentially causing
|
||||
* an OOB read. Instead of simple
|
||||
*
|
||||
* td->td_stripoffset[strip]+bytecount > tif->tif_size
|
||||
* TIFFGetStrileOffset(tif, strip)+bytecount > tif->tif_size
|
||||
*
|
||||
* comparison (which can overflow) we do the following
|
||||
* two comparisons:
|
||||
*/
|
||||
if (bytecount > (uint64)tif->tif_size ||
|
||||
td->td_stripoffset[strip] > (uint64)tif->tif_size - bytecount) {
|
||||
TIFFGetStrileOffset(tif, strip) > (uint64)tif->tif_size - bytecount) {
|
||||
/*
|
||||
* This error message might seem strange, but
|
||||
* it's what would happen if a read were done
|
||||
@@ -849,7 +841,7 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
|
||||
"Read error on strip %lu; "
|
||||
"got %I64u bytes, expected %I64u",
|
||||
(unsigned long) strip,
|
||||
(unsigned __int64) tif->tif_size - td->td_stripoffset[strip],
|
||||
(unsigned __int64) NoSanitizeSubUInt64(tif->tif_size, TIFFGetStrileOffset(tif, strip)),
|
||||
(unsigned __int64) bytecount);
|
||||
#else
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
@@ -857,7 +849,7 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
|
||||
"Read error on strip %lu; "
|
||||
"got %llu bytes, expected %llu",
|
||||
(unsigned long) strip,
|
||||
(unsigned long long) tif->tif_size - td->td_stripoffset[strip],
|
||||
(unsigned long long) NoSanitizeSubUInt64(tif->tif_size, TIFFGetStrileOffset(tif, strip)),
|
||||
(unsigned long long) bytecount);
|
||||
#endif
|
||||
tif->tif_curstrip = NOSTRIP;
|
||||
@@ -886,7 +878,7 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
|
||||
}
|
||||
tif->tif_flags &= ~TIFF_MYBUFFER;
|
||||
tif->tif_rawdatasize = (tmsize_t)bytecount;
|
||||
tif->tif_rawdata = tif->tif_base + (tmsize_t)td->td_stripoffset[strip];
|
||||
tif->tif_rawdata = tif->tif_base + (tmsize_t)TIFFGetStrileOffset(tif, strip);
|
||||
tif->tif_rawdataoff = 0;
|
||||
tif->tif_rawdataloaded = (tmsize_t) bytecount;
|
||||
|
||||
@@ -1101,16 +1093,11 @@ _TIFFReadEncodedTileAndAllocBuffer(TIFF* tif, uint32 tile,
|
||||
static tmsize_t
|
||||
TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* module)
|
||||
{
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
|
||||
if (!_TIFFFillStriles( tif ))
|
||||
return ((tmsize_t)(-1));
|
||||
|
||||
assert((tif->tif_flags&TIFF_NOREADRAW)==0);
|
||||
if (!isMapped(tif)) {
|
||||
tmsize_t cc;
|
||||
|
||||
if (!SeekOK(tif, td->td_stripoffset[tile])) {
|
||||
if (!SeekOK(tif, TIFFGetStrileOffset(tif, tile))) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Seek error at row %lu, col %lu, tile %lu",
|
||||
(unsigned long) tif->tif_row,
|
||||
@@ -1140,9 +1127,9 @@ TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* m
|
||||
} else {
|
||||
tmsize_t ma,mb;
|
||||
tmsize_t n;
|
||||
ma=(tmsize_t)td->td_stripoffset[tile];
|
||||
ma=(tmsize_t)TIFFGetStrileOffset(tif, tile);
|
||||
mb=ma+size;
|
||||
if ((td->td_stripoffset[tile] > (uint64)TIFF_TMSIZE_T_MAX)||(ma>tif->tif_size))
|
||||
if ((TIFFGetStrileOffset(tif, tile) > (uint64)TIFF_TMSIZE_T_MAX)||(ma>tif->tif_size))
|
||||
n=0;
|
||||
else if ((mb<ma)||(mb<size)||(mb>tif->tif_size))
|
||||
n=tif->tif_size-ma;
|
||||
@@ -1198,13 +1185,12 @@ TIFFReadRawTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size)
|
||||
"Compression scheme does not support access to raw uncompressed data");
|
||||
return ((tmsize_t)(-1));
|
||||
}
|
||||
bytecount64 = td->td_stripbytecount[tile];
|
||||
if (size != (tmsize_t)(-1) && (uint64)size < bytecount64)
|
||||
bytecount64 = (uint64)size;
|
||||
bytecountm = (tmsize_t)bytecount64;
|
||||
if ((uint64)bytecountm!=bytecount64)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
|
||||
bytecount64 = TIFFGetStrileByteCount(tif, tile);
|
||||
if (size != (tmsize_t)(-1) && (uint64)size <= bytecount64)
|
||||
bytecountm = size;
|
||||
else
|
||||
bytecountm = _TIFFCastUInt64ToSSize(tif, bytecount64, module);
|
||||
if( bytecountm == 0 ) {
|
||||
return ((tmsize_t)(-1));
|
||||
}
|
||||
return (TIFFReadRawTile1(tif, tile, buf, bytecountm, module));
|
||||
@@ -1220,13 +1206,10 @@ TIFFFillTile(TIFF* tif, uint32 tile)
|
||||
static const char module[] = "TIFFFillTile";
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
|
||||
if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
|
||||
return 0;
|
||||
|
||||
if ((tif->tif_flags&TIFF_NOREADRAW)==0)
|
||||
{
|
||||
uint64 bytecount = td->td_stripbytecount[tile];
|
||||
if ((int64)bytecount <= 0) {
|
||||
uint64 bytecount = TIFFGetStrileByteCount(tif, tile);
|
||||
if( bytecount == 0 || bytecount > (uint64)TIFF_INT64_MAX ) {
|
||||
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"%I64u: Invalid tile byte count, tile %lu",
|
||||
@@ -1253,7 +1236,7 @@ TIFFFillTile(TIFF* tif, uint32 tile)
|
||||
(bytecount - 4096) / 10 > (uint64)stripsize )
|
||||
{
|
||||
uint64 newbytecount = (uint64)stripsize * 10 + 4096;
|
||||
if( (int64)newbytecount >= 0 )
|
||||
if( newbytecount == 0 || newbytecount > (uint64)TIFF_INT64_MAX )
|
||||
{
|
||||
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
|
||||
TIFFWarningExt(tif->tif_clientdata, module,
|
||||
@@ -1278,13 +1261,13 @@ TIFFFillTile(TIFF* tif, uint32 tile)
|
||||
* We must check for overflow, potentially causing
|
||||
* an OOB read. Instead of simple
|
||||
*
|
||||
* td->td_stripoffset[tile]+bytecount > tif->tif_size
|
||||
* TIFFGetStrileOffset(tif, tile)+bytecount > tif->tif_size
|
||||
*
|
||||
* comparison (which can overflow) we do the following
|
||||
* two comparisons:
|
||||
*/
|
||||
if (bytecount > (uint64)tif->tif_size ||
|
||||
td->td_stripoffset[tile] > (uint64)tif->tif_size - bytecount) {
|
||||
TIFFGetStrileOffset(tif, tile) > (uint64)tif->tif_size - bytecount) {
|
||||
tif->tif_curtile = NOTILE;
|
||||
return (0);
|
||||
}
|
||||
@@ -1313,7 +1296,7 @@ TIFFFillTile(TIFF* tif, uint32 tile)
|
||||
|
||||
tif->tif_rawdatasize = (tmsize_t)bytecount;
|
||||
tif->tif_rawdata =
|
||||
tif->tif_base + (tmsize_t)td->td_stripoffset[tile];
|
||||
tif->tif_base + (tmsize_t)TIFFGetStrileOffset(tif, tile);
|
||||
tif->tif_rawdataoff = 0;
|
||||
tif->tif_rawdataloaded = (tmsize_t) bytecount;
|
||||
tif->tif_flags |= TIFF_BUFFERMMAP;
|
||||
@@ -1440,9 +1423,6 @@ TIFFStartStrip(TIFF* tif, uint32 strip)
|
||||
{
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
|
||||
if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
|
||||
return 0;
|
||||
|
||||
if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
|
||||
if (!(*tif->tif_setupdecode)(tif))
|
||||
return (0);
|
||||
@@ -1463,10 +1443,18 @@ TIFFStartStrip(TIFF* tif, uint32 strip)
|
||||
if( tif->tif_rawdataloaded > 0 )
|
||||
tif->tif_rawcc = tif->tif_rawdataloaded;
|
||||
else
|
||||
tif->tif_rawcc = (tmsize_t)td->td_stripbytecount[strip];
|
||||
tif->tif_rawcc = (tmsize_t)TIFFGetStrileByteCount(tif, strip);
|
||||
}
|
||||
return ((*tif->tif_predecode)(tif,
|
||||
(uint16)(strip / td->td_stripsperimage)));
|
||||
if ((*tif->tif_predecode)(tif,
|
||||
(uint16)(strip / td->td_stripsperimage)) == 0 ) {
|
||||
/* Needed for example for scanline access, if tif_predecode */
|
||||
/* fails, and we try to read the same strip again. Without invalidating */
|
||||
/* tif_curstrip, we'd call tif_decoderow() on a possibly invalid */
|
||||
/* codec state. */
|
||||
tif->tif_curstrip = NOSTRIP;
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1480,9 +1468,6 @@ TIFFStartTile(TIFF* tif, uint32 tile)
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
uint32 howmany32;
|
||||
|
||||
if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
|
||||
return 0;
|
||||
|
||||
if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
|
||||
if (!(*tif->tif_setupdecode)(tif))
|
||||
return (0);
|
||||
@@ -1513,7 +1498,7 @@ TIFFStartTile(TIFF* tif, uint32 tile)
|
||||
if( tif->tif_rawdataloaded > 0 )
|
||||
tif->tif_rawcc = tif->tif_rawdataloaded;
|
||||
else
|
||||
tif->tif_rawcc = (tmsize_t)td->td_stripbytecount[tile];
|
||||
tif->tif_rawcc = (tmsize_t)TIFFGetStrileByteCount(tif, tile);
|
||||
}
|
||||
return ((*tif->tif_predecode)(tif,
|
||||
(uint16)(tile/td->td_stripsperimage)));
|
||||
@@ -1528,13 +1513,100 @@ TIFFCheckRead(TIFF* tif, int tiles)
|
||||
}
|
||||
if (tiles ^ isTiled(tif)) {
|
||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, tiles ?
|
||||
"Can not read tiles from a stripped image" :
|
||||
"Can not read tiles from a striped image" :
|
||||
"Can not read scanlines from a tiled image");
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
/* Use the provided input buffer (inbuf, insize) and decompress it into
|
||||
* (outbuf, outsize).
|
||||
* This function replaces the use of TIFFReadEncodedStrip()/TIFFReadEncodedTile()
|
||||
* when the user can provide the buffer for the input data, for example when
|
||||
* he wants to avoid libtiff to read the strile offset/count values from the
|
||||
* [Strip|Tile][Offsets/ByteCounts] array.
|
||||
* inbuf content must be writable (if bit reversal is needed)
|
||||
* Returns 1 in case of success, 0 otherwise.
|
||||
*/
|
||||
int TIFFReadFromUserBuffer(TIFF* tif, uint32 strile,
|
||||
void* inbuf, tmsize_t insize,
|
||||
void* outbuf, tmsize_t outsize)
|
||||
{
|
||||
static const char module[] = "TIFFReadFromUserBuffer";
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
int ret = 1;
|
||||
uint32 old_tif_flags = tif->tif_flags;
|
||||
tmsize_t old_rawdatasize = tif->tif_rawdatasize;
|
||||
void* old_rawdata = tif->tif_rawdata;
|
||||
|
||||
if (tif->tif_mode == O_WRONLY) {
|
||||
TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "File not open for reading");
|
||||
return 0;
|
||||
}
|
||||
if (tif->tif_flags&TIFF_NOREADRAW)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Compression scheme does not support access to raw uncompressed data");
|
||||
return 0;
|
||||
}
|
||||
|
||||
tif->tif_flags &= ~TIFF_MYBUFFER;
|
||||
tif->tif_flags |= TIFF_BUFFERMMAP;
|
||||
tif->tif_rawdatasize = insize;
|
||||
tif->tif_rawdata = inbuf;
|
||||
tif->tif_rawdataoff = 0;
|
||||
tif->tif_rawdataloaded = insize;
|
||||
|
||||
if (!isFillOrder(tif, td->td_fillorder) &&
|
||||
(tif->tif_flags & TIFF_NOBITREV) == 0)
|
||||
{
|
||||
TIFFReverseBits(inbuf, insize);
|
||||
}
|
||||
|
||||
if( TIFFIsTiled(tif) )
|
||||
{
|
||||
if( !TIFFStartTile(tif, strile) ||
|
||||
!(*tif->tif_decodetile)(tif, (uint8*) outbuf, outsize,
|
||||
(uint16)(strile/td->td_stripsperimage)) )
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 rowsperstrip=td->td_rowsperstrip;
|
||||
uint32 stripsperplane;
|
||||
if (rowsperstrip>td->td_imagelength)
|
||||
rowsperstrip=td->td_imagelength;
|
||||
stripsperplane= TIFFhowmany_32_maxuint_compat(td->td_imagelength, rowsperstrip);
|
||||
if( !TIFFStartStrip(tif, strile) ||
|
||||
!(*tif->tif_decodestrip)(tif, (uint8*) outbuf, outsize,
|
||||
(uint16)(strile/stripsperplane)) )
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
if( ret )
|
||||
{
|
||||
(*tif->tif_postdecode)(tif, (uint8*) outbuf, outsize);
|
||||
}
|
||||
|
||||
if (!isFillOrder(tif, td->td_fillorder) &&
|
||||
(tif->tif_flags & TIFF_NOBITREV) == 0)
|
||||
{
|
||||
TIFFReverseBits(inbuf, insize);
|
||||
}
|
||||
|
||||
tif->tif_flags = old_tif_flags;
|
||||
tif->tif_rawdatasize = old_rawdatasize;
|
||||
tif->tif_rawdata = old_rawdata;
|
||||
tif->tif_rawdataoff = 0;
|
||||
tif->tif_rawdataloaded = 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
_TIFFNoPostDecode(TIFF* tif, uint8* buf, tmsize_t cc)
|
||||
{
|
||||
|
||||
Vendored
+5
-33
@@ -129,15 +129,8 @@ TIFFVStripSize(TIFF* tif, uint32 nrows)
|
||||
{
|
||||
static const char module[] = "TIFFVStripSize";
|
||||
uint64 m;
|
||||
tmsize_t n;
|
||||
m=TIFFVStripSize64(tif,nrows);
|
||||
n=(tmsize_t)m;
|
||||
if ((uint64)n!=m)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
|
||||
n=0;
|
||||
}
|
||||
return(n);
|
||||
return _TIFFCastUInt64ToSSize(tif, m, module);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -147,8 +140,7 @@ uint64
|
||||
TIFFRawStripSize64(TIFF* tif, uint32 strip)
|
||||
{
|
||||
static const char module[] = "TIFFRawStripSize64";
|
||||
TIFFDirectory* td = &tif->tif_dir;
|
||||
uint64 bytecount = td->td_stripbytecount[strip];
|
||||
uint64 bytecount = TIFFGetStrileByteCount(tif, strip);
|
||||
|
||||
if (bytecount == 0)
|
||||
{
|
||||
@@ -211,15 +203,8 @@ TIFFStripSize(TIFF* tif)
|
||||
{
|
||||
static const char module[] = "TIFFStripSize";
|
||||
uint64 m;
|
||||
tmsize_t n;
|
||||
m=TIFFStripSize64(tif);
|
||||
n=(tmsize_t)m;
|
||||
if ((uint64)n!=m)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
|
||||
n=0;
|
||||
}
|
||||
return(n);
|
||||
return _TIFFCastUInt64ToSSize(tif, m, module);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -330,14 +315,8 @@ TIFFScanlineSize(TIFF* tif)
|
||||
{
|
||||
static const char module[] = "TIFFScanlineSize";
|
||||
uint64 m;
|
||||
tmsize_t n;
|
||||
m=TIFFScanlineSize64(tif);
|
||||
n=(tmsize_t)m;
|
||||
if ((uint64)n!=m) {
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Integer arithmetic overflow");
|
||||
n=0;
|
||||
}
|
||||
return(n);
|
||||
return _TIFFCastUInt64ToSSize(tif, m, module);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -366,15 +345,8 @@ TIFFRasterScanlineSize(TIFF* tif)
|
||||
{
|
||||
static const char module[] = "TIFFRasterScanlineSize";
|
||||
uint64 m;
|
||||
tmsize_t n;
|
||||
m=TIFFRasterScanlineSize64(tif);
|
||||
n=(tmsize_t)m;
|
||||
if ((uint64)n!=m)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Integer arithmetic overflow");
|
||||
n=0;
|
||||
}
|
||||
return(n);
|
||||
return _TIFFCastUInt64ToSSize(tif, m, module);
|
||||
}
|
||||
|
||||
/* vim: set ts=8 sts=8 sw=8 noet: */
|
||||
|
||||
Vendored
+5
-5
@@ -122,17 +122,17 @@ ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels)
|
||||
break;
|
||||
case THUNDER_2BITDELTAS: /* 2-bit deltas */
|
||||
if ((delta = ((n >> 4) & 3)) != DELTA2_SKIP)
|
||||
SETPIXEL(op, lastpixel + twobitdeltas[delta]);
|
||||
SETPIXEL(op, (unsigned)((int)lastpixel + twobitdeltas[delta]));
|
||||
if ((delta = ((n >> 2) & 3)) != DELTA2_SKIP)
|
||||
SETPIXEL(op, lastpixel + twobitdeltas[delta]);
|
||||
SETPIXEL(op, (unsigned)((int)lastpixel + twobitdeltas[delta]));
|
||||
if ((delta = (n & 3)) != DELTA2_SKIP)
|
||||
SETPIXEL(op, lastpixel + twobitdeltas[delta]);
|
||||
SETPIXEL(op, (unsigned)((int)lastpixel + twobitdeltas[delta]));
|
||||
break;
|
||||
case THUNDER_3BITDELTAS: /* 3-bit deltas */
|
||||
if ((delta = ((n >> 3) & 7)) != DELTA3_SKIP)
|
||||
SETPIXEL(op, lastpixel + threebitdeltas[delta]);
|
||||
SETPIXEL(op, (unsigned)((int)lastpixel + threebitdeltas[delta]));
|
||||
if ((delta = (n & 7)) != DELTA3_SKIP)
|
||||
SETPIXEL(op, lastpixel + threebitdeltas[delta]);
|
||||
SETPIXEL(op, (unsigned)((int)lastpixel + threebitdeltas[delta]));
|
||||
break;
|
||||
case THUNDER_RAW: /* raw data */
|
||||
SETPIXEL(op, n);
|
||||
|
||||
Vendored
+3
-24
@@ -181,15 +181,8 @@ TIFFTileRowSize(TIFF* tif)
|
||||
{
|
||||
static const char module[] = "TIFFTileRowSize";
|
||||
uint64 m;
|
||||
tmsize_t n;
|
||||
m=TIFFTileRowSize64(tif);
|
||||
n=(tmsize_t)m;
|
||||
if ((uint64)n!=m)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
|
||||
n=0;
|
||||
}
|
||||
return(n);
|
||||
return _TIFFCastUInt64ToSSize(tif, m, module);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -248,15 +241,8 @@ TIFFVTileSize(TIFF* tif, uint32 nrows)
|
||||
{
|
||||
static const char module[] = "TIFFVTileSize";
|
||||
uint64 m;
|
||||
tmsize_t n;
|
||||
m=TIFFVTileSize64(tif,nrows);
|
||||
n=(tmsize_t)m;
|
||||
if ((uint64)n!=m)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
|
||||
n=0;
|
||||
}
|
||||
return(n);
|
||||
return _TIFFCastUInt64ToSSize(tif, m, module);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -272,15 +258,8 @@ TIFFTileSize(TIFF* tif)
|
||||
{
|
||||
static const char module[] = "TIFFTileSize";
|
||||
uint64 m;
|
||||
tmsize_t n;
|
||||
m=TIFFTileSize64(tif);
|
||||
n=(tmsize_t)m;
|
||||
if ((uint64)n!=m)
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
|
||||
n=0;
|
||||
}
|
||||
return(n);
|
||||
return _TIFFCastUInt64ToSSize(tif, m, module);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Vendored
+1
-1
@@ -162,7 +162,7 @@ _tiffMapProc(thandle_t fd, void** pbase, toff_t* psize)
|
||||
{
|
||||
uint64 size64 = _tiffSizeProc(fd);
|
||||
tmsize_t sizem = (tmsize_t)size64;
|
||||
if ((uint64)sizem==size64) {
|
||||
if (size64 && (uint64)sizem==size64) {
|
||||
fd_as_handle_union_t fdh;
|
||||
fdh.h = fd;
|
||||
*pbase = (void*)
|
||||
|
||||
Vendored
+11
-4
@@ -267,6 +267,12 @@ TWebPPreDecode(TIFF* tif, uint16 s)
|
||||
segment_height = td->td_rowsperstrip;
|
||||
}
|
||||
|
||||
if( segment_width > 16383 || segment_height > 16383 ) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"WEBP maximum image dimensions are 16383 x 16383.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( (sp->state & LSTATE_INIT_DECODE) == 0 )
|
||||
tif->tif_setupdecode(tif);
|
||||
|
||||
@@ -333,7 +339,7 @@ TWebPSetupEncode(TIFF* tif)
|
||||
}
|
||||
|
||||
/* check bits per sample and data type */
|
||||
if ((nBitsPerSample != 8) && (sampleFormat != 1)) {
|
||||
if ((nBitsPerSample != 8) || (sampleFormat != SAMPLEFORMAT_UINT)) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"WEBP driver requires 8 bit unsigned data");
|
||||
return 0;
|
||||
@@ -356,7 +362,7 @@ TWebPSetupEncode(TIFF* tif)
|
||||
}
|
||||
|
||||
if (!WebPConfigInitInternal(&sp->sEncoderConfig, WEBP_PRESET_DEFAULT,
|
||||
sp->quality_level,
|
||||
(float)sp->quality_level,
|
||||
WEBP_ENCODER_ABI_VERSION)) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Error creating WebP encoder configuration.");
|
||||
@@ -579,7 +585,7 @@ TWebPVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
#if WEBP_ENCODER_ABI_VERSION >= 0x0100
|
||||
sp->lossless = va_arg(ap, int);
|
||||
if (sp->lossless){
|
||||
sp->quality_level = 100.0f;
|
||||
sp->quality_level = 100;
|
||||
}
|
||||
return 1;
|
||||
#else
|
||||
@@ -628,6 +634,7 @@ TIFFInitWebP(TIFF* tif, int scheme)
|
||||
static const char module[] = "TIFFInitWebP";
|
||||
WebPState* sp;
|
||||
|
||||
(void)scheme;
|
||||
assert( scheme == COMPRESSION_WEBP );
|
||||
|
||||
/*
|
||||
@@ -656,7 +663,7 @@ TIFFInitWebP(TIFF* tif, int scheme)
|
||||
tif->tif_tagmethods.vsetfield = TWebPVSetField; /* hook for codec tags */
|
||||
|
||||
/* Default values for codec-specific fields */
|
||||
sp->quality_level = 75.0f; /* default comp. level */
|
||||
sp->quality_level = 75; /* default comp. level */
|
||||
sp->lossless = 0; /* default to false */
|
||||
sp->state = 0;
|
||||
sp->nSamples = 0;
|
||||
|
||||
Vendored
+37
-31
@@ -27,34 +27,38 @@
|
||||
* Scott Wagner (wagner@itek.com), Itek Graphix, Rochester, NY USA
|
||||
*/
|
||||
|
||||
/*
|
||||
CreateFileA/CreateFileW return type 'HANDLE'.
|
||||
|
||||
thandle_t is declared like
|
||||
|
||||
DECLARE_HANDLE(thandle_t);
|
||||
|
||||
in tiffio.h.
|
||||
|
||||
Windows (from winnt.h) DECLARE_HANDLE logic looks like
|
||||
|
||||
#ifdef STRICT
|
||||
typedef void *HANDLE;
|
||||
#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
|
||||
#else
|
||||
typedef PVOID HANDLE;
|
||||
#define DECLARE_HANDLE(name) typedef HANDLE name
|
||||
#endif
|
||||
|
||||
See http://bugzilla.maptools.org/show_bug.cgi?id=1941 for problems in WIN64
|
||||
builds resulting from this. Unfortunately, the proposed patch was lost.
|
||||
|
||||
*/
|
||||
|
||||
#include "tiffiop.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
/*
|
||||
CreateFileA/CreateFileW return type 'HANDLE' while TIFFFdOpen() takes 'int',
|
||||
which is formally incompatible and can even seemingly be of different size:
|
||||
HANDLE is 64 bit under Win64, while int is still 32 bits there.
|
||||
|
||||
However, only the lower 32 bits of a HANDLE are significant under Win64 as,
|
||||
for interoperability reasons, they must have the same values in 32- and
|
||||
64-bit programs running on the same system, see
|
||||
|
||||
https://docs.microsoft.com/en-us/windows/win32/winprog64/interprocess-communication
|
||||
|
||||
Because of this, it is safe to define the following trivial functions for
|
||||
casting between ints and HANDLEs, which are only really needed to avoid
|
||||
compiler warnings (and, perhaps, to make the code slightly more clear).
|
||||
Note that using the intermediate cast to "intptr_t" is crucial for warning
|
||||
avoidance, as this integer type has the same size as HANDLE in all builds.
|
||||
*/
|
||||
|
||||
static inline thandle_t thandle_from_int(int ifd)
|
||||
{
|
||||
return (thandle_t)(intptr_t)ifd;
|
||||
}
|
||||
|
||||
static inline int thandle_to_int(thandle_t fd)
|
||||
{
|
||||
return (int)(intptr_t)fd;
|
||||
}
|
||||
|
||||
static tmsize_t
|
||||
_tiffReadProc(thandle_t fd, void* buf, tmsize_t size)
|
||||
{
|
||||
@@ -151,9 +155,11 @@ _tiffCloseProc(thandle_t fd)
|
||||
static uint64
|
||||
_tiffSizeProc(thandle_t fd)
|
||||
{
|
||||
ULARGE_INTEGER m;
|
||||
m.LowPart=GetFileSize(fd,&m.HighPart);
|
||||
return(m.QuadPart);
|
||||
LARGE_INTEGER m;
|
||||
if (GetFileSizeEx(fd,&m))
|
||||
return(m.QuadPart);
|
||||
else
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -185,7 +191,7 @@ _tiffMapProc(thandle_t fd, void** pbase, toff_t* psize)
|
||||
|
||||
size = _tiffSizeProc(fd);
|
||||
sizem = (tmsize_t)size;
|
||||
if ((uint64)sizem!=size)
|
||||
if (!size || (uint64)sizem!=size)
|
||||
return (0);
|
||||
|
||||
/* By passing in 0 for the maximum file size, it specifies that we
|
||||
@@ -237,7 +243,7 @@ TIFFFdOpen(int ifd, const char* name, const char* mode)
|
||||
break;
|
||||
}
|
||||
}
|
||||
tif = TIFFClientOpen(name, mode, (thandle_t)ifd, /* FIXME: WIN64 cast to pointer warning */
|
||||
tif = TIFFClientOpen(name, mode, thandle_from_int(ifd),
|
||||
_tiffReadProc, _tiffWriteProc,
|
||||
_tiffSeekProc, _tiffCloseProc, _tiffSizeProc,
|
||||
fSuppressMap ? _tiffDummyMapProc : _tiffMapProc,
|
||||
@@ -282,7 +288,7 @@ TIFFOpen(const char* name, const char* mode)
|
||||
return ((TIFF *)0);
|
||||
}
|
||||
|
||||
tif = TIFFFdOpen((int)fd, name, mode); /* FIXME: WIN64 cast from pointer to int warning */
|
||||
tif = TIFFFdOpen(thandle_to_int(fd), name, mode);
|
||||
if(!tif)
|
||||
CloseHandle(fd);
|
||||
return tif;
|
||||
@@ -337,7 +343,7 @@ TIFFOpenW(const wchar_t* name, const char* mode)
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
tif = TIFFFdOpen((int)fd, /* FIXME: WIN64 cast from pointer to int warning */
|
||||
tif = TIFFFdOpen(thandle_to_int(fd),
|
||||
(mbname != NULL) ? mbname : "<unknown>", mode);
|
||||
if(!tif)
|
||||
CloseHandle(fd);
|
||||
|
||||
Vendored
+86
-63
@@ -128,10 +128,10 @@ TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample)
|
||||
tif->tif_rawcc = 0;
|
||||
tif->tif_rawcp = tif->tif_rawdata;
|
||||
|
||||
if( td->td_stripbytecount[strip] > 0 )
|
||||
if( td->td_stripbytecount_p[strip] > 0 )
|
||||
{
|
||||
/* if we are writing over existing tiles, zero length */
|
||||
td->td_stripbytecount[strip] = 0;
|
||||
td->td_stripbytecount_p[strip] = 0;
|
||||
|
||||
/* this forces TIFFAppendToStrip() to do a seek */
|
||||
tif->tif_curoff = 0;
|
||||
@@ -176,6 +176,32 @@ TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample)
|
||||
return (status);
|
||||
}
|
||||
|
||||
/* Make sure that at the first attempt of rewriting a tile/strip, we will have */
|
||||
/* more bytes available in the output buffer than the previous byte count, */
|
||||
/* so that TIFFAppendToStrip() will detect the overflow when it is called the first */
|
||||
/* time if the new compressed tile is bigger than the older one. (GDAL #4771) */
|
||||
static int _TIFFReserveLargeEnoughWriteBuffer(TIFF* tif, uint32 strip_or_tile)
|
||||
{
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
if( td->td_stripbytecount_p[strip_or_tile] > 0 )
|
||||
{
|
||||
/* The +1 is to ensure at least one extra bytes */
|
||||
/* The +4 is because the LZW encoder flushes 4 bytes before the limit */
|
||||
uint64 safe_buffer_size = (uint64)(td->td_stripbytecount_p[strip_or_tile] + 1 + 4);
|
||||
if( tif->tif_rawdatasize <= (tmsize_t)safe_buffer_size )
|
||||
{
|
||||
if( !(TIFFWriteBufferSetup(tif, NULL,
|
||||
(tmsize_t)TIFFroundup_64(safe_buffer_size, 1024))) )
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Force TIFFAppendToStrip() to consider placing data at end
|
||||
of file. */
|
||||
tif->tif_curoff = 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Encode the supplied data and write it to the
|
||||
* specified strip.
|
||||
@@ -222,6 +248,13 @@ TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc)
|
||||
tif->tif_flags |= TIFF_BUF4WRITE;
|
||||
tif->tif_curstrip = strip;
|
||||
|
||||
if( !_TIFFReserveLargeEnoughWriteBuffer(tif, strip) ) {
|
||||
return ((tmsize_t)(-1));
|
||||
}
|
||||
|
||||
tif->tif_rawcc = 0;
|
||||
tif->tif_rawcp = tif->tif_rawdata;
|
||||
|
||||
if (td->td_stripsperimage == 0) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "Zero strips per image");
|
||||
return ((tmsize_t) -1);
|
||||
@@ -234,27 +267,6 @@ TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc)
|
||||
tif->tif_flags |= TIFF_CODERSETUP;
|
||||
}
|
||||
|
||||
if( td->td_stripbytecount[strip] > 0 )
|
||||
{
|
||||
/* Make sure that at the first attempt of rewriting the tile, we will have */
|
||||
/* more bytes available in the output buffer than the previous byte count, */
|
||||
/* so that TIFFAppendToStrip() will detect the overflow when it is called the first */
|
||||
/* time if the new compressed tile is bigger than the older one. (GDAL #4771) */
|
||||
if( tif->tif_rawdatasize <= (tmsize_t)td->td_stripbytecount[strip] )
|
||||
{
|
||||
if( !(TIFFWriteBufferSetup(tif, NULL,
|
||||
(tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[strip] + 1), 1024))) )
|
||||
return ((tmsize_t)(-1));
|
||||
}
|
||||
|
||||
/* Force TIFFAppendToStrip() to consider placing data at end
|
||||
of file. */
|
||||
tif->tif_curoff = 0;
|
||||
}
|
||||
|
||||
tif->tif_rawcc = 0;
|
||||
tif->tif_rawcp = tif->tif_rawdata;
|
||||
|
||||
tif->tif_flags &= ~TIFF_POSTENCODE;
|
||||
|
||||
/* shortcut to avoid an extra memcpy() */
|
||||
@@ -402,22 +414,8 @@ TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc)
|
||||
tif->tif_flags |= TIFF_BUF4WRITE;
|
||||
tif->tif_curtile = tile;
|
||||
|
||||
if( td->td_stripbytecount[tile] > 0 )
|
||||
{
|
||||
/* Make sure that at the first attempt of rewriting the tile, we will have */
|
||||
/* more bytes available in the output buffer than the previous byte count, */
|
||||
/* so that TIFFAppendToStrip() will detect the overflow when it is called the first */
|
||||
/* time if the new compressed tile is bigger than the older one. (GDAL #4771) */
|
||||
if( tif->tif_rawdatasize <= (tmsize_t) td->td_stripbytecount[tile] )
|
||||
{
|
||||
if( !(TIFFWriteBufferSetup(tif, NULL,
|
||||
(tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[tile] + 1), 1024))) )
|
||||
return ((tmsize_t)(-1));
|
||||
}
|
||||
|
||||
/* Force TIFFAppendToStrip() to consider placing data at end
|
||||
of file. */
|
||||
tif->tif_curoff = 0;
|
||||
if( !_TIFFReserveLargeEnoughWriteBuffer(tif, tile) ) {
|
||||
return ((tmsize_t)(-1));
|
||||
}
|
||||
|
||||
tif->tif_rawcc = 0;
|
||||
@@ -535,22 +533,29 @@ TIFFSetupStrips(TIFF* tif)
|
||||
isUnspecified(tif, FIELD_ROWSPERSTRIP) ?
|
||||
td->td_samplesperpixel : TIFFNumberOfStrips(tif);
|
||||
td->td_nstrips = td->td_stripsperimage;
|
||||
/* TIFFWriteDirectoryTagData has a limitation to 0x80000000U bytes */
|
||||
if( td->td_nstrips >= 0x80000000U / ((tif->tif_flags&TIFF_BIGTIFF)?0x8U:0x4U) )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, "TIFFSetupStrips",
|
||||
"Too large Strip/Tile Offsets/ByteCounts arrays");
|
||||
return 0;
|
||||
}
|
||||
if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
|
||||
td->td_stripsperimage /= td->td_samplesperpixel;
|
||||
td->td_stripoffset = (uint64 *)
|
||||
td->td_stripoffset_p = (uint64 *)
|
||||
_TIFFCheckMalloc(tif, td->td_nstrips, sizeof (uint64),
|
||||
"for \"StripOffsets\" array");
|
||||
td->td_stripbytecount = (uint64 *)
|
||||
td->td_stripbytecount_p = (uint64 *)
|
||||
_TIFFCheckMalloc(tif, td->td_nstrips, sizeof (uint64),
|
||||
"for \"StripByteCounts\" array");
|
||||
if (td->td_stripoffset == NULL || td->td_stripbytecount == NULL)
|
||||
if (td->td_stripoffset_p == NULL || td->td_stripbytecount_p == NULL)
|
||||
return (0);
|
||||
/*
|
||||
* Place data at the end-of-file
|
||||
* (by setting offsets to zero).
|
||||
*/
|
||||
_TIFFmemset(td->td_stripoffset, 0, td->td_nstrips*sizeof (uint64));
|
||||
_TIFFmemset(td->td_stripbytecount, 0, td->td_nstrips*sizeof (uint64));
|
||||
_TIFFmemset(td->td_stripoffset_p, 0, td->td_nstrips*sizeof (uint64));
|
||||
_TIFFmemset(td->td_stripbytecount_p, 0, td->td_nstrips*sizeof (uint64));
|
||||
TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS);
|
||||
TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS);
|
||||
return (1);
|
||||
@@ -572,7 +577,7 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module)
|
||||
}
|
||||
if (tiles ^ isTiled(tif)) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module, tiles ?
|
||||
"Can not write tiles to a stripped image" :
|
||||
"Can not write tiles to a striped image" :
|
||||
"Can not write scanlines to a tiled image");
|
||||
return (0);
|
||||
}
|
||||
@@ -610,7 +615,7 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module)
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
if (tif->tif_dir.td_stripoffset == NULL && !TIFFSetupStrips(tif)) {
|
||||
if (tif->tif_dir.td_stripoffset_p == NULL && !TIFFSetupStrips(tif)) {
|
||||
tif->tif_dir.td_nstrips = 0;
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "No space for %s arrays",
|
||||
isTiled(tif) ? "tile" : "strip");
|
||||
@@ -628,6 +633,20 @@ TIFFWriteCheck(TIFF* tif, int tiles, const char* module)
|
||||
if (tif->tif_scanlinesize == 0)
|
||||
return (0);
|
||||
tif->tif_flags |= TIFF_BEENWRITING;
|
||||
|
||||
if( tif->tif_dir.td_stripoffset_entry.tdir_tag != 0 &&
|
||||
tif->tif_dir.td_stripoffset_entry.tdir_count == 0 &&
|
||||
tif->tif_dir.td_stripoffset_entry.tdir_type == 0 &&
|
||||
tif->tif_dir.td_stripoffset_entry.tdir_offset.toff_long8 == 0 &&
|
||||
tif->tif_dir.td_stripbytecount_entry.tdir_tag != 0 &&
|
||||
tif->tif_dir.td_stripbytecount_entry.tdir_count == 0 &&
|
||||
tif->tif_dir.td_stripbytecount_entry.tdir_type == 0 &&
|
||||
tif->tif_dir.td_stripbytecount_entry.tdir_offset.toff_long8 == 0 &&
|
||||
!(tif->tif_flags & TIFF_DIRTYDIRECT) )
|
||||
{
|
||||
TIFFForceStrileArrayWriting(tif);
|
||||
}
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -649,6 +668,10 @@ TIFFWriteBufferSetup(TIFF* tif, void* bp, tmsize_t size)
|
||||
if (size == (tmsize_t)(-1)) {
|
||||
size = (isTiled(tif) ?
|
||||
tif->tif_tilesize : TIFFStripSize(tif));
|
||||
|
||||
/* Adds 10% margin for cases where compression would expand a bit */
|
||||
if( size < TIFF_TMSIZE_T_MAX - size / 10 )
|
||||
size += size / 10;
|
||||
/*
|
||||
* Make raw data buffer at least 8K
|
||||
*/
|
||||
@@ -684,9 +707,9 @@ TIFFGrowStrips(TIFF* tif, uint32 delta, const char* module)
|
||||
uint64* new_stripbytecount;
|
||||
|
||||
assert(td->td_planarconfig == PLANARCONFIG_CONTIG);
|
||||
new_stripoffset = (uint64*)_TIFFrealloc(td->td_stripoffset,
|
||||
new_stripoffset = (uint64*)_TIFFrealloc(td->td_stripoffset_p,
|
||||
(td->td_nstrips + delta) * sizeof (uint64));
|
||||
new_stripbytecount = (uint64*)_TIFFrealloc(td->td_stripbytecount,
|
||||
new_stripbytecount = (uint64*)_TIFFrealloc(td->td_stripbytecount_p,
|
||||
(td->td_nstrips + delta) * sizeof (uint64));
|
||||
if (new_stripoffset == NULL || new_stripbytecount == NULL) {
|
||||
if (new_stripoffset)
|
||||
@@ -697,11 +720,11 @@ TIFFGrowStrips(TIFF* tif, uint32 delta, const char* module)
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "No space to expand strip arrays");
|
||||
return (0);
|
||||
}
|
||||
td->td_stripoffset = new_stripoffset;
|
||||
td->td_stripbytecount = new_stripbytecount;
|
||||
_TIFFmemset(td->td_stripoffset + td->td_nstrips,
|
||||
td->td_stripoffset_p = new_stripoffset;
|
||||
td->td_stripbytecount_p = new_stripbytecount;
|
||||
_TIFFmemset(td->td_stripoffset_p + td->td_nstrips,
|
||||
0, delta*sizeof (uint64));
|
||||
_TIFFmemset(td->td_stripbytecount + td->td_nstrips,
|
||||
_TIFFmemset(td->td_stripbytecount_p + td->td_nstrips,
|
||||
0, delta*sizeof (uint64));
|
||||
td->td_nstrips += delta;
|
||||
tif->tif_flags |= TIFF_DIRTYDIRECT;
|
||||
@@ -720,12 +743,12 @@ TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc)
|
||||
uint64 m;
|
||||
int64 old_byte_count = -1;
|
||||
|
||||
if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) {
|
||||
if (td->td_stripoffset_p[strip] == 0 || tif->tif_curoff == 0) {
|
||||
assert(td->td_nstrips > 0);
|
||||
|
||||
if( td->td_stripbytecount[strip] != 0
|
||||
&& td->td_stripoffset[strip] != 0
|
||||
&& td->td_stripbytecount[strip] >= (uint64) cc )
|
||||
if( td->td_stripbytecount_p[strip] != 0
|
||||
&& td->td_stripoffset_p[strip] != 0
|
||||
&& td->td_stripbytecount_p[strip] >= (uint64) cc )
|
||||
{
|
||||
/*
|
||||
* There is already tile data on disk, and the new tile
|
||||
@@ -734,7 +757,7 @@ TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc)
|
||||
* more data to append to this strip before we are done
|
||||
* depending on how we are getting called.
|
||||
*/
|
||||
if (!SeekOK(tif, td->td_stripoffset[strip])) {
|
||||
if (!SeekOK(tif, td->td_stripoffset_p[strip])) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Seek error at scanline %lu",
|
||||
(unsigned long)tif->tif_row);
|
||||
@@ -747,17 +770,17 @@ TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc)
|
||||
* Seek to end of file, and set that as our location to
|
||||
* write this strip.
|
||||
*/
|
||||
td->td_stripoffset[strip] = TIFFSeekFile(tif, 0, SEEK_END);
|
||||
td->td_stripoffset_p[strip] = TIFFSeekFile(tif, 0, SEEK_END);
|
||||
tif->tif_flags |= TIFF_DIRTYSTRIP;
|
||||
}
|
||||
|
||||
tif->tif_curoff = td->td_stripoffset[strip];
|
||||
tif->tif_curoff = td->td_stripoffset_p[strip];
|
||||
|
||||
/*
|
||||
* We are starting a fresh strip/tile, so set the size to zero.
|
||||
*/
|
||||
old_byte_count = td->td_stripbytecount[strip];
|
||||
td->td_stripbytecount[strip] = 0;
|
||||
old_byte_count = td->td_stripbytecount_p[strip];
|
||||
td->td_stripbytecount_p[strip] = 0;
|
||||
}
|
||||
|
||||
m = tif->tif_curoff+cc;
|
||||
@@ -774,9 +797,9 @@ TIFFAppendToStrip(TIFF* tif, uint32 strip, uint8* data, tmsize_t cc)
|
||||
return (0);
|
||||
}
|
||||
tif->tif_curoff = m;
|
||||
td->td_stripbytecount[strip] += cc;
|
||||
td->td_stripbytecount_p[strip] += cc;
|
||||
|
||||
if( (int64) td->td_stripbytecount[strip] != old_byte_count )
|
||||
if( (int64) td->td_stripbytecount_p[strip] != old_byte_count )
|
||||
tif->tif_flags |= TIFF_DIRTYSTRIP;
|
||||
|
||||
return (1);
|
||||
|
||||
Vendored
+262
-18
@@ -29,24 +29,22 @@
|
||||
*
|
||||
* ZIP (aka Deflate) Compression Support
|
||||
*
|
||||
* This file is simply an interface to the zlib library written by
|
||||
* This file is an interface to the zlib library written by
|
||||
* Jean-loup Gailly and Mark Adler. You must use version 1.0 or later
|
||||
* of the library: this code assumes the 1.0 API and also depends on
|
||||
* the ability to write the zlib header multiple times (one per strip)
|
||||
* which was not possible with versions prior to 0.95. Note also that
|
||||
* older versions of this codec avoided this bug by suppressing the header
|
||||
* entirely. This means that files written with the old library cannot
|
||||
* be read; they should be converted to a different compression scheme
|
||||
* and then reconverted.
|
||||
* of the library.
|
||||
*
|
||||
* The data format used by the zlib library is described in the files
|
||||
* zlib-3.1.doc, deflate-1.1.doc and gzip-4.1.doc, available in the
|
||||
* directory ftp://ftp.uu.net/pub/archiving/zip/doc. The library was
|
||||
* last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz.
|
||||
* Optionally, libdeflate (https://github.com/ebiggers/libdeflate) may be used
|
||||
* to do the compression and decompression, but only for whole strips and tiles.
|
||||
* For scanline access, zlib will be sued as a fallback.
|
||||
*/
|
||||
#include "tif_predict.h"
|
||||
#include "zlib.h"
|
||||
|
||||
#if LIBDEFLATE_SUPPORT
|
||||
#include "libdeflate.h"
|
||||
#endif
|
||||
#define LIBDEFLATE_MAX_COMPRESSION_LEVEL 12
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
@@ -70,6 +68,12 @@ typedef struct {
|
||||
z_stream stream;
|
||||
int zipquality; /* compression level */
|
||||
int state; /* state flags */
|
||||
int subcodec; /* DEFLATE_SUBCODEC_ZLIB or DEFLATE_SUBCODEC_LIBDEFLATE */
|
||||
#if LIBDEFLATE_SUPPORT
|
||||
int libdeflate_state; /* -1 = until first time ZIPEncode() / ZIPDecode() is called, 0 = use zlib, 1 = use libdeflate */
|
||||
struct libdeflate_decompressor* libdeflate_dec;
|
||||
struct libdeflate_compressor* libdeflate_enc;
|
||||
#endif
|
||||
#define ZSTATE_INIT_DECODE 0x01
|
||||
#define ZSTATE_INIT_ENCODE 0x02
|
||||
|
||||
@@ -132,6 +136,9 @@ ZIPPreDecode(TIFF* tif, uint16 s)
|
||||
if( (sp->state & ZSTATE_INIT_DECODE) == 0 )
|
||||
tif->tif_setupdecode( tif );
|
||||
|
||||
#if LIBDEFLATE_SUPPORT
|
||||
sp->libdeflate_state = -1;
|
||||
#endif
|
||||
sp->stream.next_in = tif->tif_rawdata;
|
||||
assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised,
|
||||
we need to simplify this code to reflect a ZLib that is likely updated
|
||||
@@ -151,6 +158,77 @@ ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
|
||||
assert(sp != NULL);
|
||||
assert(sp->state == ZSTATE_INIT_DECODE);
|
||||
|
||||
#if LIBDEFLATE_SUPPORT
|
||||
if( sp->libdeflate_state == 1 )
|
||||
return 0;
|
||||
|
||||
/* If we have libdeflate support and we are asked to read a whole */
|
||||
/* strip/tile, then go for using it */
|
||||
do {
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
|
||||
if( sp->libdeflate_state == 0 )
|
||||
break;
|
||||
if( sp->subcodec == DEFLATE_SUBCODEC_ZLIB )
|
||||
break;
|
||||
|
||||
/* Check if we are in the situation where we can use libdeflate */
|
||||
if (isTiled(tif)) {
|
||||
if( TIFFTileSize64(tif) != (uint64)occ )
|
||||
break;
|
||||
} else {
|
||||
uint32 strip_height = td->td_imagelength - tif->tif_row;
|
||||
if (strip_height > td->td_rowsperstrip)
|
||||
strip_height = td->td_rowsperstrip;
|
||||
if( TIFFVStripSize64(tif, strip_height) != (uint64)occ )
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check for overflow */
|
||||
if( (size_t)tif->tif_rawcc != (uint64)tif->tif_rawcc )
|
||||
break;
|
||||
if( (size_t)occ != (uint64)occ )
|
||||
break;
|
||||
|
||||
/* Go for decompression using libdeflate */
|
||||
{
|
||||
enum libdeflate_result res;
|
||||
if( sp->libdeflate_dec == NULL )
|
||||
{
|
||||
sp->libdeflate_dec = libdeflate_alloc_decompressor();
|
||||
if( sp->libdeflate_dec == NULL )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sp->libdeflate_state = 1;
|
||||
|
||||
res = libdeflate_zlib_decompress(
|
||||
sp->libdeflate_dec, tif->tif_rawcp, (size_t)tif->tif_rawcc, op, (size_t)occ, NULL);
|
||||
|
||||
tif->tif_rawcp += tif->tif_rawcc;
|
||||
tif->tif_rawcc = 0;
|
||||
|
||||
/* We accept LIBDEFLATE_INSUFFICIENT_SPACE has a return */
|
||||
/* There are odd files in the wild where the last strip, when */
|
||||
/* it is smaller in height than td_rowsperstrip, actually contains */
|
||||
/* data for td_rowsperstrip lines. Just ignore that silently. */
|
||||
if( res != LIBDEFLATE_SUCCESS &&
|
||||
res != LIBDEFLATE_INSUFFICIENT_SPACE )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Decoding error at scanline %lu",
|
||||
(unsigned long) tif->tif_row);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
} while(0);
|
||||
sp->libdeflate_state = 0;
|
||||
#endif /* LIBDEFLATE_SUPPORT */
|
||||
|
||||
sp->stream.next_in = tif->tif_rawcp;
|
||||
|
||||
sp->stream.next_out = op;
|
||||
@@ -198,6 +276,7 @@ ZIPSetupEncode(TIFF* tif)
|
||||
{
|
||||
static const char module[] = "ZIPSetupEncode";
|
||||
ZIPState* sp = EncoderState(tif);
|
||||
int cappedQuality;
|
||||
|
||||
assert(sp != NULL);
|
||||
if (sp->state & ZSTATE_INIT_DECODE) {
|
||||
@@ -205,7 +284,11 @@ ZIPSetupEncode(TIFF* tif)
|
||||
sp->state = 0;
|
||||
}
|
||||
|
||||
if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) {
|
||||
cappedQuality = sp->zipquality;
|
||||
if( cappedQuality > Z_BEST_COMPRESSION )
|
||||
cappedQuality = Z_BEST_COMPRESSION;
|
||||
|
||||
if (deflateInit(&sp->stream, cappedQuality) != Z_OK) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "%s", SAFE_MSG(sp));
|
||||
return (0);
|
||||
} else {
|
||||
@@ -227,6 +310,9 @@ ZIPPreEncode(TIFF* tif, uint16 s)
|
||||
if( sp->state != ZSTATE_INIT_ENCODE )
|
||||
tif->tif_setupencode( tif );
|
||||
|
||||
#if LIBDEFLATE_SUPPORT
|
||||
sp->libdeflate_state = -1;
|
||||
#endif
|
||||
sp->stream.next_out = tif->tif_rawdata;
|
||||
assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised,
|
||||
we need to simplify this code to reflect a ZLib that is likely updated
|
||||
@@ -249,6 +335,95 @@ ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
assert(sp->state == ZSTATE_INIT_ENCODE);
|
||||
|
||||
(void) s;
|
||||
|
||||
#if LIBDEFLATE_SUPPORT
|
||||
if( sp->libdeflate_state == 1 )
|
||||
return 0;
|
||||
|
||||
/* If we have libdeflate support and we are asked to write a whole */
|
||||
/* strip/tile, then go for using it */
|
||||
do {
|
||||
TIFFDirectory *td = &tif->tif_dir;
|
||||
|
||||
if( sp->libdeflate_state == 0 )
|
||||
break;
|
||||
if( sp->subcodec == DEFLATE_SUBCODEC_ZLIB )
|
||||
break;
|
||||
|
||||
/* Libdeflate does not support the 0-compression level */
|
||||
if( sp->zipquality == Z_NO_COMPRESSION )
|
||||
break;
|
||||
|
||||
/* Check if we are in the situation where we can use libdeflate */
|
||||
if (isTiled(tif)) {
|
||||
if( TIFFTileSize64(tif) != (uint64)cc )
|
||||
break;
|
||||
} else {
|
||||
uint32 strip_height = td->td_imagelength - tif->tif_row;
|
||||
if (strip_height > td->td_rowsperstrip)
|
||||
strip_height = td->td_rowsperstrip;
|
||||
if( TIFFVStripSize64(tif, strip_height) != (uint64)cc )
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check for overflow */
|
||||
if( (size_t)tif->tif_rawdatasize != (uint64)tif->tif_rawdatasize )
|
||||
break;
|
||||
if( (size_t)cc != (uint64)cc )
|
||||
break;
|
||||
|
||||
/* Go for compression using libdeflate */
|
||||
{
|
||||
size_t nCompressedBytes;
|
||||
if( sp->libdeflate_enc == NULL )
|
||||
{
|
||||
/* To get results as good as zlib, we asked for an extra */
|
||||
/* level of compression */
|
||||
sp->libdeflate_enc = libdeflate_alloc_compressor(
|
||||
sp->zipquality == Z_DEFAULT_COMPRESSION ? 7 :
|
||||
sp->zipquality >= 6 && sp->zipquality <= 9 ? sp->zipquality + 1 :
|
||||
sp->zipquality);
|
||||
if( sp->libdeflate_enc == NULL )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Cannot allocate compressor");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure the output buffer is large enough for the worse case. */
|
||||
/* In TIFFWriteBufferSetup(), when libtiff allocates the buffer */
|
||||
/* we've taken a 10% margin over the uncompressed size, which should */
|
||||
/* be large enough even for the the worse case scenario. */
|
||||
if( libdeflate_zlib_compress_bound(sp->libdeflate_enc, (size_t)cc) >
|
||||
(size_t)tif->tif_rawdatasize)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
sp->libdeflate_state = 1;
|
||||
nCompressedBytes = libdeflate_zlib_compress(
|
||||
sp->libdeflate_enc, bp, (size_t)cc, tif->tif_rawdata, (size_t)tif->tif_rawdatasize);
|
||||
|
||||
if( nCompressedBytes == 0 )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Encoder error at scanline %lu",
|
||||
(unsigned long) tif->tif_row);
|
||||
return 0;
|
||||
}
|
||||
|
||||
tif->tif_rawcc = nCompressedBytes;
|
||||
|
||||
if( !TIFFFlushData1(tif) )
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
} while(0);
|
||||
sp->libdeflate_state = 0;
|
||||
#endif /* LIBDEFLATE_SUPPORT */
|
||||
|
||||
sp->stream.next_in = bp;
|
||||
assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised,
|
||||
we need to simplify this code to reflect a ZLib that is likely updated
|
||||
@@ -265,7 +440,8 @@ ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
}
|
||||
if (sp->stream.avail_out == 0) {
|
||||
tif->tif_rawcc = tif->tif_rawdatasize;
|
||||
TIFFFlushData1(tif);
|
||||
if (!TIFFFlushData1(tif))
|
||||
return 0;
|
||||
sp->stream.next_out = tif->tif_rawdata;
|
||||
sp->stream.avail_out = (uint64)tif->tif_rawdatasize <= 0xFFFFFFFFU ? (uInt)tif->tif_rawdatasize : 0xFFFFFFFFU;
|
||||
}
|
||||
@@ -285,6 +461,11 @@ ZIPPostEncode(TIFF* tif)
|
||||
ZIPState *sp = EncoderState(tif);
|
||||
int state;
|
||||
|
||||
#if LIBDEFLATE_SUPPORT
|
||||
if( sp->libdeflate_state == 1 )
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
sp->stream.avail_in = 0;
|
||||
do {
|
||||
state = deflate(&sp->stream, Z_FINISH);
|
||||
@@ -294,7 +475,8 @@ ZIPPostEncode(TIFF* tif)
|
||||
if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize)
|
||||
{
|
||||
tif->tif_rawcc = tif->tif_rawdatasize - sp->stream.avail_out;
|
||||
TIFFFlushData1(tif);
|
||||
if (!TIFFFlushData1(tif))
|
||||
return 0;
|
||||
sp->stream.next_out = tif->tif_rawdata;
|
||||
sp->stream.avail_out = (uint64)tif->tif_rawdatasize <= 0xFFFFFFFFU ? (uInt)tif->tif_rawdatasize : 0xFFFFFFFFU;
|
||||
}
|
||||
@@ -327,6 +509,14 @@ ZIPCleanup(TIFF* tif)
|
||||
inflateEnd(&sp->stream);
|
||||
sp->state = 0;
|
||||
}
|
||||
|
||||
#if LIBDEFLATE_SUPPORT
|
||||
if( sp->libdeflate_dec )
|
||||
libdeflate_free_decompressor(sp->libdeflate_dec);
|
||||
if( sp->libdeflate_enc )
|
||||
libdeflate_free_compressor(sp->libdeflate_enc);
|
||||
#endif
|
||||
|
||||
_TIFFfree(sp);
|
||||
tif->tif_data = NULL;
|
||||
|
||||
@@ -342,15 +532,55 @@ ZIPVSetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
switch (tag) {
|
||||
case TIFFTAG_ZIPQUALITY:
|
||||
sp->zipquality = (int) va_arg(ap, int);
|
||||
if ( sp->state&ZSTATE_INIT_ENCODE ) {
|
||||
if( sp->zipquality < Z_DEFAULT_COMPRESSION ||
|
||||
sp->zipquality > LIBDEFLATE_MAX_COMPRESSION_LEVEL ) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Invalid ZipQuality value. Should be in [-1,%d] range",
|
||||
LIBDEFLATE_MAX_COMPRESSION_LEVEL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( sp->state&ZSTATE_INIT_ENCODE ) {
|
||||
int cappedQuality = sp->zipquality;
|
||||
if( cappedQuality > Z_BEST_COMPRESSION )
|
||||
cappedQuality = Z_BEST_COMPRESSION;
|
||||
if (deflateParams(&sp->stream,
|
||||
sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) {
|
||||
cappedQuality, Z_DEFAULT_STRATEGY) != Z_OK) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s",
|
||||
SAFE_MSG(sp));
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
#if LIBDEFLATE_SUPPORT
|
||||
if( sp->libdeflate_enc )
|
||||
{
|
||||
libdeflate_free_compressor(sp->libdeflate_enc);
|
||||
sp->libdeflate_enc = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return (1);
|
||||
|
||||
case TIFFTAG_DEFLATE_SUBCODEC:
|
||||
sp->subcodec = (int) va_arg(ap, int);
|
||||
if( sp->subcodec != DEFLATE_SUBCODEC_ZLIB &&
|
||||
sp->subcodec != DEFLATE_SUBCODEC_LIBDEFLATE )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Invalid DeflateCodec value.");
|
||||
return 0;
|
||||
}
|
||||
#if !LIBDEFLATE_SUPPORT
|
||||
if( sp->subcodec == DEFLATE_SUBCODEC_LIBDEFLATE )
|
||||
{
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"DeflateCodec = DEFLATE_SUBCODEC_LIBDEFLATE unsupported in this build");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
|
||||
default:
|
||||
return (*sp->vsetparent)(tif, tag, ap);
|
||||
}
|
||||
@@ -366,6 +596,11 @@ ZIPVGetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
case TIFFTAG_ZIPQUALITY:
|
||||
*va_arg(ap, int*) = sp->zipquality;
|
||||
break;
|
||||
|
||||
case TIFFTAG_DEFLATE_SUBCODEC:
|
||||
*va_arg(ap, int*) = sp->subcodec;
|
||||
break;
|
||||
|
||||
default:
|
||||
return (*sp->vgetparent)(tif, tag, ap);
|
||||
}
|
||||
@@ -374,6 +609,7 @@ ZIPVGetField(TIFF* tif, uint32 tag, va_list ap)
|
||||
|
||||
static const TIFFField zipFields[] = {
|
||||
{ TIFFTAG_ZIPQUALITY, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "", NULL },
|
||||
{ TIFFTAG_DEFLATE_SUBCODEC, 0, 0, TIFF_ANY, 0, TIFF_SETGET_INT, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "", NULL },
|
||||
};
|
||||
|
||||
int
|
||||
@@ -384,6 +620,9 @@ TIFFInitZIP(TIFF* tif, int scheme)
|
||||
|
||||
assert( (scheme == COMPRESSION_DEFLATE)
|
||||
|| (scheme == COMPRESSION_ADOBE_DEFLATE));
|
||||
#ifdef NDEBUG
|
||||
(void)scheme;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Merge codec-specific tag information.
|
||||
@@ -397,7 +636,7 @@ TIFFInitZIP(TIFF* tif, int scheme)
|
||||
/*
|
||||
* Allocate state block so tag methods have storage to record values.
|
||||
*/
|
||||
tif->tif_data = (uint8*) _TIFFmalloc(sizeof (ZIPState));
|
||||
tif->tif_data = (uint8*) _TIFFcalloc(sizeof (ZIPState), 1);
|
||||
if (tif->tif_data == NULL)
|
||||
goto bad;
|
||||
sp = ZState(tif);
|
||||
@@ -417,6 +656,11 @@ TIFFInitZIP(TIFF* tif, int scheme)
|
||||
/* Default values for codec-specific fields */
|
||||
sp->zipquality = Z_DEFAULT_COMPRESSION; /* default comp. level */
|
||||
sp->state = 0;
|
||||
#if LIBDEFLATE_SUPPORT
|
||||
sp->subcodec = DEFLATE_SUBCODEC_LIBDEFLATE;
|
||||
#else
|
||||
sp->subcodec = DEFLATE_SUBCODEC_ZLIB;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Install codec methods.
|
||||
|
||||
Vendored
+4
-2
@@ -260,7 +260,8 @@ ZSTDEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
|
||||
}
|
||||
if( sp->out_buffer.pos == sp->out_buffer.size ) {
|
||||
tif->tif_rawcc = tif->tif_rawdatasize;
|
||||
TIFFFlushData1(tif);
|
||||
if (!TIFFFlushData1(tif))
|
||||
return 0;
|
||||
sp->out_buffer.dst = tif->tif_rawcp;
|
||||
sp->out_buffer.pos = 0;
|
||||
}
|
||||
@@ -289,7 +290,8 @@ ZSTDPostEncode(TIFF* tif)
|
||||
}
|
||||
if( sp->out_buffer.pos > 0 ) {
|
||||
tif->tif_rawcc = sp->out_buffer.pos;
|
||||
TIFFFlushData1(tif);
|
||||
if (!TIFFFlushData1(tif))
|
||||
return 0;
|
||||
sp->out_buffer.dst = tif->tif_rawcp;
|
||||
sp->out_buffer.pos = 0;
|
||||
}
|
||||
|
||||
Vendored
+111
-6
@@ -119,6 +119,11 @@ typedef struct {
|
||||
* Tag data type information.
|
||||
*
|
||||
* Note: RATIONALs are the ratio of two 32-bit integer values.
|
||||
*--:
|
||||
* Note2: TIFF_IFD8 data type is used in tiffFields[]-tag definition in order to distinguish the write-handling
|
||||
of those tags between ClassicTIFF and BigTiff:
|
||||
For ClassicTIFF libtiff writes a 32-bit value and the TIFF_IFD type-id into the file
|
||||
For BigTIFF libtiff writes a 64-bit value and the TIFF_IFD8 type-id into the file
|
||||
*/
|
||||
typedef enum {
|
||||
TIFF_NOTYPE = 0, /* placeholder */
|
||||
@@ -375,6 +380,7 @@ typedef enum {
|
||||
January 2004 */
|
||||
#define TIFFTAG_OPIIMAGEID 32781 /* %OPI ImageID
|
||||
[Adobe TIFF technote] */
|
||||
#define TIFFTAG_TIFFANNOTATIONDATA 32932 /* http://web.archive.org/web/20050309141348/http://www.kofile.com/support%20pro/faqs/annospec.htm */
|
||||
/* tags 32952-32956 are private tags registered to Island Graphics */
|
||||
#define TIFFTAG_REFPTS 32953 /* image reference points */
|
||||
#define TIFFTAG_REGIONTACKPOINT 32954 /* region-xform tack point */
|
||||
@@ -409,8 +415,23 @@ typedef enum {
|
||||
#define TIFFTAG_CFAPATTERN 33422 /* color filter array pattern */
|
||||
/* tag 33432 is listed in the 6.0 spec w/ unknown ownership */
|
||||
#define TIFFTAG_COPYRIGHT 33432 /* copyright string */
|
||||
/* Tags 33445-33452 are used for GEL fileformat, see
|
||||
* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf
|
||||
*/
|
||||
#define TIFFTAG_MD_FILETAG 33445 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */
|
||||
#define TIFFTAG_MD_SCALEPIXEL 33446 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */
|
||||
#define TIFFTAG_MD_COLORTABLE 33447 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */
|
||||
#define TIFFTAG_MD_LABNAME 33448 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */
|
||||
#define TIFFTAG_MD_SAMPLEINFO 33449 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */
|
||||
#define TIFFTAG_MD_PREPDATE 33450 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */
|
||||
#define TIFFTAG_MD_PREPTIME 33451 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */
|
||||
#define TIFFTAG_MD_FILEUNITS 33452 /* http://research.stowers-institute.org/mcm/efg/ScientificSoftware/Utility/TiffTags/GEL-FileFormat.pdf */
|
||||
/* IPTC TAG from RichTIFF specifications */
|
||||
#define TIFFTAG_RICHTIFFIPTC 33723
|
||||
#define TIFFTAG_INGR_PACKET_DATA_TAG 33918 /* Intergraph Application specific storage. */
|
||||
#define TIFFTAG_INGR_FLAG_REGISTERS 33919 /* Intergraph Application specific flags. */
|
||||
#define TIFFTAG_IRASB_TRANSORMATION_MATRIX 33920 /* Originally part of Intergraph's GeoTIFF tags, but likely understood by IrasB only. */
|
||||
#define TIFFTAG_MODELTIEPOINTTAG 33922 /* GeoTIFF */
|
||||
/* 34016-34029 are reserved for ANSI IT8 TIFF/IT <dkelly@apago.com) */
|
||||
#define TIFFTAG_IT8SITE 34016 /* site name */
|
||||
#define TIFFTAG_IT8COLORSEQUENCE 34017 /* color seq. [RGB,CMYK,etc] */
|
||||
@@ -432,6 +453,7 @@ typedef enum {
|
||||
#define TIFFTAG_IT8CMYKEQUIVALENT 34032 /* CMYK color equivalents */
|
||||
/* tags 34232-34236 are private tags registered to Texas Instruments */
|
||||
#define TIFFTAG_FRAMECOUNT 34232 /* Sequence Frame Count */
|
||||
#define TIFFTAG_MODELTRANSFORMATIONTAG 34264 /* Used in interchangeable GeoTIFF files */
|
||||
/* tag 34377 is private tag registered to Adobe for PhotoShop */
|
||||
#define TIFFTAG_PHOTOSHOP 34377
|
||||
/* tags 34665, 34853 and 40965 are documented in EXIF specification */
|
||||
@@ -451,7 +473,15 @@ typedef enum {
|
||||
#define TIFFTAG_STONITS 37439 /* Sample value to Nits */
|
||||
/* tag 34929 is a private tag registered to FedEx */
|
||||
#define TIFFTAG_FEDEX_EDR 34929 /* unknown use */
|
||||
#define TIFFTAG_IMAGESOURCEDATA 37724 /* http://justsolve.archiveteam.org/wiki/PSD, http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/ */
|
||||
#define TIFFTAG_INTEROPERABILITYIFD 40965 /* Pointer to Interoperability private directory */
|
||||
#define TIFFTAG_GDAL_METADATA 42112 /* Used by the GDAL library */
|
||||
#define TIFFTAG_GDAL_NODATA 42113 /* Used by the GDAL library */
|
||||
#define TIFFTAG_OCE_SCANJOB_DESCRIPTION 50215 /* Used in the Oce scanning process */
|
||||
#define TIFFTAG_OCE_APPLICATION_SELECTOR 50216 /* Used in the Oce scanning process. */
|
||||
#define TIFFTAG_OCE_IDENTIFICATION_NUMBER 50217
|
||||
#define TIFFTAG_OCE_IMAGELOGIC_CHARACTERISTICS 50218
|
||||
|
||||
/* tags 50674 to 50677 are reserved for ESRI */
|
||||
#define TIFFTAG_LERC_PARAMETERS 50674 /* Stores LERC version and additional compression method */
|
||||
/* Adobe Digital Negative (DNG) format tags */
|
||||
@@ -535,6 +565,17 @@ typedef enum {
|
||||
into ICC profile space */
|
||||
#define TIFFTAG_CURRENTICCPROFILE 50833 /* & */
|
||||
#define TIFFTAG_CURRENTPREPROFILEMATRIX 50834 /* & */
|
||||
|
||||
#define TIFFTAG_RPCCOEFFICIENT 50844 /* Define by GDAL for geospatial georeferencing through RPC: http://geotiff.maptools.org/rpc_prop.html */
|
||||
|
||||
#define TIFFTAG_ALIAS_LAYER_METADATA 50784 /* Alias Sketchbook Pro layer usage description. */
|
||||
|
||||
/* GeoTIFF DGIWG */
|
||||
#define TIFFTAG_TIFF_RSID 50908 /* https://www.awaresystems.be/imaging/tiff/tifftags/tiff_rsid.html */
|
||||
#define TIFFTAG_GEO_METADATA 50909 /* https://www.awaresystems.be/imaging/tiff/tifftags/geo_metadata.html */
|
||||
|
||||
#define TIFFTAG_EXTRACAMERAPROFILES 50933 /* http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/photoshop/pdfs/dng_spec_1.4.0.0.pdf */
|
||||
|
||||
/* tag 65535 is an undefined tag used by Eastman Kodak */
|
||||
#define TIFFTAG_DCSHUESHIFTVALUES 65535 /* hue shift correction data */
|
||||
|
||||
@@ -615,8 +656,11 @@ typedef enum {
|
||||
#define LERC_ADD_COMPRESSION_DEFLATE 1
|
||||
#define LERC_ADD_COMPRESSION_ZSTD 2
|
||||
#define TIFFTAG_LERC_MAXZERROR 65567 /* LERC maximum error */
|
||||
#define TIFFTAG_WEBP_LEVEL 65568 /* WebP compression level: WARNING not registered in Adobe-maintained registry */
|
||||
#define TIFFTAG_WEBP_LOSSLESS 65569 /* WebP lossless/lossy : WARNING not registered in Adobe-maintained registry */
|
||||
#define TIFFTAG_WEBP_LEVEL 65568 /* WebP compression level */
|
||||
#define TIFFTAG_WEBP_LOSSLESS 65569 /* WebP lossless/lossy */
|
||||
#define TIFFTAG_DEFLATE_SUBCODEC 65570 /* ZIP codec: to get/set the sub-codec to use. Will default to libdeflate when available */
|
||||
#define DEFLATE_SUBCODEC_ZLIB 0
|
||||
#define DEFLATE_SUBCODEC_LIBDEFLATE 1
|
||||
|
||||
/*
|
||||
* EXIF tags
|
||||
@@ -626,8 +670,8 @@ typedef enum {
|
||||
#define EXIFTAG_EXPOSUREPROGRAM 34850 /* Exposure program */
|
||||
#define EXIFTAG_SPECTRALSENSITIVITY 34852 /* Spectral sensitivity */
|
||||
#define EXIFTAG_ISOSPEEDRATINGS 34855 /* ISO speed rating */
|
||||
#define EXIFTAG_OECF 34856 /* Optoelectric conversion
|
||||
factor */
|
||||
#define EXIFTAG_PHOTOGRAPHICSENSITIVITY 34855 /* Photographic Sensitivity (new name for tag 34855) */
|
||||
#define EXIFTAG_OECF 34856 /* Optoelectric conversion factor */
|
||||
#define EXIFTAG_EXIFVERSION 36864 /* Exif version */
|
||||
#define EXIFTAG_DATETIMEORIGINAL 36867 /* Date and time of original
|
||||
data generation */
|
||||
@@ -679,10 +723,71 @@ typedef enum {
|
||||
#define EXIFTAG_SHARPNESS 41994 /* Sharpness */
|
||||
#define EXIFTAG_DEVICESETTINGDESCRIPTION 41995 /* Device settings description */
|
||||
#define EXIFTAG_SUBJECTDISTANCERANGE 41996 /* Subject distance range */
|
||||
#define EXIFTAG_GAINCONTROL 41991 /* Gain control */
|
||||
#define EXIFTAG_GAINCONTROL 41991 /* Gain control */
|
||||
#define EXIFTAG_IMAGEUNIQUEID 42016 /* Unique image ID */
|
||||
|
||||
/*--: New for EXIF-Version 2.32, May 2019 ... */
|
||||
#define EXIFTAG_SENSITIVITYTYPE 34864 /* The SensitivityType tag indicates which one of the parameters of ISO12232 is the PhotographicSensitivity tag. */
|
||||
#define EXIFTAG_STANDARDOUTPUTSENSITIVITY 34865 /* This tag indicates the standard output sensitivity value of a camera or input device defined in ISO 12232. */
|
||||
#define EXIFTAG_RECOMMENDEDEXPOSUREINDEX 34866 /* recommended exposure index */
|
||||
#define EXIFTAG_ISOSPEED 34867 /* ISO speed value */
|
||||
#define EXIFTAG_ISOSPEEDLATITUDEYYY 34868 /* ISO speed latitude yyy */
|
||||
#define EXIFTAG_ISOSPEEDLATITUDEZZZ 34869 /* ISO speed latitude zzz */
|
||||
#define EXIFTAG_OFFSETTIME 36880 /* offset from UTC of the time of DateTime tag. */
|
||||
#define EXIFTAG_OFFSETTIMEORIGINAL 36881 /* offset from UTC of the time of DateTimeOriginal tag. */
|
||||
#define EXIFTAG_OFFSETTIMEDIGITIZED 36882 /* offset from UTC of the time of DateTimeDigitized tag. */
|
||||
#define EXIFTAG_TEMPERATURE 37888 /* Temperature as the ambient situation at the shot in dergee Celsius */
|
||||
#define EXIFTAG_HUMIDITY 37889 /* Humidity as the ambient situation at the shot in percent */
|
||||
#define EXIFTAG_PRESSURE 37890 /* Pressure as the ambient situation at the shot hecto-Pascal (hPa) */
|
||||
#define EXIFTAG_WATERDEPTH 37891 /* WaterDepth as the ambient situation at the shot in meter (m) */
|
||||
#define EXIFTAG_ACCELERATION 37892 /* Acceleration (a scalar regardless of direction) as the ambient situation at the shot in units of mGal (10-5 m/s^2) */
|
||||
#define EXIFTAG_CAMERAELEVATIONANGLE 37893 /* Elevation/depression. angle of the orientation of the camera(imaging optical axis) as the ambient situation at the shot in degree from -180deg to +180deg. */
|
||||
#define EXIFTAG_CAMERAOWNERNAME 42032 /* owner of a camera */
|
||||
#define EXIFTAG_BODYSERIALNUMBER 42033 /* serial number of the body of the camera */
|
||||
#define EXIFTAG_LENSSPECIFICATION 42034 /* minimum focal length (in mm), maximum focal length (in mm), minimum F number in the minimum focal length, and minimum F number in the maximum focal length, */
|
||||
#define EXIFTAG_LENSMAKE 42035 /* the lens manufacturer */
|
||||
#define EXIFTAG_LENSMODEL 42036 /* the lens model name and model number */
|
||||
#define EXIFTAG_LENSSERIALNUMBER 42037 /* the serial number of the interchangeable lens */
|
||||
#define EXIFTAG_GAMMA 42240 /* value of coefficient gamma */
|
||||
#define EXIFTAG_COMPOSITEIMAGE 42080 /* composite image */
|
||||
#define EXIFTAG_SOURCEIMAGENUMBEROFCOMPOSITEIMAGE 42081 /* source image number of composite image */
|
||||
#define EXIFTAG_SOURCEEXPOSURETIMESOFCOMPOSITEIMAGE 42082 /* source exposure times of composite image */
|
||||
|
||||
/*
|
||||
* EXIF-GPS tags (Version 2.31, July 2016)
|
||||
*/
|
||||
#define GPSTAG_VERSIONID 0 /* Indicates the version of GPSInfoIFD. */
|
||||
#define GPSTAG_LATITUDEREF 1 /* Indicates whether the latitude is north or south latitude. */
|
||||
#define GPSTAG_LATITUDE 2 /* Indicates the latitude. */
|
||||
#define GPSTAG_LONGITUDEREF 3 /* Indicates whether the longitude is east or west longitude. */
|
||||
#define GPSTAG_LONGITUDE 4 /* Indicates the longitude. */
|
||||
#define GPSTAG_ALTITUDEREF 5 /* Indicates the altitude used as the reference altitude. */
|
||||
#define GPSTAG_ALTITUDE 6 /* Indicates the altitude based on the reference in GPSAltitudeRef. */
|
||||
#define GPSTAG_TIMESTAMP 7 /* Indicates the time as UTC (Coordinated Universal Time). */
|
||||
#define GPSTAG_SATELLITES 8 /* Indicates the GPS satellites used for measurements. */
|
||||
#define GPSTAG_STATUS 9 /* Indicates the status of the GPS receiver when the image is recorded. */
|
||||
#define GPSTAG_MEASUREMODE 10 /* Indicates the GPS measurement mode. */
|
||||
#define GPSTAG_DOP 11 /* Indicates the GPS DOP (data degree of precision). */
|
||||
#define GPSTAG_SPEEDREF 12 /* Indicates the unit used to express the GPS receiver speed of movement. */
|
||||
#define GPSTAG_SPEED 13 /* Indicates the speed of GPS receiver movement. */
|
||||
#define GPSTAG_TRACKREF 14 /* Indicates the reference for giving the direction of GPS receiver movement. */
|
||||
#define GPSTAG_TRACK 15 /* Indicates the direction of GPS receiver movement. */
|
||||
#define GPSTAG_IMGDIRECTIONREF 16 /* Indicates the reference for giving the direction of the image when it is captured. */
|
||||
#define GPSTAG_IMGDIRECTION 17 /* Indicates the direction of the image when it was captured. */
|
||||
#define GPSTAG_MAPDATUM 18 /* Indicates the geodetic survey data used by the GPS receiver. (e.g. WGS-84) */
|
||||
#define GPSTAG_DESTLATITUDEREF 19 /* Indicates whether the latitude of the destination point is north or south latitude. */
|
||||
#define GPSTAG_DESTLATITUDE 20 /* Indicates the latitude of the destination point. */
|
||||
#define GPSTAG_DESTLONGITUDEREF 21 /* Indicates whether the longitude of the destination point is east or west longitude. */
|
||||
#define GPSTAG_DESTLONGITUDE 22 /* Indicates the longitude of the destination point. */
|
||||
#define GPSTAG_DESTBEARINGREF 23 /* Indicates the reference used for giving the bearing to the destination point. */
|
||||
#define GPSTAG_DESTBEARING 24 /* Indicates the bearing to the destination point. */
|
||||
#define GPSTAG_DESTDISTANCEREF 25 /* Indicates the unit used to express the distance to the destination point. */
|
||||
#define GPSTAG_DESTDISTANCE 26 /* Indicates the distance to the destination point. */
|
||||
#define GPSTAG_PROCESSINGMETHOD 27 /* A character string recording the name of the method used for location finding. */
|
||||
#define GPSTAG_AREAINFORMATION 28 /* A character string recording the name of the GPS area. */
|
||||
#define GPSTAG_DATESTAMP 29 /* A character string recording date and time information relative to UTC (Coordinated Universal Time). */
|
||||
#define GPSTAG_DIFFERENTIAL 30 /* Indicates whether differential correction is applied to the GPS receiver. */
|
||||
#define GPSTAG_GPSHPOSITIONINGERROR 31 /* Indicates horizontal positioning errors in meters. */
|
||||
|
||||
#endif /* _TIFF_ */
|
||||
|
||||
/* vim: set ts=8 sts=8 sw=8 noet: */
|
||||
|
||||
Vendored
+3
@@ -87,6 +87,9 @@
|
||||
/* Support Deflate compression */
|
||||
#cmakedefine ZIP_SUPPORT 1
|
||||
|
||||
/* Support libdeflate enhanced compression */
|
||||
#cmakedefine LIBDEFLATE_SUPPORT 1
|
||||
|
||||
/* Support strip chopping (whether or not to convert single-strip uncompressed
|
||||
images to mutiple strips of ~8Kb to reduce memory usage) */
|
||||
#cmakedefine STRIPCHOP_DEFAULT 1
|
||||
|
||||
Vendored
+20
-6
@@ -261,8 +261,10 @@ typedef struct {
|
||||
#define LOGLUV_PUBLIC 1
|
||||
#endif
|
||||
|
||||
#if !defined(__GNUC__) && !defined(__attribute__)
|
||||
# define __attribute__(x) /*nothing*/
|
||||
#if defined(__GNUC__) || defined(__attribute__)
|
||||
# define TIFF_ATTRIBUTE(x) __attribute__(x)
|
||||
#else
|
||||
# define TIFF_ATTRIBUTE(x) /*nothing*/
|
||||
#endif
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
@@ -350,6 +352,7 @@ extern int TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap);
|
||||
extern int TIFFReadDirectory(TIFF* tif);
|
||||
extern int TIFFReadCustomDirectory(TIFF* tif, toff_t diroff, const TIFFFieldArray* infoarray);
|
||||
extern int TIFFReadEXIFDirectory(TIFF* tif, toff_t diroff);
|
||||
extern int TIFFReadGPSDirectory(TIFF* tif, toff_t diroff);
|
||||
extern uint64 TIFFScanlineSize64(TIFF* tif);
|
||||
extern tmsize_t TIFFScanlineSize(TIFF* tif);
|
||||
extern uint64 TIFFRasterScanlineSize64(TIFF* tif);
|
||||
@@ -400,6 +403,7 @@ extern void TIFFFreeDirectory(TIFF*);
|
||||
extern int TIFFCreateDirectory(TIFF*);
|
||||
extern int TIFFCreateCustomDirectory(TIFF*,const TIFFFieldArray*);
|
||||
extern int TIFFCreateEXIFDirectory(TIFF*);
|
||||
extern int TIFFCreateGPSDirectory(TIFF*);
|
||||
extern int TIFFLastDirectory(TIFF*);
|
||||
extern int TIFFSetDirectory(TIFF*, uint16);
|
||||
extern int TIFFSetSubDirectory(TIFF*, uint64);
|
||||
@@ -411,6 +415,8 @@ extern int TIFFWriteDirectory(TIFF *);
|
||||
extern int TIFFWriteCustomDirectory(TIFF *, uint64 *);
|
||||
extern int TIFFCheckpointDirectory(TIFF *);
|
||||
extern int TIFFRewriteDirectory(TIFF *);
|
||||
extern int TIFFDeferStrileArrayWriting(TIFF *);
|
||||
extern int TIFFForceStrileArrayWriting(TIFF* );
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern void TIFFPrintDirectory(TIFF*, FILE*, long = 0);
|
||||
@@ -448,10 +454,10 @@ extern TIFF* TIFFClientOpen(const char*, const char*,
|
||||
TIFFMapFileProc, TIFFUnmapFileProc);
|
||||
extern const char* TIFFFileName(TIFF*);
|
||||
extern const char* TIFFSetFileName(TIFF*, const char *);
|
||||
extern void TIFFError(const char*, const char*, ...) __attribute__((__format__ (__printf__,2,3)));
|
||||
extern void TIFFErrorExt(thandle_t, const char*, const char*, ...) __attribute__((__format__ (__printf__,3,4)));
|
||||
extern void TIFFWarning(const char*, const char*, ...) __attribute__((__format__ (__printf__,2,3)));
|
||||
extern void TIFFWarningExt(thandle_t, const char*, const char*, ...) __attribute__((__format__ (__printf__,3,4)));
|
||||
extern void TIFFError(const char*, const char*, ...) TIFF_ATTRIBUTE((__format__ (__printf__,2,3)));
|
||||
extern void TIFFErrorExt(thandle_t, const char*, const char*, ...) TIFF_ATTRIBUTE((__format__ (__printf__,3,4)));
|
||||
extern void TIFFWarning(const char*, const char*, ...) TIFF_ATTRIBUTE((__format__ (__printf__,2,3)));
|
||||
extern void TIFFWarningExt(thandle_t, const char*, const char*, ...) TIFF_ATTRIBUTE((__format__ (__printf__,3,4)));
|
||||
extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler);
|
||||
extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt);
|
||||
extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler);
|
||||
@@ -468,6 +474,9 @@ extern tmsize_t TIFFReadEncodedStrip(TIFF* tif, uint32 strip, void* buf, tmsize_
|
||||
extern tmsize_t TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size);
|
||||
extern tmsize_t TIFFReadEncodedTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size);
|
||||
extern tmsize_t TIFFReadRawTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size);
|
||||
extern int TIFFReadFromUserBuffer(TIFF* tif, uint32 strile,
|
||||
void* inbuf, tmsize_t insize,
|
||||
void* outbuf, tmsize_t outsize);
|
||||
extern tmsize_t TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc);
|
||||
extern tmsize_t TIFFWriteRawStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc);
|
||||
extern tmsize_t TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc);
|
||||
@@ -488,6 +497,11 @@ extern void TIFFSwabArrayOfDouble(double* dp, tmsize_t n);
|
||||
extern void TIFFReverseBits(uint8* cp, tmsize_t n);
|
||||
extern const unsigned char* TIFFGetBitRevTable(int);
|
||||
|
||||
extern uint64 TIFFGetStrileOffset(TIFF *tif, uint32 strile);
|
||||
extern uint64 TIFFGetStrileByteCount(TIFF *tif, uint32 strile);
|
||||
extern uint64 TIFFGetStrileOffsetWithErr(TIFF *tif, uint32 strile, int *pbErr);
|
||||
extern uint64 TIFFGetStrileByteCountWithErr(TIFF *tif, uint32 strile, int *pbErr);
|
||||
|
||||
#ifdef LOGLUV_PUBLIC
|
||||
#define U_NEU 0.210526316
|
||||
#define V_NEU 0.473684211
|
||||
|
||||
Vendored
+22
-1
@@ -77,6 +77,19 @@ extern int snprintf(char* str, size_t size, const char* format, ...);
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0))
|
||||
#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1)
|
||||
|
||||
/*
|
||||
* Largest 32-bit unsigned integer value.
|
||||
*/
|
||||
#define TIFF_UINT32_MAX 0xFFFFFFFFU
|
||||
|
||||
/*
|
||||
* Largest 64-bit unsigned integer value.
|
||||
*/
|
||||
#define TIFF_UINT64_MAX (((uint64)(TIFF_UINT32_MAX)) << 32 | TIFF_UINT32_MAX)
|
||||
|
||||
typedef struct client_info {
|
||||
struct client_info *next;
|
||||
void *data;
|
||||
@@ -127,6 +140,9 @@ struct tiff {
|
||||
#define TIFF_DIRTYSTRIP 0x200000U /* stripoffsets/stripbytecount dirty*/
|
||||
#define TIFF_PERSAMPLE 0x400000U /* get/set per sample tags as arrays */
|
||||
#define TIFF_BUFFERMMAP 0x800000U /* read buffer (tif_rawdata) points into mmap() memory */
|
||||
#define TIFF_DEFERSTRILELOAD 0x1000000U /* defer strip/tile offset/bytecount array loading. */
|
||||
#define TIFF_LAZYSTRILELOAD 0x2000000U /* lazy/ondemand loading of strip/tile offset/bytecount values. Only used if TIFF_DEFERSTRILELOAD is set and in read-only mode */
|
||||
#define TIFF_CHOPPEDUPARRAYS 0x4000000U /* set when allocChoppedUpStripArrays() has modified strip array */
|
||||
uint64 tif_diroff; /* file offset of current directory */
|
||||
uint64 tif_nextdiroff; /* file offset of following directory */
|
||||
uint64* tif_dirlist; /* list of offsets to already seen directories to prevent IFD looping */
|
||||
@@ -258,7 +274,7 @@ struct tiff {
|
||||
#define TIFFhowmany8_64(x) (((x)&0x07)?((uint64)(x)>>3)+1:(uint64)(x)>>3)
|
||||
#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 *unsigned* integer overflow. This macro is not safe for *signed* integer types */
|
||||
#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))
|
||||
@@ -351,6 +367,9 @@ extern uint32 _TIFFDefaultStripSize(TIFF* tif, uint32 s);
|
||||
extern void _TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th);
|
||||
extern int _TIFFDataSize(TIFFDataType type);
|
||||
|
||||
/*--: Rational2Double: Return size of TIFFSetGetFieldType in bytes. */
|
||||
extern int _TIFFSetGetFieldSize(TIFFSetGetFieldType setgettype);
|
||||
|
||||
extern void _TIFFsetByteArray(void**, void*, uint32);
|
||||
extern void _TIFFsetString(char**, char*);
|
||||
extern void _TIFFsetShortArray(uint16**, uint16*, uint32);
|
||||
@@ -368,6 +387,8 @@ extern TIFFErrorHandlerExt _TIFFerrorHandlerExt;
|
||||
|
||||
extern uint32 _TIFFMultiply32(TIFF*, uint32, uint32, const char*);
|
||||
extern uint64 _TIFFMultiply64(TIFF*, uint64, uint64, const char*);
|
||||
extern tmsize_t _TIFFMultiplySSize(TIFF*, tmsize_t, tmsize_t, const char*);
|
||||
extern tmsize_t _TIFFCastUInt64ToSSize(TIFF*, uint64, const char*);
|
||||
extern void* _TIFFCheckMalloc(TIFF*, tmsize_t, tmsize_t, const char*);
|
||||
extern void* _TIFFCheckRealloc(TIFF*, void*, tmsize_t, tmsize_t, const char*);
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.10\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
|
||||
#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.2.0\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
|
||||
/*
|
||||
* This define can be used in code that requires
|
||||
* compilation-related definitions specific to a
|
||||
@@ -6,4 +6,4 @@
|
||||
* version checking should be done based on the
|
||||
* string returned by TIFFGetVersion.
|
||||
*/
|
||||
#define TIFFLIB_VERSION 20181110
|
||||
#define TIFFLIB_VERSION 20201219
|
||||
|
||||
Vendored
+2
-2
@@ -34,7 +34,7 @@ endif()
|
||||
|
||||
add_definitions(-DWEBP_USE_THREAD)
|
||||
|
||||
add_library(${WEBP_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
||||
add_library(${WEBP_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
|
||||
if(ANDROID)
|
||||
target_link_libraries(${WEBP_LIBRARY} ${CPUFEATURES_LIBRARIES})
|
||||
endif()
|
||||
@@ -59,6 +59,6 @@ if(ENABLE_SOLUTION_FOLDERS)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(${WEBP_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
ocv_install_target(${WEBP_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||
endif()
|
||||
|
||||
|
||||
Vendored
+24
-29
@@ -25,21 +25,16 @@
|
||||
static int EmitYUV(const VP8Io* const io, WebPDecParams* const p) {
|
||||
WebPDecBuffer* output = p->output;
|
||||
const WebPYUVABuffer* const buf = &output->u.YUVA;
|
||||
uint8_t* const y_dst = buf->y + io->mb_y * buf->y_stride;
|
||||
uint8_t* const u_dst = buf->u + (io->mb_y >> 1) * buf->u_stride;
|
||||
uint8_t* const v_dst = buf->v + (io->mb_y >> 1) * buf->v_stride;
|
||||
uint8_t* const y_dst = buf->y + (size_t)io->mb_y * buf->y_stride;
|
||||
uint8_t* const u_dst = buf->u + (size_t)(io->mb_y >> 1) * buf->u_stride;
|
||||
uint8_t* const v_dst = buf->v + (size_t)(io->mb_y >> 1) * buf->v_stride;
|
||||
const int mb_w = io->mb_w;
|
||||
const int mb_h = io->mb_h;
|
||||
const int uv_w = (mb_w + 1) / 2;
|
||||
const int uv_h = (mb_h + 1) / 2;
|
||||
int j;
|
||||
for (j = 0; j < mb_h; ++j) {
|
||||
memcpy(y_dst + j * buf->y_stride, io->y + j * io->y_stride, mb_w);
|
||||
}
|
||||
for (j = 0; j < uv_h; ++j) {
|
||||
memcpy(u_dst + j * buf->u_stride, io->u + j * io->uv_stride, uv_w);
|
||||
memcpy(v_dst + j * buf->v_stride, io->v + j * io->uv_stride, uv_w);
|
||||
}
|
||||
WebPCopyPlane(io->y, io->y_stride, y_dst, buf->y_stride, mb_w, mb_h);
|
||||
WebPCopyPlane(io->u, io->uv_stride, u_dst, buf->u_stride, uv_w, uv_h);
|
||||
WebPCopyPlane(io->v, io->uv_stride, v_dst, buf->v_stride, uv_w, uv_h);
|
||||
return io->mb_h;
|
||||
}
|
||||
|
||||
@@ -47,7 +42,7 @@ static int EmitYUV(const VP8Io* const io, WebPDecParams* const p) {
|
||||
static int EmitSampledRGB(const VP8Io* const io, WebPDecParams* const p) {
|
||||
WebPDecBuffer* const output = p->output;
|
||||
WebPRGBABuffer* const buf = &output->u.RGBA;
|
||||
uint8_t* const dst = buf->rgba + io->mb_y * buf->stride;
|
||||
uint8_t* const dst = buf->rgba + (size_t)io->mb_y * buf->stride;
|
||||
WebPSamplerProcessPlane(io->y, io->y_stride,
|
||||
io->u, io->v, io->uv_stride,
|
||||
dst, buf->stride, io->mb_w, io->mb_h,
|
||||
@@ -62,7 +57,7 @@ static int EmitSampledRGB(const VP8Io* const io, WebPDecParams* const p) {
|
||||
static int EmitFancyRGB(const VP8Io* const io, WebPDecParams* const p) {
|
||||
int num_lines_out = io->mb_h; // a priori guess
|
||||
const WebPRGBABuffer* const buf = &p->output->u.RGBA;
|
||||
uint8_t* dst = buf->rgba + io->mb_y * buf->stride;
|
||||
uint8_t* dst = buf->rgba + (size_t)io->mb_y * buf->stride;
|
||||
WebPUpsampleLinePairFunc upsample = WebPUpsamplers[p->output->colorspace];
|
||||
const uint8_t* cur_y = io->y;
|
||||
const uint8_t* cur_u = io->u;
|
||||
@@ -133,7 +128,7 @@ static int EmitAlphaYUV(const VP8Io* const io, WebPDecParams* const p,
|
||||
const WebPYUVABuffer* const buf = &p->output->u.YUVA;
|
||||
const int mb_w = io->mb_w;
|
||||
const int mb_h = io->mb_h;
|
||||
uint8_t* dst = buf->a + io->mb_y * buf->a_stride;
|
||||
uint8_t* dst = buf->a + (size_t)io->mb_y * buf->a_stride;
|
||||
int j;
|
||||
(void)expected_num_lines_out;
|
||||
assert(expected_num_lines_out == mb_h);
|
||||
@@ -186,7 +181,7 @@ static int EmitAlphaRGB(const VP8Io* const io, WebPDecParams* const p,
|
||||
(colorspace == MODE_ARGB || colorspace == MODE_Argb);
|
||||
const WebPRGBABuffer* const buf = &p->output->u.RGBA;
|
||||
int num_rows;
|
||||
const int start_y = GetAlphaSourceRow(io, &alpha, &num_rows);
|
||||
const size_t start_y = GetAlphaSourceRow(io, &alpha, &num_rows);
|
||||
uint8_t* const base_rgba = buf->rgba + start_y * buf->stride;
|
||||
uint8_t* const dst = base_rgba + (alpha_first ? 0 : 3);
|
||||
const int has_alpha = WebPDispatchAlpha(alpha, io->width, mb_w,
|
||||
@@ -210,7 +205,7 @@ static int EmitAlphaRGBA4444(const VP8Io* const io, WebPDecParams* const p,
|
||||
const WEBP_CSP_MODE colorspace = p->output->colorspace;
|
||||
const WebPRGBABuffer* const buf = &p->output->u.RGBA;
|
||||
int num_rows;
|
||||
const int start_y = GetAlphaSourceRow(io, &alpha, &num_rows);
|
||||
const size_t start_y = GetAlphaSourceRow(io, &alpha, &num_rows);
|
||||
uint8_t* const base_rgba = buf->rgba + start_y * buf->stride;
|
||||
#if (WEBP_SWAP_16BIT_CSP == 1)
|
||||
uint8_t* alpha_dst = base_rgba;
|
||||
@@ -276,9 +271,9 @@ static int EmitRescaledYUV(const VP8Io* const io, WebPDecParams* const p) {
|
||||
static int EmitRescaledAlphaYUV(const VP8Io* const io, WebPDecParams* const p,
|
||||
int expected_num_lines_out) {
|
||||
const WebPYUVABuffer* const buf = &p->output->u.YUVA;
|
||||
uint8_t* const dst_a = buf->a + p->last_y * buf->a_stride;
|
||||
uint8_t* const dst_a = buf->a + (size_t)p->last_y * buf->a_stride;
|
||||
if (io->a != NULL) {
|
||||
uint8_t* const dst_y = buf->y + p->last_y * buf->y_stride;
|
||||
uint8_t* const dst_y = buf->y + (size_t)p->last_y * buf->y_stride;
|
||||
const int num_lines_out = Rescale(io->a, io->width, io->mb_h, p->scaler_a);
|
||||
assert(expected_num_lines_out == num_lines_out);
|
||||
if (num_lines_out > 0) { // unmultiply the Y
|
||||
@@ -356,7 +351,7 @@ static int ExportRGB(WebPDecParams* const p, int y_pos) {
|
||||
const WebPYUV444Converter convert =
|
||||
WebPYUV444Converters[p->output->colorspace];
|
||||
const WebPRGBABuffer* const buf = &p->output->u.RGBA;
|
||||
uint8_t* dst = buf->rgba + y_pos * buf->stride;
|
||||
uint8_t* dst = buf->rgba + (size_t)y_pos * buf->stride;
|
||||
int num_lines_out = 0;
|
||||
// For RGB rescaling, because of the YUV420, current scan position
|
||||
// U/V can be +1/-1 line from the Y one. Hence the double test.
|
||||
@@ -383,15 +378,15 @@ static int EmitRescaledRGB(const VP8Io* const io, WebPDecParams* const p) {
|
||||
while (j < mb_h) {
|
||||
const int y_lines_in =
|
||||
WebPRescalerImport(p->scaler_y, mb_h - j,
|
||||
io->y + j * io->y_stride, io->y_stride);
|
||||
io->y + (size_t)j * io->y_stride, io->y_stride);
|
||||
j += y_lines_in;
|
||||
if (WebPRescaleNeededLines(p->scaler_u, uv_mb_h - uv_j)) {
|
||||
const int u_lines_in =
|
||||
WebPRescalerImport(p->scaler_u, uv_mb_h - uv_j,
|
||||
io->u + uv_j * io->uv_stride, io->uv_stride);
|
||||
const int v_lines_in =
|
||||
WebPRescalerImport(p->scaler_v, uv_mb_h - uv_j,
|
||||
io->v + uv_j * io->uv_stride, io->uv_stride);
|
||||
const int u_lines_in = WebPRescalerImport(
|
||||
p->scaler_u, uv_mb_h - uv_j, io->u + (size_t)uv_j * io->uv_stride,
|
||||
io->uv_stride);
|
||||
const int v_lines_in = WebPRescalerImport(
|
||||
p->scaler_v, uv_mb_h - uv_j, io->v + (size_t)uv_j * io->uv_stride,
|
||||
io->uv_stride);
|
||||
(void)v_lines_in; // remove a gcc warning
|
||||
assert(u_lines_in == v_lines_in);
|
||||
uv_j += u_lines_in;
|
||||
@@ -403,7 +398,7 @@ static int EmitRescaledRGB(const VP8Io* const io, WebPDecParams* const p) {
|
||||
|
||||
static int ExportAlpha(WebPDecParams* const p, int y_pos, int max_lines_out) {
|
||||
const WebPRGBABuffer* const buf = &p->output->u.RGBA;
|
||||
uint8_t* const base_rgba = buf->rgba + y_pos * buf->stride;
|
||||
uint8_t* const base_rgba = buf->rgba + (size_t)y_pos * buf->stride;
|
||||
const WEBP_CSP_MODE colorspace = p->output->colorspace;
|
||||
const int alpha_first =
|
||||
(colorspace == MODE_ARGB || colorspace == MODE_Argb);
|
||||
@@ -431,7 +426,7 @@ static int ExportAlpha(WebPDecParams* const p, int y_pos, int max_lines_out) {
|
||||
static int ExportAlphaRGBA4444(WebPDecParams* const p, int y_pos,
|
||||
int max_lines_out) {
|
||||
const WebPRGBABuffer* const buf = &p->output->u.RGBA;
|
||||
uint8_t* const base_rgba = buf->rgba + y_pos * buf->stride;
|
||||
uint8_t* const base_rgba = buf->rgba + (size_t)y_pos * buf->stride;
|
||||
#if (WEBP_SWAP_16BIT_CSP == 1)
|
||||
uint8_t* alpha_dst = base_rgba;
|
||||
#else
|
||||
@@ -470,7 +465,7 @@ static int EmitRescaledAlphaRGB(const VP8Io* const io, WebPDecParams* const p,
|
||||
int lines_left = expected_num_out_lines;
|
||||
const int y_end = p->last_y + lines_left;
|
||||
while (lines_left > 0) {
|
||||
const int row_offset = scaler->src_y - io->mb_y;
|
||||
const int64_t row_offset = (int64_t)scaler->src_y - io->mb_y;
|
||||
WebPRescalerImport(scaler, io->mb_h + io->mb_y - scaler->src_y,
|
||||
io->a + row_offset * io->width, io->width);
|
||||
lines_left -= p->emit_alpha_row(p, y_end - lines_left, lines_left);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user