Compare commits
1483 Commits
sandbox/ac
...
khakicampb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
042572177b | ||
|
|
297b2a12d6 | ||
|
|
1c0a9f36f1 | ||
|
|
cfd5e0221c | ||
|
|
168eea5d60 | ||
|
|
922751e059 | ||
|
|
723e357ead | ||
|
|
b34705f64f | ||
|
|
efad6feb9a | ||
|
|
9e5f355daf | ||
|
|
dd07443f72 | ||
|
|
7991241a50 | ||
|
|
b582cf0ea9 | ||
|
|
67611119b5 | ||
|
|
3b2e2f2f77 | ||
|
|
79436fadfb | ||
|
|
7ed1d54ab4 | ||
|
|
26daa30da4 | ||
|
|
7738bcb350 | ||
|
|
73b11ec876 | ||
|
|
d4596485be | ||
|
|
57adf3d573 | ||
|
|
74a61b5ab9 | ||
|
|
692fe74deb | ||
|
|
bdeb5febe4 | ||
|
|
9eeb1f2fc3 | ||
|
|
424982bc41 | ||
|
|
5e9c5dfdf0 | ||
|
|
aa1c813c43 | ||
|
|
6e4b73125b | ||
|
|
310073868e | ||
|
|
cc1524aa90 | ||
|
|
6c6eb16bb9 | ||
|
|
3b2c3cb366 | ||
|
|
55f3740d76 | ||
|
|
83db21b2fd | ||
|
|
d9c417cb49 | ||
|
|
b2597527a5 | ||
|
|
8496390e73 | ||
|
|
ac27b062b0 | ||
|
|
527a9fea76 | ||
|
|
1517fb74fd | ||
|
|
243029faff | ||
|
|
8c29d332c9 | ||
|
|
5c29ee726e | ||
|
|
ef665996ae | ||
|
|
b3933e2d3c | ||
|
|
87bf1a149c | ||
|
|
b8ec5dcdf8 | ||
|
|
cb1d152719 | ||
|
|
a5af392aae | ||
|
|
b4aa5c9408 | ||
|
|
50d3629c61 | ||
|
|
aee577b691 | ||
|
|
543ea3eb3e | ||
|
|
6929ab0ba6 | ||
|
|
85786a8ddb | ||
|
|
188420f4fd | ||
|
|
7a3d48e56f | ||
|
|
4d9e876b44 | ||
|
|
67edc5e83b | ||
|
|
9e185ed177 | ||
|
|
dba1d1a63d | ||
|
|
40477f1f70 | ||
|
|
1417ed28f3 | ||
|
|
f99f78c7af | ||
|
|
4f367f5cd9 | ||
|
|
1de5ba75be | ||
|
|
9d7a12a0e7 | ||
|
|
7055ca556c | ||
|
|
0146fa95ef | ||
|
|
bfc75f7382 | ||
|
|
c5fae00227 | ||
|
|
cdd83a0bb2 | ||
|
|
5a9f21db54 | ||
|
|
754eb95105 | ||
|
|
a724477d69 | ||
|
|
e9b6172476 | ||
|
|
cf2bfcd9d8 | ||
|
|
b29ebfe91c | ||
|
|
ee30cf1408 | ||
|
|
f5713fefa6 | ||
|
|
6f9982e3c2 | ||
|
|
f4b5330c50 | ||
|
|
bd0c981744 | ||
|
|
73ae3cdeef | ||
|
|
de3a8f23c8 | ||
|
|
e5e998a6eb | ||
|
|
0c1da40ea8 | ||
|
|
3108fbd229 | ||
|
|
db81c34336 | ||
|
|
799ab7c064 | ||
|
|
0cb7f545ad | ||
|
|
c12e61d5a3 | ||
|
|
f180945c18 | ||
|
|
77318b0aec | ||
|
|
8870756ac6 | ||
|
|
159dd0cc39 | ||
|
|
354e70dc78 | ||
|
|
1387f5550f | ||
|
|
25110f2837 | ||
|
|
ff8edd3509 | ||
|
|
bbe5ddfdfb | ||
|
|
7751651ea1 | ||
|
|
8e070558b0 | ||
|
|
55d0ffeb54 | ||
|
|
7abc05c9af | ||
|
|
72d4890caf | ||
|
|
8767999493 | ||
|
|
ace4073090 | ||
|
|
9c90830165 | ||
|
|
7901a051c9 | ||
|
|
221fcdac85 | ||
|
|
17962ab2c0 | ||
|
|
a9936de384 | ||
|
|
c93d30a47f | ||
|
|
95d29675b2 | ||
|
|
4b8b31838b | ||
|
|
c516dd67bc | ||
|
|
63eb2ee056 | ||
|
|
d5be4a17ef | ||
|
|
19a4ce904d | ||
|
|
32ff4906da | ||
|
|
f9c0587200 | ||
|
|
580317160c | ||
|
|
181988d372 | ||
|
|
c1bfa6a846 | ||
|
|
40e3bf8630 | ||
|
|
9b61c709c4 | ||
|
|
2a0e1bcc83 | ||
|
|
e34944ad26 | ||
|
|
697bcef677 | ||
|
|
fba94b8cfd | ||
|
|
5b7960fa82 | ||
|
|
5aeadbb4f6 | ||
|
|
95d2dc8981 | ||
|
|
06c6e4cbf6 | ||
|
|
3fc01f95da | ||
|
|
77ffea92c5 | ||
|
|
d00aaa9c12 | ||
|
|
97b4f8fe92 | ||
|
|
28a93d6588 | ||
|
|
eb09bbe88b | ||
|
|
a554bd8dac | ||
|
|
dd217d3df1 | ||
|
|
01882a9ee8 | ||
|
|
ef1fb6deb4 | ||
|
|
f0b08aa4fa | ||
|
|
3de42ac27b | ||
|
|
c2ebd0e6da | ||
|
|
7982914c37 | ||
|
|
e34e684059 | ||
|
|
4539267916 | ||
|
|
aa90983696 | ||
|
|
03a401c4d9 | ||
|
|
fd38ef4b99 | ||
|
|
a160533e41 | ||
|
|
bfff16af67 | ||
|
|
5ef54c1536 | ||
|
|
7a586cad07 | ||
|
|
304d310975 | ||
|
|
b90166665f | ||
|
|
a8c8bf1c99 | ||
|
|
45a26dd9c8 | ||
|
|
552fd02cf0 | ||
|
|
f9865d1701 | ||
|
|
c7ac2f3864 | ||
|
|
cd700e1ab9 | ||
|
|
4328b08521 | ||
|
|
462e0ff88b | ||
|
|
eea8ea88ab | ||
|
|
7aef9790cf | ||
|
|
891dbe1e52 | ||
|
|
ad0646cb84 | ||
|
|
a32f341539 | ||
|
|
10969dfc6e | ||
|
|
100dfc9eab | ||
|
|
fd500f955f | ||
|
|
bacc67f4a8 | ||
|
|
b26232eb1b | ||
|
|
204809bfb3 | ||
|
|
6382727dc5 | ||
|
|
787b38ebb9 | ||
|
|
e5e2932cb3 | ||
|
|
46ff1072b3 | ||
|
|
bedf1c3af6 | ||
|
|
f80d8011a0 | ||
|
|
f6ac6cf5bd | ||
|
|
2ab7b9a6c9 | ||
|
|
13d48c4267 | ||
|
|
af7fb17c09 | ||
|
|
f1de622617 | ||
|
|
0ba9b299e9 | ||
|
|
4b5e462d08 | ||
|
|
ff6accf936 | ||
|
|
301e345273 | ||
|
|
9d24fe60f1 | ||
|
|
75d551783d | ||
|
|
19e0b406c9 | ||
|
|
e5b7f14ea7 | ||
|
|
ba8651d474 | ||
|
|
75b6cfe1c5 | ||
|
|
7acd0a59ca | ||
|
|
35d7e17b03 | ||
|
|
be12fefa4b | ||
|
|
a4f3751be5 | ||
|
|
72e332f767 | ||
|
|
14e8adea3c | ||
|
|
6f397b8a5b | ||
|
|
4f774ac50e | ||
|
|
e4bdbd3c0b | ||
|
|
3fb55d24e8 | ||
|
|
84e3639454 | ||
|
|
971c5a16a9 | ||
|
|
fa5d54f937 | ||
|
|
af0a9fcf70 | ||
|
|
04fdbdc5ca | ||
|
|
d1f0f4cc63 | ||
|
|
489f8b2d88 | ||
|
|
146ccd304f | ||
|
|
284be1c9e0 | ||
|
|
6dd7f2b50a | ||
|
|
36b610d8c1 | ||
|
|
a564b18d7f | ||
|
|
a5191f3e60 | ||
|
|
4f0e4d6cef | ||
|
|
8b8e296019 | ||
|
|
2468163e07 | ||
|
|
3036fd761a | ||
|
|
2240d83d78 | ||
|
|
bdfbd6325e | ||
|
|
57d30b7b4d | ||
|
|
9b54e812f7 | ||
|
|
cafbf63d30 | ||
|
|
0dfa6b38dc | ||
|
|
8a79769aff | ||
|
|
98726d538b | ||
|
|
9a56a5ea18 | ||
|
|
656f9c4126 | ||
|
|
c1e4f5a80d | ||
|
|
9d7eaf0046 | ||
|
|
992e4b7090 | ||
|
|
10c7ea4be8 | ||
|
|
3c206aca04 | ||
|
|
2f55beb355 | ||
|
|
70bdf643d0 | ||
|
|
8700eed4c6 | ||
|
|
7d6edc3ddd | ||
|
|
9d47341a4c | ||
|
|
0c60db7def | ||
|
|
17fae3ad0a | ||
|
|
ccf4f47b99 | ||
|
|
d0ffae825d | ||
|
|
a45596cff7 | ||
|
|
d0e687bf8c | ||
|
|
5fd142e763 | ||
|
|
45df87ca57 | ||
|
|
65732c36a8 | ||
|
|
6dd5ec7efb | ||
|
|
7764f8af3e | ||
|
|
d7947c37a8 | ||
|
|
be3f0698b0 | ||
|
|
57566ff24a | ||
|
|
e2b696c390 | ||
|
|
da33728f48 | ||
|
|
04246a60d7 | ||
|
|
667f6320b0 | ||
|
|
9aa23214e2 | ||
|
|
f5f5ca03ca | ||
|
|
c2c5297595 | ||
|
|
42bee40e50 | ||
|
|
d4fccb8f41 | ||
|
|
0741629c88 | ||
|
|
6042d68851 | ||
|
|
7cced7b3ea | ||
|
|
5cc4c59f2a | ||
|
|
f68f9eefdf | ||
|
|
9e5811f485 | ||
|
|
66a3438602 | ||
|
|
d8a18186ba | ||
|
|
36f796d2d0 | ||
|
|
1490342be5 | ||
|
|
bd2e7fa1c8 | ||
|
|
7a91d21d69 | ||
|
|
7e4c306981 | ||
|
|
b23bd2360f | ||
|
|
a761197fbd | ||
|
|
ce11055d57 | ||
|
|
d3a62ac850 | ||
|
|
94ec6290f8 | ||
|
|
512b67f023 | ||
|
|
5e679848e8 | ||
|
|
e313fc8514 | ||
|
|
f4b5076ad3 | ||
|
|
1fc21052ab | ||
|
|
f26fccf3b2 | ||
|
|
3d7e2677df | ||
|
|
272afa9a43 | ||
|
|
9bfa12764c | ||
|
|
264c174fca | ||
|
|
bc08689fa5 | ||
|
|
70c149db7f | ||
|
|
2184692c07 | ||
|
|
f38648742a | ||
|
|
939d7d9de8 | ||
|
|
4f69f741d8 | ||
|
|
aa68a8301e | ||
|
|
d4d843de81 | ||
|
|
ff3866dc43 | ||
|
|
1bec0c5a7e | ||
|
|
e2b451d9e3 | ||
|
|
880ee94a94 | ||
|
|
81eb71f00c | ||
|
|
8620dea882 | ||
|
|
3c2231807f | ||
|
|
89f905e5e5 | ||
|
|
34d5aff747 | ||
|
|
eb339264b1 | ||
|
|
fe193ad2ac | ||
|
|
a309742a5f | ||
|
|
f76158131d | ||
|
|
e755a283dd | ||
|
|
d9653b4be0 | ||
|
|
8307045cb5 | ||
|
|
04a6db562a | ||
|
|
ef0f98b3a3 | ||
|
|
b05158d630 | ||
|
|
b29612fbbe | ||
|
|
fce3cee8dd | ||
|
|
a234308347 | ||
|
|
136c29e3a3 | ||
|
|
be660f8ca0 | ||
|
|
5d27ee1c08 | ||
|
|
706bd3d57a | ||
|
|
7bd73b638a | ||
|
|
ef877d846f | ||
|
|
94806e029d | ||
|
|
78cde4f593 | ||
|
|
43622dd92a | ||
|
|
f6d13e7be5 | ||
|
|
a8b056526e | ||
|
|
c69a141a9e | ||
|
|
4d8796a59c | ||
|
|
2f97b7cbfe | ||
|
|
a68b24fdee | ||
|
|
918a2fd726 | ||
|
|
36a0c7ffe3 | ||
|
|
6c4007be1c | ||
|
|
ccb894ce73 | ||
|
|
d3fe3b2abb | ||
|
|
b2ccb9c189 | ||
|
|
bb1e5b79da | ||
|
|
d952b13bf1 | ||
|
|
021105e3ac | ||
|
|
fa99c376e5 | ||
|
|
9dfec135a6 | ||
|
|
69498d66cd | ||
|
|
c4d56257f9 | ||
|
|
0616fa6e87 | ||
|
|
a136c1769d | ||
|
|
03b6f5f8e3 | ||
|
|
f16cf9fbcc | ||
|
|
fbefe470bf | ||
|
|
29ade0d3cf | ||
|
|
0bd84571e4 | ||
|
|
c3a9247e09 | ||
|
|
c8f56d2303 | ||
|
|
1a53c0c9e1 | ||
|
|
779840c9f4 | ||
|
|
7a4c2c7671 | ||
|
|
b7e8b3cbb6 | ||
|
|
9f90473ef8 | ||
|
|
97d8adef82 | ||
|
|
9680d4fa2a | ||
|
|
9441f10b51 | ||
|
|
ef4a132cc4 | ||
|
|
520055bd1a | ||
|
|
e172e8aa26 | ||
|
|
57c7c11633 | ||
|
|
bd3c874cac | ||
|
|
229c686c89 | ||
|
|
8b25dd599f | ||
|
|
cc5023d55f | ||
|
|
015c43f0c1 | ||
|
|
4b590058c8 | ||
|
|
9e0efb6008 | ||
|
|
52889c1016 | ||
|
|
cf82222316 | ||
|
|
80ed9e4f5c | ||
|
|
80bbba1494 | ||
|
|
2c8338f982 | ||
|
|
b547a2f38c | ||
|
|
adf8533cee | ||
|
|
9222d467e7 | ||
|
|
2f5840de3e | ||
|
|
1710419eb5 | ||
|
|
8c02a36953 | ||
|
|
b816eea5ef | ||
|
|
2bcec13e5f | ||
|
|
166fc7cb43 | ||
|
|
996ccc3311 | ||
|
|
6bd28a2d05 | ||
|
|
1de659af06 | ||
|
|
df4c95afce | ||
|
|
d179b784f9 | ||
|
|
b627af0eb0 | ||
|
|
83f17eeede | ||
|
|
8a906039a7 | ||
|
|
e4d9f0e31f | ||
|
|
9ca6b46cef | ||
|
|
d33be6caa9 | ||
|
|
9cc1f692bd | ||
|
|
d488236ce3 | ||
|
|
2e0841931c | ||
|
|
9faa0296b8 | ||
|
|
c59c5cbeff | ||
|
|
ef98a8f61f | ||
|
|
d8b3e29ee7 | ||
|
|
26faa3ec7a | ||
|
|
5fb49e456a | ||
|
|
e6657f32c5 | ||
|
|
24db57f0e1 | ||
|
|
885872f899 | ||
|
|
ef17fc46f3 | ||
|
|
9c2ed00c8c | ||
|
|
6a3cf099aa | ||
|
|
48b81a1a3c | ||
|
|
f81b0000f6 | ||
|
|
ff72cca8bb | ||
|
|
ba5f7a514a | ||
|
|
3861b25be1 | ||
|
|
819f3c805d | ||
|
|
babd308b5e | ||
|
|
a3a10a323b | ||
|
|
5b3d3b1909 | ||
|
|
1c187c4be0 | ||
|
|
f659c7e99e | ||
|
|
c5a89b46b9 | ||
|
|
ad47d1d194 | ||
|
|
c47c460f69 | ||
|
|
4317ba58a9 | ||
|
|
985786c780 | ||
|
|
fa4ca4037e | ||
|
|
6a0e771555 | ||
|
|
989d536861 | ||
|
|
86212bc3c1 | ||
|
|
81d1e7bf28 | ||
|
|
13ce6e6d00 | ||
|
|
f6f544278e | ||
|
|
6965bde4e0 | ||
|
|
7cb4ab56ea | ||
|
|
69c7ad3407 | ||
|
|
e96f0c3db3 | ||
|
|
107de19698 | ||
|
|
31b975713c | ||
|
|
758fc662b2 | ||
|
|
c93946bbc3 | ||
|
|
99211b0263 | ||
|
|
25920137ec | ||
|
|
5ab46e0ecd | ||
|
|
16d6aaceb8 | ||
|
|
4bdc7d1c88 | ||
|
|
74aaa2389e | ||
|
|
ac86dde3af | ||
|
|
38bc1d0f4b | ||
|
|
eb64ea3e89 | ||
|
|
3735def667 | ||
|
|
6877acb67e | ||
|
|
5572ab1d02 | ||
|
|
79d5aac74f | ||
|
|
71cf9fac83 | ||
|
|
9ff73fe092 | ||
|
|
a2307ff095 | ||
|
|
89b1c9d4be | ||
|
|
50e05d0651 | ||
|
|
c21d437052 | ||
|
|
c98f8e04e5 | ||
|
|
a0359b8c90 | ||
|
|
2f0067c62b | ||
|
|
f4cae05cd4 | ||
|
|
7467ee0458 | ||
|
|
bc6c199785 | ||
|
|
a2a97b869f | ||
|
|
74ed95a33e | ||
|
|
569c0dfc77 | ||
|
|
4aac819a18 | ||
|
|
8fab3e82ca | ||
|
|
057c1c4034 | ||
|
|
44a9edf406 | ||
|
|
185836116c | ||
|
|
0269df41c1 | ||
|
|
ba962a5f37 | ||
|
|
8d8ee1f644 | ||
|
|
904cb53302 | ||
|
|
aea8d97a74 | ||
|
|
6f51672c4e | ||
|
|
48e7294e48 | ||
|
|
86fb8130bf | ||
|
|
ee1bd86d9c | ||
|
|
aa1132d1de | ||
|
|
f94124cf31 | ||
|
|
80ddeb281a | ||
|
|
1bf7a0fb29 | ||
|
|
5f90713b2b | ||
|
|
79dc6c0393 | ||
|
|
04b4a5f25e | ||
|
|
27a6be1419 | ||
|
|
82762e240c | ||
|
|
715d3bbd05 | ||
|
|
c20c955e73 | ||
|
|
f64a30acef | ||
|
|
813221a163 | ||
|
|
5486e1d8f3 | ||
|
|
a21fc45b13 | ||
|
|
c8fc6ed14a | ||
|
|
a624692776 | ||
|
|
dc5f7712f2 | ||
|
|
b198bcd528 | ||
|
|
a84f1f846e | ||
|
|
9d8ead125d | ||
|
|
ee35f4dede | ||
|
|
01283e2727 | ||
|
|
bfc2a7e3a0 | ||
|
|
a3562b60d5 | ||
|
|
e1ad39d754 | ||
|
|
0dcd21fb1b | ||
|
|
ce39add465 | ||
|
|
32c38a20ba | ||
|
|
e6aebcdf08 | ||
|
|
54e5ff00a6 | ||
|
|
ed5d2e71c0 | ||
|
|
825e754288 | ||
|
|
e17f6347b9 | ||
|
|
0271bafb4a | ||
|
|
bd924fbd21 | ||
|
|
f03dfcb118 | ||
|
|
55859e8428 | ||
|
|
9917842f07 | ||
|
|
627a3ddcbe | ||
|
|
afd869308e | ||
|
|
a132100e63 | ||
|
|
2bf51c76e3 | ||
|
|
68f2b4100d | ||
|
|
239bf26fde | ||
|
|
3521e9ee7c | ||
|
|
76108b4269 | ||
|
|
e86d886a39 | ||
|
|
26e5014567 | ||
|
|
15be44a58f | ||
|
|
caa8de547f | ||
|
|
c3d6da666e | ||
|
|
11bf7ea354 | ||
|
|
268ec8dcfb | ||
|
|
aeac8435b3 | ||
|
|
57c50539dc | ||
|
|
699276e56d | ||
|
|
2ccd906e44 | ||
|
|
dc221e761b | ||
|
|
b5ab8812b5 | ||
|
|
67c4c8244a | ||
|
|
b9cb955cf0 | ||
|
|
6e88ab5a0a | ||
|
|
a304d26bf1 | ||
|
|
8040a8a6c9 | ||
|
|
e56f96394f | ||
|
|
2b5ab8095e | ||
|
|
9aa083d164 | ||
|
|
38b3593eb9 | ||
|
|
c7780075ec | ||
|
|
38e401b5da | ||
|
|
fcaedc5681 | ||
|
|
8b47c2662a | ||
|
|
6c0dd11f29 | ||
|
|
c83bcb3474 | ||
|
|
dbaf5f64e2 | ||
|
|
405fe6b78c | ||
|
|
76b5a3371c | ||
|
|
9c0a2a7935 | ||
|
|
8d006a16c5 | ||
|
|
41667f4ddb | ||
|
|
ee5d3d3760 | ||
|
|
f21ff53830 | ||
|
|
729c997642 | ||
|
|
55a09f7f45 | ||
|
|
dd6729f826 | ||
|
|
51beb29f52 | ||
|
|
3b5cb2dbe0 | ||
|
|
4b00f0ecae | ||
|
|
8062e10162 | ||
|
|
9ef41cf577 | ||
|
|
74a679de6f | ||
|
|
a69c3f2823 | ||
|
|
6a23966c34 | ||
|
|
f51f0998e1 | ||
|
|
654d2163c9 | ||
|
|
6d8c8c6201 | ||
|
|
1ff2935ebf | ||
|
|
48755f9f1a | ||
|
|
14828e756f | ||
|
|
1f736e400f | ||
|
|
b3ceb629ba | ||
|
|
ac4c37c684 | ||
|
|
784eebb2d3 | ||
|
|
87bd54fa05 | ||
|
|
1cab19e9e4 | ||
|
|
06d0e2fe6c | ||
|
|
a0278cad3f | ||
|
|
034031d4aa | ||
|
|
6ccf854061 | ||
|
|
3bf3aa26ae | ||
|
|
958f372509 | ||
|
|
0499e06f2f | ||
|
|
6c0ce09029 | ||
|
|
15ecdc3970 | ||
|
|
6261fcf307 | ||
|
|
b6b40d3015 | ||
|
|
c8fa9e9d53 | ||
|
|
4950dbceaf | ||
|
|
a4b47b89fd | ||
|
|
a97c83f7a4 | ||
|
|
9679be4bc0 | ||
|
|
7e065cd573 | ||
|
|
71ccd103bd | ||
|
|
02fe3ae907 | ||
|
|
61b112b67b | ||
|
|
1be46ef6b5 | ||
|
|
4de9641f1a | ||
|
|
2d6393a98d | ||
|
|
2497356d06 | ||
|
|
a3d23877f6 | ||
|
|
345489c9ec | ||
|
|
00a39d6e04 | ||
|
|
efbab73cc1 | ||
|
|
09f9c5d7f9 | ||
|
|
7fe96753d7 | ||
|
|
429d61252d | ||
|
|
5d233390db | ||
|
|
1710f6507d | ||
|
|
ac4aeb5714 | ||
|
|
7997c68ed4 | ||
|
|
3c0772977b | ||
|
|
3ea537c0ee | ||
|
|
110d377899 | ||
|
|
9b44d9d00f | ||
|
|
1b519fb666 | ||
|
|
e7a23d703b | ||
|
|
5171857329 | ||
|
|
3c1019e49d | ||
|
|
72a9f06ac2 | ||
|
|
b1e97c6a25 | ||
|
|
bd5a5bb561 | ||
|
|
fdc977afc6 | ||
|
|
73f45fcf0b | ||
|
|
b5029a25a8 | ||
|
|
0b9925ccec | ||
|
|
109a47b342 | ||
|
|
37225744db | ||
|
|
47dee375db | ||
|
|
4fec4a8e28 | ||
|
|
c3f2c8ad2a | ||
|
|
45a7b5ebd7 | ||
|
|
89cc682528 | ||
|
|
548889c35a | ||
|
|
d642294b1c | ||
|
|
0546636c74 | ||
|
|
425b1562c4 | ||
|
|
3cbc26f31b | ||
|
|
cffef113b9 | ||
|
|
bdad368991 | ||
|
|
153ef3d866 | ||
|
|
c8e5a7749c | ||
|
|
26c6fbdcda | ||
|
|
8628898acf | ||
|
|
6c323e359a | ||
|
|
34d12d1160 | ||
|
|
acc592b35a | ||
|
|
0ae42ee1bd | ||
|
|
ad08e0875b | ||
|
|
1aac02247f | ||
|
|
31a31272cd | ||
|
|
0091fef7a2 | ||
|
|
2d040dd68c | ||
|
|
fac947df77 | ||
|
|
f288c943c4 | ||
|
|
aff0a802e7 | ||
|
|
bb8eebc0e0 | ||
|
|
29e211886f | ||
|
|
5c327cb450 | ||
|
|
f28ea3e830 | ||
|
|
0840c6fb8f | ||
|
|
2a3f994723 | ||
|
|
f032c7eaed | ||
|
|
203bdd20fb | ||
|
|
ac6d40ece8 | ||
|
|
ba7ebbb35c | ||
|
|
ae98a61e22 | ||
|
|
05437805f7 | ||
|
|
def519efb3 | ||
|
|
f7b4364cbb | ||
|
|
85dccb6944 | ||
|
|
693dcc86cf | ||
|
|
ecd32d6faa | ||
|
|
3472cbbd88 | ||
|
|
989c69303d | ||
|
|
0f7dd40324 | ||
|
|
771d276b27 | ||
|
|
f74e04cc62 | ||
|
|
497b6744ea | ||
|
|
b63788a116 | ||
|
|
37c8f57318 | ||
|
|
82148c02c1 | ||
|
|
6f49e8a186 | ||
|
|
bcce658d31 | ||
|
|
2231d1063c | ||
|
|
f22a0bc574 | ||
|
|
81c165973e | ||
|
|
cdf1077d5a | ||
|
|
b0549839f6 | ||
|
|
51906ad6e3 | ||
|
|
06bcd852ad | ||
|
|
29b9461a5a | ||
|
|
fc110235ad | ||
|
|
77d3775941 | ||
|
|
c9e057a9a0 | ||
|
|
d6c66d4691 | ||
|
|
d78ebb82f5 | ||
|
|
8647792975 | ||
|
|
8a515c16fd | ||
|
|
59b560acef | ||
|
|
8ec0159159 | ||
|
|
1c9b0918b3 | ||
|
|
dee831c484 | ||
|
|
614f0727e4 | ||
|
|
e062eb16fb | ||
|
|
ebf258688e | ||
|
|
724ba02f1b | ||
|
|
ad43a73883 | ||
|
|
734dc36173 | ||
|
|
f51dd8c2ac | ||
|
|
9248689645 | ||
|
|
dc2e97c900 | ||
|
|
0a3593a555 | ||
|
|
0c60282786 | ||
|
|
9b24251c91 | ||
|
|
6a94d6ad8e | ||
|
|
49bf2e2ffe | ||
|
|
8faccb709a | ||
|
|
8050e0219f | ||
|
|
d12f87cd07 | ||
|
|
0aef1bc898 | ||
|
|
580e815f3b | ||
|
|
b229710811 | ||
|
|
432136ef56 | ||
|
|
b9723c4be9 | ||
|
|
72e3b5b2c5 | ||
|
|
c9e984a858 | ||
|
|
bca1a350c9 | ||
|
|
aac1ef7f80 | ||
|
|
8fdab8a4a4 | ||
|
|
35b878ca25 | ||
|
|
b6f1f369af | ||
|
|
a643964a5f | ||
|
|
4f780e94a1 | ||
|
|
1c2df9cd48 | ||
|
|
d1e3d0467c | ||
|
|
aa3fb7e1b5 | ||
|
|
66129c7214 | ||
|
|
b39a599cef | ||
|
|
cdb141dd94 | ||
|
|
5afc4e4c77 | ||
|
|
ced5cea41c | ||
|
|
acc248e83d | ||
|
|
fab630fac9 | ||
|
|
d13385cee7 | ||
|
|
7203100127 | ||
|
|
fea27ccca0 | ||
|
|
fb58a84c68 | ||
|
|
42c2c6bf33 | ||
|
|
abd62063ee | ||
|
|
d6996849f0 | ||
|
|
e6f05e78fe | ||
|
|
fa0f25891f | ||
|
|
3a2ad10de2 | ||
|
|
4b2b90fed3 | ||
|
|
9e612763f0 | ||
|
|
27c13712c9 | ||
|
|
be916257bd | ||
|
|
7da6324cab | ||
|
|
78fadcd063 | ||
|
|
2ab58d812f | ||
|
|
307c84c352 | ||
|
|
732242ab3d | ||
|
|
dbc963a42f | ||
|
|
a61ac8e2e7 | ||
|
|
604e975f93 | ||
|
|
bd4501fe28 | ||
|
|
8c4360ed89 | ||
|
|
b6cefbf052 | ||
|
|
4326cffa65 | ||
|
|
a925173da0 | ||
|
|
19de4d9408 | ||
|
|
4ec5d7dd18 | ||
|
|
5bd99f83d9 | ||
|
|
f5c07b6803 | ||
|
|
4800e179fe | ||
|
|
31a94868b5 | ||
|
|
cfe9758c4e | ||
|
|
abf58ecf6a | ||
|
|
a7e0b1ea01 | ||
|
|
3277d481eb | ||
|
|
5ac25c9102 | ||
|
|
5232326716 | ||
|
|
cb785ade5b | ||
|
|
733bbab53a | ||
|
|
9134e9f8bb | ||
|
|
269428e35c | ||
|
|
c0307e6cea | ||
|
|
dea6f5217e | ||
|
|
dcc0c894c4 | ||
|
|
d4bc17d696 | ||
|
|
13177d7ecb | ||
|
|
b524cca58a | ||
|
|
8d92858a91 | ||
|
|
0dfe9618c3 | ||
|
|
02345be986 | ||
|
|
28ff0e0d1d | ||
|
|
a85e552d95 | ||
|
|
ca4df94858 | ||
|
|
ed3df445d9 | ||
|
|
d803e8a20e | ||
|
|
de993a847f | ||
|
|
ea48370a50 | ||
|
|
15939cb2d7 | ||
|
|
d8aa40634a | ||
|
|
a0900fd0db | ||
|
|
004b546ae1 | ||
|
|
ff0107f60d | ||
|
|
f7dfa4ece7 | ||
|
|
dfb26082ea | ||
|
|
4893d28186 | ||
|
|
017fea7cfb | ||
|
|
9cac17d157 | ||
|
|
650a2d7628 | ||
|
|
b520882f0e | ||
|
|
2bd4f44409 | ||
|
|
ce6d3f1de4 | ||
|
|
e9e726f744 | ||
|
|
03a021a6fc | ||
|
|
ef77ce4407 | ||
|
|
0b769b2929 | ||
|
|
a8b7c6aad3 | ||
|
|
e5dfca02a9 | ||
|
|
53a11656cd | ||
|
|
d9439fdc36 | ||
|
|
1e6af9e2b6 | ||
|
|
b8c2a4eb0c | ||
|
|
dbe2d8c33c | ||
|
|
c84d3abeb8 | ||
|
|
26a6ce4c6d | ||
|
|
355bfa2193 | ||
|
|
a4c265f1b7 | ||
|
|
a9dd8a7308 | ||
|
|
b121a3e7b8 | ||
|
|
cedb1db594 | ||
|
|
a097963f80 | ||
|
|
5aab99f24b | ||
|
|
47a1718c4d | ||
|
|
52e7f4153b | ||
|
|
b597e3e188 | ||
|
|
8b2ddbc728 | ||
|
|
db11307502 | ||
|
|
c91dd55eda | ||
|
|
8366b414dd | ||
|
|
f075fdc474 | ||
|
|
7361ef732b | ||
|
|
789dbb3131 | ||
|
|
8f8a3b6a78 | ||
|
|
c8a2c31ec1 | ||
|
|
91c75c5c23 | ||
|
|
3c92144280 | ||
|
|
b158d9a649 | ||
|
|
685a6b602b | ||
|
|
a71dcd6f99 | ||
|
|
f0961498a0 | ||
|
|
e650129683 | ||
|
|
3977507339 | ||
|
|
f73a511d37 | ||
|
|
26fda00840 | ||
|
|
eace551c87 | ||
|
|
12084f6d57 | ||
|
|
f3e7539c67 | ||
|
|
93c0b879d4 | ||
|
|
9232f69b26 | ||
|
|
a5af49331d | ||
|
|
99309004bf | ||
|
|
9ce611a764 | ||
|
|
fc50d95b2e | ||
|
|
cea5e1c1e3 | ||
|
|
c7101830a6 | ||
|
|
b81f04a0cc | ||
|
|
b7654afb6b | ||
|
|
e15fedb925 | ||
|
|
c760c33b99 | ||
|
|
c0c0edd9d7 | ||
|
|
d36659cec7 | ||
|
|
6f17954f85 | ||
|
|
2404e3290e | ||
|
|
e19b7df8d3 | ||
|
|
d4440614ae | ||
|
|
6e87880e7f | ||
|
|
88120481a4 | ||
|
|
27bbfd652d | ||
|
|
62f986265f | ||
|
|
ecb8dff768 | ||
|
|
5604924945 | ||
|
|
f0bef772be | ||
|
|
be0501c875 | ||
|
|
4d2cfeab36 | ||
|
|
40ee78bc19 | ||
|
|
5a81c5c4be | ||
|
|
cd08120d62 | ||
|
|
feeb116c92 | ||
|
|
72760976a0 | ||
|
|
322ea7ff5b | ||
|
|
6786280807 | ||
|
|
4ec5953080 | ||
|
|
221ed5e47b | ||
|
|
c90a8a1a43 | ||
|
|
7f79a83f17 | ||
|
|
449e46958c | ||
|
|
d3c972403a | ||
|
|
acf580d2bb | ||
|
|
ece4fd5d22 | ||
|
|
420b9f5bd3 | ||
|
|
74c67e3da3 | ||
|
|
d9bba21306 | ||
|
|
3dc19feb29 | ||
|
|
44fe73ec37 | ||
|
|
e040c6c404 | ||
|
|
303f144eef | ||
|
|
835f16ea36 | ||
|
|
4e692bbee2 | ||
|
|
aa5b517a39 | ||
|
|
c7e557b82c | ||
|
|
5fc9688792 | ||
|
|
14ea8848fb | ||
|
|
9fde1f2ee3 | ||
|
|
9d85ce8e0c | ||
|
|
79a9add666 | ||
|
|
a046ba21d8 | ||
|
|
2c9c2e0b8b | ||
|
|
16a4fab9e2 | ||
|
|
06bdcea606 | ||
|
|
d5b3f29f3c | ||
|
|
589f3c7bc8 | ||
|
|
e86c7c863e | ||
|
|
da3f08fac3 | ||
|
|
64e46a033f | ||
|
|
08b157da8e | ||
|
|
9f23a9c2e1 | ||
|
|
6490fc71a7 | ||
|
|
2b5baea8fd | ||
|
|
aa2764abdd | ||
|
|
89a1efa4c4 | ||
|
|
6202ce5ada | ||
|
|
2e693eb80e | ||
|
|
ff3674a15e | ||
|
|
b38a7cd169 | ||
|
|
dd998adc7a | ||
|
|
b12e353424 | ||
|
|
5d3327e891 | ||
|
|
4a79503b3e | ||
|
|
623e988add | ||
|
|
f0b0b1fe62 | ||
|
|
f70095076b | ||
|
|
7ceba7c26b | ||
|
|
01a2b40e95 | ||
|
|
d3409bad9a | ||
|
|
1abf575f32 | ||
|
|
c7fae5d893 | ||
|
|
f78b7daec4 | ||
|
|
2669e05949 | ||
|
|
23831545a0 | ||
|
|
9d29d76280 | ||
|
|
f1f74a4e6c | ||
|
|
ad7e765319 | ||
|
|
0148e20c3c | ||
|
|
1138b986c9 | ||
|
|
610b413d7b | ||
|
|
901d20369a | ||
|
|
adb033b57b | ||
|
|
fd51d90159 | ||
|
|
5b0ddb931d | ||
|
|
e807517a93 | ||
|
|
022c848b4d | ||
|
|
eb1d0f8d60 | ||
|
|
f4621c5c8d | ||
|
|
fbd245c598 | ||
|
|
e99e4a64e0 | ||
|
|
b84fa548fb | ||
|
|
4b038ad2ef | ||
|
|
eb43c8ebfc | ||
|
|
b16a164c97 | ||
|
|
26eb806342 | ||
|
|
2c3b737af6 | ||
|
|
b0027b96ae | ||
|
|
97e6cc6198 | ||
|
|
16eba81f69 | ||
|
|
073dc71cd0 | ||
|
|
1b10753ad7 | ||
|
|
131c1600a9 | ||
|
|
60760f710f | ||
|
|
3e0138edb7 | ||
|
|
64a60ce3ba | ||
|
|
612e3c8a0e | ||
|
|
d37c78819a | ||
|
|
80a3e2615a | ||
|
|
e7fc39fdf5 | ||
|
|
6aa2163b69 | ||
|
|
42b7c44b2f | ||
|
|
b1fcd1751e | ||
|
|
d76032ae87 | ||
|
|
f3f6b6fe3e | ||
|
|
4993158ee5 | ||
|
|
79b68626ae | ||
|
|
eed5494fc6 | ||
|
|
85aea16f17 | ||
|
|
ed833048c2 | ||
|
|
6e6dbbc67d | ||
|
|
8a782c7eac | ||
|
|
8ba98516fd | ||
|
|
204cde580a | ||
|
|
2635573a7f | ||
|
|
988fd77c1f | ||
|
|
006fd19246 | ||
|
|
5f5d185d01 | ||
|
|
0149fb3d6b | ||
|
|
6fb3d6db99 | ||
|
|
7501728327 | ||
|
|
34159b72d9 | ||
|
|
419da5c734 | ||
|
|
866c9357c2 | ||
|
|
6b79a1e3e0 | ||
|
|
1b63238b67 | ||
|
|
0941ff72a0 | ||
|
|
384fc5e381 | ||
|
|
1827764450 | ||
|
|
4d38dbdfb5 | ||
|
|
9ecb99abf0 | ||
|
|
ff32369804 | ||
|
|
0ccad4d649 | ||
|
|
8f7bc45b5b | ||
|
|
5eefd3ebfd | ||
|
|
ec45003a8f | ||
|
|
064a9eca49 | ||
|
|
79a194692f | ||
|
|
e3efed7f4c | ||
|
|
f48321974b | ||
|
|
9aeaa2016e | ||
|
|
bd6bf25969 | ||
|
|
40dab58941 | ||
|
|
19272d866b | ||
|
|
394d6c122a | ||
|
|
f937114402 | ||
|
|
55c8843791 | ||
|
|
7155f7ab78 | ||
|
|
e1fbc886e1 | ||
|
|
cbecf57f3e | ||
|
|
0465aa45ea | ||
|
|
cdec99b243 | ||
|
|
3c9a424e6e | ||
|
|
498fd551fd | ||
|
|
d1a7c10325 | ||
|
|
380a5519cc | ||
|
|
718654848a | ||
|
|
420e8d6d03 | ||
|
|
908fbabe4e | ||
|
|
70eb870cfe | ||
|
|
6ab6ac450b | ||
|
|
eba14ddbe7 | ||
|
|
30466f26b4 | ||
|
|
837cea40fc | ||
|
|
ab5ce2e5ae | ||
|
|
5f041c01ed | ||
|
|
91606bbbe6 | ||
|
|
d7bbe1a210 | ||
|
|
1c724d01aa | ||
|
|
892130f75b | ||
|
|
57cae22c1e | ||
|
|
f1342a7b07 | ||
|
|
c6641709a7 | ||
|
|
246e0eaa71 | ||
|
|
04a99cb36b | ||
|
|
17534d2918 | ||
|
|
5ff1008ed9 | ||
|
|
3cbe767972 | ||
|
|
73372cc09a | ||
|
|
9a7785b9d6 | ||
|
|
87e08f4d9f | ||
|
|
255bcf8697 | ||
|
|
1796d1cc77 | ||
|
|
cb7b2a4f4b | ||
|
|
d73e6cef75 | ||
|
|
080ad919df | ||
|
|
61f240c288 | ||
|
|
fcb464671c | ||
|
|
c7da053d4b | ||
|
|
16bf821dfc | ||
|
|
e085fb643f | ||
|
|
c2f6a7df8d | ||
|
|
bc98bf65e8 | ||
|
|
8f9c9ab5c9 | ||
|
|
9cafc46d9e | ||
|
|
082434b274 | ||
|
|
ca163b85bb | ||
|
|
d2967221d2 | ||
|
|
68ecfc1e62 | ||
|
|
ede323a119 | ||
|
|
989193c797 | ||
|
|
039f241fc2 | ||
|
|
6f229b3e62 | ||
|
|
dba2d5b3f3 | ||
|
|
487023e94e | ||
|
|
9cb73659d5 | ||
|
|
d464e8a462 | ||
|
|
9645cd4826 | ||
|
|
e765969971 | ||
|
|
bb0bc06fa5 | ||
|
|
6f498956e5 | ||
|
|
663960e757 | ||
|
|
bd45af8bbb | ||
|
|
965a8dea0b | ||
|
|
f5f19a1fbd | ||
|
|
0771a30e9e | ||
|
|
823a47ee3b | ||
|
|
a6f70b42b6 | ||
|
|
4fb2ba2861 | ||
|
|
0f059d6d65 | ||
|
|
2de14eb942 | ||
|
|
a736bf6bfb | ||
|
|
8a2fc54508 | ||
|
|
c1b2d416d7 | ||
|
|
89d10d8f3f | ||
|
|
9d8bde85cb | ||
|
|
811be0df3a | ||
|
|
12f26bf0bc | ||
|
|
dc9d36c0a6 | ||
|
|
cce3982c48 | ||
|
|
26abc15e04 | ||
|
|
f2845ed83c | ||
|
|
7f56cb2978 | ||
|
|
65dd056e41 | ||
|
|
35cae7f1b3 | ||
|
|
e34c7e3f59 | ||
|
|
e1a056e163 | ||
|
|
171fd8999f | ||
|
|
762c0f2264 | ||
|
|
d162934bdc | ||
|
|
caeb10bf06 | ||
|
|
f4af1a9af4 | ||
|
|
806ae29d80 | ||
|
|
d6fc63ac31 | ||
|
|
dbefcc0609 | ||
|
|
a857728267 | ||
|
|
40347d0c07 | ||
|
|
de4e2662d7 | ||
|
|
69df584416 | ||
|
|
53dc9fd0a0 | ||
|
|
194c0a5cfb | ||
|
|
aa11256555 | ||
|
|
4e887f032d | ||
|
|
6a032503ca | ||
|
|
558d93f3a5 | ||
|
|
59058775fc | ||
|
|
3d90819149 | ||
|
|
aa8f85223b | ||
|
|
56cfbeefb4 | ||
|
|
293e20df91 | ||
|
|
dec4405cfa | ||
|
|
be3f2713ad | ||
|
|
96b69deca5 | ||
|
|
9897e1c27c | ||
|
|
bafadaafbb | ||
|
|
92c4d8149a | ||
|
|
1a64595780 | ||
|
|
4a7f012b95 | ||
|
|
f441a652b7 | ||
|
|
24517b9635 | ||
|
|
9cfba09ac0 | ||
|
|
849e54cedd | ||
|
|
2a388b53f2 | ||
|
|
a046f56491 | ||
|
|
60c58b5284 | ||
|
|
c7dc1d78bf | ||
|
|
dea998997f | ||
|
|
1eb51a2010 | ||
|
|
d8f3bb1837 | ||
|
|
6e5a1165be | ||
|
|
568429512e | ||
|
|
7dd7a7da20 | ||
|
|
9ade6e1001 | ||
|
|
17c817adfc | ||
|
|
b44c5cf639 | ||
|
|
1832ba7509 | ||
|
|
aaf6f6215f | ||
|
|
a5d74843eb | ||
|
|
cff15f9d3c | ||
|
|
dc002cb7b4 | ||
|
|
d6bbda4bc2 | ||
|
|
1a0a10cf3d | ||
|
|
15cc8bc72f | ||
|
|
3e1e3ac789 | ||
|
|
8ced62f250 | ||
|
|
4727fa2a75 | ||
|
|
5d5cc0d082 | ||
|
|
ec623a0bb7 | ||
|
|
c2b8b5bfe2 | ||
|
|
cdc359989a | ||
|
|
86c16df39d | ||
|
|
567c791d01 | ||
|
|
fe0396cadc | ||
|
|
fa8ba206bf | ||
|
|
b9e31b5163 | ||
|
|
6f31722950 | ||
|
|
1ce01eaaf7 | ||
|
|
00170953b1 | ||
|
|
5f589826f3 | ||
|
|
fee146e60b | ||
|
|
1799f2f81d | ||
|
|
5b4805d6e9 | ||
|
|
2e45ce1493 | ||
|
|
5d011cb278 | ||
|
|
ba7ea4456f | ||
|
|
0b74e5d7af | ||
|
|
0c00af126d | ||
|
|
7e77938d72 | ||
|
|
65055a5fbd | ||
|
|
cbada4a982 | ||
|
|
94bedd013e | ||
|
|
0134764fa6 | ||
|
|
66bf686975 | ||
|
|
bafe1a2d67 | ||
|
|
95f8b81962 | ||
|
|
ca67339901 | ||
|
|
b60b15bc11 | ||
|
|
0f6e9c5d3d | ||
|
|
5dd85e525d | ||
|
|
eaa101b502 | ||
|
|
50b20b90aa | ||
|
|
a83e8ec008 | ||
|
|
1f2acb7e40 | ||
|
|
b0a2ba2ffa | ||
|
|
780ada18aa | ||
|
|
061103dc82 | ||
|
|
8b55eafed1 | ||
|
|
12de7e2a4a | ||
|
|
05b4e18142 | ||
|
|
7231c62c9f | ||
|
|
d20f086be5 | ||
|
|
f3a73f1277 | ||
|
|
18bd24ba9d | ||
|
|
fcf1609b7c | ||
|
|
d0f406366c | ||
|
|
3554089838 | ||
|
|
0bd82af834 | ||
|
|
1f4a6c8a4e | ||
|
|
bc137ff67b | ||
|
|
fb209003a8 | ||
|
|
2f7f482c77 | ||
|
|
ce3f4ade67 | ||
|
|
7266bedc04 | ||
|
|
37c68efee2 | ||
|
|
b212094839 | ||
|
|
48178d2cf2 | ||
|
|
177e7b53e7 | ||
|
|
3461e8ce64 | ||
|
|
d77a84bf52 | ||
|
|
7460798ba5 | ||
|
|
612104bb8d | ||
|
|
de53e6de49 | ||
|
|
5e6533e707 | ||
|
|
7777e7a8d5 | ||
|
|
3da6564f90 | ||
|
|
23d1c06268 | ||
|
|
87b2495f95 | ||
|
|
86ede50943 | ||
|
|
37293583cd | ||
|
|
ce3780251c | ||
|
|
3fedf4a59b | ||
|
|
f18322262f | ||
|
|
cb5c47f20d | ||
|
|
194b374bb6 | ||
|
|
ba06be3844 | ||
|
|
06bdc7f6db | ||
|
|
dfeaaeb0ad | ||
|
|
62a1579525 | ||
|
|
b1d85bf60f | ||
|
|
20f43ddfde | ||
|
|
31498df5f0 | ||
|
|
12238fe851 | ||
|
|
0462172ccf | ||
|
|
c26a9ecaa2 | ||
|
|
7cdcfee82c | ||
|
|
54d48955f6 | ||
|
|
2f8625d824 | ||
|
|
13888e0eef | ||
|
|
bdcfdebd68 | ||
|
|
05c202a702 | ||
|
|
cd6d56e9a6 | ||
|
|
a18cc591a5 | ||
|
|
5d91201069 | ||
|
|
a1914dbb31 | ||
|
|
aeae7fc903 | ||
|
|
d2a953e02b | ||
|
|
18373264d9 | ||
|
|
66de2b710f | ||
|
|
388a807e49 | ||
|
|
0ca0a536f5 | ||
|
|
ed0d9dc836 | ||
|
|
08ae94404f | ||
|
|
c0e2b5f473 | ||
|
|
c05c58f8ff | ||
|
|
45948a03c0 | ||
|
|
7718117104 | ||
|
|
406030d1b0 | ||
|
|
7d28d12ef3 | ||
|
|
bd3088fd56 | ||
|
|
e40a448e45 | ||
|
|
cc5dd3ec10 | ||
|
|
3db5721e21 | ||
|
|
7238492235 | ||
|
|
2e3aa0587c | ||
|
|
812945a8f1 | ||
|
|
db2056f341 | ||
|
|
36ffe64498 | ||
|
|
fcd6414e77 | ||
|
|
690f662e26 | ||
|
|
6a382101dd | ||
|
|
8979e9e387 | ||
|
|
034c28b0a4 | ||
|
|
b945a532e5 | ||
|
|
bab8d38f7f | ||
|
|
c74b33a413 | ||
|
|
c6a419b490 | ||
|
|
7602232642 | ||
|
|
35fb3441f8 | ||
|
|
e7c949d32d | ||
|
|
040395b944 | ||
|
|
3f7656cc23 | ||
|
|
7e54f0fe4b | ||
|
|
921c347ef6 | ||
|
|
ee72b6915e | ||
|
|
ece841f03f | ||
|
|
9194f3c0cb | ||
|
|
20b770eecd | ||
|
|
4327d50904 | ||
|
|
324bcbfaed | ||
|
|
6cf994b924 | ||
|
|
6002212d2b | ||
|
|
078312979e | ||
|
|
f8a5ab5257 | ||
|
|
cf8f6559ce | ||
|
|
f3627c82d0 | ||
|
|
e7c8b71a86 | ||
|
|
af631e1f19 | ||
|
|
30bd74cf74 | ||
|
|
5404978825 | ||
|
|
d5683faab9 | ||
|
|
9b51b3a9ca | ||
|
|
01860f6fe4 | ||
|
|
38cc168822 | ||
|
|
90a109f0ee | ||
|
|
36c4e8b27a | ||
|
|
90889b9a45 | ||
|
|
8903b9fa83 | ||
|
|
ce2b56cd69 | ||
|
|
55f092db09 | ||
|
|
38ad2dcea6 | ||
|
|
67ec82a262 | ||
|
|
571b7c978e | ||
|
|
d6be2671ed | ||
|
|
57694362e0 | ||
|
|
dd4f953350 | ||
|
|
cd82f69823 | ||
|
|
9a8fe58caf | ||
|
|
e00470aef8 | ||
|
|
48b8023ef0 | ||
|
|
69ceed8e3a | ||
|
|
01276f4453 | ||
|
|
e12ec3615c | ||
|
|
9d8decc162 | ||
|
|
e665d0bdd9 | ||
|
|
683b5a3161 | ||
|
|
c3bf837572 | ||
|
|
730cdefd3e | ||
|
|
50f944272c | ||
|
|
ed29c2f945 | ||
|
|
43be86dbff | ||
|
|
00a203b7bc | ||
|
|
a3df343cda | ||
|
|
3c8e04e939 | ||
|
|
623279169a | ||
|
|
c21ce82832 | ||
|
|
a5d930e464 | ||
|
|
eeb5ef0a24 | ||
|
|
e562c71783 | ||
|
|
ca8f8fd304 | ||
|
|
8c1dce86e8 | ||
|
|
c667593e1e | ||
|
|
9c82fc457e | ||
|
|
f6097ef243 | ||
|
|
9ac42bc15c | ||
|
|
15c43d9ac7 | ||
|
|
eb53c69ece | ||
|
|
0e1b4fb941 | ||
|
|
e723e36da6 | ||
|
|
ee825f9372 | ||
|
|
419456617e | ||
|
|
0b762e0c0c | ||
|
|
575e81f7c9 | ||
|
|
bb581f4e83 | ||
|
|
1e9e9ce2dc | ||
|
|
4d1424faf9 | ||
|
|
48f0168e95 | ||
|
|
12355c4c4c | ||
|
|
fe776ce61f | ||
|
|
9759c3d542 | ||
|
|
d1474f02aa | ||
|
|
c92c50f2fe | ||
|
|
ef73bbf778 | ||
|
|
eba342af87 | ||
|
|
812fbc5ecb | ||
|
|
cd9ae6d758 | ||
|
|
894ab8be7e | ||
|
|
62da0bf162 | ||
|
|
e8a4a3e2b1 | ||
|
|
f79f71fc22 | ||
|
|
481b834842 | ||
|
|
6ddbc845cc | ||
|
|
d318d7cb6f | ||
|
|
ad747e94d0 | ||
|
|
3ef3dcb8b6 | ||
|
|
501efcad4a | ||
|
|
3c092e2474 | ||
|
|
b50e0badbc | ||
|
|
b999f1509c | ||
|
|
7f71d1e00a | ||
|
|
b0bfea4f5f | ||
|
|
ee5b80597e | ||
|
|
87175ed592 | ||
|
|
3d6b8a667f | ||
|
|
d5c0e366d7 | ||
|
|
1eb760e55d | ||
|
|
1b3d775366 | ||
|
|
dd5510750a | ||
|
|
f137697c32 | ||
|
|
4fa8e73249 | ||
|
|
09969ac9a2 | ||
|
|
2ff108aac6 | ||
|
|
ba317bc9dc | ||
|
|
fc4ddc0d00 | ||
|
|
67774db59f | ||
|
|
21952bab12 | ||
|
|
0fe900a543 | ||
|
|
7793a51ddc | ||
|
|
58cb7886c3 | ||
|
|
a124bc7a81 | ||
|
|
a2e61adc96 | ||
|
|
55f5d557f2 | ||
|
|
b09aa3ac54 | ||
|
|
992d9a062a | ||
|
|
8fa5ca4899 | ||
|
|
b6d71a308c | ||
|
|
f5617fd083 | ||
|
|
3140e90175 | ||
|
|
d8808d365e | ||
|
|
1589ecb0ae | ||
|
|
e1d22db451 | ||
|
|
ad0ac045d5 | ||
|
|
5e1e6a9f17 | ||
|
|
2d06b08cba | ||
|
|
0548046ae3 | ||
|
|
14bc773199 |
15
.mailmap
15
.mailmap
@@ -1,26 +1,37 @@
|
|||||||
Adrian Grange <agrange@google.com>
|
Adrian Grange <agrange@google.com>
|
||||||
Alex Converse <aconverse@google.com> <alex.converse@gmail.com>
|
Aℓex Converse <aconverse@google.com>
|
||||||
|
Aℓex Converse <aconverse@google.com> <alex.converse@gmail.com>
|
||||||
Alexis Ballier <aballier@gentoo.org> <alexis.ballier@gmail.com>
|
Alexis Ballier <aballier@gentoo.org> <alexis.ballier@gmail.com>
|
||||||
Alpha Lam <hclam@google.com> <hclam@chromium.org>
|
Alpha Lam <hclam@google.com> <hclam@chromium.org>
|
||||||
|
Daniele Castagna <dcastagna@chromium.org> <dcastagna@google.com>
|
||||||
Deb Mukherjee <debargha@google.com>
|
Deb Mukherjee <debargha@google.com>
|
||||||
Erik Niemeyer <erik.a.niemeyer@intel.com> <erik.a.niemeyer@gmail.com>
|
Erik Niemeyer <erik.a.niemeyer@intel.com> <erik.a.niemeyer@gmail.com>
|
||||||
Guillaume Martres <gmartres@google.com> <smarter3@gmail.com>
|
Guillaume Martres <gmartres@google.com> <smarter3@gmail.com>
|
||||||
Hangyu Kuang <hkuang@google.com>
|
Hangyu Kuang <hkuang@google.com>
|
||||||
|
Hui Su <huisu@google.com>
|
||||||
|
Jacky Chen <jackychen@google.com>
|
||||||
Jim Bankoski <jimbankoski@google.com>
|
Jim Bankoski <jimbankoski@google.com>
|
||||||
Johann Koenig <johannkoenig@google.com>
|
Johann Koenig <johannkoenig@google.com>
|
||||||
Johann Koenig <johannkoenig@google.com> <johann.koenig@duck.com>
|
Johann Koenig <johannkoenig@google.com> <johann.koenig@duck.com>
|
||||||
|
Johann Koenig <johannkoenig@google.com> <johann.koenig@gmail.com>
|
||||||
|
Johann Koenig <johannkoenig@google.com> <johannkoenig@chromium.org>
|
||||||
John Koleszar <jkoleszar@google.com>
|
John Koleszar <jkoleszar@google.com>
|
||||||
Joshua Litt <joshualitt@google.com> <joshualitt@chromium.org>
|
Joshua Litt <joshualitt@google.com> <joshualitt@chromium.org>
|
||||||
Marco Paniconi <marpan@google.com>
|
Marco Paniconi <marpan@google.com>
|
||||||
Marco Paniconi <marpan@google.com> <marpan@chromium.org>
|
Marco Paniconi <marpan@google.com> <marpan@chromium.org>
|
||||||
Pascal Massimino <pascal.massimino@gmail.com>
|
Pascal Massimino <pascal.massimino@gmail.com>
|
||||||
Paul Wilkins <paulwilkins@google.com>
|
Paul Wilkins <paulwilkins@google.com>
|
||||||
|
Peter de Rivaz <peter.derivaz@gmail.com>
|
||||||
|
Peter de Rivaz <peter.derivaz@gmail.com> <peter.derivaz@argondesign.com>
|
||||||
Ralph Giles <giles@xiph.org> <giles@entropywave.com>
|
Ralph Giles <giles@xiph.org> <giles@entropywave.com>
|
||||||
Ralph Giles <giles@xiph.org> <giles@mozilla.com>
|
Ralph Giles <giles@xiph.org> <giles@mozilla.com>
|
||||||
|
Ronald S. Bultje <rsbultje@gmail.com> <rbultje@google.com>
|
||||||
Sami Pietilä <samipietila@google.com>
|
Sami Pietilä <samipietila@google.com>
|
||||||
Tamar Levy <tamar.levy@intel.com>
|
Tamar Levy <tamar.levy@intel.com>
|
||||||
Tamar Levy <tamar.levy@intel.com> <levytamar82@gmail.com>
|
Tamar Levy <tamar.levy@intel.com> <levytamar82@gmail.com>
|
||||||
Tero Rintaluoma <teror@google.com> <tero.rintaluoma@on2.com>
|
Tero Rintaluoma <teror@google.com> <tero.rintaluoma@on2.com>
|
||||||
Timothy B. Terriberry <tterribe@xiph.org> Tim Terriberry <tterriberry@mozilla.com>
|
Timothy B. Terriberry <tterribe@xiph.org> <tterriberry@mozilla.com>
|
||||||
Tom Finegan <tomfinegan@google.com>
|
Tom Finegan <tomfinegan@google.com>
|
||||||
|
Tom Finegan <tomfinegan@google.com> <tomfinegan@chromium.org>
|
||||||
Yaowu Xu <yaowu@google.com> <yaowu@xuyaowu.com>
|
Yaowu Xu <yaowu@google.com> <yaowu@xuyaowu.com>
|
||||||
|
Yaowu Xu <yaowu@google.com> <Yaowu Xu>
|
||||||
|
|||||||
21
AUTHORS
21
AUTHORS
@@ -5,9 +5,9 @@ Aaron Watry <awatry@gmail.com>
|
|||||||
Abo Talib Mahfoodh <ab.mahfoodh@gmail.com>
|
Abo Talib Mahfoodh <ab.mahfoodh@gmail.com>
|
||||||
Adam Xu <adam@xuyaowu.com>
|
Adam Xu <adam@xuyaowu.com>
|
||||||
Adrian Grange <agrange@google.com>
|
Adrian Grange <agrange@google.com>
|
||||||
|
Aℓex Converse <aconverse@google.com>
|
||||||
Ahmad Sharif <asharif@google.com>
|
Ahmad Sharif <asharif@google.com>
|
||||||
Alexander Voronov <avoronov@graphics.cs.msu.ru>
|
Alexander Voronov <avoronov@graphics.cs.msu.ru>
|
||||||
Alex Converse <aconverse@google.com>
|
|
||||||
Alexis Ballier <aballier@gentoo.org>
|
Alexis Ballier <aballier@gentoo.org>
|
||||||
Alok Ahuja <waveletcoeff@gmail.com>
|
Alok Ahuja <waveletcoeff@gmail.com>
|
||||||
Alpha Lam <hclam@google.com>
|
Alpha Lam <hclam@google.com>
|
||||||
@@ -16,17 +16,21 @@ Ami Fischman <fischman@chromium.org>
|
|||||||
Andoni Morales Alastruey <ylatuya@gmail.com>
|
Andoni Morales Alastruey <ylatuya@gmail.com>
|
||||||
Andres Mejia <mcitadel@gmail.com>
|
Andres Mejia <mcitadel@gmail.com>
|
||||||
Andrew Russell <anrussell@google.com>
|
Andrew Russell <anrussell@google.com>
|
||||||
|
Angie Chiang <angiebird@google.com>
|
||||||
Aron Rosenberg <arosenberg@logitech.com>
|
Aron Rosenberg <arosenberg@logitech.com>
|
||||||
Attila Nagy <attilanagy@google.com>
|
Attila Nagy <attilanagy@google.com>
|
||||||
|
Brion Vibber <bvibber@wikimedia.org>
|
||||||
changjun.yang <changjun.yang@intel.com>
|
changjun.yang <changjun.yang@intel.com>
|
||||||
Charles 'Buck' Krasic <ckrasic@google.com>
|
Charles 'Buck' Krasic <ckrasic@google.com>
|
||||||
chm <chm@rock-chips.com>
|
chm <chm@rock-chips.com>
|
||||||
Christian Duvivier <cduvivier@google.com>
|
Christian Duvivier <cduvivier@google.com>
|
||||||
|
Daniele Castagna <dcastagna@chromium.org>
|
||||||
Daniel Kang <ddkang@google.com>
|
Daniel Kang <ddkang@google.com>
|
||||||
Deb Mukherjee <debargha@google.com>
|
Deb Mukherjee <debargha@google.com>
|
||||||
Dim Temp <dimtemp0@gmail.com>
|
Dim Temp <dimtemp0@gmail.com>
|
||||||
Dmitry Kovalev <dkovalev@google.com>
|
Dmitry Kovalev <dkovalev@google.com>
|
||||||
Dragan Mrdjan <dmrdjan@mips.com>
|
Dragan Mrdjan <dmrdjan@mips.com>
|
||||||
|
Ed Baker <edward.baker@intel.com>
|
||||||
Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
||||||
Erik Niemeyer <erik.a.niemeyer@intel.com>
|
Erik Niemeyer <erik.a.niemeyer@intel.com>
|
||||||
Fabio Pedretti <fabio.ped@libero.it>
|
Fabio Pedretti <fabio.ped@libero.it>
|
||||||
@@ -34,6 +38,8 @@ Frank Galligan <fgalligan@google.com>
|
|||||||
Fredrik Söderquist <fs@opera.com>
|
Fredrik Söderquist <fs@opera.com>
|
||||||
Fritz Koenig <frkoenig@google.com>
|
Fritz Koenig <frkoenig@google.com>
|
||||||
Gaute Strokkenes <gaute.strokkenes@broadcom.com>
|
Gaute Strokkenes <gaute.strokkenes@broadcom.com>
|
||||||
|
Geza Lore <gezalore@gmail.com>
|
||||||
|
Ghislain MARY <ghislainmary2@gmail.com>
|
||||||
Giuseppe Scrivano <gscrivano@gnu.org>
|
Giuseppe Scrivano <gscrivano@gnu.org>
|
||||||
Gordana Cmiljanovic <gordana.cmiljanovic@imgtec.com>
|
Gordana Cmiljanovic <gordana.cmiljanovic@imgtec.com>
|
||||||
Guillaume Martres <gmartres@google.com>
|
Guillaume Martres <gmartres@google.com>
|
||||||
@@ -51,22 +57,27 @@ James Zern <jzern@google.com>
|
|||||||
Jan Gerber <j@mailb.org>
|
Jan Gerber <j@mailb.org>
|
||||||
Jan Kratochvil <jan.kratochvil@redhat.com>
|
Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
Janne Salonen <jsalonen@google.com>
|
Janne Salonen <jsalonen@google.com>
|
||||||
|
Jean-Yves Avenard <jyavenard@mozilla.com>
|
||||||
Jeff Faust <jfaust@google.com>
|
Jeff Faust <jfaust@google.com>
|
||||||
Jeff Muizelaar <jmuizelaar@mozilla.com>
|
Jeff Muizelaar <jmuizelaar@mozilla.com>
|
||||||
Jeff Petkau <jpet@chromium.org>
|
Jeff Petkau <jpet@chromium.org>
|
||||||
Jia Jia <jia.jia@linaro.org>
|
Jia Jia <jia.jia@linaro.org>
|
||||||
|
Jian Zhou <zhoujian@google.com>
|
||||||
Jim Bankoski <jimbankoski@google.com>
|
Jim Bankoski <jimbankoski@google.com>
|
||||||
Jingning Han <jingning@google.com>
|
Jingning Han <jingning@google.com>
|
||||||
Joey Parrish <joeyparrish@google.com>
|
Joey Parrish <joeyparrish@google.com>
|
||||||
Johann Koenig <johannkoenig@google.com>
|
Johann Koenig <johannkoenig@google.com>
|
||||||
John Koleszar <jkoleszar@google.com>
|
John Koleszar <jkoleszar@google.com>
|
||||||
|
Johnny Klonaris <google@jawknee.com>
|
||||||
John Stark <jhnstrk@gmail.com>
|
John Stark <jhnstrk@gmail.com>
|
||||||
Joshua Bleecher Snyder <josh@treelinelabs.com>
|
Joshua Bleecher Snyder <josh@treelinelabs.com>
|
||||||
Joshua Litt <joshualitt@google.com>
|
Joshua Litt <joshualitt@google.com>
|
||||||
|
Julia Robson <juliamrobson@gmail.com>
|
||||||
Justin Clift <justin@salasaga.org>
|
Justin Clift <justin@salasaga.org>
|
||||||
Justin Lebar <justin.lebar@gmail.com>
|
Justin Lebar <justin.lebar@gmail.com>
|
||||||
KO Myung-Hun <komh@chollian.net>
|
KO Myung-Hun <komh@chollian.net>
|
||||||
Lawrence Velázquez <larryv@macports.org>
|
Lawrence Velázquez <larryv@macports.org>
|
||||||
|
Linfeng Zhang <linfengz@google.com>
|
||||||
Lou Quillio <louquillio@google.com>
|
Lou Quillio <louquillio@google.com>
|
||||||
Luca Barbato <lu_zero@gentoo.org>
|
Luca Barbato <lu_zero@gentoo.org>
|
||||||
Makoto Kato <makoto.kt@gmail.com>
|
Makoto Kato <makoto.kt@gmail.com>
|
||||||
@@ -82,6 +93,7 @@ Mike Hommey <mhommey@mozilla.com>
|
|||||||
Mikhal Shemer <mikhal@google.com>
|
Mikhal Shemer <mikhal@google.com>
|
||||||
Minghai Shang <minghai@google.com>
|
Minghai Shang <minghai@google.com>
|
||||||
Morton Jonuschat <yabawock@gmail.com>
|
Morton Jonuschat <yabawock@gmail.com>
|
||||||
|
Nico Weber <thakis@chromium.org>
|
||||||
Parag Salasakar <img.mips1@gmail.com>
|
Parag Salasakar <img.mips1@gmail.com>
|
||||||
Pascal Massimino <pascal.massimino@gmail.com>
|
Pascal Massimino <pascal.massimino@gmail.com>
|
||||||
Patrik Westin <patrik.westin@gmail.com>
|
Patrik Westin <patrik.westin@gmail.com>
|
||||||
@@ -96,14 +108,17 @@ Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
|
|||||||
Rafaël Carré <funman@videolan.org>
|
Rafaël Carré <funman@videolan.org>
|
||||||
Ralph Giles <giles@xiph.org>
|
Ralph Giles <giles@xiph.org>
|
||||||
Rob Bradford <rob@linux.intel.com>
|
Rob Bradford <rob@linux.intel.com>
|
||||||
Ronald S. Bultje <rbultje@google.com>
|
Ronald S. Bultje <rsbultje@gmail.com>
|
||||||
Rui Ueyama <ruiu@google.com>
|
Rui Ueyama <ruiu@google.com>
|
||||||
Sami Pietilä <samipietila@google.com>
|
Sami Pietilä <samipietila@google.com>
|
||||||
|
Sasi Inguva <isasi@google.com>
|
||||||
Scott Graham <scottmg@chromium.org>
|
Scott Graham <scottmg@chromium.org>
|
||||||
Scott LaVarnway <slavarnway@google.com>
|
Scott LaVarnway <slavarnway@google.com>
|
||||||
Sean McGovern <gseanmcg@gmail.com>
|
Sean McGovern <gseanmcg@gmail.com>
|
||||||
|
Sergey Kolomenkin <kolomenkin@gmail.com>
|
||||||
Sergey Ulanov <sergeyu@chromium.org>
|
Sergey Ulanov <sergeyu@chromium.org>
|
||||||
Shimon Doodkin <helpmepro1@gmail.com>
|
Shimon Doodkin <helpmepro1@gmail.com>
|
||||||
|
Shunyao Li <shunyaoli@google.com>
|
||||||
Stefan Holmer <holmer@google.com>
|
Stefan Holmer <holmer@google.com>
|
||||||
Suman Sunkara <sunkaras@google.com>
|
Suman Sunkara <sunkaras@google.com>
|
||||||
Taekhyun Kim <takim@nvidia.com>
|
Taekhyun Kim <takim@nvidia.com>
|
||||||
@@ -117,8 +132,10 @@ Timothy B. Terriberry <tterribe@xiph.org>
|
|||||||
Tom Finegan <tomfinegan@google.com>
|
Tom Finegan <tomfinegan@google.com>
|
||||||
Vignesh Venkatasubramanian <vigneshv@google.com>
|
Vignesh Venkatasubramanian <vigneshv@google.com>
|
||||||
Yaowu Xu <yaowu@google.com>
|
Yaowu Xu <yaowu@google.com>
|
||||||
|
Yi Luo <luoyi@google.com>
|
||||||
Yongzhe Wang <yongzhe@google.com>
|
Yongzhe Wang <yongzhe@google.com>
|
||||||
Yunqing Wang <yunqingwang@google.com>
|
Yunqing Wang <yunqingwang@google.com>
|
||||||
|
Yury Gitman <yuryg@google.com>
|
||||||
Zoe Liu <zoeliu@google.com>
|
Zoe Liu <zoeliu@google.com>
|
||||||
Google Inc.
|
Google Inc.
|
||||||
The Mozilla Foundation
|
The Mozilla Foundation
|
||||||
|
|||||||
50
CHANGELOG
50
CHANGELOG
@@ -1,7 +1,49 @@
|
|||||||
xxxx-yy-zz v1.4.0 "Changes for next release"
|
2016-07-20 v1.6.0 "Khaki Campbell Duck"
|
||||||
vpxenc is changed to use VP9 by default.
|
This release improves upon the VP9 encoder and speeds up the encoding and
|
||||||
Encoder controls added for 1 pass SVC.
|
decoding processes.
|
||||||
Decoder control to toggle on/off loopfilter.
|
|
||||||
|
- Upgrading:
|
||||||
|
This release is ABI incompatible with 1.5.0 due to a new 'color_range' enum
|
||||||
|
in vpx_image and some minor changes to the VP8_COMP structure.
|
||||||
|
|
||||||
|
The default key frame interval for VP9 has changed from 128 to 9999.
|
||||||
|
|
||||||
|
- Enhancement:
|
||||||
|
A core focus has been performance for low end Intel processors. SSSE3
|
||||||
|
instructions such as 'pshufb' have been avoided and instructions have been
|
||||||
|
reordered to better accommodate the more constrained pipelines.
|
||||||
|
|
||||||
|
As a result, devices based on Celeron processors have seen substantial
|
||||||
|
decoding improvements. From Indian Runner Duck to Javan Whistling Duck,
|
||||||
|
decoding speed improved between 10 and 30%. Between Javan Whistling Duck
|
||||||
|
and Khaki Campbell Duck, it improved another 10 to 15%.
|
||||||
|
|
||||||
|
While Celeron benefited most, Core-i5 also improved 5% and 10% between the
|
||||||
|
respective releases.
|
||||||
|
|
||||||
|
Realtime performance for WebRTC for both speed and quality has received a
|
||||||
|
lot of attention.
|
||||||
|
|
||||||
|
- Bug Fixes:
|
||||||
|
A number of fuzzing issues, found variously by Mozilla, Chromium and others,
|
||||||
|
have been fixed and we strongly recommend updating.
|
||||||
|
|
||||||
|
2015-11-09 v1.5.0 "Javan Whistling Duck"
|
||||||
|
This release improves upon the VP9 encoder and speeds up the encoding and
|
||||||
|
decoding processes.
|
||||||
|
|
||||||
|
- Upgrading:
|
||||||
|
This release is ABI incompatible with 1.4.0. It drops deprecated VP8
|
||||||
|
controls and adds a variety of VP9 controls for testing.
|
||||||
|
|
||||||
|
The vpxenc utility now prefers VP9 by default.
|
||||||
|
|
||||||
|
- Enhancements:
|
||||||
|
Faster VP9 encoding and decoding
|
||||||
|
Smaller library size by combining functions used by VP8 and VP9
|
||||||
|
|
||||||
|
- Bug Fixes:
|
||||||
|
A variety of fuzzing issues
|
||||||
|
|
||||||
2015-04-03 v1.4.0 "Indian Runner Duck"
|
2015-04-03 v1.4.0 "Indian Runner Duck"
|
||||||
This release includes significant improvements to the VP9 codec.
|
This release includes significant improvements to the VP9 codec.
|
||||||
|
|||||||
3
README
3
README
@@ -1,4 +1,4 @@
|
|||||||
README - 23 March 2015
|
README - 20 July 2016
|
||||||
|
|
||||||
Welcome to the WebM VP8/VP9 Codec SDK!
|
Welcome to the WebM VP8/VP9 Codec SDK!
|
||||||
|
|
||||||
@@ -47,7 +47,6 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
|||||||
--help output of the configure script. As of this writing, the list of
|
--help output of the configure script. As of this writing, the list of
|
||||||
available targets is:
|
available targets is:
|
||||||
|
|
||||||
armv6-darwin-gcc
|
|
||||||
armv6-linux-rvct
|
armv6-linux-rvct
|
||||||
armv6-linux-gcc
|
armv6-linux-gcc
|
||||||
armv6-none-rvct
|
armv6-none-rvct
|
||||||
|
|||||||
@@ -174,9 +174,6 @@ endif
|
|||||||
ifeq ($(CONFIG_VP9), yes)
|
ifeq ($(CONFIG_VP9), yes)
|
||||||
$$(rtcd_dep_template_SRCS): vp9_rtcd.h
|
$$(rtcd_dep_template_SRCS): vp9_rtcd.h
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_VP10), yes)
|
|
||||||
$$(rtcd_dep_template_SRCS): vp10_rtcd.h
|
|
||||||
endif
|
|
||||||
$$(rtcd_dep_template_SRCS): vpx_scale_rtcd.h
|
$$(rtcd_dep_template_SRCS): vpx_scale_rtcd.h
|
||||||
$$(rtcd_dep_template_SRCS): vpx_dsp_rtcd.h
|
$$(rtcd_dep_template_SRCS): vpx_dsp_rtcd.h
|
||||||
|
|
||||||
|
|||||||
@@ -119,29 +119,25 @@ utiltest:
|
|||||||
test-no-data-check::
|
test-no-data-check::
|
||||||
exampletest-no-data-check utiltest-no-data-check:
|
exampletest-no-data-check utiltest-no-data-check:
|
||||||
|
|
||||||
# Add compiler flags for intrinsic files
|
# Force to realign stack always on OS/2
|
||||||
ifeq ($(TOOLCHAIN), x86-os2-gcc)
|
ifeq ($(TOOLCHAIN), x86-os2-gcc)
|
||||||
STACKREALIGN=-mstackrealign
|
CFLAGS += -mstackrealign
|
||||||
else
|
|
||||||
STACKREALIGN=
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(BUILD_PFX)%_mmx.c.d: CFLAGS += -mmmx
|
$(BUILD_PFX)%_mmx.c.d: CFLAGS += -mmmx
|
||||||
$(BUILD_PFX)%_mmx.c.o: CFLAGS += -mmmx
|
$(BUILD_PFX)%_mmx.c.o: CFLAGS += -mmmx
|
||||||
$(BUILD_PFX)%_sse2.c.d: CFLAGS += -msse2 $(STACKREALIGN)
|
$(BUILD_PFX)%_sse2.c.d: CFLAGS += -msse2
|
||||||
$(BUILD_PFX)%_sse2.c.o: CFLAGS += -msse2 $(STACKREALIGN)
|
$(BUILD_PFX)%_sse2.c.o: CFLAGS += -msse2
|
||||||
$(BUILD_PFX)%_sse3.c.d: CFLAGS += -msse3 $(STACKREALIGN)
|
$(BUILD_PFX)%_sse3.c.d: CFLAGS += -msse3
|
||||||
$(BUILD_PFX)%_sse3.c.o: CFLAGS += -msse3 $(STACKREALIGN)
|
$(BUILD_PFX)%_sse3.c.o: CFLAGS += -msse3
|
||||||
$(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3 $(STACKREALIGN)
|
$(BUILD_PFX)%_ssse3.c.d: CFLAGS += -mssse3
|
||||||
$(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3 $(STACKREALIGN)
|
$(BUILD_PFX)%_ssse3.c.o: CFLAGS += -mssse3
|
||||||
$(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1 $(STACKREALIGN)
|
$(BUILD_PFX)%_sse4.c.d: CFLAGS += -msse4.1
|
||||||
$(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1 $(STACKREALIGN)
|
$(BUILD_PFX)%_sse4.c.o: CFLAGS += -msse4.1
|
||||||
$(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx $(STACKREALIGN)
|
$(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx
|
||||||
$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx $(STACKREALIGN)
|
$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx
|
||||||
$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 $(STACKREALIGN)
|
$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2
|
||||||
$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 $(STACKREALIGN)
|
$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2
|
||||||
$(BUILD_PFX)%vp9_reconintra.c.d: CFLAGS += $(STACKREALIGN)
|
|
||||||
$(BUILD_PFX)%vp9_reconintra.c.o: CFLAGS += $(STACKREALIGN)
|
|
||||||
|
|
||||||
$(BUILD_PFX)%.c.d: %.c
|
$(BUILD_PFX)%.c.d: %.c
|
||||||
$(if $(quiet),@echo " [DEP] $@")
|
$(if $(quiet),@echo " [DEP] $@")
|
||||||
@@ -287,7 +283,7 @@ define archive_template
|
|||||||
# for creating them.
|
# for creating them.
|
||||||
$(1):
|
$(1):
|
||||||
$(if $(quiet),@echo " [AR] $$@")
|
$(if $(quiet),@echo " [AR] $$@")
|
||||||
$(qexec)$$(AR) $$(ARFLAGS) $$@ $$?
|
$(qexec)$$(AR) $$(ARFLAGS) $$@ $$^
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define so_template
|
define so_template
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ Build options:
|
|||||||
--target=TARGET target platform tuple [generic-gnu]
|
--target=TARGET target platform tuple [generic-gnu]
|
||||||
--cpu=CPU optimize for a specific cpu rather than a family
|
--cpu=CPU optimize for a specific cpu rather than a family
|
||||||
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
|
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
|
||||||
|
--extra-cxxflags=ECXXFLAGS add ECXXFLAGS to CXXFLAGS [$CXXFLAGS]
|
||||||
${toggle_extra_warnings} emit harmless warnings (always non-fatal)
|
${toggle_extra_warnings} emit harmless warnings (always non-fatal)
|
||||||
${toggle_werror} treat warnings as errors, if possible
|
${toggle_werror} treat warnings as errors, if possible
|
||||||
(not available with all compilers)
|
(not available with all compilers)
|
||||||
@@ -184,6 +185,7 @@ add_extralibs() {
|
|||||||
#
|
#
|
||||||
# Boolean Manipulation Functions
|
# Boolean Manipulation Functions
|
||||||
#
|
#
|
||||||
|
|
||||||
enable_feature(){
|
enable_feature(){
|
||||||
set_all yes $*
|
set_all yes $*
|
||||||
}
|
}
|
||||||
@@ -200,6 +202,24 @@ disabled(){
|
|||||||
eval test "x\$$1" = "xno"
|
eval test "x\$$1" = "xno"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enable_codec(){
|
||||||
|
enabled "${1}" || echo " enabling ${1}"
|
||||||
|
enable_feature "${1}"
|
||||||
|
|
||||||
|
is_in "${1}" vp8 vp9 && enable_feature "${1}_encoder" "${1}_decoder"
|
||||||
|
}
|
||||||
|
|
||||||
|
disable_codec(){
|
||||||
|
disabled "${1}" || echo " disabling ${1}"
|
||||||
|
disable_feature "${1}"
|
||||||
|
|
||||||
|
is_in "${1}" vp8 vp9 && disable_feature "${1}_encoder" "${1}_decoder"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Iterates through positional parameters, checks to confirm the parameter has
|
||||||
|
# not been explicitly (force) disabled, and enables the setting controlled by
|
||||||
|
# the parameter when the setting is not disabled.
|
||||||
|
# Note: Does NOT alter RTCD generation options ($RTCD_OPTIONS).
|
||||||
soft_enable() {
|
soft_enable() {
|
||||||
for var in $*; do
|
for var in $*; do
|
||||||
if ! disabled $var; then
|
if ! disabled $var; then
|
||||||
@@ -209,6 +229,10 @@ soft_enable() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Iterates through positional parameters, checks to confirm the parameter has
|
||||||
|
# not been explicitly (force) enabled, and disables the setting controlled by
|
||||||
|
# the parameter when the setting is not enabled.
|
||||||
|
# Note: Does NOT alter RTCD generation options ($RTCD_OPTIONS).
|
||||||
soft_disable() {
|
soft_disable() {
|
||||||
for var in $*; do
|
for var in $*; do
|
||||||
if ! enabled $var; then
|
if ! enabled $var; then
|
||||||
@@ -337,6 +361,10 @@ check_add_cflags() {
|
|||||||
check_cflags "$@" && add_cflags_only "$@"
|
check_cflags "$@" && add_cflags_only "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_add_cxxflags() {
|
||||||
|
check_cxxflags "$@" && add_cxxflags_only "$@"
|
||||||
|
}
|
||||||
|
|
||||||
check_add_asflags() {
|
check_add_asflags() {
|
||||||
log add_asflags "$@"
|
log add_asflags "$@"
|
||||||
add_asflags "$@"
|
add_asflags "$@"
|
||||||
@@ -428,7 +456,7 @@ NM=${NM}
|
|||||||
|
|
||||||
CFLAGS = ${CFLAGS}
|
CFLAGS = ${CFLAGS}
|
||||||
CXXFLAGS = ${CXXFLAGS}
|
CXXFLAGS = ${CXXFLAGS}
|
||||||
ARFLAGS = -rus\$(if \$(quiet),c,v)
|
ARFLAGS = -crs\$(if \$(quiet),,v)
|
||||||
LDFLAGS = ${LDFLAGS}
|
LDFLAGS = ${LDFLAGS}
|
||||||
ASFLAGS = ${ASFLAGS}
|
ASFLAGS = ${ASFLAGS}
|
||||||
extralibs = ${extralibs}
|
extralibs = ${extralibs}
|
||||||
@@ -503,24 +531,25 @@ process_common_cmdline() {
|
|||||||
--extra-cflags=*)
|
--extra-cflags=*)
|
||||||
extra_cflags="${optval}"
|
extra_cflags="${optval}"
|
||||||
;;
|
;;
|
||||||
|
--extra-cxxflags=*)
|
||||||
|
extra_cxxflags="${optval}"
|
||||||
|
;;
|
||||||
--enable-?*|--disable-?*)
|
--enable-?*|--disable-?*)
|
||||||
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
|
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
|
||||||
if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then
|
if is_in ${option} ${ARCH_EXT_LIST}; then
|
||||||
[ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${option} "
|
[ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${option} "
|
||||||
elif [ $action = "disable" ] && ! disabled $option ; then
|
elif [ $action = "disable" ] && ! disabled $option ; then
|
||||||
echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null ||
|
is_in ${option} ${CMDLINE_SELECT} || die_unknown $opt
|
||||||
die_unknown $opt
|
|
||||||
log_echo " disabling $option"
|
log_echo " disabling $option"
|
||||||
elif [ $action = "enable" ] && ! enabled $option ; then
|
elif [ $action = "enable" ] && ! enabled $option ; then
|
||||||
echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null ||
|
is_in ${option} ${CMDLINE_SELECT} || die_unknown $opt
|
||||||
die_unknown $opt
|
|
||||||
log_echo " enabling $option"
|
log_echo " enabling $option"
|
||||||
fi
|
fi
|
||||||
${action}_feature $option
|
${action}_feature $option
|
||||||
;;
|
;;
|
||||||
--require-?*)
|
--require-?*)
|
||||||
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
|
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
|
||||||
if echo "${ARCH_EXT_LIST}" none | grep "^ *$option\$" >/dev/null; then
|
if is_in ${option} ${ARCH_EXT_LIST}; then
|
||||||
RTCD_OPTIONS="${RTCD_OPTIONS}${opt} "
|
RTCD_OPTIONS="${RTCD_OPTIONS}${opt} "
|
||||||
else
|
else
|
||||||
die_unknown $opt
|
die_unknown $opt
|
||||||
@@ -617,16 +646,44 @@ show_darwin_sdk_path() {
|
|||||||
xcodebuild -sdk $1 -version Path 2>/dev/null
|
xcodebuild -sdk $1 -version Path 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Print the major version number of the Darwin SDK specified by $1.
|
||||||
|
show_darwin_sdk_major_version() {
|
||||||
|
xcrun --sdk $1 --show-sdk-version 2>/dev/null | cut -d. -f1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Print the Xcode version.
|
||||||
|
show_xcode_version() {
|
||||||
|
xcodebuild -version | head -n1 | cut -d' ' -f2
|
||||||
|
}
|
||||||
|
|
||||||
|
# Fails when Xcode version is less than 6.3.
|
||||||
|
check_xcode_minimum_version() {
|
||||||
|
xcode_major=$(show_xcode_version | cut -f1 -d.)
|
||||||
|
xcode_minor=$(show_xcode_version | cut -f2 -d.)
|
||||||
|
xcode_min_major=6
|
||||||
|
xcode_min_minor=3
|
||||||
|
if [ ${xcode_major} -lt ${xcode_min_major} ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if [ ${xcode_major} -eq ${xcode_min_major} ] \
|
||||||
|
&& [ ${xcode_minor} -lt ${xcode_min_minor} ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
process_common_toolchain() {
|
process_common_toolchain() {
|
||||||
if [ -z "$toolchain" ]; then
|
if [ -z "$toolchain" ]; then
|
||||||
gcctarget="${CHOST:-$(gcc -dumpmachine 2> /dev/null)}"
|
gcctarget="${CHOST:-$(gcc -dumpmachine 2> /dev/null)}"
|
||||||
|
|
||||||
# detect tgt_isa
|
# detect tgt_isa
|
||||||
case "$gcctarget" in
|
case "$gcctarget" in
|
||||||
|
aarch64*)
|
||||||
|
tgt_isa=arm64
|
||||||
|
;;
|
||||||
armv6*)
|
armv6*)
|
||||||
tgt_isa=armv6
|
tgt_isa=armv6
|
||||||
;;
|
;;
|
||||||
armv7*-hardfloat*)
|
armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf)
|
||||||
tgt_isa=armv7
|
tgt_isa=armv7
|
||||||
float_abi=hard
|
float_abi=hard
|
||||||
;;
|
;;
|
||||||
@@ -667,6 +724,10 @@ process_common_toolchain() {
|
|||||||
tgt_isa=x86_64
|
tgt_isa=x86_64
|
||||||
tgt_os=darwin14
|
tgt_os=darwin14
|
||||||
;;
|
;;
|
||||||
|
*darwin15*)
|
||||||
|
tgt_isa=x86_64
|
||||||
|
tgt_os=darwin15
|
||||||
|
;;
|
||||||
x86_64*mingw32*)
|
x86_64*mingw32*)
|
||||||
tgt_os=win64
|
tgt_os=win64
|
||||||
;;
|
;;
|
||||||
@@ -723,19 +784,27 @@ process_common_toolchain() {
|
|||||||
enabled shared && soft_enable pic
|
enabled shared && soft_enable pic
|
||||||
|
|
||||||
# Minimum iOS version for all target platforms (darwin and iphonesimulator).
|
# Minimum iOS version for all target platforms (darwin and iphonesimulator).
|
||||||
|
# Shared library framework builds are only possible on iOS 8 and later.
|
||||||
|
if enabled shared; then
|
||||||
|
IOS_VERSION_OPTIONS="--enable-shared"
|
||||||
|
IOS_VERSION_MIN="8.0"
|
||||||
|
else
|
||||||
|
IOS_VERSION_OPTIONS=""
|
||||||
IOS_VERSION_MIN="6.0"
|
IOS_VERSION_MIN="6.0"
|
||||||
|
fi
|
||||||
|
|
||||||
# Handle darwin variants. Newer SDKs allow targeting older
|
# Handle darwin variants. Newer SDKs allow targeting older
|
||||||
# platforms, so use the newest one available.
|
# platforms, so use the newest one available.
|
||||||
case ${toolchain} in
|
case ${toolchain} in
|
||||||
arm*-darwin*)
|
arm*-darwin*)
|
||||||
ios_sdk_dir="$(show_darwin_sdk_path iphoneos)"
|
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
||||||
if [ -d "${ios_sdk_dir}" ]; then
|
iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
|
||||||
add_cflags "-isysroot ${ios_sdk_dir}"
|
if [ -d "${iphoneos_sdk_dir}" ]; then
|
||||||
add_ldflags "-isysroot ${ios_sdk_dir}"
|
add_cflags "-isysroot ${iphoneos_sdk_dir}"
|
||||||
|
add_ldflags "-isysroot ${iphoneos_sdk_dir}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*-darwin*)
|
x86*-darwin*)
|
||||||
osx_sdk_dir="$(show_darwin_sdk_path macosx)"
|
osx_sdk_dir="$(show_darwin_sdk_path macosx)"
|
||||||
if [ -d "${osx_sdk_dir}" ]; then
|
if [ -d "${osx_sdk_dir}" ]; then
|
||||||
add_cflags "-isysroot ${osx_sdk_dir}"
|
add_cflags "-isysroot ${osx_sdk_dir}"
|
||||||
@@ -773,6 +842,10 @@ process_common_toolchain() {
|
|||||||
add_cflags "-mmacosx-version-min=10.10"
|
add_cflags "-mmacosx-version-min=10.10"
|
||||||
add_ldflags "-mmacosx-version-min=10.10"
|
add_ldflags "-mmacosx-version-min=10.10"
|
||||||
;;
|
;;
|
||||||
|
*-darwin15-*)
|
||||||
|
add_cflags "-mmacosx-version-min=10.11"
|
||||||
|
add_ldflags "-mmacosx-version-min=10.11"
|
||||||
|
;;
|
||||||
*-iphonesimulator-*)
|
*-iphonesimulator-*)
|
||||||
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
||||||
add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
||||||
@@ -811,16 +884,35 @@ process_common_toolchain() {
|
|||||||
die "Disabling neon while keeping neon-asm is not supported"
|
die "Disabling neon while keeping neon-asm is not supported"
|
||||||
fi
|
fi
|
||||||
case ${toolchain} in
|
case ${toolchain} in
|
||||||
|
# Apple iOS SDKs no longer support armv6 as of the version 9
|
||||||
|
# release (coincides with release of Xcode 7). Only enable media
|
||||||
|
# when using earlier SDK releases.
|
||||||
*-darwin*)
|
*-darwin*)
|
||||||
# Neon is guaranteed on iOS 6+ devices, while old media extensions
|
if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then
|
||||||
# no longer assemble with iOS 9 SDK
|
soft_enable media
|
||||||
|
else
|
||||||
|
soft_disable media
|
||||||
|
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-media "
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
soft_enable media
|
soft_enable media
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
armv6)
|
armv6)
|
||||||
|
case ${toolchain} in
|
||||||
|
*-darwin*)
|
||||||
|
if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then
|
||||||
soft_enable media
|
soft_enable media
|
||||||
|
else
|
||||||
|
die "Your iOS SDK does not support armv6."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
soft_enable media
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -828,7 +920,6 @@ process_common_toolchain() {
|
|||||||
|
|
||||||
case ${tgt_cc} in
|
case ${tgt_cc} in
|
||||||
gcc)
|
gcc)
|
||||||
CROSS=${CROSS:-arm-none-linux-gnueabi-}
|
|
||||||
link_with_cc=gcc
|
link_with_cc=gcc
|
||||||
setup_gnu_toolchain
|
setup_gnu_toolchain
|
||||||
arch_int=${tgt_isa##armv}
|
arch_int=${tgt_isa##armv}
|
||||||
@@ -850,6 +941,9 @@ EOF
|
|||||||
check_add_cflags -mfpu=neon #-ftree-vectorize
|
check_add_cflags -mfpu=neon #-ftree-vectorize
|
||||||
check_add_asflags -mfpu=neon
|
check_add_asflags -mfpu=neon
|
||||||
fi
|
fi
|
||||||
|
elif [ ${tgt_isa} = "arm64" ] || [ ${tgt_isa} = "armv8" ]; then
|
||||||
|
check_add_cflags -march=armv8-a
|
||||||
|
check_add_asflags -march=armv8-a
|
||||||
else
|
else
|
||||||
check_add_cflags -march=${tgt_isa}
|
check_add_cflags -march=${tgt_isa}
|
||||||
check_add_asflags -march=${tgt_isa}
|
check_add_asflags -march=${tgt_isa}
|
||||||
@@ -917,6 +1011,10 @@ EOF
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
android*)
|
android*)
|
||||||
|
if [ -z "${sdk_path}" ]; then
|
||||||
|
die "Must specify --sdk-path for Android builds."
|
||||||
|
fi
|
||||||
|
|
||||||
SDK_PATH=${sdk_path}
|
SDK_PATH=${sdk_path}
|
||||||
COMPILER_LOCATION=`find "${SDK_PATH}" \
|
COMPILER_LOCATION=`find "${SDK_PATH}" \
|
||||||
-name "arm-linux-androideabi-gcc*" -print -quit`
|
-name "arm-linux-androideabi-gcc*" -print -quit`
|
||||||
@@ -938,8 +1036,10 @@ EOF
|
|||||||
awk '{ print $1 }' | tail -1`
|
awk '{ print $1 }' | tail -1`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -d "${alt_libc}" ]; then
|
||||||
add_cflags "--sysroot=${alt_libc}"
|
add_cflags "--sysroot=${alt_libc}"
|
||||||
add_ldflags "--sysroot=${alt_libc}"
|
add_ldflags "--sysroot=${alt_libc}"
|
||||||
|
fi
|
||||||
|
|
||||||
# linker flag that routes around a CPU bug in some
|
# linker flag that routes around a CPU bug in some
|
||||||
# Cortex-A8 implementations (NDK Dev Guide)
|
# Cortex-A8 implementations (NDK Dev Guide)
|
||||||
@@ -965,18 +1065,7 @@ EOF
|
|||||||
NM="$(${XCRUN_FIND} nm)"
|
NM="$(${XCRUN_FIND} nm)"
|
||||||
RANLIB="$(${XCRUN_FIND} ranlib)"
|
RANLIB="$(${XCRUN_FIND} ranlib)"
|
||||||
AS_SFX=.s
|
AS_SFX=.s
|
||||||
|
|
||||||
# Special handling of ld for armv6 because libclang_rt.ios.a does
|
|
||||||
# not contain armv6 support in Apple's clang package:
|
|
||||||
# Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn).
|
|
||||||
# TODO(tomfinegan): Remove this. Our minimum iOS version (6.0)
|
|
||||||
# renders support for armv6 unnecessary because the 3GS and up
|
|
||||||
# support neon.
|
|
||||||
if [ "${tgt_isa}" = "armv6" ]; then
|
|
||||||
LD="$(${XCRUN_FIND} ld)"
|
|
||||||
else
|
|
||||||
LD="${CXX:-$(${XCRUN_FIND} ld)}"
|
LD="${CXX:-$(${XCRUN_FIND} ld)}"
|
||||||
fi
|
|
||||||
|
|
||||||
# ASFLAGS is written here instead of using check_add_asflags
|
# ASFLAGS is written here instead of using check_add_asflags
|
||||||
# because we need to overwrite all of ASFLAGS and purge the
|
# because we need to overwrite all of ASFLAGS and purge the
|
||||||
@@ -1002,7 +1091,26 @@ EOF
|
|||||||
[ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
|
[ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
case ${tgt_isa} in
|
||||||
|
armv7|armv7s|armv8|arm64)
|
||||||
|
if enabled neon && ! check_xcode_minimum_version; then
|
||||||
|
soft_disable neon
|
||||||
|
log_echo " neon disabled: upgrade Xcode (need v6.3+)."
|
||||||
|
if enabled neon_asm; then
|
||||||
|
soft_disable neon_asm
|
||||||
|
log_echo " neon_asm disabled: upgrade Xcode (need v6.3+)."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl"
|
asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl"
|
||||||
|
|
||||||
|
if [ "$(show_darwin_sdk_major_version iphoneos)" -gt 8 ]; then
|
||||||
|
check_add_cflags -fembed-bitcode
|
||||||
|
check_add_asflags -fembed-bitcode
|
||||||
|
check_add_ldflags -fembed-bitcode
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
linux*)
|
linux*)
|
||||||
@@ -1010,7 +1118,7 @@ EOF
|
|||||||
if enabled rvct; then
|
if enabled rvct; then
|
||||||
# Check if we have CodeSourcery GCC in PATH. Needed for
|
# Check if we have CodeSourcery GCC in PATH. Needed for
|
||||||
# libraries
|
# libraries
|
||||||
hash arm-none-linux-gnueabi-gcc 2>&- || \
|
which arm-none-linux-gnueabi-gcc 2>&- || \
|
||||||
die "Couldn't find CodeSourcery GCC from PATH"
|
die "Couldn't find CodeSourcery GCC from PATH"
|
||||||
|
|
||||||
# Use armcc as a linker to enable translation of
|
# Use armcc as a linker to enable translation of
|
||||||
@@ -1078,7 +1186,7 @@ EOF
|
|||||||
CC=${CC:-${CROSS}gcc}
|
CC=${CC:-${CROSS}gcc}
|
||||||
CXX=${CXX:-${CROSS}g++}
|
CXX=${CXX:-${CROSS}g++}
|
||||||
LD=${LD:-${CROSS}gcc}
|
LD=${LD:-${CROSS}gcc}
|
||||||
CROSS=${CROSS:-g}
|
CROSS=${CROSS-g}
|
||||||
;;
|
;;
|
||||||
os2)
|
os2)
|
||||||
disable_feature pic
|
disable_feature pic
|
||||||
@@ -1131,6 +1239,12 @@ EOF
|
|||||||
soft_disable avx2
|
soft_disable avx2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
case $vc_version in
|
||||||
|
7|8|9)
|
||||||
|
echo "${tgt_cc} omits stdint.h, disabling webm-io..."
|
||||||
|
soft_disable webm_io
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -1151,15 +1265,24 @@ EOF
|
|||||||
soft_enable runtime_cpu_detect
|
soft_enable runtime_cpu_detect
|
||||||
# We can't use 'check_cflags' until the compiler is configured and CC is
|
# We can't use 'check_cflags' until the compiler is configured and CC is
|
||||||
# populated.
|
# populated.
|
||||||
check_gcc_machine_option mmx
|
for ext in ${ARCH_EXT_LIST_X86}; do
|
||||||
check_gcc_machine_option sse
|
# disable higher order extensions to simplify asm dependencies
|
||||||
check_gcc_machine_option sse2
|
if [ "$disable_exts" = "yes" ]; then
|
||||||
check_gcc_machine_option sse3
|
if ! disabled $ext; then
|
||||||
check_gcc_machine_option ssse3
|
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${ext} "
|
||||||
check_gcc_machine_option sse4 sse4_1
|
disable_feature $ext
|
||||||
check_gcc_machine_option avx
|
fi
|
||||||
check_gcc_machine_option avx2
|
elif disabled $ext; then
|
||||||
|
disable_exts="yes"
|
||||||
|
else
|
||||||
|
# use the shortened version for the flag: sse4_1 -> sse4
|
||||||
|
check_gcc_machine_option ${ext%_*} $ext
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if enabled external_build; then
|
||||||
|
log_echo " skipping assembler detection"
|
||||||
|
else
|
||||||
case "${AS}" in
|
case "${AS}" in
|
||||||
auto|"")
|
auto|"")
|
||||||
which nasm >/dev/null 2>&1 && AS=nasm
|
which nasm >/dev/null 2>&1 && AS=nasm
|
||||||
@@ -1173,10 +1296,12 @@ EOF
|
|||||||
&& AS=""
|
&& AS=""
|
||||||
fi
|
fi
|
||||||
[ "${AS}" = auto ] || [ -z "${AS}" ] \
|
[ "${AS}" = auto ] || [ -z "${AS}" ] \
|
||||||
&& die "Neither yasm nor nasm have been found"
|
&& die "Neither yasm nor nasm have been found." \
|
||||||
|
"See the prerequisites section in the README for more info."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
log_echo " using $AS"
|
log_echo " using $AS"
|
||||||
|
fi
|
||||||
[ "${AS##*/}" = nasm ] && add_asflags -Ox
|
[ "${AS##*/}" = nasm ] && add_asflags -Ox
|
||||||
AS_SFX=.asm
|
AS_SFX=.asm
|
||||||
case ${tgt_os} in
|
case ${tgt_os} in
|
||||||
@@ -1212,6 +1337,13 @@ EOF
|
|||||||
enabled x86 && sim_arch="-arch i386" || sim_arch="-arch x86_64"
|
enabled x86 && sim_arch="-arch i386" || sim_arch="-arch x86_64"
|
||||||
add_cflags ${sim_arch}
|
add_cflags ${sim_arch}
|
||||||
add_ldflags ${sim_arch}
|
add_ldflags ${sim_arch}
|
||||||
|
|
||||||
|
if [ "$(show_darwin_sdk_major_version iphonesimulator)" -gt 8 ]; then
|
||||||
|
# yasm v1.3.0 doesn't know what -fembed-bitcode means, so turning it
|
||||||
|
# on is pointless (unless building a C-only lib). Warn the user, but
|
||||||
|
# do nothing here.
|
||||||
|
log "Warning: Bitcode embed disabled for simulator targets."
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
os2)
|
os2)
|
||||||
add_asflags -f aout
|
add_asflags -f aout
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ for opt in "$@"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Make one call to fix_path for file_list to improve performance.
|
# Make one call to fix_path for file_list to improve performance.
|
||||||
fix_file_list
|
fix_file_list file_list
|
||||||
|
|
||||||
outfile=${outfile:-/dev/stdout}
|
outfile=${outfile:-/dev/stdout}
|
||||||
guid=${guid:-`generate_uuid`}
|
guid=${guid:-`generate_uuid`}
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ for opt in "$@"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Make one call to fix_path for file_list to improve performance.
|
# Make one call to fix_path for file_list to improve performance.
|
||||||
fix_file_list
|
fix_file_list file_list
|
||||||
|
|
||||||
outfile=${outfile:-/dev/stdout}
|
outfile=${outfile:-/dev/stdout}
|
||||||
guid=${guid:-`generate_uuid`}
|
guid=${guid:-`generate_uuid`}
|
||||||
|
|||||||
37
build/make/ios-Info.plist
Normal file
37
build/make/ios-Info.plist
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>VPX</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.webmproject.VPX</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>VPX</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>${VERSION}</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
|
<array>
|
||||||
|
<string>iPhoneOS</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>${VERSION}</string>
|
||||||
|
<key>MinimumOSVersion</key>
|
||||||
|
<string>${IOS_VERSION_MIN}</string>
|
||||||
|
<key>UIDeviceFamily</key>
|
||||||
|
<array>
|
||||||
|
<integer>1</integer>
|
||||||
|
<integer>2</integer>
|
||||||
|
</array>
|
||||||
|
<key>VPXFullVersion</key>
|
||||||
|
<string>${FULLVERSION}</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -24,32 +24,44 @@ CONFIGURE_ARGS="--disable-docs
|
|||||||
--disable-unit-tests"
|
--disable-unit-tests"
|
||||||
DIST_DIR="_dist"
|
DIST_DIR="_dist"
|
||||||
FRAMEWORK_DIR="VPX.framework"
|
FRAMEWORK_DIR="VPX.framework"
|
||||||
|
FRAMEWORK_LIB="VPX.framework/VPX"
|
||||||
HEADER_DIR="${FRAMEWORK_DIR}/Headers/vpx"
|
HEADER_DIR="${FRAMEWORK_DIR}/Headers/vpx"
|
||||||
MAKE_JOBS=1
|
|
||||||
SCRIPT_DIR=$(dirname "$0")
|
SCRIPT_DIR=$(dirname "$0")
|
||||||
LIBVPX_SOURCE_DIR=$(cd ${SCRIPT_DIR}/../..; pwd)
|
LIBVPX_SOURCE_DIR=$(cd ${SCRIPT_DIR}/../..; pwd)
|
||||||
LIPO=$(xcrun -sdk iphoneos${SDK} -find lipo)
|
LIPO=$(xcrun -sdk iphoneos${SDK} -find lipo)
|
||||||
ORIG_PWD="$(pwd)"
|
ORIG_PWD="$(pwd)"
|
||||||
TARGETS="arm64-darwin-gcc
|
ARM_TARGETS="arm64-darwin-gcc
|
||||||
armv7-darwin-gcc
|
armv7-darwin-gcc
|
||||||
armv7s-darwin-gcc
|
armv7s-darwin-gcc"
|
||||||
x86-iphonesimulator-gcc
|
SIM_TARGETS="x86-iphonesimulator-gcc
|
||||||
x86_64-iphonesimulator-gcc"
|
x86_64-iphonesimulator-gcc"
|
||||||
|
OSX_TARGETS="x86-darwin15-gcc
|
||||||
|
x86_64-darwin15-gcc"
|
||||||
|
TARGETS="${ARM_TARGETS} ${SIM_TARGETS}"
|
||||||
|
|
||||||
# Configures for the target specified by $1, and invokes make with the dist
|
# Configures for the target specified by $1, and invokes make with the dist
|
||||||
# target using $DIST_DIR as the distribution output directory.
|
# target using $DIST_DIR as the distribution output directory.
|
||||||
build_target() {
|
build_target() {
|
||||||
local target="$1"
|
local target="$1"
|
||||||
local old_pwd="$(pwd)"
|
local old_pwd="$(pwd)"
|
||||||
|
local target_specific_flags=""
|
||||||
|
|
||||||
vlog "***Building target: ${target}***"
|
vlog "***Building target: ${target}***"
|
||||||
|
|
||||||
|
case "${target}" in
|
||||||
|
x86-*)
|
||||||
|
target_specific_flags="--enable-pic"
|
||||||
|
vlog "Enabled PIC for ${target}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
mkdir "${target}"
|
mkdir "${target}"
|
||||||
cd "${target}"
|
cd "${target}"
|
||||||
eval "${LIBVPX_SOURCE_DIR}/configure" --target="${target}" \
|
eval "${LIBVPX_SOURCE_DIR}/configure" --target="${target}" \
|
||||||
${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS} ${devnull}
|
${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS} ${target_specific_flags} \
|
||||||
|
${devnull}
|
||||||
export DIST_DIR
|
export DIST_DIR
|
||||||
eval make -j ${MAKE_JOBS} dist ${devnull}
|
eval make dist ${devnull}
|
||||||
cd "${old_pwd}"
|
cd "${old_pwd}"
|
||||||
|
|
||||||
vlog "***Done building target: ${target}***"
|
vlog "***Done building target: ${target}***"
|
||||||
@@ -126,6 +138,44 @@ create_vpx_framework_config_shim() {
|
|||||||
printf "#endif // ${include_guard}" >> "${config_file}"
|
printf "#endif // ${include_guard}" >> "${config_file}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Verifies that $FRAMEWORK_LIB fat library contains requested builds.
|
||||||
|
verify_framework_targets() {
|
||||||
|
local requested_cpus=""
|
||||||
|
local cpu=""
|
||||||
|
|
||||||
|
# Extract CPU from full target name.
|
||||||
|
for target; do
|
||||||
|
cpu="${target%%-*}"
|
||||||
|
if [ "${cpu}" = "x86" ]; then
|
||||||
|
# lipo -info outputs i386 for libvpx x86 targets.
|
||||||
|
cpu="i386"
|
||||||
|
fi
|
||||||
|
requested_cpus="${requested_cpus}${cpu} "
|
||||||
|
done
|
||||||
|
|
||||||
|
# Get target CPUs present in framework library.
|
||||||
|
local targets_built=$(${LIPO} -info ${FRAMEWORK_LIB})
|
||||||
|
|
||||||
|
# $LIPO -info outputs a string like the following:
|
||||||
|
# Architectures in the fat file: $FRAMEWORK_LIB <architectures>
|
||||||
|
# Capture only the architecture strings.
|
||||||
|
targets_built=${targets_built##*: }
|
||||||
|
|
||||||
|
# Sort CPU strings to make the next step a simple string compare.
|
||||||
|
local actual=$(echo ${targets_built} | tr " " "\n" | sort | tr "\n" " ")
|
||||||
|
local requested=$(echo ${requested_cpus} | tr " " "\n" | sort | tr "\n" " ")
|
||||||
|
|
||||||
|
vlog "Requested ${FRAMEWORK_LIB} CPUs: ${requested}"
|
||||||
|
vlog "Actual ${FRAMEWORK_LIB} CPUs: ${actual}"
|
||||||
|
|
||||||
|
if [ "${requested}" != "${actual}" ]; then
|
||||||
|
elog "Actual ${FRAMEWORK_LIB} targets do not match requested target list."
|
||||||
|
elog " Requested target CPUs: ${requested}"
|
||||||
|
elog " Actual target CPUs: ${actual}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Configures and builds each target specified by $1, and then builds
|
# Configures and builds each target specified by $1, and then builds
|
||||||
# VPX.framework.
|
# VPX.framework.
|
||||||
build_framework() {
|
build_framework() {
|
||||||
@@ -146,7 +196,12 @@ build_framework() {
|
|||||||
for target in ${targets}; do
|
for target in ${targets}; do
|
||||||
build_target "${target}"
|
build_target "${target}"
|
||||||
target_dist_dir="${BUILD_ROOT}/${target}/${DIST_DIR}"
|
target_dist_dir="${BUILD_ROOT}/${target}/${DIST_DIR}"
|
||||||
lib_list="${lib_list} ${target_dist_dir}/lib/libvpx.a"
|
if [ "${ENABLE_SHARED}" = "yes" ]; then
|
||||||
|
local suffix="dylib"
|
||||||
|
else
|
||||||
|
local suffix="a"
|
||||||
|
fi
|
||||||
|
lib_list="${lib_list} ${target_dist_dir}/lib/libvpx.${suffix}"
|
||||||
done
|
done
|
||||||
|
|
||||||
cd "${ORIG_PWD}"
|
cd "${ORIG_PWD}"
|
||||||
@@ -165,13 +220,25 @@ build_framework() {
|
|||||||
# Copy in vpx_version.h.
|
# Copy in vpx_version.h.
|
||||||
cp -p "${BUILD_ROOT}/${target}/vpx_version.h" "${HEADER_DIR}"
|
cp -p "${BUILD_ROOT}/${target}/vpx_version.h" "${HEADER_DIR}"
|
||||||
|
|
||||||
vlog "Created fat library ${FRAMEWORK_DIR}/VPX containing:"
|
if [ "${ENABLE_SHARED}" = "yes" ]; then
|
||||||
|
# Adjust the dylib's name so dynamic linking in apps works as expected.
|
||||||
|
install_name_tool -id '@rpath/VPX.framework/VPX' ${FRAMEWORK_DIR}/VPX
|
||||||
|
|
||||||
|
# Copy in Info.plist.
|
||||||
|
cat "${SCRIPT_DIR}/ios-Info.plist" \
|
||||||
|
| sed "s/\${FULLVERSION}/${FULLVERSION}/g" \
|
||||||
|
| sed "s/\${VERSION}/${VERSION}/g" \
|
||||||
|
| sed "s/\${IOS_VERSION_MIN}/${IOS_VERSION_MIN}/g" \
|
||||||
|
> "${FRAMEWORK_DIR}/Info.plist"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Confirm VPX.framework/VPX contains the targets requested.
|
||||||
|
verify_framework_targets ${targets}
|
||||||
|
|
||||||
|
vlog "Created fat library ${FRAMEWORK_LIB} containing:"
|
||||||
for lib in ${lib_list}; do
|
for lib in ${lib_list}; do
|
||||||
vlog " $(echo ${lib} | awk -F / '{print $2, $NF}')"
|
vlog " $(echo ${lib} | awk -F / '{print $2, $NF}')"
|
||||||
done
|
done
|
||||||
|
|
||||||
# TODO(tomfinegan): Verify that expected targets are included within
|
|
||||||
# VPX.framework/VPX via lipo -info.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Trap function. Cleans up the subtree used to build all targets contained in
|
# Trap function. Cleans up the subtree used to build all targets contained in
|
||||||
@@ -189,16 +256,30 @@ cleanup() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print_list() {
|
||||||
|
local indent="$1"
|
||||||
|
shift
|
||||||
|
local list="$@"
|
||||||
|
for entry in ${list}; do
|
||||||
|
echo "${indent}${entry}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
iosbuild_usage() {
|
iosbuild_usage() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Usage: ${0##*/} [arguments]
|
Usage: ${0##*/} [arguments]
|
||||||
--help: Display this message and exit.
|
--help: Display this message and exit.
|
||||||
|
--enable-shared: Build a dynamic framework for use on iOS 8 or later.
|
||||||
--extra-configure-args <args>: Extra args to pass when configuring libvpx.
|
--extra-configure-args <args>: Extra args to pass when configuring libvpx.
|
||||||
--jobs: Number of make jobs.
|
--macosx: Uses darwin15 targets instead of iphonesimulator targets for x86
|
||||||
|
and x86_64. Allows linking to framework when builds target MacOSX
|
||||||
|
instead of iOS.
|
||||||
--preserve-build-output: Do not delete the build directory.
|
--preserve-build-output: Do not delete the build directory.
|
||||||
--show-build-output: Show output from each library build.
|
--show-build-output: Show output from each library build.
|
||||||
--targets <targets>: Override default target list. Defaults:
|
--targets <targets>: Override default target list. Defaults:
|
||||||
${TARGETS}
|
$(print_list " " ${TARGETS})
|
||||||
|
--test-link: Confirms all targets can be linked. Functionally identical to
|
||||||
|
passing --enable-examples via --extra-configure-args.
|
||||||
--verbose: Output information about the environment and each stage of the
|
--verbose: Output information about the environment and each stage of the
|
||||||
build.
|
build.
|
||||||
EOF
|
EOF
|
||||||
@@ -227,9 +308,8 @@ while [ -n "$1" ]; do
|
|||||||
iosbuild_usage
|
iosbuild_usage
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
--jobs)
|
--enable-shared)
|
||||||
MAKE_JOBS="$2"
|
ENABLE_SHARED=yes
|
||||||
shift
|
|
||||||
;;
|
;;
|
||||||
--preserve-build-output)
|
--preserve-build-output)
|
||||||
PRESERVE_BUILD_OUTPUT=yes
|
PRESERVE_BUILD_OUTPUT=yes
|
||||||
@@ -237,10 +317,16 @@ while [ -n "$1" ]; do
|
|||||||
--show-build-output)
|
--show-build-output)
|
||||||
devnull=
|
devnull=
|
||||||
;;
|
;;
|
||||||
|
--test-link)
|
||||||
|
EXTRA_CONFIGURE_ARGS="${EXTRA_CONFIGURE_ARGS} --enable-examples"
|
||||||
|
;;
|
||||||
--targets)
|
--targets)
|
||||||
TARGETS="$2"
|
TARGETS="$2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--macosx)
|
||||||
|
TARGETS="${ARM_TARGETS} ${OSX_TARGETS}"
|
||||||
|
;;
|
||||||
--verbose)
|
--verbose)
|
||||||
VERBOSE=yes
|
VERBOSE=yes
|
||||||
;;
|
;;
|
||||||
@@ -252,6 +338,21 @@ while [ -n "$1" ]; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "${ENABLE_SHARED}" = "yes" ]; then
|
||||||
|
CONFIGURE_ARGS="--enable-shared ${CONFIGURE_ARGS}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
FULLVERSION=$("${SCRIPT_DIR}"/version.sh --bare "${LIBVPX_SOURCE_DIR}")
|
||||||
|
VERSION=$(echo "${FULLVERSION}" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/')
|
||||||
|
|
||||||
|
if [ "$ENABLE_SHARED" = "yes" ]; then
|
||||||
|
IOS_VERSION_OPTIONS="--enable-shared"
|
||||||
|
IOS_VERSION_MIN="8.0"
|
||||||
|
else
|
||||||
|
IOS_VERSION_OPTIONS=""
|
||||||
|
IOS_VERSION_MIN="6.0"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${VERBOSE}" = "yes" ]; then
|
if [ "${VERBOSE}" = "yes" ]; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
BUILD_ROOT=${BUILD_ROOT}
|
BUILD_ROOT=${BUILD_ROOT}
|
||||||
@@ -259,16 +360,24 @@ cat << EOF
|
|||||||
CONFIGURE_ARGS=${CONFIGURE_ARGS}
|
CONFIGURE_ARGS=${CONFIGURE_ARGS}
|
||||||
EXTRA_CONFIGURE_ARGS=${EXTRA_CONFIGURE_ARGS}
|
EXTRA_CONFIGURE_ARGS=${EXTRA_CONFIGURE_ARGS}
|
||||||
FRAMEWORK_DIR=${FRAMEWORK_DIR}
|
FRAMEWORK_DIR=${FRAMEWORK_DIR}
|
||||||
|
FRAMEWORK_LIB=${FRAMEWORK_LIB}
|
||||||
HEADER_DIR=${HEADER_DIR}
|
HEADER_DIR=${HEADER_DIR}
|
||||||
MAKE_JOBS=${MAKE_JOBS}
|
|
||||||
PRESERVE_BUILD_OUTPUT=${PRESERVE_BUILD_OUTPUT}
|
|
||||||
LIBVPX_SOURCE_DIR=${LIBVPX_SOURCE_DIR}
|
LIBVPX_SOURCE_DIR=${LIBVPX_SOURCE_DIR}
|
||||||
LIPO=${LIPO}
|
LIPO=${LIPO}
|
||||||
|
MAKEFLAGS=${MAKEFLAGS}
|
||||||
ORIG_PWD=${ORIG_PWD}
|
ORIG_PWD=${ORIG_PWD}
|
||||||
TARGETS="${TARGETS}"
|
PRESERVE_BUILD_OUTPUT=${PRESERVE_BUILD_OUTPUT}
|
||||||
|
TARGETS="$(print_list "" ${TARGETS})"
|
||||||
|
ENABLE_SHARED=${ENABLE_SHARED}
|
||||||
|
OSX_TARGETS="${OSX_TARGETS}"
|
||||||
|
SIM_TARGETS="${SIM_TARGETS}"
|
||||||
|
SCRIPT_DIR="${SCRIPT_DIR}"
|
||||||
|
FULLVERSION="${FULLVERSION}"
|
||||||
|
VERSION="${VERSION}"
|
||||||
|
IOS_VERSION_MIN="${IOS_VERSION_MIN}"
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build_framework "${TARGETS}"
|
build_framework "${TARGETS}"
|
||||||
echo "Successfully built '${FRAMEWORK_DIR}' for:"
|
echo "Successfully built '${FRAMEWORK_DIR}' for:"
|
||||||
echo " ${TARGETS}"
|
print_list "" ${TARGETS}
|
||||||
|
|||||||
@@ -39,11 +39,12 @@ fix_path() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Corrects the paths in file_list in one pass for efficiency.
|
# Corrects the paths in file_list in one pass for efficiency.
|
||||||
|
# $1 is the name of the array to be modified.
|
||||||
fix_file_list() {
|
fix_file_list() {
|
||||||
# TODO(jzern): this could be more generic and take the array as a param.
|
declare -n array_ref=$1
|
||||||
files=$(fix_path "${file_list[@]}")
|
files=$(fix_path "${array_ref[@]}")
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
file_list=($files)
|
array_ref=($files)
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_uuid() {
|
generate_uuid() {
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ out_file=${2}
|
|||||||
id=${3:-VERSION_STRING}
|
id=${3:-VERSION_STRING}
|
||||||
|
|
||||||
git_version_id=""
|
git_version_id=""
|
||||||
if [ -d "${source_path}/.git" ]; then
|
if [ -e "${source_path}/.git" ]; then
|
||||||
# Source Path is a git working copy. Check for local modifications.
|
# Source Path is a git working copy. Check for local modifications.
|
||||||
|
# Note that git submodules may have a file as .git, not a directory.
|
||||||
export GIT_DIR="${source_path}/.git"
|
export GIT_DIR="${source_path}/.git"
|
||||||
git_version_id=`git describe --match=v[0-9]* 2>/dev/null`
|
git_version_id=`git describe --match=v[0-9]* 2>/dev/null`
|
||||||
fi
|
fi
|
||||||
|
|||||||
91
configure
vendored
91
configure
vendored
@@ -35,9 +35,11 @@ Advanced options:
|
|||||||
${toggle_debug_libs} in/exclude debug version of libraries
|
${toggle_debug_libs} in/exclude debug version of libraries
|
||||||
${toggle_static_msvcrt} use static MSVCRT (VS builds only)
|
${toggle_static_msvcrt} use static MSVCRT (VS builds only)
|
||||||
${toggle_vp9_highbitdepth} use VP9 high bit depth (10/12) profiles
|
${toggle_vp9_highbitdepth} use VP9 high bit depth (10/12) profiles
|
||||||
|
${toggle_better_hw_compatibility}
|
||||||
|
enable encoder to produce streams with better
|
||||||
|
hardware decoder compatibility
|
||||||
${toggle_vp8} VP8 codec support
|
${toggle_vp8} VP8 codec support
|
||||||
${toggle_vp9} VP9 codec support
|
${toggle_vp9} VP9 codec support
|
||||||
${toggle_vp10} VP10 codec support
|
|
||||||
${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders)
|
${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders)
|
||||||
${toggle_postproc} postprocessing
|
${toggle_postproc} postprocessing
|
||||||
${toggle_vp9_postproc} vp9 specific postprocessing
|
${toggle_vp9_postproc} vp9 specific postprocessing
|
||||||
@@ -95,11 +97,11 @@ EOF
|
|||||||
|
|
||||||
# all_platforms is a list of all supported target platforms. Maintain
|
# all_platforms is a list of all supported target platforms. Maintain
|
||||||
# alphabetically by architecture, generic-gnu last.
|
# alphabetically by architecture, generic-gnu last.
|
||||||
all_platforms="${all_platforms} armv6-darwin-gcc"
|
all_platforms="${all_platforms} arm64-darwin-gcc"
|
||||||
|
all_platforms="${all_platforms} arm64-linux-gcc"
|
||||||
all_platforms="${all_platforms} armv6-linux-rvct"
|
all_platforms="${all_platforms} armv6-linux-rvct"
|
||||||
all_platforms="${all_platforms} armv6-linux-gcc"
|
all_platforms="${all_platforms} armv6-linux-gcc"
|
||||||
all_platforms="${all_platforms} armv6-none-rvct"
|
all_platforms="${all_platforms} armv6-none-rvct"
|
||||||
all_platforms="${all_platforms} arm64-darwin-gcc"
|
|
||||||
all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8
|
all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8
|
||||||
all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8
|
all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8
|
||||||
all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8
|
all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8
|
||||||
@@ -109,6 +111,7 @@ all_platforms="${all_platforms} armv7-win32-vs11"
|
|||||||
all_platforms="${all_platforms} armv7-win32-vs12"
|
all_platforms="${all_platforms} armv7-win32-vs12"
|
||||||
all_platforms="${all_platforms} armv7-win32-vs14"
|
all_platforms="${all_platforms} armv7-win32-vs14"
|
||||||
all_platforms="${all_platforms} armv7s-darwin-gcc"
|
all_platforms="${all_platforms} armv7s-darwin-gcc"
|
||||||
|
all_platforms="${all_platforms} armv8-linux-gcc"
|
||||||
all_platforms="${all_platforms} mips32-linux-gcc"
|
all_platforms="${all_platforms} mips32-linux-gcc"
|
||||||
all_platforms="${all_platforms} mips64-linux-gcc"
|
all_platforms="${all_platforms} mips64-linux-gcc"
|
||||||
all_platforms="${all_platforms} sparc-solaris-gcc"
|
all_platforms="${all_platforms} sparc-solaris-gcc"
|
||||||
@@ -122,6 +125,7 @@ all_platforms="${all_platforms} x86-darwin11-gcc"
|
|||||||
all_platforms="${all_platforms} x86-darwin12-gcc"
|
all_platforms="${all_platforms} x86-darwin12-gcc"
|
||||||
all_platforms="${all_platforms} x86-darwin13-gcc"
|
all_platforms="${all_platforms} x86-darwin13-gcc"
|
||||||
all_platforms="${all_platforms} x86-darwin14-gcc"
|
all_platforms="${all_platforms} x86-darwin14-gcc"
|
||||||
|
all_platforms="${all_platforms} x86-darwin15-gcc"
|
||||||
all_platforms="${all_platforms} x86-iphonesimulator-gcc"
|
all_platforms="${all_platforms} x86-iphonesimulator-gcc"
|
||||||
all_platforms="${all_platforms} x86-linux-gcc"
|
all_platforms="${all_platforms} x86-linux-gcc"
|
||||||
all_platforms="${all_platforms} x86-linux-icc"
|
all_platforms="${all_platforms} x86-linux-icc"
|
||||||
@@ -142,6 +146,7 @@ all_platforms="${all_platforms} x86_64-darwin11-gcc"
|
|||||||
all_platforms="${all_platforms} x86_64-darwin12-gcc"
|
all_platforms="${all_platforms} x86_64-darwin12-gcc"
|
||||||
all_platforms="${all_platforms} x86_64-darwin13-gcc"
|
all_platforms="${all_platforms} x86_64-darwin13-gcc"
|
||||||
all_platforms="${all_platforms} x86_64-darwin14-gcc"
|
all_platforms="${all_platforms} x86_64-darwin14-gcc"
|
||||||
|
all_platforms="${all_platforms} x86_64-darwin15-gcc"
|
||||||
all_platforms="${all_platforms} x86_64-iphonesimulator-gcc"
|
all_platforms="${all_platforms} x86_64-iphonesimulator-gcc"
|
||||||
all_platforms="${all_platforms} x86_64-linux-gcc"
|
all_platforms="${all_platforms} x86_64-linux-gcc"
|
||||||
all_platforms="${all_platforms} x86_64-linux-icc"
|
all_platforms="${all_platforms} x86_64-linux-icc"
|
||||||
@@ -190,12 +195,8 @@ if [ ${doxy_major:-0} -ge 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# disable codecs when their source directory does not exist
|
# disable codecs when their source directory does not exist
|
||||||
[ -d "${source_path}/vp8" ] || disable_feature vp8
|
[ -d "${source_path}/vp8" ] || disable_codec vp8
|
||||||
[ -d "${source_path}/vp9" ] || disable_feature vp9
|
[ -d "${source_path}/vp9" ] || disable_codec vp9
|
||||||
[ -d "${source_path}/vp10" ] || disable_feature vp10
|
|
||||||
|
|
||||||
# disable vp10 codec by default
|
|
||||||
disable_feature vp10
|
|
||||||
|
|
||||||
# install everything except the sources, by default. sources will have
|
# install everything except the sources, by default. sources will have
|
||||||
# to be enabled when doing dist builds, since that's no longer a common
|
# to be enabled when doing dist builds, since that's no longer a common
|
||||||
@@ -217,13 +218,10 @@ CODECS="
|
|||||||
vp8_decoder
|
vp8_decoder
|
||||||
vp9_encoder
|
vp9_encoder
|
||||||
vp9_decoder
|
vp9_decoder
|
||||||
vp10_encoder
|
|
||||||
vp10_decoder
|
|
||||||
"
|
"
|
||||||
CODEC_FAMILIES="
|
CODEC_FAMILIES="
|
||||||
vp8
|
vp8
|
||||||
vp9
|
vp9
|
||||||
vp10
|
|
||||||
"
|
"
|
||||||
|
|
||||||
ARCH_LIST="
|
ARCH_LIST="
|
||||||
@@ -232,6 +230,16 @@ ARCH_LIST="
|
|||||||
x86
|
x86
|
||||||
x86_64
|
x86_64
|
||||||
"
|
"
|
||||||
|
ARCH_EXT_LIST_X86="
|
||||||
|
mmx
|
||||||
|
sse
|
||||||
|
sse2
|
||||||
|
sse3
|
||||||
|
ssse3
|
||||||
|
sse4_1
|
||||||
|
avx
|
||||||
|
avx2
|
||||||
|
"
|
||||||
ARCH_EXT_LIST="
|
ARCH_EXT_LIST="
|
||||||
edsp
|
edsp
|
||||||
media
|
media
|
||||||
@@ -243,27 +251,19 @@ ARCH_EXT_LIST="
|
|||||||
msa
|
msa
|
||||||
mips64
|
mips64
|
||||||
|
|
||||||
mmx
|
${ARCH_EXT_LIST_X86}
|
||||||
sse
|
|
||||||
sse2
|
|
||||||
sse3
|
|
||||||
ssse3
|
|
||||||
sse4_1
|
|
||||||
avx
|
|
||||||
avx2
|
|
||||||
"
|
"
|
||||||
HAVE_LIST="
|
HAVE_LIST="
|
||||||
${ARCH_EXT_LIST}
|
${ARCH_EXT_LIST}
|
||||||
vpx_ports
|
vpx_ports
|
||||||
stdint_h
|
|
||||||
pthread_h
|
pthread_h
|
||||||
sys_mman_h
|
|
||||||
unistd_h
|
unistd_h
|
||||||
"
|
"
|
||||||
EXPERIMENT_LIST="
|
EXPERIMENT_LIST="
|
||||||
spatial_svc
|
spatial_svc
|
||||||
fp_mb_stats
|
fp_mb_stats
|
||||||
emulate_hardware
|
emulate_hardware
|
||||||
|
misc_fixes
|
||||||
"
|
"
|
||||||
CONFIG_LIST="
|
CONFIG_LIST="
|
||||||
dependency_tracking
|
dependency_tracking
|
||||||
@@ -316,6 +316,7 @@ CONFIG_LIST="
|
|||||||
vp9_temporal_denoising
|
vp9_temporal_denoising
|
||||||
coefficient_range_checking
|
coefficient_range_checking
|
||||||
vp9_highbitdepth
|
vp9_highbitdepth
|
||||||
|
better_hw_compatibility
|
||||||
experimental
|
experimental
|
||||||
size_limit
|
size_limit
|
||||||
${EXPERIMENT_LIST}
|
${EXPERIMENT_LIST}
|
||||||
@@ -374,6 +375,7 @@ CMDLINE_SELECT="
|
|||||||
temporal_denoising
|
temporal_denoising
|
||||||
vp9_temporal_denoising
|
vp9_temporal_denoising
|
||||||
coefficient_range_checking
|
coefficient_range_checking
|
||||||
|
better_hw_compatibility
|
||||||
vp9_highbitdepth
|
vp9_highbitdepth
|
||||||
experimental
|
experimental
|
||||||
"
|
"
|
||||||
@@ -382,15 +384,19 @@ process_cmdline() {
|
|||||||
for opt do
|
for opt do
|
||||||
optval="${opt#*=}"
|
optval="${opt#*=}"
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
--disable-codecs) for c in ${CODECS}; do disable_feature $c; done ;;
|
--disable-codecs)
|
||||||
|
for c in ${CODEC_FAMILIES}; do disable_codec $c; done
|
||||||
|
;;
|
||||||
--enable-?*|--disable-?*)
|
--enable-?*|--disable-?*)
|
||||||
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
|
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
|
||||||
if echo "${EXPERIMENT_LIST}" | grep "^ *$option\$" >/dev/null; then
|
if is_in ${option} ${EXPERIMENT_LIST}; then
|
||||||
if enabled experimental; then
|
if enabled experimental; then
|
||||||
${action}_feature $option
|
${action}_feature $option
|
||||||
else
|
else
|
||||||
log_echo "Ignoring $opt -- not in experimental mode."
|
log_echo "Ignoring $opt -- not in experimental mode."
|
||||||
fi
|
fi
|
||||||
|
elif is_in ${option} "${CODECS} ${CODEC_FAMILIES}"; then
|
||||||
|
${action}_codec ${option}
|
||||||
else
|
else
|
||||||
process_common_cmdline $opt
|
process_common_cmdline $opt
|
||||||
fi
|
fi
|
||||||
@@ -404,14 +410,6 @@ process_cmdline() {
|
|||||||
post_process_cmdline() {
|
post_process_cmdline() {
|
||||||
c=""
|
c=""
|
||||||
|
|
||||||
# If the codec family is disabled, disable all components of that family.
|
|
||||||
# If the codec family is enabled, enable all components of that family.
|
|
||||||
log_echo "Configuring selected codecs"
|
|
||||||
for c in ${CODECS}; do
|
|
||||||
disabled ${c%%_*} && disable_feature ${c}
|
|
||||||
enabled ${c%%_*} && enable_feature ${c}
|
|
||||||
done
|
|
||||||
|
|
||||||
# Enable all detected codecs, if they haven't been disabled
|
# Enable all detected codecs, if they haven't been disabled
|
||||||
for c in ${CODECS}; do soft_enable $c; done
|
for c in ${CODECS}; do soft_enable $c; done
|
||||||
|
|
||||||
@@ -506,13 +504,18 @@ process_detect() {
|
|||||||
# Can only build shared libs on a subset of platforms. Doing this check
|
# Can only build shared libs on a subset of platforms. Doing this check
|
||||||
# here rather than at option parse time because the target auto-detect
|
# here rather than at option parse time because the target auto-detect
|
||||||
# magic happens after the command line has been parsed.
|
# magic happens after the command line has been parsed.
|
||||||
if ! enabled linux && ! enabled os2; then
|
case "${tgt_os}" in
|
||||||
|
linux|os2|darwin*|iphonesimulator*)
|
||||||
|
# Supported platforms
|
||||||
|
;;
|
||||||
|
*)
|
||||||
if enabled gnu; then
|
if enabled gnu; then
|
||||||
echo "--enable-shared is only supported on ELF; assuming this is OK"
|
echo "--enable-shared is only supported on ELF; assuming this is OK"
|
||||||
else
|
else
|
||||||
die "--enable-shared only supported on ELF and OS/2 for now"
|
die "--enable-shared only supported on ELF, OS/2, and Darwin for now"
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
if [ -z "$CC" ] || enabled external_build; then
|
if [ -z "$CC" ] || enabled external_build; then
|
||||||
echo "Bypassing toolchain for environment detection."
|
echo "Bypassing toolchain for environment detection."
|
||||||
@@ -539,16 +542,12 @@ process_detect() {
|
|||||||
# Specialize windows and POSIX environments.
|
# Specialize windows and POSIX environments.
|
||||||
case $toolchain in
|
case $toolchain in
|
||||||
*-win*-*)
|
*-win*-*)
|
||||||
case $header-$toolchain in
|
# Don't check for any headers in Windows builds.
|
||||||
stdint*-gcc) true;;
|
false
|
||||||
*) false;;
|
|
||||||
esac && enable_feature $var
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
case $header in
|
case $header in
|
||||||
stdint.h) true;;
|
|
||||||
pthread.h) true;;
|
pthread.h) true;;
|
||||||
sys/mman.h) true;;
|
|
||||||
unistd.h) true;;
|
unistd.h) true;;
|
||||||
*) false;;
|
*) false;;
|
||||||
esac && enable_feature $var
|
esac && enable_feature $var
|
||||||
@@ -564,9 +563,7 @@ process_detect() {
|
|||||||
int main(void) {return 0;}
|
int main(void) {return 0;}
|
||||||
EOF
|
EOF
|
||||||
# check system headers
|
# check system headers
|
||||||
check_header stdint.h
|
|
||||||
check_header pthread.h
|
check_header pthread.h
|
||||||
check_header sys/mman.h
|
|
||||||
check_header unistd.h # for sysconf(3) and friends.
|
check_header unistd.h # for sysconf(3) and friends.
|
||||||
|
|
||||||
check_header vpx/vpx_integer.h -I${source_path} && enable_feature vpx_ports
|
check_header vpx/vpx_integer.h -I${source_path} && enable_feature vpx_ports
|
||||||
@@ -597,7 +594,11 @@ process_toolchain() {
|
|||||||
;;
|
;;
|
||||||
*) check_add_cflags -Wunused-but-set-variable ;;
|
*) check_add_cflags -Wunused-but-set-variable ;;
|
||||||
esac
|
esac
|
||||||
|
if enabled mips || [ -z "${INLINE}" ]; then
|
||||||
enabled extra_warnings || check_add_cflags -Wno-unused-function
|
enabled extra_warnings || check_add_cflags -Wno-unused-function
|
||||||
|
else
|
||||||
|
check_add_cflags -Wunused-function
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if enabled icc; then
|
if enabled icc; then
|
||||||
@@ -722,6 +723,10 @@ EOF
|
|||||||
check_add_cflags ${extra_cflags} || \
|
check_add_cflags ${extra_cflags} || \
|
||||||
die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler"
|
die "Requested extra CFLAGS '${extra_cflags}' not supported by compiler"
|
||||||
fi
|
fi
|
||||||
|
if [ -n "${extra_cxxflags}" ]; then
|
||||||
|
check_add_cxxflags ${extra_cxxflags} || \
|
||||||
|
die "Requested extra CXXFLAGS '${extra_cxxflags}' not supported by compiler"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
40
examples.mk
40
examples.mk
@@ -36,20 +36,30 @@ LIBYUV_SRCS += third_party/libyuv/include/libyuv/basic_types.h \
|
|||||||
third_party/libyuv/source/scale_neon64.cc \
|
third_party/libyuv/source/scale_neon64.cc \
|
||||||
third_party/libyuv/source/scale_win.cc \
|
third_party/libyuv/source/scale_win.cc \
|
||||||
|
|
||||||
LIBWEBM_MUXER_SRCS += third_party/libwebm/mkvmuxer.cpp \
|
LIBWEBM_COMMON_SRCS += third_party/libwebm/common/hdr_util.cc \
|
||||||
third_party/libwebm/mkvmuxerutil.cpp \
|
third_party/libwebm/common/hdr_util.h \
|
||||||
third_party/libwebm/mkvwriter.cpp \
|
third_party/libwebm/common/webmids.h
|
||||||
third_party/libwebm/mkvmuxer.hpp \
|
|
||||||
third_party/libwebm/mkvmuxertypes.hpp \
|
LIBWEBM_MUXER_SRCS += third_party/libwebm/mkvmuxer/mkvmuxer.cc \
|
||||||
third_party/libwebm/mkvmuxerutil.hpp \
|
third_party/libwebm/mkvmuxer/mkvmuxerutil.cc \
|
||||||
third_party/libwebm/mkvparser.hpp \
|
third_party/libwebm/mkvmuxer/mkvwriter.cc \
|
||||||
third_party/libwebm/mkvwriter.hpp \
|
third_party/libwebm/mkvmuxer/mkvmuxer.h \
|
||||||
third_party/libwebm/webmids.hpp
|
third_party/libwebm/mkvmuxer/mkvmuxertypes.h \
|
||||||
|
third_party/libwebm/mkvmuxer/mkvmuxerutil.h \
|
||||||
|
third_party/libwebm/mkvparser/mkvparser.h \
|
||||||
|
third_party/libwebm/mkvmuxer/mkvwriter.h
|
||||||
|
|
||||||
|
LIBWEBM_PARSER_SRCS = third_party/libwebm/mkvparser/mkvparser.cc \
|
||||||
|
third_party/libwebm/mkvparser/mkvreader.cc \
|
||||||
|
third_party/libwebm/mkvparser/mkvparser.h \
|
||||||
|
third_party/libwebm/mkvparser/mkvreader.h
|
||||||
|
|
||||||
|
# Add compile flags and include path for libwebm sources.
|
||||||
|
ifeq ($(CONFIG_WEBM_IO),yes)
|
||||||
|
CXXFLAGS += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
|
||||||
|
INC_PATH-yes += $(SRC_PATH_BARE)/third_party/libwebm
|
||||||
|
endif
|
||||||
|
|
||||||
LIBWEBM_PARSER_SRCS = third_party/libwebm/mkvparser.cpp \
|
|
||||||
third_party/libwebm/mkvreader.cpp \
|
|
||||||
third_party/libwebm/mkvparser.hpp \
|
|
||||||
third_party/libwebm/mkvreader.hpp
|
|
||||||
|
|
||||||
# List of examples to build. UTILS are tools meant for distribution
|
# List of examples to build. UTILS are tools meant for distribution
|
||||||
# while EXAMPLES demonstrate specific portions of the API.
|
# while EXAMPLES demonstrate specific portions of the API.
|
||||||
@@ -68,6 +78,8 @@ ifeq ($(CONFIG_LIBYUV),yes)
|
|||||||
vpxdec.SRCS += $(LIBYUV_SRCS)
|
vpxdec.SRCS += $(LIBYUV_SRCS)
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_WEBM_IO),yes)
|
ifeq ($(CONFIG_WEBM_IO),yes)
|
||||||
|
vpxdec.SRCS += $(LIBWEBM_COMMON_SRCS)
|
||||||
|
vpxdec.SRCS += $(LIBWEBM_MUXER_SRCS)
|
||||||
vpxdec.SRCS += $(LIBWEBM_PARSER_SRCS)
|
vpxdec.SRCS += $(LIBWEBM_PARSER_SRCS)
|
||||||
vpxdec.SRCS += webmdec.cc webmdec.h
|
vpxdec.SRCS += webmdec.cc webmdec.h
|
||||||
endif
|
endif
|
||||||
@@ -89,7 +101,9 @@ ifeq ($(CONFIG_LIBYUV),yes)
|
|||||||
vpxenc.SRCS += $(LIBYUV_SRCS)
|
vpxenc.SRCS += $(LIBYUV_SRCS)
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_WEBM_IO),yes)
|
ifeq ($(CONFIG_WEBM_IO),yes)
|
||||||
|
vpxenc.SRCS += $(LIBWEBM_COMMON_SRCS)
|
||||||
vpxenc.SRCS += $(LIBWEBM_MUXER_SRCS)
|
vpxenc.SRCS += $(LIBWEBM_MUXER_SRCS)
|
||||||
|
vpxenc.SRCS += $(LIBWEBM_PARSER_SRCS)
|
||||||
vpxenc.SRCS += webmenc.cc webmenc.h
|
vpxenc.SRCS += webmenc.cc webmenc.h
|
||||||
endif
|
endif
|
||||||
vpxenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1
|
vpxenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1
|
||||||
|
|||||||
@@ -109,8 +109,8 @@ static const char *exec_name;
|
|||||||
void usage_exit(void) {
|
void usage_exit(void) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: %s <codec> <width> <height> <infile> <outfile> "
|
"Usage: %s <codec> <width> <height> <infile> <outfile> "
|
||||||
"<keyframe-interval> [<error-resilient>]\nSee comments in "
|
"<keyframe-interval> <error-resilient> <frames to encode>\n"
|
||||||
"simple_encoder.c for more information.\n",
|
"See comments in simple_encoder.c for more information.\n",
|
||||||
exec_name);
|
exec_name);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@@ -147,6 +147,7 @@ static int encode_frame(vpx_codec_ctx_t *codec,
|
|||||||
return got_pkts;
|
return got_pkts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(tomfinegan): Improve command line parsing and add args for bitrate/fps.
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
FILE *infile = NULL;
|
FILE *infile = NULL;
|
||||||
vpx_codec_ctx_t codec;
|
vpx_codec_ctx_t codec;
|
||||||
@@ -157,12 +158,11 @@ int main(int argc, char **argv) {
|
|||||||
VpxVideoInfo info = {0};
|
VpxVideoInfo info = {0};
|
||||||
VpxVideoWriter *writer = NULL;
|
VpxVideoWriter *writer = NULL;
|
||||||
const VpxInterface *encoder = NULL;
|
const VpxInterface *encoder = NULL;
|
||||||
const int fps = 30; // TODO(dkovalev) add command line argument
|
const int fps = 30;
|
||||||
const int bitrate = 200; // kbit/s TODO(dkovalev) add command line argument
|
const int bitrate = 200;
|
||||||
int keyframe_interval = 0;
|
int keyframe_interval = 0;
|
||||||
|
int max_frames = 0;
|
||||||
// TODO(dkovalev): Add some simple command line parsing code to make the
|
int frames_encoded = 0;
|
||||||
// command line more flexible.
|
|
||||||
const char *codec_arg = NULL;
|
const char *codec_arg = NULL;
|
||||||
const char *width_arg = NULL;
|
const char *width_arg = NULL;
|
||||||
const char *height_arg = NULL;
|
const char *height_arg = NULL;
|
||||||
@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
exec_name = argv[0];
|
exec_name = argv[0];
|
||||||
|
|
||||||
if (argc < 7)
|
if (argc != 9)
|
||||||
die("Invalid number of arguments");
|
die("Invalid number of arguments");
|
||||||
|
|
||||||
codec_arg = argv[1];
|
codec_arg = argv[1];
|
||||||
@@ -181,6 +181,7 @@ int main(int argc, char **argv) {
|
|||||||
infile_arg = argv[4];
|
infile_arg = argv[4];
|
||||||
outfile_arg = argv[5];
|
outfile_arg = argv[5];
|
||||||
keyframe_interval_arg = argv[6];
|
keyframe_interval_arg = argv[6];
|
||||||
|
max_frames = strtol(argv[8], NULL, 0);
|
||||||
|
|
||||||
encoder = get_vpx_encoder_by_name(codec_arg);
|
encoder = get_vpx_encoder_by_name(codec_arg);
|
||||||
if (!encoder)
|
if (!encoder)
|
||||||
@@ -219,7 +220,7 @@ int main(int argc, char **argv) {
|
|||||||
cfg.g_timebase.num = info.time_base.numerator;
|
cfg.g_timebase.num = info.time_base.numerator;
|
||||||
cfg.g_timebase.den = info.time_base.denominator;
|
cfg.g_timebase.den = info.time_base.denominator;
|
||||||
cfg.rc_target_bitrate = bitrate;
|
cfg.rc_target_bitrate = bitrate;
|
||||||
cfg.g_error_resilient = argc > 7 ? strtol(argv[7], NULL, 0) : 0;
|
cfg.g_error_resilient = strtol(argv[7], NULL, 0);
|
||||||
|
|
||||||
writer = vpx_video_writer_open(outfile_arg, kContainerIVF, &info);
|
writer = vpx_video_writer_open(outfile_arg, kContainerIVF, &info);
|
||||||
if (!writer)
|
if (!writer)
|
||||||
@@ -237,6 +238,9 @@ int main(int argc, char **argv) {
|
|||||||
if (keyframe_interval > 0 && frame_count % keyframe_interval == 0)
|
if (keyframe_interval > 0 && frame_count % keyframe_interval == 0)
|
||||||
flags |= VPX_EFLAG_FORCE_KF;
|
flags |= VPX_EFLAG_FORCE_KF;
|
||||||
encode_frame(&codec, &raw, frame_count++, flags, writer);
|
encode_frame(&codec, &raw, frame_count++, flags, writer);
|
||||||
|
frames_encoded++;
|
||||||
|
if (max_frames > 0 && frames_encoded >= max_frames)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flush encoder.
|
// Flush encoder.
|
||||||
|
|||||||
@@ -59,7 +59,9 @@
|
|||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
void usage_exit(void) {
|
void usage_exit(void) {
|
||||||
fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n",
|
fprintf(stderr,
|
||||||
|
"Usage: %s <codec> <width> <height> <infile> <outfile> "
|
||||||
|
"<frame limit>\n",
|
||||||
exec_name);
|
exec_name);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@@ -129,7 +131,8 @@ static int encode_frame(vpx_codec_ctx_t *ctx,
|
|||||||
static vpx_fixed_buf_t pass0(vpx_image_t *raw,
|
static vpx_fixed_buf_t pass0(vpx_image_t *raw,
|
||||||
FILE *infile,
|
FILE *infile,
|
||||||
const VpxInterface *encoder,
|
const VpxInterface *encoder,
|
||||||
const vpx_codec_enc_cfg_t *cfg) {
|
const vpx_codec_enc_cfg_t *cfg,
|
||||||
|
int max_frames) {
|
||||||
vpx_codec_ctx_t codec;
|
vpx_codec_ctx_t codec;
|
||||||
int frame_count = 0;
|
int frame_count = 0;
|
||||||
vpx_fixed_buf_t stats = {NULL, 0};
|
vpx_fixed_buf_t stats = {NULL, 0};
|
||||||
@@ -142,6 +145,8 @@ static vpx_fixed_buf_t pass0(vpx_image_t *raw,
|
|||||||
++frame_count;
|
++frame_count;
|
||||||
get_frame_stats(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY,
|
get_frame_stats(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY,
|
||||||
&stats);
|
&stats);
|
||||||
|
if (max_frames > 0 && frame_count >= max_frames)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flush encoder.
|
// Flush encoder.
|
||||||
@@ -159,7 +164,8 @@ static void pass1(vpx_image_t *raw,
|
|||||||
FILE *infile,
|
FILE *infile,
|
||||||
const char *outfile_name,
|
const char *outfile_name,
|
||||||
const VpxInterface *encoder,
|
const VpxInterface *encoder,
|
||||||
const vpx_codec_enc_cfg_t *cfg) {
|
const vpx_codec_enc_cfg_t *cfg,
|
||||||
|
int max_frames) {
|
||||||
VpxVideoInfo info = {
|
VpxVideoInfo info = {
|
||||||
encoder->fourcc,
|
encoder->fourcc,
|
||||||
cfg->g_w,
|
cfg->g_w,
|
||||||
@@ -181,6 +187,9 @@ static void pass1(vpx_image_t *raw,
|
|||||||
while (vpx_img_read(raw, infile)) {
|
while (vpx_img_read(raw, infile)) {
|
||||||
++frame_count;
|
++frame_count;
|
||||||
encode_frame(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY, writer);
|
encode_frame(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY, writer);
|
||||||
|
|
||||||
|
if (max_frames > 0 && frame_count >= max_frames)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flush encoder.
|
// Flush encoder.
|
||||||
@@ -213,11 +222,14 @@ int main(int argc, char **argv) {
|
|||||||
const char *const height_arg = argv[3];
|
const char *const height_arg = argv[3];
|
||||||
const char *const infile_arg = argv[4];
|
const char *const infile_arg = argv[4];
|
||||||
const char *const outfile_arg = argv[5];
|
const char *const outfile_arg = argv[5];
|
||||||
|
int max_frames = 0;
|
||||||
exec_name = argv[0];
|
exec_name = argv[0];
|
||||||
|
|
||||||
if (argc != 6)
|
if (argc != 7)
|
||||||
die("Invalid number of arguments.");
|
die("Invalid number of arguments.");
|
||||||
|
|
||||||
|
max_frames = strtol(argv[6], NULL, 0);
|
||||||
|
|
||||||
encoder = get_vpx_encoder_by_name(codec_arg);
|
encoder = get_vpx_encoder_by_name(codec_arg);
|
||||||
if (!encoder)
|
if (!encoder)
|
||||||
die("Unsupported codec.");
|
die("Unsupported codec.");
|
||||||
@@ -249,13 +261,13 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
// Pass 0
|
// Pass 0
|
||||||
cfg.g_pass = VPX_RC_FIRST_PASS;
|
cfg.g_pass = VPX_RC_FIRST_PASS;
|
||||||
stats = pass0(&raw, infile, encoder, &cfg);
|
stats = pass0(&raw, infile, encoder, &cfg, max_frames);
|
||||||
|
|
||||||
// Pass 1
|
// Pass 1
|
||||||
rewind(infile);
|
rewind(infile);
|
||||||
cfg.g_pass = VPX_RC_LAST_PASS;
|
cfg.g_pass = VPX_RC_LAST_PASS;
|
||||||
cfg.rc_twopass_stats_in = stats;
|
cfg.rc_twopass_stats_in = stats;
|
||||||
pass1(&raw, infile, outfile_arg, encoder, &cfg);
|
pass1(&raw, infile, outfile_arg, encoder, &cfg, max_frames);
|
||||||
free(stats.buf);
|
free(stats.buf);
|
||||||
|
|
||||||
vpx_img_free(&raw);
|
vpx_img_free(&raw);
|
||||||
|
|||||||
@@ -29,13 +29,6 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#if USE_POSIX_MMAP
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
#include "vpx_ports/vpx_timer.h"
|
#include "vpx_ports/vpx_timer.h"
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
@@ -354,8 +347,7 @@ int main(int argc, char **argv)
|
|||||||
double psnr_totals[NUM_ENCODERS][4] = {{0,0}};
|
double psnr_totals[NUM_ENCODERS][4] = {{0,0}};
|
||||||
int psnr_count[NUM_ENCODERS] = {0};
|
int psnr_count[NUM_ENCODERS] = {0};
|
||||||
|
|
||||||
double cx_time = 0;
|
int64_t cx_time = 0;
|
||||||
struct timeval tv1, tv2, difftv;
|
|
||||||
|
|
||||||
/* Set the required target bitrates for each resolution level.
|
/* Set the required target bitrates for each resolution level.
|
||||||
* If target bitrate for highest-resolution level is set to 0,
|
* If target bitrate for highest-resolution level is set to 0,
|
||||||
@@ -589,6 +581,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
while(frame_avail || got_data)
|
while(frame_avail || got_data)
|
||||||
{
|
{
|
||||||
|
struct vpx_usec_timer timer;
|
||||||
vpx_codec_iter_t iter[NUM_ENCODERS]={NULL};
|
vpx_codec_iter_t iter[NUM_ENCODERS]={NULL};
|
||||||
const vpx_codec_cx_pkt_t *pkt[NUM_ENCODERS];
|
const vpx_codec_cx_pkt_t *pkt[NUM_ENCODERS];
|
||||||
|
|
||||||
@@ -643,18 +636,18 @@ int main(int argc, char **argv)
|
|||||||
vpx_codec_control(&codec[i], VP8E_SET_TEMPORAL_LAYER_ID, layer_id);
|
vpx_codec_control(&codec[i], VP8E_SET_TEMPORAL_LAYER_ID, layer_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
gettimeofday(&tv1, NULL);
|
|
||||||
/* Encode each frame at multi-levels */
|
/* Encode each frame at multi-levels */
|
||||||
/* Note the flags must be set to 0 in the encode call if they are set
|
/* Note the flags must be set to 0 in the encode call if they are set
|
||||||
for each frame with the vpx_codec_control(), as done above. */
|
for each frame with the vpx_codec_control(), as done above. */
|
||||||
|
vpx_usec_timer_start(&timer);
|
||||||
if(vpx_codec_encode(&codec[0], frame_avail? &raw[0] : NULL,
|
if(vpx_codec_encode(&codec[0], frame_avail? &raw[0] : NULL,
|
||||||
frame_cnt, 1, 0, arg_deadline))
|
frame_cnt, 1, 0, arg_deadline))
|
||||||
{
|
{
|
||||||
die_codec(&codec[0], "Failed to encode frame");
|
die_codec(&codec[0], "Failed to encode frame");
|
||||||
}
|
}
|
||||||
gettimeofday(&tv2, NULL);
|
vpx_usec_timer_mark(&timer);
|
||||||
timersub(&tv2, &tv1, &difftv);
|
cx_time += vpx_usec_timer_elapsed(&timer);
|
||||||
cx_time += (double)(difftv.tv_sec * 1000000 + difftv.tv_usec);
|
|
||||||
for (i=NUM_ENCODERS-1; i>=0 ; i--)
|
for (i=NUM_ENCODERS-1; i>=0 ; i--)
|
||||||
{
|
{
|
||||||
got_data = 0;
|
got_data = 0;
|
||||||
@@ -693,7 +686,9 @@ int main(int argc, char **argv)
|
|||||||
frame_cnt++;
|
frame_cnt++;
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("FPS for encoding %d %f %f \n", frame_cnt, (float)cx_time / 1000000,
|
printf("Frame cnt and encoding time/FPS stats for encoding: %d %f %f \n",
|
||||||
|
frame_cnt,
|
||||||
|
1000 * (float)cx_time / (double)(frame_cnt * 1000000),
|
||||||
1000000 * (double)frame_cnt / (double)cx_time);
|
1000000 * (double)frame_cnt / (double)cx_time);
|
||||||
|
|
||||||
fclose(infile);
|
fclose(infile);
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
#include "../vpxstats.h"
|
#include "../vpxstats.h"
|
||||||
|
#include "vp9/encoder/vp9_encoder.h"
|
||||||
#define OUTPUT_RC_STATS 1
|
#define OUTPUT_RC_STATS 1
|
||||||
|
|
||||||
static const arg_def_t skip_frames_arg =
|
static const arg_def_t skip_frames_arg =
|
||||||
@@ -80,6 +81,8 @@ static const arg_def_t rc_end_usage_arg =
|
|||||||
ARG_DEF(NULL, "rc-end-usage", 1, "0 - 3: VBR, CBR, CQ, Q");
|
ARG_DEF(NULL, "rc-end-usage", 1, "0 - 3: VBR, CBR, CQ, Q");
|
||||||
static const arg_def_t speed_arg =
|
static const arg_def_t speed_arg =
|
||||||
ARG_DEF("sp", "speed", 1, "speed configuration");
|
ARG_DEF("sp", "speed", 1, "speed configuration");
|
||||||
|
static const arg_def_t aqmode_arg =
|
||||||
|
ARG_DEF("aq", "aqmode", 1, "aq-mode off/on");
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
static const struct arg_enum_list bitdepth_enum[] = {
|
static const struct arg_enum_list bitdepth_enum[] = {
|
||||||
@@ -101,7 +104,7 @@ static const arg_def_t *svc_args[] = {
|
|||||||
&kf_dist_arg, &scale_factors_arg, &passes_arg, &pass_arg,
|
&kf_dist_arg, &scale_factors_arg, &passes_arg, &pass_arg,
|
||||||
&fpf_name_arg, &min_q_arg, &max_q_arg, &min_bitrate_arg,
|
&fpf_name_arg, &min_q_arg, &max_q_arg, &min_bitrate_arg,
|
||||||
&max_bitrate_arg, &temporal_layers_arg, &temporal_layering_mode_arg,
|
&max_bitrate_arg, &temporal_layers_arg, &temporal_layering_mode_arg,
|
||||||
&lag_in_frame_arg, &threads_arg,
|
&lag_in_frame_arg, &threads_arg, &aqmode_arg,
|
||||||
#if OUTPUT_RC_STATS
|
#if OUTPUT_RC_STATS
|
||||||
&output_rc_stats_arg,
|
&output_rc_stats_arg,
|
||||||
#endif
|
#endif
|
||||||
@@ -221,6 +224,8 @@ static void parse_command_line(int argc, const char **argv_,
|
|||||||
#endif
|
#endif
|
||||||
} else if (arg_match(&arg, &speed_arg, argi)) {
|
} else if (arg_match(&arg, &speed_arg, argi)) {
|
||||||
svc_ctx->speed = arg_parse_uint(&arg);
|
svc_ctx->speed = arg_parse_uint(&arg);
|
||||||
|
} else if (arg_match(&arg, &aqmode_arg, argi)) {
|
||||||
|
svc_ctx->aqmode = arg_parse_uint(&arg);
|
||||||
} else if (arg_match(&arg, &threads_arg, argi)) {
|
} else if (arg_match(&arg, &threads_arg, argi)) {
|
||||||
svc_ctx->threads = arg_parse_uint(&arg);
|
svc_ctx->threads = arg_parse_uint(&arg);
|
||||||
} else if (arg_match(&arg, &temporal_layering_mode_arg, argi)) {
|
} else if (arg_match(&arg, &temporal_layering_mode_arg, argi)) {
|
||||||
@@ -404,6 +409,9 @@ static void set_rate_control_stats(struct RateControlStats *rc,
|
|||||||
for (tl = 0; tl < cfg->ts_number_layers; ++tl) {
|
for (tl = 0; tl < cfg->ts_number_layers; ++tl) {
|
||||||
const int layer = sl * cfg->ts_number_layers + tl;
|
const int layer = sl * cfg->ts_number_layers + tl;
|
||||||
const int tlayer0 = sl * cfg->ts_number_layers;
|
const int tlayer0 = sl * cfg->ts_number_layers;
|
||||||
|
if (cfg->ts_number_layers == 1)
|
||||||
|
rc->layer_framerate[layer] = framerate;
|
||||||
|
else
|
||||||
rc->layer_framerate[layer] =
|
rc->layer_framerate[layer] =
|
||||||
framerate / cfg->ts_rate_decimator[tl];
|
framerate / cfg->ts_rate_decimator[tl];
|
||||||
if (tl > 0) {
|
if (tl > 0) {
|
||||||
@@ -540,6 +548,59 @@ vpx_codec_err_t parse_superframe_index(const uint8_t *data,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Example pattern for spatial layers and 2 temporal layers used in the
|
||||||
|
// bypass/flexible mode. The pattern corresponds to the pattern
|
||||||
|
// VP9E_TEMPORAL_LAYERING_MODE_0101 (temporal_layering_mode == 2) used in
|
||||||
|
// non-flexible mode.
|
||||||
|
void set_frame_flags_bypass_mode(int sl, int tl, int num_spatial_layers,
|
||||||
|
int is_key_frame,
|
||||||
|
vpx_svc_ref_frame_config_t *ref_frame_config) {
|
||||||
|
for (sl = 0; sl < num_spatial_layers; ++sl) {
|
||||||
|
if (!tl) {
|
||||||
|
if (!sl) {
|
||||||
|
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_GF |
|
||||||
|
VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_GF |
|
||||||
|
VP8_EFLAG_NO_UPD_ARF;
|
||||||
|
} else {
|
||||||
|
if (is_key_frame) {
|
||||||
|
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_LAST |
|
||||||
|
VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_GF |
|
||||||
|
VP8_EFLAG_NO_UPD_ARF;
|
||||||
|
} else {
|
||||||
|
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_GF |
|
||||||
|
VP8_EFLAG_NO_UPD_ARF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (tl == 1) {
|
||||||
|
if (!sl) {
|
||||||
|
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_GF |
|
||||||
|
VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_LAST |
|
||||||
|
VP8_EFLAG_NO_UPD_GF;
|
||||||
|
} else {
|
||||||
|
ref_frame_config->frame_flags[sl] = VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_LAST |
|
||||||
|
VP8_EFLAG_NO_UPD_GF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tl == 0) {
|
||||||
|
ref_frame_config->lst_fb_idx[sl] = sl;
|
||||||
|
if (sl)
|
||||||
|
ref_frame_config->gld_fb_idx[sl] = sl - 1;
|
||||||
|
else
|
||||||
|
ref_frame_config->gld_fb_idx[sl] = 0;
|
||||||
|
ref_frame_config->alt_fb_idx[sl] = 0;
|
||||||
|
} else if (tl == 1) {
|
||||||
|
ref_frame_config->lst_fb_idx[sl] = sl;
|
||||||
|
ref_frame_config->gld_fb_idx[sl] = num_spatial_layers + sl - 1;
|
||||||
|
ref_frame_config->alt_fb_idx[sl] = num_spatial_layers + sl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, const char **argv) {
|
int main(int argc, const char **argv) {
|
||||||
AppInput app_input = {0};
|
AppInput app_input = {0};
|
||||||
VpxVideoWriter *writer = NULL;
|
VpxVideoWriter *writer = NULL;
|
||||||
@@ -560,6 +621,7 @@ int main(int argc, const char **argv) {
|
|||||||
VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = {NULL};
|
VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = {NULL};
|
||||||
struct RateControlStats rc;
|
struct RateControlStats rc;
|
||||||
vpx_svc_layer_id_t layer_id;
|
vpx_svc_layer_id_t layer_id;
|
||||||
|
vpx_svc_ref_frame_config_t ref_frame_config;
|
||||||
int sl, tl;
|
int sl, tl;
|
||||||
double sum_bitrate = 0.0;
|
double sum_bitrate = 0.0;
|
||||||
double sum_bitrate2 = 0.0;
|
double sum_bitrate2 = 0.0;
|
||||||
@@ -635,7 +697,7 @@ int main(int argc, const char **argv) {
|
|||||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, svc_ctx.speed);
|
vpx_codec_control(&codec, VP8E_SET_CPUUSED, svc_ctx.speed);
|
||||||
if (svc_ctx.threads)
|
if (svc_ctx.threads)
|
||||||
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (svc_ctx.threads >> 1));
|
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (svc_ctx.threads >> 1));
|
||||||
if (svc_ctx.speed >= 5)
|
if (svc_ctx.speed >= 5 && svc_ctx.aqmode == 1)
|
||||||
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
||||||
|
|
||||||
|
|
||||||
@@ -649,6 +711,37 @@ int main(int argc, const char **argv) {
|
|||||||
end_of_stream = 1;
|
end_of_stream = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For BYPASS/FLEXIBLE mode, set the frame flags (reference and updates)
|
||||||
|
// and the buffer indices for each spatial layer of the current
|
||||||
|
// (super)frame to be encoded. The temporal layer_id for the current frame
|
||||||
|
// also needs to be set.
|
||||||
|
// TODO(marpan): Should rename the "VP9E_TEMPORAL_LAYERING_MODE_BYPASS"
|
||||||
|
// mode to "VP9E_LAYERING_MODE_BYPASS".
|
||||||
|
if (svc_ctx.temporal_layering_mode == VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
|
||||||
|
layer_id.spatial_layer_id = 0;
|
||||||
|
// Example for 2 temporal layers.
|
||||||
|
if (frame_cnt % 2 == 0)
|
||||||
|
layer_id.temporal_layer_id = 0;
|
||||||
|
else
|
||||||
|
layer_id.temporal_layer_id = 1;
|
||||||
|
// Note that we only set the temporal layer_id, since we are calling
|
||||||
|
// the encode for the whole superframe. The encoder will internally loop
|
||||||
|
// over all the spatial layers for the current superframe.
|
||||||
|
vpx_codec_control(&codec, VP9E_SET_SVC_LAYER_ID, &layer_id);
|
||||||
|
set_frame_flags_bypass_mode(sl, layer_id.temporal_layer_id,
|
||||||
|
svc_ctx.spatial_layers,
|
||||||
|
frame_cnt == 0,
|
||||||
|
&ref_frame_config);
|
||||||
|
vpx_codec_control(&codec, VP9E_SET_SVC_REF_FRAME_CONFIG,
|
||||||
|
&ref_frame_config);
|
||||||
|
// Keep track of input frames, to account for frame drops in rate control
|
||||||
|
// stats/metrics.
|
||||||
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
|
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
|
||||||
|
layer_id.temporal_layer_id];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
vpx_usec_timer_start(&timer);
|
vpx_usec_timer_start(&timer);
|
||||||
res = vpx_svc_encode(&svc_ctx, &codec, (end_of_stream ? NULL : &raw),
|
res = vpx_svc_encode(&svc_ctx, &codec, (end_of_stream ? NULL : &raw),
|
||||||
pts, frame_duration, svc_ctx.speed >= 5 ?
|
pts, frame_duration, svc_ctx.speed >= 5 ?
|
||||||
@@ -657,6 +750,7 @@ int main(int argc, const char **argv) {
|
|||||||
cx_time += vpx_usec_timer_elapsed(&timer);
|
cx_time += vpx_usec_timer_elapsed(&timer);
|
||||||
|
|
||||||
printf("%s", vpx_svc_get_message(&svc_ctx));
|
printf("%s", vpx_svc_get_message(&svc_ctx));
|
||||||
|
fflush(stdout);
|
||||||
if (res != VPX_CODEC_OK) {
|
if (res != VPX_CODEC_OK) {
|
||||||
die_codec(&codec, "Failed to encode frame");
|
die_codec(&codec, "Failed to encode frame");
|
||||||
}
|
}
|
||||||
@@ -664,6 +758,7 @@ int main(int argc, const char **argv) {
|
|||||||
while ((cx_pkt = vpx_codec_get_cx_data(&codec, &iter)) != NULL) {
|
while ((cx_pkt = vpx_codec_get_cx_data(&codec, &iter)) != NULL) {
|
||||||
switch (cx_pkt->kind) {
|
switch (cx_pkt->kind) {
|
||||||
case VPX_CODEC_CX_FRAME_PKT: {
|
case VPX_CODEC_CX_FRAME_PKT: {
|
||||||
|
SvcInternal_t *const si = (SvcInternal_t *)svc_ctx.internal;
|
||||||
if (cx_pkt->data.frame.sz > 0) {
|
if (cx_pkt->data.frame.sz > 0) {
|
||||||
#if OUTPUT_RC_STATS
|
#if OUTPUT_RC_STATS
|
||||||
uint32_t sizes[8];
|
uint32_t sizes[8];
|
||||||
@@ -679,10 +774,17 @@ int main(int argc, const char **argv) {
|
|||||||
vpx_codec_control(&codec, VP9E_GET_SVC_LAYER_ID, &layer_id);
|
vpx_codec_control(&codec, VP9E_GET_SVC_LAYER_ID, &layer_id);
|
||||||
parse_superframe_index(cx_pkt->data.frame.buf,
|
parse_superframe_index(cx_pkt->data.frame.buf,
|
||||||
cx_pkt->data.frame.sz, sizes, &count);
|
cx_pkt->data.frame.sz, sizes, &count);
|
||||||
|
// Note computing input_layer_frames here won't account for frame
|
||||||
|
// drops in rate control stats.
|
||||||
|
// TODO(marpan): Fix this for non-bypass mode so we can get stats
|
||||||
|
// for dropped frames.
|
||||||
|
if (svc_ctx.temporal_layering_mode !=
|
||||||
|
VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
|
||||||
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
|
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
|
||||||
layer_id.temporal_layer_id];
|
layer_id.temporal_layer_id];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (tl = layer_id.temporal_layer_id;
|
for (tl = layer_id.temporal_layer_id;
|
||||||
tl < enc_cfg.ts_number_layers; ++tl) {
|
tl < enc_cfg.ts_number_layers; ++tl) {
|
||||||
vpx_video_writer_write_frame(outfile[tl],
|
vpx_video_writer_write_frame(outfile[tl],
|
||||||
@@ -752,6 +854,8 @@ int main(int argc, const char **argv) {
|
|||||||
printf("SVC frame: %d, kf: %d, size: %d, pts: %d\n", frames_received,
|
printf("SVC frame: %d, kf: %d, size: %d, pts: %d\n", frames_received,
|
||||||
!!(cx_pkt->data.frame.flags & VPX_FRAME_IS_KEY),
|
!!(cx_pkt->data.frame.flags & VPX_FRAME_IS_KEY),
|
||||||
(int)cx_pkt->data.frame.sz, (int)cx_pkt->data.frame.pts);
|
(int)cx_pkt->data.frame.sz, (int)cx_pkt->data.frame.pts);
|
||||||
|
if (enc_cfg.ss_number_layers == 1 && enc_cfg.ts_number_layers == 1)
|
||||||
|
si->bytes_sum[0] += (int)cx_pkt->data.frame.sz;
|
||||||
++frames_received;
|
++frames_received;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -772,6 +876,16 @@ int main(int argc, const char **argv) {
|
|||||||
pts += frame_duration;
|
pts += frame_duration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Compensate for the extra frame count for the bypass mode.
|
||||||
|
if (svc_ctx.temporal_layering_mode == VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
|
||||||
|
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
||||||
|
const int layer = sl * enc_cfg.ts_number_layers +
|
||||||
|
layer_id.temporal_layer_id;
|
||||||
|
--rc.layer_input_frames[layer];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
printf("Processed %d frames\n", frame_cnt);
|
printf("Processed %d frames\n", frame_cnt);
|
||||||
fclose(infile);
|
fclose(infile);
|
||||||
#if OUTPUT_RC_STATS
|
#if OUTPUT_RC_STATS
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ enum denoiserState {
|
|||||||
kDenoiserOnAdaptive
|
kDenoiserOnAdaptive
|
||||||
};
|
};
|
||||||
|
|
||||||
static int mode_to_num_layers[12] = {1, 2, 2, 3, 3, 3, 3, 5, 2, 3, 3, 3};
|
static int mode_to_num_layers[13] = {1, 2, 2, 3, 3, 3, 3, 5, 2, 3, 3, 3, 3};
|
||||||
|
|
||||||
// For rate control encoding stats.
|
// For rate control encoding stats.
|
||||||
struct RateControlMetrics {
|
struct RateControlMetrics {
|
||||||
@@ -432,7 +432,32 @@ static void set_temporal_layer_pattern(int layering_mode,
|
|||||||
layer_flags[7] = layer_flags[3];
|
layer_flags[7] = layer_flags[3];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 11:
|
case 11: {
|
||||||
|
// 3-layers structure with one reference frame.
|
||||||
|
// This works same as temporal_layering_mode 3.
|
||||||
|
// This was added to compare with vp9_spatial_svc_encoder.
|
||||||
|
|
||||||
|
// 3-layers, 4-frame period.
|
||||||
|
int ids[4] = {0, 2, 1, 2};
|
||||||
|
cfg->ts_periodicity = 4;
|
||||||
|
*flag_periodicity = 4;
|
||||||
|
cfg->ts_number_layers = 3;
|
||||||
|
cfg->ts_rate_decimator[0] = 4;
|
||||||
|
cfg->ts_rate_decimator[1] = 2;
|
||||||
|
cfg->ts_rate_decimator[2] = 1;
|
||||||
|
memcpy(cfg->ts_layer_id, ids, sizeof(ids));
|
||||||
|
// 0=L, 1=GF, 2=ARF, Intra-layer prediction disabled.
|
||||||
|
layer_flags[0] = VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_GF | VP8_EFLAG_NO_UPD_ARF;
|
||||||
|
layer_flags[2] = VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_ARF | VP8_EFLAG_NO_UPD_LAST;
|
||||||
|
layer_flags[1] = VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_LAST | VP8_EFLAG_NO_UPD_GF;
|
||||||
|
layer_flags[3] = VP8_EFLAG_NO_REF_LAST | VP8_EFLAG_NO_REF_ARF |
|
||||||
|
VP8_EFLAG_NO_UPD_LAST | VP8_EFLAG_NO_UPD_GF;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 12:
|
||||||
default: {
|
default: {
|
||||||
// 3-layers structure as in case 10, but no sync/refresh points for
|
// 3-layers structure as in case 10, but no sync/refresh points for
|
||||||
// layer 1 and 2.
|
// layer 1 and 2.
|
||||||
@@ -530,7 +555,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
layering_mode = strtol(argv[10], NULL, 0);
|
layering_mode = strtol(argv[10], NULL, 0);
|
||||||
if (layering_mode < 0 || layering_mode > 12) {
|
if (layering_mode < 0 || layering_mode > 13) {
|
||||||
die("Invalid layering mode (0..12) %s", argv[10]);
|
die("Invalid layering mode (0..12) %s", argv[10]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -684,14 +709,14 @@ int main(int argc, char **argv) {
|
|||||||
if (strncmp(encoder->name, "vp8", 3) == 0) {
|
if (strncmp(encoder->name, "vp8", 3) == 0) {
|
||||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);
|
vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);
|
||||||
vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOff);
|
vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOff);
|
||||||
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 0);
|
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
|
||||||
} else if (strncmp(encoder->name, "vp9", 3) == 0) {
|
} else if (strncmp(encoder->name, "vp9", 3) == 0) {
|
||||||
vpx_svc_extra_cfg_t svc_params;
|
vpx_svc_extra_cfg_t svc_params;
|
||||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
|
vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
|
||||||
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
||||||
vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);
|
vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);
|
||||||
vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, 0);
|
vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, kDenoiserOff);
|
||||||
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 0);
|
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
|
||||||
vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);
|
vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);
|
||||||
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1));
|
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1));
|
||||||
if (vpx_codec_control(&codec, VP9E_SET_SVC, layering_mode > 0 ? 1: 0))
|
if (vpx_codec_control(&codec, VP9E_SET_SVC, layering_mode > 0 ? 1: 0))
|
||||||
|
|||||||
2
ivfdec.c
2
ivfdec.c
@@ -23,7 +23,7 @@ static void fix_framerate(int *num, int *den) {
|
|||||||
// we can guess the framerate using only the timebase in this
|
// we can guess the framerate using only the timebase in this
|
||||||
// case. Other files would require reading ahead to guess the
|
// case. Other files would require reading ahead to guess the
|
||||||
// timebase, like we do for webm.
|
// timebase, like we do for webm.
|
||||||
if (*num < 1000) {
|
if (*den > 0 && *den < 1000000000 && *num > 0 && *num < 1000) {
|
||||||
// Correct for the factor of 2 applied to the timebase in the encoder.
|
// Correct for the factor of 2 applied to the timebase in the encoder.
|
||||||
if (*num & 1)
|
if (*num & 1)
|
||||||
*den *= 2;
|
*den *= 2;
|
||||||
|
|||||||
55
libs.mk
55
libs.mk
@@ -109,40 +109,6 @@ endif
|
|||||||
VP9_PREFIX=vp9/
|
VP9_PREFIX=vp9/
|
||||||
$(BUILD_PFX)$(VP9_PREFIX)%.c.o: CFLAGS += -Wextra
|
$(BUILD_PFX)$(VP9_PREFIX)%.c.o: CFLAGS += -Wextra
|
||||||
|
|
||||||
# VP10 make file
|
|
||||||
ifeq ($(CONFIG_VP10),yes)
|
|
||||||
VP10_PREFIX=vp10/
|
|
||||||
include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10_common.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_VP10_ENCODER),yes)
|
|
||||||
VP10_PREFIX=vp10/
|
|
||||||
include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10cx.mk
|
|
||||||
CODEC_SRCS-yes += $(addprefix $(VP10_PREFIX),$(call enabled,VP10_CX_SRCS))
|
|
||||||
CODEC_EXPORTS-yes += $(addprefix $(VP10_PREFIX),$(VP10_CX_EXPORTS))
|
|
||||||
CODEC_SRCS-yes += $(VP10_PREFIX)vp10cx.mk vpx/vp8.h vpx/vp8cx.h
|
|
||||||
INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8cx.h
|
|
||||||
INSTALL-LIBS-$(CONFIG_SPATIAL_SVC) += include/vpx/svc_context.h
|
|
||||||
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP10_PREFIX)/%
|
|
||||||
CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8cx.h
|
|
||||||
CODEC_DOC_SECTIONS += vp9 vp9_encoder
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_VP10_DECODER),yes)
|
|
||||||
VP10_PREFIX=vp10/
|
|
||||||
include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10dx.mk
|
|
||||||
CODEC_SRCS-yes += $(addprefix $(VP10_PREFIX),$(call enabled,VP10_DX_SRCS))
|
|
||||||
CODEC_EXPORTS-yes += $(addprefix $(VP10_PREFIX),$(VP10_DX_EXPORTS))
|
|
||||||
CODEC_SRCS-yes += $(VP10_PREFIX)vp10dx.mk vpx/vp8.h vpx/vp8dx.h
|
|
||||||
INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8dx.h
|
|
||||||
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP10_PREFIX)/%
|
|
||||||
CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8dx.h
|
|
||||||
CODEC_DOC_SECTIONS += vp9 vp9_decoder
|
|
||||||
endif
|
|
||||||
|
|
||||||
VP10_PREFIX=vp10/
|
|
||||||
$(BUILD_PFX)$(VP10_PREFIX)%.c.o: CFLAGS += -Wextra
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ENCODERS),yes)
|
ifeq ($(CONFIG_ENCODERS),yes)
|
||||||
CODEC_DOC_SECTIONS += encoder
|
CODEC_DOC_SECTIONS += encoder
|
||||||
endif
|
endif
|
||||||
@@ -183,6 +149,9 @@ INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += third_party/x86inc/x86inc.asm
|
|||||||
endif
|
endif
|
||||||
CODEC_EXPORTS-yes += vpx/exports_com
|
CODEC_EXPORTS-yes += vpx/exports_com
|
||||||
CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_enc
|
CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_enc
|
||||||
|
ifeq ($(CONFIG_SPATIAL_SVC),yes)
|
||||||
|
CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_spatial_svc
|
||||||
|
endif
|
||||||
CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
|
CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
|
||||||
|
|
||||||
INSTALL-LIBS-yes += include/vpx/vpx_codec.h
|
INSTALL-LIBS-yes += include/vpx/vpx_codec.h
|
||||||
@@ -260,7 +229,7 @@ OBJS-yes += $(LIBVPX_OBJS)
|
|||||||
LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
|
LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
|
||||||
$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
|
$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
|
||||||
|
|
||||||
SO_VERSION_MAJOR := 2
|
SO_VERSION_MAJOR := 4
|
||||||
SO_VERSION_MINOR := 0
|
SO_VERSION_MINOR := 0
|
||||||
SO_VERSION_PATCH := 0
|
SO_VERSION_PATCH := 0
|
||||||
ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
|
ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
|
||||||
@@ -270,6 +239,12 @@ EXPORT_FILE := libvpx.syms
|
|||||||
LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
|
LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
|
||||||
libvpx.dylib )
|
libvpx.dylib )
|
||||||
else
|
else
|
||||||
|
ifeq ($(filter iphonesimulator%,$(TGT_OS)),$(TGT_OS))
|
||||||
|
LIBVPX_SO := libvpx.$(SO_VERSION_MAJOR).dylib
|
||||||
|
SHARED_LIB_SUF := .dylib
|
||||||
|
EXPORT_FILE := libvpx.syms
|
||||||
|
LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, libvpx.dylib)
|
||||||
|
else
|
||||||
ifeq ($(filter os2%,$(TGT_OS)),$(TGT_OS))
|
ifeq ($(filter os2%,$(TGT_OS)),$(TGT_OS))
|
||||||
LIBVPX_SO := libvpx$(SO_VERSION_MAJOR).dll
|
LIBVPX_SO := libvpx$(SO_VERSION_MAJOR).dll
|
||||||
SHARED_LIB_SUF := _dll.a
|
SHARED_LIB_SUF := _dll.a
|
||||||
@@ -285,6 +260,7 @@ LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
|
|||||||
libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR))
|
libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\
|
LIBS-$(CONFIG_SHARED) += $(BUILD_PFX)$(LIBVPX_SO)\
|
||||||
$(notdir $(LIBVPX_SO_SYMLINKS)) \
|
$(notdir $(LIBVPX_SO_SYMLINKS)) \
|
||||||
@@ -394,6 +370,12 @@ $(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm
|
|||||||
$(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)vpx_version.h)
|
$(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)vpx_version.h)
|
||||||
CLEAN-OBJS += $(BUILD_PFX)vpx_version.h
|
CLEAN-OBJS += $(BUILD_PFX)vpx_version.h
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add include path for libwebm sources.
|
||||||
|
#
|
||||||
|
ifeq ($(CONFIG_WEBM_IO),yes)
|
||||||
|
CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/libwebm
|
||||||
|
endif
|
||||||
|
|
||||||
##
|
##
|
||||||
## libvpx test directives
|
## libvpx test directives
|
||||||
@@ -429,12 +411,10 @@ testdata:: $(LIBVPX_TEST_DATA)
|
|||||||
if [ -n "$${sha1sum}" ]; then\
|
if [ -n "$${sha1sum}" ]; then\
|
||||||
set -e;\
|
set -e;\
|
||||||
echo "Checking test data:";\
|
echo "Checking test data:";\
|
||||||
if [ -n "$(LIBVPX_TEST_DATA)" ]; then\
|
|
||||||
for f in $(call enabled,LIBVPX_TEST_DATA); do\
|
for f in $(call enabled,LIBVPX_TEST_DATA); do\
|
||||||
grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\
|
grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\
|
||||||
(cd $(LIBVPX_TEST_DATA_PATH); $${sha1sum} -c);\
|
(cd $(LIBVPX_TEST_DATA_PATH); $${sha1sum} -c);\
|
||||||
done; \
|
done; \
|
||||||
fi; \
|
|
||||||
else\
|
else\
|
||||||
echo "Skipping test data integrity check, sha1sum not found.";\
|
echo "Skipping test data integrity check, sha1sum not found.";\
|
||||||
fi
|
fi
|
||||||
@@ -471,6 +451,7 @@ test_libvpx.$(VCPROJ_SFX): $(LIBVPX_TEST_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_
|
|||||||
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
|
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
|
||||||
--out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
|
--out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
|
||||||
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
|
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
|
||||||
|
$(if $(CONFIG_WEBM_IO),-I"$(SRC_PATH_BARE)/third_party/libwebm") \
|
||||||
-L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^
|
-L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^
|
||||||
|
|
||||||
PROJECTS-$(CONFIG_MSVS) += test_libvpx.$(VCPROJ_SFX)
|
PROJECTS-$(CONFIG_MSVS) += test_libvpx.$(VCPROJ_SFX)
|
||||||
|
|||||||
15
md5_utils.c
15
md5_utils.c
@@ -150,12 +150,23 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx) {
|
|||||||
#define MD5STEP(f,w,x,y,z,in,s) \
|
#define MD5STEP(f,w,x,y,z,in,s) \
|
||||||
(w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)
|
(w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)
|
||||||
|
|
||||||
|
#if defined(__clang__) && defined(__has_attribute)
|
||||||
|
#if __has_attribute(no_sanitize)
|
||||||
|
#define VPX_NO_UNSIGNED_OVERFLOW_CHECK \
|
||||||
|
__attribute__((no_sanitize("unsigned-integer-overflow")))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef VPX_NO_UNSIGNED_OVERFLOW_CHECK
|
||||||
|
#define VPX_NO_UNSIGNED_OVERFLOW_CHECK
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The core of the MD5 algorithm, this alters an existing MD5 hash to
|
* The core of the MD5 algorithm, this alters an existing MD5 hash to
|
||||||
* reflect the addition of 16 longwords of new data. MD5Update blocks
|
* reflect the addition of 16 longwords of new data. MD5Update blocks
|
||||||
* the data and converts bytes into longwords for this routine.
|
* the data and converts bytes into longwords for this routine.
|
||||||
*/
|
*/
|
||||||
void
|
VPX_NO_UNSIGNED_OVERFLOW_CHECK void
|
||||||
MD5Transform(UWORD32 buf[4], UWORD32 const in[16]) {
|
MD5Transform(UWORD32 buf[4], UWORD32 const in[16]) {
|
||||||
register UWORD32 a, b, c, d;
|
register UWORD32 a, b, c, d;
|
||||||
|
|
||||||
@@ -238,4 +249,6 @@ MD5Transform(UWORD32 buf[4], UWORD32 const in[16]) {
|
|||||||
buf[3] += d;
|
buf[3] += d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef VPX_NO_UNSIGNED_OVERFLOW_CHECK
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ class ACMRandom {
|
|||||||
return (value >> 15) & 0xffff;
|
return (value >> 15) & 0xffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int16_t Rand9Signed(void) {
|
||||||
|
// Use 9 bits: values between 255 (0x0FF) and -256 (0x100).
|
||||||
|
const uint32_t value = random_.Generate(512);
|
||||||
|
return static_cast<int16_t>(value) - 256;
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t Rand8(void) {
|
uint8_t Rand8(void) {
|
||||||
const uint32_t value =
|
const uint32_t value =
|
||||||
random_.Generate(testing::internal::Random::kMaxRange);
|
random_.Generate(testing::internal::Random::kMaxRange);
|
||||||
|
|||||||
127
test/active_map_refresh_test.cc
Normal file
127
test/active_map_refresh_test.cc
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2015 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
#include <algorithm>
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
#include "test/codec_factory.h"
|
||||||
|
#include "test/encode_test_driver.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
#include "test/y4m_video_source.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
// Check if any pixel in a 16x16 macroblock varies between frames.
|
||||||
|
int CheckMb(const vpx_image_t ¤t, const vpx_image_t &previous,
|
||||||
|
int mb_r, int mb_c) {
|
||||||
|
for (int plane = 0; plane < 3; plane++) {
|
||||||
|
int r = 16 * mb_r;
|
||||||
|
int c0 = 16 * mb_c;
|
||||||
|
int r_top = std::min(r + 16, static_cast<int>(current.d_h));
|
||||||
|
int c_top = std::min(c0 + 16, static_cast<int>(current.d_w));
|
||||||
|
r = std::max(r, 0);
|
||||||
|
c0 = std::max(c0, 0);
|
||||||
|
if (plane > 0 && current.x_chroma_shift) {
|
||||||
|
c_top = (c_top + 1) >> 1;
|
||||||
|
c0 >>= 1;
|
||||||
|
}
|
||||||
|
if (plane > 0 && current.y_chroma_shift) {
|
||||||
|
r_top = (r_top + 1) >> 1;
|
||||||
|
r >>= 1;
|
||||||
|
}
|
||||||
|
for (; r < r_top; ++r) {
|
||||||
|
for (int c = c0; c < c_top; ++c) {
|
||||||
|
if (current.planes[plane][current.stride[plane] * r + c] !=
|
||||||
|
previous.planes[plane][previous.stride[plane] * r + c])
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GenerateMap(int mb_rows, int mb_cols, const vpx_image_t ¤t,
|
||||||
|
const vpx_image_t &previous, uint8_t *map) {
|
||||||
|
for (int mb_r = 0; mb_r < mb_rows; ++mb_r) {
|
||||||
|
for (int mb_c = 0; mb_c < mb_cols; ++mb_c) {
|
||||||
|
map[mb_r * mb_cols + mb_c] = CheckMb(current, previous, mb_r, mb_c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const int kAqModeCyclicRefresh = 3;
|
||||||
|
|
||||||
|
class ActiveMapRefreshTest
|
||||||
|
: public ::libvpx_test::EncoderTest,
|
||||||
|
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||||
|
protected:
|
||||||
|
ActiveMapRefreshTest() : EncoderTest(GET_PARAM(0)) {}
|
||||||
|
virtual ~ActiveMapRefreshTest() {}
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
InitializeConfig();
|
||||||
|
SetMode(GET_PARAM(1));
|
||||||
|
cpu_used_ = GET_PARAM(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||||
|
::libvpx_test::Encoder *encoder) {
|
||||||
|
::libvpx_test::Y4mVideoSource *y4m_video =
|
||||||
|
static_cast<libvpx_test::Y4mVideoSource *>(video);
|
||||||
|
if (video->frame() == 1) {
|
||||||
|
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
|
||||||
|
encoder->Control(VP9E_SET_AQ_MODE, kAqModeCyclicRefresh);
|
||||||
|
} else if (video->frame() >= 2 && video->img()) {
|
||||||
|
vpx_image_t *current = video->img();
|
||||||
|
vpx_image_t *previous = y4m_holder_->img();
|
||||||
|
ASSERT_TRUE(previous != NULL);
|
||||||
|
vpx_active_map_t map = vpx_active_map_t();
|
||||||
|
const int width = static_cast<int>(current->d_w);
|
||||||
|
const int height = static_cast<int>(current->d_h);
|
||||||
|
const int mb_width = (width + 15) / 16;
|
||||||
|
const int mb_height = (height + 15) / 16;
|
||||||
|
uint8_t *active_map = new uint8_t[mb_width * mb_height];
|
||||||
|
GenerateMap(mb_height, mb_width, *current, *previous, active_map);
|
||||||
|
map.cols = mb_width;
|
||||||
|
map.rows = mb_height;
|
||||||
|
map.active_map = active_map;
|
||||||
|
encoder->Control(VP8E_SET_ACTIVEMAP, &map);
|
||||||
|
delete[] active_map;
|
||||||
|
}
|
||||||
|
if (video->img()) {
|
||||||
|
y4m_video->SwapBuffers(y4m_holder_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int cpu_used_;
|
||||||
|
::libvpx_test::Y4mVideoSource *y4m_holder_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(ActiveMapRefreshTest, Test) {
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
cfg_.g_profile = 1;
|
||||||
|
cfg_.rc_target_bitrate = 600;
|
||||||
|
cfg_.rc_resize_allowed = 0;
|
||||||
|
cfg_.rc_min_quantizer = 8;
|
||||||
|
cfg_.rc_max_quantizer = 30;
|
||||||
|
cfg_.g_pass = VPX_RC_ONE_PASS;
|
||||||
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
|
cfg_.kf_max_dist = 90000;
|
||||||
|
|
||||||
|
::libvpx_test::Y4mVideoSource video("desktop_credits.y4m", 0, 30);
|
||||||
|
::libvpx_test::Y4mVideoSource video_holder("desktop_credits.y4m", 0, 30);
|
||||||
|
video_holder.Begin();
|
||||||
|
y4m_holder_ = &video_holder;
|
||||||
|
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
}
|
||||||
|
|
||||||
|
VP9_INSTANTIATE_TEST_CASE(ActiveMapRefreshTest,
|
||||||
|
::testing::Values(::libvpx_test::kRealTime),
|
||||||
|
::testing::Range(5, 6));
|
||||||
|
} // namespace
|
||||||
@@ -85,5 +85,5 @@ TEST_P(ActiveMapTest, Test) {
|
|||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(ActiveMapTest,
|
VP9_INSTANTIATE_TEST_CASE(ActiveMapTest,
|
||||||
::testing::Values(::libvpx_test::kRealTime),
|
::testing::Values(::libvpx_test::kRealTime),
|
||||||
::testing::Range(0, 6));
|
::testing::Range(0, 9));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
197
test/add_noise_test.cc
Normal file
197
test/add_noise_test.cc
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
#include <math.h>
|
||||||
|
#include "test/clear_system_state.h"
|
||||||
|
#include "test/register_state_check.h"
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
|
#include "vpx/vpx_integer.h"
|
||||||
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
// TODO(jimbankoski): make width and height integers not unsigned.
|
||||||
|
typedef void (*AddNoiseFunc)(unsigned char *start, char *noise,
|
||||||
|
char blackclamp[16], char whiteclamp[16],
|
||||||
|
char bothclamp[16], unsigned int width,
|
||||||
|
unsigned int height, int pitch);
|
||||||
|
|
||||||
|
class AddNoiseTest
|
||||||
|
: public ::testing::TestWithParam<AddNoiseFunc> {
|
||||||
|
public:
|
||||||
|
virtual void TearDown() {
|
||||||
|
libvpx_test::ClearSystemState();
|
||||||
|
}
|
||||||
|
virtual ~AddNoiseTest() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
double stddev6(char a, char b, char c, char d, char e, char f) {
|
||||||
|
const double n = (a + b + c + d + e + f) / 6.0;
|
||||||
|
const double v = ((a - n) * (a - n) + (b - n) * (b - n) + (c - n) * (c - n) +
|
||||||
|
(d - n) * (d - n) + (e - n) * (e - n) + (f - n) * (f - n)) /
|
||||||
|
6.0;
|
||||||
|
return sqrt(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO(jimbankoski): The following 2 functions are duplicated in each codec.
|
||||||
|
// For now the vp9 one has been copied into the test as is. We should normalize
|
||||||
|
// these in vpx_dsp and not have 3 copies of these unless there is different
|
||||||
|
// noise we add for each codec.
|
||||||
|
|
||||||
|
double gaussian(double sigma, double mu, double x) {
|
||||||
|
return 1 / (sigma * sqrt(2.0 * 3.14159265)) *
|
||||||
|
(exp(-(x - mu) * (x - mu) / (2 * sigma * sigma)));
|
||||||
|
}
|
||||||
|
|
||||||
|
int setup_noise(int size_noise, char *noise) {
|
||||||
|
char char_dist[300];
|
||||||
|
const int ai = 4;
|
||||||
|
const int qi = 24;
|
||||||
|
const double sigma = ai + .5 + .6 * (63 - qi) / 63.0;
|
||||||
|
|
||||||
|
/* set up a lookup table of 256 entries that matches
|
||||||
|
* a gaussian distribution with sigma determined by q.
|
||||||
|
*/
|
||||||
|
int next = 0;
|
||||||
|
|
||||||
|
for (int i = -32; i < 32; i++) {
|
||||||
|
int a_i = (int) (0.5 + 256 * gaussian(sigma, 0, i));
|
||||||
|
|
||||||
|
if (a_i) {
|
||||||
|
for (int j = 0; j < a_i; j++) {
|
||||||
|
char_dist[next + j] = (char)(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
next = next + a_i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (; next < 256; next++)
|
||||||
|
char_dist[next] = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < size_noise; i++) {
|
||||||
|
noise[i] = char_dist[rand() & 0xff]; // NOLINT
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the most negative value in distribution.
|
||||||
|
return char_dist[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(AddNoiseTest, CheckNoiseAdded) {
|
||||||
|
DECLARE_ALIGNED(16, char, blackclamp[16]);
|
||||||
|
DECLARE_ALIGNED(16, char, whiteclamp[16]);
|
||||||
|
DECLARE_ALIGNED(16, char, bothclamp[16]);
|
||||||
|
const int width = 64;
|
||||||
|
const int height = 64;
|
||||||
|
const int image_size = width * height;
|
||||||
|
char noise[3072];
|
||||||
|
|
||||||
|
const int clamp = setup_noise(3072, noise);
|
||||||
|
for (int i = 0; i < 16; i++) {
|
||||||
|
blackclamp[i] = -clamp;
|
||||||
|
whiteclamp[i] = -clamp;
|
||||||
|
bothclamp[i] = -2 * clamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t *const s = reinterpret_cast<uint8_t *>(vpx_calloc(image_size, 1));
|
||||||
|
memset(s, 99, image_size);
|
||||||
|
|
||||||
|
ASM_REGISTER_STATE_CHECK(GetParam()(s, noise, blackclamp, whiteclamp,
|
||||||
|
bothclamp, width, height, width));
|
||||||
|
|
||||||
|
// Check to make sure we don't end up having either the same or no added
|
||||||
|
// noise either vertically or horizontally.
|
||||||
|
for (int i = 0; i < image_size - 6 * width - 6; ++i) {
|
||||||
|
const double hd = stddev6(s[i] - 99, s[i + 1] - 99, s[i + 2] - 99,
|
||||||
|
s[i + 3] - 99, s[i + 4] - 99, s[i + 5] - 99);
|
||||||
|
const double vd = stddev6(s[i] - 99, s[i + width] - 99,
|
||||||
|
s[i + 2 * width] - 99, s[i + 3 * width] - 99,
|
||||||
|
s[i + 4 * width] - 99, s[i + 5 * width] - 99);
|
||||||
|
|
||||||
|
EXPECT_NE(hd, 0);
|
||||||
|
EXPECT_NE(vd, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize pixels in the image to 255 and check for roll over.
|
||||||
|
memset(s, 255, image_size);
|
||||||
|
|
||||||
|
ASM_REGISTER_STATE_CHECK(GetParam()(s, noise, blackclamp, whiteclamp,
|
||||||
|
bothclamp, width, height, width));
|
||||||
|
|
||||||
|
// Check to make sure don't roll over.
|
||||||
|
for (int i = 0; i < image_size; ++i) {
|
||||||
|
EXPECT_GT((int)s[i], 10) << "i = " << i;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize pixels in the image to 0 and check for roll under.
|
||||||
|
memset(s, 0, image_size);
|
||||||
|
|
||||||
|
ASM_REGISTER_STATE_CHECK(GetParam()(s, noise, blackclamp, whiteclamp,
|
||||||
|
bothclamp, width, height, width));
|
||||||
|
|
||||||
|
// Check to make sure don't roll under.
|
||||||
|
for (int i = 0; i < image_size; ++i) {
|
||||||
|
EXPECT_LT((int)s[i], 245) << "i = " << i;
|
||||||
|
}
|
||||||
|
|
||||||
|
vpx_free(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(AddNoiseTest, CheckCvsAssembly) {
|
||||||
|
DECLARE_ALIGNED(16, char, blackclamp[16]);
|
||||||
|
DECLARE_ALIGNED(16, char, whiteclamp[16]);
|
||||||
|
DECLARE_ALIGNED(16, char, bothclamp[16]);
|
||||||
|
const int width = 64;
|
||||||
|
const int height = 64;
|
||||||
|
const int image_size = width * height;
|
||||||
|
char noise[3072];
|
||||||
|
|
||||||
|
const int clamp = setup_noise(3072, noise);
|
||||||
|
for (int i = 0; i < 16; i++) {
|
||||||
|
blackclamp[i] = -clamp;
|
||||||
|
whiteclamp[i] = -clamp;
|
||||||
|
bothclamp[i] = -2 * clamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t *const s = reinterpret_cast<uint8_t *>(vpx_calloc(image_size, 1));
|
||||||
|
uint8_t *const d = reinterpret_cast<uint8_t *>(vpx_calloc(image_size, 1));
|
||||||
|
|
||||||
|
memset(s, 99, image_size);
|
||||||
|
memset(d, 99, image_size);
|
||||||
|
|
||||||
|
srand(0);
|
||||||
|
ASM_REGISTER_STATE_CHECK(GetParam()(s, noise, blackclamp, whiteclamp,
|
||||||
|
bothclamp, width, height, width));
|
||||||
|
srand(0);
|
||||||
|
ASM_REGISTER_STATE_CHECK(vpx_plane_add_noise_c(d, noise, blackclamp,
|
||||||
|
whiteclamp, bothclamp,
|
||||||
|
width, height, width));
|
||||||
|
|
||||||
|
for (int i = 0; i < image_size; ++i) {
|
||||||
|
EXPECT_EQ((int)s[i], (int)d[i]) << "i = " << i;
|
||||||
|
}
|
||||||
|
|
||||||
|
vpx_free(d);
|
||||||
|
vpx_free(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(C, AddNoiseTest,
|
||||||
|
::testing::Values(vpx_plane_add_noise_c));
|
||||||
|
|
||||||
|
#if HAVE_SSE2
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, AddNoiseTest,
|
||||||
|
::testing::Values(vpx_plane_add_noise_sse2));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_MSA
|
||||||
|
INSTANTIATE_TEST_CASE_P(MSA, AddNoiseTest,
|
||||||
|
::testing::Values(vpx_plane_add_noise_msa));
|
||||||
|
#endif
|
||||||
|
} // namespace
|
||||||
@@ -14,6 +14,8 @@
|
|||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
#if CONFIG_VP8_ENCODER
|
||||||
|
|
||||||
// lookahead range: [kLookAheadMin, kLookAheadMax).
|
// lookahead range: [kLookAheadMin, kLookAheadMax).
|
||||||
const int kLookAheadMin = 5;
|
const int kLookAheadMin = 5;
|
||||||
const int kLookAheadMax = 26;
|
const int kLookAheadMax = 26;
|
||||||
@@ -63,7 +65,95 @@ TEST_P(AltRefTest, MonotonicTimestamps) {
|
|||||||
EXPECT_GE(altref_count(), 1);
|
EXPECT_GE(altref_count(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(AltRefTest,
|
VP8_INSTANTIATE_TEST_CASE(AltRefTest,
|
||||||
::testing::Range(kLookAheadMin, kLookAheadMax));
|
::testing::Range(kLookAheadMin, kLookAheadMax));
|
||||||
|
|
||||||
|
#endif // CONFIG_VP8_ENCODER
|
||||||
|
|
||||||
|
class AltRefForcedKeyTestLarge
|
||||||
|
: public ::libvpx_test::EncoderTest,
|
||||||
|
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||||
|
protected:
|
||||||
|
AltRefForcedKeyTestLarge()
|
||||||
|
: EncoderTest(GET_PARAM(0)),
|
||||||
|
encoding_mode_(GET_PARAM(1)),
|
||||||
|
cpu_used_(GET_PARAM(2)),
|
||||||
|
forced_kf_frame_num_(1),
|
||||||
|
frame_num_(0) {}
|
||||||
|
virtual ~AltRefForcedKeyTestLarge() {}
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
InitializeConfig();
|
||||||
|
SetMode(encoding_mode_);
|
||||||
|
cfg_.rc_end_usage = VPX_VBR;
|
||||||
|
cfg_.g_threads = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||||
|
::libvpx_test::Encoder *encoder) {
|
||||||
|
if (video->frame() == 0) {
|
||||||
|
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
|
||||||
|
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
||||||
|
// override test default for tile columns if necessary.
|
||||||
|
#if CONFIG_VP9_ENCODER
|
||||||
|
if (GET_PARAM(0) == &libvpx_test::kVP9) {
|
||||||
|
encoder->Control(VP9E_SET_TILE_COLUMNS, 6);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
frame_flags_ =
|
||||||
|
(video->frame() == forced_kf_frame_num_) ? VPX_EFLAG_FORCE_KF : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||||
|
if (frame_num_ == forced_kf_frame_num_) {
|
||||||
|
ASSERT_TRUE(!!(pkt->data.frame.flags & VPX_FRAME_IS_KEY))
|
||||||
|
<< "Frame #" << frame_num_ << " isn't a keyframe!";
|
||||||
|
}
|
||||||
|
++frame_num_;
|
||||||
|
}
|
||||||
|
|
||||||
|
::libvpx_test::TestMode encoding_mode_;
|
||||||
|
int cpu_used_;
|
||||||
|
unsigned int forced_kf_frame_num_;
|
||||||
|
unsigned int frame_num_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(AltRefForcedKeyTestLarge, Frame1IsKey) {
|
||||||
|
const vpx_rational timebase = { 1, 30 };
|
||||||
|
const int lag_values[] = { 3, 15, 25, -1 };
|
||||||
|
|
||||||
|
forced_kf_frame_num_ = 1;
|
||||||
|
for (int i = 0; lag_values[i] != -1; ++i) {
|
||||||
|
frame_num_ = 0;
|
||||||
|
cfg_.g_lag_in_frames = lag_values[i];
|
||||||
|
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
|
timebase.den, timebase.num, 0, 30);
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(AltRefForcedKeyTestLarge, ForcedFrameIsKey) {
|
||||||
|
const vpx_rational timebase = { 1, 30 };
|
||||||
|
const int lag_values[] = { 3, 15, 25, -1 };
|
||||||
|
|
||||||
|
for (int i = 0; lag_values[i] != -1; ++i) {
|
||||||
|
frame_num_ = 0;
|
||||||
|
forced_kf_frame_num_ = lag_values[i] - 1;
|
||||||
|
cfg_.g_lag_in_frames = lag_values[i];
|
||||||
|
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
|
timebase.den, timebase.num, 0, 30);
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VP8_INSTANTIATE_TEST_CASE(
|
||||||
|
AltRefForcedKeyTestLarge,
|
||||||
|
::testing::Values(::libvpx_test::kOnePassGood),
|
||||||
|
::testing::Range(0, 9));
|
||||||
|
|
||||||
|
VP9_INSTANTIATE_TEST_CASE(
|
||||||
|
AltRefForcedKeyTestLarge,
|
||||||
|
::testing::Values(::libvpx_test::kOnePassGood),
|
||||||
|
::testing::Range(0, 9));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -15,9 +15,7 @@
|
|||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#if CONFIG_VP9_ENCODER
|
#include "./vpx_dsp_rtcd.h"
|
||||||
#include "./vp9_rtcd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "test/acm_random.h"
|
#include "test/acm_random.h"
|
||||||
#include "test/clear_system_state.h"
|
#include "test/clear_system_state.h"
|
||||||
@@ -61,7 +59,7 @@ class AverageTestBase : public ::testing::Test {
|
|||||||
unsigned int average = 0;
|
unsigned int average = 0;
|
||||||
for (int h = 0; h < 8; ++h)
|
for (int h = 0; h < 8; ++h)
|
||||||
for (int w = 0; w < 8; ++w)
|
for (int w = 0; w < 8; ++w)
|
||||||
average += source[h * source_stride_ + w];
|
average += source[h * pitch + w];
|
||||||
return ((average + 32) >> 6);
|
return ((average + 32) >> 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,7 +67,7 @@ class AverageTestBase : public ::testing::Test {
|
|||||||
unsigned int average = 0;
|
unsigned int average = 0;
|
||||||
for (int h = 0; h < 4; ++h)
|
for (int h = 0; h < 4; ++h)
|
||||||
for (int w = 0; w < 4; ++w)
|
for (int w = 0; w < 4; ++w)
|
||||||
average += source[h * source_stride_ + w];
|
average += source[h * pitch + w];
|
||||||
return ((average + 8) >> 4);
|
return ((average + 8) >> 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,6 +192,48 @@ class IntProColTest
|
|||||||
int16_t sum_c_;
|
int16_t sum_c_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef int (*SatdFunc)(const int16_t *coeffs, int length);
|
||||||
|
typedef std::tr1::tuple<int, SatdFunc> SatdTestParam;
|
||||||
|
|
||||||
|
class SatdTest
|
||||||
|
: public ::testing::Test,
|
||||||
|
public ::testing::WithParamInterface<SatdTestParam> {
|
||||||
|
protected:
|
||||||
|
virtual void SetUp() {
|
||||||
|
satd_size_ = GET_PARAM(0);
|
||||||
|
satd_func_ = GET_PARAM(1);
|
||||||
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||||
|
src_ = reinterpret_cast<int16_t*>(
|
||||||
|
vpx_memalign(16, sizeof(*src_) * satd_size_));
|
||||||
|
ASSERT_TRUE(src_ != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() {
|
||||||
|
libvpx_test::ClearSystemState();
|
||||||
|
vpx_free(src_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillConstant(const int16_t val) {
|
||||||
|
for (int i = 0; i < satd_size_; ++i) src_[i] = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FillRandom() {
|
||||||
|
for (int i = 0; i < satd_size_; ++i) src_[i] = rnd_.Rand16();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Check(const int expected) {
|
||||||
|
int total;
|
||||||
|
ASM_REGISTER_STATE_CHECK(total = satd_func_(src_, satd_size_));
|
||||||
|
EXPECT_EQ(expected, total);
|
||||||
|
}
|
||||||
|
|
||||||
|
int satd_size_;
|
||||||
|
|
||||||
|
private:
|
||||||
|
int16_t *src_;
|
||||||
|
SatdFunc satd_func_;
|
||||||
|
ACMRandom rnd_;
|
||||||
|
};
|
||||||
|
|
||||||
uint8_t* AverageTestBase::source_data_ = NULL;
|
uint8_t* AverageTestBase::source_data_ = NULL;
|
||||||
|
|
||||||
@@ -246,69 +286,126 @@ TEST_P(IntProColTest, Random) {
|
|||||||
RunComparison();
|
RunComparison();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST_P(SatdTest, MinValue) {
|
||||||
|
const int kMin = -32640;
|
||||||
|
const int expected = -kMin * satd_size_;
|
||||||
|
FillConstant(kMin);
|
||||||
|
Check(expected);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(SatdTest, MaxValue) {
|
||||||
|
const int kMax = 32640;
|
||||||
|
const int expected = kMax * satd_size_;
|
||||||
|
FillConstant(kMax);
|
||||||
|
Check(expected);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(SatdTest, Random) {
|
||||||
|
int expected;
|
||||||
|
switch (satd_size_) {
|
||||||
|
case 16: expected = 205298; break;
|
||||||
|
case 64: expected = 1113950; break;
|
||||||
|
case 256: expected = 4268415; break;
|
||||||
|
case 1024: expected = 16954082; break;
|
||||||
|
default:
|
||||||
|
FAIL() << "Invalid satd size (" << satd_size_
|
||||||
|
<< ") valid: 16/64/256/1024";
|
||||||
|
}
|
||||||
|
FillRandom();
|
||||||
|
Check(expected);
|
||||||
|
}
|
||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, AverageTest,
|
C, AverageTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(16, 16, 1, 8, &vp9_avg_8x8_c),
|
make_tuple(16, 16, 1, 8, &vpx_avg_8x8_c),
|
||||||
make_tuple(16, 16, 1, 4, &vp9_avg_4x4_c)));
|
make_tuple(16, 16, 1, 4, &vpx_avg_4x4_c)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, SatdTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(16, &vpx_satd_c),
|
||||||
|
make_tuple(64, &vpx_satd_c),
|
||||||
|
make_tuple(256, &vpx_satd_c),
|
||||||
|
make_tuple(1024, &vpx_satd_c)));
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, AverageTest,
|
SSE2, AverageTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(16, 16, 0, 8, &vp9_avg_8x8_sse2),
|
make_tuple(16, 16, 0, 8, &vpx_avg_8x8_sse2),
|
||||||
make_tuple(16, 16, 5, 8, &vp9_avg_8x8_sse2),
|
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_sse2),
|
||||||
make_tuple(32, 32, 15, 8, &vp9_avg_8x8_sse2),
|
make_tuple(32, 32, 15, 8, &vpx_avg_8x8_sse2),
|
||||||
make_tuple(16, 16, 0, 4, &vp9_avg_4x4_sse2),
|
make_tuple(16, 16, 0, 4, &vpx_avg_4x4_sse2),
|
||||||
make_tuple(16, 16, 5, 4, &vp9_avg_4x4_sse2),
|
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_sse2),
|
||||||
make_tuple(32, 32, 15, 4, &vp9_avg_4x4_sse2)));
|
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_sse2)));
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, IntProRowTest, ::testing::Values(
|
SSE2, IntProRowTest, ::testing::Values(
|
||||||
make_tuple(16, &vp9_int_pro_row_sse2, &vp9_int_pro_row_c),
|
make_tuple(16, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c),
|
||||||
make_tuple(32, &vp9_int_pro_row_sse2, &vp9_int_pro_row_c),
|
make_tuple(32, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c),
|
||||||
make_tuple(64, &vp9_int_pro_row_sse2, &vp9_int_pro_row_c)));
|
make_tuple(64, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c)));
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, IntProColTest, ::testing::Values(
|
SSE2, IntProColTest, ::testing::Values(
|
||||||
make_tuple(16, &vp9_int_pro_col_sse2, &vp9_int_pro_col_c),
|
make_tuple(16, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c),
|
||||||
make_tuple(32, &vp9_int_pro_col_sse2, &vp9_int_pro_col_c),
|
make_tuple(32, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c),
|
||||||
make_tuple(64, &vp9_int_pro_col_sse2, &vp9_int_pro_col_c)));
|
make_tuple(64, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
SSE2, SatdTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(16, &vpx_satd_sse2),
|
||||||
|
make_tuple(64, &vpx_satd_sse2),
|
||||||
|
make_tuple(256, &vpx_satd_sse2),
|
||||||
|
make_tuple(1024, &vpx_satd_sse2)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, AverageTest,
|
NEON, AverageTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(16, 16, 0, 8, &vp9_avg_8x8_neon),
|
make_tuple(16, 16, 0, 8, &vpx_avg_8x8_neon),
|
||||||
make_tuple(16, 16, 5, 8, &vp9_avg_8x8_neon),
|
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_neon),
|
||||||
make_tuple(32, 32, 15, 8, &vp9_avg_8x8_neon)));
|
make_tuple(32, 32, 15, 8, &vpx_avg_8x8_neon),
|
||||||
|
make_tuple(16, 16, 0, 4, &vpx_avg_4x4_neon),
|
||||||
|
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_neon),
|
||||||
|
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_neon)));
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, IntProRowTest, ::testing::Values(
|
NEON, IntProRowTest, ::testing::Values(
|
||||||
make_tuple(16, &vp9_int_pro_row_neon, &vp9_int_pro_row_c),
|
make_tuple(16, &vpx_int_pro_row_neon, &vpx_int_pro_row_c),
|
||||||
make_tuple(32, &vp9_int_pro_row_neon, &vp9_int_pro_row_c),
|
make_tuple(32, &vpx_int_pro_row_neon, &vpx_int_pro_row_c),
|
||||||
make_tuple(64, &vp9_int_pro_row_neon, &vp9_int_pro_row_c)));
|
make_tuple(64, &vpx_int_pro_row_neon, &vpx_int_pro_row_c)));
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, IntProColTest, ::testing::Values(
|
NEON, IntProColTest, ::testing::Values(
|
||||||
make_tuple(16, &vp9_int_pro_col_neon, &vp9_int_pro_col_c),
|
make_tuple(16, &vpx_int_pro_col_neon, &vpx_int_pro_col_c),
|
||||||
make_tuple(32, &vp9_int_pro_col_neon, &vp9_int_pro_col_c),
|
make_tuple(32, &vpx_int_pro_col_neon, &vpx_int_pro_col_c),
|
||||||
make_tuple(64, &vp9_int_pro_col_neon, &vp9_int_pro_col_c)));
|
make_tuple(64, &vpx_int_pro_col_neon, &vpx_int_pro_col_c)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
NEON, SatdTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(16, &vpx_satd_neon),
|
||||||
|
make_tuple(64, &vpx_satd_neon),
|
||||||
|
make_tuple(256, &vpx_satd_neon),
|
||||||
|
make_tuple(1024, &vpx_satd_neon)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_MSA
|
#if HAVE_MSA
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, AverageTest,
|
MSA, AverageTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(16, 16, 0, 8, &vp9_avg_8x8_msa),
|
make_tuple(16, 16, 0, 8, &vpx_avg_8x8_msa),
|
||||||
make_tuple(16, 16, 5, 8, &vp9_avg_8x8_msa),
|
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_msa),
|
||||||
make_tuple(32, 32, 15, 8, &vp9_avg_8x8_msa),
|
make_tuple(32, 32, 15, 8, &vpx_avg_8x8_msa),
|
||||||
make_tuple(16, 16, 0, 4, &vp9_avg_4x4_msa),
|
make_tuple(16, 16, 0, 4, &vpx_avg_4x4_msa),
|
||||||
make_tuple(16, 16, 5, 4, &vp9_avg_4x4_msa),
|
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_msa),
|
||||||
make_tuple(32, 32, 15, 4, &vp9_avg_4x4_msa)));
|
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_msa)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
@@ -52,7 +52,7 @@ TEST_P(BordersTest, TestEncodeHighBitrate) {
|
|||||||
// extend into the border and test the border condition.
|
// extend into the border and test the border condition.
|
||||||
cfg_.g_lag_in_frames = 25;
|
cfg_.g_lag_in_frames = 25;
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 2000;
|
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
|
||||||
cfg_.rc_target_bitrate = 2000;
|
cfg_.rc_target_bitrate = 2000;
|
||||||
cfg_.rc_max_quantizer = 10;
|
cfg_.rc_max_quantizer = 10;
|
||||||
|
|
||||||
@@ -80,7 +80,4 @@ TEST_P(BordersTest, TestLowBitrate) {
|
|||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
|
VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
|
||||||
::libvpx_test::kTwoPassGood));
|
::libvpx_test::kTwoPassGood));
|
||||||
|
|
||||||
VP10_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values(
|
|
||||||
::libvpx_test::kTwoPassGood));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -21,14 +21,14 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
#if CONFIG_WEBM_IO
|
||||||
|
|
||||||
const int kLegacyByteAlignment = 0;
|
const int kLegacyByteAlignment = 0;
|
||||||
const int kLegacyYPlaneByteAlignment = 32;
|
const int kLegacyYPlaneByteAlignment = 32;
|
||||||
const int kNumPlanesToCheck = 3;
|
const int kNumPlanesToCheck = 3;
|
||||||
const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm";
|
const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm";
|
||||||
const char kVP9Md5File[] = "vp90-2-02-size-lf-1920x1080.webm.md5";
|
const char kVP9Md5File[] = "vp90-2-02-size-lf-1920x1080.webm.md5";
|
||||||
|
|
||||||
#if CONFIG_WEBM_IO
|
|
||||||
|
|
||||||
struct ByteAlignmentTestParam {
|
struct ByteAlignmentTestParam {
|
||||||
int byte_alignment;
|
int byte_alignment;
|
||||||
vpx_codec_err_t expected_value;
|
vpx_codec_err_t expected_value;
|
||||||
|
|||||||
@@ -13,10 +13,10 @@
|
|||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#include "vpx/vpx_decoder.h"
|
#include "vpx/vpx_decoder.h"
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
|
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER || CONFIG_VP10_DECODER
|
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
|
||||||
#include "vpx/vp8dx.h"
|
#include "vpx/vp8dx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -233,8 +233,6 @@ class VP9CodecFactory : public CodecFactory {
|
|||||||
int usage) const {
|
int usage) const {
|
||||||
#if CONFIG_VP9_ENCODER
|
#if CONFIG_VP9_ENCODER
|
||||||
return vpx_codec_enc_config_default(&vpx_codec_vp9_cx_algo, cfg, usage);
|
return vpx_codec_enc_config_default(&vpx_codec_vp9_cx_algo, cfg, usage);
|
||||||
#elif CONFIG_VP10_ENCODER
|
|
||||||
return vpx_codec_enc_config_default(&vpx_codec_vp10_cx_algo, cfg, usage);
|
|
||||||
#else
|
#else
|
||||||
return VPX_CODEC_INCAPABLE;
|
return VPX_CODEC_INCAPABLE;
|
||||||
#endif
|
#endif
|
||||||
@@ -253,96 +251,5 @@ const libvpx_test::VP9CodecFactory kVP9;
|
|||||||
#define VP9_INSTANTIATE_TEST_CASE(test, ...)
|
#define VP9_INSTANTIATE_TEST_CASE(test, ...)
|
||||||
#endif // CONFIG_VP9
|
#endif // CONFIG_VP9
|
||||||
|
|
||||||
/*
|
|
||||||
* VP10 Codec Definitions
|
|
||||||
*/
|
|
||||||
#if CONFIG_VP10
|
|
||||||
class VP10Decoder : public Decoder {
|
|
||||||
public:
|
|
||||||
VP10Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
|
|
||||||
: Decoder(cfg, deadline) {}
|
|
||||||
|
|
||||||
VP10Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
|
|
||||||
unsigned long deadline) // NOLINT
|
|
||||||
: Decoder(cfg, flag, deadline) {}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual vpx_codec_iface_t* CodecInterface() const {
|
|
||||||
#if CONFIG_VP10_DECODER
|
|
||||||
return &vpx_codec_vp10_dx_algo;
|
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class VP10Encoder : public Encoder {
|
|
||||||
public:
|
|
||||||
VP10Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
|
|
||||||
const unsigned long init_flags, TwopassStatsStore *stats)
|
|
||||||
: Encoder(cfg, deadline, init_flags, stats) {}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual vpx_codec_iface_t* CodecInterface() const {
|
|
||||||
#if CONFIG_VP10_ENCODER
|
|
||||||
return &vpx_codec_vp10_cx_algo;
|
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class VP10CodecFactory : public CodecFactory {
|
|
||||||
public:
|
|
||||||
VP10CodecFactory() : CodecFactory() {}
|
|
||||||
|
|
||||||
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
|
|
||||||
unsigned long deadline) const {
|
|
||||||
return CreateDecoder(cfg, 0, deadline);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg,
|
|
||||||
const vpx_codec_flags_t flags,
|
|
||||||
unsigned long deadline) const { // NOLINT
|
|
||||||
#if CONFIG_VP10_DECODER
|
|
||||||
return new VP10Decoder(cfg, flags, deadline);
|
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg,
|
|
||||||
unsigned long deadline,
|
|
||||||
const unsigned long init_flags,
|
|
||||||
TwopassStatsStore *stats) const {
|
|
||||||
#if CONFIG_VP10_ENCODER
|
|
||||||
return new VP10Encoder(cfg, deadline, init_flags, stats);
|
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
|
|
||||||
int usage) const {
|
|
||||||
#if CONFIG_VP10_ENCODER
|
|
||||||
return vpx_codec_enc_config_default(&vpx_codec_vp10_cx_algo, cfg, usage);
|
|
||||||
#else
|
|
||||||
return VPX_CODEC_INCAPABLE;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const libvpx_test::VP10CodecFactory kVP10;
|
|
||||||
|
|
||||||
#define VP10_INSTANTIATE_TEST_CASE(test, ...)\
|
|
||||||
INSTANTIATE_TEST_CASE_P(VP10, test, \
|
|
||||||
::testing::Combine( \
|
|
||||||
::testing::Values(static_cast<const libvpx_test::CodecFactory*>( \
|
|
||||||
&libvpx_test::kVP10)), \
|
|
||||||
__VA_ARGS__))
|
|
||||||
#else
|
|
||||||
#define VP10_INSTANTIATE_TEST_CASE(test, ...)
|
|
||||||
#endif // CONFIG_VP10
|
|
||||||
|
|
||||||
} // namespace libvpx_test
|
} // namespace libvpx_test
|
||||||
#endif // TEST_CODEC_FACTORY_H_
|
#endif // TEST_CODEC_FACTORY_H_
|
||||||
|
|||||||
@@ -69,6 +69,21 @@ struct ConvolveFunctions {
|
|||||||
|
|
||||||
typedef std::tr1::tuple<int, int, const ConvolveFunctions *> ConvolveParam;
|
typedef std::tr1::tuple<int, int, const ConvolveFunctions *> ConvolveParam;
|
||||||
|
|
||||||
|
#define ALL_SIZES(convolve_fn) \
|
||||||
|
make_tuple(4, 4, &convolve_fn), \
|
||||||
|
make_tuple(8, 4, &convolve_fn), \
|
||||||
|
make_tuple(4, 8, &convolve_fn), \
|
||||||
|
make_tuple(8, 8, &convolve_fn), \
|
||||||
|
make_tuple(16, 8, &convolve_fn), \
|
||||||
|
make_tuple(8, 16, &convolve_fn), \
|
||||||
|
make_tuple(16, 16, &convolve_fn), \
|
||||||
|
make_tuple(32, 16, &convolve_fn), \
|
||||||
|
make_tuple(16, 32, &convolve_fn), \
|
||||||
|
make_tuple(32, 32, &convolve_fn), \
|
||||||
|
make_tuple(64, 32, &convolve_fn), \
|
||||||
|
make_tuple(32, 64, &convolve_fn), \
|
||||||
|
make_tuple(64, 64, &convolve_fn)
|
||||||
|
|
||||||
// Reference 8-tap subpixel filter, slightly modified to fit into this test.
|
// Reference 8-tap subpixel filter, slightly modified to fit into this test.
|
||||||
#define VP9_FILTER_WEIGHT 128
|
#define VP9_FILTER_WEIGHT 128
|
||||||
#define VP9_FILTER_SHIFT 7
|
#define VP9_FILTER_SHIFT 7
|
||||||
@@ -103,7 +118,8 @@ void filter_block2d_8_c(const uint8_t *src_ptr,
|
|||||||
// and filter_max_width = 16
|
// and filter_max_width = 16
|
||||||
//
|
//
|
||||||
uint8_t intermediate_buffer[71 * kMaxDimension];
|
uint8_t intermediate_buffer[71 * kMaxDimension];
|
||||||
const int intermediate_next_stride = 1 - intermediate_height * output_width;
|
const int intermediate_next_stride =
|
||||||
|
1 - static_cast<int>(intermediate_height * output_width);
|
||||||
|
|
||||||
// Horizontal pass (src -> transposed intermediate).
|
// Horizontal pass (src -> transposed intermediate).
|
||||||
uint8_t *output_ptr = intermediate_buffer;
|
uint8_t *output_ptr = intermediate_buffer;
|
||||||
@@ -215,7 +231,8 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
|
|||||||
* and filter_max_width = 16
|
* and filter_max_width = 16
|
||||||
*/
|
*/
|
||||||
uint16_t intermediate_buffer[71 * kMaxDimension];
|
uint16_t intermediate_buffer[71 * kMaxDimension];
|
||||||
const int intermediate_next_stride = 1 - intermediate_height * output_width;
|
const int intermediate_next_stride =
|
||||||
|
1 - static_cast<int>(intermediate_height * output_width);
|
||||||
|
|
||||||
// Horizontal pass (src -> transposed intermediate).
|
// Horizontal pass (src -> transposed intermediate).
|
||||||
{
|
{
|
||||||
@@ -279,8 +296,7 @@ void highbd_block2d_average_c(uint16_t *src,
|
|||||||
uint16_t *output_ptr,
|
uint16_t *output_ptr,
|
||||||
unsigned int output_stride,
|
unsigned int output_stride,
|
||||||
unsigned int output_width,
|
unsigned int output_width,
|
||||||
unsigned int output_height,
|
unsigned int output_height) {
|
||||||
int bd) {
|
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
for (i = 0; i < output_height; ++i) {
|
for (i = 0; i < output_height; ++i) {
|
||||||
for (j = 0; j < output_width; ++j) {
|
for (j = 0; j < output_width; ++j) {
|
||||||
@@ -306,7 +322,7 @@ void highbd_filter_average_block2d_8_c(const uint16_t *src_ptr,
|
|||||||
highbd_filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, tmp, 64,
|
highbd_filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, tmp, 64,
|
||||||
output_width, output_height, bd);
|
output_width, output_height, bd);
|
||||||
highbd_block2d_average_c(tmp, 64, dst_ptr, dst_stride,
|
highbd_block2d_average_c(tmp, 64, dst_ptr, dst_stride,
|
||||||
output_width, output_height, bd);
|
output_width, output_height);
|
||||||
}
|
}
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
@@ -960,511 +976,72 @@ TEST_P(ConvolveTest, CheckScalingFiltering) {
|
|||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
#define WRAP(func, bd) \
|
||||||
|
void wrap_ ## func ## _ ## bd(const uint8_t *src, ptrdiff_t src_stride, \
|
||||||
|
uint8_t *dst, ptrdiff_t dst_stride, \
|
||||||
|
const int16_t *filter_x, \
|
||||||
|
int filter_x_stride, \
|
||||||
|
const int16_t *filter_y, \
|
||||||
|
int filter_y_stride, \
|
||||||
|
int w, int h) { \
|
||||||
|
vpx_highbd_ ## func(src, src_stride, dst, dst_stride, filter_x, \
|
||||||
|
filter_x_stride, filter_y, filter_y_stride, \
|
||||||
|
w, h, bd); \
|
||||||
|
}
|
||||||
#if HAVE_SSE2 && ARCH_X86_64
|
#if HAVE_SSE2 && ARCH_X86_64
|
||||||
void wrap_convolve8_horiz_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
|
#if CONFIG_USE_X86INC
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
WRAP(convolve_copy_sse2, 8)
|
||||||
const int16_t *filter_x,
|
WRAP(convolve_avg_sse2, 8)
|
||||||
int filter_x_stride,
|
WRAP(convolve_copy_sse2, 10)
|
||||||
const int16_t *filter_y,
|
WRAP(convolve_avg_sse2, 10)
|
||||||
int filter_y_stride,
|
WRAP(convolve_copy_sse2, 12)
|
||||||
int w, int h) {
|
WRAP(convolve_avg_sse2, 12)
|
||||||
vpx_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride, filter_x,
|
#endif // CONFIG_USE_X86INC
|
||||||
filter_x_stride, filter_y, filter_y_stride,
|
WRAP(convolve8_horiz_sse2, 8)
|
||||||
w, h, 8);
|
WRAP(convolve8_avg_horiz_sse2, 8)
|
||||||
}
|
WRAP(convolve8_vert_sse2, 8)
|
||||||
|
WRAP(convolve8_avg_vert_sse2, 8)
|
||||||
void wrap_convolve8_avg_horiz_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
|
WRAP(convolve8_sse2, 8)
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
WRAP(convolve8_avg_sse2, 8)
|
||||||
const int16_t *filter_x,
|
WRAP(convolve8_horiz_sse2, 10)
|
||||||
int filter_x_stride,
|
WRAP(convolve8_avg_horiz_sse2, 10)
|
||||||
const int16_t *filter_y,
|
WRAP(convolve8_vert_sse2, 10)
|
||||||
int filter_y_stride,
|
WRAP(convolve8_avg_vert_sse2, 10)
|
||||||
int w, int h) {
|
WRAP(convolve8_sse2, 10)
|
||||||
vpx_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride,
|
WRAP(convolve8_avg_sse2, 10)
|
||||||
filter_x, filter_x_stride,
|
WRAP(convolve8_horiz_sse2, 12)
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
WRAP(convolve8_avg_horiz_sse2, 12)
|
||||||
}
|
WRAP(convolve8_vert_sse2, 12)
|
||||||
|
WRAP(convolve8_avg_vert_sse2, 12)
|
||||||
void wrap_convolve8_vert_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
|
WRAP(convolve8_sse2, 12)
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
WRAP(convolve8_avg_sse2, 12)
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_vert_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_sse2_8(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_horiz_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_horiz_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_vert_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_vert_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_sse2_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_horiz_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_horiz_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_horiz_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_horiz_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_vert_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_vert_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_vert_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_vert_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_sse2_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
#endif // HAVE_SSE2 && ARCH_X86_64
|
#endif // HAVE_SSE2 && ARCH_X86_64
|
||||||
|
|
||||||
void wrap_convolve_copy_c_8(const uint8_t *src, ptrdiff_t src_stride,
|
WRAP(convolve_copy_c, 8)
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
WRAP(convolve_avg_c, 8)
|
||||||
const int16_t *filter_x,
|
WRAP(convolve8_horiz_c, 8)
|
||||||
int filter_x_stride,
|
WRAP(convolve8_avg_horiz_c, 8)
|
||||||
const int16_t *filter_y,
|
WRAP(convolve8_vert_c, 8)
|
||||||
int filter_y_stride,
|
WRAP(convolve8_avg_vert_c, 8)
|
||||||
int w, int h) {
|
WRAP(convolve8_c, 8)
|
||||||
vpx_highbd_convolve_copy_c(src, src_stride, dst, dst_stride,
|
WRAP(convolve8_avg_c, 8)
|
||||||
filter_x, filter_x_stride,
|
WRAP(convolve_copy_c, 10)
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
WRAP(convolve_avg_c, 10)
|
||||||
}
|
WRAP(convolve8_horiz_c, 10)
|
||||||
|
WRAP(convolve8_avg_horiz_c, 10)
|
||||||
void wrap_convolve_avg_c_8(const uint8_t *src, ptrdiff_t src_stride,
|
WRAP(convolve8_vert_c, 10)
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
WRAP(convolve8_avg_vert_c, 10)
|
||||||
const int16_t *filter_x,
|
WRAP(convolve8_c, 10)
|
||||||
int filter_x_stride,
|
WRAP(convolve8_avg_c, 10)
|
||||||
const int16_t *filter_y,
|
WRAP(convolve_copy_c, 12)
|
||||||
int filter_y_stride,
|
WRAP(convolve_avg_c, 12)
|
||||||
int w, int h) {
|
WRAP(convolve8_horiz_c, 12)
|
||||||
vpx_highbd_convolve_avg_c(src, src_stride, dst, dst_stride,
|
WRAP(convolve8_avg_horiz_c, 12)
|
||||||
filter_x, filter_x_stride,
|
WRAP(convolve8_vert_c, 12)
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
WRAP(convolve8_avg_vert_c, 12)
|
||||||
}
|
WRAP(convolve8_c, 12)
|
||||||
|
WRAP(convolve8_avg_c, 12)
|
||||||
void wrap_convolve8_horiz_c_8(const uint8_t *src, ptrdiff_t src_stride,
|
#undef WRAP
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_horiz_c_8(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_vert_c_8(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_vert_c_8(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_c_8(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_c_8(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve_copy_c_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve_copy_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve_avg_c_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve_avg_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_horiz_c_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_horiz_c_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_vert_c_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_vert_c_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_c_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_c_10(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve_copy_c_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve_copy_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve_avg_c_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve_avg_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_horiz_c_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_horiz_c_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_vert_c_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_vert_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_vert_c_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_vert_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_c_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrap_convolve8_avg_c_12(const uint8_t *src, ptrdiff_t src_stride,
|
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
|
||||||
const int16_t *filter_x,
|
|
||||||
int filter_x_stride,
|
|
||||||
const int16_t *filter_y,
|
|
||||||
int filter_y_stride,
|
|
||||||
int w, int h) {
|
|
||||||
vpx_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride,
|
|
||||||
filter_x, filter_x_stride,
|
|
||||||
filter_y, filter_y_stride, w, h, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
const ConvolveFunctions convolve8_c(
|
const ConvolveFunctions convolve8_c(
|
||||||
wrap_convolve_copy_c_8, wrap_convolve_avg_c_8,
|
wrap_convolve_copy_c_8, wrap_convolve_avg_c_8,
|
||||||
@@ -1474,20 +1051,6 @@ const ConvolveFunctions convolve8_c(
|
|||||||
wrap_convolve8_horiz_c_8, wrap_convolve8_avg_horiz_c_8,
|
wrap_convolve8_horiz_c_8, wrap_convolve8_avg_horiz_c_8,
|
||||||
wrap_convolve8_vert_c_8, wrap_convolve8_avg_vert_c_8,
|
wrap_convolve8_vert_c_8, wrap_convolve8_avg_vert_c_8,
|
||||||
wrap_convolve8_c_8, wrap_convolve8_avg_c_8, 8);
|
wrap_convolve8_c_8, wrap_convolve8_avg_c_8, 8);
|
||||||
INSTANTIATE_TEST_CASE_P(C_8, ConvolveTest, ::testing::Values(
|
|
||||||
make_tuple(4, 4, &convolve8_c),
|
|
||||||
make_tuple(8, 4, &convolve8_c),
|
|
||||||
make_tuple(4, 8, &convolve8_c),
|
|
||||||
make_tuple(8, 8, &convolve8_c),
|
|
||||||
make_tuple(16, 8, &convolve8_c),
|
|
||||||
make_tuple(8, 16, &convolve8_c),
|
|
||||||
make_tuple(16, 16, &convolve8_c),
|
|
||||||
make_tuple(32, 16, &convolve8_c),
|
|
||||||
make_tuple(16, 32, &convolve8_c),
|
|
||||||
make_tuple(32, 32, &convolve8_c),
|
|
||||||
make_tuple(64, 32, &convolve8_c),
|
|
||||||
make_tuple(32, 64, &convolve8_c),
|
|
||||||
make_tuple(64, 64, &convolve8_c)));
|
|
||||||
const ConvolveFunctions convolve10_c(
|
const ConvolveFunctions convolve10_c(
|
||||||
wrap_convolve_copy_c_10, wrap_convolve_avg_c_10,
|
wrap_convolve_copy_c_10, wrap_convolve_avg_c_10,
|
||||||
wrap_convolve8_horiz_c_10, wrap_convolve8_avg_horiz_c_10,
|
wrap_convolve8_horiz_c_10, wrap_convolve8_avg_horiz_c_10,
|
||||||
@@ -1496,20 +1059,6 @@ const ConvolveFunctions convolve10_c(
|
|||||||
wrap_convolve8_horiz_c_10, wrap_convolve8_avg_horiz_c_10,
|
wrap_convolve8_horiz_c_10, wrap_convolve8_avg_horiz_c_10,
|
||||||
wrap_convolve8_vert_c_10, wrap_convolve8_avg_vert_c_10,
|
wrap_convolve8_vert_c_10, wrap_convolve8_avg_vert_c_10,
|
||||||
wrap_convolve8_c_10, wrap_convolve8_avg_c_10, 10);
|
wrap_convolve8_c_10, wrap_convolve8_avg_c_10, 10);
|
||||||
INSTANTIATE_TEST_CASE_P(C_10, ConvolveTest, ::testing::Values(
|
|
||||||
make_tuple(4, 4, &convolve10_c),
|
|
||||||
make_tuple(8, 4, &convolve10_c),
|
|
||||||
make_tuple(4, 8, &convolve10_c),
|
|
||||||
make_tuple(8, 8, &convolve10_c),
|
|
||||||
make_tuple(16, 8, &convolve10_c),
|
|
||||||
make_tuple(8, 16, &convolve10_c),
|
|
||||||
make_tuple(16, 16, &convolve10_c),
|
|
||||||
make_tuple(32, 16, &convolve10_c),
|
|
||||||
make_tuple(16, 32, &convolve10_c),
|
|
||||||
make_tuple(32, 32, &convolve10_c),
|
|
||||||
make_tuple(64, 32, &convolve10_c),
|
|
||||||
make_tuple(32, 64, &convolve10_c),
|
|
||||||
make_tuple(64, 64, &convolve10_c)));
|
|
||||||
const ConvolveFunctions convolve12_c(
|
const ConvolveFunctions convolve12_c(
|
||||||
wrap_convolve_copy_c_12, wrap_convolve_avg_c_12,
|
wrap_convolve_copy_c_12, wrap_convolve_avg_c_12,
|
||||||
wrap_convolve8_horiz_c_12, wrap_convolve8_avg_horiz_c_12,
|
wrap_convolve8_horiz_c_12, wrap_convolve8_avg_horiz_c_12,
|
||||||
@@ -1518,23 +1067,13 @@ const ConvolveFunctions convolve12_c(
|
|||||||
wrap_convolve8_horiz_c_12, wrap_convolve8_avg_horiz_c_12,
|
wrap_convolve8_horiz_c_12, wrap_convolve8_avg_horiz_c_12,
|
||||||
wrap_convolve8_vert_c_12, wrap_convolve8_avg_vert_c_12,
|
wrap_convolve8_vert_c_12, wrap_convolve8_avg_vert_c_12,
|
||||||
wrap_convolve8_c_12, wrap_convolve8_avg_c_12, 12);
|
wrap_convolve8_c_12, wrap_convolve8_avg_c_12, 12);
|
||||||
INSTANTIATE_TEST_CASE_P(C_12, ConvolveTest, ::testing::Values(
|
const ConvolveParam kArrayConvolve_c[] = {
|
||||||
make_tuple(4, 4, &convolve12_c),
|
ALL_SIZES(convolve8_c),
|
||||||
make_tuple(8, 4, &convolve12_c),
|
ALL_SIZES(convolve10_c),
|
||||||
make_tuple(4, 8, &convolve12_c),
|
ALL_SIZES(convolve12_c)
|
||||||
make_tuple(8, 8, &convolve12_c),
|
};
|
||||||
make_tuple(16, 8, &convolve12_c),
|
|
||||||
make_tuple(8, 16, &convolve12_c),
|
|
||||||
make_tuple(16, 16, &convolve12_c),
|
|
||||||
make_tuple(32, 16, &convolve12_c),
|
|
||||||
make_tuple(16, 32, &convolve12_c),
|
|
||||||
make_tuple(32, 32, &convolve12_c),
|
|
||||||
make_tuple(64, 32, &convolve12_c),
|
|
||||||
make_tuple(32, 64, &convolve12_c),
|
|
||||||
make_tuple(64, 64, &convolve12_c)));
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
const ConvolveFunctions convolve8_c(
|
const ConvolveFunctions convolve8_c(
|
||||||
vpx_convolve_copy_c, vpx_convolve_avg_c,
|
vpx_convolve_copy_c, vpx_convolve_avg_c,
|
||||||
vpx_convolve8_horiz_c, vpx_convolve8_avg_horiz_c,
|
vpx_convolve8_horiz_c, vpx_convolve8_avg_horiz_c,
|
||||||
@@ -1543,27 +1082,19 @@ const ConvolveFunctions convolve8_c(
|
|||||||
vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
|
vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
|
||||||
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
||||||
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||||
|
const ConvolveParam kArrayConvolve_c[] = { ALL_SIZES(convolve8_c) };
|
||||||
INSTANTIATE_TEST_CASE_P(C, ConvolveTest, ::testing::Values(
|
|
||||||
make_tuple(4, 4, &convolve8_c),
|
|
||||||
make_tuple(8, 4, &convolve8_c),
|
|
||||||
make_tuple(4, 8, &convolve8_c),
|
|
||||||
make_tuple(8, 8, &convolve8_c),
|
|
||||||
make_tuple(16, 8, &convolve8_c),
|
|
||||||
make_tuple(8, 16, &convolve8_c),
|
|
||||||
make_tuple(16, 16, &convolve8_c),
|
|
||||||
make_tuple(32, 16, &convolve8_c),
|
|
||||||
make_tuple(16, 32, &convolve8_c),
|
|
||||||
make_tuple(32, 32, &convolve8_c),
|
|
||||||
make_tuple(64, 32, &convolve8_c),
|
|
||||||
make_tuple(32, 64, &convolve8_c),
|
|
||||||
make_tuple(64, 64, &convolve8_c)));
|
|
||||||
#endif
|
#endif
|
||||||
|
INSTANTIATE_TEST_CASE_P(C, ConvolveTest,
|
||||||
|
::testing::ValuesIn(kArrayConvolve_c));
|
||||||
|
|
||||||
#if HAVE_SSE2 && ARCH_X86_64
|
#if HAVE_SSE2 && ARCH_X86_64
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
const ConvolveFunctions convolve8_sse2(
|
const ConvolveFunctions convolve8_sse2(
|
||||||
|
#if CONFIG_USE_X86INC
|
||||||
|
wrap_convolve_copy_sse2_8, wrap_convolve_avg_sse2_8,
|
||||||
|
#else
|
||||||
wrap_convolve_copy_c_8, wrap_convolve_avg_c_8,
|
wrap_convolve_copy_c_8, wrap_convolve_avg_c_8,
|
||||||
|
#endif // CONFIG_USE_X86INC
|
||||||
wrap_convolve8_horiz_sse2_8, wrap_convolve8_avg_horiz_sse2_8,
|
wrap_convolve8_horiz_sse2_8, wrap_convolve8_avg_horiz_sse2_8,
|
||||||
wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8,
|
wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8,
|
||||||
wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8,
|
wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8,
|
||||||
@@ -1571,7 +1102,11 @@ const ConvolveFunctions convolve8_sse2(
|
|||||||
wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8,
|
wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8,
|
||||||
wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8, 8);
|
wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8, 8);
|
||||||
const ConvolveFunctions convolve10_sse2(
|
const ConvolveFunctions convolve10_sse2(
|
||||||
|
#if CONFIG_USE_X86INC
|
||||||
|
wrap_convolve_copy_sse2_10, wrap_convolve_avg_sse2_10,
|
||||||
|
#else
|
||||||
wrap_convolve_copy_c_10, wrap_convolve_avg_c_10,
|
wrap_convolve_copy_c_10, wrap_convolve_avg_c_10,
|
||||||
|
#endif // CONFIG_USE_X86INC
|
||||||
wrap_convolve8_horiz_sse2_10, wrap_convolve8_avg_horiz_sse2_10,
|
wrap_convolve8_horiz_sse2_10, wrap_convolve8_avg_horiz_sse2_10,
|
||||||
wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10,
|
wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10,
|
||||||
wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10,
|
wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10,
|
||||||
@@ -1579,53 +1114,22 @@ const ConvolveFunctions convolve10_sse2(
|
|||||||
wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10,
|
wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10,
|
||||||
wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10, 10);
|
wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10, 10);
|
||||||
const ConvolveFunctions convolve12_sse2(
|
const ConvolveFunctions convolve12_sse2(
|
||||||
|
#if CONFIG_USE_X86INC
|
||||||
|
wrap_convolve_copy_sse2_12, wrap_convolve_avg_sse2_12,
|
||||||
|
#else
|
||||||
wrap_convolve_copy_c_12, wrap_convolve_avg_c_12,
|
wrap_convolve_copy_c_12, wrap_convolve_avg_c_12,
|
||||||
|
#endif // CONFIG_USE_X86INC
|
||||||
wrap_convolve8_horiz_sse2_12, wrap_convolve8_avg_horiz_sse2_12,
|
wrap_convolve8_horiz_sse2_12, wrap_convolve8_avg_horiz_sse2_12,
|
||||||
wrap_convolve8_vert_sse2_12, wrap_convolve8_avg_vert_sse2_12,
|
wrap_convolve8_vert_sse2_12, wrap_convolve8_avg_vert_sse2_12,
|
||||||
wrap_convolve8_sse2_12, wrap_convolve8_avg_sse2_12,
|
wrap_convolve8_sse2_12, wrap_convolve8_avg_sse2_12,
|
||||||
wrap_convolve8_horiz_sse2_12, wrap_convolve8_avg_horiz_sse2_12,
|
wrap_convolve8_horiz_sse2_12, wrap_convolve8_avg_horiz_sse2_12,
|
||||||
wrap_convolve8_vert_sse2_12, wrap_convolve8_avg_vert_sse2_12,
|
wrap_convolve8_vert_sse2_12, wrap_convolve8_avg_vert_sse2_12,
|
||||||
wrap_convolve8_sse2_12, wrap_convolve8_avg_sse2_12, 12);
|
wrap_convolve8_sse2_12, wrap_convolve8_avg_sse2_12, 12);
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values(
|
const ConvolveParam kArrayConvolve_sse2[] = {
|
||||||
make_tuple(4, 4, &convolve8_sse2),
|
ALL_SIZES(convolve8_sse2),
|
||||||
make_tuple(8, 4, &convolve8_sse2),
|
ALL_SIZES(convolve10_sse2),
|
||||||
make_tuple(4, 8, &convolve8_sse2),
|
ALL_SIZES(convolve12_sse2)
|
||||||
make_tuple(8, 8, &convolve8_sse2),
|
};
|
||||||
make_tuple(16, 8, &convolve8_sse2),
|
|
||||||
make_tuple(8, 16, &convolve8_sse2),
|
|
||||||
make_tuple(16, 16, &convolve8_sse2),
|
|
||||||
make_tuple(32, 16, &convolve8_sse2),
|
|
||||||
make_tuple(16, 32, &convolve8_sse2),
|
|
||||||
make_tuple(32, 32, &convolve8_sse2),
|
|
||||||
make_tuple(64, 32, &convolve8_sse2),
|
|
||||||
make_tuple(32, 64, &convolve8_sse2),
|
|
||||||
make_tuple(64, 64, &convolve8_sse2),
|
|
||||||
make_tuple(4, 4, &convolve10_sse2),
|
|
||||||
make_tuple(8, 4, &convolve10_sse2),
|
|
||||||
make_tuple(4, 8, &convolve10_sse2),
|
|
||||||
make_tuple(8, 8, &convolve10_sse2),
|
|
||||||
make_tuple(16, 8, &convolve10_sse2),
|
|
||||||
make_tuple(8, 16, &convolve10_sse2),
|
|
||||||
make_tuple(16, 16, &convolve10_sse2),
|
|
||||||
make_tuple(32, 16, &convolve10_sse2),
|
|
||||||
make_tuple(16, 32, &convolve10_sse2),
|
|
||||||
make_tuple(32, 32, &convolve10_sse2),
|
|
||||||
make_tuple(64, 32, &convolve10_sse2),
|
|
||||||
make_tuple(32, 64, &convolve10_sse2),
|
|
||||||
make_tuple(64, 64, &convolve10_sse2),
|
|
||||||
make_tuple(4, 4, &convolve12_sse2),
|
|
||||||
make_tuple(8, 4, &convolve12_sse2),
|
|
||||||
make_tuple(4, 8, &convolve12_sse2),
|
|
||||||
make_tuple(8, 8, &convolve12_sse2),
|
|
||||||
make_tuple(16, 8, &convolve12_sse2),
|
|
||||||
make_tuple(8, 16, &convolve12_sse2),
|
|
||||||
make_tuple(16, 16, &convolve12_sse2),
|
|
||||||
make_tuple(32, 16, &convolve12_sse2),
|
|
||||||
make_tuple(16, 32, &convolve12_sse2),
|
|
||||||
make_tuple(32, 32, &convolve12_sse2),
|
|
||||||
make_tuple(64, 32, &convolve12_sse2),
|
|
||||||
make_tuple(32, 64, &convolve12_sse2),
|
|
||||||
make_tuple(64, 64, &convolve12_sse2)));
|
|
||||||
#else
|
#else
|
||||||
const ConvolveFunctions convolve8_sse2(
|
const ConvolveFunctions convolve8_sse2(
|
||||||
#if CONFIG_USE_X86INC
|
#if CONFIG_USE_X86INC
|
||||||
@@ -1640,21 +1144,10 @@ const ConvolveFunctions convolve8_sse2(
|
|||||||
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
||||||
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values(
|
const ConvolveParam kArrayConvolve_sse2[] = { ALL_SIZES(convolve8_sse2) };
|
||||||
make_tuple(4, 4, &convolve8_sse2),
|
|
||||||
make_tuple(8, 4, &convolve8_sse2),
|
|
||||||
make_tuple(4, 8, &convolve8_sse2),
|
|
||||||
make_tuple(8, 8, &convolve8_sse2),
|
|
||||||
make_tuple(16, 8, &convolve8_sse2),
|
|
||||||
make_tuple(8, 16, &convolve8_sse2),
|
|
||||||
make_tuple(16, 16, &convolve8_sse2),
|
|
||||||
make_tuple(32, 16, &convolve8_sse2),
|
|
||||||
make_tuple(16, 32, &convolve8_sse2),
|
|
||||||
make_tuple(32, 32, &convolve8_sse2),
|
|
||||||
make_tuple(64, 32, &convolve8_sse2),
|
|
||||||
make_tuple(32, 64, &convolve8_sse2),
|
|
||||||
make_tuple(64, 64, &convolve8_sse2)));
|
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest,
|
||||||
|
::testing::ValuesIn(kArrayConvolve_sse2));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
@@ -1665,22 +1158,11 @@ const ConvolveFunctions convolve8_ssse3(
|
|||||||
vpx_convolve8_ssse3, vpx_convolve8_avg_ssse3,
|
vpx_convolve8_ssse3, vpx_convolve8_avg_ssse3,
|
||||||
vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
|
vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c,
|
||||||
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
||||||
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
vpx_scaled_2d_ssse3, vpx_scaled_avg_2d_c, 0);
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest, ::testing::Values(
|
const ConvolveParam kArrayConvolve8_ssse3[] = { ALL_SIZES(convolve8_ssse3) };
|
||||||
make_tuple(4, 4, &convolve8_ssse3),
|
INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest,
|
||||||
make_tuple(8, 4, &convolve8_ssse3),
|
::testing::ValuesIn(kArrayConvolve8_ssse3));
|
||||||
make_tuple(4, 8, &convolve8_ssse3),
|
|
||||||
make_tuple(8, 8, &convolve8_ssse3),
|
|
||||||
make_tuple(16, 8, &convolve8_ssse3),
|
|
||||||
make_tuple(8, 16, &convolve8_ssse3),
|
|
||||||
make_tuple(16, 16, &convolve8_ssse3),
|
|
||||||
make_tuple(32, 16, &convolve8_ssse3),
|
|
||||||
make_tuple(16, 32, &convolve8_ssse3),
|
|
||||||
make_tuple(32, 32, &convolve8_ssse3),
|
|
||||||
make_tuple(64, 32, &convolve8_ssse3),
|
|
||||||
make_tuple(32, 64, &convolve8_ssse3),
|
|
||||||
make_tuple(64, 64, &convolve8_ssse3)));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_AVX2 && HAVE_SSSE3
|
#if HAVE_AVX2 && HAVE_SSSE3
|
||||||
@@ -1693,20 +1175,9 @@ const ConvolveFunctions convolve8_avx2(
|
|||||||
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
||||||
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest, ::testing::Values(
|
const ConvolveParam kArrayConvolve8_avx2[] = { ALL_SIZES(convolve8_avx2) };
|
||||||
make_tuple(4, 4, &convolve8_avx2),
|
INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest,
|
||||||
make_tuple(8, 4, &convolve8_avx2),
|
::testing::ValuesIn(kArrayConvolve8_avx2));
|
||||||
make_tuple(4, 8, &convolve8_avx2),
|
|
||||||
make_tuple(8, 8, &convolve8_avx2),
|
|
||||||
make_tuple(8, 16, &convolve8_avx2),
|
|
||||||
make_tuple(16, 8, &convolve8_avx2),
|
|
||||||
make_tuple(16, 16, &convolve8_avx2),
|
|
||||||
make_tuple(32, 16, &convolve8_avx2),
|
|
||||||
make_tuple(16, 32, &convolve8_avx2),
|
|
||||||
make_tuple(32, 32, &convolve8_avx2),
|
|
||||||
make_tuple(64, 32, &convolve8_avx2),
|
|
||||||
make_tuple(32, 64, &convolve8_avx2),
|
|
||||||
make_tuple(64, 64, &convolve8_avx2)));
|
|
||||||
#endif // HAVE_AVX2 && HAVE_SSSE3
|
#endif // HAVE_AVX2 && HAVE_SSSE3
|
||||||
|
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
@@ -1730,20 +1201,9 @@ const ConvolveFunctions convolve8_neon(
|
|||||||
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||||
#endif // HAVE_NEON_ASM
|
#endif // HAVE_NEON_ASM
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest, ::testing::Values(
|
const ConvolveParam kArrayConvolve8_neon[] = { ALL_SIZES(convolve8_neon) };
|
||||||
make_tuple(4, 4, &convolve8_neon),
|
INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest,
|
||||||
make_tuple(8, 4, &convolve8_neon),
|
::testing::ValuesIn(kArrayConvolve8_neon));
|
||||||
make_tuple(4, 8, &convolve8_neon),
|
|
||||||
make_tuple(8, 8, &convolve8_neon),
|
|
||||||
make_tuple(16, 8, &convolve8_neon),
|
|
||||||
make_tuple(8, 16, &convolve8_neon),
|
|
||||||
make_tuple(16, 16, &convolve8_neon),
|
|
||||||
make_tuple(32, 16, &convolve8_neon),
|
|
||||||
make_tuple(16, 32, &convolve8_neon),
|
|
||||||
make_tuple(32, 32, &convolve8_neon),
|
|
||||||
make_tuple(64, 32, &convolve8_neon),
|
|
||||||
make_tuple(32, 64, &convolve8_neon),
|
|
||||||
make_tuple(64, 64, &convolve8_neon)));
|
|
||||||
#endif // HAVE_NEON
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
@@ -1756,21 +1216,10 @@ const ConvolveFunctions convolve8_dspr2(
|
|||||||
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
||||||
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest, ::testing::Values(
|
const ConvolveParam kArrayConvolve8_dspr2[] = { ALL_SIZES(convolve8_dspr2) };
|
||||||
make_tuple(4, 4, &convolve8_dspr2),
|
INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest,
|
||||||
make_tuple(8, 4, &convolve8_dspr2),
|
::testing::ValuesIn(kArrayConvolve8_dspr2));
|
||||||
make_tuple(4, 8, &convolve8_dspr2),
|
#endif // HAVE_DSPR2
|
||||||
make_tuple(8, 8, &convolve8_dspr2),
|
|
||||||
make_tuple(16, 8, &convolve8_dspr2),
|
|
||||||
make_tuple(8, 16, &convolve8_dspr2),
|
|
||||||
make_tuple(16, 16, &convolve8_dspr2),
|
|
||||||
make_tuple(32, 16, &convolve8_dspr2),
|
|
||||||
make_tuple(16, 32, &convolve8_dspr2),
|
|
||||||
make_tuple(32, 32, &convolve8_dspr2),
|
|
||||||
make_tuple(64, 32, &convolve8_dspr2),
|
|
||||||
make_tuple(32, 64, &convolve8_dspr2),
|
|
||||||
make_tuple(64, 64, &convolve8_dspr2)));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_MSA
|
#if HAVE_MSA
|
||||||
const ConvolveFunctions convolve8_msa(
|
const ConvolveFunctions convolve8_msa(
|
||||||
@@ -1782,19 +1231,8 @@ const ConvolveFunctions convolve8_msa(
|
|||||||
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
vpx_scaled_vert_c, vpx_scaled_avg_vert_c,
|
||||||
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(MSA, ConvolveTest, ::testing::Values(
|
const ConvolveParam kArrayConvolve8_msa[] = { ALL_SIZES(convolve8_msa) };
|
||||||
make_tuple(4, 4, &convolve8_msa),
|
INSTANTIATE_TEST_CASE_P(MSA, ConvolveTest,
|
||||||
make_tuple(8, 4, &convolve8_msa),
|
::testing::ValuesIn(kArrayConvolve8_msa));
|
||||||
make_tuple(4, 8, &convolve8_msa),
|
|
||||||
make_tuple(8, 8, &convolve8_msa),
|
|
||||||
make_tuple(16, 8, &convolve8_msa),
|
|
||||||
make_tuple(8, 16, &convolve8_msa),
|
|
||||||
make_tuple(16, 16, &convolve8_msa),
|
|
||||||
make_tuple(32, 16, &convolve8_msa),
|
|
||||||
make_tuple(16, 32, &convolve8_msa),
|
|
||||||
make_tuple(32, 32, &convolve8_msa),
|
|
||||||
make_tuple(64, 32, &convolve8_msa),
|
|
||||||
make_tuple(32, 64, &convolve8_msa),
|
|
||||||
make_tuple(64, 64, &convolve8_msa)));
|
|
||||||
#endif // HAVE_MSA
|
#endif // HAVE_MSA
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ class CpuSpeedTest
|
|||||||
: EncoderTest(GET_PARAM(0)),
|
: EncoderTest(GET_PARAM(0)),
|
||||||
encoding_mode_(GET_PARAM(1)),
|
encoding_mode_(GET_PARAM(1)),
|
||||||
set_cpu_used_(GET_PARAM(2)),
|
set_cpu_used_(GET_PARAM(2)),
|
||||||
min_psnr_(kMaxPSNR) {}
|
min_psnr_(kMaxPSNR),
|
||||||
|
tune_content_(VP9E_CONTENT_DEFAULT) {}
|
||||||
virtual ~CpuSpeedTest() {}
|
virtual ~CpuSpeedTest() {}
|
||||||
|
|
||||||
virtual void SetUp() {
|
virtual void SetUp() {
|
||||||
@@ -49,6 +50,7 @@ class CpuSpeedTest
|
|||||||
::libvpx_test::Encoder *encoder) {
|
::libvpx_test::Encoder *encoder) {
|
||||||
if (video->frame() == 1) {
|
if (video->frame() == 1) {
|
||||||
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
|
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
|
||||||
|
encoder->Control(VP9E_SET_TUNE_CONTENT, tune_content_);
|
||||||
if (encoding_mode_ != ::libvpx_test::kRealTime) {
|
if (encoding_mode_ != ::libvpx_test::kRealTime) {
|
||||||
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
||||||
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
|
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
|
||||||
@@ -66,6 +68,7 @@ class CpuSpeedTest
|
|||||||
::libvpx_test::TestMode encoding_mode_;
|
::libvpx_test::TestMode encoding_mode_;
|
||||||
int set_cpu_used_;
|
int set_cpu_used_;
|
||||||
double min_psnr_;
|
double min_psnr_;
|
||||||
|
int tune_content_;
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_P(CpuSpeedTest, TestQ0) {
|
TEST_P(CpuSpeedTest, TestQ0) {
|
||||||
@@ -74,7 +77,7 @@ TEST_P(CpuSpeedTest, TestQ0) {
|
|||||||
// the encoder to producing lots of big partitions which will likely
|
// the encoder to producing lots of big partitions which will likely
|
||||||
// extend into the border and test the border condition.
|
// extend into the border and test the border condition.
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 2000;
|
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
|
||||||
cfg_.rc_target_bitrate = 400;
|
cfg_.rc_target_bitrate = 400;
|
||||||
cfg_.rc_max_quantizer = 0;
|
cfg_.rc_max_quantizer = 0;
|
||||||
cfg_.rc_min_quantizer = 0;
|
cfg_.rc_min_quantizer = 0;
|
||||||
@@ -92,7 +95,7 @@ TEST_P(CpuSpeedTest, TestScreencastQ0) {
|
|||||||
::libvpx_test::Y4mVideoSource video("screendata.y4m", 0, 25);
|
::libvpx_test::Y4mVideoSource video("screendata.y4m", 0, 25);
|
||||||
cfg_.g_timebase = video.timebase();
|
cfg_.g_timebase = video.timebase();
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 2000;
|
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
|
||||||
cfg_.rc_target_bitrate = 400;
|
cfg_.rc_target_bitrate = 400;
|
||||||
cfg_.rc_max_quantizer = 0;
|
cfg_.rc_max_quantizer = 0;
|
||||||
cfg_.rc_min_quantizer = 0;
|
cfg_.rc_min_quantizer = 0;
|
||||||
@@ -103,13 +106,28 @@ TEST_P(CpuSpeedTest, TestScreencastQ0) {
|
|||||||
EXPECT_GE(min_psnr_, kMaxPSNR);
|
EXPECT_GE(min_psnr_, kMaxPSNR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_P(CpuSpeedTest, TestTuneScreen) {
|
||||||
|
::libvpx_test::Y4mVideoSource video("screendata.y4m", 0, 25);
|
||||||
|
cfg_.g_timebase = video.timebase();
|
||||||
|
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
||||||
|
cfg_.rc_2pass_vbr_minsection_pct = 2000;
|
||||||
|
cfg_.rc_target_bitrate = 2000;
|
||||||
|
cfg_.rc_max_quantizer = 63;
|
||||||
|
cfg_.rc_min_quantizer = 0;
|
||||||
|
tune_content_ = VP9E_CONTENT_SCREEN;
|
||||||
|
|
||||||
|
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||||
|
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
}
|
||||||
|
|
||||||
TEST_P(CpuSpeedTest, TestEncodeHighBitrate) {
|
TEST_P(CpuSpeedTest, TestEncodeHighBitrate) {
|
||||||
// Validate that this non multiple of 64 wide clip encodes and decodes
|
// Validate that this non multiple of 64 wide clip encodes and decodes
|
||||||
// without a mismatch when passing in a very low max q. This pushes
|
// without a mismatch when passing in a very low max q. This pushes
|
||||||
// the encoder to producing lots of big partitions which will likely
|
// the encoder to producing lots of big partitions which will likely
|
||||||
// extend into the border and test the border condition.
|
// extend into the border and test the border condition.
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 2000;
|
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
|
||||||
cfg_.rc_target_bitrate = 12000;
|
cfg_.rc_target_bitrate = 12000;
|
||||||
cfg_.rc_max_quantizer = 10;
|
cfg_.rc_max_quantizer = 10;
|
||||||
cfg_.rc_min_quantizer = 0;
|
cfg_.rc_min_quantizer = 0;
|
||||||
@@ -125,7 +143,7 @@ TEST_P(CpuSpeedTest, TestLowBitrate) {
|
|||||||
// when passing in a very high min q. This pushes the encoder to producing
|
// when passing in a very high min q. This pushes the encoder to producing
|
||||||
// lots of small partitions which might will test the other condition.
|
// lots of small partitions which might will test the other condition.
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 2000;
|
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
|
||||||
cfg_.rc_target_bitrate = 200;
|
cfg_.rc_target_bitrate = 200;
|
||||||
cfg_.rc_min_quantizer = 40;
|
cfg_.rc_min_quantizer = 40;
|
||||||
|
|
||||||
@@ -140,9 +158,4 @@ VP9_INSTANTIATE_TEST_CASE(
|
|||||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
||||||
::libvpx_test::kRealTime),
|
::libvpx_test::kRealTime),
|
||||||
::testing::Range(0, 9));
|
::testing::Range(0, 9));
|
||||||
|
|
||||||
VP10_INSTANTIATE_TEST_CASE(
|
|
||||||
CpuSpeedTest,
|
|
||||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
|
|
||||||
::testing::Range(0, 3));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class DatarateTestLarge : public ::libvpx_test::EncoderTest,
|
|||||||
<< pkt->data.frame.pts;
|
<< pkt->data.frame.pts;
|
||||||
}
|
}
|
||||||
|
|
||||||
const size_t frame_size_in_bits = pkt->data.frame.sz * 8;
|
const int64_t frame_size_in_bits = pkt->data.frame.sz * 8;
|
||||||
|
|
||||||
// Subtract from the buffer the bits associated with a played back frame.
|
// Subtract from the buffer the bits associated with a played back frame.
|
||||||
bits_in_buffer_model_ -= frame_size_in_bits;
|
bits_in_buffer_model_ -= frame_size_in_bits;
|
||||||
@@ -135,7 +135,7 @@ class DatarateTestLarge : public ::libvpx_test::EncoderTest,
|
|||||||
double duration_;
|
double duration_;
|
||||||
double file_datarate_;
|
double file_datarate_;
|
||||||
double effective_datarate_;
|
double effective_datarate_;
|
||||||
size_t bits_in_last_frame_;
|
int64_t bits_in_last_frame_;
|
||||||
int denoiser_on_;
|
int denoiser_on_;
|
||||||
int denoiser_offon_test_;
|
int denoiser_offon_test_;
|
||||||
int denoiser_offon_period_;
|
int denoiser_offon_period_;
|
||||||
@@ -450,7 +450,28 @@ class DatarateTestVP9Large : public ::libvpx_test::EncoderTest,
|
|||||||
int denoiser_offon_period_;
|
int denoiser_offon_period_;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check basic rate targeting,
|
// Check basic rate targeting for VBR mode.
|
||||||
|
TEST_P(DatarateTestVP9Large, BasicRateTargetingVBR) {
|
||||||
|
cfg_.rc_min_quantizer = 0;
|
||||||
|
cfg_.rc_max_quantizer = 63;
|
||||||
|
cfg_.g_error_resilient = 0;
|
||||||
|
cfg_.rc_end_usage = VPX_VBR;
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
|
||||||
|
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
|
30, 1, 0, 300);
|
||||||
|
for (int i = 400; i <= 800; i += 400) {
|
||||||
|
cfg_.rc_target_bitrate = i;
|
||||||
|
ResetModel();
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.75)
|
||||||
|
<< " The datarate for the file is lower than target by too much!";
|
||||||
|
ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.25)
|
||||||
|
<< " The datarate for the file is greater than target by too much!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check basic rate targeting for CBR,
|
||||||
TEST_P(DatarateTestVP9Large, BasicRateTargeting) {
|
TEST_P(DatarateTestVP9Large, BasicRateTargeting) {
|
||||||
cfg_.rc_buf_initial_sz = 500;
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
cfg_.rc_buf_optimal_sz = 500;
|
cfg_.rc_buf_optimal_sz = 500;
|
||||||
@@ -474,7 +495,7 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check basic rate targeting,
|
// Check basic rate targeting for CBR.
|
||||||
TEST_P(DatarateTestVP9Large, BasicRateTargeting444) {
|
TEST_P(DatarateTestVP9Large, BasicRateTargeting444) {
|
||||||
::libvpx_test::Y4mVideoSource video("rush_hour_444.y4m", 0, 140);
|
::libvpx_test::Y4mVideoSource video("rush_hour_444.y4m", 0, 140);
|
||||||
|
|
||||||
@@ -519,6 +540,9 @@ TEST_P(DatarateTestVP9Large, ChangingDropFrameThresh) {
|
|||||||
cfg_.rc_end_usage = VPX_CBR;
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
cfg_.rc_target_bitrate = 200;
|
cfg_.rc_target_bitrate = 200;
|
||||||
cfg_.g_lag_in_frames = 0;
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
// TODO(marpan): Investigate datarate target failures with a smaller keyframe
|
||||||
|
// interval (128).
|
||||||
|
cfg_.kf_max_dist = 9999;
|
||||||
|
|
||||||
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
30, 1, 0, 140);
|
30, 1, 0, 140);
|
||||||
@@ -538,7 +562,7 @@ TEST_P(DatarateTestVP9Large, ChangingDropFrameThresh) {
|
|||||||
<< " The first dropped frame for drop_thresh " << i
|
<< " The first dropped frame for drop_thresh " << i
|
||||||
<< " > first dropped frame for drop_thresh "
|
<< " > first dropped frame for drop_thresh "
|
||||||
<< i - kDropFrameThreshTestStep;
|
<< i - kDropFrameThreshTestStep;
|
||||||
ASSERT_GE(num_drops_, last_num_drops * 0.90)
|
ASSERT_GE(num_drops_, last_num_drops * 0.85)
|
||||||
<< " The number of dropped frames for drop_thresh " << i
|
<< " The number of dropped frames for drop_thresh " << i
|
||||||
<< " < number of dropped frames for drop_thresh "
|
<< " < number of dropped frames for drop_thresh "
|
||||||
<< i - kDropFrameThreshTestStep;
|
<< i - kDropFrameThreshTestStep;
|
||||||
@@ -770,14 +794,10 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
|||||||
::libvpx_test::Encoder *encoder) {
|
::libvpx_test::Encoder *encoder) {
|
||||||
if (video->frame() == 0) {
|
if (video->frame() == 0) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 2; ++i) {
|
for (i = 0; i < VPX_MAX_LAYERS; ++i) {
|
||||||
svc_params_.max_quantizers[i] = 63;
|
svc_params_.max_quantizers[i] = 63;
|
||||||
svc_params_.min_quantizers[i] = 0;
|
svc_params_.min_quantizers[i] = 0;
|
||||||
}
|
}
|
||||||
svc_params_.scaling_factor_num[0] = 144;
|
|
||||||
svc_params_.scaling_factor_den[0] = 288;
|
|
||||||
svc_params_.scaling_factor_num[1] = 288;
|
|
||||||
svc_params_.scaling_factor_den[1] = 288;
|
|
||||||
encoder->Control(VP9E_SET_SVC, 1);
|
encoder->Control(VP9E_SET_SVC, 1);
|
||||||
encoder->Control(VP9E_SET_SVC_PARAMETERS, &svc_params_);
|
encoder->Control(VP9E_SET_SVC_PARAMETERS, &svc_params_);
|
||||||
encoder->Control(VP8E_SET_CPUUSED, speed_setting_);
|
encoder->Control(VP8E_SET_CPUUSED, speed_setting_);
|
||||||
@@ -814,8 +834,6 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
|||||||
if (bits_total_) {
|
if (bits_total_) {
|
||||||
const double file_size_in_kb = bits_total_ / 1000.; // bits per kilobit
|
const double file_size_in_kb = bits_total_ / 1000.; // bits per kilobit
|
||||||
duration_ = (last_pts_ + 1) * timebase_;
|
duration_ = (last_pts_ + 1) * timebase_;
|
||||||
effective_datarate_ = (bits_total_ - bits_in_last_frame_) / 1000.0
|
|
||||||
/ (cfg_.rc_buf_initial_sz / 1000.0 + duration_);
|
|
||||||
file_datarate_ = file_size_in_kb / duration_;
|
file_datarate_ = file_size_in_kb / duration_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -839,7 +857,6 @@ class DatarateOnePassCbrSvc : public ::libvpx_test::EncoderTest,
|
|||||||
int64_t bits_total_;
|
int64_t bits_total_;
|
||||||
double duration_;
|
double duration_;
|
||||||
double file_datarate_;
|
double file_datarate_;
|
||||||
double effective_datarate_;
|
|
||||||
size_t bits_in_last_frame_;
|
size_t bits_in_last_frame_;
|
||||||
vpx_svc_extra_cfg_t svc_params_;
|
vpx_svc_extra_cfg_t svc_params_;
|
||||||
int speed_setting_;
|
int speed_setting_;
|
||||||
@@ -850,8 +867,7 @@ static void assign_layer_bitrates(vpx_codec_enc_cfg_t *const enc_cfg,
|
|||||||
const vpx_svc_extra_cfg_t *svc_params,
|
const vpx_svc_extra_cfg_t *svc_params,
|
||||||
int spatial_layers,
|
int spatial_layers,
|
||||||
int temporal_layers,
|
int temporal_layers,
|
||||||
int temporal_layering_mode,
|
int temporal_layering_mode) {
|
||||||
unsigned int total_rate) {
|
|
||||||
int sl, spatial_layer_target;
|
int sl, spatial_layer_target;
|
||||||
float total = 0;
|
float total = 0;
|
||||||
float alloc_ratio[VPX_MAX_LAYERS] = {0};
|
float alloc_ratio[VPX_MAX_LAYERS] = {0};
|
||||||
@@ -885,7 +901,7 @@ static void assign_layer_bitrates(vpx_codec_enc_cfg_t *const enc_cfg,
|
|||||||
|
|
||||||
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
|
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
|
||||||
// 3 temporal layers. Run CIF clip with 1 thread.
|
// 3 temporal layers. Run CIF clip with 1 thread.
|
||||||
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
|
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc2SpatialLayers) {
|
||||||
cfg_.rc_buf_initial_sz = 500;
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
cfg_.rc_buf_optimal_sz = 500;
|
cfg_.rc_buf_optimal_sz = 500;
|
||||||
cfg_.rc_buf_sz = 1000;
|
cfg_.rc_buf_sz = 1000;
|
||||||
@@ -905,31 +921,71 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc) {
|
|||||||
svc_params_.scaling_factor_den[0] = 288;
|
svc_params_.scaling_factor_den[0] = 288;
|
||||||
svc_params_.scaling_factor_num[1] = 288;
|
svc_params_.scaling_factor_num[1] = 288;
|
||||||
svc_params_.scaling_factor_den[1] = 288;
|
svc_params_.scaling_factor_den[1] = 288;
|
||||||
// TODO(wonkap/marpan): No frame drop for now, we need to implement correct
|
cfg_.rc_dropframe_thresh = 10;
|
||||||
// frame dropping for SVC.
|
cfg_.kf_max_dist = 9999;
|
||||||
cfg_.rc_dropframe_thresh = 0;
|
|
||||||
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
30, 1, 0, 200);
|
30, 1, 0, 200);
|
||||||
// TODO(wonkap/marpan): Check that effective_datarate for each layer hits the
|
// TODO(wonkap/marpan): Check that effective_datarate for each layer hits the
|
||||||
// layer target_bitrate. Also check if test can pass at lower bitrate (~200k).
|
// layer target_bitrate.
|
||||||
for (int i = 400; i <= 800; i += 200) {
|
for (int i = 200; i <= 800; i += 200) {
|
||||||
cfg_.rc_target_bitrate = i;
|
cfg_.rc_target_bitrate = i;
|
||||||
ResetModel();
|
ResetModel();
|
||||||
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
cfg_.ts_number_layers, cfg_.temporal_layering_mode,
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
cfg_.rc_target_bitrate);
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.85)
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.85)
|
||||||
<< " The datarate for the file exceeds the target by too much!";
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
||||||
<< " The datarate for the file is lower than the target by too much!";
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
EXPECT_EQ(GetMismatchFrames(), (unsigned int) 0);
|
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and 3
|
||||||
|
// temporal layers. Run CIF clip with 1 thread, and few short key frame periods.
|
||||||
|
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc2SpatialLayersSmallKf) {
|
||||||
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
|
cfg_.rc_buf_optimal_sz = 500;
|
||||||
|
cfg_.rc_buf_sz = 1000;
|
||||||
|
cfg_.rc_min_quantizer = 0;
|
||||||
|
cfg_.rc_max_quantizer = 63;
|
||||||
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
cfg_.ss_number_layers = 2;
|
||||||
|
cfg_.ts_number_layers = 3;
|
||||||
|
cfg_.ts_rate_decimator[0] = 4;
|
||||||
|
cfg_.ts_rate_decimator[1] = 2;
|
||||||
|
cfg_.ts_rate_decimator[2] = 1;
|
||||||
|
cfg_.g_error_resilient = 1;
|
||||||
|
cfg_.g_threads = 1;
|
||||||
|
cfg_.temporal_layering_mode = 3;
|
||||||
|
svc_params_.scaling_factor_num[0] = 144;
|
||||||
|
svc_params_.scaling_factor_den[0] = 288;
|
||||||
|
svc_params_.scaling_factor_num[1] = 288;
|
||||||
|
svc_params_.scaling_factor_den[1] = 288;
|
||||||
|
cfg_.rc_dropframe_thresh = 10;
|
||||||
|
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
|
30, 1, 0, 200);
|
||||||
|
cfg_.rc_target_bitrate = 400;
|
||||||
|
// For this 3 temporal layer case, pattern repeats every 4 frames, so choose
|
||||||
|
// 4 key neighboring key frame periods (so key frame will land on 0-2-1-2).
|
||||||
|
for (int j = 64; j <= 67; j++) {
|
||||||
|
cfg_.kf_max_dist = j;
|
||||||
|
ResetModel();
|
||||||
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.85)
|
||||||
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
||||||
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
|
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
|
// Check basic rate targeting for 1 pass CBR SVC: 2 spatial layers and
|
||||||
// 3 temporal layers. Run HD clip with 4 threads.
|
// 3 temporal layers. Run HD clip with 4 threads.
|
||||||
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc4threads) {
|
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc2SpatialLayers4threads) {
|
||||||
cfg_.rc_buf_initial_sz = 500;
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
cfg_.rc_buf_optimal_sz = 500;
|
cfg_.rc_buf_optimal_sz = 500;
|
||||||
cfg_.rc_buf_sz = 1000;
|
cfg_.rc_buf_sz = 1000;
|
||||||
@@ -949,30 +1005,152 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc4threads) {
|
|||||||
svc_params_.scaling_factor_den[0] = 288;
|
svc_params_.scaling_factor_den[0] = 288;
|
||||||
svc_params_.scaling_factor_num[1] = 288;
|
svc_params_.scaling_factor_num[1] = 288;
|
||||||
svc_params_.scaling_factor_den[1] = 288;
|
svc_params_.scaling_factor_den[1] = 288;
|
||||||
// TODO(wonkap/marpan): No frame drop for now, we need to implement correct
|
cfg_.rc_dropframe_thresh = 10;
|
||||||
// frame dropping for SVC.
|
cfg_.kf_max_dist = 9999;
|
||||||
cfg_.rc_dropframe_thresh = 0;
|
|
||||||
::libvpx_test::I420VideoSource video("niklas_1280_720_30.y4m", 1280, 720,
|
::libvpx_test::I420VideoSource video("niklas_1280_720_30.y4m", 1280, 720,
|
||||||
30, 1, 0, 300);
|
30, 1, 0, 300);
|
||||||
cfg_.rc_target_bitrate = 800;
|
cfg_.rc_target_bitrate = 800;
|
||||||
ResetModel();
|
ResetModel();
|
||||||
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
cfg_.ts_number_layers, cfg_.temporal_layering_mode,
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
cfg_.rc_target_bitrate);
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.85)
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.85)
|
||||||
<< " The datarate for the file exceeds the target by too much!";
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.15)
|
||||||
<< " The datarate for the file is lower than the target by too much!";
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
EXPECT_EQ(GetMismatchFrames(), (unsigned int) 0);
|
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check basic rate targeting for 1 pass CBR SVC: 3 spatial layers and
|
||||||
|
// 3 temporal layers. Run CIF clip with 1 thread.
|
||||||
|
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc3SpatialLayers) {
|
||||||
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
|
cfg_.rc_buf_optimal_sz = 500;
|
||||||
|
cfg_.rc_buf_sz = 1000;
|
||||||
|
cfg_.rc_min_quantizer = 0;
|
||||||
|
cfg_.rc_max_quantizer = 63;
|
||||||
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
cfg_.ss_number_layers = 3;
|
||||||
|
cfg_.ts_number_layers = 3;
|
||||||
|
cfg_.ts_rate_decimator[0] = 4;
|
||||||
|
cfg_.ts_rate_decimator[1] = 2;
|
||||||
|
cfg_.ts_rate_decimator[2] = 1;
|
||||||
|
cfg_.g_error_resilient = 1;
|
||||||
|
cfg_.g_threads = 1;
|
||||||
|
cfg_.temporal_layering_mode = 3;
|
||||||
|
svc_params_.scaling_factor_num[0] = 72;
|
||||||
|
svc_params_.scaling_factor_den[0] = 288;
|
||||||
|
svc_params_.scaling_factor_num[1] = 144;
|
||||||
|
svc_params_.scaling_factor_den[1] = 288;
|
||||||
|
svc_params_.scaling_factor_num[2] = 288;
|
||||||
|
svc_params_.scaling_factor_den[2] = 288;
|
||||||
|
cfg_.rc_dropframe_thresh = 10;
|
||||||
|
cfg_.kf_max_dist = 9999;
|
||||||
|
::libvpx_test::I420VideoSource video("niklas_1280_720_30.y4m", 1280, 720,
|
||||||
|
30, 1, 0, 300);
|
||||||
|
cfg_.rc_target_bitrate = 800;
|
||||||
|
ResetModel();
|
||||||
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.85)
|
||||||
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.22)
|
||||||
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
|
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check basic rate targeting for 1 pass CBR SVC: 3 spatial layers and 3
|
||||||
|
// temporal layers. Run CIF clip with 1 thread, and few short key frame periods.
|
||||||
|
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc3SpatialLayersSmallKf) {
|
||||||
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
|
cfg_.rc_buf_optimal_sz = 500;
|
||||||
|
cfg_.rc_buf_sz = 1000;
|
||||||
|
cfg_.rc_min_quantizer = 0;
|
||||||
|
cfg_.rc_max_quantizer = 63;
|
||||||
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
cfg_.ss_number_layers = 3;
|
||||||
|
cfg_.ts_number_layers = 3;
|
||||||
|
cfg_.ts_rate_decimator[0] = 4;
|
||||||
|
cfg_.ts_rate_decimator[1] = 2;
|
||||||
|
cfg_.ts_rate_decimator[2] = 1;
|
||||||
|
cfg_.g_error_resilient = 1;
|
||||||
|
cfg_.g_threads = 1;
|
||||||
|
cfg_.temporal_layering_mode = 3;
|
||||||
|
svc_params_.scaling_factor_num[0] = 72;
|
||||||
|
svc_params_.scaling_factor_den[0] = 288;
|
||||||
|
svc_params_.scaling_factor_num[1] = 144;
|
||||||
|
svc_params_.scaling_factor_den[1] = 288;
|
||||||
|
svc_params_.scaling_factor_num[2] = 288;
|
||||||
|
svc_params_.scaling_factor_den[2] = 288;
|
||||||
|
cfg_.rc_dropframe_thresh = 10;
|
||||||
|
::libvpx_test::I420VideoSource video("niklas_1280_720_30.y4m", 1280, 720,
|
||||||
|
30, 1, 0, 300);
|
||||||
|
cfg_.rc_target_bitrate = 800;
|
||||||
|
// For this 3 temporal layer case, pattern repeats every 4 frames, so choose
|
||||||
|
// 4 key neighboring key frame periods (so key frame will land on 0-2-1-2).
|
||||||
|
for (int j = 32; j <= 35; j++) {
|
||||||
|
cfg_.kf_max_dist = j;
|
||||||
|
ResetModel();
|
||||||
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.85)
|
||||||
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.30)
|
||||||
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
|
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check basic rate targeting for 1 pass CBR SVC: 3 spatial layers and
|
||||||
|
// 3 temporal layers. Run HD clip with 4 threads.
|
||||||
|
TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc3SpatialLayers4threads) {
|
||||||
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
|
cfg_.rc_buf_optimal_sz = 500;
|
||||||
|
cfg_.rc_buf_sz = 1000;
|
||||||
|
cfg_.rc_min_quantizer = 0;
|
||||||
|
cfg_.rc_max_quantizer = 63;
|
||||||
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
cfg_.ss_number_layers = 3;
|
||||||
|
cfg_.ts_number_layers = 3;
|
||||||
|
cfg_.ts_rate_decimator[0] = 4;
|
||||||
|
cfg_.ts_rate_decimator[1] = 2;
|
||||||
|
cfg_.ts_rate_decimator[2] = 1;
|
||||||
|
cfg_.g_error_resilient = 1;
|
||||||
|
cfg_.g_threads = 4;
|
||||||
|
cfg_.temporal_layering_mode = 3;
|
||||||
|
svc_params_.scaling_factor_num[0] = 72;
|
||||||
|
svc_params_.scaling_factor_den[0] = 288;
|
||||||
|
svc_params_.scaling_factor_num[1] = 144;
|
||||||
|
svc_params_.scaling_factor_den[1] = 288;
|
||||||
|
svc_params_.scaling_factor_num[2] = 288;
|
||||||
|
svc_params_.scaling_factor_den[2] = 288;
|
||||||
|
cfg_.rc_dropframe_thresh = 10;
|
||||||
|
cfg_.kf_max_dist = 9999;
|
||||||
|
::libvpx_test::I420VideoSource video("niklas_1280_720_30.y4m", 1280, 720,
|
||||||
|
30, 1, 0, 300);
|
||||||
|
cfg_.rc_target_bitrate = 800;
|
||||||
|
ResetModel();
|
||||||
|
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
|
||||||
|
cfg_.ts_number_layers, cfg_.temporal_layering_mode);
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
ASSERT_GE(cfg_.rc_target_bitrate, file_datarate_ * 0.85)
|
||||||
|
<< " The datarate for the file exceeds the target by too much!";
|
||||||
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.22)
|
||||||
|
<< " The datarate for the file is lower than the target by too much!";
|
||||||
|
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
|
||||||
}
|
}
|
||||||
|
|
||||||
VP8_INSTANTIATE_TEST_CASE(DatarateTestLarge, ALL_TEST_MODES);
|
VP8_INSTANTIATE_TEST_CASE(DatarateTestLarge, ALL_TEST_MODES);
|
||||||
VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large,
|
VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9Large,
|
||||||
::testing::Values(::libvpx_test::kOnePassGood,
|
::testing::Values(::libvpx_test::kOnePassGood,
|
||||||
::libvpx_test::kRealTime),
|
::libvpx_test::kRealTime),
|
||||||
::testing::Range(2, 7));
|
::testing::Range(2, 9));
|
||||||
VP9_INSTANTIATE_TEST_CASE(DatarateOnePassCbrSvc,
|
VP9_INSTANTIATE_TEST_CASE(DatarateOnePassCbrSvc,
|
||||||
::testing::Values(::libvpx_test::kRealTime),
|
::testing::Values(::libvpx_test::kRealTime),
|
||||||
::testing::Range(5, 8));
|
::testing::Range(5, 9));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -276,12 +276,12 @@ void idct16x16_12(const tran_low_t *in, uint8_t *out, int stride) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void idct16x16_10_ref(const tran_low_t *in, uint8_t *out, int stride,
|
void idct16x16_10_ref(const tran_low_t *in, uint8_t *out, int stride,
|
||||||
int tx_type) {
|
int /*tx_type*/) {
|
||||||
idct16x16_10(in, out, stride);
|
idct16x16_10(in, out, stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
void idct16x16_12_ref(const tran_low_t *in, uint8_t *out, int stride,
|
void idct16x16_12_ref(const tran_low_t *in, uint8_t *out, int stride,
|
||||||
int tx_type) {
|
int /*tx_type*/) {
|
||||||
idct16x16_12(in, out, stride);
|
idct16x16_12(in, out, stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,6 +293,7 @@ void iht16x16_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
|||||||
vp9_highbd_iht16x16_256_add_c(in, out, stride, tx_type, 12);
|
vp9_highbd_iht16x16_256_add_c(in, out, stride, tx_type, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_SSE2
|
||||||
void idct16x16_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct16x16_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vpx_highbd_idct16x16_10_add_c(in, out, stride, 10);
|
vpx_highbd_idct16x16_10_add_c(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
@@ -301,7 +302,6 @@ void idct16x16_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
|
|||||||
vpx_highbd_idct16x16_10_add_c(in, out, stride, 12);
|
vpx_highbd_idct16x16_10_add_c(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_SSE2
|
|
||||||
void idct16x16_256_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct16x16_256_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vpx_highbd_idct16x16_256_add_sse2(in, out, stride, 10);
|
vpx_highbd_idct16x16_256_add_sse2(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
@@ -373,10 +373,10 @@ class Trans16x16TestBase {
|
|||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const int32_t diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
const uint32_t diff = dst[j] - src[j];
|
const int32_t diff = dst[j] - src[j];
|
||||||
#endif
|
#endif
|
||||||
const uint32_t error = diff * diff;
|
const uint32_t error = diff * diff;
|
||||||
if (max_error < error)
|
if (max_error < error)
|
||||||
@@ -778,7 +778,7 @@ class InvTrans16x16DCT
|
|||||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) {}
|
void RunFwdTxfm(int16_t * /*in*/, tran_low_t * /*out*/, int /*stride*/) {}
|
||||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
||||||
inv_txfm_(out, dst, stride);
|
inv_txfm_(out, dst, stride);
|
||||||
}
|
}
|
||||||
@@ -792,6 +792,67 @@ TEST_P(InvTrans16x16DCT, CompareReference) {
|
|||||||
CompareInvReference(ref_txfm_, thresh_);
|
CompareInvReference(ref_txfm_, thresh_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class PartialTrans16x16Test
|
||||||
|
: public ::testing::TestWithParam<
|
||||||
|
std::tr1::tuple<FdctFunc, vpx_bit_depth_t> > {
|
||||||
|
public:
|
||||||
|
virtual ~PartialTrans16x16Test() {}
|
||||||
|
virtual void SetUp() {
|
||||||
|
fwd_txfm_ = GET_PARAM(0);
|
||||||
|
bit_depth_ = GET_PARAM(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
vpx_bit_depth_t bit_depth_;
|
||||||
|
FdctFunc fwd_txfm_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(PartialTrans16x16Test, Extremes) {
|
||||||
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
const int16_t maxval =
|
||||||
|
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
|
||||||
|
#else
|
||||||
|
const int16_t maxval = 255;
|
||||||
|
#endif
|
||||||
|
const int minval = -maxval;
|
||||||
|
DECLARE_ALIGNED(16, int16_t, input[kNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, output[kNumCoeffs]);
|
||||||
|
|
||||||
|
for (int i = 0; i < kNumCoeffs; ++i) input[i] = maxval;
|
||||||
|
output[0] = 0;
|
||||||
|
ASM_REGISTER_STATE_CHECK(fwd_txfm_(input, output, 16));
|
||||||
|
EXPECT_EQ((maxval * kNumCoeffs) >> 1, output[0]);
|
||||||
|
|
||||||
|
for (int i = 0; i < kNumCoeffs; ++i) input[i] = minval;
|
||||||
|
output[0] = 0;
|
||||||
|
ASM_REGISTER_STATE_CHECK(fwd_txfm_(input, output, 16));
|
||||||
|
EXPECT_EQ((minval * kNumCoeffs) >> 1, output[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(PartialTrans16x16Test, Random) {
|
||||||
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
const int16_t maxval =
|
||||||
|
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
|
||||||
|
#else
|
||||||
|
const int16_t maxval = 255;
|
||||||
|
#endif
|
||||||
|
DECLARE_ALIGNED(16, int16_t, input[kNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, output[kNumCoeffs]);
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
|
||||||
|
int sum = 0;
|
||||||
|
for (int i = 0; i < kNumCoeffs; ++i) {
|
||||||
|
const int val = (i & 1) ? -rnd(maxval + 1) : rnd(maxval + 1);
|
||||||
|
input[i] = val;
|
||||||
|
sum += val;
|
||||||
|
}
|
||||||
|
output[0] = 0;
|
||||||
|
ASM_REGISTER_STATE_CHECK(fwd_txfm_(input, output, 16));
|
||||||
|
EXPECT_EQ(sum >> 1, output[0]);
|
||||||
|
}
|
||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
@@ -824,6 +885,11 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
|
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 3, VPX_BITS_8)));
|
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 3, VPX_BITS_8)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, PartialTrans16x16Test,
|
||||||
|
::testing::Values(make_tuple(&vpx_highbd_fdct16x16_1_c, VPX_BITS_8),
|
||||||
|
make_tuple(&vpx_highbd_fdct16x16_1_c, VPX_BITS_10),
|
||||||
|
make_tuple(&vpx_highbd_fdct16x16_1_c, VPX_BITS_12)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans16x16HT,
|
C, Trans16x16HT,
|
||||||
@@ -832,6 +898,9 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
|
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 1, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
|
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 3, VPX_BITS_8)));
|
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 3, VPX_BITS_8)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(C, PartialTrans16x16Test,
|
||||||
|
::testing::Values(make_tuple(&vpx_fdct16x16_1_c,
|
||||||
|
VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
@@ -859,6 +928,9 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
VPX_BITS_8),
|
VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 3,
|
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2, 3,
|
||||||
VPX_BITS_8)));
|
VPX_BITS_8)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans16x16Test,
|
||||||
|
::testing::Values(make_tuple(&vpx_fdct16x16_1_sse2,
|
||||||
|
VPX_BITS_8)));
|
||||||
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
@@ -896,6 +968,9 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
&idct16x16_10_add_12_sse2, 3167, VPX_BITS_12),
|
&idct16x16_10_add_12_sse2, 3167, VPX_BITS_12),
|
||||||
make_tuple(&idct16x16_12,
|
make_tuple(&idct16x16_12,
|
||||||
&idct16x16_256_add_12_sse2, 3167, VPX_BITS_12)));
|
&idct16x16_256_add_12_sse2, 3167, VPX_BITS_12)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans16x16Test,
|
||||||
|
::testing::Values(make_tuple(&vpx_fdct16x16_1_sse2,
|
||||||
|
VPX_BITS_8)));
|
||||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
@@ -912,5 +987,8 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 2, VPX_BITS_8),
|
make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 2, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 3,
|
make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 3,
|
||||||
VPX_BITS_8)));
|
VPX_BITS_8)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(MSA, PartialTrans16x16Test,
|
||||||
|
::testing::Values(make_tuple(&vpx_fdct16x16_1_msa,
|
||||||
|
VPX_BITS_8)));
|
||||||
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -81,10 +81,6 @@ typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t>
|
|||||||
Trans32x32Param;
|
Trans32x32Param;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
void idct32x32_8(const tran_low_t *in, uint8_t *out, int stride) {
|
|
||||||
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 10);
|
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
@@ -158,10 +154,10 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
|
|||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const int32_t diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
const uint32_t diff = dst[j] - src[j];
|
const int32_t diff = dst[j] - src[j];
|
||||||
#endif
|
#endif
|
||||||
const uint32_t error = diff * diff;
|
const uint32_t error = diff * diff;
|
||||||
if (max_error < error)
|
if (max_error < error)
|
||||||
@@ -309,6 +305,67 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class PartialTrans32x32Test
|
||||||
|
: public ::testing::TestWithParam<
|
||||||
|
std::tr1::tuple<FwdTxfmFunc, vpx_bit_depth_t> > {
|
||||||
|
public:
|
||||||
|
virtual ~PartialTrans32x32Test() {}
|
||||||
|
virtual void SetUp() {
|
||||||
|
fwd_txfm_ = GET_PARAM(0);
|
||||||
|
bit_depth_ = GET_PARAM(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
vpx_bit_depth_t bit_depth_;
|
||||||
|
FwdTxfmFunc fwd_txfm_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(PartialTrans32x32Test, Extremes) {
|
||||||
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
const int16_t maxval =
|
||||||
|
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
|
||||||
|
#else
|
||||||
|
const int16_t maxval = 255;
|
||||||
|
#endif
|
||||||
|
const int minval = -maxval;
|
||||||
|
DECLARE_ALIGNED(16, int16_t, input[kNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, output[kNumCoeffs]);
|
||||||
|
|
||||||
|
for (int i = 0; i < kNumCoeffs; ++i) input[i] = maxval;
|
||||||
|
output[0] = 0;
|
||||||
|
ASM_REGISTER_STATE_CHECK(fwd_txfm_(input, output, 32));
|
||||||
|
EXPECT_EQ((maxval * kNumCoeffs) >> 3, output[0]);
|
||||||
|
|
||||||
|
for (int i = 0; i < kNumCoeffs; ++i) input[i] = minval;
|
||||||
|
output[0] = 0;
|
||||||
|
ASM_REGISTER_STATE_CHECK(fwd_txfm_(input, output, 32));
|
||||||
|
EXPECT_EQ((minval * kNumCoeffs) >> 3, output[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(PartialTrans32x32Test, Random) {
|
||||||
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
const int16_t maxval =
|
||||||
|
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
|
||||||
|
#else
|
||||||
|
const int16_t maxval = 255;
|
||||||
|
#endif
|
||||||
|
DECLARE_ALIGNED(16, int16_t, input[kNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, output[kNumCoeffs]);
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
|
||||||
|
int sum = 0;
|
||||||
|
for (int i = 0; i < kNumCoeffs; ++i) {
|
||||||
|
const int val = (i & 1) ? -rnd(maxval + 1) : rnd(maxval + 1);
|
||||||
|
input[i] = val;
|
||||||
|
sum += val;
|
||||||
|
}
|
||||||
|
output[0] = 0;
|
||||||
|
ASM_REGISTER_STATE_CHECK(fwd_txfm_(input, output, 32));
|
||||||
|
EXPECT_EQ(sum >> 3, output[0]);
|
||||||
|
}
|
||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
@@ -327,6 +384,11 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
&vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vpx_fdct32x32_rd_c,
|
make_tuple(&vpx_fdct32x32_rd_c,
|
||||||
&vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
&vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, PartialTrans32x32Test,
|
||||||
|
::testing::Values(make_tuple(&vpx_highbd_fdct32x32_1_c, VPX_BITS_8),
|
||||||
|
make_tuple(&vpx_highbd_fdct32x32_1_c, VPX_BITS_10),
|
||||||
|
make_tuple(&vpx_highbd_fdct32x32_1_c, VPX_BITS_12)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, Trans32x32Test,
|
C, Trans32x32Test,
|
||||||
@@ -335,9 +397,12 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
&vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vpx_fdct32x32_rd_c,
|
make_tuple(&vpx_fdct32x32_rd_c,
|
||||||
&vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
&vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(C, PartialTrans32x32Test,
|
||||||
|
::testing::Values(make_tuple(&vpx_fdct32x32_1_c,
|
||||||
|
VPX_BITS_8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, Trans32x32Test,
|
NEON, Trans32x32Test,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
@@ -345,7 +410,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
&vpx_idct32x32_1024_add_neon, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_neon, 0, VPX_BITS_8),
|
||||||
make_tuple(&vpx_fdct32x32_rd_c,
|
make_tuple(&vpx_fdct32x32_rd_c,
|
||||||
&vpx_idct32x32_1024_add_neon, 1, VPX_BITS_8)));
|
&vpx_idct32x32_1024_add_neon, 1, VPX_BITS_8)));
|
||||||
#endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
@@ -355,6 +420,9 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
||||||
make_tuple(&vpx_fdct32x32_rd_sse2,
|
make_tuple(&vpx_fdct32x32_rd_sse2,
|
||||||
&vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
|
&vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans32x32Test,
|
||||||
|
::testing::Values(make_tuple(&vpx_fdct32x32_1_sse2,
|
||||||
|
VPX_BITS_8)));
|
||||||
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
@@ -371,6 +439,9 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
VPX_BITS_8),
|
VPX_BITS_8),
|
||||||
make_tuple(&vpx_fdct32x32_rd_sse2, &vpx_idct32x32_1024_add_c, 1,
|
make_tuple(&vpx_fdct32x32_rd_sse2, &vpx_idct32x32_1024_add_c, 1,
|
||||||
VPX_BITS_8)));
|
VPX_BITS_8)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans32x32Test,
|
||||||
|
::testing::Values(make_tuple(&vpx_fdct32x32_1_sse2,
|
||||||
|
VPX_BITS_8)));
|
||||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
@@ -391,5 +462,8 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
&vpx_idct32x32_1024_add_msa, 0, VPX_BITS_8),
|
&vpx_idct32x32_1024_add_msa, 0, VPX_BITS_8),
|
||||||
make_tuple(&vpx_fdct32x32_rd_msa,
|
make_tuple(&vpx_fdct32x32_rd_msa,
|
||||||
&vpx_idct32x32_1024_add_msa, 1, VPX_BITS_8)));
|
&vpx_idct32x32_1024_add_msa, 1, VPX_BITS_8)));
|
||||||
|
INSTANTIATE_TEST_CASE_P(MSA, PartialTrans32x32Test,
|
||||||
|
::testing::Values(make_tuple(&vpx_fdct32x32_1_msa,
|
||||||
|
VPX_BITS_8)));
|
||||||
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ TEST(DecodeAPI, InvalidParams) {
|
|||||||
#endif
|
#endif
|
||||||
#if CONFIG_VP9_DECODER
|
#if CONFIG_VP9_DECODER
|
||||||
&vpx_codec_vp9_dx_algo,
|
&vpx_codec_vp9_dx_algo,
|
||||||
#endif
|
|
||||||
#if CONFIG_VP10_DECODER
|
|
||||||
&vpx_codec_vp10_dx_algo,
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
uint8_t buf[1] = {0};
|
uint8_t buf[1] = {0};
|
||||||
@@ -146,6 +143,40 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
|
|||||||
TestVp9Controls(&dec);
|
TestVp9Controls(&dec);
|
||||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(DecodeAPI, Vp9PeekSI) {
|
||||||
|
const vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo;
|
||||||
|
// The first 9 bytes are valid and the rest of the bytes are made up. Until
|
||||||
|
// size 10, this should return VPX_CODEC_UNSUP_BITSTREAM and after that it
|
||||||
|
// should return VPX_CODEC_CORRUPT_FRAME.
|
||||||
|
const uint8_t data[32] = {
|
||||||
|
0x85, 0xa4, 0xc1, 0xa1, 0x38, 0x81, 0xa3, 0x49,
|
||||||
|
0x83, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
};
|
||||||
|
|
||||||
|
for (uint32_t data_sz = 1; data_sz <= 32; ++data_sz) {
|
||||||
|
// Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get
|
||||||
|
// to decoder_peek_si_internal on frames of size < 8.
|
||||||
|
if (data_sz >= 8) {
|
||||||
|
vpx_codec_ctx_t dec;
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
|
||||||
|
EXPECT_EQ((data_sz < 10) ?
|
||||||
|
VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_CORRUPT_FRAME,
|
||||||
|
vpx_codec_decode(&dec, data, data_sz, NULL, 0));
|
||||||
|
vpx_codec_iter_t iter = NULL;
|
||||||
|
EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify behavior of vpx_codec_peek_stream_info.
|
||||||
|
vpx_codec_stream_info_t si;
|
||||||
|
si.sz = sizeof(si);
|
||||||
|
EXPECT_EQ((data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK,
|
||||||
|
vpx_codec_peek_stream_info(codec, data, data_sz, &si));
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif // CONFIG_VP9_DECODER
|
#endif // CONFIG_VP9_DECODER
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
65
test/encode_api_test.cc
Normal file
65
test/encode_api_test.cc
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "vpx/vp8cx.h"
|
||||||
|
#include "vpx/vpx_encoder.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
#define NELEMENTS(x) static_cast<int>(sizeof(x) / sizeof(x[0]))
|
||||||
|
|
||||||
|
TEST(EncodeAPI, InvalidParams) {
|
||||||
|
static const vpx_codec_iface_t *kCodecs[] = {
|
||||||
|
#if CONFIG_VP8_ENCODER
|
||||||
|
&vpx_codec_vp8_cx_algo,
|
||||||
|
#endif
|
||||||
|
#if CONFIG_VP9_ENCODER
|
||||||
|
&vpx_codec_vp9_cx_algo,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
uint8_t buf[1] = {0};
|
||||||
|
vpx_image_t img;
|
||||||
|
vpx_codec_ctx_t enc;
|
||||||
|
vpx_codec_enc_cfg_t cfg;
|
||||||
|
|
||||||
|
EXPECT_EQ(&img, vpx_img_wrap(&img, VPX_IMG_FMT_I420, 1, 1, 1, buf));
|
||||||
|
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_enc_init(NULL, NULL, NULL, 0));
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_enc_init(&enc, NULL, NULL, 0));
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_encode(NULL, NULL, 0, 0, 0, 0));
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_encode(NULL, &img, 0, 0, 0, 0));
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_destroy(NULL));
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||||
|
vpx_codec_enc_config_default(NULL, NULL, 0));
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||||
|
vpx_codec_enc_config_default(NULL, &cfg, 0));
|
||||||
|
EXPECT_TRUE(vpx_codec_error(NULL) != NULL);
|
||||||
|
|
||||||
|
for (int i = 0; i < NELEMENTS(kCodecs); ++i) {
|
||||||
|
SCOPED_TRACE(vpx_codec_iface_name(kCodecs[i]));
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||||
|
vpx_codec_enc_init(NULL, kCodecs[i], NULL, 0));
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||||
|
vpx_codec_enc_init(&enc, kCodecs[i], NULL, 0));
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||||
|
vpx_codec_enc_config_default(kCodecs[i], &cfg, 1));
|
||||||
|
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_enc_config_default(kCodecs[i], &cfg, 0));
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_enc_init(&enc, kCodecs[i], &cfg, 0));
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_encode(&enc, NULL, 0, 0, 0, 0));
|
||||||
|
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&enc));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
@@ -42,15 +42,6 @@ void Encoder::InitEncoder(VideoSource *video) {
|
|||||||
log2_tile_columns);
|
log2_tile_columns);
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
#if CONFIG_VP10_ENCODER
|
|
||||||
if (CodecInterface() == &vpx_codec_vp10_cx_algo) {
|
|
||||||
// Default to 1 tile column for VP10.
|
|
||||||
const int log2_tile_columns = 0;
|
|
||||||
res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
|
|
||||||
log2_tile_columns);
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
|
||||||
} else
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if CONFIG_VP8_ENCODER
|
#if CONFIG_VP8_ENCODER
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
|
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#endif
|
#endif
|
||||||
#include "vpx/vpx_encoder.h"
|
#include "vpx/vpx_encoder.h"
|
||||||
@@ -124,6 +124,11 @@ class Encoder {
|
|||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Control(int ctrl_id, int *arg) {
|
||||||
|
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
||||||
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
|
}
|
||||||
|
|
||||||
void Control(int ctrl_id, struct vpx_scaling_mode *arg) {
|
void Control(int ctrl_id, struct vpx_scaling_mode *arg) {
|
||||||
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
@@ -138,7 +143,7 @@ class Encoder {
|
|||||||
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
}
|
}
|
||||||
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
|
#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
|
||||||
void Control(int ctrl_id, vpx_active_map_t *arg) {
|
void Control(int ctrl_id, vpx_active_map_t *arg) {
|
||||||
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ class ErrorResilienceTestLarge : public ::libvpx_test::EncoderTest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||||
::libvpx_test::Encoder *encoder) {
|
::libvpx_test::Encoder * /*encoder*/) {
|
||||||
frame_flags_ &= ~(VP8_EFLAG_NO_UPD_LAST |
|
frame_flags_ &= ~(VP8_EFLAG_NO_UPD_LAST |
|
||||||
VP8_EFLAG_NO_UPD_GF |
|
VP8_EFLAG_NO_UPD_GF |
|
||||||
VP8_EFLAG_NO_UPD_ARF);
|
VP8_EFLAG_NO_UPD_ARF);
|
||||||
@@ -596,7 +596,4 @@ VP8_INSTANTIATE_TEST_CASE(ErrorResilienceTestLargeCodecControls,
|
|||||||
ONE_PASS_TEST_MODES);
|
ONE_PASS_TEST_MODES);
|
||||||
VP9_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
|
VP9_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
|
||||||
::testing::Values(true));
|
::testing::Values(true));
|
||||||
// SVC-related tests don't run for VP10 since SVC is not supported.
|
|
||||||
VP10_INSTANTIATE_TEST_CASE(ErrorResilienceTestLarge, ONE_PASS_TEST_MODES,
|
|
||||||
::testing::Values(false));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const int kVideoNameParam = 1;
|
const int kVideoNameParam = 1;
|
||||||
const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm";
|
|
||||||
|
|
||||||
struct ExternalFrameBuffer {
|
struct ExternalFrameBuffer {
|
||||||
uint8_t *data;
|
uint8_t *data;
|
||||||
@@ -155,6 +154,8 @@ class ExternalFrameBufferList {
|
|||||||
ExternalFrameBuffer *ext_fb_list_;
|
ExternalFrameBuffer *ext_fb_list_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if CONFIG_WEBM_IO
|
||||||
|
|
||||||
// Callback used by libvpx to request the application to return a frame
|
// Callback used by libvpx to request the application to return a frame
|
||||||
// buffer of at least |min_size| in bytes.
|
// buffer of at least |min_size| in bytes.
|
||||||
int get_vp9_frame_buffer(void *user_priv, size_t min_size,
|
int get_vp9_frame_buffer(void *user_priv, size_t min_size,
|
||||||
@@ -197,6 +198,8 @@ int do_not_release_vp9_frame_buffer(void *user_priv,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // CONFIG_WEBM_IO
|
||||||
|
|
||||||
// Class for testing passing in external frame buffers to libvpx.
|
// Class for testing passing in external frame buffers to libvpx.
|
||||||
class ExternalFrameBufferMD5Test
|
class ExternalFrameBufferMD5Test
|
||||||
: public ::libvpx_test::DecoderTest,
|
: public ::libvpx_test::DecoderTest,
|
||||||
@@ -278,6 +281,8 @@ class ExternalFrameBufferMD5Test
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_WEBM_IO
|
#if CONFIG_WEBM_IO
|
||||||
|
const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm";
|
||||||
|
|
||||||
// Class for testing passing in external frame buffers to libvpx.
|
// Class for testing passing in external frame buffers to libvpx.
|
||||||
class ExternalFrameBufferTest : public ::testing::Test {
|
class ExternalFrameBufferTest : public ::testing::Test {
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct4x4Param;
|
|||||||
typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht4x4Param;
|
typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht4x4Param;
|
||||||
|
|
||||||
void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride,
|
void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride,
|
||||||
int tx_type) {
|
int /*tx_type*/) {
|
||||||
vpx_fdct4x4_c(in, out, stride);
|
vpx_fdct4x4_c(in, out, stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
|
void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
|
||||||
int tx_type) {
|
int /*tx_type*/) {
|
||||||
vp9_fwht4x4_c(in, out, stride);
|
vp9_fwht4x4_c(in, out, stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,11 +141,11 @@ class Trans4x4TestBase {
|
|||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const int diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
ASSERT_EQ(VPX_BITS_8, bit_depth_);
|
ASSERT_EQ(VPX_BITS_8, bit_depth_);
|
||||||
const uint32_t diff = dst[j] - src[j];
|
const int diff = dst[j] - src[j];
|
||||||
#endif
|
#endif
|
||||||
const uint32_t error = diff * diff;
|
const uint32_t error = diff * diff;
|
||||||
if (max_error < error)
|
if (max_error < error)
|
||||||
@@ -258,10 +258,10 @@ class Trans4x4TestBase {
|
|||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const int diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
const uint32_t diff = dst[j] - src[j];
|
const int diff = dst[j] - src[j];
|
||||||
#endif
|
#endif
|
||||||
const uint32_t error = diff * diff;
|
const uint32_t error = diff * diff;
|
||||||
EXPECT_GE(static_cast<uint32_t>(limit), error)
|
EXPECT_GE(static_cast<uint32_t>(limit), error)
|
||||||
@@ -487,19 +487,11 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 3, VPX_BITS_8)));
|
make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 3, VPX_BITS_8)));
|
||||||
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||||
|
|
||||||
#if CONFIG_USE_X86INC && HAVE_MMX && !CONFIG_VP9_HIGHBITDEPTH && \
|
#if CONFIG_USE_X86INC && HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
|
||||||
!CONFIG_EMULATE_HARDWARE
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
|
||||||
MMX, Trans4x4WHT,
|
|
||||||
::testing::Values(
|
|
||||||
make_tuple(&vp9_fwht4x4_mmx, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8)));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_USE_X86INC && HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && \
|
|
||||||
!CONFIG_EMULATE_HARDWARE
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Trans4x4WHT,
|
SSE2, Trans4x4WHT,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
|
make_tuple(&vp9_fwht4x4_sse2, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8),
|
||||||
make_tuple(&vp9_fwht4x4_c, &vpx_iwht4x4_16_add_sse2, 0, VPX_BITS_8)));
|
make_tuple(&vp9_fwht4x4_c, &vpx_iwht4x4_16_add_sse2, 0, VPX_BITS_8)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct8x8Param;
|
|||||||
typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht8x8Param;
|
typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht8x8Param;
|
||||||
typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t> Idct8x8Param;
|
typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t> Idct8x8Param;
|
||||||
|
|
||||||
void reference_8x8_dct_1d(const double in[8], double out[8], int stride) {
|
void reference_8x8_dct_1d(const double in[8], double out[8]) {
|
||||||
const double kInvSqrt2 = 0.707106781186547524400844362104;
|
const double kInvSqrt2 = 0.707106781186547524400844362104;
|
||||||
for (int k = 0; k < 8; k++) {
|
for (int k = 0; k < 8; k++) {
|
||||||
out[k] = 0.0;
|
out[k] = 0.0;
|
||||||
@@ -65,7 +65,7 @@ void reference_8x8_dct_2d(const int16_t input[kNumCoeffs],
|
|||||||
double temp_in[8], temp_out[8];
|
double temp_in[8], temp_out[8];
|
||||||
for (int j = 0; j < 8; ++j)
|
for (int j = 0; j < 8; ++j)
|
||||||
temp_in[j] = input[j*8 + i];
|
temp_in[j] = input[j*8 + i];
|
||||||
reference_8x8_dct_1d(temp_in, temp_out, 1);
|
reference_8x8_dct_1d(temp_in, temp_out);
|
||||||
for (int j = 0; j < 8; ++j)
|
for (int j = 0; j < 8; ++j)
|
||||||
output[j * 8 + i] = temp_out[j];
|
output[j * 8 + i] = temp_out[j];
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ void reference_8x8_dct_2d(const int16_t input[kNumCoeffs],
|
|||||||
double temp_in[8], temp_out[8];
|
double temp_in[8], temp_out[8];
|
||||||
for (int j = 0; j < 8; ++j)
|
for (int j = 0; j < 8; ++j)
|
||||||
temp_in[j] = output[j + i*8];
|
temp_in[j] = output[j + i*8];
|
||||||
reference_8x8_dct_1d(temp_in, temp_out, 1);
|
reference_8x8_dct_1d(temp_in, temp_out);
|
||||||
// Scale by some magic number
|
// Scale by some magic number
|
||||||
for (int j = 0; j < 8; ++j)
|
for (int j = 0; j < 8; ++j)
|
||||||
output[j + i * 8] = temp_out[j] * 2;
|
output[j + i * 8] = temp_out[j] * 2;
|
||||||
@@ -82,7 +82,8 @@ void reference_8x8_dct_2d(const int16_t input[kNumCoeffs],
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
|
void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride,
|
||||||
|
int /*tx_type*/) {
|
||||||
vpx_fdct8x8_c(in, out, stride);
|
vpx_fdct8x8_c(in, out, stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,6 +108,8 @@ void iht8x8_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
|
|||||||
vp9_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 12);
|
vp9_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_SSE2
|
||||||
|
|
||||||
void idct8x8_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct8x8_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vpx_highbd_idct8x8_10_add_c(in, out, stride, 10);
|
vpx_highbd_idct8x8_10_add_c(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
@@ -115,7 +118,6 @@ void idct8x8_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
|
|||||||
vpx_highbd_idct8x8_10_add_c(in, out, stride, 12);
|
vpx_highbd_idct8x8_10_add_c(in, out, stride, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_SSE2
|
|
||||||
void idct8x8_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
void idct8x8_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
|
||||||
vpx_highbd_idct8x8_10_add_sse2(in, out, stride, 10);
|
vpx_highbd_idct8x8_10_add_sse2(in, out, stride, 10);
|
||||||
}
|
}
|
||||||
@@ -423,10 +425,10 @@ class FwdTrans8x8TestBase {
|
|||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const int diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
|
||||||
#else
|
#else
|
||||||
const uint32_t diff = dst[j] - src[j];
|
const int diff = dst[j] - src[j];
|
||||||
#endif
|
#endif
|
||||||
const uint32_t error = diff * diff;
|
const uint32_t error = diff * diff;
|
||||||
EXPECT_GE(1u << 2 * (bit_depth_ - 8), error)
|
EXPECT_GE(1u << 2 * (bit_depth_ - 8), error)
|
||||||
@@ -456,7 +458,7 @@ class FwdTrans8x8TestBase {
|
|||||||
coeff_r[j] = static_cast<tran_low_t>(round(out_r[j]));
|
coeff_r[j] = static_cast<tran_low_t>(round(out_r[j]));
|
||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
const uint32_t diff = coeff[j] - coeff_r[j];
|
const int32_t diff = coeff[j] - coeff_r[j];
|
||||||
const uint32_t error = diff * diff;
|
const uint32_t error = diff * diff;
|
||||||
EXPECT_GE(9u << 2 * (bit_depth_ - 8), error)
|
EXPECT_GE(9u << 2 * (bit_depth_ - 8), error)
|
||||||
<< "Error: 8x8 DCT has error " << error
|
<< "Error: 8x8 DCT has error " << error
|
||||||
@@ -509,10 +511,10 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
|
|||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
const uint32_t diff =
|
const int diff =
|
||||||
bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
|
bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
|
||||||
#else
|
#else
|
||||||
const uint32_t diff = dst[j] - ref[j];
|
const int diff = dst[j] - ref[j];
|
||||||
#endif
|
#endif
|
||||||
const uint32_t error = diff * diff;
|
const uint32_t error = diff * diff;
|
||||||
EXPECT_EQ(0u, error)
|
EXPECT_EQ(0u, error)
|
||||||
@@ -641,7 +643,7 @@ class InvTrans8x8DCT
|
|||||||
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
void RunInvTxfm(tran_low_t *out, uint8_t *dst, int stride) {
|
||||||
inv_txfm_(out, dst, stride);
|
inv_txfm_(out, dst, stride);
|
||||||
}
|
}
|
||||||
void RunFwdTxfm(int16_t *out, tran_low_t *dst, int stride) {}
|
void RunFwdTxfm(int16_t * /*out*/, tran_low_t * /*dst*/, int /*stride*/) {}
|
||||||
|
|
||||||
IdctFunc ref_txfm_;
|
IdctFunc ref_txfm_;
|
||||||
IdctFunc inv_txfm_;
|
IdctFunc inv_txfm_;
|
||||||
|
|||||||
220
test/hadamard_test.cc
Normal file
220
test/hadamard_test.cc
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
|
|
||||||
|
#include "test/acm_random.h"
|
||||||
|
#include "test/register_state_check.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
using ::libvpx_test::ACMRandom;
|
||||||
|
|
||||||
|
typedef void (*HadamardFunc)(const int16_t *a, int a_stride, int16_t *b);
|
||||||
|
|
||||||
|
void hadamard_loop(const int16_t *a, int a_stride, int16_t *out) {
|
||||||
|
int16_t b[8];
|
||||||
|
for (int i = 0; i < 8; i += 2) {
|
||||||
|
b[i + 0] = a[i * a_stride] + a[(i + 1) * a_stride];
|
||||||
|
b[i + 1] = a[i * a_stride] - a[(i + 1) * a_stride];
|
||||||
|
}
|
||||||
|
int16_t c[8];
|
||||||
|
for (int i = 0; i < 8; i += 4) {
|
||||||
|
c[i + 0] = b[i + 0] + b[i + 2];
|
||||||
|
c[i + 1] = b[i + 1] + b[i + 3];
|
||||||
|
c[i + 2] = b[i + 0] - b[i + 2];
|
||||||
|
c[i + 3] = b[i + 1] - b[i + 3];
|
||||||
|
}
|
||||||
|
out[0] = c[0] + c[4];
|
||||||
|
out[7] = c[1] + c[5];
|
||||||
|
out[3] = c[2] + c[6];
|
||||||
|
out[4] = c[3] + c[7];
|
||||||
|
out[2] = c[0] - c[4];
|
||||||
|
out[6] = c[1] - c[5];
|
||||||
|
out[1] = c[2] - c[6];
|
||||||
|
out[5] = c[3] - c[7];
|
||||||
|
}
|
||||||
|
|
||||||
|
void reference_hadamard8x8(const int16_t *a, int a_stride, int16_t *b) {
|
||||||
|
int16_t buf[64];
|
||||||
|
for (int i = 0; i < 8; ++i) {
|
||||||
|
hadamard_loop(a + i, a_stride, buf + i * 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < 8; ++i) {
|
||||||
|
hadamard_loop(buf + i, 8, b + i * 8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void reference_hadamard16x16(const int16_t *a, int a_stride, int16_t *b) {
|
||||||
|
/* The source is a 16x16 block. The destination is rearranged to 8x32.
|
||||||
|
* Input is 9 bit. */
|
||||||
|
reference_hadamard8x8(a + 0 + 0 * a_stride, a_stride, b + 0);
|
||||||
|
reference_hadamard8x8(a + 8 + 0 * a_stride, a_stride, b + 64);
|
||||||
|
reference_hadamard8x8(a + 0 + 8 * a_stride, a_stride, b + 128);
|
||||||
|
reference_hadamard8x8(a + 8 + 8 * a_stride, a_stride, b + 192);
|
||||||
|
|
||||||
|
/* Overlay the 8x8 blocks and combine. */
|
||||||
|
for (int i = 0; i < 64; ++i) {
|
||||||
|
/* 8x8 steps the range up to 15 bits. */
|
||||||
|
const int16_t a0 = b[0];
|
||||||
|
const int16_t a1 = b[64];
|
||||||
|
const int16_t a2 = b[128];
|
||||||
|
const int16_t a3 = b[192];
|
||||||
|
|
||||||
|
/* Prevent the result from escaping int16_t. */
|
||||||
|
const int16_t b0 = (a0 + a1) >> 1;
|
||||||
|
const int16_t b1 = (a0 - a1) >> 1;
|
||||||
|
const int16_t b2 = (a2 + a3) >> 1;
|
||||||
|
const int16_t b3 = (a2 - a3) >> 1;
|
||||||
|
|
||||||
|
/* Store a 16 bit value. */
|
||||||
|
b[ 0] = b0 + b2;
|
||||||
|
b[ 64] = b1 + b3;
|
||||||
|
b[128] = b0 - b2;
|
||||||
|
b[192] = b1 - b3;
|
||||||
|
|
||||||
|
++b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class HadamardTestBase : public ::testing::TestWithParam<HadamardFunc> {
|
||||||
|
public:
|
||||||
|
virtual void SetUp() {
|
||||||
|
h_func_ = GetParam();
|
||||||
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
HadamardFunc h_func_;
|
||||||
|
ACMRandom rnd_;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Hadamard8x8Test : public HadamardTestBase {};
|
||||||
|
|
||||||
|
TEST_P(Hadamard8x8Test, CompareReferenceRandom) {
|
||||||
|
DECLARE_ALIGNED(16, int16_t, a[64]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, b[64]);
|
||||||
|
int16_t b_ref[64];
|
||||||
|
for (int i = 0; i < 64; ++i) {
|
||||||
|
a[i] = rnd_.Rand9Signed();
|
||||||
|
}
|
||||||
|
memset(b, 0, sizeof(b));
|
||||||
|
memset(b_ref, 0, sizeof(b_ref));
|
||||||
|
|
||||||
|
reference_hadamard8x8(a, 8, b_ref);
|
||||||
|
ASM_REGISTER_STATE_CHECK(h_func_(a, 8, b));
|
||||||
|
|
||||||
|
// The order of the output is not important. Sort before checking.
|
||||||
|
std::sort(b, b + 64);
|
||||||
|
std::sort(b_ref, b_ref + 64);
|
||||||
|
EXPECT_EQ(0, memcmp(b, b_ref, sizeof(b)));
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(Hadamard8x8Test, VaryStride) {
|
||||||
|
DECLARE_ALIGNED(16, int16_t, a[64 * 8]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, b[64]);
|
||||||
|
int16_t b_ref[64];
|
||||||
|
for (int i = 0; i < 64 * 8; ++i) {
|
||||||
|
a[i] = rnd_.Rand9Signed();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 8; i < 64; i += 8) {
|
||||||
|
memset(b, 0, sizeof(b));
|
||||||
|
memset(b_ref, 0, sizeof(b_ref));
|
||||||
|
|
||||||
|
reference_hadamard8x8(a, i, b_ref);
|
||||||
|
ASM_REGISTER_STATE_CHECK(h_func_(a, i, b));
|
||||||
|
|
||||||
|
// The order of the output is not important. Sort before checking.
|
||||||
|
std::sort(b, b + 64);
|
||||||
|
std::sort(b_ref, b_ref + 64);
|
||||||
|
EXPECT_EQ(0, memcmp(b, b_ref, sizeof(b)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(C, Hadamard8x8Test,
|
||||||
|
::testing::Values(&vpx_hadamard_8x8_c));
|
||||||
|
|
||||||
|
#if HAVE_SSE2
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, Hadamard8x8Test,
|
||||||
|
::testing::Values(&vpx_hadamard_8x8_sse2));
|
||||||
|
#endif // HAVE_SSE2
|
||||||
|
|
||||||
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSSE3, Hadamard8x8Test,
|
||||||
|
::testing::Values(&vpx_hadamard_8x8_ssse3));
|
||||||
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64
|
||||||
|
|
||||||
|
#if HAVE_NEON
|
||||||
|
INSTANTIATE_TEST_CASE_P(NEON, Hadamard8x8Test,
|
||||||
|
::testing::Values(&vpx_hadamard_8x8_neon));
|
||||||
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
|
class Hadamard16x16Test : public HadamardTestBase {};
|
||||||
|
|
||||||
|
TEST_P(Hadamard16x16Test, CompareReferenceRandom) {
|
||||||
|
DECLARE_ALIGNED(16, int16_t, a[16 * 16]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, b[16 * 16]);
|
||||||
|
int16_t b_ref[16 * 16];
|
||||||
|
for (int i = 0; i < 16 * 16; ++i) {
|
||||||
|
a[i] = rnd_.Rand9Signed();
|
||||||
|
}
|
||||||
|
memset(b, 0, sizeof(b));
|
||||||
|
memset(b_ref, 0, sizeof(b_ref));
|
||||||
|
|
||||||
|
reference_hadamard16x16(a, 16, b_ref);
|
||||||
|
ASM_REGISTER_STATE_CHECK(h_func_(a, 16, b));
|
||||||
|
|
||||||
|
// The order of the output is not important. Sort before checking.
|
||||||
|
std::sort(b, b + 16 * 16);
|
||||||
|
std::sort(b_ref, b_ref + 16 * 16);
|
||||||
|
EXPECT_EQ(0, memcmp(b, b_ref, sizeof(b)));
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(Hadamard16x16Test, VaryStride) {
|
||||||
|
DECLARE_ALIGNED(16, int16_t, a[16 * 16 * 8]);
|
||||||
|
DECLARE_ALIGNED(16, int16_t, b[16 * 16]);
|
||||||
|
int16_t b_ref[16 * 16];
|
||||||
|
for (int i = 0; i < 16 * 16 * 8; ++i) {
|
||||||
|
a[i] = rnd_.Rand9Signed();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 8; i < 64; i += 8) {
|
||||||
|
memset(b, 0, sizeof(b));
|
||||||
|
memset(b_ref, 0, sizeof(b_ref));
|
||||||
|
|
||||||
|
reference_hadamard16x16(a, i, b_ref);
|
||||||
|
ASM_REGISTER_STATE_CHECK(h_func_(a, i, b));
|
||||||
|
|
||||||
|
// The order of the output is not important. Sort before checking.
|
||||||
|
std::sort(b, b + 16 * 16);
|
||||||
|
std::sort(b_ref, b_ref + 16 * 16);
|
||||||
|
EXPECT_EQ(0, memcmp(b, b_ref, sizeof(b)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(C, Hadamard16x16Test,
|
||||||
|
::testing::Values(&vpx_hadamard_16x16_c));
|
||||||
|
|
||||||
|
#if HAVE_SSE2
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, Hadamard16x16Test,
|
||||||
|
::testing::Values(&vpx_hadamard_16x16_sse2));
|
||||||
|
#endif // HAVE_SSE2
|
||||||
|
|
||||||
|
#if HAVE_NEON
|
||||||
|
INSTANTIATE_TEST_CASE_P(NEON, Hadamard16x16Test,
|
||||||
|
::testing::Values(&vpx_hadamard_16x16_neon));
|
||||||
|
#endif // HAVE_NEON
|
||||||
|
} // namespace
|
||||||
@@ -1,406 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by a BSD-style license
|
|
||||||
* that can be found in the LICENSE file in the root of the source
|
|
||||||
* tree. An additional intellectual property rights grant can be found
|
|
||||||
* in the file PATENTS. All contributing project authors may
|
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
|
||||||
|
|
||||||
#include "./vpx_config.h"
|
|
||||||
#include "./vp8_rtcd.h"
|
|
||||||
#include "test/acm_random.h"
|
|
||||||
#include "test/clear_system_state.h"
|
|
||||||
#include "test/register_state_check.h"
|
|
||||||
#include "vp8/common/blockd.h"
|
|
||||||
#include "vpx_mem/vpx_mem.h"
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
using libvpx_test::ACMRandom;
|
|
||||||
|
|
||||||
class IntraPredBase {
|
|
||||||
public:
|
|
||||||
virtual ~IntraPredBase() { libvpx_test::ClearSystemState(); }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void SetupMacroblock(MACROBLOCKD *mbptr,
|
|
||||||
MODE_INFO *miptr,
|
|
||||||
uint8_t *data,
|
|
||||||
int block_size,
|
|
||||||
int stride,
|
|
||||||
int num_planes) {
|
|
||||||
mbptr_ = mbptr;
|
|
||||||
miptr_ = miptr;
|
|
||||||
mbptr_->up_available = 1;
|
|
||||||
mbptr_->left_available = 1;
|
|
||||||
mbptr_->mode_info_context = miptr_;
|
|
||||||
stride_ = stride;
|
|
||||||
block_size_ = block_size;
|
|
||||||
num_planes_ = num_planes;
|
|
||||||
for (int p = 0; p < num_planes; p++)
|
|
||||||
data_ptr_[p] = data + stride * (block_size + 1) * p +
|
|
||||||
stride + block_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FillRandom() {
|
|
||||||
// Fill edges with random data
|
|
||||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
|
||||||
for (int p = 0; p < num_planes_; p++) {
|
|
||||||
for (int x = -1 ; x <= block_size_; x++)
|
|
||||||
data_ptr_[p][x - stride_] = rnd.Rand8();
|
|
||||||
for (int y = 0; y < block_size_; y++)
|
|
||||||
data_ptr_[p][y * stride_ - 1] = rnd.Rand8();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void Predict(MB_PREDICTION_MODE mode) = 0;
|
|
||||||
|
|
||||||
void SetLeftUnavailable() {
|
|
||||||
mbptr_->left_available = 0;
|
|
||||||
for (int p = 0; p < num_planes_; p++)
|
|
||||||
for (int i = -1; i < block_size_; ++i)
|
|
||||||
data_ptr_[p][stride_ * i - 1] = 129;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetTopUnavailable() {
|
|
||||||
mbptr_->up_available = 0;
|
|
||||||
for (int p = 0; p < num_planes_; p++)
|
|
||||||
memset(&data_ptr_[p][-1 - stride_], 127, block_size_ + 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetTopLeftUnavailable() {
|
|
||||||
SetLeftUnavailable();
|
|
||||||
SetTopUnavailable();
|
|
||||||
}
|
|
||||||
|
|
||||||
int BlockSizeLog2Min1() const {
|
|
||||||
switch (block_size_) {
|
|
||||||
case 16:
|
|
||||||
return 3;
|
|
||||||
case 8:
|
|
||||||
return 2;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// check DC prediction output against a reference
|
|
||||||
void CheckDCPrediction() const {
|
|
||||||
for (int p = 0; p < num_planes_; p++) {
|
|
||||||
// calculate expected DC
|
|
||||||
int expected;
|
|
||||||
if (mbptr_->up_available || mbptr_->left_available) {
|
|
||||||
int sum = 0, shift = BlockSizeLog2Min1() + mbptr_->up_available +
|
|
||||||
mbptr_->left_available;
|
|
||||||
if (mbptr_->up_available)
|
|
||||||
for (int x = 0; x < block_size_; x++)
|
|
||||||
sum += data_ptr_[p][x - stride_];
|
|
||||||
if (mbptr_->left_available)
|
|
||||||
for (int y = 0; y < block_size_; y++)
|
|
||||||
sum += data_ptr_[p][y * stride_ - 1];
|
|
||||||
expected = (sum + (1 << (shift - 1))) >> shift;
|
|
||||||
} else {
|
|
||||||
expected = 0x80;
|
|
||||||
}
|
|
||||||
// check that all subsequent lines are equal to the first
|
|
||||||
for (int y = 1; y < block_size_; ++y)
|
|
||||||
ASSERT_EQ(0, memcmp(data_ptr_[p], &data_ptr_[p][y * stride_],
|
|
||||||
block_size_));
|
|
||||||
// within the first line, ensure that each pixel has the same value
|
|
||||||
for (int x = 1; x < block_size_; ++x)
|
|
||||||
ASSERT_EQ(data_ptr_[p][0], data_ptr_[p][x]);
|
|
||||||
// now ensure that that pixel has the expected (DC) value
|
|
||||||
ASSERT_EQ(expected, data_ptr_[p][0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// check V prediction output against a reference
|
|
||||||
void CheckVPrediction() const {
|
|
||||||
// check that all lines equal the top border
|
|
||||||
for (int p = 0; p < num_planes_; p++)
|
|
||||||
for (int y = 0; y < block_size_; y++)
|
|
||||||
ASSERT_EQ(0, memcmp(&data_ptr_[p][-stride_],
|
|
||||||
&data_ptr_[p][y * stride_], block_size_));
|
|
||||||
}
|
|
||||||
|
|
||||||
// check H prediction output against a reference
|
|
||||||
void CheckHPrediction() const {
|
|
||||||
// for each line, ensure that each pixel is equal to the left border
|
|
||||||
for (int p = 0; p < num_planes_; p++)
|
|
||||||
for (int y = 0; y < block_size_; y++)
|
|
||||||
for (int x = 0; x < block_size_; x++)
|
|
||||||
ASSERT_EQ(data_ptr_[p][-1 + y * stride_],
|
|
||||||
data_ptr_[p][x + y * stride_]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ClipByte(int value) {
|
|
||||||
if (value > 255)
|
|
||||||
return 255;
|
|
||||||
else if (value < 0)
|
|
||||||
return 0;
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check TM prediction output against a reference
|
|
||||||
void CheckTMPrediction() const {
|
|
||||||
for (int p = 0; p < num_planes_; p++)
|
|
||||||
for (int y = 0; y < block_size_; y++)
|
|
||||||
for (int x = 0; x < block_size_; x++) {
|
|
||||||
const int expected = ClipByte(data_ptr_[p][x - stride_]
|
|
||||||
+ data_ptr_[p][stride_ * y - 1]
|
|
||||||
- data_ptr_[p][-1 - stride_]);
|
|
||||||
ASSERT_EQ(expected, data_ptr_[p][y * stride_ + x]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Actual test
|
|
||||||
void RunTest() {
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("DC_PRED");
|
|
||||||
FillRandom();
|
|
||||||
Predict(DC_PRED);
|
|
||||||
CheckDCPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("DC_PRED LEFT");
|
|
||||||
FillRandom();
|
|
||||||
SetLeftUnavailable();
|
|
||||||
Predict(DC_PRED);
|
|
||||||
CheckDCPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("DC_PRED TOP");
|
|
||||||
FillRandom();
|
|
||||||
SetTopUnavailable();
|
|
||||||
Predict(DC_PRED);
|
|
||||||
CheckDCPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("DC_PRED TOP_LEFT");
|
|
||||||
FillRandom();
|
|
||||||
SetTopLeftUnavailable();
|
|
||||||
Predict(DC_PRED);
|
|
||||||
CheckDCPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("H_PRED");
|
|
||||||
FillRandom();
|
|
||||||
Predict(H_PRED);
|
|
||||||
CheckHPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("V_PRED");
|
|
||||||
FillRandom();
|
|
||||||
Predict(V_PRED);
|
|
||||||
CheckVPrediction();
|
|
||||||
}
|
|
||||||
{
|
|
||||||
SCOPED_TRACE("TM_PRED");
|
|
||||||
FillRandom();
|
|
||||||
Predict(TM_PRED);
|
|
||||||
CheckTMPrediction();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MACROBLOCKD *mbptr_;
|
|
||||||
MODE_INFO *miptr_;
|
|
||||||
uint8_t *data_ptr_[2]; // in the case of Y, only [0] is used
|
|
||||||
int stride_;
|
|
||||||
int block_size_;
|
|
||||||
int num_planes_;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef void (*IntraPredYFunc)(MACROBLOCKD *x,
|
|
||||||
uint8_t *yabove_row,
|
|
||||||
uint8_t *yleft,
|
|
||||||
int left_stride,
|
|
||||||
uint8_t *ypred_ptr,
|
|
||||||
int y_stride);
|
|
||||||
|
|
||||||
class IntraPredYTest
|
|
||||||
: public IntraPredBase,
|
|
||||||
public ::testing::TestWithParam<IntraPredYFunc> {
|
|
||||||
public:
|
|
||||||
static void SetUpTestCase() {
|
|
||||||
mb_ = reinterpret_cast<MACROBLOCKD*>(
|
|
||||||
vpx_memalign(32, sizeof(MACROBLOCKD)));
|
|
||||||
mi_ = reinterpret_cast<MODE_INFO*>(
|
|
||||||
vpx_memalign(32, sizeof(MODE_INFO)));
|
|
||||||
data_array_ = reinterpret_cast<uint8_t*>(
|
|
||||||
vpx_memalign(kDataAlignment, kDataBufferSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TearDownTestCase() {
|
|
||||||
vpx_free(data_array_);
|
|
||||||
vpx_free(mi_);
|
|
||||||
vpx_free(mb_);
|
|
||||||
data_array_ = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
static const int kBlockSize = 16;
|
|
||||||
static const int kDataAlignment = 16;
|
|
||||||
static const int kStride = kBlockSize * 3;
|
|
||||||
// We use 48 so that the data pointer of the first pixel in each row of
|
|
||||||
// each macroblock is 16-byte aligned, and this gives us access to the
|
|
||||||
// top-left and top-right corner pixels belonging to the top-left/right
|
|
||||||
// macroblocks.
|
|
||||||
// We use 17 lines so we have one line above us for top-prediction.
|
|
||||||
static const int kDataBufferSize = kStride * (kBlockSize + 1);
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
pred_fn_ = GetParam();
|
|
||||||
SetupMacroblock(mb_, mi_, data_array_, kBlockSize, kStride, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void Predict(MB_PREDICTION_MODE mode) {
|
|
||||||
mbptr_->mode_info_context->mbmi.mode = mode;
|
|
||||||
ASM_REGISTER_STATE_CHECK(pred_fn_(mbptr_,
|
|
||||||
data_ptr_[0] - kStride,
|
|
||||||
data_ptr_[0] - 1, kStride,
|
|
||||||
data_ptr_[0], kStride));
|
|
||||||
}
|
|
||||||
|
|
||||||
IntraPredYFunc pred_fn_;
|
|
||||||
static uint8_t* data_array_;
|
|
||||||
static MACROBLOCKD * mb_;
|
|
||||||
static MODE_INFO *mi_;
|
|
||||||
};
|
|
||||||
|
|
||||||
MACROBLOCKD* IntraPredYTest::mb_ = NULL;
|
|
||||||
MODE_INFO* IntraPredYTest::mi_ = NULL;
|
|
||||||
uint8_t* IntraPredYTest::data_array_ = NULL;
|
|
||||||
|
|
||||||
TEST_P(IntraPredYTest, IntraPredTests) {
|
|
||||||
RunTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(C, IntraPredYTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mby_s_c));
|
|
||||||
#if HAVE_SSE2
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2, IntraPredYTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mby_s_sse2));
|
|
||||||
#endif
|
|
||||||
#if HAVE_SSSE3
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSSE3, IntraPredYTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mby_s_ssse3));
|
|
||||||
#endif
|
|
||||||
#if HAVE_NEON
|
|
||||||
INSTANTIATE_TEST_CASE_P(NEON, IntraPredYTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mby_s_neon));
|
|
||||||
#endif
|
|
||||||
#if HAVE_MSA
|
|
||||||
INSTANTIATE_TEST_CASE_P(MSA, IntraPredYTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mby_s_msa));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef void (*IntraPredUvFunc)(MACROBLOCKD *x,
|
|
||||||
uint8_t *uabove_row,
|
|
||||||
uint8_t *vabove_row,
|
|
||||||
uint8_t *uleft,
|
|
||||||
uint8_t *vleft,
|
|
||||||
int left_stride,
|
|
||||||
uint8_t *upred_ptr,
|
|
||||||
uint8_t *vpred_ptr,
|
|
||||||
int pred_stride);
|
|
||||||
|
|
||||||
class IntraPredUVTest
|
|
||||||
: public IntraPredBase,
|
|
||||||
public ::testing::TestWithParam<IntraPredUvFunc> {
|
|
||||||
public:
|
|
||||||
static void SetUpTestCase() {
|
|
||||||
mb_ = reinterpret_cast<MACROBLOCKD*>(
|
|
||||||
vpx_memalign(32, sizeof(MACROBLOCKD)));
|
|
||||||
mi_ = reinterpret_cast<MODE_INFO*>(
|
|
||||||
vpx_memalign(32, sizeof(MODE_INFO)));
|
|
||||||
data_array_ = reinterpret_cast<uint8_t*>(
|
|
||||||
vpx_memalign(kDataAlignment, kDataBufferSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TearDownTestCase() {
|
|
||||||
vpx_free(data_array_);
|
|
||||||
vpx_free(mi_);
|
|
||||||
vpx_free(mb_);
|
|
||||||
data_array_ = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
static const int kBlockSize = 8;
|
|
||||||
static const int kDataAlignment = 8;
|
|
||||||
static const int kStride = kBlockSize * 3;
|
|
||||||
// We use 24 so that the data pointer of the first pixel in each row of
|
|
||||||
// each macroblock is 8-byte aligned, and this gives us access to the
|
|
||||||
// top-left and top-right corner pixels belonging to the top-left/right
|
|
||||||
// macroblocks.
|
|
||||||
// We use 9 lines so we have one line above us for top-prediction.
|
|
||||||
// [0] = U, [1] = V
|
|
||||||
static const int kDataBufferSize = 2 * kStride * (kBlockSize + 1);
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
|
||||||
pred_fn_ = GetParam();
|
|
||||||
SetupMacroblock(mb_, mi_, data_array_, kBlockSize, kStride, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void Predict(MB_PREDICTION_MODE mode) {
|
|
||||||
mbptr_->mode_info_context->mbmi.uv_mode = mode;
|
|
||||||
pred_fn_(mbptr_, data_ptr_[0] - kStride, data_ptr_[1] - kStride,
|
|
||||||
data_ptr_[0] - 1, data_ptr_[1] - 1, kStride,
|
|
||||||
data_ptr_[0], data_ptr_[1], kStride);
|
|
||||||
}
|
|
||||||
|
|
||||||
IntraPredUvFunc pred_fn_;
|
|
||||||
// We use 24 so that the data pointer of the first pixel in each row of
|
|
||||||
// each macroblock is 8-byte aligned, and this gives us access to the
|
|
||||||
// top-left and top-right corner pixels belonging to the top-left/right
|
|
||||||
// macroblocks.
|
|
||||||
// We use 9 lines so we have one line above us for top-prediction.
|
|
||||||
// [0] = U, [1] = V
|
|
||||||
static uint8_t* data_array_;
|
|
||||||
static MACROBLOCKD* mb_;
|
|
||||||
static MODE_INFO* mi_;
|
|
||||||
};
|
|
||||||
|
|
||||||
MACROBLOCKD* IntraPredUVTest::mb_ = NULL;
|
|
||||||
MODE_INFO* IntraPredUVTest::mi_ = NULL;
|
|
||||||
uint8_t* IntraPredUVTest::data_array_ = NULL;
|
|
||||||
|
|
||||||
TEST_P(IntraPredUVTest, IntraPredTests) {
|
|
||||||
RunTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(C, IntraPredUVTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mbuv_s_c));
|
|
||||||
#if HAVE_SSE2
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2, IntraPredUVTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mbuv_s_sse2));
|
|
||||||
#endif
|
|
||||||
#if HAVE_SSSE3
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSSE3, IntraPredUVTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mbuv_s_ssse3));
|
|
||||||
#endif
|
|
||||||
#if HAVE_NEON
|
|
||||||
INSTANTIATE_TEST_CASE_P(NEON, IntraPredUVTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mbuv_s_neon));
|
|
||||||
#endif
|
|
||||||
#if HAVE_MSA
|
|
||||||
INSTANTIATE_TEST_CASE_P(MSA, IntraPredUVTest,
|
|
||||||
::testing::Values(
|
|
||||||
vp8_build_intra_predictors_mbuv_s_msa));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
@@ -63,9 +63,22 @@ class InvalidFileTest
|
|||||||
EXPECT_NE(res, EOF) << "Read result data failed";
|
EXPECT_NE(res, EOF) << "Read result data failed";
|
||||||
|
|
||||||
// Check results match.
|
// Check results match.
|
||||||
|
const DecodeParam input = GET_PARAM(1);
|
||||||
|
if (input.threads > 1) {
|
||||||
|
// The serial decode check is too strict for tile-threaded decoding as
|
||||||
|
// there is no guarantee on the decode order nor which specific error
|
||||||
|
// will take precedence. Currently a tile-level error is not forwarded so
|
||||||
|
// the frame will simply be marked corrupt.
|
||||||
|
EXPECT_TRUE(res_dec == expected_res_dec ||
|
||||||
|
res_dec == VPX_CODEC_CORRUPT_FRAME)
|
||||||
|
<< "Results don't match: frame number = " << video.frame_number()
|
||||||
|
<< ". (" << decoder->DecodeError() << "). Expected: "
|
||||||
|
<< expected_res_dec << " or " << VPX_CODEC_CORRUPT_FRAME;
|
||||||
|
} else {
|
||||||
EXPECT_EQ(expected_res_dec, res_dec)
|
EXPECT_EQ(expected_res_dec, res_dec)
|
||||||
<< "Results don't match: frame number = " << video.frame_number()
|
<< "Results don't match: frame number = " << video.frame_number()
|
||||||
<< ". (" << decoder->DecodeError() << ")";
|
<< ". (" << decoder->DecodeError() << ")";
|
||||||
|
}
|
||||||
|
|
||||||
return !HasFailure();
|
return !HasFailure();
|
||||||
}
|
}
|
||||||
|
|||||||
119
test/level_test.cc
Normal file
119
test/level_test.cc
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
#include "test/codec_factory.h"
|
||||||
|
#include "test/encode_test_driver.h"
|
||||||
|
#include "test/i420_video_source.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
class LevelTest
|
||||||
|
: public ::libvpx_test::EncoderTest,
|
||||||
|
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||||
|
protected:
|
||||||
|
LevelTest()
|
||||||
|
: EncoderTest(GET_PARAM(0)),
|
||||||
|
encoding_mode_(GET_PARAM(1)),
|
||||||
|
cpu_used_(GET_PARAM(2)),
|
||||||
|
min_gf_internal_(24),
|
||||||
|
target_level_(0),
|
||||||
|
level_(0) {}
|
||||||
|
virtual ~LevelTest() {}
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
InitializeConfig();
|
||||||
|
SetMode(encoding_mode_);
|
||||||
|
if (encoding_mode_ != ::libvpx_test::kRealTime) {
|
||||||
|
cfg_.g_lag_in_frames = 25;
|
||||||
|
cfg_.rc_end_usage = VPX_VBR;
|
||||||
|
} else {
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
|
}
|
||||||
|
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
||||||
|
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
|
||||||
|
cfg_.rc_target_bitrate = 400;
|
||||||
|
cfg_.rc_max_quantizer = 63;
|
||||||
|
cfg_.rc_min_quantizer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
||||||
|
::libvpx_test::Encoder *encoder) {
|
||||||
|
if (video->frame() == 0) {
|
||||||
|
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
|
||||||
|
encoder->Control(VP9E_SET_TARGET_LEVEL, target_level_);
|
||||||
|
encoder->Control(VP9E_SET_MIN_GF_INTERVAL, min_gf_internal_);
|
||||||
|
if (encoding_mode_ != ::libvpx_test::kRealTime) {
|
||||||
|
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
|
||||||
|
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
|
||||||
|
encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
|
||||||
|
encoder->Control(VP8E_SET_ARNR_TYPE, 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
encoder->Control(VP9E_GET_LEVEL, &level_);
|
||||||
|
ASSERT_LE(level_, 51);
|
||||||
|
ASSERT_GE(level_, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
::libvpx_test::TestMode encoding_mode_;
|
||||||
|
int cpu_used_;
|
||||||
|
int min_gf_internal_;
|
||||||
|
int target_level_;
|
||||||
|
int level_;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Test for keeping level stats only
|
||||||
|
TEST_P(LevelTest, TestTargetLevel0) {
|
||||||
|
::libvpx_test::I420VideoSource video("hantro_odd.yuv", 208, 144, 30, 1, 0,
|
||||||
|
40);
|
||||||
|
target_level_ = 0;
|
||||||
|
min_gf_internal_ = 4;
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
ASSERT_EQ(11, level_);
|
||||||
|
|
||||||
|
cfg_.rc_target_bitrate = 1600;
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
ASSERT_EQ(20, level_);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test for level control being turned off
|
||||||
|
TEST_P(LevelTest, TestTargetLevel255) {
|
||||||
|
::libvpx_test::I420VideoSource video("hantro_odd.yuv", 208, 144, 30, 1, 0,
|
||||||
|
30);
|
||||||
|
target_level_ = 255;
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(LevelTest, TestTargetLevelApi) {
|
||||||
|
::libvpx_test::I420VideoSource video("hantro_odd.yuv", 208, 144, 30, 1, 0, 1);
|
||||||
|
static const vpx_codec_iface_t *codec = &vpx_codec_vp9_cx_algo;
|
||||||
|
vpx_codec_ctx_t enc;
|
||||||
|
vpx_codec_enc_cfg_t cfg;
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_enc_config_default(codec, &cfg, 0));
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_enc_init(&enc, codec, &cfg, 0));
|
||||||
|
for (int level = 0; level <= 256; ++level) {
|
||||||
|
if (level == 10 || level == 11 || level == 20 || level == 21 ||
|
||||||
|
level == 30 || level == 31 || level == 40 || level == 41 ||
|
||||||
|
level == 50 || level == 51 || level == 52 || level == 60 ||
|
||||||
|
level == 61 || level == 62 || level == 0 || level == 255)
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK,
|
||||||
|
vpx_codec_control(&enc, VP9E_SET_TARGET_LEVEL, level));
|
||||||
|
else
|
||||||
|
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||||
|
vpx_codec_control(&enc, VP9E_SET_TARGET_LEVEL, level));
|
||||||
|
}
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&enc));
|
||||||
|
}
|
||||||
|
|
||||||
|
VP9_INSTANTIATE_TEST_CASE(LevelTest,
|
||||||
|
::testing::Values(::libvpx_test::kTwoPassGood,
|
||||||
|
::libvpx_test::kOnePassGood),
|
||||||
|
::testing::Range(0, 9));
|
||||||
|
} // namespace
|
||||||
@@ -37,120 +37,23 @@ const int number_of_iterations = 10000;
|
|||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
typedef void (*loop_op_t)(uint16_t *s, int p, const uint8_t *blimit,
|
typedef void (*loop_op_t)(uint16_t *s, int p, const uint8_t *blimit,
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
const uint8_t *limit, const uint8_t *thresh,
|
||||||
int count, int bd);
|
int bd);
|
||||||
typedef void (*dual_loop_op_t)(uint16_t *s, int p, const uint8_t *blimit0,
|
typedef void (*dual_loop_op_t)(uint16_t *s, int p, const uint8_t *blimit0,
|
||||||
const uint8_t *limit0, const uint8_t *thresh0,
|
const uint8_t *limit0, const uint8_t *thresh0,
|
||||||
const uint8_t *blimit1, const uint8_t *limit1,
|
const uint8_t *blimit1, const uint8_t *limit1,
|
||||||
const uint8_t *thresh1, int bd);
|
const uint8_t *thresh1, int bd);
|
||||||
#else
|
#else
|
||||||
typedef void (*loop_op_t)(uint8_t *s, int p, const uint8_t *blimit,
|
typedef void (*loop_op_t)(uint8_t *s, int p, const uint8_t *blimit,
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
const uint8_t *limit, const uint8_t *thresh);
|
||||||
int count);
|
|
||||||
typedef void (*dual_loop_op_t)(uint8_t *s, int p, const uint8_t *blimit0,
|
typedef void (*dual_loop_op_t)(uint8_t *s, int p, const uint8_t *blimit0,
|
||||||
const uint8_t *limit0, const uint8_t *thresh0,
|
const uint8_t *limit0, const uint8_t *thresh0,
|
||||||
const uint8_t *blimit1, const uint8_t *limit1,
|
const uint8_t *blimit1, const uint8_t *limit1,
|
||||||
const uint8_t *thresh1);
|
const uint8_t *thresh1);
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
typedef std::tr1::tuple<loop_op_t, loop_op_t, int, int> loop8_param_t;
|
typedef std::tr1::tuple<loop_op_t, loop_op_t, int> loop8_param_t;
|
||||||
typedef std::tr1::tuple<dual_loop_op_t, dual_loop_op_t, int> dualloop8_param_t;
|
typedef std::tr1::tuple<dual_loop_op_t, dual_loop_op_t, int> dualloop8_param_t;
|
||||||
|
|
||||||
#if HAVE_SSE2
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
|
||||||
void wrapper_vertical_16_sse2(uint16_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count, int bd) {
|
|
||||||
vpx_highbd_lpf_vertical_16_sse2(s, p, blimit, limit, thresh, bd);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrapper_vertical_16_c(uint16_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count, int bd) {
|
|
||||||
vpx_highbd_lpf_vertical_16_c(s, p, blimit, limit, thresh, bd);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrapper_vertical_16_dual_sse2(uint16_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count, int bd) {
|
|
||||||
vpx_highbd_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh, bd);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrapper_vertical_16_dual_c(uint16_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count, int bd) {
|
|
||||||
vpx_highbd_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh, bd);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void wrapper_vertical_16_sse2(uint8_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count) {
|
|
||||||
vpx_lpf_vertical_16_sse2(s, p, blimit, limit, thresh);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count) {
|
|
||||||
vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrapper_vertical_16_dual_sse2(uint8_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count) {
|
|
||||||
vpx_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count) {
|
|
||||||
vpx_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
|
|
||||||
}
|
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
|
||||||
#endif // HAVE_SSE2
|
|
||||||
|
|
||||||
#if HAVE_NEON_ASM
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
|
||||||
// No neon high bitdepth functions.
|
|
||||||
#else
|
|
||||||
void wrapper_vertical_16_neon(uint8_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count) {
|
|
||||||
vpx_lpf_vertical_16_neon(s, p, blimit, limit, thresh);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count) {
|
|
||||||
vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrapper_vertical_16_dual_neon(uint8_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count) {
|
|
||||||
vpx_lpf_vertical_16_dual_neon(s, p, blimit, limit, thresh);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count) {
|
|
||||||
vpx_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh);
|
|
||||||
}
|
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
|
||||||
#endif // HAVE_NEON_ASM
|
|
||||||
|
|
||||||
#if HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
|
|
||||||
void wrapper_vertical_16_msa(uint8_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count) {
|
|
||||||
vpx_lpf_vertical_16_msa(s, p, blimit, limit, thresh);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit,
|
|
||||||
const uint8_t *limit, const uint8_t *thresh,
|
|
||||||
int count) {
|
|
||||||
vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh);
|
|
||||||
}
|
|
||||||
#endif // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
|
|
||||||
|
|
||||||
class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
|
class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
|
||||||
public:
|
public:
|
||||||
virtual ~Loop8Test6Param() {}
|
virtual ~Loop8Test6Param() {}
|
||||||
@@ -158,7 +61,6 @@ class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
|
|||||||
loopfilter_op_ = GET_PARAM(0);
|
loopfilter_op_ = GET_PARAM(0);
|
||||||
ref_loopfilter_op_ = GET_PARAM(1);
|
ref_loopfilter_op_ = GET_PARAM(1);
|
||||||
bit_depth_ = GET_PARAM(2);
|
bit_depth_ = GET_PARAM(2);
|
||||||
count_ = GET_PARAM(3);
|
|
||||||
mask_ = (1 << bit_depth_) - 1;
|
mask_ = (1 << bit_depth_) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +68,6 @@ class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
int bit_depth_;
|
int bit_depth_;
|
||||||
int count_;
|
|
||||||
int mask_;
|
int mask_;
|
||||||
loop_op_t loopfilter_op_;
|
loop_op_t loopfilter_op_;
|
||||||
loop_op_t ref_loopfilter_op_;
|
loop_op_t ref_loopfilter_op_;
|
||||||
@@ -253,13 +154,13 @@ TEST_P(Loop8Test6Param, OperationCheck) {
|
|||||||
ref_s[j] = s[j];
|
ref_s[j] = s[j];
|
||||||
}
|
}
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, count_, bd);
|
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, bd);
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count_, bd));
|
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, bd));
|
||||||
#else
|
#else
|
||||||
ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh, count_);
|
ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh);
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count_));
|
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
@@ -325,13 +226,13 @@ TEST_P(Loop8Test6Param, ValueCheck) {
|
|||||||
ref_s[j] = s[j];
|
ref_s[j] = s[j];
|
||||||
}
|
}
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, count_, bd);
|
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, bd);
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count_, bd));
|
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, bd));
|
||||||
#else
|
#else
|
||||||
ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh, count_);
|
ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh);
|
||||||
ASM_REGISTER_STATE_CHECK(
|
ASM_REGISTER_STATE_CHECK(
|
||||||
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, count_));
|
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
for (int j = 0; j < kNumCoeffs; ++j) {
|
for (int j = 0; j < kNumCoeffs; ++j) {
|
||||||
err_count += ref_s[j] != s[j];
|
err_count += ref_s[j] != s[j];
|
||||||
@@ -535,64 +436,73 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
SSE2, Loop8Test6Param,
|
SSE2, Loop8Test6Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_4_c, 8, 1),
|
&vpx_highbd_lpf_horizontal_4_c, 8),
|
||||||
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
||||||
&vpx_highbd_lpf_vertical_4_c, 8, 1),
|
&vpx_highbd_lpf_vertical_4_c, 8),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_8_c, 8, 1),
|
&vpx_highbd_lpf_horizontal_8_c, 8),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_edge_8_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_16_c, 8, 1),
|
&vpx_highbd_lpf_horizontal_edge_8_c, 8),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_edge_16_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_16_c, 8, 2),
|
&vpx_highbd_lpf_horizontal_edge_16_c, 8),
|
||||||
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||||
&vpx_highbd_lpf_vertical_8_c, 8, 1),
|
&vpx_highbd_lpf_vertical_8_c, 8),
|
||||||
make_tuple(&wrapper_vertical_16_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_16_sse2,
|
||||||
&wrapper_vertical_16_c, 8, 1),
|
&vpx_highbd_lpf_vertical_16_c, 8),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_4_c, 10, 1),
|
&vpx_highbd_lpf_horizontal_4_c, 10),
|
||||||
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
||||||
&vpx_highbd_lpf_vertical_4_c, 10, 1),
|
&vpx_highbd_lpf_vertical_4_c, 10),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_8_c, 10, 1),
|
&vpx_highbd_lpf_horizontal_8_c, 10),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_edge_8_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_16_c, 10, 1),
|
&vpx_highbd_lpf_horizontal_edge_8_c, 10),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_edge_16_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_16_c, 10, 2),
|
&vpx_highbd_lpf_horizontal_edge_16_c, 10),
|
||||||
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||||
&vpx_highbd_lpf_vertical_8_c, 10, 1),
|
&vpx_highbd_lpf_vertical_8_c, 10),
|
||||||
make_tuple(&wrapper_vertical_16_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_16_sse2,
|
||||||
&wrapper_vertical_16_c, 10, 1),
|
&vpx_highbd_lpf_vertical_16_c, 10),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_4_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_4_c, 12, 1),
|
&vpx_highbd_lpf_horizontal_4_c, 12),
|
||||||
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_4_sse2,
|
||||||
&vpx_highbd_lpf_vertical_4_c, 12, 1),
|
&vpx_highbd_lpf_vertical_4_c, 12),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_8_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_8_c, 12, 1),
|
&vpx_highbd_lpf_horizontal_8_c, 12),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_edge_8_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_16_c, 12, 1),
|
&vpx_highbd_lpf_horizontal_edge_8_c, 12),
|
||||||
make_tuple(&vpx_highbd_lpf_horizontal_16_sse2,
|
make_tuple(&vpx_highbd_lpf_horizontal_edge_16_sse2,
|
||||||
&vpx_highbd_lpf_horizontal_16_c, 12, 2),
|
&vpx_highbd_lpf_horizontal_edge_16_c, 12),
|
||||||
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_8_sse2,
|
||||||
&vpx_highbd_lpf_vertical_8_c, 12, 1),
|
&vpx_highbd_lpf_vertical_8_c, 12),
|
||||||
make_tuple(&wrapper_vertical_16_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_16_sse2,
|
||||||
&wrapper_vertical_16_c, 12, 1),
|
&vpx_highbd_lpf_vertical_16_c, 12),
|
||||||
make_tuple(&wrapper_vertical_16_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_16_dual_sse2,
|
||||||
&wrapper_vertical_16_dual_c, 8, 1),
|
&vpx_highbd_lpf_vertical_16_dual_c, 8),
|
||||||
make_tuple(&wrapper_vertical_16_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_16_dual_sse2,
|
||||||
&wrapper_vertical_16_dual_c, 10, 1),
|
&vpx_highbd_lpf_vertical_16_dual_c, 10),
|
||||||
make_tuple(&wrapper_vertical_16_dual_sse2,
|
make_tuple(&vpx_highbd_lpf_vertical_16_dual_sse2,
|
||||||
&wrapper_vertical_16_dual_c, 12, 1)));
|
&vpx_highbd_lpf_vertical_16_dual_c, 12)));
|
||||||
#else
|
#else
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, Loop8Test6Param,
|
SSE2, Loop8Test6Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vpx_lpf_horizontal_8_sse2, &vpx_lpf_horizontal_8_c, 8, 1),
|
make_tuple(&vpx_lpf_horizontal_4_sse2,
|
||||||
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 1),
|
&vpx_lpf_horizontal_4_c, 8),
|
||||||
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 2),
|
make_tuple(&vpx_lpf_horizontal_8_sse2,
|
||||||
make_tuple(&vpx_lpf_vertical_8_sse2, &vpx_lpf_vertical_8_c, 8, 1),
|
&vpx_lpf_horizontal_8_c, 8),
|
||||||
make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8, 1),
|
make_tuple(&vpx_lpf_horizontal_edge_8_sse2,
|
||||||
make_tuple(&wrapper_vertical_16_dual_sse2,
|
&vpx_lpf_horizontal_edge_8_c, 8),
|
||||||
&wrapper_vertical_16_dual_c, 8, 1)));
|
make_tuple(&vpx_lpf_horizontal_edge_16_sse2,
|
||||||
|
&vpx_lpf_horizontal_edge_16_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_4_sse2,
|
||||||
|
&vpx_lpf_vertical_4_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_8_sse2,
|
||||||
|
&vpx_lpf_vertical_8_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_16_sse2,
|
||||||
|
&vpx_lpf_vertical_16_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_16_dual_sse2,
|
||||||
|
&vpx_lpf_vertical_16_dual_c, 8)));
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -600,9 +510,10 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
AVX2, Loop8Test6Param,
|
AVX2, Loop8Test6Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vpx_lpf_horizontal_16_avx2, &vpx_lpf_horizontal_16_c, 8, 1),
|
make_tuple(&vpx_lpf_horizontal_edge_8_avx2,
|
||||||
make_tuple(&vpx_lpf_horizontal_16_avx2, &vpx_lpf_horizontal_16_c, 8,
|
&vpx_lpf_horizontal_edge_8_c, 8),
|
||||||
2)));
|
make_tuple(&vpx_lpf_horizontal_edge_16_avx2,
|
||||||
|
&vpx_lpf_horizontal_edge_16_c, 8)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
@@ -659,23 +570,23 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
#if HAVE_NEON_ASM
|
#if HAVE_NEON_ASM
|
||||||
// Using #if inside the macro is unsupported on MSVS but the tests are not
|
// Using #if inside the macro is unsupported on MSVS but the tests are not
|
||||||
// currently built for MSVS with ARM and NEON.
|
// currently built for MSVS with ARM and NEON.
|
||||||
make_tuple(&vpx_lpf_horizontal_16_neon,
|
make_tuple(&vpx_lpf_horizontal_edge_8_neon,
|
||||||
&vpx_lpf_horizontal_16_c, 8, 1),
|
&vpx_lpf_horizontal_edge_8_c, 8),
|
||||||
make_tuple(&vpx_lpf_horizontal_16_neon,
|
make_tuple(&vpx_lpf_horizontal_edge_16_neon,
|
||||||
&vpx_lpf_horizontal_16_c, 8, 2),
|
&vpx_lpf_horizontal_edge_16_c, 8),
|
||||||
make_tuple(&wrapper_vertical_16_neon,
|
make_tuple(&vpx_lpf_vertical_16_neon,
|
||||||
&wrapper_vertical_16_c, 8, 1),
|
&vpx_lpf_vertical_16_c, 8),
|
||||||
make_tuple(&wrapper_vertical_16_dual_neon,
|
make_tuple(&vpx_lpf_vertical_16_dual_neon,
|
||||||
&wrapper_vertical_16_dual_c, 8, 1),
|
&vpx_lpf_vertical_16_dual_c, 8),
|
||||||
#endif // HAVE_NEON_ASM
|
#endif // HAVE_NEON_ASM
|
||||||
make_tuple(&vpx_lpf_horizontal_8_neon,
|
make_tuple(&vpx_lpf_horizontal_8_neon,
|
||||||
&vpx_lpf_horizontal_8_c, 8, 1),
|
&vpx_lpf_horizontal_8_c, 8),
|
||||||
make_tuple(&vpx_lpf_vertical_8_neon,
|
make_tuple(&vpx_lpf_vertical_8_neon,
|
||||||
&vpx_lpf_vertical_8_c, 8, 1),
|
&vpx_lpf_vertical_8_c, 8),
|
||||||
make_tuple(&vpx_lpf_horizontal_4_neon,
|
make_tuple(&vpx_lpf_horizontal_4_neon,
|
||||||
&vpx_lpf_horizontal_4_c, 8, 1),
|
&vpx_lpf_horizontal_4_c, 8),
|
||||||
make_tuple(&vpx_lpf_vertical_4_neon,
|
make_tuple(&vpx_lpf_vertical_4_neon,
|
||||||
&vpx_lpf_vertical_4_c, 8, 1)));
|
&vpx_lpf_vertical_4_c, 8)));
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
NEON, Loop8Test9Param,
|
NEON, Loop8Test9Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
@@ -692,15 +603,58 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
#endif // HAVE_NEON
|
#endif // HAVE_NEON
|
||||||
|
|
||||||
|
#if HAVE_DSPR2 && !CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
DSPR2, Loop8Test6Param,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vpx_lpf_horizontal_4_dspr2,
|
||||||
|
&vpx_lpf_horizontal_4_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_8_dspr2,
|
||||||
|
&vpx_lpf_horizontal_8_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_edge_8,
|
||||||
|
&vpx_lpf_horizontal_edge_8, 8),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_edge_16,
|
||||||
|
&vpx_lpf_horizontal_edge_16, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_4_dspr2,
|
||||||
|
&vpx_lpf_vertical_4_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_8_dspr2,
|
||||||
|
&vpx_lpf_vertical_8_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_16_dspr2,
|
||||||
|
&vpx_lpf_vertical_16_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_16_dual_dspr2,
|
||||||
|
&vpx_lpf_vertical_16_dual_c, 8)));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
DSPR2, Loop8Test9Param,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vpx_lpf_horizontal_4_dual_dspr2,
|
||||||
|
&vpx_lpf_horizontal_4_dual_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_8_dual_dspr2,
|
||||||
|
&vpx_lpf_horizontal_8_dual_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_4_dual_dspr2,
|
||||||
|
&vpx_lpf_vertical_4_dual_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_8_dual_dspr2,
|
||||||
|
&vpx_lpf_vertical_8_dual_c, 8)));
|
||||||
|
#endif // HAVE_DSPR2 && !CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
|
||||||
#if HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
|
#if HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, Loop8Test6Param,
|
MSA, Loop8Test6Param,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vpx_lpf_horizontal_8_msa, &vpx_lpf_horizontal_8_c, 8, 1),
|
make_tuple(&vpx_lpf_horizontal_4_msa,
|
||||||
make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 1),
|
&vpx_lpf_horizontal_4_c, 8),
|
||||||
make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 2),
|
make_tuple(&vpx_lpf_horizontal_8_msa,
|
||||||
make_tuple(&vpx_lpf_vertical_8_msa, &vpx_lpf_vertical_8_c, 8, 1),
|
&vpx_lpf_horizontal_8_c, 8),
|
||||||
make_tuple(&wrapper_vertical_16_msa, &wrapper_vertical_16_c, 8, 1)));
|
make_tuple(&vpx_lpf_horizontal_edge_8_msa,
|
||||||
|
&vpx_lpf_horizontal_edge_8_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_horizontal_edge_16_msa,
|
||||||
|
&vpx_lpf_horizontal_edge_16_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_4_msa,
|
||||||
|
&vpx_lpf_vertical_4_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_8_msa,
|
||||||
|
&vpx_lpf_vertical_8_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_16_msa,
|
||||||
|
&vpx_lpf_vertical_16_c, 8)));
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, Loop8Test9Param,
|
MSA, Loop8Test9Param,
|
||||||
|
|||||||
132
test/minmax_test.cc
Normal file
132
test/minmax_test.cc
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
|
#include "vpx/vpx_integer.h"
|
||||||
|
|
||||||
|
#include "test/acm_random.h"
|
||||||
|
#include "test/register_state_check.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
using ::libvpx_test::ACMRandom;
|
||||||
|
|
||||||
|
typedef void (*MinMaxFunc)(const uint8_t *a, int a_stride,
|
||||||
|
const uint8_t *b, int b_stride,
|
||||||
|
int *min, int *max);
|
||||||
|
|
||||||
|
class MinMaxTest : public ::testing::TestWithParam<MinMaxFunc> {
|
||||||
|
public:
|
||||||
|
virtual void SetUp() {
|
||||||
|
mm_func_ = GetParam();
|
||||||
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
MinMaxFunc mm_func_;
|
||||||
|
ACMRandom rnd_;
|
||||||
|
};
|
||||||
|
|
||||||
|
void reference_minmax(const uint8_t *a, int a_stride,
|
||||||
|
const uint8_t *b, int b_stride,
|
||||||
|
int *min_ret, int *max_ret) {
|
||||||
|
int min = 255;
|
||||||
|
int max = 0;
|
||||||
|
for (int i = 0; i < 8; i++) {
|
||||||
|
for (int j = 0; j < 8; j++) {
|
||||||
|
const int diff = abs(a[i * a_stride + j] - b[i * b_stride + j]);
|
||||||
|
if (min > diff) min = diff;
|
||||||
|
if (max < diff) max = diff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*min_ret = min;
|
||||||
|
*max_ret = max;
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(MinMaxTest, MinValue) {
|
||||||
|
for (int i = 0; i < 64; i++) {
|
||||||
|
uint8_t a[64], b[64];
|
||||||
|
memset(a, 0, sizeof(a));
|
||||||
|
memset(b, 255, sizeof(b));
|
||||||
|
b[i] = i; // Set a minimum difference of i.
|
||||||
|
|
||||||
|
int min, max;
|
||||||
|
ASM_REGISTER_STATE_CHECK(mm_func_(a, 8, b, 8, &min, &max));
|
||||||
|
EXPECT_EQ(255, max);
|
||||||
|
EXPECT_EQ(i, min);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(MinMaxTest, MaxValue) {
|
||||||
|
for (int i = 0; i < 64; i++) {
|
||||||
|
uint8_t a[64], b[64];
|
||||||
|
memset(a, 0, sizeof(a));
|
||||||
|
memset(b, 0, sizeof(b));
|
||||||
|
b[i] = i; // Set a maximum difference of i.
|
||||||
|
|
||||||
|
int min, max;
|
||||||
|
ASM_REGISTER_STATE_CHECK(mm_func_(a, 8, b, 8, &min, &max));
|
||||||
|
EXPECT_EQ(i, max);
|
||||||
|
EXPECT_EQ(0, min);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(MinMaxTest, CompareReference) {
|
||||||
|
uint8_t a[64], b[64];
|
||||||
|
for (int j = 0; j < 64; j++) {
|
||||||
|
a[j] = rnd_.Rand8();
|
||||||
|
b[j] = rnd_.Rand8();
|
||||||
|
}
|
||||||
|
|
||||||
|
int min_ref, max_ref, min, max;
|
||||||
|
reference_minmax(a, 8, b, 8, &min_ref, &max_ref);
|
||||||
|
ASM_REGISTER_STATE_CHECK(mm_func_(a, 8, b, 8, &min, &max));
|
||||||
|
EXPECT_EQ(max_ref, max);
|
||||||
|
EXPECT_EQ(min_ref, min);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(MinMaxTest, CompareReferenceAndVaryStride) {
|
||||||
|
uint8_t a[8 * 64], b[8 * 64];
|
||||||
|
for (int i = 0; i < 8 * 64; i++) {
|
||||||
|
a[i] = rnd_.Rand8();
|
||||||
|
b[i] = rnd_.Rand8();
|
||||||
|
}
|
||||||
|
for (int a_stride = 8; a_stride <= 64; a_stride += 8) {
|
||||||
|
for (int b_stride = 8; b_stride <= 64; b_stride += 8) {
|
||||||
|
int min_ref, max_ref, min, max;
|
||||||
|
reference_minmax(a, a_stride, b, b_stride, &min_ref, &max_ref);
|
||||||
|
ASM_REGISTER_STATE_CHECK(mm_func_(a, a_stride, b, b_stride, &min, &max));
|
||||||
|
EXPECT_EQ(max_ref, max) << "when a_stride = " << a_stride
|
||||||
|
<< " and b_stride = " << b_stride;;
|
||||||
|
EXPECT_EQ(min_ref, min) << "when a_stride = " << a_stride
|
||||||
|
<< " and b_stride = " << b_stride;;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(C, MinMaxTest, ::testing::Values(&vpx_minmax_8x8_c));
|
||||||
|
|
||||||
|
#if HAVE_SSE2
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, MinMaxTest,
|
||||||
|
::testing::Values(&vpx_minmax_8x8_sse2));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_NEON
|
||||||
|
INSTANTIATE_TEST_CASE_P(NEON, MinMaxTest,
|
||||||
|
::testing::Values(&vpx_minmax_8x8_neon));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} // namespace
|
||||||
64
test/realtime_test.cc
Normal file
64
test/realtime_test.cc
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
#include "test/codec_factory.h"
|
||||||
|
#include "test/encode_test_driver.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
#include "test/video_source.h"
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
const int kVideoSourceWidth = 320;
|
||||||
|
const int kVideoSourceHeight = 240;
|
||||||
|
const int kFramesToEncode = 2;
|
||||||
|
|
||||||
|
class RealtimeTest
|
||||||
|
: public ::libvpx_test::EncoderTest,
|
||||||
|
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
|
||||||
|
protected:
|
||||||
|
RealtimeTest()
|
||||||
|
: EncoderTest(GET_PARAM(0)), frame_packets_(0) {}
|
||||||
|
virtual ~RealtimeTest() {}
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
InitializeConfig();
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
SetMode(::libvpx_test::kRealTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void BeginPassHook(unsigned int /*pass*/) {
|
||||||
|
// TODO(tomfinegan): We're changing the pass value here to make sure
|
||||||
|
// we get frames when real time mode is combined with |g_pass| set to
|
||||||
|
// VPX_RC_FIRST_PASS. This is necessary because EncoderTest::RunLoop() sets
|
||||||
|
// the pass value based on the mode passed into EncoderTest::SetMode(),
|
||||||
|
// which overrides the one specified in SetUp() above.
|
||||||
|
cfg_.g_pass = VPX_RC_FIRST_PASS;
|
||||||
|
}
|
||||||
|
virtual void FramePktHook(const vpx_codec_cx_pkt_t * /*pkt*/) {
|
||||||
|
frame_packets_++;
|
||||||
|
}
|
||||||
|
|
||||||
|
int frame_packets_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(RealtimeTest, RealtimeFirstPassProducesFrames) {
|
||||||
|
::libvpx_test::RandomVideoSource video;
|
||||||
|
video.SetSize(kVideoSourceWidth, kVideoSourceHeight);
|
||||||
|
video.set_limit(kFramesToEncode);
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
EXPECT_EQ(kFramesToEncode, frame_packets_);
|
||||||
|
}
|
||||||
|
|
||||||
|
VP8_INSTANTIATE_TEST_CASE(RealtimeTest,
|
||||||
|
::testing::Values(::libvpx_test::kRealTime));
|
||||||
|
VP9_INSTANTIATE_TEST_CASE(RealtimeTest,
|
||||||
|
::testing::Values(::libvpx_test::kRealTime));
|
||||||
|
|
||||||
|
} // namespace
|
||||||
@@ -30,20 +30,16 @@
|
|||||||
|
|
||||||
#if defined(_WIN64)
|
#if defined(_WIN64)
|
||||||
|
|
||||||
#define _WIN32_LEAN_AND_MEAN
|
#undef NOMINMAX
|
||||||
|
#define NOMINMAX
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winnt.h>
|
#include <winnt.h>
|
||||||
|
|
||||||
namespace testing {
|
|
||||||
namespace internal {
|
|
||||||
|
|
||||||
inline bool operator==(const M128A& lhs, const M128A& rhs) {
|
inline bool operator==(const M128A& lhs, const M128A& rhs) {
|
||||||
return (lhs.Low == rhs.Low && lhs.High == rhs.High);
|
return (lhs.Low == rhs.Low && lhs.High == rhs.High);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
|
||||||
} // namespace testing
|
|
||||||
|
|
||||||
namespace libvpx_test {
|
namespace libvpx_test {
|
||||||
|
|
||||||
// Compares the state of xmm[6-15] at construction with their state at
|
// Compares the state of xmm[6-15] at construction with their state at
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
* in the file PATENTS. All contributing project authors may
|
* in the file PATENTS. All contributing project authors may
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
@@ -81,34 +83,187 @@ static void write_ivf_frame_header(const vpx_codec_cx_pkt_t *const pkt,
|
|||||||
const unsigned int kInitialWidth = 320;
|
const unsigned int kInitialWidth = 320;
|
||||||
const unsigned int kInitialHeight = 240;
|
const unsigned int kInitialHeight = 240;
|
||||||
|
|
||||||
unsigned int ScaleForFrameNumber(unsigned int frame, unsigned int val) {
|
struct FrameInfo {
|
||||||
if (frame < 10)
|
FrameInfo(vpx_codec_pts_t _pts, unsigned int _w, unsigned int _h)
|
||||||
return val;
|
: pts(_pts), w(_w), h(_h) {}
|
||||||
if (frame < 20)
|
|
||||||
return val / 2;
|
vpx_codec_pts_t pts;
|
||||||
if (frame < 30)
|
unsigned int w;
|
||||||
return val * 2 / 3;
|
unsigned int h;
|
||||||
if (frame < 40)
|
};
|
||||||
return val / 4;
|
|
||||||
if (frame < 50)
|
void ScaleForFrameNumber(unsigned int frame,
|
||||||
return val * 7 / 8;
|
unsigned int initial_w,
|
||||||
return val;
|
unsigned int initial_h,
|
||||||
|
unsigned int *w,
|
||||||
|
unsigned int *h,
|
||||||
|
int flag_codec) {
|
||||||
|
if (frame < 10) {
|
||||||
|
*w = initial_w;
|
||||||
|
*h = initial_h;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 20) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 30) {
|
||||||
|
*w = initial_w / 2;
|
||||||
|
*h = initial_h / 2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 40) {
|
||||||
|
*w = initial_w;
|
||||||
|
*h = initial_h;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 50) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 60) {
|
||||||
|
*w = initial_w / 2;
|
||||||
|
*h = initial_h / 2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 70) {
|
||||||
|
*w = initial_w;
|
||||||
|
*h = initial_h;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 80) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 90) {
|
||||||
|
*w = initial_w / 2;
|
||||||
|
*h = initial_h / 2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 100) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 110) {
|
||||||
|
*w = initial_w;
|
||||||
|
*h = initial_h;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 120) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 130) {
|
||||||
|
*w = initial_w / 2;
|
||||||
|
*h = initial_h / 2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 140) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 150) {
|
||||||
|
*w = initial_w;
|
||||||
|
*h = initial_h;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 160) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 170) {
|
||||||
|
*w = initial_w / 2;
|
||||||
|
*h = initial_h / 2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 180) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 190) {
|
||||||
|
*w = initial_w;
|
||||||
|
*h = initial_h;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 200) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 210) {
|
||||||
|
*w = initial_w / 2;
|
||||||
|
*h = initial_h / 2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 220) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 230) {
|
||||||
|
*w = initial_w;
|
||||||
|
*h = initial_h;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 240) {
|
||||||
|
*w = initial_w * 3 / 4;
|
||||||
|
*h = initial_h * 3 / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 250) {
|
||||||
|
*w = initial_w / 2;
|
||||||
|
*h = initial_h / 2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (frame < 260) {
|
||||||
|
*w = initial_w;
|
||||||
|
*h = initial_h;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Go down very low.
|
||||||
|
if (frame < 270) {
|
||||||
|
*w = initial_w / 4;
|
||||||
|
*h = initial_h / 4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (flag_codec == 1) {
|
||||||
|
// Cases that only works for VP9.
|
||||||
|
// For VP9: Swap width and height of original.
|
||||||
|
if (frame < 320) {
|
||||||
|
*w = initial_h;
|
||||||
|
*h = initial_w;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*w = initial_w;
|
||||||
|
*h = initial_h;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ResizingVideoSource : public ::libvpx_test::DummyVideoSource {
|
class ResizingVideoSource : public ::libvpx_test::DummyVideoSource {
|
||||||
public:
|
public:
|
||||||
ResizingVideoSource() {
|
ResizingVideoSource() {
|
||||||
SetSize(kInitialWidth, kInitialHeight);
|
SetSize(kInitialWidth, kInitialHeight);
|
||||||
limit_ = 60;
|
limit_ = 350;
|
||||||
}
|
}
|
||||||
|
int flag_codec_;
|
||||||
virtual ~ResizingVideoSource() {}
|
virtual ~ResizingVideoSource() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void Next() {
|
virtual void Next() {
|
||||||
++frame_;
|
++frame_;
|
||||||
SetSize(ScaleForFrameNumber(frame_, kInitialWidth),
|
unsigned int width;
|
||||||
ScaleForFrameNumber(frame_, kInitialHeight));
|
unsigned int height;
|
||||||
|
ScaleForFrameNumber(frame_, kInitialWidth, kInitialHeight, &width, &height,
|
||||||
|
flag_codec_);
|
||||||
|
SetSize(width, height);
|
||||||
FillFrame();
|
FillFrame();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -120,15 +275,6 @@ class ResizeTest : public ::libvpx_test::EncoderTest,
|
|||||||
|
|
||||||
virtual ~ResizeTest() {}
|
virtual ~ResizeTest() {}
|
||||||
|
|
||||||
struct FrameInfo {
|
|
||||||
FrameInfo(vpx_codec_pts_t _pts, unsigned int _w, unsigned int _h)
|
|
||||||
: pts(_pts), w(_w), h(_h) {}
|
|
||||||
|
|
||||||
vpx_codec_pts_t pts;
|
|
||||||
unsigned int w;
|
|
||||||
unsigned int h;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
virtual void SetUp() {
|
||||||
InitializeConfig();
|
InitializeConfig();
|
||||||
SetMode(GET_PARAM(1));
|
SetMode(GET_PARAM(1));
|
||||||
@@ -144,15 +290,17 @@ class ResizeTest : public ::libvpx_test::EncoderTest,
|
|||||||
|
|
||||||
TEST_P(ResizeTest, TestExternalResizeWorks) {
|
TEST_P(ResizeTest, TestExternalResizeWorks) {
|
||||||
ResizingVideoSource video;
|
ResizingVideoSource video;
|
||||||
|
video.flag_codec_ = 0;
|
||||||
cfg_.g_lag_in_frames = 0;
|
cfg_.g_lag_in_frames = 0;
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
|
||||||
for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin();
|
for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin();
|
||||||
info != frame_info_list_.end(); ++info) {
|
info != frame_info_list_.end(); ++info) {
|
||||||
const unsigned int frame = static_cast<unsigned>(info->pts);
|
const unsigned int frame = static_cast<unsigned>(info->pts);
|
||||||
const unsigned int expected_w = ScaleForFrameNumber(frame, kInitialWidth);
|
unsigned int expected_w;
|
||||||
const unsigned int expected_h = ScaleForFrameNumber(frame, kInitialHeight);
|
unsigned int expected_h;
|
||||||
|
ScaleForFrameNumber(frame, kInitialWidth, kInitialHeight,
|
||||||
|
&expected_w, &expected_h, 0);
|
||||||
EXPECT_EQ(expected_w, info->w)
|
EXPECT_EQ(expected_w, info->w)
|
||||||
<< "Frame " << frame << " had unexpected width";
|
<< "Frame " << frame << " had unexpected width";
|
||||||
EXPECT_EQ(expected_h, info->h)
|
EXPECT_EQ(expected_h, info->h)
|
||||||
@@ -196,6 +344,19 @@ class ResizeInternalTest : public ResizeTest {
|
|||||||
|
|
||||||
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||||
libvpx_test::Encoder *encoder) {
|
libvpx_test::Encoder *encoder) {
|
||||||
|
if (change_config_) {
|
||||||
|
int new_q = 60;
|
||||||
|
if (video->frame() == 0) {
|
||||||
|
struct vpx_scaling_mode mode = {VP8E_ONETWO, VP8E_ONETWO};
|
||||||
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
|
}
|
||||||
|
if (video->frame() == 1) {
|
||||||
|
struct vpx_scaling_mode mode = {VP8E_NORMAL, VP8E_NORMAL};
|
||||||
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
|
cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = new_q;
|
||||||
|
encoder->Config(&cfg_);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (video->frame() == kStepDownFrame) {
|
if (video->frame() == kStepDownFrame) {
|
||||||
struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
|
struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
|
||||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
@@ -205,6 +366,7 @@ class ResizeInternalTest : public ResizeTest {
|
|||||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
|
||||||
if (!frame0_psnr_)
|
if (!frame0_psnr_)
|
||||||
@@ -227,6 +389,7 @@ class ResizeInternalTest : public ResizeTest {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
double frame0_psnr_;
|
double frame0_psnr_;
|
||||||
|
bool change_config_;
|
||||||
#if WRITE_COMPRESSED_STREAM
|
#if WRITE_COMPRESSED_STREAM
|
||||||
FILE *outfile_;
|
FILE *outfile_;
|
||||||
unsigned int out_frames_;
|
unsigned int out_frames_;
|
||||||
@@ -237,6 +400,7 @@ TEST_P(ResizeInternalTest, TestInternalResizeWorks) {
|
|||||||
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
30, 1, 0, 10);
|
30, 1, 0, 10);
|
||||||
init_flags_ = VPX_CODEC_USE_PSNR;
|
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||||
|
change_config_ = false;
|
||||||
|
|
||||||
// q picked such that initial keyframe on this clip is ~30dB PSNR
|
// q picked such that initial keyframe on this clip is ~30dB PSNR
|
||||||
cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = 48;
|
cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = 48;
|
||||||
@@ -261,6 +425,198 @@ TEST_P(ResizeInternalTest, TestInternalResizeWorks) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_P(ResizeInternalTest, TestInternalResizeChangeConfig) {
|
||||||
|
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
|
30, 1, 0, 10);
|
||||||
|
cfg_.g_w = 352;
|
||||||
|
cfg_.g_h = 288;
|
||||||
|
change_config_ = true;
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
}
|
||||||
|
|
||||||
|
class ResizeRealtimeTest : public ::libvpx_test::EncoderTest,
|
||||||
|
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||||
|
protected:
|
||||||
|
ResizeRealtimeTest() : EncoderTest(GET_PARAM(0)) {}
|
||||||
|
virtual ~ResizeRealtimeTest() {}
|
||||||
|
|
||||||
|
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
|
||||||
|
libvpx_test::Encoder *encoder) {
|
||||||
|
if (video->frame() == 0) {
|
||||||
|
encoder->Control(VP9E_SET_AQ_MODE, 3);
|
||||||
|
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (change_bitrate_ && video->frame() == 120) {
|
||||||
|
change_bitrate_ = false;
|
||||||
|
cfg_.rc_target_bitrate = 500;
|
||||||
|
encoder->Config(&cfg_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void SetUp() {
|
||||||
|
InitializeConfig();
|
||||||
|
SetMode(GET_PARAM(1));
|
||||||
|
set_cpu_used_ = GET_PARAM(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
||||||
|
vpx_codec_pts_t pts) {
|
||||||
|
frame_info_list_.push_back(FrameInfo(pts, img.d_w, img.d_h));
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void MismatchHook(const vpx_image_t *img1,
|
||||||
|
const vpx_image_t *img2) {
|
||||||
|
double mismatch_psnr = compute_psnr(img1, img2);
|
||||||
|
mismatch_psnr_ += mismatch_psnr;
|
||||||
|
++mismatch_nframes_;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int GetMismatchFrames() {
|
||||||
|
return mismatch_nframes_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DefaultConfig() {
|
||||||
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
|
cfg_.rc_buf_optimal_sz = 600;
|
||||||
|
cfg_.rc_buf_sz = 1000;
|
||||||
|
cfg_.rc_min_quantizer = 2;
|
||||||
|
cfg_.rc_max_quantizer = 56;
|
||||||
|
cfg_.rc_undershoot_pct = 50;
|
||||||
|
cfg_.rc_overshoot_pct = 50;
|
||||||
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
|
cfg_.kf_mode = VPX_KF_AUTO;
|
||||||
|
cfg_.g_lag_in_frames = 0;
|
||||||
|
cfg_.kf_min_dist = cfg_.kf_max_dist = 3000;
|
||||||
|
// Enable dropped frames.
|
||||||
|
cfg_.rc_dropframe_thresh = 1;
|
||||||
|
// Enable error_resilience mode.
|
||||||
|
cfg_.g_error_resilient = 1;
|
||||||
|
// Enable dynamic resizing.
|
||||||
|
cfg_.rc_resize_allowed = 1;
|
||||||
|
// Run at low bitrate.
|
||||||
|
cfg_.rc_target_bitrate = 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector< FrameInfo > frame_info_list_;
|
||||||
|
int set_cpu_used_;
|
||||||
|
bool change_bitrate_;
|
||||||
|
double mismatch_psnr_;
|
||||||
|
int mismatch_nframes_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(ResizeRealtimeTest, TestExternalResizeWorks) {
|
||||||
|
ResizingVideoSource video;
|
||||||
|
video.flag_codec_ = 1;
|
||||||
|
DefaultConfig();
|
||||||
|
// Disable internal resize for this test.
|
||||||
|
cfg_.rc_resize_allowed = 0;
|
||||||
|
change_bitrate_ = false;
|
||||||
|
mismatch_psnr_ = 0.0;
|
||||||
|
mismatch_nframes_ = 0;
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
|
||||||
|
for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin();
|
||||||
|
info != frame_info_list_.end(); ++info) {
|
||||||
|
const unsigned int frame = static_cast<unsigned>(info->pts);
|
||||||
|
unsigned int expected_w;
|
||||||
|
unsigned int expected_h;
|
||||||
|
ScaleForFrameNumber(frame, kInitialWidth, kInitialHeight,
|
||||||
|
&expected_w, &expected_h, 1);
|
||||||
|
EXPECT_EQ(expected_w, info->w)
|
||||||
|
<< "Frame " << frame << " had unexpected width";
|
||||||
|
EXPECT_EQ(expected_h, info->h)
|
||||||
|
<< "Frame " << frame << " had unexpected height";
|
||||||
|
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify the dynamic resizer behavior for real time, 1 pass CBR mode.
|
||||||
|
// Run at low bitrate, with resize_allowed = 1, and verify that we get
|
||||||
|
// one resize down event.
|
||||||
|
TEST_P(ResizeRealtimeTest, TestInternalResizeDown) {
|
||||||
|
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
|
30, 1, 0, 299);
|
||||||
|
DefaultConfig();
|
||||||
|
cfg_.g_w = 352;
|
||||||
|
cfg_.g_h = 288;
|
||||||
|
change_bitrate_ = false;
|
||||||
|
mismatch_psnr_ = 0.0;
|
||||||
|
mismatch_nframes_ = 0;
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
|
||||||
|
unsigned int last_w = cfg_.g_w;
|
||||||
|
unsigned int last_h = cfg_.g_h;
|
||||||
|
int resize_count = 0;
|
||||||
|
for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin();
|
||||||
|
info != frame_info_list_.end(); ++info) {
|
||||||
|
if (info->w != last_w || info->h != last_h) {
|
||||||
|
// Verify that resize down occurs.
|
||||||
|
ASSERT_LT(info->w, last_w);
|
||||||
|
ASSERT_LT(info->h, last_h);
|
||||||
|
last_w = info->w;
|
||||||
|
last_h = info->h;
|
||||||
|
resize_count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if CONFIG_VP9_DECODER
|
||||||
|
// Verify that we get 1 resize down event in this test.
|
||||||
|
ASSERT_EQ(1, resize_count) << "Resizing should occur.";
|
||||||
|
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
|
||||||
|
#else
|
||||||
|
printf("Warning: VP9 decoder unavailable, unable to check resize count!\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify the dynamic resizer behavior for real time, 1 pass CBR mode.
|
||||||
|
// Start at low target bitrate, raise the bitrate in the middle of the clip,
|
||||||
|
// scaling-up should occur after bitrate changed.
|
||||||
|
TEST_P(ResizeRealtimeTest, TestInternalResizeDownUpChangeBitRate) {
|
||||||
|
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||||
|
30, 1, 0, 359);
|
||||||
|
DefaultConfig();
|
||||||
|
cfg_.g_w = 352;
|
||||||
|
cfg_.g_h = 288;
|
||||||
|
change_bitrate_ = true;
|
||||||
|
mismatch_psnr_ = 0.0;
|
||||||
|
mismatch_nframes_ = 0;
|
||||||
|
// Disable dropped frames.
|
||||||
|
cfg_.rc_dropframe_thresh = 0;
|
||||||
|
// Starting bitrate low.
|
||||||
|
cfg_.rc_target_bitrate = 80;
|
||||||
|
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||||
|
|
||||||
|
unsigned int last_w = cfg_.g_w;
|
||||||
|
unsigned int last_h = cfg_.g_h;
|
||||||
|
int resize_count = 0;
|
||||||
|
for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin();
|
||||||
|
info != frame_info_list_.end(); ++info) {
|
||||||
|
if (info->w != last_w || info->h != last_h) {
|
||||||
|
resize_count++;
|
||||||
|
if (resize_count == 1) {
|
||||||
|
// Verify that resize down occurs.
|
||||||
|
ASSERT_LT(info->w, last_w);
|
||||||
|
ASSERT_LT(info->h, last_h);
|
||||||
|
} else if (resize_count == 2) {
|
||||||
|
// Verify that resize up occurs.
|
||||||
|
ASSERT_GT(info->w, last_w);
|
||||||
|
ASSERT_GT(info->h, last_h);
|
||||||
|
}
|
||||||
|
last_w = info->w;
|
||||||
|
last_h = info->h;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if CONFIG_VP9_DECODER
|
||||||
|
// Verify that we get 2 resize events in this test.
|
||||||
|
ASSERT_EQ(resize_count, 2) << "Resizing should occur twice.";
|
||||||
|
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
|
||||||
|
#else
|
||||||
|
printf("Warning: VP9 decoder unavailable, unable to check resize count!\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
vpx_img_fmt_t CspForFrameNumber(int frame) {
|
vpx_img_fmt_t CspForFrameNumber(int frame) {
|
||||||
if (frame < 10)
|
if (frame < 10)
|
||||||
return VPX_IMG_FMT_I420;
|
return VPX_IMG_FMT_I420;
|
||||||
@@ -371,6 +727,9 @@ VP9_INSTANTIATE_TEST_CASE(ResizeTest,
|
|||||||
::testing::Values(::libvpx_test::kRealTime));
|
::testing::Values(::libvpx_test::kRealTime));
|
||||||
VP9_INSTANTIATE_TEST_CASE(ResizeInternalTest,
|
VP9_INSTANTIATE_TEST_CASE(ResizeInternalTest,
|
||||||
::testing::Values(::libvpx_test::kOnePassBest));
|
::testing::Values(::libvpx_test::kOnePassBest));
|
||||||
|
VP9_INSTANTIATE_TEST_CASE(ResizeRealtimeTest,
|
||||||
|
::testing::Values(::libvpx_test::kRealTime),
|
||||||
|
::testing::Range(5, 9));
|
||||||
VP9_INSTANTIATE_TEST_CASE(ResizeCspTest,
|
VP9_INSTANTIATE_TEST_CASE(ResizeCspTest,
|
||||||
::testing::Values(::libvpx_test::kRealTime));
|
::testing::Values(::libvpx_test::kRealTime));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
983
test/sad_test.cc
983
test/sad_test.cc
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@ simple_encoder_verify_environment() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Runs simple_encoder using the codec specified by $1.
|
# Runs simple_encoder using the codec specified by $1 with a frame limit of 100.
|
||||||
simple_encoder() {
|
simple_encoder() {
|
||||||
local encoder="${LIBVPX_BIN_PATH}/simple_encoder${VPX_TEST_EXE_SUFFIX}"
|
local encoder="${LIBVPX_BIN_PATH}/simple_encoder${VPX_TEST_EXE_SUFFIX}"
|
||||||
local codec="$1"
|
local codec="$1"
|
||||||
@@ -35,7 +35,7 @@ simple_encoder() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
|
eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
|
||||||
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" 9999 \
|
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" 9999 0 100 \
|
||||||
${devnull}
|
${devnull}
|
||||||
|
|
||||||
[ -e "${output_file}" ] || return 1
|
[ -e "${output_file}" ] || return 1
|
||||||
@@ -47,16 +47,13 @@ simple_encoder_vp8() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO(tomfinegan): Add a frame limit param to simple_encoder and enable this
|
simple_encoder_vp9() {
|
||||||
# test. VP9 is just too slow right now: This test takes 4m30s+ on a fast
|
|
||||||
# machine.
|
|
||||||
DISABLED_simple_encoder_vp9() {
|
|
||||||
if [ "$(vp9_encode_available)" = "yes" ]; then
|
if [ "$(vp9_encode_available)" = "yes" ]; then
|
||||||
simple_encoder vp9 || return 1
|
simple_encoder vp9 || return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
simple_encoder_tests="simple_encoder_vp8
|
simple_encoder_tests="simple_encoder_vp8
|
||||||
DISABLED_simple_encoder_vp9"
|
simple_encoder_vp9"
|
||||||
|
|
||||||
run_tests simple_encoder_verify_environment "${simple_encoder_tests}"
|
run_tests simple_encoder_verify_environment "${simple_encoder_tests}"
|
||||||
|
|||||||
@@ -186,70 +186,48 @@ TEST_P(SixtapPredictTest, TestWithRandomData) {
|
|||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
const SixtapPredictFunc sixtap_16x16_c = vp8_sixtap_predict16x16_c;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_c = vp8_sixtap_predict8x8_c;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_c = vp8_sixtap_predict8x4_c;
|
|
||||||
const SixtapPredictFunc sixtap_4x4_c = vp8_sixtap_predict4x4_c;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
C, SixtapPredictTest, ::testing::Values(
|
C, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_c),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_c),
|
||||||
make_tuple(8, 8, sixtap_8x8_c),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_c),
|
||||||
make_tuple(8, 4, sixtap_8x4_c),
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_c),
|
||||||
make_tuple(4, 4, sixtap_4x4_c)));
|
make_tuple(4, 4, &vp8_sixtap_predict4x4_c)));
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
const SixtapPredictFunc sixtap_16x16_neon = vp8_sixtap_predict16x16_neon;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_neon = vp8_sixtap_predict8x8_neon;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_neon = vp8_sixtap_predict8x4_neon;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
DISABLED_NEON, SixtapPredictTest, ::testing::Values(
|
NEON, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_neon),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_neon),
|
||||||
make_tuple(8, 8, sixtap_8x8_neon),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_neon),
|
||||||
make_tuple(8, 4, sixtap_8x4_neon)));
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_neon)));
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_MMX
|
#if HAVE_MMX
|
||||||
const SixtapPredictFunc sixtap_16x16_mmx = vp8_sixtap_predict16x16_mmx;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_mmx = vp8_sixtap_predict8x8_mmx;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_mmx = vp8_sixtap_predict8x4_mmx;
|
|
||||||
const SixtapPredictFunc sixtap_4x4_mmx = vp8_sixtap_predict4x4_mmx;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MMX, SixtapPredictTest, ::testing::Values(
|
MMX, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_mmx),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_mmx),
|
||||||
make_tuple(8, 8, sixtap_8x8_mmx),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_mmx),
|
||||||
make_tuple(8, 4, sixtap_8x4_mmx),
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_mmx),
|
||||||
make_tuple(4, 4, sixtap_4x4_mmx)));
|
make_tuple(4, 4, &vp8_sixtap_predict4x4_mmx)));
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
const SixtapPredictFunc sixtap_16x16_sse2 = vp8_sixtap_predict16x16_sse2;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_sse2 = vp8_sixtap_predict8x8_sse2;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_sse2 = vp8_sixtap_predict8x4_sse2;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, SixtapPredictTest, ::testing::Values(
|
SSE2, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_sse2),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_sse2),
|
||||||
make_tuple(8, 8, sixtap_8x8_sse2),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_sse2),
|
||||||
make_tuple(8, 4, sixtap_8x4_sse2)));
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_sse2)));
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_SSSE3
|
#if HAVE_SSSE3
|
||||||
const SixtapPredictFunc sixtap_16x16_ssse3 = vp8_sixtap_predict16x16_ssse3;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_ssse3 = vp8_sixtap_predict8x8_ssse3;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_ssse3 = vp8_sixtap_predict8x4_ssse3;
|
|
||||||
const SixtapPredictFunc sixtap_4x4_ssse3 = vp8_sixtap_predict4x4_ssse3;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSSE3, SixtapPredictTest, ::testing::Values(
|
SSSE3, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_ssse3),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_ssse3),
|
||||||
make_tuple(8, 8, sixtap_8x8_ssse3),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_ssse3),
|
||||||
make_tuple(8, 4, sixtap_8x4_ssse3),
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_ssse3),
|
||||||
make_tuple(4, 4, sixtap_4x4_ssse3)));
|
make_tuple(4, 4, &vp8_sixtap_predict4x4_ssse3)));
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_MSA
|
#if HAVE_MSA
|
||||||
const SixtapPredictFunc sixtap_16x16_msa = vp8_sixtap_predict16x16_msa;
|
|
||||||
const SixtapPredictFunc sixtap_8x8_msa = vp8_sixtap_predict8x8_msa;
|
|
||||||
const SixtapPredictFunc sixtap_8x4_msa = vp8_sixtap_predict8x4_msa;
|
|
||||||
const SixtapPredictFunc sixtap_4x4_msa = vp8_sixtap_predict4x4_msa;
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
MSA, SixtapPredictTest, ::testing::Values(
|
MSA, SixtapPredictTest, ::testing::Values(
|
||||||
make_tuple(16, 16, sixtap_16x16_msa),
|
make_tuple(16, 16, &vp8_sixtap_predict16x16_msa),
|
||||||
make_tuple(8, 8, sixtap_8x8_msa),
|
make_tuple(8, 8, &vp8_sixtap_predict8x8_msa),
|
||||||
make_tuple(8, 4, sixtap_8x4_msa),
|
make_tuple(8, 4, &vp8_sixtap_predict8x4_msa),
|
||||||
make_tuple(4, 4, sixtap_4x4_msa)));
|
make_tuple(4, 4, &vp8_sixtap_predict4x4_msa)));
|
||||||
#endif
|
#endif
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -16,8 +16,12 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
const int kTestMode = 0;
|
||||||
|
|
||||||
|
typedef std::tr1::tuple<libvpx_test::TestMode,int> SuperframeTestParam;
|
||||||
|
|
||||||
class SuperframeTest : public ::libvpx_test::EncoderTest,
|
class SuperframeTest : public ::libvpx_test::EncoderTest,
|
||||||
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
|
public ::libvpx_test::CodecTestWithParam<SuperframeTestParam> {
|
||||||
protected:
|
protected:
|
||||||
SuperframeTest() : EncoderTest(GET_PARAM(0)), modified_buf_(NULL),
|
SuperframeTest() : EncoderTest(GET_PARAM(0)), modified_buf_(NULL),
|
||||||
last_sf_pts_(0) {}
|
last_sf_pts_(0) {}
|
||||||
@@ -25,7 +29,9 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
|
|||||||
|
|
||||||
virtual void SetUp() {
|
virtual void SetUp() {
|
||||||
InitializeConfig();
|
InitializeConfig();
|
||||||
SetMode(GET_PARAM(1));
|
const SuperframeTestParam input = GET_PARAM(1);
|
||||||
|
const libvpx_test::TestMode mode = std::tr1::get<kTestMode>(input);
|
||||||
|
SetMode(mode);
|
||||||
sf_count_ = 0;
|
sf_count_ = 0;
|
||||||
sf_count_max_ = INT_MAX;
|
sf_count_max_ = INT_MAX;
|
||||||
}
|
}
|
||||||
@@ -92,9 +98,7 @@ TEST_P(SuperframeTest, TestSuperframeIndexIsOptional) {
|
|||||||
EXPECT_EQ(sf_count_, 1);
|
EXPECT_EQ(sf_count_, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values(
|
VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Combine(
|
||||||
::libvpx_test::kTwoPassGood));
|
::testing::Values(::libvpx_test::kTwoPassGood),
|
||||||
|
::testing::Values(0)));
|
||||||
VP10_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values(
|
|
||||||
::libvpx_test::kTwoPassGood));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_422.y4m
|
|||||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_444.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_444.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_440.yuv
|
LIBVPX_TEST_DATA-$(CONFIG_ENCODERS) += park_joy_90p_8_440.yuv
|
||||||
|
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += desktop_credits.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += niklas_1280_720_30.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += niklas_1280_720_30.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += rush_hour_444.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += rush_hour_444.y4m
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += screendata.y4m
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_ENCODER) += screendata.y4m
|
||||||
@@ -417,6 +418,18 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm
|
|||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-130x132.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-130x132.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x130.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x130.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x132.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-132x132.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-178x180.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-178x180.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x178.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x178.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x180.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-180x180.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-deltaq.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-deltaq.webm
|
||||||
@@ -549,6 +562,8 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x224.webm
|
|||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x224.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x224.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x226.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x226.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x226.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-226x226.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-352x288.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-352x288.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-05-resize.ivf
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-05-resize.ivf
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-05-resize.ivf.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-05-resize.ivf.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-06-bilinear.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-06-bilinear.webm
|
||||||
@@ -641,6 +656,34 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-2.webm
|
|||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-2.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-2.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-4.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-4.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-4.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-fp-tiles-8-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-8.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-1-8.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-1.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-1.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-8.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-2-8.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-1.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-1.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-8.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-4-8.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-1.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-1.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-14-resize-10frames-fp-tiles-8-4.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey.webm
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey.webm.md5
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey.webm.md5
|
||||||
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey_adpq.webm
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-15-segkey_adpq.webm
|
||||||
@@ -768,3 +811,53 @@ endif # CONFIG_ENCODE_PERF_TESTS
|
|||||||
|
|
||||||
# sort and remove duplicates
|
# sort and remove duplicates
|
||||||
LIBVPX_TEST_DATA-yes := $(sort $(LIBVPX_TEST_DATA-yes))
|
LIBVPX_TEST_DATA-yes := $(sort $(LIBVPX_TEST_DATA-yes))
|
||||||
|
|
||||||
|
# VP9 dynamic resizing test (decoder)
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x180_5_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x180_5_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x180_5_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x180_5_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x180_7_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x180_7_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x180_7_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x180_7_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x240_5_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x240_5_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x240_5_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x240_5_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x240_7_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x240_7_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x240_7_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_320x240_7_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x360_5_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x360_5_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x360_5_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x360_5_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x360_7_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x360_7_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x360_7_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x360_7_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x480_5_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x480_5_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x480_5_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x480_5_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x480_7_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x480_7_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x480_7_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_640x480_7_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1280x720_5_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1280x720_5_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1280x720_5_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1280x720_5_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1280x720_7_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1280x720_7_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1280x720_7_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1280x720_7_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1920x1080_5_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1920x1080_5_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1920x1080_5_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1920x1080_5_3-4.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1920x1080_7_1-2.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1920x1080_7_1-2.webm.md5
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1920x1080_7_3-4.webm
|
||||||
|
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-21-resize_inter_1920x1080_7_3-4.webm.md5
|
||||||
|
|||||||
@@ -550,6 +550,8 @@ d17bc08eedfc60c4c23d576a6c964a21bf854d1f *vp90-2-03-size-226x202.webm
|
|||||||
83c6d8f2969b759e10e5c6542baca1265c874c29 *vp90-2-03-size-226x224.webm.md5
|
83c6d8f2969b759e10e5c6542baca1265c874c29 *vp90-2-03-size-226x224.webm.md5
|
||||||
fe0af2ee47b1e5f6a66db369e2d7e9d870b38dce *vp90-2-03-size-226x226.webm
|
fe0af2ee47b1e5f6a66db369e2d7e9d870b38dce *vp90-2-03-size-226x226.webm
|
||||||
94ad19b8b699cea105e2ff18f0df2afd7242bcf7 *vp90-2-03-size-226x226.webm.md5
|
94ad19b8b699cea105e2ff18f0df2afd7242bcf7 *vp90-2-03-size-226x226.webm.md5
|
||||||
|
52bc1dfd3a97b24d922eb8a31d07527891561f2a *vp90-2-03-size-352x288.webm
|
||||||
|
3084d6d0a1eec22e85a394422fbc8faae58930a5 *vp90-2-03-size-352x288.webm.md5
|
||||||
b6524e4084d15b5d0caaa3d3d1368db30cbee69c *vp90-2-03-deltaq.webm
|
b6524e4084d15b5d0caaa3d3d1368db30cbee69c *vp90-2-03-deltaq.webm
|
||||||
65f45ec9a55537aac76104818278e0978f94a678 *vp90-2-03-deltaq.webm.md5
|
65f45ec9a55537aac76104818278e0978f94a678 *vp90-2-03-deltaq.webm.md5
|
||||||
4dbb87494c7f565ffc266c98d17d0d8c7a5c5aba *vp90-2-05-resize.ivf
|
4dbb87494c7f565ffc266c98d17d0d8c7a5c5aba *vp90-2-05-resize.ivf
|
||||||
@@ -743,3 +745,92 @@ d06285d109ecbaef63b0cbcc44d70a129186f51c *invalid-vp90-2-03-size-224x196.webm.iv
|
|||||||
e60d859b0ef2b331b21740cf6cb83fabe469b079 *invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf
|
e60d859b0ef2b331b21740cf6cb83fabe469b079 *invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf
|
||||||
0ae808dca4d3c1152a9576e14830b6faa39f1b4a *invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf.res
|
0ae808dca4d3c1152a9576e14830b6faa39f1b4a *invalid-vp90-2-03-size-202x210.webm.ivf.s113306_r01-05_b6-.ivf.res
|
||||||
9cfc855459e7549fd015c79e8eca512b2f2cb7e3 *niklas_1280_720_30.y4m
|
9cfc855459e7549fd015c79e8eca512b2f2cb7e3 *niklas_1280_720_30.y4m
|
||||||
|
5b5763b388b1b52a81bb82b39f7ec25c4bd3d0e1 *desktop_credits.y4m
|
||||||
|
85771f6ab44e4a0226e206c0cde8351dd5918953 *vp90-2-02-size-130x132.webm
|
||||||
|
512dad5eabbed37b4bbbc64ce153f1a5484427b8 *vp90-2-02-size-130x132.webm.md5
|
||||||
|
01f7127d40360289db63b27f61cb9afcda350e95 *vp90-2-02-size-132x130.webm
|
||||||
|
4a94275328ae076cf60f966c097a8721010fbf5a *vp90-2-02-size-132x130.webm.md5
|
||||||
|
f41c0400b5716b4b70552c40dd03d44be131e1cc *vp90-2-02-size-132x132.webm
|
||||||
|
1a69e989f697e424bfe3e3e8a77bb0c0992c8e47 *vp90-2-02-size-132x132.webm.md5
|
||||||
|
94a5cbfacacba100e0c5f7861c72a1b417feca0f *vp90-2-02-size-178x180.webm
|
||||||
|
dedfecf1d784bcf70629592fa5e6f01d5441ccc9 *vp90-2-02-size-178x180.webm.md5
|
||||||
|
4828b62478c04014bba3095a83106911a71cf387 *vp90-2-02-size-180x178.webm
|
||||||
|
423da2b861050c969d78ed8e8f8f14045d1d8199 *vp90-2-02-size-180x178.webm.md5
|
||||||
|
338f7c9282f43e29940f5391118aadd17e4f9234 *vp90-2-02-size-180x180.webm
|
||||||
|
6c2ef013392310778dca5dd5351160eca66b0a60 *vp90-2-02-size-180x180.webm.md5
|
||||||
|
679fa7d6807e936ff937d7b282e7dbd8ac76447e *vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm
|
||||||
|
fc7267ab8fc2bf5d6c234e34ee6c078a967b4888 *vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm.md5
|
||||||
|
9d33a137c819792209c5ce4e4e1ee5da73d574fe *vp90-2-14-resize-10frames-fp-tiles-1-2.webm
|
||||||
|
0c78a154956a8605d050bdd75e0dcc4d39c040a6 *vp90-2-14-resize-10frames-fp-tiles-1-2.webm.md5
|
||||||
|
d6a8d8c57f66a91d23e8e7df480f9ae841e56c37 *vp90-2-14-resize-10frames-fp-tiles-1-4.webm
|
||||||
|
e9b4e8c7b33b5fda745d340c3f47e6623ae40cf2 *vp90-2-14-resize-10frames-fp-tiles-1-4.webm.md5
|
||||||
|
aa6fe043a0c4a42b49c87ebbe812d4afd9945bec *vp90-2-14-resize-10frames-fp-tiles-1-8.webm
|
||||||
|
028520578994c2d013d4c0129033d4f2ff31bbe0 *vp90-2-14-resize-10frames-fp-tiles-1-8.webm.md5
|
||||||
|
d1d5463c9ea7b5cc5f609ddedccddf656f348d1a *vp90-2-14-resize-10frames-fp-tiles-2-1.webm
|
||||||
|
92d5872f5bdffbed721703b7e959b4f885e3d77a *vp90-2-14-resize-10frames-fp-tiles-2-1.webm.md5
|
||||||
|
677cb29de1215d97346015af5807a9b1faad54cf *vp90-2-14-resize-10frames-fp-tiles-2-4.webm
|
||||||
|
a5db19f977094ec3fd60b4f7671b3e6740225e12 *vp90-2-14-resize-10frames-fp-tiles-2-4.webm.md5
|
||||||
|
cdd3c52ba21067efdbb2de917fe2a965bf27332e *vp90-2-14-resize-10frames-fp-tiles-2-8.webm
|
||||||
|
db17ec5d894ea8b8d0b7f32206d0dd3d46dcfa6d *vp90-2-14-resize-10frames-fp-tiles-2-8.webm.md5
|
||||||
|
0f6093c472125d05b764d7d1965c1d56771c0ea2 *vp90-2-14-resize-10frames-fp-tiles-4-1.webm
|
||||||
|
bc7c79e1bee07926dd970462ce6f64fc30eec3e1 *vp90-2-14-resize-10frames-fp-tiles-4-1.webm.md5
|
||||||
|
c5142e2bff4091338196c8ea8bc9266e64f548bc *vp90-2-14-resize-10frames-fp-tiles-4-2.webm
|
||||||
|
22aa3dd430b69fd3d92f6561bac86deeed90486d *vp90-2-14-resize-10frames-fp-tiles-4-2.webm.md5
|
||||||
|
ede8b1466d2f26e1b1bd9602addb9cd1017e1d8c *vp90-2-14-resize-10frames-fp-tiles-4-8.webm
|
||||||
|
508d5ebb9c0eac2a4100281a3ee052ec2fc19217 *vp90-2-14-resize-10frames-fp-tiles-4-8.webm.md5
|
||||||
|
2b292e3392854cd1d76ae597a6f53656cf741cfa *vp90-2-14-resize-10frames-fp-tiles-8-1.webm
|
||||||
|
1c24e54fa19e94e1722f24676404444e941c3d31 *vp90-2-14-resize-10frames-fp-tiles-8-1.webm.md5
|
||||||
|
61beda21064e09634564caa6697ab90bd53c9af7 *vp90-2-14-resize-10frames-fp-tiles-8-2.webm
|
||||||
|
9c0657b4d9e1d0e4c9d28a90e5a8630a65519124 *vp90-2-14-resize-10frames-fp-tiles-8-2.webm.md5
|
||||||
|
1758c50a11a7c92522749b4a251664705f1f0d4b *vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm
|
||||||
|
4f454a06750614314ae15a44087b79016fe2db97 *vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm.md5
|
||||||
|
3920c95ba94f1f048a731d9d9b416043b44aa4bd *vp90-2-14-resize-10frames-fp-tiles-8-4.webm
|
||||||
|
4eb347a0456d2c49a1e1d8de5aa1c51acc39887e *vp90-2-14-resize-10frames-fp-tiles-8-4.webm.md5
|
||||||
|
4b95a74c032a473b6683d7ad5754db1b0ec378e9 *vp90-2-21-resize_inter_1280x720_5_1-2.webm
|
||||||
|
a7826dd386bedfe69d02736969bfb47fb6a40a5e *vp90-2-21-resize_inter_1280x720_5_1-2.webm.md5
|
||||||
|
5cfff79e82c4d69964ccb8e75b4f0c53b9295167 *vp90-2-21-resize_inter_1280x720_5_3-4.webm
|
||||||
|
a18f57db4a25e1f543a99f2ceb182e00db0ee22f *vp90-2-21-resize_inter_1280x720_5_3-4.webm.md5
|
||||||
|
d26db0811bf30eb4131d928669713e2485f8e833 *vp90-2-21-resize_inter_1280x720_7_1-2.webm
|
||||||
|
fd6f9f332cd5bea4c0f0d57be4297bea493cc5a1 *vp90-2-21-resize_inter_1280x720_7_1-2.webm.md5
|
||||||
|
5c7d73d4d268e2ba9593b31cb091fd339505c7fd *vp90-2-21-resize_inter_1280x720_7_3-4.webm
|
||||||
|
7bbb949cabc1e70dadcc74582739f63b833034e0 *vp90-2-21-resize_inter_1280x720_7_3-4.webm.md5
|
||||||
|
f2d2a41a60eb894aff0c5854afca15931f1445a8 *vp90-2-21-resize_inter_1920x1080_5_1-2.webm
|
||||||
|
66d7789992613ac9d678ff905ff1059daa1b89e4 *vp90-2-21-resize_inter_1920x1080_5_1-2.webm.md5
|
||||||
|
764edb75fe7dd64e73a1b4f3b4b2b1bf237a4dea *vp90-2-21-resize_inter_1920x1080_5_3-4.webm
|
||||||
|
f78bea1075983fd990e7f25d4f31438f9b5efa34 *vp90-2-21-resize_inter_1920x1080_5_3-4.webm.md5
|
||||||
|
96496f2ade764a5de9f0c27917c7df1f120fb2ef *vp90-2-21-resize_inter_1920x1080_7_1-2.webm
|
||||||
|
2632b635135ed5ecd67fd22dec7990d29c4f4cb5 *vp90-2-21-resize_inter_1920x1080_7_1-2.webm.md5
|
||||||
|
74889ea42001bf41428cb742ca74e65129c886dc *vp90-2-21-resize_inter_1920x1080_7_3-4.webm
|
||||||
|
d2cf3b25956415bb579d368e7098097e482dd73a *vp90-2-21-resize_inter_1920x1080_7_3-4.webm.md5
|
||||||
|
4658986a8ce36ebfcc80a1903e446eaab3985336 *vp90-2-21-resize_inter_320x180_5_1-2.webm
|
||||||
|
8a3d8cf325109ffa913cc9426c32eea8c202a09a *vp90-2-21-resize_inter_320x180_5_1-2.webm.md5
|
||||||
|
16303aa45176520ee42c2c425247aadc1506b881 *vp90-2-21-resize_inter_320x180_5_3-4.webm
|
||||||
|
41cab1ddf7715b680a4dbce42faa9bcd72af4e5c *vp90-2-21-resize_inter_320x180_5_3-4.webm.md5
|
||||||
|
56648adcee66dd0e5cb6ac947f5ee1b9cc8ba129 *vp90-2-21-resize_inter_320x180_7_1-2.webm
|
||||||
|
70047377787003cc03dda7b2394e6d7eaa666d9e *vp90-2-21-resize_inter_320x180_7_1-2.webm.md5
|
||||||
|
d2ff99165488499cc55f75929f1ce5ca9c9e359b *vp90-2-21-resize_inter_320x180_7_3-4.webm
|
||||||
|
e69019e378114a4643db283b66d1a7e304761a56 *vp90-2-21-resize_inter_320x180_7_3-4.webm.md5
|
||||||
|
4834d129bed0f4289d3a88f2ae3a1736f77621b0 *vp90-2-21-resize_inter_320x240_5_1-2.webm
|
||||||
|
a75653c53d22b623c1927fc0088da21dafef21f4 *vp90-2-21-resize_inter_320x240_5_1-2.webm.md5
|
||||||
|
19818e1b7fd1c1e63d8873c31b0babe29dd33ba6 *vp90-2-21-resize_inter_320x240_5_3-4.webm
|
||||||
|
8d89814ff469a186312111651b16601dfbce4336 *vp90-2-21-resize_inter_320x240_5_3-4.webm.md5
|
||||||
|
ac8057bae52498f324ce92a074d5f8207cc4a4a7 *vp90-2-21-resize_inter_320x240_7_1-2.webm
|
||||||
|
2643440898c83c08cc47bc744245af696b877c24 *vp90-2-21-resize_inter_320x240_7_1-2.webm.md5
|
||||||
|
cf4a4cd38ac8b18c42d8c25a3daafdb39132256b *vp90-2-21-resize_inter_320x240_7_3-4.webm
|
||||||
|
70ba8ec9120b26e9b0ffa2c79b432f16cbcb50ec *vp90-2-21-resize_inter_320x240_7_3-4.webm.md5
|
||||||
|
669f10409fe1c4a054010162ca47773ea1fdbead *vp90-2-21-resize_inter_640x360_5_1-2.webm
|
||||||
|
6355a04249004a35fb386dd1024214234f044383 *vp90-2-21-resize_inter_640x360_5_1-2.webm.md5
|
||||||
|
c23763b950b8247c1775d1f8158d93716197676c *vp90-2-21-resize_inter_640x360_5_3-4.webm
|
||||||
|
59e6fc381e3ec3b7bdaac586334e0bc944d18fb6 *vp90-2-21-resize_inter_640x360_5_3-4.webm.md5
|
||||||
|
71b45cbfdd068baa1f679a69e5e6f421d256a85f *vp90-2-21-resize_inter_640x360_7_1-2.webm
|
||||||
|
1416fc761b690c54a955c4cf017fa078520e8c18 *vp90-2-21-resize_inter_640x360_7_1-2.webm.md5
|
||||||
|
6c409903279448a697e4db63bab1061784bcd8d2 *vp90-2-21-resize_inter_640x360_7_3-4.webm
|
||||||
|
60de1299793433a630b71130cf76c9f5965758e2 *vp90-2-21-resize_inter_640x360_7_3-4.webm.md5
|
||||||
|
852b597b8af096d90c80bf0ed6ed3b336b851f19 *vp90-2-21-resize_inter_640x480_5_1-2.webm
|
||||||
|
f6856f19236ee46ed462bd0a2e7e72b9c3b9cea6 *vp90-2-21-resize_inter_640x480_5_1-2.webm.md5
|
||||||
|
792a16c6f60043bd8dceb515f0b95b8891647858 *vp90-2-21-resize_inter_640x480_5_3-4.webm
|
||||||
|
68ffe59877e9a7863805e1c0a3ce18ce037d7c9d *vp90-2-21-resize_inter_640x480_5_3-4.webm.md5
|
||||||
|
61e044c4759972a35ea3db8c1478a988910a4ef4 *vp90-2-21-resize_inter_640x480_7_1-2.webm
|
||||||
|
7739bfca167b1b43fea72f807f01e097b7cb98d8 *vp90-2-21-resize_inter_640x480_7_1-2.webm.md5
|
||||||
|
7291af354b4418917eee00e3a7e366086a0b7a10 *vp90-2-21-resize_inter_640x480_7_3-4.webm
|
||||||
|
4a18b09ccb36564193f0215f599d745d95bb558c *vp90-2-21-resize_inter_640x480_7_3-4.webm.md5
|
||||||
|
|||||||
43
test/test.mk
43
test/test.mk
@@ -18,15 +18,17 @@ LIBVPX_TEST_SRCS-yes += video_source.h
|
|||||||
LIBVPX_TEST_SRCS-yes += ../md5_utils.h ../md5_utils.c
|
LIBVPX_TEST_SRCS-yes += ../md5_utils.h ../md5_utils.c
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ivf_video_source.h
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ivf_video_source.h
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += ../y4minput.h ../y4minput.c
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += ../y4minput.h ../y4minput.c
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += altref_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += aq_segment_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += aq_segment_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += datarate_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += datarate_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += encode_api_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += error_resilience_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += error_resilience_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += i420_video_source.h
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += i420_video_source.h
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += realtime_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += resize_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += resize_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += y4m_video_source.h
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += y4m_video_source.h
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += yuv_video_source.h
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += yuv_video_source.h
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += altref_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += config_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += config_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += cq_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += cq_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += keyframe_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += keyframe_test.cc
|
||||||
@@ -36,6 +38,7 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += external_frame_buffer_test.cc
|
|||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += invalid_file_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += invalid_file_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += user_priv_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += user_priv_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_frame_parallel_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_frame_parallel_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += active_map_refresh_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += active_map_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += active_map_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += borders_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += borders_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += cpu_speed_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += cpu_speed_test.cc
|
||||||
@@ -43,6 +46,7 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += frame_size_tests.cc
|
|||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_lossless_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_lossless_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_end_to_end_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_end_to_end_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_ethread_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_ethread_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += level_test.cc
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-yes += decode_test_driver.cc
|
LIBVPX_TEST_SRCS-yes += decode_test_driver.cc
|
||||||
LIBVPX_TEST_SRCS-yes += decode_test_driver.h
|
LIBVPX_TEST_SRCS-yes += decode_test_driver.h
|
||||||
@@ -57,10 +61,10 @@ LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += y4m_test.cc ../y4menc.c ../y4menc.h
|
|||||||
|
|
||||||
## WebM Parsing
|
## WebM Parsing
|
||||||
ifeq ($(CONFIG_WEBM_IO), yes)
|
ifeq ($(CONFIG_WEBM_IO), yes)
|
||||||
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser.cpp
|
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvparser.cc
|
||||||
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvreader.cpp
|
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvreader.cc
|
||||||
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser.hpp
|
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvparser.h
|
||||||
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvreader.hpp
|
LIBWEBM_PARSER_SRCS += ../third_party/libwebm/mkvparser/mkvreader.h
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += $(LIBWEBM_PARSER_SRCS)
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += $(LIBWEBM_PARSER_SRCS)
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../tools_common.h
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../tools_common.h
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../webmdec.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../webmdec.cc
|
||||||
@@ -91,10 +95,9 @@ endif
|
|||||||
## shared library builds don't make these functions accessible.
|
## shared library builds don't make these functions accessible.
|
||||||
##
|
##
|
||||||
ifeq ($(CONFIG_SHARED),)
|
ifeq ($(CONFIG_SHARED),)
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9) += lpf_8_test.cc
|
|
||||||
|
|
||||||
## VP8
|
## VP8
|
||||||
ifneq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),)
|
ifeq ($(CONFIG_VP8),yes)
|
||||||
|
|
||||||
# These tests require both the encoder and decoder to be built.
|
# These tests require both the encoder and decoder to be built.
|
||||||
ifeq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),yesyes)
|
ifeq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),yesyes)
|
||||||
@@ -102,15 +105,15 @@ LIBVPX_TEST_SRCS-yes += vp8_boolcoder_test.cc
|
|||||||
LIBVPX_TEST_SRCS-yes += vp8_fragments_test.cc
|
LIBVPX_TEST_SRCS-yes += vp8_fragments_test.cc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += add_noise_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += pp_filter_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += pp_filter_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += vp8_decrypt_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += vp8_decrypt_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += quantize_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += variance_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += variance_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += vp8_fdct4x4_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += vp8_fdct4x4_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += quantize_test.cc
|
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-yes += idct_test.cc
|
LIBVPX_TEST_SRCS-yes += idct_test.cc
|
||||||
LIBVPX_TEST_SRCS-yes += intrapred_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-yes += sixtap_predict_test.cc
|
LIBVPX_TEST_SRCS-yes += sixtap_predict_test.cc
|
||||||
LIBVPX_TEST_SRCS-yes += vpx_scale_test.cc
|
LIBVPX_TEST_SRCS-yes += vpx_scale_test.cc
|
||||||
|
|
||||||
@@ -121,7 +124,7 @@ endif
|
|||||||
endif # VP8
|
endif # VP8
|
||||||
|
|
||||||
## VP9
|
## VP9
|
||||||
ifneq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),)
|
ifeq ($(CONFIG_VP9),yes)
|
||||||
|
|
||||||
# These tests require both the encoder and decoder to be built.
|
# These tests require both the encoder and decoder to be built.
|
||||||
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),yesyes)
|
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),yesyes)
|
||||||
@@ -134,25 +137,27 @@ LIBVPX_TEST_SRCS-yes += vp9_boolcoder_test.cc
|
|||||||
LIBVPX_TEST_SRCS-yes += vp9_encoder_parms_get_to_decoder.cc
|
LIBVPX_TEST_SRCS-yes += vp9_encoder_parms_get_to_decoder.cc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9) += convolve_test.cc
|
LIBVPX_TEST_SRCS-yes += convolve_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_thread_test.cc
|
LIBVPX_TEST_SRCS-yes += lpf_8_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-yes += vp9_intrapred_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_decrypt_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_decrypt_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += vp9_thread_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += avg_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct16x16_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct16x16_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct32x32_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct32x32_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct4x4_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct4x4_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct8x8_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct8x8_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += hadamard_test.cc
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += minmax_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += variance_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += variance_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_subtract_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_avg_test.cc
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_error_block_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_error_block_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_quantize_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_quantize_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_VP9) += vp9_intrapred_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_subtract_test.cc
|
||||||
|
|
||||||
ifeq ($(CONFIG_VP9_ENCODER),yes)
|
ifeq ($(CONFIG_VP9_ENCODER),yes)
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_SPATIAL_SVC) += svc_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_SPATIAL_SVC) += svc_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += blockiness_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += blockiness_test.cc
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += consistency_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_INTERNAL_STATS) += consistency_test.cc
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_TEMPORAL_DENOISING),yesyes)
|
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_TEMPORAL_DENOISING),yesyes)
|
||||||
@@ -162,10 +167,12 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_arf_freq_test.cc
|
|||||||
|
|
||||||
endif # VP9
|
endif # VP9
|
||||||
|
|
||||||
|
## Multi-codec / unconditional whitebox tests.
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
|
||||||
|
|
||||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9) := test_intra_pred_speed.cc
|
TEST_INTRA_PRED_SPEED_SRCS-yes := test_intra_pred_speed.cc
|
||||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9) += ../md5_utils.h ../md5_utils.c
|
TEST_INTRA_PRED_SPEED_SRCS-yes += ../md5_utils.h ../md5_utils.c
|
||||||
|
|
||||||
endif # CONFIG_SHARED
|
endif # CONFIG_SHARED
|
||||||
|
|
||||||
|
|||||||
@@ -187,18 +187,20 @@ INTRA_PRED_TEST(C, TestIntraPred4, vpx_dc_predictor_4x4_c,
|
|||||||
vpx_d153_predictor_4x4_c, vpx_d207_predictor_4x4_c,
|
vpx_d153_predictor_4x4_c, vpx_d207_predictor_4x4_c,
|
||||||
vpx_d63_predictor_4x4_c, vpx_tm_predictor_4x4_c)
|
vpx_d63_predictor_4x4_c, vpx_tm_predictor_4x4_c)
|
||||||
|
|
||||||
#if HAVE_SSE && CONFIG_USE_X86INC
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSE, TestIntraPred4, vpx_dc_predictor_4x4_sse,
|
INTRA_PRED_TEST(SSE2, TestIntraPred4, vpx_dc_predictor_4x4_sse2,
|
||||||
vpx_dc_left_predictor_4x4_sse, vpx_dc_top_predictor_4x4_sse,
|
vpx_dc_left_predictor_4x4_sse2, vpx_dc_top_predictor_4x4_sse2,
|
||||||
vpx_dc_128_predictor_4x4_sse, vpx_v_predictor_4x4_sse, NULL,
|
vpx_dc_128_predictor_4x4_sse2, vpx_v_predictor_4x4_sse2,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, vpx_tm_predictor_4x4_sse)
|
vpx_h_predictor_4x4_sse2, vpx_d45_predictor_4x4_sse2, NULL,
|
||||||
#endif // HAVE_SSE && CONFIG_USE_X86INC
|
NULL, NULL, vpx_d207_predictor_4x4_sse2, NULL,
|
||||||
|
vpx_tm_predictor_4x4_sse2)
|
||||||
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL,
|
INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL,
|
||||||
vpx_h_predictor_4x4_ssse3, vpx_d45_predictor_4x4_ssse3, NULL,
|
NULL, NULL, NULL, NULL,
|
||||||
NULL, vpx_d153_predictor_4x4_ssse3,
|
vpx_d153_predictor_4x4_ssse3, NULL,
|
||||||
vpx_d207_predictor_4x4_ssse3, vpx_d63_predictor_4x4_ssse3, NULL)
|
vpx_d63_predictor_4x4_ssse3, NULL)
|
||||||
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
@@ -235,23 +237,19 @@ INTRA_PRED_TEST(C, TestIntraPred8, vpx_dc_predictor_8x8_c,
|
|||||||
vpx_d153_predictor_8x8_c, vpx_d207_predictor_8x8_c,
|
vpx_d153_predictor_8x8_c, vpx_d207_predictor_8x8_c,
|
||||||
vpx_d63_predictor_8x8_c, vpx_tm_predictor_8x8_c)
|
vpx_d63_predictor_8x8_c, vpx_tm_predictor_8x8_c)
|
||||||
|
|
||||||
#if HAVE_SSE && CONFIG_USE_X86INC
|
|
||||||
INTRA_PRED_TEST(SSE, TestIntraPred8, vpx_dc_predictor_8x8_sse,
|
|
||||||
vpx_dc_left_predictor_8x8_sse, vpx_dc_top_predictor_8x8_sse,
|
|
||||||
vpx_dc_128_predictor_8x8_sse, vpx_v_predictor_8x8_sse, NULL,
|
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL)
|
|
||||||
#endif // HAVE_SSE && CONFIG_USE_X86INC
|
|
||||||
|
|
||||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSE2, TestIntraPred8, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
INTRA_PRED_TEST(SSE2, TestIntraPred8, vpx_dc_predictor_8x8_sse2,
|
||||||
NULL, NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_sse2)
|
vpx_dc_left_predictor_8x8_sse2, vpx_dc_top_predictor_8x8_sse2,
|
||||||
|
vpx_dc_128_predictor_8x8_sse2, vpx_v_predictor_8x8_sse2,
|
||||||
|
vpx_h_predictor_8x8_sse2, vpx_d45_predictor_8x8_sse2, NULL,
|
||||||
|
NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_sse2)
|
||||||
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL,
|
INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL,
|
||||||
vpx_h_predictor_8x8_ssse3, vpx_d45_predictor_8x8_ssse3, NULL,
|
NULL, NULL, NULL, NULL,
|
||||||
NULL, vpx_d153_predictor_8x8_ssse3,
|
vpx_d153_predictor_8x8_ssse3, vpx_d207_predictor_8x8_ssse3,
|
||||||
vpx_d207_predictor_8x8_ssse3, vpx_d63_predictor_8x8_ssse3, NULL)
|
vpx_d63_predictor_8x8_ssse3, NULL)
|
||||||
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
@@ -293,13 +291,13 @@ INTRA_PRED_TEST(SSE2, TestIntraPred16, vpx_dc_predictor_16x16_sse2,
|
|||||||
vpx_dc_left_predictor_16x16_sse2,
|
vpx_dc_left_predictor_16x16_sse2,
|
||||||
vpx_dc_top_predictor_16x16_sse2,
|
vpx_dc_top_predictor_16x16_sse2,
|
||||||
vpx_dc_128_predictor_16x16_sse2, vpx_v_predictor_16x16_sse2,
|
vpx_dc_128_predictor_16x16_sse2, vpx_v_predictor_16x16_sse2,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
vpx_h_predictor_16x16_sse2, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
vpx_tm_predictor_16x16_sse2)
|
vpx_tm_predictor_16x16_sse2)
|
||||||
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSSE3, TestIntraPred16, NULL, NULL, NULL, NULL, NULL,
|
INTRA_PRED_TEST(SSSE3, TestIntraPred16, NULL, NULL, NULL, NULL, NULL,
|
||||||
vpx_h_predictor_16x16_ssse3, vpx_d45_predictor_16x16_ssse3,
|
NULL, vpx_d45_predictor_16x16_ssse3,
|
||||||
NULL, NULL, vpx_d153_predictor_16x16_ssse3,
|
NULL, NULL, vpx_d153_predictor_16x16_ssse3,
|
||||||
vpx_d207_predictor_16x16_ssse3, vpx_d63_predictor_16x16_ssse3,
|
vpx_d207_predictor_16x16_ssse3, vpx_d63_predictor_16x16_ssse3,
|
||||||
NULL)
|
NULL)
|
||||||
@@ -340,28 +338,19 @@ INTRA_PRED_TEST(C, TestIntraPred32, vpx_dc_predictor_32x32_c,
|
|||||||
vpx_d63_predictor_32x32_c, vpx_tm_predictor_32x32_c)
|
vpx_d63_predictor_32x32_c, vpx_tm_predictor_32x32_c)
|
||||||
|
|
||||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
#if ARCH_X86_64
|
|
||||||
INTRA_PRED_TEST(SSE2, TestIntraPred32, vpx_dc_predictor_32x32_sse2,
|
INTRA_PRED_TEST(SSE2, TestIntraPred32, vpx_dc_predictor_32x32_sse2,
|
||||||
vpx_dc_left_predictor_32x32_sse2,
|
vpx_dc_left_predictor_32x32_sse2,
|
||||||
vpx_dc_top_predictor_32x32_sse2,
|
vpx_dc_top_predictor_32x32_sse2,
|
||||||
vpx_dc_128_predictor_32x32_sse2, vpx_v_predictor_32x32_sse2,
|
vpx_dc_128_predictor_32x32_sse2, vpx_v_predictor_32x32_sse2,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
vpx_h_predictor_32x32_sse2, NULL, NULL, NULL, NULL, NULL,
|
||||||
vpx_tm_predictor_32x32_sse2)
|
NULL, vpx_tm_predictor_32x32_sse2)
|
||||||
#else
|
|
||||||
INTRA_PRED_TEST(SSE2, TestIntraPred32, vpx_dc_predictor_32x32_sse2,
|
|
||||||
vpx_dc_left_predictor_32x32_sse2,
|
|
||||||
vpx_dc_top_predictor_32x32_sse2,
|
|
||||||
vpx_dc_128_predictor_32x32_sse2, vpx_v_predictor_32x32_sse2,
|
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
|
|
||||||
#endif // ARCH_X86_64
|
|
||||||
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
#endif // HAVE_SSE2 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL,
|
INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL,
|
||||||
vpx_h_predictor_32x32_ssse3, vpx_d45_predictor_32x32_ssse3,
|
NULL, vpx_d45_predictor_32x32_ssse3, NULL, NULL,
|
||||||
NULL, NULL, vpx_d153_predictor_32x32_ssse3,
|
vpx_d153_predictor_32x32_ssse3, vpx_d207_predictor_32x32_ssse3,
|
||||||
vpx_d207_predictor_32x32_ssse3, vpx_d63_predictor_32x32_ssse3,
|
vpx_d63_predictor_32x32_ssse3, NULL)
|
||||||
NULL)
|
|
||||||
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC
|
||||||
|
|
||||||
#if HAVE_NEON
|
#if HAVE_NEON
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
#include "../tools_common.h"
|
#include "../tools_common.h"
|
||||||
@@ -44,6 +45,12 @@ class TestVectorTest : public ::libvpx_test::DecoderTest,
|
|||||||
TestVectorTest()
|
TestVectorTest()
|
||||||
: DecoderTest(GET_PARAM(0)),
|
: DecoderTest(GET_PARAM(0)),
|
||||||
md5_file_(NULL) {
|
md5_file_(NULL) {
|
||||||
|
#if CONFIG_VP9_DECODER
|
||||||
|
resize_clips_.insert(
|
||||||
|
::libvpx_test::kVP9TestVectorsResize,
|
||||||
|
::libvpx_test::kVP9TestVectorsResize +
|
||||||
|
::libvpx_test::kNumVP9TestVectorsResize);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~TestVectorTest() {
|
virtual ~TestVectorTest() {
|
||||||
@@ -77,6 +84,10 @@ class TestVectorTest : public ::libvpx_test::DecoderTest,
|
|||||||
<< "Md5 checksums don't match: frame number = " << frame_number;
|
<< "Md5 checksums don't match: frame number = " << frame_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_VP9_DECODER
|
||||||
|
std::set<std::string> resize_clips_;
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FILE *md5_file_;
|
FILE *md5_file_;
|
||||||
};
|
};
|
||||||
@@ -92,11 +103,19 @@ TEST_P(TestVectorTest, MD5Match) {
|
|||||||
const int mode = std::tr1::get<kDecodeMode>(input);
|
const int mode = std::tr1::get<kDecodeMode>(input);
|
||||||
libvpx_test::CompressedVideoSource *video = NULL;
|
libvpx_test::CompressedVideoSource *video = NULL;
|
||||||
vpx_codec_flags_t flags = 0;
|
vpx_codec_flags_t flags = 0;
|
||||||
vpx_codec_dec_cfg_t cfg = {0};
|
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
|
||||||
char str[256];
|
char str[256];
|
||||||
|
|
||||||
if (mode == kFrameParallelMode) {
|
if (mode == kFrameParallelMode) {
|
||||||
flags |= VPX_CODEC_USE_FRAME_THREADING;
|
flags |= VPX_CODEC_USE_FRAME_THREADING;
|
||||||
|
#if CONFIG_VP9_DECODER
|
||||||
|
// TODO(hkuang): Fix frame parallel decode bug. See issue 1086.
|
||||||
|
if (resize_clips_.find(filename) != resize_clips_.end()) {
|
||||||
|
printf("Skipping the test file: %s, due to frame parallel decode bug.\n",
|
||||||
|
filename.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.threads = threads;
|
cfg.threads = threads;
|
||||||
|
|||||||
@@ -52,6 +52,31 @@ const char *const kVP8TestVectors[] = {
|
|||||||
const int kNumVP8TestVectors = NELEMENTS(kVP8TestVectors);
|
const int kNumVP8TestVectors = NELEMENTS(kVP8TestVectors);
|
||||||
#endif // CONFIG_VP8_DECODER
|
#endif // CONFIG_VP8_DECODER
|
||||||
#if CONFIG_VP9_DECODER
|
#if CONFIG_VP9_DECODER
|
||||||
|
#define RESIZE_TEST_VECTORS "vp90-2-21-resize_inter_320x180_5_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_320x180_5_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_320x180_7_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_320x180_7_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_320x240_5_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_320x240_5_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_320x240_7_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_320x240_7_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_640x360_5_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_640x360_5_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_640x360_7_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_640x360_7_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_640x480_5_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_640x480_5_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_640x480_7_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_640x480_7_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_1280x720_5_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_1280x720_5_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_1280x720_7_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_1280x720_7_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_1920x1080_5_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_1920x1080_5_3-4.webm", \
|
||||||
|
"vp90-2-21-resize_inter_1920x1080_7_1-2.webm", \
|
||||||
|
"vp90-2-21-resize_inter_1920x1080_7_3-4.webm",
|
||||||
|
|
||||||
const char *const kVP9TestVectors[] = {
|
const char *const kVP9TestVectors[] = {
|
||||||
"vp90-2-00-quantizer-00.webm", "vp90-2-00-quantizer-01.webm",
|
"vp90-2-00-quantizer-00.webm", "vp90-2-00-quantizer-01.webm",
|
||||||
"vp90-2-00-quantizer-02.webm", "vp90-2-00-quantizer-03.webm",
|
"vp90-2-00-quantizer-02.webm", "vp90-2-00-quantizer-03.webm",
|
||||||
@@ -120,7 +145,10 @@ const char *const kVP9TestVectors[] = {
|
|||||||
"vp90-2-02-size-66x10.webm", "vp90-2-02-size-66x16.webm",
|
"vp90-2-02-size-66x10.webm", "vp90-2-02-size-66x16.webm",
|
||||||
"vp90-2-02-size-66x18.webm", "vp90-2-02-size-66x32.webm",
|
"vp90-2-02-size-66x18.webm", "vp90-2-02-size-66x32.webm",
|
||||||
"vp90-2-02-size-66x34.webm", "vp90-2-02-size-66x64.webm",
|
"vp90-2-02-size-66x34.webm", "vp90-2-02-size-66x64.webm",
|
||||||
"vp90-2-02-size-66x66.webm", "vp90-2-03-size-196x196.webm",
|
"vp90-2-02-size-66x66.webm", "vp90-2-02-size-130x132.webm",
|
||||||
|
"vp90-2-02-size-132x130.webm", "vp90-2-02-size-132x132.webm",
|
||||||
|
"vp90-2-02-size-178x180.webm", "vp90-2-02-size-180x178.webm",
|
||||||
|
"vp90-2-02-size-180x180.webm", "vp90-2-03-size-196x196.webm",
|
||||||
"vp90-2-03-size-196x198.webm", "vp90-2-03-size-196x200.webm",
|
"vp90-2-03-size-196x198.webm", "vp90-2-03-size-196x200.webm",
|
||||||
"vp90-2-03-size-196x202.webm", "vp90-2-03-size-196x208.webm",
|
"vp90-2-03-size-196x202.webm", "vp90-2-03-size-196x208.webm",
|
||||||
"vp90-2-03-size-196x210.webm", "vp90-2-03-size-196x224.webm",
|
"vp90-2-03-size-196x210.webm", "vp90-2-03-size-196x224.webm",
|
||||||
@@ -152,7 +180,8 @@ const char *const kVP9TestVectors[] = {
|
|||||||
"vp90-2-03-size-226x198.webm", "vp90-2-03-size-226x200.webm",
|
"vp90-2-03-size-226x198.webm", "vp90-2-03-size-226x200.webm",
|
||||||
"vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm",
|
"vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm",
|
||||||
"vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm",
|
"vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm",
|
||||||
"vp90-2-03-size-226x226.webm", "vp90-2-03-deltaq.webm",
|
"vp90-2-03-size-226x226.webm", "vp90-2-03-size-352x288.webm",
|
||||||
|
"vp90-2-03-deltaq.webm",
|
||||||
"vp90-2-05-resize.ivf", "vp90-2-06-bilinear.webm",
|
"vp90-2-05-resize.ivf", "vp90-2-06-bilinear.webm",
|
||||||
"vp90-2-07-frame_parallel.webm", "vp90-2-08-tile_1x2_frame_parallel.webm",
|
"vp90-2-07-frame_parallel.webm", "vp90-2-08-tile_1x2_frame_parallel.webm",
|
||||||
"vp90-2-08-tile_1x2.webm", "vp90-2-08-tile_1x4_frame_parallel.webm",
|
"vp90-2-08-tile_1x2.webm", "vp90-2-08-tile_1x4_frame_parallel.webm",
|
||||||
@@ -182,6 +211,20 @@ const char *const kVP9TestVectors[] = {
|
|||||||
"vp90-2-14-resize-fp-tiles-4-2.webm", "vp90-2-14-resize-fp-tiles-4-8.webm",
|
"vp90-2-14-resize-fp-tiles-4-2.webm", "vp90-2-14-resize-fp-tiles-4-8.webm",
|
||||||
"vp90-2-14-resize-fp-tiles-8-16.webm", "vp90-2-14-resize-fp-tiles-8-1.webm",
|
"vp90-2-14-resize-fp-tiles-8-16.webm", "vp90-2-14-resize-fp-tiles-8-1.webm",
|
||||||
"vp90-2-14-resize-fp-tiles-8-2.webm", "vp90-2-14-resize-fp-tiles-8-4.webm",
|
"vp90-2-14-resize-fp-tiles-8-2.webm", "vp90-2-14-resize-fp-tiles-8-4.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-1-2-4-8.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-1-2.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-1-4.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-1-8.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-2-1.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-2-4.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-2-8.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-4-1.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-4-2.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-4-8.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-8-1.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-8-2.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-8-4-2-1.webm",
|
||||||
|
"vp90-2-14-resize-10frames-fp-tiles-8-4.webm",
|
||||||
"vp90-2-15-segkey.webm", "vp90-2-15-segkey_adpq.webm",
|
"vp90-2-15-segkey.webm", "vp90-2-15-segkey_adpq.webm",
|
||||||
"vp90-2-16-intra-only.webm", "vp90-2-17-show-existing-frame.webm",
|
"vp90-2-16-intra-only.webm", "vp90-2-17-show-existing-frame.webm",
|
||||||
"vp90-2-18-resize.ivf", "vp90-2-19-skip.webm",
|
"vp90-2-18-resize.ivf", "vp90-2-19-skip.webm",
|
||||||
@@ -193,10 +236,16 @@ const char *const kVP9TestVectors[] = {
|
|||||||
"vp93-2-20-10bit-yuv422.webm", "vp93-2-20-12bit-yuv422.webm",
|
"vp93-2-20-10bit-yuv422.webm", "vp93-2-20-12bit-yuv422.webm",
|
||||||
"vp93-2-20-10bit-yuv440.webm", "vp93-2-20-12bit-yuv440.webm",
|
"vp93-2-20-10bit-yuv440.webm", "vp93-2-20-12bit-yuv440.webm",
|
||||||
"vp93-2-20-10bit-yuv444.webm", "vp93-2-20-12bit-yuv444.webm",
|
"vp93-2-20-10bit-yuv444.webm", "vp93-2-20-12bit-yuv444.webm",
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH`
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
"vp90-2-20-big_superframe-01.webm", "vp90-2-20-big_superframe-02.webm",
|
"vp90-2-20-big_superframe-01.webm", "vp90-2-20-big_superframe-02.webm",
|
||||||
|
RESIZE_TEST_VECTORS
|
||||||
};
|
};
|
||||||
const int kNumVP9TestVectors = NELEMENTS(kVP9TestVectors);
|
const int kNumVP9TestVectors = NELEMENTS(kVP9TestVectors);
|
||||||
|
const char *const kVP9TestVectorsResize[] = {
|
||||||
|
RESIZE_TEST_VECTORS
|
||||||
|
};
|
||||||
|
const int kNumVP9TestVectorsResize = NELEMENTS(kVP9TestVectorsResize);
|
||||||
|
#undef RESIZE_TEST_VECTORS
|
||||||
#endif // CONFIG_VP9_DECODER
|
#endif // CONFIG_VP9_DECODER
|
||||||
|
|
||||||
} // namespace libvpx_test
|
} // namespace libvpx_test
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ extern const char *const kVP8TestVectors[];
|
|||||||
#if CONFIG_VP9_DECODER
|
#if CONFIG_VP9_DECODER
|
||||||
extern const int kNumVP9TestVectors;
|
extern const int kNumVP9TestVectors;
|
||||||
extern const char *const kVP9TestVectors[];
|
extern const char *const kVP9TestVectors[];
|
||||||
|
extern const int kNumVP9TestVectorsResize;
|
||||||
|
extern const char *const kVP9TestVectorsResize[];
|
||||||
#endif // CONFIG_VP9_DECODER
|
#endif // CONFIG_VP9_DECODER
|
||||||
|
|
||||||
} // namespace libvpx_test
|
} // namespace libvpx_test
|
||||||
|
|||||||
@@ -103,6 +103,4 @@ TEST_P(TileIndependenceTest, MD5Match) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
|
VP9_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
|
||||||
|
|
||||||
VP10_INSTANTIATE_TEST_CASE(TileIndependenceTest, ::testing::Range(0, 2, 1));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ twopass_encoder_verify_environment() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Runs twopass_encoder using the codec specified by $1.
|
# Runs twopass_encoder using the codec specified by $1 with a frame limit of
|
||||||
|
# 100.
|
||||||
twopass_encoder() {
|
twopass_encoder() {
|
||||||
local encoder="${LIBVPX_BIN_PATH}/twopass_encoder${VPX_TEST_EXE_SUFFIX}"
|
local encoder="${LIBVPX_BIN_PATH}/twopass_encoder${VPX_TEST_EXE_SUFFIX}"
|
||||||
local codec="$1"
|
local codec="$1"
|
||||||
@@ -35,7 +36,7 @@ twopass_encoder() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
|
eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
|
||||||
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
|
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" 100 \
|
||||||
${devnull}
|
${devnull}
|
||||||
|
|
||||||
[ -e "${output_file}" ] || return 1
|
[ -e "${output_file}" ] || return 1
|
||||||
@@ -47,16 +48,13 @@ twopass_encoder_vp8() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO(tomfinegan): Add a frame limit param to twopass_encoder and enable this
|
twopass_encoder_vp9() {
|
||||||
# test. VP9 is just too slow right now: This test takes 31m16s+ on a fast
|
|
||||||
# machine.
|
|
||||||
DISABLED_twopass_encoder_vp9() {
|
|
||||||
if [ "$(vp9_encode_available)" = "yes" ]; then
|
if [ "$(vp9_encode_available)" = "yes" ]; then
|
||||||
twopass_encoder vp9 || return 1
|
twopass_encoder vp9 || return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
twopass_encoder_tests="twopass_encoder_vp8
|
twopass_encoder_tests="twopass_encoder_vp8
|
||||||
DISABLED_twopass_encoder_vp9"
|
twopass_encoder_vp9"
|
||||||
|
|
||||||
run_tests twopass_encoder_verify_environment "${twopass_encoder_tests}"
|
run_tests twopass_encoder_verify_environment "${twopass_encoder_tests}"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,9 @@
|
|||||||
#define TEST_VIDEO_SOURCE_H_
|
#define TEST_VIDEO_SOURCE_H_
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
#undef NOMINMAX
|
||||||
|
#define NOMINMAX
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|||||||
@@ -229,10 +229,4 @@ VP9_INSTANTIATE_TEST_CASE(
|
|||||||
::testing::ValuesIn(kTestVectors),
|
::testing::ValuesIn(kTestVectors),
|
||||||
::testing::ValuesIn(kEncodeVectors),
|
::testing::ValuesIn(kEncodeVectors),
|
||||||
::testing::ValuesIn(kMinArfVectors));
|
::testing::ValuesIn(kMinArfVectors));
|
||||||
|
|
||||||
VP10_INSTANTIATE_TEST_CASE(
|
|
||||||
ArfFreqTest,
|
|
||||||
::testing::ValuesIn(kTestVectors),
|
|
||||||
::testing::ValuesIn(kEncodeVectors),
|
|
||||||
::testing::ValuesIn(kMinArfVectors));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ TEST_P(VP9DenoiserTest, BitexactCheck) {
|
|||||||
// Test for all block size.
|
// Test for all block size.
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, VP9DenoiserTest,
|
SSE2, VP9DenoiserTest,
|
||||||
::testing::Values(BLOCK_4X4, BLOCK_4X8, BLOCK_8X4, BLOCK_8X8,
|
::testing::Values(BLOCK_8X8, BLOCK_8X16, BLOCK_16X8, BLOCK_16X16,
|
||||||
BLOCK_8X16, BLOCK_16X8, BLOCK_16X16, BLOCK_16X32,
|
BLOCK_16X32, BLOCK_32X16, BLOCK_32X32, BLOCK_32X64,
|
||||||
BLOCK_32X16, BLOCK_32X32, BLOCK_32X64, BLOCK_64X32,
|
BLOCK_64X32, BLOCK_64X64));
|
||||||
BLOCK_64X64));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -14,38 +14,10 @@
|
|||||||
#include "test/encode_test_driver.h"
|
#include "test/encode_test_driver.h"
|
||||||
#include "test/util.h"
|
#include "test/util.h"
|
||||||
#include "test/y4m_video_source.h"
|
#include "test/y4m_video_source.h"
|
||||||
#include "test/yuv_video_source.h"
|
#include "vp9/vp9_dx_iface.h"
|
||||||
#include "vp9/decoder/vp9_decoder.h"
|
|
||||||
|
|
||||||
typedef vpx_codec_stream_info_t vp9_stream_info_t;
|
|
||||||
struct vpx_codec_alg_priv {
|
|
||||||
vpx_codec_priv_t base;
|
|
||||||
vpx_codec_dec_cfg_t cfg;
|
|
||||||
vp9_stream_info_t si;
|
|
||||||
struct VP9Decoder *pbi;
|
|
||||||
int postproc_cfg_set;
|
|
||||||
vp8_postproc_cfg_t postproc_cfg;
|
|
||||||
vpx_decrypt_cb decrypt_cb;
|
|
||||||
void *decrypt_state;
|
|
||||||
vpx_image_t img;
|
|
||||||
int img_avail;
|
|
||||||
int flushed;
|
|
||||||
int invert_tile_order;
|
|
||||||
int frame_parallel_decode;
|
|
||||||
|
|
||||||
// External frame buffer info to save for VP9 common.
|
|
||||||
void *ext_priv; // Private data associated with the external frame buffers.
|
|
||||||
vpx_get_frame_buffer_cb_fn_t get_ext_fb_cb;
|
|
||||||
vpx_release_frame_buffer_cb_fn_t release_ext_fb_cb;
|
|
||||||
};
|
|
||||||
|
|
||||||
static vpx_codec_alg_priv_t *get_alg_priv(vpx_codec_ctx_t *ctx) {
|
|
||||||
return (vpx_codec_alg_priv_t *)ctx->priv;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const unsigned int kFramerate = 50;
|
|
||||||
const int kCpuUsed = 2;
|
const int kCpuUsed = 2;
|
||||||
|
|
||||||
struct EncodePerfTestVideo {
|
struct EncodePerfTestVideo {
|
||||||
@@ -66,35 +38,27 @@ struct EncodeParameters {
|
|||||||
int32_t lossless;
|
int32_t lossless;
|
||||||
int32_t error_resilient;
|
int32_t error_resilient;
|
||||||
int32_t frame_parallel;
|
int32_t frame_parallel;
|
||||||
|
vpx_color_range_t color_range;
|
||||||
vpx_color_space_t cs;
|
vpx_color_space_t cs;
|
||||||
|
int render_size[2];
|
||||||
// TODO(JBB): quantizers / bitrate
|
// TODO(JBB): quantizers / bitrate
|
||||||
};
|
};
|
||||||
|
|
||||||
const EncodeParameters kVP9EncodeParameterSet[] = {
|
const EncodeParameters kVP9EncodeParameterSet[] = {
|
||||||
{0, 0, 0, 1, 0, VPX_CS_BT_601},
|
{0, 0, 0, 1, 0, VPX_CR_STUDIO_RANGE, VPX_CS_BT_601, { 0, 0 }},
|
||||||
{0, 0, 0, 0, 0, VPX_CS_BT_709},
|
{0, 0, 0, 0, 0, VPX_CR_FULL_RANGE, VPX_CS_BT_709, { 0, 0 }},
|
||||||
{0, 0, 1, 0, 0, VPX_CS_BT_2020},
|
{0, 0, 1, 0, 0, VPX_CR_FULL_RANGE, VPX_CS_BT_2020, { 0, 0 }},
|
||||||
{0, 2, 0, 0, 1, VPX_CS_UNKNOWN},
|
{0, 2, 0, 0, 1, VPX_CR_STUDIO_RANGE, VPX_CS_UNKNOWN, { 640, 480 }},
|
||||||
// TODO(JBB): Test profiles (requires more work).
|
// TODO(JBB): Test profiles (requires more work).
|
||||||
};
|
};
|
||||||
|
|
||||||
int is_extension_y4m(const char *filename) {
|
|
||||||
const char *dot = strrchr(filename, '.');
|
|
||||||
if (!dot || dot == filename)
|
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
return !strcmp(dot, ".y4m");
|
|
||||||
}
|
|
||||||
|
|
||||||
class VpxEncoderParmsGetToDecoder
|
class VpxEncoderParmsGetToDecoder
|
||||||
: public ::libvpx_test::EncoderTest,
|
: public ::libvpx_test::EncoderTest,
|
||||||
public ::libvpx_test::CodecTestWith2Params<EncodeParameters, \
|
public ::libvpx_test::CodecTestWith2Params<EncodeParameters,
|
||||||
EncodePerfTestVideo> {
|
EncodePerfTestVideo> {
|
||||||
protected:
|
protected:
|
||||||
VpxEncoderParmsGetToDecoder()
|
VpxEncoderParmsGetToDecoder()
|
||||||
: EncoderTest(GET_PARAM(0)),
|
: EncoderTest(GET_PARAM(0)), encode_parms(GET_PARAM(1)) {}
|
||||||
encode_parms(GET_PARAM(1)) {
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~VpxEncoderParmsGetToDecoder() {}
|
virtual ~VpxEncoderParmsGetToDecoder() {}
|
||||||
|
|
||||||
@@ -112,6 +76,7 @@ class VpxEncoderParmsGetToDecoder
|
|||||||
::libvpx_test::Encoder *encoder) {
|
::libvpx_test::Encoder *encoder) {
|
||||||
if (video->frame() == 1) {
|
if (video->frame() == 1) {
|
||||||
encoder->Control(VP9E_SET_COLOR_SPACE, encode_parms.cs);
|
encoder->Control(VP9E_SET_COLOR_SPACE, encode_parms.cs);
|
||||||
|
encoder->Control(VP9E_SET_COLOR_RANGE, encode_parms.color_range);
|
||||||
encoder->Control(VP9E_SET_LOSSLESS, encode_parms.lossless);
|
encoder->Control(VP9E_SET_LOSSLESS, encode_parms.lossless);
|
||||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING,
|
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING,
|
||||||
encode_parms.frame_parallel);
|
encode_parms.frame_parallel);
|
||||||
@@ -122,37 +87,44 @@ class VpxEncoderParmsGetToDecoder
|
|||||||
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
|
encoder->Control(VP8E_SET_ARNR_MAXFRAMES, 7);
|
||||||
encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
|
encoder->Control(VP8E_SET_ARNR_STRENGTH, 5);
|
||||||
encoder->Control(VP8E_SET_ARNR_TYPE, 3);
|
encoder->Control(VP8E_SET_ARNR_TYPE, 3);
|
||||||
|
if (encode_parms.render_size[0] > 0 && encode_parms.render_size[1] > 0)
|
||||||
|
encoder->Control(VP9E_SET_RENDER_SIZE, encode_parms.render_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec,
|
||||||
const libvpx_test::VideoSource& video,
|
const libvpx_test::VideoSource & /*video*/,
|
||||||
libvpx_test::Decoder *decoder) {
|
libvpx_test::Decoder *decoder) {
|
||||||
vpx_codec_ctx_t* vp9_decoder = decoder->GetDecoder();
|
vpx_codec_ctx_t *const vp9_decoder = decoder->GetDecoder();
|
||||||
vpx_codec_alg_priv_t* priv =
|
vpx_codec_alg_priv_t *const priv =
|
||||||
(vpx_codec_alg_priv_t*) get_alg_priv(vp9_decoder);
|
reinterpret_cast<vpx_codec_alg_priv_t *>(vp9_decoder->priv);
|
||||||
|
FrameWorkerData *const worker_data =
|
||||||
VP9Decoder* pbi = priv->pbi;
|
reinterpret_cast<FrameWorkerData *>(priv->frame_workers[0].data1);
|
||||||
VP9_COMMON* common = &pbi->common;
|
VP9_COMMON *const common = &worker_data->pbi->common;
|
||||||
|
|
||||||
if (encode_parms.lossless) {
|
if (encode_parms.lossless) {
|
||||||
EXPECT_EQ(common->base_qindex, 0);
|
EXPECT_EQ(0, common->base_qindex);
|
||||||
EXPECT_EQ(common->y_dc_delta_q, 0);
|
EXPECT_EQ(0, common->y_dc_delta_q);
|
||||||
EXPECT_EQ(common->uv_dc_delta_q, 0);
|
EXPECT_EQ(0, common->uv_dc_delta_q);
|
||||||
EXPECT_EQ(common->uv_ac_delta_q, 0);
|
EXPECT_EQ(0, common->uv_ac_delta_q);
|
||||||
EXPECT_EQ(common->tx_mode, ONLY_4X4);
|
EXPECT_EQ(ONLY_4X4, common->tx_mode);
|
||||||
}
|
}
|
||||||
EXPECT_EQ(common->error_resilient_mode, encode_parms.error_resilient);
|
EXPECT_EQ(encode_parms.error_resilient, common->error_resilient_mode);
|
||||||
if (encode_parms.error_resilient) {
|
if (encode_parms.error_resilient) {
|
||||||
EXPECT_EQ(common->frame_parallel_decoding_mode, 1);
|
EXPECT_EQ(1, common->frame_parallel_decoding_mode);
|
||||||
EXPECT_EQ(common->use_prev_frame_mvs, 0);
|
EXPECT_EQ(0, common->use_prev_frame_mvs);
|
||||||
} else {
|
} else {
|
||||||
EXPECT_EQ(common->frame_parallel_decoding_mode,
|
EXPECT_EQ(encode_parms.frame_parallel,
|
||||||
encode_parms.frame_parallel);
|
common->frame_parallel_decoding_mode);
|
||||||
}
|
}
|
||||||
EXPECT_EQ(common->color_space, encode_parms.cs);
|
EXPECT_EQ(encode_parms.color_range, common->color_range);
|
||||||
EXPECT_EQ(common->log2_tile_cols, encode_parms.tile_cols);
|
EXPECT_EQ(encode_parms.cs, common->color_space);
|
||||||
EXPECT_EQ(common->log2_tile_rows, encode_parms.tile_rows);
|
if (encode_parms.render_size[0] > 0 && encode_parms.render_size[1] > 0) {
|
||||||
|
EXPECT_EQ(encode_parms.render_size[0], common->render_width);
|
||||||
|
EXPECT_EQ(encode_parms.render_size[1], common->render_height);
|
||||||
|
}
|
||||||
|
EXPECT_EQ(encode_parms.tile_cols, common->log2_tile_cols);
|
||||||
|
EXPECT_EQ(encode_parms.tile_rows, common->log2_tile_rows);
|
||||||
|
|
||||||
EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
|
EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
|
||||||
return VPX_CODEC_OK == res_dec;
|
return VPX_CODEC_OK == res_dec;
|
||||||
@@ -164,35 +136,18 @@ class VpxEncoderParmsGetToDecoder
|
|||||||
EncodeParameters encode_parms;
|
EncodeParameters encode_parms;
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO(hkuang): This test conflicts with frame parallel decode. So disable it
|
TEST_P(VpxEncoderParmsGetToDecoder, BitstreamParms) {
|
||||||
// for now until fix.
|
|
||||||
TEST_P(VpxEncoderParmsGetToDecoder, DISABLED_BitstreamParms) {
|
|
||||||
init_flags_ = VPX_CODEC_USE_PSNR;
|
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||||
|
|
||||||
libvpx_test::VideoSource *video;
|
libvpx_test::VideoSource *const video =
|
||||||
if (is_extension_y4m(test_video_.name)) {
|
new libvpx_test::Y4mVideoSource(test_video_.name, 0, test_video_.frames);
|
||||||
video = new libvpx_test::Y4mVideoSource(test_video_.name,
|
ASSERT_TRUE(video != NULL);
|
||||||
0, test_video_.frames);
|
|
||||||
} else {
|
|
||||||
video = new libvpx_test::YUVVideoSource(test_video_.name,
|
|
||||||
VPX_IMG_FMT_I420,
|
|
||||||
test_video_.width,
|
|
||||||
test_video_.height,
|
|
||||||
kFramerate, 1, 0,
|
|
||||||
test_video_.frames);
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
|
||||||
delete(video);
|
delete video;
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9_INSTANTIATE_TEST_CASE(
|
VP9_INSTANTIATE_TEST_CASE(VpxEncoderParmsGetToDecoder,
|
||||||
VpxEncoderParmsGetToDecoder,
|
|
||||||
::testing::ValuesIn(kVP9EncodeParameterSet),
|
|
||||||
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
|
||||||
|
|
||||||
VP10_INSTANTIATE_TEST_CASE(
|
|
||||||
VpxEncoderParmsGetToDecoder,
|
|
||||||
::testing::ValuesIn(kVP9EncodeParameterSet),
|
::testing::ValuesIn(kVP9EncodeParameterSet),
|
||||||
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -186,10 +186,4 @@ VP9_INSTANTIATE_TEST_CASE(
|
|||||||
::testing::ValuesIn(kEncodingModeVectors),
|
::testing::ValuesIn(kEncodingModeVectors),
|
||||||
::testing::ValuesIn(kTestVectors),
|
::testing::ValuesIn(kTestVectors),
|
||||||
::testing::ValuesIn(kCpuUsedVectors));
|
::testing::ValuesIn(kCpuUsedVectors));
|
||||||
|
|
||||||
VP10_INSTANTIATE_TEST_CASE(
|
|
||||||
EndToEndTestLarge,
|
|
||||||
::testing::ValuesIn(kEncodingModeVectors),
|
|
||||||
::testing::ValuesIn(kTestVectors),
|
|
||||||
::testing::ValuesIn(kCpuUsedVectors));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -67,12 +67,22 @@ TEST_P(ErrorBlockTest, OperationCheck) {
|
|||||||
int64_t ret;
|
int64_t ret;
|
||||||
int64_t ref_ssz;
|
int64_t ref_ssz;
|
||||||
int64_t ref_ret;
|
int64_t ref_ret;
|
||||||
|
const int msb = bit_depth_ + 8 - 1;
|
||||||
for (int i = 0; i < kNumIterations; ++i) {
|
for (int i = 0; i < kNumIterations; ++i) {
|
||||||
int err_count = 0;
|
int err_count = 0;
|
||||||
block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64
|
block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64
|
||||||
for (int j = 0; j < block_size; j++) {
|
for (int j = 0; j < block_size; j++) {
|
||||||
coeff[j] = rnd(2 << 20) - (1 << 20);
|
// coeff and dqcoeff will always have at least the same sign, and this
|
||||||
dqcoeff[j] = rnd(2 << 20) - (1 << 20);
|
// can be used for optimization, so generate test input precisely.
|
||||||
|
if (rnd(2)) {
|
||||||
|
// Positive number
|
||||||
|
coeff[j] = rnd(1 << msb);
|
||||||
|
dqcoeff[j] = rnd(1 << msb);
|
||||||
|
} else {
|
||||||
|
// Negative number
|
||||||
|
coeff[j] = -rnd(1 << msb);
|
||||||
|
dqcoeff[j] = -rnd(1 << msb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ref_ret = ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz,
|
ref_ret = ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz,
|
||||||
bit_depth_);
|
bit_depth_);
|
||||||
@@ -85,7 +95,7 @@ TEST_P(ErrorBlockTest, OperationCheck) {
|
|||||||
err_count_total += err_count;
|
err_count_total += err_count;
|
||||||
}
|
}
|
||||||
EXPECT_EQ(0, err_count_total)
|
EXPECT_EQ(0, err_count_total)
|
||||||
<< "Error: Error Block Test, C output doesn't match SSE2 output. "
|
<< "Error: Error Block Test, C output doesn't match optimized output. "
|
||||||
<< "First failed at test case " << first_failure;
|
<< "First failed at test case " << first_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,23 +110,36 @@ TEST_P(ErrorBlockTest, ExtremeValues) {
|
|||||||
int64_t ret;
|
int64_t ret;
|
||||||
int64_t ref_ssz;
|
int64_t ref_ssz;
|
||||||
int64_t ref_ret;
|
int64_t ref_ret;
|
||||||
int max_val = ((1 << 20) - 1);
|
const int msb = bit_depth_ + 8 - 1;
|
||||||
|
int max_val = ((1 << msb) - 1);
|
||||||
for (int i = 0; i < kNumIterations; ++i) {
|
for (int i = 0; i < kNumIterations; ++i) {
|
||||||
int err_count = 0;
|
int err_count = 0;
|
||||||
int k = (i / 9) % 5;
|
int k = (i / 9) % 9;
|
||||||
|
|
||||||
// Change the maximum coeff value, to test different bit boundaries
|
// Change the maximum coeff value, to test different bit boundaries
|
||||||
if ( k == 4 && (i % 9) == 0 ) {
|
if ( k == 8 && (i % 9) == 0 ) {
|
||||||
max_val >>= 1;
|
max_val >>= 1;
|
||||||
}
|
}
|
||||||
block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64
|
block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64
|
||||||
for (int j = 0; j < block_size; j++) {
|
for (int j = 0; j < block_size; j++) {
|
||||||
if (k < 4) { // Test at maximum values
|
if (k < 4) {
|
||||||
coeff[j] = k % 2 ? max_val : -max_val;
|
// Test at positive maximum values
|
||||||
dqcoeff[j] = (k >> 1) % 2 ? max_val : -max_val;
|
coeff[j] = k % 2 ? max_val : 0;
|
||||||
|
dqcoeff[j] = (k >> 1) % 2 ? max_val : 0;
|
||||||
|
} else if (k < 8) {
|
||||||
|
// Test at negative maximum values
|
||||||
|
coeff[j] = k % 2 ? -max_val : 0;
|
||||||
|
dqcoeff[j] = (k >> 1) % 2 ? -max_val : 0;
|
||||||
} else {
|
} else {
|
||||||
coeff[j] = rnd(2 << 14) - (1 << 14);
|
if (rnd(2)) {
|
||||||
dqcoeff[j] = rnd(2 << 14) - (1 << 14);
|
// Positive number
|
||||||
|
coeff[j] = rnd(1 << 14);
|
||||||
|
dqcoeff[j] = rnd(1 << 14);
|
||||||
|
} else {
|
||||||
|
// Negative number
|
||||||
|
coeff[j] = -rnd(1 << 14);
|
||||||
|
dqcoeff[j] = -rnd(1 << 14);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ref_ret = ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz,
|
ref_ret = ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz,
|
||||||
@@ -130,13 +153,30 @@ TEST_P(ErrorBlockTest, ExtremeValues) {
|
|||||||
err_count_total += err_count;
|
err_count_total += err_count;
|
||||||
}
|
}
|
||||||
EXPECT_EQ(0, err_count_total)
|
EXPECT_EQ(0, err_count_total)
|
||||||
<< "Error: Error Block Test, C output doesn't match SSE2 output. "
|
<< "Error: Error Block Test, C output doesn't match optimized output. "
|
||||||
<< "First failed at test case " << first_failure;
|
<< "First failed at test case " << first_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
|
#if CONFIG_USE_X86INC
|
||||||
|
int64_t wrap_vp9_highbd_block_error_8bit_c(const tran_low_t *coeff,
|
||||||
|
const tran_low_t *dqcoeff,
|
||||||
|
intptr_t block_size,
|
||||||
|
int64_t *ssz, int bps) {
|
||||||
|
EXPECT_EQ(8, bps);
|
||||||
|
return vp9_highbd_block_error_8bit_c(coeff, dqcoeff, block_size, ssz);
|
||||||
|
}
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
|
int64_t wrap_vp9_highbd_block_error_8bit_sse2(const tran_low_t *coeff,
|
||||||
|
const tran_low_t *dqcoeff,
|
||||||
|
intptr_t block_size,
|
||||||
|
int64_t *ssz, int bps) {
|
||||||
|
EXPECT_EQ(8, bps);
|
||||||
|
return vp9_highbd_block_error_8bit_sse2(coeff, dqcoeff, block_size, ssz);
|
||||||
|
}
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
SSE2, ErrorBlockTest,
|
SSE2, ErrorBlockTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
@@ -145,7 +185,27 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
make_tuple(&vp9_highbd_block_error_sse2,
|
make_tuple(&vp9_highbd_block_error_sse2,
|
||||||
&vp9_highbd_block_error_c, VPX_BITS_12),
|
&vp9_highbd_block_error_c, VPX_BITS_12),
|
||||||
make_tuple(&vp9_highbd_block_error_sse2,
|
make_tuple(&vp9_highbd_block_error_sse2,
|
||||||
&vp9_highbd_block_error_c, VPX_BITS_8)));
|
&vp9_highbd_block_error_c, VPX_BITS_8),
|
||||||
|
make_tuple(&wrap_vp9_highbd_block_error_8bit_sse2,
|
||||||
|
&wrap_vp9_highbd_block_error_8bit_c, VPX_BITS_8)));
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
|
|
||||||
|
#if HAVE_AVX
|
||||||
|
int64_t wrap_vp9_highbd_block_error_8bit_avx(const tran_low_t *coeff,
|
||||||
|
const tran_low_t *dqcoeff,
|
||||||
|
intptr_t block_size,
|
||||||
|
int64_t *ssz, int bps) {
|
||||||
|
EXPECT_EQ(8, bps);
|
||||||
|
return vp9_highbd_block_error_8bit_avx(coeff, dqcoeff, block_size, ssz);
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
AVX, ErrorBlockTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&wrap_vp9_highbd_block_error_8bit_avx,
|
||||||
|
&wrap_vp9_highbd_block_error_8bit_c, VPX_BITS_8)));
|
||||||
|
#endif // HAVE_AVX
|
||||||
|
|
||||||
|
#endif // CONFIG_USE_X86INC
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -29,16 +29,9 @@ class VPxEncoderThreadTest
|
|||||||
encoding_mode_(GET_PARAM(1)),
|
encoding_mode_(GET_PARAM(1)),
|
||||||
set_cpu_used_(GET_PARAM(2)) {
|
set_cpu_used_(GET_PARAM(2)) {
|
||||||
init_flags_ = VPX_CODEC_USE_PSNR;
|
init_flags_ = VPX_CODEC_USE_PSNR;
|
||||||
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
|
|
||||||
cfg.w = 1280;
|
|
||||||
cfg.h = 720;
|
|
||||||
decoder_ = codec_->CreateDecoder(cfg, 0);
|
|
||||||
|
|
||||||
md5_.clear();
|
md5_.clear();
|
||||||
}
|
}
|
||||||
virtual ~VPxEncoderThreadTest() {
|
virtual ~VPxEncoderThreadTest() {}
|
||||||
delete decoder_;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void SetUp() {
|
virtual void SetUp() {
|
||||||
InitializeConfig();
|
InitializeConfig();
|
||||||
@@ -48,7 +41,7 @@ class VPxEncoderThreadTest
|
|||||||
cfg_.g_lag_in_frames = 3;
|
cfg_.g_lag_in_frames = 3;
|
||||||
cfg_.rc_end_usage = VPX_VBR;
|
cfg_.rc_end_usage = VPX_VBR;
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
cfg_.rc_2pass_vbr_minsection_pct = 5;
|
||||||
cfg_.rc_2pass_vbr_minsection_pct = 2000;
|
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
|
||||||
} else {
|
} else {
|
||||||
cfg_.g_lag_in_frames = 0;
|
cfg_.g_lag_in_frames = 0;
|
||||||
cfg_.rc_end_usage = VPX_CBR;
|
cfg_.rc_end_usage = VPX_CBR;
|
||||||
@@ -62,7 +55,7 @@ class VPxEncoderThreadTest
|
|||||||
encoder_initialized_ = false;
|
encoder_initialized_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
|
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource * /*video*/,
|
||||||
::libvpx_test::Encoder *encoder) {
|
::libvpx_test::Encoder *encoder) {
|
||||||
if (!encoder_initialized_) {
|
if (!encoder_initialized_) {
|
||||||
// Encode 4 column tiles.
|
// Encode 4 column tiles.
|
||||||
@@ -81,27 +74,28 @@ class VPxEncoderThreadTest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
|
virtual void DecompressedFrameHook(const vpx_image_t &img,
|
||||||
const vpx_codec_err_t res = decoder_->DecodeFrame(
|
vpx_codec_pts_t /*pts*/) {
|
||||||
reinterpret_cast<uint8_t*>(pkt->data.frame.buf), pkt->data.frame.sz);
|
|
||||||
if (res != VPX_CODEC_OK) {
|
|
||||||
abort_ = true;
|
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res);
|
|
||||||
}
|
|
||||||
const vpx_image_t *img = decoder_->GetDxData().Next();
|
|
||||||
|
|
||||||
if (img) {
|
|
||||||
::libvpx_test::MD5 md5_res;
|
::libvpx_test::MD5 md5_res;
|
||||||
md5_res.Add(img);
|
md5_res.Add(&img);
|
||||||
md5_.push_back(md5_res.Get());
|
md5_.push_back(md5_res.Get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool HandleDecodeResult(const vpx_codec_err_t res,
|
||||||
|
const libvpx_test::VideoSource& /*video*/,
|
||||||
|
libvpx_test::Decoder * /*decoder*/) {
|
||||||
|
if (res != VPX_CODEC_OK) {
|
||||||
|
EXPECT_EQ(VPX_CODEC_OK, res);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool encoder_initialized_;
|
bool encoder_initialized_;
|
||||||
int tiles_;
|
int tiles_;
|
||||||
::libvpx_test::TestMode encoding_mode_;
|
::libvpx_test::TestMode encoding_mode_;
|
||||||
int set_cpu_used_;
|
int set_cpu_used_;
|
||||||
::libvpx_test::Decoder *decoder_;
|
|
||||||
std::vector<std::string> md5_;
|
std::vector<std::string> md5_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -134,9 +128,4 @@ VP9_INSTANTIATE_TEST_CASE(
|
|||||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood,
|
||||||
::libvpx_test::kRealTime),
|
::libvpx_test::kRealTime),
|
||||||
::testing::Range(1, 9));
|
::testing::Range(1, 9));
|
||||||
|
|
||||||
VP10_INSTANTIATE_TEST_CASE(
|
|
||||||
VPxEncoderThreadTest,
|
|
||||||
::testing::Values(::libvpx_test::kTwoPassGood, ::libvpx_test::kOnePassGood),
|
|
||||||
::testing::Range(1, 3));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class VP9IntraPredBase {
|
|||||||
virtual ~VP9IntraPredBase() { libvpx_test::ClearSystemState(); }
|
virtual ~VP9IntraPredBase() { libvpx_test::ClearSystemState(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void Predict(PREDICTION_MODE mode) = 0;
|
virtual void Predict() = 0;
|
||||||
|
|
||||||
void CheckPrediction(int test_case_number, int *error_count) const {
|
void CheckPrediction(int test_case_number, int *error_count) const {
|
||||||
// For each pixel ensure that the calculated value is the same as reference.
|
// For each pixel ensure that the calculated value is the same as reference.
|
||||||
@@ -73,7 +73,7 @@ class VP9IntraPredBase {
|
|||||||
left_col_[y] = rnd.Rand16() & mask_;
|
left_col_[y] = rnd.Rand16() & mask_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Predict(DC_PRED);
|
Predict();
|
||||||
CheckPrediction(i, &error_count);
|
CheckPrediction(i, &error_count);
|
||||||
}
|
}
|
||||||
ASSERT_EQ(0, error_count);
|
ASSERT_EQ(0, error_count);
|
||||||
@@ -106,7 +106,7 @@ class VP9IntraPredTest
|
|||||||
mask_ = (1 << bit_depth_) - 1;
|
mask_ = (1 << bit_depth_) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Predict(PREDICTION_MODE mode) {
|
virtual void Predict() {
|
||||||
const uint16_t *const_above_row = above_row_;
|
const uint16_t *const_above_row = above_row_;
|
||||||
const uint16_t *const_left_col = left_col_;
|
const uint16_t *const_left_col = left_col_;
|
||||||
ref_fn_(ref_dst_, stride_, const_above_row, const_left_col, bit_depth_);
|
ref_fn_(ref_dst_, stride_, const_above_row, const_left_col, bit_depth_);
|
||||||
@@ -132,7 +132,6 @@ using std::tr1::make_tuple;
|
|||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
#if CONFIG_USE_X86INC
|
#if CONFIG_USE_X86INC
|
||||||
#if ARCH_X86_64
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||||
@@ -141,13 +140,13 @@ INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
|||||||
&vpx_highbd_tm_predictor_16x16_c, 16, 8),
|
&vpx_highbd_tm_predictor_16x16_c, 16, 8),
|
||||||
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||||
&vpx_highbd_tm_predictor_32x32_c, 32, 8),
|
&vpx_highbd_tm_predictor_32x32_c, 32, 8),
|
||||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_dc_predictor_4x4_sse2,
|
||||||
&vpx_highbd_dc_predictor_4x4_c, 4, 8),
|
&vpx_highbd_dc_predictor_4x4_c, 4, 8),
|
||||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||||
&vpx_highbd_dc_predictor_8x8_c, 8, 8),
|
&vpx_highbd_dc_predictor_8x8_c, 8, 8),
|
||||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||||
&vpx_highbd_dc_predictor_16x16_c, 16, 8),
|
&vpx_highbd_dc_predictor_16x16_c, 16, 8),
|
||||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_v_predictor_4x4_sse2,
|
||||||
&vpx_highbd_v_predictor_4x4_c, 4, 8),
|
&vpx_highbd_v_predictor_4x4_c, 4, 8),
|
||||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||||
&vpx_highbd_v_predictor_8x8_c, 8, 8),
|
&vpx_highbd_v_predictor_8x8_c, 8, 8),
|
||||||
@@ -155,34 +154,11 @@ INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
|||||||
&vpx_highbd_v_predictor_16x16_c, 16, 8),
|
&vpx_highbd_v_predictor_16x16_c, 16, 8),
|
||||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||||
&vpx_highbd_v_predictor_32x32_c, 32, 8),
|
&vpx_highbd_v_predictor_32x32_c, 32, 8),
|
||||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_tm_predictor_4x4_sse2,
|
||||||
&vpx_highbd_tm_predictor_4x4_c, 4, 8),
|
&vpx_highbd_tm_predictor_4x4_c, 4, 8),
|
||||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||||
&vpx_highbd_tm_predictor_8x8_c, 8, 8)));
|
&vpx_highbd_tm_predictor_8x8_c, 8, 8)));
|
||||||
#else
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
|
|
||||||
::testing::Values(
|
|
||||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
|
||||||
&vpx_highbd_dc_predictor_4x4_c, 4, 8),
|
|
||||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
|
||||||
&vpx_highbd_dc_predictor_8x8_c, 8, 8),
|
|
||||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
|
||||||
&vpx_highbd_dc_predictor_16x16_c, 16, 8),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
|
||||||
&vpx_highbd_v_predictor_4x4_c, 4, 8),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
|
||||||
&vpx_highbd_v_predictor_8x8_c, 8, 8),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
|
||||||
&vpx_highbd_v_predictor_16x16_c, 16, 8),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
|
||||||
&vpx_highbd_v_predictor_32x32_c, 32, 8),
|
|
||||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
|
||||||
&vpx_highbd_tm_predictor_4x4_c, 4, 8),
|
|
||||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
|
||||||
&vpx_highbd_tm_predictor_8x8_c, 8, 8)));
|
|
||||||
#endif // !ARCH_X86_64
|
|
||||||
|
|
||||||
#if ARCH_X86_64
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
|
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||||
@@ -194,14 +170,14 @@ INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
|
|||||||
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||||
&vpx_highbd_tm_predictor_32x32_c, 32,
|
&vpx_highbd_tm_predictor_32x32_c, 32,
|
||||||
10),
|
10),
|
||||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_dc_predictor_4x4_sse2,
|
||||||
&vpx_highbd_dc_predictor_4x4_c, 4, 10),
|
&vpx_highbd_dc_predictor_4x4_c, 4, 10),
|
||||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||||
&vpx_highbd_dc_predictor_8x8_c, 8, 10),
|
&vpx_highbd_dc_predictor_8x8_c, 8, 10),
|
||||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||||
&vpx_highbd_dc_predictor_16x16_c, 16,
|
&vpx_highbd_dc_predictor_16x16_c, 16,
|
||||||
10),
|
10),
|
||||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_v_predictor_4x4_sse2,
|
||||||
&vpx_highbd_v_predictor_4x4_c, 4, 10),
|
&vpx_highbd_v_predictor_4x4_c, 4, 10),
|
||||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||||
&vpx_highbd_v_predictor_8x8_c, 8, 10),
|
&vpx_highbd_v_predictor_8x8_c, 8, 10),
|
||||||
@@ -211,35 +187,11 @@ INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
|
|||||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||||
&vpx_highbd_v_predictor_32x32_c, 32,
|
&vpx_highbd_v_predictor_32x32_c, 32,
|
||||||
10),
|
10),
|
||||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_tm_predictor_4x4_sse2,
|
||||||
&vpx_highbd_tm_predictor_4x4_c, 4, 10),
|
&vpx_highbd_tm_predictor_4x4_c, 4, 10),
|
||||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||||
&vpx_highbd_tm_predictor_8x8_c, 8, 10)));
|
&vpx_highbd_tm_predictor_8x8_c, 8, 10)));
|
||||||
#else
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_10, VP9IntraPredTest,
|
|
||||||
::testing::Values(
|
|
||||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
|
||||||
&vpx_highbd_dc_predictor_4x4_c, 4, 10),
|
|
||||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
|
||||||
&vpx_highbd_dc_predictor_8x8_c, 8, 10),
|
|
||||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
|
||||||
&vpx_highbd_dc_predictor_16x16_c, 16,
|
|
||||||
10),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
|
||||||
&vpx_highbd_v_predictor_4x4_c, 4, 10),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
|
||||||
&vpx_highbd_v_predictor_8x8_c, 8, 10),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
|
||||||
&vpx_highbd_v_predictor_16x16_c, 16, 10),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
|
||||||
&vpx_highbd_v_predictor_32x32_c, 32, 10),
|
|
||||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
|
||||||
&vpx_highbd_tm_predictor_4x4_c, 4, 10),
|
|
||||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
|
||||||
&vpx_highbd_tm_predictor_8x8_c, 8, 10)));
|
|
||||||
#endif // !ARCH_X86_64
|
|
||||||
|
|
||||||
#if ARCH_X86_64
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
||||||
::testing::Values(
|
::testing::Values(
|
||||||
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_32x32_sse2,
|
||||||
@@ -251,14 +203,14 @@ INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
|||||||
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_32x32_sse2,
|
||||||
&vpx_highbd_tm_predictor_32x32_c, 32,
|
&vpx_highbd_tm_predictor_32x32_c, 32,
|
||||||
12),
|
12),
|
||||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_dc_predictor_4x4_sse2,
|
||||||
&vpx_highbd_dc_predictor_4x4_c, 4, 12),
|
&vpx_highbd_dc_predictor_4x4_c, 4, 12),
|
||||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
||||||
&vpx_highbd_dc_predictor_8x8_c, 8, 12),
|
&vpx_highbd_dc_predictor_8x8_c, 8, 12),
|
||||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
||||||
&vpx_highbd_dc_predictor_16x16_c, 16,
|
&vpx_highbd_dc_predictor_16x16_c, 16,
|
||||||
12),
|
12),
|
||||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_v_predictor_4x4_sse2,
|
||||||
&vpx_highbd_v_predictor_4x4_c, 4, 12),
|
&vpx_highbd_v_predictor_4x4_c, 4, 12),
|
||||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
||||||
&vpx_highbd_v_predictor_8x8_c, 8, 12),
|
&vpx_highbd_v_predictor_8x8_c, 8, 12),
|
||||||
@@ -268,33 +220,11 @@ INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
|||||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
||||||
&vpx_highbd_v_predictor_32x32_c, 32,
|
&vpx_highbd_v_predictor_32x32_c, 32,
|
||||||
12),
|
12),
|
||||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
make_tuple(&vpx_highbd_tm_predictor_4x4_sse2,
|
||||||
&vpx_highbd_tm_predictor_4x4_c, 4, 12),
|
&vpx_highbd_tm_predictor_4x4_c, 4, 12),
|
||||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
||||||
&vpx_highbd_tm_predictor_8x8_c, 8, 12)));
|
&vpx_highbd_tm_predictor_8x8_c, 8, 12)));
|
||||||
#else
|
|
||||||
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
|
|
||||||
::testing::Values(
|
|
||||||
make_tuple(&vpx_highbd_dc_predictor_4x4_sse,
|
|
||||||
&vpx_highbd_dc_predictor_4x4_c, 4, 12),
|
|
||||||
make_tuple(&vpx_highbd_dc_predictor_8x8_sse2,
|
|
||||||
&vpx_highbd_dc_predictor_8x8_c, 8, 12),
|
|
||||||
make_tuple(&vpx_highbd_dc_predictor_16x16_sse2,
|
|
||||||
&vpx_highbd_dc_predictor_16x16_c, 16,
|
|
||||||
12),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_4x4_sse,
|
|
||||||
&vpx_highbd_v_predictor_4x4_c, 4, 12),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_8x8_sse2,
|
|
||||||
&vpx_highbd_v_predictor_8x8_c, 8, 12),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_16x16_sse2,
|
|
||||||
&vpx_highbd_v_predictor_16x16_c, 16, 12),
|
|
||||||
make_tuple(&vpx_highbd_v_predictor_32x32_sse2,
|
|
||||||
&vpx_highbd_v_predictor_32x32_c, 32, 12),
|
|
||||||
make_tuple(&vpx_highbd_tm_predictor_4x4_sse,
|
|
||||||
&vpx_highbd_tm_predictor_4x4_c, 4, 12),
|
|
||||||
make_tuple(&vpx_highbd_tm_predictor_8x8_sse2,
|
|
||||||
&vpx_highbd_tm_predictor_8x8_c, 8, 12)));
|
|
||||||
#endif // !ARCH_X86_64
|
|
||||||
#endif // CONFIG_USE_X86INC
|
#endif // CONFIG_USE_X86INC
|
||||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
#endif // HAVE_SSE2
|
#endif // HAVE_SSE2
|
||||||
|
|||||||
@@ -127,8 +127,4 @@ VP9_INSTANTIATE_TEST_CASE(LosslessTest,
|
|||||||
::testing::Values(::libvpx_test::kRealTime,
|
::testing::Values(::libvpx_test::kRealTime,
|
||||||
::libvpx_test::kOnePassGood,
|
::libvpx_test::kOnePassGood,
|
||||||
::libvpx_test::kTwoPassGood));
|
::libvpx_test::kTwoPassGood));
|
||||||
|
|
||||||
VP10_INSTANTIATE_TEST_CASE(LosslessTest,
|
|
||||||
::testing::Values(::libvpx_test::kOnePassGood,
|
|
||||||
::libvpx_test::kTwoPassGood));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ vp9_spatial_svc() {
|
|||||||
if [ "$(vp9_encode_available)" = "yes" ]; then
|
if [ "$(vp9_encode_available)" = "yes" ]; then
|
||||||
local readonly test_name="vp9_spatial_svc"
|
local readonly test_name="vp9_spatial_svc"
|
||||||
for layers in $(seq 1 ${vp9_ssvc_test_layers}); do
|
for layers in $(seq 1 ${vp9_ssvc_test_layers}); do
|
||||||
vp9_spatial_svc_encoder "${test_name}" -l ${layers}
|
vp9_spatial_svc_encoder "${test_name}" -sl ${layers}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ string DecodeFile(const string& filename, int num_threads) {
|
|||||||
void DecodeFiles(const FileList files[]) {
|
void DecodeFiles(const FileList files[]) {
|
||||||
for (const FileList *iter = files; iter->name != NULL; ++iter) {
|
for (const FileList *iter = files; iter->name != NULL; ++iter) {
|
||||||
SCOPED_TRACE(iter->name);
|
SCOPED_TRACE(iter->name);
|
||||||
for (int t = 2; t <= 8; ++t) {
|
for (int t = 1; t <= 8; ++t) {
|
||||||
EXPECT_EQ(iter->expected_md5, DecodeFile(iter->name, t))
|
EXPECT_EQ(iter->expected_md5, DecodeFile(iter->name, t))
|
||||||
<< "threads = " << t;
|
<< "threads = " << t;
|
||||||
}
|
}
|
||||||
@@ -235,13 +235,13 @@ TEST(VPxWorkerThreadTest, TestSerialInterface) {
|
|||||||
EXPECT_EQ(expected_md5, DecodeFile(filename, 2));
|
EXPECT_EQ(expected_md5, DecodeFile(filename, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(VP9DecodeMultiThreadedTest, Decode) {
|
TEST(VP9DecodeMultiThreadedTest, NoTilesNonFrameParallel) {
|
||||||
// no tiles or frame parallel; this exercises loop filter threading.
|
// no tiles or frame parallel; this exercises loop filter threading.
|
||||||
EXPECT_EQ("b35a1b707b28e82be025d960aba039bc",
|
EXPECT_EQ("b35a1b707b28e82be025d960aba039bc",
|
||||||
DecodeFile("vp90-2-03-size-226x226.webm", 2));
|
DecodeFile("vp90-2-03-size-226x226.webm", 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(VP9DecodeMultiThreadedTest, Decode2) {
|
TEST(VP9DecodeMultiThreadedTest, FrameParallel) {
|
||||||
static const FileList files[] = {
|
static const FileList files[] = {
|
||||||
{ "vp90-2-08-tile_1x2_frame_parallel.webm",
|
{ "vp90-2-08-tile_1x2_frame_parallel.webm",
|
||||||
"68ede6abd66bae0a2edf2eb9232241b6" },
|
"68ede6abd66bae0a2edf2eb9232241b6" },
|
||||||
@@ -255,8 +255,7 @@ TEST(VP9DecodeMultiThreadedTest, Decode2) {
|
|||||||
DecodeFiles(files);
|
DecodeFiles(files);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test tile quantity changes within one file.
|
TEST(VP9DecodeMultiThreadedTest, FrameParallelResize) {
|
||||||
TEST(VP9DecodeMultiThreadedTest, Decode3) {
|
|
||||||
static const FileList files[] = {
|
static const FileList files[] = {
|
||||||
{ "vp90-2-14-resize-fp-tiles-1-16.webm",
|
{ "vp90-2-14-resize-fp-tiles-1-16.webm",
|
||||||
"0cd5e632c326297e975f38949c31ea94" },
|
"0cd5e632c326297e975f38949c31ea94" },
|
||||||
@@ -307,6 +306,19 @@ TEST(VP9DecodeMultiThreadedTest, Decode3) {
|
|||||||
|
|
||||||
DecodeFiles(files);
|
DecodeFiles(files);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(VP9DecodeMultiThreadedTest, NonFrameParallel) {
|
||||||
|
static const FileList files[] = {
|
||||||
|
{ "vp90-2-08-tile_1x2.webm", "570b4a5d5a70d58b5359671668328a16" },
|
||||||
|
{ "vp90-2-08-tile_1x4.webm", "988d86049e884c66909d2d163a09841a" },
|
||||||
|
{ "vp90-2-08-tile_1x8.webm", "0941902a52e9092cb010905eab16364c" },
|
||||||
|
{ "vp90-2-08-tile-4x1.webm", "06505aade6647c583c8e00a2f582266f" },
|
||||||
|
{ "vp90-2-08-tile-4x4.webm", "85c2299892460d76e2c600502d52bfe2" },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
DecodeFiles(files);
|
||||||
|
}
|
||||||
#endif // CONFIG_WEBM_IO
|
#endif // CONFIG_WEBM_IO
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(Synchronous, VPxWorkerThreadTest, ::testing::Bool());
|
INSTANTIATE_TEST_CASE_P(Synchronous, VPxWorkerThreadTest, ::testing::Bool());
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class WebMVideoSource : public CompressedVideoSource {
|
|||||||
|
|
||||||
void FillFrame() {
|
void FillFrame() {
|
||||||
ASSERT_TRUE(vpx_ctx_->file != NULL);
|
ASSERT_TRUE(vpx_ctx_->file != NULL);
|
||||||
const int status = webm_read_frame(webm_ctx_, &buf_, &buf_sz_, &buf_sz_);
|
const int status = webm_read_frame(webm_ctx_, &buf_, &buf_sz_);
|
||||||
ASSERT_GE(status, 0) << "webm_read_frame failed";
|
ASSERT_GE(status, 0) << "webm_read_frame failed";
|
||||||
if (status == 1) {
|
if (status == 1) {
|
||||||
end_of_file_ = true;
|
end_of_file_ = true;
|
||||||
@@ -72,7 +72,7 @@ class WebMVideoSource : public CompressedVideoSource {
|
|||||||
void SeekToNextKeyFrame() {
|
void SeekToNextKeyFrame() {
|
||||||
ASSERT_TRUE(vpx_ctx_->file != NULL);
|
ASSERT_TRUE(vpx_ctx_->file != NULL);
|
||||||
do {
|
do {
|
||||||
const int status = webm_read_frame(webm_ctx_, &buf_, &buf_sz_, &buf_sz_);
|
const int status = webm_read_frame(webm_ctx_, &buf_, &buf_sz_);
|
||||||
ASSERT_GE(status, 0) << "webm_read_frame failed";
|
ASSERT_GE(status, 0) << "webm_read_frame failed";
|
||||||
++frame_;
|
++frame_;
|
||||||
if (status == 1) {
|
if (status == 1) {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef TEST_Y4M_VIDEO_SOURCE_H_
|
#ifndef TEST_Y4M_VIDEO_SOURCE_H_
|
||||||
#define TEST_Y4M_VIDEO_SOURCE_H_
|
#define TEST_Y4M_VIDEO_SOURCE_H_
|
||||||
|
#include <algorithm>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "test/video_source.h"
|
#include "test/video_source.h"
|
||||||
@@ -91,6 +92,18 @@ class Y4mVideoSource : public VideoSource {
|
|||||||
y4m_input_fetch_frame(&y4m_, input_file_, img_.get());
|
y4m_input_fetch_frame(&y4m_, input_file_, img_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Swap buffers with another y4m source. This allows reading a new frame
|
||||||
|
// while keeping the old frame around. A whole Y4mSource is required and
|
||||||
|
// not just a vpx_image_t because of how the y4m reader manipulates
|
||||||
|
// vpx_image_t internals,
|
||||||
|
void SwapBuffers(Y4mVideoSource *other) {
|
||||||
|
std::swap(other->y4m_.dst_buf, y4m_.dst_buf);
|
||||||
|
vpx_image_t *tmp;
|
||||||
|
tmp = other->img_.release();
|
||||||
|
other->img_.reset(img_.release());
|
||||||
|
img_.reset(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void CloseSource() {
|
void CloseSource() {
|
||||||
y4m_input_close(&y4m_);
|
y4m_input_close(&y4m_);
|
||||||
|
|||||||
6
third_party/googletest/README.libvpx
vendored
6
third_party/googletest/README.libvpx
vendored
@@ -12,4 +12,8 @@ failures, various options for running the tests, and XML test report
|
|||||||
generation.
|
generation.
|
||||||
|
|
||||||
Local Modifications:
|
Local Modifications:
|
||||||
Removed unused declarations of kPathSeparatorString to have warning free build.
|
- Removed unused declarations of kPathSeparatorString to have warning
|
||||||
|
free build.
|
||||||
|
- Added GTEST_ATTRIBUTE_UNUSED_ to test registering dummies in TEST_P
|
||||||
|
and INSTANTIATE_TEST_CASE_P to remove warnings about unused variables
|
||||||
|
under GCC 5.
|
||||||
@@ -16960,7 +16960,7 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
|
|||||||
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
|
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
|
||||||
return 0; \
|
return 0; \
|
||||||
} \
|
} \
|
||||||
static int gtest_registering_dummy_; \
|
static int gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_; \
|
||||||
GTEST_DISALLOW_COPY_AND_ASSIGN_(\
|
GTEST_DISALLOW_COPY_AND_ASSIGN_(\
|
||||||
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
|
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
|
||||||
}; \
|
}; \
|
||||||
@@ -16972,7 +16972,7 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
|
|||||||
# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
|
# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
|
||||||
::testing::internal::ParamGenerator<test_case_name::ParamType> \
|
::testing::internal::ParamGenerator<test_case_name::ParamType> \
|
||||||
gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
|
gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
|
||||||
int gtest_##prefix##test_case_name##_dummy_ = \
|
int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
|
||||||
::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
|
::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
|
||||||
GetTestCasePatternHolder<test_case_name>(\
|
GetTestCasePatternHolder<test_case_name>(\
|
||||||
#test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
|
#test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
|
||||||
|
|||||||
17
third_party/libwebm/Android.mk
vendored
17
third_party/libwebm/Android.mk
vendored
@@ -2,9 +2,16 @@ LOCAL_PATH:= $(call my-dir)
|
|||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE:= libwebm
|
LOCAL_MODULE:= libwebm
|
||||||
LOCAL_SRC_FILES:= mkvparser.cpp \
|
LOCAL_CPPFLAGS:=-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
|
||||||
mkvreader.cpp \
|
LOCAL_CPPFLAGS+=-D__STDC_LIMIT_MACROS -Wno-extern-c-compat
|
||||||
mkvmuxer.cpp \
|
LOCAL_C_INCLUDES:= $(LOCAL_PATH)
|
||||||
mkvmuxerutil.cpp \
|
LOCAL_EXPORT_C_INCLUDES:= $(LOCAL_PATH)
|
||||||
mkvwriter.cpp
|
|
||||||
|
LOCAL_SRC_FILES:= common/file_util.cc \
|
||||||
|
common/hdr_util.cc \
|
||||||
|
mkvparser/mkvparser.cc \
|
||||||
|
mkvparser/mkvreader.cc \
|
||||||
|
mkvmuxer/mkvmuxer.cc \
|
||||||
|
mkvmuxer/mkvmuxerutil.cc \
|
||||||
|
mkvmuxer/mkvwriter.cc
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|||||||
5
third_party/libwebm/README.libvpx
vendored
5
third_party/libwebm/README.libvpx
vendored
@@ -1,7 +1,10 @@
|
|||||||
URL: https://chromium.googlesource.com/webm/libwebm
|
URL: https://chromium.googlesource.com/webm/libwebm
|
||||||
Version: 2dec09426ab62b794464cc9971bd135b4d313e65
|
Version: 32d5ac49414a8914ec1e1f285f3f927c6e8ec29d
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE.txt
|
License File: LICENSE.txt
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
libwebm is used to handle WebM container I/O.
|
libwebm is used to handle WebM container I/O.
|
||||||
|
|
||||||
|
Local Changes:
|
||||||
|
* <none>
|
||||||
|
|||||||
34
third_party/libwebm/RELEASE.TXT
vendored
34
third_party/libwebm/RELEASE.TXT
vendored
@@ -1,34 +0,0 @@
|
|||||||
1.0.0.5
|
|
||||||
* Handled case when no duration
|
|
||||||
* Handled empty clusters
|
|
||||||
* Handled empty clusters when seeking
|
|
||||||
* Implemented check lacing bits
|
|
||||||
|
|
||||||
1.0.0.4
|
|
||||||
* Made Cues member variables mutables
|
|
||||||
* Defined against badly-formatted cue points
|
|
||||||
* Segment::GetCluster returns CuePoint too
|
|
||||||
* Separated cue-based searches
|
|
||||||
|
|
||||||
1.0.0.3
|
|
||||||
* Added Block::GetOffset() to get a frame's offset in a block
|
|
||||||
* Changed cluster count type from size_t to long
|
|
||||||
* Parsed SeekHead to find cues
|
|
||||||
* Allowed seeking beyond end of cluster cache
|
|
||||||
* Added not to attempt to reparse cues element
|
|
||||||
* Restructured Segment::LoadCluster
|
|
||||||
* Marked position of cues without parsing cues element
|
|
||||||
* Allowed cue points to be loaded incrementally
|
|
||||||
* Implemented to load lazily cue points as they're searched
|
|
||||||
* Merged Cues::LoadCuePoint into Cues::Find
|
|
||||||
* Lazy init cues
|
|
||||||
* Loaded cue point during find
|
|
||||||
|
|
||||||
1.0.0.2
|
|
||||||
* added support for Cues element
|
|
||||||
* seeking was improved
|
|
||||||
|
|
||||||
1.0.0.1
|
|
||||||
* fixed item 141
|
|
||||||
* added item 142
|
|
||||||
* added this file, RELEASE.TXT, to repository
|
|
||||||
67
third_party/libwebm/common/file_util.cc
vendored
Normal file
67
third_party/libwebm/common/file_util.cc
vendored
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
// Copyright (c) 2016 The WebM project authors. All Rights Reserved.
|
||||||
|
//
|
||||||
|
// Use of this source code is governed by a BSD-style license
|
||||||
|
// that can be found in the LICENSE file in the root of the source
|
||||||
|
// tree. An additional intellectual property rights grant can be found
|
||||||
|
// in the file PATENTS. All contributing project authors may
|
||||||
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
#include "common/file_util.h"
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#include <unistd.h> // close()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <fstream>
|
||||||
|
#include <ios>
|
||||||
|
|
||||||
|
namespace libwebm {
|
||||||
|
|
||||||
|
std::string GetTempFileName() {
|
||||||
|
#if !defined _MSC_VER && !defined __MINGW32__
|
||||||
|
char temp_file_name_template[] = "libwebm_temp.XXXXXX";
|
||||||
|
int fd = mkstemp(temp_file_name_template);
|
||||||
|
if (fd != -1) {
|
||||||
|
close(fd);
|
||||||
|
return std::string(temp_file_name_template);
|
||||||
|
}
|
||||||
|
return std::string();
|
||||||
|
#else
|
||||||
|
char tmp_file_name[_MAX_PATH];
|
||||||
|
errno_t err = tmpnam_s(tmp_file_name);
|
||||||
|
if (err == 0) {
|
||||||
|
return std::string(tmp_file_name);
|
||||||
|
}
|
||||||
|
return std::string();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t GetFileSize(const std::string& file_name) {
|
||||||
|
uint64_t file_size = 0;
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
struct stat st;
|
||||||
|
st.st_size = 0;
|
||||||
|
if (stat(file_name.c_str(), &st) == 0) {
|
||||||
|
#else
|
||||||
|
struct _stat st;
|
||||||
|
st.st_size = 0;
|
||||||
|
if (_stat(file_name.c_str(), &st) == 0) {
|
||||||
|
#endif
|
||||||
|
file_size = st.st_size;
|
||||||
|
}
|
||||||
|
return file_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
TempFileDeleter::TempFileDeleter() { file_name_ = GetTempFileName(); }
|
||||||
|
|
||||||
|
TempFileDeleter::~TempFileDeleter() {
|
||||||
|
std::ifstream file(file_name_.c_str());
|
||||||
|
if (file.good()) {
|
||||||
|
file.close();
|
||||||
|
std::remove(file_name_.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace libwebm
|
||||||
41
third_party/libwebm/common/file_util.h
vendored
Normal file
41
third_party/libwebm/common/file_util.h
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
// Copyright (c) 2016 The WebM project authors. All Rights Reserved.
|
||||||
|
//
|
||||||
|
// Use of this source code is governed by a BSD-style license
|
||||||
|
// that can be found in the LICENSE file in the root of the source
|
||||||
|
// tree. An additional intellectual property rights grant can be found
|
||||||
|
// in the file PATENTS. All contributing project authors may
|
||||||
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
#ifndef LIBWEBM_COMMON_FILE_UTIL_H_
|
||||||
|
#define LIBWEBM_COMMON_FILE_UTIL_H_
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "mkvmuxer/mkvmuxertypes.h" // LIBWEBM_DISALLOW_COPY_AND_ASSIGN()
|
||||||
|
|
||||||
|
namespace libwebm {
|
||||||
|
|
||||||
|
// Returns a temporary file name.
|
||||||
|
std::string GetTempFileName();
|
||||||
|
|
||||||
|
// Returns size of file specified by |file_name|, or 0 upon failure.
|
||||||
|
uint64_t GetFileSize(const std::string& file_name);
|
||||||
|
|
||||||
|
// Manages life of temporary file specified at time of construction. Deletes
|
||||||
|
// file upon destruction.
|
||||||
|
class TempFileDeleter {
|
||||||
|
public:
|
||||||
|
TempFileDeleter();
|
||||||
|
explicit TempFileDeleter(std::string file_name) : file_name_(file_name) {}
|
||||||
|
~TempFileDeleter();
|
||||||
|
const std::string& name() const { return file_name_; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string file_name_;
|
||||||
|
LIBWEBM_DISALLOW_COPY_AND_ASSIGN(TempFileDeleter);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace libwebm
|
||||||
|
|
||||||
|
#endif // LIBWEBM_COMMON_FILE_UTIL_H_
|
||||||
182
third_party/libwebm/common/hdr_util.cc
vendored
Normal file
182
third_party/libwebm/common/hdr_util.cc
vendored
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
// Copyright (c) 2016 The WebM project authors. All Rights Reserved.
|
||||||
|
//
|
||||||
|
// Use of this source code is governed by a BSD-style license
|
||||||
|
// that can be found in the LICENSE file in the root of the source
|
||||||
|
// tree. An additional intellectual property rights grant can be found
|
||||||
|
// in the file PATENTS. All contributing project authors may
|
||||||
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
#include "hdr_util.h"
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <new>
|
||||||
|
|
||||||
|
#include "mkvparser/mkvparser.h"
|
||||||
|
|
||||||
|
namespace libwebm {
|
||||||
|
bool CopyPrimaryChromaticity(const mkvparser::PrimaryChromaticity& parser_pc,
|
||||||
|
PrimaryChromaticityPtr* muxer_pc) {
|
||||||
|
muxer_pc->reset(new (std::nothrow)
|
||||||
|
mkvmuxer::PrimaryChromaticity(parser_pc.x, parser_pc.y));
|
||||||
|
if (!muxer_pc->get())
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MasteringMetadataValuePresent(double value) {
|
||||||
|
return value != mkvparser::MasteringMetadata::kValueNotPresent;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CopyMasteringMetadata(const mkvparser::MasteringMetadata& parser_mm,
|
||||||
|
mkvmuxer::MasteringMetadata* muxer_mm) {
|
||||||
|
if (MasteringMetadataValuePresent(parser_mm.luminance_max))
|
||||||
|
muxer_mm->luminance_max = parser_mm.luminance_max;
|
||||||
|
if (MasteringMetadataValuePresent(parser_mm.luminance_min))
|
||||||
|
muxer_mm->luminance_min = parser_mm.luminance_min;
|
||||||
|
|
||||||
|
PrimaryChromaticityPtr r_ptr(NULL);
|
||||||
|
PrimaryChromaticityPtr g_ptr(NULL);
|
||||||
|
PrimaryChromaticityPtr b_ptr(NULL);
|
||||||
|
PrimaryChromaticityPtr wp_ptr(NULL);
|
||||||
|
|
||||||
|
if (parser_mm.r) {
|
||||||
|
if (!CopyPrimaryChromaticity(*parser_mm.r, &r_ptr))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (parser_mm.g) {
|
||||||
|
if (!CopyPrimaryChromaticity(*parser_mm.g, &g_ptr))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (parser_mm.b) {
|
||||||
|
if (!CopyPrimaryChromaticity(*parser_mm.b, &b_ptr))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (parser_mm.white_point) {
|
||||||
|
if (!CopyPrimaryChromaticity(*parser_mm.white_point, &wp_ptr))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!muxer_mm->SetChromaticity(r_ptr.get(), g_ptr.get(), b_ptr.get(),
|
||||||
|
wp_ptr.get())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ColourValuePresent(long long value) {
|
||||||
|
return value != mkvparser::Colour::kValueNotPresent;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CopyColour(const mkvparser::Colour& parser_colour,
|
||||||
|
mkvmuxer::Colour* muxer_colour) {
|
||||||
|
if (!muxer_colour)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (ColourValuePresent(parser_colour.matrix_coefficients))
|
||||||
|
muxer_colour->matrix_coefficients = parser_colour.matrix_coefficients;
|
||||||
|
if (ColourValuePresent(parser_colour.bits_per_channel))
|
||||||
|
muxer_colour->bits_per_channel = parser_colour.bits_per_channel;
|
||||||
|
if (ColourValuePresent(parser_colour.chroma_subsampling_horz))
|
||||||
|
muxer_colour->chroma_subsampling_horz =
|
||||||
|
parser_colour.chroma_subsampling_horz;
|
||||||
|
if (ColourValuePresent(parser_colour.chroma_subsampling_vert))
|
||||||
|
muxer_colour->chroma_subsampling_vert =
|
||||||
|
parser_colour.chroma_subsampling_vert;
|
||||||
|
if (ColourValuePresent(parser_colour.cb_subsampling_horz))
|
||||||
|
muxer_colour->cb_subsampling_horz = parser_colour.cb_subsampling_horz;
|
||||||
|
if (ColourValuePresent(parser_colour.cb_subsampling_vert))
|
||||||
|
muxer_colour->cb_subsampling_vert = parser_colour.cb_subsampling_vert;
|
||||||
|
if (ColourValuePresent(parser_colour.chroma_siting_horz))
|
||||||
|
muxer_colour->chroma_siting_horz = parser_colour.chroma_siting_horz;
|
||||||
|
if (ColourValuePresent(parser_colour.chroma_siting_vert))
|
||||||
|
muxer_colour->chroma_siting_vert = parser_colour.chroma_siting_vert;
|
||||||
|
if (ColourValuePresent(parser_colour.range))
|
||||||
|
muxer_colour->range = parser_colour.range;
|
||||||
|
if (ColourValuePresent(parser_colour.transfer_characteristics))
|
||||||
|
muxer_colour->transfer_characteristics =
|
||||||
|
parser_colour.transfer_characteristics;
|
||||||
|
if (ColourValuePresent(parser_colour.primaries))
|
||||||
|
muxer_colour->primaries = parser_colour.primaries;
|
||||||
|
if (ColourValuePresent(parser_colour.max_cll))
|
||||||
|
muxer_colour->max_cll = parser_colour.max_cll;
|
||||||
|
if (ColourValuePresent(parser_colour.max_fall))
|
||||||
|
muxer_colour->max_fall = parser_colour.max_fall;
|
||||||
|
|
||||||
|
if (parser_colour.mastering_metadata) {
|
||||||
|
mkvmuxer::MasteringMetadata muxer_mm;
|
||||||
|
if (!CopyMasteringMetadata(*parser_colour.mastering_metadata, &muxer_mm))
|
||||||
|
return false;
|
||||||
|
if (!muxer_colour->SetMasteringMetadata(muxer_mm))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Format of VPx private data:
|
||||||
|
//
|
||||||
|
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||||
|
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
|
// | ID Byte | Length | |
|
||||||
|
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
|
||||||
|
// | |
|
||||||
|
// : Bytes 1..Length of Codec Feature :
|
||||||
|
// | |
|
||||||
|
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
|
//
|
||||||
|
// ID Byte Format
|
||||||
|
// ID byte is an unsigned byte.
|
||||||
|
// 0 1 2 3 4 5 6 7
|
||||||
|
// +-+-+-+-+-+-+-+-+
|
||||||
|
// |X| ID |
|
||||||
|
// +-+-+-+-+-+-+-+-+
|
||||||
|
//
|
||||||
|
// The X bit is reserved.
|
||||||
|
//
|
||||||
|
// Currently only profile level is supported. ID byte must be set to 1, and
|
||||||
|
// length must be 1. Supported values are:
|
||||||
|
//
|
||||||
|
// 10: Level 1
|
||||||
|
// 11: Level 1.1
|
||||||
|
// 20: Level 2
|
||||||
|
// 21: Level 2.1
|
||||||
|
// 30: Level 3
|
||||||
|
// 31: Level 3.1
|
||||||
|
// 40: Level 4
|
||||||
|
// 41: Level 4.1
|
||||||
|
// 50: Level 5
|
||||||
|
// 51: Level 5.1
|
||||||
|
// 52: Level 5.2
|
||||||
|
// 60: Level 6
|
||||||
|
// 61: Level 6.1
|
||||||
|
// 62: Level 6.2
|
||||||
|
//
|
||||||
|
// See the following link for more information:
|
||||||
|
// http://www.webmproject.org/vp9/profiles/
|
||||||
|
int ParseVpxCodecPrivate(const uint8_t* private_data, int32_t length) {
|
||||||
|
const int kVpxCodecPrivateLength = 3;
|
||||||
|
if (!private_data || length != kVpxCodecPrivateLength)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
const uint8_t id_byte = *private_data;
|
||||||
|
if (id_byte != 1)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
const int kVpxProfileLength = 1;
|
||||||
|
const uint8_t length_byte = private_data[1];
|
||||||
|
if (length_byte != kVpxProfileLength)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
const int level = static_cast<int>(private_data[2]);
|
||||||
|
|
||||||
|
const int kNumLevels = 14;
|
||||||
|
const int levels[kNumLevels] = {10, 11, 20, 21, 30, 31, 40,
|
||||||
|
41, 50, 51, 52, 60, 61, 62};
|
||||||
|
|
||||||
|
for (int i = 0; i < kNumLevels; ++i) {
|
||||||
|
if (level == levels[i])
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} // namespace libwebm
|
||||||
51
third_party/libwebm/common/hdr_util.h
vendored
Normal file
51
third_party/libwebm/common/hdr_util.h
vendored
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
// Copyright (c) 2016 The WebM project authors. All Rights Reserved.
|
||||||
|
//
|
||||||
|
// Use of this source code is governed by a BSD-style license
|
||||||
|
// that can be found in the LICENSE file in the root of the source
|
||||||
|
// tree. An additional intellectual property rights grant can be found
|
||||||
|
// in the file PATENTS. All contributing project authors may
|
||||||
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
#ifndef LIBWEBM_COMMON_HDR_UTIL_H_
|
||||||
|
#define LIBWEBM_COMMON_HDR_UTIL_H_
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include "mkvmuxer/mkvmuxer.h"
|
||||||
|
|
||||||
|
namespace mkvparser {
|
||||||
|
struct Colour;
|
||||||
|
struct MasteringMetadata;
|
||||||
|
struct PrimaryChromaticity;
|
||||||
|
} // namespace mkvparser
|
||||||
|
|
||||||
|
namespace libwebm {
|
||||||
|
// Utility types and functions for working with the Colour element and its
|
||||||
|
// children. Copiers return true upon success. Presence functions return true
|
||||||
|
// when the specified element is present.
|
||||||
|
|
||||||
|
// TODO(tomfinegan): These should be moved to libwebm_utils once c++11 is
|
||||||
|
// required by libwebm.
|
||||||
|
|
||||||
|
typedef std::auto_ptr<mkvmuxer::PrimaryChromaticity> PrimaryChromaticityPtr;
|
||||||
|
|
||||||
|
bool CopyPrimaryChromaticity(const mkvparser::PrimaryChromaticity& parser_pc,
|
||||||
|
PrimaryChromaticityPtr* muxer_pc);
|
||||||
|
|
||||||
|
bool MasteringMetadataValuePresent(double value);
|
||||||
|
|
||||||
|
bool CopyMasteringMetadata(const mkvparser::MasteringMetadata& parser_mm,
|
||||||
|
mkvmuxer::MasteringMetadata* muxer_mm);
|
||||||
|
|
||||||
|
bool ColourValuePresent(long long value);
|
||||||
|
|
||||||
|
bool CopyColour(const mkvparser::Colour& parser_colour,
|
||||||
|
mkvmuxer::Colour* muxer_colour);
|
||||||
|
|
||||||
|
// Returns VP9 profile upon success or 0 upon failure.
|
||||||
|
int ParseVpxCodecPrivate(const uint8_t* private_data, int32_t length);
|
||||||
|
|
||||||
|
} // namespace libwebm
|
||||||
|
|
||||||
|
#endif // LIBWEBM_COMMON_HDR_UTIL_H_
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
// in the file PATENTS. All contributing project authors may
|
// in the file PATENTS. All contributing project authors may
|
||||||
// be found in the AUTHORS file in the root of the source tree.
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
#ifndef WEBMIDS_HPP
|
#ifndef COMMON_WEBMIDS_H_
|
||||||
#define WEBMIDS_HPP
|
#define COMMON_WEBMIDS_H_
|
||||||
|
|
||||||
namespace mkvmuxer {
|
namespace libwebm {
|
||||||
|
|
||||||
enum MkvId {
|
enum MkvId {
|
||||||
kMkvEBML = 0x1A45DFA3,
|
kMkvEBML = 0x1A45DFA3,
|
||||||
@@ -41,6 +41,7 @@ enum MkvId {
|
|||||||
kMkvTimecodeScale = 0x2AD7B1,
|
kMkvTimecodeScale = 0x2AD7B1,
|
||||||
kMkvDuration = 0x4489,
|
kMkvDuration = 0x4489,
|
||||||
kMkvDateUTC = 0x4461,
|
kMkvDateUTC = 0x4461,
|
||||||
|
kMkvTitle = 0x7BA9,
|
||||||
kMkvMuxingApp = 0x4D80,
|
kMkvMuxingApp = 0x4D80,
|
||||||
kMkvWritingApp = 0x5741,
|
kMkvWritingApp = 0x5741,
|
||||||
// Cluster
|
// Cluster
|
||||||
@@ -94,6 +95,35 @@ enum MkvId {
|
|||||||
kMkvAspectRatioType = 0x54B3,
|
kMkvAspectRatioType = 0x54B3,
|
||||||
kMkvFrameRate = 0x2383E3,
|
kMkvFrameRate = 0x2383E3,
|
||||||
// end video
|
// end video
|
||||||
|
// colour
|
||||||
|
kMkvColour = 0x55B0,
|
||||||
|
kMkvMatrixCoefficients = 0x55B1,
|
||||||
|
kMkvBitsPerChannel = 0x55B2,
|
||||||
|
kMkvChromaSubsamplingHorz = 0x55B3,
|
||||||
|
kMkvChromaSubsamplingVert = 0x55B4,
|
||||||
|
kMkvCbSubsamplingHorz = 0x55B5,
|
||||||
|
kMkvCbSubsamplingVert = 0x55B6,
|
||||||
|
kMkvChromaSitingHorz = 0x55B7,
|
||||||
|
kMkvChromaSitingVert = 0x55B8,
|
||||||
|
kMkvRange = 0x55B9,
|
||||||
|
kMkvTransferCharacteristics = 0x55BA,
|
||||||
|
kMkvPrimaries = 0x55BB,
|
||||||
|
kMkvMaxCLL = 0x55BC,
|
||||||
|
kMkvMaxFALL = 0x55BD,
|
||||||
|
// mastering metadata
|
||||||
|
kMkvMasteringMetadata = 0x55D0,
|
||||||
|
kMkvPrimaryRChromaticityX = 0x55D1,
|
||||||
|
kMkvPrimaryRChromaticityY = 0x55D2,
|
||||||
|
kMkvPrimaryGChromaticityX = 0x55D3,
|
||||||
|
kMkvPrimaryGChromaticityY = 0x55D4,
|
||||||
|
kMkvPrimaryBChromaticityX = 0x55D5,
|
||||||
|
kMkvPrimaryBChromaticityY = 0x55D6,
|
||||||
|
kMkvWhitePointChromaticityX = 0x55D7,
|
||||||
|
kMkvWhitePointChromaticityY = 0x55D8,
|
||||||
|
kMkvLuminanceMax = 0x55D9,
|
||||||
|
kMkvLuminanceMin = 0x55DA,
|
||||||
|
// end mastering metadata
|
||||||
|
// end colour
|
||||||
// audio
|
// audio
|
||||||
kMkvAudio = 0xE1,
|
kMkvAudio = 0xE1,
|
||||||
kMkvSamplingFrequency = 0xB5,
|
kMkvSamplingFrequency = 0xB5,
|
||||||
@@ -107,9 +137,16 @@ enum MkvId {
|
|||||||
kMkvContentEncodingOrder = 0x5031,
|
kMkvContentEncodingOrder = 0x5031,
|
||||||
kMkvContentEncodingScope = 0x5032,
|
kMkvContentEncodingScope = 0x5032,
|
||||||
kMkvContentEncodingType = 0x5033,
|
kMkvContentEncodingType = 0x5033,
|
||||||
|
kMkvContentCompression = 0x5034,
|
||||||
|
kMkvContentCompAlgo = 0x4254,
|
||||||
|
kMkvContentCompSettings = 0x4255,
|
||||||
kMkvContentEncryption = 0x5035,
|
kMkvContentEncryption = 0x5035,
|
||||||
kMkvContentEncAlgo = 0x47E1,
|
kMkvContentEncAlgo = 0x47E1,
|
||||||
kMkvContentEncKeyID = 0x47E2,
|
kMkvContentEncKeyID = 0x47E2,
|
||||||
|
kMkvContentSignature = 0x47E3,
|
||||||
|
kMkvContentSigKeyID = 0x47E4,
|
||||||
|
kMkvContentSigAlgo = 0x47E5,
|
||||||
|
kMkvContentSigHashAlgo = 0x47E6,
|
||||||
kMkvContentEncAESSettings = 0x47E7,
|
kMkvContentEncAESSettings = 0x47E7,
|
||||||
kMkvAESSettingsCipherMode = 0x47E8,
|
kMkvAESSettingsCipherMode = 0x47E8,
|
||||||
kMkvAESSettingsCipherInitData = 0x47E9,
|
kMkvAESSettingsCipherInitData = 0x47E9,
|
||||||
@@ -142,6 +179,6 @@ enum MkvId {
|
|||||||
kMkvTagString = 0x4487
|
kMkvTagString = 0x4487
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace mkvmuxer
|
} // namespace libwebm
|
||||||
|
|
||||||
#endif // WEBMIDS_HPP
|
#endif // COMMON_WEBMIDS_H_
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -6,8 +6,17 @@
|
|||||||
// in the file PATENTS. All contributing project authors may
|
// in the file PATENTS. All contributing project authors may
|
||||||
// be found in the AUTHORS file in the root of the source tree.
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
#ifndef MKVMUXERTYPES_HPP
|
#ifndef MKVMUXER_MKVMUXERTYPES_H_
|
||||||
#define MKVMUXERTYPES_HPP
|
#define MKVMUXER_MKVMUXERTYPES_H_
|
||||||
|
|
||||||
|
namespace mkvmuxer {
|
||||||
|
typedef unsigned char uint8;
|
||||||
|
typedef short int16;
|
||||||
|
typedef int int32;
|
||||||
|
typedef unsigned int uint32;
|
||||||
|
typedef long long int64;
|
||||||
|
typedef unsigned long long uint64;
|
||||||
|
} // namespace mkvmuxer
|
||||||
|
|
||||||
// Copied from Chromium basictypes.h
|
// Copied from Chromium basictypes.h
|
||||||
// A macro to disallow the copy constructor and operator= functions
|
// A macro to disallow the copy constructor and operator= functions
|
||||||
@@ -16,15 +25,4 @@
|
|||||||
TypeName(const TypeName&); \
|
TypeName(const TypeName&); \
|
||||||
void operator=(const TypeName&)
|
void operator=(const TypeName&)
|
||||||
|
|
||||||
namespace mkvmuxer {
|
#endif // MKVMUXER_MKVMUXERTYPES_HPP_
|
||||||
|
|
||||||
typedef unsigned char uint8;
|
|
||||||
typedef short int16;
|
|
||||||
typedef int int32;
|
|
||||||
typedef unsigned int uint32;
|
|
||||||
typedef long long int64;
|
|
||||||
typedef unsigned long long uint64;
|
|
||||||
|
|
||||||
} // end namespace mkvmuxer
|
|
||||||
|
|
||||||
#endif // MKVMUXERTYPES_HPP
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
// in the file PATENTS. All contributing project authors may
|
// in the file PATENTS. All contributing project authors may
|
||||||
// be found in the AUTHORS file in the root of the source tree.
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
#include "mkvmuxerutil.hpp"
|
#include "mkvmuxer/mkvmuxerutil.h"
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@@ -20,13 +20,9 @@
|
|||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
#include "mkvwriter.hpp"
|
#include "common/webmids.h"
|
||||||
#include "webmids.hpp"
|
#include "mkvmuxer/mkvmuxer.h"
|
||||||
|
#include "mkvmuxer/mkvwriter.h"
|
||||||
#ifdef _MSC_VER
|
|
||||||
// Disable MSVC warnings that suggest making code non-portable.
|
|
||||||
#pragma warning(disable : 4996)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace mkvmuxer {
|
namespace mkvmuxer {
|
||||||
|
|
||||||
@@ -35,64 +31,68 @@ namespace {
|
|||||||
// Date elements are always 8 octets in size.
|
// Date elements are always 8 octets in size.
|
||||||
const int kDateElementSize = 8;
|
const int kDateElementSize = 8;
|
||||||
|
|
||||||
uint64 WriteBlock(IMkvWriter* writer, const Frame* const frame, int64 timecode,
|
uint64_t WriteBlock(IMkvWriter* writer, const Frame* const frame,
|
||||||
uint64 timecode_scale) {
|
int64_t timecode, uint64_t timecode_scale) {
|
||||||
uint64 block_additional_elem_size = 0;
|
uint64_t block_additional_elem_size = 0;
|
||||||
uint64 block_addid_elem_size = 0;
|
uint64_t block_addid_elem_size = 0;
|
||||||
uint64 block_more_payload_size = 0;
|
uint64_t block_more_payload_size = 0;
|
||||||
uint64 block_more_elem_size = 0;
|
uint64_t block_more_elem_size = 0;
|
||||||
uint64 block_additions_payload_size = 0;
|
uint64_t block_additions_payload_size = 0;
|
||||||
uint64 block_additions_elem_size = 0;
|
uint64_t block_additions_elem_size = 0;
|
||||||
if (frame->additional()) {
|
if (frame->additional()) {
|
||||||
block_additional_elem_size = EbmlElementSize(
|
block_additional_elem_size =
|
||||||
kMkvBlockAdditional, frame->additional(), frame->additional_length());
|
EbmlElementSize(libwebm::kMkvBlockAdditional, frame->additional(),
|
||||||
block_addid_elem_size = EbmlElementSize(kMkvBlockAddID, frame->add_id());
|
frame->additional_length());
|
||||||
|
block_addid_elem_size =
|
||||||
|
EbmlElementSize(libwebm::kMkvBlockAddID, frame->add_id());
|
||||||
|
|
||||||
block_more_payload_size =
|
block_more_payload_size =
|
||||||
block_addid_elem_size + block_additional_elem_size;
|
block_addid_elem_size + block_additional_elem_size;
|
||||||
block_more_elem_size =
|
block_more_elem_size =
|
||||||
EbmlMasterElementSize(kMkvBlockMore, block_more_payload_size) +
|
EbmlMasterElementSize(libwebm::kMkvBlockMore, block_more_payload_size) +
|
||||||
block_more_payload_size;
|
block_more_payload_size;
|
||||||
block_additions_payload_size = block_more_elem_size;
|
block_additions_payload_size = block_more_elem_size;
|
||||||
block_additions_elem_size =
|
block_additions_elem_size =
|
||||||
EbmlMasterElementSize(kMkvBlockAdditions,
|
EbmlMasterElementSize(libwebm::kMkvBlockAdditions,
|
||||||
block_additions_payload_size) +
|
block_additions_payload_size) +
|
||||||
block_additions_payload_size;
|
block_additions_payload_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 discard_padding_elem_size = 0;
|
uint64_t discard_padding_elem_size = 0;
|
||||||
if (frame->discard_padding() != 0) {
|
if (frame->discard_padding() != 0) {
|
||||||
discard_padding_elem_size =
|
discard_padding_elem_size =
|
||||||
EbmlElementSize(kMkvDiscardPadding, frame->discard_padding());
|
EbmlElementSize(libwebm::kMkvDiscardPadding, frame->discard_padding());
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint64 reference_block_timestamp =
|
const uint64_t reference_block_timestamp =
|
||||||
frame->reference_block_timestamp() / timecode_scale;
|
frame->reference_block_timestamp() / timecode_scale;
|
||||||
uint64 reference_block_elem_size = 0;
|
uint64_t reference_block_elem_size = 0;
|
||||||
if (!frame->is_key()) {
|
if (!frame->is_key()) {
|
||||||
reference_block_elem_size =
|
reference_block_elem_size =
|
||||||
EbmlElementSize(kMkvReferenceBlock, reference_block_timestamp);
|
EbmlElementSize(libwebm::kMkvReferenceBlock, reference_block_timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint64 duration = frame->duration() / timecode_scale;
|
const uint64_t duration = frame->duration() / timecode_scale;
|
||||||
uint64 block_duration_elem_size = 0;
|
uint64_t block_duration_elem_size = 0;
|
||||||
if (duration > 0)
|
if (duration > 0)
|
||||||
block_duration_elem_size = EbmlElementSize(kMkvBlockDuration, duration);
|
block_duration_elem_size =
|
||||||
|
EbmlElementSize(libwebm::kMkvBlockDuration, duration);
|
||||||
|
|
||||||
const uint64 block_payload_size = 4 + frame->length();
|
const uint64_t block_payload_size = 4 + frame->length();
|
||||||
const uint64 block_elem_size =
|
const uint64_t block_elem_size =
|
||||||
EbmlMasterElementSize(kMkvBlock, block_payload_size) + block_payload_size;
|
EbmlMasterElementSize(libwebm::kMkvBlock, block_payload_size) +
|
||||||
|
block_payload_size;
|
||||||
|
|
||||||
const uint64 block_group_payload_size =
|
const uint64_t block_group_payload_size =
|
||||||
block_elem_size + block_additions_elem_size + block_duration_elem_size +
|
block_elem_size + block_additions_elem_size + block_duration_elem_size +
|
||||||
discard_padding_elem_size + reference_block_elem_size;
|
discard_padding_elem_size + reference_block_elem_size;
|
||||||
|
|
||||||
if (!WriteEbmlMasterElement(writer, kMkvBlockGroup,
|
if (!WriteEbmlMasterElement(writer, libwebm::kMkvBlockGroup,
|
||||||
block_group_payload_size)) {
|
block_group_payload_size)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!WriteEbmlMasterElement(writer, kMkvBlock, block_payload_size))
|
if (!WriteEbmlMasterElement(writer, libwebm::kMkvBlock, block_payload_size))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (WriteUInt(writer, frame->track_number()))
|
if (WriteUInt(writer, frame->track_number()))
|
||||||
@@ -105,77 +105,81 @@ uint64 WriteBlock(IMkvWriter* writer, const Frame* const frame, int64 timecode,
|
|||||||
if (SerializeInt(writer, 0, 1))
|
if (SerializeInt(writer, 0, 1))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (writer->Write(frame->frame(), static_cast<uint32>(frame->length())))
|
if (writer->Write(frame->frame(), static_cast<uint32_t>(frame->length())))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (frame->additional()) {
|
if (frame->additional()) {
|
||||||
if (!WriteEbmlMasterElement(writer, kMkvBlockAdditions,
|
if (!WriteEbmlMasterElement(writer, libwebm::kMkvBlockAdditions,
|
||||||
block_additions_payload_size)) {
|
block_additions_payload_size)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!WriteEbmlMasterElement(writer, kMkvBlockMore, block_more_payload_size))
|
if (!WriteEbmlMasterElement(writer, libwebm::kMkvBlockMore,
|
||||||
|
block_more_payload_size))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!WriteEbmlElement(writer, kMkvBlockAddID, frame->add_id()))
|
if (!WriteEbmlElement(writer, libwebm::kMkvBlockAddID, frame->add_id()))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!WriteEbmlElement(writer, kMkvBlockAdditional, frame->additional(),
|
if (!WriteEbmlElement(writer, libwebm::kMkvBlockAdditional,
|
||||||
frame->additional_length())) {
|
frame->additional(), frame->additional_length())) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frame->discard_padding() != 0 &&
|
if (frame->discard_padding() != 0 &&
|
||||||
!WriteEbmlElement(writer, kMkvDiscardPadding, frame->discard_padding())) {
|
!WriteEbmlElement(writer, libwebm::kMkvDiscardPadding,
|
||||||
|
frame->discard_padding())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!frame->is_key() &&
|
if (!frame->is_key() &&
|
||||||
!WriteEbmlElement(writer, kMkvReferenceBlock,
|
!WriteEbmlElement(writer, libwebm::kMkvReferenceBlock,
|
||||||
reference_block_timestamp)) {
|
reference_block_timestamp)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (duration > 0 && !WriteEbmlElement(writer, kMkvBlockDuration, duration)) {
|
if (duration > 0 &&
|
||||||
|
!WriteEbmlElement(writer, libwebm::kMkvBlockDuration, duration)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return EbmlMasterElementSize(kMkvBlockGroup, block_group_payload_size) +
|
return EbmlMasterElementSize(libwebm::kMkvBlockGroup,
|
||||||
|
block_group_payload_size) +
|
||||||
block_group_payload_size;
|
block_group_payload_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 WriteSimpleBlock(IMkvWriter* writer, const Frame* const frame,
|
uint64_t WriteSimpleBlock(IMkvWriter* writer, const Frame* const frame,
|
||||||
int64 timecode) {
|
int64_t timecode) {
|
||||||
if (WriteID(writer, kMkvSimpleBlock))
|
if (WriteID(writer, libwebm::kMkvSimpleBlock))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const int32 size = static_cast<int32>(frame->length()) + 4;
|
const int32_t size = static_cast<int32_t>(frame->length()) + 4;
|
||||||
if (WriteUInt(writer, size))
|
if (WriteUInt(writer, size))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (WriteUInt(writer, static_cast<uint64>(frame->track_number())))
|
if (WriteUInt(writer, static_cast<uint64_t>(frame->track_number())))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (SerializeInt(writer, timecode, 2))
|
if (SerializeInt(writer, timecode, 2))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
uint64 flags = 0;
|
uint64_t flags = 0;
|
||||||
if (frame->is_key())
|
if (frame->is_key())
|
||||||
flags |= 0x80;
|
flags |= 0x80;
|
||||||
|
|
||||||
if (SerializeInt(writer, flags, 1))
|
if (SerializeInt(writer, flags, 1))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (writer->Write(frame->frame(), static_cast<uint32>(frame->length())))
|
if (writer->Write(frame->frame(), static_cast<uint32_t>(frame->length())))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return GetUIntSize(kMkvSimpleBlock) + GetCodedUIntSize(size) + 4 +
|
return static_cast<uint64_t>(GetUIntSize(libwebm::kMkvSimpleBlock) +
|
||||||
frame->length();
|
GetCodedUIntSize(size) + 4 + frame->length());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
int32 GetCodedUIntSize(uint64 value) {
|
int32_t GetCodedUIntSize(uint64_t value) {
|
||||||
if (value < 0x000000000000007FULL)
|
if (value < 0x000000000000007FULL)
|
||||||
return 1;
|
return 1;
|
||||||
else if (value < 0x0000000000003FFFULL)
|
else if (value < 0x0000000000003FFFULL)
|
||||||
@@ -193,7 +197,7 @@ int32 GetCodedUIntSize(uint64 value) {
|
|||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 GetUIntSize(uint64 value) {
|
int32_t GetUIntSize(uint64_t value) {
|
||||||
if (value < 0x0000000000000100ULL)
|
if (value < 0x0000000000000100ULL)
|
||||||
return 1;
|
return 1;
|
||||||
else if (value < 0x0000000000010000ULL)
|
else if (value < 0x0000000000010000ULL)
|
||||||
@@ -211,26 +215,26 @@ int32 GetUIntSize(uint64 value) {
|
|||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 GetIntSize(int64 value) {
|
int32_t GetIntSize(int64_t value) {
|
||||||
// Doubling the requested value ensures positive values with their high bit
|
// Doubling the requested value ensures positive values with their high bit
|
||||||
// set are written with 0-padding to avoid flipping the signedness.
|
// set are written with 0-padding to avoid flipping the signedness.
|
||||||
const uint64 v = (value < 0) ? value ^ -1LL : value;
|
const uint64_t v = (value < 0) ? value ^ -1LL : value;
|
||||||
return GetUIntSize(2 * v);
|
return GetUIntSize(2 * v);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EbmlMasterElementSize(uint64 type, uint64 value) {
|
uint64_t EbmlMasterElementSize(uint64_t type, uint64_t value) {
|
||||||
// Size of EBML ID
|
// Size of EBML ID
|
||||||
int32 ebml_size = GetUIntSize(type);
|
int32_t ebml_size = GetUIntSize(type);
|
||||||
|
|
||||||
// Datasize
|
// Datasize
|
||||||
ebml_size += GetCodedUIntSize(value);
|
ebml_size += GetCodedUIntSize(value);
|
||||||
|
|
||||||
return ebml_size;
|
return static_cast<uint64_t>(ebml_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EbmlElementSize(uint64 type, int64 value) {
|
uint64_t EbmlElementSize(uint64_t type, int64_t value) {
|
||||||
// Size of EBML ID
|
// Size of EBML ID
|
||||||
int32 ebml_size = GetUIntSize(type);
|
int32_t ebml_size = GetUIntSize(type);
|
||||||
|
|
||||||
// Datasize
|
// Datasize
|
||||||
ebml_size += GetIntSize(value);
|
ebml_size += GetIntSize(value);
|
||||||
@@ -238,15 +242,20 @@ uint64 EbmlElementSize(uint64 type, int64 value) {
|
|||||||
// Size of Datasize
|
// Size of Datasize
|
||||||
ebml_size++;
|
ebml_size++;
|
||||||
|
|
||||||
return ebml_size;
|
return static_cast<uint64_t>(ebml_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EbmlElementSize(uint64 type, uint64 value) {
|
uint64_t EbmlElementSize(uint64_t type, uint64_t value) {
|
||||||
|
return EbmlElementSize(type, value, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t EbmlElementSize(uint64_t type, uint64_t value, uint64_t fixed_size) {
|
||||||
// Size of EBML ID
|
// Size of EBML ID
|
||||||
int32 ebml_size = GetUIntSize(type);
|
uint64_t ebml_size = static_cast<uint64_t>(GetUIntSize(type));
|
||||||
|
|
||||||
// Datasize
|
// Datasize
|
||||||
ebml_size += GetUIntSize(value);
|
ebml_size +=
|
||||||
|
(fixed_size > 0) ? fixed_size : static_cast<uint64_t>(GetUIntSize(value));
|
||||||
|
|
||||||
// Size of Datasize
|
// Size of Datasize
|
||||||
ebml_size++;
|
ebml_size++;
|
||||||
@@ -254,9 +263,9 @@ uint64 EbmlElementSize(uint64 type, uint64 value) {
|
|||||||
return ebml_size;
|
return ebml_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EbmlElementSize(uint64 type, float /* value */) {
|
uint64_t EbmlElementSize(uint64_t type, float /* value */) {
|
||||||
// Size of EBML ID
|
// Size of EBML ID
|
||||||
uint64 ebml_size = GetUIntSize(type);
|
uint64_t ebml_size = static_cast<uint64_t>(GetUIntSize(type));
|
||||||
|
|
||||||
// Datasize
|
// Datasize
|
||||||
ebml_size += sizeof(float);
|
ebml_size += sizeof(float);
|
||||||
@@ -267,12 +276,12 @@ uint64 EbmlElementSize(uint64 type, float /* value */) {
|
|||||||
return ebml_size;
|
return ebml_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EbmlElementSize(uint64 type, const char* value) {
|
uint64_t EbmlElementSize(uint64_t type, const char* value) {
|
||||||
if (!value)
|
if (!value)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Size of EBML ID
|
// Size of EBML ID
|
||||||
uint64 ebml_size = GetUIntSize(type);
|
uint64_t ebml_size = static_cast<uint64_t>(GetUIntSize(type));
|
||||||
|
|
||||||
// Datasize
|
// Datasize
|
||||||
ebml_size += strlen(value);
|
ebml_size += strlen(value);
|
||||||
@@ -283,12 +292,12 @@ uint64 EbmlElementSize(uint64 type, const char* value) {
|
|||||||
return ebml_size;
|
return ebml_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EbmlElementSize(uint64 type, const uint8* value, uint64 size) {
|
uint64_t EbmlElementSize(uint64_t type, const uint8_t* value, uint64_t size) {
|
||||||
if (!value)
|
if (!value)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Size of EBML ID
|
// Size of EBML ID
|
||||||
uint64 ebml_size = GetUIntSize(type);
|
uint64_t ebml_size = static_cast<uint64_t>(GetUIntSize(type));
|
||||||
|
|
||||||
// Datasize
|
// Datasize
|
||||||
ebml_size += size;
|
ebml_size += size;
|
||||||
@@ -299,9 +308,9 @@ uint64 EbmlElementSize(uint64 type, const uint8* value, uint64 size) {
|
|||||||
return ebml_size;
|
return ebml_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 EbmlDateElementSize(uint64 type) {
|
uint64_t EbmlDateElementSize(uint64_t type) {
|
||||||
// Size of EBML ID
|
// Size of EBML ID
|
||||||
uint64 ebml_size = GetUIntSize(type);
|
uint64_t ebml_size = static_cast<uint64_t>(GetUIntSize(type));
|
||||||
|
|
||||||
// Datasize
|
// Datasize
|
||||||
ebml_size += kDateElementSize;
|
ebml_size += kDateElementSize;
|
||||||
@@ -312,18 +321,18 @@ uint64 EbmlDateElementSize(uint64 type) {
|
|||||||
return ebml_size;
|
return ebml_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 SerializeInt(IMkvWriter* writer, int64 value, int32 size) {
|
int32_t SerializeInt(IMkvWriter* writer, int64_t value, int32_t size) {
|
||||||
if (!writer || size < 1 || size > 8)
|
if (!writer || size < 1 || size > 8)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for (int32 i = 1; i <= size; ++i) {
|
for (int32_t i = 1; i <= size; ++i) {
|
||||||
const int32 byte_count = size - i;
|
const int32_t byte_count = size - i;
|
||||||
const int32 bit_count = byte_count * 8;
|
const int32_t bit_count = byte_count * 8;
|
||||||
|
|
||||||
const int64 bb = value >> bit_count;
|
const int64_t bb = value >> bit_count;
|
||||||
const uint8 b = static_cast<uint8>(bb);
|
const uint8_t b = static_cast<uint8_t>(bb);
|
||||||
|
|
||||||
const int32 status = writer->Write(&b, 1);
|
const int32_t status = writer->Write(&b, 1);
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
return status;
|
return status;
|
||||||
@@ -332,26 +341,26 @@ int32 SerializeInt(IMkvWriter* writer, int64 value, int32 size) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 SerializeFloat(IMkvWriter* writer, float f) {
|
int32_t SerializeFloat(IMkvWriter* writer, float f) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
assert(sizeof(uint32) == sizeof(float));
|
assert(sizeof(uint32_t) == sizeof(float));
|
||||||
// This union is merely used to avoid a reinterpret_cast from float& to
|
// This union is merely used to avoid a reinterpret_cast from float& to
|
||||||
// uint32& which will result in violation of strict aliasing.
|
// uint32& which will result in violation of strict aliasing.
|
||||||
union U32 {
|
union U32 {
|
||||||
uint32 u32;
|
uint32_t u32;
|
||||||
float f;
|
float f;
|
||||||
} value;
|
} value;
|
||||||
value.f = f;
|
value.f = f;
|
||||||
|
|
||||||
for (int32 i = 1; i <= 4; ++i) {
|
for (int32_t i = 1; i <= 4; ++i) {
|
||||||
const int32 byte_count = 4 - i;
|
const int32_t byte_count = 4 - i;
|
||||||
const int32 bit_count = byte_count * 8;
|
const int32_t bit_count = byte_count * 8;
|
||||||
|
|
||||||
const uint8 byte = static_cast<uint8>(value.u32 >> bit_count);
|
const uint8_t byte = static_cast<uint8_t>(value.u32 >> bit_count);
|
||||||
|
|
||||||
const int32 status = writer->Write(&byte, 1);
|
const int32_t status = writer->Write(&byte, 1);
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
return status;
|
return status;
|
||||||
@@ -360,21 +369,21 @@ int32 SerializeFloat(IMkvWriter* writer, float f) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 WriteUInt(IMkvWriter* writer, uint64 value) {
|
int32_t WriteUInt(IMkvWriter* writer, uint64_t value) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
int32 size = GetCodedUIntSize(value);
|
int32_t size = GetCodedUIntSize(value);
|
||||||
|
|
||||||
return WriteUIntSize(writer, value, size);
|
return WriteUIntSize(writer, value, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 WriteUIntSize(IMkvWriter* writer, uint64 value, int32 size) {
|
int32_t WriteUIntSize(IMkvWriter* writer, uint64_t value, int32_t size) {
|
||||||
if (!writer || size < 0 || size > 8)
|
if (!writer || size < 0 || size > 8)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
const uint64 bit = 1LL << (size * 7);
|
const uint64_t bit = 1LL << (size * 7);
|
||||||
|
|
||||||
if (value > (bit - 2))
|
if (value > (bit - 2))
|
||||||
return -1;
|
return -1;
|
||||||
@@ -382,11 +391,11 @@ int32 WriteUIntSize(IMkvWriter* writer, uint64 value, int32 size) {
|
|||||||
value |= bit;
|
value |= bit;
|
||||||
} else {
|
} else {
|
||||||
size = 1;
|
size = 1;
|
||||||
int64 bit;
|
int64_t bit;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
bit = 1LL << (size * 7);
|
bit = 1LL << (size * 7);
|
||||||
const uint64 max = bit - 2;
|
const uint64_t max = bit - 2;
|
||||||
|
|
||||||
if (value <= max)
|
if (value <= max)
|
||||||
break;
|
break;
|
||||||
@@ -403,18 +412,18 @@ int32 WriteUIntSize(IMkvWriter* writer, uint64 value, int32 size) {
|
|||||||
return SerializeInt(writer, value, size);
|
return SerializeInt(writer, value, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 WriteID(IMkvWriter* writer, uint64 type) {
|
int32_t WriteID(IMkvWriter* writer, uint64_t type) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
writer->ElementStartNotify(type, writer->Position());
|
writer->ElementStartNotify(type, writer->Position());
|
||||||
|
|
||||||
const int32 size = GetUIntSize(type);
|
const int32_t size = GetUIntSize(type);
|
||||||
|
|
||||||
return SerializeInt(writer, type, size);
|
return SerializeInt(writer, type, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteEbmlMasterElement(IMkvWriter* writer, uint64 type, uint64 size) {
|
bool WriteEbmlMasterElement(IMkvWriter* writer, uint64_t type, uint64_t size) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -427,41 +436,51 @@ bool WriteEbmlMasterElement(IMkvWriter* writer, uint64 type, uint64 size) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, uint64 value) {
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, uint64_t value) {
|
||||||
|
return WriteEbmlElement(writer, type, value, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, uint64_t value,
|
||||||
|
uint64_t fixed_size) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (WriteID(writer, type))
|
if (WriteID(writer, type))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const uint64 size = GetUIntSize(value);
|
uint64_t size = static_cast<uint64_t>(GetUIntSize(value));
|
||||||
|
if (fixed_size > 0) {
|
||||||
|
if (size > fixed_size)
|
||||||
|
return false;
|
||||||
|
size = fixed_size;
|
||||||
|
}
|
||||||
if (WriteUInt(writer, size))
|
if (WriteUInt(writer, size))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (SerializeInt(writer, value, static_cast<int32>(size)))
|
if (SerializeInt(writer, value, static_cast<int32_t>(size)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, int64 value) {
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, int64_t value) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (WriteID(writer, type))
|
if (WriteID(writer, type))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const uint64 size = GetIntSize(value);
|
const uint64_t size = GetIntSize(value);
|
||||||
if (WriteUInt(writer, size))
|
if (WriteUInt(writer, size))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (SerializeInt(writer, value, static_cast<int32>(size)))
|
if (SerializeInt(writer, value, static_cast<int32_t>(size)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, float value) {
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, float value) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -477,25 +496,25 @@ bool WriteEbmlElement(IMkvWriter* writer, uint64 type, float value) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const char* value) {
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, const char* value) {
|
||||||
if (!writer || !value)
|
if (!writer || !value)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (WriteID(writer, type))
|
if (WriteID(writer, type))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const uint64 length = strlen(value);
|
const uint64_t length = strlen(value);
|
||||||
if (WriteUInt(writer, length))
|
if (WriteUInt(writer, length))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (writer->Write(value, static_cast<const uint32>(length)))
|
if (writer->Write(value, static_cast<const uint32_t>(length)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const uint8* value,
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, const uint8_t* value,
|
||||||
uint64 size) {
|
uint64_t size) {
|
||||||
if (!writer || !value || size < 1)
|
if (!writer || !value || size < 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -505,13 +524,13 @@ bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const uint8* value,
|
|||||||
if (WriteUInt(writer, size))
|
if (WriteUInt(writer, size))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (writer->Write(value, static_cast<uint32>(size)))
|
if (writer->Write(value, static_cast<uint32_t>(size)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteEbmlDateElement(IMkvWriter* writer, uint64 type, int64 value) {
|
bool WriteEbmlDateElement(IMkvWriter* writer, uint64_t type, int64_t value) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -527,7 +546,7 @@ bool WriteEbmlDateElement(IMkvWriter* writer, uint64 type, int64 value) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 WriteFrame(IMkvWriter* writer, const Frame* const frame,
|
uint64_t WriteFrame(IMkvWriter* writer, const Frame* const frame,
|
||||||
Cluster* cluster) {
|
Cluster* cluster) {
|
||||||
if (!writer || !frame || !frame->IsValid() || !cluster ||
|
if (!writer || !frame || !frame->IsValid() || !cluster ||
|
||||||
!cluster->timecode_scale())
|
!cluster->timecode_scale())
|
||||||
@@ -537,7 +556,7 @@ uint64 WriteFrame(IMkvWriter* writer, const Frame* const frame,
|
|||||||
// timecode for the cluster itself (remember that block timecode
|
// timecode for the cluster itself (remember that block timecode
|
||||||
// is a signed, 16-bit integer). However, as a simplification we
|
// is a signed, 16-bit integer). However, as a simplification we
|
||||||
// only permit non-negative cluster-relative timecodes for blocks.
|
// only permit non-negative cluster-relative timecodes for blocks.
|
||||||
const int64 relative_timecode = cluster->GetRelativeTimecode(
|
const int64_t relative_timecode = cluster->GetRelativeTimecode(
|
||||||
frame->timestamp() / cluster->timecode_scale());
|
frame->timestamp() / cluster->timecode_scale());
|
||||||
if (relative_timecode < 0 || relative_timecode > kMaxBlockTimecode)
|
if (relative_timecode < 0 || relative_timecode > kMaxBlockTimecode)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -548,53 +567,53 @@ uint64 WriteFrame(IMkvWriter* writer, const Frame* const frame,
|
|||||||
cluster->timecode_scale());
|
cluster->timecode_scale());
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 WriteVoidElement(IMkvWriter* writer, uint64 size) {
|
uint64_t WriteVoidElement(IMkvWriter* writer, uint64_t size) {
|
||||||
if (!writer)
|
if (!writer)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Subtract one for the void ID and the coded size.
|
// Subtract one for the void ID and the coded size.
|
||||||
uint64 void_entry_size = size - 1 - GetCodedUIntSize(size - 1);
|
uint64_t void_entry_size = size - 1 - GetCodedUIntSize(size - 1);
|
||||||
uint64 void_size =
|
uint64_t void_size =
|
||||||
EbmlMasterElementSize(kMkvVoid, void_entry_size) + void_entry_size;
|
EbmlMasterElementSize(libwebm::kMkvVoid, void_entry_size) +
|
||||||
|
void_entry_size;
|
||||||
|
|
||||||
if (void_size != size)
|
if (void_size != size)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const int64 payload_position = writer->Position();
|
const int64_t payload_position = writer->Position();
|
||||||
if (payload_position < 0)
|
if (payload_position < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (WriteID(writer, kMkvVoid))
|
if (WriteID(writer, libwebm::kMkvVoid))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (WriteUInt(writer, void_entry_size))
|
if (WriteUInt(writer, void_entry_size))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
const uint8 value = 0;
|
const uint8_t value = 0;
|
||||||
for (int32 i = 0; i < static_cast<int32>(void_entry_size); ++i) {
|
for (int32_t i = 0; i < static_cast<int32_t>(void_entry_size); ++i) {
|
||||||
if (writer->Write(&value, 1))
|
if (writer->Write(&value, 1))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int64 stop_position = writer->Position();
|
const int64_t stop_position = writer->Position();
|
||||||
if (stop_position < 0 ||
|
if (stop_position < 0 ||
|
||||||
stop_position - payload_position != static_cast<int64>(void_size))
|
stop_position - payload_position != static_cast<int64_t>(void_size))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return void_size;
|
return void_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetVersion(int32* major, int32* minor, int32* build, int32* revision) {
|
void GetVersion(int32_t* major, int32_t* minor, int32_t* build,
|
||||||
|
int32_t* revision) {
|
||||||
*major = 0;
|
*major = 0;
|
||||||
*minor = 2;
|
*minor = 2;
|
||||||
*build = 1;
|
*build = 1;
|
||||||
*revision = 0;
|
*revision = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace mkvmuxer
|
uint64_t MakeUID(unsigned int* seed) {
|
||||||
|
uint64_t uid = 0;
|
||||||
mkvmuxer::uint64 mkvmuxer::MakeUID(unsigned int* seed) {
|
|
||||||
uint64 uid = 0;
|
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
srand(*seed);
|
srand(*seed);
|
||||||
@@ -606,24 +625,26 @@ mkvmuxer::uint64 mkvmuxer::MakeUID(unsigned int* seed) {
|
|||||||
// TODO(fgalligan): Move random number generation to platform specific code.
|
// TODO(fgalligan): Move random number generation to platform specific code.
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
(void)seed;
|
(void)seed;
|
||||||
const int32 nn = rand();
|
const int32_t nn = rand();
|
||||||
#elif __ANDROID__
|
#elif __ANDROID__
|
||||||
int32 temp_num = 1;
|
int32_t temp_num = 1;
|
||||||
int fd = open("/dev/urandom", O_RDONLY);
|
int fd = open("/dev/urandom", O_RDONLY);
|
||||||
if (fd != -1) {
|
if (fd != -1) {
|
||||||
read(fd, &temp_num, sizeof(int32));
|
read(fd, &temp_num, sizeof(temp_num));
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
const int32 nn = temp_num;
|
const int32_t nn = temp_num;
|
||||||
#elif defined __MINGW32__
|
#elif defined __MINGW32__
|
||||||
const int32 nn = rand();
|
const int32_t nn = rand();
|
||||||
#else
|
#else
|
||||||
const int32 nn = rand_r(seed);
|
const int32_t nn = rand_r(seed);
|
||||||
#endif
|
#endif
|
||||||
const int32 n = 0xFF & (nn >> 4); // throw away low-order bits
|
const int32_t n = 0xFF & (nn >> 4); // throw away low-order bits
|
||||||
|
|
||||||
uid |= n;
|
uid |= n;
|
||||||
}
|
}
|
||||||
|
|
||||||
return uid;
|
return uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace mkvmuxer
|
||||||
95
third_party/libwebm/mkvmuxer/mkvmuxerutil.h
vendored
Normal file
95
third_party/libwebm/mkvmuxer/mkvmuxerutil.h
vendored
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
// Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
||||||
|
//
|
||||||
|
// Use of this source code is governed by a BSD-style license
|
||||||
|
// that can be found in the LICENSE file in the root of the source
|
||||||
|
// tree. An additional intellectual property rights grant can be found
|
||||||
|
// in the file PATENTS. All contributing project authors may
|
||||||
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
#ifndef MKVMUXER_MKVMUXERUTIL_H_
|
||||||
|
#define MKVMUXER_MKVMUXERUTIL_H_
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
namespace mkvmuxer {
|
||||||
|
class Cluster;
|
||||||
|
class Frame;
|
||||||
|
class IMkvWriter;
|
||||||
|
|
||||||
|
const uint64_t kEbmlUnknownValue = 0x01FFFFFFFFFFFFFFULL;
|
||||||
|
const int64_t kMaxBlockTimecode = 0x07FFFLL;
|
||||||
|
|
||||||
|
// Writes out |value| in Big Endian order. Returns 0 on success.
|
||||||
|
int32_t SerializeInt(IMkvWriter* writer, int64_t value, int32_t size);
|
||||||
|
|
||||||
|
// Returns the size in bytes of the element.
|
||||||
|
int32_t GetUIntSize(uint64_t value);
|
||||||
|
int32_t GetIntSize(int64_t value);
|
||||||
|
int32_t GetCodedUIntSize(uint64_t value);
|
||||||
|
uint64_t EbmlMasterElementSize(uint64_t type, uint64_t value);
|
||||||
|
uint64_t EbmlElementSize(uint64_t type, int64_t value);
|
||||||
|
uint64_t EbmlElementSize(uint64_t type, uint64_t value);
|
||||||
|
uint64_t EbmlElementSize(uint64_t type, float value);
|
||||||
|
uint64_t EbmlElementSize(uint64_t type, const char* value);
|
||||||
|
uint64_t EbmlElementSize(uint64_t type, const uint8_t* value, uint64_t size);
|
||||||
|
uint64_t EbmlDateElementSize(uint64_t type);
|
||||||
|
|
||||||
|
// Returns the size in bytes of the element assuming that the element was
|
||||||
|
// written using |fixed_size| bytes. If |fixed_size| is set to zero, then it
|
||||||
|
// computes the necessary number of bytes based on |value|.
|
||||||
|
uint64_t EbmlElementSize(uint64_t type, uint64_t value, uint64_t fixed_size);
|
||||||
|
|
||||||
|
// Creates an EBML coded number from |value| and writes it out. The size of
|
||||||
|
// the coded number is determined by the value of |value|. |value| must not
|
||||||
|
// be in a coded form. Returns 0 on success.
|
||||||
|
int32_t WriteUInt(IMkvWriter* writer, uint64_t value);
|
||||||
|
|
||||||
|
// Creates an EBML coded number from |value| and writes it out. The size of
|
||||||
|
// the coded number is determined by the value of |size|. |value| must not
|
||||||
|
// be in a coded form. Returns 0 on success.
|
||||||
|
int32_t WriteUIntSize(IMkvWriter* writer, uint64_t value, int32_t size);
|
||||||
|
|
||||||
|
// Output an Mkv master element. Returns true if the element was written.
|
||||||
|
bool WriteEbmlMasterElement(IMkvWriter* writer, uint64_t value, uint64_t size);
|
||||||
|
|
||||||
|
// Outputs an Mkv ID, calls |IMkvWriter::ElementStartNotify|, and passes the
|
||||||
|
// ID to |SerializeInt|. Returns 0 on success.
|
||||||
|
int32_t WriteID(IMkvWriter* writer, uint64_t type);
|
||||||
|
|
||||||
|
// Output an Mkv non-master element. Returns true if the element was written.
|
||||||
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, uint64_t value);
|
||||||
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, int64_t value);
|
||||||
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, float value);
|
||||||
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, const char* value);
|
||||||
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, const uint8_t* value,
|
||||||
|
uint64_t size);
|
||||||
|
bool WriteEbmlDateElement(IMkvWriter* writer, uint64_t type, int64_t value);
|
||||||
|
|
||||||
|
// Output an Mkv non-master element using fixed size. The element will be
|
||||||
|
// written out using exactly |fixed_size| bytes. If |fixed_size| is set to zero
|
||||||
|
// then it computes the necessary number of bytes based on |value|. Returns true
|
||||||
|
// if the element was written.
|
||||||
|
bool WriteEbmlElement(IMkvWriter* writer, uint64_t type, uint64_t value,
|
||||||
|
uint64_t fixed_size);
|
||||||
|
|
||||||
|
// Output a Mkv Frame. It decides the correct element to write (Block vs
|
||||||
|
// SimpleBlock) based on the parameters of the Frame.
|
||||||
|
uint64_t WriteFrame(IMkvWriter* writer, const Frame* const frame,
|
||||||
|
Cluster* cluster);
|
||||||
|
|
||||||
|
// Output a void element. |size| must be the entire size in bytes that will be
|
||||||
|
// void. The function will calculate the size of the void header and subtract
|
||||||
|
// it from |size|.
|
||||||
|
uint64_t WriteVoidElement(IMkvWriter* writer, uint64_t size);
|
||||||
|
|
||||||
|
// Returns the version number of the muxer in |major|, |minor|, |build|,
|
||||||
|
// and |revision|.
|
||||||
|
void GetVersion(int32_t* major, int32_t* minor, int32_t* build,
|
||||||
|
int32_t* revision);
|
||||||
|
|
||||||
|
// Returns a random number to be used for UID, using |seed| to seed
|
||||||
|
// the random-number generator (see POSIX rand_r() for semantics).
|
||||||
|
uint64_t MakeUID(unsigned int* seed);
|
||||||
|
|
||||||
|
} // namespace mkvmuxer
|
||||||
|
|
||||||
|
#endif // MKVMUXER_MKVMUXERUTIL_H_
|
||||||
@@ -6,14 +6,12 @@
|
|||||||
// in the file PATENTS. All contributing project authors may
|
// in the file PATENTS. All contributing project authors may
|
||||||
// be found in the AUTHORS file in the root of the source tree.
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
#include "mkvwriter.hpp"
|
#include "mkvmuxer/mkvwriter.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <share.h> // for _SH_DENYWR
|
#include <share.h> // for _SH_DENYWR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <new>
|
|
||||||
|
|
||||||
namespace mkvmuxer {
|
namespace mkvmuxer {
|
||||||
|
|
||||||
MkvWriter::MkvWriter() : file_(NULL), writer_owns_file_(true) {}
|
MkvWriter::MkvWriter() : file_(NULL), writer_owns_file_(true) {}
|
||||||
@@ -6,13 +6,13 @@
|
|||||||
// in the file PATENTS. All contributing project authors may
|
// in the file PATENTS. All contributing project authors may
|
||||||
// be found in the AUTHORS file in the root of the source tree.
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
#ifndef MKVWRITER_HPP
|
#ifndef MKVMUXER_MKVWRITER_H_
|
||||||
#define MKVWRITER_HPP
|
#define MKVMUXER_MKVWRITER_H_
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "mkvmuxer.hpp"
|
#include "mkvmuxer/mkvmuxer.h"
|
||||||
#include "mkvmuxertypes.hpp"
|
#include "mkvmuxer/mkvmuxertypes.h"
|
||||||
|
|
||||||
namespace mkvmuxer {
|
namespace mkvmuxer {
|
||||||
|
|
||||||
@@ -46,6 +46,6 @@ class MkvWriter : public IMkvWriter {
|
|||||||
LIBWEBM_DISALLOW_COPY_AND_ASSIGN(MkvWriter);
|
LIBWEBM_DISALLOW_COPY_AND_ASSIGN(MkvWriter);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace mkvmuxer
|
} // namespace mkvmuxer
|
||||||
|
|
||||||
#endif // MKVWRITER_HPP
|
#endif // MKVMUXER_MKVWRITER_H_
|
||||||
83
third_party/libwebm/mkvmuxerutil.hpp
vendored
83
third_party/libwebm/mkvmuxerutil.hpp
vendored
@@ -1,83 +0,0 @@
|
|||||||
// Copyright (c) 2012 The WebM project authors. All Rights Reserved.
|
|
||||||
//
|
|
||||||
// Use of this source code is governed by a BSD-style license
|
|
||||||
// that can be found in the LICENSE file in the root of the source
|
|
||||||
// tree. An additional intellectual property rights grant can be found
|
|
||||||
// in the file PATENTS. All contributing project authors may
|
|
||||||
// be found in the AUTHORS file in the root of the source tree.
|
|
||||||
|
|
||||||
#ifndef MKVMUXERUTIL_HPP
|
|
||||||
#define MKVMUXERUTIL_HPP
|
|
||||||
|
|
||||||
#include "mkvmuxer.hpp"
|
|
||||||
#include "mkvmuxertypes.hpp"
|
|
||||||
|
|
||||||
namespace mkvmuxer {
|
|
||||||
|
|
||||||
class IMkvWriter;
|
|
||||||
|
|
||||||
const uint64 kEbmlUnknownValue = 0x01FFFFFFFFFFFFFFULL;
|
|
||||||
const int64 kMaxBlockTimecode = 0x07FFFLL;
|
|
||||||
|
|
||||||
// Writes out |value| in Big Endian order. Returns 0 on success.
|
|
||||||
int32 SerializeInt(IMkvWriter* writer, int64 value, int32 size);
|
|
||||||
|
|
||||||
// Returns the size in bytes of the element.
|
|
||||||
int32 GetUIntSize(uint64 value);
|
|
||||||
int32 GetIntSize(int64 value);
|
|
||||||
int32 GetCodedUIntSize(uint64 value);
|
|
||||||
uint64 EbmlMasterElementSize(uint64 type, uint64 value);
|
|
||||||
uint64 EbmlElementSize(uint64 type, int64 value);
|
|
||||||
uint64 EbmlElementSize(uint64 type, uint64 value);
|
|
||||||
uint64 EbmlElementSize(uint64 type, float value);
|
|
||||||
uint64 EbmlElementSize(uint64 type, const char* value);
|
|
||||||
uint64 EbmlElementSize(uint64 type, const uint8* value, uint64 size);
|
|
||||||
uint64 EbmlDateElementSize(uint64 type);
|
|
||||||
|
|
||||||
// Creates an EBML coded number from |value| and writes it out. The size of
|
|
||||||
// the coded number is determined by the value of |value|. |value| must not
|
|
||||||
// be in a coded form. Returns 0 on success.
|
|
||||||
int32 WriteUInt(IMkvWriter* writer, uint64 value);
|
|
||||||
|
|
||||||
// Creates an EBML coded number from |value| and writes it out. The size of
|
|
||||||
// the coded number is determined by the value of |size|. |value| must not
|
|
||||||
// be in a coded form. Returns 0 on success.
|
|
||||||
int32 WriteUIntSize(IMkvWriter* writer, uint64 value, int32 size);
|
|
||||||
|
|
||||||
// Output an Mkv master element. Returns true if the element was written.
|
|
||||||
bool WriteEbmlMasterElement(IMkvWriter* writer, uint64 value, uint64 size);
|
|
||||||
|
|
||||||
// Outputs an Mkv ID, calls |IMkvWriter::ElementStartNotify|, and passes the
|
|
||||||
// ID to |SerializeInt|. Returns 0 on success.
|
|
||||||
int32 WriteID(IMkvWriter* writer, uint64 type);
|
|
||||||
|
|
||||||
// Output an Mkv non-master element. Returns true if the element was written.
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, uint64 value);
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, int64 value);
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, float value);
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const char* value);
|
|
||||||
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, const uint8* value,
|
|
||||||
uint64 size);
|
|
||||||
bool WriteEbmlDateElement(IMkvWriter* writer, uint64 type, int64 value);
|
|
||||||
|
|
||||||
// Output a Mkv Frame. It decides the correct element to write (Block vs
|
|
||||||
// SimpleBlock) based on the parameters of the Frame.
|
|
||||||
uint64 WriteFrame(IMkvWriter* writer, const Frame* const frame,
|
|
||||||
Cluster* cluster);
|
|
||||||
|
|
||||||
// Output a void element. |size| must be the entire size in bytes that will be
|
|
||||||
// void. The function will calculate the size of the void header and subtract
|
|
||||||
// it from |size|.
|
|
||||||
uint64 WriteVoidElement(IMkvWriter* writer, uint64 size);
|
|
||||||
|
|
||||||
// Returns the version number of the muxer in |major|, |minor|, |build|,
|
|
||||||
// and |revision|.
|
|
||||||
void GetVersion(int32* major, int32* minor, int32* build, int32* revision);
|
|
||||||
|
|
||||||
// Returns a random number to be used for UID, using |seed| to seed
|
|
||||||
// the random-number generator (see POSIX rand_r() for semantics).
|
|
||||||
uint64 MakeUID(unsigned int* seed);
|
|
||||||
|
|
||||||
} // end namespace mkvmuxer
|
|
||||||
|
|
||||||
#endif // MKVMUXERUTIL_HPP
|
|
||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user