Compare commits
1371 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db6d8fca59 | ||
|
|
f15ef33768 | ||
|
|
1f79c7c8c8 | ||
|
|
bec45b162b | ||
|
|
80bbd3908f | ||
|
|
665c96edaa | ||
|
|
3ebcc3206f | ||
|
|
44320a210b | ||
|
|
a8b6ea2f8d | ||
|
|
96869f4b6e | ||
|
|
f64b36fd57 | ||
|
|
89a3f970da | ||
|
|
feccdcf8c8 | ||
|
|
c69a1cd7a0 | ||
|
|
3b7015d5d8 | ||
|
|
cab2a8503e | ||
|
|
eb319ed8a4 | ||
|
|
dcf9f15d6e | ||
|
|
8b5a0093ee | ||
|
|
0e94025ac7 | ||
|
|
c60d662ee4 | ||
|
|
3af282df3c | ||
|
|
dd7f03be56 | ||
|
|
cbc4b53169 | ||
|
|
ffd9d052f6 | ||
|
|
cbc9970ecb | ||
|
|
2b7a391672 | ||
|
|
8f7f49a014 | ||
|
|
c4930d8b0d | ||
|
|
d51e6c2f6b | ||
|
|
6842c7c023 | ||
|
|
6e6b28c3ce | ||
|
|
b9c4b58ab2 | ||
|
|
62999d7708 | ||
|
|
ceb552a9c9 | ||
|
|
e59196dbdf | ||
|
|
3f764b7253 | ||
|
|
4c773cff16 | ||
|
|
a29d6b4113 | ||
|
|
b329697ded | ||
|
|
2a6b8316fc | ||
|
|
e2dd3e3e5c | ||
|
|
0f4469c52f | ||
|
|
402a715f82 | ||
|
|
306add8b78 | ||
|
|
9665f5e3f9 | ||
|
|
ea1eea4742 | ||
|
|
3ebcf7cf86 | ||
|
|
803b5d24a8 | ||
|
|
eca0637c81 | ||
|
|
55620c6ef2 | ||
|
|
2240974d5d | ||
|
|
bbd9b71171 | ||
|
|
1d4c51a0ac | ||
|
|
72a3cc0ecd | ||
|
|
eb8d096ba6 | ||
|
|
339589f3cd | ||
|
|
fe77fa22d9 | ||
|
|
88b6c97568 | ||
|
|
0a9a252654 | ||
|
|
de26249a99 | ||
|
|
a6efae1488 | ||
|
|
e947139c7c | ||
|
|
bdc7650b9e | ||
|
|
d729f4da9c | ||
|
|
eb66974f3a | ||
|
|
f5644c3498 | ||
|
|
55e328ecb8 | ||
|
|
3d5189891b | ||
|
|
bdb36e1a14 | ||
|
|
022a9016df | ||
|
|
e408761dda | ||
|
|
9b012bd026 | ||
|
|
0713c1bb54 | ||
|
|
2e2ce5a1da | ||
|
|
684ace1924 | ||
|
|
d92949b0ac | ||
|
|
43513893f0 | ||
|
|
a1a920cc51 | ||
|
|
88b90bdc07 | ||
|
|
cce13c767e | ||
|
|
fe80ec2275 | ||
|
|
2261e1e408 | ||
|
|
eddc355d18 | ||
|
|
29823fa9a6 | ||
|
|
9c168ad23b | ||
|
|
f6d7b7768b | ||
|
|
bc3c1685a7 | ||
|
|
19224b2252 | ||
|
|
40dd3146cd | ||
|
|
5d87f6ddff | ||
|
|
d2a7495012 | ||
|
|
b7c8c86d6a | ||
|
|
e31e49478c | ||
|
|
80cb26444a | ||
|
|
a4940d1396 | ||
|
|
32760451fe | ||
|
|
fa8bcb825c | ||
|
|
580f391537 | ||
|
|
46a0392cf3 | ||
|
|
26dd86bd89 | ||
|
|
927a10db05 | ||
|
|
cdcac99f6d | ||
|
|
8951cf01fe | ||
|
|
f7c11051de | ||
|
|
9d77dad4c9 | ||
|
|
aecea388c7 | ||
|
|
493be61707 | ||
|
|
779bd68d20 | ||
|
|
d13df21341 | ||
|
|
c71ab2f7c2 | ||
|
|
983503eddf | ||
|
|
aee4f72160 | ||
|
|
5ead57a34a | ||
|
|
489583f516 | ||
|
|
bc79e0680a | ||
|
|
8a74848a23 | ||
|
|
a8ab3424c7 | ||
|
|
3728aa01d8 | ||
|
|
821455542c | ||
|
|
d762c19b98 | ||
|
|
2472bc7119 | ||
|
|
3da10338c6 | ||
|
|
a81f542726 | ||
|
|
73821bff78 | ||
|
|
23843313eb | ||
|
|
b7d6e84d6a | ||
|
|
a8fb48b528 | ||
|
|
88c7e30045 | ||
|
|
d7a25595ce | ||
|
|
cf55f0b533 | ||
|
|
fced14c7b4 | ||
|
|
495e43426e | ||
|
|
5ef463056a | ||
|
|
c728cfd8f2 | ||
|
|
5de454b291 | ||
|
|
5033f3e19a | ||
|
|
7f4a81b769 | ||
|
|
da13af6b8d | ||
|
|
d88f7ddfbe | ||
|
|
bc56b754e1 | ||
|
|
52ded87680 | ||
|
|
64086281b3 | ||
|
|
1419852c42 | ||
|
|
1b3fd7eead | ||
|
|
a3c3bbc2f4 | ||
|
|
0bf325b8ba | ||
|
|
6a61c1e6dc | ||
|
|
1e9cbbad8a | ||
|
|
3b489c3af7 | ||
|
|
976fd9687e | ||
|
|
b844eaa360 | ||
|
|
3402a66a22 | ||
|
|
78df2e6115 | ||
|
|
6e8220eddc | ||
|
|
90d6c3824b | ||
|
|
2a9f0cf36c | ||
|
|
333e9187c8 | ||
|
|
e3cb4eb05d | ||
|
|
05524e671e | ||
|
|
715bb41ead | ||
|
|
5829cb2398 | ||
|
|
c39ec149e8 | ||
|
|
a4ecaacde6 | ||
|
|
f18f81b7e2 | ||
|
|
989630f70c | ||
|
|
5996a25e2f | ||
|
|
1e247ac854 | ||
|
|
a758460175 | ||
|
|
8940e6ca86 | ||
|
|
b775351012 | ||
|
|
e47364ac56 | ||
|
|
24e92e9fc0 | ||
|
|
72130be99f | ||
|
|
1a45b81fa2 | ||
|
|
e5eaf37440 | ||
|
|
771886c192 | ||
|
|
a32b3eca99 | ||
|
|
29d30cb855 | ||
|
|
35db75ea3c | ||
|
|
393bac6de4 | ||
|
|
b0a9cca1e3 | ||
|
|
425c5a57cf | ||
|
|
dab6b8a1a3 | ||
|
|
343478622d | ||
|
|
f57b8a6357 | ||
|
|
66129dc660 | ||
|
|
06296e80c9 | ||
|
|
61976bd8a9 | ||
|
|
4dae78f498 | ||
|
|
230d09dbed | ||
|
|
6887f05d19 | ||
|
|
ff6961f3d2 | ||
|
|
714839d402 | ||
|
|
beb0b33764 | ||
|
|
b1398cba43 | ||
|
|
ac9a92ebbd | ||
|
|
06fa20d407 | ||
|
|
0816d086b5 | ||
|
|
fe9c907b45 | ||
|
|
d76ba910e9 | ||
|
|
d0c9f0cffd | ||
|
|
8666f4f94c | ||
|
|
4d2ff7dad7 | ||
|
|
9e5b681195 | ||
|
|
0c989d9e90 | ||
|
|
4186162665 | ||
|
|
c2caad07bc | ||
|
|
72a8ca0d8e | ||
|
|
9fe22dac31 | ||
|
|
ffb2b6e200 | ||
|
|
9a341f803f | ||
|
|
241ad88b7d | ||
|
|
990342cd57 | ||
|
|
fdd625efa5 | ||
|
|
ef9a4e05ba | ||
|
|
0cfc4c17b7 | ||
|
|
51d6bb30cf | ||
|
|
8bad4251a9 | ||
|
|
26c6606772 | ||
|
|
0d0705f445 | ||
|
|
377955e606 | ||
|
|
79241e3415 | ||
|
|
b1068fa2da | ||
|
|
832b1fc5d3 | ||
|
|
6f92ff617a | ||
|
|
f67c04c05e | ||
|
|
de23dd8068 | ||
|
|
c8b0226d91 | ||
|
|
79df67debb | ||
|
|
7a9faaefb4 | ||
|
|
d794360250 | ||
|
|
3064cf7410 | ||
|
|
fc9995e4c9 | ||
|
|
2b03fe2710 | ||
|
|
17882fd8cc | ||
|
|
506a742193 | ||
|
|
b52f3e69cb | ||
|
|
ad64b5a4c9 | ||
|
|
3c8238322f | ||
|
|
c7e10b21e8 | ||
|
|
7a6ed075ea | ||
|
|
dd5fcdd007 | ||
|
|
6e11d6899c | ||
|
|
2ae7918a8e | ||
|
|
4dafea685d | ||
|
|
88f260c78c | ||
|
|
6ffed933d7 | ||
|
|
ee44371925 | ||
|
|
fc26b6577a | ||
|
|
40a0a023fa | ||
|
|
695b6e8680 | ||
|
|
aa255e2946 | ||
|
|
bcb5f02392 | ||
|
|
c33347c0aa | ||
|
|
1909c59bad | ||
|
|
12c29c9a7f | ||
|
|
b14813947e | ||
|
|
d772f9ac45 | ||
|
|
4f7b7b339c | ||
|
|
78b227e251 | ||
|
|
b53f410228 | ||
|
|
823fbed414 | ||
|
|
ce6891f048 | ||
|
|
f9baac9585 | ||
|
|
df42b3cdf5 | ||
|
|
adf5551ba9 | ||
|
|
e1efc8a0ef | ||
|
|
95e4cb2060 | ||
|
|
0e9bf6442b | ||
|
|
dd59233dd4 | ||
|
|
a15f19f2d2 | ||
|
|
d4b453c26e | ||
|
|
db0e2791e0 | ||
|
|
aa367580e8 | ||
|
|
5eb1efa3d2 | ||
|
|
3bf21e05e1 | ||
|
|
d45c54992b | ||
|
|
05d24e826d | ||
|
|
42aeac3ee2 | ||
|
|
7d9f758e52 | ||
|
|
15c0876191 | ||
|
|
c90144950f | ||
|
|
20e158dcb7 | ||
|
|
f27f38b02d | ||
|
|
4798b7e806 | ||
|
|
2bdc0425df | ||
|
|
4d82ddb0c9 | ||
|
|
50cfc464b8 | ||
|
|
84c25cbec9 | ||
|
|
ea657b2f74 | ||
|
|
f9c2dd2684 | ||
|
|
895fd6d0d3 | ||
|
|
34dca05227 | ||
|
|
2bdadb44a7 | ||
|
|
54918b37fc | ||
|
|
e2ce3b5eb0 | ||
|
|
ffa5e59218 | ||
|
|
5aec4afc62 | ||
|
|
c7a32466a6 | ||
|
|
006bc58dd6 | ||
|
|
6f75a351a3 | ||
|
|
cccfdcb8ab | ||
|
|
c56cb476f6 | ||
|
|
693f4a5600 | ||
|
|
2c0c807fcc | ||
|
|
ad2f618f0b | ||
|
|
38c9970b95 | ||
|
|
68550a7e99 | ||
|
|
2885cf5830 | ||
|
|
d9712ed14b | ||
|
|
d4ab63d191 | ||
|
|
88dee5863a | ||
|
|
e26c687b21 | ||
|
|
e189ec7a48 | ||
|
|
9397469012 | ||
|
|
2d07ee519d | ||
|
|
ba55b2cdfe | ||
|
|
3e00f03aea | ||
|
|
edc846f4fe | ||
|
|
cc0733ad78 | ||
|
|
a113506d17 | ||
|
|
8d55c88cda | ||
|
|
a2f06448c8 | ||
|
|
7db5273ea7 | ||
|
|
b3a028e356 | ||
|
|
5a7e9e5baa | ||
|
|
43d8cf4d45 | ||
|
|
7ebf2941a9 | ||
|
|
9f9436ae23 | ||
|
|
cb92dccf0d | ||
|
|
b10aafb889 | ||
|
|
62eeefcb3d | ||
|
|
e163653f99 | ||
|
|
c44750e50e | ||
|
|
4b509280ce | ||
|
|
5430aa1863 | ||
|
|
4ac8700537 | ||
|
|
5aa6c9a553 | ||
|
|
dbbef06227 | ||
|
|
2e8ff4b084 | ||
|
|
c6501f7f5f | ||
|
|
19eeaa7908 | ||
|
|
07e982d9b4 | ||
|
|
1e67274bd7 | ||
|
|
faa868bbb6 | ||
|
|
b51ee895d8 | ||
|
|
fe739656f9 | ||
|
|
910a35725c | ||
|
|
eaa31f52b3 | ||
|
|
e2f8e694d0 | ||
|
|
6cef2b1059 | ||
|
|
f57a22de55 | ||
|
|
596b96623f | ||
|
|
c45653e471 | ||
|
|
490c7f955a | ||
|
|
fff6c23a65 | ||
|
|
3d72728169 | ||
|
|
d64e23e6f8 | ||
|
|
d3131c1b3d | ||
|
|
71e06a7d81 | ||
|
|
a6b7fbd352 | ||
|
|
a6ef282a49 | ||
|
|
ecc9560822 | ||
|
|
982e2099a4 | ||
|
|
cadabd4239 | ||
|
|
e8be2c612a | ||
|
|
56e017d71a | ||
|
|
e500591710 | ||
|
|
2ccf4d1a70 | ||
|
|
49eaa7572d | ||
|
|
7308ffee43 | ||
|
|
94b6c02d7d | ||
|
|
922b14b8d8 | ||
|
|
f369f17f8a | ||
|
|
8ca34d4b33 | ||
|
|
5d2514b86f | ||
|
|
2c63c003be | ||
|
|
27df2a4c03 | ||
|
|
ba923a8529 | ||
|
|
1370f10326 | ||
|
|
216cc641c9 | ||
|
|
24f11a73f2 | ||
|
|
3a25f7b1d7 | ||
|
|
6eb29ddb6f | ||
|
|
ae8d0dc35f | ||
|
|
4d877931ab | ||
|
|
7ef26165cc | ||
|
|
371b420ecf | ||
|
|
ce84fc8eed | ||
|
|
aba7ceda4f | ||
|
|
b2c4745aa3 | ||
|
|
38cb1ec2a7 | ||
|
|
cd7c3e6672 | ||
|
|
7185b719cc | ||
|
|
a5830628b9 | ||
|
|
ae92418cc1 | ||
|
|
f82b9f968b | ||
|
|
1f3635c496 | ||
|
|
7bd24b26e0 | ||
|
|
ca866c48f0 | ||
|
|
3b21982b60 | ||
|
|
7657726d38 | ||
|
|
d081fd728c | ||
|
|
07796da4e5 | ||
|
|
bcda6834d6 | ||
|
|
71ccb39d1e | ||
|
|
a4a48ed06c | ||
|
|
1520ee2986 | ||
|
|
8cda1c32ec | ||
|
|
96573d05b5 | ||
|
|
dadebe97e4 | ||
|
|
c32e0c23c0 | ||
|
|
16962c1132 | ||
|
|
6f2d3c2c97 | ||
|
|
86fbf35fb6 | ||
|
|
0be9fa5735 | ||
|
|
b92710377b | ||
|
|
822c8507bb | ||
|
|
d3eb40b97a | ||
|
|
c8843a0b14 | ||
|
|
6e0bbbf7e6 | ||
|
|
418fe286c2 | ||
|
|
b7c41932ed | ||
|
|
49df783743 | ||
|
|
fca3e72600 | ||
|
|
04e0a0293a | ||
|
|
9495a94490 | ||
|
|
fef9852da3 | ||
|
|
d0ad5a9447 | ||
|
|
bb9e147872 | ||
|
|
24211153fa | ||
|
|
d6c06349ed | ||
|
|
1d29c5f97b | ||
|
|
ee20edd645 | ||
|
|
67bee8683d | ||
|
|
7a2f3a4edf | ||
|
|
65d4a46d3b | ||
|
|
fc5c0c645a | ||
|
|
c6eedebc6a | ||
|
|
0c83e5af00 | ||
|
|
f610d61fcc | ||
|
|
d8522a7587 | ||
|
|
c49694a34a | ||
|
|
01fdcc391a | ||
|
|
17c3755f9a | ||
|
|
9ce1a21ea7 | ||
|
|
17745ddd86 | ||
|
|
0bb37a5d5f | ||
|
|
4c17a453d1 | ||
|
|
4578953843 | ||
|
|
d7a642b571 | ||
|
|
00400a0a58 | ||
|
|
441308cffa | ||
|
|
4b357abb6d | ||
|
|
94f7ac929a | ||
|
|
7175e51792 | ||
|
|
764e1e23aa | ||
|
|
0ddff3b059 | ||
|
|
7eced19feb | ||
|
|
08769b32f6 | ||
|
|
f32640e8cb | ||
|
|
6cd1ec4b09 | ||
|
|
7ed0aebdba | ||
|
|
5e96c9bfe0 | ||
|
|
5a84a0e1b3 | ||
|
|
fde862ba1d | ||
|
|
292fb8425e | ||
|
|
0bf58f2145 | ||
|
|
a35de7cc08 | ||
|
|
a2a2cd60e5 | ||
|
|
189ee81b58 | ||
|
|
0f7ff719a1 | ||
|
|
bdfcb74d50 | ||
|
|
5039d734d5 | ||
|
|
98ca1c35d7 | ||
|
|
2e22eb6ea2 | ||
|
|
6da61db278 | ||
|
|
dc4645d422 | ||
|
|
736fb06278 | ||
|
|
ab70623eb2 | ||
|
|
b87136c2c7 | ||
|
|
eff4f956fe | ||
|
|
e2394fc58a | ||
|
|
cb2036fd11 | ||
|
|
7c39e3a766 | ||
|
|
1f4cc446fe | ||
|
|
b87a0b4687 | ||
|
|
00c2cf3632 | ||
|
|
0f43551e08 | ||
|
|
c5052c7701 | ||
|
|
211d1e7463 | ||
|
|
5815699bff | ||
|
|
f29ffd3eed | ||
|
|
2f12d7a486 | ||
|
|
6f96153c67 | ||
|
|
e54d31affe | ||
|
|
6b638a6d58 | ||
|
|
d211effa01 | ||
|
|
dad4d2e76c | ||
|
|
d5e964c980 | ||
|
|
c168d9641c | ||
|
|
6a32d04d23 | ||
|
|
28701317d2 | ||
|
|
d7ca17b73d | ||
|
|
ac51438b66 | ||
|
|
966d8b77ef | ||
|
|
c137f0f1cf | ||
|
|
f37e4daf94 | ||
|
|
251db636f8 | ||
|
|
a9d39ce09d | ||
|
|
e0634b15c3 | ||
|
|
8cbf8939bb | ||
|
|
f73a27ca5b | ||
|
|
b5f2e450ac | ||
|
|
b24a7228ed | ||
|
|
6d6e37df18 | ||
|
|
cf763c0cd8 | ||
|
|
03badeab66 | ||
|
|
84f7122ba6 | ||
|
|
a73e870ad0 | ||
|
|
0bfb78051d | ||
|
|
2dcd4b5353 | ||
|
|
152e4c5ee4 | ||
|
|
75cf49798d | ||
|
|
5e3bb3e9c8 | ||
|
|
de924b8587 | ||
|
|
bc2e66cb43 | ||
|
|
d9d1d67d7c | ||
|
|
fac3bea8da | ||
|
|
61e1341f11 | ||
|
|
29d8f253f8 | ||
|
|
8fd7221dc1 | ||
|
|
a394bf752a | ||
|
|
0a0f8d14e2 | ||
|
|
2186809a45 | ||
|
|
e0419b530b | ||
|
|
3367f407fe | ||
|
|
cc336e7bd2 | ||
|
|
73d74c132b | ||
|
|
e0a0151761 | ||
|
|
fd3aba3590 | ||
|
|
112a0bb968 | ||
|
|
ea505e777a | ||
|
|
5950c5d4f9 | ||
|
|
ea7bb7b651 | ||
|
|
98eecb8605 | ||
|
|
13c318da4f | ||
|
|
14e8225391 | ||
|
|
de37e07716 | ||
|
|
575317bb54 | ||
|
|
df0babcfc2 | ||
|
|
8126d0c5a5 | ||
|
|
316617faf4 | ||
|
|
66fe68b0b2 | ||
|
|
69799275be | ||
|
|
b2fc846e44 | ||
|
|
dc31f0bc41 | ||
|
|
f659f43f93 | ||
|
|
dd2b651243 | ||
|
|
e93d94b9ad | ||
|
|
4f24016bde | ||
|
|
4ef9c9549b | ||
|
|
ea3396a945 | ||
|
|
9ba64bbbcf | ||
|
|
afc06929e0 | ||
|
|
6dd6b3a74c | ||
|
|
d4c15e103c | ||
|
|
8ad24924ea | ||
|
|
2eda8212e4 | ||
|
|
fd407776ba | ||
|
|
f52682e277 | ||
|
|
0559e94c72 | ||
|
|
21cc62bccb | ||
|
|
7c6ae034da | ||
|
|
c2f89f131d | ||
|
|
68071bd2e4 | ||
|
|
8015a30308 | ||
|
|
6bc5938482 | ||
|
|
cac105133e | ||
|
|
ffe4fc182f | ||
|
|
a9b646c202 | ||
|
|
0586d41d1b | ||
|
|
09e4575789 | ||
|
|
69c1408e9d | ||
|
|
9e7eb27686 | ||
|
|
086c9ab549 | ||
|
|
0989088530 | ||
|
|
51d626ff9d | ||
|
|
ed839d5905 | ||
|
|
01bf9d9ccd | ||
|
|
c052646b34 | ||
|
|
ef49f790bd | ||
|
|
57bd84f435 | ||
|
|
99bebdd0aa | ||
|
|
02cd567fb9 | ||
|
|
20b734e1c4 | ||
|
|
bbaf4c94cd | ||
|
|
166c5ec0b9 | ||
|
|
a1647c8412 | ||
|
|
1fbae8467f | ||
|
|
f832eae5c2 | ||
|
|
1256fbade9 | ||
|
|
b39dfe7046 | ||
|
|
be6d424626 | ||
|
|
0f0fd75125 | ||
|
|
760ea8dfb3 | ||
|
|
44a97e8fe7 | ||
|
|
c3ba39fc3b | ||
|
|
7ed7b57203 | ||
|
|
3d40ad5f6e | ||
|
|
00b327b8f8 | ||
|
|
11a122b2d6 | ||
|
|
6916f87955 | ||
|
|
bdbcd14057 | ||
|
|
c8fb758bc2 | ||
|
|
be12e1dec5 | ||
|
|
cf775bf789 | ||
|
|
cb6157be7a | ||
|
|
0af8d67bd5 | ||
|
|
7ccb00701f | ||
|
|
4a2cdc26be | ||
|
|
3a5e362bd3 | ||
|
|
1d5b1cf320 | ||
|
|
66a69f04c6 | ||
|
|
ccd1bfdd31 | ||
|
|
866e6ffeca | ||
|
|
9cd4e4b026 | ||
|
|
7ab0364a37 | ||
|
|
fb6c27e4e2 | ||
|
|
6ebf110355 | ||
|
|
d65d99a9f5 | ||
|
|
ab2df6ea1b | ||
|
|
33eca7e4f2 | ||
|
|
e006f5c427 | ||
|
|
313a09b4b7 | ||
|
|
27fb3fc589 | ||
|
|
8660bcba72 | ||
|
|
8c8124bf51 | ||
|
|
bf0bdac1d3 | ||
|
|
30913542c0 | ||
|
|
ed5430ce9a | ||
|
|
b6b30676a3 | ||
|
|
d657ba6093 | ||
|
|
16c6e26e4b | ||
|
|
a5dcab663a | ||
|
|
12781cb555 | ||
|
|
a7466c9d86 | ||
|
|
2d4816591f | ||
|
|
307156de33 | ||
|
|
81a50f71a3 | ||
|
|
2c62da3c6c | ||
|
|
efe28cec4b | ||
|
|
b76c8404e3 | ||
|
|
67ce3b2352 | ||
|
|
ab64b62c6b | ||
|
|
80803ae5fe | ||
|
|
795e6ad334 | ||
|
|
c412184bd8 | ||
|
|
ebfe9e4a7b | ||
|
|
105f9a94ed | ||
|
|
0f905d35c2 | ||
|
|
1ca924a550 | ||
|
|
b56ae3d7fa | ||
|
|
77fee43a02 | ||
|
|
7bc3fb51e3 | ||
|
|
7080ea3c16 | ||
|
|
3c21b08ef1 | ||
|
|
a006fbab0b | ||
|
|
89c59dd669 | ||
|
|
94755ceb05 | ||
|
|
8e11a05bd6 | ||
|
|
20c7dbc64f | ||
|
|
06420c42c4 | ||
|
|
f69dc28888 | ||
|
|
4ad6003253 | ||
|
|
6b968b28ae | ||
|
|
870fd8f1bb | ||
|
|
f546711076 | ||
|
|
835b76fb65 | ||
|
|
c6fa5ba028 | ||
|
|
57a3736243 | ||
|
|
7bf04d399e | ||
|
|
9a4570a501 | ||
|
|
3fbf08bb61 | ||
|
|
d89e01f5ce | ||
|
|
c08e8c15bc | ||
|
|
b4570bbf8c | ||
|
|
f12bb305c2 | ||
|
|
22bfd9c40f | ||
|
|
36edad7a4e | ||
|
|
b071f01cbb | ||
|
|
ad6955d46a | ||
|
|
5129e3960f | ||
|
|
98a44fe07b | ||
|
|
ce4e3e8690 | ||
|
|
82bd52196d | ||
|
|
e5c6eb583f | ||
|
|
a2fdd0c9ab | ||
|
|
4b024a62b2 | ||
|
|
0dc7c82f35 | ||
|
|
3d0fe946e5 | ||
|
|
8a367177fa | ||
|
|
7a9376c114 | ||
|
|
2a47df6627 | ||
|
|
51cf51a41c | ||
|
|
0f65030297 | ||
|
|
b740054f3c | ||
|
|
9c4590e37b | ||
|
|
a9b35c965e | ||
|
|
1208d50fa6 | ||
|
|
68a086a147 | ||
|
|
2091870c9f | ||
|
|
e835ee3340 | ||
|
|
dc2697da3a | ||
|
|
868ca2b377 | ||
|
|
724c56b46a | ||
|
|
9b49f0e4c7 | ||
|
|
fa9ff8e88c | ||
|
|
bd1ef431b3 | ||
|
|
ffdb8f22f6 | ||
|
|
b7120ca547 | ||
|
|
eed08614a6 | ||
|
|
8c60d22ff5 | ||
|
|
c52c55670a | ||
|
|
e54b755ab8 | ||
|
|
4346f91fcb | ||
|
|
cf137ac46a | ||
|
|
b8c6ee38b0 | ||
|
|
0571e17c55 | ||
|
|
215aa8b78b | ||
|
|
ac906c5308 | ||
|
|
418dbdff66 | ||
|
|
bd86b76e94 | ||
|
|
7e3fd2faf5 | ||
|
|
e9f9ec4a4e | ||
|
|
4db92add1b | ||
|
|
94f0e03f90 | ||
|
|
296c71ba0f | ||
|
|
312cd79456 | ||
|
|
b8b359ae97 | ||
|
|
3185cb94f1 | ||
|
|
7f73d9b6ad | ||
|
|
565a5bd5f5 | ||
|
|
9a746ad485 | ||
|
|
44eb47ef2b | ||
|
|
9f5320fd6f | ||
|
|
18821f89a7 | ||
|
|
4348464a2f | ||
|
|
d441107013 | ||
|
|
6b76f75d2c | ||
|
|
90215cca0c | ||
|
|
67d1fc1f7c | ||
|
|
b5624ee8b6 | ||
|
|
81f5f7c110 | ||
|
|
be49b8c0cf | ||
|
|
cb6205a774 | ||
|
|
61d06e7133 | ||
|
|
ff78e37595 | ||
|
|
a29294a946 | ||
|
|
20c404d3b3 | ||
|
|
3a1bb35117 | ||
|
|
0fc884a811 | ||
|
|
9792ce8947 | ||
|
|
f962fbb44a | ||
|
|
007a42cda4 | ||
|
|
a8b8b472b9 | ||
|
|
25b995ad4d | ||
|
|
9b28defe6a | ||
|
|
f89dd1ec1a | ||
|
|
ba29357611 | ||
|
|
2bfdb5d4af | ||
|
|
2c289bfa9b | ||
|
|
34a8e35a4f | ||
|
|
e19f15e3f2 | ||
|
|
a27962bd9a | ||
|
|
750e078179 | ||
|
|
321e068601 | ||
|
|
56fb237472 | ||
|
|
e8738541c9 | ||
|
|
fd62eca284 | ||
|
|
5ee81f43cf | ||
|
|
fad469f51e | ||
|
|
4f81526385 | ||
|
|
c07f688aa8 | ||
|
|
ee269920c4 | ||
|
|
65e0cd3278 | ||
|
|
6bb57b7219 | ||
|
|
4852d283d7 | ||
|
|
83c8f14fa2 | ||
|
|
f165c2dfc5 | ||
|
|
d884011c17 | ||
|
|
049aef51d4 | ||
|
|
1f8b6010ea | ||
|
|
bc51580f28 | ||
|
|
c56a74cdac | ||
|
|
51705fb967 | ||
|
|
8071c391bc | ||
|
|
e43d21d57f | ||
|
|
9e6378c448 | ||
|
|
051d962318 | ||
|
|
62de12281a | ||
|
|
5c36465fd5 | ||
|
|
9026b37c0b | ||
|
|
254937b33b | ||
|
|
59f954b323 | ||
|
|
58454c74cc | ||
|
|
ddcd5a1979 | ||
|
|
98b8529d1f | ||
|
|
dc6f6a9c4e | ||
|
|
577ae78c30 | ||
|
|
926e01ffe1 | ||
|
|
d9ee65c24a | ||
|
|
2a33dfcaab | ||
|
|
b05ebcbcc4 | ||
|
|
2ffcb8eaf7 | ||
|
|
e7fde87ca5 | ||
|
|
7394e27b16 | ||
|
|
db42506734 | ||
|
|
59a58343ea | ||
|
|
df48945d2d | ||
|
|
279bd348ce | ||
|
|
a0f878a07b | ||
|
|
b0428a73c0 | ||
|
|
848f225e2f | ||
|
|
62c6f9811b | ||
|
|
58b6ec4580 | ||
|
|
b2f9415a63 | ||
|
|
86e51f2268 | ||
|
|
9db6bebe23 | ||
|
|
9e50fa7fbe | ||
|
|
957d623461 | ||
|
|
01fa031b85 | ||
|
|
88f54a4a5d | ||
|
|
dffd53da5d | ||
|
|
f2602ce567 | ||
|
|
b6ed7d347a | ||
|
|
04def09ea9 | ||
|
|
4f8c29572e | ||
|
|
ba6f457099 | ||
|
|
e44f8c0112 | ||
|
|
e08c05f6e8 | ||
|
|
1e14b47c22 | ||
|
|
bb83575b75 | ||
|
|
b97bafdfd7 | ||
|
|
a8eabfebd1 | ||
|
|
1da7858d24 | ||
|
|
b94f2de41d | ||
|
|
cd2e6946bb | ||
|
|
1c87e45cff | ||
|
|
539b288780 | ||
|
|
47aaf6fa15 | ||
|
|
328c4388b7 | ||
|
|
e6f597f28f | ||
|
|
bfa34cf143 | ||
|
|
5e091d4d1f | ||
|
|
95db4f48a5 | ||
|
|
1a79ede633 | ||
|
|
a6471c34ed | ||
|
|
f5c3bb38bc | ||
|
|
fe6a2ee5a1 | ||
|
|
ebf239d056 | ||
|
|
60de06ef7a | ||
|
|
df1c38df74 | ||
|
|
1f014c32e6 | ||
|
|
2c74e5124d | ||
|
|
92549de2c2 | ||
|
|
d932e58217 | ||
|
|
16958e823e | ||
|
|
7c99822efb | ||
|
|
16c7077887 | ||
|
|
1da67e18a3 | ||
|
|
23da0c0e41 | ||
|
|
e217b7ea54 | ||
|
|
2930fa8e9c | ||
|
|
6bd084afd2 | ||
|
|
e856eb0f8f | ||
|
|
15866ac1da | ||
|
|
31334415ae | ||
|
|
7d4b001665 | ||
|
|
bb0e0b57dd | ||
|
|
d0a813632b | ||
|
|
a3f68b4d2a | ||
|
|
e85730157e | ||
|
|
46531c3265 | ||
|
|
2e2358eae4 | ||
|
|
ad05754a87 | ||
|
|
d8ebb6b654 | ||
|
|
ddd728c6bd | ||
|
|
ba5ea5143e | ||
|
|
f2cef492b1 | ||
|
|
6a833a8ee0 | ||
|
|
3c2d7f21a4 | ||
|
|
9977e28a09 | ||
|
|
45358dd140 | ||
|
|
0a07969273 | ||
|
|
0a325197de | ||
|
|
a81d3101da | ||
|
|
da5220acdd | ||
|
|
e6ab539b1d | ||
|
|
43a29d2c17 | ||
|
|
6acf52b5f9 | ||
|
|
5528b55834 | ||
|
|
0f1f60d080 | ||
|
|
b15b7df690 | ||
|
|
f7f3ea404c | ||
|
|
20ec358b3c | ||
|
|
109a578e89 | ||
|
|
7166bb7b3a | ||
|
|
6ee5459459 | ||
|
|
438affe886 | ||
|
|
1a3dbe6fba | ||
|
|
23f2bbaeda | ||
|
|
5a9d6c3722 | ||
|
|
66df5eca03 | ||
|
|
ddb158c5c1 | ||
|
|
07122dd2fe | ||
|
|
0244061515 | ||
|
|
da58a91d1e | ||
|
|
890f1e0413 | ||
|
|
17ac3720f1 | ||
|
|
5d1e034a12 | ||
|
|
0769f505bf | ||
|
|
b4a50ceefb | ||
|
|
992611b689 | ||
|
|
98a7bdec4e | ||
|
|
89d11649a1 | ||
|
|
1b1e88674a | ||
|
|
361a637174 | ||
|
|
88534c50aa | ||
|
|
3484e0b160 | ||
|
|
e4d9b5b76a | ||
|
|
4f1580cc0e | ||
|
|
d5a69afa5a | ||
|
|
0a192aca50 | ||
|
|
8424160345 | ||
|
|
0745c0fb6a | ||
|
|
94476c648b | ||
|
|
0cc1279e03 | ||
|
|
6a1580f88c | ||
|
|
f8552faa09 | ||
|
|
9fa95594c2 | ||
|
|
10e3193373 | ||
|
|
eeab6957dd | ||
|
|
5cb1b68d39 | ||
|
|
0b11d1c815 | ||
|
|
582a46a59e | ||
|
|
6e51e19b1c | ||
|
|
0ad78a688c | ||
|
|
026f7cea77 | ||
|
|
b605cac79e | ||
|
|
84a1bcca6f | ||
|
|
3bad53fa04 | ||
|
|
cce6b43463 | ||
|
|
2ca3eb5660 | ||
|
|
7ffa0c85de | ||
|
|
404e82e070 | ||
|
|
601a433b1a | ||
|
|
e0d4d34f10 | ||
|
|
36336fcddc | ||
|
|
4e8ae08b00 | ||
|
|
b28fc5710a | ||
|
|
45bd1f2bd4 | ||
|
|
7d9d434826 | ||
|
|
f3cf973e8e | ||
|
|
035aac43b0 | ||
|
|
b67c2dce8b | ||
|
|
c4c304950d | ||
|
|
9cd2c42e84 | ||
|
|
c62cc7678d | ||
|
|
52c479d578 | ||
|
|
b4b31403c7 | ||
|
|
2a28599343 | ||
|
|
3e87c8b0a4 | ||
|
|
db8df01c85 | ||
|
|
240d82f8be | ||
|
|
8569c2f5a6 | ||
|
|
5d6f858235 | ||
|
|
0df25a7340 | ||
|
|
2ddcc6334b | ||
|
|
f3281e8275 | ||
|
|
0d2d965364 | ||
|
|
16e761e59c | ||
|
|
69e15442f3 | ||
|
|
da509e32c6 | ||
|
|
9af407729b | ||
|
|
4db36eb09e | ||
|
|
0700eab8a2 | ||
|
|
a49c4e5247 | ||
|
|
392e0483a3 | ||
|
|
c86663335b | ||
|
|
23ce65d25d | ||
|
|
f38eee0739 | ||
|
|
d24b276820 | ||
|
|
94a402305c | ||
|
|
c4ef01fc66 | ||
|
|
ab4db657db | ||
|
|
856fd82ea3 | ||
|
|
39f3aa0871 | ||
|
|
6514105007 | ||
|
|
6ca69537f1 | ||
|
|
f0a5ba7542 | ||
|
|
e1716b8507 | ||
|
|
7c1df0a430 | ||
|
|
bb4465f392 | ||
|
|
72abc29722 | ||
|
|
e2f3718d39 | ||
|
|
fc1970acef | ||
|
|
e1303ef099 | ||
|
|
942029fd93 | ||
|
|
4a3322df1e | ||
|
|
dae3ee9f67 | ||
|
|
dbf80031ae | ||
|
|
bc507f672d | ||
|
|
72b0f2b68e | ||
|
|
993bf0e515 | ||
|
|
8ed7b81403 | ||
|
|
8254df1a06 | ||
|
|
e9cf55cc94 | ||
|
|
91e86ba6cf | ||
|
|
f98553bae1 | ||
|
|
cfef7f1bd8 | ||
|
|
b306607ad6 | ||
|
|
b8cc52bf1a | ||
|
|
e27124ab39 | ||
|
|
c5a419970e | ||
|
|
2413cb8673 | ||
|
|
2e4e0c0779 | ||
|
|
2e4d044cab | ||
|
|
a3c3059fe2 | ||
|
|
8b38f49a8a | ||
|
|
389c47248b | ||
|
|
d00dea3052 | ||
|
|
0caa0b4ebf | ||
|
|
207a03b377 | ||
|
|
1b0c3b01de | ||
|
|
1421a264e4 | ||
|
|
218c0c1db3 | ||
|
|
f2214c2e6b | ||
|
|
ed6526f002 | ||
|
|
25c58709e3 | ||
|
|
285bbef159 | ||
|
|
063ab49603 | ||
|
|
9af1aedcdb | ||
|
|
5ccb982332 | ||
|
|
de3c86120c | ||
|
|
f8e0055a6a | ||
|
|
353477f47a | ||
|
|
af1ca9bcc1 | ||
|
|
daae6d966a | ||
|
|
958b2c0c9b | ||
|
|
4a1c2d9693 | ||
|
|
9dcb1af2f6 | ||
|
|
c4bce4857e | ||
|
|
b52e7334f6 | ||
|
|
a4efd4eec7 | ||
|
|
fa1d18385d | ||
|
|
79778f6588 | ||
|
|
a432ff43a2 | ||
|
|
2d94e261ec | ||
|
|
01e6909180 | ||
|
|
57423076e6 | ||
|
|
2a2e451ddc | ||
|
|
990e28dc96 | ||
|
|
49aedf4231 | ||
|
|
190d5495fe | ||
|
|
50c657bc09 | ||
|
|
cad1cfe17c | ||
|
|
1fe80f80f5 | ||
|
|
a6f4fca72c | ||
|
|
f9cf5c799d | ||
|
|
9e17f7d9bc | ||
|
|
ac08ef624c | ||
|
|
fbb674707e | ||
|
|
541e651e4c | ||
|
|
a46830b232 | ||
|
|
f0b7fefbf4 | ||
|
|
245cfdf3d6 | ||
|
|
e372004b4d | ||
|
|
66f97e6820 | ||
|
|
58842f9679 | ||
|
|
ec31193812 | ||
|
|
646e5a8a11 | ||
|
|
b8841f1ba2 | ||
|
|
d1c281a055 | ||
|
|
61c15bdefb | ||
|
|
e89bbaee14 | ||
|
|
e8ce2e0864 | ||
|
|
7a0478e1e4 | ||
|
|
7ab9d7cad9 | ||
|
|
09854f57dc | ||
|
|
98dbe91270 | ||
|
|
0f53df8f71 | ||
|
|
8515d3d58d | ||
|
|
c0a1cba11b | ||
|
|
efa618ecba | ||
|
|
3a606240f7 | ||
|
|
9ef93dbbdc | ||
|
|
68bf3f2846 | ||
|
|
81543310fd | ||
|
|
5559c900c0 | ||
|
|
b42a48cc44 | ||
|
|
1f80a10b4e | ||
|
|
e2befdef6a | ||
|
|
310f606b72 | ||
|
|
26658432fb | ||
|
|
7284c9a0cd | ||
|
|
6f4ba6144a | ||
|
|
1c73ce8eb5 | ||
|
|
b397bfd7db | ||
|
|
cc2437425b | ||
|
|
b09fde7723 | ||
|
|
2c0a4e1e74 | ||
|
|
d830d36074 | ||
|
|
378da4d61b | ||
|
|
c869c2c811 | ||
|
|
cd5f2ee23c | ||
|
|
a9d5b25304 | ||
|
|
e328bf25f0 | ||
|
|
cdd8f123cc | ||
|
|
eb2b9d6b96 | ||
|
|
846970366b | ||
|
|
efa4ddcc88 | ||
|
|
2edf19d601 | ||
|
|
77e3964ca9 | ||
|
|
766dc5c59d | ||
|
|
39ea562c07 | ||
|
|
ed16ad11ff | ||
|
|
12387ebc92 | ||
|
|
294079cbe0 | ||
|
|
2cdd2ae753 | ||
|
|
517e1c0525 | ||
|
|
1658c79eba | ||
|
|
9a648cc90b | ||
|
|
c04bd3cc97 | ||
|
|
c54275c6a7 | ||
|
|
49967cdb30 | ||
|
|
10acd811d0 | ||
|
|
553d868c25 | ||
|
|
a5ee9df541 | ||
|
|
eafbe8a056 | ||
|
|
36a6eec932 | ||
|
|
e5d7bc9f93 | ||
|
|
585a0172e7 | ||
|
|
5263a8044f | ||
|
|
50503c7ac3 | ||
|
|
c21e538bfb | ||
|
|
babb815cc0 | ||
|
|
c06073a949 | ||
|
|
bdb1288e9e | ||
|
|
ae7fe0b9ab | ||
|
|
025a279ce6 | ||
|
|
3da06c794e | ||
|
|
30959719ad | ||
|
|
231a43fc68 | ||
|
|
0fbb28ec39 | ||
|
|
bab2941338 | ||
|
|
575c3425ad | ||
|
|
f1372d29eb | ||
|
|
0dedd1ae9a | ||
|
|
df3337ce8a | ||
|
|
38ccf8532d | ||
|
|
7b99172528 | ||
|
|
13b0944e9b | ||
|
|
83f2144655 | ||
|
|
bdf7986e7c | ||
|
|
eadc3c0f91 | ||
|
|
ae79fdbc2d | ||
|
|
c773d10b65 | ||
|
|
2093c6380d | ||
|
|
3d1dd07d54 | ||
|
|
995c831c5e | ||
|
|
cbda81a01d | ||
|
|
4bf3b585ef | ||
|
|
e238603c37 | ||
|
|
45d48291f9 | ||
|
|
ff95aa6d36 | ||
|
|
d90c9a2564 | ||
|
|
8e2bba9e02 | ||
|
|
8c2b9fa744 | ||
|
|
64586cd185 | ||
|
|
e16eaed09c | ||
|
|
f12c7db429 | ||
|
|
bf5a12db42 | ||
|
|
12fc3eaf63 | ||
|
|
49597877a4 | ||
|
|
991c2fcae7 | ||
|
|
4ea16c0603 | ||
|
|
377add7ae9 | ||
|
|
a51ada6706 | ||
|
|
ef663e333e | ||
|
|
be09b20a40 | ||
|
|
9ca2364694 | ||
|
|
3dc1bc2ded | ||
|
|
1a2219ec26 | ||
|
|
b6f097f729 | ||
|
|
d3e320fee7 | ||
|
|
830d5fccf4 | ||
|
|
4132b1d552 | ||
|
|
f9bdeb62e2 | ||
|
|
e728ed7a36 | ||
|
|
a644fb05a7 | ||
|
|
86d8c0aa26 | ||
|
|
fb096fff78 | ||
|
|
14ecb539df | ||
|
|
09271951d9 | ||
|
|
7bac07bf12 | ||
|
|
0f413b2207 | ||
|
|
97f8ec4b60 | ||
|
|
1e6b5b4884 | ||
|
|
ae19bf6f15 | ||
|
|
e885a8bf41 | ||
|
|
0b7d4ed792 | ||
|
|
10a094f0e6 | ||
|
|
f8b77c44f1 | ||
|
|
048990944f | ||
|
|
d3c7eff53d | ||
|
|
0248dd9aeb | ||
|
|
7e0b499ee7 | ||
|
|
f19caa5e67 | ||
|
|
0a1f68edeb | ||
|
|
8f870c297d | ||
|
|
f66a2b08a2 | ||
|
|
485cd80811 | ||
|
|
a9a7b22443 | ||
|
|
3cd2e503c6 | ||
|
|
fe7936c603 | ||
|
|
252dbc9fad | ||
|
|
5df6c2372d | ||
|
|
ca3cebbaef | ||
|
|
4425702a6a | ||
|
|
968c8bbc00 | ||
|
|
8f0d62cb92 | ||
|
|
0c6a271f97 | ||
|
|
3bddd467c4 | ||
|
|
4df84bf859 | ||
|
|
748fda3834 | ||
|
|
aa91179eac | ||
|
|
03c3c9be67 | ||
|
|
c3f4ac0b6e | ||
|
|
a93881b109 | ||
|
|
4924e49ad0 | ||
|
|
687244b90e | ||
|
|
9abc855552 | ||
|
|
10d15cbe44 | ||
|
|
0fd8be5d0c | ||
|
|
26b208d8b7 | ||
|
|
8b014d7f5d | ||
|
|
ea1978896e | ||
|
|
c9327685dd | ||
|
|
65d05c1d92 | ||
|
|
ca5e7d184e | ||
|
|
b9b1ca30ca | ||
|
|
10e75a71da | ||
|
|
051dd5a4ab | ||
|
|
6afd256e98 | ||
|
|
d86e4d914c | ||
|
|
1e2f298f94 | ||
|
|
8a26fdea23 | ||
|
|
23071bcba5 | ||
|
|
68fef83ed9 | ||
|
|
2f272d519f | ||
|
|
6f8c66880e | ||
|
|
45ff6e2745 | ||
|
|
fb18e856e4 | ||
|
|
315123fa3e | ||
|
|
6a3477c29f | ||
|
|
6533b6e023 | ||
|
|
268ef884d8 | ||
|
|
4614871092 | ||
|
|
feb9dce665 | ||
|
|
52a19f25d5 | ||
|
|
f26914b93a | ||
|
|
079b4346bc | ||
|
|
6f52592267 | ||
|
|
8ff1f254f3 | ||
|
|
211de3b963 | ||
|
|
ec84a6bdbf | ||
|
|
0a945a1770 | ||
|
|
6aa6a0a768 | ||
|
|
4d5fc18f58 | ||
|
|
e7b699d653 | ||
|
|
327184fbee | ||
|
|
ce1546eb90 | ||
|
|
971d851844 | ||
|
|
bd17e2a5d6 | ||
|
|
101f09a3d1 | ||
|
|
bf0fab9aa1 | ||
|
|
f4253a7cdd | ||
|
|
34d59e71d6 | ||
|
|
60fa0600c0 | ||
|
|
60cddeb849 | ||
|
|
21d66837a0 | ||
|
|
411dcf5666 | ||
|
|
87581b8188 | ||
|
|
1bf1a14d71 | ||
|
|
4f4428185b | ||
|
|
2a46aeece8 | ||
|
|
83e9cd5e36 | ||
|
|
a1e9878b31 | ||
|
|
0c0f304e8d | ||
|
|
e54fb0bf95 | ||
|
|
1536192e92 | ||
|
|
321ad51314 | ||
|
|
132b5fdd6d | ||
|
|
fc5dc4fa19 | ||
|
|
021da085a7 | ||
|
|
e2816648d8 | ||
|
|
6c0e1fc72e | ||
|
|
0ba6826d20 | ||
|
|
a21a01c60d | ||
|
|
353332b015 | ||
|
|
adfd23393c | ||
|
|
dae4474117 | ||
|
|
8ece7fef15 | ||
|
|
62aaa7e7c1 | ||
|
|
8443e529e9 | ||
|
|
5d20b7e662 | ||
|
|
79ecd1b16e | ||
|
|
f1418c76a8 | ||
|
|
9a6b8dca7e | ||
|
|
db838bdb73 | ||
|
|
ba82ddf6ca | ||
|
|
1aea5fa182 | ||
|
|
afa937e62b | ||
|
|
73de982473 | ||
|
|
cdc8ac3eb1 | ||
|
|
3a63184474 | ||
|
|
61e51f98e2 | ||
|
|
720e161083 | ||
|
|
e673a1764a | ||
|
|
16ed1f5387 | ||
|
|
a2d19e1981 | ||
|
|
6e8b69d35f | ||
|
|
6e075fcfae | ||
|
|
2e7b76b28c | ||
|
|
f25c071eb7 | ||
|
|
59c1a252d5 | ||
|
|
c7fbf2961a | ||
|
|
3cba8db08f | ||
|
|
3a65ef478b | ||
|
|
8629988742 | ||
|
|
d07a0a6479 | ||
|
|
6a8b33d3cd | ||
|
|
995a3e14ee | ||
|
|
dc5db14a33 | ||
|
|
b28e287f93 | ||
|
|
99313388cc | ||
|
|
0747ad2b12 | ||
|
|
eea7215525 | ||
|
|
a2e6a9dd47 | ||
|
|
018fc42974 | ||
|
|
7311830680 | ||
|
|
35c4719638 | ||
|
|
65d0317346 | ||
|
|
5eb84ff97f | ||
|
|
dedc42e268 | ||
|
|
2ae181c7b8 | ||
|
|
59a3938b2e | ||
|
|
49dcbfbf13 | ||
|
|
5557fd2217 | ||
|
|
2fb0831aeb | ||
|
|
ba0ce39b70 | ||
|
|
b22e883a5f | ||
|
|
aa026fbf36 | ||
|
|
8a418b2bb8 | ||
|
|
5f33883e0e | ||
|
|
213a72aaea | ||
|
|
da5a1fe760 | ||
|
|
0ca44258fc | ||
|
|
c87530727a |
884
BUILDING.txt
Normal file
@@ -0,0 +1,884 @@
|
|||||||
|
*******************************************************************************
|
||||||
|
** Building on Un*x Platforms (including Cygwin and OS X)
|
||||||
|
*******************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
==================
|
||||||
|
Build Requirements
|
||||||
|
==================
|
||||||
|
|
||||||
|
-- autoconf 2.56 or later
|
||||||
|
-- automake 1.7 or later
|
||||||
|
-- libtool 1.4 or later
|
||||||
|
* If using Xcode 4.3 or later on OS X, autoconf and automake are no longer
|
||||||
|
provided. The easiest way to obtain them is from MacPorts
|
||||||
|
(http://www.macports.org/).
|
||||||
|
|
||||||
|
-- NASM (if building x86 or x86-64 SIMD extensions)
|
||||||
|
* 0.98, or 2.01 or later is required for a 32-bit build
|
||||||
|
* NASM 2.00 or later is required for a 64-bit build
|
||||||
|
* NASM 2.07 or later is required for a 64-bit build on OS X. This can be
|
||||||
|
obtained from MacPorts (http://www.macports.org/).
|
||||||
|
|
||||||
|
The binary RPMs released by the NASM project do not work on older Linux
|
||||||
|
systems, such as Red Hat Enterprise Linux 4. On such systems, you can
|
||||||
|
easily build and install NASM from a source RPM by downloading one of the
|
||||||
|
SRPMs from
|
||||||
|
|
||||||
|
http://www.nasm.us/pub/nasm/releasebuilds
|
||||||
|
|
||||||
|
and executing the following as root:
|
||||||
|
|
||||||
|
ARCH=`uname -m`
|
||||||
|
rpmbuild --rebuild nasm-{version}.src.rpm
|
||||||
|
rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-{version}.$ARCH.rpm
|
||||||
|
|
||||||
|
NOTE: the NASM build will fail if texinfo is not installed.
|
||||||
|
|
||||||
|
-- GCC v4.1 or later recommended for best performance
|
||||||
|
* Beginning with Xcode 4, Apple stopped distributing GCC and switched to
|
||||||
|
the LLVM compiler. Xcode v4.0 through v4.6 provides a GCC front end
|
||||||
|
called LLVM-GCC. Unfortunately, as of this writing, neither LLVM-GCC nor
|
||||||
|
the LLVM (clang) compiler produces optimal performance with libjpeg-turbo.
|
||||||
|
Building libjpeg-turbo with LLVM-GCC v4.2 results in a 10% performance
|
||||||
|
degradation when compressing using 64-bit code, relative to building
|
||||||
|
libjpeg-turbo with GCC v4.2. Building libjpeg-turbo with LLVM (clang)
|
||||||
|
results in a 20% performance degradation when compressing using 64-bit
|
||||||
|
code, relative to building libjpeg-turbo with GCC v4.2. If you are
|
||||||
|
running Snow Leopard or earlier, it is suggested that you continue to use
|
||||||
|
Xcode v3.2.6, which provides GCC v4.2. If you are using Lion or later, it
|
||||||
|
is suggested that you install Apple GCC v4.2 through MacPorts.
|
||||||
|
|
||||||
|
-- If building the TurboJPEG Java wrapper, JDK or OpenJDK 1.5 or later is
|
||||||
|
required. Some systems, such as Solaris 10 and later and Red Hat Enterprise
|
||||||
|
Linux 5 and later, have this pre-installed. On OS X 10.5 and later, it will
|
||||||
|
be necessary to install the Java Developer Package, which can be downloaded
|
||||||
|
from http://developer.apple.com/downloads (Apple ID required.) For systems
|
||||||
|
that do not have a JDK installed, you can obtain the Oracle Java Development
|
||||||
|
Kit from http://www.java.com.
|
||||||
|
|
||||||
|
|
||||||
|
==================
|
||||||
|
Out-of-Tree Builds
|
||||||
|
==================
|
||||||
|
|
||||||
|
Binary objects, libraries, and executables are generated in the same directory
|
||||||
|
from which configure was executed (the "binary directory"), and this directory
|
||||||
|
need not necessarily be the same as the libjpeg-turbo source directory. You
|
||||||
|
can create multiple independent binary directories, in which different versions
|
||||||
|
of libjpeg-turbo can be built from the same source tree using different
|
||||||
|
compilers or settings. In the sections below, {build_directory} refers to the
|
||||||
|
binary directory, whereas {source_directory} refers to the libjpeg-turbo source
|
||||||
|
directory. For in-tree builds, these directories are the same.
|
||||||
|
|
||||||
|
|
||||||
|
======================
|
||||||
|
Building libjpeg-turbo
|
||||||
|
======================
|
||||||
|
|
||||||
|
The following procedure will build libjpeg-turbo on Linux, FreeBSD, Cygwin, and
|
||||||
|
Solaris/x86 systems (on Solaris, this generates a 32-bit library. See below
|
||||||
|
for 64-bit build instructions.)
|
||||||
|
|
||||||
|
cd {source_directory}
|
||||||
|
autoreconf -fiv
|
||||||
|
cd {build_directory}
|
||||||
|
sh {source_directory}/configure [additional configure flags]
|
||||||
|
make
|
||||||
|
|
||||||
|
NOTE: Running autoreconf in the source directory is usually only necessary if
|
||||||
|
building libjpeg-turbo from the SVN repository.
|
||||||
|
|
||||||
|
This will generate the following files under .libs/
|
||||||
|
|
||||||
|
libjpeg.a
|
||||||
|
Static link library for the libjpeg API
|
||||||
|
|
||||||
|
libjpeg.so.{version} (Linux, Unix)
|
||||||
|
libjpeg.{version}.dylib (OS X)
|
||||||
|
cygjpeg-{version}.dll (Cygwin)
|
||||||
|
Shared library for the libjpeg API
|
||||||
|
|
||||||
|
By default, {version} is 62.1.0, 7.1.0, or 8.0.2, depending on whether
|
||||||
|
libjpeg v6b (default), v7, or v8 emulation is enabled. If using Cygwin,
|
||||||
|
{version} is 62, 7, or 8.
|
||||||
|
|
||||||
|
libjpeg.so (Linux, Unix)
|
||||||
|
libjpeg.dylib (OS X)
|
||||||
|
Development symlink for the libjpeg API
|
||||||
|
|
||||||
|
libjpeg.dll.a (Cygwin)
|
||||||
|
Import library for the libjpeg API
|
||||||
|
|
||||||
|
libturbojpeg.a
|
||||||
|
Static link library for the TurboJPEG API
|
||||||
|
|
||||||
|
libturbojpeg.so.0.1.0 (Linux, Unix)
|
||||||
|
libturbojpeg.0.1.0.dylib (OS X)
|
||||||
|
cygturbojpeg-0.dll (Cygwin)
|
||||||
|
Shared library for the TurboJPEG API
|
||||||
|
|
||||||
|
libturbojpeg.so (Linux, Unix)
|
||||||
|
libturbojpeg.dylib (OS X)
|
||||||
|
Development symlink for the TurboJPEG API
|
||||||
|
|
||||||
|
libturbojpeg.dll.a (Cygwin)
|
||||||
|
Import library for the TurboJPEG API
|
||||||
|
|
||||||
|
|
||||||
|
libjpeg v7 or v8 API/ABI Emulation
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
Add --with-jpeg7 to the configure command line to build a version of
|
||||||
|
libjpeg-turbo that is API/ABI-compatible with libjpeg v7. Add --with-jpeg8 to
|
||||||
|
the configure command to build a version of libjpeg-turbo that is
|
||||||
|
API/ABI-compatible with libjpeg v8. See README-turbo.txt for more information
|
||||||
|
on libjpeg v7 and v8 emulation.
|
||||||
|
|
||||||
|
|
||||||
|
In-Memory Source/Destination Managers
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
When using libjpeg v6b or v7 API/ABI emulation, add --without-mem-srcdst to the
|
||||||
|
configure command line to build a version of libjpeg-turbo that lacks the
|
||||||
|
jpeg_mem_src() and jpeg_mem_dest() functions. These functions were not part of
|
||||||
|
the original libjpeg v6b and v7 APIs, so removing them ensures strict
|
||||||
|
conformance with those APIs. See README-turbo.txt for more information.
|
||||||
|
|
||||||
|
|
||||||
|
Arithmetic Coding Support
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Since the patent on arithmetic coding has expired, this functionality has been
|
||||||
|
included in this release of libjpeg-turbo. libjpeg-turbo's implementation is
|
||||||
|
based on the implementation in libjpeg v8, but it works when emulating libjpeg
|
||||||
|
v7 or v6b as well. The default is to enable both arithmetic encoding and
|
||||||
|
decoding, but those who have philosophical objections to arithmetic coding can
|
||||||
|
add --without-arith-enc or --without-arith-dec to the configure command line to
|
||||||
|
disable encoding or decoding (respectively.)
|
||||||
|
|
||||||
|
|
||||||
|
TurboJPEG Java Wrapper
|
||||||
|
----------------------
|
||||||
|
Add --with-java to the configure command line to incorporate an optional Java
|
||||||
|
Native Interface wrapper into the TurboJPEG shared library and build the Java
|
||||||
|
front-end classes to support it. This allows the TurboJPEG shared library to
|
||||||
|
be used directly from Java applications. See java/README for more details.
|
||||||
|
|
||||||
|
You can set the JAVAC, JAR, and JAVA configure variables to specify
|
||||||
|
alternate commands for javac, jar, and java (respectively.) You can also
|
||||||
|
set the JAVACFLAGS configure variable to specify arguments that should be
|
||||||
|
passed to the Java compiler when building the front-end classes, and JNI_CFLAGS
|
||||||
|
to specify arguments that should be passed to the C compiler when building the
|
||||||
|
JNI wrapper. Run 'configure --help' for more details.
|
||||||
|
|
||||||
|
|
||||||
|
========================
|
||||||
|
Installing libjpeg-turbo
|
||||||
|
========================
|
||||||
|
|
||||||
|
If you intend to install these libraries and the associated header files, then
|
||||||
|
replace 'make' in the instructions above with
|
||||||
|
|
||||||
|
make install prefix={base dir} libdir={library directory}
|
||||||
|
|
||||||
|
For example,
|
||||||
|
|
||||||
|
make install prefix=/usr/local libdir=/usr/local/lib64
|
||||||
|
|
||||||
|
will install the header files in /usr/local/include and the library files in
|
||||||
|
/usr/local/lib64. If 'prefix' and 'libdir' are not specified, then the default
|
||||||
|
is to install the header files in /opt/libjpeg-turbo/include and the library
|
||||||
|
files in /opt/libjpeg-turbo/lib32 (32-bit) or /opt/libjpeg-turbo/lib64
|
||||||
|
(64-bit.)
|
||||||
|
|
||||||
|
NOTE: You can specify a prefix of /usr and a libdir of, for instance,
|
||||||
|
/usr/lib64 to overwrite the system's version of libjpeg. If you do this,
|
||||||
|
however, then be sure to BACK UP YOUR SYSTEM'S INSTALLATION OF LIBJPEG before
|
||||||
|
overwriting it. It is recommended that you instead install libjpeg-turbo into
|
||||||
|
a non-system directory and manipulate the LD_LIBRARY_PATH or create symlinks
|
||||||
|
to force applications to use libjpeg-turbo instead of libjpeg. See
|
||||||
|
README-turbo.txt for more information.
|
||||||
|
|
||||||
|
|
||||||
|
=============
|
||||||
|
Build Recipes
|
||||||
|
=============
|
||||||
|
|
||||||
|
|
||||||
|
32-bit Build on 64-bit Linux
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Add
|
||||||
|
|
||||||
|
--host i686-pc-linux-gnu CFLAGS='-O3 -m32' LDFLAGS=-m32
|
||||||
|
|
||||||
|
to the configure command line.
|
||||||
|
|
||||||
|
|
||||||
|
64-bit Build on 64-bit OS X
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
Add
|
||||||
|
|
||||||
|
--host x86_64-apple-darwin NASM=/opt/local/bin/nasm
|
||||||
|
|
||||||
|
to the configure command line. NASM 2.07 or later from MacPorts must be
|
||||||
|
installed.
|
||||||
|
|
||||||
|
|
||||||
|
32-bit Build on 64-bit OS X
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
Add
|
||||||
|
|
||||||
|
--host i686-apple-darwin CFLAGS='-O3 -m32' LDFLAGS=-m32
|
||||||
|
|
||||||
|
to the configure command line.
|
||||||
|
|
||||||
|
|
||||||
|
64-bit Backward-Compatible Build on 64-bit OS X
|
||||||
|
-----------------------------------------------
|
||||||
|
|
||||||
|
Add
|
||||||
|
|
||||||
|
--host x86_64-apple-darwin NASM=/opt/local/bin/nasm \
|
||||||
|
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
||||||
|
-mmacosx-version-min=10.5 -O3' \
|
||||||
|
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
||||||
|
-mmacosx-version-min=10.5'
|
||||||
|
|
||||||
|
to the configure command line. The OS X 10.5 SDK, and NASM 2.07 or later from
|
||||||
|
MacPorts, must be installed.
|
||||||
|
|
||||||
|
|
||||||
|
32-bit Backward-Compatible Build on OS X
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
Add
|
||||||
|
|
||||||
|
--host i686-apple-darwin \
|
||||||
|
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
||||||
|
-mmacosx-version-min=10.5 -O3 -m32' \
|
||||||
|
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
|
||||||
|
-mmacosx-version-min=10.5 -m32'
|
||||||
|
|
||||||
|
to the configure command line. The OS X 10.5 SDK must be installed.
|
||||||
|
|
||||||
|
|
||||||
|
64-bit Library Build on 64-bit Solaris
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
Add
|
||||||
|
|
||||||
|
--host x86_64-pc-solaris CFLAGS='-O3 -m64' LDFLAGS=-m64
|
||||||
|
|
||||||
|
to the configure command line.
|
||||||
|
|
||||||
|
|
||||||
|
32-bit Build on 64-bit FreeBSD
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
Add
|
||||||
|
|
||||||
|
--host i386-unknown-freebsd CC='gcc -B /usr/lib32' CFLAGS='-O3 -m32' \
|
||||||
|
LDFLAGS='-B/usr/lib32'
|
||||||
|
|
||||||
|
to the configure command line. NASM 2.07 or later from FreeBSD ports must be
|
||||||
|
installed.
|
||||||
|
|
||||||
|
|
||||||
|
Oracle Solaris Studio
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Add
|
||||||
|
|
||||||
|
CC=cc
|
||||||
|
|
||||||
|
to the configure command line. libjpeg-turbo will automatically be built with
|
||||||
|
the maximum optimization level (-xO5) unless you override CFLAGS.
|
||||||
|
|
||||||
|
To build a 64-bit version of libjpeg-turbo using Oracle Solaris Studio, add
|
||||||
|
|
||||||
|
--host x86_64-pc-solaris CC=cc CFLAGS='-xO5 -m64' LDFLAGS=-m64
|
||||||
|
|
||||||
|
to the configure command line.
|
||||||
|
|
||||||
|
|
||||||
|
MinGW Build on Cygwin
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Use CMake (see recipes below)
|
||||||
|
|
||||||
|
|
||||||
|
===========
|
||||||
|
ARM Support
|
||||||
|
===========
|
||||||
|
|
||||||
|
This release of libjpeg-turbo can use ARM NEON SIMD instructions to accelerate
|
||||||
|
JPEG compression/decompression by approximately 2-4x on ARMv7 and later
|
||||||
|
platforms. If libjpeg-turbo is configured on an ARM Linux platform, then the
|
||||||
|
build system will automatically include the NEON SIMD routines, if they are
|
||||||
|
supported. Build instructions for other ARM-based platforms follow.
|
||||||
|
|
||||||
|
|
||||||
|
Building libjpeg-turbo for iOS
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
iOS platforms, such as the iPhone and iPad, use ARM processors, some of which
|
||||||
|
support NEON instructions. Additional steps are required in order to build
|
||||||
|
libjpeg-turbo for these platforms.
|
||||||
|
|
||||||
|
Additional build requirements:
|
||||||
|
|
||||||
|
gas-preprocessor.pl
|
||||||
|
(https://sourceforge.net/p/libjpeg-turbo/code/HEAD/tree/gas-preprocessor)
|
||||||
|
should be installed in your PATH.
|
||||||
|
|
||||||
|
|
||||||
|
ARM 32-bit Build (Xcode 4.6.x and earlier, LLVM-GCC):
|
||||||
|
|
||||||
|
Set the following shell variables for simplicity:
|
||||||
|
|
||||||
|
Xcode 4.2 and earlier:
|
||||||
|
IOS_PLATFORMDIR=/Developer/Platforms/iPhoneOS.platform
|
||||||
|
Xcode 4.3 and later:
|
||||||
|
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||||
|
|
||||||
|
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk
|
||||||
|
IOS_GCC=$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
|
||||||
|
|
||||||
|
ARMv6 (code will run on all iOS devices, not SIMD-accelerated):
|
||||||
|
[NOTE: Requires Xcode 4.4.x or earlier]
|
||||||
|
IOS_CFLAGS="-march=armv6 -mcpu=arm1176jzf-s -mfpu=vfp"
|
||||||
|
|
||||||
|
ARMv7 (code will run on iPhone 3GS-4S/iPad 1st-3rd Generation and newer):
|
||||||
|
IOS_CFLAGS="-march=armv7 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon"
|
||||||
|
|
||||||
|
ARMv7s (code will run on iPhone 5/iPad 4th Generation and newer):
|
||||||
|
[NOTE: Requires Xcode 4.5 or later]
|
||||||
|
IOS_CFLAGS="-march=armv7s -mcpu=swift -mtune=swift -mfpu=neon"
|
||||||
|
|
||||||
|
Follow the procedure under "Building libjpeg-turbo" above, adding
|
||||||
|
|
||||||
|
--host arm-apple-darwin10 \
|
||||||
|
CC="$IOS_GCC" LD="$IOS_GCC" \
|
||||||
|
CFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" \
|
||||||
|
LDFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT $IOS_CFLAGS"
|
||||||
|
|
||||||
|
to the configure command line.
|
||||||
|
|
||||||
|
|
||||||
|
ARM 32-bit Build (Xcode 5.0.x and later, Clang):
|
||||||
|
|
||||||
|
Set the following shell variables for simplicity:
|
||||||
|
|
||||||
|
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||||
|
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk
|
||||||
|
IOS_GCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||||
|
|
||||||
|
ARMv7 (code will run on iPhone 3GS-4S/iPad 1st-3rd Generation and newer):
|
||||||
|
IOS_CFLAGS="-arch armv7"
|
||||||
|
|
||||||
|
ARMv7s (code will run on iPhone 5/iPad 4th Generation and newer):
|
||||||
|
IOS_CFLAGS="-arch armv7s"
|
||||||
|
|
||||||
|
Follow the procedure under "Building libjpeg-turbo" above, adding
|
||||||
|
|
||||||
|
--host arm-apple-darwin10 \
|
||||||
|
CC="$IOS_GCC" LD="$IOS_GCC" \
|
||||||
|
CFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" \
|
||||||
|
LDFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT $IOS_CFLAGS" \
|
||||||
|
CCASFLAGS="-no-integrated-as $IOS_CFLAGS"
|
||||||
|
|
||||||
|
to the configure command line.
|
||||||
|
|
||||||
|
|
||||||
|
ARMv8 64-bit Build (Xcode 5.0.x and later, Clang):
|
||||||
|
|
||||||
|
Code will run on iPhone 5S/iPad Mini 2/iPad Air and newer.
|
||||||
|
|
||||||
|
Set the following shell variables for simplicity:
|
||||||
|
|
||||||
|
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||||
|
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk
|
||||||
|
IOS_GCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||||
|
IOS_CFLAGS="-arch arm64"
|
||||||
|
|
||||||
|
Follow the procedure under "Building libjpeg-turbo" above, adding
|
||||||
|
|
||||||
|
--host aarch64-apple-darwin \
|
||||||
|
CC="$IOS_GCC" LD="$IOS_GCC" \
|
||||||
|
CFLAGS="-isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" \
|
||||||
|
LDFLAGS="-isysroot $IOS_SYSROOT $IOS_CFLAGS"
|
||||||
|
|
||||||
|
to the configure command line.
|
||||||
|
|
||||||
|
|
||||||
|
NOTE: You can also add -miphoneos-version-min={version} to $IOS_CFLAGS above
|
||||||
|
in order to support older versions of iOS than the default version supported by
|
||||||
|
the SDK.
|
||||||
|
|
||||||
|
Once built, lipo can be used to combine the ARMv6, v7, v7s, and/or v8 variants
|
||||||
|
into a universal library.
|
||||||
|
|
||||||
|
NOTE: If you are building libjpeg-turbo from the "official" project tarball,
|
||||||
|
then it is highly likely that you will need to run 'autoreconf -fiv' in the
|
||||||
|
source tree prior to building ARMv7, v7s, or v8 iOS binaries using the
|
||||||
|
techniques described above. Otherwise, you may get a libtool error such as
|
||||||
|
"unable to infer tagged configuration."
|
||||||
|
|
||||||
|
|
||||||
|
Building libjpeg-turbo for Android
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
Building libjpeg-turbo for Android platforms requires the Android NDK
|
||||||
|
(https://developer.android.com/tools/sdk/ndk) and autotools. The following is
|
||||||
|
a general recipe script that can be modified for your specific needs.
|
||||||
|
|
||||||
|
# Set these variables to suit your needs
|
||||||
|
NDK_PATH={full path to the "ndk" directory-- for example, /opt/android/ndk}
|
||||||
|
BUILD_PLATFORM={the platform name for the NDK package you installed--
|
||||||
|
for example, "windows-x86" or "linux-x86_64"}
|
||||||
|
TOOLCHAIN_VERSION={"4.6", "4.8", etc. This corresponds to a toolchain
|
||||||
|
directory under ${NDK_PATH}/toolchains/.}
|
||||||
|
ANDROID_VERSION={The minimum version of Android to support-- for example,
|
||||||
|
"9", "19", etc.}
|
||||||
|
|
||||||
|
HOST=arm-linux-androideabi
|
||||||
|
TOOLCHAIN=${NDK_PATH}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
|
||||||
|
SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-arm
|
||||||
|
ANDROID_INCLUDES="-I${SYSROOT}/usr/include -I${TOOLCHAIN}/include"
|
||||||
|
ANDROID_CFLAGS="-march=armv7-a -mfloat-abi=softfp -fprefetch-loop-arrays \
|
||||||
|
-fstrict-aliasing --sysroot=${SYSROOT}"
|
||||||
|
export CPP=${TOOLCHAIN}/bin/${HOST}-cpp
|
||||||
|
export AR=${TOOLCHAIN}/bin/${HOST}-ar
|
||||||
|
export AS=${TOOLCHAIN}/bin/${HOST}-as
|
||||||
|
export NM=${TOOLCHAIN}/bin/${HOST}-nm
|
||||||
|
export CC=${TOOLCHAIN}/bin/${HOST}-gcc
|
||||||
|
export LD=${TOOLCHAIN}/bin/${HOST}-ld
|
||||||
|
export RANLIB=${TOOLCHAIN}/bin/${HOST}-ranlib
|
||||||
|
export OBJDUMP=${TOOLCHAIN}/bin/${HOST}-objdump
|
||||||
|
export STRIP=${TOOLCHAIN}/bin/${HOST}-strip
|
||||||
|
cd {build_directory}
|
||||||
|
sh {source_directory}/configure --host=${HOST} \
|
||||||
|
CFLAGS="${ANDROID_INCLUDES} ${ANDROID_CFLAGS} -O3" \
|
||||||
|
CPPFLAGS="${ANDROID_INCLUDES} ${ANDROID_CFLAGS}" \
|
||||||
|
LDFLAGS="${ANDROID_CFLAGS}" --with-simd ${1+"$@"}
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
*******************************************************************************
|
||||||
|
** Building on Windows (Visual C++ or MinGW)
|
||||||
|
*******************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
==================
|
||||||
|
Build Requirements
|
||||||
|
==================
|
||||||
|
|
||||||
|
-- CMake (http://www.cmake.org) v2.8.8 or later
|
||||||
|
|
||||||
|
-- Microsoft Visual C++ 2005 or later
|
||||||
|
|
||||||
|
If you don't already have Visual C++, then the easiest way to get it is by
|
||||||
|
installing the Windows SDK:
|
||||||
|
|
||||||
|
http://msdn.microsoft.com/en-us/windows/bb980924.aspx
|
||||||
|
|
||||||
|
The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and
|
||||||
|
everything necessary to build libjpeg-turbo.
|
||||||
|
|
||||||
|
* You can also use Microsoft Visual Studio Express Edition, which is a free
|
||||||
|
download. (NOTE: versions prior to 2012 can only be used to build 32-bit
|
||||||
|
code.)
|
||||||
|
* If you intend to build libjpeg-turbo from the command line, then add the
|
||||||
|
appropriate compiler and SDK directories to the INCLUDE, LIB, and PATH
|
||||||
|
environment variables. This is generally accomplished by executing
|
||||||
|
vcvars32.bat or vcvars64.bat and SetEnv.cmd. vcvars32.bat and
|
||||||
|
vcvars64.bat are part of Visual C++ and are located in the same directory
|
||||||
|
as the compiler. SetEnv.cmd is part of the Windows SDK. You can pass
|
||||||
|
optional arguments to SetEnv.cmd to specify a 32-bit or 64-bit build
|
||||||
|
environment.
|
||||||
|
|
||||||
|
... OR ...
|
||||||
|
|
||||||
|
-- MinGW
|
||||||
|
|
||||||
|
MinGW-builds (http://sourceforge.net/projects/mingwbuilds/) or
|
||||||
|
tdm-gcc (http://tdm-gcc.tdragon.net/) recommended if building on a Windows
|
||||||
|
machine. Both distributions install a Start Menu link that can be used to
|
||||||
|
launch a command prompt with the appropriate compiler paths automatically
|
||||||
|
set.
|
||||||
|
|
||||||
|
-- NASM (http://www.nasm.us/) 0.98 or later (NASM 2.05 or later is required for
|
||||||
|
a 64-bit build)
|
||||||
|
|
||||||
|
-- If building the TurboJPEG Java wrapper, JDK 1.5 or later is required. This
|
||||||
|
can be downloaded from http://www.java.com.
|
||||||
|
|
||||||
|
|
||||||
|
==================
|
||||||
|
Out-of-Tree Builds
|
||||||
|
==================
|
||||||
|
|
||||||
|
Binary objects, libraries, and executables are generated in the same directory
|
||||||
|
from which cmake was executed (the "binary directory"), and this directory need
|
||||||
|
not necessarily be the same as the libjpeg-turbo source directory. You can
|
||||||
|
create multiple independent binary directories, in which different versions of
|
||||||
|
libjpeg-turbo can be built from the same source tree using different compilers
|
||||||
|
or settings. In the sections below, {build_directory} refers to the binary
|
||||||
|
directory, whereas {source_directory} refers to the libjpeg-turbo source
|
||||||
|
directory. For in-tree builds, these directories are the same.
|
||||||
|
|
||||||
|
|
||||||
|
======================
|
||||||
|
Building libjpeg-turbo
|
||||||
|
======================
|
||||||
|
|
||||||
|
|
||||||
|
Visual C++ (Command Line)
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release {source_directory}
|
||||||
|
nmake
|
||||||
|
|
||||||
|
This will build either a 32-bit or a 64-bit version of libjpeg-turbo, depending
|
||||||
|
on which version of cl.exe is in the PATH.
|
||||||
|
|
||||||
|
The following files will be generated under {build_directory}:
|
||||||
|
|
||||||
|
jpeg-static.lib
|
||||||
|
Static link library for the libjpeg API
|
||||||
|
sharedlib/jpeg{version}.dll
|
||||||
|
DLL for the libjpeg API
|
||||||
|
sharedlib/jpeg.lib
|
||||||
|
Import library for the libjpeg API
|
||||||
|
turbojpeg-static.lib
|
||||||
|
Static link library for the TurboJPEG API
|
||||||
|
turbojpeg.dll
|
||||||
|
DLL for the TurboJPEG API
|
||||||
|
turbojpeg.lib
|
||||||
|
Import library for the TurboJPEG API
|
||||||
|
|
||||||
|
{version} is 62, 7, or 8, depending on whether libjpeg v6b (default), v7, or
|
||||||
|
v8 emulation is enabled.
|
||||||
|
|
||||||
|
|
||||||
|
Visual C++ (IDE)
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Choose the appropriate CMake generator option for your version of Visual Studio
|
||||||
|
(run "cmake" with no arguments for a list of available generators.) For
|
||||||
|
instance:
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
cmake -G "Visual Studio 10" {source_directory}
|
||||||
|
|
||||||
|
NOTE: Add "Win64" to the generator name (for example, "Visual Studio 10
|
||||||
|
Win64") to build a 64-bit version of libjpeg-turbo. Recent versions of CMake
|
||||||
|
no longer document that. A separate build directory must be used for 32-bit
|
||||||
|
and 64-bit builds.
|
||||||
|
|
||||||
|
You can then open ALL_BUILD.vcproj in Visual Studio and build one of the
|
||||||
|
configurations in that project ("Debug", "Release", etc.) to generate a full
|
||||||
|
build of libjpeg-turbo.
|
||||||
|
|
||||||
|
This will generate the following files under {build_directory}:
|
||||||
|
|
||||||
|
{configuration}/jpeg-static.lib
|
||||||
|
Static link library for the libjpeg API
|
||||||
|
sharedlib/{configuration}/jpeg{version}.dll
|
||||||
|
DLL for the libjpeg API
|
||||||
|
sharedlib/{configuration}/jpeg.lib
|
||||||
|
Import library for the libjpeg API
|
||||||
|
{configuration}/turbojpeg-static.lib
|
||||||
|
Static link library for the TurboJPEG API
|
||||||
|
{configuration}/turbojpeg.dll
|
||||||
|
DLL for the TurboJPEG API
|
||||||
|
{configuration}/turbojpeg.lib
|
||||||
|
Import library for the TurboJPEG API
|
||||||
|
|
||||||
|
{configuration} is Debug, Release, RelWithDebInfo, or MinSizeRel, depending on
|
||||||
|
the configuration you built in the IDE, and {version} is 62, 7, or 8,
|
||||||
|
depending on whether libjpeg v6b (default), v7, or v8 emulation is enabled.
|
||||||
|
|
||||||
|
|
||||||
|
MinGW
|
||||||
|
-----
|
||||||
|
|
||||||
|
NOTE: This assumes that you are building on a Windows machine. If you are
|
||||||
|
cross-compiling on a Linux/Unix machine, then see "Build Recipes" below.
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
cmake -G "MinGW Makefiles" {source_directory}
|
||||||
|
mingw32-make
|
||||||
|
|
||||||
|
This will generate the following files under {build_directory}
|
||||||
|
|
||||||
|
libjpeg.a
|
||||||
|
Static link library for the libjpeg API
|
||||||
|
sharedlib/libjpeg-{version}.dll
|
||||||
|
DLL for the libjpeg API
|
||||||
|
sharedlib/libjpeg.dll.a
|
||||||
|
Import library for the libjpeg API
|
||||||
|
libturbojpeg.a
|
||||||
|
Static link library for the TurboJPEG API
|
||||||
|
libturbojpeg.dll
|
||||||
|
DLL for the TurboJPEG API
|
||||||
|
libturbojpeg.dll.a
|
||||||
|
Import library for the TurboJPEG API
|
||||||
|
|
||||||
|
{version} is 62, 7, or 8, depending on whether libjpeg v6b (default), v7, or
|
||||||
|
v8 emulation is enabled.
|
||||||
|
|
||||||
|
|
||||||
|
Debug Build
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Add "-DCMAKE_BUILD_TYPE=Debug" to the cmake command line. Or, if building with
|
||||||
|
NMake, remove "-DCMAKE_BUILD_TYPE=Release" (Debug builds are the default with
|
||||||
|
NMake.)
|
||||||
|
|
||||||
|
|
||||||
|
libjpeg v7 or v8 API/ABI Emulation
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
Add "-DWITH_JPEG7=1" to the cmake command line to build a version of
|
||||||
|
libjpeg-turbo that is API/ABI-compatible with libjpeg v7. Add "-DWITH_JPEG8=1"
|
||||||
|
to the cmake command to build a version of libjpeg-turbo that is
|
||||||
|
API/ABI-compatible with libjpeg v8. See README-turbo.txt for more information
|
||||||
|
on libjpeg v7 and v8 emulation.
|
||||||
|
|
||||||
|
|
||||||
|
In-Memory Source/Destination Managers
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
When using libjpeg v6b or v7 API/ABI emulation, add -DWITH_MEM_SRCDST=0 to the
|
||||||
|
CMake command line to build a version of libjpeg-turbo that lacks the
|
||||||
|
jpeg_mem_src() and jpeg_mem_dest() functions. These functions were not part of
|
||||||
|
the original libjpeg v6b and v7 APIs, so removing them ensures strict
|
||||||
|
conformance with those APIs. See README-turbo.txt for more information.
|
||||||
|
|
||||||
|
|
||||||
|
Arithmetic Coding Support
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Since the patent on arithmetic coding has expired, this functionality has been
|
||||||
|
included in this release of libjpeg-turbo. libjpeg-turbo's implementation is
|
||||||
|
based on the implementation in libjpeg v8, but it works when emulating libjpeg
|
||||||
|
v7 or v6b as well. The default is to enable both arithmetic encoding and
|
||||||
|
decoding, but those who have philosophical objections to arithmetic coding can
|
||||||
|
add "-DWITH_ARITH_ENC=0" or "-DWITH_ARITH_DEC=0" to the cmake command line to
|
||||||
|
disable encoding or decoding (respectively.)
|
||||||
|
|
||||||
|
|
||||||
|
TurboJPEG Java Wrapper
|
||||||
|
----------------------
|
||||||
|
Add "-DWITH_JAVA=1" to the cmake command line to incorporate an optional Java
|
||||||
|
Native Interface wrapper into the TurboJPEG shared library and build the Java
|
||||||
|
front-end classes to support it. This allows the TurboJPEG shared library to
|
||||||
|
be used directly from Java applications. See java/README for more details.
|
||||||
|
|
||||||
|
If you are using CMake 2.8, you can set the Java_JAVAC_EXECUTABLE,
|
||||||
|
Java_JAVA_EXECUTABLE, and Java_JAR_EXECUTABLE CMake variables to specify
|
||||||
|
alternate commands or locations for javac, jar, and java (respectively.) If
|
||||||
|
you are using CMake 2.6, set JAVA_COMPILE, JAVA_RUNTIME, and JAVA_ARCHIVE
|
||||||
|
instead. You can also set the JAVACFLAGS CMake variable to specify arguments
|
||||||
|
that should be passed to the Java compiler when building the front-end classes.
|
||||||
|
|
||||||
|
|
||||||
|
========================
|
||||||
|
Installing libjpeg-turbo
|
||||||
|
========================
|
||||||
|
|
||||||
|
You can use the build system to install libjpeg-turbo into a directory of your
|
||||||
|
choosing (as opposed to creating an installer.) To do this, add:
|
||||||
|
|
||||||
|
-DCMAKE_INSTALL_PREFIX={install_directory}
|
||||||
|
|
||||||
|
to the cmake command line.
|
||||||
|
|
||||||
|
For example,
|
||||||
|
|
||||||
|
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=c:\libjpeg-turbo {source_directory}
|
||||||
|
nmake install
|
||||||
|
|
||||||
|
will install the header files in c:\libjpeg-turbo\include, the library files
|
||||||
|
in c:\libjpeg-turbo\lib, the DLL's in c:\libjpeg-turbo\bin, and the
|
||||||
|
documentation in c:\libjpeg-turbo\doc.
|
||||||
|
|
||||||
|
|
||||||
|
=============
|
||||||
|
Build Recipes
|
||||||
|
=============
|
||||||
|
|
||||||
|
|
||||||
|
64-bit MinGW Build on Cygwin
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
CC=/usr/bin/x86_64-w64-mingw32-gcc \
|
||||||
|
cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
|
||||||
|
-DCMAKE_RC_COMPILER=/usr/bin/x86_64-w64-mingw32-windres.exe \
|
||||||
|
{source_directory}
|
||||||
|
make
|
||||||
|
|
||||||
|
This produces a 64-bit build of libjpeg-turbo that does not depend on
|
||||||
|
cygwin1.dll or other Cygwin DLL's. The mingw64-x86_64-gcc-core and
|
||||||
|
mingw64-x86_64-gcc-g++ packages (and their dependencies) must be installed.
|
||||||
|
|
||||||
|
|
||||||
|
32-bit MinGW Build on Cygwin
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
CC=/usr/bin/i686-w64-mingw32-gcc \
|
||||||
|
cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
|
||||||
|
-DCMAKE_RC_COMPILER=/usr/bin/i686-w64-mingw32-windres.exe \
|
||||||
|
{source_directory}
|
||||||
|
make
|
||||||
|
|
||||||
|
This produces a 32-bit build of libjpeg-turbo that does not depend on
|
||||||
|
cygwin1.dll or other Cygwin DLL's. The mingw64-i686-gcc-core and
|
||||||
|
mingw64-i686-gcc-g++ packages (and their dependencies) must be installed.
|
||||||
|
|
||||||
|
|
||||||
|
MinGW Build on Linux
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
CC={mingw_binary_path}/i386-mingw32-gcc \
|
||||||
|
cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
|
||||||
|
-DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
|
||||||
|
-DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
|
||||||
|
{source_directory}
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
*******************************************************************************
|
||||||
|
** Creating Release Packages
|
||||||
|
*******************************************************************************
|
||||||
|
|
||||||
|
The following commands can be used to create various types of release packages:
|
||||||
|
|
||||||
|
|
||||||
|
Unix/Linux
|
||||||
|
----------
|
||||||
|
|
||||||
|
make rpm
|
||||||
|
|
||||||
|
Create Red Hat-style binary RPM package. Requires RPM v4 or later.
|
||||||
|
|
||||||
|
make srpm
|
||||||
|
|
||||||
|
This runs 'make dist' to create a pristine source tarball, then creates a
|
||||||
|
Red Hat-style source RPM package from the tarball. Requires RPM v4 or later.
|
||||||
|
|
||||||
|
make deb
|
||||||
|
|
||||||
|
Create Debian-style binary package. Requires dpkg.
|
||||||
|
|
||||||
|
make dmg
|
||||||
|
|
||||||
|
Create Macintosh package/disk image. This requires pkgbuild and
|
||||||
|
productbuild, which are installed by default on OS X 10.7 and later and which
|
||||||
|
can be obtained by installing Xcode 3.2.6 (with the "Unix Development"
|
||||||
|
option) on OS X 10.6. Packages built in this manner can be installed on OS X
|
||||||
|
10.5 and later, but they must be built on OS X 10.6 or later.
|
||||||
|
|
||||||
|
make udmg [BUILDDIR32={32-bit build directory}]
|
||||||
|
|
||||||
|
On 64-bit OS X systems, this creates a Macintosh package and disk image that
|
||||||
|
contains universal i386/x86-64 binaries. You should first configure a 32-bit
|
||||||
|
out-of-tree build of libjpeg-turbo, then configure a 64-bit out-of-tree
|
||||||
|
build, then run 'make udmg' from the 64-bit build directory. The build
|
||||||
|
system will look for the 32-bit build under {source_directory}/osxx86 by
|
||||||
|
default, but you can override this by setting the BUILDDIR32 variable on the
|
||||||
|
make command line as shown above.
|
||||||
|
|
||||||
|
make iosdmg [BUILDDIR32={32-bit build directory}] \
|
||||||
|
[BUILDDIRARMV6={ARMv6 build directory}] \
|
||||||
|
[BUILDDIRARMV7={ARMv7 build directory}] \
|
||||||
|
[BUILDDIRARMV7S={ARMv7s build directory}] \
|
||||||
|
[BUILDDIRARMV8={ARMv8 build directory}]
|
||||||
|
|
||||||
|
On OS X systems, this creates a Macintosh package and disk image in which the
|
||||||
|
libjpeg-turbo static libraries contain ARM architectures necessary to build
|
||||||
|
iOS applications. If building on an x86-64 system, the binaries will also
|
||||||
|
contain the i386 architecture, as with 'make udmg' above. You should first
|
||||||
|
configure ARMv6, ARMv7, ARMv7s, and/or ARMv8 out-of-tree builds of
|
||||||
|
libjpeg-turbo (see "Building libjpeg-turbo for iOS" above.) If you are
|
||||||
|
building an x86-64 version of libjpeg-turbo, you should configure a 32-bit
|
||||||
|
out-of-tree build as well. Next, build libjpeg-turbo as you would normally,
|
||||||
|
using an out-of-tree build. When it is built, run 'make iosdmg' from the
|
||||||
|
build directory. The build system will look for the ARMv6 build under
|
||||||
|
{source_directory}/iosarmv6 by default, the ARMv7 build under
|
||||||
|
{source_directory}/iosarmv7 by default, the ARMv7s build under
|
||||||
|
{source_directory}/iosarmv7s by default, the ARMv8 build under
|
||||||
|
{source_directory}/iosarmv8 by default, and (if applicable) the 32-bit build
|
||||||
|
under {source_directory}/osxx86 by default, but you can override this by
|
||||||
|
setting the BUILDDIR32, BUILDDIRARMV6, BUILDDIRARMV7, BUILDDIRARMV7S, and/or
|
||||||
|
BUILDDIRARMV8 variables on the make command line as shown above.
|
||||||
|
|
||||||
|
NOTE: If including an ARMv8 build in the package, then you may need to use
|
||||||
|
Xcode's version of lipo instead of the operating system's. To do this, pass
|
||||||
|
an argument of LIPO="xcrun lipo" on the make command line.
|
||||||
|
|
||||||
|
make cygwinpkg
|
||||||
|
|
||||||
|
Build a Cygwin binary package.
|
||||||
|
|
||||||
|
|
||||||
|
Windows
|
||||||
|
-------
|
||||||
|
|
||||||
|
If using NMake:
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
nmake installer
|
||||||
|
|
||||||
|
If using MinGW:
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
make installer
|
||||||
|
|
||||||
|
If using the Visual Studio IDE, build the "installer" project.
|
||||||
|
|
||||||
|
The installer package (libjpeg-turbo[-gcc][64].exe) will be located under
|
||||||
|
{build_directory}. If building using the Visual Studio IDE, then the installer
|
||||||
|
package will be located in a subdirectory with the same name as the
|
||||||
|
configuration you built (such as {build_directory}\Debug\ or
|
||||||
|
{build_directory}\Release\).
|
||||||
|
|
||||||
|
Building a Windows installer requires the Nullsoft Install System
|
||||||
|
(http://nsis.sourceforge.net/.) makensis.exe should be in your PATH.
|
||||||
|
|
||||||
|
|
||||||
|
*******************************************************************************
|
||||||
|
** Regression testing
|
||||||
|
*******************************************************************************
|
||||||
|
|
||||||
|
The most common way to test libjpeg-turbo is by invoking 'make test' on
|
||||||
|
Unix/Linux platforms or 'ctest' on Windows platforms, once the build has
|
||||||
|
completed. This runs a series of tests to ensure that mathematical
|
||||||
|
compatibility has been maintained between libjpeg-turbo and libjpeg v6b. This
|
||||||
|
also invokes the TurboJPEG unit tests, which ensure that the colorspace
|
||||||
|
extensions, YUV encoding, decompression scaling, and other features of the
|
||||||
|
TurboJPEG C and Java APIs are working properly (and, by extension, that the
|
||||||
|
equivalent features of the underlying libjpeg API are also working.)
|
||||||
|
|
||||||
|
Invoking 'make testclean' or 'nmake testclean' (if using NMake) or building
|
||||||
|
the 'testclean' target (if using the Visual Studio IDE) will clean up the
|
||||||
|
output images generated by 'make test'.
|
||||||
|
|
||||||
|
On Unix/Linux platforms, more extensive tests of the TurboJPEG C and Java
|
||||||
|
wrappers can be run by invoking 'make tjtest'. These extended TurboJPEG tests
|
||||||
|
essentially iterate through all of the available features of the TurboJPEG APIs
|
||||||
|
that are not covered by the TurboJPEG unit tests (this includes the lossless
|
||||||
|
transform options) and compare the images generated by each feature to images
|
||||||
|
generated using the equivalent feature in the libjpeg API. The extended
|
||||||
|
TurboJPEG tests are meant to test for regressions in the TurboJPEG wrappers,
|
||||||
|
not in the underlying libjpeg API library.
|
||||||
856
CMakeLists.txt
Normal file
@@ -0,0 +1,856 @@
|
|||||||
|
#
|
||||||
|
# Setup
|
||||||
|
#
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 2.8.8)
|
||||||
|
# Use LINK_INTERFACE_LIBRARIES instead of INTERFACE_LINK_LIBRARIES
|
||||||
|
if(POLICY CMP0022)
|
||||||
|
cmake_policy(SET CMP0022 OLD)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
project(libjpeg-turbo C)
|
||||||
|
set(VERSION 1.4.1)
|
||||||
|
|
||||||
|
if(CYGWIN OR NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||||
|
execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD)
|
||||||
|
string(REGEX REPLACE "\n" "" BUILD ${BUILD})
|
||||||
|
elseif(WIN32)
|
||||||
|
execute_process(COMMAND "wmic.exe" "os" "get" "LocalDateTime" OUTPUT_VARIABLE
|
||||||
|
BUILD)
|
||||||
|
string(REGEX REPLACE "[^0-9]" "" BUILD "${BUILD}")
|
||||||
|
if (BUILD STREQUAL "")
|
||||||
|
execute_process(COMMAND "cmd.exe" "/C" "DATE" "/T" OUTPUT_VARIABLE BUILD)
|
||||||
|
string(REGEX REPLACE ".*[ ]([0-9]*)[/.]([0-9]*)[/.]([0-9]*).*" "\\3\\2\\1" BUILD "${BUILD}")
|
||||||
|
else()
|
||||||
|
string(SUBSTRING "${BUILD}" 0 8 BUILD)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Platform not supported by this build system. Use autotools instead.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# This does nothing except when using MinGW. CMAKE_BUILD_TYPE has no meaning
|
||||||
|
# in Visual Studio, and it always defaults to Debug when using NMake.
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
|
||||||
|
|
||||||
|
# This only works if building from the command line. There is currently no way
|
||||||
|
# to set a variable's value based on the build type when using Visual Studio.
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
set(BUILD "${BUILD}d")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
|
||||||
|
|
||||||
|
option(WITH_SIMD "Include SIMD extensions" TRUE)
|
||||||
|
option(WITH_ARITH_ENC "Include arithmetic encoding support" TRUE)
|
||||||
|
option(WITH_ARITH_DEC "Include arithmetic decoding support" TRUE)
|
||||||
|
option(WITH_JPEG7 "Emulate libjpeg v7 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b)" FALSE)
|
||||||
|
option(WITH_JPEG8 "Emulate libjpeg v8 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b)" FALSE)
|
||||||
|
option(WITH_MEM_SRCDST "Include in-memory source/destination manager functions when emulating the libjpeg v6b or v7 API/ABI" TRUE)
|
||||||
|
option(WITH_TURBOJPEG "Include the TurboJPEG wrapper library and associated test programs" TRUE)
|
||||||
|
option(WITH_JAVA "Build Java wrapper for the TurboJPEG library" FALSE)
|
||||||
|
option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_SIMD=0 WITH_TURBOJPEG=0 WITH_ARITH_ENC=0 WITH_ARITH_DEC=0)" FALSE)
|
||||||
|
option(ENABLE_STATIC "Build static libraries" TRUE)
|
||||||
|
option(ENABLE_SHARED "Build shared libraries" TRUE)
|
||||||
|
|
||||||
|
if(WITH_12BIT)
|
||||||
|
set(WITH_SIMD FALSE)
|
||||||
|
set(WITH_TURBOJPEG FALSE)
|
||||||
|
set(WITH_ARITH_ENC FALSE)
|
||||||
|
set(WITH_ARITH_DEC FALSE)
|
||||||
|
set(BITS_IN_JSAMPLE 12)
|
||||||
|
message(STATUS "12-bit JPEG support enabled")
|
||||||
|
else()
|
||||||
|
set(BITS_IN_JSAMPLE 8)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_ARITH_ENC)
|
||||||
|
set(C_ARITH_CODING_SUPPORTED 1)
|
||||||
|
message(STATUS "Arithmetic encoding support enabled")
|
||||||
|
else()
|
||||||
|
message(STATUS "Arithmetic encoding support disabled")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_ARITH_DEC)
|
||||||
|
set(D_ARITH_CODING_SUPPORTED 1)
|
||||||
|
message(STATUS "Arithmetic decoding support enabled")
|
||||||
|
else()
|
||||||
|
message(STATUS "Arithmetic decoding support disabled")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_TURBOJPEG)
|
||||||
|
message(STATUS "TurboJPEG C wrapper enabled")
|
||||||
|
else()
|
||||||
|
message(STATUS "TurboJPEG C wrapper disabled")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_JAVA)
|
||||||
|
message(STATUS "TurboJPEG Java wrapper enabled")
|
||||||
|
else()
|
||||||
|
message(STATUS "TurboJPEG Java wrapper disabled")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(SO_AGE 0)
|
||||||
|
if(WITH_MEM_SRCDST)
|
||||||
|
set(SO_AGE 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(JPEG_LIB_VERSION 62)
|
||||||
|
set(DLL_VERSION ${JPEG_LIB_VERSION})
|
||||||
|
set(FULLVERSION ${DLL_VERSION}.${SO_AGE}.0)
|
||||||
|
if(WITH_JPEG8)
|
||||||
|
set(JPEG_LIB_VERSION 80)
|
||||||
|
set(DLL_VERSION 8)
|
||||||
|
set(FULLVERSION ${DLL_VERSION}.0.2)
|
||||||
|
message(STATUS "Emulating libjpeg v8 API/ABI")
|
||||||
|
elseif(WITH_JPEG7)
|
||||||
|
set(JPEG_LIB_VERSION 70)
|
||||||
|
set(DLL_VERSION 7)
|
||||||
|
set(FULLVERSION ${DLL_VERSION}.${SO_AGE}.0)
|
||||||
|
message(STATUS "Emulating libjpeg v7 API/ABI")
|
||||||
|
endif(WITH_JPEG8)
|
||||||
|
|
||||||
|
if(WITH_MEM_SRCDST)
|
||||||
|
set(MEM_SRCDST_SUPPORTED 1)
|
||||||
|
message(STATUS "In-memory source/destination managers enabled")
|
||||||
|
else()
|
||||||
|
message(STATUS "In-memory source/destination managers disabled")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
option(WITH_CRT_DLL
|
||||||
|
"Link all libjpeg-turbo libraries and executables with the C run-time DLL (msvcr*.dll) instead of the static C run-time library (libcmt*.lib.) The default is to use the C run-time DLL only with the libraries and executables that need it."
|
||||||
|
FALSE)
|
||||||
|
if(NOT WITH_CRT_DLL)
|
||||||
|
# Use the static C library for all build types
|
||||||
|
foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||||
|
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||||
|
if(${var} MATCHES "/MD")
|
||||||
|
string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
add_definitions(-W3 -wd4996)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Detect whether compiler is 64-bit
|
||||||
|
if(MSVC AND CMAKE_CL_64)
|
||||||
|
set(SIMD_X86_64 1)
|
||||||
|
set(64BIT 1)
|
||||||
|
elseif(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||||
|
set(SIMD_X86_64 1)
|
||||||
|
set(64BIT 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(64BIT)
|
||||||
|
message(STATUS "64-bit build")
|
||||||
|
else()
|
||||||
|
message(STATUS "32-bit build")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
|
if(MSVC)
|
||||||
|
set(CMAKE_INSTALL_PREFIX_DEFAULT ${CMAKE_PROJECT_NAME})
|
||||||
|
else()
|
||||||
|
set(CMAKE_INSTALL_PREFIX_DEFAULT ${CMAKE_PROJECT_NAME}-gcc)
|
||||||
|
endif()
|
||||||
|
if(64BIT)
|
||||||
|
set(CMAKE_INSTALL_PREFIX_DEFAULT ${CMAKE_INSTALL_PREFIX_DEFAULT}64)
|
||||||
|
endif()
|
||||||
|
set(CMAKE_INSTALL_PREFIX "c:/${CMAKE_INSTALL_PREFIX_DEFAULT}" CACHE PATH
|
||||||
|
"Directory into which to install libjpeg-turbo (default: c:/${CMAKE_INSTALL_PREFIX_DEFAULT})"
|
||||||
|
FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Install directory = ${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
configure_file(win/jconfig.h.in jconfig.h)
|
||||||
|
configure_file(win/jconfigint.h.in jconfigint.h)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
||||||
|
|
||||||
|
if(WITH_JAVA)
|
||||||
|
find_package(Java)
|
||||||
|
find_package(JNI)
|
||||||
|
if(DEFINED JAVACFLAGS)
|
||||||
|
message(STATUS "Java compiler flags = ${JAVACFLAGS}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Targets
|
||||||
|
#
|
||||||
|
|
||||||
|
set(JPEG_SOURCES jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c
|
||||||
|
jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c jcphuff.c
|
||||||
|
jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c jdatasrc.c
|
||||||
|
jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c
|
||||||
|
jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c
|
||||||
|
jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c
|
||||||
|
jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c)
|
||||||
|
|
||||||
|
if(WITH_ARITH_ENC OR WITH_ARITH_DEC)
|
||||||
|
set(JPEG_SOURCES ${JPEG_SOURCES} jaricom.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_ARITH_ENC)
|
||||||
|
set(JPEG_SOURCES ${JPEG_SOURCES} jcarith.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_ARITH_DEC)
|
||||||
|
set(JPEG_SOURCES ${JPEG_SOURCES} jdarith.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_SIMD)
|
||||||
|
add_definitions(-DWITH_SIMD)
|
||||||
|
add_subdirectory(simd)
|
||||||
|
if(SIMD_X86_64)
|
||||||
|
set(JPEG_SOURCES ${JPEG_SOURCES} simd/jsimd_x86_64.c)
|
||||||
|
else()
|
||||||
|
set(JPEG_SOURCES ${JPEG_SOURCES} simd/jsimd_i386.c)
|
||||||
|
endif()
|
||||||
|
# This tells CMake that the "source" files haven't been generated yet
|
||||||
|
set_source_files_properties(${SIMD_OBJS} PROPERTIES GENERATED 1)
|
||||||
|
else()
|
||||||
|
set(JPEG_SOURCES ${JPEG_SOURCES} jsimd_none.c)
|
||||||
|
message(STATUS "Not using SIMD acceleration")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_JAVA)
|
||||||
|
add_subdirectory(java)
|
||||||
|
set(ENABLE_SHARED TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_SHARED)
|
||||||
|
add_subdirectory(sharedlib)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_STATIC OR WITH_TURBOJPEG)
|
||||||
|
add_library(jpeg-static STATIC ${JPEG_SOURCES} ${SIMD_OBJS})
|
||||||
|
if(NOT MSVC)
|
||||||
|
set_target_properties(jpeg-static PROPERTIES OUTPUT_NAME jpeg)
|
||||||
|
endif()
|
||||||
|
if(WITH_SIMD)
|
||||||
|
add_dependencies(jpeg-static simd)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_TURBOJPEG)
|
||||||
|
set(TURBOJPEG_SOURCES turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c)
|
||||||
|
if(WITH_JAVA)
|
||||||
|
set(TURBOJPEG_SOURCES ${TURBOJPEG_SOURCES} turbojpeg-jni.c)
|
||||||
|
include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_SHARED)
|
||||||
|
add_library(turbojpeg SHARED ${TURBOJPEG_SOURCES})
|
||||||
|
set_target_properties(turbojpeg PROPERTIES DEFINE_SYMBOL DLLDEFINE)
|
||||||
|
if(MINGW)
|
||||||
|
set_target_properties(turbojpeg PROPERTIES LINK_FLAGS -Wl,--kill-at)
|
||||||
|
endif()
|
||||||
|
target_link_libraries(turbojpeg jpeg-static)
|
||||||
|
set_target_properties(turbojpeg PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||||
|
|
||||||
|
add_executable(tjunittest tjunittest.c tjutil.c)
|
||||||
|
target_link_libraries(tjunittest turbojpeg)
|
||||||
|
|
||||||
|
add_executable(tjbench tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c wrbmp.c
|
||||||
|
wrppm.c)
|
||||||
|
target_link_libraries(tjbench turbojpeg jpeg-static)
|
||||||
|
set_property(TARGET tjbench PROPERTY COMPILE_FLAGS
|
||||||
|
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_STATIC)
|
||||||
|
add_library(turbojpeg-static STATIC ${JPEG_SOURCES} ${SIMD_OBJS}
|
||||||
|
turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c)
|
||||||
|
if(NOT MSVC)
|
||||||
|
set_target_properties(turbojpeg-static PROPERTIES OUTPUT_NAME turbojpeg)
|
||||||
|
endif()
|
||||||
|
if(WITH_SIMD)
|
||||||
|
add_dependencies(turbojpeg-static simd)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_executable(tjunittest-static tjunittest.c tjutil.c)
|
||||||
|
target_link_libraries(tjunittest-static turbojpeg-static)
|
||||||
|
|
||||||
|
add_executable(tjbench-static tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c
|
||||||
|
wrbmp.c wrppm.c)
|
||||||
|
target_link_libraries(tjbench-static turbojpeg-static jpeg-static)
|
||||||
|
set_property(TARGET tjbench-static PROPERTY COMPILE_FLAGS
|
||||||
|
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_12BIT)
|
||||||
|
set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED -DUSE_SETMODE")
|
||||||
|
else()
|
||||||
|
set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE")
|
||||||
|
set(CJPEG_BMP_SOURCES rdbmp.c rdtarga.c)
|
||||||
|
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_STATIC)
|
||||||
|
add_executable(cjpeg-static cjpeg.c cdjpeg.c rdgif.c rdppm.c rdswitch.c
|
||||||
|
${CJPEG_BMP_SOURCES})
|
||||||
|
set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||||
|
target_link_libraries(cjpeg-static jpeg-static)
|
||||||
|
|
||||||
|
add_executable(djpeg-static djpeg.c cdjpeg.c rdcolmap.c rdswitch.c wrgif.c
|
||||||
|
wrppm.c ${DJPEG_BMP_SOURCES})
|
||||||
|
set_property(TARGET djpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||||
|
target_link_libraries(djpeg-static jpeg-static)
|
||||||
|
|
||||||
|
add_executable(jpegtran-static jpegtran.c cdjpeg.c rdswitch.c transupp.c)
|
||||||
|
target_link_libraries(jpegtran-static jpeg-static)
|
||||||
|
set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "-DUSE_SETMODE")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_executable(rdjpgcom rdjpgcom.c)
|
||||||
|
|
||||||
|
add_executable(wrjpgcom wrjpgcom.c)
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Tests
|
||||||
|
#
|
||||||
|
|
||||||
|
if(MSVC_IDE)
|
||||||
|
set(OBJDIR "\${CTEST_CONFIGURATION_TYPE}/")
|
||||||
|
else()
|
||||||
|
set(OBJDIR "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
|
if(WITH_12BIT)
|
||||||
|
set(TESTORIG testorig12.jpg)
|
||||||
|
set(MD5_JPEG_RGB_ISLOW 9620f424569594bb9242b48498ad801f)
|
||||||
|
set(MD5_PPM_RGB_ISLOW f3301d2219783b8b3d942b7239fa50c0)
|
||||||
|
set(MD5_JPEG_422_IFAST_OPT 7322e3bd2f127f7de4b40d4480ce60e4)
|
||||||
|
set(MD5_PPM_422_IFAST 79807fa552899e66a04708f533e16950)
|
||||||
|
set(MD5_PPM_422M_IFAST 07737bfe8a7c1c87aaa393a0098d16b0)
|
||||||
|
set(MD5_JPEG_420_IFAST_Q100_PROG a1da220b5604081863a504297ed59e55)
|
||||||
|
set(MD5_PPM_420_Q100_IFAST 1b3730122709f53d007255e8dfd3305e)
|
||||||
|
set(MD5_PPM_420M_Q100_IFAST 980a1a3c5bf9510022869d30b7d26566)
|
||||||
|
set(MD5_JPEG_GRAY_ISLOW 235c90707b16e2e069f37c888b2636d9)
|
||||||
|
set(MD5_PPM_GRAY_ISLOW 7213c10af507ad467da5578ca5ee1fca)
|
||||||
|
set(MD5_PPM_GRAY_ISLOW_RGB e96ee81c30a6ed422d466338bd3de65d)
|
||||||
|
set(MD5_JPEG_420S_IFAST_OPT 7af8e60be4d9c227ec63ac9b6630855e)
|
||||||
|
set(MD5_JPEG_3x2_FLOAT_PROG a8c17daf77b457725ec929e215b603f8)
|
||||||
|
set(MD5_PPM_3x2_FLOAT 42876ab9e5c2f76a87d08db5fbd57956)
|
||||||
|
set(MD5_PPM_420M_ISLOW_2_1 4ca6be2a6f326ff9eaab63e70a8259c0)
|
||||||
|
set(MD5_PPM_420M_ISLOW_15_8 12aa9f9534c1b3d7ba047322226365eb)
|
||||||
|
set(MD5_PPM_420M_ISLOW_13_8 f7e22817c7b25e1393e4ec101e9d4e96)
|
||||||
|
set(MD5_PPM_420M_ISLOW_11_8 800a16f9f4dc9b293197bfe11be10a82)
|
||||||
|
set(MD5_PPM_420M_ISLOW_9_8 06b7a92a9bc69f4dc36ec40f1937d55c)
|
||||||
|
set(MD5_PPM_420M_ISLOW_7_8 3ec444a14a4ab4eab88ffc49c48eca43)
|
||||||
|
set(MD5_PPM_420M_ISLOW_3_4 3e726b7ea872445b19437d1c1d4f0d93)
|
||||||
|
set(MD5_PPM_420M_ISLOW_5_8 a8a771abdc94301d20ffac119b2caccd)
|
||||||
|
set(MD5_PPM_420M_ISLOW_1_2 b419124dd5568b085787234866102866)
|
||||||
|
set(MD5_PPM_420M_ISLOW_3_8 343d19015531b7bbe746124127244fa8)
|
||||||
|
set(MD5_PPM_420M_ISLOW_1_4 35fd59d866e44659edfa3c18db2a3edb)
|
||||||
|
set(MD5_PPM_420M_ISLOW_1_8 ccaed48ac0aedefda5d4abe4013f4ad7)
|
||||||
|
set(MD5_JPEG_CROP cdb35ff4b4519392690ea040c56ea99c)
|
||||||
|
else()
|
||||||
|
set(TESTORIG testorig.jpg)
|
||||||
|
set(MD5_JPEG_RGB_ISLOW 768e970dd57b340ff1b83c9d3d47c77b)
|
||||||
|
set(MD5_PPM_RGB_ISLOW 00a257f5393fef8821f2b88ac7421291)
|
||||||
|
set(MD5_BMP_RGB_ISLOW_565 f07d2e75073e4bb10f6c6f4d36e2e3be)
|
||||||
|
set(MD5_BMP_RGB_ISLOW_565D 4cfa0928ef3e6bb626d7728c924cfda4)
|
||||||
|
set(MD5_JPEG_422_IFAST_OPT 2540287b79d913f91665e660303ab2c8)
|
||||||
|
set(MD5_PPM_422_IFAST 35bd6b3f833bad23de82acea847129fa)
|
||||||
|
set(MD5_PPM_422M_IFAST 8dbc65323d62cca7c91ba02dd1cfa81d)
|
||||||
|
set(MD5_BMP_422M_IFAST_565 3294bd4d9a1f2b3d08ea6020d0db7065)
|
||||||
|
set(MD5_BMP_422M_IFAST_565D da98c9c7b6039511be4a79a878a9abc1)
|
||||||
|
set(MD5_JPEG_420_IFAST_Q100_PROG 990cbe0329c882420a2094da7e5adade)
|
||||||
|
set(MD5_PPM_420_Q100_IFAST 5a732542015c278ff43635e473a8a294)
|
||||||
|
set(MD5_PPM_420M_Q100_IFAST ff692ee9323a3b424894862557c092f1)
|
||||||
|
set(MD5_JPEG_GRAY_ISLOW 72b51f894b8f4a10b3ee3066770aa38d)
|
||||||
|
set(MD5_PPM_GRAY_ISLOW 8d3596c56eace32f205deccc229aa5ed)
|
||||||
|
set(MD5_PPM_GRAY_ISLOW_RGB 116424ac07b79e5e801f00508eab48ec)
|
||||||
|
set(MD5_BMP_GRAY_ISLOW_565 12f78118e56a2f48b966f792fedf23cc)
|
||||||
|
set(MD5_BMP_GRAY_ISLOW_565D bdbbd616441a24354c98553df5dc82db)
|
||||||
|
set(MD5_JPEG_420S_IFAST_OPT 388708217ac46273ca33086b22827ed8)
|
||||||
|
if(WITH_SIMD)
|
||||||
|
set(MD5_JPEG_3x2_FLOAT_PROG 343e3f8caf8af5986ebaf0bdc13b5c71)
|
||||||
|
set(MD5_PPM_3x2_FLOAT 1a75f36e5904d6fc3a85a43da9ad89bb)
|
||||||
|
else()
|
||||||
|
set(MD5_JPEG_3x2_FLOAT_PROG 9bca803d2042bd1eb03819e2bf92b3e5)
|
||||||
|
set(MD5_PPM_3x2_FLOAT f6bfab038438ed8f5522fbd33595dcdc)
|
||||||
|
endif()
|
||||||
|
set(MD5_JPEG_420_ISLOW_ARI e986fb0a637a8d833d96e8a6d6d84ea1)
|
||||||
|
set(MD5_JPEG_444_ISLOW_PROGARI 0a8f1c8f66e113c3cf635df0a475a617)
|
||||||
|
set(MD5_PPM_420M_IFAST_ARI 72b59a99bcf1de24c5b27d151bde2437)
|
||||||
|
set(MD5_JPEG_420_ISLOW 9a68f56bc76e466aa7e52f415d0f4a5f)
|
||||||
|
set(MD5_PPM_420M_ISLOW_2_1 9f9de8c0612f8d06869b960b05abf9c9)
|
||||||
|
set(MD5_PPM_420M_ISLOW_15_8 b6875bc070720b899566cc06459b63b7)
|
||||||
|
set(MD5_PPM_420M_ISLOW_13_8 bc3452573c8152f6ae552939ee19f82f)
|
||||||
|
set(MD5_PPM_420M_ISLOW_11_8 d8cc73c0aaacd4556569b59437ba00a5)
|
||||||
|
set(MD5_PPM_420M_ISLOW_9_8 d25e61bc7eac0002f5b393aa223747b6)
|
||||||
|
set(MD5_PPM_420M_ISLOW_7_8 ddb564b7c74a09494016d6cd7502a946)
|
||||||
|
set(MD5_PPM_420M_ISLOW_3_4 8ed8e68808c3fbc4ea764fc9d2968646)
|
||||||
|
set(MD5_PPM_420M_ISLOW_5_8 a3363274999da2366a024efae6d16c9b)
|
||||||
|
set(MD5_PPM_420M_ISLOW_1_2 e692a315cea26b988c8e8b29a5dbcd81)
|
||||||
|
set(MD5_PPM_420M_ISLOW_3_8 79eca9175652ced755155c90e785a996)
|
||||||
|
set(MD5_PPM_420M_ISLOW_1_4 79cd778f8bf1a117690052cacdd54eca)
|
||||||
|
set(MD5_PPM_420M_ISLOW_1_8 391b3d4aca640c8567d6f8745eb2142f)
|
||||||
|
set(MD5_BMP_420_ISLOW_256 4980185e3776e89bd931736e1cddeee6)
|
||||||
|
set(MD5_BMP_420_ISLOW_565 bf9d13e16c4923b92e1faa604d7922cb)
|
||||||
|
set(MD5_BMP_420_ISLOW_565D 6bde71526acc44bcff76f696df8638d2)
|
||||||
|
set(MD5_BMP_420M_ISLOW_565 8dc0185245353cfa32ad97027342216f)
|
||||||
|
set(MD5_BMP_420M_ISLOW_565D d1be3a3339166255e76fa50a0d70d73e)
|
||||||
|
set(MD5_JPEG_CROP b4197f377e621c4e9b1d20471432610d)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_JAVA)
|
||||||
|
add_test(TJUnitTest
|
||||||
|
${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
|
||||||
|
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
|
||||||
|
TJUnitTest)
|
||||||
|
add_test(TJUnitTest-yuv
|
||||||
|
${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
|
||||||
|
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
|
||||||
|
TJUnitTest -yuv)
|
||||||
|
add_test(TJUnitTest-yuv-nopad
|
||||||
|
${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
|
||||||
|
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
|
||||||
|
TJUnitTest -yuv -noyuvpad)
|
||||||
|
add_test(TJUnitTest-bi
|
||||||
|
${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
|
||||||
|
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
|
||||||
|
TJUnitTest -bi)
|
||||||
|
add_test(TJUnitTest-bi-yuv
|
||||||
|
${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
|
||||||
|
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
|
||||||
|
TJUnitTest -bi -yuv)
|
||||||
|
add_test(TJUnitTest-bi-yuv-nopad
|
||||||
|
${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
|
||||||
|
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
|
||||||
|
TJUnitTest -bi -yuv -noyuvpad)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(TEST_LIBTYPES "")
|
||||||
|
if(ENABLE_SHARED)
|
||||||
|
set(TEST_LIBTYPES ${TEST_LIBTYPES} shared)
|
||||||
|
endif()
|
||||||
|
if(ENABLE_STATIC)
|
||||||
|
set(TEST_LIBTYPES ${TEST_LIBTYPES} static)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
foreach(libtype ${TEST_LIBTYPES})
|
||||||
|
if(libtype STREQUAL "shared")
|
||||||
|
set(dir sharedlib/)
|
||||||
|
else()
|
||||||
|
set(dir "")
|
||||||
|
set(suffix -static)
|
||||||
|
endif()
|
||||||
|
if(WITH_TURBOJPEG)
|
||||||
|
add_test(tjunittest${suffix} tjunittest${suffix})
|
||||||
|
add_test(tjunittest${suffix}-alloc tjunittest${suffix} -alloc)
|
||||||
|
add_test(tjunittest${suffix}-yuv tjunittest${suffix} -yuv)
|
||||||
|
add_test(tjunittest${suffix}-yuv-alloc tjunittest${suffix} -yuv -alloc)
|
||||||
|
add_test(tjunittest${suffix}-yuv-nopad tjunittest${suffix} -yuv -noyuvpad)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# These tests are carefully chosen to provide full coverage of as many of the
|
||||||
|
# underlying algorithms as possible (including all of the SIMD-accelerated
|
||||||
|
# ones.)
|
||||||
|
|
||||||
|
# CC: null SAMP: fullsize FDCT: islow ENT: huff
|
||||||
|
add_test(cjpeg${suffix}-rgb-islow
|
||||||
|
${dir}cjpeg${suffix} -rgb -dct int -outfile testout_rgb_islow.jpg
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-rgb-islow-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_RGB_ISLOW} -DFILE=testout_rgb_islow.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: null SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-rgb-islow
|
||||||
|
${dir}djpeg${suffix} -dct int -ppm -outfile testout_rgb_islow.ppm
|
||||||
|
testout_rgb_islow.jpg)
|
||||||
|
add_test(djpeg${suffix}-rgb-islow-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_PPM_RGB_ISLOW} -DFILE=testout_rgb_islow.ppm
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
if(NOT WITH_12BIT)
|
||||||
|
# CC: RGB->RGB565 SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-rgb-islow-565
|
||||||
|
${dir}djpeg${suffix} -dct int -rgb565 -dither none -bmp
|
||||||
|
-outfile testout_rgb_islow_565.bmp testout_rgb_islow.jpg)
|
||||||
|
add_test(djpeg${suffix}-rgb-islow-565-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_RGB_ISLOW_565}
|
||||||
|
-DFILE=testout_rgb_islow_565.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: RGB->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-rgb-islow-565D
|
||||||
|
${dir}djpeg${suffix} -dct int -rgb565 -bmp
|
||||||
|
-outfile testout_rgb_islow_565D.bmp testout_rgb_islow.jpg)
|
||||||
|
add_test(djpeg${suffix}-rgb-islow-565D-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_RGB_ISLOW_565D}
|
||||||
|
-DFILE=testout_rgb_islow_565D.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# CC: RGB->YCC SAMP: fullsize/h2v1 FDCT: ifast ENT: 2-pass huff
|
||||||
|
add_test(cjpeg${suffix}-422-ifast-opt
|
||||||
|
${dir}cjpeg${suffix} -sample 2x1 -dct fast -opt
|
||||||
|
-outfile testout_422_ifast_opt.jpg
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-422-ifast-opt-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_422_IFAST_OPT}
|
||||||
|
-DFILE=testout_422_ifast_opt.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB SAMP: fullsize/h2v1 fancy IDCT: ifast ENT: huff
|
||||||
|
add_test(djpeg${suffix}-422-ifast
|
||||||
|
${dir}djpeg${suffix} -dct fast -outfile testout_422_ifast.ppm
|
||||||
|
testout_422_ifast_opt.jpg)
|
||||||
|
add_test(djpeg${suffix}-422-ifast-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_PPM_422_IFAST} -DFILE=testout_422_ifast.ppm
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB SAMP: h2v1 merged IDCT: ifast ENT: huff
|
||||||
|
add_test(djpeg${suffix}-422m-ifast
|
||||||
|
${dir}djpeg${suffix} -dct fast -nosmooth -outfile testout_422m_ifast.ppm
|
||||||
|
testout_422_ifast_opt.jpg)
|
||||||
|
add_test(djpeg${suffix}-422m-ifast-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_PPM_422M_IFAST} -DFILE=testout_422m_ifast.ppm
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
if(NOT WITH_12BIT)
|
||||||
|
# CC: YCC->RGB565 SAMP: h2v1 merged IDCT: ifast ENT: huff
|
||||||
|
add_test(djpeg${suffix}-422m-ifast-565
|
||||||
|
${dir}djpeg${suffix} -dct int -nosmooth -rgb565 -dither none -bmp
|
||||||
|
-outfile testout_422m_ifast_565.bmp testout_422_ifast_opt.jpg)
|
||||||
|
add_test(djpeg${suffix}-422m-ifast-565-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_422M_IFAST_565}
|
||||||
|
-DFILE=testout_422m_ifast_565.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB565 (dithered) SAMP: h2v1 merged IDCT: ifast ENT: huff
|
||||||
|
add_test(djpeg${suffix}-422m-ifast-565D
|
||||||
|
${dir}djpeg${suffix} -dct int -nosmooth -rgb565 -bmp
|
||||||
|
-outfile testout_422m_ifast_565D.bmp testout_422_ifast_opt.jpg)
|
||||||
|
add_test(djpeg${suffix}-422m-ifast-565D-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_422M_IFAST_565D}
|
||||||
|
-DFILE=testout_422m_ifast_565D.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# CC: RGB->YCC SAMP: fullsize/h2v2 FDCT: ifast ENT: prog huff
|
||||||
|
add_test(cjpeg${suffix}-420-q100-ifast-prog
|
||||||
|
${dir}cjpeg${suffix} -sample 2x2 -quality 100 -dct fast -prog
|
||||||
|
-outfile testout_420_q100_ifast_prog.jpg
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-420-q100-ifast-prog-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_420_IFAST_Q100_PROG}
|
||||||
|
-DFILE=testout_420_q100_ifast_prog.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB SAMP: fullsize/h2v2 fancy IDCT: ifast ENT: prog huff
|
||||||
|
add_test(djpeg${suffix}-420-q100-ifast-prog
|
||||||
|
${dir}djpeg${suffix} -dct fast -outfile testout_420_q100_ifast.ppm
|
||||||
|
testout_420_q100_ifast_prog.jpg)
|
||||||
|
add_test(djpeg${suffix}-420-q100-ifast-prog-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_PPM_420_Q100_IFAST}
|
||||||
|
-DFILE=testout_420_q100_ifast.ppm
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: ifast ENT: prog huff
|
||||||
|
add_test(djpeg${suffix}-420m-q100-ifast-prog
|
||||||
|
${dir}djpeg${suffix} -dct fast -nosmooth
|
||||||
|
-outfile testout_420m_q100_ifast.ppm testout_420_q100_ifast_prog.jpg)
|
||||||
|
add_test(djpeg${suffix}-420m-q100-ifast-prog-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_PPM_420M_Q100_IFAST}
|
||||||
|
-DFILE=testout_420m_q100_ifast.ppm
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
|
||||||
|
# CC: RGB->Gray SAMP: fullsize FDCT: islow ENT: huff
|
||||||
|
add_test(cjpeg${suffix}-gray-islow
|
||||||
|
${dir}cjpeg${suffix} -gray -dct int -outfile testout_gray_islow.jpg
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-gray-islow-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_GRAY_ISLOW}
|
||||||
|
-DFILE=testout_gray_islow.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: Gray->Gray SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-gray-islow
|
||||||
|
${dir}djpeg${suffix} -dct int -outfile testout_gray_islow.ppm
|
||||||
|
testout_gray_islow.jpg)
|
||||||
|
add_test(djpeg${suffix}-gray-islow-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_PPM_GRAY_ISLOW}
|
||||||
|
-DFILE=testout_gray_islow.ppm
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: Gray->RGB SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-gray-islow-rgb
|
||||||
|
${dir}djpeg${suffix} -dct int -rgb -outfile testout_gray_islow_rgb.ppm
|
||||||
|
testout_gray_islow.jpg)
|
||||||
|
add_test(djpeg${suffix}-gray-islow-rgb-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_PPM_GRAY_ISLOW_RGB}
|
||||||
|
-DFILE=testout_gray_islow_rgb.ppm
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
if(NOT WITH_12BIT)
|
||||||
|
# CC: Gray->RGB565 SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-gray-islow-565
|
||||||
|
${dir}djpeg${suffix} -dct int -rgb565 -dither none -bmp
|
||||||
|
-outfile testout_gray_islow_565.bmp testout_gray_islow.jpg)
|
||||||
|
add_test(djpeg${suffix}-gray-islow-565-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_GRAY_ISLOW_565}
|
||||||
|
-DFILE=testout_gray_islow_565.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: Gray->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-gray-islow-565D
|
||||||
|
${dir}djpeg${suffix} -dct int -rgb565 -bmp
|
||||||
|
-outfile testout_gray_islow_565D.bmp testout_gray_islow.jpg)
|
||||||
|
add_test(djpeg${suffix}-gray-islow-565D-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_GRAY_ISLOW_565D}
|
||||||
|
-DFILE=testout_gray_islow_565D.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# CC: RGB->YCC SAMP: fullsize smooth/h2v2 smooth FDCT: islow
|
||||||
|
# ENT: 2-pass huff
|
||||||
|
add_test(cjpeg${suffix}-420s-ifast-opt
|
||||||
|
${dir}cjpeg${suffix} -sample 2x2 -smooth 1 -dct int -opt -outfile
|
||||||
|
testout_420s_ifast_opt.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-420s-ifast-opt-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_420S_IFAST_OPT}
|
||||||
|
-DFILE=testout_420s_ifast_opt.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
|
||||||
|
# CC: RGB->YCC SAMP: fullsize/int FDCT: float ENT: prog huff
|
||||||
|
add_test(cjpeg${suffix}-3x2-float-prog
|
||||||
|
${dir}cjpeg${suffix} -sample 3x2 -dct float -prog
|
||||||
|
-outfile testout_3x2_float_prog.jpg
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-3x2-float-prog-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_3x2_FLOAT_PROG}
|
||||||
|
-DFILE=testout_3x2_float_prog.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB SAMP: fullsize/int IDCT: float ENT: prog huff
|
||||||
|
add_test(djpeg${suffix}-3x2-float-prog
|
||||||
|
${dir}djpeg${suffix} -dct float -outfile testout_3x2_float.ppm
|
||||||
|
testout_3x2_float_prog.jpg)
|
||||||
|
add_test(djpeg${suffix}-3x2-float-prog-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_PPM_3x2_FLOAT} -DFILE=testout_3x2_float.ppm
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
|
||||||
|
if(WITH_ARITH_ENC)
|
||||||
|
# CC: YCC->RGB SAMP: fullsize/h2v2 FDCT: islow ENT: arith
|
||||||
|
add_test(cjpeg${suffix}-420-islow-ari
|
||||||
|
${dir}cjpeg${suffix} -dct int -arithmetic
|
||||||
|
-outfile testout_420_islow_ari.jpg
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-420-islow-ari-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_420_ISLOW_ARI}
|
||||||
|
-DFILE=testout_420_islow_ari.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
add_test(jpegtran${suffix}-420-islow-ari
|
||||||
|
${dir}jpegtran${suffix} -arithmetic
|
||||||
|
-outfile testout_420_islow_ari.jpg
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg)
|
||||||
|
add_test(jpegtran${suffix}-420-islow-ari-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_420_ISLOW_ARI}
|
||||||
|
-DFILE=testout_420_islow_ari.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB SAMP: fullsize FDCT: islow ENT: prog arith
|
||||||
|
add_test(cjpeg${suffix}-444-islow-progari
|
||||||
|
${dir}cjpeg${suffix} -sample 1x1 -dct int -progressive -arithmetic
|
||||||
|
-outfile testout_444_islow_progari.jpg
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-444-islow-progari-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_444_ISLOW_PROGARI}
|
||||||
|
-DFILE=testout_444_islow_progari.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
endif()
|
||||||
|
if(WITH_ARITH_DEC)
|
||||||
|
# CC: RGB->YCC SAMP: h2v2 merged IDCT: ifast ENT: arith
|
||||||
|
add_test(djpeg${suffix}-420m-ifast-ari
|
||||||
|
${dir}djpeg${suffix} -fast -ppm -outfile testout_420m_ifast_ari.ppm
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg)
|
||||||
|
add_test(djpeg${suffix}-420m-ifast-ari-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_PPM_420M_IFAST_ARI}
|
||||||
|
-DFILE=testout_420m_ifast_ari.ppm
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
add_test(jpegtran${suffix}-420-islow
|
||||||
|
${dir}jpegtran${suffix} -outfile testout_420_islow.jpg
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg)
|
||||||
|
add_test(jpegtran${suffix}-420-islow-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_420_ISLOW}
|
||||||
|
-DFILE=testout_420_islow.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# 2/1-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 16x16 islow ENT: huff
|
||||||
|
# 15/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 15x15 islow ENT: huff
|
||||||
|
# 13/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 13x13 islow ENT: huff
|
||||||
|
# 11/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 11x11 islow ENT: huff
|
||||||
|
# 9/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 9x9 islow ENT: huff
|
||||||
|
# 7/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 7x7 islow/14x14 islow
|
||||||
|
# ENT: huff
|
||||||
|
# 3/4-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 6x6 islow/12x12 islow
|
||||||
|
# ENT: huff
|
||||||
|
# 5/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 5x5 islow/10x10 islow
|
||||||
|
# ENT: huff
|
||||||
|
# 1/2-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 4x4 islow/8x8 islow
|
||||||
|
# ENT: huff
|
||||||
|
# 3/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 3x3 islow/6x6 islow
|
||||||
|
# ENT: huff
|
||||||
|
# 1/4-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 2x2 islow/4x4 islow
|
||||||
|
# ENT: huff
|
||||||
|
# 1/8-- CC: YCC->RGB SAMP: h2v2 merged IDCT: 1x1 islow/2x2 islow
|
||||||
|
# ENT: huff
|
||||||
|
foreach(scale 2_1 15_8 13_8 11_8 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8)
|
||||||
|
string(REGEX REPLACE "_" "/" scalearg ${scale})
|
||||||
|
add_test(djpeg${suffix}-420m-islow-${scale}
|
||||||
|
${dir}djpeg${suffix} -dct int -scale ${scalearg} -nosmooth -ppm
|
||||||
|
-outfile testout_420m_islow_${scale}.ppm
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420m-islow-${scale}-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_PPM_420M_ISLOW_${scale}}
|
||||||
|
-DFILE=testout_420m_islow_${scale}.ppm
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(NOT WITH_12BIT)
|
||||||
|
# CC: YCC->RGB (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-420-islow-256
|
||||||
|
${dir}djpeg${suffix} -dct int -colors 256 -bmp
|
||||||
|
-outfile testout_420_islow_256.bmp
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420-islow-256-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_420_ISLOW_256}
|
||||||
|
-DFILE=testout_420_islow_256.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB565 SAMP: h2v2 fancy IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-420-islow-565
|
||||||
|
${dir}djpeg${suffix} -dct int -rgb565 -dither none -bmp
|
||||||
|
-outfile testout_420_islow_565.bmp
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420-islow-565-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_420_ISLOW_565}
|
||||||
|
-DFILE=testout_420_islow_565.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB565 (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-420-islow-565D
|
||||||
|
${dir}djpeg${suffix} -dct int -rgb565 -bmp
|
||||||
|
-outfile testout_420_islow_565D.bmp
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420-islow-565D-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_420_ISLOW_565D}
|
||||||
|
-DFILE=testout_420_islow_565D.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB565 SAMP: h2v2 merged IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-420m-islow-565
|
||||||
|
${dir}djpeg${suffix} -dct int -nosmooth -rgb565 -dither none -bmp
|
||||||
|
-outfile testout_420m_islow_565.bmp
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420m-islow-565-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_420M_ISLOW_565}
|
||||||
|
-DFILE=testout_420m_islow_565.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
# CC: YCC->RGB565 (dithered) SAMP: h2v2 merged IDCT: islow ENT: huff
|
||||||
|
add_test(djpeg${suffix}-420m-islow-565D
|
||||||
|
${dir}djpeg${suffix} -dct int -nosmooth -rgb565 -bmp
|
||||||
|
-outfile testout_420m_islow_565D.bmp
|
||||||
|
${CMAKE_SOURCE_DIR}/testimages/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420m-islow-565D-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_BMP_420M_ISLOW_565D}
|
||||||
|
-DFILE=testout_420m_islow_565D.bmp
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
endif()
|
||||||
|
add_test(jpegtran${suffix}-crop
|
||||||
|
${dir}jpegtran${suffix} -crop 120x90+20+50 -transpose -perfect
|
||||||
|
-outfile testout_crop.jpg ${CMAKE_SOURCE_DIR}/testimages/${TESTORIG})
|
||||||
|
add_test(jpegtran${suffix}-crop-cmp
|
||||||
|
${CMAKE_COMMAND} -DMD5=${MD5_JPEG_CROP} -DFILE=testout_crop.jpg
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
||||||
|
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
add_custom_target(testclean COMMAND ${CMAKE_COMMAND} -P
|
||||||
|
${CMAKE_SOURCE_DIR}/cmakescripts/testclean.cmake)
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Installer
|
||||||
|
#
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set(INST_PLATFORM "Visual C++")
|
||||||
|
set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-vc)
|
||||||
|
set(INST_REG_NAME ${CMAKE_PROJECT_NAME})
|
||||||
|
elseif(MINGW)
|
||||||
|
set(INST_PLATFORM GCC)
|
||||||
|
set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-gcc)
|
||||||
|
set(INST_REG_NAME ${CMAKE_PROJECT_NAME}-gcc)
|
||||||
|
set(INST_DEFS -DGCC)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(64BIT)
|
||||||
|
set(INST_PLATFORM "${INST_PLATFORM} 64-bit")
|
||||||
|
set(INST_NAME ${INST_NAME}64)
|
||||||
|
set(INST_REG_NAME ${INST_DIR}64)
|
||||||
|
set(INST_DEFS ${INST_DEFS} -DWIN64)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_JAVA)
|
||||||
|
set(INST_DEFS ${INST_DEFS} -DJAVA)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC_IDE)
|
||||||
|
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\")
|
||||||
|
else()
|
||||||
|
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
STRING(REGEX REPLACE "/" "\\\\" INST_DIR ${CMAKE_INSTALL_PREFIX})
|
||||||
|
|
||||||
|
configure_file(release/libjpeg-turbo.nsi.in libjpeg-turbo.nsi @ONLY)
|
||||||
|
|
||||||
|
if(WITH_JAVA)
|
||||||
|
set(JAVA_DEPEND java)
|
||||||
|
endif()
|
||||||
|
add_custom_target(installer
|
||||||
|
makensis -nocd ${INST_DEFS} libjpeg-turbo.nsi
|
||||||
|
DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom
|
||||||
|
cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND}
|
||||||
|
SOURCES libjpeg-turbo.nsi)
|
||||||
|
|
||||||
|
if(WITH_TURBOJPEG)
|
||||||
|
if(ENABLE_SHARED)
|
||||||
|
install(TARGETS turbojpeg tjbench
|
||||||
|
ARCHIVE DESTINATION lib
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
RUNTIME DESTINATION bin)
|
||||||
|
endif()
|
||||||
|
if(ENABLE_STATIC)
|
||||||
|
install(TARGETS turbojpeg-static ARCHIVE DESTINATION lib)
|
||||||
|
if(NOT ENABLE_SHARED)
|
||||||
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tjbench-static.exe
|
||||||
|
DESTINATION bin RENAME tjbench.exe)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_STATIC)
|
||||||
|
install(TARGETS jpeg-static ARCHIVE DESTINATION lib)
|
||||||
|
if(NOT ENABLE_SHARED)
|
||||||
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cjpeg-static.exe
|
||||||
|
DESTINATION bin RENAME cjpeg.exe)
|
||||||
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/djpeg-static.exe
|
||||||
|
DESTINATION bin RENAME djpeg.exe)
|
||||||
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/jpegtran-static.exe
|
||||||
|
DESTINATION bin RENAME jpegtran.exe)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
|
install(FILES ${CMAKE_SOURCE_DIR}/README ${CMAKE_SOURCE_DIR}/README-turbo.txt
|
||||||
|
${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt
|
||||||
|
${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt
|
||||||
|
${CMAKE_SOURCE_DIR}/wizard.txt
|
||||||
|
DESTINATION doc)
|
||||||
|
|
||||||
|
install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h
|
||||||
|
${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h
|
||||||
|
DESTINATION include)
|
||||||
706
ChangeLog.txt
Normal file
@@ -0,0 +1,706 @@
|
|||||||
|
1.4.1
|
||||||
|
=====
|
||||||
|
|
||||||
|
[1] tjbench now properly handles CMYK/YCCK JPEG files. Passing an argument of
|
||||||
|
-cmyk (instead of, for instance, -rgb) will cause tjbench to internally convert
|
||||||
|
the source bitmap to CMYK prior to compression, to generate YCCK JPEG files,
|
||||||
|
and to internally convert the decompressed CMYK pixels back to RGB after
|
||||||
|
decompression (the latter is done automatically if a CMYK or YCCK JPEG is
|
||||||
|
passed to tjbench as a source image.) The CMYK<->RGB conversion operation is
|
||||||
|
not benchmarked. NOTE: The quick & dirty CMYK<->RGB conversions that tjbench
|
||||||
|
uses are suitable for testing only. Proper conversion between CMYK and RGB
|
||||||
|
requires a color management system.
|
||||||
|
|
||||||
|
[2] 'make test' now performs additional bitwise regression tests using tjbench,
|
||||||
|
mainly for the purpose of testing compression from/decompression to a subregion
|
||||||
|
of a larger image buffer.
|
||||||
|
|
||||||
|
[3] 'make test' no longer tests the regression of the floating point DCT/IDCT
|
||||||
|
by default, since the results of those tests can vary if the algorithms in
|
||||||
|
question are not implemented using SIMD instructions on a particular platform.
|
||||||
|
See the comments in Makefile.am for information on how to re-enable the tests
|
||||||
|
and to specify an expected result for them based on the particulars of your
|
||||||
|
platform.
|
||||||
|
|
||||||
|
[4] The NULL color conversion routines have been significantly optimized,
|
||||||
|
which speeds up the compression of RGB and CMYK JPEGs by 5-20% when using
|
||||||
|
64-bit code and 0-3% when using 32-bit code, and the decompression of those
|
||||||
|
images by 10-30% when using 64-bit code and 3-12% when using 32-bit code.
|
||||||
|
|
||||||
|
[5] Fixed an "illegal instruction" error that occurred when djpeg from a
|
||||||
|
SIMD-enabled libjpeg-turbo MIPS build was executed with the -nosmooth option on
|
||||||
|
a MIPS machine that lacked DSPr2 support. The MIPS SIMD routines for h2v1 and
|
||||||
|
h2v2 merged upsampling were not properly checking for the existence of DSPr2.
|
||||||
|
|
||||||
|
[6] Performance has been improved significantly on 64-bit non-Linux and
|
||||||
|
non-Windows platforms (generally 10-20% faster compression and 5-10% faster
|
||||||
|
decompression.) Due to an oversight, the 64-bit version of the accelerated
|
||||||
|
Huffman codec was not being compiled in when libjpeg-turbo was built on
|
||||||
|
platforms other than Windows or Linux. Oops.
|
||||||
|
|
||||||
|
[7] Fixed an extremely rare bug in the Huffman encoder that caused 64-bit
|
||||||
|
builds of libjpeg-turbo to incorrectly encode a few specific test images when
|
||||||
|
quality=98, an optimized Huffman table, and the slow integer forward DCT were
|
||||||
|
used.
|
||||||
|
|
||||||
|
[8] The Windows (CMake) build system now supports building only static or only
|
||||||
|
shared libraries. This is accomplished by adding either -DENABLE_STATIC=0 or
|
||||||
|
-DENABLE_SHARED=0 to the CMake command line.
|
||||||
|
|
||||||
|
[9] TurboJPEG API functions will now return an error code if a warning is
|
||||||
|
triggered in the underlying libjpeg API. For instance, if a JPEG file is
|
||||||
|
corrupt, the TurboJPEG decompression functions will attempt to decompress
|
||||||
|
as much of the image as possible, but those functions will now return -1 to
|
||||||
|
indicate that the decompression was not entirely successful.
|
||||||
|
|
||||||
|
[10] Fixed a bug in the MIPS DSPr2 4:2:2 fancy upsampling routine that caused a
|
||||||
|
buffer overflow (and subsequent segfault) when decompressing a 4:2:2 JPEG image
|
||||||
|
in which the right-most MCU was 5 or 6 pixels wide.
|
||||||
|
|
||||||
|
|
||||||
|
1.4.0
|
||||||
|
=====
|
||||||
|
|
||||||
|
[1] Fixed a build issue on OS X PowerPC platforms (md5cmp failed to build
|
||||||
|
because OS X does not provide the le32toh() and htole32() functions.)
|
||||||
|
|
||||||
|
[2] The non-SIMD RGB565 color conversion code did not work correctly on big
|
||||||
|
endian machines. This has been fixed.
|
||||||
|
|
||||||
|
[3] Fixed an issue in tjPlaneSizeYUV() whereby it would erroneously return 1
|
||||||
|
instead of -1 if componentID was > 0 and subsamp was TJSAMP_GRAY.
|
||||||
|
|
||||||
|
[3] Fixed an issue in tjBufSizeYUV2() whereby it would erroneously return 0
|
||||||
|
instead of -1 if width was < 1.
|
||||||
|
|
||||||
|
[5] The Huffman encoder now uses clz and bsr instructions for bit counting on
|
||||||
|
ARM64 platforms (see 1.4 beta1 [5].)
|
||||||
|
|
||||||
|
[6] The close() method in the TJCompressor and TJDecompressor Java classes is
|
||||||
|
now idempotent. Previously, that method would call the native tjDestroy()
|
||||||
|
function even if the TurboJPEG instance had already been destroyed. This
|
||||||
|
caused an exception to be thrown during finalization, if the close() method had
|
||||||
|
already been called. The exception was caught, but it was still an expensive
|
||||||
|
operation.
|
||||||
|
|
||||||
|
[7] The TurboJPEG API previously generated an error ("Could not determine
|
||||||
|
subsampling type for JPEG image") when attempting to decompress grayscale JPEG
|
||||||
|
images that were compressed with a sampling factor other than 1 (for instance,
|
||||||
|
with 'cjpeg -grayscale -sample 2x2'). Subsampling technically has no meaning
|
||||||
|
with grayscale JPEGs, and thus the horizontal and vertical sampling factors
|
||||||
|
for such images are ignored by the decompressor. However, the TurboJPEG API
|
||||||
|
was being too rigid and was expecting the sampling factors to be equal to 1
|
||||||
|
before it treated the image as a grayscale JPEG.
|
||||||
|
|
||||||
|
[8] cjpeg, djpeg, and jpegtran now accept an argument of -version, which will
|
||||||
|
print the library version and exit.
|
||||||
|
|
||||||
|
[9] Referring to 1.4 beta1 [15], another extremely rare circumstance was
|
||||||
|
discovered under which the Huffman encoder's local buffer can be overrun
|
||||||
|
when a buffered destination manager is being used and an
|
||||||
|
extremely-high-frequency block (basically junk image data) is being encoded.
|
||||||
|
Even though the Huffman local buffer was increased from 128 bytes to 136 bytes
|
||||||
|
to address the previous issue, the new issue caused even the larger buffer to
|
||||||
|
be overrun. Further analysis reveals that, in the absolute worst case (such as
|
||||||
|
setting alternating AC coefficients to 32767 and -32768 in the JPEG scanning
|
||||||
|
order), the Huffman encoder can produce encoded blocks that approach double the
|
||||||
|
size of the unencoded blocks. Thus, the Huffman local buffer was increased to
|
||||||
|
256 bytes, which should prevent any such issue from re-occurring in the future.
|
||||||
|
|
||||||
|
[10] The new tjPlaneSizeYUV(), tjPlaneWidth(), and tjPlaneHeight() functions
|
||||||
|
were not actually usable on any platform except OS X and Windows, because
|
||||||
|
those functions were not included in the libturbojpeg mapfile. This has been
|
||||||
|
fixed.
|
||||||
|
|
||||||
|
[11] Restored the JPP(), JMETHOD(), and FAR macros in the libjpeg-turbo header
|
||||||
|
files. The JPP() and JMETHOD() macros were originally implemented in libjpeg
|
||||||
|
as a way of supporting non-ANSI compilers that lacked support for prototype
|
||||||
|
parameters. libjpeg-turbo has never supported such compilers, but some
|
||||||
|
software packages still use the macros to define their own prototypes.
|
||||||
|
Similarly, libjpeg-turbo has never supported MS-DOS and other platforms that
|
||||||
|
have far symbols, but some software packages still use the FAR macro. A pretty
|
||||||
|
good argument can be made that this is a bad practice on the part of the
|
||||||
|
software in question, but since this affects more than one package, it's just
|
||||||
|
easier to fix it here.
|
||||||
|
|
||||||
|
[12] Fixed issues that were preventing the ARM 64-bit SIMD code from compiling
|
||||||
|
for iOS, and included an ARMv8 architecture in all of the binaries installed by
|
||||||
|
the "official" libjpeg-turbo SDK for OS X.
|
||||||
|
|
||||||
|
|
||||||
|
1.3.90 (1.4 beta1)
|
||||||
|
==================
|
||||||
|
|
||||||
|
[1] New features in the TurboJPEG API:
|
||||||
|
-- YUV planar images can now be generated with an arbitrary line padding
|
||||||
|
(previously only 4-byte padding, which was compatible with X Video, was
|
||||||
|
supported.)
|
||||||
|
-- The decompress-to-YUV function has been extended to support image scaling.
|
||||||
|
-- JPEG images can now be compressed from YUV planar source images.
|
||||||
|
-- YUV planar images can now be decoded into RGB or grayscale images.
|
||||||
|
-- 4:1:1 subsampling is now supported. This is mainly included for
|
||||||
|
compatibility, since 4:1:1 is not fully accelerated in libjpeg-turbo and has no
|
||||||
|
significant advantages relative to 4:2:0.
|
||||||
|
-- CMYK images are now supported. This feature allows CMYK source images to be
|
||||||
|
compressed to YCCK JPEGs and YCCK or CMYK JPEGs to be decompressed to CMYK
|
||||||
|
destination images. Conversion between CMYK/YCCK and RGB or YUV images is not
|
||||||
|
supported. Such conversion requires a color management system and is thus out
|
||||||
|
of scope for a codec library.
|
||||||
|
-- The handling of YUV images in the Java API has been significantly refactored
|
||||||
|
and should now be much more intuitive.
|
||||||
|
-- The Java API now supports encoding a YUV image from an arbitrary position in
|
||||||
|
a large image buffer.
|
||||||
|
-- All of the YUV functions now have a corresponding function that operates on
|
||||||
|
separate image planes instead of a unified image buffer. This allows for
|
||||||
|
compressing/decoding from or decompressing/encoding to a subregion of a larger
|
||||||
|
YUV image. It also allows for handling YUV formats that swap the order of the
|
||||||
|
U and V planes.
|
||||||
|
|
||||||
|
[2] Added SIMD acceleration for DSPr2-capable MIPS platforms. This speeds up
|
||||||
|
the compression of full-color JPEGs by 70-80% on such platforms and
|
||||||
|
decompression by 25-35%.
|
||||||
|
|
||||||
|
[3] If an application attempts to decompress a Huffman-coded JPEG image whose
|
||||||
|
header does not contain Huffman tables, libjpeg-turbo will now insert the
|
||||||
|
default Huffman tables. In order to save space, many motion JPEG video frames
|
||||||
|
are encoded without the default Huffman tables, so these frames can now be
|
||||||
|
successfully decompressed by libjpeg-turbo without additional work on the part
|
||||||
|
of the application. An application can still override the Huffman tables, for
|
||||||
|
instance to re-use tables from a previous frame of the same video.
|
||||||
|
|
||||||
|
[4] The Mac packaging system now uses pkgbuild and productbuild rather than
|
||||||
|
PackageMaker (which is obsolete and no longer supported.) This means that
|
||||||
|
OS X 10.6 "Snow Leopard" or later must be used when packaging libjpeg-turbo,
|
||||||
|
although the packages produced can be installed on OS X 10.5 "Leopard" or
|
||||||
|
later. OS X 10.4 "Tiger" is no longer supported.
|
||||||
|
|
||||||
|
[5] The Huffman encoder now uses clz and bsr instructions for bit counting on
|
||||||
|
ARM platforms rather than a lookup table. This reduces the memory footprint
|
||||||
|
by 64k, which may be important for some mobile applications. Out of four
|
||||||
|
Android devices that were tested, two demonstrated a small overall performance
|
||||||
|
loss (~3-4% on average) with ARMv6 code and a small gain (also ~3-4%) with
|
||||||
|
ARMv7 code when enabling this new feature, but the other two devices
|
||||||
|
demonstrated a significant overall performance gain with both ARMv6 and ARMv7
|
||||||
|
code (~10-20%) when enabling the feature. Actual mileage may vary.
|
||||||
|
|
||||||
|
[6] Worked around an issue with Visual C++ 2010 and later that caused incorrect
|
||||||
|
pixels to be generated when decompressing a JPEG image to a 256-color bitmap,
|
||||||
|
if compiler optimization was enabled when libjpeg-turbo was built. This caused
|
||||||
|
the regression tests to fail when doing a release build under Visual C++ 2010
|
||||||
|
and later.
|
||||||
|
|
||||||
|
[7] Improved the accuracy and performance of the non-SIMD implementation of the
|
||||||
|
floating point inverse DCT (using code borrowed from libjpeg v8a and later.)
|
||||||
|
The accuracy of this implementation now matches the accuracy of the SSE/SSE2
|
||||||
|
implementation. Note, however, that the floating point DCT/IDCT algorithms are
|
||||||
|
mainly a legacy feature. They generally do not produce significantly better
|
||||||
|
accuracy than the slow integer DCT/IDCT algorithms, and they are quite a bit
|
||||||
|
slower.
|
||||||
|
|
||||||
|
[8] Added a new output colorspace (JCS_RGB565) to the libjpeg API that allows
|
||||||
|
for decompressing JPEG images into RGB565 (16-bit) pixels. If dithering is not
|
||||||
|
used, then this code path is SIMD-accelerated on ARM platforms.
|
||||||
|
|
||||||
|
[9] Numerous obsolete features, such as support for non-ANSI compilers and
|
||||||
|
support for the MS-DOS memory model, were removed from the libjpeg code,
|
||||||
|
greatly improving its readability and making it easier to maintain and extend.
|
||||||
|
|
||||||
|
[10] Fixed a segfault that occurred when calling output_message() with msg_code
|
||||||
|
set to JMSG_COPYRIGHT.
|
||||||
|
|
||||||
|
[11] Fixed an issue whereby wrjpgcom was allowing comments longer than 65k
|
||||||
|
characters to be passed on the command line, which was causing it to generate
|
||||||
|
incorrect JPEG files.
|
||||||
|
|
||||||
|
[12] Fixed a bug in the build system that was causing the Windows version of
|
||||||
|
wrjpgcom to be built using the rdjpgcom source code.
|
||||||
|
|
||||||
|
[13] Restored 12-bit-per-component JPEG support. A 12-bit version of
|
||||||
|
libjpeg-turbo can now be built by passing an argument of --with-12bit to
|
||||||
|
configure (Unix) or -DWITH_12BIT=1 to cmake (Windows.) 12-bit JPEG support is
|
||||||
|
included only for convenience. Enabling this feature disables all of the
|
||||||
|
performance features in libjpeg-turbo, as well as arithmetic coding and the
|
||||||
|
TurboJPEG API. The resulting library still contains the other libjpeg-turbo
|
||||||
|
features (such as the colorspace extensions), but in general, it performs no
|
||||||
|
faster than libjpeg v6b.
|
||||||
|
|
||||||
|
[14] Added ARM 64-bit SIMD acceleration for the YCC-to-RGB color conversion
|
||||||
|
and IDCT algorithms (both are used during JPEG decompression.) For unknown
|
||||||
|
reasons (probably related to clang), this code cannot currently be compiled for
|
||||||
|
iOS.
|
||||||
|
|
||||||
|
[15] Fixed an extremely rare bug that could cause the Huffman encoder's local
|
||||||
|
buffer to overrun when a very high-frequency MCU is compressed using quality
|
||||||
|
100 and no subsampling, and when the JPEG output buffer is being dynamically
|
||||||
|
resized by the destination manager. This issue was so rare that, even with a
|
||||||
|
test program specifically designed to make the bug occur (by injecting random
|
||||||
|
high-frequency YUV data into the compressor), it was reproducible only once in
|
||||||
|
about every 25 million iterations.
|
||||||
|
|
||||||
|
[16] Fixed an oversight in the TurboJPEG C wrapper: if any of the JPEG
|
||||||
|
compression functions was called repeatedly with the same
|
||||||
|
automatically-allocated destination buffer, then TurboJPEG would erroneously
|
||||||
|
assume that the jpegSize parameter was equal to the size of the buffer, when in
|
||||||
|
fact that parameter was probably equal to the size of the most recently
|
||||||
|
compressed JPEG image. If the size of the previous JPEG image was not as large
|
||||||
|
as the current JPEG image, then TurboJPEG would unnecessarily reallocate the
|
||||||
|
destination buffer.
|
||||||
|
|
||||||
|
|
||||||
|
1.3.1
|
||||||
|
=====
|
||||||
|
|
||||||
|
[1] On Un*x systems, 'make install' now installs the libjpeg-turbo libraries
|
||||||
|
into /opt/libjpeg-turbo/lib32 by default on any 32-bit system, not just x86,
|
||||||
|
and into /opt/libjpeg-turbo/lib64 by default on any 64-bit system, not just
|
||||||
|
x86-64. You can override this by overriding either the 'prefix' or 'libdir'
|
||||||
|
configure variables.
|
||||||
|
|
||||||
|
[2] The Windows installer now places a copy of the TurboJPEG DLLs in the same
|
||||||
|
directory as the rest of the libjpeg-turbo binaries. This was mainly done
|
||||||
|
to support TurboVNC 1.3, which bundles the DLLs in its Windows installation.
|
||||||
|
When using a 32-bit version of CMake on 64-bit Windows, it is impossible to
|
||||||
|
access the c:\WINDOWS\system32 directory, which made it impossible for the
|
||||||
|
TurboVNC build scripts to bundle the 64-bit TurboJPEG DLL.
|
||||||
|
|
||||||
|
[3] Fixed a bug whereby attempting to encode a progressive JPEG with arithmetic
|
||||||
|
entropy coding (by passing arguments of -progressive -arithmetic to cjpeg or
|
||||||
|
jpegtran, for instance) would result in an error, "Requested feature was
|
||||||
|
omitted at compile time".
|
||||||
|
|
||||||
|
[4] Fixed a couple of issues whereby malformed JPEG images would cause
|
||||||
|
libjpeg-turbo to use uninitialized memory during decompression.
|
||||||
|
|
||||||
|
[5] Fixed an error ("Buffer passed to JPEG library is too small") that occurred
|
||||||
|
when calling the TurboJPEG YUV encoding function with a very small (< 5x5)
|
||||||
|
source image, and added a unit test to check for this error.
|
||||||
|
|
||||||
|
[6] The Java classes should now build properly under Visual Studio 2010 and
|
||||||
|
later.
|
||||||
|
|
||||||
|
[7] Fixed an issue that prevented SRPMs generated using the in-tree packaging
|
||||||
|
tools from being rebuilt on certain newer Linux distributions.
|
||||||
|
|
||||||
|
[8] Numerous minor fixes to eliminate compilation and build/packaging system
|
||||||
|
warnings, fix cosmetic issues, improve documentation clarity, and other general
|
||||||
|
source cleanup.
|
||||||
|
|
||||||
|
|
||||||
|
1.3.0
|
||||||
|
=====
|
||||||
|
|
||||||
|
[1] 'make test' now works properly on FreeBSD, and it no longer requires the
|
||||||
|
md5sum executable to be present on other Un*x platforms.
|
||||||
|
|
||||||
|
[2] Overhauled the packaging system:
|
||||||
|
-- To avoid conflict with vendor-supplied libjpeg-turbo packages, the
|
||||||
|
official RPMs and DEBs for libjpeg-turbo have been renamed to
|
||||||
|
"libjpeg-turbo-official".
|
||||||
|
-- The TurboJPEG libraries are now located under /opt/libjpeg-turbo in the
|
||||||
|
official Linux and Mac packages, to avoid conflict with vendor-supplied
|
||||||
|
packages and also to streamline the packaging system.
|
||||||
|
-- Release packages are now created with the directory structure defined
|
||||||
|
by the configure variables "prefix", "bindir", "libdir", etc. (Un*x) or by the
|
||||||
|
CMAKE_INSTALL_PREFIX variable (Windows.) The exception is that the docs are
|
||||||
|
always located under the system default documentation directory on Un*x and Mac
|
||||||
|
systems, and on Windows, the TurboJPEG DLL is always located in the Windows
|
||||||
|
system directory.
|
||||||
|
-- To avoid confusion, official libjpeg-turbo packages on Linux/Unix platforms
|
||||||
|
(except for Mac) will always install the 32-bit libraries in
|
||||||
|
/opt/libjpeg-turbo/lib32 and the 64-bit libraries in /opt/libjpeg-turbo/lib64.
|
||||||
|
-- Fixed an issue whereby, in some cases, the libjpeg-turbo executables on Un*x
|
||||||
|
systems were not properly linking with the shared libraries installed by the
|
||||||
|
same package.
|
||||||
|
-- Fixed an issue whereby building the "installer" target on Windows when
|
||||||
|
WITH_JAVA=1 would fail if the TurboJPEG JAR had not been previously built.
|
||||||
|
-- Building the "install" target on Windows now installs files into the same
|
||||||
|
places that the installer does.
|
||||||
|
|
||||||
|
[3] Fixed a Huffman encoder bug that prevented I/O suspension from working
|
||||||
|
properly.
|
||||||
|
|
||||||
|
|
||||||
|
1.2.90 (1.3 beta1)
|
||||||
|
==================
|
||||||
|
|
||||||
|
[1] Added support for additional scaling factors (3/8, 5/8, 3/4, 7/8, 9/8, 5/4,
|
||||||
|
11/8, 3/2, 13/8, 7/4, 15/8, and 2) when decompressing. Note that the IDCT will
|
||||||
|
not be SIMD-accelerated when using any of these new scaling factors.
|
||||||
|
|
||||||
|
[2] The TurboJPEG dynamic library is now versioned. It was not strictly
|
||||||
|
necessary to do so, because TurboJPEG uses versioned symbols, and if a function
|
||||||
|
changes in an ABI-incompatible way, that function is renamed and a legacy
|
||||||
|
function is provided to maintain backward compatibility. However, certain
|
||||||
|
Linux distro maintainers have a policy against accepting any library that isn't
|
||||||
|
versioned.
|
||||||
|
|
||||||
|
[3] Extended the TurboJPEG Java API so that it can be used to compress a JPEG
|
||||||
|
image from and decompress a JPEG image to an arbitrary position in a large
|
||||||
|
image buffer.
|
||||||
|
|
||||||
|
[4] The tjDecompressToYUV() function now supports the TJFLAG_FASTDCT flag.
|
||||||
|
|
||||||
|
[5] The 32-bit supplementary package for amd64 Debian systems now provides
|
||||||
|
symlinks in /usr/lib/i386-linux-gnu for the TurboJPEG libraries in /usr/lib32.
|
||||||
|
This allows those libraries to be used on MultiArch-compatible systems (such as
|
||||||
|
Ubuntu 11 and later) without setting the linker path.
|
||||||
|
|
||||||
|
[6] The TurboJPEG Java wrapper should now find the JNI library on Mac systems
|
||||||
|
without having to pass -Djava.library.path=/usr/lib to java.
|
||||||
|
|
||||||
|
[7] TJBench has been ported to Java to provide a convenient way of validating
|
||||||
|
the performance of the TurboJPEG Java API. It can be run with
|
||||||
|
'java -cp turbojpeg.jar TJBench'.
|
||||||
|
|
||||||
|
[8] cjpeg can now be used to generate JPEG files with the RGB colorspace
|
||||||
|
(feature ported from jpeg-8d.)
|
||||||
|
|
||||||
|
[9] The width and height in the -crop argument passed to jpegtran can now be
|
||||||
|
suffixed with "f" to indicate that, when the upper left corner of the cropping
|
||||||
|
region is automatically moved to the nearest iMCU boundary, the bottom right
|
||||||
|
corner should be moved by the same amount. In other words, this feature causes
|
||||||
|
jpegtran to strictly honor the specified width/height rather than the specified
|
||||||
|
bottom right corner (feature ported from jpeg-8d.)
|
||||||
|
|
||||||
|
[10] JPEG files using the RGB colorspace can now be decompressed into grayscale
|
||||||
|
images (feature ported from jpeg-8d.)
|
||||||
|
|
||||||
|
[11] Fixed a regression caused by 1.2.1[7] whereby the build would fail with
|
||||||
|
multiple "Mismatch in operand sizes" errors when attempting to build the x86
|
||||||
|
SIMD code with NASM 0.98.
|
||||||
|
|
||||||
|
[12] The in-memory source/destination managers (jpeg_mem_src() and
|
||||||
|
jpeg_mem_dest()) are now included by default when building libjpeg-turbo with
|
||||||
|
libjpeg v6b or v7 emulation, so that programs can take advantage of these
|
||||||
|
functions without requiring the use of the backward-incompatible libjpeg v8
|
||||||
|
ABI. The "age number" of the libjpeg-turbo library on Un*x systems has been
|
||||||
|
incremented by 1 to reflect this. You can disable this feature with a
|
||||||
|
configure/CMake switch in order to retain strict API/ABI compatibility with the
|
||||||
|
libjpeg v6b or v7 API/ABI (or with previous versions of libjpeg-turbo.) See
|
||||||
|
README-turbo.txt for more details.
|
||||||
|
|
||||||
|
[13] Added ARMv7s architecture to libjpeg.a and libturbojpeg.a in the official
|
||||||
|
libjpeg-turbo binary package for OS X, so that those libraries can be used to
|
||||||
|
build applications that leverage the faster CPUs in the iPhone 5 and iPad 4.
|
||||||
|
|
||||||
|
|
||||||
|
1.2.1
|
||||||
|
=====
|
||||||
|
|
||||||
|
[1] Creating or decoding a JPEG file that uses the RGB colorspace should now
|
||||||
|
properly work when the input or output colorspace is one of the libjpeg-turbo
|
||||||
|
colorspace extensions.
|
||||||
|
|
||||||
|
[2] When libjpeg-turbo was built without SIMD support and merged (non-fancy)
|
||||||
|
upsampling was used along with an alpha-enabled colorspace during
|
||||||
|
decompression, the unused byte of the decompressed pixels was not being set to
|
||||||
|
0xFF. This has been fixed. TJUnitTest has also been extended to test for the
|
||||||
|
correct behavior of the colorspace extensions when merged upsampling is used.
|
||||||
|
|
||||||
|
[3] Fixed a bug whereby the libjpeg-turbo SSE2 SIMD code would not preserve the
|
||||||
|
upper 64 bits of xmm6 and xmm7 on Win64 platforms, which violated the Win64
|
||||||
|
calling conventions.
|
||||||
|
|
||||||
|
[4] Fixed a regression caused by 1.2.0[6] whereby decompressing corrupt JPEG
|
||||||
|
images (specifically, images in which the component count was erroneously set
|
||||||
|
to a large value) would cause libjpeg-turbo to segfault.
|
||||||
|
|
||||||
|
[5] Worked around a severe performance issue with "Bobcat" (AMD Embedded APU)
|
||||||
|
processors. The MASKMOVDQU instruction, which was used by the libjpeg-turbo
|
||||||
|
SSE2 SIMD code, is apparently implemented in microcode on AMD processors, and
|
||||||
|
it is painfully slow on Bobcat processors in particular. Eliminating the use
|
||||||
|
of this instruction improved performance by an order of magnitude on Bobcat
|
||||||
|
processors and by a small amount (typically 5%) on AMD desktop processors.
|
||||||
|
|
||||||
|
[6] Added SIMD acceleration for performing 4:2:2 upsampling on NEON-capable ARM
|
||||||
|
platforms. This speeds up the decompression of 4:2:2 JPEGs by 20-25% on such
|
||||||
|
platforms.
|
||||||
|
|
||||||
|
[7] Fixed a regression caused by 1.2.0[2] whereby, on Linux/x86 platforms
|
||||||
|
running the 32-bit SSE2 SIMD code in libjpeg-turbo, decompressing a 4:2:0 or
|
||||||
|
4:2:2 JPEG image into a 32-bit (RGBX, BGRX, etc.) buffer without using fancy
|
||||||
|
upsampling would produce several incorrect columns of pixels at the right-hand
|
||||||
|
side of the output image if each row in the output image was not evenly
|
||||||
|
divisible by 16 bytes.
|
||||||
|
|
||||||
|
[8] Fixed an issue whereby attempting to build the SIMD extensions with Xcode
|
||||||
|
4.3 on OS X platforms would cause NASM to return numerous errors of the form
|
||||||
|
"'%define' expects a macro identifier".
|
||||||
|
|
||||||
|
[9] Added flags to the TurboJPEG API that allow the caller to force the use of
|
||||||
|
either the fast or the accurate DCT/IDCT algorithms in the underlying codec.
|
||||||
|
|
||||||
|
|
||||||
|
1.2.0
|
||||||
|
=====
|
||||||
|
|
||||||
|
[1] Fixed build issue with YASM on Unix systems (the libjpeg-turbo build system
|
||||||
|
was not adding the current directory to the assembler include path, so YASM
|
||||||
|
was not able to find jsimdcfg.inc.)
|
||||||
|
|
||||||
|
[2] Fixed out-of-bounds read in SSE2 SIMD code that occurred when decompressing
|
||||||
|
a JPEG image to a bitmap buffer whose size was not a multiple of 16 bytes.
|
||||||
|
This was more of an annoyance than an actual bug, since it did not cause any
|
||||||
|
actual run-time problems, but the issue showed up when running libjpeg-turbo in
|
||||||
|
valgrind. See http://crbug.com/72399 for more information.
|
||||||
|
|
||||||
|
[3] Added a compile-time macro (LIBJPEG_TURBO_VERSION) that can be used to
|
||||||
|
check the version of libjpeg-turbo against which an application was compiled.
|
||||||
|
|
||||||
|
[4] Added new RGBA/BGRA/ABGR/ARGB colorspace extension constants (libjpeg API)
|
||||||
|
and pixel formats (TurboJPEG API), which allow applications to specify that,
|
||||||
|
when decompressing to a 4-component RGB buffer, the unused byte should be set
|
||||||
|
to 0xFF so that it can be interpreted as an opaque alpha channel.
|
||||||
|
|
||||||
|
[5] Fixed regression issue whereby DevIL failed to build against libjpeg-turbo
|
||||||
|
because libjpeg-turbo's distributed version of jconfig.h contained an INLINE
|
||||||
|
macro, which conflicted with a similar macro in DevIL. This macro is used only
|
||||||
|
internally when building libjpeg-turbo, so it was moved into config.h.
|
||||||
|
|
||||||
|
[6] libjpeg-turbo will now correctly decompress erroneous CMYK/YCCK JPEGs whose
|
||||||
|
K component is assigned a component ID of 1 instead of 4. Although these files
|
||||||
|
are in violation of the spec, other JPEG implementations handle them
|
||||||
|
correctly.
|
||||||
|
|
||||||
|
[7] Added ARMv6 and ARMv7 architectures to libjpeg.a and libturbojpeg.a in
|
||||||
|
the official libjpeg-turbo binary package for OS X, so that those libraries can
|
||||||
|
be used to build both OS X and iOS applications.
|
||||||
|
|
||||||
|
|
||||||
|
1.1.90 (1.2 beta1)
|
||||||
|
==================
|
||||||
|
|
||||||
|
[1] Added a Java wrapper for the TurboJPEG API. See java/README for more
|
||||||
|
details.
|
||||||
|
|
||||||
|
[2] The TurboJPEG API can now be used to scale down images during
|
||||||
|
decompression.
|
||||||
|
|
||||||
|
[3] Added SIMD routines for RGB-to-grayscale color conversion, which
|
||||||
|
significantly improves the performance of grayscale JPEG compression from an
|
||||||
|
RGB source image.
|
||||||
|
|
||||||
|
[4] Improved the performance of the C color conversion routines, which are used
|
||||||
|
on platforms for which SIMD acceleration is not available.
|
||||||
|
|
||||||
|
[5] Added a function to the TurboJPEG API that performs lossless transforms.
|
||||||
|
This function is implemented using the same back end as jpegtran, but it
|
||||||
|
performs transcoding entirely in memory and allows multiple transforms and/or
|
||||||
|
crop operations to be batched together, so the source coefficients only need to
|
||||||
|
be read once. This is useful when generating image tiles from a single source
|
||||||
|
JPEG.
|
||||||
|
|
||||||
|
[6] Added tests for the new TurboJPEG scaled decompression and lossless
|
||||||
|
transform features to tjbench (the TurboJPEG benchmark, formerly called
|
||||||
|
"jpgtest".)
|
||||||
|
|
||||||
|
[7] Added support for 4:4:0 (transposed 4:2:2) subsampling in TurboJPEG, which
|
||||||
|
was necessary in order for it to read 4:2:2 JPEG files that had been losslessly
|
||||||
|
transposed or rotated 90 degrees.
|
||||||
|
|
||||||
|
[8] All legacy VirtualGL code has been re-factored, and this has allowed
|
||||||
|
libjpeg-turbo, in its entirety, to be re-licensed under a BSD-style license.
|
||||||
|
|
||||||
|
[9] libjpeg-turbo can now be built with YASM.
|
||||||
|
|
||||||
|
[10] Added SIMD acceleration for ARM Linux and iOS platforms that support
|
||||||
|
NEON instructions.
|
||||||
|
|
||||||
|
[11] Refactored the TurboJPEG C API and documented it using Doxygen. The
|
||||||
|
TurboJPEG 1.2 API uses pixel formats to define the size and component order of
|
||||||
|
the uncompressed source/destination images, and it includes a more efficient
|
||||||
|
version of TJBUFSIZE() that computes a worst-case JPEG size based on the level
|
||||||
|
of chrominance subsampling. The refactored implementation of the TurboJPEG API
|
||||||
|
now uses the libjpeg memory source and destination managers, which allows the
|
||||||
|
TurboJPEG compressor to grow the JPEG buffer as necessary.
|
||||||
|
|
||||||
|
[12] Eliminated errors in the output of jpegtran on Windows that occurred when
|
||||||
|
the application was invoked using I/O redirection
|
||||||
|
(jpegtran <input.jpg >output.jpg).
|
||||||
|
|
||||||
|
[13] The inclusion of libjpeg v7 and v8 emulation as well as arithmetic coding
|
||||||
|
support in libjpeg-turbo v1.1.0 introduced several new error constants in
|
||||||
|
jerror.h, and these were mistakenly enabled for all emulation modes, causing
|
||||||
|
the error enum in libjpeg-turbo to sometimes have different values than the
|
||||||
|
same enum in libjpeg. This represents an ABI incompatibility, and it caused
|
||||||
|
problems with rare applications that took specific action based on a particular
|
||||||
|
error value. The fix was to include the new error constants conditionally
|
||||||
|
based on whether libjpeg v7 or v8 emulation was enabled.
|
||||||
|
|
||||||
|
[14] Fixed an issue whereby Windows applications that used libjpeg-turbo would
|
||||||
|
fail to compile if the Windows system headers were included before jpeglib.h.
|
||||||
|
This issue was caused by a conflict in the definition of the INT32 type.
|
||||||
|
|
||||||
|
[15] Fixed 32-bit supplementary package for amd64 Debian systems, which was
|
||||||
|
broken by enhancements to the packaging system in 1.1.
|
||||||
|
|
||||||
|
[16] When decompressing a JPEG image using an output colorspace of
|
||||||
|
JCS_EXT_RGBX, JCS_EXT_BGRX, JCS_EXT_XBGR, or JCS_EXT_XRGB, libjpeg-turbo will
|
||||||
|
now set the unused byte to 0xFF, which allows applications to interpret that
|
||||||
|
byte as an alpha channel (0xFF = opaque).
|
||||||
|
|
||||||
|
|
||||||
|
1.1.1
|
||||||
|
=====
|
||||||
|
|
||||||
|
[1] Fixed a 1-pixel error in row 0, column 21 of the luminance plane generated
|
||||||
|
by tjEncodeYUV().
|
||||||
|
|
||||||
|
[2] libjpeg-turbo's accelerated Huffman decoder previously ignored unexpected
|
||||||
|
markers found in the middle of the JPEG data stream during decompression. It
|
||||||
|
will now hand off decoding of a particular block to the unaccelerated Huffman
|
||||||
|
decoder if an unexpected marker is found, so that the unaccelerated Huffman
|
||||||
|
decoder can generate an appropriate warning.
|
||||||
|
|
||||||
|
[3] Older versions of MinGW64 prefixed symbol names with underscores by
|
||||||
|
default, which differed from the behavior of 64-bit Visual C++. MinGW64 1.0
|
||||||
|
has adopted the behavior of 64-bit Visual C++ as the default, so to accommodate
|
||||||
|
this, the libjpeg-turbo SIMD function names are no longer prefixed with an
|
||||||
|
underscore when building with MinGW64. This means that, when building
|
||||||
|
libjpeg-turbo with older versions of MinGW64, you will now have to add
|
||||||
|
-fno-leading-underscore to the CFLAGS.
|
||||||
|
|
||||||
|
[4] Fixed a regression bug in the NSIS script that caused the Windows installer
|
||||||
|
build to fail when using the Visual Studio IDE.
|
||||||
|
|
||||||
|
[5] Fixed a bug in jpeg_read_coefficients() whereby it would not initialize
|
||||||
|
cinfo->image_width and cinfo->image_height if libjpeg v7 or v8 emulation was
|
||||||
|
enabled. This specifically caused the jpegoptim program to fail if it was
|
||||||
|
linked against a version of libjpeg-turbo that was built with libjpeg v7 or v8
|
||||||
|
emulation.
|
||||||
|
|
||||||
|
[6] Eliminated excessive I/O overhead that occurred when reading BMP files in
|
||||||
|
cjpeg.
|
||||||
|
|
||||||
|
[7] Eliminated errors in the output of cjpeg on Windows that occurred when the
|
||||||
|
application was invoked using I/O redirection (cjpeg <inputfile >output.jpg).
|
||||||
|
|
||||||
|
|
||||||
|
1.1.0
|
||||||
|
=====
|
||||||
|
|
||||||
|
[1] The algorithm used by the SIMD quantization function cannot produce correct
|
||||||
|
results when the JPEG quality is >= 98 and the fast integer forward DCT is
|
||||||
|
used. Thus, the non-SIMD quantization function is now used for those cases,
|
||||||
|
and libjpeg-turbo should now produce identical output to libjpeg v6b in all
|
||||||
|
cases.
|
||||||
|
|
||||||
|
[2] Despite the above, the fast integer forward DCT still degrades somewhat for
|
||||||
|
JPEG qualities greater than 95, so the TurboJPEG wrapper will now automatically
|
||||||
|
use the slow integer forward DCT when generating JPEG images of quality 96 or
|
||||||
|
greater. This reduces compression performance by as much as 15% for these
|
||||||
|
high-quality images but is necessary to ensure that the images are perceptually
|
||||||
|
lossless. It also ensures that the library can avoid the performance pitfall
|
||||||
|
created by [1].
|
||||||
|
|
||||||
|
[3] Ported jpgtest.cxx to pure C to avoid the need for a C++ compiler.
|
||||||
|
|
||||||
|
[4] Fixed visual artifacts in grayscale JPEG compression caused by a typo in
|
||||||
|
the RGB-to-luminance lookup tables.
|
||||||
|
|
||||||
|
[5] The Windows distribution packages now include the libjpeg run-time programs
|
||||||
|
(cjpeg, etc.)
|
||||||
|
|
||||||
|
[6] All packages now include jpgtest.
|
||||||
|
|
||||||
|
[7] The TurboJPEG dynamic library now uses versioned symbols.
|
||||||
|
|
||||||
|
[8] Added two new TurboJPEG API functions, tjEncodeYUV() and
|
||||||
|
tjDecompressToYUV(), to replace the somewhat hackish TJ_YUV flag.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.90 (1.1 beta1)
|
||||||
|
==================
|
||||||
|
|
||||||
|
[1] Added emulation of the libjpeg v7 and v8 APIs and ABIs. See
|
||||||
|
README-turbo.txt for more details. This feature was sponsored by CamTrace SAS.
|
||||||
|
|
||||||
|
[2] Created a new CMake-based build system for the Visual C++ and MinGW builds.
|
||||||
|
|
||||||
|
[3] Grayscale bitmaps can now be compressed from/decompressed to using the
|
||||||
|
TurboJPEG API.
|
||||||
|
|
||||||
|
[4] jpgtest can now be used to test decompression performance with existing
|
||||||
|
JPEG images.
|
||||||
|
|
||||||
|
[5] If the default install prefix (/opt/libjpeg-turbo) is used, then
|
||||||
|
'make install' now creates /opt/libjpeg-turbo/lib32 and
|
||||||
|
/opt/libjpeg-turbo/lib64 sym links to duplicate the behavior of the binary
|
||||||
|
packages.
|
||||||
|
|
||||||
|
[6] All symbols in the libjpeg-turbo dynamic library are now versioned, even
|
||||||
|
when the library is built with libjpeg v6b emulation.
|
||||||
|
|
||||||
|
[7] Added arithmetic encoding and decoding support (can be disabled with
|
||||||
|
configure or CMake options)
|
||||||
|
|
||||||
|
[8] Added a TJ_YUV flag to the TurboJPEG API, which causes both the compressor
|
||||||
|
and decompressor to output planar YUV images.
|
||||||
|
|
||||||
|
[9] Added an extended version of tjDecompressHeader() to the TurboJPEG API,
|
||||||
|
which allows the caller to determine the type of subsampling used in a JPEG
|
||||||
|
image.
|
||||||
|
|
||||||
|
[10] Added further protections against invalid Huffman codes.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.1
|
||||||
|
=====
|
||||||
|
|
||||||
|
[1] The Huffman decoder will now handle erroneous Huffman codes (for instance,
|
||||||
|
from a corrupt JPEG image.) Previously, these would cause libjpeg-turbo to
|
||||||
|
crash under certain circumstances.
|
||||||
|
|
||||||
|
[2] Fixed typo in SIMD dispatch routines that was causing 4:2:2 upsampling to
|
||||||
|
be used instead of 4:2:0 when decompressing JPEG images using SSE2 code.
|
||||||
|
|
||||||
|
[3] configure script will now automatically determine whether the
|
||||||
|
INCOMPLETE_TYPES_BROKEN macro should be defined.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.0
|
||||||
|
=====
|
||||||
|
|
||||||
|
[1] 2983700: Further FreeBSD build tweaks (no longer necessary to specify
|
||||||
|
--host when configuring on a 64-bit system)
|
||||||
|
|
||||||
|
[2] Created symlinks in the Unix/Linux packages so that the TurboJPEG
|
||||||
|
include file can always be found in /opt/libjpeg-turbo/include, the 32-bit
|
||||||
|
static libraries can always be found in /opt/libjpeg-turbo/lib32, and the
|
||||||
|
64-bit static libraries can always be found in /opt/libjpeg-turbo/lib64.
|
||||||
|
|
||||||
|
[3] The Unix/Linux distribution packages now include the libjpeg run-time
|
||||||
|
programs (cjpeg, etc.) and man pages.
|
||||||
|
|
||||||
|
[4] Created a 32-bit supplementary package for amd64 Debian systems, which
|
||||||
|
contains just the 32-bit libjpeg-turbo libraries.
|
||||||
|
|
||||||
|
[5] Moved the libraries from */lib32 to */lib in the i386 Debian package.
|
||||||
|
|
||||||
|
[6] Include distribution package for Cygwin
|
||||||
|
|
||||||
|
[7] No longer necessary to specify --without-simd on non-x86 architectures, and
|
||||||
|
unit tests now work on those architectures.
|
||||||
|
|
||||||
|
|
||||||
|
0.0.93
|
||||||
|
======
|
||||||
|
|
||||||
|
[1] 2982659, Fixed x86-64 build on FreeBSD systems
|
||||||
|
|
||||||
|
[2] 2988188: Added support for Windows 64-bit systems
|
||||||
|
|
||||||
|
|
||||||
|
0.0.91
|
||||||
|
======
|
||||||
|
|
||||||
|
[1] Added documentation to .deb packages
|
||||||
|
|
||||||
|
[2] 2968313: Fixed data corruption issues when decompressing large JPEG images
|
||||||
|
and/or using buffered I/O with the libjpeg-turbo decompressor
|
||||||
|
|
||||||
|
|
||||||
|
0.0.90
|
||||||
|
======
|
||||||
|
|
||||||
|
Initial release
|
||||||
706
Makefile.am
Normal file
@@ -0,0 +1,706 @@
|
|||||||
|
lib_LTLIBRARIES = libjpeg.la
|
||||||
|
libjpeg_la_LDFLAGS = -version-info ${LIBTOOL_CURRENT}:${SO_MINOR_VERSION}:${SO_AGE} -no-undefined
|
||||||
|
include_HEADERS = jerror.h jmorecfg.h jpeglib.h
|
||||||
|
|
||||||
|
if WITH_TURBOJPEG
|
||||||
|
lib_LTLIBRARIES += libturbojpeg.la
|
||||||
|
libturbojpeg_la_LDFLAGS = -version-info 1:0:1 -no-undefined
|
||||||
|
include_HEADERS += turbojpeg.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
nodist_include_HEADERS = jconfig.h
|
||||||
|
|
||||||
|
|
||||||
|
HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
|
||||||
|
jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h jpegcomp.h \
|
||||||
|
jpeg_nbits_table.h
|
||||||
|
|
||||||
|
libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \
|
||||||
|
jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
|
||||||
|
jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c \
|
||||||
|
jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
|
||||||
|
jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
|
||||||
|
jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c \
|
||||||
|
jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c \
|
||||||
|
jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c
|
||||||
|
|
||||||
|
if WITH_ARITH
|
||||||
|
libjpeg_la_SOURCES += jaricom.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
if WITH_ARITH_ENC
|
||||||
|
libjpeg_la_SOURCES += jcarith.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
if WITH_ARITH_DEC
|
||||||
|
libjpeg_la_SOURCES += jdarith.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
SUBDIRS = java
|
||||||
|
|
||||||
|
|
||||||
|
if WITH_TURBOJPEG
|
||||||
|
|
||||||
|
libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpeg.c turbojpeg.h \
|
||||||
|
transupp.c transupp.h jdatadst-tj.c jdatasrc-tj.c
|
||||||
|
|
||||||
|
if WITH_JAVA
|
||||||
|
|
||||||
|
libturbojpeg_la_SOURCES += turbojpeg-jni.c
|
||||||
|
libturbojpeg_la_CFLAGS = ${JNI_CFLAGS}
|
||||||
|
TJMAPFILE = turbojpeg-mapfile.jni
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
TJMAPFILE = turbojpeg-mapfile
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
libturbojpeg_la_SOURCES += $(TJMAPFILE)
|
||||||
|
|
||||||
|
if VERSION_SCRIPT
|
||||||
|
libturbojpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)$(srcdir)/$(TJMAPFILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
if VERSION_SCRIPT
|
||||||
|
libjpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)libjpeg.map
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
if WITH_SIMD
|
||||||
|
|
||||||
|
SUBDIRS += simd
|
||||||
|
libjpeg_la_LIBADD = simd/libsimd.la
|
||||||
|
libturbojpeg_la_LIBADD = simd/libsimd.la
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
libjpeg_la_SOURCES += jsimd_none.c
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom
|
||||||
|
noinst_PROGRAMS = jcstest
|
||||||
|
|
||||||
|
|
||||||
|
if WITH_TURBOJPEG
|
||||||
|
|
||||||
|
bin_PROGRAMS += tjbench
|
||||||
|
|
||||||
|
noinst_PROGRAMS += tjunittest
|
||||||
|
|
||||||
|
tjbench_SOURCES = tjbench.c bmp.h bmp.c tjutil.h tjutil.c rdbmp.c rdppm.c \
|
||||||
|
wrbmp.c wrppm.c
|
||||||
|
|
||||||
|
tjbench_LDADD = libturbojpeg.la libjpeg.la -lm
|
||||||
|
|
||||||
|
tjbench_CFLAGS = -DBMP_SUPPORTED -DPPM_SUPPORTED
|
||||||
|
|
||||||
|
tjunittest_SOURCES = tjunittest.c tjutil.h tjutil.c
|
||||||
|
|
||||||
|
tjunittest_LDADD = libturbojpeg.la
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdgif.c rdppm.c rdswitch.c
|
||||||
|
if WITH_12BIT
|
||||||
|
else
|
||||||
|
cjpeg_SOURCES += rdbmp.c rdtarga.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
cjpeg_LDADD = libjpeg.la
|
||||||
|
|
||||||
|
cjpeg_CFLAGS = -DGIF_SUPPORTED -DPPM_SUPPORTED
|
||||||
|
if WITH_12BIT
|
||||||
|
else
|
||||||
|
cjpeg_CFLAGS += -DBMP_SUPPORTED -DTARGA_SUPPORTED
|
||||||
|
endif
|
||||||
|
|
||||||
|
djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \
|
||||||
|
wrgif.c wrppm.c
|
||||||
|
if WITH_12BIT
|
||||||
|
else
|
||||||
|
djpeg_SOURCES += wrbmp.c wrtarga.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
djpeg_LDADD = libjpeg.la
|
||||||
|
|
||||||
|
djpeg_CFLAGS = -DGIF_SUPPORTED -DPPM_SUPPORTED
|
||||||
|
if WITH_12BIT
|
||||||
|
else
|
||||||
|
djpeg_CFLAGS += -DBMP_SUPPORTED -DTARGA_SUPPORTED
|
||||||
|
endif
|
||||||
|
|
||||||
|
jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h
|
||||||
|
|
||||||
|
jpegtran_LDADD = libjpeg.la
|
||||||
|
|
||||||
|
rdjpgcom_SOURCES = rdjpgcom.c
|
||||||
|
|
||||||
|
rdjpgcom_LDADD = libjpeg.la
|
||||||
|
|
||||||
|
wrjpgcom_SOURCES = wrjpgcom.c
|
||||||
|
|
||||||
|
wrjpgcom_LDADD = libjpeg.la
|
||||||
|
|
||||||
|
jcstest_SOURCES = jcstest.c
|
||||||
|
|
||||||
|
jcstest_LDADD = libjpeg.la
|
||||||
|
|
||||||
|
dist_man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
|
||||||
|
|
||||||
|
DOCS= coderules.txt jconfig.txt change.log rdrle.c wrrle.c BUILDING.txt \
|
||||||
|
ChangeLog.txt
|
||||||
|
|
||||||
|
dist_doc_DATA = README README-turbo.txt libjpeg.txt structure.txt usage.txt \
|
||||||
|
wizard.txt
|
||||||
|
|
||||||
|
exampledir = $(docdir)
|
||||||
|
dist_example_DATA = example.c
|
||||||
|
|
||||||
|
|
||||||
|
EXTRA_DIST = win release $(DOCS) testimages CMakeLists.txt \
|
||||||
|
sharedlib/CMakeLists.txt cmakescripts libjpeg.map.in doc doxygen.config \
|
||||||
|
doxygen-extra.css jccolext.c jdcolext.c jdcol565.c jdmrgext.c jdmrg565.c \
|
||||||
|
jstdhuff.c
|
||||||
|
|
||||||
|
dist-hook:
|
||||||
|
rm -rf `find $(distdir) -name .svn`
|
||||||
|
|
||||||
|
|
||||||
|
SUBDIRS += md5
|
||||||
|
|
||||||
|
if WITH_12BIT
|
||||||
|
|
||||||
|
TESTORIG = testorig12.jpg
|
||||||
|
MD5_JPEG_RGB_ISLOW = 9620f424569594bb9242b48498ad801f
|
||||||
|
MD5_PPM_RGB_ISLOW = f3301d2219783b8b3d942b7239fa50c0
|
||||||
|
MD5_JPEG_422_IFAST_OPT = 7322e3bd2f127f7de4b40d4480ce60e4
|
||||||
|
MD5_PPM_422_IFAST = 79807fa552899e66a04708f533e16950
|
||||||
|
MD5_PPM_422M_IFAST = 07737bfe8a7c1c87aaa393a0098d16b0
|
||||||
|
MD5_JPEG_420_IFAST_Q100_PROG = a1da220b5604081863a504297ed59e55
|
||||||
|
MD5_PPM_420_Q100_IFAST = 1b3730122709f53d007255e8dfd3305e
|
||||||
|
MD5_PPM_420M_Q100_IFAST = 980a1a3c5bf9510022869d30b7d26566
|
||||||
|
MD5_JPEG_GRAY_ISLOW = 235c90707b16e2e069f37c888b2636d9
|
||||||
|
MD5_PPM_GRAY_ISLOW = 7213c10af507ad467da5578ca5ee1fca
|
||||||
|
MD5_PPM_GRAY_ISLOW_RGB = e96ee81c30a6ed422d466338bd3de65d
|
||||||
|
MD5_JPEG_420S_IFAST_OPT = 7af8e60be4d9c227ec63ac9b6630855e
|
||||||
|
MD5_JPEG_3x2_FLOAT_PROG_SSE = a8c17daf77b457725ec929e215b603f8
|
||||||
|
MD5_PPM_3x2_FLOAT_SSE = 42876ab9e5c2f76a87d08db5fbd57956
|
||||||
|
MD5_JPEG_3x2_FLOAT_PROG_32BIT = a8c17daf77b457725ec929e215b603f8
|
||||||
|
MD5_PPM_3x2_FLOAT_32BIT = 42876ab9e5c2f76a87d08db5fbd57956
|
||||||
|
MD5_PPM_3x2_FLOAT_64BIT = d6fbc71153b3d8ded484dbc17c7b9cf4
|
||||||
|
MD5_JPEG_3x2_IFAST_PROG = 1396cc2b7185cfe943d408c9d305339e
|
||||||
|
MD5_PPM_3x2_IFAST = 3975985ef6eeb0a2cdc58daa651ccc00
|
||||||
|
MD5_PPM_420M_ISLOW_2_1 = 4ca6be2a6f326ff9eaab63e70a8259c0
|
||||||
|
MD5_PPM_420M_ISLOW_15_8 = 12aa9f9534c1b3d7ba047322226365eb
|
||||||
|
MD5_PPM_420M_ISLOW_13_8 = f7e22817c7b25e1393e4ec101e9d4e96
|
||||||
|
MD5_PPM_420M_ISLOW_11_8 = 800a16f9f4dc9b293197bfe11be10a82
|
||||||
|
MD5_PPM_420M_ISLOW_9_8 = 06b7a92a9bc69f4dc36ec40f1937d55c
|
||||||
|
MD5_PPM_420M_ISLOW_7_8 = 3ec444a14a4ab4eab88ffc49c48eca43
|
||||||
|
MD5_PPM_420M_ISLOW_3_4 = 3e726b7ea872445b19437d1c1d4f0d93
|
||||||
|
MD5_PPM_420M_ISLOW_5_8 = a8a771abdc94301d20ffac119b2caccd
|
||||||
|
MD5_PPM_420M_ISLOW_1_2 = b419124dd5568b085787234866102866
|
||||||
|
MD5_PPM_420M_ISLOW_3_8 = 343d19015531b7bbe746124127244fa8
|
||||||
|
MD5_PPM_420M_ISLOW_1_4 = 35fd59d866e44659edfa3c18db2a3edb
|
||||||
|
MD5_PPM_420M_ISLOW_1_8 = ccaed48ac0aedefda5d4abe4013f4ad7
|
||||||
|
MD5_JPEG_CROP = cdb35ff4b4519392690ea040c56ea99c
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
TESTORIG = testorig.jpg
|
||||||
|
MD5_JPEG_RGB_ISLOW = 768e970dd57b340ff1b83c9d3d47c77b
|
||||||
|
MD5_PPM_RGB_ISLOW = 00a257f5393fef8821f2b88ac7421291
|
||||||
|
MD5_BMP_RGB_ISLOW_565 = f07d2e75073e4bb10f6c6f4d36e2e3be
|
||||||
|
MD5_BMP_RGB_ISLOW_565D = 4cfa0928ef3e6bb626d7728c924cfda4
|
||||||
|
MD5_JPEG_422_IFAST_OPT = 2540287b79d913f91665e660303ab2c8
|
||||||
|
MD5_PPM_422_IFAST = 35bd6b3f833bad23de82acea847129fa
|
||||||
|
MD5_PPM_422M_IFAST = 8dbc65323d62cca7c91ba02dd1cfa81d
|
||||||
|
MD5_BMP_422M_IFAST_565 = 3294bd4d9a1f2b3d08ea6020d0db7065
|
||||||
|
MD5_BMP_422M_IFAST_565D = da98c9c7b6039511be4a79a878a9abc1
|
||||||
|
MD5_JPEG_420_IFAST_Q100_PROG = 990cbe0329c882420a2094da7e5adade
|
||||||
|
MD5_PPM_420_Q100_IFAST = 5a732542015c278ff43635e473a8a294
|
||||||
|
MD5_PPM_420M_Q100_IFAST = ff692ee9323a3b424894862557c092f1
|
||||||
|
MD5_JPEG_GRAY_ISLOW = 72b51f894b8f4a10b3ee3066770aa38d
|
||||||
|
MD5_PPM_GRAY_ISLOW = 8d3596c56eace32f205deccc229aa5ed
|
||||||
|
MD5_PPM_GRAY_ISLOW_RGB = 116424ac07b79e5e801f00508eab48ec
|
||||||
|
MD5_BMP_GRAY_ISLOW_565 = 12f78118e56a2f48b966f792fedf23cc
|
||||||
|
MD5_BMP_GRAY_ISLOW_565D = bdbbd616441a24354c98553df5dc82db
|
||||||
|
MD5_JPEG_420S_IFAST_OPT = 388708217ac46273ca33086b22827ed8
|
||||||
|
# See README-turbo.txt for more details on why this next bit is necessary.
|
||||||
|
MD5_JPEG_3x2_FLOAT_PROG_SSE = 343e3f8caf8af5986ebaf0bdc13b5c71
|
||||||
|
MD5_PPM_3x2_FLOAT_SSE = 1a75f36e5904d6fc3a85a43da9ad89bb
|
||||||
|
MD5_JPEG_3x2_FLOAT_PROG_32BIT = 9bca803d2042bd1eb03819e2bf92b3e5
|
||||||
|
MD5_PPM_3x2_FLOAT_32BIT = f6bfab038438ed8f5522fbd33595dcdc
|
||||||
|
MD5_PPM_3x2_FLOAT_64BIT = 0e917a34193ef976b679a6b069b1be26
|
||||||
|
MD5_JPEG_3x2_IFAST_PROG = 1ee5d2c1a77f2da495f993c8c7cceca5
|
||||||
|
MD5_PPM_3x2_IFAST = fd283664b3b49127984af0a7f118fccd
|
||||||
|
MD5_JPEG_420_ISLOW_ARI = e986fb0a637a8d833d96e8a6d6d84ea1
|
||||||
|
MD5_JPEG_444_ISLOW_PROGARI = 0a8f1c8f66e113c3cf635df0a475a617
|
||||||
|
MD5_PPM_420M_IFAST_ARI = 72b59a99bcf1de24c5b27d151bde2437
|
||||||
|
MD5_JPEG_420_ISLOW = 9a68f56bc76e466aa7e52f415d0f4a5f
|
||||||
|
MD5_PPM_420M_ISLOW_2_1 = 9f9de8c0612f8d06869b960b05abf9c9
|
||||||
|
MD5_PPM_420M_ISLOW_15_8 = b6875bc070720b899566cc06459b63b7
|
||||||
|
MD5_PPM_420M_ISLOW_13_8 = bc3452573c8152f6ae552939ee19f82f
|
||||||
|
MD5_PPM_420M_ISLOW_11_8 = d8cc73c0aaacd4556569b59437ba00a5
|
||||||
|
MD5_PPM_420M_ISLOW_9_8 = d25e61bc7eac0002f5b393aa223747b6
|
||||||
|
MD5_PPM_420M_ISLOW_7_8 = ddb564b7c74a09494016d6cd7502a946
|
||||||
|
MD5_PPM_420M_ISLOW_3_4 = 8ed8e68808c3fbc4ea764fc9d2968646
|
||||||
|
MD5_PPM_420M_ISLOW_5_8 = a3363274999da2366a024efae6d16c9b
|
||||||
|
MD5_PPM_420M_ISLOW_1_2 = e692a315cea26b988c8e8b29a5dbcd81
|
||||||
|
MD5_PPM_420M_ISLOW_3_8 = 79eca9175652ced755155c90e785a996
|
||||||
|
MD5_PPM_420M_ISLOW_1_4 = 79cd778f8bf1a117690052cacdd54eca
|
||||||
|
MD5_PPM_420M_ISLOW_1_8 = 391b3d4aca640c8567d6f8745eb2142f
|
||||||
|
MD5_BMP_420_ISLOW_256 = 4980185e3776e89bd931736e1cddeee6
|
||||||
|
MD5_BMP_420_ISLOW_565 = bf9d13e16c4923b92e1faa604d7922cb
|
||||||
|
MD5_BMP_420_ISLOW_565D = 6bde71526acc44bcff76f696df8638d2
|
||||||
|
MD5_BMP_420M_ISLOW_565 = 8dc0185245353cfa32ad97027342216f
|
||||||
|
MD5_BMP_420M_ISLOW_565D =d1be3a3339166255e76fa50a0d70d73e
|
||||||
|
MD5_JPEG_CROP = b4197f377e621c4e9b1d20471432610d
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
|
test: tjquicktest tjbittest bittest
|
||||||
|
|
||||||
|
tjquicktest: testclean all
|
||||||
|
|
||||||
|
if WITH_TURBOJPEG
|
||||||
|
if WITH_JAVA
|
||||||
|
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest
|
||||||
|
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -bi
|
||||||
|
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv
|
||||||
|
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv -noyuvpad
|
||||||
|
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv -bi
|
||||||
|
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv -bi -noyuvpad
|
||||||
|
endif
|
||||||
|
./tjunittest
|
||||||
|
./tjunittest -alloc
|
||||||
|
./tjunittest -yuv
|
||||||
|
./tjunittest -yuv -alloc
|
||||||
|
./tjunittest -yuv -noyuvpad
|
||||||
|
endif
|
||||||
|
echo GREAT SUCCESS!
|
||||||
|
|
||||||
|
tjbittest: testclean all
|
||||||
|
|
||||||
|
if WITH_TURBOJPEG
|
||||||
|
|
||||||
|
MD5_PPM_GRAY_TILE = 89d3ca21213d9d864b50b4e4e7de4ca6
|
||||||
|
MD5_PPM_420_8x8_TILE = 847fceab15c5b7b911cb986cf0f71de3
|
||||||
|
MD5_PPM_420_16x16_TILE = ca45552a93687e078f7137cc4126a7b0
|
||||||
|
MD5_PPM_420_32x32_TILE = d8676f1d6b68df358353bba9844f4a00
|
||||||
|
MD5_PPM_420_64x64_TILE = 4e4c1a3d7ea4bace4f868bcbe83b7050
|
||||||
|
MD5_PPM_420_128x128_TILE = f24c3429c52265832beab9df72a0ceae
|
||||||
|
MD5_PPM_420M_8x8_TILE = bc25320e1f4c31ce2e610e43e9fd173c
|
||||||
|
MD5_PPM_420M_TILE = 75ffdf14602258c5c189522af57fa605
|
||||||
|
MD5_PPM_422_8x8_TILE = d83dacd9fc73b0a6f10c09acad64eb1e
|
||||||
|
MD5_PPM_422_16x16_TILE = 35077fb610d72dd743b1eb0cbcfe10fb
|
||||||
|
MD5_PPM_422_32x32_TILE = e6902ed8a449ecc0f0d6f2bf945f65f7
|
||||||
|
MD5_PPM_422_64x64_TILE = 2b4502a8f316cedbde1da7bce3d2231e
|
||||||
|
MD5_PPM_422_128x128_TILE = f0b5617d578f5e13c8eee215d64d4877
|
||||||
|
MD5_PPM_422M_8x8_TILE = 828941d7f41cd6283abd6beffb7fd51d
|
||||||
|
MD5_PPM_422M_TILE = e877ae1324c4a280b95376f7f018172f
|
||||||
|
MD5_PPM_444_TILE = 7964e41e67cfb8d0a587c0aa4798f9c3
|
||||||
|
|
||||||
|
# Test compressing from/decompressing to an arbitrary subregion of a larger
|
||||||
|
# image buffer
|
||||||
|
cp $(srcdir)/testimages/testorig.ppm testout_tile.ppm
|
||||||
|
./tjbench testout_tile.ppm 95 -rgb -quiet -tile -benchtime 0.01 >/dev/null 2>&1
|
||||||
|
for i in 8 16 32 64 128; do \
|
||||||
|
md5/md5cmp $(MD5_PPM_GRAY_TILE) testout_tile_GRAY_Q95_$$i\x$$i.ppm; \
|
||||||
|
done
|
||||||
|
md5/md5cmp $(MD5_PPM_420_8x8_TILE) testout_tile_420_Q95_8x8.ppm
|
||||||
|
md5/md5cmp $(MD5_PPM_420_16x16_TILE) testout_tile_420_Q95_16x16.ppm
|
||||||
|
md5/md5cmp $(MD5_PPM_420_32x32_TILE) testout_tile_420_Q95_32x32.ppm
|
||||||
|
md5/md5cmp $(MD5_PPM_420_64x64_TILE) testout_tile_420_Q95_64x64.ppm
|
||||||
|
md5/md5cmp $(MD5_PPM_420_128x128_TILE) testout_tile_420_Q95_128x128.ppm
|
||||||
|
md5/md5cmp $(MD5_PPM_422_8x8_TILE) testout_tile_422_Q95_8x8.ppm
|
||||||
|
md5/md5cmp $(MD5_PPM_422_16x16_TILE) testout_tile_422_Q95_16x16.ppm
|
||||||
|
md5/md5cmp $(MD5_PPM_422_32x32_TILE) testout_tile_422_Q95_32x32.ppm
|
||||||
|
md5/md5cmp $(MD5_PPM_422_64x64_TILE) testout_tile_422_Q95_64x64.ppm
|
||||||
|
md5/md5cmp $(MD5_PPM_422_128x128_TILE) testout_tile_422_Q95_128x128.ppm
|
||||||
|
for i in 8 16 32 64 128; do \
|
||||||
|
md5/md5cmp $(MD5_PPM_444_TILE) testout_tile_444_Q95_$$i\x$$i.ppm; \
|
||||||
|
done
|
||||||
|
rm testout_tile_GRAY_* testout_tile_420_* testout_tile_422_* testout_tile_444_*
|
||||||
|
|
||||||
|
./tjbench testout_tile.ppm 95 -rgb -fastupsample -quiet -tile -benchtime 0.01 >/dev/null 2>&1
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_8x8_TILE) testout_tile_420_Q95_8x8.ppm
|
||||||
|
for i in 16 32 64 128; do \
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_TILE) testout_tile_420_Q95_$$i\x$$i.ppm; \
|
||||||
|
done
|
||||||
|
md5/md5cmp $(MD5_PPM_422M_8x8_TILE) testout_tile_422_Q95_8x8.ppm
|
||||||
|
for i in 16 32 64 128; do \
|
||||||
|
md5/md5cmp $(MD5_PPM_422M_TILE) testout_tile_422_Q95_$$i\x$$i.ppm; \
|
||||||
|
done
|
||||||
|
rm testout_tile_GRAY_* testout_tile_420_* testout_tile_422_* testout_tile_444_* testout_tile.ppm
|
||||||
|
echo GREAT SUCCESS!
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
bittest: testclean all
|
||||||
|
|
||||||
|
# These tests are carefully crafted to provide full coverage of as many of the
|
||||||
|
# underlying algorithms as possible (including all of the SIMD-accelerated
|
||||||
|
# ones.)
|
||||||
|
|
||||||
|
# CC: null SAMP: fullsize FDCT: islow ENT: huff
|
||||||
|
./cjpeg -rgb -dct int -outfile testout_rgb_islow.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
md5/md5cmp $(MD5_JPEG_RGB_ISLOW) testout_rgb_islow.jpg
|
||||||
|
# CC: null SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -ppm -outfile testout_rgb_islow.ppm testout_rgb_islow.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_RGB_ISLOW) testout_rgb_islow.ppm
|
||||||
|
rm testout_rgb_islow.ppm
|
||||||
|
if WITH_12BIT
|
||||||
|
rm testout_rgb_islow.jpg
|
||||||
|
else
|
||||||
|
# CC: RGB->RGB565 SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_rgb_islow_565.bmp testout_rgb_islow.jpg
|
||||||
|
md5/md5cmp $(MD5_BMP_RGB_ISLOW_565) testout_rgb_islow_565.bmp
|
||||||
|
rm testout_rgb_islow_565.bmp
|
||||||
|
# CC: RGB->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -rgb565 -bmp -outfile testout_rgb_islow_565D.bmp testout_rgb_islow.jpg
|
||||||
|
md5/md5cmp $(MD5_BMP_RGB_ISLOW_565D) testout_rgb_islow_565D.bmp
|
||||||
|
rm testout_rgb_islow_565D.bmp testout_rgb_islow.jpg
|
||||||
|
endif
|
||||||
|
|
||||||
|
# CC: RGB->YCC SAMP: fullsize/h2v1 FDCT: ifast ENT: 2-pass huff
|
||||||
|
./cjpeg -sample 2x1 -dct fast -opt -outfile testout_422_ifast_opt.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
md5/md5cmp $(MD5_JPEG_422_IFAST_OPT) testout_422_ifast_opt.jpg
|
||||||
|
# CC: YCC->RGB SAMP: fullsize/h2v1 fancy IDCT: ifast ENT: huff
|
||||||
|
./djpeg -dct fast -outfile testout_422_ifast.ppm testout_422_ifast_opt.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_422_IFAST) testout_422_ifast.ppm
|
||||||
|
rm testout_422_ifast.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v1 merged IDCT: ifast ENT: huff
|
||||||
|
./djpeg -dct fast -nosmooth -outfile testout_422m_ifast.ppm testout_422_ifast_opt.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_422M_IFAST) testout_422m_ifast.ppm
|
||||||
|
rm testout_422m_ifast.ppm
|
||||||
|
if WITH_12BIT
|
||||||
|
rm testout_422_ifast_opt.jpg
|
||||||
|
else
|
||||||
|
# CC: YCC->RGB565 SAMP: h2v1 merged IDCT: ifast ENT: huff
|
||||||
|
./djpeg -dct int -nosmooth -rgb565 -dither none -bmp -outfile testout_422m_ifast_565.bmp testout_422_ifast_opt.jpg
|
||||||
|
md5/md5cmp $(MD5_BMP_422M_IFAST_565) testout_422m_ifast_565.bmp
|
||||||
|
rm testout_422m_ifast_565.bmp
|
||||||
|
# CC: YCC->RGB565 (dithered) SAMP: h2v1 merged IDCT: ifast ENT: huff
|
||||||
|
./djpeg -dct int -nosmooth -rgb565 -bmp -outfile testout_422m_ifast_565D.bmp testout_422_ifast_opt.jpg
|
||||||
|
md5/md5cmp $(MD5_BMP_422M_IFAST_565D) testout_422m_ifast_565D.bmp
|
||||||
|
rm testout_422m_ifast_565D.bmp testout_422_ifast_opt.jpg
|
||||||
|
endif
|
||||||
|
|
||||||
|
# CC: RGB->YCC SAMP: fullsize/h2v2 FDCT: ifast ENT: prog huff
|
||||||
|
./cjpeg -sample 2x2 -quality 100 -dct fast -prog -outfile testout_420_q100_ifast_prog.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
md5/md5cmp $(MD5_JPEG_420_IFAST_Q100_PROG) testout_420_q100_ifast_prog.jpg
|
||||||
|
# CC: YCC->RGB SAMP: fullsize/h2v2 fancy IDCT: ifast ENT: prog huff
|
||||||
|
./djpeg -dct fast -outfile testout_420_q100_ifast.ppm testout_420_q100_ifast_prog.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_420_Q100_IFAST) testout_420_q100_ifast.ppm
|
||||||
|
rm testout_420_q100_ifast.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: ifast ENT: prog huff
|
||||||
|
./djpeg -dct fast -nosmooth -outfile testout_420m_q100_ifast.ppm testout_420_q100_ifast_prog.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_Q100_IFAST) testout_420m_q100_ifast.ppm
|
||||||
|
rm testout_420m_q100_ifast.ppm testout_420_q100_ifast_prog.jpg
|
||||||
|
|
||||||
|
# CC: RGB->Gray SAMP: fullsize FDCT: islow ENT: huff
|
||||||
|
./cjpeg -gray -dct int -outfile testout_gray_islow.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
md5/md5cmp $(MD5_JPEG_GRAY_ISLOW) testout_gray_islow.jpg
|
||||||
|
# CC: Gray->Gray SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -outfile testout_gray_islow.ppm testout_gray_islow.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_GRAY_ISLOW) testout_gray_islow.ppm
|
||||||
|
rm testout_gray_islow.ppm
|
||||||
|
# CC: Gray->RGB SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -rgb -outfile testout_gray_islow_rgb.ppm testout_gray_islow.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_GRAY_ISLOW_RGB) testout_gray_islow_rgb.ppm
|
||||||
|
rm testout_gray_islow_rgb.ppm
|
||||||
|
if WITH_12BIT
|
||||||
|
rm testout_gray_islow.jpg
|
||||||
|
else
|
||||||
|
# CC: Gray->RGB565 SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_gray_islow_565.bmp testout_gray_islow.jpg
|
||||||
|
md5/md5cmp $(MD5_BMP_GRAY_ISLOW_565) testout_gray_islow_565.bmp
|
||||||
|
rm testout_gray_islow_565.bmp
|
||||||
|
# CC: Gray->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -rgb565 -bmp -outfile testout_gray_islow_565D.bmp testout_gray_islow.jpg
|
||||||
|
md5/md5cmp $(MD5_BMP_GRAY_ISLOW_565D) testout_gray_islow_565D.bmp
|
||||||
|
rm testout_gray_islow_565D.bmp testout_gray_islow.jpg
|
||||||
|
endif
|
||||||
|
|
||||||
|
# CC: RGB->YCC SAMP: fullsize smooth/h2v2 smooth FDCT: islow
|
||||||
|
# ENT: 2-pass huff
|
||||||
|
./cjpeg -sample 2x2 -smooth 1 -dct int -opt -outfile testout_420s_ifast_opt.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
md5/md5cmp $(MD5_JPEG_420S_IFAST_OPT) testout_420s_ifast_opt.jpg
|
||||||
|
rm testout_420s_ifast_opt.jpg
|
||||||
|
|
||||||
|
# The output of the floating point tests is not validated by default, because
|
||||||
|
# the output differs depending on the type of floating point math used, and
|
||||||
|
# this is only deterministic if the DCT/IDCT are implemented using SIMD
|
||||||
|
# instructions on a particular platform. Pass one of the following on the make
|
||||||
|
# command line to validate the floating point tests against one of the expected # results:
|
||||||
|
#
|
||||||
|
# FLOATTEST=sse validate against the expected results from the libjpeg-turbo
|
||||||
|
# SSE SIMD extensions
|
||||||
|
# FLOATTEST=32bit validate against the expected results from the C code
|
||||||
|
# when running on a 32-bit FPU (or when SSE is being used for
|
||||||
|
# floating point math, which is generally the default with
|
||||||
|
# x86-64 compilers)
|
||||||
|
# FLOATTEST=64bit validate against the exepected results from the C code
|
||||||
|
# when running on a 64-bit FPU
|
||||||
|
|
||||||
|
# CC: RGB->YCC SAMP: fullsize/int FDCT: float ENT: prog huff
|
||||||
|
./cjpeg -sample 3x2 -dct float -prog -outfile testout_3x2_float_prog.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
if [ "${FLOATTEST}" = "sse" ]; then \
|
||||||
|
md5/md5cmp $(MD5_JPEG_3x2_FLOAT_PROG_SSE) testout_3x2_float_prog.jpg; \
|
||||||
|
elif [ "${FLOATTEST}" = "32bit" -o "${FLOATTEST}" = "64bit" ]; then \
|
||||||
|
md5/md5cmp $(MD5_JPEG_3x2_FLOAT_PROG_32BIT) testout_3x2_float_prog.jpg; \
|
||||||
|
fi
|
||||||
|
# CC: YCC->RGB SAMP: fullsize/int IDCT: float ENT: prog huff
|
||||||
|
./djpeg -dct float -outfile testout_3x2_float.ppm testout_3x2_float_prog.jpg
|
||||||
|
if [ "${FLOATTEST}" = "sse" ]; then \
|
||||||
|
md5/md5cmp $(MD5_PPM_3x2_FLOAT_SSE) testout_3x2_float.ppm; \
|
||||||
|
elif [ "${FLOATTEST}" = "32bit" ]; then \
|
||||||
|
md5/md5cmp $(MD5_PPM_3x2_FLOAT_32BIT) testout_3x2_float.ppm; \
|
||||||
|
elif [ "${FLOATTEST}" = "64bit" ]; then \
|
||||||
|
md5/md5cmp $(MD5_PPM_3x2_FLOAT_64BIT) testout_3x2_float.ppm; \
|
||||||
|
fi
|
||||||
|
rm testout_3x2_float.ppm testout_3x2_float_prog.jpg
|
||||||
|
|
||||||
|
# CC: RGB->YCC SAMP: fullsize/int FDCT: ifast ENT: prog huff
|
||||||
|
./cjpeg -sample 3x2 -dct fast -prog -outfile testout_3x2_ifast_prog.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
md5/md5cmp $(MD5_JPEG_3x2_IFAST_PROG) testout_3x2_ifast_prog.jpg
|
||||||
|
# CC: YCC->RGB SAMP: fullsize/int IDCT: ifast ENT: prog huff
|
||||||
|
./djpeg -dct fast -outfile testout_3x2_ifast.ppm testout_3x2_ifast_prog.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_3x2_IFAST) testout_3x2_ifast.ppm
|
||||||
|
rm testout_3x2_ifast.ppm testout_3x2_ifast_prog.jpg
|
||||||
|
|
||||||
|
if WITH_ARITH_ENC
|
||||||
|
# CC: YCC->RGB SAMP: fullsize/h2v2 FDCT: islow ENT: arith
|
||||||
|
./cjpeg -dct int -arithmetic -outfile testout_420_islow_ari.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
md5/md5cmp $(MD5_JPEG_420_ISLOW_ARI) testout_420_islow_ari.jpg
|
||||||
|
rm testout_420_islow_ari.jpg
|
||||||
|
./jpegtran -arithmetic -outfile testout_420_islow_ari.jpg $(srcdir)/testimages/testimgint.jpg
|
||||||
|
md5/md5cmp $(MD5_JPEG_420_ISLOW_ARI) testout_420_islow_ari.jpg
|
||||||
|
rm testout_420_islow_ari.jpg
|
||||||
|
# CC: YCC->RGB SAMP: fullsize FDCT: islow ENT: prog arith
|
||||||
|
./cjpeg -sample 1x1 -dct int -progressive -arithmetic -outfile testout_444_islow_progari.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
md5/md5cmp $(MD5_JPEG_444_ISLOW_PROGARI) testout_444_islow_progari.jpg
|
||||||
|
rm testout_444_islow_progari.jpg
|
||||||
|
endif
|
||||||
|
if WITH_ARITH_DEC
|
||||||
|
# CC: RGB->YCC SAMP: h2v2 merged IDCT: ifast ENT: arith
|
||||||
|
./djpeg -fast -ppm -outfile testout_420m_ifast_ari.ppm $(srcdir)/testimages/testimgari.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_IFAST_ARI) testout_420m_ifast_ari.ppm
|
||||||
|
rm testout_420m_ifast_ari.ppm
|
||||||
|
./jpegtran -outfile testout_420_islow.jpg $(srcdir)/testimages/testimgari.jpg
|
||||||
|
md5/md5cmp $(MD5_JPEG_420_ISLOW) testout_420_islow.jpg
|
||||||
|
rm testout_420_islow.jpg
|
||||||
|
endif
|
||||||
|
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 16x16 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 2/1 -nosmooth -ppm -outfile testout_420m_islow_2_1.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_2_1) testout_420m_islow_2_1.ppm
|
||||||
|
rm testout_420m_islow_2_1.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 15x15 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 15/8 -nosmooth -ppm -outfile testout_420m_islow_15_8.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_15_8) testout_420m_islow_15_8.ppm
|
||||||
|
rm testout_420m_islow_15_8.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 13x13 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 13/8 -nosmooth -ppm -outfile testout_420m_islow_13_8.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_13_8) testout_420m_islow_13_8.ppm
|
||||||
|
rm testout_420m_islow_13_8.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 11x11 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 11/8 -nosmooth -ppm -outfile testout_420m_islow_11_8.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_11_8) testout_420m_islow_11_8.ppm
|
||||||
|
rm testout_420m_islow_11_8.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 9x9 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 9/8 -nosmooth -ppm -outfile testout_420m_islow_9_8.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_9_8) testout_420m_islow_9_8.ppm
|
||||||
|
rm testout_420m_islow_9_8.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 7x7 islow/14x14 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 7/8 -nosmooth -ppm -outfile testout_420m_islow_7_8.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_7_8) testout_420m_islow_7_8.ppm
|
||||||
|
rm testout_420m_islow_7_8.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 6x6 islow/12x12 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 3/4 -nosmooth -ppm -outfile testout_420m_islow_3_4.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_3_4) testout_420m_islow_3_4.ppm
|
||||||
|
rm testout_420m_islow_3_4.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 5x5 islow/10x10 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 5/8 -nosmooth -ppm -outfile testout_420m_islow_5_8.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_5_8) testout_420m_islow_5_8.ppm
|
||||||
|
rm testout_420m_islow_5_8.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 4x4 islow/8x8 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 1/2 -nosmooth -ppm -outfile testout_420m_islow_1_2.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_1_2) testout_420m_islow_1_2.ppm
|
||||||
|
rm testout_420m_islow_1_2.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 3x3 islow/6x6 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 3/8 -nosmooth -ppm -outfile testout_420m_islow_3_8.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_3_8) testout_420m_islow_3_8.ppm
|
||||||
|
rm testout_420m_islow_3_8.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 2x2 islow/4x4 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 1/4 -nosmooth -ppm -outfile testout_420m_islow_1_4.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_1_4) testout_420m_islow_1_4.ppm
|
||||||
|
rm testout_420m_islow_1_4.ppm
|
||||||
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 1x1 islow/2x2 islow ENT: huff
|
||||||
|
./djpeg -dct int -scale 1/8 -nosmooth -ppm -outfile testout_420m_islow_1_8.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_1_8) testout_420m_islow_1_8.ppm
|
||||||
|
rm testout_420m_islow_1_8.ppm
|
||||||
|
if WITH_12BIT
|
||||||
|
else
|
||||||
|
# CC: YCC->RGB (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -colors 256 -bmp -outfile testout_420_islow_256.bmp $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_BMP_420_ISLOW_256) testout_420_islow_256.bmp
|
||||||
|
rm testout_420_islow_256.bmp
|
||||||
|
# CC: YCC->RGB565 SAMP: h2v2 fancy IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_420_islow_565.bmp $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_BMP_420_ISLOW_565) testout_420_islow_565.bmp
|
||||||
|
rm testout_420_islow_565.bmp
|
||||||
|
# CC: YCC->RGB565 (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -rgb565 -bmp -outfile testout_420_islow_565D.bmp $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_BMP_420_ISLOW_565D) testout_420_islow_565D.bmp
|
||||||
|
rm testout_420_islow_565D.bmp
|
||||||
|
# CC: YCC->RGB565 SAMP: h2v2 merged IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -nosmooth -rgb565 -dither none -bmp -outfile testout_420m_islow_565.bmp $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_BMP_420M_ISLOW_565) testout_420m_islow_565.bmp
|
||||||
|
rm testout_420m_islow_565.bmp
|
||||||
|
# CC: YCC->RGB565 (dithered) SAMP: h2v2 merged IDCT: islow ENT: huff
|
||||||
|
./djpeg -dct int -nosmooth -rgb565 -bmp -outfile testout_420m_islow_565D.bmp $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_BMP_420M_ISLOW_565D) testout_420m_islow_565D.bmp
|
||||||
|
rm testout_420m_islow_565D.bmp
|
||||||
|
endif
|
||||||
|
|
||||||
|
./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testout_crop.jpg $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_JPEG_CROP) testout_crop.jpg
|
||||||
|
rm testout_crop.jpg
|
||||||
|
echo GREAT SUCCESS!
|
||||||
|
|
||||||
|
|
||||||
|
testclean:
|
||||||
|
rm -f testout*
|
||||||
|
rm -f *_GRAY_*.bmp
|
||||||
|
rm -f *_GRAY_*.png
|
||||||
|
rm -f *_GRAY_*.ppm
|
||||||
|
rm -f *_GRAY_*.jpg
|
||||||
|
rm -f *_GRAY.yuv
|
||||||
|
rm -f *_420_*.bmp
|
||||||
|
rm -f *_420_*.png
|
||||||
|
rm -f *_420_*.ppm
|
||||||
|
rm -f *_420_*.jpg
|
||||||
|
rm -f *_420.yuv
|
||||||
|
rm -f *_422_*.bmp
|
||||||
|
rm -f *_422_*.png
|
||||||
|
rm -f *_422_*.ppm
|
||||||
|
rm -f *_422_*.jpg
|
||||||
|
rm -f *_422.yuv
|
||||||
|
rm -f *_444_*.bmp
|
||||||
|
rm -f *_444_*.png
|
||||||
|
rm -f *_444_*.ppm
|
||||||
|
rm -f *_444_*.jpg
|
||||||
|
rm -f *_444.yuv
|
||||||
|
rm -f *_440_*.bmp
|
||||||
|
rm -f *_440_*.png
|
||||||
|
rm -f *_440_*.ppm
|
||||||
|
rm -f *_440_*.jpg
|
||||||
|
rm -f *_440.yuv
|
||||||
|
rm -f *_411_*.bmp
|
||||||
|
rm -f *_411_*.png
|
||||||
|
rm -f *_411_*.ppm
|
||||||
|
rm -f *_411_*.jpg
|
||||||
|
rm -f *_411.yuv
|
||||||
|
|
||||||
|
|
||||||
|
tjtest:
|
||||||
|
sh ./tjbenchtest
|
||||||
|
sh ./tjbenchtest -alloc
|
||||||
|
sh ./tjbenchtest -yuv
|
||||||
|
sh ./tjbenchtest -yuv -alloc
|
||||||
|
if WITH_JAVA
|
||||||
|
sh ./tjbenchtest.java
|
||||||
|
sh ./tjbenchtest.java -yuv
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
pkgscripts/libjpeg-turbo.spec: pkgscripts/libjpeg-turbo.spec.tmpl
|
||||||
|
cat pkgscripts/libjpeg-turbo.spec.tmpl | sed s@%{__prefix}@$(prefix)@g | \
|
||||||
|
sed s@%{__bindir}@$(bindir)@g | sed s@%{__datadir}@$(datadir)@g | \
|
||||||
|
sed s@%{__docdir}@$(docdir)@g | sed s@%{__includedir}@$(includedir)@g | \
|
||||||
|
sed s@%{__libdir}@$(libdir)@g | sed s@%{__mandir}@$(mandir)@g \
|
||||||
|
> pkgscripts/libjpeg-turbo.spec
|
||||||
|
|
||||||
|
rpm: all pkgscripts/libjpeg-turbo.spec
|
||||||
|
TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
|
||||||
|
mkdir -p $$TMPDIR/RPMS; \
|
||||||
|
ln -fs `pwd` $$TMPDIR/BUILD; \
|
||||||
|
rm -f ${PKGNAME}-${VERSION}.${RPMARCH}.rpm; \
|
||||||
|
rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \
|
||||||
|
--define "_topdir $$TMPDIR" \
|
||||||
|
--target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \
|
||||||
|
cp $$TMPDIR/RPMS/${RPMARCH}/${PKGNAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \
|
||||||
|
${PKGNAME}-${VERSION}.${RPMARCH}.rpm; \
|
||||||
|
rm -rf $$TMPDIR
|
||||||
|
|
||||||
|
srpm: dist-gzip pkgscripts/libjpeg-turbo.spec
|
||||||
|
TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
|
||||||
|
mkdir -p $$TMPDIR/RPMS; \
|
||||||
|
mkdir -p $$TMPDIR/SRPMS; \
|
||||||
|
mkdir -p $$TMPDIR/BUILD; \
|
||||||
|
mkdir -p $$TMPDIR/SOURCES; \
|
||||||
|
mkdir -p $$TMPDIR/SPECS; \
|
||||||
|
rm -f ${PKGNAME}-${VERSION}.src.rpm; \
|
||||||
|
cp ${PACKAGE_NAME}-${VERSION}.tar.gz $$TMPDIR/SOURCES; \
|
||||||
|
cat pkgscripts/libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
|
||||||
|
| sed s/#--\>//g \
|
||||||
|
> $$TMPDIR/SPECS/libjpeg-turbo.spec; \
|
||||||
|
rpmbuild -bs --define "_topdir $$TMPDIR" $$TMPDIR/SPECS/libjpeg-turbo.spec; \
|
||||||
|
cp $$TMPDIR/SRPMS/${PKGNAME}-${VERSION}-${BUILD}.src.rpm \
|
||||||
|
${PKGNAME}-${VERSION}.src.rpm; \
|
||||||
|
rm -rf $$TMPDIR
|
||||||
|
|
||||||
|
pkgscripts/makedpkg: pkgscripts/makedpkg.tmpl
|
||||||
|
cat pkgscripts/makedpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
|
||||||
|
sed s@%{__docdir}@$(docdir)@g | sed s@%{__libdir}@$(libdir)@g \
|
||||||
|
> pkgscripts/makedpkg
|
||||||
|
|
||||||
|
deb: all pkgscripts/makedpkg
|
||||||
|
sh pkgscripts/makedpkg
|
||||||
|
|
||||||
|
pkgscripts/uninstall: pkgscripts/uninstall.tmpl
|
||||||
|
cat pkgscripts/uninstall.tmpl | sed s@%{__prefix}@$(prefix)@g | \
|
||||||
|
sed s@%{__bindir}@$(bindir)@g | sed s@%{__datadir}@$(datadir)@g | \
|
||||||
|
sed s@%{__includedir}@$(includedir)@g | sed s@%{__libdir}@$(libdir)@g | \
|
||||||
|
sed s@%{__mandir}@$(mandir)@g > pkgscripts/uninstall
|
||||||
|
|
||||||
|
pkgscripts/makemacpkg: pkgscripts/makemacpkg.tmpl
|
||||||
|
cat pkgscripts/makemacpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
|
||||||
|
sed s@%{__bindir}@$(bindir)@g | sed s@%{__docdir}@$(docdir)@g | \
|
||||||
|
sed s@%{__libdir}@$(libdir)@g > pkgscripts/makemacpkg
|
||||||
|
|
||||||
|
if X86_64
|
||||||
|
|
||||||
|
udmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
||||||
|
sh pkgscripts/makemacpkg -build32 ${BUILDDIR32}
|
||||||
|
|
||||||
|
iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
||||||
|
sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S} -buildarmv8 ${BUILDDIRARMV8} -lipo "${LIPO}"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
||||||
|
sh pkgscripts/makemacpkg -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S} -buildarmv8 ${BUILDDIRARMV8} -lipo "${LIPO}"
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
dmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
||||||
|
sh pkgscripts/makemacpkg
|
||||||
|
|
||||||
|
pkgscripts/makecygwinpkg: pkgscripts/makecygwinpkg.tmpl
|
||||||
|
cat pkgscripts/makecygwinpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
|
||||||
|
sed s@%{__docdir}@$(docdir)@g | sed s@%{__libdir}@$(libdir)@g \
|
||||||
|
> pkgscripts/makecygwinpkg
|
||||||
|
|
||||||
|
cygwinpkg: all pkgscripts/makecygwinpkg
|
||||||
|
sh pkgscripts/makecygwinpkg
|
||||||
337
README
@@ -1,23 +1,24 @@
|
|||||||
|
libjpeg-turbo note: This file has been modified by The libjpeg-turbo Project
|
||||||
|
to include only information relevant to libjpeg-turbo, to wordsmith certain
|
||||||
|
sections, and to remove impolitic language that existed in the libjpeg v8
|
||||||
|
README. It is included only for reference. Please see README-turbo.txt for
|
||||||
|
information specific to libjpeg-turbo.
|
||||||
|
|
||||||
|
|
||||||
The Independent JPEG Group's JPEG software
|
The Independent JPEG Group's JPEG software
|
||||||
==========================================
|
==========================================
|
||||||
|
|
||||||
README for release 5b of 15-Mar-95
|
This distribution contains a release of the Independent JPEG Group's free JPEG
|
||||||
==================================
|
software. You are welcome to redistribute this software and to use it for any
|
||||||
|
purpose, subject to the conditions under LEGAL ISSUES, below.
|
||||||
|
|
||||||
This distribution contains the fifth public release of the Independent JPEG
|
This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone,
|
||||||
Group's free JPEG software. You are welcome to redistribute this software and
|
Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson,
|
||||||
to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
|
Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge' Weijers,
|
||||||
|
and other members of the Independent JPEG Group.
|
||||||
|
|
||||||
Serious users of this software (particularly those incorporating it into
|
IJG is not affiliated with the ISO/IEC JTC1/SC29/WG1 standards committee
|
||||||
larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
|
(also known as JPEG, together with ITU-T SG16).
|
||||||
our electronic mailing list. Mailing list members are notified of updates
|
|
||||||
and have a chance to participate in technical discussions, etc.
|
|
||||||
|
|
||||||
This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim
|
|
||||||
Boucher, Lee Crocker, George Phillips, Davide Rossi, Ge' Weijers, and other
|
|
||||||
members of the Independent JPEG Group.
|
|
||||||
|
|
||||||
IJG is not associated with the official ISO JPEG standards committee.
|
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION ROADMAP
|
DOCUMENTATION ROADMAP
|
||||||
@@ -29,27 +30,26 @@ OVERVIEW General description of JPEG and the IJG software.
|
|||||||
LEGAL ISSUES Copyright, lack of warranty, terms of distribution.
|
LEGAL ISSUES Copyright, lack of warranty, terms of distribution.
|
||||||
REFERENCES Where to learn more about JPEG.
|
REFERENCES Where to learn more about JPEG.
|
||||||
ARCHIVE LOCATIONS Where to find newer versions of this software.
|
ARCHIVE LOCATIONS Where to find newer versions of this software.
|
||||||
RELATED SOFTWARE Other stuff you should get.
|
|
||||||
FILE FORMAT WARS Software *not* to get.
|
FILE FORMAT WARS Software *not* to get.
|
||||||
TO DO Plans for future IJG releases.
|
TO DO Plans for future IJG releases.
|
||||||
|
|
||||||
Other documentation files in the distribution are:
|
Other documentation files in the distribution are:
|
||||||
|
|
||||||
User documentation:
|
User documentation:
|
||||||
install.doc How to configure and install the IJG software.
|
usage.txt Usage instructions for cjpeg, djpeg, jpegtran,
|
||||||
usage.doc Usage instructions for cjpeg, djpeg, rdjpgcom, wrjpgcom.
|
rdjpgcom, and wrjpgcom.
|
||||||
*.1 Unix-style man pages for programs (same info as usage.doc).
|
*.1 Unix-style man pages for programs (same info as usage.txt).
|
||||||
|
wizard.txt Advanced usage instructions for JPEG wizards only.
|
||||||
change.log Version-to-version change highlights.
|
change.log Version-to-version change highlights.
|
||||||
Programmer and internal documentation:
|
Programmer and internal documentation:
|
||||||
libjpeg.doc How to use the JPEG library in your own programs.
|
libjpeg.txt How to use the JPEG library in your own programs.
|
||||||
example.c Sample code for calling the JPEG library.
|
example.c Sample code for calling the JPEG library.
|
||||||
structure.doc Overview of the JPEG library's internal structure.
|
structure.txt Overview of the JPEG library's internal structure.
|
||||||
filelist.doc Road map of IJG files.
|
coderules.txt Coding style rules --- please read if you contribute code.
|
||||||
coderules.doc Coding style rules --- please read if you contribute code.
|
|
||||||
|
|
||||||
Please read at least the files install.doc and usage.doc. Useful information
|
Please read at least usage.txt. Some information can also be found in the JPEG
|
||||||
can also be found in the JPEG FAQ (Frequently Asked Questions) article. See
|
FAQ (Frequently Asked Questions) article. See ARCHIVE LOCATIONS below to find
|
||||||
ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
|
out where to obtain the FAQ article.
|
||||||
|
|
||||||
If you want to understand how the JPEG code works, we suggest reading one or
|
If you want to understand how the JPEG code works, we suggest reading one or
|
||||||
more of the REFERENCES, then looking at the documentation files (in roughly
|
more of the REFERENCES, then looking at the documentation files (in roughly
|
||||||
@@ -59,46 +59,50 @@ the order listed) before diving into the code.
|
|||||||
OVERVIEW
|
OVERVIEW
|
||||||
========
|
========
|
||||||
|
|
||||||
This package contains C software to implement JPEG image compression and
|
This package contains C software to implement JPEG image encoding, decoding,
|
||||||
decompression. JPEG (pronounced "jay-peg") is a standardized compression
|
and transcoding. JPEG (pronounced "jay-peg") is a standardized compression
|
||||||
method for full-color and gray-scale images. JPEG is intended for compressing
|
method for full-color and grayscale images. JPEG's strong suit is compressing
|
||||||
"real-world" scenes; cartoons and other non-realistic images are not its
|
photographic images or other types of images that have smooth color and
|
||||||
strong suit. JPEG is lossy, meaning that the output image is not necessarily
|
brightness transitions between neighboring pixels. Images with sharp lines or
|
||||||
identical to the input image. Hence you must not use JPEG if you have to have
|
other abrupt features may not compress well with JPEG, and a higher JPEG
|
||||||
identical output bits. However, on typical images of real-world scenes, very
|
quality may have to be used to avoid visible compression artifacts with such
|
||||||
good compression levels can be obtained with no visible change, and amazingly
|
images.
|
||||||
high compression levels are possible if you can tolerate a low-quality image.
|
|
||||||
For more details, see the references, or just experiment with various
|
JPEG is lossy, meaning that the output pixels are not necessarily identical to
|
||||||
compression settings.
|
the input pixels. However, on photographic content and other "smooth" images,
|
||||||
|
very good compression ratios can be obtained with no visible compression
|
||||||
|
artifacts, and extremely high compression ratios are possible if you are
|
||||||
|
willing to sacrifice image quality (by reducing the "quality" setting in the
|
||||||
|
compressor.)
|
||||||
|
|
||||||
|
This software implements JPEG baseline, extended-sequential, and progressive
|
||||||
|
compression processes. Provision is made for supporting all variants of these
|
||||||
|
processes, although some uncommon parameter settings aren't implemented yet.
|
||||||
|
We have made no provision for supporting the hierarchical or lossless
|
||||||
|
processes defined in the standard.
|
||||||
|
|
||||||
We provide a set of library routines for reading and writing JPEG image files,
|
We provide a set of library routines for reading and writing JPEG image files,
|
||||||
plus two simple applications "cjpeg" and "djpeg", which use the library to
|
plus two sample applications "cjpeg" and "djpeg", which use the library to
|
||||||
perform conversion between JPEG and some other popular image file formats.
|
perform conversion between JPEG and some other popular image file formats.
|
||||||
The library is intended to be reused in other applications.
|
The library is intended to be reused in other applications.
|
||||||
|
|
||||||
This software implements JPEG baseline and extended-sequential compression
|
|
||||||
processes. Provision is made for supporting all variants of these processes,
|
|
||||||
although some uncommon parameter settings aren't implemented yet. For legal
|
|
||||||
reasons, we are not distributing code for the arithmetic-coding process; see
|
|
||||||
LEGAL ISSUES. At present we have made no provision for supporting the
|
|
||||||
progressive, hierarchical, or lossless processes defined in the standard.
|
|
||||||
(Support for progressive mode will be offered in a future release.)
|
|
||||||
|
|
||||||
In order to support file conversion and viewing software, we have included
|
In order to support file conversion and viewing software, we have included
|
||||||
considerable functionality beyond the bare JPEG coding/decoding capability;
|
considerable functionality beyond the bare JPEG coding/decoding capability;
|
||||||
for example, the color quantization modules are not strictly part of JPEG
|
for example, the color quantization modules are not strictly part of JPEG
|
||||||
decoding, but they are essential for output to colormapped file formats or
|
decoding, but they are essential for output to colormapped file formats or
|
||||||
colormapped displays. These extra functions can be compiled out of the
|
colormapped displays. These extra functions can be compiled out of the
|
||||||
library if not required for a particular application. We have also included
|
library if not required for a particular application.
|
||||||
two simple applications for inserting and extracting textual comments in
|
|
||||||
JFIF files.
|
We have also included "jpegtran", a utility for lossless transcoding between
|
||||||
|
different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple
|
||||||
|
applications for inserting and extracting textual comments in JFIF files.
|
||||||
|
|
||||||
The emphasis in designing this software has been on achieving portability and
|
The emphasis in designing this software has been on achieving portability and
|
||||||
flexibility, while also making it fast enough to be useful. In particular,
|
flexibility, while also making it fast enough to be useful. In particular,
|
||||||
the software is not intended to be read as a tutorial on JPEG. (See the
|
the software is not intended to be read as a tutorial on JPEG. (See the
|
||||||
REFERENCES section for introductory material.) While we hope that the entire
|
REFERENCES section for introductory material.) Rather, it is intended to
|
||||||
package will someday be industrial-strength code, much remains to be done in
|
be reliable, portable, industrial-strength code. We do not claim to have
|
||||||
performance tuning and in improving the capabilities of individual modules.
|
achieved that goal in every aspect of the software, but we strive for it.
|
||||||
|
|
||||||
We welcome the use of this software as a component of commercial products.
|
We welcome the use of this software as a component of commercial products.
|
||||||
No royalty is required, but we do ask for an acknowledgement in product
|
No royalty is required, but we do ask for an acknowledgement in product
|
||||||
@@ -124,7 +128,7 @@ with respect to this software, its quality, accuracy, merchantability, or
|
|||||||
fitness for a particular purpose. This software is provided "AS IS", and you,
|
fitness for a particular purpose. This software is provided "AS IS", and you,
|
||||||
its user, assume the entire risk as to its quality and accuracy.
|
its user, assume the entire risk as to its quality and accuracy.
|
||||||
|
|
||||||
This software is copyright (C) 1991, 1992, 1993, 1994, 1995, Thomas G. Lane.
|
This software is copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding.
|
||||||
All Rights Reserved except as specified below.
|
All Rights Reserved except as specified below.
|
||||||
|
|
||||||
Permission is hereby granted to use, copy, modify, and distribute this
|
Permission is hereby granted to use, copy, modify, and distribute this
|
||||||
@@ -155,34 +159,18 @@ commercial products, provided that all warranty or liability claims are
|
|||||||
assumed by the product vendor.
|
assumed by the product vendor.
|
||||||
|
|
||||||
|
|
||||||
ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
|
The Unix configuration script "configure" was produced with GNU Autoconf.
|
||||||
sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
|
It is copyright by the Free Software Foundation but is freely distributable.
|
||||||
ansi2knr.c is NOT covered by the above copyright and conditions, but instead
|
The same holds for its supporting scripts (config.guess, config.sub,
|
||||||
by the usual distribution terms of the Free Software Foundation; principally,
|
ltmain.sh). Another support script, install-sh, is copyright by X Consortium
|
||||||
that you must include source code if you redistribute it. (See the file
|
but is also freely distributable.
|
||||||
ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
|
|
||||||
of any program generated from the IJG code, this does not limit you more than
|
|
||||||
the foregoing paragraphs do.
|
|
||||||
|
|
||||||
The configuration script "configure" was produced with GNU Autoconf. It
|
The IJG distribution formerly included code to read and write GIF files.
|
||||||
is copyright by the Free Software Foundation but is freely distributable.
|
To avoid entanglement with the Unisys LZW patent, GIF reading support has
|
||||||
|
been removed altogether, and the GIF writer has been simplified to produce
|
||||||
It appears that the arithmetic coding option of the JPEG spec is covered by
|
"uncompressed GIFs". This technique does not use the LZW algorithm; the
|
||||||
patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
|
resulting GIF files are larger than usual, but are readable by all standard
|
||||||
legally be used without obtaining one or more licenses. For this reason,
|
GIF decoders.
|
||||||
support for arithmetic coding has been removed from the free JPEG software.
|
|
||||||
(Since arithmetic coding provides only a marginal gain over the unpatented
|
|
||||||
Huffman mode, it is unlikely that very many implementations will support it.)
|
|
||||||
So far as we are aware, there are no patent restrictions on the remaining
|
|
||||||
code.
|
|
||||||
|
|
||||||
WARNING: Unisys has begun to enforce their patent on LZW compression against
|
|
||||||
GIF encoders and decoders. You will need a license from Unisys to use the
|
|
||||||
included rdgif.c or wrgif.c files in a commercial or shareware application.
|
|
||||||
At this time, Unisys is not enforcing their patent against freeware, so
|
|
||||||
distribution of this package remains legal. However, we intend to remove
|
|
||||||
GIF support from the IJG package as soon as a suitable replacement format
|
|
||||||
becomes reasonably popular.
|
|
||||||
|
|
||||||
We are required to state that
|
We are required to state that
|
||||||
"The Graphics Interchange Format(c) is the Copyright property of
|
"The Graphics Interchange Format(c) is the Copyright property of
|
||||||
@@ -193,7 +181,7 @@ We are required to state that
|
|||||||
REFERENCES
|
REFERENCES
|
||||||
==========
|
==========
|
||||||
|
|
||||||
We highly recommend reading one or more of these references before trying to
|
We recommend reading one or more of these references before trying to
|
||||||
understand the innards of the JPEG software.
|
understand the innards of the JPEG software.
|
||||||
|
|
||||||
The best short technical introduction to the JPEG compression algorithm is
|
The best short technical introduction to the JPEG compression algorithm is
|
||||||
@@ -201,158 +189,93 @@ The best short technical introduction to the JPEG compression algorithm is
|
|||||||
Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
|
Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
|
||||||
(Adjacent articles in that issue discuss MPEG motion picture compression,
|
(Adjacent articles in that issue discuss MPEG motion picture compression,
|
||||||
applications of JPEG, and related topics.) If you don't have the CACM issue
|
applications of JPEG, and related topics.) If you don't have the CACM issue
|
||||||
handy, a PostScript file containing a revised version of Wallace's article
|
handy, a PostScript file containing a revised version of Wallace's article is
|
||||||
is available at ftp.uu.net, graphics/jpeg/wallace.ps.gz. The file (actually
|
available at http://www.ijg.org/files/wallace.ps.gz. The file (actually
|
||||||
a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
|
a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
|
||||||
omits the sample images that appeared in CACM, but it includes corrections
|
omits the sample images that appeared in CACM, but it includes corrections
|
||||||
and some added material. Note: the Wallace article is copyright ACM and
|
and some added material. Note: the Wallace article is copyright ACM and IEEE,
|
||||||
IEEE, and it may not be used for commercial purposes.
|
and it may not be used for commercial purposes.
|
||||||
|
|
||||||
A somewhat less technical, more leisurely introduction to JPEG can be found in
|
A somewhat less technical, more leisurely introduction to JPEG can be found in
|
||||||
"The Data Compression Book" by Mark Nelson, published by M&T Books (Redwood
|
"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
|
||||||
City, CA), 1991, ISBN 1-55851-216-0. This book provides good explanations and
|
M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides
|
||||||
example C code for a multitude of compression methods including JPEG. It is
|
good explanations and example C code for a multitude of compression methods
|
||||||
an excellent source if you are comfortable reading C code but don't know much
|
including JPEG. It is an excellent source if you are comfortable reading C
|
||||||
about data compression in general. The book's JPEG sample code is far from
|
code but don't know much about data compression in general. The book's JPEG
|
||||||
industrial-strength, but when you are ready to look at a full implementation,
|
sample code is far from industrial-strength, but when you are ready to look
|
||||||
you've got one here...
|
at a full implementation, you've got one here...
|
||||||
|
|
||||||
The best full description of JPEG is the textbook "JPEG Still Image Data
|
The best currently available description of JPEG is the textbook "JPEG Still
|
||||||
Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
|
Image Data Compression Standard" by William B. Pennebaker and Joan L.
|
||||||
by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp.
|
Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.
|
||||||
The book includes the complete text of the ISO JPEG standards (DIS 10918-1
|
Price US$59.95, 638 pp. The book includes the complete text of the ISO JPEG
|
||||||
and draft DIS 10918-2). This is by far the most complete exposition of JPEG
|
standards (DIS 10918-1 and draft DIS 10918-2).
|
||||||
in existence, and we highly recommend it.
|
|
||||||
|
|
||||||
The JPEG standard itself is not available electronically; you must order a
|
The original JPEG standard is divided into two parts, Part 1 being the actual
|
||||||
paper copy through ISO. (Unless you feel a need to own a certified official
|
specification, while Part 2 covers compliance testing methods. Part 1 is
|
||||||
copy, we recommend buying the Pennebaker and Mitchell book instead; it's much
|
titled "Digital Compression and Coding of Continuous-tone Still Images,
|
||||||
cheaper and includes a great deal of useful explanatory material.) In the US,
|
Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
|
||||||
copies of the standard may be ordered from ANSI Sales at (212) 642-4900, or
|
10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
|
||||||
from Global Engineering Documents at (800) 854-7179. (ANSI doesn't take
|
Continuous-tone Still Images, Part 2: Compliance testing" and has document
|
||||||
credit card orders, but Global does.) It's not cheap: as of 1992, ANSI was
|
numbers ISO/IEC IS 10918-2, ITU-T T.83.
|
||||||
charging $95 for Part 1 and $47 for Part 2, plus 7% shipping/handling. The
|
|
||||||
standard is divided into two parts, Part 1 being the actual specification,
|
|
||||||
while Part 2 covers compliance testing methods. Part 1 is titled "Digital
|
|
||||||
Compression and Coding of Continuous-tone Still Images, Part 1: Requirements
|
|
||||||
and guidelines" and has document number ISO/IEC IS 10918-1. As of mid-1994,
|
|
||||||
Part 2 is still at Draft International Standard status. It is titled "Digital
|
|
||||||
Compression and Coding of Continuous-tone Still Images, Part 2: Compliance
|
|
||||||
testing" and has document number ISO/IEC DIS 10918-2. (The document number
|
|
||||||
will change to IS 10918-2 when final approval is obtained.) A Part 3,
|
|
||||||
covering extensions, is likely to appear in draft form in late 1994.
|
|
||||||
|
|
||||||
The JPEG standard does not specify all details of an interchangeable file
|
The JPEG standard does not specify all details of an interchangeable file
|
||||||
format. For the omitted details we follow the "JFIF" conventions, revision
|
format. For the omitted details we follow the "JFIF" conventions, revision
|
||||||
1.02. A copy of the JFIF spec is available from:
|
1.02. JFIF 1.02 has been adopted as an Ecma International Technical Report
|
||||||
Literature Department
|
and thus received a formal publication status. It is available as a free
|
||||||
C-Cube Microsystems, Inc.
|
download in PDF format from
|
||||||
1778 McCarthy Blvd.
|
http://www.ecma-international.org/publications/techreports/E-TR-098.htm.
|
||||||
Milpitas, CA 95035
|
A PostScript version of the JFIF document is available at
|
||||||
phone (408) 944-6300, fax (408) 944-6314
|
http://www.ijg.org/files/jfif.ps.gz. There is also a plain text version at
|
||||||
A PostScript version of this document is available at ftp.uu.net, file
|
http://www.ijg.org/files/jfif.txt.gz, but it is missing the figures.
|
||||||
graphics/jpeg/jfif.ps.gz. It can also be obtained by e-mail from the C-Cube
|
|
||||||
mail server, netlib@c3.pla.ca.us. Send the message "send jfif_ps from jpeg"
|
|
||||||
to the server to obtain the JFIF document; send the message "help" if you have
|
|
||||||
trouble.
|
|
||||||
|
|
||||||
The TIFF 6.0 file format specification can be obtained by FTP from sgi.com
|
The TIFF 6.0 file format specification can be obtained by FTP from
|
||||||
(192.48.153.1), file graphics/tiff/TIFF6.ps.Z; or you can order a printed copy
|
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
|
||||||
from Aldus Corp. at (206) 628-6593. It should be noted that the TIFF 6.0 spec
|
found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
|
||||||
of 3-June-92 has a number of serious problems in its JPEG features. A
|
IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
|
||||||
redesign effort is currently underway to correct these problems; it is
|
Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
|
||||||
expected to result in a new, incompatible, spec. IJG intends to support the
|
(Compression tag 7). Copies of this Note can be obtained from
|
||||||
corrected version of TIFF when the new spec is issued.
|
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
|
||||||
|
uses our library to implement TIFF/JPEG per the Note.
|
||||||
|
|
||||||
|
|
||||||
ARCHIVE LOCATIONS
|
ARCHIVE LOCATIONS
|
||||||
=================
|
=================
|
||||||
|
|
||||||
The "official" archive site for this software is ftp.uu.net (Internet
|
The "official" archive site for this software is www.ijg.org.
|
||||||
address 192.48.96.9). The most recent released version can always be found
|
The most recent released version can always be found there in
|
||||||
there in directory graphics/jpeg. This particular version will be archived
|
directory "files". This particular version will be archived as
|
||||||
as graphics/jpeg/jpegsrc.v5b.tar.gz. If you are on the Internet, you
|
http://www.ijg.org/files/jpegsrc.v8d.tar.gz, and in Windows-compatible
|
||||||
can retrieve files from ftp.uu.net by standard anonymous FTP. If you don't
|
"zip" archive format as http://www.ijg.org/files/jpegsr8d.zip.
|
||||||
have FTP access, UUNET's archives are also available via UUCP; contact
|
|
||||||
help@uunet.uu.net for information on retrieving files that way.
|
|
||||||
|
|
||||||
Numerous Internet sites maintain copies of the UUNET files; in particular,
|
The JPEG FAQ (Frequently Asked Questions) article is a source of some
|
||||||
you can probably find a copy at any site that archives comp.sources.misc
|
general information about JPEG.
|
||||||
submissions. However, only ftp.uu.net is guaranteed to have the latest
|
It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
|
||||||
official version.
|
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/.
|
||||||
You can also obtain this software from CompuServe, in the GRAPHSUPPORT forum
|
If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu
|
||||||
(GO GRAPHSUP), library 12 "JPEG Tools". Again, CompuServe is not guaranteed
|
|
||||||
to have the very latest version.
|
|
||||||
|
|
||||||
The JPEG FAQ (Frequently Asked Questions) article is a useful source of
|
|
||||||
general information about JPEG. It is updated constantly and therefore is
|
|
||||||
not included in this distribution. The FAQ is posted every two weeks to
|
|
||||||
Usenet newsgroups comp.graphics, news.answers, and other groups. You can
|
|
||||||
always obtain the latest version from the news.answers archive at
|
|
||||||
rtfm.mit.edu. By FTP, fetch /pub/usenet/news.answers/jpeg-faq/part1 and
|
|
||||||
.../part2. If you don't have FTP, send e-mail to mail-server@rtfm.mit.edu
|
|
||||||
with body
|
with body
|
||||||
send usenet/news.answers/jpeg-faq/part1
|
send usenet/news.answers/jpeg-faq/part1
|
||||||
send usenet/news.answers/jpeg-faq/part2
|
send usenet/news.answers/jpeg-faq/part2
|
||||||
|
|
||||||
|
|
||||||
RELATED SOFTWARE
|
|
||||||
================
|
|
||||||
|
|
||||||
Numerous viewing and image manipulation programs now support JPEG. (Quite a
|
|
||||||
few of them use this library to do so.) The JPEG FAQ described above lists
|
|
||||||
some of the more popular free and shareware viewers, and tells where to
|
|
||||||
obtain them on Internet.
|
|
||||||
|
|
||||||
If you are on a Unix machine, we highly recommend Jef Poskanzer's free
|
|
||||||
PBMPLUS image software, which provides many useful operations on PPM-format
|
|
||||||
image files. In particular, it can convert PPM images to and from a wide
|
|
||||||
range of other formats. You can obtain this package by FTP from ftp.x.org
|
|
||||||
(contrib/pbmplus*.tar.Z) or ftp.ee.lbl.gov (pbmplus*.tar.Z). There is also
|
|
||||||
a newer update of this package called NETPBM, available from
|
|
||||||
wuarchive.wustl.edu under directory /graphics/graphics/packages/NetPBM/.
|
|
||||||
Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software
|
|
||||||
is; you are likely to have difficulty making it work on any non-Unix machine.
|
|
||||||
|
|
||||||
A different free JPEG implementation, written by the PVRG group at Stanford,
|
|
||||||
is available from havefun.stanford.edu in directory pub/jpeg. This program
|
|
||||||
is designed for research and experimentation rather than production use;
|
|
||||||
it is slower, harder to use, and less portable than the IJG code, but it
|
|
||||||
implements a larger subset of the JPEG standard. In particular, it supports
|
|
||||||
lossless JPEG.
|
|
||||||
|
|
||||||
|
|
||||||
FILE FORMAT WARS
|
FILE FORMAT WARS
|
||||||
================
|
================
|
||||||
|
|
||||||
Some JPEG programs produce files that are not compatible with our library.
|
The ISO/IEC JTC1/SC29/WG1 standards committee (also known as JPEG, together
|
||||||
The root of the problem is that the ISO JPEG committee failed to specify a
|
with ITU-T SG16) currently promotes different formats containing the name
|
||||||
concrete file format. Some vendors "filled in the blanks" on their own,
|
"JPEG" which are incompatible with original DCT-based JPEG. IJG therefore does
|
||||||
creating proprietary formats that no one else could read. (For example, none
|
not support these formats (see REFERENCES). Indeed, one of the original
|
||||||
of the early commercial JPEG implementations for the Macintosh were able to
|
reasons for developing this free software was to help force convergence on
|
||||||
exchange compressed files.)
|
common, interoperable format standards for JPEG files.
|
||||||
|
Don't use an incompatible file format!
|
||||||
The file format we have adopted is called JFIF (see REFERENCES). This format
|
(In any case, our decoder will remain capable of reading existing JPEG
|
||||||
has been agreed to by a number of major commercial JPEG vendors, and it has
|
image files indefinitely.)
|
||||||
become the de facto standard. JFIF is a minimal or "low end" representation.
|
|
||||||
Work is also going forward to incorporate JPEG compression into the TIFF
|
|
||||||
standard, for use in "high end" applications that need to record a lot of
|
|
||||||
additional data about an image. We intend to support TIFF in the future.
|
|
||||||
We hope that these two formats will be sufficient and that other,
|
|
||||||
incompatible JPEG file formats will not proliferate.
|
|
||||||
|
|
||||||
Indeed, part of the reason for developing and releasing this free software is
|
|
||||||
to help force rapid convergence to de facto standards for JPEG file formats.
|
|
||||||
SUPPORT STANDARD, NON-PROPRIETARY FORMATS: demand JFIF or TIFF/JPEG!
|
|
||||||
|
|
||||||
|
|
||||||
TO DO
|
TO DO
|
||||||
=====
|
=====
|
||||||
|
|
||||||
In future versions, we are considering supporting progressive JPEG
|
Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org.
|
||||||
compression, the upcoming JPEG Part 3 extensions, and other improvements.
|
|
||||||
|
|
||||||
As always, speeding things up is high on our priority list.
|
|
||||||
|
|
||||||
Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.
|
|
||||||
|
|||||||
364
README-turbo.txt
Executable file
@@ -0,0 +1,364 @@
|
|||||||
|
*******************************************************************************
|
||||||
|
** Background
|
||||||
|
*******************************************************************************
|
||||||
|
|
||||||
|
libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2,
|
||||||
|
NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64,
|
||||||
|
and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as
|
||||||
|
libjpeg, all else being equal. On other types of systems, libjpeg-turbo can
|
||||||
|
still outperform libjpeg by a significant amount, by virtue of its
|
||||||
|
highly-optimized Huffman coding routines. In many cases, the performance of
|
||||||
|
libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.
|
||||||
|
|
||||||
|
libjpeg-turbo implements both the traditional libjpeg API as well as the less
|
||||||
|
powerful but more straightforward TurboJPEG API. libjpeg-turbo also features
|
||||||
|
colorspace extensions that allow it to compress from/decompress to 32-bit and
|
||||||
|
big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java
|
||||||
|
interface.
|
||||||
|
|
||||||
|
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated
|
||||||
|
derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and
|
||||||
|
VirtualGL projects made numerous enhancements to the codec in 2009, and in
|
||||||
|
early 2010, libjpeg-turbo spun off into an independent project, with the goal
|
||||||
|
of making high-speed JPEG compression/decompression technology available to a
|
||||||
|
broader range of users and developers.
|
||||||
|
|
||||||
|
|
||||||
|
*******************************************************************************
|
||||||
|
** License
|
||||||
|
*******************************************************************************
|
||||||
|
|
||||||
|
Most of libjpeg-turbo inherits the non-restrictive, BSD-style license used by
|
||||||
|
libjpeg (see README.) The TurboJPEG wrapper (both C and Java versions) and
|
||||||
|
associated test programs bear a similar license, which is reproduced below:
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
- Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
- Neither the name of the libjpeg-turbo Project nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from this
|
||||||
|
software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS 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 THE COPYRIGHT HOLDERS OR 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 THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
*******************************************************************************
|
||||||
|
** Using libjpeg-turbo
|
||||||
|
*******************************************************************************
|
||||||
|
|
||||||
|
libjpeg-turbo includes two APIs that can be used to compress and decompress
|
||||||
|
JPEG images:
|
||||||
|
|
||||||
|
TurboJPEG API: This API provides an easy-to-use interface for compressing
|
||||||
|
and decompressing JPEG images in memory. It also provides some functionality
|
||||||
|
that would not be straightforward to achieve using the underlying libjpeg
|
||||||
|
API, such as generating planar YUV images and performing multiple
|
||||||
|
simultaneous lossless transforms on an image. The Java interface for
|
||||||
|
libjpeg-turbo is written on top of the TurboJPEG API.
|
||||||
|
|
||||||
|
libjpeg API: This is the de facto industry-standard API for compressing and
|
||||||
|
decompressing JPEG images. It is more difficult to use than the TurboJPEG
|
||||||
|
API but also more powerful. The libjpeg API implementation in libjpeg-turbo
|
||||||
|
is both API/ABI-compatible and mathematically compatible with libjpeg v6b.
|
||||||
|
It can also optionally be configured to be API/ABI-compatible with libjpeg v7
|
||||||
|
and v8 (see below.)
|
||||||
|
|
||||||
|
There is no significant performance advantage to either API when both are used
|
||||||
|
to perform similar operations.
|
||||||
|
|
||||||
|
=====================
|
||||||
|
Colorspace Extensions
|
||||||
|
=====================
|
||||||
|
|
||||||
|
libjpeg-turbo includes extensions that allow JPEG images to be compressed
|
||||||
|
directly from (and decompressed directly to) buffers that use BGR, BGRX,
|
||||||
|
RGBX, XBGR, and XRGB pixel ordering. This is implemented with ten new
|
||||||
|
colorspace constants:
|
||||||
|
|
||||||
|
JCS_EXT_RGB /* red/green/blue */
|
||||||
|
JCS_EXT_RGBX /* red/green/blue/x */
|
||||||
|
JCS_EXT_BGR /* blue/green/red */
|
||||||
|
JCS_EXT_BGRX /* blue/green/red/x */
|
||||||
|
JCS_EXT_XBGR /* x/blue/green/red */
|
||||||
|
JCS_EXT_XRGB /* x/red/green/blue */
|
||||||
|
JCS_EXT_RGBA /* red/green/blue/alpha */
|
||||||
|
JCS_EXT_BGRA /* blue/green/red/alpha */
|
||||||
|
JCS_EXT_ABGR /* alpha/blue/green/red */
|
||||||
|
JCS_EXT_ARGB /* alpha/red/green/blue */
|
||||||
|
|
||||||
|
Setting cinfo.in_color_space (compression) or cinfo.out_color_space
|
||||||
|
(decompression) to one of these values will cause libjpeg-turbo to read the
|
||||||
|
red, green, and blue values from (or write them to) the appropriate position in
|
||||||
|
the pixel when compressing from/decompressing to an RGB buffer.
|
||||||
|
|
||||||
|
Your application can check for the existence of these extensions at compile
|
||||||
|
time with:
|
||||||
|
|
||||||
|
#ifdef JCS_EXTENSIONS
|
||||||
|
|
||||||
|
At run time, attempting to use these extensions with a libjpeg implementation
|
||||||
|
that does not support them will result in a "Bogus input colorspace" error.
|
||||||
|
Applications can trap this error in order to test whether run-time support is
|
||||||
|
available for the colorspace extensions.
|
||||||
|
|
||||||
|
When using the RGBX, BGRX, XBGR, and XRGB colorspaces during decompression, the
|
||||||
|
X byte is undefined, and in order to ensure the best performance, libjpeg-turbo
|
||||||
|
can set that byte to whatever value it wishes. If an application expects the X
|
||||||
|
byte to be used as an alpha channel, then it should specify JCS_EXT_RGBA,
|
||||||
|
JCS_EXT_BGRA, JCS_EXT_ABGR, or JCS_EXT_ARGB. When these colorspace constants
|
||||||
|
are used, the X byte is guaranteed to be 0xFF, which is interpreted as opaque.
|
||||||
|
|
||||||
|
Your application can check for the existence of the alpha channel colorspace
|
||||||
|
extensions at compile time with:
|
||||||
|
|
||||||
|
#ifdef JCS_ALPHA_EXTENSIONS
|
||||||
|
|
||||||
|
jcstest.c, located in the libjpeg-turbo source tree, demonstrates how to check
|
||||||
|
for the existence of the colorspace extensions at compile time and run time.
|
||||||
|
|
||||||
|
===================================
|
||||||
|
libjpeg v7 and v8 API/ABI Emulation
|
||||||
|
===================================
|
||||||
|
|
||||||
|
With libjpeg v7 and v8, new features were added that necessitated extending the
|
||||||
|
compression and decompression structures. Unfortunately, due to the exposed
|
||||||
|
nature of those structures, extending them also necessitated breaking backward
|
||||||
|
ABI compatibility with previous libjpeg releases. Thus, programs that were
|
||||||
|
built to use libjpeg v7 or v8 did not work with libjpeg-turbo, since it is
|
||||||
|
based on the libjpeg v6b code base. Although libjpeg v7 and v8 are not
|
||||||
|
as widely used as v6b, enough programs (including a few Linux distros) made
|
||||||
|
the switch that there was a demand to emulate the libjpeg v7 and v8 ABIs
|
||||||
|
in libjpeg-turbo. It should be noted, however, that this feature was added
|
||||||
|
primarily so that applications that had already been compiled to use libjpeg
|
||||||
|
v7+ could take advantage of accelerated baseline JPEG encoding/decoding
|
||||||
|
without recompiling. libjpeg-turbo does not claim to support all of the
|
||||||
|
libjpeg v7+ features, nor to produce identical output to libjpeg v7+ in all
|
||||||
|
cases (see below.)
|
||||||
|
|
||||||
|
By passing an argument of --with-jpeg7 or --with-jpeg8 to configure, or an
|
||||||
|
argument of -DWITH_JPEG7=1 or -DWITH_JPEG8=1 to cmake, you can build a version
|
||||||
|
of libjpeg-turbo that emulates the libjpeg v7 or v8 ABI, so that programs
|
||||||
|
that are built against libjpeg v7 or v8 can be run with libjpeg-turbo. The
|
||||||
|
following section describes which libjpeg v7+ features are supported and which
|
||||||
|
aren't.
|
||||||
|
|
||||||
|
Support for libjpeg v7 and v8 Features:
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
Fully supported:
|
||||||
|
|
||||||
|
-- libjpeg: IDCT scaling extensions in decompressor
|
||||||
|
libjpeg-turbo supports IDCT scaling with scaling factors of 1/8, 1/4, 3/8,
|
||||||
|
1/2, 5/8, 3/4, 7/8, 9/8, 5/4, 11/8, 3/2, 13/8, 7/4, 15/8, and 2/1 (only 1/4
|
||||||
|
and 1/2 are SIMD-accelerated.)
|
||||||
|
|
||||||
|
-- libjpeg: arithmetic coding
|
||||||
|
|
||||||
|
-- libjpeg: In-memory source and destination managers
|
||||||
|
See notes below.
|
||||||
|
|
||||||
|
-- cjpeg: Separate quality settings for luminance and chrominance
|
||||||
|
Note that the libpjeg v7+ API was extended to accommodate this feature only
|
||||||
|
for convenience purposes. It has always been possible to implement this
|
||||||
|
feature with libjpeg v6b (see rdswitch.c for an example.)
|
||||||
|
|
||||||
|
-- cjpeg: 32-bit BMP support
|
||||||
|
|
||||||
|
-- cjpeg: -rgb option
|
||||||
|
|
||||||
|
-- jpegtran: lossless cropping
|
||||||
|
|
||||||
|
-- jpegtran: -perfect option
|
||||||
|
|
||||||
|
-- jpegtran: forcing width/height when performing lossless crop
|
||||||
|
|
||||||
|
-- rdjpgcom: -raw option
|
||||||
|
|
||||||
|
-- rdjpgcom: locale awareness
|
||||||
|
|
||||||
|
|
||||||
|
Not supported:
|
||||||
|
|
||||||
|
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,
|
||||||
|
but it is the general belief of our project that these features have not
|
||||||
|
demonstrated sufficient usefulness to justify inclusion in libjpeg-turbo.
|
||||||
|
|
||||||
|
-- libjpeg: DCT scaling in compressor
|
||||||
|
cinfo.scale_num and cinfo.scale_denom are silently ignored.
|
||||||
|
There is no technical reason why DCT scaling could not be supported when
|
||||||
|
emulating the libjpeg v7+ API/ABI, but without the SmartScale extension (see
|
||||||
|
below), only scaling factors of 1/2, 8/15, 4/7, 8/13, 2/3, 8/11, 4/5, and
|
||||||
|
8/9 would be available, which is of limited usefulness.
|
||||||
|
|
||||||
|
-- libjpeg: SmartScale
|
||||||
|
cinfo.block_size is silently ignored.
|
||||||
|
SmartScale is an extension to the JPEG format that allows for DCT block
|
||||||
|
sizes other than 8x8. Providing support for this new format would be
|
||||||
|
feasible (particularly without full acceleration.) However, until/unless
|
||||||
|
the format becomes either an official industry standard or, at minimum, an
|
||||||
|
accepted solution in the community, we are hesitant to implement it, as
|
||||||
|
there is no sense of whether or how it might change in the future. It is
|
||||||
|
our belief that SmartScale has not demonstrated sufficient usefulness as a
|
||||||
|
lossless format nor as a means of quality enhancement, and thus, our primary
|
||||||
|
interest in providing this feature would be as a means of supporting
|
||||||
|
additional DCT scaling factors.
|
||||||
|
|
||||||
|
-- libjpeg: Fancy downsampling in compressor
|
||||||
|
cinfo.do_fancy_downsampling is silently ignored.
|
||||||
|
This requires the DCT scaling feature, which is not supported.
|
||||||
|
|
||||||
|
-- jpegtran: Scaling
|
||||||
|
This requires both the DCT scaling and SmartScale features, which are not
|
||||||
|
supported.
|
||||||
|
|
||||||
|
-- Lossless RGB JPEG files
|
||||||
|
This requires the SmartScale feature, which is not supported.
|
||||||
|
|
||||||
|
What About libjpeg v9?
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
libjpeg v9 introduced yet another field to the JPEG compression structure
|
||||||
|
(color_transform), thus making the ABI backward incompatible with that of
|
||||||
|
libjpeg v8. This new field was introduced solely for the purpose of supporting
|
||||||
|
lossless SmartScale encoding. Further, there was actually no reason to extend
|
||||||
|
the API in this manner, as the color transform could have just as easily been
|
||||||
|
activated by way of a new JPEG colorspace constant, thus preserving backward
|
||||||
|
ABI compatibility.
|
||||||
|
|
||||||
|
Our research (see link above) has shown that lossless SmartScale does not
|
||||||
|
generally accomplish anything that can't already be accomplished better with
|
||||||
|
existing, standard lossless formats. Thus, at this time, it is our belief that
|
||||||
|
there is not sufficient technical justification for software to upgrade from
|
||||||
|
libjpeg v8 to libjpeg v9, and therefore, not sufficient technical justification
|
||||||
|
for us to emulate the libjpeg v9 ABI.
|
||||||
|
|
||||||
|
=====================================
|
||||||
|
In-Memory Source/Destination Managers
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
By default, libjpeg-turbo 1.3 and later includes the jpeg_mem_src() and
|
||||||
|
jpeg_mem_dest() functions, even when not emulating the libjpeg v8 API/ABI.
|
||||||
|
Previously, it was necessary to build libjpeg-turbo from source with libjpeg v8
|
||||||
|
API/ABI emulation in order to use the in-memory source/destination managers,
|
||||||
|
but several projects requested that those functions be included when emulating
|
||||||
|
the libjpeg v6b API/ABI as well. This allows the use of those functions by
|
||||||
|
programs that need them without breaking ABI compatibility for programs that
|
||||||
|
don't, and it allows those functions to be provided in the "official"
|
||||||
|
libjpeg-turbo binaries.
|
||||||
|
|
||||||
|
Those who are concerned about maintaining strict conformance with the libjpeg
|
||||||
|
v6b or v7 API can pass an argument of --without-mem-srcdst to configure or
|
||||||
|
an argument of -DWITH_MEM_SRCDST=0 to CMake prior to building libjpeg-turbo.
|
||||||
|
This will restore the pre-1.3 behavior, in which jpeg_mem_src() and
|
||||||
|
jpeg_mem_dest() are only included when emulating the libjpeg v8 API/ABI.
|
||||||
|
|
||||||
|
On Un*x systems, including the in-memory source/destination managers changes
|
||||||
|
the dynamic library version from 62.0.0 to 62.1.0 if using libjpeg v6b API/ABI
|
||||||
|
emulation and from 7.0.0 to 7.1.0 if using libjpeg v7 API/ABI emulation.
|
||||||
|
|
||||||
|
Note that, on most Un*x systems, the dynamic linker will not look for a
|
||||||
|
function in a library until that function is actually used. Thus, if a program
|
||||||
|
is built against libjpeg-turbo 1.3+ and uses jpeg_mem_src() or jpeg_mem_dest(),
|
||||||
|
that program will not fail if run against an older version of libjpeg-turbo or
|
||||||
|
against libjpeg v7- until the program actually tries to call jpeg_mem_src() or
|
||||||
|
jpeg_mem_dest(). Such is not the case on Windows. If a program is built
|
||||||
|
against the libjpeg-turbo 1.3+ DLL and uses jpeg_mem_src() or jpeg_mem_dest(),
|
||||||
|
then it must use the libjpeg-turbo 1.3+ DLL at run time.
|
||||||
|
|
||||||
|
Both cjpeg and djpeg have been extended to allow testing the in-memory
|
||||||
|
source/destination manager functions. See their respective man pages for more
|
||||||
|
details.
|
||||||
|
|
||||||
|
|
||||||
|
*******************************************************************************
|
||||||
|
** Mathematical Compatibility
|
||||||
|
*******************************************************************************
|
||||||
|
|
||||||
|
For the most part, libjpeg-turbo should produce identical output to libjpeg
|
||||||
|
v6b. The one exception to this is when using the floating point DCT/IDCT, in
|
||||||
|
which case the outputs of libjpeg v6b and libjpeg-turbo can differ for the
|
||||||
|
following reasons:
|
||||||
|
|
||||||
|
-- The SSE/SSE2 floating point DCT implementation in libjpeg-turbo is ever so
|
||||||
|
slightly more accurate than the implementation in libjpeg v6b, but not by
|
||||||
|
any amount perceptible to human vision (generally in the range of 0.01 to
|
||||||
|
0.08 dB gain in PNSR.)
|
||||||
|
-- When not using the SIMD extensions, libjpeg-turbo uses the more accurate
|
||||||
|
(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.)
|
||||||
|
-- If the floating point algorithms in libjpeg-turbo are not implemented using
|
||||||
|
SIMD instructions on a particular platform, then the accuracy of the
|
||||||
|
floating point DCT/IDCT can depend on the compiler settings.
|
||||||
|
|
||||||
|
While libjpeg-turbo does emulate the libjpeg v8 API/ABI, under the hood, it is
|
||||||
|
still using the same algorithms as libjpeg v6b, so there are several specific
|
||||||
|
cases in which libjpeg-turbo cannot be expected to produce the same output as
|
||||||
|
libjpeg v8:
|
||||||
|
|
||||||
|
-- When decompressing using scaling factors of 1/2 and 1/4, because libjpeg v8
|
||||||
|
implements those scaling algorithms differently than libjpeg v6b does, and
|
||||||
|
libjpeg-turbo's SIMD extensions are based on the libjpeg v6b behavior.
|
||||||
|
|
||||||
|
-- When using chrominance subsampling, because libjpeg v8 implements this
|
||||||
|
with its DCT/IDCT scaling algorithms rather than with a separate
|
||||||
|
downsampling/upsampling algorithm. In our testing, the subsampled/upsampled
|
||||||
|
output of libjpeg v8 is less accurate than that of libjpeg v6b for this
|
||||||
|
reason.
|
||||||
|
|
||||||
|
-- When decompressing using a scaling factor > 1 and merged (AKA "non-fancy" or
|
||||||
|
"non-smooth") chrominance upsampling, because libjpeg v8 does not support
|
||||||
|
merged upsampling with scaling factors > 1.
|
||||||
|
|
||||||
|
|
||||||
|
*******************************************************************************
|
||||||
|
** Performance Pitfalls
|
||||||
|
*******************************************************************************
|
||||||
|
|
||||||
|
===============
|
||||||
|
Restart Markers
|
||||||
|
===============
|
||||||
|
|
||||||
|
The optimized Huffman decoder in libjpeg-turbo does not handle restart markers
|
||||||
|
in a way that makes the rest of the libjpeg infrastructure happy, so it is
|
||||||
|
necessary to use the slow Huffman decoder when decompressing a JPEG image that
|
||||||
|
has restart markers. This can cause the decompression performance to drop by
|
||||||
|
as much as 20%, but the performance will still be much greater than that of
|
||||||
|
libjpeg. Many consumer packages, such as PhotoShop, use restart markers when
|
||||||
|
generating JPEG images, so images generated by those programs will experience
|
||||||
|
this issue.
|
||||||
|
|
||||||
|
===============================================
|
||||||
|
Fast Integer Forward DCT at High Quality Levels
|
||||||
|
===============================================
|
||||||
|
|
||||||
|
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
|
||||||
|
whenever encoding images with a JPEG quality of 98 or higher.
|
||||||
247
acinclude.m4
Normal file
@@ -0,0 +1,247 @@
|
|||||||
|
# AC_PROG_NASM
|
||||||
|
# --------------------------
|
||||||
|
# Check that NASM exists and determine flags
|
||||||
|
AC_DEFUN([AC_PROG_NASM],[
|
||||||
|
|
||||||
|
AC_CHECK_PROGS(NASM, [nasm nasmw yasm])
|
||||||
|
test -z "$NASM" && AC_MSG_ERROR([no nasm (Netwide Assembler) found])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for object file format of host system])
|
||||||
|
case "$host_os" in
|
||||||
|
cygwin* | mingw* | pw32* | interix*)
|
||||||
|
case "$host_cpu" in
|
||||||
|
x86_64)
|
||||||
|
objfmt='Win64-COFF'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
objfmt='Win32-COFF'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
msdosdjgpp* | go32*)
|
||||||
|
objfmt='COFF'
|
||||||
|
;;
|
||||||
|
os2-emx*) # not tested
|
||||||
|
objfmt='MSOMF' # obj
|
||||||
|
;;
|
||||||
|
linux*coff* | linux*oldld*)
|
||||||
|
objfmt='COFF' # ???
|
||||||
|
;;
|
||||||
|
linux*aout*)
|
||||||
|
objfmt='a.out'
|
||||||
|
;;
|
||||||
|
linux*)
|
||||||
|
case "$host_cpu" in
|
||||||
|
x86_64)
|
||||||
|
objfmt='ELF64'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
objfmt='ELF'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
kfreebsd* | freebsd* | netbsd* | openbsd*)
|
||||||
|
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||||
|
objfmt='BSD-a.out'
|
||||||
|
else
|
||||||
|
case "$host_cpu" in
|
||||||
|
x86_64 | amd64)
|
||||||
|
objfmt='ELF64'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
objfmt='ELF'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
solaris* | sunos* | sysv* | sco*)
|
||||||
|
case "$host_cpu" in
|
||||||
|
x86_64)
|
||||||
|
objfmt='ELF64'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
objfmt='ELF'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
darwin* | rhapsody* | nextstep* | openstep* | macos*)
|
||||||
|
case "$host_cpu" in
|
||||||
|
x86_64)
|
||||||
|
objfmt='Mach-O64'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
objfmt='Mach-O'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
objfmt='ELF ?'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$objfmt])
|
||||||
|
if test "$objfmt" = 'ELF ?'; then
|
||||||
|
objfmt='ELF'
|
||||||
|
AC_MSG_WARN([unexpected host system. assumed that the format is $objfmt.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for object file format specifier (NAFLAGS) ])
|
||||||
|
case "$objfmt" in
|
||||||
|
MSOMF) NAFLAGS='-fobj -DOBJ32';;
|
||||||
|
Win32-COFF) NAFLAGS='-fwin32 -DWIN32';;
|
||||||
|
Win64-COFF) NAFLAGS='-fwin64 -DWIN64 -D__x86_64__';;
|
||||||
|
COFF) NAFLAGS='-fcoff -DCOFF';;
|
||||||
|
a.out) NAFLAGS='-faout -DAOUT';;
|
||||||
|
BSD-a.out) NAFLAGS='-faoutb -DAOUT';;
|
||||||
|
ELF) NAFLAGS='-felf -DELF';;
|
||||||
|
ELF64) NAFLAGS='-felf64 -DELF -D__x86_64__';;
|
||||||
|
RDF) NAFLAGS='-frdf -DRDF';;
|
||||||
|
Mach-O) NAFLAGS='-fmacho -DMACHO';;
|
||||||
|
Mach-O64) NAFLAGS='-fmacho64 -DMACHO -D__x86_64__';;
|
||||||
|
esac
|
||||||
|
AC_MSG_RESULT([$NAFLAGS])
|
||||||
|
AC_SUBST([NAFLAGS])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether the assembler ($NASM $NAFLAGS) works])
|
||||||
|
cat > conftest.asm <<EOF
|
||||||
|
[%line __oline__ "configure"
|
||||||
|
section .text
|
||||||
|
global _main,main
|
||||||
|
_main:
|
||||||
|
main: xor eax,eax
|
||||||
|
ret
|
||||||
|
]EOF
|
||||||
|
try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
|
||||||
|
if AC_TRY_EVAL(try_nasm) && test -s conftest.o; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
echo "configure: failed program was:" >&AC_FD_CC
|
||||||
|
cat conftest.asm >&AC_FD_CC
|
||||||
|
rm -rf conftest*
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_ERROR([installation or configuration problem: assembler cannot create object files.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether the linker accepts assembler output])
|
||||||
|
try_nasm='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.o $LIBS 1>&AC_FD_CC'
|
||||||
|
if AC_TRY_EVAL(try_nasm) && test -s conftest${ac_exeext}; then
|
||||||
|
rm -rf conftest*
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
rm -rf conftest*
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_ERROR([configuration problem: maybe object file format mismatch.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE
|
||||||
|
# --------------------------
|
||||||
|
# Test whether the assembler is suitable and supports NEON instructions
|
||||||
|
AC_DEFUN([AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE],[
|
||||||
|
ac_good_gnu_arm_assembler=no
|
||||||
|
ac_save_CC="$CC"
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CCASFLAGS -x assembler-with-cpp"
|
||||||
|
CC="$CCAS"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
.text
|
||||||
|
.fpu neon
|
||||||
|
.arch armv7a
|
||||||
|
.object_arch armv4
|
||||||
|
.arm
|
||||||
|
pld [r0]
|
||||||
|
vmovn.u16 d0, q0]])], ac_good_gnu_arm_assembler=yes)
|
||||||
|
|
||||||
|
ac_use_gas_preprocessor=no
|
||||||
|
if test "x$ac_good_gnu_arm_assembler" = "xno" ; then
|
||||||
|
CC="gas-preprocessor.pl $CCAS"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
.text
|
||||||
|
.fpu neon
|
||||||
|
.arch armv7a
|
||||||
|
.object_arch armv4
|
||||||
|
.arm
|
||||||
|
pld [r0]
|
||||||
|
vmovn.u16 d0, q0]])], ac_use_gas_preprocessor=yes)
|
||||||
|
fi
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
CC="$ac_save_CC"
|
||||||
|
|
||||||
|
if test "x$ac_use_gas_preprocessor" = "xyes" ; then
|
||||||
|
CCAS="gas-preprocessor.pl $CCAS"
|
||||||
|
AC_SUBST([CCAS])
|
||||||
|
ac_good_gnu_arm_assembler=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$ac_good_gnu_arm_assembler" = "xyes" ; then
|
||||||
|
$1
|
||||||
|
else
|
||||||
|
$2
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_CHECK_COMPATIBLE_MIPSEL_ASSEMBLER_IFELSE
|
||||||
|
# --------------------------
|
||||||
|
# Test whether the assembler is suitable and supports MIPS instructions
|
||||||
|
AC_DEFUN([AC_CHECK_COMPATIBLE_MIPS_ASSEMBLER_IFELSE],[
|
||||||
|
have_mips_dspr2=no
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CCASFLAGS -mdspr2"
|
||||||
|
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
int c = 0, a = 0, b = 0;
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
"precr.qb.ph %[c], %[a], %[b] \n\t"
|
||||||
|
: [c] "=r" (c)
|
||||||
|
: [a] "r" (a), [b] "r" (b)
|
||||||
|
);
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
]])], have_mips_dspr2=yes)
|
||||||
|
CFLAGS=$ac_save_CFLAGS
|
||||||
|
|
||||||
|
if test "x$have_mips_dspr2" = "xyes" ; then
|
||||||
|
$1
|
||||||
|
else
|
||||||
|
$2
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE],[
|
||||||
|
ac_good_gnu_arm_assembler=no
|
||||||
|
ac_save_CC="$CC"
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CCASFLAGS -x assembler-with-cpp"
|
||||||
|
CC="$CCAS"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
.text
|
||||||
|
.arch armv8-a+fp+simd
|
||||||
|
movi v0.16b, #100]])], ac_good_gnu_arm_assembler=yes)
|
||||||
|
|
||||||
|
ac_use_gas_preprocessor=no
|
||||||
|
if test "x$ac_good_gnu_arm_assembler" = "xno" ; then
|
||||||
|
CC="gas-preprocessor.pl $CCAS"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
.text
|
||||||
|
.arch armv8-a+fp+simd
|
||||||
|
movi v0.16b, #100]])], ac_use_gas_preprocessor=yes)
|
||||||
|
fi
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
CC="$ac_save_CC"
|
||||||
|
|
||||||
|
if test "x$ac_use_gas_preprocessor" = "xyes" ; then
|
||||||
|
CCAS="gas-preprocessor.pl $CCAS"
|
||||||
|
AC_SUBST([CCAS])
|
||||||
|
ac_good_gnu_arm_assembler=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$ac_good_gnu_arm_assembler" = "xyes" ; then
|
||||||
|
$1
|
||||||
|
else
|
||||||
|
$2
|
||||||
|
fi
|
||||||
|
])
|
||||||
19
ansi2knr.1
@@ -1,19 +0,0 @@
|
|||||||
.TH ANSI2KNR 1 "31 December 1990"
|
|
||||||
.SH NAME
|
|
||||||
ansi2knr \- convert ANSI C to Kernighan & Ritchie C
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.I ansi2knr
|
|
||||||
input_file output_file
|
|
||||||
.SH DESCRIPTION
|
|
||||||
If no output_file is supplied, output goes to stdout.
|
|
||||||
.br
|
|
||||||
There are no error messages.
|
|
||||||
.sp
|
|
||||||
.I ansi2knr
|
|
||||||
recognizes functions by seeing a non-keyword identifier at the left margin, followed by a left parenthesis, with a right parenthesis as the last character on the line. It will recognize a multi-line header if the last character on each line but the last is a left parenthesis or comma. These algorithms ignore whitespace and comments, except that the function name must be the first thing on the line.
|
|
||||||
.sp
|
|
||||||
The following constructs will confuse it:
|
|
||||||
.br
|
|
||||||
- Any other construct that starts at the left margin and follows the above syntax (such as a macro or function call).
|
|
||||||
.br
|
|
||||||
- Macros that tinker with the syntax of the function header.
|
|
||||||
488
ansi2knr.c
@@ -1,488 +0,0 @@
|
|||||||
/* Copyright (C) 1989, 1991, 1993 Aladdin Enterprises. All rights reserved. */
|
|
||||||
|
|
||||||
/* ansi2knr.c */
|
|
||||||
/* Convert ANSI function declarations to K&R syntax */
|
|
||||||
|
|
||||||
/*
|
|
||||||
ansi2knr is distributed in the hope that it will be useful, but
|
|
||||||
WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
|
|
||||||
to anyone for the consequences of using it or for whether it serves any
|
|
||||||
particular purpose or works at all, unless he says so in writing. Refer
|
|
||||||
to the GNU General Public License for full details.
|
|
||||||
|
|
||||||
Everyone is granted permission to copy, modify and redistribute
|
|
||||||
ansi2knr, but only under the conditions described in the GNU
|
|
||||||
General Public License. A copy of this license is supposed to have been
|
|
||||||
given to you along with ansi2knr so you can know your rights and
|
|
||||||
responsibilities. It should be in a file named COPYING. Among other
|
|
||||||
things, the copyright notice and this notice must be preserved on all
|
|
||||||
copies.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
---------- Here is the GNU GPL file COPYING, referred to above ----------
|
|
||||||
----- These terms do NOT apply to the JPEG software itself; see README ------
|
|
||||||
|
|
||||||
GHOSTSCRIPT GENERAL PUBLIC LICENSE
|
|
||||||
(Clarified 11 Feb 1988)
|
|
||||||
|
|
||||||
Copyright (C) 1988 Richard M. Stallman
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies of this
|
|
||||||
license, but changing it is not allowed. You can also use this wording
|
|
||||||
to make the terms for other programs.
|
|
||||||
|
|
||||||
The license agreements of most software companies keep you at the
|
|
||||||
mercy of those companies. By contrast, our general public license is
|
|
||||||
intended to give everyone the right to share Ghostscript. To make sure
|
|
||||||
that you get the rights we want you to have, we need to make
|
|
||||||
restrictions that forbid anyone to deny you these rights or to ask you
|
|
||||||
to surrender the rights. Hence this license agreement.
|
|
||||||
|
|
||||||
Specifically, we want to make sure that you have the right to give
|
|
||||||
away copies of Ghostscript, that you receive source code or else can get
|
|
||||||
it if you want it, that you can change Ghostscript or use pieces of it
|
|
||||||
in new free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To make sure that everyone has such rights, we have to forbid you to
|
|
||||||
deprive anyone else of these rights. For example, if you distribute
|
|
||||||
copies of Ghostscript, you must give the recipients all the rights that
|
|
||||||
you have. You must make sure that they, too, receive or can get the
|
|
||||||
source code. And you must tell them their rights.
|
|
||||||
|
|
||||||
Also, for our own protection, we must make certain that everyone finds
|
|
||||||
out that there is no warranty for Ghostscript. If Ghostscript is
|
|
||||||
modified by someone else and passed on, we want its recipients to know
|
|
||||||
that what they have is not what we distributed, so that any problems
|
|
||||||
introduced by others will not reflect on our reputation.
|
|
||||||
|
|
||||||
Therefore we (Richard M. Stallman and the Free Software Foundation,
|
|
||||||
Inc.) make the following terms which say what you must do to be allowed
|
|
||||||
to distribute or change Ghostscript.
|
|
||||||
|
|
||||||
|
|
||||||
COPYING POLICIES
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of Ghostscript source
|
|
||||||
code as you receive it, in any medium, provided that you conspicuously
|
|
||||||
and appropriately publish on each copy a valid copyright and license
|
|
||||||
notice "Copyright (C) 1989 Aladdin Enterprises. All rights reserved.
|
|
||||||
Distributed by Free Software Foundation, Inc." (or with whatever year is
|
|
||||||
appropriate); keep intact the notices on all files that refer to this
|
|
||||||
License Agreement and to the absence of any warranty; and give any other
|
|
||||||
recipients of the Ghostscript program a copy of this License Agreement
|
|
||||||
along with the program. You may charge a distribution fee for the
|
|
||||||
physical act of transferring a copy.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of Ghostscript or any portion of
|
|
||||||
it, and copy and distribute such modifications under the terms of
|
|
||||||
Paragraph 1 above, provided that you also do the following:
|
|
||||||
|
|
||||||
a) cause the modified files to carry prominent notices stating
|
|
||||||
that you changed the files and the date of any change; and
|
|
||||||
|
|
||||||
b) cause the whole of any work that you distribute or publish,
|
|
||||||
that in whole or in part contains or is a derivative of Ghostscript
|
|
||||||
or any part thereof, to be licensed at no charge to all third
|
|
||||||
parties on terms identical to those contained in this License
|
|
||||||
Agreement (except that you may choose to grant more extensive
|
|
||||||
warranty protection to some or all third parties, at your option).
|
|
||||||
|
|
||||||
c) You may charge a distribution fee for the physical act of
|
|
||||||
transferring a copy, and you may at your option offer warranty
|
|
||||||
protection in exchange for a fee.
|
|
||||||
|
|
||||||
Mere aggregation of another unrelated program with this program (or its
|
|
||||||
derivative) on a volume of a storage or distribution medium does not bring
|
|
||||||
the other program under the scope of these terms.
|
|
||||||
|
|
||||||
3. You may copy and distribute Ghostscript (or a portion or derivative
|
|
||||||
of it, under Paragraph 2) in object code or executable form under the
|
|
||||||
terms of Paragraphs 1 and 2 above provided that you also do one of the
|
|
||||||
following:
|
|
||||||
|
|
||||||
a) accompany it with the complete corresponding machine-readable
|
|
||||||
source code, which must be distributed under the terms of
|
|
||||||
Paragraphs 1 and 2 above; or,
|
|
||||||
|
|
||||||
b) accompany it with a written offer, valid for at least three
|
|
||||||
years, to give any third party free (except for a nominal
|
|
||||||
shipping charge) a complete machine-readable copy of the
|
|
||||||
corresponding source code, to be distributed under the terms of
|
|
||||||
Paragraphs 1 and 2 above; or,
|
|
||||||
|
|
||||||
c) accompany it with the information you received as to where the
|
|
||||||
corresponding source code may be obtained. (This alternative is
|
|
||||||
allowed only for noncommercial distribution and only if you
|
|
||||||
received the program in object code or executable form alone.)
|
|
||||||
|
|
||||||
For an executable file, complete source code means all the source code for
|
|
||||||
all modules it contains; but, as a special exception, it need not include
|
|
||||||
source code for modules which are standard libraries that accompany the
|
|
||||||
operating system on which the executable file runs.
|
|
||||||
|
|
||||||
4. You may not copy, sublicense, distribute or transfer Ghostscript
|
|
||||||
except as expressly provided under this License Agreement. Any attempt
|
|
||||||
otherwise to copy, sublicense, distribute or transfer Ghostscript is
|
|
||||||
void and your rights to use the program under this License agreement
|
|
||||||
shall be automatically terminated. However, parties who have received
|
|
||||||
computer software programs from you with this License Agreement will not
|
|
||||||
have their licenses terminated so long as such parties remain in full
|
|
||||||
compliance.
|
|
||||||
|
|
||||||
5. If you wish to incorporate parts of Ghostscript into other free
|
|
||||||
programs whose distribution conditions are different, write to the Free
|
|
||||||
Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not
|
|
||||||
yet worked out a simple rule that can be stated here, but we will often
|
|
||||||
permit this. We will be guided by the two goals of preserving the free
|
|
||||||
status of all derivatives of our free software and of promoting the
|
|
||||||
sharing and reuse of software.
|
|
||||||
|
|
||||||
Your comments and suggestions about our licensing policies and our
|
|
||||||
software are welcome! Please contact the Free Software Foundation,
|
|
||||||
Inc., 675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
BECAUSE GHOSTSCRIPT IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
|
|
||||||
NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
|
|
||||||
WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, RICHARD
|
|
||||||
M. STALLMAN, ALADDIN ENTERPRISES, L. PETER DEUTSCH, AND/OR OTHER PARTIES
|
|
||||||
PROVIDE GHOSTSCRIPT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
||||||
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
|
|
||||||
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF GHOSTSCRIPT IS WITH
|
|
||||||
YOU. SHOULD GHOSTSCRIPT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
|
|
||||||
NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
|
|
||||||
STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., L. PETER DEUTSCH, ALADDIN
|
|
||||||
ENTERPRISES, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE
|
|
||||||
GHOSTSCRIPT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
|
|
||||||
ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR
|
|
||||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
|
|
||||||
(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
|
|
||||||
INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE
|
|
||||||
PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) GHOSTSCRIPT, EVEN IF YOU
|
|
||||||
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM
|
|
||||||
BY ANY OTHER PARTY.
|
|
||||||
|
|
||||||
-------------------- End of file COPYING ------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#ifdef BSD
|
|
||||||
#include <strings.h>
|
|
||||||
#else
|
|
||||||
#ifdef VMS
|
|
||||||
extern int strlen(), strncmp();
|
|
||||||
#else
|
|
||||||
#include <string.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* malloc and free should be declared in stdlib.h, */
|
|
||||||
/* but if you've got a K&R compiler, they probably aren't. */
|
|
||||||
#ifdef MSDOS
|
|
||||||
#include <malloc.h>
|
|
||||||
#else
|
|
||||||
#ifdef VMS
|
|
||||||
extern char *malloc();
|
|
||||||
extern void free();
|
|
||||||
#else
|
|
||||||
extern char *malloc();
|
|
||||||
extern int free();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Usage:
|
|
||||||
ansi2knr input_file [output_file]
|
|
||||||
* If no output_file is supplied, output goes to stdout.
|
|
||||||
* There are no error messages.
|
|
||||||
*
|
|
||||||
* ansi2knr recognizes functions by seeing a non-keyword identifier
|
|
||||||
* at the left margin, followed by a left parenthesis,
|
|
||||||
* with a right parenthesis as the last character on the line.
|
|
||||||
* It will recognize a multi-line header provided that the last character
|
|
||||||
* of the last line of the header is a right parenthesis,
|
|
||||||
* and no intervening line ends with a left brace or a semicolon.
|
|
||||||
* These algorithms ignore whitespace and comments, except that
|
|
||||||
* the function name must be the first thing on the line.
|
|
||||||
* The following constructs will confuse it:
|
|
||||||
* - Any other construct that starts at the left margin and
|
|
||||||
* follows the above syntax (such as a macro or function call).
|
|
||||||
* - Macros that tinker with the syntax of the function header.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Scanning macros */
|
|
||||||
#define isidchar(ch) (isalnum(ch) || (ch) == '_')
|
|
||||||
#define isidfirstchar(ch) (isalpha(ch) || (ch) == '_')
|
|
||||||
|
|
||||||
/* Forward references */
|
|
||||||
char *skipspace();
|
|
||||||
int writeblanks();
|
|
||||||
int test1();
|
|
||||||
int convert1();
|
|
||||||
|
|
||||||
/* The main program */
|
|
||||||
main(argc, argv)
|
|
||||||
int argc;
|
|
||||||
char *argv[];
|
|
||||||
{ FILE *in, *out;
|
|
||||||
#define bufsize 5000 /* arbitrary size */
|
|
||||||
char *buf;
|
|
||||||
char *line;
|
|
||||||
switch ( argc )
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
printf("Usage: ansi2knr input_file [output_file]\n");
|
|
||||||
exit(0);
|
|
||||||
case 2:
|
|
||||||
out = stdout; break;
|
|
||||||
case 3:
|
|
||||||
out = fopen(argv[2], "w");
|
|
||||||
if ( out == NULL )
|
|
||||||
{ fprintf(stderr, "Cannot open %s\n", argv[2]);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in = fopen(argv[1], "r");
|
|
||||||
if ( in == NULL )
|
|
||||||
{ fprintf(stderr, "Cannot open %s\n", argv[1]);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
fprintf(out, "#line 1 \"%s\"\n", argv[1]);
|
|
||||||
buf = malloc(bufsize);
|
|
||||||
line = buf;
|
|
||||||
while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
|
|
||||||
{ switch ( test1(buf) )
|
|
||||||
{
|
|
||||||
case 1: /* a function */
|
|
||||||
convert1(buf, out);
|
|
||||||
break;
|
|
||||||
case -1: /* maybe the start of a function */
|
|
||||||
line = buf + strlen(buf);
|
|
||||||
if ( line != buf + (bufsize - 1) ) /* overflow check */
|
|
||||||
continue;
|
|
||||||
/* falls through */
|
|
||||||
default: /* not a function */
|
|
||||||
fputs(buf, out);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
line = buf;
|
|
||||||
}
|
|
||||||
if ( line != buf ) fputs(buf, out);
|
|
||||||
free(buf);
|
|
||||||
fclose(out);
|
|
||||||
fclose(in);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Skip over space and comments, in either direction. */
|
|
||||||
char *
|
|
||||||
skipspace(p, dir)
|
|
||||||
register char *p;
|
|
||||||
register int dir; /* 1 for forward, -1 for backward */
|
|
||||||
{ for ( ; ; )
|
|
||||||
{ while ( isspace(*p) ) p += dir;
|
|
||||||
if ( !(*p == '/' && p[dir] == '*') ) break;
|
|
||||||
p += dir; p += dir;
|
|
||||||
while ( !(*p == '*' && p[dir] == '/') )
|
|
||||||
{ if ( *p == 0 ) return p; /* multi-line comment?? */
|
|
||||||
p += dir;
|
|
||||||
}
|
|
||||||
p += dir; p += dir;
|
|
||||||
}
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Write blanks over part of a string.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
writeblanks(start, end)
|
|
||||||
char *start;
|
|
||||||
char *end;
|
|
||||||
{ char *p;
|
|
||||||
for ( p = start; p < end; p++ ) *p = ' ';
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Test whether the string in buf is a function definition.
|
|
||||||
* The string may contain and/or end with a newline.
|
|
||||||
* Return as follows:
|
|
||||||
* 0 - definitely not a function definition;
|
|
||||||
* 1 - definitely a function definition;
|
|
||||||
* -1 - may be the beginning of a function definition,
|
|
||||||
* append another line and look again.
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
test1(buf)
|
|
||||||
char *buf;
|
|
||||||
{ register char *p = buf;
|
|
||||||
char *bend;
|
|
||||||
char *endfn;
|
|
||||||
int contin;
|
|
||||||
if ( !isidfirstchar(*p) )
|
|
||||||
return 0; /* no name at left margin */
|
|
||||||
bend = skipspace(buf + strlen(buf) - 1, -1);
|
|
||||||
switch ( *bend )
|
|
||||||
{
|
|
||||||
case ')': contin = 1; break;
|
|
||||||
case '{':
|
|
||||||
case ';': return 0; /* not a function */
|
|
||||||
default: contin = -1;
|
|
||||||
}
|
|
||||||
while ( isidchar(*p) ) p++;
|
|
||||||
endfn = p;
|
|
||||||
p = skipspace(p, 1);
|
|
||||||
if ( *p++ != '(' )
|
|
||||||
return 0; /* not a function */
|
|
||||||
p = skipspace(p, 1);
|
|
||||||
if ( *p == ')' )
|
|
||||||
return 0; /* no parameters */
|
|
||||||
/* Check that the apparent function name isn't a keyword. */
|
|
||||||
/* We only need to check for keywords that could be followed */
|
|
||||||
/* by a left parenthesis (which, unfortunately, is most of them). */
|
|
||||||
{ static char *words[] =
|
|
||||||
{ "asm", "auto", "case", "char", "const", "double",
|
|
||||||
"extern", "float", "for", "if", "int", "long",
|
|
||||||
"register", "return", "short", "signed", "sizeof",
|
|
||||||
"static", "switch", "typedef", "unsigned",
|
|
||||||
"void", "volatile", "while", 0
|
|
||||||
};
|
|
||||||
char **key = words;
|
|
||||||
char *kp;
|
|
||||||
int len = endfn - buf;
|
|
||||||
while ( (kp = *key) != 0 )
|
|
||||||
{ if ( strlen(kp) == len && !strncmp(kp, buf, len) )
|
|
||||||
return 0; /* name is a keyword */
|
|
||||||
key++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return contin;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
convert1(buf, out)
|
|
||||||
char *buf;
|
|
||||||
FILE *out;
|
|
||||||
{ char *endfn;
|
|
||||||
register char *p;
|
|
||||||
char **breaks;
|
|
||||||
unsigned num_breaks = 2; /* for testing */
|
|
||||||
char **btop;
|
|
||||||
char **bp;
|
|
||||||
char **ap;
|
|
||||||
/* Pre-ANSI implementations don't agree on whether strchr */
|
|
||||||
/* is called strchr or index, so we open-code it here. */
|
|
||||||
for ( endfn = buf; *(endfn++) != '('; ) ;
|
|
||||||
top: p = endfn;
|
|
||||||
breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
|
|
||||||
if ( breaks == 0 )
|
|
||||||
{ /* Couldn't allocate break table, give up */
|
|
||||||
fprintf(stderr, "Unable to allocate break table!\n");
|
|
||||||
fputs(buf, out);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
btop = breaks + num_breaks * 2 - 2;
|
|
||||||
bp = breaks;
|
|
||||||
/* Parse the argument list */
|
|
||||||
do
|
|
||||||
{ int level = 0;
|
|
||||||
char *end = NULL;
|
|
||||||
if ( bp >= btop )
|
|
||||||
{ /* Filled up break table. */
|
|
||||||
/* Allocate a bigger one and start over. */
|
|
||||||
free((char *)breaks);
|
|
||||||
num_breaks <<= 1;
|
|
||||||
goto top;
|
|
||||||
}
|
|
||||||
*bp++ = p;
|
|
||||||
/* Find the end of the argument */
|
|
||||||
for ( ; end == NULL; p++ )
|
|
||||||
{ switch(*p)
|
|
||||||
{
|
|
||||||
case ',': if ( !level ) end = p; break;
|
|
||||||
case '(': level++; break;
|
|
||||||
case ')': if ( --level < 0 ) end = p; break;
|
|
||||||
case '/': p = skipspace(p, 1) - 1; break;
|
|
||||||
default: ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p--; /* back up over terminator */
|
|
||||||
/* Find the name being declared. */
|
|
||||||
/* This is complicated because of procedure and */
|
|
||||||
/* array modifiers. */
|
|
||||||
for ( ; ; )
|
|
||||||
{ p = skipspace(p - 1, -1);
|
|
||||||
switch ( *p )
|
|
||||||
{
|
|
||||||
case ']': /* skip array dimension(s) */
|
|
||||||
case ')': /* skip procedure args OR name */
|
|
||||||
{ int level = 1;
|
|
||||||
while ( level )
|
|
||||||
switch ( *--p )
|
|
||||||
{
|
|
||||||
case ']': case ')': level++; break;
|
|
||||||
case '[': case '(': level--; break;
|
|
||||||
case '/': p = skipspace(p, -1) + 1; break;
|
|
||||||
default: ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
|
|
||||||
{ /* We found the name being declared */
|
|
||||||
while ( !isidfirstchar(*p) )
|
|
||||||
p = skipspace(p, 1) + 1;
|
|
||||||
goto found;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default: goto found;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
|
|
||||||
{ p++;
|
|
||||||
if ( bp == breaks + 1 ) /* sole argument */
|
|
||||||
writeblanks(breaks[0], p);
|
|
||||||
else
|
|
||||||
writeblanks(bp[-1] - 1, p);
|
|
||||||
bp--;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{ while ( isidchar(*p) ) p--;
|
|
||||||
*bp++ = p+1;
|
|
||||||
}
|
|
||||||
p = end;
|
|
||||||
}
|
|
||||||
while ( *p++ == ',' );
|
|
||||||
*bp = p;
|
|
||||||
/* Make a special check for 'void' arglist */
|
|
||||||
if ( bp == breaks+2 )
|
|
||||||
{ p = skipspace(breaks[0], 1);
|
|
||||||
if ( !strncmp(p, "void", 4) )
|
|
||||||
{ p = skipspace(p+4, 1);
|
|
||||||
if ( p == breaks[2] - 1 )
|
|
||||||
{ bp = breaks; /* yup, pretend arglist is empty */
|
|
||||||
writeblanks(breaks[0], p + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Put out the function name */
|
|
||||||
p = buf;
|
|
||||||
while ( p != endfn ) putc(*p, out), p++;
|
|
||||||
/* Put out the declaration */
|
|
||||||
for ( ap = breaks+1; ap < bp; ap += 2 )
|
|
||||||
{ p = *ap;
|
|
||||||
while ( isidchar(*p) ) putc(*p, out), p++;
|
|
||||||
if ( ap < bp - 1 ) fputs(", ", out);
|
|
||||||
}
|
|
||||||
fputs(") ", out);
|
|
||||||
/* Put out the argument declarations */
|
|
||||||
for ( ap = breaks+2; ap <= bp; ap += 2 ) (*ap)[-1] = ';';
|
|
||||||
fputs(breaks[0], out);
|
|
||||||
free((char *)breaks);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
334
bmp.c
Normal file
@@ -0,0 +1,334 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C)2011, 2015 D. R. Commander. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* - Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
* - Neither the name of the libjpeg-turbo Project nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived from this
|
||||||
|
* software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS 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 THE COPYRIGHT HOLDERS OR 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 THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <setjmp.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include "cdjpeg.h"
|
||||||
|
#include <jpeglib.h>
|
||||||
|
#include <jpegint.h>
|
||||||
|
#include "tjutil.h"
|
||||||
|
#include "bmp.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* This duplicates the functionality of the VirtualGL bitmap library using
|
||||||
|
the components from cjpeg and djpeg */
|
||||||
|
|
||||||
|
|
||||||
|
/* Error handling (based on example in example.c) */
|
||||||
|
|
||||||
|
static char errStr[JMSG_LENGTH_MAX]="No error";
|
||||||
|
|
||||||
|
struct my_error_mgr
|
||||||
|
{
|
||||||
|
struct jpeg_error_mgr pub;
|
||||||
|
jmp_buf setjmp_buffer;
|
||||||
|
};
|
||||||
|
typedef struct my_error_mgr *my_error_ptr;
|
||||||
|
|
||||||
|
static void my_error_exit(j_common_ptr cinfo)
|
||||||
|
{
|
||||||
|
my_error_ptr myerr=(my_error_ptr)cinfo->err;
|
||||||
|
(*cinfo->err->output_message)(cinfo);
|
||||||
|
longjmp(myerr->setjmp_buffer, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Based on output_message() in jerror.c */
|
||||||
|
|
||||||
|
static void my_output_message(j_common_ptr cinfo)
|
||||||
|
{
|
||||||
|
(*cinfo->err->format_message)(cinfo, errStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _throw(m) {snprintf(errStr, JMSG_LENGTH_MAX, "%s", m); \
|
||||||
|
retval=-1; goto bailout;}
|
||||||
|
#define _throwunix(m) {snprintf(errStr, JMSG_LENGTH_MAX, "%s\n%s", m, \
|
||||||
|
strerror(errno)); retval=-1; goto bailout;}
|
||||||
|
|
||||||
|
|
||||||
|
static void pixelconvert(unsigned char *srcbuf, int srcpf, int srcbottomup,
|
||||||
|
unsigned char *dstbuf, int dstpf, int dstbottomup, int w, int h)
|
||||||
|
{
|
||||||
|
unsigned char *srcrowptr=srcbuf, *srccolptr;
|
||||||
|
int srcps=tjPixelSize[srcpf];
|
||||||
|
int srcstride=srcbottomup? -w*srcps:w*srcps;
|
||||||
|
unsigned char *dstrowptr=dstbuf, *dstcolptr;
|
||||||
|
int dstps=tjPixelSize[dstpf];
|
||||||
|
int dststride=dstbottomup? -w*dstps:w*dstps;
|
||||||
|
int row, col;
|
||||||
|
|
||||||
|
if(srcbottomup) srcrowptr=&srcbuf[w*srcps*(h-1)];
|
||||||
|
if(dstbottomup) dstrowptr=&dstbuf[w*dstps*(h-1)];
|
||||||
|
|
||||||
|
/* NOTE: These quick & dirty CMYK<->RGB conversion routines are for testing
|
||||||
|
purposes only. Properly converting between CMYK and RGB requires a color
|
||||||
|
management system. */
|
||||||
|
|
||||||
|
if(dstpf==TJPF_CMYK)
|
||||||
|
{
|
||||||
|
for(row=0; row<h; row++, srcrowptr+=srcstride, dstrowptr+=dststride)
|
||||||
|
{
|
||||||
|
for(col=0, srccolptr=srcrowptr, dstcolptr=dstrowptr;
|
||||||
|
col<w; col++, srccolptr+=srcps)
|
||||||
|
{
|
||||||
|
double c=1.0-((double)(srccolptr[tjRedOffset[srcpf]])/255.);
|
||||||
|
double m=1.0-((double)(srccolptr[tjGreenOffset[srcpf]])/255.);
|
||||||
|
double y=1.0-((double)(srccolptr[tjBlueOffset[srcpf]])/255.);
|
||||||
|
double k=min(min(c,m),min(y,1.0));
|
||||||
|
if(k==1.0) c=m=y=0.0;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
c=(c-k)/(1.0-k);
|
||||||
|
m=(m-k)/(1.0-k);
|
||||||
|
y=(y-k)/(1.0-k);
|
||||||
|
}
|
||||||
|
if(c>1.0) c=1.0; if(c<0.) c=0.;
|
||||||
|
if(m>1.0) m=1.0; if(m<0.) m=0.;
|
||||||
|
if(y>1.0) y=1.0; if(y<0.) y=0.;
|
||||||
|
if(k>1.0) k=1.0; if(k<0.) k=0.;
|
||||||
|
*dstcolptr++=(unsigned char)(255.0-c*255.0+0.5);
|
||||||
|
*dstcolptr++=(unsigned char)(255.0-m*255.0+0.5);
|
||||||
|
*dstcolptr++=(unsigned char)(255.0-y*255.0+0.5);
|
||||||
|
*dstcolptr++=(unsigned char)(255.0-k*255.0+0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(srcpf==TJPF_CMYK)
|
||||||
|
{
|
||||||
|
for(row=0; row<h; row++, srcrowptr+=srcstride, dstrowptr+=dststride)
|
||||||
|
{
|
||||||
|
for(col=0, srccolptr=srcrowptr, dstcolptr=dstrowptr;
|
||||||
|
col<w; col++, dstcolptr+=dstps)
|
||||||
|
{
|
||||||
|
double c=(double)(*srccolptr++);
|
||||||
|
double m=(double)(*srccolptr++);
|
||||||
|
double y=(double)(*srccolptr++);
|
||||||
|
double k=(double)(*srccolptr++);
|
||||||
|
double r=c*k/255.;
|
||||||
|
double g=m*k/255.;
|
||||||
|
double b=y*k/255.;
|
||||||
|
if(r>255.0) r=255.0; if(r<0.) r=0.;
|
||||||
|
if(g>255.0) g=255.0; if(g<0.) g=0.;
|
||||||
|
if(b>255.0) b=255.0; if(b<0.) b=0.;
|
||||||
|
dstcolptr[tjRedOffset[dstpf]]=(unsigned char)(r+0.5);
|
||||||
|
dstcolptr[tjGreenOffset[dstpf]]=(unsigned char)(g+0.5);
|
||||||
|
dstcolptr[tjBlueOffset[dstpf]]=(unsigned char)(b+0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(row=0; row<h; row++, srcrowptr+=srcstride, dstrowptr+=dststride)
|
||||||
|
{
|
||||||
|
for(col=0, srccolptr=srcrowptr, dstcolptr=dstrowptr;
|
||||||
|
col<w; col++, srccolptr+=srcps, dstcolptr+=dstps)
|
||||||
|
{
|
||||||
|
dstcolptr[tjRedOffset[dstpf]]=srccolptr[tjRedOffset[srcpf]];
|
||||||
|
dstcolptr[tjGreenOffset[dstpf]]=srccolptr[tjGreenOffset[srcpf]];
|
||||||
|
dstcolptr[tjBlueOffset[dstpf]]=srccolptr[tjBlueOffset[srcpf]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int loadbmp(char *filename, unsigned char **buf, int *w, int *h,
|
||||||
|
int dstpf, int bottomup)
|
||||||
|
{
|
||||||
|
int retval=0, dstps, srcpf, tempc;
|
||||||
|
struct jpeg_compress_struct cinfo;
|
||||||
|
struct my_error_mgr jerr;
|
||||||
|
cjpeg_source_ptr src;
|
||||||
|
FILE *file=NULL;
|
||||||
|
|
||||||
|
memset(&cinfo, 0, sizeof(struct jpeg_compress_struct));
|
||||||
|
|
||||||
|
if(!filename || !buf || !w || !h || dstpf<0 || dstpf>=TJ_NUMPF)
|
||||||
|
_throw("loadbmp(): Invalid argument");
|
||||||
|
|
||||||
|
if((file=fopen(filename, "rb"))==NULL)
|
||||||
|
_throwunix("loadbmp(): Cannot open input file");
|
||||||
|
|
||||||
|
cinfo.err=jpeg_std_error(&jerr.pub);
|
||||||
|
jerr.pub.error_exit=my_error_exit;
|
||||||
|
jerr.pub.output_message=my_output_message;
|
||||||
|
|
||||||
|
if(setjmp(jerr.setjmp_buffer))
|
||||||
|
{
|
||||||
|
/* If we get here, the JPEG code has signaled an error. */
|
||||||
|
retval=-1; goto bailout;
|
||||||
|
}
|
||||||
|
|
||||||
|
jpeg_create_compress(&cinfo);
|
||||||
|
if((tempc=getc(file))<0 || ungetc(tempc, file)==EOF)
|
||||||
|
_throwunix("loadbmp(): Could not read input file")
|
||||||
|
else if(tempc==EOF) _throw("loadbmp(): Input file contains no data");
|
||||||
|
|
||||||
|
if(tempc=='B')
|
||||||
|
{
|
||||||
|
if((src=jinit_read_bmp(&cinfo))==NULL)
|
||||||
|
_throw("loadbmp(): Could not initialize bitmap loader");
|
||||||
|
}
|
||||||
|
else if(tempc=='P')
|
||||||
|
{
|
||||||
|
if((src=jinit_read_ppm(&cinfo))==NULL)
|
||||||
|
_throw("loadbmp(): Could not initialize bitmap loader");
|
||||||
|
}
|
||||||
|
else _throw("loadbmp(): Unsupported file type");
|
||||||
|
|
||||||
|
src->input_file=file;
|
||||||
|
(*src->start_input)(&cinfo, src);
|
||||||
|
(*cinfo.mem->realize_virt_arrays)((j_common_ptr)&cinfo);
|
||||||
|
|
||||||
|
*w=cinfo.image_width; *h=cinfo.image_height;
|
||||||
|
|
||||||
|
if(cinfo.input_components==1 && cinfo.in_color_space==JCS_RGB)
|
||||||
|
srcpf=TJPF_GRAY;
|
||||||
|
else srcpf=TJPF_RGB;
|
||||||
|
|
||||||
|
dstps=tjPixelSize[dstpf];
|
||||||
|
if((*buf=(unsigned char *)malloc((*w)*(*h)*dstps))==NULL)
|
||||||
|
_throw("loadbmp(): Memory allocation failure");
|
||||||
|
|
||||||
|
while(cinfo.next_scanline<cinfo.image_height)
|
||||||
|
{
|
||||||
|
int i, nlines=(*src->get_pixel_rows)(&cinfo, src);
|
||||||
|
for(i=0; i<nlines; i++)
|
||||||
|
{
|
||||||
|
unsigned char *outbuf; int row;
|
||||||
|
row=cinfo.next_scanline+i;
|
||||||
|
if(bottomup) outbuf=&(*buf)[((*h)-row-1)*(*w)*dstps];
|
||||||
|
else outbuf=&(*buf)[row*(*w)*dstps];
|
||||||
|
pixelconvert(src->buffer[i], srcpf, 0, outbuf, dstpf, bottomup, *w,
|
||||||
|
nlines);
|
||||||
|
}
|
||||||
|
cinfo.next_scanline+=nlines;
|
||||||
|
}
|
||||||
|
|
||||||
|
(*src->finish_input)(&cinfo, src);
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
jpeg_destroy_compress(&cinfo);
|
||||||
|
if(file) fclose(file);
|
||||||
|
if(retval<0 && buf && *buf) {free(*buf); *buf=NULL;}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int savebmp(char *filename, unsigned char *buf, int w, int h, int srcpf,
|
||||||
|
int bottomup)
|
||||||
|
{
|
||||||
|
int retval=0, srcps, dstpf;
|
||||||
|
struct jpeg_decompress_struct dinfo;
|
||||||
|
struct my_error_mgr jerr;
|
||||||
|
djpeg_dest_ptr dst;
|
||||||
|
FILE *file=NULL;
|
||||||
|
char *ptr=NULL;
|
||||||
|
|
||||||
|
memset(&dinfo, 0, sizeof(struct jpeg_decompress_struct));
|
||||||
|
|
||||||
|
if(!filename || !buf || w<1 || h<1 || srcpf<0 || srcpf>=TJ_NUMPF)
|
||||||
|
_throw("savebmp(): Invalid argument");
|
||||||
|
|
||||||
|
if((file=fopen(filename, "wb"))==NULL)
|
||||||
|
_throwunix("savebmp(): Cannot open output file");
|
||||||
|
|
||||||
|
dinfo.err=jpeg_std_error(&jerr.pub);
|
||||||
|
jerr.pub.error_exit=my_error_exit;
|
||||||
|
jerr.pub.output_message=my_output_message;
|
||||||
|
|
||||||
|
if(setjmp(jerr.setjmp_buffer))
|
||||||
|
{
|
||||||
|
/* If we get here, the JPEG code has signaled an error. */
|
||||||
|
retval=-1; goto bailout;
|
||||||
|
}
|
||||||
|
|
||||||
|
jpeg_create_decompress(&dinfo);
|
||||||
|
if(srcpf==TJPF_GRAY)
|
||||||
|
{
|
||||||
|
dinfo.out_color_components=dinfo.output_components=1;
|
||||||
|
dinfo.out_color_space=JCS_GRAYSCALE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dinfo.out_color_components=dinfo.output_components=3;
|
||||||
|
dinfo.out_color_space=JCS_RGB;
|
||||||
|
}
|
||||||
|
dinfo.image_width=w; dinfo.image_height=h;
|
||||||
|
dinfo.global_state=DSTATE_READY;
|
||||||
|
dinfo.scale_num=dinfo.scale_denom=1;
|
||||||
|
|
||||||
|
ptr=strrchr(filename, '.');
|
||||||
|
if(ptr && !strcasecmp(ptr, ".bmp"))
|
||||||
|
{
|
||||||
|
if((dst=jinit_write_bmp(&dinfo, 0))==NULL)
|
||||||
|
_throw("savebmp(): Could not initialize bitmap writer");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if((dst=jinit_write_ppm(&dinfo))==NULL)
|
||||||
|
_throw("savebmp(): Could not initialize PPM writer");
|
||||||
|
}
|
||||||
|
|
||||||
|
dst->output_file=file;
|
||||||
|
(*dst->start_output)(&dinfo, dst);
|
||||||
|
(*dinfo.mem->realize_virt_arrays)((j_common_ptr)&dinfo);
|
||||||
|
|
||||||
|
if(srcpf==TJPF_GRAY) dstpf=srcpf;
|
||||||
|
else dstpf=TJPF_RGB;
|
||||||
|
srcps=tjPixelSize[srcpf];
|
||||||
|
|
||||||
|
while(dinfo.output_scanline<dinfo.output_height)
|
||||||
|
{
|
||||||
|
int i, nlines=dst->buffer_height;
|
||||||
|
for(i=0; i<nlines; i++)
|
||||||
|
{
|
||||||
|
unsigned char *inbuf; int row;
|
||||||
|
row=dinfo.output_scanline+i;
|
||||||
|
if(bottomup) inbuf=&buf[(h-row-1)*w*srcps];
|
||||||
|
else inbuf=&buf[row*w*srcps];
|
||||||
|
pixelconvert(inbuf, srcpf, bottomup, dst->buffer[i], dstpf, 0, w,
|
||||||
|
nlines);
|
||||||
|
}
|
||||||
|
(*dst->put_pixel_rows)(&dinfo, dst, nlines);
|
||||||
|
dinfo.output_scanline+=nlines;
|
||||||
|
}
|
||||||
|
|
||||||
|
(*dst->finish_output)(&dinfo, dst);
|
||||||
|
|
||||||
|
bailout:
|
||||||
|
jpeg_destroy_decompress(&dinfo);
|
||||||
|
if(file) fclose(file);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *bmpgeterr(void)
|
||||||
|
{
|
||||||
|
return errStr;
|
||||||
|
}
|
||||||
42
bmp.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C)2011 D. R. Commander. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* - Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
* - Neither the name of the libjpeg-turbo Project nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived from this
|
||||||
|
* software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS 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 THE COPYRIGHT HOLDERS OR 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 THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __BMP_H__
|
||||||
|
#define __BMP_H__
|
||||||
|
|
||||||
|
#include "./turbojpeg.h"
|
||||||
|
|
||||||
|
int loadbmp(char *filename, unsigned char **buf, int *w, int *h, int pf,
|
||||||
|
int bottomup);
|
||||||
|
|
||||||
|
int savebmp(char *filename, unsigned char *buf, int w, int h, int pf,
|
||||||
|
int bottomup);
|
||||||
|
|
||||||
|
const char *bmpgeterr(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
16
cderror.h
@@ -1,7 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* cderror.h
|
* cderror.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 1994, Thomas G. Lane.
|
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||||
|
* Modified 2009 by Guido Vollbeding.
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* This file is part of the Independent JPEG Group's software.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* For conditions of distribution and use, see the accompanying README file.
|
||||||
*
|
*
|
||||||
@@ -32,7 +33,7 @@
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
||||||
#define JMESSAGE(code,string) code ,
|
#define JMESSAGE(code,string) code ,
|
||||||
|
|
||||||
#endif /* JMAKE_ENUM_LIST */
|
#endif /* JMAKE_ENUM_LIST */
|
||||||
|
|
||||||
@@ -45,6 +46,7 @@ JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")
|
|||||||
JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
|
JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
|
||||||
JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
|
JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
|
||||||
JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
|
JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
|
||||||
|
JMESSAGE(JERR_BMP_EMPTY, "Empty BMP image")
|
||||||
JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
|
JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
|
||||||
JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
|
JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
|
||||||
JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
|
JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
|
||||||
@@ -60,7 +62,7 @@ JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")
|
|||||||
JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
|
JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
|
||||||
JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
|
JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
|
||||||
JMESSAGE(JTRC_GIF_BADVERSION,
|
JMESSAGE(JTRC_GIF_BADVERSION,
|
||||||
"Warning: unexpected GIF version number '%c%c%c'")
|
"Warning: unexpected GIF version number '%c%c%c'")
|
||||||
JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
|
JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
|
||||||
JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
|
JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
|
||||||
JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
|
JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
|
||||||
@@ -72,7 +74,7 @@ JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
|
|||||||
#ifdef PPM_SUPPORTED
|
#ifdef PPM_SUPPORTED
|
||||||
JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
|
JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
|
||||||
JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
|
JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
|
||||||
JMESSAGE(JERR_PPM_NOT, "Not a PPM file")
|
JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")
|
||||||
JMESSAGE(JTRC_PGM, "%ux%u PGM image")
|
JMESSAGE(JTRC_PGM, "%ux%u PGM image")
|
||||||
JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
|
JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
|
||||||
JMESSAGE(JTRC_PPM, "%ux%u PPM image")
|
JMESSAGE(JTRC_PPM, "%ux%u PPM image")
|
||||||
@@ -108,13 +110,13 @@ JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")
|
|||||||
#endif /* TARGA_SUPPORTED */
|
#endif /* TARGA_SUPPORTED */
|
||||||
|
|
||||||
JMESSAGE(JERR_BAD_CMAP_FILE,
|
JMESSAGE(JERR_BAD_CMAP_FILE,
|
||||||
"Color map file is invalid or of unsupported format")
|
"Color map file is invalid or of unsupported format")
|
||||||
JMESSAGE(JERR_TOO_MANY_COLORS,
|
JMESSAGE(JERR_TOO_MANY_COLORS,
|
||||||
"Output file format cannot handle %d colormap entries")
|
"Output file format cannot handle %d colormap entries")
|
||||||
JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
|
JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
|
||||||
#ifdef TARGA_SUPPORTED
|
#ifdef TARGA_SUPPORTED
|
||||||
JMESSAGE(JERR_UNKNOWN_FORMAT,
|
JMESSAGE(JERR_UNKNOWN_FORMAT,
|
||||||
"Unrecognized input file format --- perhaps you need -targa")
|
"Unrecognized input file format --- perhaps you need -targa")
|
||||||
#else
|
#else
|
||||||
JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
|
JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
143
cdjpeg.c
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
/*
|
||||||
|
* cdjpeg.c
|
||||||
|
*
|
||||||
|
* This file was part of the Independent JPEG Group's software:
|
||||||
|
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||||
|
* It was modified by The libjpeg-turbo Project to include only code relevant
|
||||||
|
* to libjpeg-turbo.
|
||||||
|
* For conditions of distribution and use, see the accompanying README file.
|
||||||
|
*
|
||||||
|
* This file contains common support routines used by the IJG application
|
||||||
|
* programs (cjpeg, djpeg, jpegtran).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||||
|
#include <ctype.h> /* to declare isupper(), tolower() */
|
||||||
|
#ifdef USE_SETMODE
|
||||||
|
#include <fcntl.h> /* to declare setmode()'s parameter macros */
|
||||||
|
/* If you have setmode() but not <io.h>, just delete this line: */
|
||||||
|
#include <io.h> /* to declare setmode() */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Optional progress monitor: display a percent-done figure on stderr.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef PROGRESS_REPORT
|
||||||
|
|
||||||
|
METHODDEF(void)
|
||||||
|
progress_monitor (j_common_ptr cinfo)
|
||||||
|
{
|
||||||
|
cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress;
|
||||||
|
int total_passes = prog->pub.total_passes + prog->total_extra_passes;
|
||||||
|
int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit);
|
||||||
|
|
||||||
|
if (percent_done != prog->percent_done) {
|
||||||
|
prog->percent_done = percent_done;
|
||||||
|
if (total_passes > 1) {
|
||||||
|
fprintf(stderr, "\rPass %d/%d: %3d%% ",
|
||||||
|
prog->pub.completed_passes + prog->completed_extra_passes + 1,
|
||||||
|
total_passes, percent_done);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "\r %3d%% ", percent_done);
|
||||||
|
}
|
||||||
|
fflush(stderr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GLOBAL(void)
|
||||||
|
start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress)
|
||||||
|
{
|
||||||
|
/* Enable progress display, unless trace output is on */
|
||||||
|
if (cinfo->err->trace_level == 0) {
|
||||||
|
progress->pub.progress_monitor = progress_monitor;
|
||||||
|
progress->completed_extra_passes = 0;
|
||||||
|
progress->total_extra_passes = 0;
|
||||||
|
progress->percent_done = -1;
|
||||||
|
cinfo->progress = &progress->pub;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GLOBAL(void)
|
||||||
|
end_progress_monitor (j_common_ptr cinfo)
|
||||||
|
{
|
||||||
|
/* Clear away progress display */
|
||||||
|
if (cinfo->err->trace_level == 0) {
|
||||||
|
fprintf(stderr, "\r \r");
|
||||||
|
fflush(stderr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Case-insensitive matching of possibly-abbreviated keyword switches.
|
||||||
|
* keyword is the constant keyword (must be lower case already),
|
||||||
|
* minchars is length of minimum legal abbreviation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
GLOBAL(boolean)
|
||||||
|
keymatch (char * arg, const char * keyword, int minchars)
|
||||||
|
{
|
||||||
|
register int ca, ck;
|
||||||
|
register int nmatched = 0;
|
||||||
|
|
||||||
|
while ((ca = *arg++) != '\0') {
|
||||||
|
if ((ck = *keyword++) == '\0')
|
||||||
|
return FALSE; /* arg longer than keyword, no good */
|
||||||
|
if (isupper(ca)) /* force arg to lcase (assume ck is already) */
|
||||||
|
ca = tolower(ca);
|
||||||
|
if (ca != ck)
|
||||||
|
return FALSE; /* no good */
|
||||||
|
nmatched++; /* count matched characters */
|
||||||
|
}
|
||||||
|
/* reached end of argument; fail if it's too short for unique abbrev */
|
||||||
|
if (nmatched < minchars)
|
||||||
|
return FALSE;
|
||||||
|
return TRUE; /* A-OK */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Routines to establish binary I/O mode for stdin and stdout.
|
||||||
|
* Non-Unix systems often require some hacking to get out of text mode.
|
||||||
|
*/
|
||||||
|
|
||||||
|
GLOBAL(FILE *)
|
||||||
|
read_stdin (void)
|
||||||
|
{
|
||||||
|
FILE * input_file = stdin;
|
||||||
|
|
||||||
|
#ifdef USE_SETMODE /* need to hack file mode? */
|
||||||
|
setmode(fileno(stdin), O_BINARY);
|
||||||
|
#endif
|
||||||
|
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
|
||||||
|
if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
|
||||||
|
fprintf(stderr, "Cannot reopen stdin\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return input_file;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GLOBAL(FILE *)
|
||||||
|
write_stdout (void)
|
||||||
|
{
|
||||||
|
FILE * output_file = stdout;
|
||||||
|
|
||||||
|
#ifdef USE_SETMODE /* need to hack file mode? */
|
||||||
|
setmode(fileno(stdout), O_BINARY);
|
||||||
|
#endif
|
||||||
|
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
|
||||||
|
if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) {
|
||||||
|
fprintf(stderr, "Cannot reopen stdout\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return output_file;
|
||||||
|
}
|
||||||
122
cdjpeg.h
@@ -1,20 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* cdjpeg.h
|
* cdjpeg.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 1994, Thomas G. Lane.
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||||
|
* It was modified by The libjpeg-turbo Project to include only code relevant
|
||||||
|
* to libjpeg-turbo.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* For conditions of distribution and use, see the accompanying README file.
|
||||||
*
|
*
|
||||||
* This file contains common declarations for the sample applications
|
* This file contains common declarations for the sample applications
|
||||||
* cjpeg and djpeg. It is NOT used by the core JPEG library.
|
* cjpeg and djpeg. It is NOT used by the core JPEG library.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */
|
#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */
|
||||||
#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
|
#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
|
||||||
#include "jinclude.h"
|
#include "jinclude.h"
|
||||||
#include "jpeglib.h"
|
#include "jpeglib.h"
|
||||||
#include "jerror.h" /* get library error codes too */
|
#include "jerror.h" /* get library error codes too */
|
||||||
#include "cderror.h" /* get application-specific error codes */
|
#include "cderror.h" /* get application-specific error codes */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -24,12 +26,9 @@
|
|||||||
typedef struct cjpeg_source_struct * cjpeg_source_ptr;
|
typedef struct cjpeg_source_struct * cjpeg_source_ptr;
|
||||||
|
|
||||||
struct cjpeg_source_struct {
|
struct cjpeg_source_struct {
|
||||||
JMETHOD(void, start_input, (j_compress_ptr cinfo,
|
void (*start_input) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
|
||||||
cjpeg_source_ptr sinfo));
|
JDIMENSION (*get_pixel_rows) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
|
||||||
JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
|
void (*finish_input) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
|
||||||
cjpeg_source_ptr sinfo));
|
|
||||||
JMETHOD(void, finish_input, (j_compress_ptr cinfo,
|
|
||||||
cjpeg_source_ptr sinfo));
|
|
||||||
|
|
||||||
FILE *input_file;
|
FILE *input_file;
|
||||||
|
|
||||||
@@ -48,15 +47,12 @@ struct djpeg_dest_struct {
|
|||||||
/* start_output is called after jpeg_start_decompress finishes.
|
/* start_output is called after jpeg_start_decompress finishes.
|
||||||
* The color map will be ready at this time, if one is needed.
|
* The color map will be ready at this time, if one is needed.
|
||||||
*/
|
*/
|
||||||
JMETHOD(void, start_output, (j_decompress_ptr cinfo,
|
void (*start_output) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo);
|
||||||
djpeg_dest_ptr dinfo));
|
|
||||||
/* Emit the specified number of pixel rows from the buffer. */
|
/* Emit the specified number of pixel rows from the buffer. */
|
||||||
JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,
|
void (*put_pixel_rows) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
|
||||||
djpeg_dest_ptr dinfo,
|
JDIMENSION rows_supplied);
|
||||||
JDIMENSION rows_supplied));
|
|
||||||
/* Finish up at the end of the image. */
|
/* Finish up at the end of the image. */
|
||||||
JMETHOD(void, finish_output, (j_decompress_ptr cinfo,
|
void (*finish_output) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo);
|
||||||
djpeg_dest_ptr dinfo));
|
|
||||||
|
|
||||||
/* Target file spec; filled in by djpeg.c after object is created. */
|
/* Target file spec; filled in by djpeg.c after object is created. */
|
||||||
FILE * output_file;
|
FILE * output_file;
|
||||||
@@ -79,9 +75,9 @@ struct djpeg_dest_struct {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
struct cdjpeg_progress_mgr {
|
struct cdjpeg_progress_mgr {
|
||||||
struct jpeg_progress_mgr pub; /* fields known to JPEG library */
|
struct jpeg_progress_mgr pub; /* fields known to JPEG library */
|
||||||
int completed_extra_passes; /* extra passes completed */
|
int completed_extra_passes; /* extra passes completed */
|
||||||
int total_extra_passes; /* total extra */
|
int total_extra_passes; /* total extra */
|
||||||
/* last printed percentage stored here to avoid multiple printouts */
|
/* last printed percentage stored here to avoid multiple printouts */
|
||||||
int percent_done;
|
int percent_done;
|
||||||
};
|
};
|
||||||
@@ -89,36 +85,60 @@ struct cdjpeg_progress_mgr {
|
|||||||
typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
|
typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
|
||||||
|
|
||||||
|
|
||||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
|
||||||
|
|
||||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
|
||||||
#define jinit_read_bmp jIRdBMP
|
|
||||||
#define jinit_write_bmp jIWrBMP
|
|
||||||
#define jinit_read_gif jIRdGIF
|
|
||||||
#define jinit_write_gif jIWrGIF
|
|
||||||
#define jinit_read_ppm jIRdPPM
|
|
||||||
#define jinit_write_ppm jIWrPPM
|
|
||||||
#define jinit_read_rle jIRdRLE
|
|
||||||
#define jinit_write_rle jIWrRLE
|
|
||||||
#define jinit_read_targa jIRdTarga
|
|
||||||
#define jinit_write_targa jIWrTarga
|
|
||||||
#define read_color_map RdCMap
|
|
||||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
|
||||||
|
|
||||||
/* Module selection routines for I/O modules. */
|
/* Module selection routines for I/O modules. */
|
||||||
|
|
||||||
EXTERN cjpeg_source_ptr jinit_read_bmp JPP((j_compress_ptr cinfo));
|
EXTERN(cjpeg_source_ptr) jinit_read_bmp (j_compress_ptr cinfo);
|
||||||
EXTERN djpeg_dest_ptr jinit_write_bmp JPP((j_decompress_ptr cinfo,
|
EXTERN(djpeg_dest_ptr) jinit_write_bmp (j_decompress_ptr cinfo,
|
||||||
boolean is_os2));
|
boolean is_os2);
|
||||||
EXTERN cjpeg_source_ptr jinit_read_gif JPP((j_compress_ptr cinfo));
|
EXTERN(cjpeg_source_ptr) jinit_read_gif (j_compress_ptr cinfo);
|
||||||
EXTERN djpeg_dest_ptr jinit_write_gif JPP((j_decompress_ptr cinfo));
|
EXTERN(djpeg_dest_ptr) jinit_write_gif (j_decompress_ptr cinfo);
|
||||||
EXTERN cjpeg_source_ptr jinit_read_ppm JPP((j_compress_ptr cinfo));
|
EXTERN(cjpeg_source_ptr) jinit_read_ppm (j_compress_ptr cinfo);
|
||||||
EXTERN djpeg_dest_ptr jinit_write_ppm JPP((j_decompress_ptr cinfo));
|
EXTERN(djpeg_dest_ptr) jinit_write_ppm (j_decompress_ptr cinfo);
|
||||||
EXTERN cjpeg_source_ptr jinit_read_rle JPP((j_compress_ptr cinfo));
|
EXTERN(cjpeg_source_ptr) jinit_read_rle (j_compress_ptr cinfo);
|
||||||
EXTERN djpeg_dest_ptr jinit_write_rle JPP((j_decompress_ptr cinfo));
|
EXTERN(djpeg_dest_ptr) jinit_write_rle (j_decompress_ptr cinfo);
|
||||||
EXTERN cjpeg_source_ptr jinit_read_targa JPP((j_compress_ptr cinfo));
|
EXTERN(cjpeg_source_ptr) jinit_read_targa (j_compress_ptr cinfo);
|
||||||
EXTERN djpeg_dest_ptr jinit_write_targa JPP((j_decompress_ptr cinfo));
|
EXTERN(djpeg_dest_ptr) jinit_write_targa (j_decompress_ptr cinfo);
|
||||||
|
|
||||||
/* Other global routines */
|
/* cjpeg support routines (in rdswitch.c) */
|
||||||
|
|
||||||
EXTERN void read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
|
EXTERN(boolean) read_quant_tables (j_compress_ptr cinfo, char * filename,
|
||||||
|
boolean force_baseline);
|
||||||
|
EXTERN(boolean) read_scan_script (j_compress_ptr cinfo, char * filename);
|
||||||
|
EXTERN(boolean) set_quality_ratings (j_compress_ptr cinfo, char *arg,
|
||||||
|
boolean force_baseline);
|
||||||
|
EXTERN(boolean) set_quant_slots (j_compress_ptr cinfo, char *arg);
|
||||||
|
EXTERN(boolean) set_sample_factors (j_compress_ptr cinfo, char *arg);
|
||||||
|
|
||||||
|
/* djpeg support routines (in rdcolmap.c) */
|
||||||
|
|
||||||
|
EXTERN(void) read_color_map (j_decompress_ptr cinfo, FILE * infile);
|
||||||
|
|
||||||
|
/* common support routines (in cdjpeg.c) */
|
||||||
|
|
||||||
|
EXTERN(void) enable_signal_catcher (j_common_ptr cinfo);
|
||||||
|
EXTERN(void) start_progress_monitor (j_common_ptr cinfo,
|
||||||
|
cd_progress_ptr progress);
|
||||||
|
EXTERN(void) end_progress_monitor (j_common_ptr cinfo);
|
||||||
|
EXTERN(boolean) keymatch (char * arg, const char * keyword, int minchars);
|
||||||
|
EXTERN(FILE *) read_stdin (void);
|
||||||
|
EXTERN(FILE *) write_stdout (void);
|
||||||
|
|
||||||
|
/* miscellaneous useful macros */
|
||||||
|
|
||||||
|
#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
|
||||||
|
#define READ_BINARY "r"
|
||||||
|
#define WRITE_BINARY "w"
|
||||||
|
#else
|
||||||
|
#define READ_BINARY "rb"
|
||||||
|
#define WRITE_BINARY "wb"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef EXIT_FAILURE /* define exit() codes if not provided */
|
||||||
|
#define EXIT_FAILURE 1
|
||||||
|
#endif
|
||||||
|
#ifndef EXIT_SUCCESS
|
||||||
|
#define EXIT_SUCCESS 0
|
||||||
|
#endif
|
||||||
|
#ifndef EXIT_WARNING
|
||||||
|
#define EXIT_WARNING 2
|
||||||
|
#endif
|
||||||
|
|||||||
212
change.log
@@ -1,6 +1,218 @@
|
|||||||
|
NOTE: This file was modified by The libjpeg-turbo Project to include only
|
||||||
|
information relevant to libjpeg-turbo.
|
||||||
|
|
||||||
CHANGE LOG for Independent JPEG Group's JPEG software
|
CHANGE LOG for Independent JPEG Group's JPEG software
|
||||||
|
|
||||||
|
|
||||||
|
Version 8d 15-Jan-2012
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Add cjpeg -rgb option to create RGB JPEG files.
|
||||||
|
Using this switch suppresses the conversion from RGB
|
||||||
|
colorspace input to the default YCbCr JPEG colorspace.
|
||||||
|
Thank to Michael Koch for the initial suggestion.
|
||||||
|
|
||||||
|
Add option to disable the region adjustment in the transupp crop code.
|
||||||
|
Thank to Jeffrey Friedl for the suggestion.
|
||||||
|
|
||||||
|
|
||||||
|
Version 8b 16-May-2010
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Repair problem in new memory source manager with corrupt JPEG data.
|
||||||
|
Thank to Ted Campbell and Samuel Chun for the report.
|
||||||
|
|
||||||
|
|
||||||
|
Version 8a 28-Feb-2010
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Writing tables-only datastreams via jpeg_write_tables works again.
|
||||||
|
|
||||||
|
Support 32-bit BMPs (RGB image with Alpha channel) for read in cjpeg.
|
||||||
|
Thank to Brett Blackham for the suggestion.
|
||||||
|
|
||||||
|
|
||||||
|
Version 8 10-Jan-2010
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Add sanity check in BMP reader module to avoid cjpeg crash for empty input
|
||||||
|
image (thank to Isaev Ildar of ISP RAS, Moscow, RU for reporting this error).
|
||||||
|
|
||||||
|
Add data source and destination managers for read from and write to
|
||||||
|
memory buffers. New API functions jpeg_mem_src and jpeg_mem_dest.
|
||||||
|
Thank to Roberto Boni from Italy for the suggestion.
|
||||||
|
|
||||||
|
|
||||||
|
Version 7 27-Jun-2009
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
New scaled DCTs implemented.
|
||||||
|
djpeg now supports scalings N/8 with all N from 1 to 16.
|
||||||
|
|
||||||
|
cjpeg -quality option has been extended for support of separate quality
|
||||||
|
settings for luminance and chrominance (or in general, for every provided
|
||||||
|
quantization table slot).
|
||||||
|
New API function jpeg_default_qtables() and q_scale_factor array in library.
|
||||||
|
|
||||||
|
Support arithmetic entropy encoding and decoding.
|
||||||
|
Added files jaricom.c, jcarith.c, jdarith.c.
|
||||||
|
|
||||||
|
jpegtran has a new "lossless" cropping feature.
|
||||||
|
|
||||||
|
Implement -perfect option in jpegtran, new API function
|
||||||
|
jtransform_perfect_transform() in transupp. (DP 204_perfect.dpatch)
|
||||||
|
|
||||||
|
Better error messages for jpegtran fopen failure.
|
||||||
|
(DP 203_jpegtran_errmsg.dpatch)
|
||||||
|
|
||||||
|
Fix byte order issue with 16bit PPM/PGM files in rdppm.c/wrppm.c:
|
||||||
|
according to Netpbm, the de facto standard implementation of the PNM formats,
|
||||||
|
the most significant byte is first. (DP 203_rdppm.dpatch)
|
||||||
|
|
||||||
|
Add -raw option to rdjpgcom not to mangle the output.
|
||||||
|
(DP 205_rdjpgcom_raw.dpatch)
|
||||||
|
|
||||||
|
Make rdjpgcom locale aware. (DP 201_rdjpgcom_locale.dpatch)
|
||||||
|
|
||||||
|
Add extern "C" to jpeglib.h.
|
||||||
|
This avoids the need to put extern "C" { ... } around #include "jpeglib.h"
|
||||||
|
in your C++ application. Defining the symbol DONT_USE_EXTERN_C in the
|
||||||
|
configuration prevents this. (DP 202_jpeglib.h_c++.dpatch)
|
||||||
|
|
||||||
|
|
||||||
|
Version 6b 27-Mar-1998
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
jpegtran has new features for lossless image transformations (rotation
|
||||||
|
and flipping) as well as "lossless" reduction to grayscale.
|
||||||
|
|
||||||
|
jpegtran now copies comments by default; it has a -copy switch to enable
|
||||||
|
copying all APPn blocks as well, or to suppress comments. (Formerly it
|
||||||
|
always suppressed comments and APPn blocks.) jpegtran now also preserves
|
||||||
|
JFIF version and resolution information.
|
||||||
|
|
||||||
|
New decompressor library feature: COM and APPn markers found in the input
|
||||||
|
file can be saved in memory for later use by the application. (Before,
|
||||||
|
you had to code this up yourself with a custom marker processor.)
|
||||||
|
|
||||||
|
There is an unused field "void * client_data" now in compress and decompress
|
||||||
|
parameter structs; this may be useful in some applications.
|
||||||
|
|
||||||
|
JFIF version number information is now saved by the decoder and accepted by
|
||||||
|
the encoder. jpegtran uses this to copy the source file's version number,
|
||||||
|
to ensure "jpegtran -copy all" won't create bogus files that contain JFXX
|
||||||
|
extensions but claim to be version 1.01. Applications that generate their
|
||||||
|
own JFXX extension markers also (finally) have a supported way to cause the
|
||||||
|
encoder to emit JFIF version number 1.02.
|
||||||
|
|
||||||
|
djpeg's trace mode reports JFIF 1.02 thumbnail images as such, rather
|
||||||
|
than as unknown APP0 markers.
|
||||||
|
|
||||||
|
In -verbose mode, djpeg and rdjpgcom will try to print the contents of
|
||||||
|
APP12 markers as text. Some digital cameras store useful text information
|
||||||
|
in APP12 markers.
|
||||||
|
|
||||||
|
Handling of truncated data streams is more robust: blocks beyond the one in
|
||||||
|
which the error occurs will be output as uniform gray, or left unchanged
|
||||||
|
if decoding a progressive JPEG. The appearance no longer depends on the
|
||||||
|
Huffman tables being used.
|
||||||
|
|
||||||
|
Huffman tables are checked for validity much more carefully than before.
|
||||||
|
|
||||||
|
To avoid the Unisys LZW patent, djpeg's GIF output capability has been
|
||||||
|
changed to produce "uncompressed GIFs", and cjpeg's GIF input capability
|
||||||
|
has been removed altogether. We're not happy about it either, but there
|
||||||
|
seems to be no good alternative.
|
||||||
|
|
||||||
|
The configure script now supports building libjpeg as a shared library
|
||||||
|
on many flavors of Unix (all the ones that GNU libtool knows how to
|
||||||
|
build shared libraries for). Use "./configure --enable-shared" to
|
||||||
|
try this out.
|
||||||
|
|
||||||
|
New jconfig file and makefiles for Microsoft Visual C++ and Developer Studio.
|
||||||
|
Also, a jconfig file and a build script for Metrowerks CodeWarrior
|
||||||
|
on Apple Macintosh. makefile.dj has been updated for DJGPP v2, and there
|
||||||
|
are miscellaneous other minor improvements in the makefiles.
|
||||||
|
|
||||||
|
jmemmac.c now knows how to create temporary files following Mac System 7
|
||||||
|
conventions.
|
||||||
|
|
||||||
|
djpeg's -map switch is now able to read raw-format PPM files reliably.
|
||||||
|
|
||||||
|
cjpeg -progressive -restart no longer generates any unnecessary DRI markers.
|
||||||
|
|
||||||
|
Multiple calls to jpeg_simple_progression for a single JPEG object
|
||||||
|
no longer leak memory.
|
||||||
|
|
||||||
|
|
||||||
|
Version 6a 7-Feb-96
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Library initialization sequence modified to detect version mismatches
|
||||||
|
and struct field packing mismatches between library and calling application.
|
||||||
|
This change requires applications to be recompiled, but does not require
|
||||||
|
any application source code change.
|
||||||
|
|
||||||
|
All routine declarations changed to the style "GLOBAL(type) name ...",
|
||||||
|
that is, GLOBAL, LOCAL, METHODDEF, EXTERN are now macros taking the
|
||||||
|
routine's return type as an argument. This makes it possible to add
|
||||||
|
Microsoft-style linkage keywords to all the routines by changing just
|
||||||
|
these macros. Note that any application code that was using these macros
|
||||||
|
will have to be changed.
|
||||||
|
|
||||||
|
DCT coefficient quantization tables are now stored in normal array order
|
||||||
|
rather than zigzag order. Application code that calls jpeg_add_quant_table,
|
||||||
|
or otherwise manipulates quantization tables directly, will need to be
|
||||||
|
changed. If you need to make such code work with either older or newer
|
||||||
|
versions of the library, a test like "#if JPEG_LIB_VERSION >= 61" is
|
||||||
|
recommended.
|
||||||
|
|
||||||
|
djpeg's trace capability now dumps DQT tables in natural order, not zigzag
|
||||||
|
order. This allows the trace output to be made into a "-qtables" file
|
||||||
|
more easily.
|
||||||
|
|
||||||
|
New system-dependent memory manager module for use on Apple Macintosh.
|
||||||
|
|
||||||
|
Fix bug in cjpeg's -smooth option: last one or two scanlines would be
|
||||||
|
duplicates of the prior line unless the image height mod 16 was 1 or 2.
|
||||||
|
|
||||||
|
Repair minor problems in VMS, BCC, MC6 makefiles.
|
||||||
|
|
||||||
|
New configure script based on latest GNU Autoconf.
|
||||||
|
|
||||||
|
Correct the list of include files needed by MetroWerks C for ccommand().
|
||||||
|
|
||||||
|
Numerous small documentation updates.
|
||||||
|
|
||||||
|
|
||||||
|
Version 6 2-Aug-95
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Progressive JPEG support: library can read and write full progressive JPEG
|
||||||
|
files. A "buffered image" mode supports incremental decoding for on-the-fly
|
||||||
|
display of progressive images. Simply recompiling an existing IJG-v5-based
|
||||||
|
decoder with v6 should allow it to read progressive files, though of course
|
||||||
|
without any special progressive display.
|
||||||
|
|
||||||
|
New "jpegtran" application performs lossless transcoding between different
|
||||||
|
JPEG formats; primarily, it can be used to convert baseline to progressive
|
||||||
|
JPEG and vice versa. In support of jpegtran, the library now allows lossless
|
||||||
|
reading and writing of JPEG files as DCT coefficient arrays. This ability
|
||||||
|
may be of use in other applications.
|
||||||
|
|
||||||
|
Notes for programmers:
|
||||||
|
* We changed jpeg_start_decompress() to be able to suspend; this makes all
|
||||||
|
decoding modes available to suspending-input applications. However,
|
||||||
|
existing applications that use suspending input will need to be changed
|
||||||
|
to check the return value from jpeg_start_decompress(). You don't need to
|
||||||
|
do anything if you don't use a suspending data source.
|
||||||
|
* We changed the interface to the virtual array routines: access_virt_array
|
||||||
|
routines now take a count of the number of rows to access this time. The
|
||||||
|
last parameter to request_virt_array routines is now interpreted as the
|
||||||
|
maximum number of rows that may be accessed at once, but not necessarily
|
||||||
|
the height of every access.
|
||||||
|
|
||||||
|
|
||||||
Version 5b 15-Mar-95
|
Version 5b 15-Mar-95
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|||||||
170
cjpeg.1
@@ -1,4 +1,4 @@
|
|||||||
.TH CJPEG 1 "12 December 1994"
|
.TH CJPEG 1 "21 November 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
cjpeg \- compress an image file to a JPEG file
|
cjpeg \- compress an image file to a JPEG file
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -16,7 +16,7 @@ cjpeg \- compress an image file to a JPEG file
|
|||||||
compresses the named image file, or the standard input if no file is
|
compresses the named image file, or the standard input if no file is
|
||||||
named, and produces a JPEG/JFIF file on the standard output.
|
named, and produces a JPEG/JFIF file on the standard output.
|
||||||
The currently supported input file formats are: PPM (PBMPLUS color
|
The currently supported input file formats are: PPM (PBMPLUS color
|
||||||
format), PGM (PBMPLUS gray-scale format), BMP, GIF, Targa, and RLE (Utah Raster
|
format), PGM (PBMPLUS grayscale format), BMP, Targa, and RLE (Utah Raster
|
||||||
Toolkit format). (RLE is supported only if the URT library is available.)
|
Toolkit format). (RLE is supported only if the URT library is available.)
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
All switch names may be abbreviated; for example,
|
All switch names may be abbreviated; for example,
|
||||||
@@ -27,28 +27,33 @@ or
|
|||||||
.BR \-gr .
|
.BR \-gr .
|
||||||
Most of the "basic" switches can be abbreviated to as little as one letter.
|
Most of the "basic" switches can be abbreviated to as little as one letter.
|
||||||
Upper and lower case are equivalent (thus
|
Upper and lower case are equivalent (thus
|
||||||
.B \-GIF
|
.B \-BMP
|
||||||
is the same as
|
is the same as
|
||||||
.BR \-gif ).
|
.BR \-bmp ).
|
||||||
British spellings are also accepted (e.g.,
|
British spellings are also accepted (e.g.,
|
||||||
.BR \-greyscale ),
|
.BR \-greyscale ),
|
||||||
though for brevity these are not mentioned below.
|
though for brevity these are not mentioned below.
|
||||||
.PP
|
.PP
|
||||||
The basic switches are:
|
The basic switches are:
|
||||||
.TP
|
.TP
|
||||||
.BI \-quality " N"
|
.BI \-quality " N[,...]"
|
||||||
Scale quantization tables to adjust image quality. Quality is 0 (worst) to
|
Scale quantization tables to adjust image quality. Quality is 0 (worst) to
|
||||||
100 (best); default is 75. (See below for more info.)
|
100 (best); default is 75. (See below for more info.)
|
||||||
.TP
|
.TP
|
||||||
.B \-grayscale
|
.B \-grayscale
|
||||||
Create monochrome JPEG file from color input. Be sure to use this switch when
|
Create monochrome JPEG file from color input. Be sure to use this switch when
|
||||||
compressing a grayscale GIF file, because
|
compressing a grayscale BMP file, because
|
||||||
.B cjpeg
|
.B cjpeg
|
||||||
isn't bright enough to notice whether a GIF file uses only shades of gray.
|
isn't bright enough to notice whether a BMP file uses only shades of gray.
|
||||||
By saying
|
By saying
|
||||||
.BR \-grayscale ,
|
.BR \-grayscale ,
|
||||||
you'll get a smaller JPEG file that takes less time to process.
|
you'll get a smaller JPEG file that takes less time to process.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-rgb
|
||||||
|
Create RGB JPEG file.
|
||||||
|
Using this switch suppresses the conversion from RGB
|
||||||
|
colorspace input to the default YCbCr JPEG colorspace.
|
||||||
|
.TP
|
||||||
.B \-optimize
|
.B \-optimize
|
||||||
Perform optimization of entropy encoding parameters. Without this, default
|
Perform optimization of entropy encoding parameters. Without this, default
|
||||||
encoding parameters are used.
|
encoding parameters are used.
|
||||||
@@ -59,6 +64,9 @@ runs somewhat slower and needs much more memory. Image quality and speed of
|
|||||||
decompression are unaffected by
|
decompression are unaffected by
|
||||||
.BR \-optimize .
|
.BR \-optimize .
|
||||||
.TP
|
.TP
|
||||||
|
.B \-progressive
|
||||||
|
Create progressive JPEG file (see below).
|
||||||
|
.TP
|
||||||
.B \-targa
|
.B \-targa
|
||||||
Input file is Targa format. Targa files that contain an "identification"
|
Input file is Targa format. Targa files that contain an "identification"
|
||||||
field will not be automatically recognized by
|
field will not be automatically recognized by
|
||||||
@@ -84,7 +92,7 @@ often about right. If you see defects at
|
|||||||
image. (The optimal setting will vary from one image to another.)
|
image. (The optimal setting will vary from one image to another.)
|
||||||
.PP
|
.PP
|
||||||
.B \-quality
|
.B \-quality
|
||||||
100 will generate a quantization table of all 1's, eliminating loss in the
|
100 will generate a quantization table of all 1's, minimizing loss in the
|
||||||
quantization step (but there is still information loss in subsampling, as well
|
quantization step (but there is still information loss in subsampling, as well
|
||||||
as roundoff error). This setting is mainly of interest for experimental
|
as roundoff error). This setting is mainly of interest for experimental
|
||||||
purposes. Quality values above about 95 are
|
purposes. Quality values above about 95 are
|
||||||
@@ -101,25 +109,84 @@ values below about 25 generate 2-byte quantization tables, which are
|
|||||||
considered optional in the JPEG standard.
|
considered optional in the JPEG standard.
|
||||||
.B cjpeg
|
.B cjpeg
|
||||||
emits a warning message when you give such a quality value, because some
|
emits a warning message when you give such a quality value, because some
|
||||||
commercial JPEG programs may be unable to decode the resulting file. Use
|
other JPEG programs may be unable to decode the resulting file. Use
|
||||||
.B \-baseline
|
.B \-baseline
|
||||||
if you need to ensure compatibility at low quality values.)
|
if you need to ensure compatibility at low quality values.)
|
||||||
.PP
|
.PP
|
||||||
|
The \fB-quality\fR option has been extended in this version of \fBcjpeg\fR to
|
||||||
|
support separate quality settings for luminance and chrominance (or, in
|
||||||
|
general, separate settings for every quantization table slot.) The principle
|
||||||
|
is the same as chrominance subsampling: since the human eye is more sensitive
|
||||||
|
to spatial changes in brightness than spatial changes in color, the chrominance
|
||||||
|
components can be quantized more than the luminance components without
|
||||||
|
incurring any visible image quality loss. However, unlike subsampling, this
|
||||||
|
feature reduces data in the frequency domain instead of the spatial domain,
|
||||||
|
which allows for more fine-grained control. This option is useful in
|
||||||
|
quality-sensitive applications, for which the artifacts generated by
|
||||||
|
subsampling may be unacceptable.
|
||||||
|
.PP
|
||||||
|
The \fB-quality\fR option accepts a comma-separated list of parameters, which
|
||||||
|
respectively refer to the quality levels that should be assigned to the
|
||||||
|
quantization table slots. If there are more q-table slots than parameters,
|
||||||
|
then the last parameter is replicated. Thus, if only one quality parameter is
|
||||||
|
given, this is used for both luminance and chrominance (slots 0 and 1,
|
||||||
|
respectively), preserving the legacy behavior of cjpeg v6b and prior.
|
||||||
|
More (or customized) quantization tables can be set with the \fB-qtables\fR
|
||||||
|
option and assigned to components with the \fB-qslots\fR option (see the
|
||||||
|
"wizard" switches below.)
|
||||||
|
.PP
|
||||||
|
JPEG files generated with separate luminance and chrominance quality are fully
|
||||||
|
compliant with standard JPEG decoders.
|
||||||
|
.PP
|
||||||
|
.BR CAUTION:
|
||||||
|
For this setting to be useful, be sure to pass an argument of \fB-sample 1x1\fR
|
||||||
|
to \fBcjpeg\fR to disable chrominance subsampling. Otherwise, the default
|
||||||
|
subsampling level (2x2, AKA "4:2:0") will be used.
|
||||||
|
.PP
|
||||||
|
The
|
||||||
|
.B \-progressive
|
||||||
|
switch creates a "progressive JPEG" file. In this type of JPEG file, the data
|
||||||
|
is stored in multiple scans of increasing quality. If the file is being
|
||||||
|
transmitted over a slow communications link, the decoder can use the first
|
||||||
|
scan to display a low-quality image very quickly, and can then improve the
|
||||||
|
display with each subsequent scan. The final image is exactly equivalent to a
|
||||||
|
standard JPEG file of the same quality setting, and the total file size is
|
||||||
|
about the same --- often a little smaller.
|
||||||
|
.PP
|
||||||
Switches for advanced users:
|
Switches for advanced users:
|
||||||
.TP
|
.TP
|
||||||
|
.B \-arithmetic
|
||||||
|
Use arithmetic coding.
|
||||||
|
.B Caution:
|
||||||
|
arithmetic coded JPEG is not yet widely implemented, so many decoders will be
|
||||||
|
unable to view an arithmetic coded JPEG file at all.
|
||||||
|
.TP
|
||||||
.B \-dct int
|
.B \-dct int
|
||||||
Use integer DCT method (default).
|
Use integer DCT method (default).
|
||||||
.TP
|
.TP
|
||||||
.B \-dct fast
|
.B \-dct fast
|
||||||
Use fast integer DCT (less accurate).
|
Use fast integer DCT (less accurate).
|
||||||
|
In libjpeg-turbo, the fast method is generally about 5-15% faster than the int
|
||||||
|
method when using the x86/x86-64 SIMD extensions (results may vary with other
|
||||||
|
SIMD implementations, or when using libjpeg-turbo without SIMD extensions.)
|
||||||
|
For quality levels of 90 and below, there should be little or no perceptible
|
||||||
|
difference between the two algorithms. For quality levels above 90, however,
|
||||||
|
the difference between the fast and the int methods becomes more pronounced.
|
||||||
|
With quality=97, for instance, the fast method incurs generally about a 1-3 dB
|
||||||
|
loss (in PSNR) relative to the int method, but this can be larger for some
|
||||||
|
images. Do not use the fast method with quality levels above 97. The
|
||||||
|
algorithm often degenerates at quality=98 and above and can actually produce a
|
||||||
|
more lossy image than if lower quality levels had been used. Also, in
|
||||||
|
libjpeg-turbo, the fast method is not fully accelerated for quality levels
|
||||||
|
above 97, so it will be slower than the int method.
|
||||||
.TP
|
.TP
|
||||||
.B \-dct float
|
.B \-dct float
|
||||||
Use floating-point DCT method.
|
Use floating-point DCT method.
|
||||||
The float method is very slightly more accurate than the int method, but is
|
The float method is mainly a legacy feature. It does not produce significantly
|
||||||
much slower unless your machine has very fast floating-point hardware. Also
|
more accurate results than the int method, and it is much slower. The float
|
||||||
note that results of the floating-point method may vary slightly across
|
method may also give different results on different machines due to varying
|
||||||
machines, while the integer methods should give the same results everywhere.
|
roundoff behavior, whereas the integer methods should give the same results on
|
||||||
The fast integer method is much less accurate than the other two.
|
all machines.
|
||||||
.TP
|
.TP
|
||||||
.BI \-restart " N"
|
.BI \-restart " N"
|
||||||
Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
|
Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
|
||||||
@@ -141,6 +208,11 @@ selects 4000000 bytes. If more space is needed, temporary files will be used.
|
|||||||
.BI \-outfile " name"
|
.BI \-outfile " name"
|
||||||
Send output image to the named file, not to standard output.
|
Send output image to the named file, not to standard output.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-memdst
|
||||||
|
Compress to memory instead of a file. This feature was implemented mainly as a
|
||||||
|
way of testing the in-memory destination manager (jpeg_mem_dest()), but it is
|
||||||
|
also useful for benchmarking, since it reduces the I/O overhead.
|
||||||
|
.TP
|
||||||
.B \-verbose
|
.B \-verbose
|
||||||
Enable debug printout. More
|
Enable debug printout. More
|
||||||
.BR \-v 's
|
.BR \-v 's
|
||||||
@@ -149,6 +221,9 @@ give more output. Also, version information is printed at startup.
|
|||||||
.B \-debug
|
.B \-debug
|
||||||
Same as
|
Same as
|
||||||
.BR \-verbose .
|
.BR \-verbose .
|
||||||
|
.TP
|
||||||
|
.B \-version
|
||||||
|
Print version information and exit.
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.B \-restart
|
.B \-restart
|
||||||
@@ -164,49 +239,38 @@ for images that will be transmitted across unreliable networks such as Usenet.
|
|||||||
The
|
The
|
||||||
.B \-smooth
|
.B \-smooth
|
||||||
option filters the input to eliminate fine-scale noise. This is often useful
|
option filters the input to eliminate fine-scale noise. This is often useful
|
||||||
when converting GIF files to JPEG: a moderate smoothing factor of 10 to 50
|
when converting dithered images to JPEG: a moderate smoothing factor of 10 to
|
||||||
gets rid of dithering patterns in the input file, resulting in a smaller JPEG
|
50 gets rid of dithering patterns in the input file, resulting in a smaller
|
||||||
file and a better-looking image. Too large a smoothing factor will visibly
|
JPEG file and a better-looking image. Too large a smoothing factor will
|
||||||
blur the image, however.
|
visibly blur the image, however.
|
||||||
.PP
|
.PP
|
||||||
Switches for wizards:
|
Switches for wizards:
|
||||||
.TP
|
.TP
|
||||||
.B \-arithmetic
|
|
||||||
Use arithmetic coding rather than Huffman coding. (Not currently
|
|
||||||
supported for legal reasons.)
|
|
||||||
.TP
|
|
||||||
.B \-baseline
|
.B \-baseline
|
||||||
Force a baseline JPEG file to be generated. This clamps quantization values
|
Force baseline-compatible quantization tables to be generated. This clamps
|
||||||
to 8 bits even at low quality settings.
|
quantization values to 8 bits even at low quality settings. (This switch is
|
||||||
.TP
|
poorly named, since it does not ensure that the output is actually baseline
|
||||||
.B \-nointerleave
|
JPEG. For example, you can use
|
||||||
Generate noninterleaved JPEG file (not yet supported).
|
.B \-baseline
|
||||||
|
and
|
||||||
|
.B \-progressive
|
||||||
|
together.)
|
||||||
.TP
|
.TP
|
||||||
.BI \-qtables " file"
|
.BI \-qtables " file"
|
||||||
Use the quantization tables given in the specified file. The file should
|
Use the quantization tables given in the specified text file.
|
||||||
contain one to four tables (64 values each) as plain text. Comments preceded
|
|
||||||
by '#' may be included in the file. The tables are implicitly numbered
|
|
||||||
0,1,etc. If
|
|
||||||
.BI \-quality " N"
|
|
||||||
is also specified, the values in the file are scaled according to
|
|
||||||
.BR cjpeg 's
|
|
||||||
quality scaling curve.
|
|
||||||
.TP
|
.TP
|
||||||
.BI \-qslots " N[,...]"
|
.BI \-qslots " N[,...]"
|
||||||
Select which quantization table to use for each color component. By default,
|
Select which quantization table to use for each color component.
|
||||||
table 0 is used for luminance and table 1 for chrominance components.
|
|
||||||
.TP
|
.TP
|
||||||
.BI \-sample " HxV[,...]"
|
.BI \-sample " HxV[,...]"
|
||||||
Set JPEG sampling factors. If you specify fewer H/V pairs than there are
|
Set JPEG sampling factors for each color component.
|
||||||
components, the remaining components are set to 1x1 sampling. The default
|
.TP
|
||||||
setting is equivalent to \fB\-sample 2x2\fR.
|
.BI \-scans " file"
|
||||||
|
Use the scan script given in the specified text file.
|
||||||
.PP
|
.PP
|
||||||
The "wizard" switches are intended for experimentation with JPEG. If you
|
The "wizard" switches are intended for experimentation with JPEG. If you
|
||||||
don't know what you are doing, \fBdon't use them\fR. You can easily produce
|
don't know what you are doing, \fBdon't use them\fR. These switches are
|
||||||
files with worse image quality and/or poorer compression than you'll get from
|
documented further in the file wizard.txt.
|
||||||
the default settings. Furthermore, these switches should not be used when
|
|
||||||
making files intended for general use, because not all JPEG implementations
|
|
||||||
will support unusual JPEG parameter settings.
|
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.LP
|
.LP
|
||||||
This example compresses the PPM file foo.ppm with a quality factor of
|
This example compresses the PPM file foo.ppm with a quality factor of
|
||||||
@@ -243,7 +307,9 @@ option to
|
|||||||
is worth using when you are making a "final" version for posting or archiving.
|
is worth using when you are making a "final" version for posting or archiving.
|
||||||
It's also a win when you are using low quality settings to make very small
|
It's also a win when you are using low quality settings to make very small
|
||||||
JPEG files; the percentage improvement is often a lot more than it is on
|
JPEG files; the percentage improvement is often a lot more than it is on
|
||||||
larger files.
|
larger files. (At present,
|
||||||
|
.B \-optimize
|
||||||
|
mode is always selected when generating progressive JPEG files.)
|
||||||
.SH ENVIRONMENT
|
.SH ENVIRONMENT
|
||||||
.TP
|
.TP
|
||||||
.B JPEGMEM
|
.B JPEGMEM
|
||||||
@@ -257,6 +323,7 @@ itself is overridden by an explicit
|
|||||||
.BR \-maxmemory .
|
.BR \-maxmemory .
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR djpeg (1),
|
.BR djpeg (1),
|
||||||
|
.BR jpegtran (1),
|
||||||
.BR rdjpgcom (1),
|
.BR rdjpgcom (1),
|
||||||
.BR wrjpgcom (1)
|
.BR wrjpgcom (1)
|
||||||
.br
|
.br
|
||||||
@@ -267,8 +334,15 @@ Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
|
|||||||
Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
|
Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Independent JPEG Group
|
Independent JPEG Group
|
||||||
|
.PP
|
||||||
|
This file was modified by The libjpeg-turbo Project to include only information
|
||||||
|
relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
|
||||||
|
features not present in libjpeg.
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
Arithmetic coding is not supported for legal reasons.
|
Support for GIF input files was removed in cjpeg v6b due to concerns over
|
||||||
|
the Unisys LZW patent. Although this patent expired in 2006, cjpeg still
|
||||||
|
lacks GIF support, for these historical reasons. (Conversion of GIF files to
|
||||||
|
JPEG is usually a bad idea anyway.)
|
||||||
.PP
|
.PP
|
||||||
Not all variants of BMP and Targa file formats are supported.
|
Not all variants of BMP and Targa file formats are supported.
|
||||||
.PP
|
.PP
|
||||||
@@ -276,5 +350,3 @@ The
|
|||||||
.B \-targa
|
.B \-targa
|
||||||
switch is not a bug, it's a feature. (It would be a bug if the Targa format
|
switch is not a bug, it's a feature. (It would be a bug if the Targa format
|
||||||
designers had not been clueless.)
|
designers had not been clueless.)
|
||||||
.PP
|
|
||||||
Still not as fast as we'd like.
|
|
||||||
|
|||||||
667
cjpeg.c
@@ -1,8 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* cjpeg.c
|
* cjpeg.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 1991-1994, Thomas G. Lane.
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||||
|
* Modified 2003-2011 by Guido Vollbeding.
|
||||||
|
* libjpeg-turbo Modifications:
|
||||||
|
* Copyright (C) 2010, 2013-2014, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* For conditions of distribution and use, see the accompanying README file.
|
||||||
*
|
*
|
||||||
* This file contains a command-line user interface for the JPEG compressor.
|
* This file contains a command-line user interface for the JPEG compressor.
|
||||||
@@ -10,8 +13,8 @@
|
|||||||
*
|
*
|
||||||
* Two different command line styles are permitted, depending on the
|
* Two different command line styles are permitted, depending on the
|
||||||
* compile-time switch TWO_FILE_COMMANDLINE:
|
* compile-time switch TWO_FILE_COMMANDLINE:
|
||||||
* cjpeg [options] inputfile outputfile
|
* cjpeg [options] inputfile outputfile
|
||||||
* cjpeg [options] [inputfile]
|
* cjpeg [options] [inputfile]
|
||||||
* In the second style, output is always to standard output, which you'd
|
* In the second style, output is always to standard output, which you'd
|
||||||
* normally redirect to a file or pipe to some other program. Input is
|
* normally redirect to a file or pipe to some other program. Input is
|
||||||
* either from a named file or from standard input (typically redirected).
|
* either from a named file or from standard input (typically redirected).
|
||||||
@@ -19,62 +22,28 @@
|
|||||||
* don't support pipes. Also, you MUST use the first style if your system
|
* don't support pipes. Also, you MUST use the first style if your system
|
||||||
* doesn't do binary I/O to stdin/stdout.
|
* doesn't do binary I/O to stdin/stdout.
|
||||||
* To simplify script writing, the "-outfile" switch is provided. The syntax
|
* To simplify script writing, the "-outfile" switch is provided. The syntax
|
||||||
* cjpeg [options] -outfile outputfile inputfile
|
* cjpeg [options] -outfile outputfile inputfile
|
||||||
* works regardless of which command line style is used.
|
* works regardless of which command line style is used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||||
#include "jversion.h" /* for version message */
|
#include "jversion.h" /* for version message */
|
||||||
|
#include "jconfigint.h"
|
||||||
|
|
||||||
#include <ctype.h> /* to declare isupper(), tolower() */
|
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
||||||
#ifdef NEED_SIGNAL_CATCHER
|
|
||||||
#include <signal.h> /* to declare signal() */
|
|
||||||
#endif
|
|
||||||
#ifdef USE_SETMODE
|
|
||||||
#include <fcntl.h> /* to declare setmode()'s parameter macros */
|
|
||||||
/* If you have setmode() but not <io.h>, just delete this line: */
|
|
||||||
#include <io.h> /* to declare setmode() */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
#include <SIOUX.h> /* Metrowerks declares it here */
|
#include <SIOUX.h> /* Metrowerks needs this */
|
||||||
|
#include <console.h> /* ... and this */
|
||||||
#endif
|
#endif
|
||||||
#ifdef THINK_C
|
#ifdef THINK_C
|
||||||
#include <console.h> /* Think declares it here */
|
#include <console.h> /* Think declares it here */
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
|
|
||||||
#define READ_BINARY "r"
|
|
||||||
#define WRITE_BINARY "w"
|
|
||||||
#else
|
|
||||||
#define READ_BINARY "rb"
|
|
||||||
#define WRITE_BINARY "wb"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef EXIT_FAILURE /* define exit() codes if not provided */
|
|
||||||
#define EXIT_FAILURE 1
|
|
||||||
#endif
|
|
||||||
#ifndef EXIT_SUCCESS
|
|
||||||
#ifdef VMS
|
|
||||||
#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
|
|
||||||
#else
|
|
||||||
#define EXIT_SUCCESS 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifndef EXIT_WARNING
|
|
||||||
#ifdef VMS
|
|
||||||
#define EXIT_WARNING 1 /* VMS is very nonstandard */
|
|
||||||
#else
|
|
||||||
#define EXIT_WARNING 2
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Create the add-on message string table. */
|
/* Create the add-on message string table. */
|
||||||
|
|
||||||
#define JMESSAGE(code,string) string ,
|
#define JMESSAGE(code,string) string ,
|
||||||
|
|
||||||
static const char * const cdjpeg_message_table[] = {
|
static const char * const cdjpeg_message_table[] = {
|
||||||
#include "cderror.h"
|
#include "cderror.h"
|
||||||
@@ -108,10 +77,10 @@ static const char * const cdjpeg_message_table[] = {
|
|||||||
* seldom-used ID field), so we provide a switch to force Targa input mode.
|
* seldom-used ID field), so we provide a switch to force Targa input mode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static boolean is_targa; /* records user -targa switch */
|
static boolean is_targa; /* records user -targa switch */
|
||||||
|
|
||||||
|
|
||||||
LOCAL cjpeg_source_ptr
|
LOCAL(cjpeg_source_ptr)
|
||||||
select_file_type (j_compress_ptr cinfo, FILE * infile)
|
select_file_type (j_compress_ptr cinfo, FILE * infile)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
@@ -155,63 +124,10 @@ select_file_type (j_compress_ptr cinfo, FILE * infile)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL; /* suppress compiler warnings */
|
return NULL; /* suppress compiler warnings */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Signal catcher to ensure that temporary files are removed before aborting.
|
|
||||||
* NB: for Amiga Manx C this is actually a global routine named _abort();
|
|
||||||
* we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus...
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef NEED_SIGNAL_CATCHER
|
|
||||||
|
|
||||||
static j_common_ptr sig_cinfo;
|
|
||||||
|
|
||||||
GLOBAL void
|
|
||||||
signal_catcher (int signum)
|
|
||||||
{
|
|
||||||
if (sig_cinfo != NULL) {
|
|
||||||
if (sig_cinfo->err != NULL) /* turn off trace output */
|
|
||||||
sig_cinfo->err->trace_level = 0;
|
|
||||||
jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */
|
|
||||||
}
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Optional routine to display a percent-done figure on stderr.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef PROGRESS_REPORT
|
|
||||||
|
|
||||||
METHODDEF void
|
|
||||||
progress_monitor (j_common_ptr cinfo)
|
|
||||||
{
|
|
||||||
cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress;
|
|
||||||
int total_passes = prog->pub.total_passes + prog->total_extra_passes;
|
|
||||||
int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit);
|
|
||||||
|
|
||||||
if (percent_done != prog->percent_done) {
|
|
||||||
prog->percent_done = percent_done;
|
|
||||||
if (total_passes > 1) {
|
|
||||||
fprintf(stderr, "\rPass %d/%d: %3d%% ",
|
|
||||||
prog->pub.completed_passes + prog->completed_extra_passes + 1,
|
|
||||||
total_passes, percent_done);
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "\r %3d%% ", percent_done);
|
|
||||||
}
|
|
||||||
fflush(stderr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Argument-parsing code.
|
* Argument-parsing code.
|
||||||
* The switch parser is designed to be useful with DOS-style command line
|
* The switch parser is designed to be useful with DOS-style command line
|
||||||
@@ -221,11 +137,12 @@ progress_monitor (j_common_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static const char * progname; /* program name for error messages */
|
static const char * progname; /* program name for error messages */
|
||||||
static char * outfilename; /* for -outfile switch */
|
static char * outfilename; /* for -outfile switch */
|
||||||
|
boolean memdst; /* for -memdst switch */
|
||||||
|
|
||||||
|
|
||||||
LOCAL void
|
LOCAL(void)
|
||||||
usage (void)
|
usage (void)
|
||||||
/* complain about bad command line */
|
/* complain about bad command line */
|
||||||
{
|
{
|
||||||
@@ -237,26 +154,33 @@ usage (void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
fprintf(stderr, "Switches (names may be abbreviated):\n");
|
fprintf(stderr, "Switches (names may be abbreviated):\n");
|
||||||
fprintf(stderr, " -quality N Compression quality (0..100; 5-95 is useful range)\n");
|
fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is useful range)\n");
|
||||||
fprintf(stderr, " -grayscale Create monochrome JPEG file\n");
|
fprintf(stderr, " -grayscale Create monochrome JPEG file\n");
|
||||||
|
fprintf(stderr, " -rgb Create RGB JPEG file\n");
|
||||||
#ifdef ENTROPY_OPT_SUPPORTED
|
#ifdef ENTROPY_OPT_SUPPORTED
|
||||||
fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n");
|
fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n");
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef C_PROGRESSIVE_SUPPORTED
|
||||||
|
fprintf(stderr, " -progressive Create progressive JPEG file\n");
|
||||||
|
#endif
|
||||||
#ifdef TARGA_SUPPORTED
|
#ifdef TARGA_SUPPORTED
|
||||||
fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n");
|
fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n");
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr, "Switches for advanced users:\n");
|
fprintf(stderr, "Switches for advanced users:\n");
|
||||||
|
#ifdef C_ARITH_CODING_SUPPORTED
|
||||||
|
fprintf(stderr, " -arithmetic Use arithmetic coding\n");
|
||||||
|
#endif
|
||||||
#ifdef DCT_ISLOW_SUPPORTED
|
#ifdef DCT_ISLOW_SUPPORTED
|
||||||
fprintf(stderr, " -dct int Use integer DCT method%s\n",
|
fprintf(stderr, " -dct int Use integer DCT method%s\n",
|
||||||
(JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
|
(JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
#ifdef DCT_IFAST_SUPPORTED
|
#ifdef DCT_IFAST_SUPPORTED
|
||||||
fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n",
|
fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n",
|
||||||
(JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
|
(JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
#ifdef DCT_FLOAT_SUPPORTED
|
#ifdef DCT_FLOAT_SUPPORTED
|
||||||
fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
|
fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
|
||||||
(JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
|
(JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n");
|
fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n");
|
||||||
#ifdef INPUT_SMOOTHING_SUPPORTED
|
#ifdef INPUT_SMOOTHING_SUPPORTED
|
||||||
@@ -264,221 +188,26 @@ usage (void)
|
|||||||
#endif
|
#endif
|
||||||
fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
|
fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
|
||||||
fprintf(stderr, " -outfile name Specify name for output file\n");
|
fprintf(stderr, " -outfile name Specify name for output file\n");
|
||||||
|
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
|
||||||
|
fprintf(stderr, " -memdst Compress to memory instead of file (useful for benchmarking)\n");
|
||||||
|
#endif
|
||||||
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
||||||
|
fprintf(stderr, " -version Print version information and exit\n");
|
||||||
fprintf(stderr, "Switches for wizards:\n");
|
fprintf(stderr, "Switches for wizards:\n");
|
||||||
#ifdef C_ARITH_CODING_SUPPORTED
|
fprintf(stderr, " -baseline Force baseline quantization tables\n");
|
||||||
fprintf(stderr, " -arithmetic Use arithmetic coding\n");
|
|
||||||
#endif
|
|
||||||
fprintf(stderr, " -baseline Force baseline output\n");
|
|
||||||
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
|
||||||
fprintf(stderr, " -nointerleave Create noninterleaved JPEG file\n");
|
|
||||||
#endif
|
|
||||||
fprintf(stderr, " -qtables file Use quantization tables given in file\n");
|
fprintf(stderr, " -qtables file Use quantization tables given in file\n");
|
||||||
fprintf(stderr, " -qslots N[,...] Set component quantization tables\n");
|
fprintf(stderr, " -qslots N[,...] Set component quantization tables\n");
|
||||||
fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n");
|
fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n");
|
||||||
|
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||||
|
fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n");
|
||||||
|
#endif
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL boolean
|
LOCAL(int)
|
||||||
keymatch (char * arg, const char * keyword, int minchars)
|
|
||||||
/* Case-insensitive matching of (possibly abbreviated) keyword switches. */
|
|
||||||
/* keyword is the constant keyword (must be lower case already), */
|
|
||||||
/* minchars is length of minimum legal abbreviation. */
|
|
||||||
{
|
|
||||||
register int ca, ck;
|
|
||||||
register int nmatched = 0;
|
|
||||||
|
|
||||||
while ((ca = *arg++) != '\0') {
|
|
||||||
if ((ck = *keyword++) == '\0')
|
|
||||||
return FALSE; /* arg longer than keyword, no good */
|
|
||||||
if (isupper(ca)) /* force arg to lcase (assume ck is already) */
|
|
||||||
ca = tolower(ca);
|
|
||||||
if (ca != ck)
|
|
||||||
return FALSE; /* no good */
|
|
||||||
nmatched++; /* count matched characters */
|
|
||||||
}
|
|
||||||
/* reached end of argument; fail if it's too short for unique abbrev */
|
|
||||||
if (nmatched < minchars)
|
|
||||||
return FALSE;
|
|
||||||
return TRUE; /* A-OK */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LOCAL int
|
|
||||||
qt_getc (FILE * file)
|
|
||||||
/* Read next char, skipping over any comments (# to end of line) */
|
|
||||||
/* A comment/newline sequence is returned as a newline */
|
|
||||||
{
|
|
||||||
register int ch;
|
|
||||||
|
|
||||||
ch = getc(file);
|
|
||||||
if (ch == '#') {
|
|
||||||
do {
|
|
||||||
ch = getc(file);
|
|
||||||
} while (ch != '\n' && ch != EOF);
|
|
||||||
}
|
|
||||||
return ch;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LOCAL long
|
|
||||||
read_qt_integer (FILE * file)
|
|
||||||
/* Read an unsigned decimal integer from a quantization-table file */
|
|
||||||
/* Swallows one trailing character after the integer */
|
|
||||||
{
|
|
||||||
register int ch;
|
|
||||||
register long val;
|
|
||||||
|
|
||||||
/* Skip any leading whitespace, detect EOF */
|
|
||||||
do {
|
|
||||||
ch = qt_getc(file);
|
|
||||||
if (ch == EOF)
|
|
||||||
return EOF;
|
|
||||||
} while (isspace(ch));
|
|
||||||
|
|
||||||
if (! isdigit(ch)) {
|
|
||||||
fprintf(stderr, "%s: bogus data in quantization file\n", progname);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
val = ch - '0';
|
|
||||||
while (ch = qt_getc(file), isdigit(ch)) {
|
|
||||||
val *= 10;
|
|
||||||
val += ch - '0';
|
|
||||||
}
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LOCAL void
|
|
||||||
read_quant_tables (j_compress_ptr cinfo, char * filename, int scale_factor,
|
|
||||||
boolean force_baseline)
|
|
||||||
/* Read a set of quantization tables from the specified file.
|
|
||||||
* The file is plain ASCII text: decimal numbers with whitespace between.
|
|
||||||
* Comments preceded by '#' may be included in the file.
|
|
||||||
* There may be one to NUM_QUANT_TBLS tables in the file, each of 64 values.
|
|
||||||
* The tables are implicitly numbered 0,1,etc.
|
|
||||||
* NOTE: does not affect the qslots mapping, which will default to selecting
|
|
||||||
* table 0 for luminance (or primary) components, 1 for chrominance components.
|
|
||||||
* You must use -qslots if you want a different component->table mapping.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
/* ZIG[i] is the zigzag-order position of the i'th element of a DCT block */
|
|
||||||
/* read in natural order (left to right, top to bottom). */
|
|
||||||
static const int ZIG[DCTSIZE2] = {
|
|
||||||
0, 1, 5, 6, 14, 15, 27, 28,
|
|
||||||
2, 4, 7, 13, 16, 26, 29, 42,
|
|
||||||
3, 8, 12, 17, 25, 30, 41, 43,
|
|
||||||
9, 11, 18, 24, 31, 40, 44, 53,
|
|
||||||
10, 19, 23, 32, 39, 45, 52, 54,
|
|
||||||
20, 22, 33, 38, 46, 51, 55, 60,
|
|
||||||
21, 34, 37, 47, 50, 56, 59, 61,
|
|
||||||
35, 36, 48, 49, 57, 58, 62, 63
|
|
||||||
};
|
|
||||||
FILE * fp;
|
|
||||||
int tblno, i;
|
|
||||||
long val;
|
|
||||||
unsigned int table[DCTSIZE2];
|
|
||||||
|
|
||||||
if ((fp = fopen(filename, "r")) == NULL) {
|
|
||||||
fprintf(stderr, "%s: can't open %s\n", progname, filename);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
tblno = 0;
|
|
||||||
|
|
||||||
while ((val = read_qt_integer(fp)) != EOF) { /* read 1st element of table */
|
|
||||||
if (tblno >= NUM_QUANT_TBLS) {
|
|
||||||
fprintf(stderr, "%s: too many tables in file %s\n", progname, filename);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
table[0] = (unsigned int) val;
|
|
||||||
for (i = 1; i < DCTSIZE2; i++) {
|
|
||||||
if ((val = read_qt_integer(fp)) == EOF) {
|
|
||||||
fprintf(stderr, "%s: incomplete table in file %s\n", progname, filename);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
table[ZIG[i]] = (unsigned int) val;
|
|
||||||
}
|
|
||||||
jpeg_add_quant_table(cinfo, tblno, table, scale_factor, force_baseline);
|
|
||||||
tblno++;
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LOCAL void
|
|
||||||
set_quant_slots (j_compress_ptr cinfo, char *arg)
|
|
||||||
/* Process a quantization-table-selectors parameter string, of the form
|
|
||||||
* N[,N,...]
|
|
||||||
* If there are more components than parameters, the last value is replicated.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int val = 0; /* default table # */
|
|
||||||
int ci;
|
|
||||||
char ch;
|
|
||||||
|
|
||||||
for (ci = 0; ci < MAX_COMPONENTS; ci++) {
|
|
||||||
if (*arg) {
|
|
||||||
ch = ','; /* if not set by sscanf, will be ',' */
|
|
||||||
if (sscanf(arg, "%d%c", &val, &ch) < 1)
|
|
||||||
usage();
|
|
||||||
if (ch != ',')
|
|
||||||
usage(); /* syntax check */
|
|
||||||
if (val < 0 || val >= NUM_QUANT_TBLS) {
|
|
||||||
fprintf(stderr, "JPEG quantization tables are numbered 0..%d\n",
|
|
||||||
NUM_QUANT_TBLS-1);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
cinfo->comp_info[ci].quant_tbl_no = val;
|
|
||||||
while (*arg && *arg++ != ',') /* advance to next segment of arg string */
|
|
||||||
;
|
|
||||||
} else {
|
|
||||||
/* reached end of parameter, set remaining components to last table */
|
|
||||||
cinfo->comp_info[ci].quant_tbl_no = val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LOCAL void
|
|
||||||
set_sample_factors (j_compress_ptr cinfo, char *arg)
|
|
||||||
/* Process a sample-factors parameter string, of the form
|
|
||||||
* HxV[,HxV,...]
|
|
||||||
* If there are more components than parameters, "1x1" is assumed.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
int ci, val1, val2;
|
|
||||||
char ch1, ch2;
|
|
||||||
|
|
||||||
for (ci = 0; ci < MAX_COMPONENTS; ci++) {
|
|
||||||
if (*arg) {
|
|
||||||
ch2 = ','; /* if not set by sscanf, will be ',' */
|
|
||||||
if (sscanf(arg, "%d%c%d%c", &val1, &ch1, &val2, &ch2) < 3)
|
|
||||||
usage();
|
|
||||||
if ((ch1 != 'x' && ch1 != 'X') || ch2 != ',')
|
|
||||||
usage(); /* syntax check */
|
|
||||||
if (val1 <= 0 || val1 > 4 || val2 <= 0 || val2 > 4) {
|
|
||||||
fprintf(stderr, "JPEG sampling factors must be 1..4\n");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
cinfo->comp_info[ci].h_samp_factor = val1;
|
|
||||||
cinfo->comp_info[ci].v_samp_factor = val2;
|
|
||||||
while (*arg && *arg++ != ',') /* advance to next segment of arg string */
|
|
||||||
;
|
|
||||||
} else {
|
|
||||||
/* reached end of parameter, set remaining components to 1x1 sampling */
|
|
||||||
cinfo->comp_info[ci].h_samp_factor = 1;
|
|
||||||
cinfo->comp_info[ci].v_samp_factor = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LOCAL int
|
|
||||||
parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||||
int last_file_arg_seen, boolean for_real)
|
int last_file_arg_seen, boolean for_real)
|
||||||
/* Parse optional switches.
|
/* Parse optional switches.
|
||||||
* Returns argv[] index of first file-name argument (== argc if none).
|
* Returns argv[] index of first file-name argument (== argc if none).
|
||||||
* Any file names with indexes <= last_file_arg_seen are ignored;
|
* Any file names with indexes <= last_file_arg_seen are ignored;
|
||||||
@@ -490,22 +219,21 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
{
|
{
|
||||||
int argn;
|
int argn;
|
||||||
char * arg;
|
char * arg;
|
||||||
int quality; /* -quality parameter */
|
|
||||||
int q_scale_factor; /* scaling percentage for -qtables */
|
|
||||||
boolean force_baseline;
|
boolean force_baseline;
|
||||||
char * qtablefile = NULL; /* saves -qtables filename if any */
|
boolean simple_progressive;
|
||||||
char * qslotsarg = NULL; /* saves -qslots parm if any */
|
char * qualityarg = NULL; /* saves -quality parm if any */
|
||||||
char * samplearg = NULL; /* saves -sample parm if any */
|
char * qtablefile = NULL; /* saves -qtables filename if any */
|
||||||
|
char * qslotsarg = NULL; /* saves -qslots parm if any */
|
||||||
|
char * samplearg = NULL; /* saves -sample parm if any */
|
||||||
|
char * scansarg = NULL; /* saves -scans parm if any */
|
||||||
|
|
||||||
/* Set up default JPEG parameters. */
|
/* Set up default JPEG parameters. */
|
||||||
/* Note that default -quality level need not, and does not,
|
|
||||||
* match the default scaling for an explicit -qtables argument.
|
force_baseline = FALSE; /* by default, allow 16-bit quantizers */
|
||||||
*/
|
simple_progressive = FALSE;
|
||||||
quality = 75; /* default -quality value */
|
|
||||||
q_scale_factor = 100; /* default to no scaling for -qtables */
|
|
||||||
force_baseline = FALSE; /* by default, allow 16-bit quantizers */
|
|
||||||
is_targa = FALSE;
|
is_targa = FALSE;
|
||||||
outfilename = NULL;
|
outfilename = NULL;
|
||||||
|
memdst = FALSE;
|
||||||
cinfo->err->trace_level = 0;
|
cinfo->err->trace_level = 0;
|
||||||
|
|
||||||
/* Scan command line options, adjust parameters */
|
/* Scan command line options, adjust parameters */
|
||||||
@@ -515,12 +243,12 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
if (*arg != '-') {
|
if (*arg != '-') {
|
||||||
/* Not a switch, must be a file name argument */
|
/* Not a switch, must be a file name argument */
|
||||||
if (argn <= last_file_arg_seen) {
|
if (argn <= last_file_arg_seen) {
|
||||||
outfilename = NULL; /* -outfile applies to just one input file */
|
outfilename = NULL; /* -outfile applies to just one input file */
|
||||||
continue; /* ignore this name if previously processed */
|
continue; /* ignore this name if previously processed */
|
||||||
}
|
}
|
||||||
break; /* else done parsing switches */
|
break; /* else done parsing switches */
|
||||||
}
|
}
|
||||||
arg++; /* advance past switch marker character */
|
arg++; /* advance past switch marker character */
|
||||||
|
|
||||||
if (keymatch(arg, "arithmetic", 1)) {
|
if (keymatch(arg, "arithmetic", 1)) {
|
||||||
/* Use arithmetic coding. */
|
/* Use arithmetic coding. */
|
||||||
@@ -528,26 +256,26 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
cinfo->arith_code = TRUE;
|
cinfo->arith_code = TRUE;
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "%s: sorry, arithmetic coding not supported\n",
|
fprintf(stderr, "%s: sorry, arithmetic coding not supported\n",
|
||||||
progname);
|
progname);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} else if (keymatch(arg, "baseline", 1)) {
|
} else if (keymatch(arg, "baseline", 1)) {
|
||||||
/* Force baseline output (8-bit quantizer values). */
|
/* Force baseline-compatible output (8-bit quantizer values). */
|
||||||
force_baseline = TRUE;
|
force_baseline = TRUE;
|
||||||
|
|
||||||
} else if (keymatch(arg, "dct", 2)) {
|
} else if (keymatch(arg, "dct", 2)) {
|
||||||
/* Select DCT algorithm. */
|
/* Select DCT algorithm. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (keymatch(argv[argn], "int", 1)) {
|
if (keymatch(argv[argn], "int", 1)) {
|
||||||
cinfo->dct_method = JDCT_ISLOW;
|
cinfo->dct_method = JDCT_ISLOW;
|
||||||
} else if (keymatch(argv[argn], "fast", 2)) {
|
} else if (keymatch(argv[argn], "fast", 2)) {
|
||||||
cinfo->dct_method = JDCT_IFAST;
|
cinfo->dct_method = JDCT_IFAST;
|
||||||
} else if (keymatch(argv[argn], "float", 2)) {
|
} else if (keymatch(argv[argn], "float", 2)) {
|
||||||
cinfo->dct_method = JDCT_FLOAT;
|
cinfo->dct_method = JDCT_FLOAT;
|
||||||
} else
|
} else
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
} else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
|
} else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
|
||||||
/* Enable debug printouts. */
|
/* Enable debug printouts. */
|
||||||
@@ -555,68 +283,88 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
static boolean printed_version = FALSE;
|
static boolean printed_version = FALSE;
|
||||||
|
|
||||||
if (! printed_version) {
|
if (! printed_version) {
|
||||||
fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n",
|
fprintf(stderr, "%s version %s (build %s)\n",
|
||||||
JVERSION, JCOPYRIGHT);
|
PACKAGE_NAME, VERSION, BUILD);
|
||||||
printed_version = TRUE;
|
fprintf(stderr, "%s\n\n", JCOPYRIGHT);
|
||||||
|
fprintf(stderr, "Emulating The Independent JPEG Group's software, version %s\n\n",
|
||||||
|
JVERSION);
|
||||||
|
printed_version = TRUE;
|
||||||
}
|
}
|
||||||
cinfo->err->trace_level++;
|
cinfo->err->trace_level++;
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "version", 4)) {
|
||||||
|
fprintf(stderr, "%s version %s (build %s)\n",
|
||||||
|
PACKAGE_NAME, VERSION, BUILD);
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
} else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
|
} else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
|
||||||
/* Force a monochrome JPEG file to be generated. */
|
/* Force a monochrome JPEG file to be generated. */
|
||||||
jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
|
jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "rgb", 3)) {
|
||||||
|
/* Force an RGB JPEG file to be generated. */
|
||||||
|
jpeg_set_colorspace(cinfo, JCS_RGB);
|
||||||
|
|
||||||
} else if (keymatch(arg, "maxmemory", 3)) {
|
} else if (keymatch(arg, "maxmemory", 3)) {
|
||||||
/* Maximum memory in Kb (or Mb with 'm'). */
|
/* Maximum memory in Kb (or Mb with 'm'). */
|
||||||
long lval;
|
long lval;
|
||||||
char ch = 'x';
|
char ch = 'x';
|
||||||
|
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
||||||
usage();
|
usage();
|
||||||
if (ch == 'm' || ch == 'M')
|
if (ch == 'm' || ch == 'M')
|
||||||
lval *= 1000L;
|
lval *= 1000L;
|
||||||
cinfo->mem->max_memory_to_use = lval * 1000L;
|
cinfo->mem->max_memory_to_use = lval * 1000L;
|
||||||
|
|
||||||
} else if (keymatch(arg, "nointerleave", 3)) {
|
|
||||||
/* Create noninterleaved file. */
|
|
||||||
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
|
||||||
cinfo->interleave = FALSE;
|
|
||||||
#else
|
|
||||||
fprintf(stderr, "%s: sorry, multiple-scan support was not compiled\n",
|
|
||||||
progname);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) {
|
} else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) {
|
||||||
/* Enable entropy parm optimization. */
|
/* Enable entropy parm optimization. */
|
||||||
#ifdef ENTROPY_OPT_SUPPORTED
|
#ifdef ENTROPY_OPT_SUPPORTED
|
||||||
cinfo->optimize_coding = TRUE;
|
cinfo->optimize_coding = TRUE;
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n",
|
fprintf(stderr, "%s: sorry, entropy optimization was not compiled in\n",
|
||||||
progname);
|
progname);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} else if (keymatch(arg, "outfile", 4)) {
|
} else if (keymatch(arg, "outfile", 4)) {
|
||||||
/* Set output file name. */
|
/* Set output file name. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
outfilename = argv[argn]; /* save it away for later use */
|
outfilename = argv[argn]; /* save it away for later use */
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "progressive", 1)) {
|
||||||
|
/* Select simple progressive mode. */
|
||||||
|
#ifdef C_PROGRESSIVE_SUPPORTED
|
||||||
|
simple_progressive = TRUE;
|
||||||
|
/* We must postpone execution until num_components is known. */
|
||||||
|
#else
|
||||||
|
fprintf(stderr, "%s: sorry, progressive output was not compiled in\n",
|
||||||
|
progname);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "memdst", 2)) {
|
||||||
|
/* Use in-memory destination manager */
|
||||||
|
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
|
||||||
|
memdst = TRUE;
|
||||||
|
#else
|
||||||
|
fprintf(stderr, "%s: sorry, in-memory destination manager was not compiled in\n",
|
||||||
|
progname);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
#endif
|
||||||
|
|
||||||
} else if (keymatch(arg, "quality", 1)) {
|
} else if (keymatch(arg, "quality", 1)) {
|
||||||
/* Quality factor (quantization table scaling factor). */
|
/* Quality ratings (quantization table scaling factors). */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (sscanf(argv[argn], "%d", &quality) != 1)
|
qualityarg = argv[argn];
|
||||||
usage();
|
|
||||||
/* Change scale factor in case -qtables is present. */
|
|
||||||
q_scale_factor = jpeg_quality_scaling(quality);
|
|
||||||
|
|
||||||
} else if (keymatch(arg, "qslots", 2)) {
|
} else if (keymatch(arg, "qslots", 2)) {
|
||||||
/* Quantization table slot numbers. */
|
/* Quantization table slot numbers. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
qslotsarg = argv[argn];
|
qslotsarg = argv[argn];
|
||||||
/* Must delay setting qslots until after we have processed any
|
/* Must delay setting qslots until after we have processed any
|
||||||
* colorspace-determining switches, since jpeg_set_colorspace sets
|
* colorspace-determining switches, since jpeg_set_colorspace sets
|
||||||
@@ -625,8 +373,8 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
|
|
||||||
} else if (keymatch(arg, "qtables", 2)) {
|
} else if (keymatch(arg, "qtables", 2)) {
|
||||||
/* Quantization tables fetched from file. */
|
/* Quantization tables fetched from file. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
qtablefile = argv[argn];
|
qtablefile = argv[argn];
|
||||||
/* We postpone actually reading the file in case -quality comes later. */
|
/* We postpone actually reading the file in case -quality comes later. */
|
||||||
|
|
||||||
@@ -635,40 +383,53 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
long lval;
|
long lval;
|
||||||
char ch = 'x';
|
char ch = 'x';
|
||||||
|
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
||||||
usage();
|
usage();
|
||||||
if (lval < 0 || lval > 65535L)
|
if (lval < 0 || lval > 65535L)
|
||||||
usage();
|
usage();
|
||||||
if (ch == 'b' || ch == 'B') {
|
if (ch == 'b' || ch == 'B') {
|
||||||
cinfo->restart_interval = (unsigned int) lval;
|
cinfo->restart_interval = (unsigned int) lval;
|
||||||
cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */
|
cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */
|
||||||
} else {
|
} else {
|
||||||
cinfo->restart_in_rows = (int) lval;
|
cinfo->restart_in_rows = (int) lval;
|
||||||
/* restart_interval will be computed during startup */
|
/* restart_interval will be computed during startup */
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (keymatch(arg, "sample", 2)) {
|
} else if (keymatch(arg, "sample", 2)) {
|
||||||
/* Set sampling factors. */
|
/* Set sampling factors. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
samplearg = argv[argn];
|
samplearg = argv[argn];
|
||||||
/* Must delay setting sample factors until after we have processed any
|
/* Must delay setting sample factors until after we have processed any
|
||||||
* colorspace-determining switches, since jpeg_set_colorspace sets
|
* colorspace-determining switches, since jpeg_set_colorspace sets
|
||||||
* default sampling factors.
|
* default sampling factors.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "scans", 4)) {
|
||||||
|
/* Set scan script. */
|
||||||
|
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||||
|
if (++argn >= argc) /* advance to next argument */
|
||||||
|
usage();
|
||||||
|
scansarg = argv[argn];
|
||||||
|
/* We must postpone reading the file in case -progressive appears. */
|
||||||
|
#else
|
||||||
|
fprintf(stderr, "%s: sorry, multi-scan output was not compiled in\n",
|
||||||
|
progname);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
#endif
|
||||||
|
|
||||||
} else if (keymatch(arg, "smooth", 2)) {
|
} else if (keymatch(arg, "smooth", 2)) {
|
||||||
/* Set input smoothing factor. */
|
/* Set input smoothing factor. */
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (sscanf(argv[argn], "%d", &val) != 1)
|
if (sscanf(argv[argn], "%d", &val) != 1)
|
||||||
usage();
|
usage();
|
||||||
if (val < 0 || val > 100)
|
if (val < 0 || val > 100)
|
||||||
usage();
|
usage();
|
||||||
cinfo->smoothing_factor = val;
|
cinfo->smoothing_factor = val;
|
||||||
|
|
||||||
} else if (keymatch(arg, "targa", 1)) {
|
} else if (keymatch(arg, "targa", 1)) {
|
||||||
@@ -676,7 +437,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
is_targa = TRUE;
|
is_targa = TRUE;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
usage(); /* bogus switch */
|
usage(); /* bogus switch */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -686,20 +447,35 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
|
|
||||||
/* Set quantization tables for selected quality. */
|
/* Set quantization tables for selected quality. */
|
||||||
/* Some or all may be overridden if -qtables is present. */
|
/* Some or all may be overridden if -qtables is present. */
|
||||||
jpeg_set_quality(cinfo, quality, force_baseline);
|
if (qualityarg != NULL) /* process -quality if it was present */
|
||||||
|
if (! set_quality_ratings(cinfo, qualityarg, force_baseline))
|
||||||
|
usage();
|
||||||
|
|
||||||
if (qtablefile != NULL) /* process -qtables if it was present */
|
if (qtablefile != NULL) /* process -qtables if it was present */
|
||||||
read_quant_tables(cinfo, qtablefile, q_scale_factor, force_baseline);
|
if (! read_quant_tables(cinfo, qtablefile, force_baseline))
|
||||||
|
usage();
|
||||||
|
|
||||||
if (qslotsarg != NULL) /* process -qslots if it was present */
|
if (qslotsarg != NULL) /* process -qslots if it was present */
|
||||||
set_quant_slots(cinfo, qslotsarg);
|
if (! set_quant_slots(cinfo, qslotsarg))
|
||||||
|
usage();
|
||||||
|
|
||||||
if (samplearg != NULL) /* process -sample if it was present */
|
if (samplearg != NULL) /* process -sample if it was present */
|
||||||
set_sample_factors(cinfo, samplearg);
|
if (! set_sample_factors(cinfo, samplearg))
|
||||||
|
usage();
|
||||||
|
|
||||||
|
#ifdef C_PROGRESSIVE_SUPPORTED
|
||||||
|
if (simple_progressive) /* process -progressive; -scans can override */
|
||||||
|
jpeg_simple_progression(cinfo);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||||
|
if (scansarg != NULL) /* process -scans if it was present */
|
||||||
|
if (! read_scan_script(cinfo, scansarg))
|
||||||
|
usage();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return argn; /* return index of next arg (file name) */
|
return argn; /* return index of next arg (file name) */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -707,7 +483,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
* The main program.
|
* The main program.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct jpeg_compress_struct cinfo;
|
struct jpeg_compress_struct cinfo;
|
||||||
@@ -718,7 +494,9 @@ main (int argc, char **argv)
|
|||||||
int file_index;
|
int file_index;
|
||||||
cjpeg_source_ptr src_mgr;
|
cjpeg_source_ptr src_mgr;
|
||||||
FILE * input_file;
|
FILE * input_file;
|
||||||
FILE * output_file;
|
FILE * output_file = NULL;
|
||||||
|
unsigned char *outbuffer = NULL;
|
||||||
|
unsigned long outsize = 0;
|
||||||
JDIMENSION num_scanlines;
|
JDIMENSION num_scanlines;
|
||||||
|
|
||||||
/* On Mac, fetch a command line. */
|
/* On Mac, fetch a command line. */
|
||||||
@@ -728,7 +506,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
if (progname == NULL || progname[0] == 0)
|
if (progname == NULL || progname[0] == 0)
|
||||||
progname = "cjpeg"; /* in case C library doesn't provide it */
|
progname = "cjpeg"; /* in case C library doesn't provide it */
|
||||||
|
|
||||||
/* Initialize the JPEG compression object with default error handling. */
|
/* Initialize the JPEG compression object with default error handling. */
|
||||||
cinfo.err = jpeg_std_error(&jerr);
|
cinfo.err = jpeg_std_error(&jerr);
|
||||||
@@ -738,15 +516,6 @@ main (int argc, char **argv)
|
|||||||
jerr.first_addon_message = JMSG_FIRSTADDONCODE;
|
jerr.first_addon_message = JMSG_FIRSTADDONCODE;
|
||||||
jerr.last_addon_message = JMSG_LASTADDONCODE;
|
jerr.last_addon_message = JMSG_LASTADDONCODE;
|
||||||
|
|
||||||
/* Now safe to enable signal catcher. */
|
|
||||||
#ifdef NEED_SIGNAL_CATCHER
|
|
||||||
sig_cinfo = (j_common_ptr) &cinfo;
|
|
||||||
signal(SIGINT, signal_catcher);
|
|
||||||
#ifdef SIGTERM /* not all systems have SIGTERM */
|
|
||||||
signal(SIGTERM, signal_catcher);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialize JPEG parameters.
|
/* Initialize JPEG parameters.
|
||||||
* Much of this may be overridden later.
|
* Much of this may be overridden later.
|
||||||
* In particular, we don't yet know the input file's color space,
|
* In particular, we don't yet know the input file's color space,
|
||||||
@@ -765,19 +534,21 @@ main (int argc, char **argv)
|
|||||||
file_index = parse_switches(&cinfo, argc, argv, 0, FALSE);
|
file_index = parse_switches(&cinfo, argc, argv, 0, FALSE);
|
||||||
|
|
||||||
#ifdef TWO_FILE_COMMANDLINE
|
#ifdef TWO_FILE_COMMANDLINE
|
||||||
/* Must have either -outfile switch or explicit output file name */
|
if (!memdst) {
|
||||||
if (outfilename == NULL) {
|
/* Must have either -outfile switch or explicit output file name */
|
||||||
if (file_index != argc-2) {
|
if (outfilename == NULL) {
|
||||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
if (file_index != argc-2) {
|
||||||
progname);
|
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||||
usage();
|
progname);
|
||||||
}
|
usage();
|
||||||
outfilename = argv[file_index+1];
|
}
|
||||||
} else {
|
outfilename = argv[file_index+1];
|
||||||
if (file_index != argc-1) {
|
} else {
|
||||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
if (file_index != argc-1) {
|
||||||
progname);
|
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||||
usage();
|
progname);
|
||||||
|
usage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -796,17 +567,7 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* default input file is stdin */
|
/* default input file is stdin */
|
||||||
#ifdef USE_SETMODE /* need to hack file mode? */
|
input_file = read_stdin();
|
||||||
setmode(fileno(stdin), O_BINARY);
|
|
||||||
#endif
|
|
||||||
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
|
|
||||||
if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
|
|
||||||
fprintf(stderr, "%s: can't open stdin\n", progname);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
input_file = stdin;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open the output file. */
|
/* Open the output file. */
|
||||||
@@ -815,30 +576,13 @@ main (int argc, char **argv)
|
|||||||
fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
|
fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!memdst) {
|
||||||
/* default output file is stdout */
|
/* default output file is stdout */
|
||||||
#ifdef USE_SETMODE /* need to hack file mode? */
|
output_file = write_stdout();
|
||||||
setmode(fileno(stdout), O_BINARY);
|
|
||||||
#endif
|
|
||||||
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
|
|
||||||
if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) {
|
|
||||||
fprintf(stderr, "%s: can't open stdout\n", progname);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
output_file = stdout;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PROGRESS_REPORT
|
#ifdef PROGRESS_REPORT
|
||||||
/* Enable progress display, unless trace output is on */
|
start_progress_monitor((j_common_ptr) &cinfo, &progress);
|
||||||
if (jerr.trace_level == 0) {
|
|
||||||
progress.pub.progress_monitor = progress_monitor;
|
|
||||||
progress.completed_extra_passes = 0;
|
|
||||||
progress.total_extra_passes = 0;
|
|
||||||
progress.percent_done = -1;
|
|
||||||
cinfo.progress = &progress.pub;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Figure out the input file format, and set up to read it. */
|
/* Figure out the input file format, and set up to read it. */
|
||||||
@@ -855,7 +599,12 @@ main (int argc, char **argv)
|
|||||||
file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
|
file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
|
||||||
|
|
||||||
/* Specify data destination for compression */
|
/* Specify data destination for compression */
|
||||||
jpeg_stdio_dest(&cinfo, output_file);
|
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
|
||||||
|
if (memdst)
|
||||||
|
jpeg_mem_dest(&cinfo, &outbuffer, &outsize);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
jpeg_stdio_dest(&cinfo, output_file);
|
||||||
|
|
||||||
/* Start compressor */
|
/* Start compressor */
|
||||||
jpeg_start_compress(&cinfo, TRUE);
|
jpeg_start_compress(&cinfo, TRUE);
|
||||||
@@ -874,18 +623,20 @@ main (int argc, char **argv)
|
|||||||
/* Close files, if we opened them */
|
/* Close files, if we opened them */
|
||||||
if (input_file != stdin)
|
if (input_file != stdin)
|
||||||
fclose(input_file);
|
fclose(input_file);
|
||||||
if (output_file != stdout)
|
if (output_file != stdout && output_file != NULL)
|
||||||
fclose(output_file);
|
fclose(output_file);
|
||||||
|
|
||||||
#ifdef PROGRESS_REPORT
|
#ifdef PROGRESS_REPORT
|
||||||
/* Clear away progress display */
|
end_progress_monitor((j_common_ptr) &cinfo);
|
||||||
if (jerr.trace_level == 0) {
|
|
||||||
fprintf(stderr, "\r \r");
|
|
||||||
fflush(stderr);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (memdst) {
|
||||||
|
fprintf(stderr, "Compressed size: %lu bytes\n", outsize);
|
||||||
|
if (outbuffer != NULL)
|
||||||
|
free(outbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
/* All done. */
|
/* All done. */
|
||||||
exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
|
exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
|
||||||
return 0; /* suppress no-return-value warnings */
|
return 0; /* suppress no-return-value warnings */
|
||||||
}
|
}
|
||||||
|
|||||||
402
ckconfig.c
@@ -1,402 +0,0 @@
|
|||||||
/*
|
|
||||||
* ckconfig.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 1991-1994, Thomas G. Lane.
|
|
||||||
* This file is part of the Independent JPEG Group's software.
|
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This program is intended to help you determine how to configure the JPEG
|
|
||||||
* software for installation on a particular system. The idea is to try to
|
|
||||||
* compile and execute this program. If your compiler fails to compile the
|
|
||||||
* program, make changes as indicated in the comments below. Once you can
|
|
||||||
* compile the program, run it, and it will produce a "jconfig.h" file for
|
|
||||||
* your system.
|
|
||||||
*
|
|
||||||
* As a general rule, each time you try to compile this program,
|
|
||||||
* pay attention only to the *first* error message you get from the compiler.
|
|
||||||
* Many C compilers will issue lots of spurious error messages once they
|
|
||||||
* have gotten confused. Go to the line indicated in the first error message,
|
|
||||||
* and read the comments preceding that line to see what to change.
|
|
||||||
*
|
|
||||||
* Almost all of the edits you may need to make to this program consist of
|
|
||||||
* changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL",
|
|
||||||
* or vice versa. This is called defining or undefining that symbol.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* First we must see if your system has the include files we need.
|
|
||||||
* We start out with the assumption that your system has all the ANSI-standard
|
|
||||||
* include files. If you get any error trying to include one of these files,
|
|
||||||
* undefine the corresponding HAVE_xxx symbol.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */
|
|
||||||
#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */
|
|
||||||
#include <stddef.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HAVE_STDLIB_H /* same thing for stdlib.h */
|
|
||||||
#ifdef HAVE_STDLIB_H
|
|
||||||
#include <stdlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h> /* If you ain't got this, you ain't got C. */
|
|
||||||
|
|
||||||
/* We have to see if your string functions are defined by
|
|
||||||
* strings.h (old BSD convention) or string.h (everybody else).
|
|
||||||
* We try the non-BSD convention first; define NEED_BSD_STRINGS
|
|
||||||
* if the compiler says it can't find string.h.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#undef NEED_BSD_STRINGS
|
|
||||||
|
|
||||||
#ifdef NEED_BSD_STRINGS
|
|
||||||
#include <strings.h>
|
|
||||||
#else
|
|
||||||
#include <string.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* On some systems (especially older Unix machines), type size_t is
|
|
||||||
* defined only in the include file <sys/types.h>. If you get a failure
|
|
||||||
* on the size_t test below, try defining NEED_SYS_TYPES_H.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */
|
|
||||||
#ifdef NEED_SYS_TYPES_H
|
|
||||||
#include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Usually type size_t is defined in one of the include files we've included
|
|
||||||
* above. If not, you'll get an error on the "typedef size_t my_size_t;" line.
|
|
||||||
* In that case, first try defining NEED_SYS_TYPES_H just above.
|
|
||||||
* If that doesn't work, you'll have to search through your system library
|
|
||||||
* to figure out which include file defines "size_t". Look for a line that
|
|
||||||
* says "typedef something-or-other size_t;". Then, change the line below
|
|
||||||
* that says "#include <someincludefile.h>" to instead include the file
|
|
||||||
* you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find
|
|
||||||
* type size_t anywhere, try replacing "#include <someincludefile.h>" with
|
|
||||||
* "typedef unsigned int size_t;".
|
|
||||||
*/
|
|
||||||
|
|
||||||
#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */
|
|
||||||
|
|
||||||
#ifdef NEED_SPECIAL_INCLUDE
|
|
||||||
#include <someincludefile.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef size_t my_size_t; /* The payoff: do we have size_t now? */
|
|
||||||
|
|
||||||
|
|
||||||
/* The next question is whether your compiler supports ANSI-style function
|
|
||||||
* prototypes. You need to know this in order to choose between using
|
|
||||||
* makefile.ansi and using makefile.unix.
|
|
||||||
* The #define line below is set to assume you have ANSI function prototypes.
|
|
||||||
* If you get an error in this group of lines, undefine HAVE_PROTOTYPES.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define HAVE_PROTOTYPES
|
|
||||||
|
|
||||||
#ifdef HAVE_PROTOTYPES
|
|
||||||
int testfunction (int arg1, int * arg2); /* check prototypes */
|
|
||||||
|
|
||||||
struct methods_struct { /* check method-pointer declarations */
|
|
||||||
int (*error_exit) (char *msgtext);
|
|
||||||
int (*trace_message) (char *msgtext);
|
|
||||||
int (*another_method) (void);
|
|
||||||
};
|
|
||||||
|
|
||||||
int testfunction (int arg1, int * arg2) /* check definitions */
|
|
||||||
{
|
|
||||||
return arg2[arg1];
|
|
||||||
}
|
|
||||||
|
|
||||||
int test2function (void) /* check void arg list */
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Now we want to find out if your compiler knows what "unsigned char" means.
|
|
||||||
* If you get an error on the "unsigned char un_char;" line,
|
|
||||||
* then undefine HAVE_UNSIGNED_CHAR.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define HAVE_UNSIGNED_CHAR
|
|
||||||
|
|
||||||
#ifdef HAVE_UNSIGNED_CHAR
|
|
||||||
unsigned char un_char;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Now we want to find out if your compiler knows what "unsigned short" means.
|
|
||||||
* If you get an error on the "unsigned short un_short;" line,
|
|
||||||
* then undefine HAVE_UNSIGNED_SHORT.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define HAVE_UNSIGNED_SHORT
|
|
||||||
|
|
||||||
#ifdef HAVE_UNSIGNED_SHORT
|
|
||||||
unsigned short un_short;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Now we want to find out if your compiler understands type "void".
|
|
||||||
* If you get an error anywhere in here, undefine HAVE_VOID.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define HAVE_VOID
|
|
||||||
|
|
||||||
#ifdef HAVE_VOID
|
|
||||||
/* Caution: a C++ compiler will insist on complete prototypes */
|
|
||||||
typedef void * void_ptr; /* check void * */
|
|
||||||
#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
|
|
||||||
typedef void (*void_func) (int a, int b);
|
|
||||||
#else
|
|
||||||
typedef void (*void_func) ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_PROTOTYPES /* check void function result */
|
|
||||||
void test3function (void_ptr arg1, void_func arg2)
|
|
||||||
#else
|
|
||||||
void test3function (arg1, arg2)
|
|
||||||
void_ptr arg1;
|
|
||||||
void_func arg2;
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
char * locptr = (char *) arg1; /* check casting to and from void * */
|
|
||||||
arg1 = (void *) locptr;
|
|
||||||
(*arg2) (1, 2); /* check call of fcn returning void */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Now we want to find out if your compiler knows what "const" means.
|
|
||||||
* If you get an error here, undefine HAVE_CONST.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define HAVE_CONST
|
|
||||||
|
|
||||||
#ifdef HAVE_CONST
|
|
||||||
static const int carray[3] = {1, 2, 3};
|
|
||||||
|
|
||||||
#ifdef HAVE_PROTOTYPES
|
|
||||||
int test4function (const int arg1)
|
|
||||||
#else
|
|
||||||
int test4function (arg1)
|
|
||||||
const int arg1;
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
return carray[arg1];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* If you get an error or warning about this structure definition,
|
|
||||||
* define INCOMPLETE_TYPES_BROKEN.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#undef INCOMPLETE_TYPES_BROKEN
|
|
||||||
|
|
||||||
#ifndef INCOMPLETE_TYPES_BROKEN
|
|
||||||
typedef struct undefined_structure * undef_struct_ptr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* If you get an error about duplicate names,
|
|
||||||
* define NEED_SHORT_EXTERNAL_NAMES.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#undef NEED_SHORT_EXTERNAL_NAMES
|
|
||||||
|
|
||||||
#ifndef NEED_SHORT_EXTERNAL_NAMES
|
|
||||||
|
|
||||||
int possibly_duplicate_function ()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int possibly_dupli_function ()
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* OK, that's it. You should not have to change anything beyond this
|
|
||||||
* point in order to compile and execute this program. (You might get
|
|
||||||
* some warnings, but you can ignore them.)
|
|
||||||
* When you run the program, it will make a couple more tests that it
|
|
||||||
* can do automatically, and then it will create jconfig.h and print out
|
|
||||||
* any additional suggestions it has.
|
|
||||||
************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_PROTOTYPES
|
|
||||||
int is_char_signed (int arg)
|
|
||||||
#else
|
|
||||||
int is_char_signed (arg)
|
|
||||||
int arg;
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
if (arg == 189) { /* expected result for unsigned char */
|
|
||||||
return 0; /* type char is unsigned */
|
|
||||||
}
|
|
||||||
else if (arg != -67) { /* expected result for signed char */
|
|
||||||
printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
|
|
||||||
printf("I fear the JPEG software will not work at all.\n\n");
|
|
||||||
}
|
|
||||||
return 1; /* assume char is signed otherwise */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_PROTOTYPES
|
|
||||||
int is_shifting_signed (long arg)
|
|
||||||
#else
|
|
||||||
int is_shifting_signed (arg)
|
|
||||||
long arg;
|
|
||||||
#endif
|
|
||||||
/* See whether right-shift on a long is signed or not. */
|
|
||||||
{
|
|
||||||
long res = arg >> 4;
|
|
||||||
|
|
||||||
if (res == -0x7F7E80CL) { /* expected result for signed shift */
|
|
||||||
return 1; /* right shift is signed */
|
|
||||||
}
|
|
||||||
/* see if unsigned-shift hack will fix it. */
|
|
||||||
/* we can't just test exact value since it depends on width of long... */
|
|
||||||
res |= (~0L) << (32-4);
|
|
||||||
if (res == -0x7F7E80CL) { /* expected result now? */
|
|
||||||
return 0; /* right shift is unsigned */
|
|
||||||
}
|
|
||||||
printf("Right shift isn't acting as I expect it to.\n");
|
|
||||||
printf("I fear the JPEG software will not work at all.\n\n");
|
|
||||||
return 0; /* try it with unsigned anyway */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_PROTOTYPES
|
|
||||||
int main (int argc, char ** argv)
|
|
||||||
#else
|
|
||||||
int main (argc, argv)
|
|
||||||
int argc;
|
|
||||||
char ** argv;
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
char signed_char_check = (char) (-67);
|
|
||||||
FILE *outfile;
|
|
||||||
|
|
||||||
/* Attempt to write jconfig.h */
|
|
||||||
if ((outfile = fopen("jconfig.h", "w")) == NULL) {
|
|
||||||
printf("Failed to write jconfig.h\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Write out all the info */
|
|
||||||
fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n");
|
|
||||||
fprintf(outfile, "/* see jconfig.doc for explanations */\n\n");
|
|
||||||
#ifdef HAVE_PROTOTYPES
|
|
||||||
fprintf(outfile, "#define HAVE_PROTOTYPES\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#undef HAVE_PROTOTYPES\n");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_UNSIGNED_CHAR
|
|
||||||
fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_UNSIGNED_SHORT
|
|
||||||
fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VOID
|
|
||||||
fprintf(outfile, "/* #define void char */\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#define void char\n");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_CONST
|
|
||||||
fprintf(outfile, "/* #define const */\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#define const\n");
|
|
||||||
#endif
|
|
||||||
if (is_char_signed((int) signed_char_check))
|
|
||||||
fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n");
|
|
||||||
else
|
|
||||||
fprintf(outfile, "#define CHAR_IS_UNSIGNED\n");
|
|
||||||
#ifdef HAVE_STDDEF_H
|
|
||||||
fprintf(outfile, "#define HAVE_STDDEF_H\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#undef HAVE_STDDEF_H\n");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_STDLIB_H
|
|
||||||
fprintf(outfile, "#define HAVE_STDLIB_H\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#undef HAVE_STDLIB_H\n");
|
|
||||||
#endif
|
|
||||||
#ifdef NEED_BSD_STRINGS
|
|
||||||
fprintf(outfile, "#define NEED_BSD_STRINGS\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#undef NEED_BSD_STRINGS\n");
|
|
||||||
#endif
|
|
||||||
#ifdef NEED_SYS_TYPES_H
|
|
||||||
fprintf(outfile, "#define NEED_SYS_TYPES_H\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#undef NEED_SYS_TYPES_H\n");
|
|
||||||
#endif
|
|
||||||
fprintf(outfile, "#undef NEED_FAR_POINTERS\n");
|
|
||||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
|
||||||
fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n");
|
|
||||||
#endif
|
|
||||||
#ifdef INCOMPLETE_TYPES_BROKEN
|
|
||||||
fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n");
|
|
||||||
#else
|
|
||||||
fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n");
|
|
||||||
#endif
|
|
||||||
fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n");
|
|
||||||
if (is_shifting_signed(-0x7F7E80B1L))
|
|
||||||
fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n");
|
|
||||||
else
|
|
||||||
fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n");
|
|
||||||
fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n");
|
|
||||||
fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n");
|
|
||||||
fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n");
|
|
||||||
fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n");
|
|
||||||
fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n");
|
|
||||||
fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n");
|
|
||||||
fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n");
|
|
||||||
fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n");
|
|
||||||
fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n");
|
|
||||||
fprintf(outfile, "#undef DONT_USE_B_MODE\n");
|
|
||||||
fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n");
|
|
||||||
fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n");
|
|
||||||
|
|
||||||
/* Close the jconfig.h file */
|
|
||||||
fclose(outfile);
|
|
||||||
|
|
||||||
/* User report */
|
|
||||||
printf("Configuration check for Independent JPEG Group's software done.\n");
|
|
||||||
printf("\nI have written the jconfig.h file for you.\n\n");
|
|
||||||
#ifdef HAVE_PROTOTYPES
|
|
||||||
printf("You should use makefile.ansi as the starting point for your Makefile.\n");
|
|
||||||
#else
|
|
||||||
printf("You should use makefile.unix as the starting point for your Makefile.\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NEED_SPECIAL_INCLUDE
|
|
||||||
printf("\nYou'll need to change jconfig.h to include the system include file\n");
|
|
||||||
printf("that you found type size_t in, or add a direct definition of type\n");
|
|
||||||
printf("size_t if that's what you used. Just add it to the end.\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
15
cmakescripts/md5cmp.cmake
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
if(NOT MD5)
|
||||||
|
message(FATAL_ERROR "MD5 not specified")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT FILE)
|
||||||
|
message(FATAL_ERROR "FILE not specified")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(MD5 ${FILE} MD5FILE)
|
||||||
|
|
||||||
|
if(NOT MD5 STREQUAL MD5FILE)
|
||||||
|
message(FATAL_ERROR "MD5 of ${FILE} should be ${MD5}, not ${MD5FILE}.")
|
||||||
|
else()
|
||||||
|
message(STATUS "${MD5}: OK")
|
||||||
|
endif()
|
||||||
34
cmakescripts/testclean.cmake
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
file(GLOB FILES
|
||||||
|
testout*
|
||||||
|
*_GRAY_*.bmp
|
||||||
|
*_GRAY_*.png
|
||||||
|
*_GRAY_*.ppm
|
||||||
|
*_GRAY_*.jpg
|
||||||
|
*_GRAY.yuv
|
||||||
|
*_420_*.bmp
|
||||||
|
*_420_*.png
|
||||||
|
*_420_*.ppm
|
||||||
|
*_420_*.jpg
|
||||||
|
*_420.yuv
|
||||||
|
*_422_*.bmp
|
||||||
|
*_422_*.png
|
||||||
|
*_422_*.ppm
|
||||||
|
*_422_*.jpg
|
||||||
|
*_422.yuv
|
||||||
|
*_444_*.bmp
|
||||||
|
*_444_*.png
|
||||||
|
*_444_*.ppm
|
||||||
|
*_444_*.jpg
|
||||||
|
*_444.yuv
|
||||||
|
*_440_*.bmp
|
||||||
|
*_440_*.png
|
||||||
|
*_440_*.ppm
|
||||||
|
*_440_*.jpg
|
||||||
|
*_440.yuv)
|
||||||
|
|
||||||
|
if(NOT FILES STREQUAL "")
|
||||||
|
message(STATUS "Removing test files")
|
||||||
|
file(REMOVE ${FILES})
|
||||||
|
else()
|
||||||
|
message(STATUS "No files to remove")
|
||||||
|
endif()
|
||||||
118
coderules.doc
@@ -1,118 +0,0 @@
|
|||||||
IJG JPEG LIBRARY: CODING RULES
|
|
||||||
|
|
||||||
Copyright (C) 1991-1994, Thomas G. Lane.
|
|
||||||
This file is part of the Independent JPEG Group's software.
|
|
||||||
For conditions of distribution and use, see the accompanying README file.
|
|
||||||
|
|
||||||
|
|
||||||
Since numerous people will be contributing code and bug fixes, it's important
|
|
||||||
to establish a common coding style. The goal of using similar coding styles
|
|
||||||
is much more important than the details of just what that style is.
|
|
||||||
|
|
||||||
In general we follow the recommendations of "Recommended C Style and Coding
|
|
||||||
Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and
|
|
||||||
Brader). This document is available in the IJG FTP archive (see
|
|
||||||
jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl).
|
|
||||||
|
|
||||||
Block comments should be laid out thusly:
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Block comments in this style.
|
|
||||||
*/
|
|
||||||
|
|
||||||
We indent statements in K&R style, e.g.,
|
|
||||||
if (test) {
|
|
||||||
then-part;
|
|
||||||
} else {
|
|
||||||
else-part;
|
|
||||||
}
|
|
||||||
with two spaces per indentation level. (This indentation convention is
|
|
||||||
handled automatically by GNU Emacs and many other text editors.)
|
|
||||||
|
|
||||||
Multi-word names should be written in lower case with underscores, e.g.,
|
|
||||||
multi_word_name (not multiWordName). Preprocessor symbols and enum constants
|
|
||||||
are similar but upper case (MULTI_WORD_NAME). Names should be unique within
|
|
||||||
the first fifteen characters. (On some older systems, global names must be
|
|
||||||
unique within six characters. We accommodate this without cluttering the
|
|
||||||
source code by using macros to substitute shorter names.)
|
|
||||||
|
|
||||||
We use function prototypes everywhere; we rely on automatic source code
|
|
||||||
transformation to feed prototype-less C compilers. Transformation is done
|
|
||||||
by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript).
|
|
||||||
ansi2knr is not very bright, so it imposes a format requirement on function
|
|
||||||
declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions
|
|
||||||
should be written in the following style:
|
|
||||||
|
|
||||||
LOCAL int *
|
|
||||||
function_name (int a, char *b)
|
|
||||||
{
|
|
||||||
code...
|
|
||||||
}
|
|
||||||
|
|
||||||
Note that each function definition is prefixed with GLOBAL, LOCAL, or
|
|
||||||
METHODDEF. These macros expand to "static" or nothing as appropriate.
|
|
||||||
They provide a readable indication of the routine's usage and can readily be
|
|
||||||
changed for special needs. (For instance, all routines can be made global for
|
|
||||||
use with debuggers or code profilers that require it.)
|
|
||||||
|
|
||||||
ansi2knr does not transform method declarations (function pointers in
|
|
||||||
structs). We handle these with a macro JMETHOD, defined as
|
|
||||||
#ifdef HAVE_PROTOTYPES
|
|
||||||
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
|
|
||||||
#else
|
|
||||||
#define JMETHOD(type,methodname,arglist) type (*methodname) ()
|
|
||||||
#endif
|
|
||||||
which is used like this:
|
|
||||||
struct function_pointers {
|
|
||||||
JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp));
|
|
||||||
JMETHOD(void, term_entropy_encoder, (void));
|
|
||||||
};
|
|
||||||
Note the set of parentheses surrounding the parameter list.
|
|
||||||
|
|
||||||
A similar solution is used for external function declarations (see the JPP
|
|
||||||
macro).
|
|
||||||
|
|
||||||
If the code is to work on non-ANSI compilers, we cannot rely on a prototype
|
|
||||||
declaration to coerce actual parameters into the right types. Therefore, use
|
|
||||||
explicit casts on actual parameters whenever the actual parameter type is not
|
|
||||||
identical to the formal parameter. Beware of implicit conversions to "int".
|
|
||||||
|
|
||||||
It seems there are some non-ANSI compilers in which the sizeof() operator
|
|
||||||
is defined to return int, yet size_t is defined as long. Needless to say,
|
|
||||||
this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(),
|
|
||||||
so that the result is guaranteed to be of type size_t.
|
|
||||||
|
|
||||||
|
|
||||||
The JPEG library is intended to be used within larger programs. Furthermore,
|
|
||||||
we want it to be reentrant so that it can be used by applications that process
|
|
||||||
multiple images concurrently. The following rules support these requirements:
|
|
||||||
|
|
||||||
1. Avoid direct use of file I/O, "malloc", error report printouts, etc;
|
|
||||||
pass these through the common routines provided.
|
|
||||||
|
|
||||||
2. Minimize global namespace pollution. Functions should be declared static
|
|
||||||
wherever possible. (Note that our method-based calling conventions help this
|
|
||||||
a lot: in many modules only the initialization function will ever need to be
|
|
||||||
called directly, so only that function need be externally visible.) All
|
|
||||||
global function names should begin with "jpeg_", and should have an
|
|
||||||
abbreviated name (unique in the first six characters) substituted by macro
|
|
||||||
when NEED_SHORT_EXTERNAL_NAMES is set.
|
|
||||||
|
|
||||||
3. Don't use global variables; anything that must be used in another module
|
|
||||||
should be in the common data structures.
|
|
||||||
|
|
||||||
4. Don't use static variables except for read-only constant tables. Variables
|
|
||||||
that should be private to a module can be placed into private structures (see
|
|
||||||
the system architecture document, structure.doc).
|
|
||||||
|
|
||||||
5. Source file names should begin with "j" for files that are part of the
|
|
||||||
library proper; source files that are not part of the library, such as cjpeg.c
|
|
||||||
and djpeg.c, do not begin with "j". Keep source file names to eight
|
|
||||||
characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep
|
|
||||||
compression and decompression code in separate source files --- some
|
|
||||||
applications may want only one half of the library.
|
|
||||||
|
|
||||||
Note: these rules (particularly #4) are not followed religiously in the
|
|
||||||
modules that are used in cjpeg/djpeg but are not part of the JPEG library
|
|
||||||
proper. Those modules are not really intended to be used in other
|
|
||||||
applications.
|
|
||||||
78
coderules.txt
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
IJG JPEG LIBRARY: CODING RULES
|
||||||
|
|
||||||
|
This file was part of the Independent JPEG Group's software:
|
||||||
|
Copyright (C) 1991-1996, Thomas G. Lane.
|
||||||
|
It was modified by The libjpeg-turbo Project to include only information
|
||||||
|
relevant to libjpeg-turbo.
|
||||||
|
For conditions of distribution and use, see the accompanying README file.
|
||||||
|
|
||||||
|
|
||||||
|
Since numerous people will be contributing code and bug fixes, it's important
|
||||||
|
to establish a common coding style. The goal of using similar coding styles
|
||||||
|
is much more important than the details of just what that style is.
|
||||||
|
|
||||||
|
In general we follow the recommendations of "Recommended C Style and Coding
|
||||||
|
Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and
|
||||||
|
Brader). This document is available in the IJG FTP archive (see
|
||||||
|
jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl).
|
||||||
|
|
||||||
|
Block comments should be laid out thusly:
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Block comments in this style.
|
||||||
|
*/
|
||||||
|
|
||||||
|
We indent statements in K&R style, e.g.,
|
||||||
|
if (test) {
|
||||||
|
then-part;
|
||||||
|
} else {
|
||||||
|
else-part;
|
||||||
|
}
|
||||||
|
with two spaces per indentation level. (This indentation convention is
|
||||||
|
handled automatically by GNU Emacs and many other text editors.)
|
||||||
|
|
||||||
|
Multi-word names should be written in lower case with underscores, e.g.,
|
||||||
|
multi_word_name (not multiWordName). Preprocessor symbols and enum constants
|
||||||
|
are similar but upper case (MULTI_WORD_NAME). Names should be unique within
|
||||||
|
the first fifteen characters.
|
||||||
|
|
||||||
|
Note that each function definition must begin with GLOBAL(type), LOCAL(type),
|
||||||
|
or METHODDEF(type). These macros expand to "static type" or just "type" as
|
||||||
|
appropriate. They provide a readable indication of the routine's usage and
|
||||||
|
can readily be changed for special needs. (For instance, special linkage
|
||||||
|
keywords can be inserted for use in Windows DLLs.)
|
||||||
|
|
||||||
|
A similar solution is used for external function declarations (see the EXTERN
|
||||||
|
macro.)
|
||||||
|
|
||||||
|
|
||||||
|
The JPEG library is intended to be used within larger programs. Furthermore,
|
||||||
|
we want it to be reentrant so that it can be used by applications that process
|
||||||
|
multiple images concurrently. The following rules support these requirements:
|
||||||
|
|
||||||
|
1. Avoid direct use of file I/O, "malloc", error report printouts, etc;
|
||||||
|
pass these through the common routines provided.
|
||||||
|
|
||||||
|
2. Minimize global namespace pollution. Functions should be declared static
|
||||||
|
wherever possible. (Note that our method-based calling conventions help this
|
||||||
|
a lot: in many modules only the initialization function will ever need to be
|
||||||
|
called directly, so only that function need be externally visible.) All
|
||||||
|
global function names should begin with "jpeg_".
|
||||||
|
|
||||||
|
3. Don't use global variables; anything that must be used in another module
|
||||||
|
should be in the common data structures.
|
||||||
|
|
||||||
|
4. Don't use static variables except for read-only constant tables. Variables
|
||||||
|
that should be private to a module can be placed into private structures (see
|
||||||
|
the system architecture document, structure.txt).
|
||||||
|
|
||||||
|
5. Source file names should begin with "j" for files that are part of the
|
||||||
|
library proper; source files that are not part of the library, such as cjpeg.c
|
||||||
|
and djpeg.c, do not begin with "j". Keep compression and decompression code in
|
||||||
|
separate source files --- some applications may want only one half of the
|
||||||
|
library.
|
||||||
|
|
||||||
|
Note: these rules (particularly #4) are not followed religiously in the
|
||||||
|
modules that are used in cjpeg/djpeg but are not part of the JPEG library
|
||||||
|
proper. Those modules are not really intended to be used in other
|
||||||
|
applications.
|
||||||
582
configure.ac
Normal file
@@ -0,0 +1,582 @@
|
|||||||
|
# -*- Autoconf -*-
|
||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ([2.56])
|
||||||
|
AC_INIT([libjpeg-turbo], [1.4.1])
|
||||||
|
BUILD=`date +%Y%m%d`
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
|
||||||
|
AC_PREFIX_DEFAULT(/opt/libjpeg-turbo)
|
||||||
|
|
||||||
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
SAVED_CFLAGS=${CFLAGS}
|
||||||
|
SAVED_CPPFLAGS=${CPPFLAGS}
|
||||||
|
AC_PROG_CPP
|
||||||
|
AC_PROG_CC
|
||||||
|
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||||
|
AM_PROG_AS
|
||||||
|
AM_PROG_CC_C_O
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
AC_PROG_LN_S
|
||||||
|
|
||||||
|
# When the prefix is /opt/libjpeg-turbo, we assume that an "official" binary is
|
||||||
|
# being created, and thus we install things into specific locations.
|
||||||
|
|
||||||
|
old_prefix=${prefix}
|
||||||
|
if test "x$prefix" = "xNONE" -a "x$ac_default_prefix" != "x"; then
|
||||||
|
prefix=$ac_default_prefix
|
||||||
|
fi
|
||||||
|
DATADIR=`eval echo ${datadir}`
|
||||||
|
DATADIR=`eval echo $DATADIR`
|
||||||
|
if test "$DATADIR" = "/opt/libjpeg-turbo/share"; then
|
||||||
|
datadir='${prefix}'
|
||||||
|
fi
|
||||||
|
DATADIR=`eval echo ${datarootdir}`
|
||||||
|
DATADIR=`eval echo $DATADIR`
|
||||||
|
if test "$DATADIR" = "/opt/libjpeg-turbo/share"; then
|
||||||
|
datarootdir='${prefix}'
|
||||||
|
fi
|
||||||
|
DOCDIR=`eval echo ${docdir}`
|
||||||
|
DOCDIR=`eval echo $DOCDIR`
|
||||||
|
if test "$DOCDIR" = "/opt/libjpeg-turbo/doc/libjpeg-turbo"; then
|
||||||
|
docdir='${datadir}/doc'
|
||||||
|
fi
|
||||||
|
|
||||||
|
old_exec_prefix=${exec_prefix}
|
||||||
|
if test "x$exec_prefix" = "xNONE"; then
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_SIZEOF(size_t)
|
||||||
|
|
||||||
|
if test "x${libdir}" = 'x${exec_prefix}/lib' -o "x${libdir}" = 'x${prefix}/lib'; then
|
||||||
|
LIBDIR=`eval echo ${libdir}`
|
||||||
|
LIBDIR=`eval echo $LIBDIR`
|
||||||
|
if test "$LIBDIR" = "/opt/libjpeg-turbo/lib"; then
|
||||||
|
case $host_os in
|
||||||
|
darwin*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if test "${ac_cv_sizeof_size_t}" = "8"; then
|
||||||
|
libdir='${exec_prefix}/lib64'
|
||||||
|
elif test "${ac_cv_sizeof_size_t}" = "4"; then
|
||||||
|
libdir='${exec_prefix}/lib32'
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
exec_prefix=${old_exec_prefix}
|
||||||
|
prefix=${old_prefix}
|
||||||
|
|
||||||
|
# Check whether compiler supports pointers to undefined structures
|
||||||
|
AC_MSG_CHECKING(whether compiler supports pointers to undefined structures)
|
||||||
|
AC_TRY_COMPILE([ typedef struct undefined_structure * undef_struct_ptr; ], ,
|
||||||
|
AC_MSG_RESULT(yes),
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
AC_DEFINE([INCOMPLETE_TYPES_BROKEN], [1],
|
||||||
|
[Compiler does not support pointers to undefined structures.])])
|
||||||
|
|
||||||
|
if test "x${GCC}" = "xyes"; then
|
||||||
|
if test "x${SAVED_CFLAGS}" = "x"; then
|
||||||
|
CFLAGS=-O3
|
||||||
|
fi
|
||||||
|
if test "x${SAVED_CPPFLAGS}" = "x"; then
|
||||||
|
CPPFLAGS=-Wall
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||||
|
if test "x${SUNCC}" = "xyes"; then
|
||||||
|
if test "x${SAVED_CFLAGS}" = "x"; then
|
||||||
|
CFLAGS=-xO5
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([stddef.h stdlib.h locale.h string.h])
|
||||||
|
AC_CHECK_HEADER([sys/types.h],
|
||||||
|
AC_DEFINE([NEED_SYS_TYPES_H], 1, [Define if you need to include <sys/types.h> to get size_t.]))
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_C_CHAR_UNSIGNED
|
||||||
|
AC_C_INLINE
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_CHECK_TYPES([unsigned char, unsigned short])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if right shift is signed])
|
||||||
|
AC_TRY_RUN(
|
||||||
|
[#include <stdio.h>
|
||||||
|
int is_shifting_signed (long arg) {
|
||||||
|
long res = arg >> 4;
|
||||||
|
|
||||||
|
if (res == -0x7F7E80CL)
|
||||||
|
return 1; /* right shift is signed */
|
||||||
|
|
||||||
|
/* see if unsigned-shift hack will fix it. */
|
||||||
|
/* we can't just test exact value since it depends on width of long... */
|
||||||
|
res |= (~0L) << (32-4);
|
||||||
|
if (res == -0x7F7E80CL)
|
||||||
|
return 0; /* right shift is unsigned */
|
||||||
|
|
||||||
|
printf("Right shift isn't acting as I expect it to.\n");
|
||||||
|
printf("I fear the JPEG software will not work at all.\n\n");
|
||||||
|
return 0; /* try it with unsigned anyway */
|
||||||
|
}
|
||||||
|
int main (void) {
|
||||||
|
exit(is_shifting_signed(-0x7F7E80B1L));
|
||||||
|
}],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
AC_DEFINE([RIGHT_SHIFT_IS_UNSIGNED], 1,
|
||||||
|
[Define if your (broken) compiler shifts signed values as if they were unsigned.])],
|
||||||
|
[AC_MSG_RESULT(yes)],
|
||||||
|
[AC_MSG_RESULT(Assuming that right shift is signed on target machine.)])
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_CHECK_FUNCS([memset memcpy], [],
|
||||||
|
[AC_DEFINE([NEED_BSD_STRINGS], 1,
|
||||||
|
[Define if you have BSD-like bzero and bcopy in <strings.h> rather than memset/memcpy in <string.h>.])])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([libjpeg API version])
|
||||||
|
AC_ARG_VAR(JPEG_LIB_VERSION, [libjpeg API version (62, 70, or 80)])
|
||||||
|
if test "x$JPEG_LIB_VERSION" = "x"; then
|
||||||
|
AC_ARG_WITH([jpeg7],
|
||||||
|
AC_HELP_STRING([--with-jpeg7],
|
||||||
|
[Emulate libjpeg v7 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b.)]))
|
||||||
|
AC_ARG_WITH([jpeg8],
|
||||||
|
AC_HELP_STRING([--with-jpeg8],
|
||||||
|
[Emulate libjpeg v8 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b.)]))
|
||||||
|
if test "x${with_jpeg8}" = "xyes"; then
|
||||||
|
JPEG_LIB_VERSION=80
|
||||||
|
else
|
||||||
|
if test "x${with_jpeg7}" = "xyes"; then
|
||||||
|
JPEG_LIB_VERSION=70
|
||||||
|
else
|
||||||
|
JPEG_LIB_VERSION=62
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
JPEG_LIB_VERSION_DECIMAL=`expr $JPEG_LIB_VERSION / 10`.`expr $JPEG_LIB_VERSION % 10`
|
||||||
|
AC_SUBST(JPEG_LIB_VERSION_DECIMAL)
|
||||||
|
AC_MSG_RESULT([$JPEG_LIB_VERSION_DECIMAL])
|
||||||
|
AC_DEFINE_UNQUOTED(JPEG_LIB_VERSION, [$JPEG_LIB_VERSION],
|
||||||
|
[libjpeg API version])
|
||||||
|
|
||||||
|
AC_ARG_VAR(SO_MAJOR_VERSION,
|
||||||
|
[Major version of the libjpeg-turbo shared library (default is determined by the API version)])
|
||||||
|
AC_ARG_VAR(SO_MINOR_VERSION,
|
||||||
|
[Minor version of the libjpeg-turbo shared library (default is determined by the API version)])
|
||||||
|
if test "x$SO_MAJOR_VERSION" = "x"; then
|
||||||
|
case "$JPEG_LIB_VERSION" in
|
||||||
|
62) SO_MAJOR_VERSION=$JPEG_LIB_VERSION ;;
|
||||||
|
*) SO_MAJOR_VERSION=`expr $JPEG_LIB_VERSION / 10` ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if test "x$SO_MINOR_VERSION" = "x"; then
|
||||||
|
case "$JPEG_LIB_VERSION" in
|
||||||
|
80) SO_MINOR_VERSION=2 ;;
|
||||||
|
*) SO_MINOR_VERSION=0 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
RPM_CONFIG_ARGS=
|
||||||
|
|
||||||
|
# Memory source/destination managers
|
||||||
|
SO_AGE=0
|
||||||
|
MEM_SRCDST_FUNCTIONS=
|
||||||
|
if test "x${with_jpeg8}" != "xyes"; then
|
||||||
|
AC_MSG_CHECKING([whether to include in-memory source/destination managers])
|
||||||
|
AC_ARG_WITH([mem-srcdst],
|
||||||
|
AC_HELP_STRING([--without-mem-srcdst],
|
||||||
|
[Do not include in-memory source/destination manager functions when emulating the libjpeg v6b or v7 API/ABI]))
|
||||||
|
if test "x$with_mem_srcdst" != "xno"; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE([MEM_SRCDST_SUPPORTED], [1],
|
||||||
|
[Support in-memory source/destination managers])
|
||||||
|
SO_AGE=1
|
||||||
|
MEM_SRCDST_FUNCTIONS="global: jpeg_mem_dest; jpeg_mem_src;";
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-mem-srcdst"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([libjpeg shared library version])
|
||||||
|
AC_MSG_RESULT([$SO_MAJOR_VERSION.$SO_AGE.$SO_MINOR_VERSION])
|
||||||
|
LIBTOOL_CURRENT=`expr $SO_MAJOR_VERSION + $SO_AGE`
|
||||||
|
AC_SUBST(LIBTOOL_CURRENT)
|
||||||
|
AC_SUBST(SO_MAJOR_VERSION)
|
||||||
|
AC_SUBST(SO_MINOR_VERSION)
|
||||||
|
AC_SUBST(SO_AGE)
|
||||||
|
AC_SUBST(MEM_SRCDST_FUNCTIONS)
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(LIBJPEG_TURBO_VERSION, [$VERSION], [libjpeg-turbo version])
|
||||||
|
|
||||||
|
VERSION_SCRIPT=yes
|
||||||
|
AC_ARG_ENABLE([ld-version-script],
|
||||||
|
AS_HELP_STRING([--disable-ld-version-script],
|
||||||
|
[Disable linker version script for libjpeg-turbo (default is to use linker version script if the linker supports it)]),
|
||||||
|
[VERSION_SCRIPT=$enableval], [])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether the linker supports version scripts])
|
||||||
|
SAVED_LDFLAGS="$LDFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS -Wl,--version-script,conftest.map"
|
||||||
|
cat > conftest.map <<EOF
|
||||||
|
VERS_1 {
|
||||||
|
global: *;
|
||||||
|
};
|
||||||
|
EOF
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
|
||||||
|
[VERSION_SCRIPT_FLAG=-Wl,--version-script,;
|
||||||
|
AC_MSG_RESULT([yes (GNU style)])],
|
||||||
|
[])
|
||||||
|
if test "x$VERSION_SCRIPT_FLAG" = "x"; then
|
||||||
|
LDFLAGS="$SAVED_LDFLAGS -Wl,-M,conftest.map"
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
|
||||||
|
[VERSION_SCRIPT_FLAG=-Wl,-M,;
|
||||||
|
AC_MSG_RESULT([yes (Sun style)])],
|
||||||
|
[])
|
||||||
|
fi
|
||||||
|
if test "x$VERSION_SCRIPT_FLAG" = "x"; then
|
||||||
|
VERSION_SCRIPT=no
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
LDFLAGS="$SAVED_LDFLAGS"
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether to use version script when building libjpeg-turbo])
|
||||||
|
AC_MSG_RESULT($VERSION_SCRIPT)
|
||||||
|
|
||||||
|
AM_CONDITIONAL(VERSION_SCRIPT, test "x$VERSION_SCRIPT" = "xyes")
|
||||||
|
AC_SUBST(VERSION_SCRIPT_FLAG)
|
||||||
|
|
||||||
|
# Check for non-broken inline under various spellings
|
||||||
|
AC_MSG_CHECKING(for inline)
|
||||||
|
ljt_cv_inline=""
|
||||||
|
AC_TRY_COMPILE(, [} inline __attribute__((always_inline)) int foo() { return 0; }
|
||||||
|
int bar() { return foo();], ljt_cv_inline="inline __attribute__((always_inline))",
|
||||||
|
AC_TRY_COMPILE(, [} __inline__ int foo() { return 0; }
|
||||||
|
int bar() { return foo();], ljt_cv_inline="__inline__",
|
||||||
|
AC_TRY_COMPILE(, [} __inline int foo() { return 0; }
|
||||||
|
int bar() { return foo();], ljt_cv_inline="__inline",
|
||||||
|
AC_TRY_COMPILE(, [} inline int foo() { return 0; }
|
||||||
|
int bar() { return foo();], ljt_cv_inline="inline"))))
|
||||||
|
AC_MSG_RESULT($ljt_cv_inline)
|
||||||
|
AC_DEFINE_UNQUOTED([INLINE],[$ljt_cv_inline],[How to obtain function inlining.])
|
||||||
|
|
||||||
|
# Arithmetic coding support
|
||||||
|
AC_MSG_CHECKING([whether to include arithmetic encoding support])
|
||||||
|
AC_ARG_WITH([arith-enc],
|
||||||
|
AC_HELP_STRING([--without-arith-enc],
|
||||||
|
[Do not include arithmetic encoding support]))
|
||||||
|
if test "x$with_12bit" = "xyes"; then
|
||||||
|
with_arith_enc=no
|
||||||
|
fi
|
||||||
|
if test "x$with_arith_enc" = "xno"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-arith-enc"
|
||||||
|
else
|
||||||
|
AC_DEFINE([C_ARITH_CODING_SUPPORTED], [1], [Support arithmetic encoding])
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([WITH_ARITH_ENC], [test "x$with_arith_enc" != "xno"])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether to include arithmetic decoding support])
|
||||||
|
AC_ARG_WITH([arith-dec],
|
||||||
|
AC_HELP_STRING([--without-arith-dec],
|
||||||
|
[Do not include arithmetic decoding support]))
|
||||||
|
if test "x$with_12bit" = "xyes"; then
|
||||||
|
with_arith_dec=no
|
||||||
|
fi
|
||||||
|
if test "x$with_arith_dec" = "xno"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-arith-dec"
|
||||||
|
else
|
||||||
|
AC_DEFINE([D_ARITH_CODING_SUPPORTED], [1], [Support arithmetic decoding])
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([WITH_ARITH_DEC], [test "x$with_arith_dec" != "xno"])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([WITH_ARITH],
|
||||||
|
[test "x$with_arith_dec" != "xno" -o "x$with_arith_enc" != "xno"])
|
||||||
|
|
||||||
|
# 12-bit component support
|
||||||
|
AC_MSG_CHECKING([whether to use 12-bit samples])
|
||||||
|
AC_ARG_WITH([12bit],
|
||||||
|
AC_HELP_STRING([--with-12bit], [Encode/decode JPEG images with 12-bit samples (implies --without-simd --without-turbojpeg --without-arith-dec --without-arith-enc)]))
|
||||||
|
if test "x$with_12bit" = "xyes"; then
|
||||||
|
AC_DEFINE([BITS_IN_JSAMPLE], [12], [use 8 or 12])
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([WITH_12BIT], [test "x$with_12bit" = "xyes"])
|
||||||
|
|
||||||
|
# TurboJPEG support
|
||||||
|
AC_MSG_CHECKING([whether to build TurboJPEG C wrapper])
|
||||||
|
AC_ARG_WITH([turbojpeg],
|
||||||
|
AC_HELP_STRING([--without-turbojpeg],
|
||||||
|
[Do not include the TurboJPEG wrapper library and associated test programs]))
|
||||||
|
if test "x$with_12bit" = "xyes"; then
|
||||||
|
with_turbojpeg=no
|
||||||
|
fi
|
||||||
|
if test "x$with_turbojpeg" = "xno"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-turbojpeg"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Java support
|
||||||
|
AC_ARG_VAR(JAVAC, [Java compiler command (default: javac)])
|
||||||
|
if test "x$JAVAC" = "x"; then
|
||||||
|
JAVAC=javac
|
||||||
|
fi
|
||||||
|
AC_SUBST(JAVAC)
|
||||||
|
AC_ARG_VAR(JAVACFLAGS, [Java compiler flags])
|
||||||
|
AC_SUBST(JAVACFLAGS)
|
||||||
|
AC_ARG_VAR(JAR, [Java archive command (default: jar)])
|
||||||
|
if test "x$JAR" = "x"; then
|
||||||
|
JAR=jar
|
||||||
|
fi
|
||||||
|
AC_SUBST(JAR)
|
||||||
|
AC_ARG_VAR(JAVA, [Java runtime command (default: java)])
|
||||||
|
if test "x$JAVA" = "x"; then
|
||||||
|
JAVA=java
|
||||||
|
fi
|
||||||
|
AC_SUBST(JAVA)
|
||||||
|
AC_ARG_VAR(JNI_CFLAGS,
|
||||||
|
[C compiler flags needed to include jni.h (default: -I/System/Library/Frameworks/JavaVM.framework/Headers on OS X, '-I/usr/java/include -I/usr/java/include/solaris' on Solaris, and '-I/usr/java/default/include -I/usr/java/default/include/linux' on Linux)])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether to build TurboJPEG Java wrapper])
|
||||||
|
AC_ARG_WITH([java],
|
||||||
|
AC_HELP_STRING([--with-java], [Build Java wrapper for the TurboJPEG library]))
|
||||||
|
if test "x$with_12bit" = "xyes" -o "x$with_turbojpeg" = "xno"; then
|
||||||
|
with_java=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
WITH_JAVA=0
|
||||||
|
if test "x$with_java" = "xyes"; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
|
||||||
|
case $host_os in
|
||||||
|
darwin*)
|
||||||
|
DEFAULT_JNI_CFLAGS=-I/System/Library/Frameworks/JavaVM.framework/Headers
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
DEFAULT_JNI_CFLAGS='-I/usr/java/include -I/usr/java/include/solaris'
|
||||||
|
;;
|
||||||
|
linux*)
|
||||||
|
DEFAULT_JNI_CFLAGS='-I/usr/java/default/include -I/usr/java/default/include/linux'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test "x$JNI_CFLAGS" = "x"; then
|
||||||
|
JNI_CFLAGS=$DEFAULT_JNI_CFLAGS
|
||||||
|
fi
|
||||||
|
|
||||||
|
SAVE_CPPFLAGS=${CPPFLAGS}
|
||||||
|
CPPFLAGS="${CPPFLAGS} ${JNI_CFLAGS}"
|
||||||
|
AC_CHECK_HEADERS([jni.h], [DUMMY=1],
|
||||||
|
[AC_MSG_ERROR([Could not find JNI header file])])
|
||||||
|
CPPFLAGS=${SAVE_CPPFLAGS}
|
||||||
|
AC_SUBST(JNI_CFLAGS)
|
||||||
|
|
||||||
|
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --with-java"
|
||||||
|
JAVA_RPM_CONTENTS_1='%dir %{_datadir}/classes'
|
||||||
|
JAVA_RPM_CONTENTS_2=%{_datadir}/classes/turbojpeg.jar
|
||||||
|
WITH_JAVA=1
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([WITH_JAVA], [test "x$with_java" = "xyes"])
|
||||||
|
AC_SUBST(WITH_JAVA)
|
||||||
|
AC_SUBST(JAVA_RPM_CONTENTS_1)
|
||||||
|
AC_SUBST(JAVA_RPM_CONTENTS_2)
|
||||||
|
|
||||||
|
# optionally force using gas-preprocessor.pl for compatibility testing
|
||||||
|
AC_ARG_WITH([gas-preprocessor],
|
||||||
|
AC_HELP_STRING([--with-gas-preprocessor],
|
||||||
|
[Force using gas-preprocessor.pl on ARM.]))
|
||||||
|
if test "x${with_gas_preprocessor}" = "xyes"; then
|
||||||
|
case $host_os in
|
||||||
|
darwin*)
|
||||||
|
CCAS="gas-preprocessor.pl -fix-unreq $CC"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
CCAS="gas-preprocessor.pl -no-fix-unreq $CC"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_SUBST([CCAS])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# SIMD is optional
|
||||||
|
AC_ARG_WITH([simd],
|
||||||
|
AC_HELP_STRING([--without-simd], [Do not include SIMD extensions]))
|
||||||
|
if test "x$with_12bit" = "xyes"; then
|
||||||
|
with_simd=no
|
||||||
|
fi
|
||||||
|
if test "x${with_simd}" != "xno"; then
|
||||||
|
require_simd=no
|
||||||
|
if test "x${with_simd}" = "xyes"; then
|
||||||
|
require_simd=yes
|
||||||
|
fi
|
||||||
|
# Check if we're on a supported CPU
|
||||||
|
AC_MSG_CHECKING([if we have SIMD optimisations for cpu type])
|
||||||
|
case "$host_cpu" in
|
||||||
|
x86_64 | amd64)
|
||||||
|
AC_MSG_RESULT([yes (x86_64)])
|
||||||
|
AC_PROG_NASM
|
||||||
|
simd_arch=x86_64
|
||||||
|
;;
|
||||||
|
i*86 | x86 | ia32)
|
||||||
|
AC_MSG_RESULT([yes (i386)])
|
||||||
|
AC_PROG_NASM
|
||||||
|
simd_arch=i386
|
||||||
|
;;
|
||||||
|
arm*)
|
||||||
|
AC_MSG_RESULT([yes (arm)])
|
||||||
|
AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used])
|
||||||
|
AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE(
|
||||||
|
[if test "x$ac_use_gas_preprocessor" = "xyes"; then
|
||||||
|
AC_MSG_RESULT([yes (with gas-preprocessor)])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
fi
|
||||||
|
simd_arch=arm],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
with_simd=no])
|
||||||
|
if test "x${with_simd}" = "xno"; then
|
||||||
|
if test "x${require_simd}" = "xyes"; then
|
||||||
|
AC_MSG_ERROR([SIMD support can't be enabled.])
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
aarch64*)
|
||||||
|
AC_MSG_RESULT([yes (arm64)])
|
||||||
|
AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used])
|
||||||
|
AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE(
|
||||||
|
[if test "x$ac_use_gas_preprocessor" = "xyes"; then
|
||||||
|
AC_MSG_RESULT([yes (with gas-preprocessor)])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
fi
|
||||||
|
simd_arch=aarch64],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
with_simd=no])
|
||||||
|
if test "x${with_simd}" = "xno"; then
|
||||||
|
if test "x${require_simd}" = "xyes"; then
|
||||||
|
AC_MSG_ERROR([SIMD support can't be enabled.])
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
mips*)
|
||||||
|
AC_MSG_RESULT([yes (mips)])
|
||||||
|
AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used])
|
||||||
|
AC_CHECK_COMPATIBLE_MIPS_ASSEMBLER_IFELSE(
|
||||||
|
[AC_MSG_RESULT([yes])
|
||||||
|
simd_arch=mips],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
with_simd=no])
|
||||||
|
if test "x${with_simd}" = "xno"; then
|
||||||
|
if test "x${require_simd}" = "xyes"; then
|
||||||
|
AC_MSG_ERROR([SIMD support can't be enabled.])
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_MSG_RESULT([no ("$host_cpu")])
|
||||||
|
with_simd=no;
|
||||||
|
if test "x${require_simd}" = "xyes"; then
|
||||||
|
AC_MSG_ERROR([SIMD support not available for this CPU.])
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([SIMD support not available for this CPU. Performance will suffer.])
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test "x${with_simd}" != "xno"; then
|
||||||
|
AC_DEFINE([WITH_SIMD], [1], [Use accelerated SIMD routines.])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-simd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL([WITH_SIMD], [test "x$with_simd" != "xno"])
|
||||||
|
AM_CONDITIONAL([WITH_SSE_FLOAT_DCT], [test "x$simd_arch" = "xx86_64" -o "x$simd_arch" = "xi386"])
|
||||||
|
AM_CONDITIONAL([SIMD_I386], [test "x$simd_arch" = "xi386"])
|
||||||
|
AM_CONDITIONAL([SIMD_X86_64], [test "x$simd_arch" = "xx86_64"])
|
||||||
|
AM_CONDITIONAL([SIMD_ARM], [test "x$simd_arch" = "xarm"])
|
||||||
|
AM_CONDITIONAL([SIMD_ARM_64], [test "x$simd_arch" = "xaarch64"])
|
||||||
|
AM_CONDITIONAL([SIMD_MIPS], [test "x$simd_arch" = "xmips"])
|
||||||
|
AM_CONDITIONAL([X86_64], [test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xamd64"])
|
||||||
|
AM_CONDITIONAL([WITH_TURBOJPEG], [test "x$with_turbojpeg" != "xno"])
|
||||||
|
|
||||||
|
AC_ARG_VAR(PKGNAME, [distribution package name (default: libjpeg-turbo)])
|
||||||
|
if test "x$PKGNAME" = "x"; then
|
||||||
|
PKGNAME=$PACKAGE_NAME
|
||||||
|
fi
|
||||||
|
AC_SUBST(PKGNAME)
|
||||||
|
|
||||||
|
case "$host_cpu" in
|
||||||
|
x86_64)
|
||||||
|
RPMARCH=x86_64
|
||||||
|
DEBARCH=amd64
|
||||||
|
;;
|
||||||
|
i*86 | x86 | ia32)
|
||||||
|
RPMARCH=i386
|
||||||
|
DEBARCH=i386
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
RPMARCH=`uname -m`
|
||||||
|
DEBARCH=$RPMARCH
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test "${docdir}" = ""; then
|
||||||
|
docdir=${datadir}/doc
|
||||||
|
AC_SUBST(docdir)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(RPMARCH)
|
||||||
|
AC_SUBST(RPM_CONFIG_ARGS)
|
||||||
|
AC_SUBST(DEBARCH)
|
||||||
|
AC_SUBST(BUILD)
|
||||||
|
AC_DEFINE_UNQUOTED([BUILD], "$BUILD", [libjpeg-turbo build number])
|
||||||
|
|
||||||
|
# NOTE: autoheader automatically modifies the input file of the first
|
||||||
|
# invocation of AC_CONFIG_HEADERS, so we put config.h first to prevent
|
||||||
|
# jconfig.h.in from being clobbered. config.h is used only internally, whereas
|
||||||
|
# jconfig.h contains macros that are relevant to external programs (macros that
|
||||||
|
# specify which features were built into the library.)
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
AC_CONFIG_HEADERS([jconfig.h])
|
||||||
|
AC_CONFIG_HEADERS([jconfigint.h])
|
||||||
|
AC_CONFIG_FILES([pkgscripts/libjpeg-turbo.spec.tmpl:release/libjpeg-turbo.spec.in])
|
||||||
|
AC_CONFIG_FILES([pkgscripts/makecygwinpkg.tmpl:release/makecygwinpkg.in])
|
||||||
|
AC_CONFIG_FILES([pkgscripts/makedpkg.tmpl:release/makedpkg.in])
|
||||||
|
AC_CONFIG_FILES([pkgscripts/makemacpkg.tmpl:release/makemacpkg.in])
|
||||||
|
AC_CONFIG_FILES([pkgscripts/uninstall.tmpl:release/uninstall.in])
|
||||||
|
if test "x$with_turbojpeg" != "xno"; then
|
||||||
|
AC_CONFIG_FILES([tjbenchtest])
|
||||||
|
fi
|
||||||
|
if test "x$with_java" = "xyes"; then
|
||||||
|
AC_CONFIG_FILES([tjbenchtest.java])
|
||||||
|
AC_CONFIG_FILES([tjexampletest])
|
||||||
|
fi
|
||||||
|
AC_CONFIG_FILES([libjpeg.map])
|
||||||
|
AC_CONFIG_FILES([Makefile simd/Makefile])
|
||||||
|
AC_CONFIG_FILES([java/Makefile])
|
||||||
|
AC_CONFIG_FILES([md5/Makefile])
|
||||||
|
AC_OUTPUT
|
||||||
79
djpeg.1
@@ -1,4 +1,4 @@
|
|||||||
.TH DJPEG 1 "12 December 1994"
|
.TH DJPEG 1 "21 November 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
djpeg \- decompress a JPEG file to an image file
|
djpeg \- decompress a JPEG file to an image file
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -26,9 +26,9 @@ or
|
|||||||
.BR \-gr .
|
.BR \-gr .
|
||||||
Most of the "basic" switches can be abbreviated to as little as one letter.
|
Most of the "basic" switches can be abbreviated to as little as one letter.
|
||||||
Upper and lower case are equivalent (thus
|
Upper and lower case are equivalent (thus
|
||||||
.B \-GIF
|
.B \-BMP
|
||||||
is the same as
|
is the same as
|
||||||
.BR \-gif ).
|
.BR \-bmp ).
|
||||||
British spellings are also accepted (e.g.,
|
British spellings are also accepted (e.g.,
|
||||||
.BR \-greyscale ),
|
.BR \-greyscale ),
|
||||||
though for brevity these are not mentioned below.
|
though for brevity these are not mentioned below.
|
||||||
@@ -55,15 +55,19 @@ default options are chosen for highest quality output.) Currently, this is
|
|||||||
equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
|
equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
|
||||||
.TP
|
.TP
|
||||||
.B \-grayscale
|
.B \-grayscale
|
||||||
Force gray-scale output even if JPEG file is color. Useful for viewing on
|
Force grayscale output even if JPEG file is color. Useful for viewing on
|
||||||
monochrome displays; also,
|
monochrome displays; also,
|
||||||
.B djpeg
|
.B djpeg
|
||||||
runs noticeably faster in this mode.
|
runs noticeably faster in this mode.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-rgb
|
||||||
|
Force RGB output even if JPEG file is grayscale.
|
||||||
|
.TP
|
||||||
.BI \-scale " M/N"
|
.BI \-scale " M/N"
|
||||||
Scale the output image by a factor M/N. Currently the scale factor must be
|
Scale the output image by a factor M/N. Currently the scale factor must be
|
||||||
1/1, 1/2, 1/4, or 1/8. Scaling is handy if the image is larger than your
|
M/8, where M is an integer between 1 and 16 inclusive, or any reduced fraction
|
||||||
screen; also,
|
thereof (such as 1/2, 3/4, etc.) Scaling is handy if the image is larger than
|
||||||
|
your screen; also,
|
||||||
.B djpeg
|
.B djpeg
|
||||||
runs much faster when scaling down the output.
|
runs much faster when scaling down the output.
|
||||||
.TP
|
.TP
|
||||||
@@ -73,7 +77,7 @@ emitted if
|
|||||||
.B \-colors
|
.B \-colors
|
||||||
or
|
or
|
||||||
.B \-grayscale
|
.B \-grayscale
|
||||||
is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
|
is specified, or if the JPEG file is grayscale; otherwise, 24-bit full-color
|
||||||
format is emitted.
|
format is emitted.
|
||||||
.TP
|
.TP
|
||||||
.B \-gif
|
.B \-gif
|
||||||
@@ -87,12 +91,12 @@ emitted if
|
|||||||
.B \-colors
|
.B \-colors
|
||||||
or
|
or
|
||||||
.B \-grayscale
|
.B \-grayscale
|
||||||
is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
|
is specified, or if the JPEG file is grayscale; otherwise, 24-bit full-color
|
||||||
format is emitted.
|
format is emitted.
|
||||||
.TP
|
.TP
|
||||||
.B \-pnm
|
.B \-pnm
|
||||||
Select PBMPLUS (PPM/PGM) output format (this is the default format).
|
Select PBMPLUS (PPM/PGM) output format (this is the default format).
|
||||||
PGM is emitted if the JPEG file is gray-scale or if
|
PGM is emitted if the JPEG file is grayscale or if
|
||||||
.B \-grayscale
|
.B \-grayscale
|
||||||
is specified; otherwise PPM is emitted.
|
is specified; otherwise PPM is emitted.
|
||||||
.TP
|
.TP
|
||||||
@@ -100,8 +104,8 @@ is specified; otherwise PPM is emitted.
|
|||||||
Select RLE output format. (Requires URT library.)
|
Select RLE output format. (Requires URT library.)
|
||||||
.TP
|
.TP
|
||||||
.B \-targa
|
.B \-targa
|
||||||
Select Targa output format. Gray-scale format is emitted if the JPEG file is
|
Select Targa output format. Grayscale format is emitted if the JPEG file is
|
||||||
gray-scale or if
|
grayscale or if
|
||||||
.B \-grayscale
|
.B \-grayscale
|
||||||
is specified; otherwise, colormapped format is emitted if
|
is specified; otherwise, colormapped format is emitted if
|
||||||
.B \-colors
|
.B \-colors
|
||||||
@@ -114,14 +118,28 @@ Use integer DCT method (default).
|
|||||||
.TP
|
.TP
|
||||||
.B \-dct fast
|
.B \-dct fast
|
||||||
Use fast integer DCT (less accurate).
|
Use fast integer DCT (less accurate).
|
||||||
|
In libjpeg-turbo, the fast method is generally about 5-15% faster than the int
|
||||||
|
method when using the x86/x86-64 SIMD extensions (results may vary with other
|
||||||
|
SIMD implementations, or when using libjpeg-turbo without SIMD extensions.) If
|
||||||
|
the JPEG image was compressed using a quality level of 85 or below, then there
|
||||||
|
should be little or no perceptible difference between the two algorithms. When
|
||||||
|
decompressing images that were compressed using quality levels above 85,
|
||||||
|
however, the difference between the fast and int methods becomes more
|
||||||
|
pronounced. With images compressed using quality=97, for instance, the fast
|
||||||
|
method incurs generally about a 4-6 dB loss (in PSNR) relative to the int
|
||||||
|
method, but this can be larger for some images. If you can avoid it, do not
|
||||||
|
use the fast method when decompressing images that were compressed using
|
||||||
|
quality levels above 97. The algorithm often degenerates for such images and
|
||||||
|
can actually produce a more lossy output image than if the JPEG image had been
|
||||||
|
compressed using lower quality levels.
|
||||||
.TP
|
.TP
|
||||||
.B \-dct float
|
.B \-dct float
|
||||||
Use floating-point DCT method.
|
Use floating-point DCT method.
|
||||||
The float method is very slightly more accurate than the int method, but is
|
The float method is mainly a legacy feature. It does not produce significantly
|
||||||
much slower unless your machine has very fast floating-point hardware. Also
|
more accurate results than the int method, and it is much slower. The float
|
||||||
note that results of the floating-point method may vary slightly across
|
method may also give different results on different machines due to varying
|
||||||
machines, while the integer methods should give the same results everywhere.
|
roundoff behavior, whereas the integer methods should give the same results on
|
||||||
The fast integer method is much less accurate than the other two.
|
all machines.
|
||||||
.TP
|
.TP
|
||||||
.B \-dither fs
|
.B \-dither fs
|
||||||
Use Floyd-Steinberg dithering in color quantization.
|
Use Floyd-Steinberg dithering in color quantization.
|
||||||
@@ -159,7 +177,7 @@ faster and needs less memory, but it produces a lower-quality image.
|
|||||||
is ignored unless you also say
|
is ignored unless you also say
|
||||||
.B \-colors
|
.B \-colors
|
||||||
.IR N .
|
.IR N .
|
||||||
Also, the one-pass method is always used for gray-scale output (the two-pass
|
Also, the one-pass method is always used for grayscale output (the two-pass
|
||||||
method is no improvement then).
|
method is no improvement then).
|
||||||
.TP
|
.TP
|
||||||
.BI \-maxmemory " N"
|
.BI \-maxmemory " N"
|
||||||
@@ -172,6 +190,10 @@ selects 4000000 bytes. If more space is needed, temporary files will be used.
|
|||||||
.BI \-outfile " name"
|
.BI \-outfile " name"
|
||||||
Send output image to the named file, not to standard output.
|
Send output image to the named file, not to standard output.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-memsrc
|
||||||
|
Load input file into memory before decompressing. This feature was implemented
|
||||||
|
mainly as a way of testing the in-memory source manager (jpeg_mem_src().)
|
||||||
|
.TP
|
||||||
.B \-verbose
|
.B \-verbose
|
||||||
Enable debug printout. More
|
Enable debug printout. More
|
||||||
.BR \-v 's
|
.BR \-v 's
|
||||||
@@ -180,15 +202,18 @@ give more output. Also, version information is printed at startup.
|
|||||||
.B \-debug
|
.B \-debug
|
||||||
Same as
|
Same as
|
||||||
.BR \-verbose .
|
.BR \-verbose .
|
||||||
|
.TP
|
||||||
|
.B \-version
|
||||||
|
Print version information and exit.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.LP
|
.LP
|
||||||
This example decompresses the JPEG file foo.jpg, automatically quantizes to
|
This example decompresses the JPEG file foo.jpg, quantizes it to
|
||||||
256 colors, and saves the output in GIF format in foo.gif:
|
256 colors, and saves the output in 8-bit BMP format in foo.bmp:
|
||||||
.IP
|
.IP
|
||||||
.B djpeg \-gif
|
.B djpeg \-colors 256 \-bmp
|
||||||
.I foo.jpg
|
.I foo.jpg
|
||||||
.B >
|
.B >
|
||||||
.I foo.gif
|
.I foo.bmp
|
||||||
.SH HINTS
|
.SH HINTS
|
||||||
To get a quick preview of an image, use the
|
To get a quick preview of an image, use the
|
||||||
.B \-grayscale
|
.B \-grayscale
|
||||||
@@ -231,6 +256,7 @@ itself is overridden by an explicit
|
|||||||
.BR \-maxmemory .
|
.BR \-maxmemory .
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR cjpeg (1),
|
.BR cjpeg (1),
|
||||||
|
.BR jpegtran (1),
|
||||||
.BR rdjpgcom (1),
|
.BR rdjpgcom (1),
|
||||||
.BR wrjpgcom (1)
|
.BR wrjpgcom (1)
|
||||||
.br
|
.br
|
||||||
@@ -241,7 +267,12 @@ Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
|
|||||||
Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
|
Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Independent JPEG Group
|
Independent JPEG Group
|
||||||
.SH BUGS
|
|
||||||
Arithmetic coding is not supported for legal reasons.
|
|
||||||
.PP
|
.PP
|
||||||
Still not as fast as we'd like.
|
This file was modified by The libjpeg-turbo Project to include only information
|
||||||
|
relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
|
||||||
|
features not present in libjpeg.
|
||||||
|
.SH BUGS
|
||||||
|
To avoid the Unisys LZW patent,
|
||||||
|
.B djpeg
|
||||||
|
produces uncompressed GIF files. These are larger than they should be, but
|
||||||
|
are readable by standard GIF decoders.
|
||||||
|
|||||||
460
djpeg.c
@@ -1,8 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* djpeg.c
|
* djpeg.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 1991-1994, Thomas G. Lane.
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||||
|
* libjpeg-turbo Modifications:
|
||||||
|
* Copyright (C) 2010-2011, 2013-2014, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* For conditions of distribution and use, see the accompanying README file.
|
||||||
*
|
*
|
||||||
* This file contains a command-line user interface for the JPEG decompressor.
|
* This file contains a command-line user interface for the JPEG decompressor.
|
||||||
@@ -10,8 +12,8 @@
|
|||||||
*
|
*
|
||||||
* Two different command line styles are permitted, depending on the
|
* Two different command line styles are permitted, depending on the
|
||||||
* compile-time switch TWO_FILE_COMMANDLINE:
|
* compile-time switch TWO_FILE_COMMANDLINE:
|
||||||
* djpeg [options] inputfile outputfile
|
* djpeg [options] inputfile outputfile
|
||||||
* djpeg [options] [inputfile]
|
* djpeg [options] [inputfile]
|
||||||
* In the second style, output is always to standard output, which you'd
|
* In the second style, output is always to standard output, which you'd
|
||||||
* normally redirect to a file or pipe to some other program. Input is
|
* normally redirect to a file or pipe to some other program. Input is
|
||||||
* either from a named file or from standard input (typically redirected).
|
* either from a named file or from standard input (typically redirected).
|
||||||
@@ -19,62 +21,30 @@
|
|||||||
* don't support pipes. Also, you MUST use the first style if your system
|
* don't support pipes. Also, you MUST use the first style if your system
|
||||||
* doesn't do binary I/O to stdin/stdout.
|
* doesn't do binary I/O to stdin/stdout.
|
||||||
* To simplify script writing, the "-outfile" switch is provided. The syntax
|
* To simplify script writing, the "-outfile" switch is provided. The syntax
|
||||||
* djpeg [options] -outfile outputfile inputfile
|
* djpeg [options] -outfile outputfile inputfile
|
||||||
* works regardless of which command line style is used.
|
* works regardless of which command line style is used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||||
#include "jversion.h" /* for version message */
|
#include "jversion.h" /* for version message */
|
||||||
|
#include "jconfigint.h"
|
||||||
|
|
||||||
#include <ctype.h> /* to declare isupper(),tolower(),isprint() */
|
#include <ctype.h> /* to declare isprint() */
|
||||||
#ifdef NEED_SIGNAL_CATCHER
|
|
||||||
#include <signal.h> /* to declare signal() */
|
|
||||||
#endif
|
|
||||||
#ifdef USE_SETMODE
|
|
||||||
#include <fcntl.h> /* to declare setmode()'s parameter macros */
|
|
||||||
/* If you have setmode() but not <io.h>, just delete this line: */
|
|
||||||
#include <io.h> /* to declare setmode() */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
#include <SIOUX.h> /* Metrowerks declares it here */
|
#include <SIOUX.h> /* Metrowerks needs this */
|
||||||
|
#include <console.h> /* ... and this */
|
||||||
#endif
|
#endif
|
||||||
#ifdef THINK_C
|
#ifdef THINK_C
|
||||||
#include <console.h> /* Think declares it here */
|
#include <console.h> /* Think declares it here */
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
|
|
||||||
#define READ_BINARY "r"
|
|
||||||
#define WRITE_BINARY "w"
|
|
||||||
#else
|
|
||||||
#define READ_BINARY "rb"
|
|
||||||
#define WRITE_BINARY "wb"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef EXIT_FAILURE /* define exit() codes if not provided */
|
|
||||||
#define EXIT_FAILURE 1
|
|
||||||
#endif
|
|
||||||
#ifndef EXIT_SUCCESS
|
|
||||||
#ifdef VMS
|
|
||||||
#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
|
|
||||||
#else
|
|
||||||
#define EXIT_SUCCESS 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#ifndef EXIT_WARNING
|
|
||||||
#ifdef VMS
|
|
||||||
#define EXIT_WARNING 1 /* VMS is very nonstandard */
|
|
||||||
#else
|
|
||||||
#define EXIT_WARNING 2
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Create the add-on message string table. */
|
/* Create the add-on message string table. */
|
||||||
|
|
||||||
#define JMESSAGE(code,string) string ,
|
#define JMESSAGE(code,string) string ,
|
||||||
|
|
||||||
static const char * const cdjpeg_message_table[] = {
|
static const char * const cdjpeg_message_table[] = {
|
||||||
#include "cderror.h"
|
#include "cderror.h"
|
||||||
@@ -90,75 +60,22 @@ static const char * const cdjpeg_message_table[] = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FMT_BMP, /* BMP format (Windows flavor) */
|
FMT_BMP, /* BMP format (Windows flavor) */
|
||||||
FMT_GIF, /* GIF format */
|
FMT_GIF, /* GIF format */
|
||||||
FMT_OS2, /* BMP format (OS/2 flavor) */
|
FMT_OS2, /* BMP format (OS/2 flavor) */
|
||||||
FMT_PPM, /* PPM/PGM (PBMPLUS formats) */
|
FMT_PPM, /* PPM/PGM (PBMPLUS formats) */
|
||||||
FMT_RLE, /* RLE format */
|
FMT_RLE, /* RLE format */
|
||||||
FMT_TARGA, /* Targa format */
|
FMT_TARGA, /* Targa format */
|
||||||
FMT_TIFF /* TIFF format */
|
FMT_TIFF /* TIFF format */
|
||||||
} IMAGE_FORMATS;
|
} IMAGE_FORMATS;
|
||||||
|
|
||||||
#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */
|
#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */
|
||||||
#define DEFAULT_FMT FMT_PPM
|
#define DEFAULT_FMT FMT_PPM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static IMAGE_FORMATS requested_fmt;
|
static IMAGE_FORMATS requested_fmt;
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Signal catcher to ensure that temporary files are removed before aborting.
|
|
||||||
* NB: for Amiga Manx C this is actually a global routine named _abort();
|
|
||||||
* we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus...
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef NEED_SIGNAL_CATCHER
|
|
||||||
|
|
||||||
static j_common_ptr sig_cinfo;
|
|
||||||
|
|
||||||
GLOBAL void
|
|
||||||
signal_catcher (int signum)
|
|
||||||
{
|
|
||||||
if (sig_cinfo != NULL) {
|
|
||||||
if (sig_cinfo->err != NULL) /* turn off trace output */
|
|
||||||
sig_cinfo->err->trace_level = 0;
|
|
||||||
jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */
|
|
||||||
}
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Optional routine to display a percent-done figure on stderr.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef PROGRESS_REPORT
|
|
||||||
|
|
||||||
METHODDEF void
|
|
||||||
progress_monitor (j_common_ptr cinfo)
|
|
||||||
{
|
|
||||||
cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress;
|
|
||||||
int total_passes = prog->pub.total_passes + prog->total_extra_passes;
|
|
||||||
int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit);
|
|
||||||
|
|
||||||
if (percent_done != prog->percent_done) {
|
|
||||||
prog->percent_done = percent_done;
|
|
||||||
if (total_passes > 1) {
|
|
||||||
fprintf(stderr, "\rPass %d/%d: %3d%% ",
|
|
||||||
prog->pub.completed_passes + prog->completed_extra_passes + 1,
|
|
||||||
total_passes, percent_done);
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "\r %3d%% ", percent_done);
|
|
||||||
}
|
|
||||||
fflush(stderr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Argument-parsing code.
|
* Argument-parsing code.
|
||||||
* The switch parser is designed to be useful with DOS-style command line
|
* The switch parser is designed to be useful with DOS-style command line
|
||||||
@@ -168,11 +85,13 @@ progress_monitor (j_common_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static const char * progname; /* program name for error messages */
|
static const char * progname; /* program name for error messages */
|
||||||
static char * outfilename; /* for -outfile switch */
|
static char * outfilename; /* for -outfile switch */
|
||||||
|
boolean memsrc; /* for -memsrc switch */
|
||||||
|
#define INPUT_BUF_SIZE 4096
|
||||||
|
|
||||||
|
|
||||||
LOCAL void
|
LOCAL(void)
|
||||||
usage (void)
|
usage (void)
|
||||||
/* complain about bad command line */
|
/* complain about bad command line */
|
||||||
{
|
{
|
||||||
@@ -187,45 +106,47 @@ usage (void)
|
|||||||
fprintf(stderr, " -colors N Reduce image to no more than N colors\n");
|
fprintf(stderr, " -colors N Reduce image to no more than N colors\n");
|
||||||
fprintf(stderr, " -fast Fast, low-quality processing\n");
|
fprintf(stderr, " -fast Fast, low-quality processing\n");
|
||||||
fprintf(stderr, " -grayscale Force grayscale output\n");
|
fprintf(stderr, " -grayscale Force grayscale output\n");
|
||||||
|
fprintf(stderr, " -rgb Force RGB output\n");
|
||||||
|
fprintf(stderr, " -rgb565 Force RGB565 output\n");
|
||||||
#ifdef IDCT_SCALING_SUPPORTED
|
#ifdef IDCT_SCALING_SUPPORTED
|
||||||
fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n");
|
fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n");
|
||||||
#endif
|
#endif
|
||||||
#ifdef BMP_SUPPORTED
|
#ifdef BMP_SUPPORTED
|
||||||
fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n",
|
fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n",
|
||||||
(DEFAULT_FMT == FMT_BMP ? " (default)" : ""));
|
(DEFAULT_FMT == FMT_BMP ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
#ifdef GIF_SUPPORTED
|
#ifdef GIF_SUPPORTED
|
||||||
fprintf(stderr, " -gif Select GIF output format%s\n",
|
fprintf(stderr, " -gif Select GIF output format%s\n",
|
||||||
(DEFAULT_FMT == FMT_GIF ? " (default)" : ""));
|
(DEFAULT_FMT == FMT_GIF ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
#ifdef BMP_SUPPORTED
|
#ifdef BMP_SUPPORTED
|
||||||
fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n",
|
fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n",
|
||||||
(DEFAULT_FMT == FMT_OS2 ? " (default)" : ""));
|
(DEFAULT_FMT == FMT_OS2 ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
#ifdef PPM_SUPPORTED
|
#ifdef PPM_SUPPORTED
|
||||||
fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n",
|
fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n",
|
||||||
(DEFAULT_FMT == FMT_PPM ? " (default)" : ""));
|
(DEFAULT_FMT == FMT_PPM ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
#ifdef RLE_SUPPORTED
|
#ifdef RLE_SUPPORTED
|
||||||
fprintf(stderr, " -rle Select Utah RLE output format%s\n",
|
fprintf(stderr, " -rle Select Utah RLE output format%s\n",
|
||||||
(DEFAULT_FMT == FMT_RLE ? " (default)" : ""));
|
(DEFAULT_FMT == FMT_RLE ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
#ifdef TARGA_SUPPORTED
|
#ifdef TARGA_SUPPORTED
|
||||||
fprintf(stderr, " -targa Select Targa output format%s\n",
|
fprintf(stderr, " -targa Select Targa output format%s\n",
|
||||||
(DEFAULT_FMT == FMT_TARGA ? " (default)" : ""));
|
(DEFAULT_FMT == FMT_TARGA ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr, "Switches for advanced users:\n");
|
fprintf(stderr, "Switches for advanced users:\n");
|
||||||
#ifdef DCT_ISLOW_SUPPORTED
|
#ifdef DCT_ISLOW_SUPPORTED
|
||||||
fprintf(stderr, " -dct int Use integer DCT method%s\n",
|
fprintf(stderr, " -dct int Use integer DCT method%s\n",
|
||||||
(JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
|
(JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
#ifdef DCT_IFAST_SUPPORTED
|
#ifdef DCT_IFAST_SUPPORTED
|
||||||
fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n",
|
fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n",
|
||||||
(JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
|
(JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
#ifdef DCT_FLOAT_SUPPORTED
|
#ifdef DCT_FLOAT_SUPPORTED
|
||||||
fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
|
fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
|
||||||
(JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
|
(JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr, " -dither fs Use F-S dithering (default)\n");
|
fprintf(stderr, " -dither fs Use F-S dithering (default)\n");
|
||||||
fprintf(stderr, " -dither none Don't use dithering in quantization\n");
|
fprintf(stderr, " -dither none Don't use dithering in quantization\n");
|
||||||
@@ -239,39 +160,19 @@ usage (void)
|
|||||||
#endif
|
#endif
|
||||||
fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
|
fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
|
||||||
fprintf(stderr, " -outfile name Specify name for output file\n");
|
fprintf(stderr, " -outfile name Specify name for output file\n");
|
||||||
|
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
|
||||||
|
fprintf(stderr, " -memsrc Load input file into memory before decompressing\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
||||||
|
fprintf(stderr, " -version Print version information and exit\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LOCAL boolean
|
LOCAL(int)
|
||||||
keymatch (char * arg, const char * keyword, int minchars)
|
|
||||||
/* Case-insensitive matching of (possibly abbreviated) keyword switches. */
|
|
||||||
/* keyword is the constant keyword (must be lower case already), */
|
|
||||||
/* minchars is length of minimum legal abbreviation. */
|
|
||||||
{
|
|
||||||
register int ca, ck;
|
|
||||||
register int nmatched = 0;
|
|
||||||
|
|
||||||
while ((ca = *arg++) != '\0') {
|
|
||||||
if ((ck = *keyword++) == '\0')
|
|
||||||
return FALSE; /* arg longer than keyword, no good */
|
|
||||||
if (isupper(ca)) /* force arg to lcase (assume ck is already) */
|
|
||||||
ca = tolower(ca);
|
|
||||||
if (ca != ck)
|
|
||||||
return FALSE; /* no good */
|
|
||||||
nmatched++; /* count matched characters */
|
|
||||||
}
|
|
||||||
/* reached end of argument; fail if it's too short for unique abbrev */
|
|
||||||
if (nmatched < minchars)
|
|
||||||
return FALSE;
|
|
||||||
return TRUE; /* A-OK */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LOCAL int
|
|
||||||
parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||||
int last_file_arg_seen, boolean for_real)
|
int last_file_arg_seen, boolean for_real)
|
||||||
/* Parse optional switches.
|
/* Parse optional switches.
|
||||||
* Returns argv[] index of first file-name argument (== argc if none).
|
* Returns argv[] index of first file-name argument (== argc if none).
|
||||||
* Any file names with indexes <= last_file_arg_seen are ignored;
|
* Any file names with indexes <= last_file_arg_seen are ignored;
|
||||||
@@ -285,8 +186,9 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
char * arg;
|
char * arg;
|
||||||
|
|
||||||
/* Set up default JPEG parameters. */
|
/* Set up default JPEG parameters. */
|
||||||
requested_fmt = DEFAULT_FMT; /* set default output file format */
|
requested_fmt = DEFAULT_FMT; /* set default output file format */
|
||||||
outfilename = NULL;
|
outfilename = NULL;
|
||||||
|
memsrc = FALSE;
|
||||||
cinfo->err->trace_level = 0;
|
cinfo->err->trace_level = 0;
|
||||||
|
|
||||||
/* Scan command line options, adjust parameters */
|
/* Scan command line options, adjust parameters */
|
||||||
@@ -296,54 +198,54 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
if (*arg != '-') {
|
if (*arg != '-') {
|
||||||
/* Not a switch, must be a file name argument */
|
/* Not a switch, must be a file name argument */
|
||||||
if (argn <= last_file_arg_seen) {
|
if (argn <= last_file_arg_seen) {
|
||||||
outfilename = NULL; /* -outfile applies to just one input file */
|
outfilename = NULL; /* -outfile applies to just one input file */
|
||||||
continue; /* ignore this name if previously processed */
|
continue; /* ignore this name if previously processed */
|
||||||
}
|
}
|
||||||
break; /* else done parsing switches */
|
break; /* else done parsing switches */
|
||||||
}
|
}
|
||||||
arg++; /* advance past switch marker character */
|
arg++; /* advance past switch marker character */
|
||||||
|
|
||||||
if (keymatch(arg, "bmp", 1)) {
|
if (keymatch(arg, "bmp", 1)) {
|
||||||
/* BMP output format. */
|
/* BMP output format. */
|
||||||
requested_fmt = FMT_BMP;
|
requested_fmt = FMT_BMP;
|
||||||
|
|
||||||
} else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) ||
|
} else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) ||
|
||||||
keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) {
|
keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) {
|
||||||
/* Do color quantization. */
|
/* Do color quantization. */
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (sscanf(argv[argn], "%d", &val) != 1)
|
if (sscanf(argv[argn], "%d", &val) != 1)
|
||||||
usage();
|
usage();
|
||||||
cinfo->desired_number_of_colors = val;
|
cinfo->desired_number_of_colors = val;
|
||||||
cinfo->quantize_colors = TRUE;
|
cinfo->quantize_colors = TRUE;
|
||||||
|
|
||||||
} else if (keymatch(arg, "dct", 2)) {
|
} else if (keymatch(arg, "dct", 2)) {
|
||||||
/* Select IDCT algorithm. */
|
/* Select IDCT algorithm. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (keymatch(argv[argn], "int", 1)) {
|
if (keymatch(argv[argn], "int", 1)) {
|
||||||
cinfo->dct_method = JDCT_ISLOW;
|
cinfo->dct_method = JDCT_ISLOW;
|
||||||
} else if (keymatch(argv[argn], "fast", 2)) {
|
} else if (keymatch(argv[argn], "fast", 2)) {
|
||||||
cinfo->dct_method = JDCT_IFAST;
|
cinfo->dct_method = JDCT_IFAST;
|
||||||
} else if (keymatch(argv[argn], "float", 2)) {
|
} else if (keymatch(argv[argn], "float", 2)) {
|
||||||
cinfo->dct_method = JDCT_FLOAT;
|
cinfo->dct_method = JDCT_FLOAT;
|
||||||
} else
|
} else
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
} else if (keymatch(arg, "dither", 2)) {
|
} else if (keymatch(arg, "dither", 2)) {
|
||||||
/* Select dithering algorithm. */
|
/* Select dithering algorithm. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (keymatch(argv[argn], "fs", 2)) {
|
if (keymatch(argv[argn], "fs", 2)) {
|
||||||
cinfo->dither_mode = JDITHER_FS;
|
cinfo->dither_mode = JDITHER_FS;
|
||||||
} else if (keymatch(argv[argn], "none", 2)) {
|
} else if (keymatch(argv[argn], "none", 2)) {
|
||||||
cinfo->dither_mode = JDITHER_NONE;
|
cinfo->dither_mode = JDITHER_NONE;
|
||||||
} else if (keymatch(argv[argn], "ordered", 2)) {
|
} else if (keymatch(argv[argn], "ordered", 2)) {
|
||||||
cinfo->dither_mode = JDITHER_ORDERED;
|
cinfo->dither_mode = JDITHER_ORDERED;
|
||||||
} else
|
} else
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
} else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
|
} else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
|
||||||
/* Enable debug printouts. */
|
/* Enable debug printouts. */
|
||||||
@@ -351,18 +253,26 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
static boolean printed_version = FALSE;
|
static boolean printed_version = FALSE;
|
||||||
|
|
||||||
if (! printed_version) {
|
if (! printed_version) {
|
||||||
fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n",
|
fprintf(stderr, "%s version %s (build %s)\n",
|
||||||
JVERSION, JCOPYRIGHT);
|
PACKAGE_NAME, VERSION, BUILD);
|
||||||
printed_version = TRUE;
|
fprintf(stderr, "%s\n\n", JCOPYRIGHT);
|
||||||
|
fprintf(stderr, "Emulating The Independent JPEG Group's software, version %s\n\n",
|
||||||
|
JVERSION);
|
||||||
|
printed_version = TRUE;
|
||||||
}
|
}
|
||||||
cinfo->err->trace_level++;
|
cinfo->err->trace_level++;
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "version", 4)) {
|
||||||
|
fprintf(stderr, "%s version %s (build %s)\n",
|
||||||
|
PACKAGE_NAME, VERSION, BUILD);
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
} else if (keymatch(arg, "fast", 1)) {
|
} else if (keymatch(arg, "fast", 1)) {
|
||||||
/* Select recommended processing options for quick-and-dirty output. */
|
/* Select recommended processing options for quick-and-dirty output. */
|
||||||
cinfo->two_pass_quantize = FALSE;
|
cinfo->two_pass_quantize = FALSE;
|
||||||
cinfo->dither_mode = JDITHER_ORDERED;
|
cinfo->dither_mode = JDITHER_ORDERED;
|
||||||
if (! cinfo->quantize_colors) /* don't override an earlier -colors */
|
if (! cinfo->quantize_colors) /* don't override an earlier -colors */
|
||||||
cinfo->desired_number_of_colors = 216;
|
cinfo->desired_number_of_colors = 216;
|
||||||
cinfo->dct_method = JDCT_FASTEST;
|
cinfo->dct_method = JDCT_FASTEST;
|
||||||
cinfo->do_fancy_upsampling = FALSE;
|
cinfo->do_fancy_upsampling = FALSE;
|
||||||
|
|
||||||
@@ -374,23 +284,31 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
/* Force monochrome output. */
|
/* Force monochrome output. */
|
||||||
cinfo->out_color_space = JCS_GRAYSCALE;
|
cinfo->out_color_space = JCS_GRAYSCALE;
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "rgb", 2)) {
|
||||||
|
/* Force RGB output. */
|
||||||
|
cinfo->out_color_space = JCS_RGB;
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "rgb565", 2)) {
|
||||||
|
/* Force RGB565 output. */
|
||||||
|
cinfo->out_color_space = JCS_RGB565;
|
||||||
|
|
||||||
} else if (keymatch(arg, "map", 3)) {
|
} else if (keymatch(arg, "map", 3)) {
|
||||||
/* Quantize to a color map taken from an input file. */
|
/* Quantize to a color map taken from an input file. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (for_real) { /* too expensive to do twice! */
|
if (for_real) { /* too expensive to do twice! */
|
||||||
#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */
|
#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */
|
||||||
FILE * mapfile;
|
FILE * mapfile;
|
||||||
|
|
||||||
if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) {
|
if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) {
|
||||||
fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
|
fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
read_color_map(cinfo, mapfile);
|
read_color_map(cinfo, mapfile);
|
||||||
fclose(mapfile);
|
fclose(mapfile);
|
||||||
cinfo->quantize_colors = TRUE;
|
cinfo->quantize_colors = TRUE;
|
||||||
#else
|
#else
|
||||||
ERREXIT(cinfo, JERR_NOT_COMPILED);
|
ERREXIT(cinfo, JERR_NOT_COMPILED);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -399,12 +317,12 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
long lval;
|
long lval;
|
||||||
char ch = 'x';
|
char ch = 'x';
|
||||||
|
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
|
||||||
usage();
|
usage();
|
||||||
if (ch == 'm' || ch == 'M')
|
if (ch == 'm' || ch == 'M')
|
||||||
lval *= 1000L;
|
lval *= 1000L;
|
||||||
cinfo->mem->max_memory_to_use = lval * 1000L;
|
cinfo->mem->max_memory_to_use = lval * 1000L;
|
||||||
|
|
||||||
} else if (keymatch(arg, "nosmooth", 3)) {
|
} else if (keymatch(arg, "nosmooth", 3)) {
|
||||||
@@ -421,9 +339,19 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
|
|
||||||
} else if (keymatch(arg, "outfile", 4)) {
|
} else if (keymatch(arg, "outfile", 4)) {
|
||||||
/* Set output file name. */
|
/* Set output file name. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
outfilename = argv[argn]; /* save it away for later use */
|
outfilename = argv[argn]; /* save it away for later use */
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "memsrc", 2)) {
|
||||||
|
/* Use in-memory source manager */
|
||||||
|
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
|
||||||
|
memsrc = TRUE;
|
||||||
|
#else
|
||||||
|
fprintf(stderr, "%s: sorry, in-memory source manager was not compiled in\n",
|
||||||
|
progname);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
#endif
|
||||||
|
|
||||||
} else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) {
|
} else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) {
|
||||||
/* PPM/PGM output format. */
|
/* PPM/PGM output format. */
|
||||||
@@ -435,33 +363,33 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
|
|
||||||
} else if (keymatch(arg, "scale", 1)) {
|
} else if (keymatch(arg, "scale", 1)) {
|
||||||
/* Scale the output image by a fraction M/N. */
|
/* Scale the output image by a fraction M/N. */
|
||||||
if (++argn >= argc) /* advance to next argument */
|
if (++argn >= argc) /* advance to next argument */
|
||||||
usage();
|
usage();
|
||||||
if (sscanf(argv[argn], "%d/%d",
|
if (sscanf(argv[argn], "%d/%d",
|
||||||
&cinfo->scale_num, &cinfo->scale_denom) != 2)
|
&cinfo->scale_num, &cinfo->scale_denom) != 2)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
} else if (keymatch(arg, "targa", 1)) {
|
} else if (keymatch(arg, "targa", 1)) {
|
||||||
/* Targa output format. */
|
/* Targa output format. */
|
||||||
requested_fmt = FMT_TARGA;
|
requested_fmt = FMT_TARGA;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
usage(); /* bogus switch */
|
usage(); /* bogus switch */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return argn; /* return index of next arg (file name) */
|
return argn; /* return index of next arg (file name) */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Marker processor for COM markers.
|
* Marker processor for COM and interesting APPn markers.
|
||||||
* This replaces the library's built-in processor, which just skips the marker.
|
* This replaces the library's built-in processor, which just skips the marker.
|
||||||
* We want to print out the marker as text, if possible.
|
* We want to print out the marker as text, to the extent possible.
|
||||||
* Note this code relies on a non-suspending data source.
|
* Note this code relies on a non-suspending data source.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL unsigned int
|
LOCAL(unsigned int)
|
||||||
jpeg_getc (j_decompress_ptr cinfo)
|
jpeg_getc (j_decompress_ptr cinfo)
|
||||||
/* Read next byte */
|
/* Read next byte */
|
||||||
{
|
{
|
||||||
@@ -476,8 +404,8 @@ jpeg_getc (j_decompress_ptr cinfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
METHODDEF boolean
|
METHODDEF(boolean)
|
||||||
COM_handler (j_decompress_ptr cinfo)
|
print_text_marker (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
boolean traceit = (cinfo->err->trace_level >= 1);
|
boolean traceit = (cinfo->err->trace_level >= 1);
|
||||||
INT32 length;
|
INT32 length;
|
||||||
@@ -486,10 +414,15 @@ COM_handler (j_decompress_ptr cinfo)
|
|||||||
|
|
||||||
length = jpeg_getc(cinfo) << 8;
|
length = jpeg_getc(cinfo) << 8;
|
||||||
length += jpeg_getc(cinfo);
|
length += jpeg_getc(cinfo);
|
||||||
length -= 2; /* discount the length word itself */
|
length -= 2; /* discount the length word itself */
|
||||||
|
|
||||||
if (traceit)
|
if (traceit) {
|
||||||
fprintf(stderr, "Comment, length %ld:\n", (long) length);
|
if (cinfo->unread_marker == JPEG_COM)
|
||||||
|
fprintf(stderr, "Comment, length %ld:\n", (long) length);
|
||||||
|
else /* assume it is an APPn otherwise */
|
||||||
|
fprintf(stderr, "APP%d, length %ld:\n",
|
||||||
|
cinfo->unread_marker - JPEG_APP0, (long) length);
|
||||||
|
}
|
||||||
|
|
||||||
while (--length >= 0) {
|
while (--length >= 0) {
|
||||||
ch = jpeg_getc(cinfo);
|
ch = jpeg_getc(cinfo);
|
||||||
@@ -500,16 +433,16 @@ COM_handler (j_decompress_ptr cinfo)
|
|||||||
* Newlines in CR, CR/LF, or LF form will be printed as one newline.
|
* Newlines in CR, CR/LF, or LF form will be printed as one newline.
|
||||||
*/
|
*/
|
||||||
if (ch == '\r') {
|
if (ch == '\r') {
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
} else if (ch == '\n') {
|
} else if (ch == '\n') {
|
||||||
if (lastch != '\r')
|
if (lastch != '\r')
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
} else if (ch == '\\') {
|
} else if (ch == '\\') {
|
||||||
fprintf(stderr, "\\\\");
|
fprintf(stderr, "\\\\");
|
||||||
} else if (isprint(ch)) {
|
} else if (isprint(ch)) {
|
||||||
putc(ch, stderr);
|
putc(ch, stderr);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "\\%03o", ch);
|
fprintf(stderr, "\\%03o", ch);
|
||||||
}
|
}
|
||||||
lastch = ch;
|
lastch = ch;
|
||||||
}
|
}
|
||||||
@@ -526,7 +459,7 @@ COM_handler (j_decompress_ptr cinfo)
|
|||||||
* The main program.
|
* The main program.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GLOBAL int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct jpeg_decompress_struct cinfo;
|
struct jpeg_decompress_struct cinfo;
|
||||||
@@ -538,6 +471,8 @@ main (int argc, char **argv)
|
|||||||
djpeg_dest_ptr dest_mgr = NULL;
|
djpeg_dest_ptr dest_mgr = NULL;
|
||||||
FILE * input_file;
|
FILE * input_file;
|
||||||
FILE * output_file;
|
FILE * output_file;
|
||||||
|
unsigned char *inbuffer = NULL;
|
||||||
|
unsigned long insize = 0;
|
||||||
JDIMENSION num_scanlines;
|
JDIMENSION num_scanlines;
|
||||||
|
|
||||||
/* On Mac, fetch a command line. */
|
/* On Mac, fetch a command line. */
|
||||||
@@ -547,7 +482,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
if (progname == NULL || progname[0] == 0)
|
if (progname == NULL || progname[0] == 0)
|
||||||
progname = "djpeg"; /* in case C library doesn't provide it */
|
progname = "djpeg"; /* in case C library doesn't provide it */
|
||||||
|
|
||||||
/* Initialize the JPEG decompression object with default error handling. */
|
/* Initialize the JPEG decompression object with default error handling. */
|
||||||
cinfo.err = jpeg_std_error(&jerr);
|
cinfo.err = jpeg_std_error(&jerr);
|
||||||
@@ -556,17 +491,15 @@ main (int argc, char **argv)
|
|||||||
jerr.addon_message_table = cdjpeg_message_table;
|
jerr.addon_message_table = cdjpeg_message_table;
|
||||||
jerr.first_addon_message = JMSG_FIRSTADDONCODE;
|
jerr.first_addon_message = JMSG_FIRSTADDONCODE;
|
||||||
jerr.last_addon_message = JMSG_LASTADDONCODE;
|
jerr.last_addon_message = JMSG_LASTADDONCODE;
|
||||||
/* Insert custom COM marker processor. */
|
|
||||||
jpeg_set_marker_processor(&cinfo, JPEG_COM, COM_handler);
|
|
||||||
|
|
||||||
/* Now safe to enable signal catcher. */
|
/* Insert custom marker processor for COM and APP12.
|
||||||
#ifdef NEED_SIGNAL_CATCHER
|
* APP12 is used by some digital camera makers for textual info,
|
||||||
sig_cinfo = (j_common_ptr) &cinfo;
|
* so we provide the ability to display it as text.
|
||||||
signal(SIGINT, signal_catcher);
|
* If you like, additional APPn marker types can be selected for display,
|
||||||
#ifdef SIGTERM /* not all systems have SIGTERM */
|
* but don't try to override APP0 or APP14 this way (see libjpeg.txt).
|
||||||
signal(SIGTERM, signal_catcher);
|
*/
|
||||||
#endif
|
jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker);
|
||||||
#endif
|
jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker);
|
||||||
|
|
||||||
/* Scan command line to find file names. */
|
/* Scan command line to find file names. */
|
||||||
/* It is convenient to use just one switch-parsing routine, but the switch
|
/* It is convenient to use just one switch-parsing routine, but the switch
|
||||||
@@ -583,14 +516,14 @@ main (int argc, char **argv)
|
|||||||
if (outfilename == NULL) {
|
if (outfilename == NULL) {
|
||||||
if (file_index != argc-2) {
|
if (file_index != argc-2) {
|
||||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||||
progname);
|
progname);
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
outfilename = argv[file_index+1];
|
outfilename = argv[file_index+1];
|
||||||
} else {
|
} else {
|
||||||
if (file_index != argc-1) {
|
if (file_index != argc-1) {
|
||||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||||
progname);
|
progname);
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -610,17 +543,7 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* default input file is stdin */
|
/* default input file is stdin */
|
||||||
#ifdef USE_SETMODE /* need to hack file mode? */
|
input_file = read_stdin();
|
||||||
setmode(fileno(stdin), O_BINARY);
|
|
||||||
#endif
|
|
||||||
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
|
|
||||||
if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
|
|
||||||
fprintf(stderr, "%s: can't open stdin\n", progname);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
input_file = stdin;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open the output file. */
|
/* Open the output file. */
|
||||||
@@ -631,32 +554,38 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* default output file is stdout */
|
/* default output file is stdout */
|
||||||
#ifdef USE_SETMODE /* need to hack file mode? */
|
output_file = write_stdout();
|
||||||
setmode(fileno(stdout), O_BINARY);
|
|
||||||
#endif
|
|
||||||
#ifdef USE_FDOPEN /* need to re-open in binary mode? */
|
|
||||||
if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) {
|
|
||||||
fprintf(stderr, "%s: can't open stdout\n", progname);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
output_file = stdout;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PROGRESS_REPORT
|
#ifdef PROGRESS_REPORT
|
||||||
/* Enable progress display, unless trace output is on */
|
start_progress_monitor((j_common_ptr) &cinfo, &progress);
|
||||||
if (jerr.trace_level == 0) {
|
|
||||||
progress.pub.progress_monitor = progress_monitor;
|
|
||||||
progress.completed_extra_passes = 0;
|
|
||||||
progress.total_extra_passes = 0;
|
|
||||||
progress.percent_done = -1;
|
|
||||||
cinfo.progress = &progress.pub;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Specify data source for decompression */
|
/* Specify data source for decompression */
|
||||||
jpeg_stdio_src(&cinfo, input_file);
|
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
|
||||||
|
if (memsrc) {
|
||||||
|
size_t nbytes;
|
||||||
|
do {
|
||||||
|
inbuffer = (unsigned char *)realloc(inbuffer, insize + INPUT_BUF_SIZE);
|
||||||
|
if (inbuffer == NULL) {
|
||||||
|
fprintf(stderr, "%s: memory allocation failure\n", progname);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
nbytes = JFREAD(input_file, &inbuffer[insize], INPUT_BUF_SIZE);
|
||||||
|
if (nbytes < INPUT_BUF_SIZE && ferror(input_file)) {
|
||||||
|
if (file_index < argc)
|
||||||
|
fprintf(stderr, "%s: can't read from %s\n", progname,
|
||||||
|
argv[file_index]);
|
||||||
|
else
|
||||||
|
fprintf(stderr, "%s: can't read from stdin\n", progname);
|
||||||
|
}
|
||||||
|
insize += (unsigned long)nbytes;
|
||||||
|
} while (nbytes == INPUT_BUF_SIZE);
|
||||||
|
fprintf(stderr, "Compressed size: %lu bytes\n", insize);
|
||||||
|
jpeg_mem_src(&cinfo, inbuffer, insize);
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
jpeg_stdio_src(&cinfo, input_file);
|
||||||
|
|
||||||
/* Read file header, set default decompression parameters */
|
/* Read file header, set default decompression parameters */
|
||||||
(void) jpeg_read_header(&cinfo, TRUE);
|
(void) jpeg_read_header(&cinfo, TRUE);
|
||||||
@@ -703,7 +632,7 @@ main (int argc, char **argv)
|
|||||||
dest_mgr->output_file = output_file;
|
dest_mgr->output_file = output_file;
|
||||||
|
|
||||||
/* Start decompressor */
|
/* Start decompressor */
|
||||||
jpeg_start_decompress(&cinfo);
|
(void) jpeg_start_decompress(&cinfo);
|
||||||
|
|
||||||
/* Write output file header */
|
/* Write output file header */
|
||||||
(*dest_mgr->start_output) (&cinfo, dest_mgr);
|
(*dest_mgr->start_output) (&cinfo, dest_mgr);
|
||||||
@@ -711,7 +640,7 @@ main (int argc, char **argv)
|
|||||||
/* Process data */
|
/* Process data */
|
||||||
while (cinfo.output_scanline < cinfo.output_height) {
|
while (cinfo.output_scanline < cinfo.output_height) {
|
||||||
num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
|
num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
|
||||||
dest_mgr->buffer_height);
|
dest_mgr->buffer_height);
|
||||||
(*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
|
(*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -727,7 +656,7 @@ main (int argc, char **argv)
|
|||||||
* of lifespan JPOOL_IMAGE; it needs to finish before releasing memory.
|
* of lifespan JPOOL_IMAGE; it needs to finish before releasing memory.
|
||||||
*/
|
*/
|
||||||
(*dest_mgr->finish_output) (&cinfo, dest_mgr);
|
(*dest_mgr->finish_output) (&cinfo, dest_mgr);
|
||||||
jpeg_finish_decompress(&cinfo);
|
(void) jpeg_finish_decompress(&cinfo);
|
||||||
jpeg_destroy_decompress(&cinfo);
|
jpeg_destroy_decompress(&cinfo);
|
||||||
|
|
||||||
/* Close files, if we opened them */
|
/* Close files, if we opened them */
|
||||||
@@ -737,14 +666,13 @@ main (int argc, char **argv)
|
|||||||
fclose(output_file);
|
fclose(output_file);
|
||||||
|
|
||||||
#ifdef PROGRESS_REPORT
|
#ifdef PROGRESS_REPORT
|
||||||
/* Clear away progress display */
|
end_progress_monitor((j_common_ptr) &cinfo);
|
||||||
if (jerr.trace_level == 0) {
|
|
||||||
fprintf(stderr, "\r \r");
|
|
||||||
fflush(stderr);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (memsrc && inbuffer != NULL)
|
||||||
|
free(inbuffer);
|
||||||
|
|
||||||
/* All done. */
|
/* All done. */
|
||||||
exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
|
exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
|
||||||
return 0; /* suppress no-return-value warnings */
|
return 0; /* suppress no-return-value warnings */
|
||||||
}
|
}
|
||||||
|
|||||||
104
doc/html/annotated.html
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1"/>
|
||||||
|
<title>TurboJPEG: Data Structures</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">TurboJPEG
|
||||||
|
 <span id="projectnumber">1.4</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.3.1 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
|
||||||
|
<li><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">Data Structures</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
|
||||||
|
<table class="directory">
|
||||||
|
<tr id="row_0_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structtjregion.html" target="_self">tjregion</a></td><td class="desc">Cropping region</td></tr>
|
||||||
|
<tr id="row_1_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structtjscalingfactor.html" target="_self">tjscalingfactor</a></td><td class="desc">Scaling factor</td></tr>
|
||||||
|
<tr id="row_2_" class="even"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structtjtransform.html" target="_self">tjtransform</a></td><td class="desc">Lossless transform</td></tr>
|
||||||
|
</table>
|
||||||
|
</div><!-- directory -->
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.3.1
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
doc/html/bc_s.png
Normal file
|
After Width: | Height: | Size: 676 B |
BIN
doc/html/bdwn.png
Normal file
|
After Width: | Height: | Size: 147 B |
106
doc/html/classes.html
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1"/>
|
||||||
|
<title>TurboJPEG: Data Structure Index</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">TurboJPEG
|
||||||
|
 <span id="projectnumber">1.4</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.3.1 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li class="current"><a href="classes.html"><span>Data Structure Index</span></a></li>
|
||||||
|
<li><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">Data Structure Index</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<div class="qindex"><a class="qindex" href="#letter_T">T</a></div>
|
||||||
|
<table style="margin: 10px; white-space: nowrap;" align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr><td rowspan="2" valign="bottom"><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  T  </div></td></tr></table>
|
||||||
|
</td><td valign="top"><a class="el" href="structtjscalingfactor.html">tjscalingfactor</a>   </td><td valign="top"><a class="el" href="structtjtransform.html">tjtransform</a>   </td><td></td></tr>
|
||||||
|
<tr><td></td><td></td><td></td></tr>
|
||||||
|
<tr><td valign="top"><a class="el" href="structtjregion.html">tjregion</a>   </td><td></td><td></td><td></td></tr>
|
||||||
|
<tr><td></td><td></td><td></td><td></td></tr>
|
||||||
|
</table>
|
||||||
|
<div class="qindex"><a class="qindex" href="#letter_T">T</a></div>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.3.1
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
doc/html/closed.png
Normal file
|
After Width: | Height: | Size: 132 B |
3
doc/html/doxygen-extra.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
code {
|
||||||
|
color: #4665A2;
|
||||||
|
}
|
||||||
1184
doc/html/doxygen.css
Normal file
BIN
doc/html/doxygen.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
97
doc/html/dynsections.js
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
function toggleVisibility(linkObj)
|
||||||
|
{
|
||||||
|
var base = $(linkObj).attr('id');
|
||||||
|
var summary = $('#'+base+'-summary');
|
||||||
|
var content = $('#'+base+'-content');
|
||||||
|
var trigger = $('#'+base+'-trigger');
|
||||||
|
var src=$(trigger).attr('src');
|
||||||
|
if (content.is(':visible')===true) {
|
||||||
|
content.hide();
|
||||||
|
summary.show();
|
||||||
|
$(linkObj).addClass('closed').removeClass('opened');
|
||||||
|
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||||
|
} else {
|
||||||
|
content.show();
|
||||||
|
summary.hide();
|
||||||
|
$(linkObj).removeClass('closed').addClass('opened');
|
||||||
|
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateStripes()
|
||||||
|
{
|
||||||
|
$('table.directory tr').
|
||||||
|
removeClass('even').filter(':visible:even').addClass('even');
|
||||||
|
}
|
||||||
|
function toggleLevel(level)
|
||||||
|
{
|
||||||
|
$('table.directory tr').each(function(){
|
||||||
|
var l = this.id.split('_').length-1;
|
||||||
|
var i = $('#img'+this.id.substring(3));
|
||||||
|
var a = $('#arr'+this.id.substring(3));
|
||||||
|
if (l<level+1) {
|
||||||
|
i.attr('src','ftv2folderopen.png');
|
||||||
|
a.attr('src','ftv2mnode.png');
|
||||||
|
$(this).show();
|
||||||
|
} else if (l==level+1) {
|
||||||
|
i.attr('src','ftv2folderclosed.png');
|
||||||
|
a.attr('src','ftv2pnode.png');
|
||||||
|
$(this).show();
|
||||||
|
} else {
|
||||||
|
$(this).hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
updateStripes();
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleFolder(id)
|
||||||
|
{
|
||||||
|
//The clicked row
|
||||||
|
var currentRow = $('#row_'+id);
|
||||||
|
var currentRowImages = currentRow.find("img");
|
||||||
|
|
||||||
|
//All rows after the clicked row
|
||||||
|
var rows = currentRow.nextAll("tr");
|
||||||
|
|
||||||
|
//Only match elements AFTER this one (can't hide elements before)
|
||||||
|
var childRows = rows.filter(function() {
|
||||||
|
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
|
||||||
|
return this.id.match(re);
|
||||||
|
});
|
||||||
|
|
||||||
|
//First row is visible we are HIDING
|
||||||
|
if (childRows.filter(':first').is(':visible')===true) {
|
||||||
|
currentRowImages.filter("[id^=arr]").attr('src', 'ftv2pnode.png');
|
||||||
|
currentRowImages.filter("[id^=img]").attr('src', 'ftv2folderclosed.png');
|
||||||
|
rows.filter("[id^=row_"+id+"]").hide();
|
||||||
|
} else { //We are SHOWING
|
||||||
|
//All sub images
|
||||||
|
var childImages = childRows.find("img");
|
||||||
|
var childImg = childImages.filter("[id^=img]");
|
||||||
|
var childArr = childImages.filter("[id^=arr]");
|
||||||
|
|
||||||
|
currentRow.find("[id^=arr]").attr('src', 'ftv2mnode.png'); //open row
|
||||||
|
currentRow.find("[id^=img]").attr('src', 'ftv2folderopen.png'); //open row
|
||||||
|
childImg.attr('src','ftv2folderclosed.png'); //children closed
|
||||||
|
childArr.attr('src','ftv2pnode.png'); //children closed
|
||||||
|
childRows.show(); //show all children
|
||||||
|
}
|
||||||
|
updateStripes();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function toggleInherit(id)
|
||||||
|
{
|
||||||
|
var rows = $('tr.inherit.'+id);
|
||||||
|
var img = $('tr.inherit_header.'+id+' img');
|
||||||
|
var src = $(img).attr('src');
|
||||||
|
if (rows.filter(':first').is(':visible')===true) {
|
||||||
|
rows.css('display','none');
|
||||||
|
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||||
|
} else {
|
||||||
|
rows.css('display','table-row'); // using show() causes jump in firefox
|
||||||
|
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BIN
doc/html/ftv2blank.png
Normal file
|
After Width: | Height: | Size: 86 B |
BIN
doc/html/ftv2cl.png
Normal file
|
After Width: | Height: | Size: 453 B |
BIN
doc/html/ftv2doc.png
Normal file
|
After Width: | Height: | Size: 746 B |
BIN
doc/html/ftv2folderclosed.png
Normal file
|
After Width: | Height: | Size: 616 B |
BIN
doc/html/ftv2folderopen.png
Normal file
|
After Width: | Height: | Size: 597 B |
BIN
doc/html/ftv2lastnode.png
Normal file
|
After Width: | Height: | Size: 86 B |
BIN
doc/html/ftv2link.png
Normal file
|
After Width: | Height: | Size: 746 B |
BIN
doc/html/ftv2mlastnode.png
Normal file
|
After Width: | Height: | Size: 246 B |
BIN
doc/html/ftv2mnode.png
Normal file
|
After Width: | Height: | Size: 246 B |
BIN
doc/html/ftv2mo.png
Normal file
|
After Width: | Height: | Size: 403 B |
BIN
doc/html/ftv2node.png
Normal file
|
After Width: | Height: | Size: 86 B |
BIN
doc/html/ftv2ns.png
Normal file
|
After Width: | Height: | Size: 388 B |
BIN
doc/html/ftv2plastnode.png
Normal file
|
After Width: | Height: | Size: 229 B |
BIN
doc/html/ftv2pnode.png
Normal file
|
After Width: | Height: | Size: 229 B |
BIN
doc/html/ftv2splitbar.png
Normal file
|
After Width: | Height: | Size: 314 B |
BIN
doc/html/ftv2vertline.png
Normal file
|
After Width: | Height: | Size: 86 B |
134
doc/html/functions.html
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1"/>
|
||||||
|
<title>TurboJPEG: Data Fields</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">TurboJPEG
|
||||||
|
 <span id="projectnumber">1.4</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.3.1 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
|
||||||
|
<li class="current"><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow3" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li class="current"><a href="functions.html"><span>All</span></a></li>
|
||||||
|
<li><a href="functions_vars.html"><span>Variables</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="contents">
|
||||||
|
<div class="textblock">Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:</div><ul>
|
||||||
|
<li>customFilter
|
||||||
|
: <a class="el" href="structtjtransform.html#a43ee1bcdd2a8d7249a756774f78793c1">tjtransform</a>
|
||||||
|
</li>
|
||||||
|
<li>data
|
||||||
|
: <a class="el" href="structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3">tjtransform</a>
|
||||||
|
</li>
|
||||||
|
<li>denom
|
||||||
|
: <a class="el" href="structtjscalingfactor.html#aefbcdf3e9e62274b2d312c695f133ce3">tjscalingfactor</a>
|
||||||
|
</li>
|
||||||
|
<li>h
|
||||||
|
: <a class="el" href="structtjregion.html#aecefc45a26f4d8b60dd4d825c1710115">tjregion</a>
|
||||||
|
</li>
|
||||||
|
<li>num
|
||||||
|
: <a class="el" href="structtjscalingfactor.html#a9b011e57f981ee23083e2c1aa5e640ec">tjscalingfactor</a>
|
||||||
|
</li>
|
||||||
|
<li>op
|
||||||
|
: <a class="el" href="structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498">tjtransform</a>
|
||||||
|
</li>
|
||||||
|
<li>options
|
||||||
|
: <a class="el" href="structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6">tjtransform</a>
|
||||||
|
</li>
|
||||||
|
<li>r
|
||||||
|
: <a class="el" href="structtjtransform.html#ac324e5e442abec8a961e5bf219db12cf">tjtransform</a>
|
||||||
|
</li>
|
||||||
|
<li>w
|
||||||
|
: <a class="el" href="structtjregion.html#ab6eb73ceef584fc23c8c8097926dce42">tjregion</a>
|
||||||
|
</li>
|
||||||
|
<li>x
|
||||||
|
: <a class="el" href="structtjregion.html#a4b6a37a93997091b26a75831fa291ad9">tjregion</a>
|
||||||
|
</li>
|
||||||
|
<li>y
|
||||||
|
: <a class="el" href="structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2">tjregion</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.3.1
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
134
doc/html/functions_vars.html
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1"/>
|
||||||
|
<title>TurboJPEG: Data Fields - Variables</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">TurboJPEG
|
||||||
|
 <span id="projectnumber">1.4</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.3.1 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
|
||||||
|
<li class="current"><a href="functions.html"><span>Data Fields</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow3" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="functions.html"><span>All</span></a></li>
|
||||||
|
<li class="current"><a href="functions_vars.html"><span>Variables</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="contents">
|
||||||
|
 <ul>
|
||||||
|
<li>customFilter
|
||||||
|
: <a class="el" href="structtjtransform.html#a43ee1bcdd2a8d7249a756774f78793c1">tjtransform</a>
|
||||||
|
</li>
|
||||||
|
<li>data
|
||||||
|
: <a class="el" href="structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3">tjtransform</a>
|
||||||
|
</li>
|
||||||
|
<li>denom
|
||||||
|
: <a class="el" href="structtjscalingfactor.html#aefbcdf3e9e62274b2d312c695f133ce3">tjscalingfactor</a>
|
||||||
|
</li>
|
||||||
|
<li>h
|
||||||
|
: <a class="el" href="structtjregion.html#aecefc45a26f4d8b60dd4d825c1710115">tjregion</a>
|
||||||
|
</li>
|
||||||
|
<li>num
|
||||||
|
: <a class="el" href="structtjscalingfactor.html#a9b011e57f981ee23083e2c1aa5e640ec">tjscalingfactor</a>
|
||||||
|
</li>
|
||||||
|
<li>op
|
||||||
|
: <a class="el" href="structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498">tjtransform</a>
|
||||||
|
</li>
|
||||||
|
<li>options
|
||||||
|
: <a class="el" href="structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6">tjtransform</a>
|
||||||
|
</li>
|
||||||
|
<li>r
|
||||||
|
: <a class="el" href="structtjtransform.html#ac324e5e442abec8a961e5bf219db12cf">tjtransform</a>
|
||||||
|
</li>
|
||||||
|
<li>w
|
||||||
|
: <a class="el" href="structtjregion.html#ab6eb73ceef584fc23c8c8097926dce42">tjregion</a>
|
||||||
|
</li>
|
||||||
|
<li>x
|
||||||
|
: <a class="el" href="structtjregion.html#a4b6a37a93997091b26a75831fa291ad9">tjregion</a>
|
||||||
|
</li>
|
||||||
|
<li>y
|
||||||
|
: <a class="el" href="structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2">tjregion</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.3.1
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
2446
doc/html/group___turbo_j_p_e_g.html
Normal file
90
doc/html/index.html
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1"/>
|
||||||
|
<title>TurboJPEG: Main Page</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">TurboJPEG
|
||||||
|
 <span id="projectnumber">1.4</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.3.1 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li class="current"><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">TurboJPEG Documentation</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.3.1
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
8
doc/html/jquery.js
vendored
Normal file
95
doc/html/modules.html
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1"/>
|
||||||
|
<title>TurboJPEG: Modules</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">TurboJPEG
|
||||||
|
 <span id="projectnumber">1.4</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.3.1 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">Modules</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<div class="textblock">Here is a list of all modules:</div><div class="directory">
|
||||||
|
<table class="directory">
|
||||||
|
<tr id="row_0_" class="even"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><a class="el" href="group___turbo_j_p_e_g.html" target="_self">TurboJPEG</a></td><td class="desc">TurboJPEG API</td></tr>
|
||||||
|
</table>
|
||||||
|
</div><!-- directory -->
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.3.1
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
doc/html/nav_f.png
Normal file
|
After Width: | Height: | Size: 153 B |
BIN
doc/html/nav_g.png
Normal file
|
After Width: | Height: | Size: 95 B |
BIN
doc/html/nav_h.png
Normal file
|
After Width: | Height: | Size: 98 B |
BIN
doc/html/open.png
Normal file
|
After Width: | Height: | Size: 123 B |
26
doc/html/search/all_63.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_63.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4
doc/html/search/all_63.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['customfilter',['customFilter',['../structtjtransform.html#a43ee1bcdd2a8d7249a756774f78793c1',1,'tjtransform']]]
|
||||||
|
];
|
||||||
26
doc/html/search/all_64.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_64.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
5
doc/html/search/all_64.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['data',['data',['../structtjtransform.html#a688fe8f1a8ecc12a538d9e561cf338e3',1,'tjtransform']]],
|
||||||
|
['denom',['denom',['../structtjscalingfactor.html#aefbcdf3e9e62274b2d312c695f133ce3',1,'tjscalingfactor']]]
|
||||||
|
];
|
||||||
26
doc/html/search/all_68.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_68.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4
doc/html/search/all_68.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['h',['h',['../structtjregion.html#aecefc45a26f4d8b60dd4d825c1710115',1,'tjregion']]]
|
||||||
|
];
|
||||||
26
doc/html/search/all_6e.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_6e.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4
doc/html/search/all_6e.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['num',['num',['../structtjscalingfactor.html#a9b011e57f981ee23083e2c1aa5e640ec',1,'tjscalingfactor']]]
|
||||||
|
];
|
||||||
26
doc/html/search/all_6f.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_6f.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
5
doc/html/search/all_6f.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['op',['op',['../structtjtransform.html#a2525aab4ba6978a1c273f74fef50e498',1,'tjtransform']]],
|
||||||
|
['options',['options',['../structtjtransform.html#ac0e74655baa4402209a21e1ae481c8f6',1,'tjtransform']]]
|
||||||
|
];
|
||||||
26
doc/html/search/all_72.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_72.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4
doc/html/search/all_72.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['r',['r',['../structtjtransform.html#ac324e5e442abec8a961e5bf219db12cf',1,'tjtransform']]]
|
||||||
|
];
|
||||||
26
doc/html/search/all_74.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_74.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
89
doc/html/search/all_74.js
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['tj_5fnumcs',['TJ_NUMCS',['../group___turbo_j_p_e_g.html#ga39f57a6fb02d9cf32e7b6890099b5a71',1,'turbojpeg.h']]],
|
||||||
|
['tj_5fnumpf',['TJ_NUMPF',['../group___turbo_j_p_e_g.html#ga7010a4402f54a45ba822ad8675a4655e',1,'turbojpeg.h']]],
|
||||||
|
['tj_5fnumsamp',['TJ_NUMSAMP',['../group___turbo_j_p_e_g.html#ga5ef3d169162ce77ce348e292a0b7477c',1,'turbojpeg.h']]],
|
||||||
|
['tj_5fnumxop',['TJ_NUMXOP',['../group___turbo_j_p_e_g.html#ga0f6dbd18adf38b7d46ac547f0f4d562c',1,'turbojpeg.h']]],
|
||||||
|
['tjalloc',['tjAlloc',['../group___turbo_j_p_e_g.html#ga5c9234bda6d993cdaffdd89bf81a00ff',1,'turbojpeg.h']]],
|
||||||
|
['tjblueoffset',['tjBlueOffset',['../group___turbo_j_p_e_g.html#ga84e2e35d3f08025f976ec1ec53693dea',1,'turbojpeg.h']]],
|
||||||
|
['tjbufsize',['tjBufSize',['../group___turbo_j_p_e_g.html#gaccc5bca7f12fcdcc302e6e1c6d4b311b',1,'turbojpeg.h']]],
|
||||||
|
['tjbufsizeyuv2',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#gaf451664a62c1f6c7cc5a6401f32908c9',1,'turbojpeg.h']]],
|
||||||
|
['tjcompress2',['tjCompress2',['../group___turbo_j_p_e_g.html#gaba62b7a98f960839b588579898495cf2',1,'turbojpeg.h']]],
|
||||||
|
['tjcompressfromyuv',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga0b931126c7a615ddc3bbd0cca6698d67',1,'turbojpeg.h']]],
|
||||||
|
['tjcompressfromyuvplanes',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#gaa89a1982cb4556b12ae7af4439991af6',1,'turbojpeg.h']]],
|
||||||
|
['tjcs',['TJCS',['../group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720',1,'turbojpeg.h']]],
|
||||||
|
['tjcs_5fcmyk',['TJCS_CMYK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53',1,'turbojpeg.h']]],
|
||||||
|
['tjcs_5fgray',['TJCS_GRAY',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a',1,'turbojpeg.h']]],
|
||||||
|
['tjcs_5frgb',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]],
|
||||||
|
['tjcs_5fycbcr',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]],
|
||||||
|
['tjcs_5fycck',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]],
|
||||||
|
['tjdecodeyuv',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga132ae2c2cadcf64c8bb0f3bdf69da3ed',1,'turbojpeg.h']]],
|
||||||
|
['tjdecodeyuvplanes',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga6cb5b0e1101a2b20edea576e11faf93d',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gada69cc6443d1bb493b40f1626259e5e9',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompressheader3',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#gacd0fac3af74b3511d39b4781b7103086',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompresstoyuv2',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga7c08b340ad7f8e85d407bd9e81d44d07',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompresstoyuvplanes',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#ga0828a38ae29631ac28b6857cefb0eebf',1,'turbojpeg.h']]],
|
||||||
|
['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga674adee917b95ad4a896f1ba39e12540',1,'turbojpeg.h']]],
|
||||||
|
['tjencodeyuv3',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#ga0a5ffbf7cb58a5b6a8201114fe889360',1,'turbojpeg.h']]],
|
||||||
|
['tjencodeyuvplanes',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#gaa791db8598853ddcad24e42897ef1269',1,'turbojpeg.h']]],
|
||||||
|
['tjflag_5faccuratedct',['TJFLAG_ACCURATEDCT',['../group___turbo_j_p_e_g.html#gacb233cfd722d66d1ccbf48a7de81f0e0',1,'turbojpeg.h']]],
|
||||||
|
['tjflag_5fbottomup',['TJFLAG_BOTTOMUP',['../group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec',1,'turbojpeg.h']]],
|
||||||
|
['tjflag_5ffastdct',['TJFLAG_FASTDCT',['../group___turbo_j_p_e_g.html#gaabce235db80d3f698b27f36cbd453da2',1,'turbojpeg.h']]],
|
||||||
|
['tjflag_5ffastupsample',['TJFLAG_FASTUPSAMPLE',['../group___turbo_j_p_e_g.html#ga4ee4506c81177a06f77e2504a22efd2d',1,'turbojpeg.h']]],
|
||||||
|
['tjflag_5fnorealloc',['TJFLAG_NOREALLOC',['../group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963',1,'turbojpeg.h']]],
|
||||||
|
['tjfree',['tjFree',['../group___turbo_j_p_e_g.html#ga8c4a1231dc06a450514c835f6471f137',1,'turbojpeg.h']]],
|
||||||
|
['tjgeterrorstr',['tjGetErrorStr',['../group___turbo_j_p_e_g.html#ga9af79c908ec131b1ae8d52fe40375abf',1,'turbojpeg.h']]],
|
||||||
|
['tjgetscalingfactors',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#ga6449044b9af402999ccf52f401333be8',1,'turbojpeg.h']]],
|
||||||
|
['tjgreenoffset',['tjGreenOffset',['../group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f',1,'turbojpeg.h']]],
|
||||||
|
['tjhandle',['tjhandle',['../group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763',1,'turbojpeg.h']]],
|
||||||
|
['tjinitcompress',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga3d10c47fbe4a2489a2b30c931551d01a',1,'turbojpeg.h']]],
|
||||||
|
['tjinitdecompress',['tjInitDecompress',['../group___turbo_j_p_e_g.html#gae5408179d041e2a2f7199c8283cf649e',1,'turbojpeg.h']]],
|
||||||
|
['tjinittransform',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga3155b775bfbac9dbba869b95a0367902',1,'turbojpeg.h']]],
|
||||||
|
['tjmcuheight',['tjMCUHeight',['../group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf',1,'turbojpeg.h']]],
|
||||||
|
['tjmcuwidth',['tjMCUWidth',['../group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c',1,'turbojpeg.h']]],
|
||||||
|
['tjpad',['TJPAD',['../group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511',1,'turbojpeg.h']]],
|
||||||
|
['tjpf',['TJPF',['../group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fabgr',['TJPF_ABGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fargb',['TJPF_ARGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fbgr',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fbgra',['TJPF_BGRA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fbgrx',['TJPF_BGRX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fcmyk',['TJPF_CMYK',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fgray',['TJPF_GRAY',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5frgb',['TJPF_RGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5frgba',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5frgbx',['TJPF_RGBX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fxbgr',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fxrgb',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]],
|
||||||
|
['tjpixelsize',['tjPixelSize',['../group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c',1,'turbojpeg.h']]],
|
||||||
|
['tjplaneheight',['tjPlaneHeight',['../group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f',1,'turbojpeg.h']]],
|
||||||
|
['tjplanesizeyuv',['tjPlaneSizeYUV',['../group___turbo_j_p_e_g.html#ga6f98d977bfa9d167c97172e876ba61e2',1,'turbojpeg.h']]],
|
||||||
|
['tjplanewidth',['tjPlaneWidth',['../group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1',1,'turbojpeg.h']]],
|
||||||
|
['tjredoffset',['tjRedOffset',['../group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8',1,'turbojpeg.h']]],
|
||||||
|
['tjregion',['tjregion',['../structtjregion.html',1,'']]],
|
||||||
|
['tjsamp',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5f411',['TJSAMP_411',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5f420',['TJSAMP_420',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5f422',['TJSAMP_422',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5f440',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5f444',['TJSAMP_444',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5fgray',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]],
|
||||||
|
['tjscaled',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]],
|
||||||
|
['tjscalingfactor',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
|
||||||
|
['tjtransform',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616',1,'tjTransform(tjhandle handle, unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags): turbojpeg.h'],['../group___turbo_j_p_e_g.html#gaa29f3189c41be12ec5dee7caec318a31',1,'tjtransform(): turbojpeg.h']]],
|
||||||
|
['tjxop',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5fhflip',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5fnone',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5frot180',['TJXOP_ROT180',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a140952eb8dd0300accfcc22726d69692',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5frot270',['TJXOP_ROT270',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a3064ee5dfb7f032df332818587567a08',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5frot90',['TJXOP_ROT90',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a43b2bbb23bc4bd548422d43fbe9af128',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5ftranspose',['TJXOP_TRANSPOSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5ftransverse',['TJXOP_TRANSVERSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5fvflip',['TJXOP_VFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d',1,'turbojpeg.h']]],
|
||||||
|
['tjxopt_5fcrop',['TJXOPT_CROP',['../group___turbo_j_p_e_g.html#ga9c771a757fc1294add611906b89ab2d2',1,'turbojpeg.h']]],
|
||||||
|
['tjxopt_5fgray',['TJXOPT_GRAY',['../group___turbo_j_p_e_g.html#ga3acee7b48ade1b99e5588736007c2589',1,'turbojpeg.h']]],
|
||||||
|
['tjxopt_5fnooutput',['TJXOPT_NOOUTPUT',['../group___turbo_j_p_e_g.html#gafbf992bbf6e006705886333703ffab31',1,'turbojpeg.h']]],
|
||||||
|
['tjxopt_5fperfect',['TJXOPT_PERFECT',['../group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00',1,'turbojpeg.h']]],
|
||||||
|
['tjxopt_5ftrim',['TJXOPT_TRIM',['../group___turbo_j_p_e_g.html#ga319826b7eb1583c0595bbe7b95428709',1,'turbojpeg.h']]],
|
||||||
|
['turbojpeg',['TurboJPEG',['../group___turbo_j_p_e_g.html',1,'']]]
|
||||||
|
];
|
||||||
26
doc/html/search/all_77.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_77.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4
doc/html/search/all_77.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['w',['w',['../structtjregion.html#ab6eb73ceef584fc23c8c8097926dce42',1,'tjregion']]]
|
||||||
|
];
|
||||||
26
doc/html/search/all_78.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_78.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4
doc/html/search/all_78.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['x',['x',['../structtjregion.html#a4b6a37a93997091b26a75831fa291ad9',1,'tjregion']]]
|
||||||
|
];
|
||||||
26
doc/html/search/all_79.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_79.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4
doc/html/search/all_79.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['y',['y',['../structtjregion.html#a7b3e0c24cfe87acc80e334cafdcf22c2',1,'tjregion']]]
|
||||||
|
];
|
||||||
26
doc/html/search/classes_74.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="classes_74.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
6
doc/html/search/classes_74.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['tjregion',['tjregion',['../structtjregion.html',1,'']]],
|
||||||
|
['tjscalingfactor',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
|
||||||
|
['tjtransform',['tjtransform',['../structtjtransform.html',1,'']]]
|
||||||
|
];
|
||||||
BIN
doc/html/search/close.png
Normal file
|
After Width: | Height: | Size: 273 B |
26
doc/html/search/enums_74.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="enums_74.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
7
doc/html/search/enums_74.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['tjcs',['TJCS',['../group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720',1,'turbojpeg.h']]],
|
||||||
|
['tjpf',['TJPF',['../group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
|
||||||
|
['tjxop',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]]
|
||||||
|
];
|
||||||
26
doc/html/search/enumvalues_74.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="enumvalues_74.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
34
doc/html/search/enumvalues_74.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['tjcs_5fcmyk',['TJCS_CMYK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53',1,'turbojpeg.h']]],
|
||||||
|
['tjcs_5fgray',['TJCS_GRAY',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a',1,'turbojpeg.h']]],
|
||||||
|
['tjcs_5frgb',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]],
|
||||||
|
['tjcs_5fycbcr',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]],
|
||||||
|
['tjcs_5fycck',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fabgr',['TJPF_ABGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fargb',['TJPF_ARGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fbgr',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fbgra',['TJPF_BGRA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fbgrx',['TJPF_BGRX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fcmyk',['TJPF_CMYK',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fgray',['TJPF_GRAY',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5frgb',['TJPF_RGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5frgba',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5frgbx',['TJPF_RGBX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fxbgr',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]],
|
||||||
|
['tjpf_5fxrgb',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5f411',['TJSAMP_411',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5f420',['TJSAMP_420',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5f422',['TJSAMP_422',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5f440',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5f444',['TJSAMP_444',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3',1,'turbojpeg.h']]],
|
||||||
|
['tjsamp_5fgray',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5fhflip',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5fnone',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5frot180',['TJXOP_ROT180',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a140952eb8dd0300accfcc22726d69692',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5frot270',['TJXOP_ROT270',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a3064ee5dfb7f032df332818587567a08',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5frot90',['TJXOP_ROT90',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a43b2bbb23bc4bd548422d43fbe9af128',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5ftranspose',['TJXOP_TRANSPOSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5ftransverse',['TJXOP_TRANSVERSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4',1,'turbojpeg.h']]],
|
||||||
|
['tjxop_5fvflip',['TJXOP_VFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d',1,'turbojpeg.h']]]
|
||||||
|
];
|
||||||
26
doc/html/search/functions_74.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="functions_74.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
28
doc/html/search/functions_74.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['tjalloc',['tjAlloc',['../group___turbo_j_p_e_g.html#ga5c9234bda6d993cdaffdd89bf81a00ff',1,'turbojpeg.h']]],
|
||||||
|
['tjbufsize',['tjBufSize',['../group___turbo_j_p_e_g.html#gaccc5bca7f12fcdcc302e6e1c6d4b311b',1,'turbojpeg.h']]],
|
||||||
|
['tjbufsizeyuv2',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#gaf451664a62c1f6c7cc5a6401f32908c9',1,'turbojpeg.h']]],
|
||||||
|
['tjcompress2',['tjCompress2',['../group___turbo_j_p_e_g.html#gaba62b7a98f960839b588579898495cf2',1,'turbojpeg.h']]],
|
||||||
|
['tjcompressfromyuv',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga0b931126c7a615ddc3bbd0cca6698d67',1,'turbojpeg.h']]],
|
||||||
|
['tjcompressfromyuvplanes',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#gaa89a1982cb4556b12ae7af4439991af6',1,'turbojpeg.h']]],
|
||||||
|
['tjdecodeyuv',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga132ae2c2cadcf64c8bb0f3bdf69da3ed',1,'turbojpeg.h']]],
|
||||||
|
['tjdecodeyuvplanes',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga6cb5b0e1101a2b20edea576e11faf93d',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gada69cc6443d1bb493b40f1626259e5e9',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompressheader3',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#gacd0fac3af74b3511d39b4781b7103086',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompresstoyuv2',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga7c08b340ad7f8e85d407bd9e81d44d07',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompresstoyuvplanes',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#ga0828a38ae29631ac28b6857cefb0eebf',1,'turbojpeg.h']]],
|
||||||
|
['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga674adee917b95ad4a896f1ba39e12540',1,'turbojpeg.h']]],
|
||||||
|
['tjencodeyuv3',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#ga0a5ffbf7cb58a5b6a8201114fe889360',1,'turbojpeg.h']]],
|
||||||
|
['tjencodeyuvplanes',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#gaa791db8598853ddcad24e42897ef1269',1,'turbojpeg.h']]],
|
||||||
|
['tjfree',['tjFree',['../group___turbo_j_p_e_g.html#ga8c4a1231dc06a450514c835f6471f137',1,'turbojpeg.h']]],
|
||||||
|
['tjgeterrorstr',['tjGetErrorStr',['../group___turbo_j_p_e_g.html#ga9af79c908ec131b1ae8d52fe40375abf',1,'turbojpeg.h']]],
|
||||||
|
['tjgetscalingfactors',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#ga6449044b9af402999ccf52f401333be8',1,'turbojpeg.h']]],
|
||||||
|
['tjinitcompress',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga3d10c47fbe4a2489a2b30c931551d01a',1,'turbojpeg.h']]],
|
||||||
|
['tjinitdecompress',['tjInitDecompress',['../group___turbo_j_p_e_g.html#gae5408179d041e2a2f7199c8283cf649e',1,'turbojpeg.h']]],
|
||||||
|
['tjinittransform',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga3155b775bfbac9dbba869b95a0367902',1,'turbojpeg.h']]],
|
||||||
|
['tjplaneheight',['tjPlaneHeight',['../group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f',1,'turbojpeg.h']]],
|
||||||
|
['tjplanesizeyuv',['tjPlaneSizeYUV',['../group___turbo_j_p_e_g.html#ga6f98d977bfa9d167c97172e876ba61e2',1,'turbojpeg.h']]],
|
||||||
|
['tjplanewidth',['tjPlaneWidth',['../group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1',1,'turbojpeg.h']]],
|
||||||
|
['tjtransform',['tjTransform',['../group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616',1,'turbojpeg.h']]]
|
||||||
|
];
|
||||||
26
doc/html/search/groups_74.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="groups_74.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4
doc/html/search/groups_74.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['turbojpeg',['TurboJPEG',['../group___turbo_j_p_e_g.html',1,'']]]
|
||||||
|
];
|
||||||
BIN
doc/html/search/mag_sel.png
Normal file
|
After Width: | Height: | Size: 563 B |
12
doc/html/search/nomatches.html
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
271
doc/html/search/search.css
Normal file
@@ -0,0 +1,271 @@
|
|||||||
|
/*---------------- Search Box */
|
||||||
|
|
||||||
|
#FSearchBox {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchBox {
|
||||||
|
white-space : nowrap;
|
||||||
|
position: absolute;
|
||||||
|
float: none;
|
||||||
|
display: inline;
|
||||||
|
margin-top: 8px;
|
||||||
|
right: 0px;
|
||||||
|
width: 170px;
|
||||||
|
z-index: 102;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchBox .left
|
||||||
|
{
|
||||||
|
display:block;
|
||||||
|
position:absolute;
|
||||||
|
left:10px;
|
||||||
|
width:20px;
|
||||||
|
height:19px;
|
||||||
|
background:url('search_l.png') no-repeat;
|
||||||
|
background-position:right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchSelect {
|
||||||
|
display:block;
|
||||||
|
position:absolute;
|
||||||
|
width:20px;
|
||||||
|
height:19px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left #MSearchSelect {
|
||||||
|
left:4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right #MSearchSelect {
|
||||||
|
right:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchField {
|
||||||
|
display:block;
|
||||||
|
position:absolute;
|
||||||
|
height:19px;
|
||||||
|
background:url('search_m.png') repeat-x;
|
||||||
|
border:none;
|
||||||
|
width:116px;
|
||||||
|
margin-left:20px;
|
||||||
|
padding-left:4px;
|
||||||
|
color: #909090;
|
||||||
|
outline: none;
|
||||||
|
font: 9pt Arial, Verdana, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#FSearchBox #MSearchField {
|
||||||
|
margin-left:15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchBox .right {
|
||||||
|
display:block;
|
||||||
|
position:absolute;
|
||||||
|
right:10px;
|
||||||
|
top:0px;
|
||||||
|
width:20px;
|
||||||
|
height:19px;
|
||||||
|
background:url('search_r.png') no-repeat;
|
||||||
|
background-position:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchClose {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
background : none;
|
||||||
|
border: none;
|
||||||
|
margin: 0px 4px 0px 0px;
|
||||||
|
padding: 0px 0px;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left #MSearchClose {
|
||||||
|
left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right #MSearchClose {
|
||||||
|
right: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.MSearchBoxActive #MSearchField {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------- Search filter selection */
|
||||||
|
|
||||||
|
#MSearchSelectWindow {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 0; top: 0;
|
||||||
|
border: 1px solid #90A5CE;
|
||||||
|
background-color: #F9FAFC;
|
||||||
|
z-index: 1;
|
||||||
|
padding-top: 4px;
|
||||||
|
padding-bottom: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-webkit-border-top-left-radius: 4px;
|
||||||
|
-webkit-border-top-right-radius: 4px;
|
||||||
|
-webkit-border-bottom-left-radius: 4px;
|
||||||
|
-webkit-border-bottom-right-radius: 4px;
|
||||||
|
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.SelectItem {
|
||||||
|
font: 8pt Arial, Verdana, sans-serif;
|
||||||
|
padding-left: 2px;
|
||||||
|
padding-right: 12px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.SelectionMark {
|
||||||
|
margin-right: 4px;
|
||||||
|
font-family: monospace;
|
||||||
|
outline-style: none;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.SelectItem {
|
||||||
|
display: block;
|
||||||
|
outline-style: none;
|
||||||
|
color: #000000;
|
||||||
|
text-decoration: none;
|
||||||
|
padding-left: 6px;
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.SelectItem:focus,
|
||||||
|
a.SelectItem:active {
|
||||||
|
color: #000000;
|
||||||
|
outline-style: none;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.SelectItem:hover {
|
||||||
|
color: #FFFFFF;
|
||||||
|
background-color: #3D578C;
|
||||||
|
outline-style: none;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------- Search results window */
|
||||||
|
|
||||||
|
iframe#MSearchResults {
|
||||||
|
width: 60ex;
|
||||||
|
height: 15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchResultsWindow {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 0; top: 0;
|
||||||
|
border: 1px solid #000;
|
||||||
|
background-color: #EEF1F7;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
#SRIndex {
|
||||||
|
clear:both;
|
||||||
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SREntry {
|
||||||
|
font-size: 10pt;
|
||||||
|
padding-left: 1ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRPage .SREntry {
|
||||||
|
font-size: 8pt;
|
||||||
|
padding: 1px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.SRPage {
|
||||||
|
margin: 5px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRChildren {
|
||||||
|
padding-left: 3ex; padding-bottom: .5em
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRPage .SRChildren {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRSymbol {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #425E97;
|
||||||
|
font-family: Arial, Verdana, sans-serif;
|
||||||
|
text-decoration: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.SRScope {
|
||||||
|
display: block;
|
||||||
|
color: #425E97;
|
||||||
|
font-family: Arial, Verdana, sans-serif;
|
||||||
|
text-decoration: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.SRSymbol:focus, a.SRSymbol:active,
|
||||||
|
a.SRScope:focus, a.SRScope:active {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.SRScope {
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRPage .SRStatus {
|
||||||
|
padding: 2px 5px;
|
||||||
|
font-size: 8pt;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRResult {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.searchresults {
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------- External search page results */
|
||||||
|
|
||||||
|
.searchresult {
|
||||||
|
background-color: #F0F3F8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pages b {
|
||||||
|
color: white;
|
||||||
|
padding: 5px 5px 3px 5px;
|
||||||
|
background-image: url("../tab_a.png");
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
text-shadow: 0 1px 1px #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pages {
|
||||||
|
line-height: 17px;
|
||||||
|
margin-left: 4px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hl {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#searchresults {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchpages {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
809
doc/html/search/search.js
Normal file
@@ -0,0 +1,809 @@
|
|||||||
|
// Search script generated by doxygen
|
||||||
|
// Copyright (C) 2009 by Dimitri van Heesch.
|
||||||
|
|
||||||
|
// The code in this file is loosly based on main.js, part of Natural Docs,
|
||||||
|
// which is Copyright (C) 2003-2008 Greg Valure
|
||||||
|
// Natural Docs is licensed under the GPL.
|
||||||
|
|
||||||
|
var indexSectionsWithContent =
|
||||||
|
{
|
||||||
|
0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100010000011001010011100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100010000011001010011100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
4: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
5: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
6: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
7: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||||
|
};
|
||||||
|
|
||||||
|
var indexSectionNames =
|
||||||
|
{
|
||||||
|
0: "all",
|
||||||
|
1: "classes",
|
||||||
|
2: "functions",
|
||||||
|
3: "variables",
|
||||||
|
4: "typedefs",
|
||||||
|
5: "enums",
|
||||||
|
6: "enumvalues",
|
||||||
|
7: "groups"
|
||||||
|
};
|
||||||
|
|
||||||
|
function convertToId(search)
|
||||||
|
{
|
||||||
|
var result = '';
|
||||||
|
for (i=0;i<search.length;i++)
|
||||||
|
{
|
||||||
|
var c = search.charAt(i);
|
||||||
|
var cn = c.charCodeAt(0);
|
||||||
|
if (c.match(/[a-z0-9]/))
|
||||||
|
{
|
||||||
|
result+=c;
|
||||||
|
}
|
||||||
|
else if (cn<16)
|
||||||
|
{
|
||||||
|
result+="_0"+cn.toString(16);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result+="_"+cn.toString(16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getXPos(item)
|
||||||
|
{
|
||||||
|
var x = 0;
|
||||||
|
if (item.offsetWidth)
|
||||||
|
{
|
||||||
|
while (item && item!=document.body)
|
||||||
|
{
|
||||||
|
x += item.offsetLeft;
|
||||||
|
item = item.offsetParent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getYPos(item)
|
||||||
|
{
|
||||||
|
var y = 0;
|
||||||
|
if (item.offsetWidth)
|
||||||
|
{
|
||||||
|
while (item && item!=document.body)
|
||||||
|
{
|
||||||
|
y += item.offsetTop;
|
||||||
|
item = item.offsetParent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* A class handling everything associated with the search panel.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
name - The name of the global variable that will be
|
||||||
|
storing this instance. Is needed to be able to set timeouts.
|
||||||
|
resultPath - path to use for external files
|
||||||
|
*/
|
||||||
|
function SearchBox(name, resultsPath, inFrame, label)
|
||||||
|
{
|
||||||
|
if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
|
||||||
|
|
||||||
|
// ---------- Instance variables
|
||||||
|
this.name = name;
|
||||||
|
this.resultsPath = resultsPath;
|
||||||
|
this.keyTimeout = 0;
|
||||||
|
this.keyTimeoutLength = 500;
|
||||||
|
this.closeSelectionTimeout = 300;
|
||||||
|
this.lastSearchValue = "";
|
||||||
|
this.lastResultsPage = "";
|
||||||
|
this.hideTimeout = 0;
|
||||||
|
this.searchIndex = 0;
|
||||||
|
this.searchActive = false;
|
||||||
|
this.insideFrame = inFrame;
|
||||||
|
this.searchLabel = label;
|
||||||
|
|
||||||
|
// ----------- DOM Elements
|
||||||
|
|
||||||
|
this.DOMSearchField = function()
|
||||||
|
{ return document.getElementById("MSearchField"); }
|
||||||
|
|
||||||
|
this.DOMSearchSelect = function()
|
||||||
|
{ return document.getElementById("MSearchSelect"); }
|
||||||
|
|
||||||
|
this.DOMSearchSelectWindow = function()
|
||||||
|
{ return document.getElementById("MSearchSelectWindow"); }
|
||||||
|
|
||||||
|
this.DOMPopupSearchResults = function()
|
||||||
|
{ return document.getElementById("MSearchResults"); }
|
||||||
|
|
||||||
|
this.DOMPopupSearchResultsWindow = function()
|
||||||
|
{ return document.getElementById("MSearchResultsWindow"); }
|
||||||
|
|
||||||
|
this.DOMSearchClose = function()
|
||||||
|
{ return document.getElementById("MSearchClose"); }
|
||||||
|
|
||||||
|
this.DOMSearchBox = function()
|
||||||
|
{ return document.getElementById("MSearchBox"); }
|
||||||
|
|
||||||
|
// ------------ Event Handlers
|
||||||
|
|
||||||
|
// Called when focus is added or removed from the search field.
|
||||||
|
this.OnSearchFieldFocus = function(isActive)
|
||||||
|
{
|
||||||
|
this.Activate(isActive);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.OnSearchSelectShow = function()
|
||||||
|
{
|
||||||
|
var searchSelectWindow = this.DOMSearchSelectWindow();
|
||||||
|
var searchField = this.DOMSearchSelect();
|
||||||
|
|
||||||
|
if (this.insideFrame)
|
||||||
|
{
|
||||||
|
var left = getXPos(searchField);
|
||||||
|
var top = getYPos(searchField);
|
||||||
|
left += searchField.offsetWidth + 6;
|
||||||
|
top += searchField.offsetHeight;
|
||||||
|
|
||||||
|
// show search selection popup
|
||||||
|
searchSelectWindow.style.display='block';
|
||||||
|
left -= searchSelectWindow.offsetWidth;
|
||||||
|
searchSelectWindow.style.left = left + 'px';
|
||||||
|
searchSelectWindow.style.top = top + 'px';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var left = getXPos(searchField);
|
||||||
|
var top = getYPos(searchField);
|
||||||
|
top += searchField.offsetHeight;
|
||||||
|
|
||||||
|
// show search selection popup
|
||||||
|
searchSelectWindow.style.display='block';
|
||||||
|
searchSelectWindow.style.left = left + 'px';
|
||||||
|
searchSelectWindow.style.top = top + 'px';
|
||||||
|
}
|
||||||
|
|
||||||
|
// stop selection hide timer
|
||||||
|
if (this.hideTimeout)
|
||||||
|
{
|
||||||
|
clearTimeout(this.hideTimeout);
|
||||||
|
this.hideTimeout=0;
|
||||||
|
}
|
||||||
|
return false; // to avoid "image drag" default event
|
||||||
|
}
|
||||||
|
|
||||||
|
this.OnSearchSelectHide = function()
|
||||||
|
{
|
||||||
|
this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
|
||||||
|
this.closeSelectionTimeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called when the content of the search field is changed.
|
||||||
|
this.OnSearchFieldChange = function(evt)
|
||||||
|
{
|
||||||
|
if (this.keyTimeout) // kill running timer
|
||||||
|
{
|
||||||
|
clearTimeout(this.keyTimeout);
|
||||||
|
this.keyTimeout = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
var e = (evt) ? evt : window.event; // for IE
|
||||||
|
if (e.keyCode==40 || e.keyCode==13)
|
||||||
|
{
|
||||||
|
if (e.shiftKey==1)
|
||||||
|
{
|
||||||
|
this.OnSearchSelectShow();
|
||||||
|
var win=this.DOMSearchSelectWindow();
|
||||||
|
for (i=0;i<win.childNodes.length;i++)
|
||||||
|
{
|
||||||
|
var child = win.childNodes[i]; // get span within a
|
||||||
|
if (child.className=='SelectItem')
|
||||||
|
{
|
||||||
|
child.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (window.frames.MSearchResults.searchResults)
|
||||||
|
{
|
||||||
|
var elem = window.frames.MSearchResults.searchResults.NavNext(0);
|
||||||
|
if (elem) elem.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (e.keyCode==27) // Escape out of the search field
|
||||||
|
{
|
||||||
|
this.DOMSearchField().blur();
|
||||||
|
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||||
|
this.DOMSearchClose().style.display = 'none';
|
||||||
|
this.lastSearchValue = '';
|
||||||
|
this.Activate(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// strip whitespaces
|
||||||
|
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||||
|
|
||||||
|
if (searchValue != this.lastSearchValue) // search value has changed
|
||||||
|
{
|
||||||
|
if (searchValue != "") // non-empty search
|
||||||
|
{
|
||||||
|
// set timer for search update
|
||||||
|
this.keyTimeout = setTimeout(this.name + '.Search()',
|
||||||
|
this.keyTimeoutLength);
|
||||||
|
}
|
||||||
|
else // empty search field
|
||||||
|
{
|
||||||
|
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||||
|
this.DOMSearchClose().style.display = 'none';
|
||||||
|
this.lastSearchValue = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.SelectItemCount = function(id)
|
||||||
|
{
|
||||||
|
var count=0;
|
||||||
|
var win=this.DOMSearchSelectWindow();
|
||||||
|
for (i=0;i<win.childNodes.length;i++)
|
||||||
|
{
|
||||||
|
var child = win.childNodes[i]; // get span within a
|
||||||
|
if (child.className=='SelectItem')
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.SelectItemSet = function(id)
|
||||||
|
{
|
||||||
|
var i,j=0;
|
||||||
|
var win=this.DOMSearchSelectWindow();
|
||||||
|
for (i=0;i<win.childNodes.length;i++)
|
||||||
|
{
|
||||||
|
var child = win.childNodes[i]; // get span within a
|
||||||
|
if (child.className=='SelectItem')
|
||||||
|
{
|
||||||
|
var node = child.firstChild;
|
||||||
|
if (j==id)
|
||||||
|
{
|
||||||
|
node.innerHTML='•';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
node.innerHTML=' ';
|
||||||
|
}
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called when an search filter selection is made.
|
||||||
|
// set item with index id as the active item
|
||||||
|
this.OnSelectItem = function(id)
|
||||||
|
{
|
||||||
|
this.searchIndex = id;
|
||||||
|
this.SelectItemSet(id);
|
||||||
|
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||||
|
if (searchValue!="" && this.searchActive) // something was found -> do a search
|
||||||
|
{
|
||||||
|
this.Search();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.OnSearchSelectKey = function(evt)
|
||||||
|
{
|
||||||
|
var e = (evt) ? evt : window.event; // for IE
|
||||||
|
if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
|
||||||
|
{
|
||||||
|
this.searchIndex++;
|
||||||
|
this.OnSelectItem(this.searchIndex);
|
||||||
|
}
|
||||||
|
else if (e.keyCode==38 && this.searchIndex>0) // Up
|
||||||
|
{
|
||||||
|
this.searchIndex--;
|
||||||
|
this.OnSelectItem(this.searchIndex);
|
||||||
|
}
|
||||||
|
else if (e.keyCode==13 || e.keyCode==27)
|
||||||
|
{
|
||||||
|
this.OnSelectItem(this.searchIndex);
|
||||||
|
this.CloseSelectionWindow();
|
||||||
|
this.DOMSearchField().focus();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------- Actions
|
||||||
|
|
||||||
|
// Closes the results window.
|
||||||
|
this.CloseResultsWindow = function()
|
||||||
|
{
|
||||||
|
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||||
|
this.DOMSearchClose().style.display = 'none';
|
||||||
|
this.Activate(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CloseSelectionWindow = function()
|
||||||
|
{
|
||||||
|
this.DOMSearchSelectWindow().style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Performs a search.
|
||||||
|
this.Search = function()
|
||||||
|
{
|
||||||
|
this.keyTimeout = 0;
|
||||||
|
|
||||||
|
// strip leading whitespace
|
||||||
|
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
|
||||||
|
|
||||||
|
var code = searchValue.toLowerCase().charCodeAt(0);
|
||||||
|
var hexCode;
|
||||||
|
if (code<16)
|
||||||
|
{
|
||||||
|
hexCode="0"+code.toString(16);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hexCode=code.toString(16);
|
||||||
|
}
|
||||||
|
|
||||||
|
var resultsPage;
|
||||||
|
var resultsPageWithSearch;
|
||||||
|
var hasResultsPage;
|
||||||
|
|
||||||
|
if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1')
|
||||||
|
{
|
||||||
|
resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
|
||||||
|
resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
|
||||||
|
hasResultsPage = true;
|
||||||
|
}
|
||||||
|
else // nothing available for this search term
|
||||||
|
{
|
||||||
|
resultsPage = this.resultsPath + '/nomatches.html';
|
||||||
|
resultsPageWithSearch = resultsPage;
|
||||||
|
hasResultsPage = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.frames.MSearchResults.location = resultsPageWithSearch;
|
||||||
|
var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
|
||||||
|
|
||||||
|
if (domPopupSearchResultsWindow.style.display!='block')
|
||||||
|
{
|
||||||
|
var domSearchBox = this.DOMSearchBox();
|
||||||
|
this.DOMSearchClose().style.display = 'inline';
|
||||||
|
if (this.insideFrame)
|
||||||
|
{
|
||||||
|
var domPopupSearchResults = this.DOMPopupSearchResults();
|
||||||
|
domPopupSearchResultsWindow.style.position = 'relative';
|
||||||
|
domPopupSearchResultsWindow.style.display = 'block';
|
||||||
|
var width = document.body.clientWidth - 8; // the -8 is for IE :-(
|
||||||
|
domPopupSearchResultsWindow.style.width = width + 'px';
|
||||||
|
domPopupSearchResults.style.width = width + 'px';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var domPopupSearchResults = this.DOMPopupSearchResults();
|
||||||
|
var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;
|
||||||
|
var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1;
|
||||||
|
domPopupSearchResultsWindow.style.display = 'block';
|
||||||
|
left -= domPopupSearchResults.offsetWidth;
|
||||||
|
domPopupSearchResultsWindow.style.top = top + 'px';
|
||||||
|
domPopupSearchResultsWindow.style.left = left + 'px';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.lastSearchValue = searchValue;
|
||||||
|
this.lastResultsPage = resultsPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------- Activation Functions
|
||||||
|
|
||||||
|
// Activates or deactivates the search panel, resetting things to
|
||||||
|
// their default values if necessary.
|
||||||
|
this.Activate = function(isActive)
|
||||||
|
{
|
||||||
|
if (isActive || // open it
|
||||||
|
this.DOMPopupSearchResultsWindow().style.display == 'block'
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this.DOMSearchBox().className = 'MSearchBoxActive';
|
||||||
|
|
||||||
|
var searchField = this.DOMSearchField();
|
||||||
|
|
||||||
|
if (searchField.value == this.searchLabel) // clear "Search" term upon entry
|
||||||
|
{
|
||||||
|
searchField.value = '';
|
||||||
|
this.searchActive = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!isActive) // directly remove the panel
|
||||||
|
{
|
||||||
|
this.DOMSearchBox().className = 'MSearchBoxInactive';
|
||||||
|
this.DOMSearchField().value = this.searchLabel;
|
||||||
|
this.searchActive = false;
|
||||||
|
this.lastSearchValue = ''
|
||||||
|
this.lastResultsPage = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
// The class that handles everything on the search results page.
|
||||||
|
function SearchResults(name)
|
||||||
|
{
|
||||||
|
// The number of matches from the last run of <Search()>.
|
||||||
|
this.lastMatchCount = 0;
|
||||||
|
this.lastKey = 0;
|
||||||
|
this.repeatOn = false;
|
||||||
|
|
||||||
|
// Toggles the visibility of the passed element ID.
|
||||||
|
this.FindChildElement = function(id)
|
||||||
|
{
|
||||||
|
var parentElement = document.getElementById(id);
|
||||||
|
var element = parentElement.firstChild;
|
||||||
|
|
||||||
|
while (element && element!=parentElement)
|
||||||
|
{
|
||||||
|
if (element.nodeName == 'DIV' && element.className == 'SRChildren')
|
||||||
|
{
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (element.nodeName == 'DIV' && element.hasChildNodes())
|
||||||
|
{
|
||||||
|
element = element.firstChild;
|
||||||
|
}
|
||||||
|
else if (element.nextSibling)
|
||||||
|
{
|
||||||
|
element = element.nextSibling;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
element = element.parentNode;
|
||||||
|
}
|
||||||
|
while (element && element!=parentElement && !element.nextSibling);
|
||||||
|
|
||||||
|
if (element && element!=parentElement)
|
||||||
|
{
|
||||||
|
element = element.nextSibling;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Toggle = function(id)
|
||||||
|
{
|
||||||
|
var element = this.FindChildElement(id);
|
||||||
|
if (element)
|
||||||
|
{
|
||||||
|
if (element.style.display == 'block')
|
||||||
|
{
|
||||||
|
element.style.display = 'none';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
element.style.display = 'block';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Searches for the passed string. If there is no parameter,
|
||||||
|
// it takes it from the URL query.
|
||||||
|
//
|
||||||
|
// Always returns true, since other documents may try to call it
|
||||||
|
// and that may or may not be possible.
|
||||||
|
this.Search = function(search)
|
||||||
|
{
|
||||||
|
if (!search) // get search word from URL
|
||||||
|
{
|
||||||
|
search = window.location.search;
|
||||||
|
search = search.substring(1); // Remove the leading '?'
|
||||||
|
search = unescape(search);
|
||||||
|
}
|
||||||
|
|
||||||
|
search = search.replace(/^ +/, ""); // strip leading spaces
|
||||||
|
search = search.replace(/ +$/, ""); // strip trailing spaces
|
||||||
|
search = search.toLowerCase();
|
||||||
|
search = convertToId(search);
|
||||||
|
|
||||||
|
var resultRows = document.getElementsByTagName("div");
|
||||||
|
var matches = 0;
|
||||||
|
|
||||||
|
var i = 0;
|
||||||
|
while (i < resultRows.length)
|
||||||
|
{
|
||||||
|
var row = resultRows.item(i);
|
||||||
|
if (row.className == "SRResult")
|
||||||
|
{
|
||||||
|
var rowMatchName = row.id.toLowerCase();
|
||||||
|
rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
|
||||||
|
|
||||||
|
if (search.length<=rowMatchName.length &&
|
||||||
|
rowMatchName.substr(0, search.length)==search)
|
||||||
|
{
|
||||||
|
row.style.display = 'block';
|
||||||
|
matches++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
row.style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
document.getElementById("Searching").style.display='none';
|
||||||
|
if (matches == 0) // no results
|
||||||
|
{
|
||||||
|
document.getElementById("NoMatches").style.display='block';
|
||||||
|
}
|
||||||
|
else // at least one result
|
||||||
|
{
|
||||||
|
document.getElementById("NoMatches").style.display='none';
|
||||||
|
}
|
||||||
|
this.lastMatchCount = matches;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// return the first item with index index or higher that is visible
|
||||||
|
this.NavNext = function(index)
|
||||||
|
{
|
||||||
|
var focusItem;
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
var focusName = 'Item'+index;
|
||||||
|
focusItem = document.getElementById(focusName);
|
||||||
|
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (!focusItem) // last element
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
focusItem=null;
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
return focusItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.NavPrev = function(index)
|
||||||
|
{
|
||||||
|
var focusItem;
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
var focusName = 'Item'+index;
|
||||||
|
focusItem = document.getElementById(focusName);
|
||||||
|
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (!focusItem) // last element
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
focusItem=null;
|
||||||
|
index--;
|
||||||
|
}
|
||||||
|
return focusItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ProcessKeys = function(e)
|
||||||
|
{
|
||||||
|
if (e.type == "keydown")
|
||||||
|
{
|
||||||
|
this.repeatOn = false;
|
||||||
|
this.lastKey = e.keyCode;
|
||||||
|
}
|
||||||
|
else if (e.type == "keypress")
|
||||||
|
{
|
||||||
|
if (!this.repeatOn)
|
||||||
|
{
|
||||||
|
if (this.lastKey) this.repeatOn = true;
|
||||||
|
return false; // ignore first keypress after keydown
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (e.type == "keyup")
|
||||||
|
{
|
||||||
|
this.lastKey = 0;
|
||||||
|
this.repeatOn = false;
|
||||||
|
}
|
||||||
|
return this.lastKey!=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Nav = function(evt,itemIndex)
|
||||||
|
{
|
||||||
|
var e = (evt) ? evt : window.event; // for IE
|
||||||
|
if (e.keyCode==13) return true;
|
||||||
|
if (!this.ProcessKeys(e)) return false;
|
||||||
|
|
||||||
|
if (this.lastKey==38) // Up
|
||||||
|
{
|
||||||
|
var newIndex = itemIndex-1;
|
||||||
|
var focusItem = this.NavPrev(newIndex);
|
||||||
|
if (focusItem)
|
||||||
|
{
|
||||||
|
var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
|
||||||
|
if (child && child.style.display == 'block') // children visible
|
||||||
|
{
|
||||||
|
var n=0;
|
||||||
|
var tmpElem;
|
||||||
|
while (1) // search for last child
|
||||||
|
{
|
||||||
|
tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
|
||||||
|
if (tmpElem)
|
||||||
|
{
|
||||||
|
focusItem = tmpElem;
|
||||||
|
}
|
||||||
|
else // found it!
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (focusItem)
|
||||||
|
{
|
||||||
|
focusItem.focus();
|
||||||
|
}
|
||||||
|
else // return focus to search field
|
||||||
|
{
|
||||||
|
parent.document.getElementById("MSearchField").focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.lastKey==40) // Down
|
||||||
|
{
|
||||||
|
var newIndex = itemIndex+1;
|
||||||
|
var focusItem;
|
||||||
|
var item = document.getElementById('Item'+itemIndex);
|
||||||
|
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||||
|
if (elem && elem.style.display == 'block') // children visible
|
||||||
|
{
|
||||||
|
focusItem = document.getElementById('Item'+itemIndex+'_c0');
|
||||||
|
}
|
||||||
|
if (!focusItem) focusItem = this.NavNext(newIndex);
|
||||||
|
if (focusItem) focusItem.focus();
|
||||||
|
}
|
||||||
|
else if (this.lastKey==39) // Right
|
||||||
|
{
|
||||||
|
var item = document.getElementById('Item'+itemIndex);
|
||||||
|
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||||
|
if (elem) elem.style.display = 'block';
|
||||||
|
}
|
||||||
|
else if (this.lastKey==37) // Left
|
||||||
|
{
|
||||||
|
var item = document.getElementById('Item'+itemIndex);
|
||||||
|
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||||
|
if (elem) elem.style.display = 'none';
|
||||||
|
}
|
||||||
|
else if (this.lastKey==27) // Escape
|
||||||
|
{
|
||||||
|
parent.searchBox.CloseResultsWindow();
|
||||||
|
parent.document.getElementById("MSearchField").focus();
|
||||||
|
}
|
||||||
|
else if (this.lastKey==13) // Enter
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.NavChild = function(evt,itemIndex,childIndex)
|
||||||
|
{
|
||||||
|
var e = (evt) ? evt : window.event; // for IE
|
||||||
|
if (e.keyCode==13) return true;
|
||||||
|
if (!this.ProcessKeys(e)) return false;
|
||||||
|
|
||||||
|
if (this.lastKey==38) // Up
|
||||||
|
{
|
||||||
|
if (childIndex>0)
|
||||||
|
{
|
||||||
|
var newIndex = childIndex-1;
|
||||||
|
document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
|
||||||
|
}
|
||||||
|
else // already at first child, jump to parent
|
||||||
|
{
|
||||||
|
document.getElementById('Item'+itemIndex).focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.lastKey==40) // Down
|
||||||
|
{
|
||||||
|
var newIndex = childIndex+1;
|
||||||
|
var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
|
||||||
|
if (!elem) // last child, jump to parent next parent
|
||||||
|
{
|
||||||
|
elem = this.NavNext(itemIndex+1);
|
||||||
|
}
|
||||||
|
if (elem)
|
||||||
|
{
|
||||||
|
elem.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.lastKey==27) // Escape
|
||||||
|
{
|
||||||
|
parent.searchBox.CloseResultsWindow();
|
||||||
|
parent.document.getElementById("MSearchField").focus();
|
||||||
|
}
|
||||||
|
else if (this.lastKey==13) // Enter
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setKeyActions(elem,action)
|
||||||
|
{
|
||||||
|
elem.setAttribute('onkeydown',action);
|
||||||
|
elem.setAttribute('onkeypress',action);
|
||||||
|
elem.setAttribute('onkeyup',action);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setClassAttr(elem,attr)
|
||||||
|
{
|
||||||
|
elem.setAttribute('class',attr);
|
||||||
|
elem.setAttribute('className',attr);
|
||||||
|
}
|
||||||
|
|
||||||
|
function createResults()
|
||||||
|
{
|
||||||
|
var results = document.getElementById("SRResults");
|
||||||
|
for (var e=0; e<searchData.length; e++)
|
||||||
|
{
|
||||||
|
var id = searchData[e][0];
|
||||||
|
var srResult = document.createElement('div');
|
||||||
|
srResult.setAttribute('id','SR_'+id);
|
||||||
|
setClassAttr(srResult,'SRResult');
|
||||||
|
var srEntry = document.createElement('div');
|
||||||
|
setClassAttr(srEntry,'SREntry');
|
||||||
|
var srLink = document.createElement('a');
|
||||||
|
srLink.setAttribute('id','Item'+e);
|
||||||
|
setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
|
||||||
|
setClassAttr(srLink,'SRSymbol');
|
||||||
|
srLink.innerHTML = searchData[e][1][0];
|
||||||
|
srEntry.appendChild(srLink);
|
||||||
|
if (searchData[e][1].length==2) // single result
|
||||||
|
{
|
||||||
|
srLink.setAttribute('href',searchData[e][1][1][0]);
|
||||||
|
if (searchData[e][1][1][1])
|
||||||
|
{
|
||||||
|
srLink.setAttribute('target','_parent');
|
||||||
|
}
|
||||||
|
var srScope = document.createElement('span');
|
||||||
|
setClassAttr(srScope,'SRScope');
|
||||||
|
srScope.innerHTML = searchData[e][1][1][2];
|
||||||
|
srEntry.appendChild(srScope);
|
||||||
|
}
|
||||||
|
else // multiple results
|
||||||
|
{
|
||||||
|
srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
|
||||||
|
var srChildren = document.createElement('div');
|
||||||
|
setClassAttr(srChildren,'SRChildren');
|
||||||
|
for (var c=0; c<searchData[e][1].length-1; c++)
|
||||||
|
{
|
||||||
|
var srChild = document.createElement('a');
|
||||||
|
srChild.setAttribute('id','Item'+e+'_c'+c);
|
||||||
|
setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
|
||||||
|
setClassAttr(srChild,'SRScope');
|
||||||
|
srChild.setAttribute('href',searchData[e][1][c+1][0]);
|
||||||
|
if (searchData[e][1][c+1][1])
|
||||||
|
{
|
||||||
|
srChild.setAttribute('target','_parent');
|
||||||
|
}
|
||||||
|
srChild.innerHTML = searchData[e][1][c+1][2];
|
||||||
|
srChildren.appendChild(srChild);
|
||||||
|
}
|
||||||
|
srEntry.appendChild(srChildren);
|
||||||
|
}
|
||||||
|
srResult.appendChild(srEntry);
|
||||||
|
results.appendChild(srResult);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BIN
doc/html/search/search_l.png
Normal file
|
After Width: | Height: | Size: 604 B |
BIN
doc/html/search/search_m.png
Normal file
|
After Width: | Height: | Size: 158 B |
BIN
doc/html/search/search_r.png
Normal file
|
After Width: | Height: | Size: 612 B |
26
doc/html/search/typedefs_74.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.3.1">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="typedefs_74.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||