Compare commits
689 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf6c774305 | ||
|
|
c308d43416 | ||
|
|
773040f9d9 | ||
|
|
a831b5a986 | ||
|
|
19b393b624 | ||
|
|
9d9d8fe658 | ||
|
|
78e97e38cb | ||
|
|
468f2fed27 | ||
|
|
5abf2536f6 | ||
|
|
5fce2e9421 | ||
|
|
907dd683a4 | ||
|
|
f008876cc1 | ||
|
|
5bc43c7821 | ||
|
|
f3ad13e3d8 | ||
|
|
94e152b186 | ||
|
|
073b0e88a1 | ||
|
|
1b385f37f3 | ||
|
|
fd778bba46 | ||
|
|
8d403aeb6a | ||
|
|
01b74c101e | ||
|
|
db0dec3c5a | ||
|
|
ba6e9d8a11 | ||
|
|
5426a4cb16 | ||
|
|
d0bac69a8a | ||
|
|
59322e0973 | ||
|
|
4ded4dfac6 | ||
|
|
02fa8f244e | ||
|
|
32120054c2 | ||
|
|
1478361204 | ||
|
|
e5c1613ccd | ||
|
|
b0971e47d7 | ||
|
|
e248d430e2 | ||
|
|
acb634931a | ||
|
|
1db1ce45da | ||
|
|
d0c3aa900b | ||
|
|
6a2b067428 | ||
|
|
11eec4a398 | ||
|
|
301ba4f305 | ||
|
|
70f236ddd7 | ||
|
|
2a4f189444 | ||
|
|
9d64f3c60b | ||
|
|
da2a27ef05 | ||
|
|
c082dc039d | ||
|
|
d4c41fe0da | ||
|
|
a0b7de9a47 | ||
|
|
2252795571 | ||
|
|
eb38b61bfe | ||
|
|
47b29e8cd9 | ||
|
|
e1e816e665 | ||
|
|
6441018150 | ||
|
|
fcfc6c5eed | ||
|
|
786b649331 | ||
|
|
f4ba09b33a | ||
|
|
0f4fcced0a | ||
|
|
82bf7f5858 | ||
|
|
3582ce90bb | ||
|
|
d6d7b53968 | ||
|
|
f9f0c75bb8 | ||
|
|
3da94de248 | ||
|
|
ab664e35fc | ||
|
|
ce26e83f47 | ||
|
|
74e4c793cd | ||
|
|
a280fa630c | ||
|
|
6aae007745 | ||
|
|
4ad94b2963 | ||
|
|
2d4b2f14d0 | ||
|
|
9366cf0bca | ||
|
|
13e6b151b0 | ||
|
|
1ee329d617 | ||
|
|
b47c5e737f | ||
|
|
ce262eb5d7 | ||
|
|
27f817cd11 | ||
|
|
0df2e2188b | ||
|
|
6d22430a3a | ||
|
|
e9e3a2edd7 | ||
|
|
211c69f317 | ||
|
|
1625253d49 | ||
|
|
a0047bdea4 | ||
|
|
7bfb22af12 | ||
|
|
ac4a899511 | ||
|
|
dfefba7752 | ||
|
|
4cf67f2363 | ||
|
|
9407cf7f47 | ||
|
|
cb88e5da80 | ||
|
|
e9d9c31fd2 | ||
|
|
077e5bb4e0 | ||
|
|
a1dd35680d | ||
|
|
a09ba29a55 | ||
|
|
8ce2c9119a | ||
|
|
db04435165 | ||
|
|
7723d7f7d0 | ||
|
|
628c168c86 | ||
|
|
1120ff29a1 | ||
|
|
1945ad961b | ||
|
|
6e9d43e085 | ||
|
|
9055fb408d | ||
|
|
9e6c6a14f8 | ||
|
|
3ff13e651b | ||
|
|
1d50a8cd08 | ||
|
|
123f7258a8 | ||
|
|
e5091f2cf3 | ||
|
|
8f1c0a681c | ||
|
|
68cf83db56 | ||
|
|
f06cc1200f | ||
|
|
5c064de10d | ||
|
|
2e480fa2a3 | ||
|
|
5e576386b5 | ||
|
|
0d61e80ab0 | ||
|
|
ee681aa304 | ||
|
|
346837cad3 | ||
|
|
eb7962a02b | ||
|
|
3c67d4f7c0 | ||
|
|
1959e28b49 | ||
|
|
dec79952d6 | ||
|
|
2628c562bc | ||
|
|
28d1a1300c | ||
|
|
1a3aebd88e | ||
|
|
1e81b0c3ea | ||
|
|
b2817f5251 | ||
|
|
6f241d4d42 | ||
|
|
1385f8b281 | ||
|
|
742fb37dde | ||
|
|
a839a7a964 | ||
|
|
3f56bd597c | ||
|
|
e5f280c4c4 | ||
|
|
4f58123130 | ||
|
|
622d6678a8 | ||
|
|
b3247c7d71 | ||
|
|
a572622dd6 | ||
|
|
7cb8de4ae0 | ||
|
|
056536f660 | ||
|
|
7c202f76e7 | ||
|
|
fa722636be | ||
|
|
2354810a43 | ||
|
|
45c1e3a887 | ||
|
|
f57bae0ddd | ||
|
|
025c1f66de | ||
|
|
3ab68cf563 | ||
|
|
5f972324ee | ||
|
|
f76c01d0bd | ||
|
|
d4be42360c | ||
|
|
e621dfc508 | ||
|
|
9100b67a75 | ||
|
|
bd49803f92 | ||
|
|
ae41128845 | ||
|
|
54e6b8e806 | ||
|
|
83aeb7b28c | ||
|
|
a560e4b423 | ||
|
|
fc11193e7a | ||
|
|
e7f88aec23 | ||
|
|
aefd8b7942 | ||
|
|
18dcac4632 | ||
|
|
03841e6e89 | ||
|
|
d123c125c5 | ||
|
|
8632f1b262 | ||
|
|
bba7978981 | ||
|
|
28f00bf235 | ||
|
|
ab80273b61 | ||
|
|
53c635b8e8 | ||
|
|
46ecffa324 | ||
|
|
219470d6ac | ||
|
|
15aaa7f7e2 | ||
|
|
45bbe06ec5 | ||
|
|
2d62325754 | ||
|
|
f9134384b7 | ||
|
|
ce0dd949b2 | ||
|
|
8ff67fdb24 | ||
|
|
55a18d4007 | ||
|
|
2d56acb840 | ||
|
|
c454c595dc | ||
|
|
0463f7c9aa | ||
|
|
04dd34c14e | ||
|
|
3ee3d8799a | ||
|
|
6c8a71efa7 | ||
|
|
271b0bf033 | ||
|
|
6e053525ee | ||
|
|
fe11699d90 | ||
|
|
cf888486d1 | ||
|
|
cb49bb00d9 | ||
|
|
cbfa696fc1 | ||
|
|
f5cd71c5cf | ||
|
|
da047e8b14 | ||
|
|
6c3fc97b1a | ||
|
|
3128061382 | ||
|
|
8af3f8a9cb | ||
|
|
d38b4f21ec | ||
|
|
e8aa5fa934 | ||
|
|
ec6941f7bc | ||
|
|
499c470b63 | ||
|
|
9c8cee8c29 | ||
|
|
4e356a92dc | ||
|
|
93eaa37a3b | ||
|
|
f3a8684cd1 | ||
|
|
eb59b6e72d | ||
|
|
368cd52d38 | ||
|
|
e7f1418525 | ||
|
|
2111c5acda | ||
|
|
5a3b4fed4b | ||
|
|
5f2cbbd039 | ||
|
|
fbe5007fbc | ||
|
|
71e971fb35 | ||
|
|
6fa5ebdc10 | ||
|
|
d70a5c12fc | ||
|
|
aa769febf2 | ||
|
|
d65e768b2e | ||
|
|
1e32fe3113 | ||
|
|
250c887763 | ||
|
|
e42032ba62 | ||
|
|
17de518357 | ||
|
|
7e3acc0e0a | ||
|
|
ac85335cd8 | ||
|
|
bf04316e63 | ||
|
|
d8da49effe | ||
|
|
30ebafda2a | ||
|
|
60efb896e0 | ||
|
|
8e9cef2e6f | ||
|
|
870b4f28b4 | ||
|
|
b961f0bfce | ||
|
|
54792ba340 | ||
|
|
498d9bc92f | ||
|
|
b4922b42e7 | ||
|
|
465a9fe0cb | ||
|
|
00d82c425e | ||
|
|
b5a55e6dd7 | ||
|
|
f62dbccf5f | ||
|
|
b657631953 | ||
|
|
58ae401e50 | ||
|
|
333f3cf756 | ||
|
|
73befdb148 | ||
|
|
6709e4a0cf | ||
|
|
82923eb93a | ||
|
|
a3ef34c626 | ||
|
|
6fa14b37ee | ||
|
|
ce4ff407ff | ||
|
|
b1682fb7c8 | ||
|
|
b2db23c449 | ||
|
|
7222ec2717 | ||
|
|
8fb37b8171 | ||
|
|
b3b3b29e4c | ||
|
|
7170d9e0e5 | ||
|
|
57e206662a | ||
|
|
939e466082 | ||
|
|
7c726a4515 | ||
|
|
a61fd32137 | ||
|
|
944aa8e3c4 | ||
|
|
2a0b4ac337 | ||
|
|
cf0e58de53 | ||
|
|
b6590d67b3 | ||
|
|
22eb6c2bf3 | ||
|
|
9a2a42d8ee | ||
|
|
8c4c6d29e6 | ||
|
|
9993410e44 | ||
|
|
b3b9a213bf | ||
|
|
9bbf2b8551 | ||
|
|
45a2369b44 | ||
|
|
99f0289606 | ||
|
|
03e755bbd3 | ||
|
|
74b9f609a2 | ||
|
|
739edeb8a6 | ||
|
|
a3deac158b | ||
|
|
10dc5cfeff | ||
|
|
b3817dab86 | ||
|
|
1a4778f8f0 | ||
|
|
c23e36e800 | ||
|
|
65c5ec2f0f | ||
|
|
9cc597221e | ||
|
|
6ed4d9d110 | ||
|
|
306e1d2d77 | ||
|
|
162c9985d6 | ||
|
|
7a7da9460a | ||
|
|
ac09954b1d | ||
|
|
6a25894472 | ||
|
|
ecc583682a | ||
|
|
07afe8a50f | ||
|
|
eb32cc1e6d | ||
|
|
691cd93383 | ||
|
|
54014d9c2a | ||
|
|
06bf10d19e | ||
|
|
89b5e06df5 | ||
|
|
eea6424596 | ||
|
|
7a8c53e4bd | ||
|
|
db6d8fca59 | ||
|
|
f15ef33768 | ||
|
|
1f79c7c8c8 | ||
|
|
bec45b162b | ||
|
|
80bbd3908f | ||
|
|
665c96edaa | ||
|
|
3ebcc3206f | ||
|
|
44320a210b | ||
|
|
a8b6ea2f8d | ||
|
|
96869f4b6e | ||
|
|
f64b36fd57 | ||
|
|
89a3f970da | ||
|
|
feccdcf8c8 | ||
|
|
c69a1cd7a0 | ||
|
|
3b7015d5d8 | ||
|
|
cab2a8503e | ||
|
|
771ab19437 | ||
|
|
eb319ed8a4 | ||
|
|
3f7608348d | ||
|
|
2e429094a4 | ||
|
|
dcf9f15d6e | ||
|
|
8b5a0093ee | ||
|
|
0e94025ac7 | ||
|
|
c60d662ee4 | ||
|
|
3af282df3c | ||
|
|
dd7f03be56 | ||
|
|
cbc4b53169 | ||
|
|
ffd9d052f6 | ||
|
|
cbc9970ecb | ||
|
|
2b7a391672 | ||
|
|
2e2ea8e02c | ||
|
|
246b01bb0a | ||
|
|
c4e3c361d7 | ||
|
|
2ab5ea6c48 | ||
|
|
c641cddb80 | ||
|
|
86af36aebc | ||
|
|
11c4010c3c | ||
|
|
2517ef72ed | ||
|
|
9ab2c1071b | ||
|
|
cbcb53617b | ||
|
|
ada430bb3d | ||
|
|
406bb01ca2 | ||
|
|
a6a24c270e | ||
|
|
52a4ec6c8a | ||
|
|
8f7f49a014 | ||
|
|
cf78941db4 | ||
|
|
51eba06011 | ||
|
|
d71a6e0c25 | ||
|
|
f0abd46c3b | ||
|
|
ac4daa7716 | ||
|
|
af69295d3f | ||
|
|
6aed11293d | ||
|
|
a5005751a3 | ||
|
|
25347882ed | ||
|
|
8de75d0f57 | ||
|
|
22048207ea | ||
|
|
2b223a034b | ||
|
|
c4930d8b0d | ||
|
|
577ecd93f1 | ||
|
|
ff30c63934 | ||
|
|
45453085e7 | ||
|
|
b1fec4ff98 | ||
|
|
5976e42550 | ||
|
|
62bae204f4 | ||
|
|
8163aad6cc | ||
|
|
99f125ec07 | ||
|
|
13af139624 | ||
|
|
87fd253bd0 | ||
|
|
bf8a5feb79 | ||
|
|
535674b1b8 | ||
|
|
c9da78525b | ||
|
|
0691162a8b | ||
|
|
9cb418d221 | ||
|
|
935d1d6398 | ||
|
|
86ae5913b1 | ||
|
|
d51e6c2f6b | ||
|
|
6842c7c023 | ||
|
|
6e6b28c3ce | ||
|
|
b9c4b58ab2 | ||
|
|
62999d7708 | ||
|
|
ceb552a9c9 | ||
|
|
e59196dbdf | ||
|
|
6cb7f40a18 | ||
|
|
040435afb9 | ||
|
|
fb0c394037 | ||
|
|
e1ac40104c | ||
|
|
3f764b7253 | ||
|
|
1e2f49619e | ||
|
|
4c773cff16 | ||
|
|
a29d6b4113 | ||
|
|
b329697ded | ||
|
|
2a6b8316fc | ||
|
|
e2dd3e3e5c | ||
|
|
0f4469c52f | ||
|
|
bb383b4175 | ||
|
|
402a715f82 | ||
|
|
306add8b78 | ||
|
|
9665f5e3f9 | ||
|
|
ef263e3e83 | ||
|
|
0426cd3441 | ||
|
|
ea1eea4742 | ||
|
|
3ebcf7cf86 | ||
|
|
803b5d24a8 | ||
|
|
eca0637c81 | ||
|
|
55620c6ef2 | ||
|
|
2240974d5d | ||
|
|
7affbfc241 | ||
|
|
cd2d8e1cc7 | ||
|
|
f72f1f2e94 | ||
|
|
bbd9b71171 | ||
|
|
c0a8256a92 | ||
|
|
1d4c51a0ac | ||
|
|
72a3cc0ecd | ||
|
|
339589f3cd | ||
|
|
eb8d096ba6 | ||
|
|
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 | ||
|
|
8a74848a23 | ||
|
|
a8ab3424c7 | ||
|
|
3728aa01d8 | ||
|
|
821455542c | ||
|
|
d762c19b98 | ||
|
|
2472bc7119 | ||
|
|
a81f542726 | ||
|
|
3da10338c6 | ||
|
|
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 | ||
|
|
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 | ||
|
|
79df67debb | ||
|
|
d794360250 | ||
|
|
2b03fe2710 | ||
|
|
17882fd8cc | ||
|
|
b52f3e69cb | ||
|
|
3c8238322f | ||
|
|
7a6ed075ea | ||
|
|
dd5fcdd007 | ||
|
|
6e11d6899c | ||
|
|
4dafea685d | ||
|
|
6ffed933d7 | ||
|
|
ee44371925 | ||
|
|
fc26b6577a | ||
|
|
1909c59bad | ||
|
|
12c29c9a7f | ||
|
|
b14813947e | ||
|
|
d772f9ac45 | ||
|
|
4f7b7b339c | ||
|
|
78b227e251 | ||
|
|
b53f410228 | ||
|
|
823fbed414 | ||
|
|
ce6891f048 | ||
|
|
f9baac9585 | ||
|
|
adf5551ba9 | ||
|
|
e1efc8a0ef | ||
|
|
95e4cb2060 | ||
|
|
0e9bf6442b | ||
|
|
aa367580e8 | ||
|
|
3bf21e05e1 | ||
|
|
7d9f758e52 | ||
|
|
15c0876191 | ||
|
|
c90144950f | ||
|
|
20e158dcb7 | ||
|
|
f27f38b02d | ||
|
|
2bdc0425df | ||
|
|
4d82ddb0c9 | ||
|
|
f9c2dd2684 | ||
|
|
895fd6d0d3 | ||
|
|
34dca05227 | ||
|
|
2bdadb44a7 | ||
|
|
54918b37fc | ||
|
|
006bc58dd6 | ||
|
|
6f75a351a3 | ||
|
|
cccfdcb8ab | ||
|
|
c56cb476f6 | ||
|
|
ad2f618f0b | ||
|
|
38c9970b95 | ||
|
|
68550a7e99 | ||
|
|
d9712ed14b | ||
|
|
e26c687b21 | ||
|
|
9397469012 | ||
|
|
2d07ee519d | ||
|
|
ba55b2cdfe | ||
|
|
edc846f4fe | ||
|
|
cc0733ad78 | ||
|
|
a113506d17 | ||
|
|
a2f06448c8 | ||
|
|
7db5273ea7 | ||
|
|
9f9436ae23 | ||
|
|
b10aafb889 | ||
|
|
62eeefcb3d | ||
|
|
5430aa1863 | ||
|
|
dbbef06227 | ||
|
|
2e8ff4b084 | ||
|
|
c6501f7f5f | ||
|
|
19eeaa7908 | ||
|
|
07e982d9b4 | ||
|
|
1e67274bd7 | ||
|
|
faa868bbb6 | ||
|
|
b51ee895d8 | ||
|
|
fe739656f9 | ||
|
|
910a35725c | ||
|
|
eaa31f52b3 | ||
|
|
e2f8e694d0 | ||
|
|
596b96623f | ||
|
|
490c7f955a | ||
|
|
fff6c23a65 | ||
|
|
3d72728169 | ||
|
|
d64e23e6f8 | ||
|
|
d3131c1b3d | ||
|
|
71e06a7d81 | ||
|
|
a6b7fbd352 | ||
|
|
ecc9560822 | ||
|
|
982e2099a4 | ||
|
|
56e017d71a | ||
|
|
e500591710 | ||
|
|
2ccf4d1a70 | ||
|
|
49eaa7572d | ||
|
|
7308ffee43 | ||
|
|
922b14b8d8 | ||
|
|
8ca34d4b33 | ||
|
|
27df2a4c03 | ||
|
|
216cc641c9 | ||
|
|
3a25f7b1d7 | ||
|
|
ae8d0dc35f | ||
|
|
371b420ecf | ||
|
|
ce84fc8eed | ||
|
|
aba7ceda4f | ||
|
|
b2c4745aa3 | ||
|
|
38cb1ec2a7 | ||
|
|
cd7c3e6672 | ||
|
|
7185b719cc | ||
|
|
a5830628b9 | ||
|
|
f82b9f968b | ||
|
|
1f3635c496 | ||
|
|
7bd24b26e0 | ||
|
|
3b21982b60 | ||
|
|
d081fd728c | ||
|
|
a4a48ed06c | ||
|
|
8cda1c32ec | ||
|
|
96573d05b5 | ||
|
|
16962c1132 | ||
|
|
6f2d3c2c97 | ||
|
|
86fbf35fb6 | ||
|
|
0be9fa5735 | ||
|
|
822c8507bb | ||
|
|
c8843a0b14 | ||
|
|
418fe286c2 | ||
|
|
b7c41932ed | ||
|
|
fca3e72600 | ||
|
|
9495a94490 | ||
|
|
fef9852da3 | ||
|
|
d0ad5a9447 | ||
|
|
24211153fa | ||
|
|
d6c06349ed | ||
|
|
ee20edd645 | ||
|
|
7a2f3a4edf | ||
|
|
fc5c0c645a | ||
|
|
f610d61fcc | ||
|
|
c49694a34a | ||
|
|
17c3755f9a | ||
|
|
17745ddd86 |
14
.gitignore
vendored
Normal file
14
.gitignore
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
.DS_Store
|
||||||
|
Makefile.in
|
||||||
|
aclocal.m4
|
||||||
|
ar-lib
|
||||||
|
autom4te.cache
|
||||||
|
compile
|
||||||
|
config.guess
|
||||||
|
config.h.in
|
||||||
|
config.sub
|
||||||
|
configure
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
ltmain.sh
|
||||||
|
missing
|
||||||
131
.travis.yml
Normal file
131
.travis.yml
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
language: c
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
env: BUILD_OFFICIAL=1
|
||||||
|
sudo: required
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
- os: osx
|
||||||
|
env: BUILD_OFFICIAL=1
|
||||||
|
osx_image: xcode7.3
|
||||||
|
- os: linux
|
||||||
|
compiler: clang
|
||||||
|
env:
|
||||||
|
CFLAGS="-O1 -g -fsanitize=address -fno-omit-frame-pointer"
|
||||||
|
CONFIGURE_FLAGS="--disable-shared"
|
||||||
|
ASAN_OPTIONS="detect_leaks=1 symbolize=1"
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- nasm
|
||||||
|
- os: linux
|
||||||
|
compiler: gcc
|
||||||
|
env: CONFIGURE_FLAGS="--with-12bit"
|
||||||
|
- os: linux
|
||||||
|
compiler: gcc
|
||||||
|
env: CONFIGURE_FLAGS="--with-jpeg7"
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- nasm
|
||||||
|
- os: linux
|
||||||
|
compiler: gcc
|
||||||
|
env: CONFIGURE_FLAGS="--with-jpeg8"
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- nasm
|
||||||
|
- os: linux
|
||||||
|
compiler: gcc
|
||||||
|
env: CONFIGURE_FLAGS="--without-simd"
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||||
|
brew update &&
|
||||||
|
brew install nasm homebrew/versions/gcc5 md5sha1sum Caskroom/versions/java6 &&
|
||||||
|
ln -fs /usr/local/bin/gpg1 /usr/local/bin/gpg &&
|
||||||
|
git clone --depth=1 https://github.com/libjpeg-turbo/gas-preprocessor.git ~/src/gas-preprocessor &&
|
||||||
|
ln -fs /Applications/Xcode.app /Applications/Xcode72.app;
|
||||||
|
fi
|
||||||
|
- if [ "${BUILD_OFFICIAL:-}" != "" ]; then
|
||||||
|
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||||
|
docker pull dcommander/buildljt;
|
||||||
|
fi &&
|
||||||
|
git clone --depth=1 https://github.com/libjpeg-turbo/buildscripts.git -b $TRAVIS_BRANCH ~/src/buildscripts &&
|
||||||
|
openssl aes-256-cbc -K $encrypted_f92e8533f6f1_key -iv $encrypted_f92e8533f6f1_iv -in ci/keys.enc -out ci/keys -d &&
|
||||||
|
tar xf ci/keys &&
|
||||||
|
rm ci/keys &&
|
||||||
|
mv ci/gpgsign ~/src/buildscripts &&
|
||||||
|
gpg --import ci/sign_ljt &&
|
||||||
|
rm ci/sign_ljt;
|
||||||
|
fi
|
||||||
|
|
||||||
|
script:
|
||||||
|
- if [ "${BUILD_OFFICIAL:-}" != "" ]; then
|
||||||
|
mkdir -p ~/src/ljt.nightly &&
|
||||||
|
if [ -f .git/shallow ]; then
|
||||||
|
mv .git/shallow .git/shallow.bak;
|
||||||
|
fi &&
|
||||||
|
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||||
|
docker run -v $HOME/src/ljt.nightly:/root/src/ljt.nightly -v $HOME/src/buildscripts:/root/src/buildscripts -v $TRAVIS_BUILD_DIR:/root/src/libjpeg-turbo -v $HOME/.gnupg:/root/.gnupg -t dcommander/buildljt:latest bash -c "rpm --import http://pgp.mit.edu/pks/lookup?op=get\&search=0x0575F26BD5B3FDB1 && ~/src/buildscripts/buildljt -r file:///root/src/libjpeg-turbo $TRAVIS_BRANCH -v" &&
|
||||||
|
sudo chown -R travis:travis ~/src/ljt.nightly &&
|
||||||
|
mv ~/src/ljt.nightly/latest/log-$TRAVIS_OS_NAME.txt ~/src/ljt.nightly/latest/files/;
|
||||||
|
else
|
||||||
|
PATH=$PATH:~/src/gas-preprocessor ~/src/buildscripts/buildljt -r file://$TRAVIS_BUILD_DIR $TRAVIS_BRANCH -v &&
|
||||||
|
mv ~/src/ljt.nightly/latest/log-$TRAVIS_OS_NAME.txt ~/src/ljt.nightly/latest/files/;
|
||||||
|
fi &&
|
||||||
|
if [ -f .git/shallow.bak ]; then
|
||||||
|
mv .git/shallow.bak .git/shallow;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
- if [ "${BUILD_OFFICIAL:-}" == "" ]; then
|
||||||
|
autoreconf -fiv &&
|
||||||
|
mkdir build &&
|
||||||
|
pushd build &&
|
||||||
|
../configure ${CONFIGURE_FLAGS} &&
|
||||||
|
export NUMCPUS=`grep -c '^processor' /proc/cpuinfo` &&
|
||||||
|
make -j$NUMCPUS --load-average=$NUMCPUS &&
|
||||||
|
if [[ "${CONFIGURE_FLAGS}" =~ "with-12bit" ||
|
||||||
|
"${CONFIGURE_FLAGS}" =~ "without-simd" ]]; then
|
||||||
|
make test FLOATTEST=32bit;
|
||||||
|
else
|
||||||
|
make test FLOATTEST=sse &&
|
||||||
|
JSIMD_FORCENONE=1 make test FLOATTEST=32bit;
|
||||||
|
fi &&
|
||||||
|
popd;
|
||||||
|
fi
|
||||||
|
|
||||||
|
after_failure:
|
||||||
|
- if [ "${BUILD_OFFICIAL:-}" == "" ]; then
|
||||||
|
if [ -f $TRAVIS_BUILD_DIR/build/config.log ]; then
|
||||||
|
cat $TRAVIS_BUILD_DIR/build/config.log;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
- provider: s3
|
||||||
|
bucket: libjpeg-turbo-pr
|
||||||
|
access_key_id:
|
||||||
|
secure: bmFEt4H90/oR/LiN9XI+G26Pd6hiyrTw3+Vg3lS4ynwAYk33weApaVM8CyzQTgIhGSPzFStqVm9fTrb3RmrYP/PnNS+/surOeWLkH2DMRxvc0qmetBuNx1+vAN7FUkY8MO/u5uE9WXHAdp4e64pXcLXEbKmh+wgDm72b35WmMxErtHsGbpqy+j47rQkY4BJGi7XQzjjafaamfm4PzitsjkYYsgX8KLI16jyJEIirvyDHCPTn9wKR/jSjelDl+xTlgZGuCqmLCBW8f6JgycIspWjcYfO4WpWvkbnnI2sl3rCMPvOYc4wHe8SwzG0l4tM1PblZZDRcU7vjE15PmNf1Xfq9Vx3RpgBJv+UBNL/Vn0rKdpUCeEcfC12hxrske8DWpV6waBiDivjQJreE+YRXqa5YBhV/EdkoKYCqafnJvRASlOko9evje8F9KXTNsIGTT1HPmU9QM9WoJwLs/Xa3t09EmA2IjhcuAvvUmwCTuBBQVAlDjExiTT3Zhc9IYZDD92JgpAYLgridtzR87ElOxKhTkR4PowdI6UiLYArPjMFTjoz5Rivb9qNpbLaQC8HCYgLWxpWtUTzlW/9rM8izHpF8ySFHjO6E2aA9OJFc0tcbEGwAs2jLGD01OduU+DbBfsIkW0EgfXCPbD3FVgHsn3tkuzgO/bg20SM7uuCEYKQ=
|
||||||
|
secret_access_key:
|
||||||
|
secure: mrkOpEtqd2dEmi/qNJyX9vkME+6xgVBnXaRETKF7jT+flcQCQ0ayQkRkMV7lzGqq44XFg+n6Cpfn6oW0gH9RNdcC8YQvFP+kgzPx6nw6V/M31Vz6ySapJf59HBzVevf0NJkr0/1JoWsp1iq4IoN10WPzsCXZB55Io3Cf7DgpR+yiyBlWOctDfNdjJ97Juw3ENE80MHDf0fVqdUOIknQka1p68yAGkjar9kc2Oe7o94RzzmoqEn8tuFumiBQjIcuVRALsKqz+eIxBNgkL3BF9shVyRjOWLAeBhMPVFxZs5Dgd4ECbvU0i33gfmje3d6qqcw78N2lZaLefoVvWol3pOzVO133ewOSY9/lmpqEiRUU2ohEe8T4aSoS7posBW42itUTO4Y5w+eVOnHsm4sRQaI+/AXWTe7GPel+P8Qbe8Ya10A5gnpoag7o3raRDcHx+/qaZw1Af/u4XiAOYz3be3U90Qc+YMc/kS5i8BH0GXBbSfaWQ00CwRFlZQ3n1xUqmjC2CmjZTki3W/p7mEt0DjhcH9ZIXscK603sCC+mF6pEd9019k5fG/8fr2Y4Ptai9kd3BxZJCX9/jSoMfWOBbgkA5bRgHU0xrAj+p49qD6Ej9Xr8GE3+uebz3sEuhSFRnCKwKoOHOemfgevfO2y/jQXP677WPf3xQX7bVDfTFSHU=
|
||||||
|
acl: public_read
|
||||||
|
local-dir: $HOME/src/ljt.nightly/latest/files
|
||||||
|
upload-dir: $TRAVIS_BRANCH/$TRAVIS_OS_NAME
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
condition: -n "$BUILD_OFFICIAL"
|
||||||
|
- provider: s3
|
||||||
|
bucket: libjpeg-turbo-pr
|
||||||
|
access_key_id:
|
||||||
|
secure: bmFEt4H90/oR/LiN9XI+G26Pd6hiyrTw3+Vg3lS4ynwAYk33weApaVM8CyzQTgIhGSPzFStqVm9fTrb3RmrYP/PnNS+/surOeWLkH2DMRxvc0qmetBuNx1+vAN7FUkY8MO/u5uE9WXHAdp4e64pXcLXEbKmh+wgDm72b35WmMxErtHsGbpqy+j47rQkY4BJGi7XQzjjafaamfm4PzitsjkYYsgX8KLI16jyJEIirvyDHCPTn9wKR/jSjelDl+xTlgZGuCqmLCBW8f6JgycIspWjcYfO4WpWvkbnnI2sl3rCMPvOYc4wHe8SwzG0l4tM1PblZZDRcU7vjE15PmNf1Xfq9Vx3RpgBJv+UBNL/Vn0rKdpUCeEcfC12hxrske8DWpV6waBiDivjQJreE+YRXqa5YBhV/EdkoKYCqafnJvRASlOko9evje8F9KXTNsIGTT1HPmU9QM9WoJwLs/Xa3t09EmA2IjhcuAvvUmwCTuBBQVAlDjExiTT3Zhc9IYZDD92JgpAYLgridtzR87ElOxKhTkR4PowdI6UiLYArPjMFTjoz5Rivb9qNpbLaQC8HCYgLWxpWtUTzlW/9rM8izHpF8ySFHjO6E2aA9OJFc0tcbEGwAs2jLGD01OduU+DbBfsIkW0EgfXCPbD3FVgHsn3tkuzgO/bg20SM7uuCEYKQ=
|
||||||
|
secret_access_key:
|
||||||
|
secure: mrkOpEtqd2dEmi/qNJyX9vkME+6xgVBnXaRETKF7jT+flcQCQ0ayQkRkMV7lzGqq44XFg+n6Cpfn6oW0gH9RNdcC8YQvFP+kgzPx6nw6V/M31Vz6ySapJf59HBzVevf0NJkr0/1JoWsp1iq4IoN10WPzsCXZB55Io3Cf7DgpR+yiyBlWOctDfNdjJ97Juw3ENE80MHDf0fVqdUOIknQka1p68yAGkjar9kc2Oe7o94RzzmoqEn8tuFumiBQjIcuVRALsKqz+eIxBNgkL3BF9shVyRjOWLAeBhMPVFxZs5Dgd4ECbvU0i33gfmje3d6qqcw78N2lZaLefoVvWol3pOzVO133ewOSY9/lmpqEiRUU2ohEe8T4aSoS7posBW42itUTO4Y5w+eVOnHsm4sRQaI+/AXWTe7GPel+P8Qbe8Ya10A5gnpoag7o3raRDcHx+/qaZw1Af/u4XiAOYz3be3U90Qc+YMc/kS5i8BH0GXBbSfaWQ00CwRFlZQ3n1xUqmjC2CmjZTki3W/p7mEt0DjhcH9ZIXscK603sCC+mF6pEd9019k5fG/8fr2Y4Ptai9kd3BxZJCX9/jSoMfWOBbgkA5bRgHU0xrAj+p49qD6Ej9Xr8GE3+uebz3sEuhSFRnCKwKoOHOemfgevfO2y/jQXP677WPf3xQX7bVDfTFSHU=
|
||||||
|
acl: public_read
|
||||||
|
local-dir: $HOME/src/ljt.nightly/latest/files
|
||||||
|
upload-dir: $TRAVIS_BRANCH/$TRAVIS_OS_NAME
|
||||||
|
on:
|
||||||
|
branch: dev
|
||||||
|
condition: -n "$BUILD_OFFICIAL"
|
||||||
964
BUILDING.md
Normal file
964
BUILDING.md
Normal file
@@ -0,0 +1,964 @@
|
|||||||
|
Un*x Platforms (including Mac and Cygwin)
|
||||||
|
=========================================
|
||||||
|
|
||||||
|
|
||||||
|
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) or [Homebrew](http://brew.sh/).
|
||||||
|
|
||||||
|
- [NASM](http://www.nasm.us) or [YASM](http://yasm.tortall.net)
|
||||||
|
(if building x86 or x86-64 SIMD extensions)
|
||||||
|
* If using NASM, 0.98, or 2.01 or later is required for an x86 build (0.99
|
||||||
|
and 2.00 do not work properly with libjpeg-turbo's x86 SIMD code.)
|
||||||
|
* If using NASM, 2.00 or later is required for an x86-64 build.
|
||||||
|
* If using NASM, 2.07 or later (except 2.11.08) is required for an x86-64
|
||||||
|
Mac build (2.11.08 does not work properly with libjpeg-turbo's x86-64 SIMD
|
||||||
|
code when building macho64 objects.) NASM or YASM can be obtained from
|
||||||
|
[MacPorts](http://www.macports.org/) or [Homebrew](http://brew.sh/).
|
||||||
|
|
||||||
|
The binary RPMs released by the NASM project do not work on older Linux
|
||||||
|
systems, such as Red Hat Enterprise Linux 5. 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) or Clang recommended for best performance
|
||||||
|
|
||||||
|
- If building the TurboJPEG Java wrapper, JDK or OpenJDK 1.5 or later is
|
||||||
|
required. Most modern Linux distributions, as well as Solaris 10 and later,
|
||||||
|
include JDK or OpenJDK. On OS X 10.5 and 10.6, it will be necessary to
|
||||||
|
install the Java Developer Package, which can be downloaded from
|
||||||
|
<http://developer.apple.com/downloads> (Apple ID required.) For other
|
||||||
|
systems, 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 directory from
|
||||||
|
which `configure` is 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.
|
||||||
|
|
||||||
|
|
||||||
|
Build Procedure
|
||||||
|
---------------
|
||||||
|
|
||||||
|
The following procedure will build libjpeg-turbo on Unix and Unix-like systems.
|
||||||
|
(On Solaris, this generates a 32-bit build. See "Build Recipes" 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 not necessary if building
|
||||||
|
libjpeg-turbo from one of the official release tarballs.
|
||||||
|
|
||||||
|
This will generate the following files under **.libs/**:
|
||||||
|
|
||||||
|
**libjpeg.a**<br>
|
||||||
|
Static link library for the libjpeg API
|
||||||
|
|
||||||
|
**libjpeg.so.{version}** (Linux, Unix)<br>
|
||||||
|
**libjpeg.{version}.dylib** (Mac)<br>
|
||||||
|
**cygjpeg-{version}.dll** (Cygwin)<br>
|
||||||
|
Shared library for the libjpeg API
|
||||||
|
|
||||||
|
By default, *{version}* is 62.2.0, 7.2.0, or 8.1.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)<br>
|
||||||
|
**libjpeg.dylib** (Mac)<br>
|
||||||
|
Development symlink for the libjpeg API
|
||||||
|
|
||||||
|
**libjpeg.dll.a** (Cygwin)<br>
|
||||||
|
Import library for the libjpeg API
|
||||||
|
|
||||||
|
**libturbojpeg.a**<br>
|
||||||
|
Static link library for the TurboJPEG API
|
||||||
|
|
||||||
|
**libturbojpeg.so.0.1.0** (Linux, Unix)<br>
|
||||||
|
**libturbojpeg.0.1.0.dylib** (Mac)<br>
|
||||||
|
**cygturbojpeg-0.dll** (Cygwin)<br>
|
||||||
|
Shared library for the TurboJPEG API
|
||||||
|
|
||||||
|
**libturbojpeg.so** (Linux, Unix)<br>
|
||||||
|
**libturbojpeg.dylib** (Mac)<br>
|
||||||
|
Development symlink for the TurboJPEG API
|
||||||
|
|
||||||
|
**libturbojpeg.dll.a** (Cygwin)<br>
|
||||||
|
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.md](README.md) for more
|
||||||
|
information about 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.md](README.md) 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 (JNI) 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](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 TurboJPEG 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.
|
||||||
|
|
||||||
|
|
||||||
|
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 or Homebrew
|
||||||
|
must be installed. If using Homebrew, then replace `/opt/local` with
|
||||||
|
`/usr/local`.
|
||||||
|
|
||||||
|
|
||||||
|
### 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='-mmacosx-version-min=10.5 -O3' \
|
||||||
|
LDFLAGS='-mmacosx-version-min=10.5'
|
||||||
|
|
||||||
|
to the `configure` command line. NASM 2.07 or later from MacPorts or Homebrew
|
||||||
|
must be installed. If using Homebrew, then replace `/opt/local` with
|
||||||
|
`/usr/local`.
|
||||||
|
|
||||||
|
|
||||||
|
### 32-bit Backward-Compatible Build on OS X
|
||||||
|
|
||||||
|
Add
|
||||||
|
|
||||||
|
--host i686-apple-darwin \
|
||||||
|
CFLAGS='-mmacosx-version-min=10.5 -O3 -m32' \
|
||||||
|
LDFLAGS='-mmacosx-version-min=10.5 -m32'
|
||||||
|
|
||||||
|
to the `configure` command line.
|
||||||
|
|
||||||
|
|
||||||
|
### 64-bit 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 CFLAGS='-O3 -m32' LDFLAGS=-m32
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
Building libjpeg-turbo for iOS
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
iOS platforms, such as the iPhone and iPad, use ARM processors, and all
|
||||||
|
currently supported models include NEON instructions. Thus, they can take
|
||||||
|
advantage of libjpeg-turbo's SIMD extensions to significantly accelerate JPEG
|
||||||
|
compression/decompression. This section describes how to build libjpeg-turbo
|
||||||
|
for these platforms.
|
||||||
|
|
||||||
|
|
||||||
|
### Additional build requirements
|
||||||
|
|
||||||
|
- For configurations that require [gas-preprocessor.pl]
|
||||||
|
(https://raw.githubusercontent.com/libjpeg-turbo/gas-preprocessor/master/gas-preprocessor.pl),
|
||||||
|
it should be installed in your `PATH`.
|
||||||
|
|
||||||
|
|
||||||
|
### ARMv7 (32-bit)
|
||||||
|
|
||||||
|
**gas-preprocessor.pl required**
|
||||||
|
|
||||||
|
The following scripts demonstrate how to build libjpeg-turbo to run on the
|
||||||
|
iPhone 3GS-4S/iPad 1st-3rd Generation and newer:
|
||||||
|
|
||||||
|
#### Xcode 4.2 and earlier (LLVM-GCC)
|
||||||
|
|
||||||
|
IOS_PLATFORMDIR=/Developer/Platforms/iPhoneOS.platform
|
||||||
|
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
|
||||||
|
|
||||||
|
export host_alias=arm-apple-darwin10
|
||||||
|
export CC=${IOS_PLATFORMDIR}/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
|
||||||
|
export CFLAGS="-mfloat-abi=softfp -isysroot ${IOS_SYSROOT[0]} -O3 -march=armv7 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -miphoneos-version-min=3.0"
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
sh {source_directory}/configure [additional configure flags]
|
||||||
|
make
|
||||||
|
|
||||||
|
#### Xcode 4.3-4.6 (LLVM-GCC)
|
||||||
|
|
||||||
|
Same as above, but replace the first line with:
|
||||||
|
|
||||||
|
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||||
|
|
||||||
|
#### Xcode 5 and later (Clang)
|
||||||
|
|
||||||
|
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||||
|
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
|
||||||
|
|
||||||
|
export host_alias=arm-apple-darwin10
|
||||||
|
export CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||||
|
export CFLAGS="-mfloat-abi=softfp -isysroot ${IOS_SYSROOT[0]} -O3 -arch armv7 -miphoneos-version-min=3.0"
|
||||||
|
export CCASFLAGS="$CFLAGS -no-integrated-as"
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
sh {source_directory}/configure [additional configure flags]
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
### ARMv7s (32-bit)
|
||||||
|
|
||||||
|
**gas-preprocessor.pl required**
|
||||||
|
|
||||||
|
The following scripts demonstrate how to build libjpeg-turbo to run on the
|
||||||
|
iPhone 5/iPad 4th Generation and newer:
|
||||||
|
|
||||||
|
#### Xcode 4.5-4.6 (LLVM-GCC)
|
||||||
|
|
||||||
|
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||||
|
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
|
||||||
|
|
||||||
|
export host_alias=arm-apple-darwin10
|
||||||
|
export CC=${IOS_PLATFORMDIR}/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
|
||||||
|
export CFLAGS="-mfloat-abi=softfp -isysroot ${IOS_SYSROOT[0]} -O3 -march=armv7s -mcpu=swift -mtune=swift -mfpu=neon -miphoneos-version-min=6.0"
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
sh {source_directory}/configure [additional configure flags]
|
||||||
|
make
|
||||||
|
|
||||||
|
#### Xcode 5 and later (Clang)
|
||||||
|
|
||||||
|
Same as the ARMv7 build procedure for Xcode 5 and later, except replace the
|
||||||
|
compiler flags as follows:
|
||||||
|
|
||||||
|
export CFLAGS="-mfloat-abi=softfp -isysroot ${IOS_SYSROOT[0]} -O3 -arch armv7s -miphoneos-version-min=6.0"
|
||||||
|
|
||||||
|
|
||||||
|
### ARMv8 (64-bit)
|
||||||
|
|
||||||
|
**gas-preprocessor.pl required if using Xcode < 6**
|
||||||
|
|
||||||
|
The following script demonstrates how to build libjpeg-turbo to run on the
|
||||||
|
iPhone 5S/iPad Mini 2/iPad Air and newer.
|
||||||
|
|
||||||
|
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||||
|
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
|
||||||
|
|
||||||
|
export host_alias=aarch64-apple-darwin
|
||||||
|
export CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||||
|
export CFLAGS="-isysroot ${IOS_SYSROOT[0]} -O3 -arch arm64 -miphoneos-version-min=7.0 -funwind-tables"
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
sh {source_directory}/configure [additional configure flags]
|
||||||
|
make
|
||||||
|
|
||||||
|
Once built, lipo can be used to combine the ARMv7, v7s, and/or v8 variants into
|
||||||
|
a universal library.
|
||||||
|
|
||||||
|
|
||||||
|
Building libjpeg-turbo for Android
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
Building libjpeg-turbo for Android platforms requires the
|
||||||
|
[Android NDK](https://developer.android.com/tools/sdk/ndk) and autotools.
|
||||||
|
|
||||||
|
|
||||||
|
### ARMv7 (32-bit)
|
||||||
|
|
||||||
|
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/sdk/ndk-bundle}
|
||||||
|
BUILD_PLATFORM={the platform name for the NDK package you installed--
|
||||||
|
for example, "windows-x86" or "linux-x86_64" or "darwin-x86_64"}
|
||||||
|
TOOLCHAIN_VERSION={"4.8", "4.9", "clang3.5", etc. This corresponds to a
|
||||||
|
toolchain directory under ${NDK_PATH}/toolchains/.}
|
||||||
|
ANDROID_VERSION={The minimum version of Android to support-- for example,
|
||||||
|
"16", "19", etc.}
|
||||||
|
|
||||||
|
# It should not be necessary to modify the rest
|
||||||
|
HOST=arm-linux-androideabi
|
||||||
|
SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-arm
|
||||||
|
ANDROID_CFLAGS="-march=armv7-a -mfloat-abi=softfp -fprefetch-loop-arrays \
|
||||||
|
--sysroot=${SYSROOT}"
|
||||||
|
|
||||||
|
TOOLCHAIN=${NDK_PATH}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
|
||||||
|
export CPP=${TOOLCHAIN}/bin/${HOST}-cpp
|
||||||
|
export AR=${TOOLCHAIN}/bin/${HOST}-ar
|
||||||
|
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_CFLAGS} -O3 -fPIE" \
|
||||||
|
CPPFLAGS="${ANDROID_CFLAGS}" \
|
||||||
|
LDFLAGS="${ANDROID_CFLAGS} -pie" --with-simd ${1+"$@"}
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
### ARMv8 (64-bit)
|
||||||
|
|
||||||
|
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/sdk/ndk-bundle}
|
||||||
|
BUILD_PLATFORM={the platform name for the NDK package you installed--
|
||||||
|
for example, "windows-x86" or "linux-x86_64" or "darwin-x86_64"}
|
||||||
|
TOOLCHAIN_VERSION={"4.8", "4.9", "clang3.5", etc. This corresponds to a
|
||||||
|
toolchain directory under ${NDK_PATH}/toolchains/.}
|
||||||
|
ANDROID_VERSION={The minimum version of Android to support. "21" or later
|
||||||
|
is required for a 64-bit build.}
|
||||||
|
|
||||||
|
# It should not be necessary to modify the rest
|
||||||
|
HOST=aarch64-linux-android
|
||||||
|
SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-arm64
|
||||||
|
ANDROID_CFLAGS="--sysroot=${SYSROOT}"
|
||||||
|
|
||||||
|
TOOLCHAIN=${NDK_PATH}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
|
||||||
|
export CPP=${TOOLCHAIN}/bin/${HOST}-cpp
|
||||||
|
export AR=${TOOLCHAIN}/bin/${HOST}-ar
|
||||||
|
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_CFLAGS} -O3 -fPIE" \
|
||||||
|
CPPFLAGS="${ANDROID_CFLAGS}" \
|
||||||
|
LDFLAGS="${ANDROID_CFLAGS} -pie" --with-simd ${1+"$@"}
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
### x86 (32-bit)
|
||||||
|
|
||||||
|
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/sdk/ndk-bundle}
|
||||||
|
BUILD_PLATFORM={the platform name for the NDK package you installed--
|
||||||
|
for example, "windows-x86" or "linux-x86_64" or "darwin-x86_64"}
|
||||||
|
TOOLCHAIN_VERSION={"4.8", "4.9", "clang3.5", etc. This corresponds to a
|
||||||
|
toolchain directory under ${NDK_PATH}/toolchains/.}
|
||||||
|
ANDROID_VERSION={The minimum version of Android to support-- for example,
|
||||||
|
"16", "19", etc.}
|
||||||
|
|
||||||
|
# It should not be necessary to modify the rest
|
||||||
|
HOST=i686-linux-android
|
||||||
|
SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-x86
|
||||||
|
ANDROID_CFLAGS="--sysroot=${SYSROOT}"
|
||||||
|
|
||||||
|
TOOLCHAIN=${NDK_PATH}/toolchains/x86-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
|
||||||
|
export CPP=${TOOLCHAIN}/bin/${HOST}-cpp
|
||||||
|
export AR=${TOOLCHAIN}/bin/${HOST}-ar
|
||||||
|
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_CFLAGS} -O3 -fPIE" \
|
||||||
|
CPPFLAGS="${ANDROID_CFLAGS}" \
|
||||||
|
LDFLAGS="${ANDROID_CFLAGS} -pie" --with-simd ${1+"$@"}
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
### x86-64 (64-bit)
|
||||||
|
|
||||||
|
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/sdk/ndk-bundle}
|
||||||
|
BUILD_PLATFORM={the platform name for the NDK package you installed--
|
||||||
|
for example, "windows-x86" or "linux-x86_64" or "darwin-x86_64"}
|
||||||
|
TOOLCHAIN_VERSION={"4.8", "4.9", "clang3.5", etc. This corresponds to a
|
||||||
|
toolchain directory under ${NDK_PATH}/toolchains/.}
|
||||||
|
ANDROID_VERSION={The minimum version of Android to support. "21" or later
|
||||||
|
is required for a 64-bit build.}
|
||||||
|
|
||||||
|
# It should not be necessary to modify the rest
|
||||||
|
HOST=x86_64-linux-android
|
||||||
|
SYSROOT=${NDK_PATH}/platforms/android-${ANDROID_VERSION}/arch-x86_64
|
||||||
|
ANDROID_CFLAGS="--sysroot=${SYSROOT}"
|
||||||
|
|
||||||
|
TOOLCHAIN=${NDK_PATH}/toolchains/x86_64-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
|
||||||
|
export CPP=${TOOLCHAIN}/bin/${HOST}-cpp
|
||||||
|
export AR=${TOOLCHAIN}/bin/${HOST}-ar
|
||||||
|
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_CFLAGS} -O3 -fPIE" \
|
||||||
|
CPPFLAGS="${ANDROID_CFLAGS}" \
|
||||||
|
LDFLAGS="${ANDROID_CFLAGS} -pie" --with-simd ${1+"$@"}
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
If building for Android 4.0.x (API level < 16) or earlier, remove `-fPIE` from
|
||||||
|
`CFLAGS` and `-pie` from `LDFLAGS`.
|
||||||
|
|
||||||
|
|
||||||
|
Installing libjpeg-turbo
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
To install libjpeg-turbo after it is built, replace `make` in the build
|
||||||
|
instructions with `make install`.
|
||||||
|
|
||||||
|
The `--prefix` argument to configure (or the `prefix` configure variable) can
|
||||||
|
be used to specify an installation directory of your choosing. If you don't
|
||||||
|
specify an installation directory, then the default is to install libjpeg-turbo
|
||||||
|
under **/opt/libjpeg-turbo** and to place the libraries in
|
||||||
|
**/opt/libjpeg-turbo/lib32** (32-bit) or **/opt/libjpeg-turbo/lib64** (64-bit.)
|
||||||
|
|
||||||
|
The `bindir`, `datadir`, `docdir`, `includedir`, `libdir`, and `mandir`
|
||||||
|
configure variables allow a finer degree of control over where specific files in
|
||||||
|
the libjpeg-turbo distribution should be installed. These variables can either
|
||||||
|
be specified at configure time or passed as arguments to `make install`.
|
||||||
|
|
||||||
|
|
||||||
|
Windows (Visual C++ or MinGW)
|
||||||
|
=============================
|
||||||
|
|
||||||
|
|
||||||
|
Build Requirements
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- [CMake](http://www.cmake.org) v2.8.11 or later
|
||||||
|
|
||||||
|
- [NASM](http://www.nasm.us) or [YASM](http://yasm.tortall.net)
|
||||||
|
* If using NASM, 0.98 or later is required for an x86 build.
|
||||||
|
* If using NASM, 2.05 or later is required for an x86-64 build.
|
||||||
|
* **nasm.exe**/**yasm.exe** should be in your `PATH`.
|
||||||
|
|
||||||
|
- 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/Community 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
|
||||||
|
|
||||||
|
[MSYS2](http://msys2.github.io/) 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.
|
||||||
|
|
||||||
|
- 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 directory from
|
||||||
|
which CMake is 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.
|
||||||
|
|
||||||
|
|
||||||
|
Build Procedure
|
||||||
|
---------------
|
||||||
|
|
||||||
|
NOTE: The build procedures below assume that CMake is invoked from the command
|
||||||
|
line, but all of these procedures can be adapted to the CMake GUI as
|
||||||
|
well.
|
||||||
|
|
||||||
|
|
||||||
|
### Visual C++ (Command Line)
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release [additional CMake flags] {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**<br>
|
||||||
|
Static link library for the libjpeg API
|
||||||
|
|
||||||
|
**sharedlib/jpeg{version}.dll**<br>
|
||||||
|
DLL for the libjpeg API
|
||||||
|
|
||||||
|
**sharedlib/jpeg.lib**<br>
|
||||||
|
Import library for the libjpeg API
|
||||||
|
|
||||||
|
**turbojpeg-static.lib**<br>
|
||||||
|
Static link library for the TurboJPEG API
|
||||||
|
|
||||||
|
**turbojpeg.dll**<br>
|
||||||
|
DLL for the TurboJPEG API
|
||||||
|
|
||||||
|
**turbojpeg.lib**<br>
|
||||||
|
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" [additional CMake flags] {source_directory}
|
||||||
|
|
||||||
|
NOTE: Add "Win64" to the generator name (for example, "Visual Studio 10
|
||||||
|
Win64") to build a 64-bit version of libjpeg-turbo. 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**<br>
|
||||||
|
Static link library for the libjpeg API
|
||||||
|
|
||||||
|
**sharedlib/{configuration}/jpeg{version}.dll**<br>
|
||||||
|
DLL for the libjpeg API
|
||||||
|
|
||||||
|
**sharedlib/{configuration}/jpeg.lib**<br>
|
||||||
|
Import library for the libjpeg API
|
||||||
|
|
||||||
|
**{configuration}/turbojpeg-static.lib**<br>
|
||||||
|
Static link library for the TurboJPEG API
|
||||||
|
|
||||||
|
**{configuration}/turbojpeg.dll**<br>
|
||||||
|
DLL for the TurboJPEG API
|
||||||
|
|
||||||
|
**{configuration}/turbojpeg.lib**<br>
|
||||||
|
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 using the MSYS
|
||||||
|
environment. If you are cross-compiling on a Un*x platform (including Mac and
|
||||||
|
Cygwin), then see "Build Recipes" below.
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
cmake -G"MSYS Makefiles" [additional CMake flags] {source_directory}
|
||||||
|
make
|
||||||
|
|
||||||
|
This will generate the following files under *{build_directory}*:
|
||||||
|
|
||||||
|
**libjpeg.a**<br>
|
||||||
|
Static link library for the libjpeg API
|
||||||
|
|
||||||
|
**sharedlib/libjpeg-{version}.dll**<br>
|
||||||
|
DLL for the libjpeg API
|
||||||
|
|
||||||
|
**sharedlib/libjpeg.dll.a**<br>
|
||||||
|
Import library for the libjpeg API
|
||||||
|
|
||||||
|
**libturbojpeg.a**<br>
|
||||||
|
Static link library for the TurboJPEG API
|
||||||
|
|
||||||
|
**libturbojpeg.dll**<br>
|
||||||
|
DLL for the TurboJPEG API
|
||||||
|
|
||||||
|
**libturbojpeg.dll.a**<br>
|
||||||
|
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 line to build a version of libjpeg-turbo that is
|
||||||
|
API/ABI-compatible with libjpeg v8. See [README.md](README.md) for more
|
||||||
|
information about 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.md](README.md) 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 (JNI) 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](java/README) for
|
||||||
|
more details.
|
||||||
|
|
||||||
|
If Java is not in your `PATH`, or if you wish to use an alternate JDK to
|
||||||
|
build/test libjpeg-turbo, then (prior to running CMake) set the `JAVA_HOME`
|
||||||
|
environment variable to the location of the JDK that you wish to use. The
|
||||||
|
`Java_JAVAC_EXECUTABLE`, `Java_JAVA_EXECUTABLE`, and `Java_JAR_EXECUTABLE`
|
||||||
|
CMake variables can also be used to specify alternate commands or locations for
|
||||||
|
javac, jar, and java (respectively.) You can also set the `JAVACFLAGS` CMake
|
||||||
|
variable to specify arguments that should be passed to the Java compiler when
|
||||||
|
building the TurboJPEG classes.
|
||||||
|
|
||||||
|
|
||||||
|
Build Recipes
|
||||||
|
-------------
|
||||||
|
|
||||||
|
|
||||||
|
### 32-bit MinGW Build on Un*x (including Mac and Cygwin)
|
||||||
|
|
||||||
|
Create a file called **toolchain.cmake** under *{build_directory}*, with the
|
||||||
|
following contents:
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR X86)
|
||||||
|
set(CMAKE_C_COMPILER {mingw_binary_path}/i686-w64-mingw32-gcc)
|
||||||
|
set(CMAKE_RC_COMPILER {mingw_binary_path}/i686-w64-mingw32-windres)
|
||||||
|
|
||||||
|
*{mingw\_binary\_path}* is the directory under which the MinGW binaries are
|
||||||
|
located (usually **/usr/bin**.) Next, execute the following commands:
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
|
||||||
|
[additional CMake flags] {source_directory}
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
### 64-bit MinGW Build on Un*x (including Mac and Cygwin)
|
||||||
|
|
||||||
|
Create a file called **toolchain.cmake** under *{build_directory}*, with the
|
||||||
|
following contents:
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR AMD64)
|
||||||
|
set(CMAKE_C_COMPILER {mingw_binary_path}/x86_64-w64-mingw32-gcc)
|
||||||
|
set(CMAKE_RC_COMPILER {mingw_binary_path}/x86_64-w64-mingw32-windres)
|
||||||
|
|
||||||
|
*{mingw\_binary\_path}* is the directory under which the MinGW binaries are
|
||||||
|
located (usually **/usr/bin**.) Next, execute the following commands:
|
||||||
|
|
||||||
|
cd {build_directory}
|
||||||
|
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
|
||||||
|
[additional CMake flags] {source_directory}
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
Installing libjpeg-turbo
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
You can use the build system to install libjpeg-turbo (as opposed to creating
|
||||||
|
an installer package.) To do this, run `make install` or `nmake install`
|
||||||
|
(or build the "install" target in the Visual Studio IDE.) Running
|
||||||
|
`make uninstall` or `nmake uninstall` (or building the "uninstall" target in
|
||||||
|
the Visual Studio IDE) will uninstall libjpeg-turbo.
|
||||||
|
|
||||||
|
The `CMAKE_INSTALL_PREFIX` CMake variable can be modified in order to install
|
||||||
|
libjpeg-turbo into a directory of your choosing. If you don't specify
|
||||||
|
`CMAKE_INSTALL_PREFIX`, then the default is:
|
||||||
|
|
||||||
|
**c:\libjpeg-turbo**<br>
|
||||||
|
Visual Studio 32-bit build
|
||||||
|
|
||||||
|
**c:\libjpeg-turbo64**<br>
|
||||||
|
Visual Studio 64-bit build
|
||||||
|
|
||||||
|
**c:\libjpeg-turbo-gcc**<br>
|
||||||
|
MinGW 32-bit build
|
||||||
|
|
||||||
|
**c:\libjpeg-turbo-gcc64**<br>
|
||||||
|
MinGW 64-bit build
|
||||||
|
|
||||||
|
|
||||||
|
Creating Distribution Packages
|
||||||
|
==============================
|
||||||
|
|
||||||
|
The following commands can be used to create various types of distribution
|
||||||
|
packages:
|
||||||
|
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
Mac
|
||||||
|
---
|
||||||
|
|
||||||
|
make dmg
|
||||||
|
|
||||||
|
Create Mac 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 Mac package/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}] \
|
||||||
|
[BUILDDIRARMV7={ARMv7 build directory}] \
|
||||||
|
[BUILDDIRARMV7S={ARMv7s build directory}] \
|
||||||
|
[BUILDDIRARMV8={ARMv8 build directory}]
|
||||||
|
|
||||||
|
This creates a Mac package/disk image in which the libjpeg-turbo 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 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 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`, `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" target.
|
||||||
|
|
||||||
|
The installer package (libjpeg-turbo-*{version}*[-gcc|-vc][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` (Un*x) or
|
||||||
|
`nmake test` (Windows command line) or by building the "RUN_TESTS" target
|
||||||
|
(Visual Studio IDE), 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` (Un*x) or `nmake testclean` (Windows command line) or
|
||||||
|
building the "testclean" target (Visual Studio IDE) will clean up the output
|
||||||
|
images generated by the tests.
|
||||||
|
|
||||||
|
On Un*x 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 (including 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.
|
||||||
807
BUILDING.txt
807
BUILDING.txt
@@ -1,807 +0,0 @@
|
|||||||
*******************************************************************************
|
|
||||||
** 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 OS X 10.4, 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.0.0 (Linux, Unix)
|
|
||||||
libturbojpeg.0.0.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.4u.sdk \
|
|
||||||
-mmacosx-version-min=10.4 -O3' \
|
|
||||||
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
|
||||||
-mmacosx-version-min=10.4'
|
|
||||||
|
|
||||||
to the configure command line. The OS X 10.4 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.4u.sdk \
|
|
||||||
-mmacosx-version-min=10.4 -O3 -m32' \
|
|
||||||
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
|
||||||
-mmacosx-version-min=10.4 -m32'
|
|
||||||
|
|
||||||
to the configure command line. The OS X 10.4 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.
|
|
||||||
|
|
||||||
|
|
||||||
Building libjpeg-turbo for iOS
|
|
||||||
------------------------------
|
|
||||||
|
|
||||||
iOS platforms, such as the iPhone and iPad, also use ARM processors, some of
|
|
||||||
which support NEON instructions. Additional steps are required to build
|
|
||||||
libjpeg-turbo for these platforms. The steps below assume iOS SDK v4.3. If
|
|
||||||
you are using a different SDK version, then you will need to modify the
|
|
||||||
examples accordingly.
|
|
||||||
|
|
||||||
Additional build requirements:
|
|
||||||
|
|
||||||
gas-preprocessor.pl
|
|
||||||
(https://sourceforge.net/p/libjpeg-turbo/code/HEAD/tree/gas-preprocessor)
|
|
||||||
should be installed in your PATH.
|
|
||||||
|
|
||||||
Set the following shell variables for simplicity:
|
|
||||||
|
|
||||||
Xcode 3.2.x / iOS 4.3 SDK:
|
|
||||||
IOS_PLATFORMDIR=/Developer/Platforms/iPhoneOS.platform
|
|
||||||
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS4.3.sdk
|
|
||||||
IOS_GCC=$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
|
|
||||||
|
|
||||||
Xcode 4.5.x / iOS 6.0 SDK:
|
|
||||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
|
||||||
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS6.0.sdk
|
|
||||||
IOS_GCC=$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
|
|
||||||
|
|
||||||
Xcode 4.6.x / iOS 6.1 SDK:
|
|
||||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
|
||||||
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS6.1.sdk
|
|
||||||
IOS_GCC=$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
|
|
||||||
|
|
||||||
Xcode 5.0.x / iOS 7.0 SDK:
|
|
||||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
|
||||||
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS7.0.sdk
|
|
||||||
IOS_GCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
|
||||||
|
|
||||||
ARM v6 only (up to and including iPhone 3G):
|
|
||||||
[NOTE: Requires Xcode 4.4.x or earlier]
|
|
||||||
IOS_CFLAGS="-march=armv6 -mcpu=arm1176jzf-s -mfpu=vfp"
|
|
||||||
|
|
||||||
ARM v7 only (iPhone 3GS-4S, iPad 1st-3rd Generation):
|
|
||||||
GCC:
|
|
||||||
IOS_CFLAGS="-march=armv7 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon"
|
|
||||||
Clang:
|
|
||||||
IOS_CFLAGS="-arch armv7 -no-integrated-as"
|
|
||||||
|
|
||||||
ARM v7s only (iPhone 5, iPad 4th Generation):
|
|
||||||
[NOTE: Requires Xcode 4.5 or later]
|
|
||||||
GCC
|
|
||||||
IOS_CFLAGS="-march=armv7s -mcpu=swift -mtune=swift -mfpu=neon"
|
|
||||||
Clang:
|
|
||||||
IOS_CFLAGS="-arch armv7s -no-integrated-as"
|
|
||||||
|
|
||||||
Follow the procedure under "Building libjpeg-turbo" above, adding
|
|
||||||
|
|
||||||
--host arm-apple-darwin10 --enable-static --disable-shared \
|
|
||||||
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.
|
|
||||||
|
|
||||||
Once built, lipo can be used to combine the ARM v6, v7, and/or v7s 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 ARM v7 or v7s iOS binaries using the techniques
|
|
||||||
described above. Otherwise, you may get a libtool error such as "unable to
|
|
||||||
infer tagged configuration."
|
|
||||||
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
** Building on Windows (Visual C++ or MinGW)
|
|
||||||
*******************************************************************************
|
|
||||||
|
|
||||||
|
|
||||||
==================
|
|
||||||
Build Requirements
|
|
||||||
==================
|
|
||||||
|
|
||||||
-- CMake (http://www.cmake.org) v2.6 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.
|
|
||||||
|
|
||||||
* For 32-bit builds, you can also use Microsoft Visual C++ Express
|
|
||||||
Edition. Visual C++ Express Edition is a free download.
|
|
||||||
* 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
|
|
||||||
|
|
||||||
GCC v4.1 or later recommended for best performance
|
|
||||||
|
|
||||||
-- 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 9 2008" {source_directory}
|
|
||||||
|
|
||||||
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
|
|
||||||
-----
|
|
||||||
|
|
||||||
cd {build_directory}
|
|
||||||
cmake -G "MSYS Makefiles" {source_directory}
|
|
||||||
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_AR=/usr/bin/x86_64-w64-mingw32-ar \
|
|
||||||
-DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {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 \
|
|
||||||
-DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
|
|
||||||
-DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {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-w64 Build on Windows
|
|
||||||
--------------------------
|
|
||||||
|
|
||||||
This produces a 64-bit build of libjpeg-turbo using the "native" MinGW-w64
|
|
||||||
toolchain (which is faster than the Cygwin version):
|
|
||||||
|
|
||||||
cd {build_directory}
|
|
||||||
CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
|
|
||||||
cmake -G "MSYS Makefiles" \
|
|
||||||
-DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
|
|
||||||
-DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
|
|
||||||
{source_directory}
|
|
||||||
make
|
|
||||||
|
|
||||||
|
|
||||||
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 the PackageMaker
|
|
||||||
application, which must be installed in /Developer/Applications/Utilities.
|
|
||||||
Note that PackageMaker is not included in recent releases of Xcode, but it
|
|
||||||
can be obtained by downloading the "Auxiliary Tools for Xcode" package from
|
|
||||||
http://developer.apple.com/downloads.
|
|
||||||
|
|
||||||
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={ARM v6 build directory}] \
|
|
||||||
[BUILDDIRARMV7={ARM v7 build directory}] \
|
|
||||||
[BUILDDIRARMV7S={ARM v7s 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 ARM v6, ARM v7, and/or ARM v7s 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 ARM v6 build under {source_directory}/iosarmv6
|
|
||||||
by default, the ARM v7 build under {source_directory}/iosarmv7 by default,
|
|
||||||
the ARM v7s build under {source_directory}/iosarmv7s 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, and/or BUILDDIRARMV7S variables on the make command line as
|
|
||||||
shown above.
|
|
||||||
|
|
||||||
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.
|
|
||||||
835
CMakeLists.txt
835
CMakeLists.txt
@@ -2,29 +2,39 @@
|
|||||||
# Setup
|
# Setup
|
||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8.8)
|
cmake_minimum_required(VERSION 2.8.11)
|
||||||
|
# Use LINK_INTERFACE_LIBRARIES instead of INTERFACE_LINK_LIBRARIES
|
||||||
|
if(POLICY CMP0022)
|
||||||
cmake_policy(SET CMP0022 OLD)
|
cmake_policy(SET CMP0022 OLD)
|
||||||
|
endif()
|
||||||
|
|
||||||
project(libjpeg-turbo C)
|
project(libjpeg-turbo C)
|
||||||
set(VERSION 1.3.1)
|
set(VERSION 1.5.3)
|
||||||
|
string(REPLACE "." ";" VERSION_TRIPLET ${VERSION})
|
||||||
if(MINGW OR CYGWIN)
|
list(GET VERSION_TRIPLET 0 VERSION_MAJOR)
|
||||||
execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD)
|
list(GET VERSION_TRIPLET 1 VERSION_MINOR)
|
||||||
string(REGEX REPLACE "\n" "" BUILD ${BUILD})
|
list(GET VERSION_TRIPLET 2 VERSION_REVISION)
|
||||||
elseif(WIN32)
|
function(pad_number NUMBER OUTPUT_LEN)
|
||||||
execute_process(COMMAND "wmic.exe" "os" "get" "LocalDateTime" OUTPUT_VARIABLE
|
string(LENGTH "${${NUMBER}}" INPUT_LEN)
|
||||||
BUILD)
|
if(INPUT_LEN LESS OUTPUT_LEN)
|
||||||
string(REGEX REPLACE "[^0-9]" "" BUILD "${BUILD}")
|
math(EXPR ZEROES "${OUTPUT_LEN} - ${INPUT_LEN} - 1")
|
||||||
if (BUILD STREQUAL "")
|
set(NUM ${${NUMBER}})
|
||||||
execute_process(COMMAND "cmd.exe" "/C" "DATE" "/T" OUTPUT_VARIABLE BUILD)
|
foreach(C RANGE ${ZEROES})
|
||||||
string(REGEX REPLACE ".*[ ]([0-9]*)[/.]([0-9]*)[/.]([0-9]*).*" "\\3\\2\\1" BUILD "${BUILD}")
|
set(NUM "0${NUM}")
|
||||||
else()
|
endforeach()
|
||||||
string(SUBSTRING "${BUILD}" 0 8 BUILD)
|
set(${NUMBER} ${NUM} PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
else()
|
endfunction()
|
||||||
|
pad_number(VERSION_MINOR 3)
|
||||||
|
pad_number(VERSION_REVISION 3)
|
||||||
|
set(LIBJPEG_TURBO_VERSION_NUMBER ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_REVISION})
|
||||||
|
|
||||||
|
if(NOT WIN32)
|
||||||
message(FATAL_ERROR "Platform not supported by this build system. Use autotools instead.")
|
message(FATAL_ERROR "Platform not supported by this build system. Use autotools instead.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
string(TIMESTAMP BUILD "%Y%m%d")
|
||||||
|
|
||||||
# This does nothing except when using MinGW. CMAKE_BUILD_TYPE has no meaning
|
# 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.
|
# in Visual Studio, and it always defaults to Debug when using NMake.
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
@@ -42,12 +52,36 @@ endif()
|
|||||||
message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
|
message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
|
||||||
|
|
||||||
option(WITH_SIMD "Include SIMD extensions" TRUE)
|
option(WITH_SIMD "Include SIMD extensions" TRUE)
|
||||||
option(WITH_ARITH_ENC "Include arithmetic encoding support" TRUE)
|
option(WITH_ARITH_ENC "Include arithmetic encoding support when emulating the libjpeg v6b API/ABI" TRUE)
|
||||||
option(WITH_ARITH_DEC "Include arithmetic decoding support" TRUE)
|
option(WITH_ARITH_DEC "Include arithmetic decoding support when emulating the libjpeg v6b API/ABI" TRUE)
|
||||||
option(WITH_JPEG7 "Emulate libjpeg v7 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b)" FALSE)
|
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_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_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_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_JAVA 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_JPEG8 OR WITH_JPEG7)
|
||||||
|
set(WITH_ARITH_ENC 1)
|
||||||
|
set(WITH_ARITH_DEC 1)
|
||||||
|
endif()
|
||||||
|
if(WITH_JPEG8)
|
||||||
|
set(WITH_MEM_SRCDST 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_ARITH_ENC)
|
if(WITH_ARITH_ENC)
|
||||||
set(C_ARITH_CODING_SUPPORTED 1)
|
set(C_ARITH_CODING_SUPPORTED 1)
|
||||||
@@ -63,6 +97,12 @@ else()
|
|||||||
message(STATUS "Arithmetic decoding support disabled")
|
message(STATUS "Arithmetic decoding support disabled")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WITH_TURBOJPEG)
|
||||||
|
message(STATUS "TurboJPEG C wrapper enabled")
|
||||||
|
else()
|
||||||
|
message(STATUS "TurboJPEG C wrapper disabled")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_JAVA)
|
if(WITH_JAVA)
|
||||||
message(STATUS "TurboJPEG Java wrapper enabled")
|
message(STATUS "TurboJPEG Java wrapper enabled")
|
||||||
else()
|
else()
|
||||||
@@ -97,6 +137,10 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
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
|
# Use the static C library for all build types
|
||||||
foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||||
@@ -104,7 +148,7 @@ if(MSVC)
|
|||||||
string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}")
|
string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
endif()
|
||||||
add_definitions(-W3 -wd4996)
|
add_definitions(-W3 -wd4996)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -140,10 +184,18 @@ endif()
|
|||||||
message(STATUS "Install directory = ${CMAKE_INSTALL_PREFIX}")
|
message(STATUS "Install directory = ${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
configure_file(win/jconfig.h.in jconfig.h)
|
configure_file(win/jconfig.h.in jconfig.h)
|
||||||
configure_file(win/config.h.in config.h)
|
configure_file(win/jconfigint.h.in jconfigint.h)
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
||||||
|
|
||||||
|
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC)
|
||||||
|
|
||||||
|
set(EFFECTIVE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
|
||||||
|
message(STATUS "Compiler flags = ${EFFECTIVE_C_FLAGS}")
|
||||||
|
|
||||||
|
set(EFFECTIVE_LD_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
|
||||||
|
message(STATUS "Linker flags = ${EFFECTIVE_LD_FLAGS}")
|
||||||
|
|
||||||
if(WITH_JAVA)
|
if(WITH_JAVA)
|
||||||
find_package(Java)
|
find_package(Java)
|
||||||
find_package(JNI)
|
find_package(JNI)
|
||||||
@@ -194,10 +246,14 @@ endif()
|
|||||||
|
|
||||||
if(WITH_JAVA)
|
if(WITH_JAVA)
|
||||||
add_subdirectory(java)
|
add_subdirectory(java)
|
||||||
|
set(ENABLE_SHARED TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_SHARED)
|
||||||
add_subdirectory(sharedlib)
|
add_subdirectory(sharedlib)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_STATIC OR WITH_TURBOJPEG)
|
||||||
add_library(jpeg-static STATIC ${JPEG_SOURCES} ${SIMD_OBJS})
|
add_library(jpeg-static STATIC ${JPEG_SOURCES} ${SIMD_OBJS})
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
set_target_properties(jpeg-static PROPERTIES OUTPUT_NAME jpeg)
|
set_target_properties(jpeg-static PROPERTIES OUTPUT_NAME jpeg)
|
||||||
@@ -205,13 +261,16 @@ endif()
|
|||||||
if(WITH_SIMD)
|
if(WITH_SIMD)
|
||||||
add_dependencies(jpeg-static simd)
|
add_dependencies(jpeg-static simd)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_TURBOJPEG)
|
||||||
set(TURBOJPEG_SOURCES turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c)
|
set(TURBOJPEG_SOURCES turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c)
|
||||||
if(WITH_JAVA)
|
if(WITH_JAVA)
|
||||||
set(TURBOJPEG_SOURCES ${TURBOJPEG_SOURCES} turbojpeg-jni.c)
|
set(TURBOJPEG_SOURCES ${TURBOJPEG_SOURCES} turbojpeg-jni.c)
|
||||||
include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
|
include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_SHARED)
|
||||||
add_library(turbojpeg SHARED ${TURBOJPEG_SOURCES})
|
add_library(turbojpeg SHARED ${TURBOJPEG_SOURCES})
|
||||||
set_target_properties(turbojpeg PROPERTIES DEFINE_SYMBOL DLLDEFINE)
|
set_target_properties(turbojpeg PROPERTIES DEFINE_SYMBOL DLLDEFINE)
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
@@ -220,6 +279,17 @@ endif()
|
|||||||
target_link_libraries(turbojpeg jpeg-static)
|
target_link_libraries(turbojpeg jpeg-static)
|
||||||
set_target_properties(turbojpeg PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
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}
|
add_library(turbojpeg-static STATIC ${JPEG_SOURCES} ${SIMD_OBJS}
|
||||||
turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c)
|
turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c)
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
@@ -229,49 +299,52 @@ if(WITH_SIMD)
|
|||||||
add_dependencies(turbojpeg-static simd)
|
add_dependencies(turbojpeg-static simd)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(tjunittest tjunittest.c tjutil.c)
|
|
||||||
target_link_libraries(tjunittest turbojpeg)
|
|
||||||
|
|
||||||
add_executable(tjunittest-static tjunittest.c tjutil.c)
|
add_executable(tjunittest-static tjunittest.c tjutil.c)
|
||||||
target_link_libraries(tjunittest-static turbojpeg-static)
|
target_link_libraries(tjunittest-static turbojpeg-static)
|
||||||
|
|
||||||
add_executable(tjbench tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c wrbmp.c
|
add_executable(tjbench-static tjbench.c bmp.c tjutil.c rdbmp.c rdppm.c
|
||||||
wrppm.c)
|
wrbmp.c wrppm.c)
|
||||||
target_link_libraries(tjbench turbojpeg jpeg-static)
|
|
||||||
set_property(TARGET tjbench PROPERTY COMPILE_FLAGS
|
|
||||||
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
|
||||||
|
|
||||||
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)
|
target_link_libraries(tjbench-static turbojpeg-static jpeg-static)
|
||||||
set_property(TARGET tjbench-static PROPERTY COMPILE_FLAGS
|
set_property(TARGET tjbench-static PROPERTY COMPILE_FLAGS
|
||||||
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(cjpeg-static cjpeg.c cdjpeg.c rdbmp.c rdgif.c rdppm.c rdswitch.c
|
if(WITH_12BIT)
|
||||||
rdtarga.c)
|
set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED -DUSE_SETMODE")
|
||||||
set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS
|
else()
|
||||||
"-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE")
|
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)
|
target_link_libraries(cjpeg-static jpeg-static)
|
||||||
|
|
||||||
add_executable(djpeg-static djpeg.c cdjpeg.c rdcolmap.c rdswitch.c wrbmp.c wrgif.c
|
add_executable(djpeg-static djpeg.c cdjpeg.c rdcolmap.c rdswitch.c wrgif.c
|
||||||
wrppm.c wrtarga.c)
|
wrppm.c ${DJPEG_BMP_SOURCES})
|
||||||
set_property(TARGET djpeg-static PROPERTY COMPILE_FLAGS
|
set_property(TARGET djpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
|
||||||
"-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE")
|
|
||||||
target_link_libraries(djpeg-static jpeg-static)
|
target_link_libraries(djpeg-static jpeg-static)
|
||||||
|
|
||||||
add_executable(jpegtran-static jpegtran.c cdjpeg.c rdswitch.c transupp.c)
|
add_executable(jpegtran-static jpegtran.c cdjpeg.c rdswitch.c transupp.c)
|
||||||
target_link_libraries(jpegtran-static jpeg-static)
|
target_link_libraries(jpegtran-static jpeg-static)
|
||||||
set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "-DUSE_SETMODE")
|
set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "-DUSE_SETMODE")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(rdjpgcom rdjpgcom.c)
|
add_executable(rdjpgcom rdjpgcom.c)
|
||||||
|
|
||||||
add_executable(wrjpgcom rdjpgcom.c)
|
add_executable(wrjpgcom wrjpgcom.c)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tests
|
# Tests
|
||||||
#
|
#
|
||||||
|
|
||||||
|
add_subdirectory(md5)
|
||||||
|
|
||||||
if(MSVC_IDE)
|
if(MSVC_IDE)
|
||||||
set(OBJDIR "\${CTEST_CONFIGURATION_TYPE}/")
|
set(OBJDIR "\${CTEST_CONFIGURATION_TYPE}/")
|
||||||
else()
|
else()
|
||||||
@@ -280,158 +353,518 @@ endif()
|
|||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
set(MD5_JPEG_INT 9a68f56bc76e466aa7e52f415d0f4a5f)
|
if(WITH_12BIT)
|
||||||
set(MD5_JPEG_FAST 0e1502e7fa421835e376a314fac2a39f)
|
set(TESTORIG testorig12.jpg)
|
||||||
set(MD5_JPEG_FAST_100 7bf72a8e741d64eecb960c97323af77c)
|
set(MD5_JPEG_RGB_ISLOW 9620f424569594bb9242b48498ad801f)
|
||||||
set(MD5_JPEG_FLOAT d1623885ffafcd40c684af09e3d65cd5)
|
set(MD5_PPM_RGB_ISLOW f3301d2219783b8b3d942b7239fa50c0)
|
||||||
set(MD5_JPEG_FLOAT_NOSIMD fb4884c35f8273f498cb32879de5c455)
|
set(MD5_JPEG_422_IFAST_OPT 7322e3bd2f127f7de4b40d4480ce60e4)
|
||||||
set(MD5_JPEG_INT_GRAY 72b51f894b8f4a10b3ee3066770aa38d)
|
set(MD5_PPM_422_IFAST 79807fa552899e66a04708f533e16950)
|
||||||
set(MD5_PPM_INT d1ed0d11f076b842525271647716aeb8)
|
set(MD5_PPM_422M_IFAST 07737bfe8a7c1c87aaa393a0098d16b0)
|
||||||
set(MD5_PPM_FAST 048298a2d2410261c0533cb97bcfef23)
|
set(MD5_JPEG_420_IFAST_Q100_PROG a1da220b5604081863a504297ed59e55)
|
||||||
set(MD5_PPM_FLOAT 7f5b446ee36b2630e06785b8d42af15f)
|
set(MD5_PPM_420_Q100_IFAST 1b3730122709f53d007255e8dfd3305e)
|
||||||
set(MD5_PPM_FLOAT_NOSIMD 64072f1dbdc5b3a187777788604971a5)
|
set(MD5_PPM_420M_Q100_IFAST 980a1a3c5bf9510022869d30b7d26566)
|
||||||
set(MD5_PPM_INT_2_1 9f9de8c0612f8d06869b960b05abf9c9)
|
set(MD5_JPEG_GRAY_ISLOW 235c90707b16e2e069f37c888b2636d9)
|
||||||
set(MD5_PPM_INT_15_8 b6875bc070720b899566cc06459b63b7)
|
set(MD5_PPM_GRAY_ISLOW 7213c10af507ad467da5578ca5ee1fca)
|
||||||
set(MD5_PPM_INT_7_4 06a177eae05f164fac57f7a2c346ee87)
|
set(MD5_PPM_GRAY_ISLOW_RGB e96ee81c30a6ed422d466338bd3de65d)
|
||||||
set(MD5_PPM_INT_13_8 bc3452573c8152f6ae552939ee19f82f)
|
set(MD5_JPEG_420S_IFAST_OPT 7af8e60be4d9c227ec63ac9b6630855e)
|
||||||
set(MD5_PPM_INT_3_2 f5a8b88a8a7f96016f04d259cf82ed67)
|
if(64BIT)
|
||||||
set(MD5_PPM_INT_11_8 d8cc73c0aaacd4556569b59437ba00a5)
|
# Windows/x64 uses SSE for floating point
|
||||||
set(MD5_PPM_INT_5_4 32775dd9ad2ab90f4c5b219b53e0c86c)
|
set(MD5_JPEG_3x2_FLOAT_PROG a8c17daf77b457725ec929e215b603f8)
|
||||||
set(MD5_PPM_INT_9_8 d25e61bc7eac0002f5b393aa223747b6)
|
set(MD5_PPM_3x2_FLOAT 42876ab9e5c2f76a87d08db5fbd57956)
|
||||||
set(MD5_PPM_INT_7_8 ddb564b7c74a09494016d6cd7502a946)
|
else()
|
||||||
set(MD5_PPM_INT_3_4 8ed8e68808c3fbc4ea764fc9d2968646)
|
# Windows/x86 uses the 387 FPU for floating point
|
||||||
set(MD5_PPM_INT_5_8 a3363274999da2366a024efae6d16c9b)
|
if(MSVC)
|
||||||
set(MD5_PPM_INT_1_2 e692a315cea26b988c8e8b29a5dbcd81)
|
set(MD5_JPEG_3x2_FLOAT_PROG e27840755870fa849872e58aa0cd1400)
|
||||||
set(MD5_PPM_INT_3_8 79eca9175652ced755155c90e785a996)
|
set(MD5_PPM_3x2_FLOAT 6c2880b83bb1aa41dfe330e7a9768690)
|
||||||
set(MD5_PPM_INT_1_4 79cd778f8bf1a117690052cacdd54eca)
|
else()
|
||||||
set(MD5_PPM_INT_1_8 391b3d4aca640c8567d6f8745eb2142f)
|
set(MD5_JPEG_3x2_FLOAT_PROG bc6dbbefac2872f6b9d6c4a0ae60c3c0)
|
||||||
set(MD5_PPM_FAST_1_2 f30bcf6d32ccd44cbdd9aeaacbd9454f)
|
set(MD5_PPM_3x2_FLOAT f58119ee294198ac9b4a9f5645a34266)
|
||||||
set(MD5_BMP_256 4980185e3776e89bd931736e1cddeee6)
|
endif()
|
||||||
set(MD5_JPEG_ARI e986fb0a637a8d833d96e8a6d6d84ea1)
|
endif()
|
||||||
set(MD5_PPM_ARI 72b59a99bcf1de24c5b27d151bde2437)
|
set(MD5_PPM_420M_ISLOW_2_1 4ca6be2a6f326ff9eaab63e70a8259c0)
|
||||||
set(MD5_JPEG_PROG 1c4afddc05c0a43489ee54438a482d92)
|
set(MD5_PPM_420M_ISLOW_15_8 12aa9f9534c1b3d7ba047322226365eb)
|
||||||
set(MD5_JPEG_PROG_ARI 0a8f1c8f66e113c3cf635df0a475a617)
|
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_PPM_420_ISLOW_SKIP15_31 86664cd9dc956536409e44e244d20a97)
|
||||||
|
set(MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71 452a21656115a163029cfba5c04fa76a)
|
||||||
|
set(MD5_PPM_444_ISLOW_SKIP1_6 ef63901f71ef7a75cd78253fc0914f84)
|
||||||
|
set(MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13 15b173fb5872d9575572fbcc1b05956f)
|
||||||
|
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()
|
||||||
|
if(64BIT)
|
||||||
|
set(MD5_JPEG_3x2_FLOAT_PROG 9bca803d2042bd1eb03819e2bf92b3e5)
|
||||||
|
set(MD5_PPM_3x2_FLOAT f6bfab038438ed8f5522fbd33595dcdc)
|
||||||
|
else()
|
||||||
|
if(MSVC)
|
||||||
|
set(MD5_JPEG_3x2_FLOAT_PROG 7999ce9cd0ee9b6c7043b7351ab7639d)
|
||||||
|
set(MD5_PPM_3x2_FLOAT 28cdc448a6b75e97892f0e0f8d4b21f3)
|
||||||
|
else()
|
||||||
|
set(MD5_JPEG_3x2_FLOAT_PROG 1657664a410e0822c924b54f6f65e6e9)
|
||||||
|
set(MD5_PPM_3x2_FLOAT cb0a1f027f3d2917c902b5640214e025)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
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_PPM_420_ISLOW_SKIP15_31 c4c65c1e43d7275cd50328a61e6534f0)
|
||||||
|
set(MD5_PPM_420_ISLOW_ARI_SKIP16_139 087c6b123db16ac00cb88c5b590bb74a)
|
||||||
|
set(MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71 26eb36ccc7d1f0cb80cdabb0ac8b5d99)
|
||||||
|
set(MD5_PPM_420_ISLOW_ARI_CROP53x53_4_4 886c6775af22370257122f8b16207e6d)
|
||||||
|
set(MD5_PPM_444_ISLOW_SKIP1_6 5606f86874cf26b8fcee1117a0a436a6)
|
||||||
|
set(MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13 db87dc7ce26bcdc7a6b56239ce2b9d6c)
|
||||||
|
set(MD5_PPM_444_ISLOW_ARI_CROP37x37_0_0 cb57b32bd6d03e35432362f7bf184b6d)
|
||||||
set(MD5_JPEG_CROP b4197f377e621c4e9b1d20471432610d)
|
set(MD5_JPEG_CROP b4197f377e621c4e9b1d20471432610d)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_JAVA)
|
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
|
||||||
add_test(TJUnitTest-yuv ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR} TJUnitTest -yuv)
|
${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar
|
||||||
add_test(TJUnitTest-bi ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR} TJUnitTest -bi)
|
-Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR}
|
||||||
add_test(TJUnitTest-bi-yuv ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR} TJUnitTest -bi -yuv)
|
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()
|
endif()
|
||||||
add_test(tjunittest tjunittest)
|
|
||||||
add_test(tjunittest-alloc tjunittest -alloc)
|
|
||||||
add_test(tjunittest-yuv tjunittest -yuv)
|
|
||||||
add_test(cjpeg-int sharedlib/cjpeg -dct int -outfile testoutint.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
add_test(cjpeg-int-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testoutint.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(cjpeg-fast sharedlib/cjpeg -dct fast -opt -outfile testoutfst.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
add_test(cjpeg-fast-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FAST} -DFILE=testoutfst.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(cjpeg-fast-100 sharedlib/cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
add_test(cjpeg-fast-100-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FAST_100} -DFILE=testoutfst100.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(cjpeg-float sharedlib/cjpeg -dct float -outfile testoutflt.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
if(WITH_SIMD)
|
|
||||||
add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FLOAT} -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
else()
|
|
||||||
add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FLOAT_NOSIMD} -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
endif()
|
|
||||||
add_test(cjpeg-int-gray sharedlib/cjpeg -dct int -grayscale -outfile testoutgray.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
add_test(cjpeg-int-gray-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT_GRAY} -DFILE=testoutgray.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(djpeg-int sharedlib/djpeg -dct int -fast -ppm -outfile testoutint.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
add_test(djpeg-int-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_INT} -DFILE=testoutint.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(djpeg-fast sharedlib/djpeg -dct fast -ppm -outfile testoutfst.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
add_test(djpeg-fast-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FAST} -DFILE=testoutfst.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(djpeg-float sharedlib/djpeg -dct float -ppm -outfile testoutflt.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
if(WITH_SIMD)
|
|
||||||
add_test(djpeg-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FLOAT} -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
else()
|
|
||||||
add_test(djpeg-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FLOAT_NOSIMD} -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
endif()
|
|
||||||
foreach(scale 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8)
|
|
||||||
string(REGEX REPLACE "_" "/" scalearg ${scale})
|
|
||||||
add_test(djpeg-int-${scale} sharedlib/djpeg -dct int -nosmooth -scale ${scalearg} -ppm -outfile testoutint${scale}.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
add_test(djpeg-int-${scale}-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_INT_${scale}} -DFILE=testoutint${scale}.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
endforeach()
|
|
||||||
add_test(djpeg-fast-1_2 sharedlib/djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
add_test(djpeg-fast-1_2-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FAST_1_2} -DFILE=testoutfst1_2.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(djpeg-256 sharedlib/djpeg -dct int -bmp -colors 256 -outfile testout.bmp ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
add_test(djpeg-256-cmp ${CMAKE_COMMAND} -DMD5=${MD5_BMP_256} -DFILE=testout.bmp -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(cjpeg-prog sharedlib/cjpeg -dct int -progressive -outfile testoutp.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
add_test(cjpeg-prog-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_PROG} -DFILE=testoutp.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(jpegtran-prog sharedlib/jpegtran -outfile testoutt.jpg testoutp.jpg)
|
|
||||||
add_test(jpegtran-prog-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testoutt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
if(WITH_ARITH_ENC)
|
|
||||||
add_test(cjpeg-ari sharedlib/cjpeg -dct int -arithmetic -outfile testoutari.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
add_test(cjpeg-ari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_ARI} -DFILE=testoutari.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake )
|
|
||||||
add_test(jpegtran-toari sharedlib/jpegtran -arithmetic -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg)
|
|
||||||
add_test(jpegtran-toari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_ARI} -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(cjpeg-prog-ari sharedlib/cjpeg -dct int -progressive -arithmetic -sample 1x1 -outfile testoutpa.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
add_test(cjpeg-prog-ari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_PROG_ARI} -DFILE=testoutpa.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake )
|
|
||||||
endif()
|
|
||||||
if(WITH_ARITH_DEC)
|
|
||||||
add_test(djpeg-ari sharedlib/djpeg -dct int -fast -ppm -outfile testoutari.ppm ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg)
|
|
||||||
add_test(djpeg-ari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_ARI} -DFILE=testoutari.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(jpegtran-fromari sharedlib/jpegtran -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg)
|
|
||||||
add_test(jpegtran-fromari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
endif()
|
|
||||||
add_test(jpegtran-crop sharedlib/jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
add_test(jpegtran-crop-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_CROP} -DFILE=testoutcrop.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
|
|
||||||
add_test(tjunittest-static tjunittest-static)
|
set(TEST_LIBTYPES "")
|
||||||
add_test(tjunittest-static-alloc tjunittest-static -alloc)
|
if(ENABLE_SHARED)
|
||||||
add_test(tjunittest-static-yuv tjunittest-static -yuv)
|
set(TEST_LIBTYPES ${TEST_LIBTYPES} shared)
|
||||||
add_test(cjpeg-static-int cjpeg-static -dct int -outfile testoutint.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
add_test(cjpeg-static-int-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testoutint.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(cjpeg-static-fast cjpeg-static -dct fast -opt -outfile testoutfst.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
add_test(cjpeg-static-fast-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FAST} -DFILE=testoutfst.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(cjpeg-static-fast-100 cjpeg-static -dct fast -quality 100 -opt -outfile testoutfst100.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
add_test(cjpeg-static-fast-100-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FAST_100} -DFILE=testoutfst100.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(cjpeg-static-float cjpeg-static -dct float -outfile testoutflt.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
|
||||||
if(WITH_SIMD)
|
|
||||||
add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FLOAT} -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
else()
|
|
||||||
add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FLOAT_NOSIMD} -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
endif()
|
endif()
|
||||||
add_test(cjpeg-static-int-gray cjpeg-static -dct int -grayscale -outfile testoutgray.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
if(ENABLE_STATIC)
|
||||||
add_test(cjpeg-static-int-gray-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT_GRAY} -DFILE=testoutgray.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
set(TEST_LIBTYPES ${TEST_LIBTYPES} static)
|
||||||
add_test(djpeg-static-int djpeg-static -dct int -fast -ppm -outfile testoutint.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
add_test(djpeg-static-int-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_INT} -DFILE=testoutint.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(djpeg-static-fast djpeg-static -dct fast -ppm -outfile testoutfst.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
add_test(djpeg-static-fast-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FAST} -DFILE=testoutfst.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
add_test(djpeg-static-float djpeg-static -dct float -ppm -outfile testoutflt.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
if(WITH_SIMD)
|
|
||||||
add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FLOAT} -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
else()
|
|
||||||
add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FLOAT_NOSIMD} -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
|
||||||
endif()
|
endif()
|
||||||
foreach(scale 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8)
|
|
||||||
string(REGEX REPLACE "_" "/" scalearg ${scale})
|
set(TESTIMAGES ${CMAKE_SOURCE_DIR}/testimages)
|
||||||
add_test(djpeg-static-int-${scale} djpeg-static -dct int -nosmooth -scale ${scalearg} -ppm -outfile testoutint${scale}.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
set(MD5CMP ${CMAKE_CURRENT_BINARY_DIR}/md5/md5cmp)
|
||||||
add_test(djpeg-static-int-${scale}-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_INT_${scale}} -DFILE=testoutint${scale}.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
if(CMAKE_CROSSCOMPILING)
|
||||||
endforeach()
|
file(RELATIVE_PATH TESTIMAGES ${CMAKE_CURRENT_BINARY_DIR} ${TESTIMAGES})
|
||||||
add_test(djpeg-static-fast-1_2 djpeg-static -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
file(RELATIVE_PATH MD5CMP ${CMAKE_CURRENT_BINARY_DIR} ${MD5CMP})
|
||||||
add_test(djpeg-static-fast-1_2-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FAST_1_2} -DFILE=testoutfst1_2.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
endif()
|
||||||
add_test(djpeg-static-256 djpeg-static -dct int -bmp -colors 256 -outfile testout.bmp ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
add_test(djpeg-static-256-cmp ${CMAKE_COMMAND} -DMD5=${MD5_BMP_256} -DFILE=testout.bmp -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
foreach(libtype ${TEST_LIBTYPES})
|
||||||
add_test(cjpeg-static-prog cjpeg-static -dct int -progressive -outfile testoutp.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
if(libtype STREQUAL "shared")
|
||||||
add_test(cjpeg-static-prog-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_PROG} -DFILE=testoutp.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
set(dir sharedlib/)
|
||||||
add_test(jpegtran-static-prog jpegtran-static -outfile testoutt.jpg testoutp.jpg)
|
else()
|
||||||
add_test(jpegtran-static-prog-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testoutt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
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 ${TESTIMAGES}/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-rgb-islow-cmp
|
||||||
|
${MD5CMP} ${MD5_JPEG_RGB_ISLOW} testout_rgb_islow.jpg)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
${MD5CMP} ${MD5_PPM_RGB_ISLOW} testout_rgb_islow.ppm)
|
||||||
|
|
||||||
|
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
|
||||||
|
${MD5CMP} ${MD5_BMP_RGB_ISLOW_565} testout_rgb_islow_565.bmp)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
${MD5CMP} ${MD5_BMP_RGB_ISLOW_565D} testout_rgb_islow_565D.bmp)
|
||||||
|
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 ${TESTIMAGES}/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-422-ifast-opt-cmp
|
||||||
|
${MD5CMP} ${MD5_JPEG_422_IFAST_OPT} testout_422_ifast_opt.jpg)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
${MD5CMP} ${MD5_PPM_422_IFAST} testout_422_ifast.ppm)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
${MD5CMP} ${MD5_PPM_422M_IFAST} testout_422m_ifast.ppm)
|
||||||
|
|
||||||
|
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
|
||||||
|
${MD5CMP} ${MD5_BMP_422M_IFAST_565} testout_422m_ifast_565.bmp)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
${MD5CMP} ${MD5_BMP_422M_IFAST_565D} testout_422m_ifast_565D.bmp)
|
||||||
|
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 ${TESTIMAGES}/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-420-q100-ifast-prog-cmp
|
||||||
|
${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
|
||||||
|
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
|
||||||
|
${MD5CMP} ${MD5_PPM_420_Q100_IFAST} testout_420_q100_ifast.ppm)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
${MD5CMP} ${MD5_PPM_420M_Q100_IFAST} testout_420m_q100_ifast.ppm)
|
||||||
|
|
||||||
|
# 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 ${TESTIMAGES}/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-gray-islow-cmp
|
||||||
|
${MD5CMP} ${MD5_JPEG_GRAY_ISLOW} testout_gray_islow.jpg)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
${MD5CMP} ${MD5_PPM_GRAY_ISLOW} testout_gray_islow.ppm)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
${MD5CMP} ${MD5_PPM_GRAY_ISLOW_RGB} testout_gray_islow_rgb.ppm)
|
||||||
|
|
||||||
|
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
|
||||||
|
${MD5CMP} ${MD5_BMP_GRAY_ISLOW_565} testout_gray_islow_565.bmp)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
${MD5CMP} ${MD5_BMP_GRAY_ISLOW_565D} testout_gray_islow_565D.bmp)
|
||||||
|
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 ${TESTIMAGES}/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-420s-ifast-opt-cmp
|
||||||
|
${MD5CMP} ${MD5_JPEG_420S_IFAST_OPT} testout_420s_ifast_opt.jpg)
|
||||||
|
|
||||||
|
# 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 ${TESTIMAGES}/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-3x2-float-prog-cmp
|
||||||
|
${MD5CMP} ${MD5_JPEG_3x2_FLOAT_PROG} testout_3x2_float_prog.jpg)
|
||||||
|
|
||||||
|
# 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
|
||||||
|
${MD5CMP} ${MD5_PPM_3x2_FLOAT} testout_3x2_float.ppm)
|
||||||
|
|
||||||
if(WITH_ARITH_ENC)
|
if(WITH_ARITH_ENC)
|
||||||
add_test(cjpeg-static-ari cjpeg-static -dct int -arithmetic -outfile testoutari.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
# CC: YCC->RGB SAMP: fullsize/h2v2 FDCT: islow ENT: arith
|
||||||
add_test(cjpeg-static-ari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_ARI} -DFILE=testoutari.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake )
|
add_test(cjpeg${suffix}-420-islow-ari
|
||||||
add_test(jpegtran-static-toari jpegtran-static -arithmetic -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg)
|
${dir}cjpeg${suffix} -dct int -arithmetic
|
||||||
add_test(jpegtran-static-toari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_ARI} -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
-outfile testout_420_islow_ari.jpg ${TESTIMAGES}/testorig.ppm)
|
||||||
add_test(cjpeg-static-prog-ari cjpeg-static -dct int -progressive -arithmetic -sample 1x1 -outfile testoutpa.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm)
|
add_test(cjpeg${suffix}-420-islow-ari-cmp
|
||||||
add_test(cjpeg-static-prog-ari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_PROG_ARI} -DFILE=testoutpa.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake )
|
${MD5CMP} ${MD5_JPEG_420_ISLOW_ARI} testout_420_islow_ari.jpg)
|
||||||
|
|
||||||
|
add_test(jpegtran${suffix}-420-islow-ari
|
||||||
|
${dir}jpegtran${suffix} -arithmetic
|
||||||
|
-outfile testout_420_islow_ari.jpg ${TESTIMAGES}/testimgint.jpg)
|
||||||
|
add_test(jpegtran${suffix}-420-islow-ari-cmp
|
||||||
|
${MD5CMP} ${MD5_JPEG_420_ISLOW_ARI} testout_420_islow_ari.jpg)
|
||||||
|
|
||||||
|
# CC: YCC->RGB SAMP: fullsize FDCT: islow ENT: prog arith
|
||||||
|
add_test(cjpeg${suffix}-444-islow-progari
|
||||||
|
${dir}cjpeg${suffix} -sample 1x1 -dct int -prog -arithmetic
|
||||||
|
-outfile testout_444_islow_progari.jpg ${TESTIMAGES}/testorig.ppm)
|
||||||
|
add_test(cjpeg${suffix}-444-islow-progari-cmp
|
||||||
|
${MD5CMP} ${MD5_JPEG_444_ISLOW_PROGARI} testout_444_islow_progari.jpg)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_ARITH_DEC)
|
if(WITH_ARITH_DEC)
|
||||||
add_test(djpeg-static-ari djpeg-static -dct int -fast -ppm -outfile testoutari.ppm ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg)
|
# CC: RGB->YCC SAMP: h2v2 merged IDCT: ifast ENT: arith
|
||||||
add_test(djpeg-static-ari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_ARI} -DFILE=testoutari.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
add_test(djpeg${suffix}-420m-ifast-ari
|
||||||
add_test(jpegtran-static-fromari jpegtran-static -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg)
|
${dir}djpeg${suffix} -fast -ppm
|
||||||
add_test(jpegtran-static-fromari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
-outfile testout_420m_ifast_ari.ppm ${TESTIMAGES}/testimgari.jpg)
|
||||||
|
add_test(djpeg${suffix}-420m-ifast-ari-cmp
|
||||||
|
${MD5CMP} ${MD5_PPM_420M_IFAST_ARI} testout_420m_ifast_ari.ppm)
|
||||||
|
|
||||||
|
add_test(jpegtran${suffix}-420-islow
|
||||||
|
${dir}jpegtran${suffix}
|
||||||
|
-outfile testout_420_islow.jpg ${TESTIMAGES}/testimgari.jpg)
|
||||||
|
add_test(jpegtran${suffix}-420-islow-cmp
|
||||||
|
${MD5CMP} ${MD5_JPEG_420_ISLOW} testout_420_islow.jpg)
|
||||||
endif()
|
endif()
|
||||||
add_test(jpegtran-static-crop jpegtran-static -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg)
|
|
||||||
add_test(jpegtran-static-crop-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_CROP} -DFILE=testoutcrop.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
|
# 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 ${TESTIMAGES}/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420m-islow-${scale}-cmp
|
||||||
|
${MD5CMP} ${MD5_PPM_420M_ISLOW_${scale}} testout_420m_islow_${scale}.ppm)
|
||||||
|
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 ${TESTIMAGES}/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420-islow-256-cmp
|
||||||
|
${MD5CMP} ${MD5_BMP_420_ISLOW_256} testout_420_islow_256.bmp)
|
||||||
|
|
||||||
|
# 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 ${TESTIMAGES}/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420-islow-565-cmp
|
||||||
|
${MD5CMP} ${MD5_BMP_420_ISLOW_565} testout_420_islow_565.bmp)
|
||||||
|
|
||||||
|
# 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 ${TESTIMAGES}/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420-islow-565D-cmp
|
||||||
|
${MD5CMP} ${MD5_BMP_420_ISLOW_565D} testout_420_islow_565D.bmp)
|
||||||
|
|
||||||
|
# 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 ${TESTIMAGES}/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420m-islow-565-cmp
|
||||||
|
${MD5CMP} ${MD5_BMP_420M_ISLOW_565} testout_420m_islow_565.bmp)
|
||||||
|
|
||||||
|
# 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 ${TESTIMAGES}/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420m-islow-565D-cmp
|
||||||
|
${MD5CMP} ${MD5_BMP_420M_ISLOW_565D} testout_420m_islow_565D.bmp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Partial decode tests. These tests are designed to cover all of the
|
||||||
|
# possible code paths in jpeg_skip_scanlines().
|
||||||
|
|
||||||
|
# Context rows: Yes Intra-iMCU row: Yes iMCU row prefetch: No ENT: huff
|
||||||
|
add_test(djpeg${suffix}-420-islow-skip15_31
|
||||||
|
${dir}djpeg${suffix} -dct int -skip 15,31 -ppm
|
||||||
|
-outfile testout_420_islow_skip15,31.ppm ${TESTIMAGES}/${TESTORIG})
|
||||||
|
add_test(djpeg${suffix}-420-islow-skip15_31-cmp
|
||||||
|
${MD5CMP} ${MD5_PPM_420_ISLOW_SKIP15_31} testout_420_islow_skip15,31.ppm)
|
||||||
|
|
||||||
|
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: Yes ENT: arith
|
||||||
|
if(WITH_ARITH_DEC)
|
||||||
|
add_test(djpeg${suffix}-420-islow-ari-skip16_139
|
||||||
|
${dir}djpeg${suffix} -dct int -skip 16,139 -ppm
|
||||||
|
-outfile testout_420_islow_ari_skip16,139.ppm
|
||||||
|
${TESTIMAGES}/testimgari.jpg)
|
||||||
|
add_test(djpeg${suffix}-420-islow-ari_skip16_139-cmp
|
||||||
|
${MD5CMP} ${MD5_PPM_420_ISLOW_ARI_SKIP16_139}
|
||||||
|
testout_420_islow_ari_skip16,139.ppm)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No ENT: prog huff
|
||||||
|
add_test(cjpeg${suffix}-420-islow-prog
|
||||||
|
${dir}cjpeg${suffix} -dct int -prog
|
||||||
|
-outfile testout_420_islow_prog.jpg ${TESTIMAGES}/testorig.ppm)
|
||||||
|
add_test(djpeg${suffix}-420-islow-prog-crop62x62_71_71
|
||||||
|
${dir}djpeg${suffix} -dct int -crop 62x62+71+71 -ppm
|
||||||
|
-outfile testout_420_islow_prog_crop62x62,71,71.ppm
|
||||||
|
testout_420_islow_prog.jpg)
|
||||||
|
add_test(djpeg${suffix}-420-islow-prog-crop62x62_71_71-cmp
|
||||||
|
${MD5CMP} ${MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71}
|
||||||
|
testout_420_islow_prog_crop62x62,71,71.ppm)
|
||||||
|
|
||||||
|
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No ENT: arith
|
||||||
|
if(WITH_ARITH_DEC)
|
||||||
|
add_test(djpeg${suffix}-420-islow-ari-crop53x53_4_4
|
||||||
|
${dir}djpeg${suffix} -dct int -crop 53x53+4+4 -ppm
|
||||||
|
-outfile testout_420_islow_ari_crop53x53,4,4.ppm
|
||||||
|
${TESTIMAGES}/testimgari.jpg)
|
||||||
|
add_test(djpeg${suffix}-420-islow-ari-crop53x53_4_4-cmp
|
||||||
|
${MD5CMP} ${MD5_PPM_420_ISLOW_ARI_CROP53x53_4_4}
|
||||||
|
testout_420_islow_ari_crop53x53,4,4.ppm)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Context rows: No Intra-iMCU row: Yes ENT: huff
|
||||||
|
add_test(cjpeg${suffix}-444-islow
|
||||||
|
${dir}cjpeg${suffix} -dct int -sample 1x1
|
||||||
|
-outfile testout_444_islow.jpg ${TESTIMAGES}/testorig.ppm)
|
||||||
|
add_test(djpeg${suffix}-444-islow-skip1_6
|
||||||
|
${dir}djpeg${suffix} -dct int -skip 1,6 -ppm
|
||||||
|
-outfile testout_444_islow_skip1,6.ppm testout_444_islow.jpg)
|
||||||
|
add_test(djpeg${suffix}-444-islow-skip1_6-cmp
|
||||||
|
${MD5CMP} ${MD5_PPM_444_ISLOW_SKIP1_6} testout_444_islow_skip1,6.ppm)
|
||||||
|
|
||||||
|
# Context rows: No Intra-iMCU row: No ENT: prog huff
|
||||||
|
add_test(cjpeg${suffix}-444-islow-prog
|
||||||
|
${dir}cjpeg${suffix} -dct int -prog -sample 1x1
|
||||||
|
-outfile testout_444_islow_prog.jpg ${TESTIMAGES}/testorig.ppm)
|
||||||
|
add_test(djpeg${suffix}-444-islow-prog-crop98x98_13_13
|
||||||
|
${dir}djpeg${suffix} -dct int -crop 98x98+13+13 -ppm
|
||||||
|
-outfile testout_444_islow_prog_crop98x98,13,13.ppm
|
||||||
|
testout_444_islow_prog.jpg)
|
||||||
|
add_test(djpeg${suffix}-444-islow-prog_crop98x98_13_13-cmp
|
||||||
|
${MD5CMP} ${MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13}
|
||||||
|
testout_444_islow_prog_crop98x98,13,13.ppm)
|
||||||
|
|
||||||
|
# Context rows: No Intra-iMCU row: No ENT: arith
|
||||||
|
if(WITH_ARITH_ENC)
|
||||||
|
add_test(cjpeg${suffix}-444-islow-ari
|
||||||
|
${dir}cjpeg${suffix} -dct int -arithmetic -sample 1x1
|
||||||
|
-outfile testout_444_islow_ari.jpg ${TESTIMAGES}/testorig.ppm)
|
||||||
|
if(WITH_ARITH_DEC)
|
||||||
|
add_test(djpeg${suffix}-444-islow-ari-crop37x37_0_0
|
||||||
|
${dir}djpeg${suffix} -dct int -crop 37x37+0+0 -ppm
|
||||||
|
-outfile testout_444_islow_ari_crop37x37,0,0.ppm
|
||||||
|
testout_444_islow_ari.jpg)
|
||||||
|
add_test(djpeg${suffix}-444-islow-ari-crop37x37_0_0-cmp
|
||||||
|
${MD5CMP} ${MD5_PPM_444_ISLOW_ARI_CROP37x37_0_0}
|
||||||
|
testout_444_islow_ari_crop37x37,0,0.ppm)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_test(jpegtran${suffix}-crop
|
||||||
|
${dir}jpegtran${suffix} -crop 120x90+20+50 -transpose -perfect
|
||||||
|
-outfile testout_crop.jpg ${TESTIMAGES}/${TESTORIG})
|
||||||
|
add_test(jpegtran${suffix}-crop-cmp
|
||||||
|
${MD5CMP} ${MD5_JPEG_CROP} testout_crop.jpg)
|
||||||
|
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_custom_target(testclean COMMAND ${CMAKE_COMMAND} -P
|
add_custom_target(testclean COMMAND ${CMAKE_COMMAND} -P
|
||||||
${CMAKE_SOURCE_DIR}/cmakescripts/testclean.cmake)
|
${CMAKE_SOURCE_DIR}/cmakescripts/testclean.cmake)
|
||||||
@@ -482,13 +915,38 @@ add_custom_target(installer
|
|||||||
cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND}
|
cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND}
|
||||||
SOURCES libjpeg-turbo.nsi)
|
SOURCES libjpeg-turbo.nsi)
|
||||||
|
|
||||||
install(TARGETS jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom tjbench
|
if(WITH_TURBOJPEG)
|
||||||
|
if(ENABLE_SHARED)
|
||||||
|
install(TARGETS turbojpeg tjbench
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
RUNTIME DESTINATION bin
|
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()
|
||||||
|
|
||||||
install(FILES ${CMAKE_SOURCE_DIR}/README ${CMAKE_SOURCE_DIR}/README-turbo.txt
|
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.ijg ${CMAKE_SOURCE_DIR}/README.md
|
||||||
${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt
|
${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt
|
||||||
${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt
|
${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt
|
||||||
${CMAKE_SOURCE_DIR}/wizard.txt
|
${CMAKE_SOURCE_DIR}/wizard.txt
|
||||||
@@ -496,4 +954,9 @@ install(FILES ${CMAKE_SOURCE_DIR}/README ${CMAKE_SOURCE_DIR}/README-turbo.txt
|
|||||||
|
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h
|
install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h
|
||||||
${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h
|
${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h
|
||||||
${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include)
|
DESTINATION include)
|
||||||
|
|
||||||
|
configure_file("${CMAKE_SOURCE_DIR}/cmakescripts/cmake_uninstall.cmake.in"
|
||||||
|
"cmake_uninstall.cmake" IMMEDIATE @ONLY)
|
||||||
|
|
||||||
|
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P cmake_uninstall.cmake)
|
||||||
|
|||||||
1151
ChangeLog.md
Normal file
1151
ChangeLog.md
Normal file
File diff suppressed because it is too large
Load Diff
457
ChangeLog.txt
457
ChangeLog.txt
@@ -1,457 +0,0 @@
|
|||||||
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 ARM v7s 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 ARM v6 and ARM v7 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
|
|
||||||
139
LICENSE.md
Normal file
139
LICENSE.md
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
libjpeg-turbo Licenses
|
||||||
|
======================
|
||||||
|
|
||||||
|
libjpeg-turbo is covered by three compatible BSD-style open source licenses:
|
||||||
|
|
||||||
|
- The IJG (Independent JPEG Group) License, which is listed in
|
||||||
|
[README.ijg](README.ijg)
|
||||||
|
|
||||||
|
This license applies to the libjpeg API library and associated programs
|
||||||
|
(any code inherited from libjpeg, and any modifications to that code.)
|
||||||
|
|
||||||
|
- The Modified (3-clause) BSD License, which is listed below
|
||||||
|
|
||||||
|
This license covers the TurboJPEG API library and associated programs.
|
||||||
|
|
||||||
|
- The zlib License, which is listed below
|
||||||
|
|
||||||
|
This license is a subset of the other two, and it covers the libjpeg-turbo
|
||||||
|
SIMD extensions.
|
||||||
|
|
||||||
|
|
||||||
|
Complying with the libjpeg-turbo Licenses
|
||||||
|
=========================================
|
||||||
|
|
||||||
|
This section provides a roll-up of the libjpeg-turbo licensing terms, to the
|
||||||
|
best of our understanding.
|
||||||
|
|
||||||
|
1. If you are distributing a modified version of the libjpeg-turbo source,
|
||||||
|
then:
|
||||||
|
|
||||||
|
1. You cannot alter or remove any existing copyright or license notices
|
||||||
|
from the source.
|
||||||
|
|
||||||
|
**Origin**
|
||||||
|
- Clause 1 of the IJG License
|
||||||
|
- Clause 1 of the Modified BSD License
|
||||||
|
- Clauses 1 and 3 of the zlib License
|
||||||
|
|
||||||
|
2. You must add your own copyright notice to the header of each source
|
||||||
|
file you modified, so others can tell that you modified that file (if
|
||||||
|
there is not an existing copyright header in that file, then you can
|
||||||
|
simply add a notice stating that you modified the file.)
|
||||||
|
|
||||||
|
**Origin**
|
||||||
|
- Clause 1 of the IJG License
|
||||||
|
- Clause 2 of the zlib License
|
||||||
|
|
||||||
|
3. You must include the IJG README file, and you must not alter any of the
|
||||||
|
copyright or license text in that file.
|
||||||
|
|
||||||
|
**Origin**
|
||||||
|
- Clause 1 of the IJG License
|
||||||
|
|
||||||
|
2. If you are distributing only libjpeg-turbo binaries without the source, or
|
||||||
|
if you are distributing an application that statically links with
|
||||||
|
libjpeg-turbo, then:
|
||||||
|
|
||||||
|
1. Your product documentation must include a message stating:
|
||||||
|
|
||||||
|
This software is based in part on the work of the Independent JPEG
|
||||||
|
Group.
|
||||||
|
|
||||||
|
**Origin**
|
||||||
|
- Clause 2 of the IJG license
|
||||||
|
|
||||||
|
2. If your binary distribution includes or uses the TurboJPEG API, then
|
||||||
|
your product documentation must include the text of the Modified BSD
|
||||||
|
License.
|
||||||
|
|
||||||
|
**Origin**
|
||||||
|
- Clause 2 of the Modified BSD License
|
||||||
|
|
||||||
|
3. You cannot use the name of the IJG or The libjpeg-turbo Project or the
|
||||||
|
contributors thereof in advertising, publicity, etc.
|
||||||
|
|
||||||
|
**Origin**
|
||||||
|
- IJG License
|
||||||
|
- Clause 3 of the Modified BSD License
|
||||||
|
|
||||||
|
4. The IJG and The libjpeg-turbo Project do not warrant libjpeg-turbo to be
|
||||||
|
free of defects, nor do we accept any liability for undesirable
|
||||||
|
consequences resulting from your use of the software.
|
||||||
|
|
||||||
|
**Origin**
|
||||||
|
- IJG License
|
||||||
|
- Modified BSD License
|
||||||
|
- zlib License
|
||||||
|
|
||||||
|
|
||||||
|
The Modified (3-clause) BSD License
|
||||||
|
===================================
|
||||||
|
|
||||||
|
Copyright (C)\<YEAR\> \<AUTHOR\>. 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.
|
||||||
|
|
||||||
|
|
||||||
|
The zlib License
|
||||||
|
================
|
||||||
|
|
||||||
|
Copyright (C) \<YEAR\>, \<AUTHOR\>.
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
629
Makefile.am
629
Makefile.am
@@ -4,15 +4,21 @@ include_HEADERS = jerror.h jmorecfg.h jpeglib.h
|
|||||||
|
|
||||||
if WITH_TURBOJPEG
|
if WITH_TURBOJPEG
|
||||||
lib_LTLIBRARIES += libturbojpeg.la
|
lib_LTLIBRARIES += libturbojpeg.la
|
||||||
libturbojpeg_la_LDFLAGS = -version-info 0:0 -no-undefined
|
libturbojpeg_la_LDFLAGS = -version-info 1:0:1 -no-undefined
|
||||||
include_HEADERS += turbojpeg.h
|
include_HEADERS += turbojpeg.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
nodist_include_HEADERS = jconfig.h
|
nodist_include_HEADERS = jconfig.h
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = pkgscripts/libjpeg.pc
|
||||||
|
if WITH_TURBOJPEG
|
||||||
|
pkgconfig_DATA += pkgscripts/libturbojpeg.pc
|
||||||
|
endif
|
||||||
|
|
||||||
HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.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
|
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 \
|
libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \
|
||||||
jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
|
jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
|
||||||
@@ -107,21 +113,34 @@ tjunittest_LDADD = libturbojpeg.la
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdbmp.c rdgif.c \
|
cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdgif.c rdppm.c rdswitch.c
|
||||||
rdppm.c rdswitch.c rdtarga.c
|
if WITH_12BIT
|
||||||
|
else
|
||||||
|
cjpeg_SOURCES += rdbmp.c rdtarga.c
|
||||||
|
endif
|
||||||
|
|
||||||
cjpeg_LDADD = libjpeg.la
|
cjpeg_LDADD = libjpeg.la
|
||||||
|
|
||||||
cjpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
|
cjpeg_CFLAGS = -DGIF_SUPPORTED -DPPM_SUPPORTED
|
||||||
-DTARGA_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 \
|
djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \
|
||||||
wrbmp.c wrgif.c wrppm.c wrtarga.c
|
wrgif.c wrppm.c
|
||||||
|
if WITH_12BIT
|
||||||
|
else
|
||||||
|
djpeg_SOURCES += wrbmp.c wrtarga.c
|
||||||
|
endif
|
||||||
|
|
||||||
djpeg_LDADD = libjpeg.la
|
djpeg_LDADD = libjpeg.la
|
||||||
|
|
||||||
djpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
|
djpeg_CFLAGS = -DGIF_SUPPORTED -DPPM_SUPPORTED
|
||||||
-DTARGA_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_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h
|
||||||
|
|
||||||
@@ -141,20 +160,21 @@ jcstest_LDADD = libjpeg.la
|
|||||||
|
|
||||||
dist_man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
|
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 \
|
DOCS= coderules.txt jconfig.txt change.log rdrle.c wrrle.c BUILDING.md \
|
||||||
ChangeLog.txt
|
ChangeLog.md
|
||||||
|
|
||||||
docdir = $(datadir)/doc
|
dist_doc_DATA = README.ijg README.md libjpeg.txt structure.txt usage.txt \
|
||||||
dist_doc_DATA = README README-turbo.txt libjpeg.txt structure.txt usage.txt \
|
wizard.txt LICENSE.md
|
||||||
wizard.txt
|
|
||||||
|
|
||||||
exampledir = $(datadir)/doc
|
exampledir = $(docdir)
|
||||||
dist_example_DATA = example.c
|
dist_example_DATA = example.c
|
||||||
|
|
||||||
|
|
||||||
EXTRA_DIST = win release $(DOCS) testimages CMakeLists.txt \
|
EXTRA_DIST = win release $(DOCS) testimages CMakeLists.txt \
|
||||||
sharedlib/CMakeLists.txt cmakescripts libjpeg.map.in doc doxygen.config \
|
sharedlib/CMakeLists.txt cmakescripts libjpeg.map.in doc doxygen.config \
|
||||||
jccolext.c jdcolext.c jdmrgext.c
|
doxygen-extra.css jccolext.c jdcolext.c jdcol565.c jdmrgext.c jdmrg565.c \
|
||||||
|
jstdhuff.c jdcoefct.h jdmainct.h jdmaster.h jdsample.h \
|
||||||
|
md5/CMakeLists.txt
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
rm -rf `find $(distdir) -name .svn`
|
rm -rf `find $(distdir) -name .svn`
|
||||||
@@ -162,129 +182,487 @@ dist-hook:
|
|||||||
|
|
||||||
SUBDIRS += md5
|
SUBDIRS += md5
|
||||||
|
|
||||||
MD5_JPEG_INT = 9a68f56bc76e466aa7e52f415d0f4a5f
|
if WITH_12BIT
|
||||||
MD5_JPEG_FAST = 0e1502e7fa421835e376a314fac2a39f
|
|
||||||
MD5_JPEG_FAST_100 = 7bf72a8e741d64eecb960c97323af77c
|
TESTORIG = testorig12.jpg
|
||||||
MD5_JPEG_FLOAT = d1623885ffafcd40c684af09e3d65cd5
|
MD5_JPEG_RGB_ISLOW = 9620f424569594bb9242b48498ad801f
|
||||||
MD5_JPEG_FLOAT_NOSIMD = fb4884c35f8273f498cb32879de5c455
|
MD5_PPM_RGB_ISLOW = f3301d2219783b8b3d942b7239fa50c0
|
||||||
MD5_JPEG_INT_GRAY = 72b51f894b8f4a10b3ee3066770aa38d
|
MD5_JPEG_422_IFAST_OPT = 7322e3bd2f127f7de4b40d4480ce60e4
|
||||||
MD5_PPM_INT = d1ed0d11f076b842525271647716aeb8
|
MD5_PPM_422_IFAST = 79807fa552899e66a04708f533e16950
|
||||||
MD5_PPM_FAST = 048298a2d2410261c0533cb97bcfef23
|
MD5_PPM_422M_IFAST = 07737bfe8a7c1c87aaa393a0098d16b0
|
||||||
MD5_PPM_FLOAT = 7f5b446ee36b2630e06785b8d42af15f
|
MD5_JPEG_420_IFAST_Q100_PROG = a1da220b5604081863a504297ed59e55
|
||||||
MD5_PPM_FLOAT_NOSIMD = 64072f1dbdc5b3a187777788604971a5
|
MD5_PPM_420_Q100_IFAST = 1b3730122709f53d007255e8dfd3305e
|
||||||
MD5_PPM_INT_2_1 = 9f9de8c0612f8d06869b960b05abf9c9
|
MD5_PPM_420M_Q100_IFAST = 980a1a3c5bf9510022869d30b7d26566
|
||||||
MD5_PPM_INT_15_8 = b6875bc070720b899566cc06459b63b7
|
MD5_JPEG_GRAY_ISLOW = 235c90707b16e2e069f37c888b2636d9
|
||||||
MD5_PPM_INT_7_4 = 06a177eae05f164fac57f7a2c346ee87
|
MD5_PPM_GRAY_ISLOW = 7213c10af507ad467da5578ca5ee1fca
|
||||||
MD5_PPM_INT_13_8 = bc3452573c8152f6ae552939ee19f82f
|
MD5_PPM_GRAY_ISLOW_RGB = e96ee81c30a6ed422d466338bd3de65d
|
||||||
MD5_PPM_INT_3_2 = f5a8b88a8a7f96016f04d259cf82ed67
|
MD5_JPEG_420S_IFAST_OPT = 7af8e60be4d9c227ec63ac9b6630855e
|
||||||
MD5_PPM_INT_11_8 = d8cc73c0aaacd4556569b59437ba00a5
|
MD5_JPEG_3x2_FLOAT_PROG_SSE = a8c17daf77b457725ec929e215b603f8
|
||||||
MD5_PPM_INT_5_4 = 32775dd9ad2ab90f4c5b219b53e0c86c
|
MD5_PPM_3x2_FLOAT_SSE = 42876ab9e5c2f76a87d08db5fbd57956
|
||||||
MD5_PPM_INT_9_8 = d25e61bc7eac0002f5b393aa223747b6
|
MD5_JPEG_3x2_FLOAT_PROG_32BIT = a8c17daf77b457725ec929e215b603f8
|
||||||
MD5_PPM_INT_7_8 = ddb564b7c74a09494016d6cd7502a946
|
MD5_PPM_3x2_FLOAT_32BIT = 42876ab9e5c2f76a87d08db5fbd57956
|
||||||
MD5_PPM_INT_3_4 = 8ed8e68808c3fbc4ea764fc9d2968646
|
MD5_PPM_3x2_FLOAT_64BIT = d6fbc71153b3d8ded484dbc17c7b9cf4
|
||||||
MD5_PPM_INT_5_8 = a3363274999da2366a024efae6d16c9b
|
MD5_JPEG_3x2_FLOAT_PROG_387 = bc6dbbefac2872f6b9d6c4a0ae60c3c0
|
||||||
MD5_PPM_INT_1_2 = e692a315cea26b988c8e8b29a5dbcd81
|
MD5_PPM_3x2_FLOAT_387 = bcc5723c61560463ac60f772e742d092
|
||||||
MD5_PPM_INT_3_8 = 79eca9175652ced755155c90e785a996
|
MD5_JPEG_3x2_IFAST_PROG = 1396cc2b7185cfe943d408c9d305339e
|
||||||
MD5_PPM_INT_1_4 = 79cd778f8bf1a117690052cacdd54eca
|
MD5_PPM_3x2_IFAST = 3975985ef6eeb0a2cdc58daa651ccc00
|
||||||
MD5_PPM_INT_1_8 = 391b3d4aca640c8567d6f8745eb2142f
|
MD5_PPM_420M_ISLOW_2_1 = 4ca6be2a6f326ff9eaab63e70a8259c0
|
||||||
MD5_PPM_FAST_1_2 = f30bcf6d32ccd44cbdd9aeaacbd9454f
|
MD5_PPM_420M_ISLOW_15_8 = 12aa9f9534c1b3d7ba047322226365eb
|
||||||
MD5_BMP_256 = 4980185e3776e89bd931736e1cddeee6
|
MD5_PPM_420M_ISLOW_13_8 = f7e22817c7b25e1393e4ec101e9d4e96
|
||||||
MD5_JPEG_ARI = e986fb0a637a8d833d96e8a6d6d84ea1
|
MD5_PPM_420M_ISLOW_11_8 = 800a16f9f4dc9b293197bfe11be10a82
|
||||||
MD5_PPM_ARI = 72b59a99bcf1de24c5b27d151bde2437
|
MD5_PPM_420M_ISLOW_9_8 = 06b7a92a9bc69f4dc36ec40f1937d55c
|
||||||
MD5_JPEG_PROG = 1c4afddc05c0a43489ee54438a482d92
|
MD5_PPM_420M_ISLOW_7_8 = 3ec444a14a4ab4eab88ffc49c48eca43
|
||||||
MD5_JPEG_PROG_ARI = 0a8f1c8f66e113c3cf635df0a475a617
|
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_PPM_420_ISLOW_SKIP15_31 = 86664cd9dc956536409e44e244d20a97
|
||||||
|
MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71 = 452a21656115a163029cfba5c04fa76a
|
||||||
|
MD5_PPM_444_ISLOW_SKIP1_6 = ef63901f71ef7a75cd78253fc0914f84
|
||||||
|
MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13 = 15b173fb5872d9575572fbcc1b05956f
|
||||||
|
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.md 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_FLOAT_PROG_387 = 1657664a410e0822c924b54f6f65e6e9
|
||||||
|
MD5_PPM_3x2_FLOAT_387 = cb0a1f027f3d2917c902b5640214e025
|
||||||
|
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_PPM_420_ISLOW_SKIP15_31 = c4c65c1e43d7275cd50328a61e6534f0
|
||||||
|
MD5_PPM_420_ISLOW_ARI_SKIP16_139 = 087c6b123db16ac00cb88c5b590bb74a
|
||||||
|
MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71 = 26eb36ccc7d1f0cb80cdabb0ac8b5d99
|
||||||
|
MD5_PPM_420_ISLOW_ARI_CROP53x53_4_4 = 886c6775af22370257122f8b16207e6d
|
||||||
|
MD5_PPM_444_ISLOW_SKIP1_6 = 5606f86874cf26b8fcee1117a0a436a6
|
||||||
|
MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13 = db87dc7ce26bcdc7a6b56239ce2b9d6c
|
||||||
|
MD5_PPM_444_ISLOW_ARI_CROP37x37_0_0 = cb57b32bd6d03e35432362f7bf184b6d
|
||||||
MD5_JPEG_CROP = b4197f377e621c4e9b1d20471432610d
|
MD5_JPEG_CROP = b4197f377e621c4e9b1d20471432610d
|
||||||
|
|
||||||
test: testclean all
|
endif
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
|
test: tjquicktest tjbittest bittest
|
||||||
|
|
||||||
|
if CROSS_COMPILING
|
||||||
|
tjquicktest: testclean
|
||||||
|
else
|
||||||
|
tjquicktest: testclean all
|
||||||
|
endif
|
||||||
|
|
||||||
if WITH_TURBOJPEG
|
if WITH_TURBOJPEG
|
||||||
if WITH_JAVA
|
if WITH_JAVA
|
||||||
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest
|
$(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 -bi
|
||||||
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv
|
$(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
|
||||||
|
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv -bi -noyuvpad
|
||||||
endif
|
endif
|
||||||
./tjunittest
|
./tjunittest
|
||||||
./tjunittest -alloc
|
./tjunittest -alloc
|
||||||
./tjunittest -yuv
|
./tjunittest -yuv
|
||||||
|
./tjunittest -yuv -alloc
|
||||||
|
./tjunittest -yuv -noyuvpad
|
||||||
endif
|
endif
|
||||||
./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testimages/testorig.ppm
|
echo GREAT SUCCESS!
|
||||||
md5/md5cmp $(MD5_JPEG_INT) testoutint.jpg
|
|
||||||
./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testimages/testorig.ppm
|
if CROSS_COMPILING
|
||||||
md5/md5cmp $(MD5_JPEG_FAST) testoutfst.jpg
|
tjbittest: testclean
|
||||||
./cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg $(srcdir)/testimages/testorig.ppm
|
|
||||||
md5/md5cmp $(MD5_JPEG_FAST_100) testoutfst100.jpg
|
|
||||||
./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testimages/testorig.ppm
|
|
||||||
if WITH_SSE_FLOAT_DCT
|
|
||||||
md5/md5cmp $(MD5_JPEG_FLOAT) testoutflt.jpg
|
|
||||||
else
|
else
|
||||||
md5/md5cmp $(MD5_JPEG_FLOAT_NOSIMD) testoutflt.jpg
|
tjbittest: testclean all
|
||||||
endif
|
endif
|
||||||
./cjpeg -dct int -grayscale -outfile testoutgray.jpg $(srcdir)/testimages/testorig.ppm
|
|
||||||
md5/md5cmp $(MD5_JPEG_INT_GRAY) testoutgray.jpg
|
if WITH_TURBOJPEG
|
||||||
./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testimages/testorig.jpg
|
|
||||||
md5/md5cmp $(MD5_PPM_INT) testoutint.ppm
|
MD5_PPM_GRAY_TILE = 89d3ca21213d9d864b50b4e4e7de4ca6
|
||||||
./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testimages/testorig.jpg
|
MD5_PPM_420_8x8_TILE = 847fceab15c5b7b911cb986cf0f71de3
|
||||||
md5/md5cmp $(MD5_PPM_FAST) testoutfst.ppm
|
MD5_PPM_420_16x16_TILE = ca45552a93687e078f7137cc4126a7b0
|
||||||
./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testimages/testorig.jpg
|
MD5_PPM_420_32x32_TILE = d8676f1d6b68df358353bba9844f4a00
|
||||||
if WITH_SSE_FLOAT_DCT
|
MD5_PPM_420_64x64_TILE = 4e4c1a3d7ea4bace4f868bcbe83b7050
|
||||||
md5/md5cmp $(MD5_PPM_FLOAT) testoutflt.ppm
|
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 -warmup 0 >/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 -f testout_tile_GRAY_* testout_tile_420_* testout_tile_422_* testout_tile_444_*
|
||||||
|
|
||||||
|
./tjbench testout_tile.ppm 95 -rgb -fastupsample -quiet -tile -benchtime 0.01 -warmup 0 >/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 -f testout_tile_GRAY_* testout_tile_420_* testout_tile_422_* testout_tile_444_* testout_tile.ppm
|
||||||
|
echo GREAT SUCCESS!
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
if CROSS_COMPILING
|
||||||
|
bittest: testclean
|
||||||
else
|
else
|
||||||
md5/md5cmp $(MD5_PPM_FLOAT_NOSIMD) testoutflt.ppm
|
bittest: testclean all
|
||||||
endif
|
endif
|
||||||
./djpeg -dct int -nosmooth -scale 2/1 -ppm -outfile testoutint2_1.ppm $(srcdir)/testimages/testorig.jpg;
|
|
||||||
md5/md5cmp $(MD5_PPM_INT_2_1) testoutint2_1.ppm;
|
# These tests are carefully crafted to provide full coverage of as many of the
|
||||||
./djpeg -dct int -nosmooth -scale 15/8 -ppm -outfile testoutint15_8.ppm $(srcdir)/testimages/testorig.jpg;
|
# underlying algorithms as possible (including all of the SIMD-accelerated
|
||||||
md5/md5cmp $(MD5_PPM_INT_15_8) testoutint15_8.ppm;
|
# ones.)
|
||||||
./djpeg -dct int -nosmooth -scale 7/4 -ppm -outfile testoutint7_4.ppm $(srcdir)/testimages/testorig.jpg;
|
|
||||||
md5/md5cmp $(MD5_PPM_INT_7_4) testoutint7_4.ppm;
|
# CC: null SAMP: fullsize FDCT: islow ENT: huff
|
||||||
./djpeg -dct int -nosmooth -scale 13/8 -ppm -outfile testoutint13_8.ppm $(srcdir)/testimages/testorig.jpg;
|
./cjpeg -rgb -dct int -outfile testout_rgb_islow.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
md5/md5cmp $(MD5_PPM_INT_13_8) testoutint13_8.ppm;
|
md5/md5cmp $(MD5_JPEG_RGB_ISLOW) testout_rgb_islow.jpg
|
||||||
./djpeg -dct int -nosmooth -scale 3/2 -ppm -outfile testoutint3_2.ppm $(srcdir)/testimages/testorig.jpg;
|
# CC: null SAMP: fullsize IDCT: islow ENT: huff
|
||||||
md5/md5cmp $(MD5_PPM_INT_3_2) testoutint3_2.ppm;
|
./djpeg -dct int -ppm -outfile testout_rgb_islow.ppm testout_rgb_islow.jpg
|
||||||
./djpeg -dct int -nosmooth -scale 11/8 -ppm -outfile testoutint11_8.ppm $(srcdir)/testimages/testorig.jpg;
|
md5/md5cmp $(MD5_PPM_RGB_ISLOW) testout_rgb_islow.ppm
|
||||||
md5/md5cmp $(MD5_PPM_INT_11_8) testoutint11_8.ppm;
|
rm -f testout_rgb_islow.ppm
|
||||||
./djpeg -dct int -nosmooth -scale 5/4 -ppm -outfile testoutint5_4.ppm $(srcdir)/testimages/testorig.jpg;
|
if WITH_12BIT
|
||||||
md5/md5cmp $(MD5_PPM_INT_5_4) testoutint5_4.ppm;
|
rm -f testout_rgb_islow.jpg
|
||||||
./djpeg -dct int -nosmooth -scale 9/8 -ppm -outfile testoutint9_8.ppm $(srcdir)/testimages/testorig.jpg;
|
else
|
||||||
md5/md5cmp $(MD5_PPM_INT_9_8) testoutint9_8.ppm;
|
# CC: RGB->RGB565 SAMP: fullsize IDCT: islow ENT: huff
|
||||||
./djpeg -dct int -nosmooth -scale 7/8 -ppm -outfile testoutint7_8.ppm $(srcdir)/testimages/testorig.jpg;
|
./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_rgb_islow_565.bmp testout_rgb_islow.jpg
|
||||||
md5/md5cmp $(MD5_PPM_INT_7_8) testoutint7_8.ppm;
|
md5/md5cmp $(MD5_BMP_RGB_ISLOW_565) testout_rgb_islow_565.bmp
|
||||||
./djpeg -dct int -nosmooth -scale 3/4 -ppm -outfile testoutint3_4.ppm $(srcdir)/testimages/testorig.jpg;
|
rm -f testout_rgb_islow_565.bmp
|
||||||
md5/md5cmp $(MD5_PPM_INT_3_4) testoutint3_4.ppm;
|
# CC: RGB->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
|
||||||
./djpeg -dct int -nosmooth -scale 5/8 -ppm -outfile testoutint5_8.ppm $(srcdir)/testimages/testorig.jpg;
|
./djpeg -dct int -rgb565 -bmp -outfile testout_rgb_islow_565D.bmp testout_rgb_islow.jpg
|
||||||
md5/md5cmp $(MD5_PPM_INT_5_8) testoutint5_8.ppm;
|
md5/md5cmp $(MD5_BMP_RGB_ISLOW_565D) testout_rgb_islow_565D.bmp
|
||||||
./djpeg -dct int -nosmooth -scale 1/2 -ppm -outfile testoutint1_2.ppm $(srcdir)/testimages/testorig.jpg;
|
rm -f testout_rgb_islow_565D.bmp testout_rgb_islow.jpg
|
||||||
md5/md5cmp $(MD5_PPM_INT_1_2) testoutint1_2.ppm;
|
endif
|
||||||
./djpeg -dct int -nosmooth -scale 3/8 -ppm -outfile testoutint3_8.ppm $(srcdir)/testimages/testorig.jpg;
|
|
||||||
md5/md5cmp $(MD5_PPM_INT_3_8) testoutint3_8.ppm;
|
# CC: RGB->YCC SAMP: fullsize/h2v1 FDCT: ifast ENT: 2-pass huff
|
||||||
./djpeg -dct int -nosmooth -scale 1/4 -ppm -outfile testoutint1_4.ppm $(srcdir)/testimages/testorig.jpg;
|
./cjpeg -sample 2x1 -dct fast -opt -outfile testout_422_ifast_opt.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
md5/md5cmp $(MD5_PPM_INT_1_4) testoutint1_4.ppm;
|
md5/md5cmp $(MD5_JPEG_422_IFAST_OPT) testout_422_ifast_opt.jpg
|
||||||
./djpeg -dct int -nosmooth -scale 1/8 -ppm -outfile testoutint1_8.ppm $(srcdir)/testimages/testorig.jpg;
|
# CC: YCC->RGB SAMP: fullsize/h2v1 fancy IDCT: ifast ENT: huff
|
||||||
md5/md5cmp $(MD5_PPM_INT_1_8) testoutint1_8.ppm;
|
./djpeg -dct fast -outfile testout_422_ifast.ppm testout_422_ifast_opt.jpg
|
||||||
./djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm $(srcdir)/testimages/testorig.jpg
|
md5/md5cmp $(MD5_PPM_422_IFAST) testout_422_ifast.ppm
|
||||||
md5/md5cmp $(MD5_PPM_FAST_1_2) testoutfst1_2.ppm
|
rm -f testout_422_ifast.ppm
|
||||||
./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testimages/testorig.jpg
|
# CC: YCC->RGB SAMP: h2v1 merged IDCT: ifast ENT: huff
|
||||||
md5/md5cmp $(MD5_BMP_256) testout.bmp
|
./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 -f testout_422m_ifast.ppm
|
||||||
|
if WITH_12BIT
|
||||||
|
rm -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f testout_gray_islow_rgb.ppm
|
||||||
|
if WITH_12BIT
|
||||||
|
rm -f 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 -f 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 -f 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 -f 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
|
||||||
|
# FLOATTEST=387 validate against the expected results from the C code when
|
||||||
|
# the 387 FPU is being used for floating point math (which is
|
||||||
|
# generally the default with x86 compilers)
|
||||||
|
|
||||||
|
# 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; \
|
||||||
|
elif [ "${FLOATTEST}" = "387" ]; then \
|
||||||
|
md5/md5cmp $(MD5_JPEG_3x2_FLOAT_PROG_387) 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; \
|
||||||
|
elif [ "${FLOATTEST}" = "387" ]; then \
|
||||||
|
md5/md5cmp $(MD5_PPM_3x2_FLOAT_387) testout_3x2_float.ppm; \
|
||||||
|
fi
|
||||||
|
rm -f 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 -f testout_3x2_ifast.ppm testout_3x2_ifast_prog.jpg
|
||||||
|
|
||||||
if WITH_ARITH_ENC
|
if WITH_ARITH_ENC
|
||||||
./cjpeg -dct int -arithmetic -outfile testoutari.jpg $(srcdir)/testimages/testorig.ppm
|
# CC: YCC->RGB SAMP: fullsize/h2v2 FDCT: islow ENT: arith
|
||||||
md5/md5cmp $(MD5_JPEG_ARI) testoutari.jpg
|
./cjpeg -dct int -arithmetic -outfile testout_420_islow_ari.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
./jpegtran -arithmetic -outfile testouta.jpg $(srcdir)/testimages/testimgint.jpg
|
md5/md5cmp $(MD5_JPEG_420_ISLOW_ARI) testout_420_islow_ari.jpg
|
||||||
md5/md5cmp $(MD5_JPEG_ARI) testouta.jpg
|
rm -f testout_420_islow_ari.jpg
|
||||||
./cjpeg -dct int -progressive -arithmetic -sample 1x1 -outfile testoutpa.jpg $(srcdir)/testimages/testorig.ppm
|
./jpegtran -arithmetic -outfile testout_420_islow_ari.jpg $(srcdir)/testimages/testimgint.jpg
|
||||||
md5/md5cmp $(MD5_JPEG_PROG_ARI) testoutpa.jpg
|
md5/md5cmp $(MD5_JPEG_420_ISLOW_ARI) testout_420_islow_ari.jpg
|
||||||
|
rm -f testout_420_islow_ari.jpg
|
||||||
|
# CC: YCC->RGB SAMP: fullsize FDCT: islow ENT: prog arith
|
||||||
|
./cjpeg -sample 1x1 -dct int -prog -arithmetic -outfile testout_444_islow_progari.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
md5/md5cmp $(MD5_JPEG_444_ISLOW_PROGARI) testout_444_islow_progari.jpg
|
||||||
|
rm -f testout_444_islow_progari.jpg
|
||||||
endif
|
endif
|
||||||
if WITH_ARITH_DEC
|
if WITH_ARITH_DEC
|
||||||
./djpeg -dct int -fast -ppm -outfile testoutari.ppm $(srcdir)/testimages/testimgari.jpg
|
# CC: RGB->YCC SAMP: h2v2 merged IDCT: ifast ENT: arith
|
||||||
md5/md5cmp $(MD5_PPM_ARI) testoutari.ppm
|
./djpeg -fast -ppm -outfile testout_420m_ifast_ari.ppm $(srcdir)/testimages/testimgari.jpg
|
||||||
./jpegtran -outfile testouta.jpg $(srcdir)/testimages/testimgari.jpg
|
md5/md5cmp $(MD5_PPM_420M_IFAST_ARI) testout_420m_ifast_ari.ppm
|
||||||
md5/md5cmp $(MD5_JPEG_INT) testouta.jpg
|
rm -f 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 -f testout_420_islow.jpg
|
||||||
endif
|
endif
|
||||||
./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testimages/testorig.ppm
|
|
||||||
md5/md5cmp $(MD5_JPEG_PROG) testoutp.jpg
|
# CC: YCC->RGB SAMP: h2v2 merged IDCT: 16x16 islow ENT: huff
|
||||||
./jpegtran -outfile testoutt.jpg testoutp.jpg
|
./djpeg -dct int -scale 2/1 -nosmooth -ppm -outfile testout_420m_islow_2_1.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
md5/md5cmp $(MD5_JPEG_INT) testoutt.jpg
|
md5/md5cmp $(MD5_PPM_420M_ISLOW_2_1) testout_420m_islow_2_1.ppm
|
||||||
./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testimages/testorig.jpg
|
rm -f testout_420m_islow_2_1.ppm
|
||||||
md5/md5cmp $(MD5_JPEG_CROP) testoutcrop.jpg
|
# 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f 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 -f testout_420m_islow_565D.bmp
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Partial decode tests. These tests are designed to cover all of the possible
|
||||||
|
# code paths in jpeg_skip_scanlines().
|
||||||
|
|
||||||
|
# Context rows: Yes Intra-iMCU row: Yes iMCU row prefetch: No ENT: huff
|
||||||
|
./djpeg -dct int -skip 15,31 -ppm -outfile testout_420_islow_skip15,31.ppm $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_PPM_420_ISLOW_SKIP15_31) testout_420_islow_skip15,31.ppm
|
||||||
|
rm -f testout_420_islow_skip15,31.ppm
|
||||||
|
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: Yes ENT: arith
|
||||||
|
if WITH_ARITH_DEC
|
||||||
|
./djpeg -dct int -skip 16,139 -ppm -outfile testout_420_islow_ari_skip16,139.ppm $(srcdir)/testimages/testimgari.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_420_ISLOW_ARI_SKIP16_139) testout_420_islow_ari_skip16,139.ppm
|
||||||
|
rm -f testout_420_islow_ari_skip16,139.ppm
|
||||||
|
endif
|
||||||
|
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No ENT: prog huff
|
||||||
|
./cjpeg -dct int -prog -outfile testout_420_islow_prog.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
./djpeg -dct int -crop 62x62+71+71 -ppm -outfile testout_420_islow_prog_crop62x62,71,71.ppm testout_420_islow_prog.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71) testout_420_islow_prog_crop62x62,71,71.ppm
|
||||||
|
rm -f testout_420_islow_prog_crop62x62,71,71.ppm testout_420_islow_prog.jpg
|
||||||
|
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No ENT: arith
|
||||||
|
if WITH_ARITH_DEC
|
||||||
|
./djpeg -dct int -crop 53x53+4+4 -ppm -outfile testout_420_islow_ari_crop53x53,4,4.ppm $(srcdir)/testimages/testimgari.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_420_ISLOW_ARI_CROP53x53_4_4) testout_420_islow_ari_crop53x53,4,4.ppm
|
||||||
|
rm -f testout_420_islow_ari_crop53x53,4,4.ppm
|
||||||
|
endif
|
||||||
|
# Context rows: No Intra-iMCU row: Yes ENT: huff
|
||||||
|
./cjpeg -dct int -sample 1x1 -outfile testout_444_islow.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
./djpeg -dct int -skip 1,6 -ppm -outfile testout_444_islow_skip1,6.ppm testout_444_islow.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_444_ISLOW_SKIP1_6) testout_444_islow_skip1,6.ppm
|
||||||
|
rm -f testout_444_islow_skip1,6.ppm testout_444_islow.jpg
|
||||||
|
# Context rows: No Intra-iMCU row: No ENT: prog huff
|
||||||
|
./cjpeg -dct int -prog -sample 1x1 -outfile testout_444_islow_prog.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
./djpeg -dct int -crop 98x98+13+13 -ppm -outfile testout_444_islow_prog_crop98x98,13,13.ppm testout_444_islow_prog.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13) testout_444_islow_prog_crop98x98,13,13.ppm
|
||||||
|
rm -f testout_444_islow_prog_crop98x98,13,13.ppm testout_444_islow_prog.jpg
|
||||||
|
# Context rows: No Intra-iMCU row: No ENT: arith
|
||||||
|
if WITH_ARITH_ENC
|
||||||
|
./cjpeg -dct int -arithmetic -sample 1x1 -outfile testout_444_islow_ari.jpg $(srcdir)/testimages/testorig.ppm
|
||||||
|
if WITH_ARITH_DEC
|
||||||
|
./djpeg -dct int -crop 37x37+0+0 -ppm -outfile testout_444_islow_ari_crop37x37,0,0.ppm testout_444_islow_ari.jpg
|
||||||
|
md5/md5cmp $(MD5_PPM_444_ISLOW_ARI_CROP37x37_0_0) testout_444_islow_ari_crop37x37,0,0.ppm
|
||||||
|
rm -f testout_444_islow_ari_crop37x37,0,0.ppm
|
||||||
|
endif
|
||||||
|
rm -f testout_444_islow_ari.jpg
|
||||||
|
endif
|
||||||
|
|
||||||
|
./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testout_crop.jpg $(srcdir)/testimages/$(TESTORIG)
|
||||||
|
md5/md5cmp $(MD5_JPEG_CROP) testout_crop.jpg
|
||||||
|
rm -f testout_crop.jpg
|
||||||
|
echo GREAT SUCCESS!
|
||||||
|
|
||||||
|
|
||||||
testclean:
|
testclean:
|
||||||
@@ -314,12 +692,23 @@ testclean:
|
|||||||
rm -f *_440_*.ppm
|
rm -f *_440_*.ppm
|
||||||
rm -f *_440_*.jpg
|
rm -f *_440_*.jpg
|
||||||
rm -f *_440.yuv
|
rm -f *_440.yuv
|
||||||
|
rm -f *_411_*.bmp
|
||||||
|
rm -f *_411_*.png
|
||||||
|
rm -f *_411_*.ppm
|
||||||
|
rm -f *_411_*.jpg
|
||||||
|
rm -f *_411.yuv
|
||||||
|
rm -f tjbenchtest*.log
|
||||||
|
rm -f tjexampletest*.log
|
||||||
|
|
||||||
|
|
||||||
tjtest:
|
tjtest:
|
||||||
sh ./tjbenchtest
|
sh ./tjbenchtest
|
||||||
|
sh ./tjbenchtest -alloc
|
||||||
|
sh ./tjbenchtest -yuv
|
||||||
|
sh ./tjbenchtest -yuv -alloc
|
||||||
if WITH_JAVA
|
if WITH_JAVA
|
||||||
sh ./tjbenchtest.java
|
sh ./tjbenchtest.java
|
||||||
|
sh ./tjbenchtest.java -yuv
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
@@ -384,12 +773,12 @@ udmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
|||||||
sh pkgscripts/makemacpkg -build32 ${BUILDDIR32}
|
sh pkgscripts/makemacpkg -build32 ${BUILDDIR32}
|
||||||
|
|
||||||
iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
||||||
sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S}
|
sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S} -buildarmv8 ${BUILDDIRARMV8} -lipo "${LIPO}"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
||||||
sh pkgscripts/makemacpkg -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S}
|
sh pkgscripts/makemacpkg -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S} -buildarmv8 ${BUILDDIRARMV8} -lipo "${LIPO}"
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
475
README-turbo.txt
475
README-turbo.txt
@@ -1,475 +0,0 @@
|
|||||||
*******************************************************************************
|
|
||||||
** 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.
|
|
||||||
|
|
||||||
======================
|
|
||||||
Installation Directory
|
|
||||||
======================
|
|
||||||
|
|
||||||
This document assumes that libjpeg-turbo will be installed in the default
|
|
||||||
directory (/opt/libjpeg-turbo on Un*x and Mac systems and
|
|
||||||
c:\libjpeg-turbo[-gcc][64] on Windows systems. If your installation of
|
|
||||||
libjpeg-turbo resides in a different directory, then adjust the instructions
|
|
||||||
accordingly.
|
|
||||||
|
|
||||||
=============================
|
|
||||||
Replacing libjpeg at Run Time
|
|
||||||
=============================
|
|
||||||
|
|
||||||
Un*x
|
|
||||||
----
|
|
||||||
|
|
||||||
If a Un*x application is dynamically linked with libjpeg, then you can replace
|
|
||||||
libjpeg with libjpeg-turbo at run time by manipulating LD_LIBRARY_PATH.
|
|
||||||
For instance:
|
|
||||||
|
|
||||||
[Using libjpeg]
|
|
||||||
> time cjpeg <vgl_5674_0098.ppm >vgl_5674_0098.jpg
|
|
||||||
real 0m0.392s
|
|
||||||
user 0m0.074s
|
|
||||||
sys 0m0.020s
|
|
||||||
|
|
||||||
[Using libjpeg-turbo]
|
|
||||||
> export LD_LIBRARY_PATH=/opt/libjpeg-turbo/{lib}:$LD_LIBRARY_PATH
|
|
||||||
> time cjpeg <vgl_5674_0098.ppm >vgl_5674_0098.jpg
|
|
||||||
real 0m0.109s
|
|
||||||
user 0m0.029s
|
|
||||||
sys 0m0.010s
|
|
||||||
|
|
||||||
({lib} = lib32 or lib64, depending on whether you wish to use the 32-bit or the
|
|
||||||
64-bit version of libjpeg-turbo.)
|
|
||||||
|
|
||||||
System administrators can also replace the libjpeg symlinks in /usr/lib* with
|
|
||||||
links to the libjpeg-turbo dynamic library located in /opt/libjpeg-turbo/{lib}.
|
|
||||||
This will effectively accelerate every application that uses the libjpeg
|
|
||||||
dynamic library on the system.
|
|
||||||
|
|
||||||
Windows
|
|
||||||
-------
|
|
||||||
|
|
||||||
If a Windows application is dynamically linked with libjpeg, then you can
|
|
||||||
replace libjpeg with libjpeg-turbo at run time by backing up the application's
|
|
||||||
copy of jpeg62.dll, jpeg7.dll, or jpeg8.dll (assuming the application has its
|
|
||||||
own local copy of this library) and copying the corresponding DLL from
|
|
||||||
libjpeg-turbo into the application's install directory. The official
|
|
||||||
libjpeg-turbo binary packages only provide jpeg62.dll. If the application uses
|
|
||||||
jpeg7.dll or jpeg8.dll instead, then it will be necessary to build
|
|
||||||
libjpeg-turbo from source (see "libjpeg v7 and v8 API/ABI Emulation" below.)
|
|
||||||
|
|
||||||
The following information is specific to the official libjpeg-turbo binary
|
|
||||||
packages for Visual C++:
|
|
||||||
|
|
||||||
-- jpeg62.dll requires the Visual C++ 2008 C run-time DLL (msvcr90.dll).
|
|
||||||
msvcr90.dll ships with more recent versions of Windows, but users of older
|
|
||||||
Windows releases can obtain it from the Visual C++ 2008 Redistributable
|
|
||||||
Package, which is available as a free download from Microsoft's web site.
|
|
||||||
|
|
||||||
-- Features of the libjpeg API that require passing a C run-time structure,
|
|
||||||
such as a file handle, from an application to the library will probably not
|
|
||||||
work with jpeg62.dll, unless the application is also built to use the Visual
|
|
||||||
C++ 2008 C run-time DLL. In particular, this affects jpeg_stdio_dest() and
|
|
||||||
jpeg_stdio_src().
|
|
||||||
|
|
||||||
Mac
|
|
||||||
---
|
|
||||||
|
|
||||||
Mac applications typically embed their own copies of the libjpeg dylib inside
|
|
||||||
the (hidden) application bundle, so it is not possible to globally replace
|
|
||||||
libjpeg on OS X systems. Replacing the application's version of the libjpeg
|
|
||||||
dylib would generally involve copying libjpeg.*.dylib from libjpeg-turbo into
|
|
||||||
the appropriate place in the application bundle and using install_name_tool to
|
|
||||||
repoint the libjpeg-turbo dylib to its new directory. This requires an
|
|
||||||
advanced knowledge of OS X and would not survive an upgrade or a re-install of
|
|
||||||
the application. Thus, it is not recommended for most users.
|
|
||||||
|
|
||||||
========================================
|
|
||||||
Using libjpeg-turbo in Your Own Programs
|
|
||||||
========================================
|
|
||||||
|
|
||||||
For the most part, libjpeg-turbo should work identically to libjpeg, so in
|
|
||||||
most cases, an application can be built against libjpeg and then run against
|
|
||||||
libjpeg-turbo. On Un*x systems and Cygwin, you can build against libjpeg-turbo
|
|
||||||
instead of libjpeg by setting
|
|
||||||
|
|
||||||
CPATH=/opt/libjpeg-turbo/include
|
|
||||||
and
|
|
||||||
LIBRARY_PATH=/opt/libjpeg-turbo/{lib}
|
|
||||||
|
|
||||||
({lib} = lib32 or lib64, depending on whether you are building a 32-bit or a
|
|
||||||
64-bit application.)
|
|
||||||
|
|
||||||
If using MinGW, then set
|
|
||||||
|
|
||||||
CPATH=/c/libjpeg-turbo-gcc[64]/include
|
|
||||||
and
|
|
||||||
LIBRARY_PATH=/c/libjpeg-turbo-gcc[64]/lib
|
|
||||||
|
|
||||||
Building against libjpeg-turbo is useful, for instance, if you want to build an
|
|
||||||
application that leverages the libjpeg-turbo colorspace extensions (see below.)
|
|
||||||
On Un*x systems, you would still need to manipulate LD_LIBRARY_PATH or create
|
|
||||||
appropriate symlinks to use libjpeg-turbo at run time. On such systems, you
|
|
||||||
can pass -R /opt/libjpeg-turbo/{lib} to the linker to force the use of
|
|
||||||
libjpeg-turbo at run time rather than libjpeg (also useful if you want to
|
|
||||||
leverage the colorspace extensions), or you can link against the libjpeg-turbo
|
|
||||||
static library.
|
|
||||||
|
|
||||||
To force a Un*x or MinGW application to link against the static version of
|
|
||||||
libjpeg-turbo, you can use the following linker options:
|
|
||||||
|
|
||||||
-Wl,-Bstatic -ljpeg -Wl,-Bdynamic
|
|
||||||
|
|
||||||
On OS X, simply add /opt/libjpeg-turbo/lib/libjpeg.a to the linker command
|
|
||||||
line.
|
|
||||||
|
|
||||||
To build Visual C++ applications using libjpeg-turbo, add
|
|
||||||
c:\libjpeg-turbo[64]\include to the system or user INCLUDE environment
|
|
||||||
variable and c:\libjpeg-turbo[64]\lib to the system or user LIB environment
|
|
||||||
variable, and then link against either jpeg.lib (to use the DLL version of
|
|
||||||
libjpeg-turbo) or jpeg-static.lib (to use the static version of libjpeg-turbo.)
|
|
||||||
|
|
||||||
=====================
|
|
||||||
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 still 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 are not guaranteed to
|
|
||||||
be identical (the accuracy of the floating point DCT/IDCT is constant when
|
|
||||||
using libjpeg-turbo's SIMD extensions, but otherwise, it can depend heavily on
|
|
||||||
the compiler and 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 a bit 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.
|
|
||||||
|
|
||||||
-- When using the floating point IDCT, for the reasons stated above and also
|
|
||||||
because the floating point IDCT algorithm was modified in libjpeg v8a to
|
|
||||||
improve accuracy.
|
|
||||||
|
|
||||||
-- 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.
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
libjpeg-turbo note: This file has been modified by The libjpeg-turbo Project
|
libjpeg-turbo note: This file has been modified by The libjpeg-turbo Project
|
||||||
to include only information relevant to libjpeg-turbo, to wordsmith certain
|
to include only information relevant to libjpeg-turbo, to wordsmith certain
|
||||||
sections, and to remove impolitic language that existed in the libjpeg v8
|
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
|
README. It is included only for reference. Please see README.md for
|
||||||
information specific to libjpeg-turbo.
|
information specific to libjpeg-turbo.
|
||||||
|
|
||||||
|
|
||||||
@@ -36,7 +36,6 @@ 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.txt How to configure and install the IJG software.
|
|
||||||
usage.txt Usage instructions for cjpeg, djpeg, jpegtran,
|
usage.txt Usage instructions for cjpeg, djpeg, jpegtran,
|
||||||
rdjpgcom, and wrjpgcom.
|
rdjpgcom, and wrjpgcom.
|
||||||
*.1 Unix-style man pages for programs (same info as usage.txt).
|
*.1 Unix-style man pages for programs (same info as usage.txt).
|
||||||
@@ -48,9 +47,9 @@ Programmer and internal documentation:
|
|||||||
structure.txt Overview of the JPEG library's internal structure.
|
structure.txt Overview of the JPEG library's internal structure.
|
||||||
coderules.txt Coding style rules --- please read if you contribute code.
|
coderules.txt Coding style rules --- please read if you contribute code.
|
||||||
|
|
||||||
Please read at least the files install.txt and usage.txt. Some 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
|
||||||
@@ -62,7 +61,7 @@ OVERVIEW
|
|||||||
|
|
||||||
This package contains C software to implement JPEG image encoding, decoding,
|
This package contains C software to implement JPEG image encoding, decoding,
|
||||||
and transcoding. 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's strong suit is compressing
|
method for full-color and grayscale images. JPEG's strong suit is compressing
|
||||||
photographic images or other types of images that have smooth color and
|
photographic images or other types of images that have smooth color and
|
||||||
brightness transitions between neighboring pixels. Images with sharp lines or
|
brightness transitions between neighboring pixels. Images with sharp lines or
|
||||||
other abrupt features may not compress well with JPEG, and a higher JPEG
|
other abrupt features may not compress well with JPEG, and a higher JPEG
|
||||||
@@ -129,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-2012, Thomas G. Lane, Guido Vollbeding.
|
This software is copyright (C) 1991-2016, 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
|
||||||
@@ -167,11 +166,11 @@ ltmain.sh). Another support script, install-sh, is copyright by X Consortium
|
|||||||
but is also freely distributable.
|
but is also freely distributable.
|
||||||
|
|
||||||
The IJG distribution formerly included code to read and write GIF files.
|
The IJG distribution formerly included code to read and write GIF files.
|
||||||
To avoid entanglement with the Unisys LZW patent, GIF reading support has
|
To avoid entanglement with the Unisys LZW patent (now expired), GIF reading
|
||||||
been removed altogether, and the GIF writer has been simplified to produce
|
support has been removed altogether, and the GIF writer has been simplified
|
||||||
"uncompressed GIFs". This technique does not use the LZW algorithm; the
|
to produce "uncompressed GIFs". This technique does not use the LZW
|
||||||
resulting GIF files are larger than usual, but are readable by all standard
|
algorithm; the resulting GIF files are larger than usual, but are readable
|
||||||
GIF decoders.
|
by all standard GIF decoders.
|
||||||
|
|
||||||
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
|
||||||
@@ -190,8 +189,8 @@ 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 is
|
handy, a PDF file containing a revised version of Wallace's article is
|
||||||
available at http://www.ijg.org/files/wallace.ps.gz. The file (actually
|
available at http://www.ijg.org/files/Wallace.JPEG.pdf. 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 IEEE,
|
and some added material. Note: the Wallace article is copyright ACM and IEEE,
|
||||||
@@ -247,9 +246,7 @@ ARCHIVE LOCATIONS
|
|||||||
|
|
||||||
The "official" archive site for this software is www.ijg.org.
|
The "official" archive site for this software is www.ijg.org.
|
||||||
The most recent released version can always be found there in
|
The most recent released version can always be found there in
|
||||||
directory "files". This particular version will be archived as
|
directory "files".
|
||||||
http://www.ijg.org/files/jpegsrc.v8d.tar.gz, and in Windows-compatible
|
|
||||||
"zip" archive format as http://www.ijg.org/files/jpegsr8d.zip.
|
|
||||||
|
|
||||||
The JPEG FAQ (Frequently Asked Questions) article is a source of some
|
The JPEG FAQ (Frequently Asked Questions) article is a source of some
|
||||||
general information about JPEG.
|
general information about JPEG.
|
||||||
341
README.md
Executable file
341
README.md
Executable file
@@ -0,0 +1,341 @@
|
|||||||
|
Background
|
||||||
|
==========
|
||||||
|
|
||||||
|
libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2,
|
||||||
|
NEON, AltiVec) to accelerate baseline JPEG compression and decompression on
|
||||||
|
x86, x86-64, ARM, and PowerPC systems. On such systems, libjpeg-turbo is
|
||||||
|
generally 2-6x as fast as libjpeg, all else being equal. On other types of
|
||||||
|
systems, libjpeg-turbo can still 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
|
||||||
|
=======
|
||||||
|
|
||||||
|
libjpeg-turbo is covered by three compatible BSD-style open source licenses.
|
||||||
|
Refer to [LICENSE.md](LICENSE.md) for a roll-up of license terms.
|
||||||
|
|
||||||
|
|
||||||
|
Building libjpeg-turbo
|
||||||
|
======================
|
||||||
|
|
||||||
|
Refer to [BUILDING.md](BUILDING.md) for complete instructions.
|
||||||
|
|
||||||
|
|
||||||
|
Using libjpeg-turbo
|
||||||
|
===================
|
||||||
|
|
||||||
|
libjpeg-turbo includes two APIs that can be used to compress and decompress
|
||||||
|
JPEG images:
|
||||||
|
|
||||||
|
- **TurboJPEG API**<br>
|
||||||
|
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**<br>
|
||||||
|
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](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**<br>
|
||||||
|
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**<br>
|
||||||
|
See notes below.
|
||||||
|
|
||||||
|
- **cjpeg: Separate quality settings for luminance and chrominance**<br>
|
||||||
|
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**<br>
|
||||||
|
`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**<br>
|
||||||
|
`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**<br>
|
||||||
|
`cinfo.do_fancy_downsampling` is silently ignored.
|
||||||
|
This requires the DCT scaling feature, which is not supported.
|
||||||
|
|
||||||
|
- **jpegtran: Scaling**<br>
|
||||||
|
This requires both the DCT scaling and SmartScale features, which are not
|
||||||
|
supported.
|
||||||
|
|
||||||
|
- **Lossless RGB JPEG files**<br>
|
||||||
|
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. Furthermore, 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. Therefore, at this time it is our belief
|
||||||
|
that there is not sufficient technical justification for software projects to
|
||||||
|
upgrade from libjpeg v8 to libjpeg v9, and thus there is 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.1.0 to 62.2.0 if using libjpeg v6b API/ABI
|
||||||
|
emulation and from 7.1.0 to 7.2.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.
|
||||||
105
acinclude.m4
105
acinclude.m4
@@ -3,8 +3,11 @@
|
|||||||
# Check that NASM exists and determine flags
|
# Check that NASM exists and determine flags
|
||||||
AC_DEFUN([AC_PROG_NASM],[
|
AC_DEFUN([AC_PROG_NASM],[
|
||||||
|
|
||||||
|
AC_ARG_VAR(NASM, [NASM command (used to build the x86/x86-64 SIMD code)])
|
||||||
|
if test "x$NASM" = "x"; then
|
||||||
AC_CHECK_PROGS(NASM, [nasm nasmw yasm])
|
AC_CHECK_PROGS(NASM, [nasm nasmw yasm])
|
||||||
test -z "$NASM" && AC_MSG_ERROR([no nasm (Netwide Assembler) found])
|
test -z "$NASM" && AC_MSG_ERROR([no nasm (Netwide Assembler) found])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([for object file format of host system])
|
AC_MSG_CHECKING([for object file format of host system])
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
@@ -180,3 +183,105 @@ AC_DEFUN([AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE],[
|
|||||||
$2
|
$2
|
||||||
fi
|
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
|
||||||
|
MYVAR .req x0
|
||||||
|
movi v0.16b, #100
|
||||||
|
mov MYVAR, #100
|
||||||
|
.unreq MYVAR]])], 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
|
||||||
|
MYVAR .req x0
|
||||||
|
movi v0.16b, #100
|
||||||
|
mov MYVAR, #100
|
||||||
|
.unreq MYVAR]])], 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_ALTIVEC
|
||||||
|
# ----------------
|
||||||
|
# Test whether AltiVec intrinsics are supported
|
||||||
|
AC_DEFUN([AC_CHECK_ALTIVEC],[
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -maltivec"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
#include <altivec.h>
|
||||||
|
int main(void) {
|
||||||
|
__vector int vi = { 0, 0, 0, 0 };
|
||||||
|
int i[4];
|
||||||
|
vec_st(vi, 0, i);
|
||||||
|
return i[0];
|
||||||
|
}]])], ac_has_altivec=yes)
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
if test "x$ac_has_altivec" = "xyes" ; then
|
||||||
|
$1
|
||||||
|
else
|
||||||
|
$2
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_NO_SIMD],[
|
||||||
|
AC_MSG_RESULT([no ("$1")])
|
||||||
|
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
|
||||||
|
])
|
||||||
|
|||||||
57
appveyor.yml
Normal file
57
appveyor.yml
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
install:
|
||||||
|
- cmd: >-
|
||||||
|
mkdir c:\installers
|
||||||
|
|
||||||
|
mkdir c:\temp
|
||||||
|
|
||||||
|
curl -fSL -o c:\installers\nasm-2.10.01-win32.zip http://www.nasm.us/pub/nasm/releasebuilds/2.10.01/win32/nasm-2.10.01-win32.zip
|
||||||
|
|
||||||
|
7z x c:\installers\nasm-2.10.01-win32.zip -oc:\ > c:\installers\nasm.install.log
|
||||||
|
|
||||||
|
set INCLUDE=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include
|
||||||
|
|
||||||
|
set LIB=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\lib\x64
|
||||||
|
|
||||||
|
set PATH=c:\nasm-2.10.01;c:\Program Files (x86)\NSIS;c:\msys64\mingw32\bin;c:\msys64\usr\bin;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin\x64;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin;%PATH%
|
||||||
|
|
||||||
|
set MSYSTEM=MINGW32
|
||||||
|
|
||||||
|
bash -c "pacman --noconfirm -S autoconf automake libtool zip"
|
||||||
|
|
||||||
|
mklink /d "%ProgramData%\Oracle\Java32" "c:\Program Files (x86)\Java\jdk1.6.0"
|
||||||
|
|
||||||
|
git clone --depth=1 https://github.com/libjpeg-turbo/buildscripts.git c:/buildscripts
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- cmd: >-
|
||||||
|
for /f %%i in ('"cygpath %CD%"') do set MINGWPATH=%%i
|
||||||
|
|
||||||
|
bash c:/buildscripts/buildljt -r file://%MINGWPATH% -b /c/ljt.nightly %APPVEYOR_REPO_BRANCH% -v
|
||||||
|
|
||||||
|
move c:\ljt.nightly\files\*.tar.gz .
|
||||||
|
|
||||||
|
move c:\ljt.nightly\files\*.exe .
|
||||||
|
|
||||||
|
move c:\ljt.nightly\files\*.zip .
|
||||||
|
|
||||||
|
move c:\ljt.nightly\log-windows.txt .
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
- path: '*.tar.gz'
|
||||||
|
name: Source tarball
|
||||||
|
|
||||||
|
- path: '*-gcc*.exe'
|
||||||
|
name: SDK for MinGW
|
||||||
|
|
||||||
|
- path: '*-vc*.exe'
|
||||||
|
name: SDK for Visual C++
|
||||||
|
|
||||||
|
- path: '*.zip'
|
||||||
|
name: Windows JNI JARs
|
||||||
|
|
||||||
|
- path: 'log-windows.txt'
|
||||||
|
name: Build log
|
||||||
|
|
||||||
|
test: off
|
||||||
|
|
||||||
|
deploy: off
|
||||||
89
bmp.c
89
bmp.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011, 2015 D. R. Commander. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -75,24 +75,91 @@ static void my_output_message(j_common_ptr cinfo)
|
|||||||
static void pixelconvert(unsigned char *srcbuf, int srcpf, int srcbottomup,
|
static void pixelconvert(unsigned char *srcbuf, int srcpf, int srcbottomup,
|
||||||
unsigned char *dstbuf, int dstpf, int dstbottomup, int w, int h)
|
unsigned char *dstbuf, int dstpf, int dstbottomup, int w, int h)
|
||||||
{
|
{
|
||||||
unsigned char *srcptr=srcbuf, *srcptr2;
|
unsigned char *srcrowptr=srcbuf, *srccolptr;
|
||||||
int srcps=tjPixelSize[srcpf];
|
int srcps=tjPixelSize[srcpf];
|
||||||
int srcstride=srcbottomup? -w*srcps:w*srcps;
|
int srcstride=srcbottomup? -w*srcps:w*srcps;
|
||||||
unsigned char *dstptr=dstbuf, *dstptr2;
|
unsigned char *dstrowptr=dstbuf, *dstcolptr;
|
||||||
int dstps=tjPixelSize[dstpf];
|
int dstps=tjPixelSize[dstpf];
|
||||||
int dststride=dstbottomup? -w*dstps:w*dstps;
|
int dststride=dstbottomup? -w*dstps:w*dstps;
|
||||||
int row, col;
|
int row, col;
|
||||||
|
|
||||||
if(srcbottomup) srcptr=&srcbuf[w*srcps*(h-1)];
|
if(srcbottomup) srcrowptr=&srcbuf[w*srcps*(h-1)];
|
||||||
if(dstbottomup) dstptr=&dstbuf[w*dstps*(h-1)];
|
if(dstbottomup) dstrowptr=&dstbuf[w*dstps*(h-1)];
|
||||||
for(row=0; row<h; row++, srcptr+=srcstride, dstptr+=dststride)
|
|
||||||
|
/* 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(col=0, srcptr2=srcptr, dstptr2=dstptr; col<w; col++, srcptr2+=srcps,
|
for(row=0; row<h; row++, srcrowptr+=srcstride, dstrowptr+=dststride)
|
||||||
dstptr2+=dstps)
|
|
||||||
{
|
{
|
||||||
dstptr2[tjRedOffset[dstpf]]=srcptr2[tjRedOffset[srcpf]];
|
for(col=0, srccolptr=srcrowptr, dstcolptr=dstrowptr;
|
||||||
dstptr2[tjGreenOffset[dstpf]]=srcptr2[tjGreenOffset[srcpf]];
|
col<w; col++, srccolptr+=srcps)
|
||||||
dstptr2[tjBlueOffset[dstpf]]=srcptr2[tjBlueOffset[srcpf]];
|
{
|
||||||
|
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]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||||
* Modified 2009 by Guido Vollbeding.
|
* 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.ijg
|
||||||
|
* file.
|
||||||
*
|
*
|
||||||
* This file defines the error and message codes for the cjpeg/djpeg
|
* This file defines the error and message codes for the cjpeg/djpeg
|
||||||
* applications. These strings are not needed as part of the JPEG library
|
* applications. These strings are not needed as part of the JPEG library
|
||||||
@@ -74,6 +75,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_TOOLARGE, "Integer value too large in PPM file")
|
||||||
JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM 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")
|
||||||
|
|||||||
47
cdjpeg.c
47
cdjpeg.c
@@ -1,9 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* cdjpeg.c
|
* cdjpeg.c
|
||||||
*
|
*
|
||||||
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* It was modified by The libjpeg-turbo Project to include only code relevant
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* to libjpeg-turbo.
|
||||||
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* file.
|
||||||
*
|
*
|
||||||
* This file contains common support routines used by the IJG application
|
* This file contains common support routines used by the IJG application
|
||||||
* programs (cjpeg, djpeg, jpegtran).
|
* programs (cjpeg, djpeg, jpegtran).
|
||||||
@@ -11,9 +14,6 @@
|
|||||||
|
|
||||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||||
#include <ctype.h> /* to declare isupper(), tolower() */
|
#include <ctype.h> /* to declare isupper(), tolower() */
|
||||||
#ifdef NEED_SIGNAL_CATCHER
|
|
||||||
#include <signal.h> /* to declare signal() */
|
|
||||||
#endif
|
|
||||||
#ifdef USE_SETMODE
|
#ifdef USE_SETMODE
|
||||||
#include <fcntl.h> /* to declare setmode()'s parameter macros */
|
#include <fcntl.h> /* to declare setmode()'s parameter macros */
|
||||||
/* If you have setmode() but not <io.h>, just delete this line: */
|
/* If you have setmode() but not <io.h>, just delete this line: */
|
||||||
@@ -21,43 +21,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
void /* must be global for Manx C */
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GLOBAL(void)
|
|
||||||
enable_signal_catcher (j_common_ptr cinfo)
|
|
||||||
{
|
|
||||||
sig_cinfo = cinfo;
|
|
||||||
#ifdef SIGINT /* not all systems have SIGINT */
|
|
||||||
signal(SIGINT, signal_catcher);
|
|
||||||
#endif
|
|
||||||
#ifdef SIGTERM /* not all systems have SIGTERM */
|
|
||||||
signal(SIGTERM, signal_catcher);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optional progress monitor: display a percent-done figure on stderr.
|
* Optional progress monitor: display a percent-done figure on stderr.
|
||||||
*/
|
*/
|
||||||
|
|||||||
126
cdjpeg.h
126
cdjpeg.h
@@ -1,9 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* cdjpeg.h
|
* cdjpeg.h
|
||||||
*
|
*
|
||||||
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* libjpeg-turbo Modifications:
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* Copyright (C) 2017, D. R. Commander.
|
||||||
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* 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.
|
||||||
@@ -24,12 +27,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 +48,20 @@ 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));
|
/* Re-calculate buffer dimensions based on output dimensions (for use with
|
||||||
|
partial image decompression.) If this is NULL, then the output format
|
||||||
|
does not support partial image decompression (BMP and RLE, in particular,
|
||||||
|
cannot support partial decompression because they use an inversion buffer
|
||||||
|
to write the image in bottom-up order.) */
|
||||||
|
void (*calc_buffer_dimensions) (j_decompress_ptr cinfo,
|
||||||
|
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;
|
||||||
@@ -89,69 +94,43 @@ 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_quant_tables RdQTables
|
|
||||||
#define read_scan_script RdScnScript
|
|
||||||
#define set_quality_ratings SetQRates
|
|
||||||
#define set_quant_slots SetQSlots
|
|
||||||
#define set_sample_factors SetSFacts
|
|
||||||
#define read_color_map RdCMap
|
|
||||||
#define enable_signal_catcher EnSigCatcher
|
|
||||||
#define start_progress_monitor StProgMon
|
|
||||||
#define end_progress_monitor EnProgMon
|
|
||||||
#define read_stdin RdStdin
|
|
||||||
#define write_stdout WrStdout
|
|
||||||
#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);
|
||||||
|
|
||||||
/* cjpeg support routines (in rdswitch.c) */
|
/* cjpeg support routines (in rdswitch.c) */
|
||||||
|
|
||||||
EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
|
EXTERN(boolean) read_quant_tables (j_compress_ptr cinfo, char *filename,
|
||||||
boolean force_baseline));
|
boolean force_baseline);
|
||||||
EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
|
EXTERN(boolean) read_scan_script (j_compress_ptr cinfo, char *filename);
|
||||||
EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg,
|
EXTERN(boolean) set_quality_ratings (j_compress_ptr cinfo, char *arg,
|
||||||
boolean force_baseline));
|
boolean force_baseline);
|
||||||
EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
|
EXTERN(boolean) set_quant_slots (j_compress_ptr cinfo, char *arg);
|
||||||
EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
|
EXTERN(boolean) set_sample_factors (j_compress_ptr cinfo, char *arg);
|
||||||
|
|
||||||
/* djpeg support routines (in rdcolmap.c) */
|
/* djpeg support routines (in rdcolmap.c) */
|
||||||
|
|
||||||
EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
|
EXTERN(void) read_color_map (j_decompress_ptr cinfo, FILE *infile);
|
||||||
|
|
||||||
/* common support routines (in cdjpeg.c) */
|
/* common support routines (in cdjpeg.c) */
|
||||||
|
|
||||||
EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
|
EXTERN(void) enable_signal_catcher (j_common_ptr cinfo);
|
||||||
EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
|
EXTERN(void) start_progress_monitor (j_common_ptr cinfo,
|
||||||
cd_progress_ptr progress));
|
cd_progress_ptr progress);
|
||||||
EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
|
EXTERN(void) end_progress_monitor (j_common_ptr cinfo);
|
||||||
EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
|
EXTERN(boolean) keymatch (char *arg, const char *keyword, int minchars);
|
||||||
EXTERN(FILE *) read_stdin JPP((void));
|
EXTERN(FILE *) read_stdin (void);
|
||||||
EXTERN(FILE *) write_stdout JPP((void));
|
EXTERN(FILE *) write_stdout (void);
|
||||||
|
|
||||||
/* miscellaneous useful macros */
|
/* miscellaneous useful macros */
|
||||||
|
|
||||||
@@ -159,29 +138,16 @@ EXTERN(FILE *) write_stdout JPP((void));
|
|||||||
#define READ_BINARY "r"
|
#define READ_BINARY "r"
|
||||||
#define WRITE_BINARY "w"
|
#define WRITE_BINARY "w"
|
||||||
#else
|
#else
|
||||||
#ifdef VMS /* VMS is very nonstandard */
|
|
||||||
#define READ_BINARY "rb", "ctx=stm"
|
|
||||||
#define WRITE_BINARY "wb", "ctx=stm"
|
|
||||||
#else /* standard ANSI-compliant case */
|
|
||||||
#define READ_BINARY "rb"
|
#define READ_BINARY "rb"
|
||||||
#define WRITE_BINARY "wb"
|
#define WRITE_BINARY "wb"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef EXIT_FAILURE /* define exit() codes if not provided */
|
#ifndef EXIT_FAILURE /* define exit() codes if not provided */
|
||||||
#define EXIT_FAILURE 1
|
#define EXIT_FAILURE 1
|
||||||
#endif
|
#endif
|
||||||
#ifndef EXIT_SUCCESS
|
#ifndef EXIT_SUCCESS
|
||||||
#ifdef VMS
|
|
||||||
#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
|
|
||||||
#else
|
|
||||||
#define EXIT_SUCCESS 0
|
#define EXIT_SUCCESS 0
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
#ifndef EXIT_WARNING
|
#ifndef EXIT_WARNING
|
||||||
#ifdef VMS
|
|
||||||
#define EXIT_WARNING 1 /* VMS is very nonstandard */
|
|
||||||
#else
|
|
||||||
#define EXIT_WARNING 2
|
#define EXIT_WARNING 2
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|||||||
23
change.log
23
change.log
@@ -1,9 +1,28 @@
|
|||||||
NOTE: This file was modified by The libjpeg-turbo Project to include only
|
libjpeg-turbo note: This file has been modified by The libjpeg-turbo Project
|
||||||
information relevant to libjpeg-turbo.
|
to include only information relevant to libjpeg-turbo. It is included only for
|
||||||
|
reference. Please see ChangeLog.md for information specific to libjpeg-turbo.
|
||||||
|
|
||||||
|
|
||||||
CHANGE LOG for Independent JPEG Group's JPEG software
|
CHANGE LOG for Independent JPEG Group's JPEG software
|
||||||
|
|
||||||
|
|
||||||
|
Version 9b 17-Jan-2016
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Document 'f' specifier for jpegtran -crop specification.
|
||||||
|
Thank to Michele Martone for suggestion.
|
||||||
|
|
||||||
|
|
||||||
|
Version 9 13-Jan-2013
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Add remark for jpeg_mem_dest() in jdatadst.c.
|
||||||
|
Thank to Elie-Gregoire Khoury for the hint.
|
||||||
|
|
||||||
|
Correct argument type in format string, avoid compiler warnings.
|
||||||
|
Thank to Vincent Torri for hint.
|
||||||
|
|
||||||
|
|
||||||
Version 8d 15-Jan-2012
|
Version 8d 15-Jan-2012
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
|||||||
BIN
ci/keys.enc
Normal file
BIN
ci/keys.enc
Normal file
Binary file not shown.
49
cjpeg.1
49
cjpeg.1
@@ -1,4 +1,4 @@
|
|||||||
.TH CJPEG 1 "18 January 2013"
|
.TH CJPEG 1 "18 March 2017"
|
||||||
.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, 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,
|
||||||
@@ -85,8 +85,8 @@ reconstructed image: the higher the quality setting, the larger the JPEG file,
|
|||||||
and the closer the output image will be to the original input. Normally you
|
and the closer the output image will be to the original input. Normally you
|
||||||
want to use the lowest quality setting (smallest file) that decompresses into
|
want to use the lowest quality setting (smallest file) that decompresses into
|
||||||
something visually indistinguishable from the original image. For this
|
something visually indistinguishable from the original image. For this
|
||||||
purpose the quality setting should be between 50 and 95; the default of 75 is
|
purpose the quality setting should generally be between 50 and 95 (the default
|
||||||
often about right. If you see defects at
|
is 75) for photographic images. If you see defects at
|
||||||
.B \-quality
|
.B \-quality
|
||||||
75, then go up 5 or 10 counts at a time until you are happy with the output
|
75, then go up 5 or 10 counts at a time until you are happy with the output
|
||||||
image. (The optimal setting will vary from one image to another.)
|
image. (The optimal setting will vary from one image to another.)
|
||||||
@@ -94,11 +94,10 @@ image. (The optimal setting will vary from one image to another.)
|
|||||||
.B \-quality
|
.B \-quality
|
||||||
100 will generate a quantization table of all 1's, minimizing 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.) For most images, specifying a quality value above
|
||||||
purposes. Quality values above about 95 are
|
about 95 will increase the size of the compressed file dramatically, and while
|
||||||
.B not
|
the quality gain from these higher quality values is measurable (using metrics
|
||||||
recommended for normal use; the compressed file size goes up dramatically for
|
such as PSNR or SSIM), it is rarely perceivable by human vision.
|
||||||
hardly any gain in output image quality.
|
|
||||||
.PP
|
.PP
|
||||||
In the other direction, quality values below 50 will produce very small files
|
In the other direction, quality values below 50 will produce very small files
|
||||||
of low image quality. Settings around 5 to 10 might be useful in preparing an
|
of low image quality. Settings around 5 to 10 might be useful in preparing an
|
||||||
@@ -166,14 +165,27 @@ 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
|
||||||
@@ -190,7 +202,7 @@ Set limit for amount of memory to use in processing large images. Value is
|
|||||||
in thousands of bytes, or millions of bytes if "M" is attached to the
|
in thousands of bytes, or millions of bytes if "M" is attached to the
|
||||||
number. For example,
|
number. For example,
|
||||||
.B \-max 4m
|
.B \-max 4m
|
||||||
selects 4000000 bytes. If more space is needed, temporary files will be used.
|
selects 4000000 bytes. If more space is needed, an error will occur.
|
||||||
.TP
|
.TP
|
||||||
.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.
|
||||||
@@ -208,6 +220,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
|
||||||
@@ -322,11 +337,11 @@ Independent JPEG Group
|
|||||||
This file was modified by The libjpeg-turbo Project to include only information
|
This file was modified by The libjpeg-turbo Project to include only information
|
||||||
relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
|
relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
|
||||||
features not present in libjpeg.
|
features not present in libjpeg.
|
||||||
.SH BUGS
|
.SH ISSUES
|
||||||
Support for GIF input files was removed in cjpeg v6b due to concerns over
|
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
|
the Unisys LZW patent. Although this patent expired in 2006, cjpeg still
|
||||||
lacks GIF support, for these historical reasons. (Conversion of GIF files to
|
lacks GIF support, for these historical reasons. (Conversion of GIF files to
|
||||||
JPEG is usually a bad idea anyway.)
|
JPEG is usually a bad idea anyway, since GIF is a 256-color format.)
|
||||||
.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
|
||||||
|
|||||||
25
cjpeg.c
25
cjpeg.c
@@ -5,8 +5,9 @@
|
|||||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||||
* Modified 2003-2011 by Guido Vollbeding.
|
* Modified 2003-2011 by Guido Vollbeding.
|
||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright (C) 2010, 2013, D. R. Commander.
|
* Copyright (C) 2010, 2013-2014, 2017, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* 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.
|
||||||
* It should work on any system with Unix- or MS-DOS-style command lines.
|
* It should work on any system with Unix- or MS-DOS-style command lines.
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
|
|
||||||
#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 "config.h"
|
#include "jconfigint.h"
|
||||||
|
|
||||||
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
@@ -154,7 +155,8 @@ 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 most useful range,\n");
|
||||||
|
fprintf(stderr, " default is 75)\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");
|
fprintf(stderr, " -rgb Create RGB JPEG file\n");
|
||||||
#ifdef ENTROPY_OPT_SUPPORTED
|
#ifdef ENTROPY_OPT_SUPPORTED
|
||||||
@@ -192,13 +194,14 @@ usage (void)
|
|||||||
fprintf(stderr, " -memdst Compress to memory instead of file (useful for benchmarking)\n");
|
fprintf(stderr, " -memdst Compress to memory instead of file (useful for benchmarking)\n");
|
||||||
#endif
|
#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");
|
||||||
fprintf(stderr, " -baseline Force baseline quantization tables\n");
|
fprintf(stderr, " -baseline Force baseline quantization tables\n");
|
||||||
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
|
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||||
fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n");
|
fprintf(stderr, " -scans FILE Create multi-scan JPEG per script FILE\n");
|
||||||
#endif
|
#endif
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@@ -291,6 +294,11 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
|||||||
}
|
}
|
||||||
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);
|
||||||
@@ -510,11 +518,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
|
|
||||||
enable_signal_catcher((j_common_ptr) &cinfo);
|
|
||||||
#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,
|
||||||
|
|||||||
24
cmakescripts/cmake_uninstall.cmake.in
Normal file
24
cmakescripts/cmake_uninstall.cmake.in
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# This code is from the CMake FAQ
|
||||||
|
|
||||||
|
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||||
|
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
|
||||||
|
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||||
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||||
|
list(REVERSE files)
|
||||||
|
foreach (file ${files})
|
||||||
|
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||||
|
if (EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
execute_process(
|
||||||
|
COMMAND "@CMAKE_COMMAND@" -E remove "$ENV{DESTDIR}${file}"
|
||||||
|
OUTPUT_VARIABLE rm_out
|
||||||
|
RESULT_VARIABLE rm_retval
|
||||||
|
)
|
||||||
|
if(NOT ${rm_retval} EQUAL 0)
|
||||||
|
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||||
|
endif (NOT ${rm_retval} EQUAL 0)
|
||||||
|
else (EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||||
|
endif (EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
endforeach(file)
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
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()
|
|
||||||
@@ -24,7 +24,12 @@ file(GLOB FILES
|
|||||||
*_440_*.png
|
*_440_*.png
|
||||||
*_440_*.ppm
|
*_440_*.ppm
|
||||||
*_440_*.jpg
|
*_440_*.jpg
|
||||||
*_440.yuv)
|
*_440.yuv
|
||||||
|
*_411_*.bmp
|
||||||
|
*_411_*.png
|
||||||
|
*_411_*.ppm
|
||||||
|
*_411_*.jpg
|
||||||
|
*_411.yuv)
|
||||||
|
|
||||||
if(NOT FILES STREQUAL "")
|
if(NOT FILES STREQUAL "")
|
||||||
message(STATUS "Removing test files")
|
message(STATUS "Removing test files")
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
IJG JPEG LIBRARY: CODING RULES
|
IJG JPEG LIBRARY: CODING RULES
|
||||||
|
|
||||||
|
This file was part of the Independent JPEG Group's software:
|
||||||
Copyright (C) 1991-1996, Thomas G. Lane.
|
Copyright (C) 1991-1996, Thomas G. Lane.
|
||||||
This file is part of the Independent JPEG Group's software.
|
It was modified by The libjpeg-turbo Project to include only information
|
||||||
For conditions of distribution and use, see the accompanying README file.
|
relevant to libjpeg-turbo.
|
||||||
|
For conditions of distribution and use, see the accompanying README.ijg file.
|
||||||
|
|
||||||
|
|
||||||
Since numerous people will be contributing code and bug fixes, it's important
|
Since numerous people will be contributing code and bug fixes, it's important
|
||||||
@@ -32,22 +34,7 @@ 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 names should be written in lower case with underscores, e.g.,
|
||||||
multi_word_name (not multiWordName). Preprocessor symbols and enum constants
|
multi_word_name (not multiWordName). Preprocessor symbols and enum constants
|
||||||
are similar but upper case (MULTI_WORD_NAME). Names should be unique within
|
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
|
the first fifteen characters.
|
||||||
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 must begin with GLOBAL(type), LOCAL(type),
|
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
|
or METHODDEF(type). These macros expand to "static type" or just "type" as
|
||||||
@@ -55,32 +42,8 @@ appropriate. They provide a readable indication of the routine's usage and
|
|||||||
can readily be changed for special needs. (For instance, special linkage
|
can readily be changed for special needs. (For instance, special linkage
|
||||||
keywords can be inserted for use in Windows DLLs.)
|
keywords can be inserted for use in Windows DLLs.)
|
||||||
|
|
||||||
ansi2knr does not transform method declarations (function pointers in
|
A similar solution is used for external function declarations (see the EXTERN
|
||||||
structs). We handle these with a macro JMETHOD, defined as
|
macro.)
|
||||||
#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 forward and external function declarations
|
|
||||||
(see the EXTERN and JPP macros).
|
|
||||||
|
|
||||||
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,
|
The JPEG library is intended to be used within larger programs. Furthermore,
|
||||||
@@ -94,9 +57,7 @@ pass these through the common routines provided.
|
|||||||
wherever possible. (Note that our method-based calling conventions help this
|
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
|
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
|
called directly, so only that function need be externally visible.) All
|
||||||
global function names should begin with "jpeg_", and should have an
|
global function names should begin with "jpeg_".
|
||||||
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
|
3. Don't use global variables; anything that must be used in another module
|
||||||
should be in the common data structures.
|
should be in the common data structures.
|
||||||
@@ -107,10 +68,9 @@ the system architecture document, structure.txt).
|
|||||||
|
|
||||||
5. Source file names should begin with "j" for files that are part of the
|
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
|
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
|
and djpeg.c, do not begin with "j". Keep compression and decompression code in
|
||||||
characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep
|
separate source files --- some applications may want only one half of the
|
||||||
compression and decompression code in separate source files --- some
|
library.
|
||||||
applications may want only one half of the library.
|
|
||||||
|
|
||||||
Note: these rules (particularly #4) are not followed religiously in the
|
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
|
modules that are used in cjpeg/djpeg but are not part of the JPEG library
|
||||||
|
|||||||
187
configure.ac
187
configure.ac
@@ -2,15 +2,11 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ([2.56])
|
AC_PREREQ([2.56])
|
||||||
AC_INIT([libjpeg-turbo], [1.3.1])
|
AC_INIT([libjpeg-turbo], [1.5.3])
|
||||||
BUILD=`date +%Y%m%d`
|
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
|
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
|
||||||
AC_PREFIX_DEFAULT(/opt/libjpeg-turbo)
|
AC_PREFIX_DEFAULT(/opt/libjpeg-turbo)
|
||||||
|
|
||||||
# Always build with prototypes
|
|
||||||
AC_DEFINE([HAVE_PROTOTYPES], 1, [Define if your compiler supports prototypes])
|
|
||||||
|
|
||||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
@@ -25,6 +21,12 @@ AC_PROG_INSTALL
|
|||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
|
|
||||||
|
AC_ARG_WITH([build-date], [Use custom build string to enable reproducible builds (default: YYMMDD)],
|
||||||
|
[BUILD="$with_build_date"],
|
||||||
|
[BUILD=`date +%Y%m%d`])
|
||||||
|
|
||||||
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
# When the prefix is /opt/libjpeg-turbo, we assume that an "official" binary is
|
# When the prefix is /opt/libjpeg-turbo, we assume that an "official" binary is
|
||||||
# being created, and thus we install things into specific locations.
|
# being created, and thus we install things into specific locations.
|
||||||
|
|
||||||
@@ -42,12 +44,19 @@ DATADIR=`eval echo $DATADIR`
|
|||||||
if test "$DATADIR" = "/opt/libjpeg-turbo/share"; then
|
if test "$DATADIR" = "/opt/libjpeg-turbo/share"; then
|
||||||
datarootdir='${prefix}'
|
datarootdir='${prefix}'
|
||||||
fi
|
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}
|
old_exec_prefix=${exec_prefix}
|
||||||
if test "x$exec_prefix" = "xNONE"; then
|
if test "x$exec_prefix" = "xNONE"; then
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_SIZEOF(size_t)
|
||||||
|
|
||||||
if test "x${libdir}" = 'x${exec_prefix}/lib' -o "x${libdir}" = 'x${prefix}/lib'; then
|
if test "x${libdir}" = 'x${exec_prefix}/lib' -o "x${libdir}" = 'x${prefix}/lib'; then
|
||||||
LIBDIR=`eval echo ${libdir}`
|
LIBDIR=`eval echo ${libdir}`
|
||||||
LIBDIR=`eval echo $LIBDIR`
|
LIBDIR=`eval echo $LIBDIR`
|
||||||
@@ -56,10 +65,9 @@ if test "x${libdir}" = 'x${exec_prefix}/lib' -o "x${libdir}" = 'x${prefix}/lib';
|
|||||||
darwin*)
|
darwin*)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
AC_CHECK_SIZEOF(long)
|
if test "${ac_cv_sizeof_size_t}" = "8"; then
|
||||||
if test "${ac_cv_sizeof_long}" = "8"; then
|
|
||||||
libdir='${exec_prefix}/lib64'
|
libdir='${exec_prefix}/lib64'
|
||||||
elif test "${ac_cv_sizeof_long}" = "4"; then
|
elif test "${ac_cv_sizeof_size_t}" = "4"; then
|
||||||
libdir='${exec_prefix}/lib32'
|
libdir='${exec_prefix}/lib32'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@@ -97,9 +105,9 @@ fi
|
|||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
|
AC_CHECK_HEADERS([stddef.h stdlib.h locale.h string.h])
|
||||||
AC_CHECK_HEADER([sys/types.h],
|
AC_CHECK_HEADER([sys/types.h],
|
||||||
AC_DEFINE([NEED_SYS_TYPES_H], 1, [Define if you have 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.
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
@@ -131,24 +139,15 @@ AC_TRY_RUN(
|
|||||||
exit(is_shifting_signed(-0x7F7E80B1L));
|
exit(is_shifting_signed(-0x7F7E80B1L));
|
||||||
}],
|
}],
|
||||||
[AC_MSG_RESULT(no)
|
[AC_MSG_RESULT(no)
|
||||||
AC_DEFINE([RIGHT_SHIFT_IS_UNSIGNED], 1, [Define if shift is unsigned])],
|
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(yes)],
|
||||||
[AC_MSG_RESULT(Assuming that right shift is signed on target machine.)])
|
[AC_MSG_RESULT(Assuming that right shift is signed on target machine.)])
|
||||||
|
|
||||||
# test whether global names are unique to at least 15 chars
|
|
||||||
AC_MSG_CHECKING([for short external names])
|
|
||||||
AC_TRY_LINK(
|
|
||||||
[int possibly_duplicate_function () { return 0; }
|
|
||||||
int possibly_dupli_function () { return 1; }], [ ],
|
|
||||||
[AC_MSG_RESULT(ok)],
|
|
||||||
[AC_MSG_RESULT(short)
|
|
||||||
AC_DEFINE([NEED_SHORT_EXTERNAL_NAMES], 1,
|
|
||||||
[Define if you need short function names])])
|
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_CHECK_FUNCS([memset memcpy], [],
|
AC_CHECK_FUNCS([memset memcpy], [],
|
||||||
[AC_DEFINE([NEED_BSD_STRINGS], 1,
|
[AC_DEFINE([NEED_BSD_STRINGS], 1,
|
||||||
[Define if you have BSD-like bzero and bcopy])])
|
[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_MSG_CHECKING([libjpeg API version])
|
||||||
AC_ARG_VAR(JPEG_LIB_VERSION, [libjpeg API version (62, 70, or 80)])
|
AC_ARG_VAR(JPEG_LIB_VERSION, [libjpeg API version (62, 70, or 80)])
|
||||||
@@ -195,7 +194,7 @@ fi
|
|||||||
RPM_CONFIG_ARGS=
|
RPM_CONFIG_ARGS=
|
||||||
|
|
||||||
# Memory source/destination managers
|
# Memory source/destination managers
|
||||||
SO_AGE=0
|
SO_AGE=1
|
||||||
MEM_SRCDST_FUNCTIONS=
|
MEM_SRCDST_FUNCTIONS=
|
||||||
if test "x${with_jpeg8}" != "xyes"; then
|
if test "x${with_jpeg8}" != "xyes"; then
|
||||||
AC_MSG_CHECKING([whether to include in-memory source/destination managers])
|
AC_MSG_CHECKING([whether to include in-memory source/destination managers])
|
||||||
@@ -206,7 +205,7 @@ if test "x${with_jpeg8}" != "xyes"; then
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE([MEM_SRCDST_SUPPORTED], [1],
|
AC_DEFINE([MEM_SRCDST_SUPPORTED], [1],
|
||||||
[Support in-memory source/destination managers])
|
[Support in-memory source/destination managers])
|
||||||
SO_AGE=1
|
SO_AGE=2
|
||||||
MEM_SRCDST_FUNCTIONS="global: jpeg_mem_dest; jpeg_mem_src;";
|
MEM_SRCDST_FUNCTIONS="global: jpeg_mem_dest; jpeg_mem_src;";
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
@@ -225,6 +224,16 @@ AC_SUBST(MEM_SRCDST_FUNCTIONS)
|
|||||||
|
|
||||||
AC_DEFINE_UNQUOTED(LIBJPEG_TURBO_VERSION, [$VERSION], [libjpeg-turbo version])
|
AC_DEFINE_UNQUOTED(LIBJPEG_TURBO_VERSION, [$VERSION], [libjpeg-turbo version])
|
||||||
|
|
||||||
|
m4_define(version_triplet,m4_split(AC_PACKAGE_VERSION,[[.]]))
|
||||||
|
m4_define(version_major,m4_car(m4_shiftn(1,[],version_triplet)))
|
||||||
|
m4_define(version_minor,m4_car(m4_shiftn(2,[],version_triplet)))
|
||||||
|
m4_define(version_revision,m4_car(m4_shiftn(3,[],version_triplet)))
|
||||||
|
VERSION_MAJOR=version_major
|
||||||
|
VERSION_MINOR=version_minor
|
||||||
|
VERSION_REVISION=version_revision
|
||||||
|
LIBJPEG_TURBO_VERSION_NUMBER=`printf "%d%03d%03d" $VERSION_MAJOR $VERSION_MINOR $VERSION_REVISION`
|
||||||
|
AC_DEFINE_UNQUOTED(LIBJPEG_TURBO_VERSION_NUMBER, [$LIBJPEG_TURBO_VERSION_NUMBER], [libjpeg-turbo version in integer form])
|
||||||
|
|
||||||
VERSION_SCRIPT=yes
|
VERSION_SCRIPT=yes
|
||||||
AC_ARG_ENABLE([ld-version-script],
|
AC_ARG_ENABLE([ld-version-script],
|
||||||
AS_HELP_STRING([--disable-ld-version-script],
|
AS_HELP_STRING([--disable-ld-version-script],
|
||||||
@@ -265,7 +274,7 @@ AC_SUBST(VERSION_SCRIPT_FLAG)
|
|||||||
# Check for non-broken inline under various spellings
|
# Check for non-broken inline under various spellings
|
||||||
AC_MSG_CHECKING(for inline)
|
AC_MSG_CHECKING(for inline)
|
||||||
ljt_cv_inline=""
|
ljt_cv_inline=""
|
||||||
AC_TRY_COMPILE(, [} __attribute__((always_inline)) int foo() { return 0; }
|
AC_TRY_COMPILE(, [} inline __attribute__((always_inline)) int foo() { return 0; }
|
||||||
int bar() { return foo();], ljt_cv_inline="inline __attribute__((always_inline))",
|
int bar() { return foo();], ljt_cv_inline="inline __attribute__((always_inline))",
|
||||||
AC_TRY_COMPILE(, [} __inline__ int foo() { return 0; }
|
AC_TRY_COMPILE(, [} __inline__ int foo() { return 0; }
|
||||||
int bar() { return foo();], ljt_cv_inline="__inline__",
|
int bar() { return foo();], ljt_cv_inline="__inline__",
|
||||||
@@ -280,7 +289,13 @@ AC_DEFINE_UNQUOTED([INLINE],[$ljt_cv_inline],[How to obtain function inlining.])
|
|||||||
AC_MSG_CHECKING([whether to include arithmetic encoding support])
|
AC_MSG_CHECKING([whether to include arithmetic encoding support])
|
||||||
AC_ARG_WITH([arith-enc],
|
AC_ARG_WITH([arith-enc],
|
||||||
AC_HELP_STRING([--without-arith-enc],
|
AC_HELP_STRING([--without-arith-enc],
|
||||||
[Do not include arithmetic encoding support]))
|
[Do not include arithmetic encoding support when emulating the libjpeg v6b API/ABI]))
|
||||||
|
if test "x$with_12bit" = "xyes"; then
|
||||||
|
with_arith_enc=no
|
||||||
|
fi
|
||||||
|
if test "x${with_jpeg8}" = "xyes" -o "x${with_jpeg7}" = "xyes"; then
|
||||||
|
with_arith_enc=yes
|
||||||
|
fi
|
||||||
if test "x$with_arith_enc" = "xno"; then
|
if test "x$with_arith_enc" = "xno"; then
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-arith-enc"
|
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-arith-enc"
|
||||||
@@ -293,7 +308,13 @@ AM_CONDITIONAL([WITH_ARITH_ENC], [test "x$with_arith_enc" != "xno"])
|
|||||||
AC_MSG_CHECKING([whether to include arithmetic decoding support])
|
AC_MSG_CHECKING([whether to include arithmetic decoding support])
|
||||||
AC_ARG_WITH([arith-dec],
|
AC_ARG_WITH([arith-dec],
|
||||||
AC_HELP_STRING([--without-arith-dec],
|
AC_HELP_STRING([--without-arith-dec],
|
||||||
[Do not include arithmetic decoding support]))
|
[Do not include arithmetic decoding support when emulating the libjpeg v6b API/ABI]))
|
||||||
|
if test "x$with_12bit" = "xyes"; then
|
||||||
|
with_arith_dec=no
|
||||||
|
fi
|
||||||
|
if test "x${with_jpeg8}" = "xyes" -o "x${with_jpeg7}" = "xyes"; then
|
||||||
|
with_arith_dec=yes
|
||||||
|
fi
|
||||||
if test "x$with_arith_dec" = "xno"; then
|
if test "x$with_arith_dec" = "xno"; then
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-arith-dec"
|
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-arith-dec"
|
||||||
@@ -306,11 +327,26 @@ AM_CONDITIONAL([WITH_ARITH_DEC], [test "x$with_arith_dec" != "xno"])
|
|||||||
AM_CONDITIONAL([WITH_ARITH],
|
AM_CONDITIONAL([WITH_ARITH],
|
||||||
[test "x$with_arith_dec" != "xno" -o "x$with_arith_enc" != "xno"])
|
[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
|
# TurboJPEG support
|
||||||
AC_MSG_CHECKING([whether to build TurboJPEG C wrapper])
|
AC_MSG_CHECKING([whether to build TurboJPEG C wrapper])
|
||||||
AC_ARG_WITH([turbojpeg],
|
AC_ARG_WITH([turbojpeg],
|
||||||
AC_HELP_STRING([--without-turbojpeg],
|
AC_HELP_STRING([--without-turbojpeg],
|
||||||
[Do not include the TurboJPEG wrapper library and associated test programs]))
|
[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
|
if test "x$with_turbojpeg" = "xno"; then
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-turbojpeg"
|
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-turbojpeg"
|
||||||
@@ -325,6 +361,7 @@ if test "x$JAVAC" = "x"; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(JAVAC)
|
AC_SUBST(JAVAC)
|
||||||
AC_ARG_VAR(JAVACFLAGS, [Java compiler flags])
|
AC_ARG_VAR(JAVACFLAGS, [Java compiler flags])
|
||||||
|
JAVACFLAGS="$JAVACFLAGS -J-Dfile.encoding=UTF8"
|
||||||
AC_SUBST(JAVACFLAGS)
|
AC_SUBST(JAVACFLAGS)
|
||||||
AC_ARG_VAR(JAR, [Java archive command (default: jar)])
|
AC_ARG_VAR(JAR, [Java archive command (default: jar)])
|
||||||
if test "x$JAR" = "x"; then
|
if test "x$JAR" = "x"; then
|
||||||
@@ -342,7 +379,7 @@ AC_ARG_VAR(JNI_CFLAGS,
|
|||||||
AC_MSG_CHECKING([whether to build TurboJPEG Java wrapper])
|
AC_MSG_CHECKING([whether to build TurboJPEG Java wrapper])
|
||||||
AC_ARG_WITH([java],
|
AC_ARG_WITH([java],
|
||||||
AC_HELP_STRING([--with-java], [Build Java wrapper for the TurboJPEG library]))
|
AC_HELP_STRING([--with-java], [Build Java wrapper for the TurboJPEG library]))
|
||||||
if test "x$with_turbojpeg" = "xno"; then
|
if test "x$with_12bit" = "xyes" -o "x$with_turbojpeg" = "xno"; then
|
||||||
with_java=no
|
with_java=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -403,6 +440,9 @@ fi
|
|||||||
# SIMD is optional
|
# SIMD is optional
|
||||||
AC_ARG_WITH([simd],
|
AC_ARG_WITH([simd],
|
||||||
AC_HELP_STRING([--without-simd], [Do not include SIMD extensions]))
|
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
|
if test "x${with_simd}" != "xno"; then
|
||||||
require_simd=no
|
require_simd=no
|
||||||
if test "x${with_simd}" = "xyes"; then
|
if test "x${with_simd}" = "xyes"; then
|
||||||
@@ -425,7 +465,11 @@ if test "x${with_simd}" != "xno"; then
|
|||||||
AC_MSG_RESULT([yes (arm)])
|
AC_MSG_RESULT([yes (arm)])
|
||||||
AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used])
|
AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used])
|
||||||
AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE(
|
AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE(
|
||||||
[AC_MSG_RESULT([yes])
|
[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],
|
simd_arch=arm],
|
||||||
[AC_MSG_RESULT([no])
|
[AC_MSG_RESULT([no])
|
||||||
with_simd=no])
|
with_simd=no])
|
||||||
@@ -437,14 +481,50 @@ if test "x${with_simd}" != "xno"; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
aarch64*)
|
||||||
AC_MSG_RESULT([no ("$host_cpu")])
|
AC_MSG_RESULT([yes (arm64)])
|
||||||
with_simd=no;
|
AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used])
|
||||||
if test "x${require_simd}" = "xyes"; then
|
AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE(
|
||||||
AC_MSG_ERROR([SIMD support not available for this CPU.])
|
[if test "x$ac_use_gas_preprocessor" = "xyes"; then
|
||||||
|
AC_MSG_RESULT([yes (with gas-preprocessor)])
|
||||||
else
|
else
|
||||||
AC_MSG_WARN([SIMD support not available for this CPU. Performance will suffer.])
|
AC_MSG_RESULT([yes])
|
||||||
fi
|
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
|
||||||
|
;;
|
||||||
|
powerpc*)
|
||||||
|
AC_CHECK_ALTIVEC(
|
||||||
|
[AC_MSG_RESULT([yes (powerpc)])
|
||||||
|
simd_arch=powerpc],
|
||||||
|
[AC_NO_SIMD(PowerPC SPE)])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_NO_SIMD($host_cpu)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -460,8 +540,12 @@ AM_CONDITIONAL([WITH_SSE_FLOAT_DCT], [test "x$simd_arch" = "xx86_64" -o "x$simd_
|
|||||||
AM_CONDITIONAL([SIMD_I386], [test "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_X86_64], [test "x$simd_arch" = "xx86_64"])
|
||||||
AM_CONDITIONAL([SIMD_ARM], [test "x$simd_arch" = "xarm"])
|
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([SIMD_POWERPC], [test "x$simd_arch" = "xpowerpc"])
|
||||||
AM_CONDITIONAL([X86_64], [test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xamd64"])
|
AM_CONDITIONAL([X86_64], [test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xamd64"])
|
||||||
AM_CONDITIONAL([WITH_TURBOJPEG], [test "x$with_turbojpeg" != "xno"])
|
AM_CONDITIONAL([WITH_TURBOJPEG], [test "x$with_turbojpeg" != "xno"])
|
||||||
|
AM_CONDITIONAL([CROSS_COMPILING], [test "x$cross_compiling" = "xyes"])
|
||||||
|
|
||||||
AC_ARG_VAR(PKGNAME, [distribution package name (default: libjpeg-turbo)])
|
AC_ARG_VAR(PKGNAME, [distribution package name (default: libjpeg-turbo)])
|
||||||
if test "x$PKGNAME" = "x"; then
|
if test "x$PKGNAME" = "x"; then
|
||||||
@@ -478,27 +562,46 @@ case "$host_cpu" in
|
|||||||
RPMARCH=i386
|
RPMARCH=i386
|
||||||
DEBARCH=i386
|
DEBARCH=i386
|
||||||
;;
|
;;
|
||||||
|
powerpc64le)
|
||||||
|
RPMARCH=`uname -m`
|
||||||
|
DEBARCH=ppc64el
|
||||||
|
;;
|
||||||
|
powerpc)
|
||||||
|
RPMARCH=ppc
|
||||||
|
DEBARCH=ppc
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
RPMARCH=`uname -m`
|
||||||
|
DEBARCH=$RPMARCH
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if test "${docdir}" = ""; then
|
||||||
|
docdir=${datadir}/doc
|
||||||
|
AC_SUBST(docdir)
|
||||||
|
fi
|
||||||
|
|
||||||
AC_SUBST(RPMARCH)
|
AC_SUBST(RPMARCH)
|
||||||
AC_SUBST(RPM_CONFIG_ARGS)
|
AC_SUBST(RPM_CONFIG_ARGS)
|
||||||
AC_SUBST(DEBARCH)
|
AC_SUBST(DEBARCH)
|
||||||
AC_SUBST(BUILD)
|
AC_SUBST(BUILD)
|
||||||
AC_DEFINE_UNQUOTED([BUILD], "$BUILD", [Build number])
|
AC_DEFINE_UNQUOTED([BUILD], "$BUILD", [libjpeg-turbo build number])
|
||||||
|
|
||||||
# jconfig.h is the file we use, but we have another before that to
|
# NOTE: autoheader automatically modifies the input file of the first
|
||||||
# fool autoheader. the reason is that we include this header in our
|
# invocation of AC_CONFIG_HEADERS, so we put config.h first to prevent
|
||||||
# API headers, which can screw things up for users of the lib.
|
# jconfig.h.in from being clobbered. config.h is used only internally, whereas
|
||||||
# jconfig.h is a minimal version that allows this package to be built
|
# 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([config.h])
|
||||||
AC_CONFIG_HEADERS([jconfig.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/libjpeg-turbo.spec.tmpl:release/libjpeg-turbo.spec.in])
|
||||||
AC_CONFIG_FILES([pkgscripts/makecygwinpkg.tmpl:release/makecygwinpkg.in])
|
AC_CONFIG_FILES([pkgscripts/makecygwinpkg.tmpl:release/makecygwinpkg.in])
|
||||||
AC_CONFIG_FILES([pkgscripts/makedpkg.tmpl:release/makedpkg.in])
|
AC_CONFIG_FILES([pkgscripts/makedpkg.tmpl:release/makedpkg.in])
|
||||||
AC_CONFIG_FILES([pkgscripts/makemacpkg.tmpl:release/makemacpkg.in])
|
AC_CONFIG_FILES([pkgscripts/makemacpkg.tmpl:release/makemacpkg.in])
|
||||||
AC_CONFIG_FILES([pkgscripts/Description.plist:release/Description.plist.in])
|
|
||||||
AC_CONFIG_FILES([pkgscripts/Info.plist:release/Info.plist.in])
|
|
||||||
AC_CONFIG_FILES([pkgscripts/uninstall.tmpl:release/uninstall.in])
|
AC_CONFIG_FILES([pkgscripts/uninstall.tmpl:release/uninstall.in])
|
||||||
|
AC_CONFIG_FILES([pkgscripts/libjpeg.pc:release/libjpeg.pc.in])
|
||||||
|
AC_CONFIG_FILES([pkgscripts/libturbojpeg.pc:release/libturbojpeg.pc.in])
|
||||||
if test "x$with_turbojpeg" != "xno"; then
|
if test "x$with_turbojpeg" != "xno"; then
|
||||||
AC_CONFIG_FILES([tjbenchtest])
|
AC_CONFIG_FILES([tjbenchtest])
|
||||||
fi
|
fi
|
||||||
|
|||||||
73
djpeg.1
73
djpeg.1
@@ -1,4 +1,4 @@
|
|||||||
.TH DJPEG 1 "18 January 2013"
|
.TH DJPEG 1 "13 November 2017"
|
||||||
.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
|
||||||
@@ -55,11 +55,14 @@ 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
|
||||||
M/8, where M is an integer between 1 and 16 inclusive, or any reduced fraction
|
M/8, where M is an integer between 1 and 16 inclusive, or any reduced fraction
|
||||||
@@ -74,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
|
||||||
@@ -88,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
|
||||||
@@ -101,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
|
||||||
@@ -115,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.
|
||||||
@@ -160,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"
|
||||||
@@ -168,7 +185,7 @@ Set limit for amount of memory to use in processing large images. Value is
|
|||||||
in thousands of bytes, or millions of bytes if "M" is attached to the
|
in thousands of bytes, or millions of bytes if "M" is attached to the
|
||||||
number. For example,
|
number. For example,
|
||||||
.B \-max 4m
|
.B \-max 4m
|
||||||
selects 4000000 bytes. If more space is needed, temporary files will be used.
|
selects 4000000 bytes. If more space is needed, an error will occur.
|
||||||
.TP
|
.TP
|
||||||
.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.
|
||||||
@@ -177,6 +194,19 @@ Send output image to the named file, not to standard output.
|
|||||||
Load input file into memory before decompressing. This feature was implemented
|
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().)
|
mainly as a way of testing the in-memory source manager (jpeg_mem_src().)
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-skip " Y0,Y1"
|
||||||
|
Decompress all rows of the JPEG image except those between Y0 and Y1
|
||||||
|
(inclusive.) Note that if decompression scaling is being used, then Y0 and Y1
|
||||||
|
are relative to the scaled image dimensions.
|
||||||
|
.TP
|
||||||
|
.BI \-crop " WxH+X+Y"
|
||||||
|
Decompress only a rectangular subregion of the image, starting at point X,Y
|
||||||
|
with width W and height H. If necessary, X will be shifted left to the nearest
|
||||||
|
iMCU boundary, and the width will be increased accordingly. Note that if
|
||||||
|
decompression scaling is being used, then X, Y, W, and H are relative to the
|
||||||
|
scaled image dimensions. Currently this option only works with the
|
||||||
|
PBMPLUS (PPM/PGM), GIF, and Targa output formats.
|
||||||
|
.TP
|
||||||
.B \-verbose
|
.B \-verbose
|
||||||
Enable debug printout. More
|
Enable debug printout. More
|
||||||
.BR \-v 's
|
.BR \-v 's
|
||||||
@@ -185,6 +215,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.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
.LP
|
.LP
|
||||||
This example decompresses the JPEG file foo.jpg, quantizes it to
|
This example decompresses the JPEG file foo.jpg, quantizes it to
|
||||||
@@ -251,8 +284,10 @@ Independent JPEG Group
|
|||||||
This file was modified by The libjpeg-turbo Project to include only information
|
This file was modified by The libjpeg-turbo Project to include only information
|
||||||
relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
|
relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
|
||||||
features not present in libjpeg.
|
features not present in libjpeg.
|
||||||
.SH BUGS
|
.SH ISSUES
|
||||||
To avoid the Unisys LZW patent,
|
Support for compressed GIF output files was removed in djpeg v6b due to
|
||||||
.B djpeg
|
concerns over the Unisys LZW patent. Although this patent expired in 2006,
|
||||||
produces uncompressed GIF files. These are larger than they should be, but
|
djpeg still lacks compressed GIF support, for these historical reasons.
|
||||||
are readable by standard GIF decoders.
|
(Conversion of JPEG files to GIF is usually a bad idea anyway, since GIF is a
|
||||||
|
256-color format.) The uncompressed GIF files that djpeg generates are larger
|
||||||
|
than they should be, but they are readable by standard GIF decoders.
|
||||||
|
|||||||
132
djpeg.c
132
djpeg.c
@@ -3,9 +3,12 @@
|
|||||||
*
|
*
|
||||||
* This file was part of the Independent JPEG Group's software:
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||||
|
* Modified 2013 by Guido Vollbeding.
|
||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright (C) 2010-2011, 2013, D. R. Commander.
|
* Copyright (C) 2010-2011, 2013-2017, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* Copyright (C) 2015, Google, Inc.
|
||||||
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* 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.
|
||||||
* It should work on any system with Unix- or MS-DOS-style command lines.
|
* It should work on any system with Unix- or MS-DOS-style command lines.
|
||||||
@@ -27,7 +30,7 @@
|
|||||||
|
|
||||||
#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 "config.h"
|
#include "jconfigint.h"
|
||||||
|
|
||||||
#include <ctype.h> /* to declare isprint() */
|
#include <ctype.h> /* to declare isprint() */
|
||||||
|
|
||||||
@@ -88,6 +91,9 @@ static IMAGE_FORMATS requested_fmt;
|
|||||||
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 */
|
boolean memsrc; /* for -memsrc switch */
|
||||||
|
boolean skip, crop;
|
||||||
|
JDIMENSION skip_start, skip_end;
|
||||||
|
JDIMENSION crop_x, crop_y, crop_width, crop_height;
|
||||||
#define INPUT_BUF_SIZE 4096
|
#define INPUT_BUF_SIZE 4096
|
||||||
|
|
||||||
|
|
||||||
@@ -107,6 +113,7 @@ usage (void)
|
|||||||
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, " -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
|
||||||
@@ -163,7 +170,11 @@ usage (void)
|
|||||||
fprintf(stderr, " -memsrc Load input file into memory before decompressing\n");
|
fprintf(stderr, " -memsrc Load input file into memory before decompressing\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
fprintf(stderr, " -skip Y0,Y1 Decompress all rows except those between Y0 and Y1 (inclusive)\n");
|
||||||
|
fprintf(stderr, " -crop WxH+X+Y Decompress only a rectangular subregion of the image\n");
|
||||||
|
fprintf(stderr, " [requires PBMPLUS (PPM/PGM), GIF, or Targa output format]\n");
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,6 +198,8 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
requested_fmt = DEFAULT_FMT; /* set default output file format */
|
requested_fmt = DEFAULT_FMT; /* set default output file format */
|
||||||
outfilename = NULL;
|
outfilename = NULL;
|
||||||
memsrc = FALSE;
|
memsrc = FALSE;
|
||||||
|
skip = FALSE;
|
||||||
|
crop = FALSE;
|
||||||
cinfo->err->trace_level = 0;
|
cinfo->err->trace_level = 0;
|
||||||
|
|
||||||
/* Scan command line options, adjust parameters */
|
/* Scan command line options, adjust parameters */
|
||||||
@@ -260,6 +273,11 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
}
|
}
|
||||||
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;
|
||||||
@@ -281,6 +299,10 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
/* Force RGB output. */
|
/* Force RGB output. */
|
||||||
cinfo->out_color_space = JCS_RGB;
|
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 */
|
||||||
@@ -350,14 +372,32 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
|||||||
/* RLE output format. */
|
/* RLE output format. */
|
||||||
requested_fmt = FMT_RLE;
|
requested_fmt = FMT_RLE;
|
||||||
|
|
||||||
} else if (keymatch(arg, "scale", 1)) {
|
} else if (keymatch(arg, "scale", 2)) {
|
||||||
/* 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], "%u/%u",
|
||||||
&cinfo->scale_num, &cinfo->scale_denom) != 2)
|
&cinfo->scale_num, &cinfo->scale_denom) != 2)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "skip", 2)) {
|
||||||
|
if (++argn >= argc)
|
||||||
|
usage();
|
||||||
|
if (sscanf(argv[argn], "%u,%u", &skip_start, &skip_end) != 2 ||
|
||||||
|
skip_start > skip_end)
|
||||||
|
usage();
|
||||||
|
skip = TRUE;
|
||||||
|
|
||||||
|
} else if (keymatch(arg, "crop", 2)) {
|
||||||
|
char c;
|
||||||
|
if (++argn >= argc)
|
||||||
|
usage();
|
||||||
|
if (sscanf(argv[argn], "%u%c%u+%u+%u", &crop_width, &c, &crop_height,
|
||||||
|
&crop_x, &crop_y) != 5 ||
|
||||||
|
(c != 'X' && c != 'x') || crop_width < 1 || crop_height < 1)
|
||||||
|
usage();
|
||||||
|
crop = TRUE;
|
||||||
|
|
||||||
} 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;
|
||||||
@@ -397,7 +437,7 @@ METHODDEF(boolean)
|
|||||||
print_text_marker (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;
|
long length;
|
||||||
unsigned int ch;
|
unsigned int ch;
|
||||||
unsigned int lastch = 0;
|
unsigned int lastch = 0;
|
||||||
|
|
||||||
@@ -490,11 +530,6 @@ main (int argc, char **argv)
|
|||||||
jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker);
|
jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker);
|
||||||
jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker);
|
jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker);
|
||||||
|
|
||||||
/* Now safe to enable signal catcher. */
|
|
||||||
#ifdef NEED_SIGNAL_CATCHER
|
|
||||||
enable_signal_catcher((j_common_ptr) &cinfo);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* 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
|
||||||
* values read here are ignored; we will rescan the switches after opening
|
* values read here are ignored; we will rescan the switches after opening
|
||||||
@@ -628,6 +663,80 @@ main (int argc, char **argv)
|
|||||||
/* Start decompressor */
|
/* Start decompressor */
|
||||||
(void) jpeg_start_decompress(&cinfo);
|
(void) jpeg_start_decompress(&cinfo);
|
||||||
|
|
||||||
|
/* Skip rows */
|
||||||
|
if (skip) {
|
||||||
|
JDIMENSION tmp;
|
||||||
|
|
||||||
|
/* Check for valid skip_end. We cannot check this value until after
|
||||||
|
* jpeg_start_decompress() is called. Note that we have already verified
|
||||||
|
* that skip_start <= skip_end.
|
||||||
|
*/
|
||||||
|
if (skip_end > cinfo.output_height - 1) {
|
||||||
|
fprintf(stderr, "%s: skip region exceeds image height %d\n", progname,
|
||||||
|
cinfo.output_height);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Write output file header. This is a hack to ensure that the destination
|
||||||
|
* manager creates an output image of the proper size.
|
||||||
|
*/
|
||||||
|
tmp = cinfo.output_height;
|
||||||
|
cinfo.output_height -= (skip_end - skip_start + 1);
|
||||||
|
(*dest_mgr->start_output) (&cinfo, dest_mgr);
|
||||||
|
cinfo.output_height = tmp;
|
||||||
|
|
||||||
|
/* Process data */
|
||||||
|
while (cinfo.output_scanline < skip_start) {
|
||||||
|
num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
|
||||||
|
dest_mgr->buffer_height);
|
||||||
|
(*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
|
||||||
|
}
|
||||||
|
jpeg_skip_scanlines(&cinfo, skip_end - skip_start + 1);
|
||||||
|
while (cinfo.output_scanline < cinfo.output_height) {
|
||||||
|
num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
|
||||||
|
dest_mgr->buffer_height);
|
||||||
|
(*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Decompress a subregion */
|
||||||
|
} else if (crop) {
|
||||||
|
JDIMENSION tmp;
|
||||||
|
|
||||||
|
/* Check for valid crop dimensions. We cannot check these values until
|
||||||
|
* after jpeg_start_decompress() is called.
|
||||||
|
*/
|
||||||
|
if (crop_x + crop_width > cinfo.output_width ||
|
||||||
|
crop_y + crop_height > cinfo.output_height) {
|
||||||
|
fprintf(stderr, "%s: crop dimensions exceed image dimensions %d x %d\n",
|
||||||
|
progname, cinfo.output_width, cinfo.output_height);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
jpeg_crop_scanline(&cinfo, &crop_x, &crop_width);
|
||||||
|
if (dest_mgr->calc_buffer_dimensions)
|
||||||
|
(*dest_mgr->calc_buffer_dimensions) (&cinfo, dest_mgr);
|
||||||
|
else
|
||||||
|
ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT);
|
||||||
|
|
||||||
|
/* Write output file header. This is a hack to ensure that the destination
|
||||||
|
* manager creates an output image of the proper size.
|
||||||
|
*/
|
||||||
|
tmp = cinfo.output_height;
|
||||||
|
cinfo.output_height = crop_height;
|
||||||
|
(*dest_mgr->start_output) (&cinfo, dest_mgr);
|
||||||
|
cinfo.output_height = tmp;
|
||||||
|
|
||||||
|
/* Process data */
|
||||||
|
jpeg_skip_scanlines(&cinfo, crop_y);
|
||||||
|
while (cinfo.output_scanline < crop_y + crop_height) {
|
||||||
|
num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
|
||||||
|
dest_mgr->buffer_height);
|
||||||
|
(*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
|
||||||
|
}
|
||||||
|
jpeg_skip_scanlines(&cinfo, cinfo.output_height - crop_y - crop_height);
|
||||||
|
|
||||||
|
/* Normal full-image decompress */
|
||||||
|
} else {
|
||||||
/* Write output file header */
|
/* Write output file header */
|
||||||
(*dest_mgr->start_output) (&cinfo, dest_mgr);
|
(*dest_mgr->start_output) (&cinfo, dest_mgr);
|
||||||
|
|
||||||
@@ -637,6 +746,7 @@ main (int argc, char **argv)
|
|||||||
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);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef PROGRESS_REPORT
|
#ifdef PROGRESS_REPORT
|
||||||
/* Hack: count final pass as done in case finish_output does an extra pass.
|
/* Hack: count final pass as done in case finish_output does an extra pass.
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
</script>
|
</script>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
<tr style="height: 56px;">
|
<tr style="height: 56px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">TurboJPEG
|
<div id="projectname">TurboJPEG
|
||||||
 <span id="projectnumber">1.2.1</span>
|
 <span id="projectnumber">1.5</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
</script>
|
</script>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
<tr style="height: 56px;">
|
<tr style="height: 56px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">TurboJPEG
|
<div id="projectname">TurboJPEG
|
||||||
 <span id="projectnumber">1.2.1</span>
|
 <span id="projectnumber">1.5</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
3
doc/html/doxygen-extra.css
Normal file
3
doc/html/doxygen-extra.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
code {
|
||||||
|
color: #4665A2;
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
</script>
|
</script>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
<tr style="height: 56px;">
|
<tr style="height: 56px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">TurboJPEG
|
<div id="projectname">TurboJPEG
|
||||||
 <span id="projectnumber">1.2.1</span>
|
 <span id="projectnumber">1.5</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
</script>
|
</script>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
<tr style="height: 56px;">
|
<tr style="height: 56px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">TurboJPEG
|
<div id="projectname">TurboJPEG
|
||||||
 <span id="projectnumber">1.2.1</span>
|
 <span id="projectnumber">1.5</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@
|
|||||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
</script>
|
</script>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
<tr style="height: 56px;">
|
<tr style="height: 56px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">TurboJPEG
|
<div id="projectname">TurboJPEG
|
||||||
 <span id="projectnumber">1.2.1</span>
|
 <span id="projectnumber">1.5</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
</script>
|
</script>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
<tr style="height: 56px;">
|
<tr style="height: 56px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">TurboJPEG
|
<div id="projectname">TurboJPEG
|
||||||
 <span id="projectnumber">1.2.1</span>
|
 <span id="projectnumber">1.5</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,26 +1,35 @@
|
|||||||
var searchData=
|
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_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_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']]],
|
['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']]],
|
['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']]],
|
['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']]],
|
['tjbufsize',['tjBufSize',['../group___turbo_j_p_e_g.html#gaccc5bca7f12fcdcc302e6e1c6d4b311b',1,'turbojpeg.h']]],
|
||||||
['tjbufsizeyuv',['tjBufSizeYUV',['../group___turbo_j_p_e_g.html#ga9d0cb06fd5052d21b6f2b382db8b219c',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']]],
|
['tjcompress2',['tjCompress2',['../group___turbo_j_p_e_g.html#gaf38f2ed44bdc88e730e08b632fa6e88e',1,'turbojpeg.h']]],
|
||||||
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gada69cc6443d1bb493b40f1626259e5e9',1,'turbojpeg.h']]],
|
['tjcompressfromyuv',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga6f6de375d6ec0020faba627e37e5a060',1,'turbojpeg.h']]],
|
||||||
['tjdecompressheader2',['tjDecompressHeader2',['../group___turbo_j_p_e_g.html#gac5675fceb7997b385516cdffdb34e6aa',1,'turbojpeg.h']]],
|
['tjcompressfromyuvplanes',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga0b84c682d8accf097d7a743c965d3464',1,'turbojpeg.h']]],
|
||||||
['tjdecompresstoyuv',['tjDecompressToYUV',['../group___turbo_j_p_e_g.html#gad7810af095624a4016e72957a50f77d8',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#ga077c61027b875afecd5a1613bf18b3c1',1,'turbojpeg.h']]],
|
||||||
|
['tjdecodeyuvplanes',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#gaf42f19b7a496eb18bdc84fe61ee6d3e2',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gad8026a417e16a76313bc0a6c9e8b2ba2',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompressheader3',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga3fced455e504e8ff4fbad28ba94a3020',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompresstoyuv2',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga39e08906528db5a764670ea48d344b09',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompresstoyuvplanes',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#ga38d0ef90692663b3ffb5b16da2541512',1,'turbojpeg.h']]],
|
||||||
['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga674adee917b95ad4a896f1ba39e12540',1,'turbojpeg.h']]],
|
['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga674adee917b95ad4a896f1ba39e12540',1,'turbojpeg.h']]],
|
||||||
['tjencodeyuv2',['tjEncodeYUV2',['../group___turbo_j_p_e_g.html#ga0fa4e7b1943687c6a0c0304529c55d35',1,'turbojpeg.h']]],
|
['tjencodeyuv3',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#gaabe05acd734990053ad1294b5ef239aa',1,'turbojpeg.h']]],
|
||||||
|
['tjencodeyuvplanes',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga8a65ed3bd12df57c219d46afbc9008f1',1,'turbojpeg.h']]],
|
||||||
['tjflag_5faccuratedct',['TJFLAG_ACCURATEDCT',['../group___turbo_j_p_e_g.html#gacb233cfd722d66d1ccbf48a7de81f0e0',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_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_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_5ffastupsample',['TJFLAG_FASTUPSAMPLE',['../group___turbo_j_p_e_g.html#ga4ee4506c81177a06f77e2504a22efd2d',1,'turbojpeg.h']]],
|
||||||
['tjflag_5fforcemmx',['TJFLAG_FORCEMMX',['../group___turbo_j_p_e_g.html#ga4e872f11c82f241736fa8297920f24e5',1,'turbojpeg.h']]],
|
|
||||||
['tjflag_5fforcesse',['TJFLAG_FORCESSE',['../group___turbo_j_p_e_g.html#gae17e63189e8cd730feed3efbd2454f38',1,'turbojpeg.h']]],
|
|
||||||
['tjflag_5fforcesse2',['TJFLAG_FORCESSE2',['../group___turbo_j_p_e_g.html#ga8cf0bca96ea4d472563f4b0ebf8c48e7',1,'turbojpeg.h']]],
|
|
||||||
['tjflag_5fforcesse3',['TJFLAG_FORCESSE3',['../group___turbo_j_p_e_g.html#gaf9d49066633404da4386d70820295dd2',1,'turbojpeg.h']]],
|
|
||||||
['tjflag_5fnorealloc',['TJFLAG_NOREALLOC',['../group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963',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']]],
|
['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']]],
|
['tjgeterrorstr',['tjGetErrorStr',['../group___turbo_j_p_e_g.html#ga9af79c908ec131b1ae8d52fe40375abf',1,'turbojpeg.h']]],
|
||||||
@@ -39,6 +48,7 @@ var searchData=
|
|||||||
['tjpf_5fbgr',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',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_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_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_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_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_5frgba',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]],
|
||||||
@@ -46,9 +56,13 @@ var searchData=
|
|||||||
['tjpf_5fxbgr',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',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']]],
|
['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']]],
|
['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']]],
|
['tjredoffset',['tjRedOffset',['../group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8',1,'turbojpeg.h']]],
|
||||||
['tjregion',['tjregion',['../structtjregion.html',1,'']]],
|
['tjregion',['tjregion',['../structtjregion.html',1,'']]],
|
||||||
['tjsamp',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
|
['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_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_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_5f440',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]],
|
||||||
@@ -56,7 +70,7 @@ var searchData=
|
|||||||
['tjsamp_5fgray',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',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']]],
|
['tjscaled',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]],
|
||||||
['tjscalingfactor',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
|
['tjscalingfactor',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
|
||||||
['tjtransform',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#gaa29f3189c41be12ec5dee7caec318a31',1,'tjtransform(): turbojpeg.h'],['../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']]],
|
['tjtransform',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a',1,'tjTransform(tjhandle handle, const 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',['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_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_5fnone',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
var searchData=
|
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']]],
|
['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']]],
|
['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']]]
|
['tjxop',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]]
|
||||||
|
|||||||
@@ -1,16 +1,23 @@
|
|||||||
var searchData=
|
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_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_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_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_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_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_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_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_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_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_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']]],
|
['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_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_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_5f440',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]],
|
||||||
|
|||||||
@@ -2,18 +2,27 @@ var searchData=
|
|||||||
[
|
[
|
||||||
['tjalloc',['tjAlloc',['../group___turbo_j_p_e_g.html#ga5c9234bda6d993cdaffdd89bf81a00ff',1,'turbojpeg.h']]],
|
['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']]],
|
['tjbufsize',['tjBufSize',['../group___turbo_j_p_e_g.html#gaccc5bca7f12fcdcc302e6e1c6d4b311b',1,'turbojpeg.h']]],
|
||||||
['tjbufsizeyuv',['tjBufSizeYUV',['../group___turbo_j_p_e_g.html#ga9d0cb06fd5052d21b6f2b382db8b219c',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']]],
|
['tjcompress2',['tjCompress2',['../group___turbo_j_p_e_g.html#gaf38f2ed44bdc88e730e08b632fa6e88e',1,'turbojpeg.h']]],
|
||||||
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gada69cc6443d1bb493b40f1626259e5e9',1,'turbojpeg.h']]],
|
['tjcompressfromyuv',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga6f6de375d6ec0020faba627e37e5a060',1,'turbojpeg.h']]],
|
||||||
['tjdecompressheader2',['tjDecompressHeader2',['../group___turbo_j_p_e_g.html#gac5675fceb7997b385516cdffdb34e6aa',1,'turbojpeg.h']]],
|
['tjcompressfromyuvplanes',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga0b84c682d8accf097d7a743c965d3464',1,'turbojpeg.h']]],
|
||||||
['tjdecompresstoyuv',['tjDecompressToYUV',['../group___turbo_j_p_e_g.html#gad7810af095624a4016e72957a50f77d8',1,'turbojpeg.h']]],
|
['tjdecodeyuv',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga077c61027b875afecd5a1613bf18b3c1',1,'turbojpeg.h']]],
|
||||||
|
['tjdecodeyuvplanes',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#gaf42f19b7a496eb18bdc84fe61ee6d3e2',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gad8026a417e16a76313bc0a6c9e8b2ba2',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompressheader3',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga3fced455e504e8ff4fbad28ba94a3020',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompresstoyuv2',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga39e08906528db5a764670ea48d344b09',1,'turbojpeg.h']]],
|
||||||
|
['tjdecompresstoyuvplanes',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#ga38d0ef90692663b3ffb5b16da2541512',1,'turbojpeg.h']]],
|
||||||
['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga674adee917b95ad4a896f1ba39e12540',1,'turbojpeg.h']]],
|
['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga674adee917b95ad4a896f1ba39e12540',1,'turbojpeg.h']]],
|
||||||
['tjencodeyuv2',['tjEncodeYUV2',['../group___turbo_j_p_e_g.html#ga0fa4e7b1943687c6a0c0304529c55d35',1,'turbojpeg.h']]],
|
['tjencodeyuv3',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#gaabe05acd734990053ad1294b5ef239aa',1,'turbojpeg.h']]],
|
||||||
|
['tjencodeyuvplanes',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga8a65ed3bd12df57c219d46afbc9008f1',1,'turbojpeg.h']]],
|
||||||
['tjfree',['tjFree',['../group___turbo_j_p_e_g.html#ga8c4a1231dc06a450514c835f6471f137',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']]],
|
['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']]],
|
['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']]],
|
['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']]],
|
['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']]],
|
['tjinittransform',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga3155b775bfbac9dbba869b95a0367902',1,'turbojpeg.h']]],
|
||||||
['tjtransform',['tjTransform',['../group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616',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#gad02cd42b69f193a0623a9c801788df3a',1,'turbojpeg.h']]]
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
</script>
|
</script>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
<tr style="height: 56px;">
|
<tr style="height: 56px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">TurboJPEG
|
<div id="projectname">TurboJPEG
|
||||||
 <span id="projectnumber">1.2.1</span>
|
 <span id="projectnumber">1.5</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
</script>
|
</script>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
<tr style="height: 56px;">
|
<tr style="height: 56px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">TurboJPEG
|
<div id="projectname">TurboJPEG
|
||||||
 <span id="projectnumber">1.2.1</span>
|
 <span id="projectnumber">1.5</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
</script>
|
</script>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
<tr style="height: 56px;">
|
<tr style="height: 56px;">
|
||||||
<td style="padding-left: 0.5em;">
|
<td style="padding-left: 0.5em;">
|
||||||
<div id="projectname">TurboJPEG
|
<div id="projectname">TurboJPEG
|
||||||
 <span id="projectnumber">1.2.1</span>
|
 <span id="projectnumber">1.5</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -132,7 +133,7 @@ Data Fields</h2></td></tr>
|
|||||||
<tr><td class="paramname">arrayRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the array pointed to by <code>coeffs</code> as well as its offset relative to the component plane. TurboJPEG implementations may choose to split each component plane into multiple DCT coefficient arrays and call the callback function once for each array.</td></tr>
|
<tr><td class="paramname">arrayRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the array pointed to by <code>coeffs</code> as well as its offset relative to the component plane. TurboJPEG implementations may choose to split each component plane into multiple DCT coefficient arrays and call the callback function once for each array.</td></tr>
|
||||||
<tr><td class="paramname">planeRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the component plane to which <code>coeffs</code> belongs</td></tr>
|
<tr><td class="paramname">planeRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the component plane to which <code>coeffs</code> belongs</td></tr>
|
||||||
<tr><td class="paramname">componentID</td><td>ID number of the component plane to which <code>coeffs</code> belongs (Y, Cb, and Cr have, respectively, ID's of 0, 1, and 2 in typical JPEG images.)</td></tr>
|
<tr><td class="paramname">componentID</td><td>ID number of the component plane to which <code>coeffs</code> belongs (Y, Cb, and Cr have, respectively, ID's of 0, 1, and 2 in typical JPEG images.)</td></tr>
|
||||||
<tr><td class="paramname">transformID</td><td>ID number of the transformed image to which <code>coeffs</code> belongs. This is the same as the index of the transform in the <code>transforms</code> array that was passed to <a class="el" href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a>. </td></tr>
|
<tr><td class="paramname">transformID</td><td>ID number of the transformed image to which <code>coeffs</code> belongs. This is the same as the index of the transform in the <code>transforms</code> array that was passed to <a class="el" href="group___turbo_j_p_e_g.html#gad02cd42b69f193a0623a9c801788df3a" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a>.</td></tr>
|
||||||
<tr><td class="paramname">transform</td><td>a pointer to a <a class="el" href="structtjtransform.html" title="Lossless transform.">tjtransform</a> structure that specifies the parameters and/or cropping region for this transform</td></tr>
|
<tr><td class="paramname">transform</td><td>a pointer to a <a class="el" href="structtjtransform.html" title="Lossless transform.">tjtransform</a> structure that specifies the parameters and/or cropping region for this transform</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
3
doxygen-extra.css
Normal file
3
doxygen-extra.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
code {
|
||||||
|
color: #4665A2;
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
PROJECT_NAME = TurboJPEG
|
PROJECT_NAME = TurboJPEG
|
||||||
PROJECT_NUMBER = 1.2.1
|
PROJECT_NUMBER = 1.5
|
||||||
OUTPUT_DIRECTORY = doc/
|
OUTPUT_DIRECTORY = doc/
|
||||||
USE_WINDOWS_ENCODING = NO
|
USE_WINDOWS_ENCODING = NO
|
||||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||||
@@ -13,3 +13,4 @@ JAVADOC_AUTOBRIEF = YES
|
|||||||
MAX_INITIALIZER_LINES = 0
|
MAX_INITIALIZER_LINES = 0
|
||||||
ALWAYS_DETAILED_SEC = YES
|
ALWAYS_DETAILED_SEC = YES
|
||||||
HTML_TIMESTAMP = NO
|
HTML_TIMESTAMP = NO
|
||||||
|
HTML_EXTRA_STYLESHEET = doxygen-extra.css
|
||||||
|
|||||||
13
jaricom.c
13
jaricom.c
@@ -1,9 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* jaricom.c
|
* jaricom.c
|
||||||
*
|
*
|
||||||
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Developed 1997-2009 by Guido Vollbeding.
|
* Developed 1997-2009 by Guido Vollbeding.
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* libjpeg-turbo Modifications:
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* Copyright (C) 2015, D. R. Commander.
|
||||||
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* file.
|
||||||
*
|
*
|
||||||
* This file contains probability estimation tables for common use in
|
* This file contains probability estimation tables for common use in
|
||||||
* arithmetic entropy encoding and decoding routines.
|
* arithmetic entropy encoding and decoding routines.
|
||||||
@@ -18,7 +21,7 @@
|
|||||||
#include "jpeglib.h"
|
#include "jpeglib.h"
|
||||||
|
|
||||||
/* The following #define specifies the packing of the four components
|
/* The following #define specifies the packing of the four components
|
||||||
* into the compact INT32 representation.
|
* into the compact JLONG representation.
|
||||||
* Note that this formula must match the actual arithmetic encoder
|
* Note that this formula must match the actual arithmetic encoder
|
||||||
* and decoder implementation. The implementation has to be changed
|
* and decoder implementation. The implementation has to be changed
|
||||||
* if this formula is changed.
|
* if this formula is changed.
|
||||||
@@ -26,9 +29,9 @@
|
|||||||
* implementation (jbig_tab.c).
|
* implementation (jbig_tab.c).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define V(i,a,b,c,d) (((INT32)a << 16) | ((INT32)c << 8) | ((INT32)d << 7) | b)
|
#define V(i,a,b,c,d) (((JLONG)a << 16) | ((JLONG)c << 8) | ((JLONG)d << 7) | b)
|
||||||
|
|
||||||
const INT32 jpeg_aritab[113+1] = {
|
const JLONG jpeg_aritab[113+1] = {
|
||||||
/*
|
/*
|
||||||
* Index, Qe_Value, Next_Index_LPS, Next_Index_MPS, Switch_MPS
|
* Index, Qe_Value, Next_Index_LPS, Next_Index_MPS, Switch_MPS
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ set(JAVA_CLASSNAMES org/libjpegturbo/turbojpeg/TJ
|
|||||||
org/libjpegturbo/turbojpeg/TJCompressor
|
org/libjpegturbo/turbojpeg/TJCompressor
|
||||||
org/libjpegturbo/turbojpeg/TJCustomFilter
|
org/libjpegturbo/turbojpeg/TJCustomFilter
|
||||||
org/libjpegturbo/turbojpeg/TJDecompressor
|
org/libjpegturbo/turbojpeg/TJDecompressor
|
||||||
|
org/libjpegturbo/turbojpeg/TJException
|
||||||
org/libjpegturbo/turbojpeg/TJScalingFactor
|
org/libjpegturbo/turbojpeg/TJScalingFactor
|
||||||
org/libjpegturbo/turbojpeg/TJTransform
|
org/libjpegturbo/turbojpeg/TJTransform
|
||||||
org/libjpegturbo/turbojpeg/TJTransformer
|
org/libjpegturbo/turbojpeg/TJTransformer
|
||||||
|
org/libjpegturbo/turbojpeg/YUVImage
|
||||||
TJUnitTest
|
TJUnitTest
|
||||||
TJExample
|
TJExample
|
||||||
TJBench)
|
TJBench)
|
||||||
|
|||||||
@@ -10,9 +10,11 @@ JAVASOURCES = org/libjpegturbo/turbojpeg/TJ.java \
|
|||||||
org/libjpegturbo/turbojpeg/TJCompressor.java \
|
org/libjpegturbo/turbojpeg/TJCompressor.java \
|
||||||
org/libjpegturbo/turbojpeg/TJCustomFilter.java \
|
org/libjpegturbo/turbojpeg/TJCustomFilter.java \
|
||||||
org/libjpegturbo/turbojpeg/TJDecompressor.java \
|
org/libjpegturbo/turbojpeg/TJDecompressor.java \
|
||||||
|
org/libjpegturbo/turbojpeg/TJException.java \
|
||||||
org/libjpegturbo/turbojpeg/TJScalingFactor.java \
|
org/libjpegturbo/turbojpeg/TJScalingFactor.java \
|
||||||
org/libjpegturbo/turbojpeg/TJTransform.java \
|
org/libjpegturbo/turbojpeg/TJTransform.java \
|
||||||
org/libjpegturbo/turbojpeg/TJTransformer.java \
|
org/libjpegturbo/turbojpeg/TJTransformer.java \
|
||||||
|
org/libjpegturbo/turbojpeg/YUVImage.java \
|
||||||
TJExample.java \
|
TJExample.java \
|
||||||
TJUnitTest.java \
|
TJUnitTest.java \
|
||||||
TJBench.java
|
TJBench.java
|
||||||
@@ -30,17 +32,19 @@ JAVA_CLASSES = org/libjpegturbo/turbojpeg/TJ.class \
|
|||||||
org/libjpegturbo/turbojpeg/TJCompressor.class \
|
org/libjpegturbo/turbojpeg/TJCompressor.class \
|
||||||
org/libjpegturbo/turbojpeg/TJCustomFilter.class \
|
org/libjpegturbo/turbojpeg/TJCustomFilter.class \
|
||||||
org/libjpegturbo/turbojpeg/TJDecompressor.class \
|
org/libjpegturbo/turbojpeg/TJDecompressor.class \
|
||||||
|
org/libjpegturbo/turbojpeg/TJException.class \
|
||||||
org/libjpegturbo/turbojpeg/TJLoader.class \
|
org/libjpegturbo/turbojpeg/TJLoader.class \
|
||||||
org/libjpegturbo/turbojpeg/TJScalingFactor.class \
|
org/libjpegturbo/turbojpeg/TJScalingFactor.class \
|
||||||
org/libjpegturbo/turbojpeg/TJTransform.class \
|
org/libjpegturbo/turbojpeg/TJTransform.class \
|
||||||
org/libjpegturbo/turbojpeg/TJTransformer.class \
|
org/libjpegturbo/turbojpeg/TJTransformer.class \
|
||||||
|
org/libjpegturbo/turbojpeg/YUVImage.class \
|
||||||
TJExample.class \
|
TJExample.class \
|
||||||
TJUnitTest.class \
|
TJUnitTest.class \
|
||||||
TJBench.class
|
TJBench.class
|
||||||
|
|
||||||
all: all-am turbojpeg.jar
|
all: all-am turbojpeg.jar
|
||||||
|
|
||||||
turbojpeg.jar: $(JAVA_CLASSES) ${srcdir}/MANIFEST.MF
|
turbojpeg.jar: classnoinst.stamp ${srcdir}/MANIFEST.MF
|
||||||
$(JAR) cfm turbojpeg.jar ${srcdir}/MANIFEST.MF $(JAVA_CLASSES)
|
$(JAR) cfm turbojpeg.jar ${srcdir}/MANIFEST.MF $(JAVA_CLASSES)
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2009-2014 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2009-2014, 2016-2017 D. R. Commander. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -34,27 +34,28 @@ import org.libjpegturbo.turbojpeg.*;
|
|||||||
|
|
||||||
class TJBench {
|
class TJBench {
|
||||||
|
|
||||||
static final int YUVENCODE = 1;
|
static int flags = 0, quiet = 0, pf = TJ.PF_BGR, yuvpad = 1;
|
||||||
static final int YUVDECODE = 2;
|
static boolean compOnly, decompOnly, doTile, doYUV, write = true;
|
||||||
|
|
||||||
static int flags = 0, yuv = 0, quiet = 0, pf = TJ.PF_BGR;
|
|
||||||
static boolean decompOnly, doTile;
|
|
||||||
|
|
||||||
static final String[] pixFormatStr = {
|
static final String[] pixFormatStr = {
|
||||||
"RGB", "BGR", "RGBX", "BGRX", "XBGR", "XRGB", "GRAY"
|
"RGB", "BGR", "RGBX", "BGRX", "XBGR", "XRGB", "GRAY"
|
||||||
};
|
};
|
||||||
|
|
||||||
static final String[] subNameLong = {
|
static final String[] subNameLong = {
|
||||||
"4:4:4", "4:2:2", "4:2:0", "GRAY", "4:4:0"
|
"4:4:4", "4:2:2", "4:2:0", "GRAY", "4:4:0", "4:1:1"
|
||||||
};
|
};
|
||||||
|
|
||||||
static final String[] subName = {
|
static final String[] subName = {
|
||||||
"444", "422", "420", "GRAY", "440"
|
"444", "422", "420", "GRAY", "440", "411"
|
||||||
|
};
|
||||||
|
|
||||||
|
static final String[] csName = {
|
||||||
|
"RGB", "YCbCr", "GRAY", "CMYK", "YCCK"
|
||||||
};
|
};
|
||||||
|
|
||||||
static TJScalingFactor sf;
|
static TJScalingFactor sf;
|
||||||
static int xformOp = TJTransform.OP_NONE, xformOpt = 0;
|
static int xformOp = TJTransform.OP_NONE, xformOpt = 0;
|
||||||
static double benchTime = 5.0;
|
static double benchTime = 5.0, warmup = 1.0;
|
||||||
|
|
||||||
|
|
||||||
static final double getTime() {
|
static final double getTime() {
|
||||||
@@ -62,6 +63,16 @@ class TJBench {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static String formatName(int subsamp, int cs) {
|
||||||
|
if (cs == TJ.CS_YCbCr)
|
||||||
|
return subNameLong[subsamp];
|
||||||
|
else if (cs == TJ.CS_YCCK)
|
||||||
|
return csName[cs] + " " + subNameLong[subsamp];
|
||||||
|
else
|
||||||
|
return csName[cs];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static String sigFig(double val, int figs) {
|
static String sigFig(double val, int figs) {
|
||||||
String format;
|
String format;
|
||||||
int digitsAfterDecimal = figs - (int)Math.ceil(Math.log10(Math.abs(val)));
|
int digitsAfterDecimal = figs - (int)Math.ceil(Math.log10(Math.abs(val)));
|
||||||
@@ -119,56 +130,72 @@ class TJBench {
|
|||||||
|
|
||||||
|
|
||||||
/* Decompression test */
|
/* Decompression test */
|
||||||
static void decompTest(byte[] srcBuf, byte[][] jpegBuf, int[] jpegSize,
|
static void decomp(byte[] srcBuf, byte[][] jpegBuf, int[] jpegSize,
|
||||||
byte[] dstBuf, int w, int h, int subsamp,
|
byte[] dstBuf, int w, int h, int subsamp, int jpegQual,
|
||||||
int jpegQual, String fileName, int tilew, int tileh)
|
String fileName, int tilew, int tileh) throws Exception {
|
||||||
throws Exception {
|
|
||||||
String qualStr = new String(""), sizeStr, tempStr;
|
String qualStr = new String(""), sizeStr, tempStr;
|
||||||
TJDecompressor tjd;
|
TJDecompressor tjd;
|
||||||
double start, elapsed;
|
double elapsed, elapsedDecode;
|
||||||
int ps = TJ.getPixelSize(pf), i;
|
int ps = TJ.getPixelSize(pf), i, iter = 0;
|
||||||
int yuvSize = TJ.bufSizeYUV(w, h, subsamp), bufsize;
|
int scaledw = sf.getScaled(w);
|
||||||
int scaledw = (yuv == YUVDECODE) ? w : sf.getScaled(w);
|
int scaledh = sf.getScaled(h);
|
||||||
int scaledh = (yuv == YUVDECODE) ? h : sf.getScaled(h);
|
|
||||||
int pitch = scaledw * ps;
|
int pitch = scaledw * ps;
|
||||||
|
YUVImage yuvImage = null;
|
||||||
|
|
||||||
if (jpegQual > 0)
|
if (jpegQual > 0)
|
||||||
qualStr = new String("_Q" + jpegQual);
|
qualStr = new String("_Q" + jpegQual);
|
||||||
|
|
||||||
tjd = new TJDecompressor();
|
tjd = new TJDecompressor();
|
||||||
|
|
||||||
int bufSize = (yuv == YUVDECODE ? yuvSize : pitch * scaledh);
|
|
||||||
if (dstBuf == null)
|
if (dstBuf == null)
|
||||||
dstBuf = new byte[bufSize];
|
dstBuf = new byte[pitch * scaledh];
|
||||||
|
|
||||||
/* Set the destination buffer to gray so we know whether the decompressor
|
/* Set the destination buffer to gray so we know whether the decompressor
|
||||||
attempted to write to it */
|
attempted to write to it */
|
||||||
Arrays.fill(dstBuf, (byte)127);
|
Arrays.fill(dstBuf, (byte)127);
|
||||||
|
|
||||||
/* Execute once to preload cache */
|
if (doYUV) {
|
||||||
tjd.setJPEGImage(jpegBuf[0], jpegSize[0]);
|
int width = doTile ? tilew : scaledw;
|
||||||
if (yuv == YUVDECODE)
|
int height = doTile ? tileh : scaledh;
|
||||||
tjd.decompressToYUV(dstBuf, flags);
|
yuvImage = new YUVImage(width, yuvpad, height, subsamp);
|
||||||
else
|
Arrays.fill(yuvImage.getBuf(), (byte)127);
|
||||||
tjd.decompress(dstBuf, 0, 0, scaledw, pitch, scaledh, pf, flags);
|
}
|
||||||
|
|
||||||
/* Benchmark */
|
/* Benchmark */
|
||||||
for (i = 0, start = getTime(); (elapsed = getTime() - start) < benchTime;
|
iter = -1;
|
||||||
i++) {
|
elapsed = elapsedDecode = 0.0;
|
||||||
|
while (true) {
|
||||||
int tile = 0;
|
int tile = 0;
|
||||||
if (yuv == YUVDECODE)
|
double start = getTime();
|
||||||
tjd.decompressToYUV(dstBuf, flags);
|
|
||||||
else {
|
|
||||||
for (int y = 0; y < h; y += tileh) {
|
for (int y = 0; y < h; y += tileh) {
|
||||||
for (int x = 0; x < w; x += tilew, tile++) {
|
for (int x = 0; x < w; x += tilew, tile++) {
|
||||||
int width = doTile ? Math.min(tilew, w - x) : scaledw;
|
int width = doTile ? Math.min(tilew, w - x) : scaledw;
|
||||||
int height = doTile ? Math.min(tileh, h - y) : scaledh;
|
int height = doTile ? Math.min(tileh, h - y) : scaledh;
|
||||||
tjd.setJPEGImage(jpegBuf[tile], jpegSize[tile]);
|
tjd.setSourceImage(jpegBuf[tile], jpegSize[tile]);
|
||||||
|
if (doYUV) {
|
||||||
|
yuvImage.setBuf(yuvImage.getBuf(), width, yuvpad, height, subsamp);
|
||||||
|
tjd.decompressToYUV(yuvImage, flags);
|
||||||
|
double startDecode = getTime();
|
||||||
|
tjd.setSourceImage(yuvImage);
|
||||||
|
tjd.decompress(dstBuf, x, y, width, pitch, height, pf, flags);
|
||||||
|
if (iter >= 0)
|
||||||
|
elapsedDecode += getTime() - startDecode;
|
||||||
|
} else
|
||||||
tjd.decompress(dstBuf, x, y, width, pitch, height, pf, flags);
|
tjd.decompress(dstBuf, x, y, width, pitch, height, pf, flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elapsed += getTime() - start;
|
||||||
|
if (iter >= 0) {
|
||||||
|
iter++;
|
||||||
|
if (elapsed >= benchTime)
|
||||||
|
break;
|
||||||
|
} else if (elapsed >= warmup) {
|
||||||
|
iter = 0;
|
||||||
|
elapsed = elapsedDecode = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(doYUV)
|
||||||
|
elapsed -= elapsedDecode;
|
||||||
|
|
||||||
tjd = null;
|
tjd = null;
|
||||||
for (i = 0; i < jpegBuf.length; i++)
|
for (i = 0; i < jpegBuf.length; i++)
|
||||||
@@ -176,22 +203,31 @@ class TJBench {
|
|||||||
jpegBuf = null; jpegSize = null;
|
jpegBuf = null; jpegSize = null;
|
||||||
System.gc();
|
System.gc();
|
||||||
|
|
||||||
if (quiet != 0)
|
if (quiet != 0) {
|
||||||
System.out.println(
|
System.out.format("%-6s%s",
|
||||||
sigFig((double)(w * h) / 1000000. * (double)i / elapsed, 4));
|
sigFig((double)(w * h) / 1000000. * (double)iter / elapsed, 4),
|
||||||
else {
|
quiet == 2 ? "\n" : " ");
|
||||||
System.out.format("D--> Frame rate: %f fps\n",
|
if (doYUV)
|
||||||
(double)i / elapsed);
|
System.out.format("%s\n",
|
||||||
System.out.format(" Dest. throughput: %f Megapixels/sec\n",
|
sigFig((double)(w * h) / 1000000. * (double)iter / elapsedDecode, 4));
|
||||||
(double)(w * h) / 1000000. * (double)i / elapsed);
|
else if (quiet != 2)
|
||||||
|
System.out.print("\n");
|
||||||
|
} else {
|
||||||
|
System.out.format("%s --> Frame rate: %f fps\n",
|
||||||
|
(doYUV ? "Decomp to YUV":"Decompress "),
|
||||||
|
(double)iter / elapsed);
|
||||||
|
System.out.format(" Throughput: %f Megapixels/sec\n",
|
||||||
|
(double)(w * h) / 1000000. * (double)iter / elapsed);
|
||||||
|
if (doYUV) {
|
||||||
|
System.out.format("YUV Decode --> Frame rate: %f fps\n",
|
||||||
|
(double)iter / elapsedDecode);
|
||||||
|
System.out.format(" Throughput: %f Megapixels/sec\n",
|
||||||
|
(double)(w * h) / 1000000. * (double)iter / elapsedDecode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (yuv == YUVDECODE) {
|
if (!write) return;
|
||||||
tempStr = fileName + "_" + subName[subsamp] + qualStr + ".yuv";
|
|
||||||
FileOutputStream fos = new FileOutputStream(tempStr);
|
|
||||||
fos.write(dstBuf, 0, yuvSize);
|
|
||||||
fos.close();
|
|
||||||
} else {
|
|
||||||
if (sf.getNum() != 1 || sf.getDenom() != 1)
|
if (sf.getNum() != 1 || sf.getDenom() != 1)
|
||||||
sizeStr = new String(sf.getNum() + "_" + sf.getDenom());
|
sizeStr = new String(sf.getNum() + "_" + sf.getDenom());
|
||||||
else if (tilew != w || tileh != h)
|
else if (tilew != w || tileh != h)
|
||||||
@@ -203,8 +239,9 @@ class TJBench {
|
|||||||
else
|
else
|
||||||
tempStr = new String(fileName + "_" + subName[subsamp] + qualStr +
|
tempStr = new String(fileName + "_" + subName[subsamp] + qualStr +
|
||||||
"_" + sizeStr + ".bmp");
|
"_" + sizeStr + ".bmp");
|
||||||
|
|
||||||
saveImage(tempStr, dstBuf, scaledw, scaledh, pf);
|
saveImage(tempStr, dstBuf, scaledw, scaledh, pf);
|
||||||
int ndx = tempStr.indexOf('.');
|
int ndx = tempStr.lastIndexOf('.');
|
||||||
tempStr = new String(tempStr.substring(0, ndx) + "-err.bmp");
|
tempStr = new String(tempStr.substring(0, ndx) + "-err.bmp");
|
||||||
if (srcBuf != null && sf.getNum() == 1 && sf.getDenom() == 1) {
|
if (srcBuf != null && sf.getNum() == 1 && sf.getDenom() == 1) {
|
||||||
if (quiet == 0)
|
if (quiet == 0)
|
||||||
@@ -235,91 +272,25 @@ class TJBench {
|
|||||||
saveImage(tempStr, dstBuf, w, h, pf);
|
saveImage(tempStr, dstBuf, w, h, pf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void doTestYUV(byte[] srcBuf, int w, int h, int subsamp,
|
static void fullTest(byte[] srcBuf, int w, int h, int subsamp, int jpegQual,
|
||||||
String fileName) throws Exception {
|
|
||||||
TJCompressor tjc;
|
|
||||||
byte[] dstBuf;
|
|
||||||
double start, elapsed;
|
|
||||||
int ps = TJ.getPixelSize(pf), i;
|
|
||||||
int yuvSize = 0;
|
|
||||||
|
|
||||||
yuvSize = TJ.bufSizeYUV(w, h, subsamp);
|
|
||||||
dstBuf = new byte[yuvSize];
|
|
||||||
|
|
||||||
if (quiet == 0)
|
|
||||||
System.out.format(">>>>> %s (%s) <--> YUV %s <<<<<\n",
|
|
||||||
pixFormatStr[pf],
|
|
||||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "Bottom-up" : "Top-down",
|
|
||||||
subNameLong[subsamp]);
|
|
||||||
|
|
||||||
if (quiet == 1)
|
|
||||||
System.out.format("%s\t%s\t%s\tN/A\t", pixFormatStr[pf],
|
|
||||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD",
|
|
||||||
subNameLong[subsamp]);
|
|
||||||
|
|
||||||
tjc = new TJCompressor(srcBuf, 0, 0, w, 0, h, pf);
|
|
||||||
tjc.setSubsamp(subsamp);
|
|
||||||
|
|
||||||
/* Execute once to preload cache */
|
|
||||||
tjc.encodeYUV(dstBuf, flags);
|
|
||||||
|
|
||||||
/* Benchmark */
|
|
||||||
for (i = 0, start = getTime();
|
|
||||||
(elapsed = getTime() - start) < benchTime; i++)
|
|
||||||
tjc.encodeYUV(dstBuf, flags);
|
|
||||||
|
|
||||||
if (quiet == 1)
|
|
||||||
System.out.format("%-4d %-4d\t", w, h);
|
|
||||||
if (quiet != 0) {
|
|
||||||
System.out.format("%s%c%s%c",
|
|
||||||
sigFig((double)(w * h) / 1000000. * (double) i / elapsed, 4),
|
|
||||||
quiet == 2 ? '\n' : '\t',
|
|
||||||
sigFig((double)(w * h * ps) / (double)yuvSize, 4),
|
|
||||||
quiet == 2 ? '\n' : '\t');
|
|
||||||
} else {
|
|
||||||
System.out.format("\n%s size: %d x %d\n", "Image", w, h);
|
|
||||||
System.out.format("C--> Frame rate: %f fps\n",
|
|
||||||
(double)i / elapsed);
|
|
||||||
System.out.format(" Output image size: %d bytes\n", yuvSize);
|
|
||||||
System.out.format(" Compression ratio: %f:1\n",
|
|
||||||
(double)(w * h * ps) / (double)yuvSize);
|
|
||||||
System.out.format(" Source throughput: %f Megapixels/sec\n",
|
|
||||||
(double)(w * h) / 1000000. * (double)i / elapsed);
|
|
||||||
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
|
||||||
(double)yuvSize * 8. / 1000000. * (double)i / elapsed);
|
|
||||||
}
|
|
||||||
String tempStr = fileName + "_" + subName[subsamp] + ".yuv";
|
|
||||||
FileOutputStream fos = new FileOutputStream(tempStr);
|
|
||||||
fos.write(dstBuf, 0, yuvSize);
|
|
||||||
fos.close();
|
|
||||||
if (quiet == 0)
|
|
||||||
System.out.println("Reference image written to " + tempStr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void doTest(byte[] srcBuf, int w, int h, int subsamp, int jpegQual,
|
|
||||||
String fileName) throws Exception {
|
String fileName) throws Exception {
|
||||||
TJCompressor tjc;
|
TJCompressor tjc;
|
||||||
byte[] tmpBuf;
|
byte[] tmpBuf;
|
||||||
byte[][] jpegBuf;
|
byte[][] jpegBuf;
|
||||||
int[] jpegSize;
|
int[] jpegSize;
|
||||||
double start, elapsed;
|
double start, elapsed, elapsedEncode;
|
||||||
int totalJpegSize = 0, tilew, tileh, i;
|
int totalJpegSize = 0, tilew, tileh, i, iter;
|
||||||
int ps = TJ.getPixelSize(pf), ntilesw = 1, ntilesh = 1, pitch = w * ps;
|
int ps = TJ.getPixelSize(pf);
|
||||||
|
int ntilesw = 1, ntilesh = 1, pitch = w * ps;
|
||||||
if (yuv == YUVENCODE) {
|
String pfStr = pixFormatStr[pf];
|
||||||
doTestYUV(srcBuf, w, h, subsamp, fileName);
|
YUVImage yuvImage = null;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmpBuf = new byte[pitch * h];
|
tmpBuf = new byte[pitch * h];
|
||||||
|
|
||||||
if (quiet == 0)
|
if (quiet == 0)
|
||||||
System.out.format(">>>>> %s (%s) <--> JPEG %s Q%d <<<<<\n",
|
System.out.format(">>>>> %s (%s) <--> JPEG %s Q%d <<<<<\n", pfStr,
|
||||||
pixFormatStr[pf],
|
|
||||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "Bottom-up" : "Top-down",
|
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "Bottom-up" : "Top-down",
|
||||||
subNameLong[subsamp], jpegQual);
|
subNameLong[subsamp], jpegQual);
|
||||||
|
|
||||||
@@ -339,58 +310,99 @@ class TJBench {
|
|||||||
|
|
||||||
/* Compression test */
|
/* Compression test */
|
||||||
if (quiet == 1)
|
if (quiet == 1)
|
||||||
System.out.format("%s\t%s\t%s\t%d\t", pixFormatStr[pf],
|
System.out.format("%-4s (%s) %-5s %-3d ", pfStr,
|
||||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD",
|
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD",
|
||||||
subNameLong[subsamp], jpegQual);
|
subNameLong[subsamp], jpegQual);
|
||||||
for (i = 0; i < h; i++)
|
for (i = 0; i < h; i++)
|
||||||
System.arraycopy(srcBuf, w * ps * i, tmpBuf, pitch * i, w * ps);
|
System.arraycopy(srcBuf, w * ps * i, tmpBuf, pitch * i, w * ps);
|
||||||
tjc.setSourceImage(srcBuf, 0, 0, tilew, pitch, tileh, pf);
|
|
||||||
tjc.setJPEGQuality(jpegQual);
|
tjc.setJPEGQuality(jpegQual);
|
||||||
tjc.setSubsamp(subsamp);
|
tjc.setSubsamp(subsamp);
|
||||||
|
|
||||||
/* Execute once to preload cache */
|
if (doYUV) {
|
||||||
tjc.compress(jpegBuf[0], flags);
|
yuvImage = new YUVImage(tilew, yuvpad, tileh, subsamp);
|
||||||
|
Arrays.fill(yuvImage.getBuf(), (byte)127);
|
||||||
|
}
|
||||||
|
|
||||||
/* Benchmark */
|
/* Benchmark */
|
||||||
for (i = 0, start = getTime();
|
iter = -1;
|
||||||
(elapsed = getTime() - start) < benchTime; i++) {
|
elapsed = elapsedEncode = 0.0;
|
||||||
|
while (true) {
|
||||||
int tile = 0;
|
int tile = 0;
|
||||||
totalJpegSize = 0;
|
totalJpegSize = 0;
|
||||||
|
start = getTime();
|
||||||
for (int y = 0; y < h; y += tileh) {
|
for (int y = 0; y < h; y += tileh) {
|
||||||
for (int x = 0; x < w; x += tilew, tile++) {
|
for (int x = 0; x < w; x += tilew, tile++) {
|
||||||
int width = Math.min(tilew, w - x);
|
int width = Math.min(tilew, w - x);
|
||||||
int height = Math.min(tileh, h - y);
|
int height = Math.min(tileh, h - y);
|
||||||
tjc.setSourceImage(srcBuf, x, y, width, pitch, height, pf);
|
tjc.setSourceImage(srcBuf, x, y, width, pitch, height, pf);
|
||||||
|
if (doYUV) {
|
||||||
|
double startEncode = getTime();
|
||||||
|
yuvImage.setBuf(yuvImage.getBuf(), width, yuvpad, height,
|
||||||
|
subsamp);
|
||||||
|
tjc.encodeYUV(yuvImage, flags);
|
||||||
|
if (iter >= 0)
|
||||||
|
elapsedEncode += getTime() - startEncode;
|
||||||
|
tjc.setSourceImage(yuvImage);
|
||||||
|
}
|
||||||
tjc.compress(jpegBuf[tile], flags);
|
tjc.compress(jpegBuf[tile], flags);
|
||||||
jpegSize[tile] = tjc.getCompressedSize();
|
jpegSize[tile] = tjc.getCompressedSize();
|
||||||
totalJpegSize += jpegSize[tile];
|
totalJpegSize += jpegSize[tile];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elapsed += getTime() - start;
|
||||||
|
if (iter >= 0) {
|
||||||
|
iter++;
|
||||||
|
if (elapsed >= benchTime)
|
||||||
|
break;
|
||||||
|
} else if (elapsed >= warmup) {
|
||||||
|
iter = 0;
|
||||||
|
elapsed = elapsedEncode = 0.0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (doYUV)
|
||||||
|
elapsed -= elapsedEncode;
|
||||||
|
|
||||||
if (quiet == 1)
|
if (quiet == 1)
|
||||||
System.out.format("%-4d %-4d\t", tilew, tileh);
|
System.out.format("%-5d %-5d ", tilew, tileh);
|
||||||
if (quiet != 0) {
|
if (quiet != 0) {
|
||||||
System.out.format("%s%c%s%c",
|
if (doYUV)
|
||||||
sigFig((double)(w * h) / 1000000. * (double) i / elapsed, 4),
|
System.out.format("%-6s%s",
|
||||||
quiet == 2 ? '\n' : '\t',
|
sigFig((double)(w * h) / 1000000. * (double)iter / elapsedEncode, 4),
|
||||||
|
quiet == 2 ? "\n" : " ");
|
||||||
|
System.out.format("%-6s%s",
|
||||||
|
sigFig((double)(w * h) / 1000000. * (double)iter / elapsed, 4),
|
||||||
|
quiet == 2 ? "\n" : " ");
|
||||||
|
System.out.format("%-6s%s",
|
||||||
sigFig((double)(w * h * ps) / (double)totalJpegSize, 4),
|
sigFig((double)(w * h * ps) / (double)totalJpegSize, 4),
|
||||||
quiet == 2 ? '\n' : '\t');
|
quiet == 2 ? "\n" : " ");
|
||||||
} else {
|
} else {
|
||||||
System.out.format("\n%s size: %d x %d\n", doTile ? "Tile" : "Image",
|
System.out.format("\n%s size: %d x %d\n", doTile ? "Tile" : "Image",
|
||||||
tilew, tileh);
|
tilew, tileh);
|
||||||
System.out.format("C--> Frame rate: %f fps\n",
|
if (doYUV) {
|
||||||
(double)i / elapsed);
|
System.out.format("Encode YUV --> Frame rate: %f fps\n",
|
||||||
|
(double)iter / elapsedEncode);
|
||||||
|
System.out.format(" Output image size: %d bytes\n",
|
||||||
|
yuvImage.getSize());
|
||||||
|
System.out.format(" Compression ratio: %f:1\n",
|
||||||
|
(double)(w * h * ps) / (double)yuvImage.getSize());
|
||||||
|
System.out.format(" Throughput: %f Megapixels/sec\n",
|
||||||
|
(double)(w * h) / 1000000. * (double)iter / elapsedEncode);
|
||||||
|
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
||||||
|
(double)yuvImage.getSize() * 8. / 1000000. * (double)iter / elapsedEncode);
|
||||||
|
}
|
||||||
|
System.out.format("%s --> Frame rate: %f fps\n",
|
||||||
|
doYUV ? "Comp from YUV" : "Compress ",
|
||||||
|
(double)iter / elapsed);
|
||||||
System.out.format(" Output image size: %d bytes\n",
|
System.out.format(" Output image size: %d bytes\n",
|
||||||
totalJpegSize);
|
totalJpegSize);
|
||||||
System.out.format(" Compression ratio: %f:1\n",
|
System.out.format(" Compression ratio: %f:1\n",
|
||||||
(double)(w * h * ps) / (double)totalJpegSize);
|
(double)(w * h * ps) / (double)totalJpegSize);
|
||||||
System.out.format(" Source throughput: %f Megapixels/sec\n",
|
System.out.format(" Throughput: %f Megapixels/sec\n",
|
||||||
(double)(w * h) / 1000000. * (double)i / elapsed);
|
(double)(w * h) / 1000000. * (double)iter / elapsed);
|
||||||
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
||||||
(double)totalJpegSize * 8. / 1000000. * (double)i / elapsed);
|
(double)totalJpegSize * 8. / 1000000. * (double)iter / elapsed);
|
||||||
}
|
}
|
||||||
if (tilew == w && tileh == h) {
|
if (tilew == w && tileh == h && write) {
|
||||||
String tempStr = fileName + "_" + subName[subsamp] + "_" + "Q" +
|
String tempStr = fileName + "_" + subName[subsamp] + "_" + "Q" +
|
||||||
jpegQual + ".jpg";
|
jpegQual + ".jpg";
|
||||||
FileOutputStream fos = new FileOutputStream(tempStr);
|
FileOutputStream fos = new FileOutputStream(tempStr);
|
||||||
@@ -401,7 +413,8 @@ class TJBench {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Decompression test */
|
/* Decompression test */
|
||||||
decompTest(srcBuf, jpegBuf, jpegSize, tmpBuf, w, h, subsamp, jpegQual,
|
if (!compOnly)
|
||||||
|
decomp(srcBuf, jpegBuf, jpegSize, tmpBuf, w, h, subsamp, jpegQual,
|
||||||
fileName, tilew, tileh);
|
fileName, tilew, tileh);
|
||||||
|
|
||||||
if (tilew == w && tileh == h) break;
|
if (tilew == w && tileh == h) break;
|
||||||
@@ -409,14 +422,14 @@ class TJBench {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void doDecompTest(String fileName) throws Exception {
|
static void decompTest(String fileName) throws Exception {
|
||||||
TJTransformer tjt;
|
TJTransformer tjt;
|
||||||
byte[][] jpegBuf;
|
byte[][] jpegBuf = null;
|
||||||
byte[] srcBuf;
|
byte[] srcBuf;
|
||||||
int[] jpegSize;
|
int[] jpegSize = null;
|
||||||
int totalJpegSize;
|
int totalJpegSize;
|
||||||
int w = 0, h = 0, subsamp = -1, _w, _h, _tilew, _tileh,
|
int w = 0, h = 0, subsamp = -1, cs = -1, _w, _h, _tilew, _tileh,
|
||||||
_ntilesw, _ntilesh, _subsamp, x, y;
|
_ntilesw, _ntilesh, _subsamp, x, y, iter;
|
||||||
int ntilesw = 1, ntilesh = 1;
|
int ntilesw = 1, ntilesh = 1;
|
||||||
double start, elapsed;
|
double start, elapsed;
|
||||||
int ps = TJ.getPixelSize(pf), tile;
|
int ps = TJ.getPixelSize(pf), tile;
|
||||||
@@ -427,28 +440,34 @@ class TJBench {
|
|||||||
fis.read(srcBuf, 0, srcSize);
|
fis.read(srcBuf, 0, srcSize);
|
||||||
fis.close();
|
fis.close();
|
||||||
|
|
||||||
int index = fileName.indexOf('.');
|
int index = fileName.lastIndexOf('.');
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
fileName = new String(fileName.substring(0, index));
|
fileName = new String(fileName.substring(0, index));
|
||||||
|
|
||||||
tjt = new TJTransformer();
|
tjt = new TJTransformer();
|
||||||
|
|
||||||
tjt.setJPEGImage(srcBuf, srcSize);
|
tjt.setSourceImage(srcBuf, srcSize);
|
||||||
w = tjt.getWidth();
|
w = tjt.getWidth();
|
||||||
h = tjt.getHeight();
|
h = tjt.getHeight();
|
||||||
subsamp = tjt.getSubsamp();
|
subsamp = tjt.getSubsamp();
|
||||||
|
cs = tjt.getColorspace();
|
||||||
|
|
||||||
if (quiet == 1) {
|
if (quiet == 1) {
|
||||||
System.out.println("All performance values in Mpixels/sec\n");
|
System.out.println("All performance values in Mpixels/sec\n");
|
||||||
System.out.format("Bitmap\tBitmap\tJPEG\t%s %s \tXform\tComp\tDecomp\n",
|
System.out.format("Bitmap JPEG JPEG %s %s Xform Comp Decomp ",
|
||||||
(doTile ? "Tile " : "Image"),
|
(doTile ? "Tile " : "Image"),
|
||||||
(doTile ? "Tile " : "Image"));
|
(doTile ? "Tile " : "Image"));
|
||||||
System.out.println("Format\tOrder\tSubsamp\tWidth Height\tPerf \tRatio\tPerf\n");
|
if (doYUV)
|
||||||
} else if (quiet == 0) {
|
System.out.print("Decode");
|
||||||
|
System.out.print("\n");
|
||||||
|
System.out.print("Format CS Subsamp Width Height Perf Ratio Perf ");
|
||||||
|
if (doYUV)
|
||||||
|
System.out.print("Perf");
|
||||||
|
System.out.println("\n");
|
||||||
|
} else if (quiet == 0)
|
||||||
System.out.format(">>>>> JPEG %s --> %s (%s) <<<<<\n",
|
System.out.format(">>>>> JPEG %s --> %s (%s) <<<<<\n",
|
||||||
subNameLong[subsamp], pixFormatStr[pf],
|
formatName(subsamp, cs), pixFormatStr[pf],
|
||||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "Bottom-up" : "Top-down");
|
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "Bottom-up" : "Top-down");
|
||||||
}
|
|
||||||
|
|
||||||
for (int tilew = doTile ? 16 : w, tileh = doTile ? 16 : h; ;
|
for (int tilew = doTile ? 16 : w, tileh = doTile ? 16 : h; ;
|
||||||
tilew *= 2, tileh *= 2) {
|
tilew *= 2, tileh *= 2) {
|
||||||
@@ -468,10 +487,10 @@ class TJBench {
|
|||||||
sf.getScaled(_h));
|
sf.getScaled(_h));
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
} else if (quiet == 1) {
|
} else if (quiet == 1) {
|
||||||
System.out.format("%s\t%s\t%s\t", pixFormatStr[pf],
|
System.out.format("%-4s (%s) %-5s %-5s ", pixFormatStr[pf],
|
||||||
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD",
|
(flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD",
|
||||||
subNameLong[subsamp]);
|
csName[cs], subNameLong[subsamp]);
|
||||||
System.out.format("%-4d %-4d\t", tilew, tileh);
|
System.out.format("%-5d %-5d ", tilew, tileh);
|
||||||
}
|
}
|
||||||
|
|
||||||
_subsamp = subsamp;
|
_subsamp = subsamp;
|
||||||
@@ -500,6 +519,16 @@ class TJBench {
|
|||||||
_ntilesw = (_w + _tilew - 1) / _tilew;
|
_ntilesw = (_w + _tilew - 1) / _tilew;
|
||||||
_ntilesh = (_h + _tileh - 1) / _tileh;
|
_ntilesh = (_h + _tileh - 1) / _tileh;
|
||||||
|
|
||||||
|
if (xformOp == TJTransform.OP_TRANSPOSE ||
|
||||||
|
xformOp == TJTransform.OP_TRANSVERSE ||
|
||||||
|
xformOp == TJTransform.OP_ROT90 ||
|
||||||
|
xformOp == TJTransform.OP_ROT270) {
|
||||||
|
if (_subsamp == TJ.SAMP_422)
|
||||||
|
_subsamp = TJ.SAMP_440;
|
||||||
|
else if (_subsamp == TJ.SAMP_440)
|
||||||
|
_subsamp = TJ.SAMP_422;
|
||||||
|
}
|
||||||
|
|
||||||
TJTransform[] t = new TJTransform[_ntilesw * _ntilesh];
|
TJTransform[] t = new TJTransform[_ntilesw * _ntilesh];
|
||||||
jpegBuf = new byte[_ntilesw * _ntilesh][TJ.bufSize(_tilew, _tileh, subsamp)];
|
jpegBuf = new byte[_ntilesw * _ntilesh][TJ.bufSize(_tilew, _tileh, subsamp)];
|
||||||
|
|
||||||
@@ -518,41 +547,52 @@ class TJBench {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iter = -1;
|
||||||
|
elapsed = 0.;
|
||||||
|
while (true) {
|
||||||
start = getTime();
|
start = getTime();
|
||||||
tjt.transform(jpegBuf, t, flags);
|
tjt.transform(jpegBuf, t, flags);
|
||||||
jpegSize = tjt.getTransformedSizes();
|
jpegSize = tjt.getTransformedSizes();
|
||||||
elapsed = getTime() - start;
|
elapsed += getTime() - start;
|
||||||
|
if (iter >= 0) {
|
||||||
|
iter++;
|
||||||
|
if (elapsed >= benchTime)
|
||||||
|
break;
|
||||||
|
} else if (elapsed >= warmup) {
|
||||||
|
iter = 0;
|
||||||
|
elapsed = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
t = null;
|
t = null;
|
||||||
|
|
||||||
for (tile = 0, totalJpegSize = 0; tile < _ntilesw * _ntilesh; tile++)
|
for (tile = 0, totalJpegSize = 0; tile < _ntilesw * _ntilesh; tile++)
|
||||||
totalJpegSize += jpegSize[tile];
|
totalJpegSize += jpegSize[tile];
|
||||||
|
|
||||||
if (quiet != 0) {
|
if (quiet != 0) {
|
||||||
System.out.format("%s%c%s%c",
|
System.out.format("%-6s%s%-6s%s",
|
||||||
sigFig((double)(w * h) / 1000000. / elapsed, 4),
|
sigFig((double)(w * h) / 1000000. / elapsed, 4),
|
||||||
quiet == 2 ? '\n' : '\t',
|
quiet == 2 ? "\n" : " ",
|
||||||
sigFig((double)(w * h * ps) / (double)totalJpegSize, 4),
|
sigFig((double)(w * h * ps) / (double)totalJpegSize, 4),
|
||||||
quiet == 2 ? '\n' : '\t');
|
quiet == 2 ? "\n" : " ");
|
||||||
} else if (quiet == 0) {
|
} else if (quiet == 0) {
|
||||||
System.out.format("X--> Frame rate: %f fps\n",
|
System.out.format("Transform --> Frame rate: %f fps\n",
|
||||||
1.0 / elapsed);
|
1.0 / elapsed);
|
||||||
System.out.format(" Output image size: %d bytes\n",
|
System.out.format(" Output image size: %d bytes\n",
|
||||||
totalJpegSize);
|
totalJpegSize);
|
||||||
System.out.format(" Compression ratio: %f:1\n",
|
System.out.format(" Compression ratio: %f:1\n",
|
||||||
(double)(w * h * ps) / (double)totalJpegSize);
|
(double)(w * h * ps) / (double)totalJpegSize);
|
||||||
System.out.format(" Source throughput: %f Megapixels/sec\n",
|
System.out.format(" Throughput: %f Megapixels/sec\n",
|
||||||
(double)(w * h) / 1000000. / elapsed);
|
(double)(w * h) / 1000000. / elapsed);
|
||||||
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
System.out.format(" Output bit stream: %f Megabits/sec\n",
|
||||||
(double)totalJpegSize * 8. / 1000000. / elapsed);
|
(double)totalJpegSize * 8. / 1000000. / elapsed);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (quiet == 1)
|
if (quiet == 1)
|
||||||
System.out.print("N/A\tN/A\t");
|
System.out.print("N/A N/A ");
|
||||||
jpegBuf = new byte[1][TJ.bufSize(_tilew, _tileh, subsamp)];
|
jpegBuf = new byte[1][TJ.bufSize(_tilew, _tileh, subsamp)];
|
||||||
jpegSize = new int[1];
|
jpegSize = new int[1];
|
||||||
|
jpegBuf[0] = srcBuf;
|
||||||
jpegSize[0] = srcSize;
|
jpegSize[0] = srcSize;
|
||||||
System.arraycopy(srcBuf, 0, jpegBuf[0], 0, srcSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w == tilew)
|
if (w == tilew)
|
||||||
@@ -560,7 +600,7 @@ class TJBench {
|
|||||||
if (h == tileh)
|
if (h == tileh)
|
||||||
_tileh = _h;
|
_tileh = _h;
|
||||||
if ((xformOpt & TJTransform.OPT_NOOUTPUT) == 0)
|
if ((xformOpt & TJTransform.OPT_NOOUTPUT) == 0)
|
||||||
decompTest(null, jpegBuf, jpegSize, null, _w, _h, _subsamp, 0,
|
decomp(null, jpegBuf, jpegSize, null, _w, _h, _subsamp, 0,
|
||||||
fileName, _tilew, _tileh);
|
fileName, _tilew, _tileh);
|
||||||
else if (quiet == 1)
|
else if (quiet == 1)
|
||||||
System.out.println("N/A");
|
System.out.println("N/A");
|
||||||
@@ -588,10 +628,8 @@ class TJBench {
|
|||||||
System.out.println("-bottomup = Test bottom-up compression/decompression");
|
System.out.println("-bottomup = Test bottom-up compression/decompression");
|
||||||
System.out.println("-tile = Test performance of the codec when the image is encoded as separate");
|
System.out.println("-tile = Test performance of the codec when the image is encoded as separate");
|
||||||
System.out.println(" tiles of varying sizes.");
|
System.out.println(" tiles of varying sizes.");
|
||||||
System.out.println("-forcemmx, -forcesse, -forcesse2, -forcesse3 =");
|
|
||||||
System.out.println(" Force MMX, SSE, SSE2, or SSE3 code paths in the underlying codec");
|
|
||||||
System.out.println("-rgb, -bgr, -rgbx, -bgrx, -xbgr, -xrgb =");
|
System.out.println("-rgb, -bgr, -rgbx, -bgrx, -xbgr, -xrgb =");
|
||||||
System.out.println(" Test the specified color conversion path in the codec (default: BGR)");
|
System.out.println(" Test the specified color conversion path in the codec (default = BGR)");
|
||||||
System.out.println("-fastupsample = Use the fastest chrominance upsampling algorithm available in");
|
System.out.println("-fastupsample = Use the fastest chrominance upsampling algorithm available in");
|
||||||
System.out.println(" the underlying codec");
|
System.out.println(" the underlying codec");
|
||||||
System.out.println("-fastdct = Use the fastest DCT/IDCT algorithms available in the underlying");
|
System.out.println("-fastdct = Use the fastest DCT/IDCT algorithms available in the underlying");
|
||||||
@@ -599,12 +637,15 @@ class TJBench {
|
|||||||
System.out.println("-accuratedct = Use the most accurate DCT/IDCT algorithms available in the");
|
System.out.println("-accuratedct = Use the most accurate DCT/IDCT algorithms available in the");
|
||||||
System.out.println(" underlying codec");
|
System.out.println(" underlying codec");
|
||||||
System.out.println("-subsamp <s> = When testing JPEG compression, this option specifies the level");
|
System.out.println("-subsamp <s> = When testing JPEG compression, this option specifies the level");
|
||||||
System.out.println(" of chrominance subsampling to use (<s> = 444, 422, 440, 420, or GRAY).");
|
System.out.println(" of chrominance subsampling to use (<s> = 444, 422, 440, 420, 411, or");
|
||||||
System.out.println(" The default is to test Grayscale, 4:2:0, 4:2:2, and 4:4:4 in sequence.");
|
System.out.println(" GRAY). The default is to test Grayscale, 4:2:0, 4:2:2, and 4:4:4 in");
|
||||||
|
System.out.println(" sequence.");
|
||||||
System.out.println("-quiet = Output results in tabular rather than verbose format");
|
System.out.println("-quiet = Output results in tabular rather than verbose format");
|
||||||
System.out.println("-yuvencode = Encode RGB input as planar YUV rather than compressing as JPEG");
|
System.out.println("-yuv = Test YUV encoding/decoding functions");
|
||||||
System.out.println("-yuvdecode = Decode JPEG image to planar YUV rather than RGB");
|
System.out.println("-yuvpad <p> = If testing YUV encoding/decoding, this specifies the number of");
|
||||||
System.out.println("-scale M/N = scale down the width/height of the decompressed JPEG image by a");
|
System.out.println(" bytes to which each row of each plane in the intermediate YUV image is");
|
||||||
|
System.out.println(" padded (default = 1)");
|
||||||
|
System.out.println("-scale M/N = Scale down the width/height of the decompressed JPEG image by a");
|
||||||
System.out.print (" factor of M/N (M/N = ");
|
System.out.print (" factor of M/N (M/N = ");
|
||||||
for (i = 0; i < nsf; i++) {
|
for (i = 0; i < nsf; i++) {
|
||||||
System.out.format("%d/%d", scalingFactors[i].getNum(),
|
System.out.format("%d/%d", scalingFactors[i].getNum(),
|
||||||
@@ -626,7 +667,13 @@ class TJBench {
|
|||||||
System.out.println(" decompression (these options are mutually exclusive)");
|
System.out.println(" decompression (these options are mutually exclusive)");
|
||||||
System.out.println("-grayscale = Perform lossless grayscale conversion prior to decompression");
|
System.out.println("-grayscale = Perform lossless grayscale conversion prior to decompression");
|
||||||
System.out.println(" test (can be combined with the other transforms above)");
|
System.out.println(" test (can be combined with the other transforms above)");
|
||||||
System.out.println("-benchtime <t> = Run each benchmark for at least <t> seconds (default = 5.0)\n");
|
System.out.println("-benchtime <t> = Run each benchmark for at least <t> seconds (default = 5.0)");
|
||||||
|
System.out.println("-warmup <t> = Run each benchmark for <t> seconds (default = 1.0) prior to");
|
||||||
|
System.out.println(" starting the timer, in order to prime the caches and thus improve the");
|
||||||
|
System.out.println(" consistency of the results.");
|
||||||
|
System.out.println("-componly = Stop after running compression tests. Do not test decompression.");
|
||||||
|
System.out.println("-nowrite = Do not write reference or output images (improves consistency");
|
||||||
|
System.out.println(" of performance measurements.)\n");
|
||||||
System.out.println("NOTE: If the quality is specified as a range (e.g. 90-100), a separate");
|
System.out.println("NOTE: If the quality is specified as a range (e.g. 90-100), a separate");
|
||||||
System.out.println("test will be performed for all quality values in the range.\n");
|
System.out.println("test will be performed for all quality values in the range.\n");
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
@@ -650,20 +697,7 @@ class TJBench {
|
|||||||
|
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
|
|
||||||
if (argv.length > minArg) {
|
if (!decompOnly) {
|
||||||
for (int i = minArg; i < argv.length; i++) {
|
|
||||||
if (argv[i].equalsIgnoreCase("-yuvencode")) {
|
|
||||||
System.out.println("Testing YUV planar encoding\n");
|
|
||||||
yuv = YUVENCODE; maxQual = minQual = 100;
|
|
||||||
}
|
|
||||||
if (argv[i].equalsIgnoreCase("-yuvdecode")) {
|
|
||||||
System.out.println("Testing YUV planar decoding\n");
|
|
||||||
yuv = YUVDECODE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!decompOnly && yuv != YUVENCODE) {
|
|
||||||
minArg = 2;
|
minArg = 2;
|
||||||
if (argv.length < minArg)
|
if (argv.length < minArg)
|
||||||
usage();
|
usage();
|
||||||
@@ -687,53 +721,37 @@ class TJBench {
|
|||||||
if (argv[i].equalsIgnoreCase("-tile")) {
|
if (argv[i].equalsIgnoreCase("-tile")) {
|
||||||
doTile = true; xformOpt |= TJTransform.OPT_CROP;
|
doTile = true; xformOpt |= TJTransform.OPT_CROP;
|
||||||
}
|
}
|
||||||
if (argv[i].equalsIgnoreCase("-forcesse3")) {
|
else if (argv[i].equalsIgnoreCase("-fastupsample")) {
|
||||||
System.out.println("Forcing SSE3 code\n");
|
|
||||||
flags |= TJ.FLAG_FORCESSE3;
|
|
||||||
}
|
|
||||||
if (argv[i].equalsIgnoreCase("-forcesse2")) {
|
|
||||||
System.out.println("Forcing SSE2 code\n");
|
|
||||||
flags |= TJ.FLAG_FORCESSE2;
|
|
||||||
}
|
|
||||||
if (argv[i].equalsIgnoreCase("-forcesse")) {
|
|
||||||
System.out.println("Forcing SSE code\n");
|
|
||||||
flags |= TJ.FLAG_FORCESSE;
|
|
||||||
}
|
|
||||||
if (argv[i].equalsIgnoreCase("-forcemmx")) {
|
|
||||||
System.out.println("Forcing MMX code\n");
|
|
||||||
flags |= TJ.FLAG_FORCEMMX;
|
|
||||||
}
|
|
||||||
if (argv[i].equalsIgnoreCase("-fastupsample")) {
|
|
||||||
System.out.println("Using fast upsampling code\n");
|
System.out.println("Using fast upsampling code\n");
|
||||||
flags |= TJ.FLAG_FASTUPSAMPLE;
|
flags |= TJ.FLAG_FASTUPSAMPLE;
|
||||||
}
|
}
|
||||||
if (argv[i].equalsIgnoreCase("-fastdct")) {
|
else if (argv[i].equalsIgnoreCase("-fastdct")) {
|
||||||
System.out.println("Using fastest DCT/IDCT algorithm\n");
|
System.out.println("Using fastest DCT/IDCT algorithm\n");
|
||||||
flags |= TJ.FLAG_FASTDCT;
|
flags |= TJ.FLAG_FASTDCT;
|
||||||
}
|
}
|
||||||
if (argv[i].equalsIgnoreCase("-accuratedct")) {
|
else if (argv[i].equalsIgnoreCase("-accuratedct")) {
|
||||||
System.out.println("Using most accurate DCT/IDCT algorithm\n");
|
System.out.println("Using most accurate DCT/IDCT algorithm\n");
|
||||||
flags |= TJ.FLAG_ACCURATEDCT;
|
flags |= TJ.FLAG_ACCURATEDCT;
|
||||||
}
|
}
|
||||||
if (argv[i].equalsIgnoreCase("-rgb"))
|
else if (argv[i].equalsIgnoreCase("-rgb"))
|
||||||
pf = TJ.PF_RGB;
|
pf = TJ.PF_RGB;
|
||||||
if (argv[i].equalsIgnoreCase("-rgbx"))
|
else if (argv[i].equalsIgnoreCase("-rgbx"))
|
||||||
pf = TJ.PF_RGBX;
|
pf = TJ.PF_RGBX;
|
||||||
if (argv[i].equalsIgnoreCase("-bgr"))
|
else if (argv[i].equalsIgnoreCase("-bgr"))
|
||||||
pf = TJ.PF_BGR;
|
pf = TJ.PF_BGR;
|
||||||
if (argv[i].equalsIgnoreCase("-bgrx"))
|
else if (argv[i].equalsIgnoreCase("-bgrx"))
|
||||||
pf = TJ.PF_BGRX;
|
pf = TJ.PF_BGRX;
|
||||||
if (argv[i].equalsIgnoreCase("-xbgr"))
|
else if (argv[i].equalsIgnoreCase("-xbgr"))
|
||||||
pf = TJ.PF_XBGR;
|
pf = TJ.PF_XBGR;
|
||||||
if (argv[i].equalsIgnoreCase("-xrgb"))
|
else if (argv[i].equalsIgnoreCase("-xrgb"))
|
||||||
pf = TJ.PF_XRGB;
|
pf = TJ.PF_XRGB;
|
||||||
if (argv[i].equalsIgnoreCase("-bottomup"))
|
else if (argv[i].equalsIgnoreCase("-bottomup"))
|
||||||
flags |= TJ.FLAG_BOTTOMUP;
|
flags |= TJ.FLAG_BOTTOMUP;
|
||||||
if (argv[i].equalsIgnoreCase("-quiet"))
|
else if (argv[i].equalsIgnoreCase("-quiet"))
|
||||||
quiet = 1;
|
quiet = 1;
|
||||||
if (argv[i].equalsIgnoreCase("-qq"))
|
else if (argv[i].equalsIgnoreCase("-qq"))
|
||||||
quiet = 2;
|
quiet = 2;
|
||||||
if (argv[i].equalsIgnoreCase("-scale") && i < argv.length - 1) {
|
else if (argv[i].equalsIgnoreCase("-scale") && i < argv.length - 1) {
|
||||||
int temp1 = 0, temp2 = 0;
|
int temp1 = 0, temp2 = 0;
|
||||||
boolean match = false, scanned = true;
|
boolean match = false, scanned = true;
|
||||||
Scanner scanner = new Scanner(argv[++i]).useDelimiter("/");
|
Scanner scanner = new Scanner(argv[++i]).useDelimiter("/");
|
||||||
@@ -756,25 +774,25 @@ class TJBench {
|
|||||||
} else
|
} else
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
if (argv[i].equalsIgnoreCase("-hflip"))
|
else if (argv[i].equalsIgnoreCase("-hflip"))
|
||||||
xformOp = TJTransform.OP_HFLIP;
|
xformOp = TJTransform.OP_HFLIP;
|
||||||
if (argv[i].equalsIgnoreCase("-vflip"))
|
else if (argv[i].equalsIgnoreCase("-vflip"))
|
||||||
xformOp = TJTransform.OP_VFLIP;
|
xformOp = TJTransform.OP_VFLIP;
|
||||||
if (argv[i].equalsIgnoreCase("-transpose"))
|
else if (argv[i].equalsIgnoreCase("-transpose"))
|
||||||
xformOp = TJTransform.OP_TRANSPOSE;
|
xformOp = TJTransform.OP_TRANSPOSE;
|
||||||
if (argv[i].equalsIgnoreCase("-transverse"))
|
else if (argv[i].equalsIgnoreCase("-transverse"))
|
||||||
xformOp = TJTransform.OP_TRANSVERSE;
|
xformOp = TJTransform.OP_TRANSVERSE;
|
||||||
if (argv[i].equalsIgnoreCase("-rot90"))
|
else if (argv[i].equalsIgnoreCase("-rot90"))
|
||||||
xformOp = TJTransform.OP_ROT90;
|
xformOp = TJTransform.OP_ROT90;
|
||||||
if (argv[i].equalsIgnoreCase("-rot180"))
|
else if (argv[i].equalsIgnoreCase("-rot180"))
|
||||||
xformOp = TJTransform.OP_ROT180;
|
xformOp = TJTransform.OP_ROT180;
|
||||||
if (argv[i].equalsIgnoreCase("-rot270"))
|
else if (argv[i].equalsIgnoreCase("-rot270"))
|
||||||
xformOp = TJTransform.OP_ROT270;
|
xformOp = TJTransform.OP_ROT270;
|
||||||
if (argv[i].equalsIgnoreCase("-grayscale"))
|
else if (argv[i].equalsIgnoreCase("-grayscale"))
|
||||||
xformOpt |= TJTransform.OPT_GRAY;
|
xformOpt |= TJTransform.OPT_GRAY;
|
||||||
if (argv[i].equalsIgnoreCase("-nooutput"))
|
else if (argv[i].equalsIgnoreCase("-nooutput"))
|
||||||
xformOpt |= TJTransform.OPT_NOOUTPUT;
|
xformOpt |= TJTransform.OPT_NOOUTPUT;
|
||||||
if (argv[i].equalsIgnoreCase("-benchtime") && i < argv.length - 1) {
|
else if (argv[i].equalsIgnoreCase("-benchtime") && i < argv.length - 1) {
|
||||||
double temp = -1;
|
double temp = -1;
|
||||||
try {
|
try {
|
||||||
temp = Double.parseDouble(argv[++i]);
|
temp = Double.parseDouble(argv[++i]);
|
||||||
@@ -784,7 +802,19 @@ class TJBench {
|
|||||||
else
|
else
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
if (argv[i].equalsIgnoreCase("-subsamp") && i < argv.length - 1) {
|
else if (argv[i].equalsIgnoreCase("-yuv")) {
|
||||||
|
System.out.println("Testing YUV planar encoding/decoding\n");
|
||||||
|
doYUV = true;
|
||||||
|
}
|
||||||
|
else if (argv[i].equalsIgnoreCase("-yuvpad") && i < argv.length - 1) {
|
||||||
|
int temp = 0;
|
||||||
|
try {
|
||||||
|
temp = Integer.parseInt(argv[++i]);
|
||||||
|
} catch (NumberFormatException e) {}
|
||||||
|
if (temp >= 1)
|
||||||
|
yuvpad = temp;
|
||||||
|
}
|
||||||
|
else if (argv[i].equalsIgnoreCase("-subsamp") && i < argv.length - 1) {
|
||||||
i++;
|
i++;
|
||||||
if (argv[i].toUpperCase().startsWith("G"))
|
if (argv[i].toUpperCase().startsWith("G"))
|
||||||
subsamp = TJ.SAMP_GRAY;
|
subsamp = TJ.SAMP_GRAY;
|
||||||
@@ -796,10 +826,26 @@ class TJBench {
|
|||||||
subsamp = TJ.SAMP_440;
|
subsamp = TJ.SAMP_440;
|
||||||
else if (argv[i].equals("420"))
|
else if (argv[i].equals("420"))
|
||||||
subsamp = TJ.SAMP_420;
|
subsamp = TJ.SAMP_420;
|
||||||
|
else if (argv[i].equals("411"))
|
||||||
|
subsamp = TJ.SAMP_411;
|
||||||
}
|
}
|
||||||
if (argv[i].equalsIgnoreCase("-?"))
|
else if (argv[i].equalsIgnoreCase("-componly"))
|
||||||
|
compOnly = true;
|
||||||
|
else if (argv[i].equalsIgnoreCase("-nowrite"))
|
||||||
|
write = false;
|
||||||
|
else if (argv[i].equalsIgnoreCase("-warmup") && i < argv.length - 1) {
|
||||||
|
double temp = -1;
|
||||||
|
try {
|
||||||
|
temp = Double.parseDouble(argv[++i]);
|
||||||
|
} catch (NumberFormatException e) {}
|
||||||
|
if (temp >= 0.0) {
|
||||||
|
warmup = temp;
|
||||||
|
System.out.format("Warmup time = %.1f seconds\n\n", warmup);
|
||||||
|
} else
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
else usage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sf == null)
|
if (sf == null)
|
||||||
@@ -811,30 +857,36 @@ class TJBench {
|
|||||||
doTile = false;
|
doTile = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (yuv != 0 && doTile) {
|
|
||||||
System.out.println("Disabling tiled compression/decompression tests, because those tests do not");
|
|
||||||
System.out.println("work when YUV encoding or decoding is enabled.\n");
|
|
||||||
doTile = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!decompOnly) {
|
if (!decompOnly) {
|
||||||
int[] width = new int[1], height = new int[1];
|
int[] width = new int[1], height = new int[1];
|
||||||
srcBuf = loadImage(argv[0], width, height, pf);
|
srcBuf = loadImage(argv[0], width, height, pf);
|
||||||
w = width[0]; h = height[0];
|
w = width[0]; h = height[0];
|
||||||
int index = -1;
|
int index = -1;
|
||||||
if ((index = argv[0].indexOf('.')) >= 0)
|
if ((index = argv[0].lastIndexOf('.')) >= 0)
|
||||||
argv[0] = argv[0].substring(0, index);
|
argv[0] = argv[0].substring(0, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quiet == 1 && !decompOnly) {
|
if (quiet == 1 && !decompOnly) {
|
||||||
System.out.println("All performance values in Mpixels/sec\n");
|
System.out.println("All performance values in Mpixels/sec\n");
|
||||||
System.out.format("Bitmap\tBitmap\tJPEG\tJPEG\t%s %s \tComp\tComp\tDecomp\n",
|
System.out.format("Bitmap JPEG JPEG %s %s ",
|
||||||
(doTile ? "Tile " : "Image"), (doTile ? "Tile " : "Image"));
|
(doTile ? "Tile " : "Image"), (doTile ? "Tile " : "Image"));
|
||||||
System.out.println("Format\tOrder\tSubsamp\tQual\tWidth Height\tPerf \tRatio\tPerf\n");
|
if (doYUV)
|
||||||
|
System.out.print("Encode ");
|
||||||
|
System.out.print("Comp Comp Decomp ");
|
||||||
|
if (doYUV)
|
||||||
|
System.out.print("Decode");
|
||||||
|
System.out.print("\n");
|
||||||
|
System.out.print("Format Subsamp Qual Width Height ");
|
||||||
|
if (doYUV)
|
||||||
|
System.out.print("Perf ");
|
||||||
|
System.out.print("Perf Ratio Perf ");
|
||||||
|
if (doYUV)
|
||||||
|
System.out.print("Perf");
|
||||||
|
System.out.println("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decompOnly) {
|
if (decompOnly) {
|
||||||
doDecompTest(argv[0]);
|
decompTest(argv[0]);
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
System.exit(retval);
|
System.exit(retval);
|
||||||
}
|
}
|
||||||
@@ -842,23 +894,23 @@ class TJBench {
|
|||||||
System.gc();
|
System.gc();
|
||||||
if (subsamp >= 0 && subsamp < TJ.NUMSAMP) {
|
if (subsamp >= 0 && subsamp < TJ.NUMSAMP) {
|
||||||
for (int i = maxQual; i >= minQual; i--)
|
for (int i = maxQual; i >= minQual; i--)
|
||||||
doTest(srcBuf, w, h, subsamp, i, argv[0]);
|
fullTest(srcBuf, w, h, subsamp, i, argv[0]);
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
} else {
|
} else {
|
||||||
for (int i = maxQual; i >= minQual; i--)
|
for (int i = maxQual; i >= minQual; i--)
|
||||||
doTest(srcBuf, w, h, TJ.SAMP_GRAY, i, argv[0]);
|
fullTest(srcBuf, w, h, TJ.SAMP_GRAY, i, argv[0]);
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
System.gc();
|
System.gc();
|
||||||
for (int i = maxQual; i >= minQual; i--)
|
for (int i = maxQual; i >= minQual; i--)
|
||||||
doTest(srcBuf, w, h, TJ.SAMP_420, i, argv[0]);
|
fullTest(srcBuf, w, h, TJ.SAMP_420, i, argv[0]);
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
System.gc();
|
System.gc();
|
||||||
for (int i = maxQual; i >= minQual; i--)
|
for (int i = maxQual; i >= minQual; i--)
|
||||||
doTest(srcBuf, w, h, TJ.SAMP_422, i, argv[0]);
|
fullTest(srcBuf, w, h, TJ.SAMP_422, i, argv[0]);
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
System.gc();
|
System.gc();
|
||||||
for (int i = maxQual; i >= minQual; i--)
|
for (int i = maxQual; i >= minQual; i--)
|
||||||
doTest(srcBuf, w, h, TJ.SAMP_444, i, argv[0]);
|
fullTest(srcBuf, w, h, TJ.SAMP_444, i, argv[0]);
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2012, 2014 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2012, 2014-2015, 2017 D. R. Commander.
|
||||||
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -94,7 +95,7 @@ public class TJExample implements TJCustomFilter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static final String[] sampName = {
|
private static final String[] sampName = {
|
||||||
"4:4:4", "4:2:2", "4:2:0", "Grayscale", "4:4:0"
|
"4:4:4", "4:2:2", "4:2:0", "Grayscale", "4:4:0", "4:1:1"
|
||||||
};
|
};
|
||||||
|
|
||||||
public static void main(String[] argv) {
|
public static void main(String[] argv) {
|
||||||
@@ -117,11 +118,13 @@ public class TJExample implements TJCustomFilter {
|
|||||||
int outSubsamp = -1, outQual = 95;
|
int outSubsamp = -1, outQual = 95;
|
||||||
boolean display = false;
|
boolean display = false;
|
||||||
|
|
||||||
if (argv.length > 1) {
|
if (argv[1].substring(0, 2).equalsIgnoreCase("-d"))
|
||||||
for (int i = 1; i < argv.length; i++) {
|
display = true;
|
||||||
|
|
||||||
|
for (int i = 2; i < argv.length; i++) {
|
||||||
if (argv[i].length() < 2)
|
if (argv[i].length() < 2)
|
||||||
continue;
|
continue;
|
||||||
if (argv[i].length() > 2 &&
|
else if (argv[i].length() > 2 &&
|
||||||
argv[i].substring(0, 3).equalsIgnoreCase("-sc")) {
|
argv[i].substring(0, 3).equalsIgnoreCase("-sc")) {
|
||||||
int match = 0;
|
int match = 0;
|
||||||
if (i < argv.length - 1) {
|
if (i < argv.length - 1) {
|
||||||
@@ -141,9 +144,7 @@ public class TJExample implements TJCustomFilter {
|
|||||||
}
|
}
|
||||||
if (match != 1) usage();
|
if (match != 1) usage();
|
||||||
}
|
}
|
||||||
if (argv[i].equalsIgnoreCase("-h") || argv[i].equalsIgnoreCase("-?"))
|
else if (argv[i].length() > 2 &&
|
||||||
usage();
|
|
||||||
if (argv[i].length() > 2 &&
|
|
||||||
argv[i].substring(0, 3).equalsIgnoreCase("-sa")) {
|
argv[i].substring(0, 3).equalsIgnoreCase("-sa")) {
|
||||||
if (i < argv.length - 1) {
|
if (i < argv.length - 1) {
|
||||||
i++;
|
i++;
|
||||||
@@ -160,7 +161,7 @@ public class TJExample implements TJCustomFilter {
|
|||||||
} else
|
} else
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
if (argv[i].substring(0, 2).equalsIgnoreCase("-q")) {
|
else if (argv[i].substring(0, 2).equalsIgnoreCase("-q")) {
|
||||||
if (i < argv.length - 1) {
|
if (i < argv.length - 1) {
|
||||||
int qual = Integer.parseInt(argv[++i]);
|
int qual = Integer.parseInt(argv[++i]);
|
||||||
if (qual >= 1 && qual <= 100)
|
if (qual >= 1 && qual <= 100)
|
||||||
@@ -170,23 +171,23 @@ public class TJExample implements TJCustomFilter {
|
|||||||
} else
|
} else
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
if (argv[i].substring(0, 2).equalsIgnoreCase("-g"))
|
else if (argv[i].substring(0, 2).equalsIgnoreCase("-g"))
|
||||||
xform.options |= TJTransform.OPT_GRAY;
|
xform.options |= TJTransform.OPT_GRAY;
|
||||||
if (argv[i].equalsIgnoreCase("-hflip"))
|
else if (argv[i].equalsIgnoreCase("-hflip"))
|
||||||
xform.op = TJTransform.OP_HFLIP;
|
xform.op = TJTransform.OP_HFLIP;
|
||||||
if (argv[i].equalsIgnoreCase("-vflip"))
|
else if (argv[i].equalsIgnoreCase("-vflip"))
|
||||||
xform.op = TJTransform.OP_VFLIP;
|
xform.op = TJTransform.OP_VFLIP;
|
||||||
if (argv[i].equalsIgnoreCase("-transpose"))
|
else if (argv[i].equalsIgnoreCase("-transpose"))
|
||||||
xform.op = TJTransform.OP_TRANSPOSE;
|
xform.op = TJTransform.OP_TRANSPOSE;
|
||||||
if (argv[i].equalsIgnoreCase("-transverse"))
|
else if (argv[i].equalsIgnoreCase("-transverse"))
|
||||||
xform.op = TJTransform.OP_TRANSVERSE;
|
xform.op = TJTransform.OP_TRANSVERSE;
|
||||||
if (argv[i].equalsIgnoreCase("-rot90"))
|
else if (argv[i].equalsIgnoreCase("-rot90"))
|
||||||
xform.op = TJTransform.OP_ROT90;
|
xform.op = TJTransform.OP_ROT90;
|
||||||
if (argv[i].equalsIgnoreCase("-rot180"))
|
else if (argv[i].equalsIgnoreCase("-rot180"))
|
||||||
xform.op = TJTransform.OP_ROT180;
|
xform.op = TJTransform.OP_ROT180;
|
||||||
if (argv[i].equalsIgnoreCase("-rot270"))
|
else if (argv[i].equalsIgnoreCase("-rot270"))
|
||||||
xform.op = TJTransform.OP_ROT270;
|
xform.op = TJTransform.OP_ROT270;
|
||||||
if (argv[i].equalsIgnoreCase("-custom"))
|
else if (argv[i].equalsIgnoreCase("-custom"))
|
||||||
xform.cf = new TJExample();
|
xform.cf = new TJExample();
|
||||||
else if (argv[i].length() > 2 &&
|
else if (argv[i].length() > 2 &&
|
||||||
argv[i].substring(0, 2).equalsIgnoreCase("-c")) {
|
argv[i].substring(0, 2).equalsIgnoreCase("-c")) {
|
||||||
@@ -210,21 +211,21 @@ public class TJExample implements TJCustomFilter {
|
|||||||
xform.height = temph;
|
xform.height = temph;
|
||||||
xform.options |= TJTransform.OPT_CROP;
|
xform.options |= TJTransform.OPT_CROP;
|
||||||
}
|
}
|
||||||
if (argv[i].substring(0, 2).equalsIgnoreCase("-d"))
|
else if (argv[i].substring(0, 2).equalsIgnoreCase("-d"))
|
||||||
display = true;
|
display = true;
|
||||||
if (argv[i].equalsIgnoreCase("-fastupsample")) {
|
else if (argv[i].equalsIgnoreCase("-fastupsample")) {
|
||||||
System.out.println("Using fast upsampling code");
|
System.out.println("Using fast upsampling code");
|
||||||
flags |= TJ.FLAG_FASTUPSAMPLE;
|
flags |= TJ.FLAG_FASTUPSAMPLE;
|
||||||
}
|
}
|
||||||
if (argv[i].equalsIgnoreCase("-fastdct")) {
|
else if (argv[i].equalsIgnoreCase("-fastdct")) {
|
||||||
System.out.println("Using fastest DCT/IDCT algorithm");
|
System.out.println("Using fastest DCT/IDCT algorithm");
|
||||||
flags |= TJ.FLAG_FASTDCT;
|
flags |= TJ.FLAG_FASTDCT;
|
||||||
}
|
}
|
||||||
if (argv[i].equalsIgnoreCase("-accuratedct")) {
|
else if (argv[i].equalsIgnoreCase("-accuratedct")) {
|
||||||
System.out.println("Using most accurate DCT/IDCT algorithm");
|
System.out.println("Using most accurate DCT/IDCT algorithm");
|
||||||
flags |= TJ.FLAG_ACCURATEDCT;
|
flags |= TJ.FLAG_ACCURATEDCT;
|
||||||
}
|
}
|
||||||
}
|
else usage();
|
||||||
}
|
}
|
||||||
String[] inFileTokens = argv[0].split("\\.");
|
String[] inFileTokens = argv[0].split("\\.");
|
||||||
if (inFileTokens.length > 1)
|
if (inFileTokens.length > 1)
|
||||||
@@ -324,11 +325,11 @@ public class TJExample implements TJCustomFilter {
|
|||||||
tjc.setSubsamp(outSubsamp);
|
tjc.setSubsamp(outSubsamp);
|
||||||
tjc.setJPEGQuality(outQual);
|
tjc.setJPEGQuality(outQual);
|
||||||
if (img != null)
|
if (img != null)
|
||||||
jpegBuf = tjc.compress(img, flags);
|
tjc.setSourceImage(img, 0, 0, 0, 0);
|
||||||
else {
|
else {
|
||||||
tjc.setSourceImage(bmpBuf, 0, 0, width, 0, height, TJ.PF_BGRX);
|
tjc.setSourceImage(bmpBuf, 0, 0, width, 0, height, TJ.PF_BGRX);
|
||||||
jpegBuf = tjc.compress(flags);
|
|
||||||
}
|
}
|
||||||
|
jpegBuf = tjc.compress(flags);
|
||||||
jpegSize = tjc.getCompressedSize();
|
jpegSize = tjc.getCompressedSize();
|
||||||
tjc.close();
|
tjc.close();
|
||||||
|
|
||||||
@@ -351,7 +352,7 @@ public class TJExample implements TJCustomFilter {
|
|||||||
public void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
public void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
||||||
Rectangle planeRegion, int componentIndex,
|
Rectangle planeRegion, int componentIndex,
|
||||||
int transformIndex, TJTransform transform)
|
int transformIndex, TJTransform transform)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
for (int i = 0; i < bufferRegion.width * bufferRegion.height; i++) {
|
for (int i = 0; i < bufferRegion.width * bufferRegion.height; i++) {
|
||||||
coeffBuffer.put(i, (short)(-coeffBuffer.get(i)));
|
coeffBuffer.put(i, (short)(-coeffBuffer.get(i)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2012, 2014 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2017 D. R. Commander. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -44,26 +44,28 @@ public class TJUnitTest {
|
|||||||
|
|
||||||
private static void usage() {
|
private static void usage() {
|
||||||
System.out.println("\nUSAGE: java " + classname + " [options]\n");
|
System.out.println("\nUSAGE: java " + classname + " [options]\n");
|
||||||
System.out.println("Options:\n");
|
System.out.println("Options:");
|
||||||
System.out.println("-yuv = test YUV encoding/decoding support\n");
|
System.out.println("-yuv = test YUV encoding/decoding support");
|
||||||
|
System.out.println("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest");
|
||||||
|
System.out.println(" 4-byte boundary");
|
||||||
System.out.println("-bi = test BufferedImage support\n");
|
System.out.println("-bi = test BufferedImage support\n");
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String[] subNameLong = {
|
private static final String[] subNameLong = {
|
||||||
"4:4:4", "4:2:2", "4:2:0", "GRAY", "4:4:0"
|
"4:4:4", "4:2:2", "4:2:0", "GRAY", "4:4:0", "4:1:1"
|
||||||
};
|
};
|
||||||
private static final String[] subName = {
|
private static final String[] subName = {
|
||||||
"444", "422", "420", "GRAY", "440"
|
"444", "422", "420", "GRAY", "440", "411"
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final String[] pixFormatStr = {
|
private static final String[] pixFormatStr = {
|
||||||
"RGB", "BGR", "RGBX", "BGRX", "XBGR", "XRGB", "Grayscale",
|
"RGB", "BGR", "RGBX", "BGRX", "XBGR", "XRGB", "Grayscale",
|
||||||
"RGBA", "BGRA", "ABGR", "ARGB"
|
"RGBA", "BGRA", "ABGR", "ARGB", "CMYK"
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final int[] alphaOffset = {
|
private static final int[] alphaOffset = {
|
||||||
-1, -1, -1, -1, -1, -1, -1, 3, 3, 0, 0
|
-1, -1, -1, -1, -1, -1, -1, 3, 3, 0, 0, -1
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final int[] _3byteFormats = {
|
private static final int[] _3byteFormats = {
|
||||||
@@ -73,7 +75,7 @@ public class TJUnitTest {
|
|||||||
BufferedImage.TYPE_3BYTE_BGR
|
BufferedImage.TYPE_3BYTE_BGR
|
||||||
};
|
};
|
||||||
private static final int[] _4byteFormats = {
|
private static final int[] _4byteFormats = {
|
||||||
TJ.PF_RGBX, TJ.PF_BGRX, TJ.PF_XBGR, TJ.PF_XRGB
|
TJ.PF_RGBX, TJ.PF_BGRX, TJ.PF_XBGR, TJ.PF_XRGB, TJ.PF_CMYK
|
||||||
};
|
};
|
||||||
private static final int[] _4byteFormatsBI = {
|
private static final int[] _4byteFormatsBI = {
|
||||||
BufferedImage.TYPE_INT_BGR, BufferedImage.TYPE_INT_RGB,
|
BufferedImage.TYPE_INT_BGR, BufferedImage.TYPE_INT_RGB,
|
||||||
@@ -90,9 +92,8 @@ public class TJUnitTest {
|
|||||||
TJ.PF_RGB
|
TJ.PF_RGB
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final int YUVENCODE = 1;
|
private static boolean doYUV = false;
|
||||||
private static final int YUVDECODE = 2;
|
private static int pad = 4;
|
||||||
private static int yuv = 0;
|
|
||||||
private static boolean bi = false;
|
private static boolean bi = false;
|
||||||
|
|
||||||
private static int exitStatus = 0;
|
private static int exitStatus = 0;
|
||||||
@@ -104,24 +105,15 @@ public class TJUnitTest {
|
|||||||
return TJ.PF_BGR;
|
return TJ.PF_BGR;
|
||||||
case BufferedImage.TYPE_4BYTE_ABGR:
|
case BufferedImage.TYPE_4BYTE_ABGR:
|
||||||
case BufferedImage.TYPE_4BYTE_ABGR_PRE:
|
case BufferedImage.TYPE_4BYTE_ABGR_PRE:
|
||||||
return TJ.PF_XBGR;
|
return TJ.PF_ABGR;
|
||||||
case BufferedImage.TYPE_BYTE_GRAY:
|
case BufferedImage.TYPE_BYTE_GRAY:
|
||||||
return TJ.PF_GRAY;
|
return TJ.PF_GRAY;
|
||||||
case BufferedImage.TYPE_INT_BGR:
|
case BufferedImage.TYPE_INT_BGR:
|
||||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
|
||||||
return TJ.PF_XBGR;
|
|
||||||
else
|
|
||||||
return TJ.PF_RGBX;
|
return TJ.PF_RGBX;
|
||||||
case BufferedImage.TYPE_INT_RGB:
|
case BufferedImage.TYPE_INT_RGB:
|
||||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
|
||||||
return TJ.PF_XRGB;
|
|
||||||
else
|
|
||||||
return TJ.PF_BGRX;
|
return TJ.PF_BGRX;
|
||||||
case BufferedImage.TYPE_INT_ARGB:
|
case BufferedImage.TYPE_INT_ARGB:
|
||||||
case BufferedImage.TYPE_INT_ARGB_PRE:
|
case BufferedImage.TYPE_INT_ARGB_PRE:
|
||||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
|
||||||
return TJ.PF_ARGB;
|
|
||||||
else
|
|
||||||
return TJ.PF_BGRA;
|
return TJ.PF_BGRA;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -149,10 +141,6 @@ public class TJUnitTest {
|
|||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static double getTime() {
|
|
||||||
return (double)System.nanoTime() / 1.0e9;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void initBuf(byte[] buf, int w, int pitch, int h, int pf,
|
private static void initBuf(byte[] buf, int w, int pitch, int h, int pf,
|
||||||
int flags) throws Exception {
|
int flags) throws Exception {
|
||||||
int roffset = TJ.getRedOffset(pf);
|
int roffset = TJ.getRedOffset(pf);
|
||||||
@@ -162,8 +150,8 @@ public class TJUnitTest {
|
|||||||
int ps = TJ.getPixelSize(pf);
|
int ps = TJ.getPixelSize(pf);
|
||||||
int index, row, col, halfway = 16;
|
int index, row, col, halfway = 16;
|
||||||
|
|
||||||
Arrays.fill(buf, (byte)0);
|
|
||||||
if (pf == TJ.PF_GRAY) {
|
if (pf == TJ.PF_GRAY) {
|
||||||
|
Arrays.fill(buf, (byte)0);
|
||||||
for (row = 0; row < h; row++) {
|
for (row = 0; row < h; row++) {
|
||||||
for (col = 0; col < w; col++) {
|
for (col = 0; col < w; col++) {
|
||||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||||
@@ -178,6 +166,27 @@ public class TJUnitTest {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (pf == TJ.PF_CMYK) {
|
||||||
|
Arrays.fill(buf, (byte)255);
|
||||||
|
for (row = 0; row < h; row++) {
|
||||||
|
for (col = 0; col < w; col++) {
|
||||||
|
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||||
|
index = (h - row - 1) * w + col;
|
||||||
|
else
|
||||||
|
index = row * w + col;
|
||||||
|
if (((row / 8) + (col / 8)) % 2 == 0) {
|
||||||
|
if (row >= halfway) buf[index * ps + 3] = 0;
|
||||||
|
} else {
|
||||||
|
buf[index * ps + 2] = 0;
|
||||||
|
if (row < halfway)
|
||||||
|
buf[index * ps + 1] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Arrays.fill(buf, (byte)0);
|
||||||
for (row = 0; row < h; row++) {
|
for (row = 0; row < h; row++) {
|
||||||
for (col = 0; col < w; col++) {
|
for (col = 0; col < w; col++) {
|
||||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||||
@@ -296,6 +305,39 @@ public class TJUnitTest {
|
|||||||
int blockSize = 8 * sf.getNum() / sf.getDenom();
|
int blockSize = 8 * sf.getNum() / sf.getDenom();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
if (pf == TJ.PF_CMYK) {
|
||||||
|
for (row = 0; row < h; row++) {
|
||||||
|
for (col = 0; col < w; col++) {
|
||||||
|
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||||
|
index = (h - row - 1) * w + col;
|
||||||
|
else
|
||||||
|
index = row * w + col;
|
||||||
|
byte c = buf[index * ps];
|
||||||
|
byte m = buf[index * ps + 1];
|
||||||
|
byte y = buf[index * ps + 2];
|
||||||
|
byte k = buf[index * ps + 3];
|
||||||
|
checkVal255(row, col, c, "C");
|
||||||
|
if (((row / blockSize) + (col / blockSize)) % 2 == 0) {
|
||||||
|
checkVal255(row, col, m, "M");
|
||||||
|
checkVal255(row, col, y, "Y");
|
||||||
|
if (row < halfway)
|
||||||
|
checkVal255(row, col, k, "K");
|
||||||
|
else
|
||||||
|
checkVal0(row, col, k, "K");
|
||||||
|
} else {
|
||||||
|
checkVal0(row, col, y, "Y");
|
||||||
|
checkVal255(row, col, k, "K");
|
||||||
|
if (row < halfway)
|
||||||
|
checkVal0(row, col, m, "M");
|
||||||
|
else
|
||||||
|
checkVal255(row, col, m, "M");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
for (row = 0; row < halfway; row++) {
|
for (row = 0; row < halfway; row++) {
|
||||||
for (col = 0; col < w; col++) {
|
for (col = 0; col < w; col++) {
|
||||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||||
@@ -348,6 +390,17 @@ public class TJUnitTest {
|
|||||||
if (retval == 0) {
|
if (retval == 0) {
|
||||||
for (row = 0; row < h; row++) {
|
for (row = 0; row < h; row++) {
|
||||||
for (col = 0; col < w; col++) {
|
for (col = 0; col < w; col++) {
|
||||||
|
if (pf == TJ.PF_CMYK) {
|
||||||
|
int c = buf[pitch * row + col * ps];
|
||||||
|
int m = buf[pitch * row + col * ps + 1];
|
||||||
|
int y = buf[pitch * row + col * ps + 2];
|
||||||
|
int k = buf[pitch * row + col * ps + 3];
|
||||||
|
if (c < 0) c += 256;
|
||||||
|
if (m < 0) m += 256;
|
||||||
|
if (y < 0) y += 256;
|
||||||
|
if (k < 0) k += 256;
|
||||||
|
System.out.format("%3d/%3d/%3d/%3d ", c, m, y, k);
|
||||||
|
} else {
|
||||||
int r = buf[pitch * row + col * ps + roffset];
|
int r = buf[pitch * row + col * ps + roffset];
|
||||||
int g = buf[pitch * row + col * ps + goffset];
|
int g = buf[pitch * row + col * ps + goffset];
|
||||||
int b = buf[pitch * row + col * ps + boffset];
|
int b = buf[pitch * row + col * ps + boffset];
|
||||||
@@ -356,6 +409,7 @@ public class TJUnitTest {
|
|||||||
if (b < 0) b += 256;
|
if (b < 0) b += 256;
|
||||||
System.out.format("%3d/%3d/%3d ", r, g, b);
|
System.out.format("%3d/%3d/%3d ", r, g, b);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
System.out.print("\n");
|
System.out.print("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -470,16 +524,18 @@ public class TJUnitTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int checkBufYUV(byte[] buf, int size, int w, int h,
|
private static int checkBufYUV(byte[] buf, int size, int w, int h,
|
||||||
int subsamp) throws Exception {
|
int subsamp, TJScalingFactor sf)
|
||||||
|
throws Exception {
|
||||||
int row, col;
|
int row, col;
|
||||||
int hsf = TJ.getMCUWidth(subsamp) / 8, vsf = TJ.getMCUHeight(subsamp) / 8;
|
int hsf = TJ.getMCUWidth(subsamp) / 8, vsf = TJ.getMCUHeight(subsamp) / 8;
|
||||||
int pw = PAD(w, hsf), ph = PAD(h, vsf);
|
int pw = PAD(w, hsf), ph = PAD(h, vsf);
|
||||||
int cw = pw / hsf, ch = ph / vsf;
|
int cw = pw / hsf, ch = ph / vsf;
|
||||||
int ypitch = PAD(pw, 4), uvpitch = PAD(cw, 4);
|
int ypitch = PAD(pw, pad), uvpitch = PAD(cw, pad);
|
||||||
int retval = 1;
|
int retval = 1;
|
||||||
int correctsize = ypitch * ph +
|
int correctsize = ypitch * ph +
|
||||||
(subsamp == TJ.SAMP_GRAY ? 0 : uvpitch * ch * 2);
|
(subsamp == TJ.SAMP_GRAY ? 0 : uvpitch * ch * 2);
|
||||||
int halfway = 16;
|
int halfway = 16 * sf.getNum() / sf.getDenom();
|
||||||
|
int blockSize = 8 * sf.getNum() / sf.getDenom();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (size != correctsize)
|
if (size != correctsize)
|
||||||
@@ -489,7 +545,7 @@ public class TJUnitTest {
|
|||||||
for (row = 0; row < ph; row++) {
|
for (row = 0; row < ph; row++) {
|
||||||
for (col = 0; col < pw; col++) {
|
for (col = 0; col < pw; col++) {
|
||||||
byte y = buf[ypitch * row + col];
|
byte y = buf[ypitch * row + col];
|
||||||
if (((row / 8) + (col / 8)) % 2 == 0) {
|
if (((row / blockSize) + (col / blockSize)) % 2 == 0) {
|
||||||
if (row < halfway)
|
if (row < halfway)
|
||||||
checkVal255(row, col, y, "Y");
|
checkVal255(row, col, y, "Y");
|
||||||
else
|
else
|
||||||
@@ -503,12 +559,12 @@ public class TJUnitTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (subsamp != TJ.SAMP_GRAY) {
|
if (subsamp != TJ.SAMP_GRAY) {
|
||||||
halfway = 16 / vsf;
|
halfway = 16 / vsf * sf.getNum() / sf.getDenom();
|
||||||
for (row = 0; row < ch; row++) {
|
for (row = 0; row < ch; row++) {
|
||||||
for (col = 0; col < cw; col++) {
|
for (col = 0; col < cw; col++) {
|
||||||
byte u = buf[ypitch * ph + (uvpitch * row + col)],
|
byte u = buf[ypitch * ph + (uvpitch * row + col)],
|
||||||
v = buf[ypitch * ph + uvpitch * ch + (uvpitch * row + col)];
|
v = buf[ypitch * ph + uvpitch * ch + (uvpitch * row + col)];
|
||||||
if (((row * vsf / 8) + (col * hsf / 8)) % 2 == 0) {
|
if (((row * vsf / blockSize) + (col * hsf / blockSize)) % 2 == 0) {
|
||||||
checkVal(row, col, u, "U", 128);
|
checkVal(row, col, u, "U", 128);
|
||||||
checkVal(row, col, v, "V", 128);
|
checkVal(row, col, v, "V", 128);
|
||||||
} else {
|
} else {
|
||||||
@@ -571,86 +627,68 @@ public class TJUnitTest {
|
|||||||
private static int compTest(TJCompressor tjc, byte[] dstBuf, int w,
|
private static int compTest(TJCompressor tjc, byte[] dstBuf, int w,
|
||||||
int h, int pf, String baseName, int subsamp,
|
int h, int pf, String baseName, int subsamp,
|
||||||
int jpegQual, int flags) throws Exception {
|
int jpegQual, int flags) throws Exception {
|
||||||
String tempstr;
|
String tempStr;
|
||||||
byte[] srcBuf = null;
|
byte[] srcBuf = null;
|
||||||
BufferedImage img = null;
|
BufferedImage img = null;
|
||||||
String pfStr;
|
String pfStr, pfStrLong;
|
||||||
double t;
|
String buStr = (flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD";
|
||||||
|
String buStrLong = (flags & TJ.FLAG_BOTTOMUP) != 0 ?
|
||||||
|
"Bottom-Up" : "Top-Down ";
|
||||||
int size = 0, ps, imgType = pf;
|
int size = 0, ps, imgType = pf;
|
||||||
|
|
||||||
if (bi) {
|
if (bi) {
|
||||||
pf = biTypePF(imgType);
|
pf = biTypePF(imgType);
|
||||||
pfStr = biTypeStr(imgType);
|
pfStr = biTypeStr(imgType);
|
||||||
} else
|
pfStrLong = pfStr + " (" + pixFormatStr[pf] + ")";
|
||||||
|
} else {
|
||||||
pfStr = pixFormatStr[pf];
|
pfStr = pixFormatStr[pf];
|
||||||
|
pfStrLong = pfStr;
|
||||||
|
}
|
||||||
ps = TJ.getPixelSize(pf);
|
ps = TJ.getPixelSize(pf);
|
||||||
|
|
||||||
System.out.print(pfStr + " ");
|
|
||||||
if (bi)
|
|
||||||
System.out.print("(" + pixFormatStr[pf] + ") ");
|
|
||||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
|
||||||
System.out.print("Bottom-Up");
|
|
||||||
else
|
|
||||||
System.out.print("Top-Down ");
|
|
||||||
System.out.print(" -> " + subNameLong[subsamp] + " ");
|
|
||||||
if (yuv == YUVENCODE)
|
|
||||||
System.out.print("YUV ... ");
|
|
||||||
else
|
|
||||||
System.out.print("Q" + jpegQual + " ... ");
|
|
||||||
|
|
||||||
if (bi) {
|
if (bi) {
|
||||||
img = new BufferedImage(w, h, imgType);
|
img = new BufferedImage(w, h, imgType);
|
||||||
initImg(img, pf, flags);
|
initImg(img, pf, flags);
|
||||||
tempstr = baseName + "_enc_" + pfStr + "_" +
|
tempStr = baseName + "_enc_" + pfStr + "_" + buStr + "_" +
|
||||||
(((flags & TJ.FLAG_BOTTOMUP) != 0) ? "BU" : "TD") + "_" +
|
|
||||||
subName[subsamp] + "_Q" + jpegQual + ".png";
|
subName[subsamp] + "_Q" + jpegQual + ".png";
|
||||||
File file = new File(tempstr);
|
File file = new File(tempStr);
|
||||||
ImageIO.write(img, "png", file);
|
ImageIO.write(img, "png", file);
|
||||||
|
tjc.setSourceImage(img, 0, 0, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
srcBuf = new byte[w * h * ps + 1];
|
srcBuf = new byte[w * h * ps + 1];
|
||||||
initBuf(srcBuf, w, w * ps, h, pf, flags);
|
initBuf(srcBuf, w, w * ps, h, pf, flags);
|
||||||
|
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, pf);
|
||||||
}
|
}
|
||||||
Arrays.fill(dstBuf, (byte)0);
|
Arrays.fill(dstBuf, (byte)0);
|
||||||
|
|
||||||
t = getTime();
|
|
||||||
tjc.setSubsamp(subsamp);
|
tjc.setSubsamp(subsamp);
|
||||||
tjc.setJPEGQuality(jpegQual);
|
tjc.setJPEGQuality(jpegQual);
|
||||||
if (bi) {
|
if (doYUV) {
|
||||||
if (yuv == YUVENCODE)
|
System.out.format("%s %s -> YUV %s ... ", pfStrLong, buStrLong,
|
||||||
tjc.encodeYUV(img, dstBuf, flags);
|
subNameLong[subsamp]);
|
||||||
else
|
YUVImage yuvImage = tjc.encodeYUV(pad, flags);
|
||||||
tjc.compress(img, dstBuf, flags);
|
if (checkBufYUV(yuvImage.getBuf(), yuvImage.getSize(), w, h, subsamp,
|
||||||
} else {
|
new TJScalingFactor(1, 1)) == 1)
|
||||||
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, pf);
|
System.out.print("Passed.\n");
|
||||||
if (yuv == YUVENCODE)
|
|
||||||
tjc.encodeYUV(dstBuf, flags);
|
|
||||||
else
|
|
||||||
tjc.compress(dstBuf, flags);
|
|
||||||
}
|
|
||||||
size = tjc.getCompressedSize();
|
|
||||||
t = getTime() - t;
|
|
||||||
|
|
||||||
if (yuv == YUVENCODE)
|
|
||||||
tempstr = baseName + "_enc_" + pfStr + "_" +
|
|
||||||
(((flags & TJ.FLAG_BOTTOMUP) != 0) ? "BU" : "TD") + "_" +
|
|
||||||
subName[subsamp] + ".yuv";
|
|
||||||
else
|
|
||||||
tempstr = baseName + "_enc_" + pfStr + "_" +
|
|
||||||
(((flags & TJ.FLAG_BOTTOMUP) != 0) ? "BU" : "TD") + "_" +
|
|
||||||
subName[subsamp] + "_Q" + jpegQual + ".jpg";
|
|
||||||
writeJPEG(dstBuf, size, tempstr);
|
|
||||||
|
|
||||||
if (yuv == YUVENCODE) {
|
|
||||||
if (checkBufYUV(dstBuf, size, w, h, subsamp) == 1)
|
|
||||||
System.out.print("Passed.");
|
|
||||||
else {
|
else {
|
||||||
System.out.print("FAILED!");
|
System.out.print("FAILED!\n");
|
||||||
exitStatus = -1;
|
exitStatus = -1;
|
||||||
}
|
}
|
||||||
} else
|
|
||||||
System.out.print("Done.");
|
System.out.format("YUV %s %s -> JPEG Q%d ... ", subNameLong[subsamp],
|
||||||
System.out.format(" %.6f ms\n", t * 1000.);
|
buStrLong, jpegQual);
|
||||||
System.out.println(" Result in " + tempstr);
|
tjc.setSourceImage(yuvImage);
|
||||||
|
} else {
|
||||||
|
System.out.format("%s %s -> %s Q%d ... ", pfStrLong, buStrLong,
|
||||||
|
subNameLong[subsamp], jpegQual);
|
||||||
|
}
|
||||||
|
tjc.compress(dstBuf, flags);
|
||||||
|
size = tjc.getCompressedSize();
|
||||||
|
|
||||||
|
tempStr = baseName + "_enc_" + pfStr + "_" + buStr + "_" +
|
||||||
|
subName[subsamp] + "_Q" + jpegQual + ".jpg";
|
||||||
|
writeJPEG(dstBuf, size, tempStr);
|
||||||
|
System.out.println("Done.\n Result in " + tempStr);
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
@@ -659,41 +697,25 @@ public class TJUnitTest {
|
|||||||
int jpegSize, int w, int h, int pf,
|
int jpegSize, int w, int h, int pf,
|
||||||
String baseName, int subsamp, int flags,
|
String baseName, int subsamp, int flags,
|
||||||
TJScalingFactor sf) throws Exception {
|
TJScalingFactor sf) throws Exception {
|
||||||
String pfStr, tempstr;
|
String pfStr, pfStrLong, tempStr;
|
||||||
double t;
|
String buStrLong = (flags & TJ.FLAG_BOTTOMUP) != 0 ?
|
||||||
|
"Bottom-Up" : "Top-Down ";
|
||||||
int scaledWidth = sf.getScaled(w);
|
int scaledWidth = sf.getScaled(w);
|
||||||
int scaledHeight = sf.getScaled(h);
|
int scaledHeight = sf.getScaled(h);
|
||||||
int temp1, temp2, imgType = pf;
|
int temp1, temp2, imgType = pf;
|
||||||
BufferedImage img = null;
|
BufferedImage img = null;
|
||||||
byte[] dstBuf = null;
|
byte[] dstBuf = null;
|
||||||
|
|
||||||
if (yuv == YUVENCODE) return;
|
|
||||||
|
|
||||||
if (bi) {
|
if (bi) {
|
||||||
pf = biTypePF(imgType);
|
pf = biTypePF(imgType);
|
||||||
pfStr = biTypeStr(imgType);
|
pfStr = biTypeStr(imgType);
|
||||||
} else
|
pfStrLong = pfStr + " (" + pixFormatStr[pf] + ")";
|
||||||
|
} else {
|
||||||
pfStr = pixFormatStr[pf];
|
pfStr = pixFormatStr[pf];
|
||||||
|
pfStrLong = pfStr;
|
||||||
System.out.print("JPEG -> ");
|
|
||||||
if (yuv == YUVDECODE)
|
|
||||||
System.out.print("YUV " + subNameLong[subsamp] + " ... ");
|
|
||||||
else {
|
|
||||||
System.out.print(pfStr + " ");
|
|
||||||
if (bi)
|
|
||||||
System.out.print("(" + pixFormatStr[pf] + ") ");
|
|
||||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
|
||||||
System.out.print("Bottom-Up ");
|
|
||||||
else
|
|
||||||
System.out.print("Top-Down ");
|
|
||||||
if (!sf.isOne())
|
|
||||||
System.out.print(sf.getNum() + "/" + sf.getDenom() + " ... ");
|
|
||||||
else
|
|
||||||
System.out.print("... ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
t = getTime();
|
tjd.setSourceImage(jpegBuf, jpegSize);
|
||||||
tjd.setJPEGImage(jpegBuf, jpegSize);
|
|
||||||
if (tjd.getWidth() != w || tjd.getHeight() != h ||
|
if (tjd.getWidth() != w || tjd.getHeight() != h ||
|
||||||
tjd.getSubsamp() != subsamp)
|
tjd.getSubsamp() != subsamp)
|
||||||
throw new Exception("Incorrect JPEG header");
|
throw new Exception("Incorrect JPEG header");
|
||||||
@@ -705,58 +727,71 @@ public class TJUnitTest {
|
|||||||
if (temp1 != scaledWidth || temp2 != scaledHeight)
|
if (temp1 != scaledWidth || temp2 != scaledHeight)
|
||||||
throw new Exception("Scaled size mismatch");
|
throw new Exception("Scaled size mismatch");
|
||||||
|
|
||||||
if (yuv == YUVDECODE)
|
if (doYUV) {
|
||||||
dstBuf = tjd.decompressToYUV(flags);
|
System.out.format("JPEG -> YUV %s ", subNameLong[subsamp]);
|
||||||
|
if(!sf.isOne())
|
||||||
|
System.out.format("%d/%d ... ", sf.getNum(), sf.getDenom());
|
||||||
|
else System.out.print("... ");
|
||||||
|
YUVImage yuvImage = tjd.decompressToYUV(scaledWidth, pad, scaledHeight,
|
||||||
|
flags);
|
||||||
|
if (checkBufYUV(yuvImage.getBuf(), yuvImage.getSize(), scaledWidth,
|
||||||
|
scaledHeight, subsamp, sf) == 1)
|
||||||
|
System.out.print("Passed.\n");
|
||||||
else {
|
else {
|
||||||
|
System.out.print("FAILED!\n"); exitStatus = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.format("YUV %s -> %s %s ... ", subNameLong[subsamp],
|
||||||
|
pfStrLong, buStrLong);
|
||||||
|
tjd.setSourceImage(yuvImage);
|
||||||
|
} else {
|
||||||
|
System.out.format("JPEG -> %s %s ", pfStrLong, buStrLong);
|
||||||
|
if(!sf.isOne())
|
||||||
|
System.out.format("%d/%d ... ", sf.getNum(), sf.getDenom());
|
||||||
|
else System.out.print("... ");
|
||||||
|
}
|
||||||
if (bi)
|
if (bi)
|
||||||
img = tjd.decompress(scaledWidth, scaledHeight, imgType, flags);
|
img = tjd.decompress(scaledWidth, scaledHeight, imgType, flags);
|
||||||
else
|
else
|
||||||
dstBuf = tjd.decompress(scaledWidth, 0, scaledHeight, pf, flags);
|
dstBuf = tjd.decompress(scaledWidth, 0, scaledHeight, pf, flags);
|
||||||
}
|
|
||||||
t = getTime() - t;
|
|
||||||
|
|
||||||
if (bi) {
|
if (bi) {
|
||||||
tempstr = baseName + "_dec_" + pfStr + "_" +
|
tempStr = baseName + "_dec_" + pfStr + "_" +
|
||||||
(((flags & TJ.FLAG_BOTTOMUP) != 0) ? "BU" : "TD") + "_" +
|
(((flags & TJ.FLAG_BOTTOMUP) != 0) ? "BU" : "TD") + "_" +
|
||||||
subName[subsamp] + "_" +
|
subName[subsamp] + "_" +
|
||||||
(double)sf.getNum() / (double)sf.getDenom() + "x" + ".png";
|
(double)sf.getNum() / (double)sf.getDenom() + "x" + ".png";
|
||||||
File file = new File(tempstr);
|
File file = new File(tempStr);
|
||||||
ImageIO.write(img, "png", file);
|
ImageIO.write(img, "png", file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (yuv == YUVDECODE) {
|
|
||||||
if (checkBufYUV(dstBuf, dstBuf.length, w, h, subsamp) == 1)
|
|
||||||
System.out.print("Passed.");
|
|
||||||
else {
|
|
||||||
System.out.print("FAILED!"); exitStatus = -1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ((bi && checkImg(img, pf, subsamp, sf, flags) == 1) ||
|
if ((bi && checkImg(img, pf, subsamp, sf, flags) == 1) ||
|
||||||
(!bi && checkBuf(dstBuf, scaledWidth,
|
(!bi && checkBuf(dstBuf, scaledWidth,
|
||||||
scaledWidth * TJ.getPixelSize(pf), scaledHeight, pf,
|
scaledWidth * TJ.getPixelSize(pf), scaledHeight, pf,
|
||||||
subsamp, sf, flags) == 1))
|
subsamp, sf, flags) == 1))
|
||||||
System.out.print("Passed.");
|
System.out.print("Passed.\n");
|
||||||
else {
|
else {
|
||||||
System.out.print("FAILED!");
|
System.out.print("FAILED!\n");
|
||||||
exitStatus = -1;
|
exitStatus = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.format(" %.6f ms\n", t * 1000.);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void decompTest(TJDecompressor tjd, byte[] jpegBuf,
|
private static void decompTest(TJDecompressor tjd, byte[] jpegBuf,
|
||||||
int jpegSize, int w, int h, int pf,
|
int jpegSize, int w, int h, int pf,
|
||||||
String baseName, int subsamp,
|
String baseName, int subsamp,
|
||||||
int flags) throws Exception {
|
int flags) throws Exception {
|
||||||
int i;
|
int i;
|
||||||
if ((subsamp == TJ.SAMP_444 || subsamp == TJ.SAMP_GRAY) && yuv == 0) {
|
|
||||||
TJScalingFactor[] sf = TJ.getScalingFactors();
|
TJScalingFactor[] sf = TJ.getScalingFactors();
|
||||||
for (i = 0; i < sf.length; i++)
|
for (i = 0; i < sf.length; i++) {
|
||||||
|
int num = sf[i].getNum();
|
||||||
|
int denom = sf[i].getDenom();
|
||||||
|
if (subsamp == TJ.SAMP_444 || subsamp == TJ.SAMP_GRAY ||
|
||||||
|
(subsamp == TJ.SAMP_411 && num == 1 &&
|
||||||
|
(denom == 2 || denom == 1)) ||
|
||||||
|
(subsamp != TJ.SAMP_411 && num == 1 &&
|
||||||
|
(denom == 4 || denom == 2 || denom == 1)))
|
||||||
decompTest(tjd, jpegBuf, jpegSize, w, h, pf, baseName, subsamp,
|
decompTest(tjd, jpegBuf, jpegSize, w, h, pf, baseName, subsamp,
|
||||||
flags, sf[i]);
|
flags, sf[i]);
|
||||||
} else
|
}
|
||||||
decompTest(tjd, jpegBuf, jpegSize, w, h, pf, baseName, subsamp,
|
|
||||||
flags, new TJScalingFactor(1, 1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void doTest(int w, int h, int[] formats, int subsamp,
|
private static void doTest(int w, int h, int[] formats, int subsamp,
|
||||||
@@ -766,9 +801,6 @@ public class TJUnitTest {
|
|||||||
int size;
|
int size;
|
||||||
byte[] dstBuf;
|
byte[] dstBuf;
|
||||||
|
|
||||||
if (yuv == YUVENCODE)
|
|
||||||
dstBuf = new byte[TJ.bufSizeYUV(w, h, subsamp)];
|
|
||||||
else
|
|
||||||
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -776,25 +808,22 @@ public class TJUnitTest {
|
|||||||
tjd = new TJDecompressor();
|
tjd = new TJDecompressor();
|
||||||
|
|
||||||
for (int pf : formats) {
|
for (int pf : formats) {
|
||||||
|
if (pf < 0) continue;
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
if (subsamp == TJ.SAMP_422 || subsamp == TJ.SAMP_420 ||
|
if (subsamp == TJ.SAMP_422 || subsamp == TJ.SAMP_420 ||
|
||||||
subsamp == TJ.SAMP_440)
|
subsamp == TJ.SAMP_440 || subsamp == TJ.SAMP_411)
|
||||||
flags |= TJ.FLAG_FASTUPSAMPLE;
|
flags |= TJ.FLAG_FASTUPSAMPLE;
|
||||||
if (i == 1) {
|
if (i == 1)
|
||||||
if (yuv == YUVDECODE) {
|
|
||||||
tjc.close();
|
|
||||||
tjd.close();
|
|
||||||
return;
|
|
||||||
} else
|
|
||||||
flags |= TJ.FLAG_BOTTOMUP;
|
flags |= TJ.FLAG_BOTTOMUP;
|
||||||
}
|
|
||||||
size = compTest(tjc, dstBuf, w, h, pf, baseName, subsamp, 100,
|
size = compTest(tjc, dstBuf, w, h, pf, baseName, subsamp, 100,
|
||||||
flags);
|
flags);
|
||||||
decompTest(tjd, dstBuf, size, w, h, pf, baseName, subsamp, flags);
|
decompTest(tjd, dstBuf, size, w, h, pf, baseName, subsamp, flags);
|
||||||
if (pf >= TJ.PF_RGBX && pf <= TJ.PF_XRGB && !bi)
|
if (pf >= TJ.PF_RGBX && pf <= TJ.PF_XRGB && !bi) {
|
||||||
|
System.out.print("\n");
|
||||||
decompTest(tjd, dstBuf, size, w, h, pf + (TJ.PF_RGBA - TJ.PF_RGBX),
|
decompTest(tjd, dstBuf, size, w, h, pf + (TJ.PF_RGBA - TJ.PF_RGBX),
|
||||||
baseName, subsamp, flags);
|
baseName, subsamp, flags);
|
||||||
|
}
|
||||||
System.out.print("\n");
|
System.out.print("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -810,7 +839,8 @@ public class TJUnitTest {
|
|||||||
|
|
||||||
private static void bufSizeTest() throws Exception {
|
private static void bufSizeTest() throws Exception {
|
||||||
int w, h, i, subsamp;
|
int w, h, i, subsamp;
|
||||||
byte[] srcBuf, dstBuf;
|
byte[] srcBuf, dstBuf = null;
|
||||||
|
YUVImage dstImage = null;
|
||||||
TJCompressor tjc = null;
|
TJCompressor tjc = null;
|
||||||
Random r = new Random();
|
Random r = new Random();
|
||||||
|
|
||||||
@@ -824,8 +854,8 @@ public class TJUnitTest {
|
|||||||
if (h % 100 == 0)
|
if (h % 100 == 0)
|
||||||
System.out.format("%04d x %04d\b\b\b\b\b\b\b\b\b\b\b", w, h);
|
System.out.format("%04d x %04d\b\b\b\b\b\b\b\b\b\b\b", w, h);
|
||||||
srcBuf = new byte[w * h * 4];
|
srcBuf = new byte[w * h * 4];
|
||||||
if (yuv == YUVENCODE)
|
if (doYUV)
|
||||||
dstBuf = new byte[TJ.bufSizeYUV(w, h, subsamp)];
|
dstImage = new YUVImage(w, pad, h, subsamp);
|
||||||
else
|
else
|
||||||
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
||||||
for (i = 0; i < w * h * 4; i++) {
|
for (i = 0; i < w * h * 4; i++) {
|
||||||
@@ -834,25 +864,28 @@ public class TJUnitTest {
|
|||||||
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, TJ.PF_BGRX);
|
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, TJ.PF_BGRX);
|
||||||
tjc.setSubsamp(subsamp);
|
tjc.setSubsamp(subsamp);
|
||||||
tjc.setJPEGQuality(100);
|
tjc.setJPEGQuality(100);
|
||||||
if (yuv == YUVENCODE)
|
if (doYUV)
|
||||||
tjc.encodeYUV(dstBuf, 0);
|
tjc.encodeYUV(dstImage, 0);
|
||||||
else
|
else
|
||||||
tjc.compress(dstBuf, 0);
|
tjc.compress(dstBuf, 0);
|
||||||
|
|
||||||
srcBuf = new byte[h * w * 4];
|
srcBuf = new byte[h * w * 4];
|
||||||
if (yuv == YUVENCODE)
|
if (doYUV)
|
||||||
dstBuf = new byte[TJ.bufSizeYUV(h, w, subsamp)];
|
dstImage = new YUVImage(h, pad, w, subsamp);
|
||||||
else
|
else
|
||||||
dstBuf = new byte[TJ.bufSize(h, w, subsamp)];
|
dstBuf = new byte[TJ.bufSize(h, w, subsamp)];
|
||||||
for (i = 0; i < h * w * 4; i++) {
|
for (i = 0; i < h * w * 4; i++) {
|
||||||
srcBuf[i] = (byte)(r.nextInt(2) * 255);
|
srcBuf[i] = (byte)(r.nextInt(2) * 255);
|
||||||
}
|
}
|
||||||
tjc.setSourceImage(srcBuf, 0, 0, h, 0, w, TJ.PF_BGRX);
|
tjc.setSourceImage(srcBuf, 0, 0, h, 0, w, TJ.PF_BGRX);
|
||||||
if (yuv == YUVENCODE)
|
if (doYUV)
|
||||||
tjc.encodeYUV(dstBuf, 0);
|
tjc.encodeYUV(dstImage, 0);
|
||||||
else
|
else
|
||||||
tjc.compress(dstBuf, 0);
|
tjc.compress(dstBuf, 0);
|
||||||
}
|
}
|
||||||
|
dstImage = null;
|
||||||
|
dstBuf = null;
|
||||||
|
System.gc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println("Done. ");
|
System.out.println("Done. ");
|
||||||
@@ -866,19 +899,19 @@ public class TJUnitTest {
|
|||||||
public static void main(String[] argv) {
|
public static void main(String[] argv) {
|
||||||
try {
|
try {
|
||||||
String testName = "javatest";
|
String testName = "javatest";
|
||||||
boolean doyuv = false;
|
|
||||||
for (int i = 0; i < argv.length; i++) {
|
for (int i = 0; i < argv.length; i++) {
|
||||||
if (argv[i].equalsIgnoreCase("-yuv"))
|
if (argv[i].equalsIgnoreCase("-yuv"))
|
||||||
doyuv = true;
|
doYUV = true;
|
||||||
if (argv[i].substring(0, 1).equalsIgnoreCase("-h") ||
|
else if (argv[i].equalsIgnoreCase("-noyuvpad"))
|
||||||
argv[i].equalsIgnoreCase("-?"))
|
pad = 1;
|
||||||
usage();
|
else if (argv[i].equalsIgnoreCase("-bi")) {
|
||||||
if (argv[i].equalsIgnoreCase("-bi")) {
|
|
||||||
bi = true;
|
bi = true;
|
||||||
testName = "javabitest";
|
testName = "javabitest";
|
||||||
|
} else
|
||||||
|
usage();
|
||||||
}
|
}
|
||||||
}
|
if (doYUV)
|
||||||
if (doyuv) yuv = YUVENCODE;
|
_4byteFormats[4] = -1;
|
||||||
doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_444,
|
doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_444,
|
||||||
testName);
|
testName);
|
||||||
doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_444,
|
doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_444,
|
||||||
@@ -895,28 +928,27 @@ public class TJUnitTest {
|
|||||||
testName);
|
testName);
|
||||||
doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_440,
|
doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_440,
|
||||||
testName);
|
testName);
|
||||||
doTest(35, 39, bi ? onlyGrayBI : onlyGray, TJ.SAMP_GRAY, testName);
|
doTest(41, 35, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_411,
|
||||||
doTest(39, 41, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_GRAY,
|
|
||||||
testName);
|
testName);
|
||||||
doTest(41, 35, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_GRAY,
|
doTest(35, 39, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_411,
|
||||||
|
testName);
|
||||||
|
doTest(39, 41, bi ? onlyGrayBI : onlyGray, TJ.SAMP_GRAY, testName);
|
||||||
|
doTest(41, 35, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_GRAY,
|
||||||
|
testName);
|
||||||
|
_4byteFormats[4] = -1;
|
||||||
|
doTest(35, 39, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_GRAY,
|
||||||
testName);
|
testName);
|
||||||
if (!bi)
|
if (!bi)
|
||||||
bufSizeTest();
|
bufSizeTest();
|
||||||
if (doyuv && !bi) {
|
if (doYUV && !bi) {
|
||||||
System.out.print("\n--------------------\n\n");
|
System.out.print("\n--------------------\n\n");
|
||||||
yuv = YUVDECODE;
|
|
||||||
doTest(48, 48, onlyRGB, TJ.SAMP_444, "javatest_yuv0");
|
doTest(48, 48, onlyRGB, TJ.SAMP_444, "javatest_yuv0");
|
||||||
doTest(35, 39, onlyRGB, TJ.SAMP_444, "javatest_yuv1");
|
|
||||||
doTest(48, 48, onlyRGB, TJ.SAMP_422, "javatest_yuv0");
|
doTest(48, 48, onlyRGB, TJ.SAMP_422, "javatest_yuv0");
|
||||||
doTest(39, 41, onlyRGB, TJ.SAMP_422, "javatest_yuv1");
|
|
||||||
doTest(48, 48, onlyRGB, TJ.SAMP_420, "javatest_yuv0");
|
doTest(48, 48, onlyRGB, TJ.SAMP_420, "javatest_yuv0");
|
||||||
doTest(41, 35, onlyRGB, TJ.SAMP_420, "javatest_yuv1");
|
|
||||||
doTest(48, 48, onlyRGB, TJ.SAMP_440, "javatest_yuv0");
|
doTest(48, 48, onlyRGB, TJ.SAMP_440, "javatest_yuv0");
|
||||||
doTest(35, 39, onlyRGB, TJ.SAMP_440, "javatest_yuv1");
|
doTest(48, 48, onlyRGB, TJ.SAMP_411, "javatest_yuv0");
|
||||||
doTest(48, 48, onlyRGB, TJ.SAMP_GRAY, "javatest_yuv0");
|
doTest(48, 48, onlyRGB, TJ.SAMP_GRAY, "javatest_yuv0");
|
||||||
doTest(35, 39, onlyRGB, TJ.SAMP_GRAY, "javatest_yuv1");
|
|
||||||
doTest(48, 48, onlyGray, TJ.SAMP_GRAY, "javatest_yuv0");
|
doTest(48, 48, onlyGray, TJ.SAMP_GRAY, "javatest_yuv0");
|
||||||
doTest(39, 41, onlyGray, TJ.SAMP_GRAY, "javatest_yuv1");
|
|
||||||
}
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -1,41 +1,24 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>All Classes</title>
|
||||||
All Classes
|
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1 class="bar">All Classes</h1>
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
<div class="indexContainer">
|
||||||
|
<ul>
|
||||||
|
<li><a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</a></li>
|
||||||
</HEAD>
|
<li><a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</a></li>
|
||||||
|
<li><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><i>TJCustomFilter</i></a></li>
|
||||||
<BODY BGCOLOR="white">
|
<li><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</a></li>
|
||||||
<FONT size="+1" CLASS="FrameHeadingFont">
|
<li><a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJException</a></li>
|
||||||
<B>All Classes</B></FONT>
|
<li><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</a></li>
|
||||||
<BR>
|
<li><a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</a></li>
|
||||||
|
<li><a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</a></li>
|
||||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">YUVImage</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</A>
|
</div>
|
||||||
<BR>
|
</body>
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</A>
|
</html>
|
||||||
<BR>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><I>TJCustomFilter</I></A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</A>
|
|
||||||
<BR>
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
@@ -1,41 +1,24 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>All Classes</title>
|
||||||
All Classes
|
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1 class="bar">All Classes</h1>
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
<div class="indexContainer">
|
||||||
|
<ul>
|
||||||
|
<li><a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></li>
|
||||||
</HEAD>
|
<li><a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></li>
|
||||||
|
<li><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><i>TJCustomFilter</i></a></li>
|
||||||
<BODY BGCOLOR="white">
|
<li><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></li>
|
||||||
<FONT size="+1" CLASS="FrameHeadingFont">
|
<li><a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></li>
|
||||||
<B>All Classes</B></FONT>
|
<li><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></li>
|
||||||
<BR>
|
<li><a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></li>
|
||||||
|
<li><a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></li>
|
||||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
|
</div>
|
||||||
<BR>
|
</body>
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</A>
|
</html>
|
||||||
<BR>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><I>TJCustomFilter</I></A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A>
|
|
||||||
<BR>
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
@@ -1,414 +1,479 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>Constant Field Values</title>
|
||||||
Constant Field Values
|
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
|
||||||
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
if (location.href.indexOf('is-external=true') == -1) {
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
parent.document.title="Constant Field Values";
|
parent.document.title="Constant Field Values";
|
||||||
}
|
}
|
||||||
}
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
<noscript>
|
||||||
</NOSCRIPT>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
<A NAME="navbar_top"><!-- --></A>
|
<div class="topNav"><a name="navbar_top">
|
||||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="constant-values.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
PREV
|
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_top">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_top"></A>
|
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
<div class="header">
|
||||||
<HR>
|
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
|
||||||
<CENTER>
|
<h2 title="Contents">Contents</h2>
|
||||||
<H1>
|
<ul>
|
||||||
Constant Field Values</H1>
|
<li><a href="#org.libjpegturbo">org.libjpegturbo.*</a></li>
|
||||||
</CENTER>
|
</ul>
|
||||||
<HR SIZE="4" NOSHADE>
|
</div>
|
||||||
<B>Contents</B><UL>
|
<div class="constantValuesContainer"><a name="org.libjpegturbo">
|
||||||
<LI><A HREF="#org.libjpegturbo">org.libjpegturbo.*</A>
|
<!-- -->
|
||||||
</UL>
|
</a>
|
||||||
|
<h2 title="org.libjpegturbo">org.libjpegturbo.*</h2>
|
||||||
<A NAME="org.libjpegturbo"><!-- --></A>
|
<ul class="blockList">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<li class="blockList">
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
<table border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
|
||||||
<TH ALIGN="left"><FONT SIZE="+2">
|
<caption><span>org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></span><span class="tabEnd"> </span></caption>
|
||||||
org.libjpegturbo.*</FONT></TH>
|
<tr>
|
||||||
</TR>
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||||
</TABLE>
|
<th scope="col">Constant Field</th>
|
||||||
|
<th class="colLast" scope="col">Value</th>
|
||||||
<P>
|
</tr>
|
||||||
|
<tbody>
|
||||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<tr class="altColor">
|
||||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_CMYK">
|
||||||
<TH ALIGN="left" COLSPAN="3">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A></TH>
|
<!-- -->
|
||||||
</TR>
|
</a><code>public static final int</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_CMYK">CS_CMYK</a></code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colLast"><code>3</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</tr>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</A></CODE></TD>
|
<tr class="rowColor">
|
||||||
<TD ALIGN="right"><CODE>4096</CODE></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_GRAY">
|
||||||
</TR>
|
<!-- -->
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</a><code>public static final int</code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_GRAY">CS_GRAY</a></code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td class="colLast"><code>2</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</A></CODE></TD>
|
</tr>
|
||||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
<tr class="altColor">
|
||||||
</TR>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_RGB">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<!-- -->
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</a><code>public static final int</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_RGB">CS_RGB</a></code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</A></CODE></TD>
|
<td class="colLast"><code>0</code></td>
|
||||||
<TD ALIGN="right"><CODE>2048</CODE></TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_YCbCr">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<!-- -->
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</A></CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr">CS_YCbCr</a></code></td>
|
||||||
<TD ALIGN="right"><CODE>256</CODE></TD>
|
<td class="colLast"><code>1</code></td>
|
||||||
</TR>
|
</tr>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr class="altColor">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_YCCK">
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<!-- -->
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">FLAG_FORCEMMX</A></CODE></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK">CS_YCCK</a></code></td>
|
||||||
</TR>
|
<td class="colLast"><code>4</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</tr>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<tr class="rowColor">
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT">
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">FLAG_FORCESSE</A></CODE></TD>
|
<!-- -->
|
||||||
<TD ALIGN="right"><CODE>16</CODE></TD>
|
</a><code>public static final int</code></td>
|
||||||
</TR>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</a></code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colLast"><code>4096</code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</tr>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<tr class="altColor">
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">FLAG_FORCESSE2</A></CODE></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP">
|
||||||
<TD ALIGN="right"><CODE>32</CODE></TD>
|
<!-- -->
|
||||||
</TR>
|
</a><code>public static final int</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</a></code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colLast"><code>2</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</tr>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">FLAG_FORCESSE3</A></CODE></TD>
|
<tr class="rowColor">
|
||||||
<TD ALIGN="right"><CODE>128</CODE></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT">
|
||||||
</TR>
|
<!-- -->
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</a><code>public static final int</code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.NUMPF"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</a></code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td class="colLast"><code>2048</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</A></CODE></TD>
|
</tr>
|
||||||
<TD ALIGN="right"><CODE>11</CODE></TD>
|
<tr class="altColor">
|
||||||
</TR>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<!-- -->
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.NUMSAMP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</a><code>public static final int</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</a></code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</A></CODE></TD>
|
<td class="colLast"><code>256</code></td>
|
||||||
<TD ALIGN="right"><CODE>5</CODE></TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_ABGR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<!-- -->
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</A></CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">FLAG_FORCEMMX</a></code></td>
|
||||||
<TD ALIGN="right"><CODE>9</CODE></TD>
|
<td class="colLast"><code>8</code></td>
|
||||||
</TR>
|
</tr>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr class="altColor">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_ARGB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE">
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<!-- -->
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</A></CODE></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="right"><CODE>10</CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">FLAG_FORCESSE</a></code></td>
|
||||||
</TR>
|
<td class="colLast"><code>16</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</tr>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_BGR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<tr class="rowColor">
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2">
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</A></CODE></TD>
|
<!-- -->
|
||||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
</a><code>public static final int</code></td>
|
||||||
</TR>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">FLAG_FORCESSE2</a></code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colLast"><code>32</code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_BGRA"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</tr>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<tr class="altColor">
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</A></CODE></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3">
|
||||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
<!-- -->
|
||||||
</TR>
|
</a><code>public static final int</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">FLAG_FORCESSE3</a></code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_BGRX"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colLast"><code>128</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</tr>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</A></CODE></TD>
|
<tr class="rowColor">
|
||||||
<TD ALIGN="right"><CODE>3</CODE></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMCS">
|
||||||
</TR>
|
<!-- -->
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</a><code>public static final int</code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_GRAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMCS">NUMCS</a></code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td class="colLast"><code>5</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</A></CODE></TD>
|
</tr>
|
||||||
<TD ALIGN="right"><CODE>6</CODE></TD>
|
<tr class="altColor">
|
||||||
</TR>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMPF">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<!-- -->
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_RGB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</a><code>public static final int</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</a></code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</A></CODE></TD>
|
<td class="colLast"><code>12</code></td>
|
||||||
<TD ALIGN="right"><CODE>0</CODE></TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMSAMP">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_RGBA"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<!-- -->
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</A></CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</a></code></td>
|
||||||
<TD ALIGN="right"><CODE>7</CODE></TD>
|
<td class="colLast"><code>6</code></td>
|
||||||
</TR>
|
</tr>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr class="altColor">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_RGBX"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_ABGR">
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<!-- -->
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</A></CODE></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</a></code></td>
|
||||||
</TR>
|
<td class="colLast"><code>9</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</tr>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_XBGR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<tr class="rowColor">
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_ARGB">
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</A></CODE></TD>
|
<!-- -->
|
||||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
</a><code>public static final int</code></td>
|
||||||
</TR>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</a></code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colLast"><code>10</code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_XRGB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</tr>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<tr class="altColor">
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</A></CODE></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGR">
|
||||||
<TD ALIGN="right"><CODE>5</CODE></TD>
|
<!-- -->
|
||||||
</TR>
|
</a><code>public static final int</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</a></code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_420"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colLast"><code>1</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</tr>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</A></CODE></TD>
|
<tr class="rowColor">
|
||||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGRA">
|
||||||
</TR>
|
<!-- -->
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</a><code>public static final int</code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_422"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</a></code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td class="colLast"><code>8</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</A></CODE></TD>
|
</tr>
|
||||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
<tr class="altColor">
|
||||||
</TR>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGRX">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<!-- -->
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_440"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</a><code>public static final int</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</a></code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</A></CODE></TD>
|
<td class="colLast"><code>3</code></td>
|
||||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_CMYK">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_444"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<!-- -->
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</A></CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_CMYK">PF_CMYK</a></code></td>
|
||||||
<TD ALIGN="right"><CODE>0</CODE></TD>
|
<td class="colLast"><code>11</code></td>
|
||||||
</TR>
|
</tr>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr class="altColor">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_GRAY">
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<!-- -->
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</A></CODE></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="right"><CODE>3</CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</a></code></td>
|
||||||
</TR>
|
<td class="colLast"><code>6</code></td>
|
||||||
</FONT></TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
</TABLE>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGB">
|
||||||
|
<!-- -->
|
||||||
<P>
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</a></code></td>
|
||||||
<P>
|
<td class="colLast"><code>0</code></td>
|
||||||
|
</tr>
|
||||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<tr class="altColor">
|
||||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGBA">
|
||||||
<TH ALIGN="left" COLSPAN="3">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A></TH>
|
<!-- -->
|
||||||
</TR>
|
</a><code>public static final int</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</a></code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.NUMOP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colLast"><code>7</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</tr>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#NUMOP">NUMOP</A></CODE></TD>
|
<tr class="rowColor">
|
||||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGBX">
|
||||||
</TR>
|
<!-- -->
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</a><code>public static final int</code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_HFLIP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</a></code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td class="colLast"><code>2</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_HFLIP">OP_HFLIP</A></CODE></TD>
|
</tr>
|
||||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
<tr class="altColor">
|
||||||
</TR>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_XBGR">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<!-- -->
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_NONE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</a><code>public static final int</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</a></code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE">OP_NONE</A></CODE></TD>
|
<td class="colLast"><code>4</code></td>
|
||||||
<TD ALIGN="right"><CODE>0</CODE></TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_XRGB">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT180"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<!-- -->
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT180">OP_ROT180</A></CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</a></code></td>
|
||||||
<TD ALIGN="right"><CODE>6</CODE></TD>
|
<td class="colLast"><code>5</code></td>
|
||||||
</TR>
|
</tr>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr class="altColor">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT270"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_411">
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<!-- -->
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT270">OP_ROT270</A></CODE></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="right"><CODE>7</CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_411">SAMP_411</a></code></td>
|
||||||
</TR>
|
<td class="colLast"><code>5</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</tr>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT90"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<tr class="rowColor">
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_420">
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT90">OP_ROT90</A></CODE></TD>
|
<!-- -->
|
||||||
<TD ALIGN="right"><CODE>5</CODE></TD>
|
</a><code>public static final int</code></td>
|
||||||
</TR>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</a></code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colLast"><code>2</code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSPOSE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</tr>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<tr class="altColor">
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSPOSE">OP_TRANSPOSE</A></CODE></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_422">
|
||||||
<TD ALIGN="right"><CODE>3</CODE></TD>
|
<!-- -->
|
||||||
</TR>
|
</a><code>public static final int</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</a></code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSVERSE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colLast"><code>1</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</tr>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSVERSE">OP_TRANSVERSE</A></CODE></TD>
|
<tr class="rowColor">
|
||||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_440">
|
||||||
</TR>
|
<!-- -->
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</a><code>public static final int</code></td>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_VFLIP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</a></code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td class="colLast"><code>4</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_VFLIP">OP_VFLIP</A></CODE></TD>
|
</tr>
|
||||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
<tr class="altColor">
|
||||||
</TR>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_444">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<!-- -->
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_CROP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</a><code>public static final int</code></td>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</a></code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_CROP">OPT_CROP</A></CODE></TD>
|
<td class="colLast"><code>0</code></td>
|
||||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_GRAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<!-- -->
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_GRAY">OPT_GRAY</A></CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</a></code></td>
|
||||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
<td class="colLast"><code>3</code></td>
|
||||||
</TR>
|
</tr>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</tbody>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_NOOUTPUT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
</table>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
</li>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_NOOUTPUT">OPT_NOOUTPUT</A></CODE></TD>
|
<li class="blockList">
|
||||||
<TD ALIGN="right"><CODE>16</CODE></TD>
|
<table border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
|
||||||
</TR>
|
<caption><span>org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></span><span class="tabEnd"> </span></caption>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_PERFECT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<th scope="col">Constant Field</th>
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT">OPT_PERFECT</A></CODE></TD>
|
<th class="colLast" scope="col">Value</th>
|
||||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
</tr>
|
||||||
</TR>
|
<tbody>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr class="altColor">
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_TRIM"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.NUMOP">
|
||||||
<CODE>public static final int</CODE></FONT></TD>
|
<!-- -->
|
||||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_TRIM">OPT_TRIM</A></CODE></TD>
|
</a><code>public static final int</code></td>
|
||||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#NUMOP">NUMOP</a></code></td>
|
||||||
</TR>
|
<td class="colLast"><code>8</code></td>
|
||||||
</FONT></TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
</TABLE>
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_HFLIP">
|
||||||
|
<!-- -->
|
||||||
<P>
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_HFLIP">OP_HFLIP</a></code></td>
|
||||||
<P>
|
<td class="colLast"><code>1</code></td>
|
||||||
<HR>
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_NONE">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE">OP_NONE</a></code></td>
|
||||||
|
<td class="colLast"><code>0</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT180">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT180">OP_ROT180</a></code></td>
|
||||||
|
<td class="colLast"><code>6</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT270">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT270">OP_ROT270</a></code></td>
|
||||||
|
<td class="colLast"><code>7</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT90">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT90">OP_ROT90</a></code></td>
|
||||||
|
<td class="colLast"><code>5</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSPOSE">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSPOSE">OP_TRANSPOSE</a></code></td>
|
||||||
|
<td class="colLast"><code>3</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSVERSE">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSVERSE">OP_TRANSVERSE</a></code></td>
|
||||||
|
<td class="colLast"><code>4</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_VFLIP">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_VFLIP">OP_VFLIP</a></code></td>
|
||||||
|
<td class="colLast"><code>2</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_CROP">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_CROP">OPT_CROP</a></code></td>
|
||||||
|
<td class="colLast"><code>4</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_GRAY">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_GRAY">OPT_GRAY</a></code></td>
|
||||||
|
<td class="colLast"><code>8</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_NOOUTPUT">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_NOOUTPUT">OPT_NOOUTPUT</a></code></td>
|
||||||
|
<td class="colLast"><code>16</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_PERFECT">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT">OPT_PERFECT</a></code></td>
|
||||||
|
<td class="colLast"><code>1</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_TRIM">
|
||||||
|
<!-- -->
|
||||||
|
</a><code>public static final int</code></td>
|
||||||
|
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_TRIM">OPT_TRIM</a></code></td>
|
||||||
|
<td class="colLast"><code>2</code></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
<A NAME="navbar_bottom"><!-- --></A>
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="constant-values.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
PREV
|
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_bottom">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_bottom"></A>
|
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
<HR>
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
@@ -1,178 +1,248 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>Deprecated List</title>
|
||||||
Deprecated List
|
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
|
||||||
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
if (location.href.indexOf('is-external=true') == -1) {
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
parent.document.title="Deprecated List";
|
parent.document.title="Deprecated List";
|
||||||
}
|
}
|
||||||
}
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
<noscript>
|
||||||
</NOSCRIPT>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
<A NAME="navbar_top"><!-- --></A>
|
<div class="topNav"><a name="navbar_top">
|
||||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li class="navBarCell1Rev">Deprecated</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD>
|
<li><a href="help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="deprecated-list.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
PREV
|
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_top">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_top"></A>
|
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
<div class="header">
|
||||||
<HR>
|
<h1 title="Deprecated API" class="title">Deprecated API</h1>
|
||||||
<CENTER>
|
<h2 title="Contents">Contents</h2>
|
||||||
<H2>
|
<ul>
|
||||||
<B>Deprecated API</B></H2>
|
<li><a href="#field">Deprecated Fields</a></li>
|
||||||
</CENTER>
|
<li><a href="#method">Deprecated Methods</a></li>
|
||||||
<HR SIZE="4" NOSHADE>
|
<li><a href="#constructor">Deprecated Constructors</a></li>
|
||||||
<B>Contents</B><UL>
|
</ul>
|
||||||
<LI><A HREF="#method">Deprecated Methods</A>
|
</div>
|
||||||
<LI><A HREF="#constructor">Deprecated Constructors</A>
|
<div class="contentContainer"><a name="field">
|
||||||
</UL>
|
<!-- -->
|
||||||
|
</a>
|
||||||
<A NAME="method"><!-- --></A>
|
<ul class="blockList">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<li class="blockList">
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
<table border="0" cellpadding="3" cellspacing="0" summary="Deprecated Fields table, listing deprecated fields, and an explanation">
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
<caption><span>Deprecated Fields</span><span class="tabEnd"> </span></caption>
|
||||||
<B>Deprecated Methods</B></FONT></TH>
|
<tr>
|
||||||
</TR>
|
<th class="colOne" scope="col">Field and Description</th>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</tr>
|
||||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompress(byte[], int, int, int, int, int)</A>
|
<tbody>
|
||||||
<BR>
|
<tr class="altColor">
|
||||||
<I>Use
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX</a></td>
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>TJDecompressor.decompress(byte[], int, int, int, int, int, int, int)</CODE></A> instead.</I> </TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE</a></td>
|
||||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)">org.libjpegturbo.turbojpeg.TJCompressor.setSourceImage(byte[], int, int, int, int)</A>
|
</tr>
|
||||||
<BR>
|
<tr class="altColor">
|
||||||
<I>Use
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2</a></td>
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>TJCompressor.setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> instead.</I> </TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
</TABLE>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3</a></td>
|
||||||
|
</tr>
|
||||||
<P>
|
</tbody>
|
||||||
<A NAME="constructor"><!-- --></A>
|
</table>
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
</li>
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</ul>
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
<a name="method">
|
||||||
<B>Deprecated Constructors</B></FONT></TH>
|
<!-- -->
|
||||||
</TR>
|
</a>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<ul class="blockList">
|
||||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int)">org.libjpegturbo.turbojpeg.TJCompressor(byte[], int, int, int, int)</A>
|
<li class="blockList">
|
||||||
<BR>
|
<table border="0" cellpadding="3" cellspacing="0" summary="Deprecated Methods table, listing deprecated methods, and an explanation">
|
||||||
<I>Use
|
<caption><span>Deprecated Methods</span><span class="tabEnd"> </span></caption>
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)"><CODE>TJCompressor.TJCompressor(byte[], int, int, int, int, int, int)</CODE></A> instead.</I> </TD>
|
<tr>
|
||||||
</TR>
|
<th class="colOne" scope="col">Method and Description</th>
|
||||||
</TABLE>
|
</tr>
|
||||||
|
<tbody>
|
||||||
<P>
|
<tr class="altColor">
|
||||||
<HR>
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJ.bufSizeYUV(int, int, int)</a>
|
||||||
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage,%20byte[],%20int)">org.libjpegturbo.turbojpeg.TJCompressor.compress(BufferedImage, byte[], int)</a>
|
||||||
|
<div class="block"><i>Use
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[],%20int)"><code>TJCompressor.compress(byte[], int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage,%20int)">org.libjpegturbo.turbojpeg.TJCompressor.compress(BufferedImage, int)</a>
|
||||||
|
<div class="block"><i>Use
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>TJCompressor.compress(int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompress(byte[], int, int, int, int, int)</a>
|
||||||
|
<div class="block"><i>Use
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJDecompressor.decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[],%20int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(byte[], int)</a>
|
||||||
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>TJDecompressor.decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(int)</a>
|
||||||
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)"><code>TJDecompressor.decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20byte[],%20int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(BufferedImage, byte[], int)</a>
|
||||||
|
<div class="block"><i>Use
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)"><code>TJCompressor.encodeYUV(byte[], int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(BufferedImage, int)</a>
|
||||||
|
<div class="block"><i>Use
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(byte[], int)</a>
|
||||||
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>TJCompressor.encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(int)</a>
|
||||||
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[],%20int)">org.libjpegturbo.turbojpeg.TJDecompressor.setJPEGImage(byte[], int)</a>
|
||||||
|
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)"><code>TJDecompressor.setSourceImage(byte[], int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJCompressor.setSourceImage(byte[], int, int, int, int)</a>
|
||||||
|
<div class="block"><i>Use
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="constructor">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<table border="0" cellpadding="3" cellspacing="0" summary="Deprecated Constructors table, listing deprecated constructors, and an explanation">
|
||||||
|
<caption><span>Deprecated Constructors</span><span class="tabEnd"> </span></caption>
|
||||||
|
<tr>
|
||||||
|
<th class="colOne" scope="col">Constructor and Description</th>
|
||||||
|
</tr>
|
||||||
|
<tbody>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJCompressor(byte[], int, int, int, int)</a>
|
||||||
|
<div class="block"><i>Use
|
||||||
|
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor.TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
<A NAME="navbar_bottom"><!-- --></A>
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li class="navBarCell1Rev">Deprecated</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD>
|
<li><a href="help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="deprecated-list.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
PREV
|
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_bottom">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_bottom"></A>
|
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
<HR>
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
@@ -1,207 +1,206 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>API Help</title>
|
||||||
API Help
|
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
|
||||||
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
if (location.href.indexOf('is-external=true') == -1) {
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
parent.document.title="API Help";
|
parent.document.title="API Help";
|
||||||
}
|
}
|
||||||
}
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
<noscript>
|
||||||
</NOSCRIPT>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
<A NAME="navbar_top"><!-- --></A>
|
<div class="topNav"><a name="navbar_top">
|
||||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li class="navBarCell1Rev">Help</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="help-doc.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
PREV
|
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="index.html?help-doc.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="help-doc.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_top">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_top"></A>
|
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
<div class="header">
|
||||||
<HR>
|
<h1 class="title">How This API Document Is Organized</h1>
|
||||||
<CENTER>
|
<div class="subTitle">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div>
|
||||||
<H1>
|
</div>
|
||||||
How This API Document Is Organized</H1>
|
<div class="contentContainer">
|
||||||
</CENTER>
|
<ul class="blockList">
|
||||||
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.<H3>
|
<li class="blockList">
|
||||||
Package</H3>
|
<h2>Package</h2>
|
||||||
<BLOCKQUOTE>
|
<p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:</p>
|
||||||
|
<ul>
|
||||||
<P>
|
<li>Interfaces (italic)</li>
|
||||||
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:<UL>
|
<li>Classes</li>
|
||||||
<LI>Interfaces (italic)<LI>Classes<LI>Enums<LI>Exceptions<LI>Errors<LI>Annotation Types</UL>
|
<li>Enums</li>
|
||||||
</BLOCKQUOTE>
|
<li>Exceptions</li>
|
||||||
<H3>
|
<li>Errors</li>
|
||||||
Class/Interface</H3>
|
<li>Annotation Types</li>
|
||||||
<BLOCKQUOTE>
|
</ul>
|
||||||
|
</li>
|
||||||
<P>
|
<li class="blockList">
|
||||||
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:<UL>
|
<h2>Class/Interface</h2>
|
||||||
<LI>Class inheritance diagram<LI>Direct Subclasses<LI>All Known Subinterfaces<LI>All Known Implementing Classes<LI>Class/interface declaration<LI>Class/interface description
|
<p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p>
|
||||||
<P>
|
<ul>
|
||||||
<LI>Nested Class Summary<LI>Field Summary<LI>Constructor Summary<LI>Method Summary
|
<li>Class inheritance diagram</li>
|
||||||
<P>
|
<li>Direct Subclasses</li>
|
||||||
<LI>Field Detail<LI>Constructor Detail<LI>Method Detail</UL>
|
<li>All Known Subinterfaces</li>
|
||||||
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</BLOCKQUOTE>
|
<li>All Known Implementing Classes</li>
|
||||||
</BLOCKQUOTE>
|
<li>Class/interface declaration</li>
|
||||||
<H3>
|
<li>Class/interface description</li>
|
||||||
Annotation Type</H3>
|
</ul>
|
||||||
<BLOCKQUOTE>
|
<ul>
|
||||||
|
<li>Nested Class Summary</li>
|
||||||
<P>
|
<li>Field Summary</li>
|
||||||
Each annotation type has its own separate page with the following sections:<UL>
|
<li>Constructor Summary</li>
|
||||||
<LI>Annotation Type declaration<LI>Annotation Type description<LI>Required Element Summary<LI>Optional Element Summary<LI>Element Detail</UL>
|
<li>Method Summary</li>
|
||||||
</BLOCKQUOTE>
|
</ul>
|
||||||
</BLOCKQUOTE>
|
<ul>
|
||||||
<H3>
|
<li>Field Detail</li>
|
||||||
Enum</H3>
|
<li>Constructor Detail</li>
|
||||||
<BLOCKQUOTE>
|
<li>Method Detail</li>
|
||||||
|
</ul>
|
||||||
<P>
|
<p>Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p>
|
||||||
Each enum has its own separate page with the following sections:<UL>
|
</li>
|
||||||
<LI>Enum declaration<LI>Enum description<LI>Enum Constant Summary<LI>Enum Constant Detail</UL>
|
<li class="blockList">
|
||||||
</BLOCKQUOTE>
|
<h2>Annotation Type</h2>
|
||||||
<H3>
|
<p>Each annotation type has its own separate page with the following sections:</p>
|
||||||
Tree (Class Hierarchy)</H3>
|
<ul>
|
||||||
<BLOCKQUOTE>
|
<li>Annotation Type declaration</li>
|
||||||
There is a <A HREF="overview-tree.html">Class Hierarchy</A> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.<UL>
|
<li>Annotation Type description</li>
|
||||||
<LI>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.<LI>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</UL>
|
<li>Required Element Summary</li>
|
||||||
</BLOCKQUOTE>
|
<li>Optional Element Summary</li>
|
||||||
<H3>
|
<li>Element Detail</li>
|
||||||
Deprecated API</H3>
|
</ul>
|
||||||
<BLOCKQUOTE>
|
</li>
|
||||||
The <A HREF="deprecated-list.html">Deprecated API</A> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</BLOCKQUOTE>
|
<li class="blockList">
|
||||||
<H3>
|
<h2>Enum</h2>
|
||||||
Index</H3>
|
<p>Each enum has its own separate page with the following sections:</p>
|
||||||
<BLOCKQUOTE>
|
<ul>
|
||||||
The <A HREF="index-all.html">Index</A> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</BLOCKQUOTE>
|
<li>Enum declaration</li>
|
||||||
<H3>
|
<li>Enum description</li>
|
||||||
Prev/Next</H3>
|
<li>Enum Constant Summary</li>
|
||||||
These links take you to the next or previous class, interface, package, or related page.<H3>
|
<li>Enum Constant Detail</li>
|
||||||
Frames/No Frames</H3>
|
</ul>
|
||||||
These links show and hide the HTML frames. All pages are available with or without frames.
|
</li>
|
||||||
<P>
|
<li class="blockList">
|
||||||
<H3>
|
<h2>Tree (Class Hierarchy)</h2>
|
||||||
Serialized Form</H3>
|
<p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.</p>
|
||||||
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
|
<ul>
|
||||||
<P>
|
<li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li>
|
||||||
<H3>
|
<li>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</li>
|
||||||
Constant Field Values</H3>
|
</ul>
|
||||||
The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.
|
</li>
|
||||||
<P>
|
<li class="blockList">
|
||||||
<FONT SIZE="-1">
|
<h2>Deprecated API</h2>
|
||||||
<EM>
|
<p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p>
|
||||||
This help file applies to API documentation generated using the standard doclet.</EM>
|
</li>
|
||||||
</FONT>
|
<li class="blockList">
|
||||||
<BR>
|
<h2>Index</h2>
|
||||||
<HR>
|
<p>The <a href="index-all.html">Index</a> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</p>
|
||||||
|
</li>
|
||||||
|
<li class="blockList">
|
||||||
|
<h2>Prev/Next</h2>
|
||||||
|
<p>These links take you to the next or previous class, interface, package, or related page.</p>
|
||||||
|
</li>
|
||||||
|
<li class="blockList">
|
||||||
|
<h2>Frames/No Frames</h2>
|
||||||
|
<p>These links show and hide the HTML frames. All pages are available with or without frames.</p>
|
||||||
|
</li>
|
||||||
|
<li class="blockList">
|
||||||
|
<h2>All Classes</h2>
|
||||||
|
<p>The <a href="allclasses-noframe.html">All Classes</a> link shows all classes and interfaces except non-static nested types.</p>
|
||||||
|
</li>
|
||||||
|
<li class="blockList">
|
||||||
|
<h2>Serialized Form</h2>
|
||||||
|
<p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.</p>
|
||||||
|
</li>
|
||||||
|
<li class="blockList">
|
||||||
|
<h2>Constant Field Values</h2>
|
||||||
|
<p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<em>This help file applies to API documentation generated using the standard doclet.</em></div>
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
<A NAME="navbar_bottom"><!-- --></A>
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li class="navBarCell1Rev">Help</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="help-doc.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
PREV
|
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="index.html?help-doc.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="help-doc.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_bottom">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_bottom"></A>
|
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
<HR>
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,21 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>Generated Documentation (Untitled)</title>
|
||||||
Generated Documentation (Untitled)
|
<script type="text/javascript">
|
||||||
</TITLE>
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
targetPage = "" + window.location.search;
|
targetPage = "" + window.location.search;
|
||||||
if (targetPage != "" && targetPage != "undefined")
|
if (targetPage != "" && targetPage != "undefined")
|
||||||
targetPage = targetPage.substring(1);
|
targetPage = targetPage.substring(1);
|
||||||
if (targetPage.indexOf(":") != -1 || (targetPage != "" && !validURL(targetPage)))
|
if (targetPage.indexOf(":") != -1 || (targetPage != "" && !validURL(targetPage)))
|
||||||
targetPage = "undefined";
|
targetPage = "undefined";
|
||||||
function validURL(url) {
|
function validURL(url) {
|
||||||
|
try {
|
||||||
|
url = decodeURIComponent(url);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
var pos = url.indexOf(".html");
|
var pos = url.indexOf(".html");
|
||||||
if (pos == -1 || pos != url.length - 5)
|
if (pos == -1 || pos != url.length - 5)
|
||||||
return false;
|
return false;
|
||||||
@@ -23,7 +27,8 @@ Generated Documentation (Untitled)
|
|||||||
if ('a' <= ch && ch <= 'z' ||
|
if ('a' <= ch && ch <= 'z' ||
|
||||||
'A' <= ch && ch <= 'Z' ||
|
'A' <= ch && ch <= 'Z' ||
|
||||||
ch == '$' ||
|
ch == '$' ||
|
||||||
ch == '_') {
|
ch == '_' ||
|
||||||
|
ch.charCodeAt(0) > 127) {
|
||||||
allowNumber = true;
|
allowNumber = true;
|
||||||
allowSep = true;
|
allowSep = true;
|
||||||
} else if ('0' <= ch && ch <= '9'
|
} else if ('0' <= ch && ch <= '9'
|
||||||
@@ -49,21 +54,17 @@ Generated Documentation (Untitled)
|
|||||||
if (targetPage != "" && targetPage != "undefined")
|
if (targetPage != "" && targetPage != "undefined")
|
||||||
top.classFrame.location = top.targetPage;
|
top.classFrame.location = top.targetPage;
|
||||||
}
|
}
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</head>
|
||||||
</NOSCRIPT>
|
<frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()">
|
||||||
</HEAD>
|
<frame src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
|
||||||
<FRAMESET cols="20%,80%" title="" onLoad="top.loadFrames()">
|
<frame src="org/libjpegturbo/turbojpeg/package-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
|
||||||
<FRAME src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
|
<noframes>
|
||||||
<FRAME src="org/libjpegturbo/turbojpeg/package-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
|
<noscript>
|
||||||
<NOFRAMES>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
<H2>
|
</noscript>
|
||||||
Frame Alert</H2>
|
<h2>Frame Alert</h2>
|
||||||
|
<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="org/libjpegturbo/turbojpeg/package-summary.html">Non-frame version</a>.</p>
|
||||||
<P>
|
</noframes>
|
||||||
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
|
</frameset>
|
||||||
<BR>
|
</html>
|
||||||
Link to<A HREF="org/libjpegturbo/turbojpeg/package-summary.html">Non-frame version.</A>
|
|
||||||
</NOFRAMES>
|
|
||||||
</FRAMESET>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,238 +1,237 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>TJCustomFilter</title>
|
||||||
TJCustomFilter
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
||||||
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
if (location.href.indexOf('is-external=true') == -1) {
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
parent.document.title="TJCustomFilter";
|
parent.document.title="TJCustomFilter";
|
||||||
}
|
}
|
||||||
}
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
<noscript>
|
||||||
</NOSCRIPT>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
<A NAME="navbar_top"><!-- --></A>
|
<div class="topNav"><a name="navbar_top">
|
||||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li class="navBarCell1Rev">Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="TJCustomFilter.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="TJCustomFilter.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
<div>
|
||||||
</NOSCRIPT>
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
</FONT></TD>
|
<li>Field | </li>
|
||||||
</TR>
|
<li>Constr | </li>
|
||||||
<TR>
|
<li><a href="#method_summary">Method</a></li>
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
</ul>
|
||||||
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
<ul class="subNavList">
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
<li>Detail: </li>
|
||||||
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
<li>Field | </li>
|
||||||
</TR>
|
<li>Constr | </li>
|
||||||
</TABLE>
|
<li><a href="#method_detail">Method</a></li>
|
||||||
<A NAME="skip-navbar_top"></A>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_top">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
|
||||||
<HR>
|
|
||||||
<!-- ======== START OF CLASS DATA ======== -->
|
<!-- ======== START OF CLASS DATA ======== -->
|
||||||
<H2>
|
<div class="header">
|
||||||
<FONT SIZE="-1">
|
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||||
org.libjpegturbo.turbojpeg</FONT>
|
<h2 title="Interface TJCustomFilter" class="title">Interface TJCustomFilter</h2>
|
||||||
<BR>
|
</div>
|
||||||
Interface TJCustomFilter</H2>
|
<div class="contentContainer">
|
||||||
<HR>
|
<div class="description">
|
||||||
<DL>
|
<ul class="blockList">
|
||||||
<DT><PRE>public interface <B>TJCustomFilter</B></DL>
|
<li class="blockList">
|
||||||
</PRE>
|
<hr>
|
||||||
|
<br>
|
||||||
<P>
|
<pre>public interface <span class="strong">TJCustomFilter</span></pre>
|
||||||
Custom filter callback interface
|
<div class="block">Custom filter callback interface</div>
|
||||||
<P>
|
</li>
|
||||||
|
</ul>
|
||||||
<P>
|
</div>
|
||||||
<HR>
|
<div class="summary">
|
||||||
|
<ul class="blockList">
|
||||||
<P>
|
<li class="blockList">
|
||||||
|
|
||||||
<!-- ========== METHOD SUMMARY =========== -->
|
<!-- ========== METHOD SUMMARY =========== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="method_summary"><!-- --></A>
|
<li class="blockList"><a name="method_summary">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
<h3>Method Summary</h3>
|
||||||
<B>Method Summary</B></FONT></TH>
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||||
</TR>
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr>
|
||||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||||
<CODE> void</CODE></FONT></TD>
|
<th class="colLast" scope="col">Method and Description</th>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">customFilter</A></B>(java.nio.ShortBuffer coeffBuffer,
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>void</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer,%20java.awt.Rectangle,%20java.awt.Rectangle,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJTransform)">customFilter</a></strong>(java.nio.ShortBuffer coeffBuffer,
|
||||||
java.awt.Rectangle bufferRegion,
|
java.awt.Rectangle bufferRegion,
|
||||||
java.awt.Rectangle planeRegion,
|
java.awt.Rectangle planeRegion,
|
||||||
int componentID,
|
int componentID,
|
||||||
int transformID,
|
int transformID,
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A> transform)</CODE>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)</code>
|
||||||
|
<div class="block">A callback function that can be used to modify the DCT coefficients after
|
||||||
<BR>
|
|
||||||
A callback function that can be used to modify the DCT coefficients after
|
|
||||||
they are losslessly transformed but before they are transcoded to a new
|
they are losslessly transformed but before they are transcoded to a new
|
||||||
JPEG image.</TD>
|
JPEG image.</div>
|
||||||
</TR>
|
</td>
|
||||||
</TABLE>
|
</tr>
|
||||||
|
</table>
|
||||||
<P>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="details">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
<!-- ============ METHOD DETAIL ========== -->
|
<!-- ============ METHOD DETAIL ========== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="method_detail"><!-- --></A>
|
<li class="blockList"><a name="method_detail">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
<h3>Method Detail</h3>
|
||||||
<B>Method Detail</B></FONT></TH>
|
<a name="customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">
|
||||||
</TR>
|
<!-- -->
|
||||||
</TABLE>
|
</a>
|
||||||
|
<ul class="blockListLast">
|
||||||
<A NAME="customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)"><!-- --></A><H3>
|
<li class="blockList">
|
||||||
customFilter</H3>
|
<h4>customFilter</h4>
|
||||||
<PRE>
|
<pre>void customFilter(java.nio.ShortBuffer coeffBuffer,
|
||||||
void <B>customFilter</B>(java.nio.ShortBuffer coeffBuffer,
|
|
||||||
java.awt.Rectangle bufferRegion,
|
java.awt.Rectangle bufferRegion,
|
||||||
java.awt.Rectangle planeRegion,
|
java.awt.Rectangle planeRegion,
|
||||||
int componentID,
|
int componentID,
|
||||||
int transformID,
|
int transformID,
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A> transform)
|
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)
|
||||||
throws java.lang.Exception</PRE>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<DL>
|
<div class="block">A callback function that can be used to modify the DCT coefficients after
|
||||||
<DD>A callback function that can be used to modify the DCT coefficients after
|
|
||||||
they are losslessly transformed but before they are transcoded to a new
|
they are losslessly transformed but before they are transcoded to a new
|
||||||
JPEG image. This allows for custom filters or other transformations to be
|
JPEG image. This allows for custom filters or other transformations to be
|
||||||
applied in the frequency domain.
|
applied in the frequency domain.</div>
|
||||||
<P>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>coeffBuffer</code> - a buffer containing transformed DCT coefficients.
|
||||||
<DD><DL>
|
|
||||||
<DT><B>Parameters:</B><DD><CODE>coeffBuffer</CODE> - a buffer containing transformed DCT coefficients.
|
|
||||||
(NOTE: this buffer is not guaranteed to be valid once the callback
|
(NOTE: this buffer is not guaranteed to be valid once the callback
|
||||||
returns, so applications wishing to hand off the DCT coefficients to
|
returns, so applications wishing to hand off the DCT coefficients to
|
||||||
another function or library should make a copy of them within the body of
|
another function or library should make a copy of them within the body of
|
||||||
the callback.)<DD><CODE>bufferRegion</CODE> - rectangle containing the width and height of
|
the callback.)</dd><dd><code>bufferRegion</code> - rectangle containing the width and height of
|
||||||
<code>coeffBuffer</code> as well as its offset relative to the component
|
<code>coeffBuffer</code> as well as its offset relative to the component
|
||||||
plane. TurboJPEG implementations may choose to split each component plane
|
plane. TurboJPEG implementations may choose to split each component plane
|
||||||
into multiple DCT coefficient buffers and call the callback function once
|
into multiple DCT coefficient buffers and call the callback function once
|
||||||
for each buffer.<DD><CODE>planeRegion</CODE> - rectangle containing the width and height of the
|
for each buffer.</dd><dd><code>planeRegion</code> - rectangle containing the width and height of the
|
||||||
component plane to which <code>coeffBuffer</code> belongs<DD><CODE>componentID</CODE> - ID number of the component plane to which
|
component plane to which <code>coeffBuffer</code> belongs</dd><dd><code>componentID</code> - ID number of the component plane to which
|
||||||
<code>coeffBuffer</code> belongs (Y, Cb, and Cr have, respectively, ID's
|
<code>coeffBuffer</code> belongs (Y, Cb, and Cr have, respectively, ID's
|
||||||
of 0, 1, and 2 in typical JPEG images.)<DD><CODE>transformID</CODE> - ID number of the transformed image to which
|
of 0, 1, and 2 in typical JPEG images.)</dd><dd><code>transformID</code> - ID number of the transformed image to which
|
||||||
<code>coeffBuffer</code> belongs. This is the same as the index of the
|
<code>coeffBuffer</code> belongs. This is the same as the index of the
|
||||||
transform in the <code>transforms</code> array that was passed to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>TJTransformer.transform()</CODE></A>.<DD><CODE>transform</CODE> - a <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instance that specifies the
|
transform in the <code>transforms</code> array that was passed to <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a>.</dd><dd><code>transform</code> - a <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instance that specifies the
|
||||||
parameters and/or cropping region for this transform
|
parameters and/or cropping region for this transform</dd>
|
||||||
<DT><B>Throws:</B>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</DD>
|
</li>
|
||||||
</DL>
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- ========= END OF CLASS DATA ========= -->
|
<!-- ========= END OF CLASS DATA ========= -->
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
<A NAME="navbar_bottom"><!-- --></A>
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li class="navBarCell1Rev">Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="TJCustomFilter.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="TJCustomFilter.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
<div>
|
||||||
</NOSCRIPT>
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
</FONT></TD>
|
<li>Field | </li>
|
||||||
</TR>
|
<li>Constr | </li>
|
||||||
<TR>
|
<li><a href="#method_summary">Method</a></li>
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
</ul>
|
||||||
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
<ul class="subNavList">
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
<li>Detail: </li>
|
||||||
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
<li>Field | </li>
|
||||||
</TR>
|
<li>Constr | </li>
|
||||||
</TABLE>
|
<li><a href="#method_detail">Method</a></li>
|
||||||
<A NAME="skip-navbar_bottom"></A>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_bottom">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
<HR>
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
287
java/doc/org/libjpegturbo/turbojpeg/TJException.html
Normal file
287
java/doc/org/libjpegturbo/turbojpeg/TJException.html
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<!-- NewPage -->
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>TJException</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
|
parent.document.title="TJException";
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<noscript>
|
||||||
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
|
<div class="topNav"><a name="navbar_top">
|
||||||
|
<!-- -->
|
||||||
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="navList" title="Navigation">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
|
<li class="navBarCell1Rev">Class</li>
|
||||||
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="subNav">
|
||||||
|
<ul class="navList">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList">
|
||||||
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJException.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="TJException.html" target="_top">No Frames</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
|
</ul>
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
|
if(window==top) {
|
||||||
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
|
<li>Field | </li>
|
||||||
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||||
|
<li><a href="#methods_inherited_from_class_java.lang.Throwable">Method</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Detail: </li>
|
||||||
|
<li>Field | </li>
|
||||||
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||||
|
<li>Method</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_top">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
<!-- ======== START OF CLASS DATA ======== -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||||
|
<h2 title="Class TJException" class="title">Class TJException</h2>
|
||||||
|
</div>
|
||||||
|
<div class="contentContainer">
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>java.lang.Object</li>
|
||||||
|
<li>
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>java.lang.Throwable</li>
|
||||||
|
<li>
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>java.lang.Exception</li>
|
||||||
|
<li>
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>java.io.IOException</li>
|
||||||
|
<li>
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>org.libjpegturbo.turbojpeg.TJException</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="description">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<dl>
|
||||||
|
<dt>All Implemented Interfaces:</dt>
|
||||||
|
<dd>java.io.Serializable</dd>
|
||||||
|
</dl>
|
||||||
|
<hr>
|
||||||
|
<br>
|
||||||
|
<pre>public class <span class="strong">TJException</span>
|
||||||
|
extends java.io.IOException</pre>
|
||||||
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../serialized-form.html#org.libjpegturbo.turbojpeg.TJException">Serialized Form</a></dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="summary">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="constructor_summary">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Constructor Summary</h3>
|
||||||
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||||
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||||
|
<tr>
|
||||||
|
<th class="colOne" scope="col">Constructor and Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException()">TJException</a></strong>()</code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String)">TJException</a></strong>(java.lang.String message)</code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String,%20java.lang.Throwable)">TJException</a></strong>(java.lang.String message,
|
||||||
|
java.lang.Throwable cause)</code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.Throwable)">TJException</a></strong>(java.lang.Throwable cause)</code> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- ========== METHOD SUMMARY =========== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="method_summary">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Method Summary</h3>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Throwable">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Methods inherited from class java.lang.Throwable</h3>
|
||||||
|
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Methods inherited from class java.lang.Object</h3>
|
||||||
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="details">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="constructor_detail">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Constructor Detail</h3>
|
||||||
|
<a name="TJException()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>TJException</h4>
|
||||||
|
<pre>public TJException()</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="TJException(java.lang.String, java.lang.Throwable)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>TJException</h4>
|
||||||
|
<pre>public TJException(java.lang.String message,
|
||||||
|
java.lang.Throwable cause)</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="TJException(java.lang.String)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>TJException</h4>
|
||||||
|
<pre>public TJException(java.lang.String message)</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="TJException(java.lang.Throwable)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockListLast">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>TJException</h4>
|
||||||
|
<pre>public TJException(java.lang.Throwable cause)</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ========= END OF CLASS DATA ========= -->
|
||||||
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
|
<!-- -->
|
||||||
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="navList" title="Navigation">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
|
<li class="navBarCell1Rev">Class</li>
|
||||||
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="subNav">
|
||||||
|
<ul class="navList">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList">
|
||||||
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJException.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="TJException.html" target="_top">No Frames</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
|
</ul>
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
|
if(window==top) {
|
||||||
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
|
<li>Field | </li>
|
||||||
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||||
|
<li><a href="#methods_inherited_from_class_java.lang.Throwable">Method</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Detail: </li>
|
||||||
|
<li>Field | </li>
|
||||||
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||||
|
<li>Method</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_bottom">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,356 +1,333 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>TJScalingFactor</title>
|
||||||
TJScalingFactor
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
||||||
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
if (location.href.indexOf('is-external=true') == -1) {
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
parent.document.title="TJScalingFactor";
|
parent.document.title="TJScalingFactor";
|
||||||
}
|
}
|
||||||
}
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
<noscript>
|
||||||
</NOSCRIPT>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
<A NAME="navbar_top"><!-- --></A>
|
<div class="topNav"><a name="navbar_top">
|
||||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li class="navBarCell1Rev">Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="TJScalingFactor.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="TJScalingFactor.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
<div>
|
||||||
</NOSCRIPT>
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
</FONT></TD>
|
<li>Field | </li>
|
||||||
</TR>
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||||
<TR>
|
<li><a href="#method_summary">Method</a></li>
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
</ul>
|
||||||
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
<ul class="subNavList">
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
<li>Detail: </li>
|
||||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
<li>Field | </li>
|
||||||
</TR>
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||||
</TABLE>
|
<li><a href="#method_detail">Method</a></li>
|
||||||
<A NAME="skip-navbar_top"></A>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_top">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
|
||||||
<HR>
|
|
||||||
<!-- ======== START OF CLASS DATA ======== -->
|
<!-- ======== START OF CLASS DATA ======== -->
|
||||||
<H2>
|
<div class="header">
|
||||||
<FONT SIZE="-1">
|
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||||
org.libjpegturbo.turbojpeg</FONT>
|
<h2 title="Class TJScalingFactor" class="title">Class TJScalingFactor</h2>
|
||||||
<BR>
|
</div>
|
||||||
Class TJScalingFactor</H2>
|
<div class="contentContainer">
|
||||||
<PRE>
|
<ul class="inheritance">
|
||||||
java.lang.Object
|
<li>java.lang.Object</li>
|
||||||
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.libjpegturbo.turbojpeg.TJScalingFactor</B>
|
<li>
|
||||||
</PRE>
|
<ul class="inheritance">
|
||||||
<HR>
|
<li>org.libjpegturbo.turbojpeg.TJScalingFactor</li>
|
||||||
<DL>
|
</ul>
|
||||||
<DT><PRE>public class <B>TJScalingFactor</B><DT>extends java.lang.Object</DL>
|
</li>
|
||||||
</PRE>
|
</ul>
|
||||||
|
<div class="description">
|
||||||
<P>
|
<ul class="blockList">
|
||||||
Fractional scaling factor
|
<li class="blockList">
|
||||||
<P>
|
<hr>
|
||||||
|
<br>
|
||||||
<P>
|
<pre>public class <span class="strong">TJScalingFactor</span>
|
||||||
<HR>
|
extends java.lang.Object</pre>
|
||||||
|
<div class="block">Fractional scaling factor</div>
|
||||||
<P>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="summary">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="constructor_summary"><!-- --></A>
|
<li class="blockList"><a name="constructor_summary">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
<h3>Constructor Summary</h3>
|
||||||
<B>Constructor Summary</B></FONT></TH>
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||||
</TR>
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int, int)">TJScalingFactor</A></B>(int num,
|
<th class="colOne" scope="col">Constructor and Description</th>
|
||||||
int denom)</CODE>
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
<BR>
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int,%20int)">TJScalingFactor</a></strong>(int num,
|
||||||
</TD>
|
int denom)</code> </td>
|
||||||
</TR>
|
</tr>
|
||||||
</TABLE>
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<!-- ========== METHOD SUMMARY =========== -->
|
<!-- ========== METHOD SUMMARY =========== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="method_summary"><!-- --></A>
|
<li class="blockList"><a name="method_summary">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
<h3>Method Summary</h3>
|
||||||
<B>Method Summary</B></FONT></TH>
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||||
</TR>
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr>
|
||||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||||
<CODE> boolean</CODE></FONT></TD>
|
<th class="colLast" scope="col">Method and Description</th>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">equals</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A> other)</CODE>
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
<BR>
|
<td class="colFirst"><code>boolean</code></td>
|
||||||
Returns true or false, depending on whether this instance and
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">equals</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a> other)</code>
|
||||||
<code>other</code> have the same numerator and denominator.</TD>
|
<div class="block">Returns true or false, depending on whether this instance and
|
||||||
</TR>
|
<code>other</code> have the same numerator and denominator.</div>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</td>
|
||||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
</tr>
|
||||||
<CODE> int</CODE></FONT></TD>
|
<tr class="rowColor">
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getDenom()">getDenom</A></B>()</CODE>
|
<td class="colFirst"><code>int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getDenom()">getDenom</a></strong>()</code>
|
||||||
<BR>
|
<div class="block">Returns denominator</div>
|
||||||
Returns denominator</TD>
|
</td>
|
||||||
</TR>
|
</tr>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr class="altColor">
|
||||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<td class="colFirst"><code>int</code></td>
|
||||||
<CODE> int</CODE></FONT></TD>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getNum()">getNum</a></strong>()</code>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getNum()">getNum</A></B>()</CODE>
|
<div class="block">Returns numerator</div>
|
||||||
|
</td>
|
||||||
<BR>
|
</tr>
|
||||||
Returns numerator</TD>
|
<tr class="rowColor">
|
||||||
</TR>
|
<td class="colFirst"><code>int</code></td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)">getScaled</a></strong>(int dimension)</code>
|
||||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<div class="block">Returns the scaled value of <code>dimension</code>.</div>
|
||||||
<CODE> int</CODE></FONT></TD>
|
</td>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)">getScaled</A></B>(int dimension)</CODE>
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
<BR>
|
<td class="colFirst"><code>boolean</code></td>
|
||||||
Returns the scaled value of <code>dimension</code>.</TD>
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#isOne()">isOne</a></strong>()</code>
|
||||||
</TR>
|
<div class="block">Returns true or false, depending on whether this instance is equal to
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
1/1.</div>
|
||||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
</td>
|
||||||
<CODE> boolean</CODE></FONT></TD>
|
</tr>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#isOne()">isOne</A></B>()</CODE>
|
</table>
|
||||||
|
<ul class="blockList">
|
||||||
<BR>
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||||
Returns true or false, depending on whether this instance is equal to
|
<!-- -->
|
||||||
1/1.</TD>
|
</a>
|
||||||
</TR>
|
<h3>Methods inherited from class java.lang.Object</h3>
|
||||||
</TABLE>
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
</ul>
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
</li>
|
||||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
</ul>
|
||||||
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
</li>
|
||||||
</TR>
|
</ul>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</div>
|
||||||
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
<div class="details">
|
||||||
</TR>
|
<ul class="blockList">
|
||||||
</TABLE>
|
<li class="blockList">
|
||||||
|
|
||||||
<P>
|
|
||||||
|
|
||||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="constructor_detail"><!-- --></A>
|
<li class="blockList"><a name="constructor_detail">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
<h3>Constructor Detail</h3>
|
||||||
<B>Constructor Detail</B></FONT></TH>
|
<a name="TJScalingFactor(int, int)">
|
||||||
</TR>
|
<!-- -->
|
||||||
</TABLE>
|
</a>
|
||||||
|
<ul class="blockListLast">
|
||||||
<A NAME="TJScalingFactor(int, int)"><!-- --></A><H3>
|
<li class="blockList">
|
||||||
TJScalingFactor</H3>
|
<h4>TJScalingFactor</h4>
|
||||||
<PRE>
|
<pre>public TJScalingFactor(int num,
|
||||||
public <B>TJScalingFactor</B>(int num,
|
int denom)</pre>
|
||||||
int denom)
|
</li>
|
||||||
throws java.lang.Exception</PRE>
|
</ul>
|
||||||
<DL>
|
</li>
|
||||||
<DL>
|
</ul>
|
||||||
|
|
||||||
<DT><B>Throws:</B>
|
|
||||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
|
||||||
</DL>
|
|
||||||
|
|
||||||
<!-- ============ METHOD DETAIL ========== -->
|
<!-- ============ METHOD DETAIL ========== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="method_detail"><!-- --></A>
|
<li class="blockList"><a name="method_detail">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
<h3>Method Detail</h3>
|
||||||
<B>Method Detail</B></FONT></TH>
|
<a name="getNum()">
|
||||||
</TR>
|
<!-- -->
|
||||||
</TABLE>
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="getNum()"><!-- --></A><H3>
|
<li class="blockList">
|
||||||
getNum</H3>
|
<h4>getNum</h4>
|
||||||
<PRE>
|
<pre>public int getNum()</pre>
|
||||||
public int <B>getNum</B>()</PRE>
|
<div class="block">Returns numerator</div>
|
||||||
<DL>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>numerator</dd></dl>
|
||||||
<DD>Returns numerator
|
</li>
|
||||||
<P>
|
</ul>
|
||||||
<DD><DL>
|
<a name="getDenom()">
|
||||||
|
<!-- -->
|
||||||
<DT><B>Returns:</B><DD>numerator</DL>
|
</a>
|
||||||
</DD>
|
<ul class="blockList">
|
||||||
</DL>
|
<li class="blockList">
|
||||||
<HR>
|
<h4>getDenom</h4>
|
||||||
|
<pre>public int getDenom()</pre>
|
||||||
<A NAME="getDenom()"><!-- --></A><H3>
|
<div class="block">Returns denominator</div>
|
||||||
getDenom</H3>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>denominator</dd></dl>
|
||||||
<PRE>
|
</li>
|
||||||
public int <B>getDenom</B>()</PRE>
|
</ul>
|
||||||
<DL>
|
<a name="getScaled(int)">
|
||||||
<DD>Returns denominator
|
<!-- -->
|
||||||
<P>
|
</a>
|
||||||
<DD><DL>
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
<DT><B>Returns:</B><DD>denominator</DL>
|
<h4>getScaled</h4>
|
||||||
</DD>
|
<pre>public int getScaled(int dimension)</pre>
|
||||||
</DL>
|
<div class="block">Returns the scaled value of <code>dimension</code>. This function
|
||||||
<HR>
|
|
||||||
|
|
||||||
<A NAME="getScaled(int)"><!-- --></A><H3>
|
|
||||||
getScaled</H3>
|
|
||||||
<PRE>
|
|
||||||
public int <B>getScaled</B>(int dimension)</PRE>
|
|
||||||
<DL>
|
|
||||||
<DD>Returns the scaled value of <code>dimension</code>. This function
|
|
||||||
performs the integer equivalent of
|
performs the integer equivalent of
|
||||||
<code>ceil(dimension * scalingFactor)</code>.
|
<code>ceil(dimension * scalingFactor)</code>.</div>
|
||||||
<P>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the scaled value of <code>dimension</code>.</dd></dl>
|
||||||
<DD><DL>
|
</li>
|
||||||
|
</ul>
|
||||||
<DT><B>Returns:</B><DD>the scaled value of <code>dimension</code></DL>
|
<a name="equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">
|
||||||
</DD>
|
<!-- -->
|
||||||
</DL>
|
</a>
|
||||||
<HR>
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
<A NAME="equals(org.libjpegturbo.turbojpeg.TJScalingFactor)"><!-- --></A><H3>
|
<h4>equals</h4>
|
||||||
equals</H3>
|
<pre>public boolean equals(<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a> other)</pre>
|
||||||
<PRE>
|
<div class="block">Returns true or false, depending on whether this instance and
|
||||||
public boolean <B>equals</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A> other)</PRE>
|
<code>other</code> have the same numerator and denominator.</div>
|
||||||
<DL>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>true or false, depending on whether this instance and
|
||||||
<DD>Returns true or false, depending on whether this instance and
|
<code>other</code> have the same numerator and denominator.</dd></dl>
|
||||||
<code>other</code> have the same numerator and denominator.
|
</li>
|
||||||
<P>
|
</ul>
|
||||||
<DD><DL>
|
<a name="isOne()">
|
||||||
|
<!-- -->
|
||||||
<DT><B>Returns:</B><DD>true or false, depending on whether this instance and
|
</a>
|
||||||
<code>other</code> have the same numerator and denominator</DL>
|
<ul class="blockListLast">
|
||||||
</DD>
|
<li class="blockList">
|
||||||
</DL>
|
<h4>isOne</h4>
|
||||||
<HR>
|
<pre>public boolean isOne()</pre>
|
||||||
|
<div class="block">Returns true or false, depending on whether this instance is equal to
|
||||||
<A NAME="isOne()"><!-- --></A><H3>
|
1/1.</div>
|
||||||
isOne</H3>
|
<dl><dt><span class="strong">Returns:</span></dt><dd>true or false, depending on whether this instance is equal to
|
||||||
<PRE>
|
1/1.</dd></dl>
|
||||||
public boolean <B>isOne</B>()</PRE>
|
</li>
|
||||||
<DL>
|
</ul>
|
||||||
<DD>Returns true or false, depending on whether this instance is equal to
|
</li>
|
||||||
1/1.
|
</ul>
|
||||||
<P>
|
</li>
|
||||||
<DD><DL>
|
</ul>
|
||||||
|
</div>
|
||||||
<DT><B>Returns:</B><DD>true or false, depending on whether this instance is equal to
|
</div>
|
||||||
1/1</DL>
|
|
||||||
</DD>
|
|
||||||
</DL>
|
|
||||||
<!-- ========= END OF CLASS DATA ========= -->
|
<!-- ========= END OF CLASS DATA ========= -->
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
<A NAME="navbar_bottom"><!-- --></A>
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li class="navBarCell1Rev">Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="TJScalingFactor.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="TJScalingFactor.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
<div>
|
||||||
</NOSCRIPT>
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
</FONT></TD>
|
<li>Field | </li>
|
||||||
</TR>
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||||
<TR>
|
<li><a href="#method_summary">Method</a></li>
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
</ul>
|
||||||
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
<ul class="subNavList">
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
<li>Detail: </li>
|
||||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
<li>Field | </li>
|
||||||
</TR>
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||||
</TABLE>
|
<li><a href="#method_detail">Method</a></li>
|
||||||
<A NAME="skip-navbar_bottom"></A>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_bottom">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
<HR>
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,301 +1,295 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>TJTransformer</title>
|
||||||
TJTransformer
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
||||||
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
if (location.href.indexOf('is-external=true') == -1) {
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
parent.document.title="TJTransformer";
|
parent.document.title="TJTransformer";
|
||||||
}
|
}
|
||||||
}
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
<noscript>
|
||||||
</NOSCRIPT>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
<A NAME="navbar_top"><!-- --></A>
|
<div class="topNav"><a name="navbar_top">
|
||||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li class="navBarCell1Rev">Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="TJTransformer.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT CLASS</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="TJTransformer.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
<div>
|
||||||
</NOSCRIPT>
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
</FONT></TD>
|
<li><a href="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">Field</a> | </li>
|
||||||
</TR>
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||||
<TR>
|
<li><a href="#method_summary">Method</a></li>
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
</ul>
|
||||||
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
<ul class="subNavList">
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
<li>Detail: </li>
|
||||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
<li>Field | </li>
|
||||||
</TR>
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||||
</TABLE>
|
<li><a href="#method_detail">Method</a></li>
|
||||||
<A NAME="skip-navbar_top"></A>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_top">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
|
||||||
<HR>
|
|
||||||
<!-- ======== START OF CLASS DATA ======== -->
|
<!-- ======== START OF CLASS DATA ======== -->
|
||||||
<H2>
|
<div class="header">
|
||||||
<FONT SIZE="-1">
|
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||||
org.libjpegturbo.turbojpeg</FONT>
|
<h2 title="Class TJTransformer" class="title">Class TJTransformer</h2>
|
||||||
<BR>
|
</div>
|
||||||
Class TJTransformer</H2>
|
<div class="contentContainer">
|
||||||
<PRE>
|
<ul class="inheritance">
|
||||||
java.lang.Object
|
<li>java.lang.Object</li>
|
||||||
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJDecompressor</A>
|
<li>
|
||||||
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.libjpegturbo.turbojpeg.TJTransformer</B>
|
<ul class="inheritance">
|
||||||
</PRE>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJDecompressor</a></li>
|
||||||
<HR>
|
<li>
|
||||||
<DL>
|
<ul class="inheritance">
|
||||||
<DT><PRE>public class <B>TJTransformer</B><DT>extends <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></DL>
|
<li>org.libjpegturbo.turbojpeg.TJTransformer</li>
|
||||||
</PRE>
|
</ul>
|
||||||
|
</li>
|
||||||
<P>
|
</ul>
|
||||||
TurboJPEG lossless transformer
|
</li>
|
||||||
<P>
|
</ul>
|
||||||
|
<div class="description">
|
||||||
<P>
|
<ul class="blockList">
|
||||||
<HR>
|
<li class="blockList">
|
||||||
|
<dl>
|
||||||
<P>
|
<dt>All Implemented Interfaces:</dt>
|
||||||
|
<dd>java.io.Closeable, java.lang.AutoCloseable</dd>
|
||||||
|
</dl>
|
||||||
|
<hr>
|
||||||
|
<br>
|
||||||
|
<pre>public class <span class="strong">TJTransformer</span>
|
||||||
|
extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></pre>
|
||||||
|
<div class="block">TurboJPEG lossless transformer</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="summary">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
<!-- =========== FIELD SUMMARY =========== -->
|
<!-- =========== FIELD SUMMARY =========== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="field_summary"><!-- --></A>
|
<li class="blockList"><a name="field_summary">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
<h3>Field Summary</h3>
|
||||||
<B>Field Summary</B></FONT></TH>
|
<ul class="blockList">
|
||||||
</TR>
|
<li class="blockList"><a name="fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">
|
||||||
</TABLE>
|
<!-- -->
|
||||||
<A NAME="fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor"><!-- --></A>
|
</a>
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<h3>Fields inherited from class org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></h3>
|
||||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
<code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegColorspace">jpegColorspace</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#yuvImage">yuvImage</a></code></li>
|
||||||
<TH ALIGN="left"><B>Fields inherited from class org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TH>
|
</ul>
|
||||||
</TR>
|
</li>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</ul>
|
||||||
<TD><CODE><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</A></CODE></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="constructor_summary"><!-- --></A>
|
<li class="blockList"><a name="constructor_summary">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
<h3>Constructor Summary</h3>
|
||||||
<B>Constructor Summary</B></FONT></TH>
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||||
</TR>
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer()">TJTransformer</A></B>()</CODE>
|
<th class="colOne" scope="col">Constructor and Description</th>
|
||||||
|
</tr>
|
||||||
<BR>
|
<tr class="altColor">
|
||||||
Create a TurboJPEG lossless transformer instance.</TD>
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer()">TJTransformer</a></strong>()</code>
|
||||||
</TR>
|
<div class="block">Create a TurboJPEG lossless transformer instance.</div>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</td>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[])">TJTransformer</A></B>(byte[] jpegImage)</CODE>
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
<BR>
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[])">TJTransformer</a></strong>(byte[] jpegImage)</code>
|
||||||
Create a TurboJPEG lossless transformer instance and associate the JPEG
|
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||||
image stored in <code>jpegImage</code> with the newly created instance.</TD>
|
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||||
</TR>
|
</td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</tr>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[], int)">TJTransformer</A></B>(byte[] jpegImage,
|
<tr class="altColor">
|
||||||
int imageSize)</CODE>
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[],%20int)">TJTransformer</a></strong>(byte[] jpegImage,
|
||||||
|
int imageSize)</code>
|
||||||
<BR>
|
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||||
Create a TurboJPEG lossless transformer instance and associate the JPEG
|
|
||||||
image of length <code>imageSize</code> bytes stored in
|
image of length <code>imageSize</code> bytes stored in
|
||||||
<code>jpegImage</code> with the newly created instance.</TD>
|
<code>jpegImage</code> with the newly created instance.</div>
|
||||||
</TR>
|
</td>
|
||||||
</TABLE>
|
</tr>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<!-- ========== METHOD SUMMARY =========== -->
|
<!-- ========== METHOD SUMMARY =========== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="method_summary"><!-- --></A>
|
<li class="blockList"><a name="method_summary">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
<h3>Method Summary</h3>
|
||||||
<B>Method Summary</B></FONT></TH>
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||||
</TR>
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr>
|
||||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||||
<CODE> int[]</CODE></FONT></TD>
|
<th class="colLast" scope="col">Method and Description</th>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</A></B>()</CODE>
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
<BR>
|
<td class="colFirst"><code>int[]</code></td>
|
||||||
Returns an array containing the sizes of the transformed JPEG images
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</a></strong>()</code>
|
||||||
generated by the most recent transform operation.</TD>
|
<div class="block">Returns an array containing the sizes of the transformed JPEG images
|
||||||
</TR>
|
generated by the most recent transform operation.</div>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</td>
|
||||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
</tr>
|
||||||
<CODE> void</CODE></FONT></TD>
|
<tr class="rowColor">
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)">transform</A></B>(byte[][] dstBufs,
|
<td class="colFirst"><code>void</code></td>
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)">transform</a></strong>(byte[][] dstBufs,
|
||||||
int flags)</CODE>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||||
|
int flags)</code>
|
||||||
<BR>
|
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||||
Losslessly transform the JPEG image associated with this transformer
|
|
||||||
instance into one or more JPEG images stored in the given destination
|
instance into one or more JPEG images stored in the given destination
|
||||||
buffers.</TD>
|
buffers.</div>
|
||||||
</TR>
|
</td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</tr>
|
||||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<tr class="altColor">
|
||||||
<CODE> <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>[]</CODE></FONT></TD>
|
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[]</code></td>
|
||||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">transform</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(org.libjpegturbo.turbojpeg.TJTransform[],%20int)">transform</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||||
int flags)</CODE>
|
int flags)</code>
|
||||||
|
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||||
<BR>
|
instance and return an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
||||||
Losslessly transform the JPEG image associated with this transformer
|
which has a transformed JPEG image associated with it.</div>
|
||||||
instance and return an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJDecompressor</CODE></A> instances, each of
|
</td>
|
||||||
which has a transformed JPEG image associated with it.</TD>
|
</tr>
|
||||||
</TR>
|
</table>
|
||||||
</TABLE>
|
<ul class="blockList">
|
||||||
<A NAME="methods_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor"><!-- --></A>
|
<li class="blockList"><a name="methods_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left"><B>Methods inherited from class org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TH>
|
<h3>Methods inherited from class org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></h3>
|
||||||
</TR>
|
<code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[],%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int[],%20int,%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int,%20int)">getScaledHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)">getScaledWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[],%20int)">setJPEGImage</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)">setSourceImage</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></code></li>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</ul>
|
||||||
<TD><CODE><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[], int, int, int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)">getScaledHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)">getScaledWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">setJPEGImage</A></CODE></TD>
|
<ul class="blockList">
|
||||||
</TR>
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||||
</TABLE>
|
<!-- -->
|
||||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
</a>
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<h3>Methods inherited from class java.lang.Object</h3>
|
||||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
<code>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||||
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
</ul>
|
||||||
</TR>
|
</li>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</ul>
|
||||||
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
</li>
|
||||||
</TR>
|
</ul>
|
||||||
</TABLE>
|
</div>
|
||||||
|
<div class="details">
|
||||||
<P>
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="constructor_detail"><!-- --></A>
|
<li class="blockList"><a name="constructor_detail">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
<h3>Constructor Detail</h3>
|
||||||
<B>Constructor Detail</B></FONT></TH>
|
<a name="TJTransformer()">
|
||||||
</TR>
|
<!-- -->
|
||||||
</TABLE>
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="TJTransformer()"><!-- --></A><H3>
|
<li class="blockList">
|
||||||
TJTransformer</H3>
|
<h4>TJTransformer</h4>
|
||||||
<PRE>
|
<pre>public TJTransformer()
|
||||||
public <B>TJTransformer</B>()
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
throws java.lang.Exception</PRE>
|
<div class="block">Create a TurboJPEG lossless transformer instance.</div>
|
||||||
<DL>
|
<dl><dt><span class="strong">Throws:</span></dt>
|
||||||
<DD>Create a TurboJPEG lossless transformer instance.
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
<P>
|
</li>
|
||||||
<DL>
|
</ul>
|
||||||
|
<a name="TJTransformer(byte[])">
|
||||||
<DT><B>Throws:</B>
|
<!-- -->
|
||||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
</a>
|
||||||
</DL>
|
<ul class="blockList">
|
||||||
<HR>
|
<li class="blockList">
|
||||||
|
<h4>TJTransformer</h4>
|
||||||
<A NAME="TJTransformer(byte[])"><!-- --></A><H3>
|
<pre>public TJTransformer(byte[] jpegImage)
|
||||||
TJTransformer</H3>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<PRE>
|
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||||
public <B>TJTransformer</B>(byte[] jpegImage)
|
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||||
throws java.lang.Exception</PRE>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer (size of the JPEG image is assumed to
|
||||||
<DL>
|
be the length of the array.) This buffer is not modified.</dd>
|
||||||
<DD>Create a TurboJPEG lossless transformer instance and associate the JPEG
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
image stored in <code>jpegImage</code> with the newly created instance.
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
<P>
|
</li>
|
||||||
<DL>
|
</ul>
|
||||||
<DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer (size of the JPEG image is assumed to
|
<a name="TJTransformer(byte[], int)">
|
||||||
be the length of the array)
|
<!-- -->
|
||||||
<DT><B>Throws:</B>
|
</a>
|
||||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
<ul class="blockListLast">
|
||||||
</DL>
|
<li class="blockList">
|
||||||
<HR>
|
<h4>TJTransformer</h4>
|
||||||
|
<pre>public TJTransformer(byte[] jpegImage,
|
||||||
<A NAME="TJTransformer(byte[], int)"><!-- --></A><H3>
|
|
||||||
TJTransformer</H3>
|
|
||||||
<PRE>
|
|
||||||
public <B>TJTransformer</B>(byte[] jpegImage,
|
|
||||||
int imageSize)
|
int imageSize)
|
||||||
throws java.lang.Exception</PRE>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<DL>
|
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||||
<DD>Create a TurboJPEG lossless transformer instance and associate the JPEG
|
|
||||||
image of length <code>imageSize</code> bytes stored in
|
image of length <code>imageSize</code> bytes stored in
|
||||||
<code>jpegImage</code> with the newly created instance.
|
<code>jpegImage</code> with the newly created instance.</div>
|
||||||
<P>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
||||||
<DL>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer<DD><CODE>imageSize</CODE> - size of the JPEG image (in bytes)
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
<DT><B>Throws:</B>
|
</li>
|
||||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
</ul>
|
||||||
</DL>
|
</li>
|
||||||
|
</ul>
|
||||||
<!-- ============ METHOD DETAIL ========== -->
|
<!-- ============ METHOD DETAIL ========== -->
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="method_detail"><!-- --></A>
|
<li class="blockList"><a name="method_detail">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<!-- -->
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</a>
|
||||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
<h3>Method Detail</h3>
|
||||||
<B>Method Detail</B></FONT></TH>
|
<a name="transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)">
|
||||||
</TR>
|
<!-- -->
|
||||||
</TABLE>
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
<A NAME="transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><!-- --></A><H3>
|
<li class="blockList">
|
||||||
transform</H3>
|
<h4>transform</h4>
|
||||||
<PRE>
|
<pre>public void transform(byte[][] dstBufs,
|
||||||
public void <B>transform</B>(byte[][] dstBufs,
|
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</PRE>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<DL>
|
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||||
<DD>Losslessly transform the JPEG image associated with this transformer
|
|
||||||
instance into one or more JPEG images stored in the given destination
|
instance into one or more JPEG images stored in the given destination
|
||||||
buffers. Lossless transforms work by moving the raw coefficients from one
|
buffers. Lossless transforms work by moving the raw coefficients from one
|
||||||
JPEG image structure to another without altering the values of the
|
JPEG image structure to another without altering the values of the
|
||||||
@@ -306,123 +300,118 @@ public void <B>transform</B>(byte[][] dstBufs,
|
|||||||
size of the destination image. Thus, this method provides a means of
|
size of the destination image. Thus, this method provides a means of
|
||||||
generating multiple transformed images from the same source or of applying
|
generating multiple transformed images from the same source or of applying
|
||||||
multiple transformations simultaneously, in order to eliminate the need to
|
multiple transformations simultaneously, in order to eliminate the need to
|
||||||
read the source coefficients multiple times.
|
read the source coefficients multiple times.</div>
|
||||||
<P>
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBufs</code> - an array of image buffers. <code>dstbufs[i]</code> will
|
||||||
<DD><DL>
|
|
||||||
<DT><B>Parameters:</B><DD><CODE>dstBufs</CODE> - an array of image buffers. <code>dstbufs[i]</code> will
|
|
||||||
receive a JPEG image that has been transformed using the parameters in
|
receive a JPEG image that has been transformed using the parameters in
|
||||||
<code>transforms[i]</code>. Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><CODE>TJ.bufSize(int, int, int)</CODE></A> to determine the
|
<code>transforms[i]</code>. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int,%20int,%20int)"><code>TJ.bufSize(int, int, int)</code></a> to determine the
|
||||||
maximum size for each buffer based on the transformed or cropped width and
|
maximum size for each buffer based on the transformed or cropped width and
|
||||||
height and the level of subsampling used in the source image.<DD><CODE>transforms</CODE> - an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instances, each of
|
height and the level of subsampling used in the source image.</dd><dd><code>transforms</code> - an array of <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instances, each of
|
||||||
which specifies the transform parameters and/or cropping region for the
|
which specifies the transform parameters and/or cropping region for the
|
||||||
corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of
|
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<DT><B>Throws:</B>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</DD>
|
</li>
|
||||||
</DL>
|
</ul>
|
||||||
<HR>
|
<a name="transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">
|
||||||
|
<!-- -->
|
||||||
<A NAME="transform(org.libjpegturbo.turbojpeg.TJTransform[], int)"><!-- --></A><H3>
|
</a>
|
||||||
transform</H3>
|
<ul class="blockList">
|
||||||
<PRE>
|
<li class="blockList">
|
||||||
public <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>[] <B>transform</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
<h4>transform</h4>
|
||||||
|
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[] transform(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||||
int flags)
|
int flags)
|
||||||
throws java.lang.Exception</PRE>
|
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||||
<DL>
|
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||||
<DD>Losslessly transform the JPEG image associated with this transformer
|
instance and return an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
||||||
instance and return an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJDecompressor</CODE></A> instances, each of
|
which has a transformed JPEG image associated with it.</div>
|
||||||
which has a transformed JPEG image associated with it.
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>transforms</code> - an array of <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instances, each of
|
||||||
<P>
|
|
||||||
<DD><DL>
|
|
||||||
<DT><B>Parameters:</B><DD><CODE>transforms</CODE> - an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instances, each of
|
|
||||||
which specifies the transform parameters and/or cropping region for the
|
which specifies the transform parameters and/or cropping region for the
|
||||||
corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of
|
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A>
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||||
<DT><B>Returns:</B><DD>an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJDecompressor</CODE></A> instances, each of
|
<dt><span class="strong">Returns:</span></dt><dd>an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
||||||
which has a transformed JPEG image associated with it
|
which has a transformed JPEG image associated with it.</dd>
|
||||||
<DT><B>Throws:</B>
|
<dt><span class="strong">Throws:</span></dt>
|
||||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||||
</DD>
|
</li>
|
||||||
</DL>
|
</ul>
|
||||||
<HR>
|
<a name="getTransformedSizes()">
|
||||||
|
<!-- -->
|
||||||
<A NAME="getTransformedSizes()"><!-- --></A><H3>
|
</a>
|
||||||
getTransformedSizes</H3>
|
<ul class="blockListLast">
|
||||||
<PRE>
|
<li class="blockList">
|
||||||
public int[] <B>getTransformedSizes</B>()
|
<h4>getTransformedSizes</h4>
|
||||||
throws java.lang.Exception</PRE>
|
<pre>public int[] getTransformedSizes()</pre>
|
||||||
<DL>
|
<div class="block">Returns an array containing the sizes of the transformed JPEG images
|
||||||
<DD>Returns an array containing the sizes of the transformed JPEG images
|
generated by the most recent transform operation.</div>
|
||||||
generated by the most recent transform operation.
|
<dl><dt><span class="strong">Returns:</span></dt><dd>an array containing the sizes of the transformed JPEG images
|
||||||
<P>
|
generated by the most recent transform operation.</dd></dl>
|
||||||
<DD><DL>
|
</li>
|
||||||
|
</ul>
|
||||||
<DT><B>Returns:</B><DD>an array containing the sizes of the transformed JPEG images
|
</li>
|
||||||
generated by the most recent transform operation
|
</ul>
|
||||||
<DT><B>Throws:</B>
|
</li>
|
||||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
</ul>
|
||||||
</DD>
|
</div>
|
||||||
</DL>
|
</div>
|
||||||
<!-- ========= END OF CLASS DATA ========= -->
|
<!-- ========= END OF CLASS DATA ========= -->
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
<A NAME="navbar_bottom"><!-- --></A>
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li class="navBarCell1Rev">Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="TJTransformer.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT CLASS</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="TJTransformer.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
<div>
|
||||||
</NOSCRIPT>
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
</FONT></TD>
|
<li><a href="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">Field</a> | </li>
|
||||||
</TR>
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||||
<TR>
|
<li><a href="#method_summary">Method</a></li>
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
</ul>
|
||||||
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
<ul class="subNavList">
|
||||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
<li>Detail: </li>
|
||||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
<li>Field | </li>
|
||||||
</TR>
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||||
</TABLE>
|
<li><a href="#method_detail">Method</a></li>
|
||||||
<A NAME="skip-navbar_bottom"></A>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_bottom">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
<HR>
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
761
java/doc/org/libjpegturbo/turbojpeg/YUVImage.html
Normal file
761
java/doc/org/libjpegturbo/turbojpeg/YUVImage.html
Normal file
@@ -0,0 +1,761 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<!-- NewPage -->
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>YUVImage</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
|
parent.document.title="YUVImage";
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<noscript>
|
||||||
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
|
<div class="topNav"><a name="navbar_top">
|
||||||
|
<!-- -->
|
||||||
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="navList" title="Navigation">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
|
<li class="navBarCell1Rev">Class</li>
|
||||||
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="subNav">
|
||||||
|
<ul class="navList">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
|
<li>Next Class</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList">
|
||||||
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/YUVImage.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="YUVImage.html" target="_top">No Frames</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
|
</ul>
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
|
if(window==top) {
|
||||||
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
|
<li><a href="#field_summary">Field</a> | </li>
|
||||||
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||||
|
<li><a href="#method_summary">Method</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Detail: </li>
|
||||||
|
<li><a href="#field_detail">Field</a> | </li>
|
||||||
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||||
|
<li><a href="#method_detail">Method</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_top">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
<!-- ======== START OF CLASS DATA ======== -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||||
|
<h2 title="Class YUVImage" class="title">Class YUVImage</h2>
|
||||||
|
</div>
|
||||||
|
<div class="contentContainer">
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>java.lang.Object</li>
|
||||||
|
<li>
|
||||||
|
<ul class="inheritance">
|
||||||
|
<li>org.libjpegturbo.turbojpeg.YUVImage</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="description">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<hr>
|
||||||
|
<br>
|
||||||
|
<pre>public class <span class="strong">YUVImage</span>
|
||||||
|
extends java.lang.Object</pre>
|
||||||
|
<div class="block">This class encapsulates a YUV planar image and the metadata
|
||||||
|
associated with it. The TurboJPEG API allows both the JPEG compression and
|
||||||
|
decompression pipelines to be split into stages: YUV encode, compress from
|
||||||
|
YUV, decompress to YUV, and YUV decode. A <code>YUVImage</code> instance
|
||||||
|
serves as the destination image for YUV encode and decompress-to-YUV
|
||||||
|
operations and as the source image for compress-from-YUV and YUV decode
|
||||||
|
operations.
|
||||||
|
<p>
|
||||||
|
Technically, the JPEG format uses the YCbCr colorspace (which technically is
|
||||||
|
not a "colorspace" but rather a "color transform"), but per the convention
|
||||||
|
of the digital video community, the TurboJPEG API uses "YUV" to refer to an
|
||||||
|
image format consisting of Y, Cb, and Cr image planes.
|
||||||
|
<p>
|
||||||
|
Each plane is simply a 2D array of bytes, each byte representing the value
|
||||||
|
of one of the components (Y, Cb, or Cr) at a particular location in the
|
||||||
|
image. The width and height of each plane are determined by the image
|
||||||
|
width, height, and level of chrominance subsampling. The luminance plane
|
||||||
|
width is the image width padded to the nearest multiple of the horizontal
|
||||||
|
subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of
|
||||||
|
4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane
|
||||||
|
height is the image height padded to the nearest multiple of the vertical
|
||||||
|
subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4
|
||||||
|
or grayscale.) The chrominance plane width is equal to the luminance plane
|
||||||
|
width divided by the horizontal subsampling factor, and the chrominance
|
||||||
|
plane height is equal to the luminance plane height divided by the vertical
|
||||||
|
subsampling factor.
|
||||||
|
<p>
|
||||||
|
For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
|
||||||
|
used, then the luminance plane would be 36 x 35 bytes, and each of the
|
||||||
|
chrominance planes would be 18 x 35 bytes. If you specify a line padding of
|
||||||
|
4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, and
|
||||||
|
each of the chrominance planes would be 20 x 35 bytes.</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="summary">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<!-- =========== FIELD SUMMARY =========== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="field_summary">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Field Summary</h3>
|
||||||
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
||||||
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
||||||
|
<tr>
|
||||||
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||||
|
<th class="colLast" scope="col">Field and Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>protected long</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#handle">handle</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvHeight">yuvHeight</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>protected int[]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvOffsets">yuvOffsets</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvPad">yuvPad</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>protected byte[][]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvPlanes">yuvPlanes</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>protected int[]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvStrides">yuvStrides</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvSubsamp">yuvSubsamp</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>protected int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvWidth">yuvWidth</a></strong></code> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="constructor_summary">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Constructor Summary</h3>
|
||||||
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||||
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||||
|
<tr>
|
||||||
|
<th class="colOne" scope="col">Constructor and Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[][],%20int[],%20int,%20int[],%20int,%20int)">YUVImage</a></strong>(byte[][] planes,
|
||||||
|
int[] offsets,
|
||||||
|
int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image
|
||||||
|
planes.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[],%20int,%20int,%20int,%20int)">YUVImage</a></strong>(byte[] yuvImage,
|
||||||
|
int width,
|
||||||
|
int pad,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
||||||
|
buffer.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int[],%20int,%20int)">YUVImage</a></strong>(int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
||||||
|
planes, and allocate memory for the image planes.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int,%20int,%20int)">YUVImage</a></strong>(int width,
|
||||||
|
int pad,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
||||||
|
buffer, and allocate memory for the image buffer.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- ========== METHOD SUMMARY =========== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="method_summary">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Method Summary</h3>
|
||||||
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||||
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||||
|
<tr>
|
||||||
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||||
|
<th class="colLast" scope="col">Method and Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>byte[]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getBuf()">getBuf</a></strong>()</code>
|
||||||
|
<div class="block">Returns the YUV image buffer (if this image is stored in a unified
|
||||||
|
buffer rather than separate image planes.)</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getHeight()">getHeight</a></strong>()</code>
|
||||||
|
<div class="block">Returns the height of the YUV image (or subregion.)</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>int[]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getOffsets()">getOffsets</a></strong>()</code>
|
||||||
|
<div class="block">Returns the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
YUV image.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getPad()">getPad</a></strong>()</code>
|
||||||
|
<div class="block">Returns the line padding used in the YUV image buffer (if this image is
|
||||||
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>byte[][]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getPlanes()">getPlanes</a></strong>()</code>
|
||||||
|
<div class="block">Returns the YUV image planes.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSize()">getSize</a></strong>()</code>
|
||||||
|
<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||||
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>int[]</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getStrides()">getStrides</a></strong>()</code>
|
||||||
|
<div class="block">Returns the number of bytes per line of each plane in the YUV image.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSubsamp()">getSubsamp</a></strong>()</code>
|
||||||
|
<div class="block">Returns the level of chrominance subsampling used in the YUV image.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>int</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getWidth()">getWidth</a></strong>()</code>
|
||||||
|
<div class="block">Returns the width of the YUV image (or subregion.)</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><code>void</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[][],%20int[],%20int,%20int[],%20int,%20int)">setBuf</a></strong>(byte[][] planes,
|
||||||
|
int[] offsets,
|
||||||
|
int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><code>void</code></td>
|
||||||
|
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[],%20int,%20int,%20int,%20int)">setBuf</a></strong>(byte[] yuvImage,
|
||||||
|
int width,
|
||||||
|
int pad,
|
||||||
|
int height,
|
||||||
|
int subsamp)</code>
|
||||||
|
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Methods inherited from class java.lang.Object</h3>
|
||||||
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="details">
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<!-- ============ FIELD DETAIL =========== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="field_detail">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Field Detail</h3>
|
||||||
|
<a name="handle">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>handle</h4>
|
||||||
|
<pre>protected long handle</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="yuvPlanes">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>yuvPlanes</h4>
|
||||||
|
<pre>protected byte[][] yuvPlanes</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="yuvOffsets">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>yuvOffsets</h4>
|
||||||
|
<pre>protected int[] yuvOffsets</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="yuvStrides">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>yuvStrides</h4>
|
||||||
|
<pre>protected int[] yuvStrides</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="yuvPad">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>yuvPad</h4>
|
||||||
|
<pre>protected int yuvPad</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="yuvWidth">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>yuvWidth</h4>
|
||||||
|
<pre>protected int yuvWidth</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="yuvHeight">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>yuvHeight</h4>
|
||||||
|
<pre>protected int yuvHeight</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="yuvSubsamp">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockListLast">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>yuvSubsamp</h4>
|
||||||
|
<pre>protected int yuvSubsamp</pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="constructor_detail">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Constructor Detail</h3>
|
||||||
|
<a name="YUVImage(int, int[], int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>YUVImage</h4>
|
||||||
|
<pre>public YUVImage(int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)</pre>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
||||||
|
planes, and allocate memory for the image planes.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||||
|
per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the
|
||||||
|
strides for all planes will be set to their respective plane widths. When
|
||||||
|
using this constructor, the stride for each plane must be equal to or
|
||||||
|
greater than the plane width.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
||||||
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="YUVImage(int, int, int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>YUVImage</h4>
|
||||||
|
<pre>public YUVImage(int width,
|
||||||
|
int pad,
|
||||||
|
int height,
|
||||||
|
int subsamp)</pre>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
||||||
|
buffer, and allocate memory for the image buffer.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - Each line of each plane in the YUV image buffer will be padded
|
||||||
|
to this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
||||||
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="YUVImage(byte[][], int[], int, int[], int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>YUVImage</h4>
|
||||||
|
<pre>public YUVImage(byte[][] planes,
|
||||||
|
int[] offsets,
|
||||||
|
int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)</pre>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image
|
||||||
|
planes.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||||
|
image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
|
planes can be contiguous or non-contiguous in memory. Plane
|
||||||
|
<code>i</code> should be at least <code>offsets[i] +
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)"><code>TJ.planeSizeYUV</code></a>(i, width, strides[i], height, subsamp)</code>
|
||||||
|
bytes in size.</dd><dd><code>offsets</code> - If this <code>YUVImage</code> instance represents a
|
||||||
|
subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||||
|
offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||||
|
larger image. Setting this to null is the same as setting the offsets for
|
||||||
|
all planes to 0.</dd><dd><code>width</code> - width (in pixels) of the new YUV image (or subregion)</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||||
|
per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the
|
||||||
|
strides for all planes will be set to their respective plane widths. You
|
||||||
|
can adjust the strides in order to add an arbitrary amount of line padding
|
||||||
|
to each plane or to specify that this <code>YUVImage</code> instance is a
|
||||||
|
subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||||
|
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the new YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||||
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="YUVImage(byte[], int, int, int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockListLast">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>YUVImage</h4>
|
||||||
|
<pre>public YUVImage(byte[] yuvImage,
|
||||||
|
int width,
|
||||||
|
int pad,
|
||||||
|
int height,
|
||||||
|
int subsamp)</pre>
|
||||||
|
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
||||||
|
buffer.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
||||||
|
image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
|
||||||
|
this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
||||||
|
sequentially in the buffer (see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description
|
||||||
|
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
||||||
|
instance, if each line in each plane of the buffer is padded to the
|
||||||
|
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||||
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- ============ METHOD DETAIL ========== -->
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="method_detail">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<h3>Method Detail</h3>
|
||||||
|
<a name="setBuf(byte[][], int[], int, int[], int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>setBuf</h4>
|
||||||
|
<pre>public void setBuf(byte[][] planes,
|
||||||
|
int[] offsets,
|
||||||
|
int width,
|
||||||
|
int[] strides,
|
||||||
|
int height,
|
||||||
|
int subsamp)</pre>
|
||||||
|
<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||||
|
image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
|
planes can be contiguous or non-contiguous in memory. Plane
|
||||||
|
<code>i</code> should be at least <code>offsets[i] +
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)"><code>TJ.planeSizeYUV</code></a>(i, width, strides[i], height, subsamp)</code>
|
||||||
|
bytes in size.</dd><dd><code>offsets</code> - If this <code>YUVImage</code> instance represents a
|
||||||
|
subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||||
|
offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||||
|
larger image. Setting this to null is the same as setting the offsets for
|
||||||
|
all planes to 0.</dd><dd><code>width</code> - width (in pixels) of the YUV image (or subregion)</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||||
|
per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the
|
||||||
|
strides for all planes will be set to their respective plane widths. You
|
||||||
|
can adjust the strides in order to add an arbitrary amount of line padding
|
||||||
|
to each plane or to specify that this <code>YUVImage</code> image is a
|
||||||
|
subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||||
|
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||||
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="setBuf(byte[], int, int, int, int)">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>setBuf</h4>
|
||||||
|
<pre>public void setBuf(byte[] yuvImage,
|
||||||
|
int width,
|
||||||
|
int pad,
|
||||||
|
int height,
|
||||||
|
int subsamp)</pre>
|
||||||
|
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
||||||
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
||||||
|
image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
|
||||||
|
this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
||||||
|
sequentially in the buffer (see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description
|
||||||
|
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
||||||
|
instance, if each line in each plane of the buffer is padded to the
|
||||||
|
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||||
|
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="getWidth()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getWidth</h4>
|
||||||
|
<pre>public int getWidth()</pre>
|
||||||
|
<div class="block">Returns the width of the YUV image (or subregion.)</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the width of the YUV image (or subregion)</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="getHeight()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getHeight</h4>
|
||||||
|
<pre>public int getHeight()</pre>
|
||||||
|
<div class="block">Returns the height of the YUV image (or subregion.)</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the height of the YUV image (or subregion)</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="getPad()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getPad</h4>
|
||||||
|
<pre>public int getPad()</pre>
|
||||||
|
<div class="block">Returns the line padding used in the YUV image buffer (if this image is
|
||||||
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the line padding used in the YUV image buffer</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="getStrides()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getStrides</h4>
|
||||||
|
<pre>public int[] getStrides()</pre>
|
||||||
|
<div class="block">Returns the number of bytes per line of each plane in the YUV image.</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the number of bytes per line of each plane in the YUV image</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="getOffsets()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getOffsets</h4>
|
||||||
|
<pre>public int[] getOffsets()</pre>
|
||||||
|
<div class="block">Returns the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
YUV image.</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
YUV image</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="getSubsamp()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getSubsamp</h4>
|
||||||
|
<pre>public int getSubsamp()</pre>
|
||||||
|
<div class="block">Returns the level of chrominance subsampling used in the YUV image. See
|
||||||
|
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>.</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the level of chrominance subsampling used in the YUV image</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="getPlanes()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getPlanes</h4>
|
||||||
|
<pre>public byte[][] getPlanes()</pre>
|
||||||
|
<div class="block">Returns the YUV image planes. If the image is stored in a unified buffer,
|
||||||
|
then all image planes will point to that buffer.</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image planes</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="getBuf()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getBuf</h4>
|
||||||
|
<pre>public byte[] getBuf()</pre>
|
||||||
|
<div class="block">Returns the YUV image buffer (if this image is stored in a unified
|
||||||
|
buffer rather than separate image planes.)</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image buffer</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<a name="getSize()">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="blockListLast">
|
||||||
|
<li class="blockList">
|
||||||
|
<h4>getSize</h4>
|
||||||
|
<pre>public int getSize()</pre>
|
||||||
|
<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||||
|
stored in a unified buffer rather than separate image planes.)</div>
|
||||||
|
<dl><dt><span class="strong">Returns:</span></dt><dd>the size (in bytes) of the YUV image buffer</dd></dl>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ========= END OF CLASS DATA ========= -->
|
||||||
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
|
<!-- -->
|
||||||
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
|
<!-- -->
|
||||||
|
</a>
|
||||||
|
<ul class="navList" title="Navigation">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
|
<li class="navBarCell1Rev">Class</li>
|
||||||
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="subNav">
|
||||||
|
<ul class="navList">
|
||||||
|
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||||
|
<li>Next Class</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList">
|
||||||
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/YUVImage.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="YUVImage.html" target="_top">No Frames</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
|
</ul>
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
|
if(window==top) {
|
||||||
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Summary: </li>
|
||||||
|
<li>Nested | </li>
|
||||||
|
<li><a href="#field_summary">Field</a> | </li>
|
||||||
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||||
|
<li><a href="#method_summary">Method</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul class="subNavList">
|
||||||
|
<li>Detail: </li>
|
||||||
|
<li><a href="#field_detail">Field</a> | </li>
|
||||||
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||||
|
<li><a href="#method_detail">Method</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a name="skip-navbar_bottom">
|
||||||
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,51 +1,31 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>org.libjpegturbo.turbojpeg</title>
|
||||||
org.libjpegturbo.turbojpeg
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1 class="bar"><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html" target="classFrame">org.libjpegturbo.turbojpeg</a></h1>
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
<div class="indexContainer">
|
||||||
|
<h2 title="Interfaces">Interfaces</h2>
|
||||||
|
<ul title="Interfaces">
|
||||||
</HEAD>
|
<li><a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><i>TJCustomFilter</i></a></li>
|
||||||
|
</ul>
|
||||||
<BODY BGCOLOR="white">
|
<h2 title="Classes">Classes</h2>
|
||||||
<FONT size="+1" CLASS="FrameTitleFont">
|
<ul title="Classes">
|
||||||
<A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html" target="classFrame">org.libjpegturbo.turbojpeg</A></FONT>
|
<li><a href="TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</a></li>
|
||||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
<li><a href="TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</a></li>
|
||||||
<TR>
|
<li><a href="TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</a></li>
|
||||||
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
|
<li><a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</a></li>
|
||||||
Interfaces</FONT>
|
<li><a href="TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</a></li>
|
||||||
<FONT CLASS="FrameItemFont">
|
<li><a href="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</a></li>
|
||||||
<BR>
|
<li><a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">YUVImage</a></li>
|
||||||
<A HREF="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><I>TJCustomFilter</I></A></FONT></TD>
|
</ul>
|
||||||
</TR>
|
<h2 title="Exceptions">Exceptions</h2>
|
||||||
</TABLE>
|
<ul title="Exceptions">
|
||||||
|
<li><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJException</a></li>
|
||||||
|
</ul>
|
||||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
</div>
|
||||||
<TR>
|
</body>
|
||||||
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
|
</html>
|
||||||
Classes</FONT>
|
|
||||||
<FONT CLASS="FrameItemFont">
|
|
||||||
<BR>
|
|
||||||
<A HREF="TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</A>
|
|
||||||
<BR>
|
|
||||||
<A HREF="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</A></FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
@@ -1,185 +1,198 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>org.libjpegturbo.turbojpeg</title>
|
||||||
org.libjpegturbo.turbojpeg
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
||||||
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
if (location.href.indexOf('is-external=true') == -1) {
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
parent.document.title="org.libjpegturbo.turbojpeg";
|
parent.document.title="org.libjpegturbo.turbojpeg";
|
||||||
}
|
}
|
||||||
}
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
<noscript>
|
||||||
</NOSCRIPT>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
<A NAME="navbar_top"><!-- --></A>
|
<div class="topNav"><a name="navbar_top">
|
||||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev Package</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next Package</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="package-summary.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
PREV PACKAGE
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT PACKAGE</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_top">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_top"></A>
|
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
<div class="header">
|
||||||
<HR>
|
<h1 title="Package" class="title">Package org.libjpegturbo.turbojpeg</h1>
|
||||||
<H2>
|
</div>
|
||||||
Package org.libjpegturbo.turbojpeg
|
<div class="contentContainer">
|
||||||
</H2>
|
<ul class="blockList">
|
||||||
|
<li class="blockList">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation">
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
<caption><span>Interface Summary</span><span class="tabEnd"> </span></caption>
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
<tr>
|
||||||
<B>Interface Summary</B></FONT></TH>
|
<th class="colFirst" scope="col">Interface</th>
|
||||||
</TR>
|
<th class="colLast" scope="col">Description</th>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</tr>
|
||||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</A></B></TD>
|
<tbody>
|
||||||
<TD>Custom filter callback interface</TD>
|
<tr class="altColor">
|
||||||
</TR>
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a></td>
|
||||||
</TABLE>
|
<td class="colLast">
|
||||||
|
<div class="block">Custom filter callback interface</div>
|
||||||
|
</td>
|
||||||
<P>
|
</tr>
|
||||||
|
</tbody>
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
</table>
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
</li>
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
<li class="blockList">
|
||||||
<B>Class Summary</B></FONT></TH>
|
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
|
||||||
</TR>
|
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tr>
|
||||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A></B></TD>
|
<th class="colFirst" scope="col">Class</th>
|
||||||
<TD>TurboJPEG utility class (cannot be instantiated)</TD>
|
<th class="colLast" scope="col">Description</th>
|
||||||
</TR>
|
</tr>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<tbody>
|
||||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</A></B></TD>
|
<tr class="altColor">
|
||||||
<TD>TurboJPEG compressor</TD>
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></td>
|
||||||
</TR>
|
<td class="colLast">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<div class="block">TurboJPEG utility class (cannot be instantiated)</div>
|
||||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TD>
|
</td>
|
||||||
<TD>TurboJPEG decompressor</TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></td>
|
||||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A></B></TD>
|
<td class="colLast">
|
||||||
<TD>Fractional scaling factor</TD>
|
<div class="block">TurboJPEG compressor</div>
|
||||||
</TR>
|
</td>
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
</tr>
|
||||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A></B></TD>
|
<tr class="altColor">
|
||||||
<TD>Lossless transform parameters</TD>
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></td>
|
||||||
</TR>
|
<td class="colLast">
|
||||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<div class="block">TurboJPEG decompressor</div>
|
||||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A></B></TD>
|
</td>
|
||||||
<TD>TurboJPEG lossless transformer</TD>
|
</tr>
|
||||||
</TR>
|
<tr class="rowColor">
|
||||||
</TABLE>
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></td>
|
||||||
|
<td class="colLast">
|
||||||
|
<div class="block">Fractional scaling factor</div>
|
||||||
<P>
|
</td>
|
||||||
<DL>
|
</tr>
|
||||||
</DL>
|
<tr class="altColor">
|
||||||
<HR>
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></td>
|
||||||
|
<td class="colLast">
|
||||||
|
<div class="block">Lossless transform parameters</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="rowColor">
|
||||||
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></td>
|
||||||
|
<td class="colLast">
|
||||||
|
<div class="block">TurboJPEG lossless transformer</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></td>
|
||||||
|
<td class="colLast">
|
||||||
|
<div class="block">This class encapsulates a YUV planar image and the metadata
|
||||||
|
associated with it.</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
<li class="blockList">
|
||||||
|
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Exception Summary table, listing exceptions, and an explanation">
|
||||||
|
<caption><span>Exception Summary</span><span class="tabEnd"> </span></caption>
|
||||||
|
<tr>
|
||||||
|
<th class="colFirst" scope="col">Exception</th>
|
||||||
|
<th class="colLast" scope="col">Description</th>
|
||||||
|
</tr>
|
||||||
|
<tbody>
|
||||||
|
<tr class="altColor">
|
||||||
|
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></td>
|
||||||
|
<td class="colLast"> </td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
<A NAME="navbar_bottom"><!-- --></A>
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev Package</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next Package</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="package-summary.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
PREV PACKAGE
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT PACKAGE</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_bottom">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_bottom"></A>
|
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
<HR>
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
@@ -1,159 +1,156 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>org.libjpegturbo.turbojpeg Class Hierarchy</title>
|
||||||
org.libjpegturbo.turbojpeg Class Hierarchy
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
||||||
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
if (location.href.indexOf('is-external=true') == -1) {
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
parent.document.title="org.libjpegturbo.turbojpeg Class Hierarchy";
|
parent.document.title="org.libjpegturbo.turbojpeg Class Hierarchy";
|
||||||
}
|
}
|
||||||
}
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
<noscript>
|
||||||
</NOSCRIPT>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
<A NAME="navbar_top"><!-- --></A>
|
<div class="topNav"><a name="navbar_top">
|
||||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li class="navBarCell1Rev">Tree</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="package-tree.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
PREV
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_top">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_top"></A>
|
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
<div class="header">
|
||||||
<HR>
|
<h1 class="title">Hierarchy For Package org.libjpegturbo.turbojpeg</h1>
|
||||||
<CENTER>
|
</div>
|
||||||
<H2>
|
<div class="contentContainer">
|
||||||
Hierarchy For Package org.libjpegturbo.turbojpeg
|
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||||
</H2>
|
<ul>
|
||||||
</CENTER>
|
<li type="circle">java.lang.Object
|
||||||
<H2>
|
<ul>
|
||||||
Class Hierarchy
|
<li type="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
||||||
</H2>
|
<ul>
|
||||||
<UL>
|
<li type="circle">java.awt.geom.Rectangle2D
|
||||||
<LI TYPE="circle">java.lang.Object<UL>
|
<ul>
|
||||||
<LI TYPE="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
<li type="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
||||||
<UL>
|
<ul>
|
||||||
<LI TYPE="circle">java.awt.geom.Rectangle2D<UL>
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransform</span></a></li>
|
||||||
<LI TYPE="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
</ul>
|
||||||
<UL>
|
</li>
|
||||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransform</B></A></UL>
|
</ul>
|
||||||
</UL>
|
</li>
|
||||||
</UL>
|
</ul>
|
||||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><B>TJ</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJCompressor</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJDecompressor</B></A><UL>
|
</li>
|
||||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransformer</B></A></UL>
|
<li type="circle">java.lang.Throwable (implements java.io.Serializable)
|
||||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJScalingFactor</B></A></UL>
|
<ul>
|
||||||
</UL>
|
<li type="circle">java.lang.Exception
|
||||||
<H2>
|
<ul>
|
||||||
Interface Hierarchy
|
<li type="circle">java.io.IOException
|
||||||
</H2>
|
<ul>
|
||||||
<UL>
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJException</span></a></li>
|
||||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><B>TJCustomFilter</B></A></UL>
|
</ul>
|
||||||
<HR>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJ</span></a></li>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJCompressor</span></a> (implements java.io.Closeable)</li>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJDecompressor</span></a> (implements java.io.Closeable)
|
||||||
|
<ul>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransformer</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJScalingFactor</span></a></li>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">YUVImage</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
|
||||||
|
<ul>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">TJCustomFilter</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
<A NAME="navbar_bottom"><!-- --></A>
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li class="navBarCell1Rev">Tree</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
<li><a href="../../../index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="../../../help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="package-tree.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
PREV
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_bottom">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_bottom"></A>
|
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
<HR>
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
@@ -1,161 +1,160 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>Class Hierarchy</title>
|
||||||
Class Hierarchy
|
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
|
||||||
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
if (location.href.indexOf('is-external=true') == -1) {
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
parent.document.title="Class Hierarchy";
|
parent.document.title="Class Hierarchy";
|
||||||
}
|
}
|
||||||
}
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
<noscript>
|
||||||
</NOSCRIPT>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
<A NAME="navbar_top"><!-- --></A>
|
<div class="topNav"><a name="navbar_top">
|
||||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li class="navBarCell1Rev">Tree</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
<li><a href="index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="overview-tree.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
PREV
|
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="index.html?overview-tree.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="overview-tree.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_top">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_top"></A>
|
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
<div class="header">
|
||||||
<HR>
|
<h1 class="title">Hierarchy For All Packages</h1>
|
||||||
<CENTER>
|
<span class="strong">Package Hierarchies:</span>
|
||||||
<H2>
|
<ul class="horizontal">
|
||||||
Hierarchy For All Packages</H2>
|
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">org.libjpegturbo.turbojpeg</a></li>
|
||||||
</CENTER>
|
</ul>
|
||||||
<DL>
|
</div>
|
||||||
<DT><B>Package Hierarchies:</B><DD><A HREF="org/libjpegturbo/turbojpeg/package-tree.html">org.libjpegturbo.turbojpeg</A></DL>
|
<div class="contentContainer">
|
||||||
<HR>
|
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||||
<H2>
|
<ul>
|
||||||
Class Hierarchy
|
<li type="circle">java.lang.Object
|
||||||
</H2>
|
<ul>
|
||||||
<UL>
|
<li type="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
||||||
<LI TYPE="circle">java.lang.Object<UL>
|
<ul>
|
||||||
<LI TYPE="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
<li type="circle">java.awt.geom.Rectangle2D
|
||||||
<UL>
|
<ul>
|
||||||
<LI TYPE="circle">java.awt.geom.Rectangle2D<UL>
|
<li type="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
||||||
<LI TYPE="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
<ul>
|
||||||
<UL>
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransform</span></a></li>
|
||||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransform</B></A></UL>
|
</ul>
|
||||||
</UL>
|
</li>
|
||||||
</UL>
|
</ul>
|
||||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><B>TJ</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJCompressor</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJDecompressor</B></A><UL>
|
</li>
|
||||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransformer</B></A></UL>
|
</ul>
|
||||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJScalingFactor</B></A></UL>
|
</li>
|
||||||
</UL>
|
<li type="circle">java.lang.Throwable (implements java.io.Serializable)
|
||||||
<H2>
|
<ul>
|
||||||
Interface Hierarchy
|
<li type="circle">java.lang.Exception
|
||||||
</H2>
|
<ul>
|
||||||
<UL>
|
<li type="circle">java.io.IOException
|
||||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><B>TJCustomFilter</B></A></UL>
|
<ul>
|
||||||
<HR>
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJException</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJ</span></a></li>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJCompressor</span></a> (implements java.io.Closeable)</li>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJDecompressor</span></a> (implements java.io.Closeable)
|
||||||
|
<ul>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransformer</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJScalingFactor</span></a></li>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">YUVImage</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
|
||||||
|
<ul>
|
||||||
|
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">TJCustomFilter</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
<A NAME="navbar_bottom"><!-- --></A>
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li class="navBarCell1Rev">Tree</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
<li><a href="index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="overview-tree.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
PREV
|
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="index.html?overview-tree.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="overview-tree.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_bottom">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_bottom"></A>
|
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
<HR>
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
BIN
java/doc/resources/background.gif
Normal file
BIN
java/doc/resources/background.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 57 B |
BIN
java/doc/resources/tab.gif
Normal file
BIN
java/doc/resources/tab.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 291 B |
BIN
java/doc/resources/titlebar.gif
Normal file
BIN
java/doc/resources/titlebar.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
java/doc/resources/titlebar_end.gif
Normal file
BIN
java/doc/resources/titlebar_end.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 849 B |
@@ -1,200 +1,159 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!-- NewPage -->
|
<!-- NewPage -->
|
||||||
<HTML>
|
<html lang="en">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>
|
<title>Serialized Form</title>
|
||||||
Serialized Form
|
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||||
</TITLE>
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
|
||||||
|
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
function windowTitle()
|
|
||||||
{
|
|
||||||
if (location.href.indexOf('is-external=true') == -1) {
|
if (location.href.indexOf('is-external=true') == -1) {
|
||||||
parent.document.title="Serialized Form";
|
parent.document.title="Serialized Form";
|
||||||
}
|
}
|
||||||
}
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
<noscript>
|
||||||
</NOSCRIPT>
|
<div>JavaScript is disabled on your browser.</div>
|
||||||
|
</noscript>
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||||
<A NAME="navbar_top"><!-- --></A>
|
<div class="topNav"><a name="navbar_top">
|
||||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="serialized-form.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_top">
|
||||||
PREV
|
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="index.html?serialized-form.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="serialized-form.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_top">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_top"></A>
|
|
||||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||||
|
<div class="header">
|
||||||
<HR>
|
<h1 title="Serialized Form" class="title">Serialized Form</h1>
|
||||||
<CENTER>
|
</div>
|
||||||
<H1>
|
<div class="serializedFormContainer">
|
||||||
Serialized Form</H1>
|
<ul class="blockList">
|
||||||
</CENTER>
|
<li class="blockList">
|
||||||
<HR SIZE="4" NOSHADE>
|
<h2 title="Package">Package org.libjpegturbo.turbojpeg</h2>
|
||||||
|
<ul class="blockList">
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<li class="blockList"><a name="org.libjpegturbo.turbojpeg.TJException">
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
|
<!-- -->
|
||||||
<TH ALIGN="center"><FONT SIZE="+2">
|
</a>
|
||||||
<B>Package</B> <B>org.libjpegturbo.turbojpeg</B></FONT></TH>
|
<h3>Class <a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJException</a> extends java.io.IOException implements Serializable</h3>
|
||||||
</TR>
|
<dl class="nameValue">
|
||||||
</TABLE>
|
<dt>serialVersionUID:</dt>
|
||||||
|
<dd>1L</dd>
|
||||||
<P>
|
</dl>
|
||||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform"><!-- --></A>
|
</li>
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<li class="blockList"><a name="org.libjpegturbo.turbojpeg.TJTransform">
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
|
<!-- -->
|
||||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
</a>
|
||||||
<B>Class <A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJTransform</A> extends java.awt.Rectangle implements Serializable</B></FONT></TH>
|
<h3>Class <a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJTransform</a> extends java.awt.Rectangle implements Serializable</h3>
|
||||||
</TR>
|
<dl class="nameValue">
|
||||||
</TABLE>
|
<dt>serialVersionUID:</dt>
|
||||||
|
<dd>-127367705761430371L</dd>
|
||||||
<P>
|
</dl>
|
||||||
<B>serialVersionUID: </B>-127367705761430371L
|
<ul class="blockList">
|
||||||
|
<li class="blockList"><a name="serializedForm">
|
||||||
<P>
|
<!-- -->
|
||||||
<A NAME="serializedForm"><!-- --></A>
|
</a>
|
||||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
<h3>Serialized Fields</h3>
|
||||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
<ul class="blockList">
|
||||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
<li class="blockList">
|
||||||
<B>Serialized Fields</B></FONT></TH>
|
<h4>op</h4>
|
||||||
</TR>
|
<pre>int op</pre>
|
||||||
</TABLE>
|
<div class="block">Transform operation (one of <code>OP_*</code>)</div>
|
||||||
|
</li>
|
||||||
<H3>
|
<li class="blockList">
|
||||||
op</H3>
|
<h4>options</h4>
|
||||||
<PRE>
|
<pre>int options</pre>
|
||||||
int <B>op</B></PRE>
|
<div class="block">Transform options (bitwise OR of one or more of <code>OPT_*</code>)</div>
|
||||||
<DL>
|
</li>
|
||||||
<DD>Transform operation (one of <code>OP_*</code>)
|
<li class="blockListLast">
|
||||||
<P>
|
<h4>cf</h4>
|
||||||
<DL>
|
<pre><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf</pre>
|
||||||
</DL>
|
<div class="block">Custom filter instance</div>
|
||||||
</DL>
|
</li>
|
||||||
<HR>
|
</ul>
|
||||||
<H3>
|
</li>
|
||||||
options</H3>
|
</ul>
|
||||||
<PRE>
|
</li>
|
||||||
int <B>options</B></PRE>
|
</ul>
|
||||||
<DL>
|
</li>
|
||||||
<DD>Transform options (bitwise OR of one or more of <code>OPT_*</code>)
|
</ul>
|
||||||
<P>
|
</div>
|
||||||
<DL>
|
|
||||||
</DL>
|
|
||||||
</DL>
|
|
||||||
<HR>
|
|
||||||
<H3>
|
|
||||||
cf</H3>
|
|
||||||
<PRE>
|
|
||||||
<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</A> <B>cf</B></PRE>
|
|
||||||
<DL>
|
|
||||||
<DD>Custom filter instance
|
|
||||||
<P>
|
|
||||||
<DL>
|
|
||||||
</DL>
|
|
||||||
</DL>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<HR>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||||
<A NAME="navbar_bottom"><!-- --></A>
|
<div class="bottomNav"><a name="navbar_bottom">
|
||||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
<!-- -->
|
||||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||||
<TR>
|
<!-- -->
|
||||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
</a>
|
||||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
<ul class="navList" title="Navigation">
|
||||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||||
<TR ALIGN="center" VALIGN="top">
|
<li>Class</li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
<li><a href="index-all.html">Index</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
<li><a href="help-doc.html">Help</a></li>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
</ul>
|
||||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
</div>
|
||||||
</TR>
|
<div class="subNav">
|
||||||
</TABLE>
|
<ul class="navList">
|
||||||
</TD>
|
<li>Prev</li>
|
||||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
<li>Next</li>
|
||||||
</EM>
|
</ul>
|
||||||
</TD>
|
<ul class="navList">
|
||||||
</TR>
|
<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li>
|
||||||
|
<li><a href="serialized-form.html" target="_top">No Frames</a></li>
|
||||||
<TR>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<ul class="navList" id="allclasses_navbar_bottom">
|
||||||
PREV
|
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||||
NEXT</FONT></TD>
|
</ul>
|
||||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
<div>
|
||||||
<A HREF="index.html?serialized-form.html" target="_top"><B>FRAMES</B></A>
|
<script type="text/javascript"><!--
|
||||||
<A HREF="serialized-form.html" target="_top"><B>NO FRAMES</B></A>
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||||
<SCRIPT type="text/javascript">
|
|
||||||
<!--
|
|
||||||
if(window==top) {
|
if(window==top) {
|
||||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
allClassesLink.style.display = "block";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allClassesLink.style.display = "none";
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</script>
|
||||||
<NOSCRIPT>
|
</div>
|
||||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
<a name="skip-navbar_bottom">
|
||||||
</NOSCRIPT>
|
<!-- -->
|
||||||
|
</a></div>
|
||||||
|
|
||||||
</FONT></TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
<A NAME="skip-navbar_bottom"></A>
|
|
||||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||||
|
</body>
|
||||||
<HR>
|
</html>
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|||||||
@@ -1,29 +1,474 @@
|
|||||||
/* Javadoc style sheet */
|
/* Javadoc style sheet */
|
||||||
|
/*
|
||||||
/* Define colors, fonts and other style attributes here to override the defaults */
|
Overall document style
|
||||||
|
*/
|
||||||
/* Page background color */
|
body {
|
||||||
body { background-color: #FFFFFF; color:#000000 }
|
background-color:#ffffff;
|
||||||
|
color:#353833;
|
||||||
/* Headings */
|
font-family:Arial, Helvetica, sans-serif;
|
||||||
h1 { font-size: 145% }
|
font-size:76%;
|
||||||
|
margin:0;
|
||||||
/* Table colors */
|
}
|
||||||
.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */
|
a:link, a:visited {
|
||||||
.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */
|
text-decoration:none;
|
||||||
.TableRowColor { background: #FFFFFF; color:#000000 } /* White */
|
color:#4c6b87;
|
||||||
|
}
|
||||||
/* Font used in left-hand frame lists */
|
a:hover, a:focus {
|
||||||
.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
|
text-decoration:none;
|
||||||
.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
|
color:#bb7a2a;
|
||||||
.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
|
}
|
||||||
|
a:active {
|
||||||
/* Navigation bar fonts and colors */
|
text-decoration:none;
|
||||||
.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */
|
color:#4c6b87;
|
||||||
.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */
|
}
|
||||||
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;}
|
a[name] {
|
||||||
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;}
|
color:#353833;
|
||||||
|
}
|
||||||
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
|
a[name]:hover {
|
||||||
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
|
text-decoration:none;
|
||||||
|
color:#353833;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
font-size:1.3em;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size:1.8em;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
font-size:1.5em;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
font-size:1.4em;
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
font-size:1.3em;
|
||||||
|
}
|
||||||
|
h5 {
|
||||||
|
font-size:1.2em;
|
||||||
|
}
|
||||||
|
h6 {
|
||||||
|
font-size:1.1em;
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
list-style-type:disc;
|
||||||
|
}
|
||||||
|
code, tt {
|
||||||
|
font-size:1.2em;
|
||||||
|
}
|
||||||
|
dt code {
|
||||||
|
font-size:1.2em;
|
||||||
|
}
|
||||||
|
table tr td dt code {
|
||||||
|
font-size:1.2em;
|
||||||
|
vertical-align:top;
|
||||||
|
}
|
||||||
|
sup {
|
||||||
|
font-size:.6em;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Document title and Copyright styles
|
||||||
|
*/
|
||||||
|
.clear {
|
||||||
|
clear:both;
|
||||||
|
height:0px;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
.aboutLanguage {
|
||||||
|
float:right;
|
||||||
|
padding:0px 21px;
|
||||||
|
font-size:.8em;
|
||||||
|
z-index:200;
|
||||||
|
margin-top:-7px;
|
||||||
|
}
|
||||||
|
.legalCopy {
|
||||||
|
margin-left:.5em;
|
||||||
|
}
|
||||||
|
.bar a, .bar a:link, .bar a:visited, .bar a:active {
|
||||||
|
color:#FFFFFF;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
.bar a:hover, .bar a:focus {
|
||||||
|
color:#bb7a2a;
|
||||||
|
}
|
||||||
|
.tab {
|
||||||
|
background-color:#0066FF;
|
||||||
|
background-image:url(resources/titlebar.gif);
|
||||||
|
background-position:left top;
|
||||||
|
background-repeat:no-repeat;
|
||||||
|
color:#ffffff;
|
||||||
|
padding:8px;
|
||||||
|
width:5em;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Navigation bar styles
|
||||||
|
*/
|
||||||
|
.bar {
|
||||||
|
background-image:url(resources/background.gif);
|
||||||
|
background-repeat:repeat-x;
|
||||||
|
color:#FFFFFF;
|
||||||
|
padding:.8em .5em .4em .8em;
|
||||||
|
height:auto;/*height:1.8em;*/
|
||||||
|
font-size:1em;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
.topNav {
|
||||||
|
background-image:url(resources/background.gif);
|
||||||
|
background-repeat:repeat-x;
|
||||||
|
color:#FFFFFF;
|
||||||
|
float:left;
|
||||||
|
padding:0;
|
||||||
|
width:100%;
|
||||||
|
clear:right;
|
||||||
|
height:2.8em;
|
||||||
|
padding-top:10px;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
.bottomNav {
|
||||||
|
margin-top:10px;
|
||||||
|
background-image:url(resources/background.gif);
|
||||||
|
background-repeat:repeat-x;
|
||||||
|
color:#FFFFFF;
|
||||||
|
float:left;
|
||||||
|
padding:0;
|
||||||
|
width:100%;
|
||||||
|
clear:right;
|
||||||
|
height:2.8em;
|
||||||
|
padding-top:10px;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
.subNav {
|
||||||
|
background-color:#dee3e9;
|
||||||
|
border-bottom:1px solid #9eadc0;
|
||||||
|
float:left;
|
||||||
|
width:100%;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
.subNav div {
|
||||||
|
clear:left;
|
||||||
|
float:left;
|
||||||
|
padding:0 0 5px 6px;
|
||||||
|
}
|
||||||
|
ul.navList, ul.subNavList {
|
||||||
|
float:left;
|
||||||
|
margin:0 25px 0 0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
ul.navList li{
|
||||||
|
list-style:none;
|
||||||
|
float:left;
|
||||||
|
padding:3px 6px;
|
||||||
|
}
|
||||||
|
ul.subNavList li{
|
||||||
|
list-style:none;
|
||||||
|
float:left;
|
||||||
|
font-size:90%;
|
||||||
|
}
|
||||||
|
.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
|
||||||
|
color:#FFFFFF;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
.topNav a:hover, .bottomNav a:hover {
|
||||||
|
text-decoration:none;
|
||||||
|
color:#bb7a2a;
|
||||||
|
}
|
||||||
|
.navBarCell1Rev {
|
||||||
|
background-image:url(resources/tab.gif);
|
||||||
|
background-color:#a88834;
|
||||||
|
color:#FFFFFF;
|
||||||
|
margin: auto 5px;
|
||||||
|
border:1px solid #c9aa44;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Page header and footer styles
|
||||||
|
*/
|
||||||
|
.header, .footer {
|
||||||
|
clear:both;
|
||||||
|
margin:0 20px;
|
||||||
|
padding:5px 0 0 0;
|
||||||
|
}
|
||||||
|
.indexHeader {
|
||||||
|
margin:10px;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
.indexHeader h1 {
|
||||||
|
font-size:1.3em;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
color:#2c4557;
|
||||||
|
margin:10px 0;
|
||||||
|
}
|
||||||
|
.subTitle {
|
||||||
|
margin:5px 0 0 0;
|
||||||
|
}
|
||||||
|
.header ul {
|
||||||
|
margin:0 0 25px 0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
.footer ul {
|
||||||
|
margin:20px 0 5px 0;
|
||||||
|
}
|
||||||
|
.header ul li, .footer ul li {
|
||||||
|
list-style:none;
|
||||||
|
font-size:1.2em;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Heading styles
|
||||||
|
*/
|
||||||
|
div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
|
||||||
|
background-color:#dee3e9;
|
||||||
|
border-top:1px solid #9eadc0;
|
||||||
|
border-bottom:1px solid #9eadc0;
|
||||||
|
margin:0 0 6px -8px;
|
||||||
|
padding:2px 5px;
|
||||||
|
}
|
||||||
|
ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||||
|
background-color:#dee3e9;
|
||||||
|
border-top:1px solid #9eadc0;
|
||||||
|
border-bottom:1px solid #9eadc0;
|
||||||
|
margin:0 0 6px -8px;
|
||||||
|
padding:2px 5px;
|
||||||
|
}
|
||||||
|
ul.blockList ul.blockList li.blockList h3 {
|
||||||
|
padding:0;
|
||||||
|
margin:15px 0;
|
||||||
|
}
|
||||||
|
ul.blockList li.blockList h2 {
|
||||||
|
padding:0px 0 20px 0;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Page layout container styles
|
||||||
|
*/
|
||||||
|
.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
|
||||||
|
clear:both;
|
||||||
|
padding:10px 20px;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
.indexContainer {
|
||||||
|
margin:10px;
|
||||||
|
position:relative;
|
||||||
|
font-size:1.0em;
|
||||||
|
}
|
||||||
|
.indexContainer h2 {
|
||||||
|
font-size:1.1em;
|
||||||
|
padding:0 0 3px 0;
|
||||||
|
}
|
||||||
|
.indexContainer ul {
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
.indexContainer ul li {
|
||||||
|
list-style:none;
|
||||||
|
}
|
||||||
|
.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
|
||||||
|
font-size:1.1em;
|
||||||
|
font-weight:bold;
|
||||||
|
margin:10px 0 0 0;
|
||||||
|
color:#4E4E4E;
|
||||||
|
}
|
||||||
|
.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
|
||||||
|
margin:10px 0 10px 20px;
|
||||||
|
}
|
||||||
|
.serializedFormContainer dl.nameValue dt {
|
||||||
|
margin-left:1px;
|
||||||
|
font-size:1.1em;
|
||||||
|
display:inline;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
.serializedFormContainer dl.nameValue dd {
|
||||||
|
margin:0 0 0 1px;
|
||||||
|
font-size:1.1em;
|
||||||
|
display:inline;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
List styles
|
||||||
|
*/
|
||||||
|
ul.horizontal li {
|
||||||
|
display:inline;
|
||||||
|
font-size:0.9em;
|
||||||
|
}
|
||||||
|
ul.inheritance {
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
ul.inheritance li {
|
||||||
|
display:inline;
|
||||||
|
list-style:none;
|
||||||
|
}
|
||||||
|
ul.inheritance li ul.inheritance {
|
||||||
|
margin-left:15px;
|
||||||
|
padding-left:15px;
|
||||||
|
padding-top:1px;
|
||||||
|
}
|
||||||
|
ul.blockList, ul.blockListLast {
|
||||||
|
margin:10px 0 10px 0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
ul.blockList li.blockList, ul.blockListLast li.blockList {
|
||||||
|
list-style:none;
|
||||||
|
margin-bottom:25px;
|
||||||
|
}
|
||||||
|
ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
|
||||||
|
padding:0px 20px 5px 10px;
|
||||||
|
border:1px solid #9eadc0;
|
||||||
|
background-color:#f9f9f9;
|
||||||
|
}
|
||||||
|
ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
|
||||||
|
padding:0 0 5px 8px;
|
||||||
|
background-color:#ffffff;
|
||||||
|
border:1px solid #9eadc0;
|
||||||
|
border-top:none;
|
||||||
|
}
|
||||||
|
ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
|
||||||
|
margin-left:0;
|
||||||
|
padding-left:0;
|
||||||
|
padding-bottom:15px;
|
||||||
|
border:none;
|
||||||
|
border-bottom:1px solid #9eadc0;
|
||||||
|
}
|
||||||
|
ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
|
||||||
|
list-style:none;
|
||||||
|
border-bottom:none;
|
||||||
|
padding-bottom:0;
|
||||||
|
}
|
||||||
|
table tr td dl, table tr td dl dt, table tr td dl dd {
|
||||||
|
margin-top:0;
|
||||||
|
margin-bottom:1px;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Table styles
|
||||||
|
*/
|
||||||
|
.contentContainer table, .classUseContainer table, .constantValuesContainer table {
|
||||||
|
border-bottom:1px solid #9eadc0;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table {
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
.contentContainer .description table, .contentContainer .details table {
|
||||||
|
border-bottom:none;
|
||||||
|
}
|
||||||
|
.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{
|
||||||
|
vertical-align:top;
|
||||||
|
padding-right:20px;
|
||||||
|
}
|
||||||
|
.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast,
|
||||||
|
.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast,
|
||||||
|
.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne,
|
||||||
|
.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne {
|
||||||
|
padding-right:3px;
|
||||||
|
}
|
||||||
|
.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption {
|
||||||
|
position:relative;
|
||||||
|
text-align:left;
|
||||||
|
background-repeat:no-repeat;
|
||||||
|
color:#FFFFFF;
|
||||||
|
font-weight:bold;
|
||||||
|
clear:none;
|
||||||
|
overflow:hidden;
|
||||||
|
padding:0px;
|
||||||
|
margin:0px;
|
||||||
|
}
|
||||||
|
caption a:link, caption a:hover, caption a:active, caption a:visited {
|
||||||
|
color:#FFFFFF;
|
||||||
|
}
|
||||||
|
.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span {
|
||||||
|
white-space:nowrap;
|
||||||
|
padding-top:8px;
|
||||||
|
padding-left:8px;
|
||||||
|
display:block;
|
||||||
|
float:left;
|
||||||
|
background-image:url(resources/titlebar.gif);
|
||||||
|
height:18px;
|
||||||
|
}
|
||||||
|
.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd {
|
||||||
|
width:10px;
|
||||||
|
background-image:url(resources/titlebar_end.gif);
|
||||||
|
background-repeat:no-repeat;
|
||||||
|
background-position:top right;
|
||||||
|
position:relative;
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
ul.blockList ul.blockList li.blockList table {
|
||||||
|
margin:0 0 12px 0px;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
.tableSubHeadingColor {
|
||||||
|
background-color: #EEEEFF;
|
||||||
|
}
|
||||||
|
.altColor {
|
||||||
|
background-color:#eeeeef;
|
||||||
|
}
|
||||||
|
.rowColor {
|
||||||
|
background-color:#ffffff;
|
||||||
|
}
|
||||||
|
.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td {
|
||||||
|
text-align:left;
|
||||||
|
padding:3px 3px 3px 7px;
|
||||||
|
}
|
||||||
|
th.colFirst, th.colLast, th.colOne, .constantValuesContainer th {
|
||||||
|
background:#dee3e9;
|
||||||
|
border-top:1px solid #9eadc0;
|
||||||
|
border-bottom:1px solid #9eadc0;
|
||||||
|
text-align:left;
|
||||||
|
padding:3px 3px 3px 7px;
|
||||||
|
}
|
||||||
|
td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
td.colFirst, th.colFirst {
|
||||||
|
border-left:1px solid #9eadc0;
|
||||||
|
white-space:nowrap;
|
||||||
|
}
|
||||||
|
td.colLast, th.colLast {
|
||||||
|
border-right:1px solid #9eadc0;
|
||||||
|
}
|
||||||
|
td.colOne, th.colOne {
|
||||||
|
border-right:1px solid #9eadc0;
|
||||||
|
border-left:1px solid #9eadc0;
|
||||||
|
}
|
||||||
|
table.overviewSummary {
|
||||||
|
padding:0px;
|
||||||
|
margin-left:0px;
|
||||||
|
}
|
||||||
|
table.overviewSummary td.colFirst, table.overviewSummary th.colFirst,
|
||||||
|
table.overviewSummary td.colOne, table.overviewSummary th.colOne {
|
||||||
|
width:25%;
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
table.packageSummary td.colFirst, table.overviewSummary th.colFirst {
|
||||||
|
width:25%;
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Content styles
|
||||||
|
*/
|
||||||
|
.description pre {
|
||||||
|
margin-top:0;
|
||||||
|
}
|
||||||
|
.deprecatedContent {
|
||||||
|
margin:0;
|
||||||
|
padding:10px 0;
|
||||||
|
}
|
||||||
|
.docSummary {
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Formatting effect styles
|
||||||
|
*/
|
||||||
|
.sourceLineNo {
|
||||||
|
color:green;
|
||||||
|
padding:0 30px 0 0;
|
||||||
|
}
|
||||||
|
h1.hidden {
|
||||||
|
visibility:hidden;
|
||||||
|
overflow:hidden;
|
||||||
|
font-size:.9em;
|
||||||
|
}
|
||||||
|
.block {
|
||||||
|
display:block;
|
||||||
|
margin:3px 0 0 0;
|
||||||
|
}
|
||||||
|
.strong {
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -37,7 +38,7 @@ public final class TJ {
|
|||||||
/**
|
/**
|
||||||
* The number of chrominance subsampling options
|
* The number of chrominance subsampling options
|
||||||
*/
|
*/
|
||||||
public static final int NUMSAMP = 5;
|
public static final int NUMSAMP = 6;
|
||||||
/**
|
/**
|
||||||
* 4:4:4 chrominance subsampling (no chrominance subsampling). The JPEG
|
* 4:4:4 chrominance subsampling (no chrominance subsampling). The JPEG
|
||||||
* or YUV image will contain one chrominance component for every pixel in the
|
* or YUV image will contain one chrominance component for every pixel in the
|
||||||
@@ -64,6 +65,17 @@ public final class TJ {
|
|||||||
* Note that 4:4:0 subsampling is not fully accelerated in libjpeg-turbo.
|
* Note that 4:4:0 subsampling is not fully accelerated in libjpeg-turbo.
|
||||||
*/
|
*/
|
||||||
public static final int SAMP_440 = 4;
|
public static final int SAMP_440 = 4;
|
||||||
|
/**
|
||||||
|
* 4:1:1 chrominance subsampling. The JPEG or YUV image will contain one
|
||||||
|
* chrominance component for every 4x1 block of pixels in the source image.
|
||||||
|
* JPEG images compressed with 4:1:1 subsampling will be almost exactly the
|
||||||
|
* same size as those compressed with 4:2:0 subsampling, and in the
|
||||||
|
* aggregate, both subsampling methods produce approximately the same
|
||||||
|
* perceptual quality. However, 4:1:1 is better able to reproduce sharp
|
||||||
|
* horizontal features. Note that 4:1:1 subsampling is not fully accelerated
|
||||||
|
* in libjpeg-turbo.
|
||||||
|
*/
|
||||||
|
public static final int SAMP_411 = 5;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,16 +85,16 @@ public final class TJ {
|
|||||||
* @param subsamp the level of chrominance subsampling (one of
|
* @param subsamp the level of chrominance subsampling (one of
|
||||||
* <code>SAMP_*</code>)
|
* <code>SAMP_*</code>)
|
||||||
*
|
*
|
||||||
* @return the MCU block width for the given level of chrominance subsampling
|
* @return the MCU block width for the given level of chrominance
|
||||||
|
* subsampling.
|
||||||
*/
|
*/
|
||||||
public static int getMCUWidth(int subsamp) throws Exception {
|
public static int getMCUWidth(int subsamp) {
|
||||||
if (subsamp < 0 || subsamp >= NUMSAMP)
|
checkSubsampling(subsamp);
|
||||||
throw new Exception("Invalid subsampling type");
|
|
||||||
return mcuWidth[subsamp];
|
return mcuWidth[subsamp];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int[] mcuWidth = {
|
private static final int[] mcuWidth = {
|
||||||
8, 16, 16, 8, 8
|
8, 16, 16, 8, 8, 32
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -94,23 +106,22 @@ public final class TJ {
|
|||||||
* <code>SAMP_*</code>)
|
* <code>SAMP_*</code>)
|
||||||
*
|
*
|
||||||
* @return the MCU block height for the given level of chrominance
|
* @return the MCU block height for the given level of chrominance
|
||||||
* subsampling
|
* subsampling.
|
||||||
*/
|
*/
|
||||||
public static int getMCUHeight(int subsamp) throws Exception {
|
public static int getMCUHeight(int subsamp) {
|
||||||
if (subsamp < 0 || subsamp >= NUMSAMP)
|
checkSubsampling(subsamp);
|
||||||
throw new Exception("Invalid subsampling type");
|
|
||||||
return mcuHeight[subsamp];
|
return mcuHeight[subsamp];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int[] mcuHeight = {
|
private static final int[] mcuHeight = {
|
||||||
8, 8, 16, 8, 16
|
8, 8, 16, 8, 16, 8
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of pixel formats
|
* The number of pixel formats
|
||||||
*/
|
*/
|
||||||
public static final int NUMPF = 11;
|
public static final int NUMPF = 12;
|
||||||
/**
|
/**
|
||||||
* RGB pixel format. The red, green, and blue components in the image are
|
* RGB pixel format. The red, green, and blue components in the image are
|
||||||
* stored in 3-byte pixels in the order R, G, B from lowest to highest byte
|
* stored in 3-byte pixels in the order R, G, B from lowest to highest byte
|
||||||
@@ -180,6 +191,22 @@ public final class TJ {
|
|||||||
* interpreted as an opaque alpha channel.
|
* interpreted as an opaque alpha channel.
|
||||||
*/
|
*/
|
||||||
public static final int PF_ARGB = 10;
|
public static final int PF_ARGB = 10;
|
||||||
|
/**
|
||||||
|
* CMYK pixel format. Unlike RGB, which is an additive color model used
|
||||||
|
* primarily for display, CMYK (Cyan/Magenta/Yellow/Key) is a subtractive
|
||||||
|
* color model used primarily for printing. In the CMYK color model, the
|
||||||
|
* value of each color component typically corresponds to an amount of cyan,
|
||||||
|
* magenta, yellow, or black ink that is applied to a white background. In
|
||||||
|
* order to convert between CMYK and RGB, it is necessary to use a color
|
||||||
|
* management system (CMS.) A CMS will attempt to map colors within the
|
||||||
|
* printer's gamut to perceptually similar colors in the display's gamut and
|
||||||
|
* vice versa, but the mapping is typically not 1:1 or reversible, nor can it
|
||||||
|
* be defined with a simple formula. Thus, such a conversion is out of scope
|
||||||
|
* for a codec library. However, the TurboJPEG API allows for compressing
|
||||||
|
* CMYK pixels into a YCCK JPEG image (see {@link #CS_YCCK}) and
|
||||||
|
* decompressing YCCK JPEG images into CMYK pixels.
|
||||||
|
*/
|
||||||
|
public static final int PF_CMYK = 11;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -187,16 +214,15 @@ public final class TJ {
|
|||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||||
*
|
*
|
||||||
* @return the pixel size (in bytes) for the given pixel format
|
* @return the pixel size (in bytes) for the given pixel format.
|
||||||
*/
|
*/
|
||||||
public static int getPixelSize(int pixelFormat) throws Exception {
|
public static int getPixelSize(int pixelFormat) {
|
||||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
checkPixelFormat(pixelFormat);
|
||||||
throw new Exception("Invalid pixel format");
|
|
||||||
return pixelSize[pixelFormat];
|
return pixelSize[pixelFormat];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int[] pixelSize = {
|
private static final int[] pixelSize = {
|
||||||
3, 3, 4, 4, 4, 4, 1, 4, 4, 4, 4
|
3, 3, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -209,16 +235,15 @@ public final class TJ {
|
|||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||||
*
|
*
|
||||||
* @return the red offset for the given pixel format
|
* @return the red offset for the given pixel format.
|
||||||
*/
|
*/
|
||||||
public static int getRedOffset(int pixelFormat) throws Exception {
|
public static int getRedOffset(int pixelFormat) {
|
||||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
checkPixelFormat(pixelFormat);
|
||||||
throw new Exception("Invalid pixel format");
|
|
||||||
return redOffset[pixelFormat];
|
return redOffset[pixelFormat];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int[] redOffset = {
|
private static final int[] redOffset = {
|
||||||
0, 2, 0, 2, 3, 1, 0, 0, 2, 3, 1
|
0, 2, 0, 2, 3, 1, 0, 0, 2, 3, 1, -1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -231,16 +256,15 @@ public final class TJ {
|
|||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||||
*
|
*
|
||||||
* @return the green offset for the given pixel format
|
* @return the green offset for the given pixel format.
|
||||||
*/
|
*/
|
||||||
public static int getGreenOffset(int pixelFormat) throws Exception {
|
public static int getGreenOffset(int pixelFormat) {
|
||||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
checkPixelFormat(pixelFormat);
|
||||||
throw new Exception("Invalid pixel format");
|
|
||||||
return greenOffset[pixelFormat];
|
return greenOffset[pixelFormat];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int[] greenOffset = {
|
private static final int[] greenOffset = {
|
||||||
1, 1, 1, 1, 2, 2, 0, 1, 1, 2, 2
|
1, 1, 1, 1, 2, 2, 0, 1, 1, 2, 2, -1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -253,44 +277,88 @@ public final class TJ {
|
|||||||
*
|
*
|
||||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||||
*
|
*
|
||||||
* @return the blue offset for the given pixel format
|
* @return the blue offset for the given pixel format.
|
||||||
*/
|
*/
|
||||||
public static int getBlueOffset(int pixelFormat) throws Exception {
|
public static int getBlueOffset(int pixelFormat) {
|
||||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
checkPixelFormat(pixelFormat);
|
||||||
throw new Exception("Invalid pixel format");
|
|
||||||
return blueOffset[pixelFormat];
|
return blueOffset[pixelFormat];
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int[] blueOffset = {
|
private static final int[] blueOffset = {
|
||||||
2, 0, 2, 0, 1, 3, 0, 2, 0, 1, 3
|
2, 0, 2, 0, 1, 3, 0, 2, 0, 1, 3, -1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The number of JPEG colorspaces
|
||||||
|
*/
|
||||||
|
public static final int NUMCS = 5;
|
||||||
|
/**
|
||||||
|
* RGB colorspace. When compressing the JPEG image, the R, G, and B
|
||||||
|
* components in the source image are reordered into image planes, but no
|
||||||
|
* colorspace conversion or subsampling is performed. RGB JPEG images can be
|
||||||
|
* decompressed to any of the extended RGB pixel formats or grayscale, but
|
||||||
|
* they cannot be decompressed to YUV images.
|
||||||
|
*/
|
||||||
|
public static final int CS_RGB = 0;
|
||||||
|
/**
|
||||||
|
* YCbCr colorspace. YCbCr is not an absolute colorspace but rather a
|
||||||
|
* mathematical transformation of RGB designed solely for storage and
|
||||||
|
* transmission. YCbCr images must be converted to RGB before they can
|
||||||
|
* actually be displayed. In the YCbCr colorspace, the Y (luminance)
|
||||||
|
* component represents the black & white portion of the original image, and
|
||||||
|
* the Cb and Cr (chrominance) components represent the color portion of the
|
||||||
|
* original image. Originally, the analog equivalent of this transformation
|
||||||
|
* allowed the same signal to drive both black & white and color televisions,
|
||||||
|
* but JPEG images use YCbCr primarily because it allows the color data to be
|
||||||
|
* optionally subsampled for the purposes of reducing bandwidth or disk
|
||||||
|
* space. YCbCr is the most common JPEG colorspace, and YCbCr JPEG images
|
||||||
|
* can be compressed from and decompressed to any of the extended RGB pixel
|
||||||
|
* formats or grayscale, or they can be decompressed to YUV planar images.
|
||||||
|
*/
|
||||||
|
public static final int CS_YCbCr = 1;
|
||||||
|
/**
|
||||||
|
* Grayscale colorspace. The JPEG image retains only the luminance data (Y
|
||||||
|
* component), and any color data from the source image is discarded.
|
||||||
|
* Grayscale JPEG images can be compressed from and decompressed to any of
|
||||||
|
* the extended RGB pixel formats or grayscale, or they can be decompressed
|
||||||
|
* to YUV planar images.
|
||||||
|
*/
|
||||||
|
public static final int CS_GRAY = 2;
|
||||||
|
/**
|
||||||
|
* CMYK colorspace. When compressing the JPEG image, the C, M, Y, and K
|
||||||
|
* components in the source image are reordered into image planes, but no
|
||||||
|
* colorspace conversion or subsampling is performed. CMYK JPEG images can
|
||||||
|
* only be decompressed to CMYK pixels.
|
||||||
|
*/
|
||||||
|
public static final int CS_CMYK = 3;
|
||||||
|
/**
|
||||||
|
* YCCK colorspace. YCCK (AKA "YCbCrK") is not an absolute colorspace but
|
||||||
|
* rather a mathematical transformation of CMYK designed solely for storage
|
||||||
|
* and transmission. It is to CMYK as YCbCr is to RGB. CMYK pixels can be
|
||||||
|
* reversibly transformed into YCCK, and as with YCbCr, the chrominance
|
||||||
|
* components in the YCCK pixels can be subsampled without incurring major
|
||||||
|
* perceptual loss. YCCK JPEG images can only be compressed from and
|
||||||
|
* decompressed to CMYK pixels.
|
||||||
|
*/
|
||||||
|
public static final int CS_YCCK = 4;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The uncompressed source/destination image is stored in bottom-up (Windows,
|
* The uncompressed source/destination image is stored in bottom-up (Windows,
|
||||||
* OpenGL) order, not top-down (X11) order.
|
* OpenGL) order, not top-down (X11) order.
|
||||||
*/
|
*/
|
||||||
public static final int FLAG_BOTTOMUP = 2;
|
public static final int FLAG_BOTTOMUP = 2;
|
||||||
/**
|
|
||||||
* Turn off CPU auto-detection and force TurboJPEG to use MMX code
|
@Deprecated
|
||||||
* (if the underlying codec supports it.)
|
|
||||||
*/
|
|
||||||
public static final int FLAG_FORCEMMX = 8;
|
public static final int FLAG_FORCEMMX = 8;
|
||||||
/**
|
@Deprecated
|
||||||
* Turn off CPU auto-detection and force TurboJPEG to use SSE code
|
|
||||||
* (if the underlying codec supports it.)
|
|
||||||
*/
|
|
||||||
public static final int FLAG_FORCESSE = 16;
|
public static final int FLAG_FORCESSE = 16;
|
||||||
/**
|
@Deprecated
|
||||||
* Turn off CPU auto-detection and force TurboJPEG to use SSE2 code
|
|
||||||
* (if the underlying codec supports it.)
|
|
||||||
*/
|
|
||||||
public static final int FLAG_FORCESSE2 = 32;
|
public static final int FLAG_FORCESSE2 = 32;
|
||||||
/**
|
@Deprecated
|
||||||
* Turn off CPU auto-detection and force TurboJPEG to use SSE3 code
|
|
||||||
* (if the underlying codec supports it.)
|
|
||||||
*/
|
|
||||||
public static final int FLAG_FORCESSE3 = 128;
|
public static final int FLAG_FORCESSE3 = 128;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When decompressing an image that was compressed using chrominance
|
* When decompressing an image that was compressed using chrominance
|
||||||
* subsampling, use the fastest chrominance upsampling algorithm available in
|
* subsampling, use the fastest chrominance upsampling algorithm available in
|
||||||
@@ -332,10 +400,9 @@ public final class TJ {
|
|||||||
* generating the JPEG image (one of {@link TJ TJ.SAMP_*})
|
* generating the JPEG image (one of {@link TJ TJ.SAMP_*})
|
||||||
*
|
*
|
||||||
* @return the maximum size of the buffer (in bytes) required to hold a JPEG
|
* @return the maximum size of the buffer (in bytes) required to hold a JPEG
|
||||||
* image with the given width, height, and level of chrominance subsampling
|
* image with the given width, height, and level of chrominance subsampling.
|
||||||
*/
|
*/
|
||||||
public static native int bufSize(int width, int height, int jpegSubsamp)
|
public static native int bufSize(int width, int height, int jpegSubsamp);
|
||||||
throws Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size of the buffer (in bytes) required to hold a YUV planar
|
* Returns the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
@@ -343,28 +410,104 @@ public final class TJ {
|
|||||||
*
|
*
|
||||||
* @param width the width (in pixels) of the YUV image
|
* @param width the width (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
|
* @param pad the width of each line in each plane of the image is padded to
|
||||||
|
* the nearest multiple of this number of bytes (must be a power of 2.)
|
||||||
|
*
|
||||||
* @param height the height (in pixels) of the YUV image
|
* @param height the height (in pixels) of the YUV image
|
||||||
*
|
*
|
||||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
* image (one of {@link TJ TJ.SAMP_*})
|
* image (one of {@link TJ TJ.SAMP_*})
|
||||||
*
|
*
|
||||||
* @return the size of the buffer (in bytes) required to hold a YUV planar
|
* @return the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
* image with the given width, height, and level of chrominance subsampling
|
* image with the given width, height, and level of chrominance subsampling.
|
||||||
*/
|
*/
|
||||||
public static native int bufSizeYUV(int width, int height, int subsamp)
|
public static native int bufSizeYUV(int width, int pad, int height,
|
||||||
throws Exception;
|
int subsamp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #bufSizeYUV(int, int, int, int)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public static native int bufSizeYUV(int width, int height, int subsamp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size of the buffer (in bytes) required to hold a YUV image
|
||||||
|
* plane with the given parameters.
|
||||||
|
*
|
||||||
|
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||||
|
* 2 = V/Cr)
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image. NOTE: this is the width
|
||||||
|
* of the whole image, not the plane width.
|
||||||
|
*
|
||||||
|
* @param stride bytes per line in the image plane.
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image. NOTE: this is the
|
||||||
|
* height of the whole image, not the plane height.
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
|
* image (one of {@link TJ TJ.SAMP_*})
|
||||||
|
*
|
||||||
|
* @return the size of the buffer (in bytes) required to hold a YUV planar
|
||||||
|
* image with the given parameters.
|
||||||
|
*/
|
||||||
|
public static native int planeSizeYUV(int componentID, int width, int stride,
|
||||||
|
int height, int subsamp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the plane width of a YUV image plane with the given parameters.
|
||||||
|
* Refer to {@link YUVImage YUVImage} for a description of plane width.
|
||||||
|
*
|
||||||
|
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||||
|
* 2 = V/Cr)
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV image
|
||||||
|
* (one of {@link TJ TJ.SAMP_*})
|
||||||
|
*
|
||||||
|
* @return the plane width of a YUV image plane with the given parameters.
|
||||||
|
*/
|
||||||
|
public static native int planeWidth(int componentID, int width, int subsamp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the plane height of a YUV image plane with the given parameters.
|
||||||
|
* Refer to {@link YUVImage YUVImage} for a description of plane height.
|
||||||
|
*
|
||||||
|
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||||
|
* 2 = V/Cr)
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV image
|
||||||
|
* (one of {@link TJ TJ.SAMP_*})
|
||||||
|
*
|
||||||
|
* @return the plane height of a YUV image plane with the given parameters.
|
||||||
|
*/
|
||||||
|
public static native int planeHeight(int componentID, int height,
|
||||||
|
int subsamp);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of fractional scaling factors that the JPEG decompressor in
|
* Returns a list of fractional scaling factors that the JPEG decompressor in
|
||||||
* this implementation of TurboJPEG supports.
|
* this implementation of TurboJPEG supports.
|
||||||
*
|
*
|
||||||
* @return a list of fractional scaling factors that the JPEG decompressor in
|
* @return a list of fractional scaling factors that the JPEG decompressor in
|
||||||
* this implementation of TurboJPEG supports
|
* this implementation of TurboJPEG supports.
|
||||||
*/
|
*/
|
||||||
public static native TJScalingFactor[] getScalingFactors()
|
public static native TJScalingFactor[] getScalingFactors();
|
||||||
throws Exception;
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TJLoader.load();
|
TJLoader.load();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
private static void checkPixelFormat(int pixelFormat) {
|
||||||
|
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
||||||
|
throw new IllegalArgumentException("Invalid pixel format");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void checkSubsampling(int subsamp) {
|
||||||
|
if (subsamp < 0 || subsamp >= NUMSAMP)
|
||||||
|
throw new IllegalArgumentException("Invalid subsampling type");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2014 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2015 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -30,11 +31,12 @@ package org.libjpegturbo.turbojpeg;
|
|||||||
|
|
||||||
import java.awt.image.*;
|
import java.awt.image.*;
|
||||||
import java.nio.*;
|
import java.nio.*;
|
||||||
|
import java.io.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TurboJPEG compressor
|
* TurboJPEG compressor
|
||||||
*/
|
*/
|
||||||
public class TJCompressor {
|
public class TJCompressor implements Closeable {
|
||||||
|
|
||||||
private static final String NO_ASSOC_ERROR =
|
private static final String NO_ASSOC_ERROR =
|
||||||
"No source image is associated with this instance";
|
"No source image is associated with this instance";
|
||||||
@@ -42,7 +44,7 @@ public class TJCompressor {
|
|||||||
/**
|
/**
|
||||||
* Create a TurboJPEG compressor instance.
|
* Create a TurboJPEG compressor instance.
|
||||||
*/
|
*/
|
||||||
public TJCompressor() throws Exception {
|
public TJCompressor() throws TJException {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +69,7 @@ public class TJCompressor {
|
|||||||
* {@link TJ#PF_RGB TJ.PF_*})
|
* {@link TJ#PF_RGB TJ.PF_*})
|
||||||
*/
|
*/
|
||||||
public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
|
public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
|
||||||
int height, int pixelFormat) throws Exception {
|
int height, int pixelFormat) throws TJException {
|
||||||
setSourceImage(srcImage, x, y, width, pitch, height, pixelFormat);
|
setSourceImage(srcImage, x, y, width, pitch, height, pixelFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,15 +79,41 @@ public class TJCompressor {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public TJCompressor(byte[] srcImage, int width, int pitch, int height,
|
public TJCompressor(byte[] srcImage, int width, int pitch, int height,
|
||||||
int pixelFormat) throws Exception {
|
int pixelFormat) throws TJException {
|
||||||
setSourceImage(srcImage, width, pitch, height, pixelFormat);
|
setSourceImage(srcImage, width, pitch, height, pixelFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate an uncompressed source image with this compressor instance.
|
* Create a TurboJPEG compressor instance and associate the uncompressed
|
||||||
|
* source image stored in <code>srcImage</code> with the newly created
|
||||||
|
* instance.
|
||||||
*
|
*
|
||||||
* @param srcImage image buffer containing RGB or grayscale pixels to be
|
* @param srcImage see
|
||||||
* compressed or encoded
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||||
|
*
|
||||||
|
* @param x see
|
||||||
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||||
|
*
|
||||||
|
* @param y see
|
||||||
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||||
|
*
|
||||||
|
* @param width see
|
||||||
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||||
|
*
|
||||||
|
* @param height see
|
||||||
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||||
|
*/
|
||||||
|
public TJCompressor(BufferedImage srcImage, int x, int y, int width,
|
||||||
|
int height) throws TJException {
|
||||||
|
setSourceImage(srcImage, x, y, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
||||||
|
* compressor instance.
|
||||||
|
*
|
||||||
|
* @param srcImage image buffer containing RGB, grayscale, or CMYK pixels to
|
||||||
|
* be compressed or encoded. This buffer is not modified.
|
||||||
*
|
*
|
||||||
* @param x x offset (in pixels) of the region in the source image from which
|
* @param x x offset (in pixels) of the region in the source image from which
|
||||||
* the JPEG or YUV image should be compressed/encoded
|
* the JPEG or YUV image should be compressed/encoded
|
||||||
@@ -113,11 +141,11 @@ public class TJCompressor {
|
|||||||
*/
|
*/
|
||||||
public void setSourceImage(byte[] srcImage, int x, int y, int width,
|
public void setSourceImage(byte[] srcImage, int x, int y, int width,
|
||||||
int pitch, int height, int pixelFormat)
|
int pitch, int height, int pixelFormat)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
if (handle == 0) init();
|
if (handle == 0) init();
|
||||||
if (srcImage == null || x < 0 || y < 0 || width < 1 || height < 1 ||
|
if (srcImage == null || x < 0 || y < 0 || width < 1 || height < 1 ||
|
||||||
pitch < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF)
|
pitch < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF)
|
||||||
throw new Exception("Invalid argument in setSourceImage()");
|
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||||
srcBuf = srcImage;
|
srcBuf = srcImage;
|
||||||
srcWidth = width;
|
srcWidth = width;
|
||||||
if (pitch == 0)
|
if (pitch == 0)
|
||||||
@@ -128,6 +156,8 @@ public class TJCompressor {
|
|||||||
srcPixelFormat = pixelFormat;
|
srcPixelFormat = pixelFormat;
|
||||||
srcX = x;
|
srcX = x;
|
||||||
srcY = y;
|
srcY = y;
|
||||||
|
srcBufInt = null;
|
||||||
|
srcYUVImage = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -136,108 +166,44 @@ public class TJCompressor {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setSourceImage(byte[] srcImage, int width, int pitch,
|
public void setSourceImage(byte[] srcImage, int width, int pitch,
|
||||||
int height, int pixelFormat) throws Exception {
|
int height, int pixelFormat) throws TJException {
|
||||||
setSourceImage(srcImage, 0, 0, width, pitch, height, pixelFormat);
|
setSourceImage(srcImage, 0, 0, width, pitch, height, pixelFormat);
|
||||||
srcX = srcY = -1;
|
srcX = srcY = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the level of chrominance subsampling for subsequent compress/encode
|
* Associate an uncompressed RGB or grayscale source image with this
|
||||||
* operations.
|
* compressor instance.
|
||||||
*
|
|
||||||
* @param newSubsamp the level of chrominance subsampling to use in
|
|
||||||
* subsequent compress/encode operations (one of
|
|
||||||
* {@link TJ#SAMP_444 TJ.SAMP_*})
|
|
||||||
*/
|
|
||||||
public void setSubsamp(int newSubsamp) throws Exception {
|
|
||||||
if (newSubsamp < 0 || newSubsamp >= TJ.NUMSAMP)
|
|
||||||
throw new Exception("Invalid argument in setSubsamp()");
|
|
||||||
subsamp = newSubsamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the JPEG image quality level for subsequent compress operations.
|
|
||||||
*
|
|
||||||
* @param quality the new JPEG image quality level (1 to 100, 1 = worst,
|
|
||||||
* 100 = best)
|
|
||||||
*/
|
|
||||||
public void setJPEGQuality(int quality) throws Exception {
|
|
||||||
if (quality < 1 || quality > 100)
|
|
||||||
throw new Exception("Invalid argument in setJPEGQuality()");
|
|
||||||
jpegQuality = quality;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Compress the uncompressed source image associated with this compressor
|
|
||||||
* instance and output a JPEG image to the given destination buffer.
|
|
||||||
*
|
|
||||||
* @param dstBuf buffer that will receive the JPEG image. Use
|
|
||||||
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
|
|
||||||
* the source image's width and height and the desired level of chrominance
|
|
||||||
* subsampling.
|
|
||||||
*
|
|
||||||
* @param flags the bitwise OR of one or more of
|
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
|
||||||
*/
|
|
||||||
public void compress(byte[] dstBuf, int flags) throws Exception {
|
|
||||||
if (dstBuf == null || flags < 0)
|
|
||||||
throw new Exception("Invalid argument in compress()");
|
|
||||||
if (srcBuf == null)
|
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
|
||||||
if (jpegQuality < 0)
|
|
||||||
throw new Exception("JPEG Quality not set");
|
|
||||||
if (subsamp < 0)
|
|
||||||
throw new Exception("Subsampling level not set");
|
|
||||||
if (srcX >= 0 && srcY >= 0)
|
|
||||||
compressedSize = compress(srcBuf, srcX, srcY, srcWidth, srcPitch,
|
|
||||||
srcHeight, srcPixelFormat, dstBuf, subsamp,
|
|
||||||
jpegQuality, flags);
|
|
||||||
else
|
|
||||||
compressedSize = compress(srcBuf, srcWidth, srcPitch, srcHeight,
|
|
||||||
srcPixelFormat, dstBuf, subsamp, jpegQuality,
|
|
||||||
flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Compress the uncompressed source image associated with this compressor
|
|
||||||
* instance and return a buffer containing a JPEG image.
|
|
||||||
*
|
|
||||||
* @param flags the bitwise OR of one or more of
|
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
|
||||||
*
|
|
||||||
* @return a buffer containing a JPEG image. The length of this buffer will
|
|
||||||
* not be equal to the size of the JPEG image. Use {@link
|
|
||||||
* #getCompressedSize} to obtain the size of the JPEG image.
|
|
||||||
*/
|
|
||||||
public byte[] compress(int flags) throws Exception {
|
|
||||||
if (srcWidth < 1 || srcHeight < 1)
|
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
|
||||||
byte[] buf = new byte[TJ.bufSize(srcWidth, srcHeight, subsamp)];
|
|
||||||
compress(buf, flags);
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Compress the uncompressed source image stored in <code>srcImage</code>
|
|
||||||
* and output a JPEG image to the given destination buffer.
|
|
||||||
*
|
*
|
||||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
||||||
* grayscale pixels to be compressed
|
* grayscale pixels to be compressed or encoded. This image is not modified.
|
||||||
*
|
*
|
||||||
* @param dstBuf buffer that will receive the JPEG image. Use
|
* @param x x offset (in pixels) of the region in the source image from which
|
||||||
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
|
* the JPEG or YUV image should be compressed/encoded
|
||||||
* the image width, height, and level of chrominance subsampling.
|
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of
|
* @param y y offset (in pixels) of the region in the source image from which
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* the JPEG or YUV image should be compressed/encoded
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the region in the source image from
|
||||||
|
* which the JPEG or YUV image should be compressed/encoded (0 = use the
|
||||||
|
* width of the source image)
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the region in the source image from
|
||||||
|
* which the JPEG or YUV image should be compressed/encoded (0 = use the
|
||||||
|
* height of the source image)
|
||||||
*/
|
*/
|
||||||
public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
|
public void setSourceImage(BufferedImage srcImage, int x, int y, int width,
|
||||||
throws Exception {
|
int height) throws TJException {
|
||||||
if (srcImage == null || dstBuf == null || flags < 0)
|
if (handle == 0) init();
|
||||||
throw new Exception("Invalid argument in compress()");
|
if (srcImage == null || x < 0 || y < 0 || width < 0 || height < 0)
|
||||||
int width = srcImage.getWidth();
|
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||||
int height = srcImage.getHeight();
|
srcX = x;
|
||||||
|
srcY = y;
|
||||||
|
srcWidth = (width == 0) ? srcImage.getWidth(): width;
|
||||||
|
srcHeight = (height == 0) ? srcImage.getHeight() : height;
|
||||||
|
if (x + width > srcImage.getWidth() || y + height > srcImage.getHeight())
|
||||||
|
throw new IllegalArgumentException("Compression region exceeds the bounds of the source image");
|
||||||
|
|
||||||
int pixelFormat;
|
int pixelFormat;
|
||||||
boolean intPixels = false;
|
boolean intPixels = false;
|
||||||
if (byteOrder == null)
|
if (byteOrder == null)
|
||||||
@@ -265,51 +231,141 @@ public class TJCompressor {
|
|||||||
pixelFormat = TJ.PF_BGRX;
|
pixelFormat = TJ.PF_BGRX;
|
||||||
intPixels = true; break;
|
intPixels = true; break;
|
||||||
default:
|
default:
|
||||||
throw new Exception("Unsupported BufferedImage format");
|
throw new IllegalArgumentException("Unsupported BufferedImage format");
|
||||||
}
|
}
|
||||||
|
srcPixelFormat = pixelFormat;
|
||||||
|
|
||||||
WritableRaster wr = srcImage.getRaster();
|
WritableRaster wr = srcImage.getRaster();
|
||||||
if (jpegQuality < 0)
|
|
||||||
throw new Exception("JPEG Quality not set");
|
|
||||||
if (subsamp < 0)
|
|
||||||
throw new Exception("Subsampling level not set");
|
|
||||||
if (intPixels) {
|
if (intPixels) {
|
||||||
SinglePixelPackedSampleModel sm =
|
SinglePixelPackedSampleModel sm =
|
||||||
(SinglePixelPackedSampleModel)srcImage.getSampleModel();
|
(SinglePixelPackedSampleModel)srcImage.getSampleModel();
|
||||||
int stride = sm.getScanlineStride();
|
srcStride = sm.getScanlineStride();
|
||||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
||||||
int[] buf = db.getData();
|
srcBufInt = db.getData();
|
||||||
if (srcX >= 0 && srcY >= 0)
|
srcBuf = null;
|
||||||
compressedSize = compress(buf, srcX, srcY, width, stride, height,
|
|
||||||
pixelFormat, dstBuf, subsamp, jpegQuality,
|
|
||||||
flags);
|
|
||||||
else
|
|
||||||
compressedSize = compress(buf, width, stride, height, pixelFormat,
|
|
||||||
dstBuf, subsamp, jpegQuality, flags);
|
|
||||||
} else {
|
} else {
|
||||||
ComponentSampleModel sm =
|
ComponentSampleModel sm =
|
||||||
(ComponentSampleModel)srcImage.getSampleModel();
|
(ComponentSampleModel)srcImage.getSampleModel();
|
||||||
int pixelSize = sm.getPixelStride();
|
int pixelSize = sm.getPixelStride();
|
||||||
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
||||||
throw new Exception("Inconsistency between pixel format and pixel size in BufferedImage");
|
throw new IllegalArgumentException("Inconsistency between pixel format and pixel size in BufferedImage");
|
||||||
int pitch = sm.getScanlineStride();
|
srcPitch = sm.getScanlineStride();
|
||||||
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
||||||
byte[] buf = db.getData();
|
srcBuf = db.getData();
|
||||||
|
srcBufInt = null;
|
||||||
|
}
|
||||||
|
srcYUVImage = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Associate an uncompressed YUV planar source image with this compressor
|
||||||
|
* instance.
|
||||||
|
*
|
||||||
|
* @param srcImage YUV planar image to be compressed. This image is not
|
||||||
|
* modified.
|
||||||
|
*/
|
||||||
|
public void setSourceImage(YUVImage srcImage) throws TJException {
|
||||||
|
if (handle == 0) init();
|
||||||
|
if (srcImage == null)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||||
|
srcYUVImage = srcImage;
|
||||||
|
srcBuf = null;
|
||||||
|
srcBufInt = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the level of chrominance subsampling for subsequent compress/encode
|
||||||
|
* operations. When pixels are converted from RGB to YCbCr (see
|
||||||
|
* {@link TJ#CS_YCbCr}) or from CMYK to YCCK (see {@link TJ#CS_YCCK}) as part
|
||||||
|
* of the JPEG compression process, some of the Cb and Cr (chrominance)
|
||||||
|
* components can be discarded or averaged together to produce a smaller
|
||||||
|
* image with little perceptible loss of image clarity (the human eye is more
|
||||||
|
* sensitive to small changes in brightness than to small changes in color.)
|
||||||
|
* This is called "chrominance subsampling".
|
||||||
|
* <p>
|
||||||
|
* NOTE: This method has no effect when compressing a JPEG image from a YUV
|
||||||
|
* planar source. In that case, the level of chrominance subsampling in
|
||||||
|
* the JPEG image is determined by the source. Further, this method has no
|
||||||
|
* effect when encoding to a pre-allocated {@link YUVImage} instance. In
|
||||||
|
* that case, the level of chrominance subsampling is determined by the
|
||||||
|
* destination.
|
||||||
|
*
|
||||||
|
* @param newSubsamp the level of chrominance subsampling to use in
|
||||||
|
* subsequent compress/encode oeprations (one of
|
||||||
|
* {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
|
*/
|
||||||
|
public void setSubsamp(int newSubsamp) {
|
||||||
|
if (newSubsamp < 0 || newSubsamp >= TJ.NUMSAMP)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in setSubsamp()");
|
||||||
|
subsamp = newSubsamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the JPEG image quality level for subsequent compress operations.
|
||||||
|
*
|
||||||
|
* @param quality the new JPEG image quality level (1 to 100, 1 = worst,
|
||||||
|
* 100 = best)
|
||||||
|
*/
|
||||||
|
public void setJPEGQuality(int quality) {
|
||||||
|
if (quality < 1 || quality > 100)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in setJPEGQuality()");
|
||||||
|
jpegQuality = quality;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compress the uncompressed source image associated with this compressor
|
||||||
|
* instance and output a JPEG image to the given destination buffer.
|
||||||
|
*
|
||||||
|
* @param dstBuf buffer that will receive the JPEG image. Use
|
||||||
|
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
|
||||||
|
* the source image's width and height and the desired level of chrominance
|
||||||
|
* subsampling.
|
||||||
|
*
|
||||||
|
* @param flags the bitwise OR of one or more of
|
||||||
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
|
*/
|
||||||
|
public void compress(byte[] dstBuf, int flags) throws TJException {
|
||||||
|
if (dstBuf == null || flags < 0)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in compress()");
|
||||||
|
if (srcBuf == null && srcBufInt == null && srcYUVImage == null)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
if (jpegQuality < 0)
|
||||||
|
throw new IllegalStateException("JPEG Quality not set");
|
||||||
|
if (subsamp < 0 && srcYUVImage == null)
|
||||||
|
throw new IllegalStateException("Subsampling level not set");
|
||||||
|
|
||||||
|
if (srcYUVImage != null)
|
||||||
|
compressedSize = compressFromYUV(srcYUVImage.getPlanes(),
|
||||||
|
srcYUVImage.getOffsets(),
|
||||||
|
srcYUVImage.getWidth(),
|
||||||
|
srcYUVImage.getStrides(),
|
||||||
|
srcYUVImage.getHeight(),
|
||||||
|
srcYUVImage.getSubsamp(),
|
||||||
|
dstBuf, jpegQuality, flags);
|
||||||
|
else if (srcBuf != null) {
|
||||||
if (srcX >= 0 && srcY >= 0)
|
if (srcX >= 0 && srcY >= 0)
|
||||||
compressedSize = compress(buf, srcX, srcY, width, pitch, height,
|
compressedSize = compress(srcBuf, srcX, srcY, srcWidth, srcPitch,
|
||||||
pixelFormat, dstBuf, subsamp, jpegQuality,
|
srcHeight, srcPixelFormat, dstBuf, subsamp,
|
||||||
flags);
|
jpegQuality, flags);
|
||||||
else
|
else
|
||||||
compressedSize = compress(buf, width, pitch, height, pixelFormat,
|
compressedSize = compress(srcBuf, srcWidth, srcPitch, srcHeight,
|
||||||
dstBuf, subsamp, jpegQuality, flags);
|
srcPixelFormat, dstBuf, subsamp, jpegQuality,
|
||||||
|
flags);
|
||||||
|
} else if (srcBufInt != null) {
|
||||||
|
if (srcX >= 0 && srcY >= 0)
|
||||||
|
compressedSize = compress(srcBufInt, srcX, srcY, srcWidth, srcStride,
|
||||||
|
srcHeight, srcPixelFormat, dstBuf, subsamp,
|
||||||
|
jpegQuality, flags);
|
||||||
|
else
|
||||||
|
compressedSize = compress(srcBufInt, srcWidth, srcStride, srcHeight,
|
||||||
|
srcPixelFormat, dstBuf, subsamp, jpegQuality,
|
||||||
|
flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compress the uncompressed source image stored in <code>srcImage</code>
|
* Compress the uncompressed source image associated with this compressor
|
||||||
* and return a buffer containing a JPEG image.
|
* instance and return a buffer containing a JPEG image.
|
||||||
*
|
|
||||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
|
||||||
* grayscale pixels to be compressed
|
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
@@ -318,175 +374,185 @@ public class TJCompressor {
|
|||||||
* not be equal to the size of the JPEG image. Use {@link
|
* not be equal to the size of the JPEG image. Use {@link
|
||||||
* #getCompressedSize} to obtain the size of the JPEG image.
|
* #getCompressedSize} to obtain the size of the JPEG image.
|
||||||
*/
|
*/
|
||||||
public byte[] compress(BufferedImage srcImage, int flags) throws Exception {
|
public byte[] compress(int flags) throws TJException {
|
||||||
int width = srcImage.getWidth();
|
checkSourceImage();
|
||||||
int height = srcImage.getHeight();
|
byte[] buf = new byte[TJ.bufSize(srcWidth, srcHeight, subsamp)];
|
||||||
byte[] buf = new byte[TJ.bufSize(width, height, subsamp)];
|
compress(buf, flags);
|
||||||
compress(srcImage, buf, flags);
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the uncompressed source image associated with this compressor
|
* @deprecated Use
|
||||||
* instance and output a YUV planar image to the given destination buffer.
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||||
* This method uses the accelerated color conversion routines in
|
* {@link #compress(byte[], int)} instead.
|
||||||
* TurboJPEG's underlying codec to produce a planar YUV image that is
|
|
||||||
* suitable for direct video display. Specifically, if the chrominance
|
|
||||||
* components are subsampled along the horizontal dimension, then the width
|
|
||||||
* of the luminance plane is padded to the nearest multiple of 2 in the
|
|
||||||
* output image (same goes for the height of the luminance plane, if the
|
|
||||||
* chrominance components are subsampled along the vertical dimension.)
|
|
||||||
* Also, each line of each plane in the output image is padded to 4 bytes.
|
|
||||||
* Although this will work with any subsampling option, it is really only
|
|
||||||
* useful in combination with {@link TJ#SAMP_420}, which produces an image
|
|
||||||
* compatible with the I420 (AKA "YUV420P") format.
|
|
||||||
* <p>
|
|
||||||
* NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the
|
|
||||||
* convention of the digital video community, the TurboJPEG API uses "YUV" to
|
|
||||||
* refer to an image format consisting of Y, Cb, and Cr image planes.
|
|
||||||
*
|
|
||||||
* @param dstBuf buffer that will receive the YUV planar image. Use
|
|
||||||
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
|
|
||||||
* based on the image width, height, and level of chrominance subsampling.
|
|
||||||
*
|
|
||||||
* @param flags the bitwise OR of one or more of
|
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
|
||||||
*/
|
*/
|
||||||
public void encodeYUV(byte[] dstBuf, int flags) throws Exception {
|
@Deprecated
|
||||||
if (dstBuf == null || flags < 0)
|
public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
|
||||||
throw new Exception("Invalid argument in compress()");
|
throws TJException {
|
||||||
if (srcBuf == null)
|
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
compress(dstBuf, flags);
|
||||||
if (subsamp < 0)
|
}
|
||||||
throw new Exception("Subsampling level not set");
|
|
||||||
encodeYUV(srcBuf, srcWidth, srcPitch, srcHeight,
|
/**
|
||||||
srcPixelFormat, dstBuf, subsamp, flags);
|
* @deprecated Use
|
||||||
compressedSize = TJ.bufSizeYUV(srcWidth, srcHeight, subsamp);
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||||
|
* {@link #compress(int)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public byte[] compress(BufferedImage srcImage, int flags)
|
||||||
|
throws TJException {
|
||||||
|
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||||
|
return compress(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the uncompressed source image associated with this compressor
|
* Encode the uncompressed source image associated with this compressor
|
||||||
* instance and return a buffer containing a YUV planar image. See
|
* instance into a YUV planar image and store it in the given
|
||||||
* {@link #encodeYUV(byte[], int)} for more detail.
|
* <code>YUVImage</code> instance. This method uses the accelerated color
|
||||||
|
* conversion routines in TurboJPEG's underlying codec but does not execute
|
||||||
|
* any of the other steps in the JPEG compression process. Encoding
|
||||||
|
* CMYK source images to YUV is not supported.
|
||||||
|
*
|
||||||
|
* @param dstImage {@link YUVImage} instance that will receive the YUV planar
|
||||||
|
* image
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*
|
|
||||||
* @return a buffer containing a YUV planar image
|
|
||||||
*/
|
*/
|
||||||
public byte[] encodeYUV(int flags) throws Exception {
|
public void encodeYUV(YUVImage dstImage, int flags) throws TJException {
|
||||||
if (srcWidth < 1 || srcHeight < 1)
|
if (dstImage == null || flags < 0)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalArgumentException("Invalid argument in encodeYUV()");
|
||||||
if (subsamp < 0)
|
if (srcBuf == null && srcBufInt == null)
|
||||||
throw new Exception("Subsampling level not set");
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
byte[] buf = new byte[TJ.bufSizeYUV(srcWidth, srcHeight, subsamp)];
|
if (srcYUVImage != null)
|
||||||
encodeYUV(buf, flags);
|
throw new IllegalStateException("Source image is not correct type");
|
||||||
return buf;
|
checkSubsampling();
|
||||||
}
|
if (srcWidth != dstImage.getWidth() || srcHeight != dstImage.getHeight())
|
||||||
|
throw new IllegalStateException("Destination image is the wrong size");
|
||||||
|
|
||||||
/**
|
if (srcBufInt != null) {
|
||||||
* Encode the uncompressed source image stored in <code>srcImage</code>
|
encodeYUV(srcBufInt, srcX, srcY, srcWidth, srcStride, srcHeight,
|
||||||
* and output a YUV planar image to the given destination buffer. See
|
srcPixelFormat, dstImage.getPlanes(), dstImage.getOffsets(),
|
||||||
* {@link #encodeYUV(byte[], int)} for more detail.
|
dstImage.getStrides(), dstImage.getSubsamp(), flags);
|
||||||
*
|
|
||||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
|
||||||
* grayscale pixels to be encoded
|
|
||||||
*
|
|
||||||
* @param dstBuf buffer that will receive the YUV planar image. Use
|
|
||||||
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
|
|
||||||
* based on the image width, height, and level of chrominance subsampling.
|
|
||||||
*
|
|
||||||
* @param flags the bitwise OR of one or more of
|
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
|
||||||
*/
|
|
||||||
public void encodeYUV(BufferedImage srcImage, byte[] dstBuf, int flags)
|
|
||||||
throws Exception {
|
|
||||||
if (srcImage == null || dstBuf == null || flags < 0)
|
|
||||||
throw new Exception("Invalid argument in encodeYUV()");
|
|
||||||
int width = srcImage.getWidth();
|
|
||||||
int height = srcImage.getHeight();
|
|
||||||
int pixelFormat; boolean intPixels = false;
|
|
||||||
if (byteOrder == null)
|
|
||||||
byteOrder = ByteOrder.nativeOrder();
|
|
||||||
switch(srcImage.getType()) {
|
|
||||||
case BufferedImage.TYPE_3BYTE_BGR:
|
|
||||||
pixelFormat = TJ.PF_BGR; break;
|
|
||||||
case BufferedImage.TYPE_4BYTE_ABGR:
|
|
||||||
case BufferedImage.TYPE_4BYTE_ABGR_PRE:
|
|
||||||
pixelFormat = TJ.PF_XBGR; break;
|
|
||||||
case BufferedImage.TYPE_BYTE_GRAY:
|
|
||||||
pixelFormat = TJ.PF_GRAY; break;
|
|
||||||
case BufferedImage.TYPE_INT_BGR:
|
|
||||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
|
||||||
pixelFormat = TJ.PF_XBGR;
|
|
||||||
else
|
|
||||||
pixelFormat = TJ.PF_RGBX;
|
|
||||||
intPixels = true; break;
|
|
||||||
case BufferedImage.TYPE_INT_RGB:
|
|
||||||
case BufferedImage.TYPE_INT_ARGB:
|
|
||||||
case BufferedImage.TYPE_INT_ARGB_PRE:
|
|
||||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
|
||||||
pixelFormat = TJ.PF_XRGB;
|
|
||||||
else
|
|
||||||
pixelFormat = TJ.PF_BGRX;
|
|
||||||
intPixels = true; break;
|
|
||||||
default:
|
|
||||||
throw new Exception("Unsupported BufferedImage format");
|
|
||||||
}
|
|
||||||
WritableRaster wr = srcImage.getRaster();
|
|
||||||
if (subsamp < 0) throw new Exception("Subsampling level not set");
|
|
||||||
if (intPixels) {
|
|
||||||
SinglePixelPackedSampleModel sm =
|
|
||||||
(SinglePixelPackedSampleModel)srcImage.getSampleModel();
|
|
||||||
int stride = sm.getScanlineStride();
|
|
||||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
|
||||||
int[] buf = db.getData();
|
|
||||||
encodeYUV(buf, width, stride, height, pixelFormat, dstBuf, subsamp,
|
|
||||||
flags);
|
|
||||||
} else {
|
} else {
|
||||||
ComponentSampleModel sm =
|
encodeYUV(srcBuf, srcX, srcY, srcWidth, srcPitch, srcHeight,
|
||||||
(ComponentSampleModel)srcImage.getSampleModel();
|
srcPixelFormat, dstImage.getPlanes(), dstImage.getOffsets(),
|
||||||
int pixelSize = sm.getPixelStride();
|
dstImage.getStrides(), dstImage.getSubsamp(), flags);
|
||||||
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
|
||||||
throw new Exception("Inconsistency between pixel format and pixel size in BufferedImage");
|
|
||||||
int pitch = sm.getScanlineStride();
|
|
||||||
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
|
||||||
byte[] buf = db.getData();
|
|
||||||
encodeYUV(buf, width, pitch, height, pixelFormat, dstBuf, subsamp,
|
|
||||||
flags);
|
|
||||||
}
|
}
|
||||||
compressedSize = TJ.bufSizeYUV(width, height, subsamp);
|
compressedSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the uncompressed source image stored in <code>srcImage</code>
|
* @deprecated Use {@link #encodeYUV(YUVImage, int)} instead.
|
||||||
* and return a buffer containing a YUV planar image. See
|
*/
|
||||||
* {@link #encodeYUV(byte[], int)} for more detail.
|
@Deprecated
|
||||||
|
public void encodeYUV(byte[] dstBuf, int flags) throws TJException {
|
||||||
|
if(dstBuf == null)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in encodeYUV()");
|
||||||
|
checkSourceImage();
|
||||||
|
checkSubsampling();
|
||||||
|
YUVImage yuvImage = new YUVImage(dstBuf, srcWidth, 4, srcHeight, subsamp);
|
||||||
|
encodeYUV(yuvImage, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode the uncompressed source image associated with this compressor
|
||||||
|
* instance into a unified YUV planar image buffer and return a
|
||||||
|
* <code>YUVImage</code> instance containing the encoded image. This method
|
||||||
|
* uses the accelerated color conversion routines in TurboJPEG's underlying
|
||||||
|
* codec but does not execute any of the other steps in the JPEG compression
|
||||||
|
* process. Encoding CMYK source images to YUV is not supported.
|
||||||
*
|
*
|
||||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
* @param pad the width of each line in each plane of the YUV image will be
|
||||||
* grayscale pixels to be encoded
|
* padded to the nearest multiple of this number of bytes (must be a power of
|
||||||
|
* 2.)
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*
|
*
|
||||||
* @return a buffer containing a YUV planar image
|
* @return a YUV planar image.
|
||||||
*/
|
*/
|
||||||
public byte[] encodeYUV(BufferedImage srcImage, int flags) throws Exception {
|
public YUVImage encodeYUV(int pad, int flags) throws TJException {
|
||||||
if (subsamp < 0)
|
checkSourceImage();
|
||||||
throw new Exception("Subsampling level not set");
|
checkSubsampling();
|
||||||
int width = srcImage.getWidth();
|
if(pad < 1 || ((pad & (pad - 1)) != 0))
|
||||||
int height = srcImage.getHeight();
|
throw new IllegalStateException("Invalid argument in encodeYUV()");
|
||||||
byte[] buf = new byte[TJ.bufSizeYUV(width, height, subsamp)];
|
YUVImage yuvImage = new YUVImage(srcWidth, pad, srcHeight, subsamp);
|
||||||
encodeYUV(srcImage, buf, flags);
|
encodeYUV(yuvImage, flags);
|
||||||
return buf;
|
return yuvImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode the uncompressed source image associated with this compressor
|
||||||
|
* instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||||
|
* <code>YUVImage</code> instance containing the encoded image planes. This
|
||||||
|
* method uses the accelerated color conversion routines in TurboJPEG's
|
||||||
|
* underlying codec but does not execute any of the other steps in the JPEG
|
||||||
|
* compression process. Encoding CMYK source images to YUV is not supported.
|
||||||
|
*
|
||||||
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
|
* per line in the corresponding plane of the output image. Setting the
|
||||||
|
* stride for any plane to 0 is the same as setting it to the component width
|
||||||
|
* of the plane. If <code>strides</code> is null, then the strides for all
|
||||||
|
* planes will be set to their respective component widths. You can adjust
|
||||||
|
* the strides in order to add an arbitrary amount of line padding to each
|
||||||
|
* plane.
|
||||||
|
*
|
||||||
|
* @param flags the bitwise OR of one or more of
|
||||||
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
|
*
|
||||||
|
* @return a YUV planar image.
|
||||||
|
*/
|
||||||
|
public YUVImage encodeYUV(int[] strides, int flags) throws TJException {
|
||||||
|
checkSourceImage();
|
||||||
|
checkSubsampling();
|
||||||
|
YUVImage yuvImage = new YUVImage(srcWidth, strides, srcHeight, subsamp);
|
||||||
|
encodeYUV(yuvImage, flags);
|
||||||
|
return yuvImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #encodeYUV(int, int)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public byte[] encodeYUV(int flags) throws TJException {
|
||||||
|
checkSourceImage();
|
||||||
|
checkSubsampling();
|
||||||
|
YUVImage yuvImage = new YUVImage(srcWidth, 4, srcHeight, subsamp);
|
||||||
|
encodeYUV(yuvImage, flags);
|
||||||
|
return yuvImage.getBuf();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use
|
||||||
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||||
|
* {@link #encodeYUV(byte[], int)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void encodeYUV(BufferedImage srcImage, byte[] dstBuf, int flags)
|
||||||
|
throws TJException {
|
||||||
|
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||||
|
encodeYUV(dstBuf, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use
|
||||||
|
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||||
|
* {@link #encodeYUV(int, int)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public byte[] encodeYUV(BufferedImage srcImage, int flags)
|
||||||
|
throws TJException {
|
||||||
|
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||||
|
return encodeYUV(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size of the image (in bytes) generated by the most recent
|
* Returns the size of the image (in bytes) generated by the most recent
|
||||||
* compress/encode operation.
|
* compress operation.
|
||||||
*
|
*
|
||||||
* @return the size of the image (in bytes) generated by the most recent
|
* @return the size of the image (in bytes) generated by the most recent
|
||||||
* compress/encode operation
|
* compress operation.
|
||||||
*/
|
*/
|
||||||
public int getCompressedSize() {
|
public int getCompressedSize() {
|
||||||
return compressedSize;
|
return compressedSize;
|
||||||
@@ -495,62 +561,98 @@ public class TJCompressor {
|
|||||||
/**
|
/**
|
||||||
* Free the native structures associated with this compressor instance.
|
* Free the native structures associated with this compressor instance.
|
||||||
*/
|
*/
|
||||||
public void close() throws Exception {
|
@Override
|
||||||
|
public void close() throws TJException {
|
||||||
|
if (handle != 0)
|
||||||
destroy();
|
destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
try {
|
try {
|
||||||
close();
|
close();
|
||||||
} catch(Exception e) {
|
} catch(TJException e) {
|
||||||
} finally {
|
} finally {
|
||||||
super.finalize();
|
super.finalize();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private native void init() throws Exception;
|
private native void init() throws TJException;
|
||||||
|
|
||||||
private native void destroy() throws Exception;
|
private native void destroy() throws TJException;
|
||||||
|
|
||||||
// JPEG size in bytes is returned
|
// JPEG size in bytes is returned
|
||||||
|
@Deprecated
|
||||||
private native int compress(byte[] srcBuf, int width, int pitch,
|
private native int compress(byte[] srcBuf, int width, int pitch,
|
||||||
int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp, int jpegQual,
|
int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp, int jpegQual,
|
||||||
int flags) throws Exception; // deprecated
|
int flags) throws TJException;
|
||||||
|
|
||||||
private native int compress(byte[] srcBuf, int x, int y, int width,
|
private native int compress(byte[] srcBuf, int x, int y, int width,
|
||||||
int pitch, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
int pitch, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
||||||
int jpegQual, int flags) throws Exception;
|
int jpegQual, int flags) throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native int compress(int[] srcBuf, int width, int stride,
|
private native int compress(int[] srcBuf, int width, int stride,
|
||||||
int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp, int jpegQual,
|
int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp, int jpegQual,
|
||||||
int flags) throws Exception; // deprecated
|
int flags) throws TJException;
|
||||||
|
|
||||||
private native int compress(int[] srcBuf, int x, int y, int width,
|
private native int compress(int[] srcBuf, int x, int y, int width,
|
||||||
int stride, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
int stride, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
||||||
int jpegQual, int flags) throws Exception;
|
int jpegQual, int flags) throws TJException;
|
||||||
|
|
||||||
|
private native int compressFromYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||||
|
int width, int[] srcStrides, int height, int subsamp, byte[] dstBuf,
|
||||||
|
int jpegQual, int flags)
|
||||||
|
throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native void encodeYUV(byte[] srcBuf, int width, int pitch,
|
private native void encodeYUV(byte[] srcBuf, int width, int pitch,
|
||||||
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
||||||
throws Exception;
|
throws TJException;
|
||||||
|
|
||||||
|
private native void encodeYUV(byte[] srcBuf, int x, int y, int width,
|
||||||
|
int pitch, int height, int pixelFormat, byte[][] dstPlanes,
|
||||||
|
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
||||||
|
throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native void encodeYUV(int[] srcBuf, int width, int stride,
|
private native void encodeYUV(int[] srcBuf, int width, int stride,
|
||||||
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
||||||
throws Exception;
|
throws TJException;
|
||||||
|
|
||||||
|
private native void encodeYUV(int[] srcBuf, int x, int y, int width,
|
||||||
|
int srcStride, int height, int pixelFormat, byte[][] dstPlanes,
|
||||||
|
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
||||||
|
throws TJException;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TJLoader.load();
|
TJLoader.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkSourceImage() {
|
||||||
|
if (srcWidth < 1 || srcHeight < 1)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkSubsampling() {
|
||||||
|
if (subsamp < 0)
|
||||||
|
throw new IllegalStateException("Subsampling level not set");
|
||||||
|
}
|
||||||
|
|
||||||
private long handle = 0;
|
private long handle = 0;
|
||||||
private byte[] srcBuf = null;
|
private byte[] srcBuf = null;
|
||||||
|
private int[] srcBufInt = null;
|
||||||
private int srcWidth = 0;
|
private int srcWidth = 0;
|
||||||
private int srcHeight = 0;
|
private int srcHeight = 0;
|
||||||
private int srcX = -1;
|
private int srcX = -1;
|
||||||
private int srcY = -1;
|
private int srcY = -1;
|
||||||
private int srcPitch = 0;
|
private int srcPitch = 0;
|
||||||
|
private int srcStride = 0;
|
||||||
private int srcPixelFormat = -1;
|
private int srcPixelFormat = -1;
|
||||||
|
private YUVImage srcYUVImage = null;
|
||||||
private int subsamp = -1;
|
private int subsamp = -1;
|
||||||
private int jpegQuality = -1;
|
private int jpegQuality = -1;
|
||||||
private int compressedSize = 0;
|
private int compressedSize = 0;
|
||||||
|
private int yuvPad = 4;
|
||||||
private ByteOrder byteOrder = null;
|
private ByteOrder byteOrder = null;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -72,5 +72,5 @@ public interface TJCustomFilter {
|
|||||||
void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
||||||
Rectangle planeRegion, int componentID, int transformID,
|
Rectangle planeRegion, int componentID, int transformID,
|
||||||
TJTransform transform)
|
TJTransform transform)
|
||||||
throws Exception;
|
throws TJException;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011-2014 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011-2015 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -30,11 +31,12 @@ package org.libjpegturbo.turbojpeg;
|
|||||||
|
|
||||||
import java.awt.image.*;
|
import java.awt.image.*;
|
||||||
import java.nio.*;
|
import java.nio.*;
|
||||||
|
import java.io.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TurboJPEG decompressor
|
* TurboJPEG decompressor
|
||||||
*/
|
*/
|
||||||
public class TJDecompressor {
|
public class TJDecompressor implements Closeable {
|
||||||
|
|
||||||
private static final String NO_ASSOC_ERROR =
|
private static final String NO_ASSOC_ERROR =
|
||||||
"No JPEG image is associated with this instance";
|
"No JPEG image is associated with this instance";
|
||||||
@@ -42,34 +44,47 @@ public class TJDecompressor {
|
|||||||
/**
|
/**
|
||||||
* Create a TurboJPEG decompresssor instance.
|
* Create a TurboJPEG decompresssor instance.
|
||||||
*/
|
*/
|
||||||
public TJDecompressor() throws Exception {
|
public TJDecompressor() throws TJException {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a TurboJPEG decompressor instance and associate the JPEG image
|
* Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||||
* stored in <code>jpegImage</code> with the newly created instance.
|
* image stored in <code>jpegImage</code> with the newly created instance.
|
||||||
*
|
*
|
||||||
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
||||||
* be the length of the array)
|
* be the length of the array.) This buffer is not modified.
|
||||||
*/
|
*/
|
||||||
public TJDecompressor(byte[] jpegImage) throws Exception {
|
public TJDecompressor(byte[] jpegImage) throws TJException {
|
||||||
init();
|
init();
|
||||||
setJPEGImage(jpegImage, jpegImage.length);
|
setSourceImage(jpegImage, jpegImage.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a TurboJPEG decompressor instance and associate the JPEG image
|
* Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||||
* of length <code>imageSize</code> bytes stored in <code>jpegImage</code>
|
* image of length <code>imageSize</code> bytes stored in
|
||||||
* with the newly created instance.
|
* <code>jpegImage</code> with the newly created instance.
|
||||||
*
|
*
|
||||||
* @param jpegImage JPEG image buffer
|
* @param jpegImage JPEG image buffer. This buffer is not modified.
|
||||||
*
|
*
|
||||||
* @param imageSize size of the JPEG image (in bytes)
|
* @param imageSize size of the JPEG image (in bytes)
|
||||||
*/
|
*/
|
||||||
public TJDecompressor(byte[] jpegImage, int imageSize) throws Exception {
|
public TJDecompressor(byte[] jpegImage, int imageSize) throws TJException {
|
||||||
init();
|
init();
|
||||||
setJPEGImage(jpegImage, imageSize);
|
setSourceImage(jpegImage, imageSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a TurboJPEG decompressor instance and associate the YUV planar
|
||||||
|
* source image stored in <code>yuvImage</code> with the newly created
|
||||||
|
* instance.
|
||||||
|
*
|
||||||
|
* @param yuvImage {@link YUVImage} instance containing a YUV planar
|
||||||
|
* image to be decoded. This image is not modified.
|
||||||
|
*/
|
||||||
|
public TJDecompressor(YUVImage yuvImage) throws TJException {
|
||||||
|
init();
|
||||||
|
setSourceImage(yuvImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,67 +92,120 @@ public class TJDecompressor {
|
|||||||
* <code>jpegImage</code> with this decompressor instance. This image will
|
* <code>jpegImage</code> with this decompressor instance. This image will
|
||||||
* be used as the source image for subsequent decompress operations.
|
* be used as the source image for subsequent decompress operations.
|
||||||
*
|
*
|
||||||
* @param jpegImage JPEG image buffer
|
* @param jpegImage JPEG image buffer. This buffer is not modified.
|
||||||
*
|
*
|
||||||
* @param imageSize size of the JPEG image (in bytes)
|
* @param imageSize size of the JPEG image (in bytes)
|
||||||
*/
|
*/
|
||||||
public void setJPEGImage(byte[] jpegImage, int imageSize) throws Exception {
|
public void setSourceImage(byte[] jpegImage, int imageSize)
|
||||||
|
throws TJException {
|
||||||
if (jpegImage == null || imageSize < 1)
|
if (jpegImage == null || imageSize < 1)
|
||||||
throw new Exception("Invalid argument in setJPEGImage()");
|
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||||
jpegBuf = jpegImage;
|
jpegBuf = jpegImage;
|
||||||
jpegBufSize = imageSize;
|
jpegBufSize = imageSize;
|
||||||
decompressHeader(jpegBuf, jpegBufSize);
|
decompressHeader(jpegBuf, jpegBufSize);
|
||||||
|
yuvImage = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the width of the JPEG image associated with this decompressor
|
* @deprecated Use {@link #setSourceImage(byte[], int)} instead.
|
||||||
* instance.
|
|
||||||
*
|
|
||||||
* @return the width of the JPEG image associated with this decompressor
|
|
||||||
* instance
|
|
||||||
*/
|
*/
|
||||||
public int getWidth() throws Exception {
|
@Deprecated
|
||||||
|
public void setJPEGImage(byte[] jpegImage, int imageSize)
|
||||||
|
throws TJException {
|
||||||
|
setSourceImage(jpegImage, imageSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Associate the specified YUV planar source image with this decompressor
|
||||||
|
* instance. Subsequent decompress operations will decode this image into an
|
||||||
|
* RGB or grayscale destination image.
|
||||||
|
*
|
||||||
|
* @param srcImage {@link YUVImage} instance containing a YUV planar image to
|
||||||
|
* be decoded. This image is not modified.
|
||||||
|
*/
|
||||||
|
public void setSourceImage(YUVImage srcImage) {
|
||||||
|
if (srcImage == null)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||||
|
yuvImage = srcImage;
|
||||||
|
jpegBuf = null;
|
||||||
|
jpegBufSize = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the width of the source image (JPEG or YUV) associated with this
|
||||||
|
* decompressor instance.
|
||||||
|
*
|
||||||
|
* @return the width of the source image (JPEG or YUV) associated with this
|
||||||
|
* decompressor instance.
|
||||||
|
*/
|
||||||
|
public int getWidth() {
|
||||||
|
if (yuvImage != null)
|
||||||
|
return yuvImage.getWidth();
|
||||||
if (jpegWidth < 1)
|
if (jpegWidth < 1)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
return jpegWidth;
|
return jpegWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the height of the JPEG image associated with this decompressor
|
* Returns the height of the source image (JPEG or YUV) associated with this
|
||||||
* instance.
|
* decompressor instance.
|
||||||
*
|
*
|
||||||
* @return the height of the JPEG image associated with this decompressor
|
* @return the height of the source image (JPEG or YUV) associated with this
|
||||||
* instance
|
* decompressor instance.
|
||||||
*/
|
*/
|
||||||
public int getHeight() throws Exception {
|
public int getHeight() {
|
||||||
|
if (yuvImage != null)
|
||||||
|
return yuvImage.getHeight();
|
||||||
if (jpegHeight < 1)
|
if (jpegHeight < 1)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
return jpegHeight;
|
return jpegHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the level of chrominance subsampling used in the JPEG image
|
* Returns the level of chrominance subsampling used in the source image
|
||||||
* associated with this decompressor instance. See {@link TJ TJ.SAMP_*}.
|
* (JPEG or YUV) associated with this decompressor instance. See
|
||||||
|
* {@link TJ#SAMP_444 TJ.SAMP_*}.
|
||||||
*
|
*
|
||||||
* @return the level of chrominance subsampling used in the JPEG image
|
* @return the level of chrominance subsampling used in the source image
|
||||||
* associated with this decompressor instance
|
* (JPEG or YUV) associated with this decompressor instance.
|
||||||
*/
|
*/
|
||||||
public int getSubsamp() throws Exception {
|
public int getSubsamp() {
|
||||||
|
if (yuvImage != null)
|
||||||
|
return yuvImage.getSubsamp();
|
||||||
if (jpegSubsamp < 0)
|
if (jpegSubsamp < 0)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (jpegSubsamp >= TJ.NUMSAMP)
|
if (jpegSubsamp >= TJ.NUMSAMP)
|
||||||
throw new Exception("JPEG header information is invalid");
|
throw new IllegalStateException("JPEG header information is invalid");
|
||||||
return jpegSubsamp;
|
return jpegSubsamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the colorspace used in the source image (JPEG or YUV) associated
|
||||||
|
* with this decompressor instance. See {@link TJ#CS_RGB TJ.CS_*}. If the
|
||||||
|
* source image is YUV, then this always returns {@link TJ#CS_YCbCr}.
|
||||||
|
*
|
||||||
|
* @return the colorspace used in the source image (JPEG or YUV) associated
|
||||||
|
* with this decompressor instance.
|
||||||
|
*/
|
||||||
|
public int getColorspace() {
|
||||||
|
if (yuvImage != null)
|
||||||
|
return TJ.CS_YCbCr;
|
||||||
|
if (jpegColorspace < 0)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
if (jpegColorspace >= TJ.NUMCS)
|
||||||
|
throw new IllegalStateException("JPEG header information is invalid");
|
||||||
|
return jpegColorspace;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the JPEG image buffer associated with this decompressor instance.
|
* Returns the JPEG image buffer associated with this decompressor instance.
|
||||||
*
|
*
|
||||||
* @return the JPEG image buffer associated with this decompressor instance
|
* @return the JPEG image buffer associated with this decompressor instance.
|
||||||
*/
|
*/
|
||||||
public byte[] getJPEGBuf() throws Exception {
|
public byte[] getJPEGBuf() {
|
||||||
if (jpegBuf == null)
|
if (jpegBuf == null)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
return jpegBuf;
|
return jpegBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,11 +214,11 @@ public class TJDecompressor {
|
|||||||
* decompressor instance.
|
* decompressor instance.
|
||||||
*
|
*
|
||||||
* @return the size of the JPEG image (in bytes) associated with this
|
* @return the size of the JPEG image (in bytes) associated with this
|
||||||
* decompressor instance
|
* decompressor instance.
|
||||||
*/
|
*/
|
||||||
public int getJPEGSize() throws Exception {
|
public int getJPEGSize() {
|
||||||
if (jpegBufSize < 1)
|
if (jpegBufSize < 1)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
return jpegBufSize;
|
return jpegBufSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,14 +239,13 @@ public class TJDecompressor {
|
|||||||
*
|
*
|
||||||
* @return the width of the largest scaled-down image that the TurboJPEG
|
* @return the width of the largest scaled-down image that the TurboJPEG
|
||||||
* decompressor can generate without exceeding the desired image width and
|
* decompressor can generate without exceeding the desired image width and
|
||||||
* height
|
* height.
|
||||||
*/
|
*/
|
||||||
public int getScaledWidth(int desiredWidth, int desiredHeight)
|
public int getScaledWidth(int desiredWidth, int desiredHeight) {
|
||||||
throws Exception {
|
|
||||||
if (jpegWidth < 1 || jpegHeight < 1)
|
if (jpegWidth < 1 || jpegHeight < 1)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (desiredWidth < 0 || desiredHeight < 0)
|
if (desiredWidth < 0 || desiredHeight < 0)
|
||||||
throw new Exception("Invalid argument in getScaledWidth()");
|
throw new IllegalArgumentException("Invalid argument in getScaledWidth()");
|
||||||
TJScalingFactor[] sf = TJ.getScalingFactors();
|
TJScalingFactor[] sf = TJ.getScalingFactors();
|
||||||
if (desiredWidth == 0)
|
if (desiredWidth == 0)
|
||||||
desiredWidth = jpegWidth;
|
desiredWidth = jpegWidth;
|
||||||
@@ -192,7 +259,7 @@ public class TJDecompressor {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (scaledWidth > desiredWidth || scaledHeight > desiredHeight)
|
if (scaledWidth > desiredWidth || scaledHeight > desiredHeight)
|
||||||
throw new Exception("Could not scale down to desired image dimensions");
|
throw new IllegalArgumentException("Could not scale down to desired image dimensions");
|
||||||
return scaledWidth;
|
return scaledWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,14 +280,13 @@ public class TJDecompressor {
|
|||||||
*
|
*
|
||||||
* @return the height of the largest scaled-down image that the TurboJPEG
|
* @return the height of the largest scaled-down image that the TurboJPEG
|
||||||
* decompressor can generate without exceeding the desired image width and
|
* decompressor can generate without exceeding the desired image width and
|
||||||
* height
|
* height.
|
||||||
*/
|
*/
|
||||||
public int getScaledHeight(int desiredWidth, int desiredHeight)
|
public int getScaledHeight(int desiredWidth, int desiredHeight) {
|
||||||
throws Exception {
|
|
||||||
if (jpegWidth < 1 || jpegHeight < 1)
|
if (jpegWidth < 1 || jpegHeight < 1)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (desiredWidth < 0 || desiredHeight < 0)
|
if (desiredWidth < 0 || desiredHeight < 0)
|
||||||
throw new Exception("Invalid argument in getScaledHeight()");
|
throw new IllegalArgumentException("Invalid argument in getScaledHeight()");
|
||||||
TJScalingFactor[] sf = TJ.getScalingFactors();
|
TJScalingFactor[] sf = TJ.getScalingFactors();
|
||||||
if (desiredWidth == 0)
|
if (desiredWidth == 0)
|
||||||
desiredWidth = jpegWidth;
|
desiredWidth = jpegWidth;
|
||||||
@@ -234,57 +300,67 @@ public class TJDecompressor {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (scaledWidth > desiredWidth || scaledHeight > desiredHeight)
|
if (scaledWidth > desiredWidth || scaledHeight > desiredHeight)
|
||||||
throw new Exception("Could not scale down to desired image dimensions");
|
throw new IllegalArgumentException("Could not scale down to desired image dimensions");
|
||||||
return scaledHeight;
|
return scaledHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image associated with this decompressor
|
* Decompress the JPEG source image or decode the YUV source image associated
|
||||||
* instance and output a decompressed image to the given destination buffer.
|
* with this decompressor instance and output a grayscale, RGB, or CMYK image
|
||||||
|
* to the given destination buffer.
|
||||||
*
|
*
|
||||||
* @param dstBuf buffer that will receive the decompressed image. This
|
* @param dstBuf buffer that will receive the decompressed/decoded image.
|
||||||
* buffer should normally be <code>pitch * scaledHeight</code> bytes in size,
|
* If the source image is a JPEG image, then this buffer should normally be
|
||||||
* where <code>scaledHeight</code> can be determined by calling <code>
|
* <code>pitch * scaledHeight</code> bytes in size, where
|
||||||
|
* <code>scaledHeight</code> can be determined by calling <code>
|
||||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegHeight)
|
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegHeight)
|
||||||
* </code> with one of the scaling factors returned from {@link
|
* </code> with one of the scaling factors returned from {@link
|
||||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. However,
|
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. If the
|
||||||
* the buffer may also be larger than the dimensions of the JPEG image, in
|
* source image is a YUV image, then this buffer should normally be
|
||||||
* which case the <code>x</code>, <code>y</code>, and <code>pitch</code>
|
* <code>pitch * height</code> bytes in size, where <code>height</code> is
|
||||||
* parameters can be used to specify the region into which the JPEG image
|
* the height of the YUV image. However, the buffer may also be larger than
|
||||||
* should be decompressed.
|
* the dimensions of the source image, in which case the <code>x</code>,
|
||||||
|
* <code>y</code>, and <code>pitch</code> parameters can be used to specify
|
||||||
|
* the region into which the source image should be decompressed/decoded.
|
||||||
*
|
*
|
||||||
* @param x x offset (in pixels) of the region into which the JPEG image
|
* @param x x offset (in pixels) of the region in the destination image into
|
||||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
* which the source image should be decompressed/decoded
|
||||||
*
|
*
|
||||||
* @param y y offset (in pixels) of the region into which the JPEG image
|
* @param y y offset (in pixels) of the region in the destination image into
|
||||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
* which the source image should be decompressed/decoded
|
||||||
*
|
*
|
||||||
* @param desiredWidth desired width (in pixels) of the decompressed image
|
* @param desiredWidth If the source image is a JPEG image, then this
|
||||||
* (or image region.) If the desired image dimensions are different than the
|
* specifies the desired width (in pixels) of the decompressed image (or
|
||||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
* image region.) If the desired destination image dimensions are different
|
||||||
* scaling in the JPEG decompressor to generate the largest possible image
|
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
* JPEG decompressor to generate the largest possible image that will fit
|
||||||
* same as setting it to the width of the JPEG image (in other words, the
|
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||||
* width will not be considered when determining the scaled image size.)
|
* it to the width of the JPEG image (in other words, the width will not be
|
||||||
|
* considered when determining the scaled image size.) This parameter is
|
||||||
|
* ignored if the source image is a YUV image.
|
||||||
*
|
*
|
||||||
* @param pitch bytes per line of the destination image. Normally, this
|
* @param pitch bytes per line of the destination image. Normally, this
|
||||||
* should be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code> if
|
* should be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code> if
|
||||||
* the decompressed image is unpadded, but you can use this to, for instance,
|
* the destination image is unpadded, but you can use this to, for instance,
|
||||||
* pad each line of the decompressed image to a 4-byte boundary or to
|
* pad each line of the destination image to a 4-byte boundary or to
|
||||||
* decompress the JPEG image into a region of a larger image. NOTE:
|
* decompress/decode the source image into a region of a larger image. NOTE:
|
||||||
* <code>scaledWidth</code> can be determined by calling <code>
|
* if the source image is a JPEG image, then <code>scaledWidth</code> can be
|
||||||
|
* determined by calling <code>
|
||||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegWidth)
|
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegWidth)
|
||||||
* </code> or by calling {@link #getScaledWidth}. Setting this parameter to
|
* </code> or by calling {@link #getScaledWidth}. If the source image is a
|
||||||
* 0 is the equivalent of setting it to <code>scaledWidth *
|
* YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
||||||
* TJ.pixelSize(pixelFormat)</code>.
|
* Setting this parameter to 0 is the equivalent of setting it to
|
||||||
|
* <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>.
|
||||||
*
|
*
|
||||||
* @param desiredHeight desired height (in pixels) of the decompressed image
|
* @param desiredHeight If the source image is a JPEG image, then this
|
||||||
* (or image region.) If the desired image dimensions are different than the
|
* specifies the desired height (in pixels) of the decompressed image (or
|
||||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
* image region.) If the desired destination image dimensions are different
|
||||||
* scaling in the JPEG decompressor to generate the largest possible image
|
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
* JPEG decompressor to generate the largest possible image that will fit
|
||||||
* same as setting it to the height of the JPEG image (in other words, the
|
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||||
* height will not be considered when determining the scaled image size.)
|
* it to the height of the JPEG image (in other words, the height will not be
|
||||||
|
* considered when determining the scaled image size.) This parameter is
|
||||||
|
* ignored if the source image is a YUV image.
|
||||||
*
|
*
|
||||||
* @param pixelFormat pixel format of the decompressed/decoded image (one of
|
* @param pixelFormat pixel format of the decompressed/decoded image (one of
|
||||||
* {@link TJ#PF_RGB TJ.PF_*})
|
* {@link TJ#PF_RGB TJ.PF_*})
|
||||||
@@ -294,13 +370,19 @@ public class TJDecompressor {
|
|||||||
*/
|
*/
|
||||||
public void decompress(byte[] dstBuf, int x, int y, int desiredWidth,
|
public void decompress(byte[] dstBuf, int x, int y, int desiredWidth,
|
||||||
int pitch, int desiredHeight, int pixelFormat,
|
int pitch, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws Exception {
|
int flags) throws TJException {
|
||||||
if (jpegBuf == null)
|
if (jpegBuf == null && yuvImage == null)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (dstBuf == null || x < 0 || y < 0 || desiredWidth < 0 || pitch < 0 ||
|
if (dstBuf == null || x < 0 || y < 0 || pitch < 0 ||
|
||||||
desiredHeight < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF ||
|
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||||
flags < 0)
|
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||||
throw new Exception("Invalid argument in decompress()");
|
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||||
|
if (yuvImage != null)
|
||||||
|
decodeYUV(yuvImage.getPlanes(), yuvImage.getOffsets(),
|
||||||
|
yuvImage.getStrides(), yuvImage.getSubsamp(), dstBuf, x, y,
|
||||||
|
yuvImage.getWidth(), pitch, yuvImage.getHeight(), pixelFormat,
|
||||||
|
flags);
|
||||||
|
else {
|
||||||
if (x > 0 || y > 0)
|
if (x > 0 || y > 0)
|
||||||
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, pitch,
|
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, pitch,
|
||||||
desiredHeight, pixelFormat, flags);
|
desiredHeight, pixelFormat, flags);
|
||||||
@@ -308,6 +390,7 @@ public class TJDecompressor {
|
|||||||
decompress(jpegBuf, jpegBufSize, dstBuf, desiredWidth, pitch,
|
decompress(jpegBuf, jpegBufSize, dstBuf, desiredWidth, pitch,
|
||||||
desiredHeight, pixelFormat, flags);
|
desiredHeight, pixelFormat, flags);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use
|
* @deprecated Use
|
||||||
@@ -316,7 +399,7 @@ public class TJDecompressor {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public void decompress(byte[] dstBuf, int desiredWidth, int pitch,
|
public void decompress(byte[] dstBuf, int desiredWidth, int pitch,
|
||||||
int desiredHeight, int pixelFormat, int flags)
|
int desiredHeight, int pixelFormat, int flags)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
decompress(dstBuf, 0, 0, desiredWidth, pitch, desiredHeight, pixelFormat,
|
decompress(dstBuf, 0, 0, desiredWidth, pitch, desiredHeight, pixelFormat,
|
||||||
flags);
|
flags);
|
||||||
}
|
}
|
||||||
@@ -343,13 +426,14 @@ public class TJDecompressor {
|
|||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*
|
*
|
||||||
* @return a buffer containing the decompressed image
|
* @return a buffer containing the decompressed image.
|
||||||
*/
|
*/
|
||||||
public byte[] decompress(int desiredWidth, int pitch, int desiredHeight,
|
public byte[] decompress(int desiredWidth, int pitch, int desiredHeight,
|
||||||
int pixelFormat, int flags) throws Exception {
|
int pixelFormat, int flags) throws TJException {
|
||||||
if (desiredWidth < 0 || pitch < 0 || desiredHeight < 0 ||
|
if (pitch < 0 ||
|
||||||
|
(yuvImage == null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||||
throw new Exception("Invalid argument in decompress()");
|
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||||
int pixelSize = TJ.getPixelSize(pixelFormat);
|
int pixelSize = TJ.getPixelSize(pixelFormat);
|
||||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||||
@@ -362,98 +446,229 @@ public class TJDecompressor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image associated with this decompressor
|
* Decompress the JPEG source image associated with this decompressor
|
||||||
* instance and output a YUV planar image to the given destination buffer.
|
* instance into a YUV planar image and store it in the given
|
||||||
* This method performs JPEG decompression but leaves out the color
|
* <code>YUVImage</code> instance. This method performs JPEG decompression
|
||||||
* conversion step, so a planar YUV image is generated instead of an RGB
|
* but leaves out the color conversion step, so a planar YUV image is
|
||||||
* image. The padding of the planes in this image is the same as in the
|
* generated instead of an RGB or grayscale image. This method cannot be
|
||||||
* images generated by {@link TJCompressor#encodeYUV(byte[], int)}.
|
* used to decompress JPEG source images with the CMYK or YCCK colorspace.
|
||||||
* <p>
|
|
||||||
* NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the
|
|
||||||
* convention of the digital video community, the TurboJPEG API uses "YUV" to
|
|
||||||
* refer to an image format consisting of Y, Cb, and Cr image planes.
|
|
||||||
*
|
*
|
||||||
* @param dstBuf buffer that will receive the YUV planar image. Use
|
* @param dstImage {@link YUVImage} instance that will receive the YUV planar
|
||||||
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
|
* image. The level of subsampling specified in this <code>YUVImage</code>
|
||||||
* based on the image width, height, and level of chrominance subsampling.
|
* instance must match that of the JPEG image, and the width and height
|
||||||
|
* specified in the <code>YUVImage</code> instance must match one of the
|
||||||
|
* scaled image sizes that TurboJPEG is capable of generating from the JPEG
|
||||||
|
* source image.
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*/
|
*/
|
||||||
public void decompressToYUV(byte[] dstBuf, int flags) throws Exception {
|
public void decompressToYUV(YUVImage dstImage, int flags)
|
||||||
|
throws TJException {
|
||||||
if (jpegBuf == null)
|
if (jpegBuf == null)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (dstBuf == null || flags < 0)
|
if (dstImage == null || flags < 0)
|
||||||
throw new Exception("Invalid argument in decompressToYUV()");
|
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
||||||
decompressToYUV(jpegBuf, jpegBufSize, dstBuf, flags);
|
int scaledWidth = getScaledWidth(dstImage.getWidth(),
|
||||||
|
dstImage.getHeight());
|
||||||
|
int scaledHeight = getScaledHeight(dstImage.getWidth(),
|
||||||
|
dstImage.getHeight());
|
||||||
|
if (scaledWidth != dstImage.getWidth() ||
|
||||||
|
scaledHeight != dstImage.getHeight())
|
||||||
|
throw new IllegalArgumentException("YUVImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
|
||||||
|
if (jpegSubsamp != dstImage.getSubsamp())
|
||||||
|
throw new IllegalArgumentException("YUVImage subsampling level does not match that of the JPEG image");
|
||||||
|
|
||||||
|
decompressToYUV(jpegBuf, jpegBufSize, dstImage.getPlanes(),
|
||||||
|
dstImage.getOffsets(), dstImage.getWidth(),
|
||||||
|
dstImage.getStrides(), dstImage.getHeight(), flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #decompressToYUV(YUVImage, int)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public void decompressToYUV(byte[] dstBuf, int flags) throws TJException {
|
||||||
|
YUVImage dstImage = new YUVImage(dstBuf, jpegWidth, 4, jpegHeight,
|
||||||
|
jpegSubsamp);
|
||||||
|
decompressToYUV(dstImage, flags);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image associated with this decompressor
|
* Decompress the JPEG source image associated with this decompressor
|
||||||
* instance and return a buffer containing a YUV planar image. See {@link
|
* instance into a set of Y, U (Cb), and V (Cr) image planes and return a
|
||||||
* #decompressToYUV(byte[], int)} for more detail.
|
* <code>YUVImage</code> instance containing the decompressed image planes.
|
||||||
|
* This method performs JPEG decompression but leaves out the color
|
||||||
|
* conversion step, so a planar YUV image is generated instead of an RGB or
|
||||||
|
* grayscale image. This method cannot be used to decompress JPEG source
|
||||||
|
* images with the CMYK or YCCK colorspace.
|
||||||
|
*
|
||||||
|
* @param desiredWidth desired width (in pixels) of the YUV image. If the
|
||||||
|
* desired image dimensions are different than the dimensions of the JPEG
|
||||||
|
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||||
|
* decompressor to generate the largest possible image that will fit within
|
||||||
|
* the desired dimensions. Setting this to 0 is the same as setting it to
|
||||||
|
* the width of the JPEG image (in other words, the width will not be
|
||||||
|
* considered when determining the scaled image size.)
|
||||||
|
*
|
||||||
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
|
* per line in the corresponding plane of the output image. Setting the
|
||||||
|
* stride for any plane to 0 is the same as setting it to the scaled
|
||||||
|
* component width of the plane. If <tt>strides</tt> is NULL, then the
|
||||||
|
* strides for all planes will be set to their respective scaled component
|
||||||
|
* widths. You can adjust the strides in order to add an arbitrary amount of
|
||||||
|
* line padding to each plane.
|
||||||
|
*
|
||||||
|
* @param desiredHeight desired height (in pixels) of the YUV image. If the
|
||||||
|
* desired image dimensions are different than the dimensions of the JPEG
|
||||||
|
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||||
|
* decompressor to generate the largest possible image that will fit within
|
||||||
|
* the desired dimensions. Setting this to 0 is the same as setting it to
|
||||||
|
* the height of the JPEG image (in other words, the height will not be
|
||||||
|
* considered when determining the scaled image size.)
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*
|
*
|
||||||
* @return a buffer containing a YUV planar image
|
* @return a YUV planar image.
|
||||||
*/
|
*/
|
||||||
public byte[] decompressToYUV(int flags) throws Exception {
|
public YUVImage decompressToYUV(int desiredWidth, int[] strides,
|
||||||
|
int desiredHeight,
|
||||||
|
int flags) throws TJException {
|
||||||
if (flags < 0)
|
if (flags < 0)
|
||||||
throw new Exception("Invalid argument in decompressToYUV()");
|
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
||||||
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (jpegSubsamp >= TJ.NUMSAMP)
|
if (jpegSubsamp >= TJ.NUMSAMP)
|
||||||
throw new Exception("JPEG header information is invalid");
|
throw new IllegalStateException("JPEG header information is invalid");
|
||||||
byte[] buf = new byte[TJ.bufSizeYUV(jpegWidth, jpegHeight, jpegSubsamp)];
|
if (yuvImage != null)
|
||||||
decompressToYUV(buf, flags);
|
throw new IllegalStateException("Source image is the wrong type");
|
||||||
return buf;
|
|
||||||
|
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||||
|
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||||
|
YUVImage yuvImage = new YUVImage(scaledWidth, null, scaledHeight,
|
||||||
|
jpegSubsamp);
|
||||||
|
decompressToYUV(yuvImage, flags);
|
||||||
|
return yuvImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image associated with this decompressor
|
* Decompress the JPEG source image associated with this decompressor
|
||||||
* instance and output a decompressed image to the given destination buffer.
|
* instance into a unified YUV planar image buffer and return a
|
||||||
|
* <code>YUVImage</code> instance containing the decompressed image. This
|
||||||
|
* method performs JPEG decompression but leaves out the color conversion
|
||||||
|
* step, so a planar YUV image is generated instead of an RGB or grayscale
|
||||||
|
* image. This method cannot be used to decompress JPEG source images with
|
||||||
|
* the CMYK or YCCK colorspace.
|
||||||
*
|
*
|
||||||
* @param dstBuf buffer that will receive the decompressed image. This
|
* @param desiredWidth desired width (in pixels) of the YUV image. If the
|
||||||
* buffer should normally be <code>stride * scaledHeight</code> pixels in
|
* desired image dimensions are different than the dimensions of the JPEG
|
||||||
* size, where <code>scaledHeight</code> can be determined by calling <code>
|
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||||
|
* decompressor to generate the largest possible image that will fit within
|
||||||
|
* the desired dimensions. Setting this to 0 is the same as setting it to
|
||||||
|
* the width of the JPEG image (in other words, the width will not be
|
||||||
|
* considered when determining the scaled image size.)
|
||||||
|
*
|
||||||
|
* @param pad the width of each line in each plane of the YUV image will be
|
||||||
|
* padded to the nearest multiple of this number of bytes (must be a power of
|
||||||
|
* 2.)
|
||||||
|
*
|
||||||
|
* @param desiredHeight desired height (in pixels) of the YUV image. If the
|
||||||
|
* desired image dimensions are different than the dimensions of the JPEG
|
||||||
|
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||||
|
* decompressor to generate the largest possible image that will fit within
|
||||||
|
* the desired dimensions. Setting this to 0 is the same as setting it to
|
||||||
|
* the height of the JPEG image (in other words, the height will not be
|
||||||
|
* considered when determining the scaled image size.)
|
||||||
|
*
|
||||||
|
* @param flags the bitwise OR of one or more of
|
||||||
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
|
*
|
||||||
|
* @return a YUV planar image.
|
||||||
|
*/
|
||||||
|
public YUVImage decompressToYUV(int desiredWidth, int pad, int desiredHeight,
|
||||||
|
int flags) throws TJException {
|
||||||
|
if (flags < 0)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
||||||
|
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
if (jpegSubsamp >= TJ.NUMSAMP)
|
||||||
|
throw new IllegalStateException("JPEG header information is invalid");
|
||||||
|
if (yuvImage != null)
|
||||||
|
throw new IllegalStateException("Source image is the wrong type");
|
||||||
|
|
||||||
|
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||||
|
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||||
|
YUVImage yuvImage = new YUVImage(scaledWidth, pad, scaledHeight,
|
||||||
|
jpegSubsamp);
|
||||||
|
decompressToYUV(yuvImage, flags);
|
||||||
|
return yuvImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #decompressToYUV(int, int, int, int)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public byte[] decompressToYUV(int flags) throws TJException {
|
||||||
|
YUVImage dstImage = new YUVImage(jpegWidth, 4, jpegHeight, jpegSubsamp);
|
||||||
|
decompressToYUV(dstImage, flags);
|
||||||
|
return dstImage.getBuf();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decompress the JPEG source image or decode the YUV source image associated
|
||||||
|
* with this decompressor instance and output a grayscale, RGB, or CMYK image
|
||||||
|
* to the given destination buffer.
|
||||||
|
*
|
||||||
|
* @param dstBuf buffer that will receive the decompressed/decoded image.
|
||||||
|
* If the source image is a JPEG image, then this buffer should normally be
|
||||||
|
* <code>stride * scaledHeight</code> pixels in size, where
|
||||||
|
* <code>scaledHeight</code> can be determined by calling <code>
|
||||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegHeight)
|
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegHeight)
|
||||||
* </code> with one of the scaling factors returned from {@link
|
* </code> with one of the scaling factors returned from {@link
|
||||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. However,
|
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. If the
|
||||||
* the buffer may also be larger than the dimensions of the JPEG image, in
|
* source image is a YUV image, then this buffer should normally be
|
||||||
* which case the <code>x</code>, <code>y</code>, and <code>stride</code>
|
* <code>stride * height</code> pixels in size, where <code>height</code> is
|
||||||
* parameters can be used to specify the region into which the JPEG image
|
* the height of the YUV image. However, the buffer may also be larger than
|
||||||
* should be decompressed.
|
* the dimensions of the JPEG image, in which case the <code>x</code>,
|
||||||
|
* <code>y</code>, and <code>stride</code> parameters can be used to specify
|
||||||
|
* the region into which the source image should be decompressed.
|
||||||
*
|
*
|
||||||
* @param x x offset (in pixels) of the region into which the JPEG image
|
* @param x x offset (in pixels) of the region in the destination image into
|
||||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
* which the source image should be decompressed/decoded
|
||||||
*
|
*
|
||||||
* @param y y offset (in pixels) of the region into which the JPEG image
|
* @param y y offset (in pixels) of the region in the destination image into
|
||||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
* which the source image should be decompressed/decoded
|
||||||
*
|
*
|
||||||
* @param desiredWidth desired width (in pixels) of the decompressed image
|
* @param desiredWidth If the source image is a JPEG image, then this
|
||||||
* (or image region.) If the desired image dimensions are different than the
|
* specifies the desired width (in pixels) of the decompressed image (or
|
||||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
* image region.) If the desired destination image dimensions are different
|
||||||
* scaling in the JPEG decompressor to generate the largest possible image
|
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
* JPEG decompressor to generate the largest possible image that will fit
|
||||||
* same as setting it to the width of the JPEG image (in other words, the
|
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||||
* width will not be considered when determining the scaled image size.)
|
* it to the width of the JPEG image (in other words, the width will not be
|
||||||
|
* considered when determining the scaled image size.) This parameter is
|
||||||
|
* ignored if the source image is a YUV image.
|
||||||
*
|
*
|
||||||
* @param stride pixels per line of the destination image. Normally, this
|
* @param stride pixels per line of the destination image. Normally, this
|
||||||
* should be set to <code>scaledWidth</code>, but you can use this to, for
|
* should be set to <code>scaledWidth</code>, but you can use this to, for
|
||||||
* instance, decompress the JPEG image into a region of a larger image.
|
* instance, decompress the JPEG image into a region of a larger image.
|
||||||
* NOTE: <code>scaledWidth</code> can be determined by calling <code>
|
* NOTE: if the source image is a JPEG image, then <code>scaledWidth</code>
|
||||||
|
* can be determined by calling <code>
|
||||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegWidth)
|
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegWidth)
|
||||||
* </code> or by calling {@link #getScaledWidth}. Setting this parameter to
|
* </code> or by calling {@link #getScaledWidth}. If the source image is a
|
||||||
* 0 is the equivalent of setting it to <code>scaledWidth</code>.
|
* YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
||||||
|
* Setting this parameter to 0 is the equivalent of setting it to
|
||||||
|
* <code>scaledWidth</code>.
|
||||||
*
|
*
|
||||||
* @param desiredHeight desired height (in pixels) of the decompressed image
|
* @param desiredHeight If the source image is a JPEG image, then this
|
||||||
* (or image region.) If the desired image dimensions are different than the
|
* specifies the desired height (in pixels) of the decompressed image (or
|
||||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
* image region.) If the desired destination image dimensions are different
|
||||||
* scaling in the JPEG decompressor to generate the largest possible image
|
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
* JPEG decompressor to generate the largest possible image that will fit
|
||||||
* same as setting it to the height of the JPEG image (in other words, the
|
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||||
* height will not be considered when determining the scaled image size.)
|
* it to the height of the JPEG image (in other words, the height will not be
|
||||||
|
* considered when determining the scaled image size.) This parameter is
|
||||||
|
* ignored if the source image is a YUV image.
|
||||||
*
|
*
|
||||||
* @param pixelFormat pixel format of the decompressed image (one of
|
* @param pixelFormat pixel format of the decompressed image (one of
|
||||||
* {@link TJ#PF_RGB TJ.PF_*})
|
* {@link TJ#PF_RGB TJ.PF_*})
|
||||||
@@ -463,40 +678,59 @@ public class TJDecompressor {
|
|||||||
*/
|
*/
|
||||||
public void decompress(int[] dstBuf, int x, int y, int desiredWidth,
|
public void decompress(int[] dstBuf, int x, int y, int desiredWidth,
|
||||||
int stride, int desiredHeight, int pixelFormat,
|
int stride, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws Exception {
|
int flags) throws TJException {
|
||||||
if (jpegBuf == null)
|
if (jpegBuf == null && yuvImage == null)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
if (dstBuf == null || x < 0 || y < 0 || desiredWidth < 0 || stride < 0 ||
|
if (dstBuf == null || x < 0 || y < 0 || stride < 0 ||
|
||||||
desiredHeight < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF ||
|
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||||
flags < 0)
|
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||||
throw new Exception("Invalid argument in decompress()");
|
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||||
|
if (yuvImage != null)
|
||||||
|
decodeYUV(yuvImage.getPlanes(), yuvImage.getOffsets(),
|
||||||
|
yuvImage.getStrides(), yuvImage.getSubsamp(), dstBuf, x, y,
|
||||||
|
yuvImage.getWidth(), stride, yuvImage.getHeight(), pixelFormat,
|
||||||
|
flags);
|
||||||
|
else
|
||||||
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, stride,
|
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, stride,
|
||||||
desiredHeight, pixelFormat, flags);
|
desiredHeight, pixelFormat, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image associated with this decompressor
|
* Decompress the JPEG source image or decode the YUV source image associated
|
||||||
* instance and output a decompressed image to the given
|
* with this decompressor instance and output a decompressed/decoded image to
|
||||||
* <code>BufferedImage</code> instance.
|
* the given <code>BufferedImage</code> instance.
|
||||||
*
|
*
|
||||||
* @param dstImage a <code>BufferedImage</code> instance that will receive
|
* @param dstImage a <code>BufferedImage</code> instance that will receive
|
||||||
* the decompressed image. The width and height of the
|
* the decompressed/decoded image. If the source image is a JPEG image, then
|
||||||
* <code>BufferedImage</code> instance must match one of the scaled image
|
* the width and height of the <code>BufferedImage</code> instance must match
|
||||||
* sizes that TurboJPEG is capable of generating from the JPEG image.
|
* one of the scaled image sizes that TurboJPEG is capable of generating from
|
||||||
*
|
* the JPEG image. If the source image is a YUV image, then the width and
|
||||||
|
* height of the <code>BufferedImage</code> instance must match the width and
|
||||||
|
* height of the YUV image.
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*/
|
*/
|
||||||
public void decompress(BufferedImage dstImage, int flags) throws Exception {
|
public void decompress(BufferedImage dstImage, int flags)
|
||||||
|
throws TJException {
|
||||||
if (dstImage == null || flags < 0)
|
if (dstImage == null || flags < 0)
|
||||||
throw new Exception("Invalid argument in decompress()");
|
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||||
int desiredWidth = dstImage.getWidth();
|
int desiredWidth = dstImage.getWidth();
|
||||||
int desiredHeight = dstImage.getHeight();
|
int desiredHeight = dstImage.getHeight();
|
||||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
int scaledWidth, scaledHeight;
|
||||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
|
||||||
|
if (yuvImage != null) {
|
||||||
|
if (desiredWidth != yuvImage.getWidth() ||
|
||||||
|
desiredHeight != yuvImage.getHeight())
|
||||||
|
throw new IllegalArgumentException("BufferedImage dimensions do not match the dimensions of the source image.");
|
||||||
|
scaledWidth = yuvImage.getWidth();
|
||||||
|
scaledHeight = yuvImage.getHeight();
|
||||||
|
} else {
|
||||||
|
scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||||
|
scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||||
if (scaledWidth != desiredWidth || scaledHeight != desiredHeight)
|
if (scaledWidth != desiredWidth || scaledHeight != desiredHeight)
|
||||||
throw new Exception("BufferedImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
|
throw new IllegalArgumentException("BufferedImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
|
||||||
|
}
|
||||||
int pixelFormat; boolean intPixels = false;
|
int pixelFormat; boolean intPixels = false;
|
||||||
if (byteOrder == null)
|
if (byteOrder == null)
|
||||||
byteOrder = ByteOrder.nativeOrder();
|
byteOrder = ByteOrder.nativeOrder();
|
||||||
@@ -528,7 +762,7 @@ public class TJDecompressor {
|
|||||||
pixelFormat = TJ.PF_BGRA;
|
pixelFormat = TJ.PF_BGRA;
|
||||||
intPixels = true; break;
|
intPixels = true; break;
|
||||||
default:
|
default:
|
||||||
throw new Exception("Unsupported BufferedImage format");
|
throw new IllegalArgumentException("Unsupported BufferedImage format");
|
||||||
}
|
}
|
||||||
WritableRaster wr = dstImage.getRaster();
|
WritableRaster wr = dstImage.getRaster();
|
||||||
if (intPixels) {
|
if (intPixels) {
|
||||||
@@ -537,27 +771,35 @@ public class TJDecompressor {
|
|||||||
int stride = sm.getScanlineStride();
|
int stride = sm.getScanlineStride();
|
||||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
||||||
int[] buf = db.getData();
|
int[] buf = db.getData();
|
||||||
if (jpegBuf == null)
|
if (yuvImage != null)
|
||||||
throw new Exception(NO_ASSOC_ERROR);
|
decodeYUV(yuvImage.getPlanes(), yuvImage.getOffsets(),
|
||||||
decompress(jpegBuf, jpegBufSize, buf, scaledWidth, stride, scaledHeight,
|
yuvImage.getStrides(), yuvImage.getSubsamp(), buf, 0, 0,
|
||||||
|
yuvImage.getWidth(), stride, yuvImage.getHeight(),
|
||||||
pixelFormat, flags);
|
pixelFormat, flags);
|
||||||
|
else {
|
||||||
|
if (jpegBuf == null)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
decompress(jpegBuf, jpegBufSize, buf, 0, 0, scaledWidth, stride,
|
||||||
|
scaledHeight, pixelFormat, flags);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ComponentSampleModel sm =
|
ComponentSampleModel sm =
|
||||||
(ComponentSampleModel)dstImage.getSampleModel();
|
(ComponentSampleModel)dstImage.getSampleModel();
|
||||||
int pixelSize = sm.getPixelStride();
|
int pixelSize = sm.getPixelStride();
|
||||||
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
||||||
throw new Exception("Inconsistency between pixel format and pixel size in BufferedImage");
|
throw new IllegalArgumentException("Inconsistency between pixel format and pixel size in BufferedImage");
|
||||||
int pitch = sm.getScanlineStride();
|
int pitch = sm.getScanlineStride();
|
||||||
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
||||||
byte[] buf = db.getData();
|
byte[] buf = db.getData();
|
||||||
decompress(buf, scaledWidth, pitch, scaledHeight, pixelFormat, flags);
|
decompress(buf, 0, 0, scaledWidth, pitch, scaledHeight, pixelFormat,
|
||||||
|
flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decompress the JPEG source image associated with this decompressor
|
* Decompress the JPEG source image or decode the YUV source image associated
|
||||||
* instance and return a <code>BufferedImage</code> instance containing the
|
* with this decompressor instance and return a <code>BufferedImage</code>
|
||||||
* decompressed image.
|
* instance containing the decompressed/decoded image.
|
||||||
*
|
*
|
||||||
* @param desiredWidth see
|
* @param desiredWidth see
|
||||||
* {@link #decompress(byte[], int, int, int, int, int, int, int)} for
|
* {@link #decompress(byte[], int, int, int, int, int, int, int)} for
|
||||||
@@ -575,13 +817,14 @@ public class TJDecompressor {
|
|||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*
|
*
|
||||||
* @return a <code>BufferedImage</code> instance containing the
|
* @return a <code>BufferedImage</code> instance containing the
|
||||||
* decompressed image
|
* decompressed/decoded image.
|
||||||
*/
|
*/
|
||||||
public BufferedImage decompress(int desiredWidth, int desiredHeight,
|
public BufferedImage decompress(int desiredWidth, int desiredHeight,
|
||||||
int bufferedImageType, int flags)
|
int bufferedImageType, int flags)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
if (desiredWidth < 0 || desiredHeight < 0 || flags < 0)
|
if ((yuvImage == null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||||
throw new Exception("Invalid argument in decompress()");
|
flags < 0)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||||
BufferedImage img = new BufferedImage(scaledWidth, scaledHeight,
|
BufferedImage img = new BufferedImage(scaledWidth, scaledHeight,
|
||||||
@@ -593,44 +836,62 @@ public class TJDecompressor {
|
|||||||
/**
|
/**
|
||||||
* Free the native structures associated with this decompressor instance.
|
* Free the native structures associated with this decompressor instance.
|
||||||
*/
|
*/
|
||||||
public void close() throws Exception {
|
@Override
|
||||||
|
public void close() throws TJException {
|
||||||
|
if (handle != 0)
|
||||||
destroy();
|
destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
try {
|
try {
|
||||||
close();
|
close();
|
||||||
} catch(Exception e) {
|
} catch(TJException e) {
|
||||||
} finally {
|
} finally {
|
||||||
super.finalize();
|
super.finalize();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private native void init() throws Exception;
|
private native void init() throws TJException;
|
||||||
|
|
||||||
private native void destroy() throws Exception;
|
private native void destroy() throws TJException;
|
||||||
|
|
||||||
private native void decompressHeader(byte[] srcBuf, int size)
|
private native void decompressHeader(byte[] srcBuf, int size)
|
||||||
throws Exception;
|
throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native void decompress(byte[] srcBuf, int size, byte[] dstBuf,
|
private native void decompress(byte[] srcBuf, int size, byte[] dstBuf,
|
||||||
int desiredWidth, int pitch, int desiredHeight, int pixelFormat, int flags)
|
int desiredWidth, int pitch, int desiredHeight, int pixelFormat, int flags)
|
||||||
throws Exception; // deprecated
|
throws TJException;
|
||||||
|
|
||||||
private native void decompress(byte[] srcBuf, int size, byte[] dstBuf, int x,
|
private native void decompress(byte[] srcBuf, int size, byte[] dstBuf, int x,
|
||||||
int y, int desiredWidth, int pitch, int desiredHeight, int pixelFormat,
|
int y, int desiredWidth, int pitch, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws Exception;
|
int flags) throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native void decompress(byte[] srcBuf, int size, int[] dstBuf,
|
private native void decompress(byte[] srcBuf, int size, int[] dstBuf,
|
||||||
int desiredWidth, int stride, int desiredHeight, int pixelFormat,
|
int desiredWidth, int stride, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws Exception; // deprecated
|
int flags) throws TJException;
|
||||||
|
|
||||||
private native void decompress(byte[] srcBuf, int size, int[] dstBuf, int x,
|
private native void decompress(byte[] srcBuf, int size, int[] dstBuf, int x,
|
||||||
int y, int desiredWidth, int stride, int desiredHeight, int pixelFormat,
|
int y, int desiredWidth, int stride, int desiredHeight, int pixelFormat,
|
||||||
int flags) throws Exception;
|
int flags) throws TJException;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
private native void decompressToYUV(byte[] srcBuf, int size, byte[] dstBuf,
|
private native void decompressToYUV(byte[] srcBuf, int size, byte[] dstBuf,
|
||||||
int flags) throws Exception;
|
int flags) throws TJException;
|
||||||
|
|
||||||
|
private native void decompressToYUV(byte[] srcBuf, int size,
|
||||||
|
byte[][] dstPlanes, int[] dstOffsets, int desiredWidth, int[] dstStrides,
|
||||||
|
int desiredheight, int flags) throws TJException;
|
||||||
|
|
||||||
|
private native void decodeYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||||
|
int[] srcStrides, int subsamp, byte[] dstBuf, int x, int y, int width,
|
||||||
|
int pitch, int height, int pixelFormat, int flags) throws TJException;
|
||||||
|
|
||||||
|
private native void decodeYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||||
|
int[] srcStrides, int subsamp, int[] dstBuf, int x, int y, int width,
|
||||||
|
int stride, int height, int pixelFormat, int flags) throws TJException;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TJLoader.load();
|
TJLoader.load();
|
||||||
@@ -639,8 +900,10 @@ public class TJDecompressor {
|
|||||||
protected long handle = 0;
|
protected long handle = 0;
|
||||||
protected byte[] jpegBuf = null;
|
protected byte[] jpegBuf = null;
|
||||||
protected int jpegBufSize = 0;
|
protected int jpegBufSize = 0;
|
||||||
|
protected YUVImage yuvImage = null;
|
||||||
protected int jpegWidth = 0;
|
protected int jpegWidth = 0;
|
||||||
protected int jpegHeight = 0;
|
protected int jpegHeight = 0;
|
||||||
protected int jpegSubsamp = -1;
|
protected int jpegSubsamp = -1;
|
||||||
|
protected int jpegColorspace = -1;
|
||||||
private ByteOrder byteOrder = null;
|
private ByteOrder byteOrder = null;
|
||||||
};
|
}
|
||||||
|
|||||||
53
java/org/libjpegturbo/turbojpeg/TJException.java
Normal file
53
java/org/libjpegturbo/turbojpeg/TJException.java
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.libjpegturbo.turbojpeg;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class TJException extends IOException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public TJException() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public TJException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TJException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TJException(Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -32,4 +32,4 @@ final class TJLoader {
|
|||||||
static void load() {
|
static void load() {
|
||||||
System.loadLibrary("@TURBOJPEG_DLL_NAME@");
|
System.loadLibrary("@TURBOJPEG_DLL_NAME@");
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -56,4 +56,4 @@ final class TJLoader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -33,15 +34,16 @@ package org.libjpegturbo.turbojpeg;
|
|||||||
*/
|
*/
|
||||||
public class TJScalingFactor {
|
public class TJScalingFactor {
|
||||||
|
|
||||||
public TJScalingFactor(int num, int denom) throws Exception {
|
public TJScalingFactor(int num, int denom) {
|
||||||
if (num < 1 || denom < 1)
|
if (num < 1 || denom < 1)
|
||||||
throw new Exception("Numerator and denominator must be >= 1");
|
throw new IllegalArgumentException("Numerator and denominator must be >= 1");
|
||||||
this.num = num;
|
this.num = num;
|
||||||
this.denom = denom;
|
this.denom = denom;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns numerator
|
* Returns numerator
|
||||||
|
*
|
||||||
* @return numerator
|
* @return numerator
|
||||||
*/
|
*/
|
||||||
public int getNum() {
|
public int getNum() {
|
||||||
@@ -50,6 +52,7 @@ public class TJScalingFactor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns denominator
|
* Returns denominator
|
||||||
|
*
|
||||||
* @return denominator
|
* @return denominator
|
||||||
*/
|
*/
|
||||||
public int getDenom() {
|
public int getDenom() {
|
||||||
@@ -60,7 +63,8 @@ public class TJScalingFactor {
|
|||||||
* Returns the scaled value of <code>dimension</code>. This function
|
* Returns the scaled value of <code>dimension</code>. This function
|
||||||
* performs the integer equivalent of
|
* performs the integer equivalent of
|
||||||
* <code>ceil(dimension * scalingFactor)</code>.
|
* <code>ceil(dimension * scalingFactor)</code>.
|
||||||
* @return the scaled value of <code>dimension</code>
|
*
|
||||||
|
* @return the scaled value of <code>dimension</code>.
|
||||||
*/
|
*/
|
||||||
public int getScaled(int dimension) {
|
public int getScaled(int dimension) {
|
||||||
return (dimension * num + denom - 1) / denom;
|
return (dimension * num + denom - 1) / denom;
|
||||||
@@ -69,21 +73,23 @@ public class TJScalingFactor {
|
|||||||
/**
|
/**
|
||||||
* Returns true or false, depending on whether this instance and
|
* Returns true or false, depending on whether this instance and
|
||||||
* <code>other</code> have the same numerator and denominator.
|
* <code>other</code> have the same numerator and denominator.
|
||||||
|
*
|
||||||
* @return true or false, depending on whether this instance and
|
* @return true or false, depending on whether this instance and
|
||||||
* <code>other</code> have the same numerator and denominator
|
* <code>other</code> have the same numerator and denominator.
|
||||||
*/
|
*/
|
||||||
public boolean equals(TJScalingFactor other) {
|
public boolean equals(TJScalingFactor other) {
|
||||||
return (this.num == other.num && this.denom == other.denom);
|
return this.num == other.num && this.denom == other.denom;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true or false, depending on whether this instance is equal to
|
* Returns true or false, depending on whether this instance is equal to
|
||||||
* 1/1.
|
* 1/1.
|
||||||
|
*
|
||||||
* @return true or false, depending on whether this instance is equal to
|
* @return true or false, depending on whether this instance is equal to
|
||||||
* 1/1
|
* 1/1.
|
||||||
*/
|
*/
|
||||||
public boolean isOne() {
|
public boolean isOne() {
|
||||||
return (num == 1 && denom == 1);
|
return num == 1 && denom == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -95,4 +101,4 @@ public class TJScalingFactor {
|
|||||||
* Denominator
|
* Denominator
|
||||||
*/
|
*/
|
||||||
private int denom = 1;
|
private int denom = 1;
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ public class TJTransform extends Rectangle {
|
|||||||
* TJCustomFilter} interface, or null if no custom filter is needed
|
* TJCustomFilter} interface, or null if no custom filter is needed
|
||||||
*/
|
*/
|
||||||
public TJTransform(int x, int y, int w, int h, int op, int options,
|
public TJTransform(int x, int y, int w, int h, int op, int options,
|
||||||
TJCustomFilter cf) throws Exception {
|
TJCustomFilter cf) {
|
||||||
super(x, y, w, h);
|
super(x, y, w, h);
|
||||||
this.op = op;
|
this.op = op;
|
||||||
this.options = options;
|
this.options = options;
|
||||||
@@ -184,7 +184,7 @@ public class TJTransform extends Rectangle {
|
|||||||
* TJCustomFilter} interface, or null if no custom filter is needed
|
* TJCustomFilter} interface, or null if no custom filter is needed
|
||||||
*/
|
*/
|
||||||
public TJTransform(Rectangle r, int op, int options,
|
public TJTransform(Rectangle r, int op, int options,
|
||||||
TJCustomFilter cf) throws Exception {
|
TJCustomFilter cf) {
|
||||||
super(r);
|
super(r);
|
||||||
this.op = op;
|
this.op = op;
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2011, 2013-2014 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2011, 2013-2015 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -36,7 +37,7 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
/**
|
/**
|
||||||
* Create a TurboJPEG lossless transformer instance.
|
* Create a TurboJPEG lossless transformer instance.
|
||||||
*/
|
*/
|
||||||
public TJTransformer() throws Exception {
|
public TJTransformer() throws TJException {
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,11 +46,11 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
* image stored in <code>jpegImage</code> with the newly created instance.
|
* image stored in <code>jpegImage</code> with the newly created instance.
|
||||||
*
|
*
|
||||||
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
||||||
* be the length of the array)
|
* be the length of the array.) This buffer is not modified.
|
||||||
*/
|
*/
|
||||||
public TJTransformer(byte[] jpegImage) throws Exception {
|
public TJTransformer(byte[] jpegImage) throws TJException {
|
||||||
init();
|
init();
|
||||||
setJPEGImage(jpegImage, jpegImage.length);
|
setSourceImage(jpegImage, jpegImage.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,13 +58,13 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
* image of length <code>imageSize</code> bytes stored in
|
* image of length <code>imageSize</code> bytes stored in
|
||||||
* <code>jpegImage</code> with the newly created instance.
|
* <code>jpegImage</code> with the newly created instance.
|
||||||
*
|
*
|
||||||
* @param jpegImage JPEG image buffer
|
* @param jpegImage JPEG image buffer. This buffer is not modified.
|
||||||
*
|
*
|
||||||
* @param imageSize size of the JPEG image (in bytes)
|
* @param imageSize size of the JPEG image (in bytes)
|
||||||
*/
|
*/
|
||||||
public TJTransformer(byte[] jpegImage, int imageSize) throws Exception {
|
public TJTransformer(byte[] jpegImage, int imageSize) throws TJException {
|
||||||
init();
|
init();
|
||||||
setJPEGImage(jpegImage, imageSize);
|
setSourceImage(jpegImage, imageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -94,9 +95,9 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*/
|
*/
|
||||||
public void transform(byte[][] dstBufs, TJTransform[] transforms,
|
public void transform(byte[][] dstBufs, TJTransform[] transforms,
|
||||||
int flags) throws Exception {
|
int flags) throws TJException {
|
||||||
if (jpegBuf == null)
|
if (jpegBuf == null)
|
||||||
throw new Exception("JPEG buffer not initialized");
|
throw new IllegalStateException("JPEG buffer not initialized");
|
||||||
transformedSizes = transform(jpegBuf, jpegBufSize, dstBufs, transforms,
|
transformedSizes = transform(jpegBuf, jpegBufSize, dstBufs, transforms,
|
||||||
flags);
|
flags);
|
||||||
}
|
}
|
||||||
@@ -111,16 +112,16 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
* corresponding transformed output image
|
* corresponding transformed output image
|
||||||
*
|
*
|
||||||
* @return an array of {@link TJDecompressor} instances, each of
|
* @return an array of {@link TJDecompressor} instances, each of
|
||||||
* which has a transformed JPEG image associated with it
|
* which has a transformed JPEG image associated with it.
|
||||||
*
|
*
|
||||||
* @param flags the bitwise OR of one or more of
|
* @param flags the bitwise OR of one or more of
|
||||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||||
*/
|
*/
|
||||||
public TJDecompressor[] transform(TJTransform[] transforms, int flags)
|
public TJDecompressor[] transform(TJTransform[] transforms, int flags)
|
||||||
throws Exception {
|
throws TJException {
|
||||||
byte[][] dstBufs = new byte[transforms.length][];
|
byte[][] dstBufs = new byte[transforms.length][];
|
||||||
if (jpegWidth < 1 || jpegHeight < 1)
|
if (jpegWidth < 1 || jpegHeight < 1)
|
||||||
throw new Exception("JPEG buffer not initialized");
|
throw new IllegalStateException("JPEG buffer not initialized");
|
||||||
for (int i = 0; i < transforms.length; i++) {
|
for (int i = 0; i < transforms.length; i++) {
|
||||||
int w = jpegWidth, h = jpegHeight;
|
int w = jpegWidth, h = jpegHeight;
|
||||||
if ((transforms[i].options & TJTransform.OPT_CROP) != 0) {
|
if ((transforms[i].options & TJTransform.OPT_CROP) != 0) {
|
||||||
@@ -141,22 +142,22 @@ public class TJTransformer extends TJDecompressor {
|
|||||||
* generated by the most recent transform operation.
|
* generated by the most recent transform operation.
|
||||||
*
|
*
|
||||||
* @return an array containing the sizes of the transformed JPEG images
|
* @return an array containing the sizes of the transformed JPEG images
|
||||||
* generated by the most recent transform operation
|
* generated by the most recent transform operation.
|
||||||
*/
|
*/
|
||||||
public int[] getTransformedSizes() throws Exception {
|
public int[] getTransformedSizes() {
|
||||||
if (transformedSizes == null)
|
if (transformedSizes == null)
|
||||||
throw new Exception("No image has been transformed yet");
|
throw new IllegalStateException("No image has been transformed yet");
|
||||||
return transformedSizes;
|
return transformedSizes;
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void init() throws Exception;
|
private native void init() throws TJException;
|
||||||
|
|
||||||
private native int[] transform(byte[] srcBuf, int srcSize, byte[][] dstBufs,
|
private native int[] transform(byte[] srcBuf, int srcSize, byte[][] dstBufs,
|
||||||
TJTransform[] transforms, int flags) throws Exception;
|
TJTransform[] transforms, int flags) throws TJException;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TJLoader.load();
|
TJLoader.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int[] transformedSizes = null;
|
private int[] transformedSizes = null;
|
||||||
};
|
}
|
||||||
|
|||||||
443
java/org/libjpegturbo/turbojpeg/YUVImage.java
Normal file
443
java/org/libjpegturbo/turbojpeg/YUVImage.java
Normal file
@@ -0,0 +1,443 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C)2014, 2017 D. R. Commander. All Rights Reserved.
|
||||||
|
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.libjpegturbo.turbojpeg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class encapsulates a YUV planar image and the metadata
|
||||||
|
* associated with it. The TurboJPEG API allows both the JPEG compression and
|
||||||
|
* decompression pipelines to be split into stages: YUV encode, compress from
|
||||||
|
* YUV, decompress to YUV, and YUV decode. A <code>YUVImage</code> instance
|
||||||
|
* serves as the destination image for YUV encode and decompress-to-YUV
|
||||||
|
* operations and as the source image for compress-from-YUV and YUV decode
|
||||||
|
* operations.
|
||||||
|
* <p>
|
||||||
|
* Technically, the JPEG format uses the YCbCr colorspace (which technically is
|
||||||
|
* not a "colorspace" but rather a "color transform"), but per the convention
|
||||||
|
* of the digital video community, the TurboJPEG API uses "YUV" to refer to an
|
||||||
|
* image format consisting of Y, Cb, and Cr image planes.
|
||||||
|
* <p>
|
||||||
|
* Each plane is simply a 2D array of bytes, each byte representing the value
|
||||||
|
* of one of the components (Y, Cb, or Cr) at a particular location in the
|
||||||
|
* image. The width and height of each plane are determined by the image
|
||||||
|
* width, height, and level of chrominance subsampling. The luminance plane
|
||||||
|
* width is the image width padded to the nearest multiple of the horizontal
|
||||||
|
* subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of
|
||||||
|
* 4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane
|
||||||
|
* height is the image height padded to the nearest multiple of the vertical
|
||||||
|
* subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4
|
||||||
|
* or grayscale.) The chrominance plane width is equal to the luminance plane
|
||||||
|
* width divided by the horizontal subsampling factor, and the chrominance
|
||||||
|
* plane height is equal to the luminance plane height divided by the vertical
|
||||||
|
* subsampling factor.
|
||||||
|
* <p>
|
||||||
|
* For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
|
||||||
|
* used, then the luminance plane would be 36 x 35 bytes, and each of the
|
||||||
|
* chrominance planes would be 18 x 35 bytes. If you specify a line padding of
|
||||||
|
* 4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, and
|
||||||
|
* each of the chrominance planes would be 20 x 35 bytes.
|
||||||
|
*/
|
||||||
|
public class YUVImage {
|
||||||
|
|
||||||
|
private static final String NO_ASSOC_ERROR =
|
||||||
|
"No image data is associated with this instance";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new <code>YUVImage</code> instance backed by separate image
|
||||||
|
* planes, and allocate memory for the image planes.
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
|
* per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
* for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||||
|
* strides for all planes will be set to their respective plane widths. When
|
||||||
|
* using this constructor, the stride for each plane must be equal to or
|
||||||
|
* greater than the plane width.
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
||||||
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
|
*/
|
||||||
|
public YUVImage(int width, int[] strides, int height, int subsamp) {
|
||||||
|
setBuf(null, null, width, strides, height, subsamp, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new <code>YUVImage</code> instance backed by a unified image
|
||||||
|
* buffer, and allocate memory for the image buffer.
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param pad Each line of each plane in the YUV image buffer will be padded
|
||||||
|
* to this number of bytes (must be a power of 2.)
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
||||||
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
|
*/
|
||||||
|
public YUVImage(int width, int pad, int height, int subsamp) {
|
||||||
|
setBuf(new byte[TJ.bufSizeYUV(width, pad, height, subsamp)], width, pad,
|
||||||
|
height, subsamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new <code>YUVImage</code> instance from a set of existing image
|
||||||
|
* planes.
|
||||||
|
*
|
||||||
|
* @param planes an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||||
|
* image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
|
* planes can be contiguous or non-contiguous in memory. Plane
|
||||||
|
* <code>i</code> should be at least <code>offsets[i] +
|
||||||
|
* {@link TJ#planeSizeYUV TJ.planeSizeYUV}(i, width, strides[i], height, subsamp)</code>
|
||||||
|
* bytes in size.
|
||||||
|
*
|
||||||
|
* @param offsets If this <code>YUVImage</code> instance represents a
|
||||||
|
* subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||||
|
* offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||||
|
* larger image. Setting this to null is the same as setting the offsets for
|
||||||
|
* all planes to 0.
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the new YUV image (or subregion)
|
||||||
|
*
|
||||||
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
|
* per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
* for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||||
|
* strides for all planes will be set to their respective plane widths. You
|
||||||
|
* can adjust the strides in order to add an arbitrary amount of line padding
|
||||||
|
* to each plane or to specify that this <code>YUVImage</code> instance is a
|
||||||
|
* subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||||
|
* be set to the plane width of plane <code>i</code> in the larger image.)
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the new YUV image (or subregion)
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
|
*/
|
||||||
|
public YUVImage(byte[][] planes, int[] offsets, int width, int[] strides,
|
||||||
|
int height, int subsamp) {
|
||||||
|
setBuf(planes, offsets, width, strides, height, subsamp, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new <code>YUVImage</code> instance from an existing unified image
|
||||||
|
* buffer.
|
||||||
|
*
|
||||||
|
* @param yuvImage image buffer that contains or will contain YUV planar
|
||||||
|
* image data. Use {@link TJ#bufSizeYUV} to determine the minimum size for
|
||||||
|
* this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
||||||
|
* sequentially in the buffer (see {@link YUVImage above} for a description
|
||||||
|
* of the image format.)
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param pad the line padding used in the YUV image buffer. For
|
||||||
|
* instance, if each line in each plane of the buffer is padded to the
|
||||||
|
* nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
|
*/
|
||||||
|
public YUVImage(byte[] yuvImage, int width, int pad, int height,
|
||||||
|
int subsamp) {
|
||||||
|
setBuf(yuvImage, width, pad, height, subsamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assign a set of image planes to this <code>YUVImage</code> instance.
|
||||||
|
*
|
||||||
|
* @param planes an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||||
|
* image planes (or just the Y plane, if the image is grayscale.) These
|
||||||
|
* planes can be contiguous or non-contiguous in memory. Plane
|
||||||
|
* <code>i</code> should be at least <code>offsets[i] +
|
||||||
|
* {@link TJ#planeSizeYUV TJ.planeSizeYUV}(i, width, strides[i], height, subsamp)</code>
|
||||||
|
* bytes in size.
|
||||||
|
*
|
||||||
|
* @param offsets If this <code>YUVImage</code> instance represents a
|
||||||
|
* subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||||
|
* offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||||
|
* larger image. Setting this to null is the same as setting the offsets for
|
||||||
|
* all planes to 0.
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image (or subregion)
|
||||||
|
*
|
||||||
|
* @param strides an array of integers, each specifying the number of bytes
|
||||||
|
* per line in the corresponding plane of the YUV image. Setting the stride
|
||||||
|
* for any plane to 0 is the same as setting it to the plane width (see
|
||||||
|
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||||
|
* strides for all planes will be set to their respective plane widths. You
|
||||||
|
* can adjust the strides in order to add an arbitrary amount of line padding
|
||||||
|
* to each plane or to specify that this <code>YUVImage</code> image is a
|
||||||
|
* subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||||
|
* be set to the plane width of plane <code>i</code> in the larger image.)
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image (or subregion)
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
|
*/
|
||||||
|
public void setBuf(byte[][] planes, int[] offsets, int width, int strides[],
|
||||||
|
int height, int subsamp) {
|
||||||
|
setBuf(planes, offsets, width, strides, height, subsamp, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setBuf(byte[][] planes, int[] offsets, int width, int strides[],
|
||||||
|
int height, int subsamp, boolean alloc) {
|
||||||
|
if ((planes == null && !alloc) || width < 1 || height < 1 || subsamp < 0 ||
|
||||||
|
subsamp >= TJ.NUMSAMP)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
||||||
|
|
||||||
|
int nc = (subsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
|
if ((planes != null && planes.length != nc) ||
|
||||||
|
(offsets != null && offsets.length != nc) ||
|
||||||
|
(strides != null && strides.length != nc))
|
||||||
|
throw new IllegalArgumentException("YUVImage::setBuf(): planes, offsets, or strides array is the wrong size");
|
||||||
|
|
||||||
|
if (planes == null)
|
||||||
|
planes = new byte[nc][];
|
||||||
|
if (offsets == null)
|
||||||
|
offsets = new int[nc];
|
||||||
|
if (strides == null)
|
||||||
|
strides = new int[nc];
|
||||||
|
|
||||||
|
for (int i = 0; i < nc; i++) {
|
||||||
|
int pw = TJ.planeWidth(i, width, subsamp);
|
||||||
|
int ph = TJ.planeHeight(i, height, subsamp);
|
||||||
|
int planeSize = TJ.planeSizeYUV(i, width, strides[i], height, subsamp);
|
||||||
|
|
||||||
|
if (strides[i] == 0)
|
||||||
|
strides[i] = pw;
|
||||||
|
if (alloc) {
|
||||||
|
if (strides[i] < pw)
|
||||||
|
throw new IllegalArgumentException("Stride must be >= plane width when allocating a new YUV image");
|
||||||
|
planes[i] = new byte[strides[i] * ph];
|
||||||
|
}
|
||||||
|
if (planes[i] == null || offsets[i] < 0)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
||||||
|
if (strides[i] < 0 && offsets[i] - planeSize + pw < 0)
|
||||||
|
throw new IllegalArgumentException("Stride for plane " + i + " would cause memory to be accessed below plane boundary");
|
||||||
|
if (planes[i].length < offsets[i] + planeSize)
|
||||||
|
throw new IllegalArgumentException("Image plane " + i + " is not large enough");
|
||||||
|
}
|
||||||
|
|
||||||
|
yuvPlanes = planes;
|
||||||
|
yuvOffsets = offsets;
|
||||||
|
yuvWidth = width;
|
||||||
|
yuvStrides = strides;
|
||||||
|
yuvHeight = height;
|
||||||
|
yuvSubsamp = subsamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assign a unified image buffer to this <code>YUVImage</code> instance.
|
||||||
|
*
|
||||||
|
* @param yuvImage image buffer that contains or will contain YUV planar
|
||||||
|
* image data. Use {@link TJ#bufSizeYUV} to determine the minimum size for
|
||||||
|
* this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
||||||
|
* sequentially in the buffer (see {@link YUVImage above} for a description
|
||||||
|
* of the image format.)
|
||||||
|
*
|
||||||
|
* @param width width (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param pad the line padding used in the YUV image buffer. For
|
||||||
|
* instance, if each line in each plane of the buffer is padded to the
|
||||||
|
* nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.
|
||||||
|
*
|
||||||
|
* @param height height (in pixels) of the YUV image
|
||||||
|
*
|
||||||
|
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||||
|
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||||
|
*/
|
||||||
|
public void setBuf(byte[] yuvImage, int width, int pad, int height,
|
||||||
|
int subsamp) {
|
||||||
|
if (yuvImage == null || width < 1 || pad < 1 || ((pad & (pad - 1)) != 0) ||
|
||||||
|
height < 1 || subsamp < 0 || subsamp >= TJ.NUMSAMP)
|
||||||
|
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
||||||
|
if (yuvImage.length < TJ.bufSizeYUV(width, pad, height, subsamp))
|
||||||
|
throw new IllegalArgumentException("YUV image buffer is not large enough");
|
||||||
|
|
||||||
|
int nc = (subsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
|
byte[][] planes = new byte[nc][];
|
||||||
|
int[] strides = new int[nc];
|
||||||
|
int[] offsets = new int[nc];
|
||||||
|
|
||||||
|
planes[0] = yuvImage;
|
||||||
|
strides[0] = PAD(TJ.planeWidth(0, width, subsamp), pad);
|
||||||
|
if (subsamp != TJ.SAMP_GRAY) {
|
||||||
|
strides[1] = strides[2] = PAD(TJ.planeWidth(1, width, subsamp), pad);
|
||||||
|
planes[1] = planes[2] = yuvImage;
|
||||||
|
offsets[1] = offsets[0] +
|
||||||
|
strides[0] * TJ.planeHeight(0, height, subsamp);
|
||||||
|
offsets[2] = offsets[1] +
|
||||||
|
strides[1] * TJ.planeHeight(1, height, subsamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
yuvPad = pad;
|
||||||
|
setBuf(planes, offsets, width, strides, height, subsamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the width of the YUV image (or subregion.)
|
||||||
|
*
|
||||||
|
* @return the width of the YUV image (or subregion)
|
||||||
|
*/
|
||||||
|
public int getWidth() {
|
||||||
|
if (yuvWidth < 1)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
return yuvWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the height of the YUV image (or subregion.)
|
||||||
|
*
|
||||||
|
* @return the height of the YUV image (or subregion)
|
||||||
|
*/
|
||||||
|
public int getHeight() {
|
||||||
|
if (yuvHeight < 1)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
return yuvHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the line padding used in the YUV image buffer (if this image is
|
||||||
|
* stored in a unified buffer rather than separate image planes.)
|
||||||
|
*
|
||||||
|
* @return the line padding used in the YUV image buffer
|
||||||
|
*/
|
||||||
|
public int getPad() {
|
||||||
|
if (yuvPlanes == null)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
if (yuvPad < 1 || ((yuvPad & (yuvPad - 1)) != 0))
|
||||||
|
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||||
|
return yuvPad;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of bytes per line of each plane in the YUV image.
|
||||||
|
*
|
||||||
|
* @return the number of bytes per line of each plane in the YUV image
|
||||||
|
*/
|
||||||
|
public int[] getStrides() {
|
||||||
|
if (yuvStrides == null)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
return yuvStrides;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
* YUV image.
|
||||||
|
*
|
||||||
|
* @return the offsets (in bytes) of each plane within the planes of a larger
|
||||||
|
* YUV image
|
||||||
|
*/
|
||||||
|
public int[] getOffsets() {
|
||||||
|
if (yuvOffsets == null)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
return yuvOffsets;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the level of chrominance subsampling used in the YUV image. See
|
||||||
|
* {@link TJ#SAMP_444 TJ.SAMP_*}.
|
||||||
|
*
|
||||||
|
* @return the level of chrominance subsampling used in the YUV image
|
||||||
|
*/
|
||||||
|
public int getSubsamp() {
|
||||||
|
if (yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
return yuvSubsamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the YUV image planes. If the image is stored in a unified buffer,
|
||||||
|
* then all image planes will point to that buffer.
|
||||||
|
*
|
||||||
|
* @return the YUV image planes
|
||||||
|
*/
|
||||||
|
public byte[][] getPlanes() {
|
||||||
|
if (yuvPlanes == null)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
return yuvPlanes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the YUV image buffer (if this image is stored in a unified
|
||||||
|
* buffer rather than separate image planes.)
|
||||||
|
*
|
||||||
|
* @return the YUV image buffer
|
||||||
|
*/
|
||||||
|
public byte[] getBuf() {
|
||||||
|
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
int nc = (yuvSubsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
|
for (int i = 1; i < nc; i++) {
|
||||||
|
if (yuvPlanes[i] != yuvPlanes[0])
|
||||||
|
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||||
|
}
|
||||||
|
return yuvPlanes[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||||
|
* stored in a unified buffer rather than separate image planes.)
|
||||||
|
*
|
||||||
|
* @return the size (in bytes) of the YUV image buffer
|
||||||
|
*/
|
||||||
|
public int getSize() {
|
||||||
|
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||||
|
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||||
|
int nc = (yuvSubsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||||
|
if (yuvPad < 1)
|
||||||
|
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||||
|
for (int i = 1; i < nc; i++) {
|
||||||
|
if (yuvPlanes[i] != yuvPlanes[0])
|
||||||
|
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||||
|
}
|
||||||
|
return TJ.bufSizeYUV(yuvWidth, yuvPad, yuvHeight, yuvSubsamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int PAD(int v, int p) {
|
||||||
|
return (v + p - 1) & (~(p - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected long handle = 0;
|
||||||
|
protected byte[][] yuvPlanes = null;
|
||||||
|
protected int[] yuvOffsets = null;
|
||||||
|
protected int[] yuvStrides = null;
|
||||||
|
protected int yuvPad = 0;
|
||||||
|
protected int yuvWidth = 0;
|
||||||
|
protected int yuvHeight = 0;
|
||||||
|
protected int yuvSubsamp = -1;
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_NUMSAMP
|
#undef org_libjpegturbo_turbojpeg_TJ_NUMSAMP
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_NUMSAMP 5L
|
#define org_libjpegturbo_turbojpeg_TJ_NUMSAMP 6L
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_444
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_444
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_SAMP_444 0L
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_444 0L
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_422
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_422
|
||||||
@@ -19,8 +19,10 @@ extern "C" {
|
|||||||
#define org_libjpegturbo_turbojpeg_TJ_SAMP_GRAY 3L
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_GRAY 3L
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_440
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_440
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_SAMP_440 4L
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_440 4L
|
||||||
|
#undef org_libjpegturbo_turbojpeg_TJ_SAMP_411
|
||||||
|
#define org_libjpegturbo_turbojpeg_TJ_SAMP_411 5L
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_NUMPF
|
#undef org_libjpegturbo_turbojpeg_TJ_NUMPF
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_NUMPF 11L
|
#define org_libjpegturbo_turbojpeg_TJ_NUMPF 12L
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_PF_RGB
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_RGB
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_PF_RGB 0L
|
#define org_libjpegturbo_turbojpeg_TJ_PF_RGB 0L
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_PF_BGR
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_BGR
|
||||||
@@ -43,16 +45,22 @@ extern "C" {
|
|||||||
#define org_libjpegturbo_turbojpeg_TJ_PF_ABGR 9L
|
#define org_libjpegturbo_turbojpeg_TJ_PF_ABGR 9L
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_PF_ARGB
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_ARGB
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_PF_ARGB 10L
|
#define org_libjpegturbo_turbojpeg_TJ_PF_ARGB 10L
|
||||||
|
#undef org_libjpegturbo_turbojpeg_TJ_PF_CMYK
|
||||||
|
#define org_libjpegturbo_turbojpeg_TJ_PF_CMYK 11L
|
||||||
|
#undef org_libjpegturbo_turbojpeg_TJ_NUMCS
|
||||||
|
#define org_libjpegturbo_turbojpeg_TJ_NUMCS 5L
|
||||||
|
#undef org_libjpegturbo_turbojpeg_TJ_CS_RGB
|
||||||
|
#define org_libjpegturbo_turbojpeg_TJ_CS_RGB 0L
|
||||||
|
#undef org_libjpegturbo_turbojpeg_TJ_CS_YCbCr
|
||||||
|
#define org_libjpegturbo_turbojpeg_TJ_CS_YCbCr 1L
|
||||||
|
#undef org_libjpegturbo_turbojpeg_TJ_CS_GRAY
|
||||||
|
#define org_libjpegturbo_turbojpeg_TJ_CS_GRAY 2L
|
||||||
|
#undef org_libjpegturbo_turbojpeg_TJ_CS_CMYK
|
||||||
|
#define org_libjpegturbo_turbojpeg_TJ_CS_CMYK 3L
|
||||||
|
#undef org_libjpegturbo_turbojpeg_TJ_CS_YCCK
|
||||||
|
#define org_libjpegturbo_turbojpeg_TJ_CS_YCCK 4L
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_BOTTOMUP
|
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_BOTTOMUP
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_FLAG_BOTTOMUP 2L
|
#define org_libjpegturbo_turbojpeg_TJ_FLAG_BOTTOMUP 2L
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCEMMX
|
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCEMMX 8L
|
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE
|
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE 16L
|
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE2
|
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE2 32L
|
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE3
|
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_FLAG_FORCESSE3 128L
|
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FASTUPSAMPLE
|
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FASTUPSAMPLE
|
||||||
#define org_libjpegturbo_turbojpeg_TJ_FLAG_FASTUPSAMPLE 256L
|
#define org_libjpegturbo_turbojpeg_TJ_FLAG_FASTUPSAMPLE 256L
|
||||||
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FASTDCT
|
#undef org_libjpegturbo_turbojpeg_TJ_FLAG_FASTDCT
|
||||||
@@ -67,12 +75,44 @@ extern "C" {
|
|||||||
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSize
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSize
|
||||||
(JNIEnv *, jclass, jint, jint, jint);
|
(JNIEnv *, jclass, jint, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
||||||
|
* Method: bufSizeYUV
|
||||||
|
* Signature: (IIII)I
|
||||||
|
*/
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__IIII
|
||||||
|
(JNIEnv *, jclass, jint, jint, jint, jint);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJ
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
||||||
* Method: bufSizeYUV
|
* Method: bufSizeYUV
|
||||||
* Signature: (III)I
|
* Signature: (III)I
|
||||||
*/
|
*/
|
||||||
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_bufSizeYUV__III
|
||||||
|
(JNIEnv *, jclass, jint, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
||||||
|
* Method: planeSizeYUV
|
||||||
|
* Signature: (IIIII)I
|
||||||
|
*/
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeSizeYUV__IIIII
|
||||||
|
(JNIEnv *, jclass, jint, jint, jint, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
||||||
|
* Method: planeWidth
|
||||||
|
* Signature: (III)I
|
||||||
|
*/
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeWidth__III
|
||||||
|
(JNIEnv *, jclass, jint, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJ
|
||||||
|
* Method: planeHeight
|
||||||
|
* Signature: (III)I
|
||||||
|
*/
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJ_planeHeight__III
|
||||||
(JNIEnv *, jclass, jint, jint, jint);
|
(JNIEnv *, jclass, jint, jint, jint);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -55,6 +55,14 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compress___3
|
|||||||
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compress___3IIIIIII_3BIII
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compress___3IIIIIII_3BIII
|
||||||
(JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jint, jint, jbyteArray, jint, jint, jint);
|
(JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jint, jint, jbyteArray, jint, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||||
|
* Method: compressFromYUV
|
||||||
|
* Signature: ([[B[II[III[BII)I
|
||||||
|
*/
|
||||||
|
JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compressFromYUV___3_3B_3II_3III_3BII
|
||||||
|
(JNIEnv *, jobject, jobjectArray, jintArray, jint, jintArray, jint, jint, jbyteArray, jint, jint);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||||
* Method: encodeYUV
|
* Method: encodeYUV
|
||||||
@@ -63,6 +71,14 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_compress___3
|
|||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIII_3BII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIII_3BII
|
||||||
(JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint, jbyteArray, jint, jint);
|
(JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint, jbyteArray, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||||
|
* Method: encodeYUV
|
||||||
|
* Signature: ([BIIIIII[[B[I[III)V
|
||||||
|
*/
|
||||||
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3BIIIIII_3_3B_3I_3III
|
||||||
|
(JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint, jint, jint, jobjectArray, jintArray, jintArray, jint, jint);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||||
* Method: encodeYUV
|
* Method: encodeYUV
|
||||||
@@ -71,6 +87,14 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___
|
|||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIII_3BII
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIII_3BII
|
||||||
(JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jbyteArray, jint, jint);
|
(JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jbyteArray, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJCompressor
|
||||||
|
* Method: encodeYUV
|
||||||
|
* Signature: ([IIIIIII[[B[I[III)V
|
||||||
|
*/
|
||||||
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJCompressor_encodeYUV___3IIIIIII_3_3B_3I_3III
|
||||||
|
(JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jint, jint, jobjectArray, jintArray, jintArray, jint, jint);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -68,9 +68,33 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
|
|||||||
* Method: decompressToYUV
|
* Method: decompressToYUV
|
||||||
* Signature: ([BI[BI)V
|
* Signature: ([BI[BI)V
|
||||||
*/
|
*/
|
||||||
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3BI
|
||||||
(JNIEnv *, jobject, jbyteArray, jint, jbyteArray, jint);
|
(JNIEnv *, jobject, jbyteArray, jint, jbyteArray, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
||||||
|
* Method: decompressToYUV
|
||||||
|
* Signature: ([BI[[B[II[III)V
|
||||||
|
*/
|
||||||
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompressToYUV___3BI_3_3B_3II_3III
|
||||||
|
(JNIEnv *, jobject, jbyteArray, jint, jobjectArray, jintArray, jint, jintArray, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
||||||
|
* Method: decodeYUV
|
||||||
|
* Signature: ([[B[I[II[BIIIIIII)V
|
||||||
|
*/
|
||||||
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3_3B_3I_3II_3BIIIIIII
|
||||||
|
(JNIEnv *, jobject, jobjectArray, jintArray, jintArray, jint, jbyteArray, jint, jint, jint, jint, jint, jint, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org_libjpegturbo_turbojpeg_TJDecompressor
|
||||||
|
* Method: decodeYUV
|
||||||
|
* Signature: ([[B[I[II[IIIIIIII)V
|
||||||
|
*/
|
||||||
|
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decodeYUV___3_3B_3I_3II_3IIIIIIII
|
||||||
|
(JNIEnv *, jobject, jobjectArray, jintArray, jintArray, jint, jintArray, jint, jint, jint, jint, jint, jint, jint);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
15
jcapimin.c
15
jcapimin.c
@@ -1,10 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* jcapimin.c
|
* jcapimin.c
|
||||||
*
|
*
|
||||||
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1994-1998, Thomas G. Lane.
|
* Copyright (C) 1994-1998, Thomas G. Lane.
|
||||||
* Modified 2003-2010 by Guido Vollbeding.
|
* Modified 2003-2010 by Guido Vollbeding.
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* It was modified by The libjpeg-turbo Project to include only code relevant
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* to libjpeg-turbo.
|
||||||
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* file.
|
||||||
*
|
*
|
||||||
* This file contains application interface code for the compression half
|
* This file contains application interface code for the compression half
|
||||||
* of the JPEG library. These are the "minimum" API routines that may be
|
* of the JPEG library. These are the "minimum" API routines that may be
|
||||||
@@ -36,9 +39,9 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
|
|||||||
cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */
|
cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */
|
||||||
if (version != JPEG_LIB_VERSION)
|
if (version != JPEG_LIB_VERSION)
|
||||||
ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
|
ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
|
||||||
if (structsize != SIZEOF(struct jpeg_compress_struct))
|
if (structsize != sizeof(struct jpeg_compress_struct))
|
||||||
ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE,
|
ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE,
|
||||||
(int) SIZEOF(struct jpeg_compress_struct), (int) structsize);
|
(int) sizeof(struct jpeg_compress_struct), (int) structsize);
|
||||||
|
|
||||||
/* For debugging purposes, we zero the whole master structure.
|
/* For debugging purposes, we zero the whole master structure.
|
||||||
* But the application has already set the err pointer, and may have set
|
* But the application has already set the err pointer, and may have set
|
||||||
@@ -49,7 +52,7 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
|
|||||||
{
|
{
|
||||||
struct jpeg_error_mgr *err = cinfo->err;
|
struct jpeg_error_mgr *err = cinfo->err;
|
||||||
void *client_data = cinfo->client_data; /* ignore Purify complaint here */
|
void *client_data = cinfo->client_data; /* ignore Purify complaint here */
|
||||||
MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct));
|
MEMZERO(cinfo, sizeof(struct jpeg_compress_struct));
|
||||||
cinfo->err = err;
|
cinfo->err = err;
|
||||||
cinfo->client_data = client_data;
|
cinfo->client_data = client_data;
|
||||||
}
|
}
|
||||||
@@ -204,7 +207,7 @@ GLOBAL(void)
|
|||||||
jpeg_write_marker (j_compress_ptr cinfo, int marker,
|
jpeg_write_marker (j_compress_ptr cinfo, int marker,
|
||||||
const JOCTET *dataptr, unsigned int datalen)
|
const JOCTET *dataptr, unsigned int datalen)
|
||||||
{
|
{
|
||||||
JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val));
|
void (*write_marker_byte) (j_compress_ptr info, int val);
|
||||||
|
|
||||||
if (cinfo->next_scanline != 0 ||
|
if (cinfo->next_scanline != 0 ||
|
||||||
(cinfo->global_state != CSTATE_SCANNING &&
|
(cinfo->global_state != CSTATE_SCANNING &&
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||||
* 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.ijg
|
||||||
|
* file.
|
||||||
*
|
*
|
||||||
* This file contains application interface code for the compression half
|
* This file contains application interface code for the compression half
|
||||||
* of the JPEG library. These are the "standard" API routines that are
|
* of the JPEG library. These are the "standard" API routines that are
|
||||||
|
|||||||
25
jcarith.c
25
jcarith.c
@@ -1,9 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* jcarith.c
|
* jcarith.c
|
||||||
*
|
*
|
||||||
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Developed 1997-2009 by Guido Vollbeding.
|
* Developed 1997-2009 by Guido Vollbeding.
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* libjpeg-turbo Modifications:
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* Copyright (C) 2015, D. R. Commander.
|
||||||
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* file.
|
||||||
*
|
*
|
||||||
* This file contains portable arithmetic entropy encoding routines for JPEG
|
* This file contains portable arithmetic entropy encoding routines for JPEG
|
||||||
* (implementing the ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81).
|
* (implementing the ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81).
|
||||||
@@ -23,10 +26,10 @@
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
struct jpeg_entropy_encoder pub; /* public fields */
|
struct jpeg_entropy_encoder pub; /* public fields */
|
||||||
|
|
||||||
INT32 c; /* C register, base of coding interval, layout as in sec. D.1.3 */
|
JLONG c; /* C register, base of coding interval, layout as in sec. D.1.3 */
|
||||||
INT32 a; /* A register, normalized size of coding interval */
|
JLONG a; /* A register, normalized size of coding interval */
|
||||||
INT32 sc; /* counter for stacked 0xFF values which might overflow */
|
JLONG sc; /* counter for stacked 0xFF values which might overflow */
|
||||||
INT32 zc; /* counter for pending 0x00 output values which might *
|
JLONG zc; /* counter for pending 0x00 output values which might *
|
||||||
* be discarded at the end ("Pacman" termination) */
|
* be discarded at the end ("Pacman" termination) */
|
||||||
int ct; /* bit shift counter, determines when next byte will be written */
|
int ct; /* bit shift counter, determines when next byte will be written */
|
||||||
int buffer; /* buffer for most recent output byte != 0xFF */
|
int buffer; /* buffer for most recent output byte != 0xFF */
|
||||||
@@ -95,8 +98,8 @@ typedef arith_entropy_encoder * arith_entropy_ptr;
|
|||||||
#define CALCULATE_SPECTRAL_CONDITIONING
|
#define CALCULATE_SPECTRAL_CONDITIONING
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32.
|
/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than JLONG.
|
||||||
* We assume that int right shift is unsigned if INT32 right shift is,
|
* We assume that int right shift is unsigned if JLONG right shift is,
|
||||||
* which should be safe.
|
* which should be safe.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -133,7 +136,7 @@ METHODDEF(void)
|
|||||||
finish_pass (j_compress_ptr cinfo)
|
finish_pass (j_compress_ptr cinfo)
|
||||||
{
|
{
|
||||||
arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;
|
arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;
|
||||||
INT32 temp;
|
JLONG temp;
|
||||||
|
|
||||||
/* Section D.1.8: Termination of encoding */
|
/* Section D.1.8: Termination of encoding */
|
||||||
|
|
||||||
@@ -220,7 +223,7 @@ arith_encode (j_compress_ptr cinfo, unsigned char *st, int val)
|
|||||||
{
|
{
|
||||||
register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;
|
register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;
|
||||||
register unsigned char nl, nm;
|
register unsigned char nl, nm;
|
||||||
register INT32 qe, temp;
|
register JLONG qe, temp;
|
||||||
register int sv;
|
register int sv;
|
||||||
|
|
||||||
/* Fetch values from our compact representation of Table D.2:
|
/* Fetch values from our compact representation of Table D.2:
|
||||||
@@ -909,7 +912,7 @@ jinit_arith_encoder (j_compress_ptr cinfo)
|
|||||||
|
|
||||||
entropy = (arith_entropy_ptr)
|
entropy = (arith_entropy_ptr)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
SIZEOF(arith_entropy_encoder));
|
sizeof(arith_entropy_encoder));
|
||||||
cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;
|
cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;
|
||||||
entropy->pub.start_pass = start_pass;
|
entropy->pub.start_pass = start_pass;
|
||||||
entropy->pub.finish_pass = finish_pass;
|
entropy->pub.finish_pass = finish_pass;
|
||||||
|
|||||||
38
jccoefct.c
38
jccoefct.c
@@ -1,9 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* jccoefct.c
|
* jccoefct.c
|
||||||
*
|
*
|
||||||
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* It was modified by The libjpeg-turbo Project to include only code and
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* information relevant to libjpeg-turbo.
|
||||||
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* file.
|
||||||
*
|
*
|
||||||
* This file contains the coefficient buffer controller for compression.
|
* This file contains the coefficient buffer controller for compression.
|
||||||
* This controller is the top level of the JPEG compressor proper.
|
* This controller is the top level of the JPEG compressor proper.
|
||||||
@@ -42,11 +45,8 @@ typedef struct {
|
|||||||
/* For single-pass compression, it's sufficient to buffer just one MCU
|
/* For single-pass compression, it's sufficient to buffer just one MCU
|
||||||
* (although this may prove a bit slow in practice). We allocate a
|
* (although this may prove a bit slow in practice). We allocate a
|
||||||
* workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each
|
* workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each
|
||||||
* MCU constructed and sent. (On 80x86, the workspace is FAR even though
|
* MCU constructed and sent. In multi-pass modes, this array points to the
|
||||||
* it's not really very big; this is to keep the module interfaces unchanged
|
* current MCU's blocks within the virtual arrays.
|
||||||
* when a large coefficient buffer is necessary.)
|
|
||||||
* In multi-pass modes, this array points to the current MCU's blocks
|
|
||||||
* within the virtual arrays.
|
|
||||||
*/
|
*/
|
||||||
JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU];
|
JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU];
|
||||||
|
|
||||||
@@ -59,12 +59,12 @@ typedef my_coef_controller * my_coef_ptr;
|
|||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
METHODDEF(boolean) compress_data
|
METHODDEF(boolean) compress_data
|
||||||
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
|
(j_compress_ptr cinfo, JSAMPIMAGE input_buf);
|
||||||
#ifdef FULL_COEF_BUFFER_SUPPORTED
|
#ifdef FULL_COEF_BUFFER_SUPPORTED
|
||||||
METHODDEF(boolean) compress_first_pass
|
METHODDEF(boolean) compress_first_pass
|
||||||
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
|
(j_compress_ptr cinfo, JSAMPIMAGE input_buf);
|
||||||
METHODDEF(boolean) compress_output
|
METHODDEF(boolean) compress_output
|
||||||
JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
|
(j_compress_ptr cinfo, JSAMPIMAGE input_buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -180,16 +180,16 @@ compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
|||||||
ypos, xpos, (JDIMENSION) blockcnt);
|
ypos, xpos, (JDIMENSION) blockcnt);
|
||||||
if (blockcnt < compptr->MCU_width) {
|
if (blockcnt < compptr->MCU_width) {
|
||||||
/* Create some dummy blocks at the right edge of the image. */
|
/* Create some dummy blocks at the right edge of the image. */
|
||||||
jzero_far((void FAR *) coef->MCU_buffer[blkn + blockcnt],
|
jzero_far((void *) coef->MCU_buffer[blkn + blockcnt],
|
||||||
(compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK));
|
(compptr->MCU_width - blockcnt) * sizeof(JBLOCK));
|
||||||
for (bi = blockcnt; bi < compptr->MCU_width; bi++) {
|
for (bi = blockcnt; bi < compptr->MCU_width; bi++) {
|
||||||
coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0];
|
coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Create a row of dummy blocks at the bottom of the image. */
|
/* Create a row of dummy blocks at the bottom of the image. */
|
||||||
jzero_far((void FAR *) coef->MCU_buffer[blkn],
|
jzero_far((void *) coef->MCU_buffer[blkn],
|
||||||
compptr->MCU_width * SIZEOF(JBLOCK));
|
compptr->MCU_width * sizeof(JBLOCK));
|
||||||
for (bi = 0; bi < compptr->MCU_width; bi++) {
|
for (bi = 0; bi < compptr->MCU_width; bi++) {
|
||||||
coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0];
|
coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0];
|
||||||
}
|
}
|
||||||
@@ -286,7 +286,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
|||||||
if (ndummy > 0) {
|
if (ndummy > 0) {
|
||||||
/* Create dummy blocks at the right edge of the image. */
|
/* Create dummy blocks at the right edge of the image. */
|
||||||
thisblockrow += blocks_across; /* => first dummy block */
|
thisblockrow += blocks_across; /* => first dummy block */
|
||||||
jzero_far((void FAR *) thisblockrow, ndummy * SIZEOF(JBLOCK));
|
jzero_far((void *) thisblockrow, ndummy * sizeof(JBLOCK));
|
||||||
lastDC = thisblockrow[-1][0];
|
lastDC = thisblockrow[-1][0];
|
||||||
for (bi = 0; bi < ndummy; bi++) {
|
for (bi = 0; bi < ndummy; bi++) {
|
||||||
thisblockrow[bi][0] = lastDC;
|
thisblockrow[bi][0] = lastDC;
|
||||||
@@ -305,8 +305,8 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
|||||||
block_row++) {
|
block_row++) {
|
||||||
thisblockrow = buffer[block_row];
|
thisblockrow = buffer[block_row];
|
||||||
lastblockrow = buffer[block_row-1];
|
lastblockrow = buffer[block_row-1];
|
||||||
jzero_far((void FAR *) thisblockrow,
|
jzero_far((void *) thisblockrow,
|
||||||
(size_t) (blocks_across * SIZEOF(JBLOCK)));
|
(size_t) (blocks_across * sizeof(JBLOCK)));
|
||||||
for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) {
|
for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) {
|
||||||
lastDC = lastblockrow[h_samp_factor-1][0];
|
lastDC = lastblockrow[h_samp_factor-1][0];
|
||||||
for (bi = 0; bi < h_samp_factor; bi++) {
|
for (bi = 0; bi < h_samp_factor; bi++) {
|
||||||
@@ -408,7 +408,7 @@ jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
|
|||||||
|
|
||||||
coef = (my_coef_ptr)
|
coef = (my_coef_ptr)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
SIZEOF(my_coef_controller));
|
sizeof(my_coef_controller));
|
||||||
cinfo->coef = (struct jpeg_c_coef_controller *) coef;
|
cinfo->coef = (struct jpeg_c_coef_controller *) coef;
|
||||||
coef->pub.start_pass = start_pass_coef;
|
coef->pub.start_pass = start_pass_coef;
|
||||||
|
|
||||||
@@ -440,7 +440,7 @@ jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
|
|||||||
|
|
||||||
buffer = (JBLOCKROW)
|
buffer = (JBLOCKROW)
|
||||||
(*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK));
|
C_MAX_BLOCKS_IN_MCU * sizeof(JBLOCK));
|
||||||
for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {
|
for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) {
|
||||||
coef->MCU_buffer[i] = buffer + i;
|
coef->MCU_buffer[i] = buffer + i;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,9 @@
|
|||||||
* This file was part of the Independent JPEG Group's software:
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1991-1996, Thomas G. Lane.
|
* Copyright (C) 1991-1996, Thomas G. Lane.
|
||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright (C) 2009-2012, D. R. Commander.
|
* Copyright (C) 2009-2012, 2015, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* file.
|
||||||
*
|
*
|
||||||
* This file contains input colorspace conversion routines.
|
* This file contains input colorspace conversion routines.
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +35,7 @@ rgb_ycc_convert_internal (j_compress_ptr cinfo,
|
|||||||
{
|
{
|
||||||
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
||||||
register int r, g, b;
|
register int r, g, b;
|
||||||
register INT32 * ctab = cconvert->rgb_ycc_tab;
|
register JLONG * ctab = cconvert->rgb_ycc_tab;
|
||||||
register JSAMPROW inptr;
|
register JSAMPROW inptr;
|
||||||
register JSAMPROW outptr0, outptr1, outptr2;
|
register JSAMPROW outptr0, outptr1, outptr2;
|
||||||
register JDIMENSION col;
|
register JDIMENSION col;
|
||||||
@@ -91,7 +92,7 @@ rgb_gray_convert_internal (j_compress_ptr cinfo,
|
|||||||
{
|
{
|
||||||
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
||||||
register int r, g, b;
|
register int r, g, b;
|
||||||
register INT32 * ctab = cconvert->rgb_ycc_tab;
|
register JLONG * ctab = cconvert->rgb_ycc_tab;
|
||||||
register JSAMPROW inptr;
|
register JSAMPROW inptr;
|
||||||
register JSAMPROW outptr;
|
register JSAMPROW outptr;
|
||||||
register JDIMENSION col;
|
register JDIMENSION col;
|
||||||
|
|||||||
101
jccolor.c
101
jccolor.c
@@ -5,8 +5,10 @@
|
|||||||
* Copyright (C) 1991-1996, Thomas G. Lane.
|
* Copyright (C) 1991-1996, Thomas G. Lane.
|
||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
||||||
* Copyright (C) 2009-2012, D. R. Commander.
|
* Copyright (C) 2009-2012, 2015, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* Copyright (C) 2014, MIPS Technologies, Inc., California.
|
||||||
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* file.
|
||||||
*
|
*
|
||||||
* This file contains input colorspace conversion routines.
|
* This file contains input colorspace conversion routines.
|
||||||
*/
|
*/
|
||||||
@@ -15,7 +17,7 @@
|
|||||||
#include "jinclude.h"
|
#include "jinclude.h"
|
||||||
#include "jpeglib.h"
|
#include "jpeglib.h"
|
||||||
#include "jsimd.h"
|
#include "jsimd.h"
|
||||||
#include "config.h"
|
#include "jconfigint.h"
|
||||||
|
|
||||||
|
|
||||||
/* Private subobject */
|
/* Private subobject */
|
||||||
@@ -24,7 +26,7 @@ typedef struct {
|
|||||||
struct jpeg_color_converter pub; /* public fields */
|
struct jpeg_color_converter pub; /* public fields */
|
||||||
|
|
||||||
/* Private state for RGB->YCC conversion */
|
/* Private state for RGB->YCC conversion */
|
||||||
INT32 * rgb_ycc_tab; /* => table for RGB to YCbCr conversion */
|
JLONG *rgb_ycc_tab; /* => table for RGB to YCbCr conversion */
|
||||||
} my_color_converter;
|
} my_color_converter;
|
||||||
|
|
||||||
typedef my_color_converter *my_cconvert_ptr;
|
typedef my_color_converter *my_cconvert_ptr;
|
||||||
@@ -61,9 +63,9 @@ typedef my_color_converter * my_cconvert_ptr;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define SCALEBITS 16 /* speediest right-shift on some machines */
|
#define SCALEBITS 16 /* speediest right-shift on some machines */
|
||||||
#define CBCR_OFFSET ((INT32) CENTERJSAMPLE << SCALEBITS)
|
#define CBCR_OFFSET ((JLONG) CENTERJSAMPLE << SCALEBITS)
|
||||||
#define ONE_HALF ((INT32) 1 << (SCALEBITS-1))
|
#define ONE_HALF ((JLONG) 1 << (SCALEBITS-1))
|
||||||
#define FIX(x) ((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
|
#define FIX(x) ((JLONG) ((x) * (1L<<SCALEBITS) + 0.5))
|
||||||
|
|
||||||
/* We allocate one big table and divide it up into eight parts, instead of
|
/* We allocate one big table and divide it up into eight parts, instead of
|
||||||
* doing eight alloc_small requests. This lets us use a single table base
|
* doing eight alloc_small requests. This lets us use a single table base
|
||||||
@@ -196,13 +198,13 @@ METHODDEF(void)
|
|||||||
rgb_ycc_start (j_compress_ptr cinfo)
|
rgb_ycc_start (j_compress_ptr cinfo)
|
||||||
{
|
{
|
||||||
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
||||||
INT32 * rgb_ycc_tab;
|
JLONG *rgb_ycc_tab;
|
||||||
INT32 i;
|
JLONG i;
|
||||||
|
|
||||||
/* Allocate and fill in the conversion tables. */
|
/* Allocate and fill in the conversion tables. */
|
||||||
cconvert->rgb_ycc_tab = rgb_ycc_tab = (INT32 *)
|
cconvert->rgb_ycc_tab = rgb_ycc_tab = (JLONG *)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
(TABLE_SIZE * SIZEOF(INT32)));
|
(TABLE_SIZE * sizeof(JLONG)));
|
||||||
|
|
||||||
for (i = 0; i <= MAXJSAMPLE; i++) {
|
for (i = 0; i <= MAXJSAMPLE; i++) {
|
||||||
rgb_ycc_tab[i+R_Y_OFF] = FIX(0.29900) * i;
|
rgb_ycc_tab[i+R_Y_OFF] = FIX(0.29900) * i;
|
||||||
@@ -380,7 +382,7 @@ cmyk_ycck_convert (j_compress_ptr cinfo,
|
|||||||
{
|
{
|
||||||
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
||||||
register int r, g, b;
|
register int r, g, b;
|
||||||
register INT32 * ctab = cconvert->rgb_ycc_tab;
|
register JLONG *ctab = cconvert->rgb_ycc_tab;
|
||||||
register JSAMPROW inptr;
|
register JSAMPROW inptr;
|
||||||
register JSAMPROW outptr0, outptr1, outptr2, outptr3;
|
register JSAMPROW outptr0, outptr1, outptr2, outptr3;
|
||||||
register JDIMENSION col;
|
register JDIMENSION col;
|
||||||
@@ -463,12 +465,41 @@ null_convert (j_compress_ptr cinfo,
|
|||||||
JDIMENSION output_row, int num_rows)
|
JDIMENSION output_row, int num_rows)
|
||||||
{
|
{
|
||||||
register JSAMPROW inptr;
|
register JSAMPROW inptr;
|
||||||
register JSAMPROW outptr;
|
register JSAMPROW outptr, outptr0, outptr1, outptr2, outptr3;
|
||||||
register JDIMENSION col;
|
register JDIMENSION col;
|
||||||
register int ci;
|
register int ci;
|
||||||
int nc = cinfo->num_components;
|
int nc = cinfo->num_components;
|
||||||
JDIMENSION num_cols = cinfo->image_width;
|
JDIMENSION num_cols = cinfo->image_width;
|
||||||
|
|
||||||
|
if (nc == 3) {
|
||||||
|
while (--num_rows >= 0) {
|
||||||
|
inptr = *input_buf++;
|
||||||
|
outptr0 = output_buf[0][output_row];
|
||||||
|
outptr1 = output_buf[1][output_row];
|
||||||
|
outptr2 = output_buf[2][output_row];
|
||||||
|
output_row++;
|
||||||
|
for (col = 0; col < num_cols; col++) {
|
||||||
|
outptr0[col] = *inptr++;
|
||||||
|
outptr1[col] = *inptr++;
|
||||||
|
outptr2[col] = *inptr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (nc == 4) {
|
||||||
|
while (--num_rows >= 0) {
|
||||||
|
inptr = *input_buf++;
|
||||||
|
outptr0 = output_buf[0][output_row];
|
||||||
|
outptr1 = output_buf[1][output_row];
|
||||||
|
outptr2 = output_buf[2][output_row];
|
||||||
|
outptr3 = output_buf[3][output_row];
|
||||||
|
output_row++;
|
||||||
|
for (col = 0; col < num_cols; col++) {
|
||||||
|
outptr0[col] = *inptr++;
|
||||||
|
outptr1[col] = *inptr++;
|
||||||
|
outptr2[col] = *inptr++;
|
||||||
|
outptr3[col] = *inptr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
while (--num_rows >= 0) {
|
while (--num_rows >= 0) {
|
||||||
/* It seems fastest to make a separate pass for each component. */
|
/* It seems fastest to make a separate pass for each component. */
|
||||||
for (ci = 0; ci < nc; ci++) {
|
for (ci = 0; ci < nc; ci++) {
|
||||||
@@ -483,6 +514,7 @@ null_convert (j_compress_ptr cinfo,
|
|||||||
output_row++;
|
output_row++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -507,7 +539,7 @@ jinit_color_converter (j_compress_ptr cinfo)
|
|||||||
|
|
||||||
cconvert = (my_cconvert_ptr)
|
cconvert = (my_cconvert_ptr)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
SIZEOF(my_color_converter));
|
sizeof(my_color_converter));
|
||||||
cinfo->cconvert = (struct jpeg_color_converter *) cconvert;
|
cinfo->cconvert = (struct jpeg_color_converter *) cconvert;
|
||||||
/* set start_pass to null method until we find out differently */
|
/* set start_pass to null method until we find out differently */
|
||||||
cconvert->pub.start_pass = null_method;
|
cconvert->pub.start_pass = null_method;
|
||||||
@@ -587,9 +619,14 @@ jinit_color_converter (j_compress_ptr cinfo)
|
|||||||
if (rgb_red[cinfo->in_color_space] == 0 &&
|
if (rgb_red[cinfo->in_color_space] == 0 &&
|
||||||
rgb_green[cinfo->in_color_space] == 1 &&
|
rgb_green[cinfo->in_color_space] == 1 &&
|
||||||
rgb_blue[cinfo->in_color_space] == 2 &&
|
rgb_blue[cinfo->in_color_space] == 2 &&
|
||||||
rgb_pixelsize[cinfo->in_color_space] == 3)
|
rgb_pixelsize[cinfo->in_color_space] == 3) {
|
||||||
|
#if defined(__mips__)
|
||||||
|
if (jsimd_c_can_null_convert())
|
||||||
|
cconvert->pub.color_convert = jsimd_c_null_convert;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
cconvert->pub.color_convert = null_convert;
|
cconvert->pub.color_convert = null_convert;
|
||||||
else if (cinfo->in_color_space == JCS_RGB ||
|
} else if (cinfo->in_color_space == JCS_RGB ||
|
||||||
cinfo->in_color_space == JCS_EXT_RGB ||
|
cinfo->in_color_space == JCS_EXT_RGB ||
|
||||||
cinfo->in_color_space == JCS_EXT_RGBX ||
|
cinfo->in_color_space == JCS_EXT_RGBX ||
|
||||||
cinfo->in_color_space == JCS_EXT_BGR ||
|
cinfo->in_color_space == JCS_EXT_BGR ||
|
||||||
@@ -625,18 +662,28 @@ jinit_color_converter (j_compress_ptr cinfo)
|
|||||||
cconvert->pub.start_pass = rgb_ycc_start;
|
cconvert->pub.start_pass = rgb_ycc_start;
|
||||||
cconvert->pub.color_convert = rgb_ycc_convert;
|
cconvert->pub.color_convert = rgb_ycc_convert;
|
||||||
}
|
}
|
||||||
} else if (cinfo->in_color_space == JCS_YCbCr)
|
} else if (cinfo->in_color_space == JCS_YCbCr) {
|
||||||
cconvert->pub.color_convert = null_convert;
|
#if defined(__mips__)
|
||||||
|
if (jsimd_c_can_null_convert())
|
||||||
|
cconvert->pub.color_convert = jsimd_c_null_convert;
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
|
cconvert->pub.color_convert = null_convert;
|
||||||
|
} else
|
||||||
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JCS_CMYK:
|
case JCS_CMYK:
|
||||||
if (cinfo->num_components != 4)
|
if (cinfo->num_components != 4)
|
||||||
ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
|
ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
|
||||||
if (cinfo->in_color_space == JCS_CMYK)
|
if (cinfo->in_color_space == JCS_CMYK) {
|
||||||
cconvert->pub.color_convert = null_convert;
|
#if defined(__mips__)
|
||||||
|
if (jsimd_c_can_null_convert())
|
||||||
|
cconvert->pub.color_convert = jsimd_c_null_convert;
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
|
cconvert->pub.color_convert = null_convert;
|
||||||
|
} else
|
||||||
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -646,9 +693,14 @@ jinit_color_converter (j_compress_ptr cinfo)
|
|||||||
if (cinfo->in_color_space == JCS_CMYK) {
|
if (cinfo->in_color_space == JCS_CMYK) {
|
||||||
cconvert->pub.start_pass = rgb_ycc_start;
|
cconvert->pub.start_pass = rgb_ycc_start;
|
||||||
cconvert->pub.color_convert = cmyk_ycck_convert;
|
cconvert->pub.color_convert = cmyk_ycck_convert;
|
||||||
} else if (cinfo->in_color_space == JCS_YCCK)
|
} else if (cinfo->in_color_space == JCS_YCCK) {
|
||||||
cconvert->pub.color_convert = null_convert;
|
#if defined(__mips__)
|
||||||
|
if (jsimd_c_can_null_convert())
|
||||||
|
cconvert->pub.color_convert = jsimd_c_null_convert;
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
|
cconvert->pub.color_convert = null_convert;
|
||||||
|
} else
|
||||||
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -656,6 +708,11 @@ jinit_color_converter (j_compress_ptr cinfo)
|
|||||||
if (cinfo->jpeg_color_space != cinfo->in_color_space ||
|
if (cinfo->jpeg_color_space != cinfo->in_color_space ||
|
||||||
cinfo->num_components != cinfo->input_components)
|
cinfo->num_components != cinfo->input_components)
|
||||||
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
|
||||||
|
#if defined(__mips__)
|
||||||
|
if (jsimd_c_can_null_convert())
|
||||||
|
cconvert->pub.color_convert = jsimd_c_null_convert;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
cconvert->pub.color_convert = null_convert;
|
cconvert->pub.color_convert = null_convert;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
144
jcdctmgr.c
144
jcdctmgr.c
@@ -6,8 +6,9 @@
|
|||||||
* libjpeg-turbo Modifications:
|
* libjpeg-turbo Modifications:
|
||||||
* Copyright (C) 1999-2006, MIYASAKA Masaru.
|
* Copyright (C) 1999-2006, MIYASAKA Masaru.
|
||||||
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
||||||
* Copyright (C) 2011 D. R. Commander
|
* Copyright (C) 2011, 2014-2015, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* For conditions of distribution and use, see the accompanying README.ijg
|
||||||
|
* file.
|
||||||
*
|
*
|
||||||
* This file contains the forward-DCT management logic.
|
* This file contains the forward-DCT management logic.
|
||||||
* This code selects a particular DCT implementation to be used,
|
* This code selects a particular DCT implementation to be used,
|
||||||
@@ -24,22 +25,21 @@
|
|||||||
|
|
||||||
/* Private subobject for this module */
|
/* Private subobject for this module */
|
||||||
|
|
||||||
typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data));
|
typedef void (*forward_DCT_method_ptr) (DCTELEM *data);
|
||||||
typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data));
|
typedef void (*float_DCT_method_ptr) (FAST_FLOAT *data);
|
||||||
|
|
||||||
typedef JMETHOD(void, convsamp_method_ptr,
|
typedef void (*convsamp_method_ptr) (JSAMPARRAY sample_data,
|
||||||
(JSAMPARRAY sample_data, JDIMENSION start_col,
|
JDIMENSION start_col,
|
||||||
DCTELEM * workspace));
|
DCTELEM *workspace);
|
||||||
typedef JMETHOD(void, float_convsamp_method_ptr,
|
typedef void (*float_convsamp_method_ptr) (JSAMPARRAY sample_data,
|
||||||
(JSAMPARRAY sample_data, JDIMENSION start_col,
|
JDIMENSION start_col,
|
||||||
FAST_FLOAT *workspace));
|
FAST_FLOAT *workspace);
|
||||||
|
|
||||||
typedef JMETHOD(void, quantize_method_ptr,
|
typedef void (*quantize_method_ptr) (JCOEFPTR coef_block, DCTELEM *divisors,
|
||||||
(JCOEFPTR coef_block, DCTELEM * divisors,
|
DCTELEM *workspace);
|
||||||
DCTELEM * workspace));
|
typedef void (*float_quantize_method_ptr) (JCOEFPTR coef_block,
|
||||||
typedef JMETHOD(void, float_quantize_method_ptr,
|
FAST_FLOAT *divisors,
|
||||||
(JCOEFPTR coef_block, FAST_FLOAT * divisors,
|
FAST_FLOAT *workspace);
|
||||||
FAST_FLOAT * workspace));
|
|
||||||
|
|
||||||
METHODDEF(void) quantize (JCOEFPTR, DCTELEM *, DCTELEM *);
|
METHODDEF(void) quantize (JCOEFPTR, DCTELEM *, DCTELEM *);
|
||||||
|
|
||||||
@@ -73,9 +73,12 @@ typedef struct {
|
|||||||
typedef my_fdct_controller *my_fdct_ptr;
|
typedef my_fdct_controller *my_fdct_ptr;
|
||||||
|
|
||||||
|
|
||||||
|
#if BITS_IN_JSAMPLE == 8
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the highest bit in an integer through binary search.
|
* Find the highest bit in an integer through binary search.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL(int)
|
LOCAL(int)
|
||||||
flss (UINT16 val)
|
flss (UINT16 val)
|
||||||
{
|
{
|
||||||
@@ -106,6 +109,7 @@ flss (UINT16 val)
|
|||||||
return bit;
|
return bit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Compute values to do a division using reciprocal.
|
* Compute values to do a division using reciprocal.
|
||||||
*
|
*
|
||||||
@@ -164,6 +168,7 @@ flss (UINT16 val)
|
|||||||
* of in a consecutive manner, yet again in order to allow SIMD
|
* of in a consecutive manner, yet again in order to allow SIMD
|
||||||
* routines.
|
* routines.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOCAL(int)
|
LOCAL(int)
|
||||||
compute_reciprocal (UINT16 divisor, DCTELEM *dtbl)
|
compute_reciprocal (UINT16 divisor, DCTELEM *dtbl)
|
||||||
{
|
{
|
||||||
@@ -171,6 +176,19 @@ compute_reciprocal (UINT16 divisor, DCTELEM * dtbl)
|
|||||||
UDCTELEM c;
|
UDCTELEM c;
|
||||||
int b, r;
|
int b, r;
|
||||||
|
|
||||||
|
if (divisor == 1) {
|
||||||
|
/* divisor == 1 means unquantized, so these reciprocal/correction/shift
|
||||||
|
* values will cause the C quantization algorithm to act like the
|
||||||
|
* identity function. Since only the C quantization algorithm is used in
|
||||||
|
* these cases, the scale value is irrelevant.
|
||||||
|
*/
|
||||||
|
dtbl[DCTSIZE2 * 0] = (DCTELEM) 1; /* reciprocal */
|
||||||
|
dtbl[DCTSIZE2 * 1] = (DCTELEM) 0; /* correction */
|
||||||
|
dtbl[DCTSIZE2 * 2] = (DCTELEM) 1; /* scale */
|
||||||
|
dtbl[DCTSIZE2 * 3] = -(DCTELEM) (sizeof(DCTELEM) * 8); /* shift */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
b = flss(divisor) - 1;
|
b = flss(divisor) - 1;
|
||||||
r = sizeof(DCTELEM) * 8 + b;
|
r = sizeof(DCTELEM) * 8 + b;
|
||||||
|
|
||||||
@@ -191,13 +209,20 @@ compute_reciprocal (UINT16 divisor, DCTELEM * dtbl)
|
|||||||
|
|
||||||
dtbl[DCTSIZE2 * 0] = (DCTELEM) fq; /* reciprocal */
|
dtbl[DCTSIZE2 * 0] = (DCTELEM) fq; /* reciprocal */
|
||||||
dtbl[DCTSIZE2 * 1] = (DCTELEM) c; /* correction + roundfactor */
|
dtbl[DCTSIZE2 * 1] = (DCTELEM) c; /* correction + roundfactor */
|
||||||
|
#ifdef WITH_SIMD
|
||||||
dtbl[DCTSIZE2 * 2] = (DCTELEM) (1 << (sizeof(DCTELEM)*8*2 - r)); /* scale */
|
dtbl[DCTSIZE2 * 2] = (DCTELEM) (1 << (sizeof(DCTELEM)*8*2 - r)); /* scale */
|
||||||
|
#else
|
||||||
|
dtbl[DCTSIZE2 * 2] = 1;
|
||||||
|
#endif
|
||||||
dtbl[DCTSIZE2 * 3] = (DCTELEM) r - sizeof(DCTELEM)*8; /* shift */
|
dtbl[DCTSIZE2 * 3] = (DCTELEM) r - sizeof(DCTELEM)*8; /* shift */
|
||||||
|
|
||||||
if (r <= 16) return 0;
|
if (r <= 16) return 0;
|
||||||
else return 1;
|
else return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize for a processing pass.
|
* Initialize for a processing pass.
|
||||||
* Verify that all referenced Q-tables are present, and set up
|
* Verify that all referenced Q-tables are present, and set up
|
||||||
@@ -235,13 +260,17 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
|
|||||||
if (fdct->divisors[qtblno] == NULL) {
|
if (fdct->divisors[qtblno] == NULL) {
|
||||||
fdct->divisors[qtblno] = (DCTELEM *)
|
fdct->divisors[qtblno] = (DCTELEM *)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
(DCTSIZE2 * 4) * SIZEOF(DCTELEM));
|
(DCTSIZE2 * 4) * sizeof(DCTELEM));
|
||||||
}
|
}
|
||||||
dtbl = fdct->divisors[qtblno];
|
dtbl = fdct->divisors[qtblno];
|
||||||
for (i = 0; i < DCTSIZE2; i++) {
|
for (i = 0; i < DCTSIZE2; i++) {
|
||||||
if(!compute_reciprocal(qtbl->quantval[i] << 3, &dtbl[i])
|
#if BITS_IN_JSAMPLE == 8
|
||||||
&& fdct->quantize == jsimd_quantize)
|
if (!compute_reciprocal(qtbl->quantval[i] << 3, &dtbl[i]) &&
|
||||||
|
fdct->quantize == jsimd_quantize)
|
||||||
fdct->quantize = quantize;
|
fdct->quantize = quantize;
|
||||||
|
#else
|
||||||
|
dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@@ -271,16 +300,23 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
|
|||||||
if (fdct->divisors[qtblno] == NULL) {
|
if (fdct->divisors[qtblno] == NULL) {
|
||||||
fdct->divisors[qtblno] = (DCTELEM *)
|
fdct->divisors[qtblno] = (DCTELEM *)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
(DCTSIZE2 * 4) * SIZEOF(DCTELEM));
|
(DCTSIZE2 * 4) * sizeof(DCTELEM));
|
||||||
}
|
}
|
||||||
dtbl = fdct->divisors[qtblno];
|
dtbl = fdct->divisors[qtblno];
|
||||||
for (i = 0; i < DCTSIZE2; i++) {
|
for (i = 0; i < DCTSIZE2; i++) {
|
||||||
|
#if BITS_IN_JSAMPLE == 8
|
||||||
if (!compute_reciprocal(
|
if (!compute_reciprocal(
|
||||||
DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i],
|
DESCALE(MULTIPLY16V16((JLONG) qtbl->quantval[i],
|
||||||
(INT32) aanscales[i]),
|
(JLONG) aanscales[i]),
|
||||||
CONST_BITS-3), &dtbl[i])
|
CONST_BITS-3), &dtbl[i]) &&
|
||||||
&& fdct->quantize == jsimd_quantize)
|
fdct->quantize == jsimd_quantize)
|
||||||
fdct->quantize = quantize;
|
fdct->quantize = quantize;
|
||||||
|
#else
|
||||||
|
dtbl[i] = (DCTELEM)
|
||||||
|
DESCALE(MULTIPLY16V16((JLONG) qtbl->quantval[i],
|
||||||
|
(JLONG) aanscales[i]),
|
||||||
|
CONST_BITS-3);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -306,7 +342,7 @@ start_pass_fdctmgr (j_compress_ptr cinfo)
|
|||||||
if (fdct->float_divisors[qtblno] == NULL) {
|
if (fdct->float_divisors[qtblno] == NULL) {
|
||||||
fdct->float_divisors[qtblno] = (FAST_FLOAT *)
|
fdct->float_divisors[qtblno] = (FAST_FLOAT *)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
DCTSIZE2 * SIZEOF(FAST_FLOAT));
|
DCTSIZE2 * sizeof(FAST_FLOAT));
|
||||||
}
|
}
|
||||||
fdtbl = fdct->float_divisors[qtblno];
|
fdtbl = fdct->float_divisors[qtblno];
|
||||||
i = 0;
|
i = 0;
|
||||||
@@ -373,10 +409,14 @@ quantize (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
DCTELEM temp;
|
DCTELEM temp;
|
||||||
UDCTELEM recip, corr, shift;
|
|
||||||
UDCTELEM2 product;
|
|
||||||
JCOEFPTR output_ptr = coef_block;
|
JCOEFPTR output_ptr = coef_block;
|
||||||
|
|
||||||
|
#if BITS_IN_JSAMPLE == 8
|
||||||
|
|
||||||
|
UDCTELEM recip, corr;
|
||||||
|
int shift;
|
||||||
|
UDCTELEM2 product;
|
||||||
|
|
||||||
for (i = 0; i < DCTSIZE2; i++) {
|
for (i = 0; i < DCTSIZE2; i++) {
|
||||||
temp = workspace[i];
|
temp = workspace[i];
|
||||||
recip = divisors[i + DCTSIZE2 * 0];
|
recip = divisors[i + DCTSIZE2 * 0];
|
||||||
@@ -387,16 +427,54 @@ quantize (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace)
|
|||||||
temp = -temp;
|
temp = -temp;
|
||||||
product = (UDCTELEM2)(temp + corr) * recip;
|
product = (UDCTELEM2)(temp + corr) * recip;
|
||||||
product >>= shift + sizeof(DCTELEM)*8;
|
product >>= shift + sizeof(DCTELEM)*8;
|
||||||
temp = product;
|
temp = (DCTELEM)product;
|
||||||
temp = -temp;
|
temp = -temp;
|
||||||
} else {
|
} else {
|
||||||
product = (UDCTELEM2)(temp + corr) * recip;
|
product = (UDCTELEM2)(temp + corr) * recip;
|
||||||
product >>= shift + sizeof(DCTELEM)*8;
|
product >>= shift + sizeof(DCTELEM)*8;
|
||||||
temp = product;
|
temp = (DCTELEM)product;
|
||||||
}
|
}
|
||||||
|
|
||||||
output_ptr[i] = (JCOEF) temp;
|
output_ptr[i] = (JCOEF) temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
register DCTELEM qval;
|
||||||
|
|
||||||
|
for (i = 0; i < DCTSIZE2; i++) {
|
||||||
|
qval = divisors[i];
|
||||||
|
temp = workspace[i];
|
||||||
|
/* Divide the coefficient value by qval, ensuring proper rounding.
|
||||||
|
* Since C does not specify the direction of rounding for negative
|
||||||
|
* quotients, we have to force the dividend positive for portability.
|
||||||
|
*
|
||||||
|
* In most files, at least half of the output values will be zero
|
||||||
|
* (at default quantization settings, more like three-quarters...)
|
||||||
|
* so we should ensure that this case is fast. On many machines,
|
||||||
|
* a comparison is enough cheaper than a divide to make a special test
|
||||||
|
* a win. Since both inputs will be nonnegative, we need only test
|
||||||
|
* for a < b to discover whether a/b is 0.
|
||||||
|
* If your machine's division is fast enough, define FAST_DIVIDE.
|
||||||
|
*/
|
||||||
|
#ifdef FAST_DIVIDE
|
||||||
|
#define DIVIDE_BY(a,b) a /= b
|
||||||
|
#else
|
||||||
|
#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0
|
||||||
|
#endif
|
||||||
|
if (temp < 0) {
|
||||||
|
temp = -temp;
|
||||||
|
temp += qval>>1; /* for rounding */
|
||||||
|
DIVIDE_BY(temp, qval);
|
||||||
|
temp = -temp;
|
||||||
|
} else {
|
||||||
|
temp += qval>>1; /* for rounding */
|
||||||
|
DIVIDE_BY(temp, qval);
|
||||||
|
}
|
||||||
|
output_ptr[i] = (JCOEF) temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -547,7 +625,7 @@ jinit_forward_dct (j_compress_ptr cinfo)
|
|||||||
|
|
||||||
fdct = (my_fdct_ptr)
|
fdct = (my_fdct_ptr)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
SIZEOF(my_fdct_controller));
|
sizeof(my_fdct_controller));
|
||||||
cinfo->fdct = (struct jpeg_forward_dct *) fdct;
|
cinfo->fdct = (struct jpeg_forward_dct *) fdct;
|
||||||
fdct->pub.start_pass = start_pass_fdctmgr;
|
fdct->pub.start_pass = start_pass_fdctmgr;
|
||||||
|
|
||||||
@@ -626,12 +704,12 @@ jinit_forward_dct (j_compress_ptr cinfo)
|
|||||||
if (cinfo->dct_method == JDCT_FLOAT)
|
if (cinfo->dct_method == JDCT_FLOAT)
|
||||||
fdct->float_workspace = (FAST_FLOAT *)
|
fdct->float_workspace = (FAST_FLOAT *)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
SIZEOF(FAST_FLOAT) * DCTSIZE2);
|
sizeof(FAST_FLOAT) * DCTSIZE2);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
fdct->workspace = (DCTELEM *)
|
fdct->workspace = (DCTELEM *)
|
||||||
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
|
||||||
SIZEOF(DCTELEM) * DCTSIZE2);
|
sizeof(DCTELEM) * DCTSIZE2);
|
||||||
|
|
||||||
/* Mark divisor tables unallocated */
|
/* Mark divisor tables unallocated */
|
||||||
for (i = 0; i < NUM_QUANT_TBLS; i++) {
|
for (i = 0; i < NUM_QUANT_TBLS; i++) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user