Compare commits
1225 Commits
sandbox/ac
...
m52-2743
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
669e7b7454 | ||
|
|
62a57630cc | ||
|
|
240f8e56e4 | ||
|
|
3b3ee4a4db | ||
|
|
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 |
8
.mailmap
8
.mailmap
@@ -1,14 +1,18 @@
|
|||||||
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>
|
||||||
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>
|
||||||
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>
|
||||||
@@ -17,10 +21,12 @@ Pascal Massimino <pascal.massimino@gmail.com>
|
|||||||
Paul Wilkins <paulwilkins@google.com>
|
Paul Wilkins <paulwilkins@google.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> Tim Terriberry <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>
|
||||||
|
|||||||
15
AUTHORS
15
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,8 +16,10 @@ 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>
|
||||||
@@ -27,6 +29,7 @@ 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 +37,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>
|
||||||
@@ -44,7 +49,7 @@ Henrik Lundin <hlundin@google.com>
|
|||||||
Hui Su <huisu@google.com>
|
Hui Su <huisu@google.com>
|
||||||
Ivan Maltz <ivanmaltz@google.com>
|
Ivan Maltz <ivanmaltz@google.com>
|
||||||
Jacek Caban <cjacek@gmail.com>
|
Jacek Caban <cjacek@gmail.com>
|
||||||
JackyChen <jackychen@google.com>
|
Jacky Chen <jackychen@google.com>
|
||||||
James Berry <jamesberry@google.com>
|
James Berry <jamesberry@google.com>
|
||||||
James Yu <james.yu@linaro.org>
|
James Yu <james.yu@linaro.org>
|
||||||
James Zern <jzern@google.com>
|
James Zern <jzern@google.com>
|
||||||
@@ -60,9 +65,11 @@ 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>
|
||||||
@@ -82,6 +89,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,7 +104,7 @@ 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>
|
||||||
Scott Graham <scottmg@chromium.org>
|
Scott Graham <scottmg@chromium.org>
|
||||||
@@ -104,6 +112,7 @@ Scott LaVarnway <slavarnway@google.com>
|
|||||||
Sean McGovern <gseanmcg@gmail.com>
|
Sean McGovern <gseanmcg@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>
|
||||||
|
|||||||
24
CHANGELOG
24
CHANGELOG
@@ -1,7 +1,23 @@
|
|||||||
xxxx-yy-zz v1.4.0 "Changes for next release"
|
Next Release
|
||||||
vpxenc is changed to use VP9 by default.
|
- Incompatible changes:
|
||||||
Encoder controls added for 1 pass SVC.
|
The VP9 encoder's default keyframe interval changed to 128 from 9999.
|
||||||
Decoder control to toggle on/off loopfilter.
|
|
||||||
|
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.
|
||||||
|
|||||||
1
README
1
README
@@ -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
|
||||||
|
|||||||
@@ -287,7 +287,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)
|
||||||
@@ -200,6 +201,10 @@ disabled(){
|
|||||||
eval test "x\$$1" = "xno"
|
eval test "x\$$1" = "xno"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 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 +214,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 +346,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 +441,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,6 +516,9 @@ 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 echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then
|
||||||
@@ -617,16 +633,24 @@ 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
|
||||||
|
}
|
||||||
|
|
||||||
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 +691,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
|
||||||
;;
|
;;
|
||||||
@@ -729,13 +757,14 @@ process_common_toolchain() {
|
|||||||
# 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 +802,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 +844,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)
|
||||||
soft_enable media
|
case ${toolchain} in
|
||||||
|
*-darwin*)
|
||||||
|
if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then
|
||||||
|
soft_enable media
|
||||||
|
else
|
||||||
|
die "Your iOS SDK does not support armv6."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
soft_enable media
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -828,7 +880,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}
|
||||||
@@ -938,8 +989,10 @@ EOF
|
|||||||
awk '{ print $1 }' | tail -1`
|
awk '{ print $1 }' | tail -1`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
add_cflags "--sysroot=${alt_libc}"
|
if [ -d "${alt_libc}" ]; then
|
||||||
add_ldflags "--sysroot=${alt_libc}"
|
add_cflags "--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 +1018,7 @@ EOF
|
|||||||
NM="$(${XCRUN_FIND} nm)"
|
NM="$(${XCRUN_FIND} nm)"
|
||||||
RANLIB="$(${XCRUN_FIND} ranlib)"
|
RANLIB="$(${XCRUN_FIND} ranlib)"
|
||||||
AS_SFX=.s
|
AS_SFX=.s
|
||||||
|
LD="${CXX:-$(${XCRUN_FIND} ld)}"
|
||||||
# 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)}"
|
|
||||||
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
|
||||||
@@ -1003,6 +1045,12 @@ EOF
|
|||||||
done
|
done
|
||||||
|
|
||||||
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 +1058,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 +1126,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 +1179,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,32 +1205,43 @@ 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
|
|
||||||
check_gcc_machine_option avx2
|
|
||||||
|
|
||||||
case "${AS}" in
|
|
||||||
auto|"")
|
|
||||||
which nasm >/dev/null 2>&1 && AS=nasm
|
|
||||||
which yasm >/dev/null 2>&1 && AS=yasm
|
|
||||||
if [ "${AS}" = nasm ] ; then
|
|
||||||
# Apple ships version 0.98 of nasm through at least Xcode 6. Revisit
|
|
||||||
# this check if they start shipping a compatible version.
|
|
||||||
apple=`nasm -v | grep "Apple"`
|
|
||||||
[ -n "${apple}" ] \
|
|
||||||
&& echo "Unsupported version of nasm: ${apple}" \
|
|
||||||
&& AS=""
|
|
||||||
fi
|
fi
|
||||||
[ "${AS}" = auto ] || [ -z "${AS}" ] \
|
elif disabled $ext; then
|
||||||
&& die "Neither yasm nor nasm have been found"
|
disable_exts="yes"
|
||||||
;;
|
else
|
||||||
esac
|
# use the shortened version for the flag: sse4_1 -> sse4
|
||||||
log_echo " using $AS"
|
check_gcc_machine_option ${ext%_*} $ext
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if enabled external_build; then
|
||||||
|
log_echo " skipping assembler detection"
|
||||||
|
else
|
||||||
|
case "${AS}" in
|
||||||
|
auto|"")
|
||||||
|
which nasm >/dev/null 2>&1 && AS=nasm
|
||||||
|
which yasm >/dev/null 2>&1 && AS=yasm
|
||||||
|
if [ "${AS}" = nasm ] ; then
|
||||||
|
# Apple ships version 0.98 of nasm through at least Xcode 6. Revisit
|
||||||
|
# this check if they start shipping a compatible version.
|
||||||
|
apple=`nasm -v | grep "Apple"`
|
||||||
|
[ -n "${apple}" ] \
|
||||||
|
&& echo "Unsupported version of nasm: ${apple}" \
|
||||||
|
&& AS=""
|
||||||
|
fi
|
||||||
|
[ "${AS}" = auto ] || [ -z "${AS}" ] \
|
||||||
|
&& die "Neither yasm nor nasm have been found." \
|
||||||
|
"See the prerequisites section in the README for more info."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
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 +1277,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`}
|
||||||
|
|||||||
@@ -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() {
|
||||||
@@ -165,13 +215,13 @@ 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:"
|
# 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 +239,29 @@ 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.
|
||||||
--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,20 +290,22 @@ while [ -n "$1" ]; do
|
|||||||
iosbuild_usage
|
iosbuild_usage
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
--jobs)
|
|
||||||
MAKE_JOBS="$2"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--preserve-build-output)
|
--preserve-build-output)
|
||||||
PRESERVE_BUILD_OUTPUT=yes
|
PRESERVE_BUILD_OUTPUT=yes
|
||||||
;;
|
;;
|
||||||
--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
|
||||||
;;
|
;;
|
||||||
@@ -259,16 +324,19 @@ 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})"
|
||||||
|
OSX_TARGETS="${OSX_TARGETS}"
|
||||||
|
SIM_TARGETS="${SIM_TARGETS}"
|
||||||
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
|
||||||
|
|||||||
53
configure
vendored
53
configure
vendored
@@ -35,6 +35,9 @@ 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_vp10} VP10 codec support
|
||||||
@@ -95,11 +98,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} 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} arm64-darwin-gcc"
|
||||||
|
all_platforms="${all_platforms} arm64-linux-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
|
||||||
@@ -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"
|
||||||
@@ -232,6 +237,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 +258,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 +323,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 +382,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
|
||||||
"
|
"
|
||||||
@@ -539,16 +548,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 +569,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 +600,11 @@ process_toolchain() {
|
|||||||
;;
|
;;
|
||||||
*) check_add_cflags -Wunused-but-set-variable ;;
|
*) check_add_cflags -Wunused-but-set-variable ;;
|
||||||
esac
|
esac
|
||||||
enabled extra_warnings || check_add_cflags -Wno-unused-function
|
if enabled mips || [ -z "${INLINE}" ]; then
|
||||||
|
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 +729,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
|
||||||
|
|||||||
@@ -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,8 +686,10 @@ 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",
|
||||||
1000000 * (double)frame_cnt / (double)cx_time);
|
frame_cnt,
|
||||||
|
1000 * (float)cx_time / (double)(frame_cnt * 1000000),
|
||||||
|
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,7 +409,10 @@ 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;
|
||||||
rc->layer_framerate[layer] =
|
if (cfg->ts_number_layers == 1)
|
||||||
|
rc->layer_framerate[layer] = framerate;
|
||||||
|
else
|
||||||
|
rc->layer_framerate[layer] =
|
||||||
framerate / cfg->ts_rate_decimator[tl];
|
framerate / cfg->ts_rate_decimator[tl];
|
||||||
if (tl > 0) {
|
if (tl > 0) {
|
||||||
rc->layer_pfb[layer] = 1000.0 *
|
rc->layer_pfb[layer] = 1000.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,9 +774,16 @@ 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);
|
||||||
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
|
// Note computing input_layer_frames here won't account for frame
|
||||||
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
|
// drops in rate control stats.
|
||||||
layer_id.temporal_layer_id];
|
// 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) {
|
||||||
|
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
|
||||||
|
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) {
|
||||||
@@ -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))
|
||||||
|
|||||||
22
libs.mk
22
libs.mk
@@ -183,6 +183,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 +263,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 := 3
|
||||||
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))
|
||||||
@@ -394,6 +397,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 +438,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 +478,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
|
||||||
|
|||||||
202
test/add_noise_test.cc
Normal file
202
test/add_noise_test.cc
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
/*
|
||||||
|
* 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_MMX
|
||||||
|
INSTANTIATE_TEST_CASE_P(MMX, AddNoiseTest,
|
||||||
|
::testing::Values(vpx_plane_add_noise_mmx));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#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,106 @@ 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
|
||||||
|
#if CONFIG_VP10_ENCODER
|
||||||
|
if (GET_PARAM(0) == &libvpx_test::kVP10) {
|
||||||
|
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));
|
||||||
|
|
||||||
|
VP10_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"
|
||||||
@@ -57,19 +55,19 @@ class AverageTestBase : public ::testing::Test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sum Pixels
|
// Sum Pixels
|
||||||
unsigned int ReferenceAverage8x8(const uint8_t* source, int pitch ) {
|
unsigned int ReferenceAverage8x8(const uint8_t* source, int pitch) {
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int ReferenceAverage4x4(const uint8_t* source, int pitch ) {
|
unsigned int ReferenceAverage4x4(const uint8_t* source, int pitch) {
|
||||||
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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -279,8 +295,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 +321,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 +975,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 +1050,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 +1058,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 +1066,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 +1081,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 +1101,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 +1113,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 +1143,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 +1157,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 +1174,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 +1200,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 +1215,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 +1230,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;
|
||||||
|
|
||||||
|
|||||||
@@ -519,6 +519,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 +541,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 +773,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 +813,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 +836,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 +846,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 +880,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 +900,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 +984,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);
|
||||||
}
|
}
|
||||||
@@ -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);
|
||||||
}
|
}
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -146,6 +146,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
|
||||||
|
|||||||
68
test/encode_api_test.cc
Normal file
68
test/encode_api_test.cc
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
#if CONFIG_VP10_ENCODER
|
||||||
|
&vpx_codec_vp10_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
|
||||||
@@ -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();
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
@@ -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_;
|
||||||
|
|||||||
126
test/hadamard_test.cc
Normal file
126
test/hadamard_test.cc
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
/*
|
||||||
|
* 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 (*Hadamard8x8Func)(const int16_t *a, int a_stride,
|
||||||
|
int16_t *b);
|
||||||
|
|
||||||
|
class HadamardTest : public ::testing::TestWithParam<Hadamard8x8Func> {
|
||||||
|
public:
|
||||||
|
virtual void SetUp() {
|
||||||
|
h_func_ = GetParam();
|
||||||
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
Hadamard8x8Func h_func_;
|
||||||
|
ACMRandom rnd_;
|
||||||
|
};
|
||||||
|
|
||||||
|
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_hadamard(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(HadamardTest, 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_hadamard(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(HadamardTest, 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_hadamard(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, HadamardTest,
|
||||||
|
::testing::Values(&vpx_hadamard_8x8_c));
|
||||||
|
|
||||||
|
#if HAVE_SSE2
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSE2, HadamardTest,
|
||||||
|
::testing::Values(&vpx_hadamard_8x8_sse2));
|
||||||
|
#endif // HAVE_SSE2
|
||||||
|
|
||||||
|
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64
|
||||||
|
INSTANTIATE_TEST_CASE_P(SSSE3, HadamardTest,
|
||||||
|
::testing::Values(&vpx_hadamard_8x8_ssse3));
|
||||||
|
#endif // HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64
|
||||||
|
} // 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.
|
||||||
EXPECT_EQ(expected_res_dec, res_dec)
|
const DecodeParam input = GET_PARAM(1);
|
||||||
<< "Results don't match: frame number = " << video.frame_number()
|
if (input.threads > 1) {
|
||||||
<< ". (" << decoder->DecodeError() << ")";
|
// 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)
|
||||||
|
<< "Results don't match: frame number = " << video.frame_number()
|
||||||
|
<< ". (" << decoder->DecodeError() << ")";
|
||||||
|
}
|
||||||
|
|
||||||
return !HasFailure();
|
return !HasFailure();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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];
|
||||||
@@ -529,70 +430,85 @@ TEST_P(Loop8Test9Param, ValueCheck) {
|
|||||||
|
|
||||||
using std::tr1::make_tuple;
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
|
#if HAVE_MMX && CONFIG_USE_X86INC && !CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
MMX, Loop8Test6Param,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vpx_lpf_horizontal_4_mmx,
|
||||||
|
&vpx_lpf_horizontal_4_c, 8),
|
||||||
|
make_tuple(&vpx_lpf_vertical_4_mmx,
|
||||||
|
&vpx_lpf_vertical_4_c, 8)));
|
||||||
|
#endif // HAVE_MMX
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
INSTANTIATE_TEST_CASE_P(
|
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_8_sse2,
|
||||||
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 1),
|
&vpx_lpf_horizontal_8_c, 8),
|
||||||
make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 2),
|
make_tuple(&vpx_lpf_horizontal_edge_8_sse2,
|
||||||
make_tuple(&vpx_lpf_vertical_8_sse2, &vpx_lpf_vertical_8_c, 8, 1),
|
&vpx_lpf_horizontal_edge_8_c, 8),
|
||||||
make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8, 1),
|
make_tuple(&vpx_lpf_horizontal_edge_16_sse2,
|
||||||
make_tuple(&wrapper_vertical_16_dual_sse2,
|
&vpx_lpf_horizontal_edge_16_c, 8),
|
||||||
&wrapper_vertical_16_dual_c, 8, 1)));
|
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 +516,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 +576,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 +609,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
|
||||||
@@ -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,13 +344,27 @@ 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 (video->frame() == kStepDownFrame) {
|
if (change_config_) {
|
||||||
struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
|
int new_q = 60;
|
||||||
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
if (video->frame() == 0) {
|
||||||
}
|
struct vpx_scaling_mode mode = {VP8E_ONETWO, VP8E_ONETWO};
|
||||||
if (video->frame() == kStepUpFrame) {
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
struct vpx_scaling_mode mode = {VP8E_NORMAL, VP8E_NORMAL};
|
}
|
||||||
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) {
|
||||||
|
struct vpx_scaling_mode mode = {VP8E_FOURFIVE, VP8E_THREEFIVE};
|
||||||
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
|
}
|
||||||
|
if (video->frame() == kStepUpFrame) {
|
||||||
|
struct vpx_scaling_mode mode = {VP8E_NORMAL, VP8E_NORMAL};
|
||||||
|
encoder->Control(VP8E_SET_SCALEMODE, &mode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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
|
||||||
|
|||||||
982
test/sad_test.cc
982
test/sad_test.cc
File diff suppressed because it is too large
Load Diff
@@ -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,13 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
const int kTestMode = 0;
|
||||||
|
const int kSuperframeSyntax = 1;
|
||||||
|
|
||||||
|
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,9 +30,13 @@ 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);
|
||||||
|
const int syntax = std::tr1::get<kSuperframeSyntax>(input);
|
||||||
|
SetMode(mode);
|
||||||
sf_count_ = 0;
|
sf_count_ = 0;
|
||||||
sf_count_max_ = INT_MAX;
|
sf_count_max_ = INT_MAX;
|
||||||
|
is_vp10_style_superframe_ = syntax;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void TearDown() {
|
virtual void TearDown() {
|
||||||
@@ -50,7 +59,8 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
|
|||||||
const uint8_t marker = buffer[pkt->data.frame.sz - 1];
|
const uint8_t marker = buffer[pkt->data.frame.sz - 1];
|
||||||
const int frames = (marker & 0x7) + 1;
|
const int frames = (marker & 0x7) + 1;
|
||||||
const int mag = ((marker >> 3) & 3) + 1;
|
const int mag = ((marker >> 3) & 3) + 1;
|
||||||
const unsigned int index_sz = 2 + mag * frames;
|
const unsigned int index_sz =
|
||||||
|
2 + mag * (frames - is_vp10_style_superframe_);
|
||||||
if ((marker & 0xe0) == 0xc0 &&
|
if ((marker & 0xe0) == 0xc0 &&
|
||||||
pkt->data.frame.sz >= index_sz &&
|
pkt->data.frame.sz >= index_sz &&
|
||||||
buffer[pkt->data.frame.sz - index_sz] == marker) {
|
buffer[pkt->data.frame.sz - index_sz] == marker) {
|
||||||
@@ -75,6 +85,7 @@ class SuperframeTest : public ::libvpx_test::EncoderTest,
|
|||||||
return pkt;
|
return pkt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int is_vp10_style_superframe_;
|
||||||
int sf_count_;
|
int sf_count_;
|
||||||
int sf_count_max_;
|
int sf_count_max_;
|
||||||
vpx_codec_cx_pkt_t modified_pkt_;
|
vpx_codec_cx_pkt_t modified_pkt_;
|
||||||
@@ -92,9 +103,11 @@ 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(
|
VP10_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Combine(
|
||||||
::libvpx_test::kTwoPassGood));
|
::testing::Values(::libvpx_test::kTwoPassGood),
|
||||||
|
::testing::Values(CONFIG_MISC_FIXES)));
|
||||||
} // 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
|
||||||
|
|||||||
54
test/test.mk
54
test/test.mk
@@ -18,15 +18,16 @@ 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) += 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 +37,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
|
||||||
@@ -57,10 +59,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 +93,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 +103,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 +122,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 +135,26 @@ 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) += 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 +164,24 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_arf_freq_test.cc
|
|||||||
|
|
||||||
endif # VP9
|
endif # VP9
|
||||||
|
|
||||||
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
|
## VP10
|
||||||
|
ifeq ($(CONFIG_VP10),yes)
|
||||||
|
|
||||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9) := test_intra_pred_speed.cc
|
LIBVPX_TEST_SRCS-yes += vp10_inv_txfm_test.cc
|
||||||
TEST_INTRA_PRED_SPEED_SRCS-$(CONFIG_VP9) += ../md5_utils.h ../md5_utils.c
|
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += vp10_dct_test.cc
|
||||||
|
|
||||||
|
endif # VP10
|
||||||
|
|
||||||
|
## Multi-codec / unconditional whitebox tests.
|
||||||
|
|
||||||
|
ifeq ($(findstring yes,$(CONFIG_VP9_ENCODER)$(CONFIG_VP10_ENCODER)),yes)
|
||||||
|
LIBVPX_TEST_SRCS-yes += avg_test.cc
|
||||||
|
endif
|
||||||
|
|
||||||
|
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
|
||||||
|
|
||||||
|
TEST_INTRA_PRED_SPEED_SRCS-yes := test_intra_pred_speed.cc
|
||||||
|
TEST_INTRA_PRED_SPEED_SRCS-yes += ../md5_utils.h ../md5_utils.c
|
||||||
|
|
||||||
endif # CONFIG_SHARED
|
endif # CONFIG_SHARED
|
||||||
|
|
||||||
|
|||||||
@@ -187,18 +187,19 @@ 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, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||||
#endif // HAVE_SSE && CONFIG_USE_X86INC
|
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, vpx_d45_predictor_4x4_ssse3, NULL, NULL,
|
||||||
NULL, vpx_d153_predictor_4x4_ssse3,
|
vpx_d153_predictor_4x4_ssse3, vpx_d207_predictor_4x4_ssse3,
|
||||||
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 +236,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, NULL, 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, vpx_d45_predictor_8x8_ssse3, 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 +290,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 +337,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
|
||||||
|
|||||||
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>
|
||||||
|
|||||||
111
test/vp10_dct_test.cc
Normal file
111
test/vp10_dct_test.cc
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
* 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 <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <new>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
#include "test/acm_random.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
#include "./vpx_config.h"
|
||||||
|
#include "vpx_ports/msvc.h"
|
||||||
|
|
||||||
|
#undef CONFIG_COEFFICIENT_RANGE_CHECKING
|
||||||
|
#define CONFIG_COEFFICIENT_RANGE_CHECKING 1
|
||||||
|
#include "vp10/encoder/dct.c"
|
||||||
|
|
||||||
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
void reference_dct_1d(const double *in, double *out, int size) {
|
||||||
|
const double PI = 3.141592653589793238462643383279502884;
|
||||||
|
const double kInvSqrt2 = 0.707106781186547524400844362104;
|
||||||
|
for (int k = 0; k < size; ++k) {
|
||||||
|
out[k] = 0;
|
||||||
|
for (int n = 0; n < size; ++n) {
|
||||||
|
out[k] += in[n] * cos(PI * (2 * n + 1) * k / (2 * size));
|
||||||
|
}
|
||||||
|
if (k == 0)
|
||||||
|
out[k] = out[k] * kInvSqrt2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef void (*FdctFuncRef)(const double *in, double *out, int size);
|
||||||
|
typedef void (*IdctFuncRef)(const double *in, double *out, int size);
|
||||||
|
typedef void (*FdctFunc)(const tran_low_t *in, tran_low_t *out);
|
||||||
|
typedef void (*IdctFunc)(const tran_low_t *in, tran_low_t *out);
|
||||||
|
|
||||||
|
class TransTestBase {
|
||||||
|
public:
|
||||||
|
virtual ~TransTestBase() {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void RunFwdAccuracyCheck() {
|
||||||
|
tran_low_t *input = new tran_low_t[txfm_size_];
|
||||||
|
tran_low_t *output = new tran_low_t[txfm_size_];
|
||||||
|
double *ref_input = new double[txfm_size_];
|
||||||
|
double *ref_output = new double[txfm_size_];
|
||||||
|
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
const int count_test_block = 5000;
|
||||||
|
for (int ti = 0; ti < count_test_block; ++ti) {
|
||||||
|
for (int ni = 0; ni < txfm_size_; ++ni) {
|
||||||
|
input[ni] = rnd.Rand8() - rnd.Rand8();
|
||||||
|
ref_input[ni] = static_cast<double>(input[ni]);
|
||||||
|
}
|
||||||
|
|
||||||
|
fwd_txfm_(input, output);
|
||||||
|
fwd_txfm_ref_(ref_input, ref_output, txfm_size_);
|
||||||
|
|
||||||
|
for (int ni = 0; ni < txfm_size_; ++ni) {
|
||||||
|
EXPECT_LE(
|
||||||
|
abs(output[ni] - static_cast<tran_low_t>(round(ref_output[ni]))),
|
||||||
|
max_error_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] input;
|
||||||
|
delete[] output;
|
||||||
|
delete[] ref_input;
|
||||||
|
delete[] ref_output;
|
||||||
|
}
|
||||||
|
|
||||||
|
double max_error_;
|
||||||
|
int txfm_size_;
|
||||||
|
FdctFunc fwd_txfm_;
|
||||||
|
FdctFuncRef fwd_txfm_ref_;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::tr1::tuple<FdctFunc, FdctFuncRef, int, int> FdctParam;
|
||||||
|
class Vp10FwdTxfm
|
||||||
|
: public TransTestBase,
|
||||||
|
public ::testing::TestWithParam<FdctParam> {
|
||||||
|
public:
|
||||||
|
virtual void SetUp() {
|
||||||
|
fwd_txfm_ = GET_PARAM(0);
|
||||||
|
fwd_txfm_ref_ = GET_PARAM(1);
|
||||||
|
txfm_size_ = GET_PARAM(2);
|
||||||
|
max_error_ = GET_PARAM(3);
|
||||||
|
}
|
||||||
|
virtual void TearDown() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(Vp10FwdTxfm, RunFwdAccuracyCheck) {
|
||||||
|
RunFwdAccuracyCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, Vp10FwdTxfm,
|
||||||
|
::testing::Values(
|
||||||
|
FdctParam(&fdct4, &reference_dct_1d, 4, 1),
|
||||||
|
FdctParam(&fdct8, &reference_dct_1d, 8, 1),
|
||||||
|
FdctParam(&fdct16, &reference_dct_1d, 16, 2)));
|
||||||
|
} // namespace
|
||||||
321
test/vp10_inv_txfm_test.cc
Normal file
321
test/vp10_inv_txfm_test.cc
Normal file
@@ -0,0 +1,321 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013 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 <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
#include "./vp10_rtcd.h"
|
||||||
|
#include "./vpx_dsp_rtcd.h"
|
||||||
|
#include "test/acm_random.h"
|
||||||
|
#include "test/clear_system_state.h"
|
||||||
|
#include "test/register_state_check.h"
|
||||||
|
#include "test/util.h"
|
||||||
|
#include "vp10/common/blockd.h"
|
||||||
|
#include "vp10/common/scan.h"
|
||||||
|
#include "vpx/vpx_integer.h"
|
||||||
|
#include "vp10/common/vp10_inv_txfm.h"
|
||||||
|
|
||||||
|
using libvpx_test::ACMRandom;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
const double PI = 3.141592653589793238462643383279502884;
|
||||||
|
const double kInvSqrt2 = 0.707106781186547524400844362104;
|
||||||
|
|
||||||
|
void reference_idct_1d(const double *in, double *out, int size) {
|
||||||
|
for (int n = 0; n < size; ++n) {
|
||||||
|
out[n] = 0;
|
||||||
|
for (int k = 0; k < size; ++k) {
|
||||||
|
if (k == 0)
|
||||||
|
out[n] += kInvSqrt2 * in[k] * cos(PI * (2 * n + 1) * k / (2 * size));
|
||||||
|
else
|
||||||
|
out[n] += in[k] * cos(PI * (2 * n + 1) * k / (2 * size));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef void (*IdctFuncRef)(const double *in, double *out, int size);
|
||||||
|
typedef void (*IdctFunc)(const tran_low_t *in, tran_low_t *out);
|
||||||
|
|
||||||
|
class TransTestBase {
|
||||||
|
public:
|
||||||
|
virtual ~TransTestBase() {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void RunInvAccuracyCheck() {
|
||||||
|
tran_low_t *input = new tran_low_t[txfm_size_];
|
||||||
|
tran_low_t *output = new tran_low_t[txfm_size_];
|
||||||
|
double *ref_input = new double[txfm_size_];
|
||||||
|
double *ref_output = new double[txfm_size_];
|
||||||
|
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
const int count_test_block = 5000;
|
||||||
|
for (int ti = 0; ti < count_test_block; ++ti) {
|
||||||
|
for (int ni = 0; ni < txfm_size_; ++ni) {
|
||||||
|
input[ni] = rnd.Rand8() - rnd.Rand8();
|
||||||
|
ref_input[ni] = static_cast<double>(input[ni]);
|
||||||
|
}
|
||||||
|
|
||||||
|
fwd_txfm_(input, output);
|
||||||
|
fwd_txfm_ref_(ref_input, ref_output, txfm_size_);
|
||||||
|
|
||||||
|
for (int ni = 0; ni < txfm_size_; ++ni) {
|
||||||
|
EXPECT_LE(
|
||||||
|
abs(output[ni] - static_cast<tran_low_t>(round(ref_output[ni]))),
|
||||||
|
max_error_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] input;
|
||||||
|
delete[] output;
|
||||||
|
delete[] ref_input;
|
||||||
|
delete[] ref_output;
|
||||||
|
}
|
||||||
|
|
||||||
|
double max_error_;
|
||||||
|
int txfm_size_;
|
||||||
|
IdctFunc fwd_txfm_;
|
||||||
|
IdctFuncRef fwd_txfm_ref_;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::tr1::tuple<IdctFunc, IdctFuncRef, int, int> IdctParam;
|
||||||
|
class Vp10InvTxfm
|
||||||
|
: public TransTestBase,
|
||||||
|
public ::testing::TestWithParam<IdctParam> {
|
||||||
|
public:
|
||||||
|
virtual void SetUp() {
|
||||||
|
fwd_txfm_ = GET_PARAM(0);
|
||||||
|
fwd_txfm_ref_ = GET_PARAM(1);
|
||||||
|
txfm_size_ = GET_PARAM(2);
|
||||||
|
max_error_ = GET_PARAM(3);
|
||||||
|
}
|
||||||
|
virtual void TearDown() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(Vp10InvTxfm, RunInvAccuracyCheck) {
|
||||||
|
RunInvAccuracyCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, Vp10InvTxfm,
|
||||||
|
::testing::Values(
|
||||||
|
IdctParam(&vp10_idct4_c, &reference_idct_1d, 4, 1),
|
||||||
|
IdctParam(&vp10_idct8_c, &reference_idct_1d, 8, 2),
|
||||||
|
IdctParam(&vp10_idct16_c, &reference_idct_1d, 16, 4),
|
||||||
|
IdctParam(&vp10_idct32_c, &reference_idct_1d, 32, 6))
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef void (*FwdTxfmFunc)(const int16_t *in, tran_low_t *out, int stride);
|
||||||
|
typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride);
|
||||||
|
typedef std::tr1::tuple<FwdTxfmFunc,
|
||||||
|
InvTxfmFunc,
|
||||||
|
InvTxfmFunc,
|
||||||
|
TX_SIZE, int> PartialInvTxfmParam;
|
||||||
|
const int kMaxNumCoeffs = 1024;
|
||||||
|
class Vp10PartialIDctTest
|
||||||
|
: public ::testing::TestWithParam<PartialInvTxfmParam> {
|
||||||
|
public:
|
||||||
|
virtual ~Vp10PartialIDctTest() {}
|
||||||
|
virtual void SetUp() {
|
||||||
|
ftxfm_ = GET_PARAM(0);
|
||||||
|
full_itxfm_ = GET_PARAM(1);
|
||||||
|
partial_itxfm_ = GET_PARAM(2);
|
||||||
|
tx_size_ = GET_PARAM(3);
|
||||||
|
last_nonzero_ = GET_PARAM(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int last_nonzero_;
|
||||||
|
TX_SIZE tx_size_;
|
||||||
|
FwdTxfmFunc ftxfm_;
|
||||||
|
InvTxfmFunc full_itxfm_;
|
||||||
|
InvTxfmFunc partial_itxfm_;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(Vp10PartialIDctTest, RunQuantCheck) {
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
int size;
|
||||||
|
switch (tx_size_) {
|
||||||
|
case TX_4X4:
|
||||||
|
size = 4;
|
||||||
|
break;
|
||||||
|
case TX_8X8:
|
||||||
|
size = 8;
|
||||||
|
break;
|
||||||
|
case TX_16X16:
|
||||||
|
size = 16;
|
||||||
|
break;
|
||||||
|
case TX_32X32:
|
||||||
|
size = 32;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
FAIL() << "Wrong Size!";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block1[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block2[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, dst1[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, dst2[kMaxNumCoeffs]);
|
||||||
|
|
||||||
|
const int count_test_block = 1000;
|
||||||
|
const int block_size = size * size;
|
||||||
|
|
||||||
|
DECLARE_ALIGNED(16, int16_t, input_extreme_block[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, output_ref_block[kMaxNumCoeffs]);
|
||||||
|
|
||||||
|
int max_error = 0;
|
||||||
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
|
// clear out destination buffer
|
||||||
|
memset(dst1, 0, sizeof(*dst1) * block_size);
|
||||||
|
memset(dst2, 0, sizeof(*dst2) * block_size);
|
||||||
|
memset(test_coef_block1, 0, sizeof(*test_coef_block1) * block_size);
|
||||||
|
memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size);
|
||||||
|
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
|
||||||
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
|
// Initialize a test block with input range [-255, 255].
|
||||||
|
if (i == 0) {
|
||||||
|
for (int j = 0; j < block_size; ++j)
|
||||||
|
input_extreme_block[j] = 255;
|
||||||
|
} else if (i == 1) {
|
||||||
|
for (int j = 0; j < block_size; ++j)
|
||||||
|
input_extreme_block[j] = -255;
|
||||||
|
} else {
|
||||||
|
for (int j = 0; j < block_size; ++j) {
|
||||||
|
input_extreme_block[j] = rnd.Rand8() % 2 ? 255 : -255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ftxfm_(input_extreme_block, output_ref_block, size);
|
||||||
|
|
||||||
|
// quantization with maximum allowed step sizes
|
||||||
|
test_coef_block1[0] = (output_ref_block[0] / 1336) * 1336;
|
||||||
|
for (int j = 1; j < last_nonzero_; ++j)
|
||||||
|
test_coef_block1[vp10_default_scan_orders[tx_size_].scan[j]]
|
||||||
|
= (output_ref_block[j] / 1828) * 1828;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASM_REGISTER_STATE_CHECK(full_itxfm_(test_coef_block1, dst1, size));
|
||||||
|
ASM_REGISTER_STATE_CHECK(partial_itxfm_(test_coef_block1, dst2, size));
|
||||||
|
|
||||||
|
for (int j = 0; j < block_size; ++j) {
|
||||||
|
const int diff = dst1[j] - dst2[j];
|
||||||
|
const int error = diff * diff;
|
||||||
|
if (max_error < error)
|
||||||
|
max_error = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPECT_EQ(0, max_error)
|
||||||
|
<< "Error: partial inverse transform produces different results";
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_P(Vp10PartialIDctTest, ResultsMatch) {
|
||||||
|
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||||
|
int size;
|
||||||
|
switch (tx_size_) {
|
||||||
|
case TX_4X4:
|
||||||
|
size = 4;
|
||||||
|
break;
|
||||||
|
case TX_8X8:
|
||||||
|
size = 8;
|
||||||
|
break;
|
||||||
|
case TX_16X16:
|
||||||
|
size = 16;
|
||||||
|
break;
|
||||||
|
case TX_32X32:
|
||||||
|
size = 32;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
FAIL() << "Wrong Size!";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block1[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, test_coef_block2[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, dst1[kMaxNumCoeffs]);
|
||||||
|
DECLARE_ALIGNED(16, uint8_t, dst2[kMaxNumCoeffs]);
|
||||||
|
const int count_test_block = 1000;
|
||||||
|
const int max_coeff = 32766 / 4;
|
||||||
|
const int block_size = size * size;
|
||||||
|
int max_error = 0;
|
||||||
|
for (int i = 0; i < count_test_block; ++i) {
|
||||||
|
// clear out destination buffer
|
||||||
|
memset(dst1, 0, sizeof(*dst1) * block_size);
|
||||||
|
memset(dst2, 0, sizeof(*dst2) * block_size);
|
||||||
|
memset(test_coef_block1, 0, sizeof(*test_coef_block1) * block_size);
|
||||||
|
memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size);
|
||||||
|
int max_energy_leftover = max_coeff * max_coeff;
|
||||||
|
for (int j = 0; j < last_nonzero_; ++j) {
|
||||||
|
int16_t coef = static_cast<int16_t>(sqrt(1.0 * max_energy_leftover) *
|
||||||
|
(rnd.Rand16() - 32768) / 65536);
|
||||||
|
max_energy_leftover -= coef * coef;
|
||||||
|
if (max_energy_leftover < 0) {
|
||||||
|
max_energy_leftover = 0;
|
||||||
|
coef = 0;
|
||||||
|
}
|
||||||
|
test_coef_block1[vp10_default_scan_orders[tx_size_].scan[j]] = coef;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(test_coef_block2, test_coef_block1,
|
||||||
|
sizeof(*test_coef_block2) * block_size);
|
||||||
|
|
||||||
|
ASM_REGISTER_STATE_CHECK(full_itxfm_(test_coef_block1, dst1, size));
|
||||||
|
ASM_REGISTER_STATE_CHECK(partial_itxfm_(test_coef_block2, dst2, size));
|
||||||
|
|
||||||
|
for (int j = 0; j < block_size; ++j) {
|
||||||
|
const int diff = dst1[j] - dst2[j];
|
||||||
|
const int error = diff * diff;
|
||||||
|
if (max_error < error)
|
||||||
|
max_error = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPECT_EQ(0, max_error)
|
||||||
|
<< "Error: partial inverse transform produces different results";
|
||||||
|
}
|
||||||
|
using std::tr1::make_tuple;
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
C, Vp10PartialIDctTest,
|
||||||
|
::testing::Values(
|
||||||
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
|
&vp10_idct32x32_1024_add_c,
|
||||||
|
&vp10_idct32x32_34_add_c,
|
||||||
|
TX_32X32, 34),
|
||||||
|
make_tuple(&vpx_fdct32x32_c,
|
||||||
|
&vp10_idct32x32_1024_add_c,
|
||||||
|
&vp10_idct32x32_1_add_c,
|
||||||
|
TX_32X32, 1),
|
||||||
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
|
&vp10_idct16x16_256_add_c,
|
||||||
|
&vp10_idct16x16_10_add_c,
|
||||||
|
TX_16X16, 10),
|
||||||
|
make_tuple(&vpx_fdct16x16_c,
|
||||||
|
&vp10_idct16x16_256_add_c,
|
||||||
|
&vp10_idct16x16_1_add_c,
|
||||||
|
TX_16X16, 1),
|
||||||
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
|
&vp10_idct8x8_64_add_c,
|
||||||
|
&vp10_idct8x8_12_add_c,
|
||||||
|
TX_8X8, 12),
|
||||||
|
make_tuple(&vpx_fdct8x8_c,
|
||||||
|
&vp10_idct8x8_64_add_c,
|
||||||
|
&vp10_idct8x8_1_add_c,
|
||||||
|
TX_8X8, 1),
|
||||||
|
make_tuple(&vpx_fdct4x4_c,
|
||||||
|
&vp10_idct4x4_16_add_c,
|
||||||
|
&vp10_idct4x4_1_add_c,
|
||||||
|
TX_4X4, 1)));
|
||||||
|
} // namespace
|
||||||
@@ -230,9 +230,23 @@ VP9_INSTANTIATE_TEST_CASE(
|
|||||||
::testing::ValuesIn(kEncodeVectors),
|
::testing::ValuesIn(kEncodeVectors),
|
||||||
::testing::ValuesIn(kMinArfVectors));
|
::testing::ValuesIn(kMinArfVectors));
|
||||||
|
|
||||||
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
# if CONFIG_VP10_ENCODER
|
||||||
|
// TODO(angiebird): 25-29 fail in high bitdepth mode.
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
DISABLED_VP10, ArfFreqTest,
|
||||||
|
::testing::Combine(
|
||||||
|
::testing::Values(static_cast<const libvpx_test::CodecFactory *>(
|
||||||
|
&libvpx_test::kVP10)),
|
||||||
|
::testing::ValuesIn(kTestVectors),
|
||||||
|
::testing::ValuesIn(kEncodeVectors),
|
||||||
|
::testing::ValuesIn(kMinArfVectors)));
|
||||||
|
# endif // CONFIG_VP10_ENCODER
|
||||||
|
#else
|
||||||
VP10_INSTANTIATE_TEST_CASE(
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
ArfFreqTest,
|
ArfFreqTest,
|
||||||
::testing::ValuesIn(kTestVectors),
|
::testing::ValuesIn(kTestVectors),
|
||||||
::testing::ValuesIn(kEncodeVectors),
|
::testing::ValuesIn(kEncodeVectors),
|
||||||
::testing::ValuesIn(kMinArfVectors));
|
::testing::ValuesIn(kMinArfVectors));
|
||||||
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
} // 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(kVP9EncodeParameterSet),
|
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
||||||
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
|
||||||
|
|
||||||
VP10_INSTANTIATE_TEST_CASE(
|
|
||||||
VpxEncoderParmsGetToDecoder,
|
|
||||||
::testing::ValuesIn(kVP9EncodeParameterSet),
|
|
||||||
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -187,9 +187,23 @@ VP9_INSTANTIATE_TEST_CASE(
|
|||||||
::testing::ValuesIn(kTestVectors),
|
::testing::ValuesIn(kTestVectors),
|
||||||
::testing::ValuesIn(kCpuUsedVectors));
|
::testing::ValuesIn(kCpuUsedVectors));
|
||||||
|
|
||||||
|
#if CONFIG_VP9_HIGHBITDEPTH
|
||||||
|
# if CONFIG_VP10_ENCODER
|
||||||
|
// TODO(angiebird): many fail in high bitdepth mode.
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
DISABLED_VP10, EndToEndTestLarge,
|
||||||
|
::testing::Combine(
|
||||||
|
::testing::Values(static_cast<const libvpx_test::CodecFactory *>(
|
||||||
|
&libvpx_test::kVP10)),
|
||||||
|
::testing::ValuesIn(kEncodingModeVectors),
|
||||||
|
::testing::ValuesIn(kTestVectors),
|
||||||
|
::testing::ValuesIn(kCpuUsedVectors)));
|
||||||
|
# endif // CONFIG_VP10_ENCODER
|
||||||
|
#else
|
||||||
VP10_INSTANTIATE_TEST_CASE(
|
VP10_INSTANTIATE_TEST_CASE(
|
||||||
EndToEndTestLarge,
|
EndToEndTestLarge,
|
||||||
::testing::ValuesIn(kEncodingModeVectors),
|
::testing::ValuesIn(kEncodingModeVectors),
|
||||||
::testing::ValuesIn(kTestVectors),
|
::testing::ValuesIn(kTestVectors),
|
||||||
::testing::ValuesIn(kCpuUsedVectors));
|
::testing::ValuesIn(kCpuUsedVectors));
|
||||||
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||||
} // 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);
|
::libvpx_test::MD5 md5_res;
|
||||||
if (res != VPX_CODEC_OK) {
|
md5_res.Add(&img);
|
||||||
abort_ = true;
|
md5_.push_back(md5_res.Get());
|
||||||
ASSERT_EQ(VPX_CODEC_OK, res);
|
}
|
||||||
}
|
|
||||||
const vpx_image_t *img = decoder_->GetDxData().Next();
|
|
||||||
|
|
||||||
if (img) {
|
virtual bool HandleDecodeResult(const vpx_codec_err_t res,
|
||||||
::libvpx_test::MD5 md5_res;
|
const libvpx_test::VideoSource& /*video*/,
|
||||||
md5_res.Add(img);
|
libvpx_test::Decoder * /*decoder*/) {
|
||||||
md5_.push_back(md5_res.Get());
|
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_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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_);
|
||||||
|
|||||||
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,8 +546,8 @@ 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())
|
||||||
return 0;
|
return 0;
|
||||||
@@ -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
@@ -5,16 +5,14 @@
|
|||||||
// tree. An additional intellectual property rights grant can be found
|
// tree. An additional intellectual property rights grant can be found
|
||||||
// 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 MKVPARSER_MKVPARSER_H_
|
||||||
|
#define MKVPARSER_MKVPARSER_H_
|
||||||
|
|
||||||
#ifndef MKVPARSER_HPP
|
|
||||||
#define MKVPARSER_HPP
|
|
||||||
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
namespace mkvparser {
|
namespace mkvparser {
|
||||||
|
|
||||||
|
const int E_PARSE_FAILED = -1;
|
||||||
const int E_FILE_FORMAT_INVALID = -2;
|
const int E_FILE_FORMAT_INVALID = -2;
|
||||||
const int E_BUFFER_NOT_FULL = -3;
|
const int E_BUFFER_NOT_FULL = -3;
|
||||||
|
|
||||||
@@ -27,8 +25,12 @@ class IMkvReader {
|
|||||||
virtual ~IMkvReader();
|
virtual ~IMkvReader();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename Type>
|
||||||
|
Type* SafeArrayAlloc(unsigned long long num_elements,
|
||||||
|
unsigned long long element_size);
|
||||||
long long GetUIntLength(IMkvReader*, long long, long&);
|
long long GetUIntLength(IMkvReader*, long long, long&);
|
||||||
long long ReadUInt(IMkvReader*, long long, long&);
|
long long ReadUInt(IMkvReader*, long long, long&);
|
||||||
|
long long ReadID(IMkvReader* pReader, long long pos, long& len);
|
||||||
long long UnserializeUInt(IMkvReader*, long long pos, long long size);
|
long long UnserializeUInt(IMkvReader*, long long pos, long long size);
|
||||||
|
|
||||||
long UnserializeFloat(IMkvReader*, long long pos, long long size, double&);
|
long UnserializeFloat(IMkvReader*, long long pos, long long size, double&);
|
||||||
@@ -124,7 +126,7 @@ class BlockEntry {
|
|||||||
public:
|
public:
|
||||||
virtual ~BlockEntry();
|
virtual ~BlockEntry();
|
||||||
|
|
||||||
bool EOS() const;
|
bool EOS() const { return (GetKind() == kBlockEOS); }
|
||||||
const Cluster* GetCluster() const;
|
const Cluster* GetCluster() const;
|
||||||
long GetIndex() const;
|
long GetIndex() const;
|
||||||
virtual const Block* GetBlock() const = 0;
|
virtual const Block* GetBlock() const = 0;
|
||||||
@@ -387,6 +389,90 @@ class Track {
|
|||||||
ContentEncoding** content_encoding_entries_end_;
|
ContentEncoding** content_encoding_entries_end_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct PrimaryChromaticity {
|
||||||
|
PrimaryChromaticity() : x(0), y(0) {}
|
||||||
|
~PrimaryChromaticity() {}
|
||||||
|
static bool Parse(IMkvReader* reader, long long read_pos,
|
||||||
|
long long value_size, bool is_x,
|
||||||
|
PrimaryChromaticity** chromaticity);
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct MasteringMetadata {
|
||||||
|
static const float kValueNotPresent;
|
||||||
|
|
||||||
|
MasteringMetadata()
|
||||||
|
: r(NULL),
|
||||||
|
g(NULL),
|
||||||
|
b(NULL),
|
||||||
|
white_point(NULL),
|
||||||
|
luminance_max(kValueNotPresent),
|
||||||
|
luminance_min(kValueNotPresent) {}
|
||||||
|
~MasteringMetadata() {
|
||||||
|
delete r;
|
||||||
|
delete g;
|
||||||
|
delete b;
|
||||||
|
delete white_point;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool Parse(IMkvReader* reader, long long element_start,
|
||||||
|
long long element_size,
|
||||||
|
MasteringMetadata** mastering_metadata);
|
||||||
|
|
||||||
|
PrimaryChromaticity* r;
|
||||||
|
PrimaryChromaticity* g;
|
||||||
|
PrimaryChromaticity* b;
|
||||||
|
PrimaryChromaticity* white_point;
|
||||||
|
float luminance_max;
|
||||||
|
float luminance_min;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Colour {
|
||||||
|
static const long long kValueNotPresent;
|
||||||
|
|
||||||
|
// Unless otherwise noted all values assigned upon construction are the
|
||||||
|
// equivalent of unspecified/default.
|
||||||
|
Colour()
|
||||||
|
: matrix_coefficients(kValueNotPresent),
|
||||||
|
bits_per_channel(kValueNotPresent),
|
||||||
|
chroma_subsampling_horz(kValueNotPresent),
|
||||||
|
chroma_subsampling_vert(kValueNotPresent),
|
||||||
|
cb_subsampling_horz(kValueNotPresent),
|
||||||
|
cb_subsampling_vert(kValueNotPresent),
|
||||||
|
chroma_siting_horz(kValueNotPresent),
|
||||||
|
chroma_siting_vert(kValueNotPresent),
|
||||||
|
range(kValueNotPresent),
|
||||||
|
transfer_characteristics(kValueNotPresent),
|
||||||
|
primaries(kValueNotPresent),
|
||||||
|
max_cll(kValueNotPresent),
|
||||||
|
max_fall(kValueNotPresent),
|
||||||
|
mastering_metadata(NULL) {}
|
||||||
|
~Colour() {
|
||||||
|
delete mastering_metadata;
|
||||||
|
mastering_metadata = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool Parse(IMkvReader* reader, long long element_start,
|
||||||
|
long long element_size, Colour** colour);
|
||||||
|
|
||||||
|
long long matrix_coefficients;
|
||||||
|
long long bits_per_channel;
|
||||||
|
long long chroma_subsampling_horz;
|
||||||
|
long long chroma_subsampling_vert;
|
||||||
|
long long cb_subsampling_horz;
|
||||||
|
long long cb_subsampling_vert;
|
||||||
|
long long chroma_siting_horz;
|
||||||
|
long long chroma_siting_vert;
|
||||||
|
long long range;
|
||||||
|
long long transfer_characteristics;
|
||||||
|
long long primaries;
|
||||||
|
long long max_cll;
|
||||||
|
long long max_fall;
|
||||||
|
|
||||||
|
MasteringMetadata* mastering_metadata;
|
||||||
|
};
|
||||||
|
|
||||||
class VideoTrack : public Track {
|
class VideoTrack : public Track {
|
||||||
VideoTrack(const VideoTrack&);
|
VideoTrack(const VideoTrack&);
|
||||||
VideoTrack& operator=(const VideoTrack&);
|
VideoTrack& operator=(const VideoTrack&);
|
||||||
@@ -394,6 +480,7 @@ class VideoTrack : public Track {
|
|||||||
VideoTrack(Segment*, long long element_start, long long element_size);
|
VideoTrack(Segment*, long long element_start, long long element_size);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
virtual ~VideoTrack();
|
||||||
static long Parse(Segment*, const Info&, long long element_start,
|
static long Parse(Segment*, const Info&, long long element_start,
|
||||||
long long element_size, VideoTrack*&);
|
long long element_size, VideoTrack*&);
|
||||||
|
|
||||||
@@ -408,6 +495,8 @@ class VideoTrack : public Track {
|
|||||||
bool VetEntry(const BlockEntry*) const;
|
bool VetEntry(const BlockEntry*) const;
|
||||||
long Seek(long long time_ns, const BlockEntry*&) const;
|
long Seek(long long time_ns, const BlockEntry*&) const;
|
||||||
|
|
||||||
|
Colour* GetColour() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
long long m_width;
|
long long m_width;
|
||||||
long long m_height;
|
long long m_height;
|
||||||
@@ -417,6 +506,8 @@ class VideoTrack : public Track {
|
|||||||
long long m_stereo_mode;
|
long long m_stereo_mode;
|
||||||
|
|
||||||
double m_rate;
|
double m_rate;
|
||||||
|
|
||||||
|
Colour* m_colour;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AudioTrack : public Track {
|
class AudioTrack : public Track {
|
||||||
@@ -833,7 +924,7 @@ class Cues {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool Init() const;
|
bool Init() const;
|
||||||
void PreloadCuePoint(long&, long long) const;
|
bool PreloadCuePoint(long&, long long) const;
|
||||||
|
|
||||||
mutable CuePoint** m_cue_points;
|
mutable CuePoint** m_cue_points;
|
||||||
mutable long m_count;
|
mutable long m_count;
|
||||||
@@ -999,8 +1090,8 @@ class Segment {
|
|||||||
long DoLoadClusterUnknownSize(long long&, long&);
|
long DoLoadClusterUnknownSize(long long&, long&);
|
||||||
long DoParseNext(const Cluster*&, long long&, long&);
|
long DoParseNext(const Cluster*&, long long&, long&);
|
||||||
|
|
||||||
void AppendCluster(Cluster*);
|
bool AppendCluster(Cluster*);
|
||||||
void PreloadCluster(Cluster*, ptrdiff_t);
|
bool PreloadCluster(Cluster*, ptrdiff_t);
|
||||||
|
|
||||||
// void ParseSeekHead(long long pos, long long size);
|
// void ParseSeekHead(long long pos, long long size);
|
||||||
// void ParseSeekEntry(long long pos, long long size);
|
// void ParseSeekEntry(long long pos, long long size);
|
||||||
@@ -1009,7 +1100,7 @@ class Segment {
|
|||||||
const BlockEntry* GetBlock(const CuePoint&, const CuePoint::TrackPosition&);
|
const BlockEntry* GetBlock(const CuePoint&, const CuePoint::TrackPosition&);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace mkvparser
|
} // namespace mkvparser
|
||||||
|
|
||||||
inline long mkvparser::Segment::LoadCluster() {
|
inline long mkvparser::Segment::LoadCluster() {
|
||||||
long long pos;
|
long long pos;
|
||||||
@@ -1018,4 +1109,4 @@ inline long mkvparser::Segment::LoadCluster() {
|
|||||||
return LoadCluster(pos, size);
|
return LoadCluster(pos, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // MKVPARSER_HPP
|
#endif // MKVPARSER_MKVPARSER_H_
|
||||||
@@ -5,8 +5,7 @@
|
|||||||
// tree. An additional intellectual property rights grant can be found
|
// tree. An additional intellectual property rights grant can be found
|
||||||
// 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 "mkvparser/mkvreader.h"
|
||||||
#include "mkvreader.hpp"
|
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
@@ -129,4 +128,4 @@ int MkvReader::Read(long long offset, long len, unsigned char* buffer) {
|
|||||||
return 0; // success
|
return 0; // success
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace mkvparser
|
} // namespace mkvparser
|
||||||
@@ -5,13 +5,13 @@
|
|||||||
// tree. An additional intellectual property rights grant can be found
|
// tree. An additional intellectual property rights grant can be found
|
||||||
// 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 MKVPARSER_MKVREADER_H_
|
||||||
|
#define MKVPARSER_MKVREADER_H_
|
||||||
|
|
||||||
#ifndef MKVREADER_HPP
|
|
||||||
#define MKVREADER_HPP
|
|
||||||
|
|
||||||
#include "mkvparser.hpp"
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
|
#include "mkvparser/mkvparser.h"
|
||||||
|
|
||||||
namespace mkvparser {
|
namespace mkvparser {
|
||||||
|
|
||||||
class MkvReader : public IMkvReader {
|
class MkvReader : public IMkvReader {
|
||||||
@@ -40,6 +40,6 @@ class MkvReader : public IMkvReader {
|
|||||||
bool reader_owns_file_;
|
bool reader_owns_file_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace mkvparser
|
} // namespace mkvparser
|
||||||
|
|
||||||
#endif // MKVREADER_HPP
|
#endif // MKVPARSER_MKVREADER_H_
|
||||||
8
third_party/x86inc/README.libvpx
vendored
8
third_party/x86inc/README.libvpx
vendored
@@ -1,5 +1,5 @@
|
|||||||
URL: http://git.videolan.org/?p=x264.git
|
URL: https://git.videolan.org/git/x264.git
|
||||||
Version: a95584945dd9ce3acc66c6cd8f6796bc4404d40d
|
Version: d23d18655249944c1ca894b451e2c82c7a584c62
|
||||||
License: ISC
|
License: ISC
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
@@ -13,12 +13,8 @@ Prefix functions with vpx by default.
|
|||||||
Manage name mangling (prefixing with '_') manually because 'PREFIX' does not
|
Manage name mangling (prefixing with '_') manually because 'PREFIX' does not
|
||||||
exist in libvpx.
|
exist in libvpx.
|
||||||
Expand PIC default to macho64 and respect CONFIG_PIC from libvpx
|
Expand PIC default to macho64 and respect CONFIG_PIC from libvpx
|
||||||
Catch all elf formats for 'hidden' status and SECTION notes.
|
|
||||||
Avoid 'amdnop' when building with nasm.
|
|
||||||
Set 'private_extern' visibility for macho targets.
|
Set 'private_extern' visibility for macho targets.
|
||||||
Copy PIC 'GLOBAL' macros from x86_abi_support.asm
|
Copy PIC 'GLOBAL' macros from x86_abi_support.asm
|
||||||
Use .text instead of .rodata on macho to avoid broken tables in PIC mode.
|
Use .text instead of .rodata on macho to avoid broken tables in PIC mode.
|
||||||
Use .text with no alignment for aout
|
Use .text with no alignment for aout
|
||||||
Only use 'hidden' visibility with Chromium
|
Only use 'hidden' visibility with Chromium
|
||||||
Move '%use smartalign' for nasm out of 'INIT_CPUFLAGS' and before
|
|
||||||
'ALIGNMODE'.
|
|
||||||
|
|||||||
394
third_party/x86inc/x86inc.asm
vendored
394
third_party/x86inc/x86inc.asm
vendored
@@ -1,7 +1,7 @@
|
|||||||
;*****************************************************************************
|
;*****************************************************************************
|
||||||
;* x86inc.asm: x264asm abstraction layer
|
;* x86inc.asm: x264asm abstraction layer
|
||||||
;*****************************************************************************
|
;*****************************************************************************
|
||||||
;* Copyright (C) 2005-2015 x264 project
|
;* Copyright (C) 2005-2016 x264 project
|
||||||
;*
|
;*
|
||||||
;* Authors: Loren Merritt <lorenm@u.washington.edu>
|
;* Authors: Loren Merritt <lorenm@u.washington.edu>
|
||||||
;* Anton Mitrofanov <BugMaster@narod.ru>
|
;* Anton Mitrofanov <BugMaster@narod.ru>
|
||||||
@@ -66,16 +66,35 @@
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifidn __OUTPUT_FORMAT__,elf32
|
%define FORMAT_ELF 0
|
||||||
%define mangle(x) x
|
%ifidn __OUTPUT_FORMAT__,elf
|
||||||
|
%define FORMAT_ELF 1
|
||||||
|
%elifidn __OUTPUT_FORMAT__,elf32
|
||||||
|
%define FORMAT_ELF 1
|
||||||
%elifidn __OUTPUT_FORMAT__,elf64
|
%elifidn __OUTPUT_FORMAT__,elf64
|
||||||
%define mangle(x) x
|
%define FORMAT_ELF 1
|
||||||
%elifidn __OUTPUT_FORMAT__,x64
|
%endif
|
||||||
%define mangle(x) x
|
|
||||||
%elifidn __OUTPUT_FORMAT__,win64
|
%define FORMAT_MACHO 0
|
||||||
%define mangle(x) x
|
%ifidn __OUTPUT_FORMAT__,macho32
|
||||||
|
%define FORMAT_MACHO 1
|
||||||
|
%elifidn __OUTPUT_FORMAT__,macho64
|
||||||
|
%define FORMAT_MACHO 1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
; Set PREFIX for libvpx builds.
|
||||||
|
%if FORMAT_ELF
|
||||||
|
%undef PREFIX
|
||||||
|
%elif WIN64
|
||||||
|
%undef PREFIX
|
||||||
%else
|
%else
|
||||||
|
%define PREFIX
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifdef PREFIX
|
||||||
%define mangle(x) _ %+ x
|
%define mangle(x) _ %+ x
|
||||||
|
%else
|
||||||
|
%define mangle(x) x
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
; In some instances macho32 tables get misaligned when using .rodata.
|
; In some instances macho32 tables get misaligned when using .rodata.
|
||||||
@@ -94,14 +113,6 @@
|
|||||||
%endif
|
%endif
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SECTION_TEXT 0-1 16
|
|
||||||
%ifidn __OUTPUT_FORMAT__,aout
|
|
||||||
SECTION .text
|
|
||||||
%else
|
|
||||||
SECTION .text align=%1
|
|
||||||
%endif
|
|
||||||
%endmacro
|
|
||||||
|
|
||||||
; PIC macros are copied from vpx_ports/x86_abi_support.asm. The "define PIC"
|
; PIC macros are copied from vpx_ports/x86_abi_support.asm. The "define PIC"
|
||||||
; from original code is added in for 64bit.
|
; from original code is added in for 64bit.
|
||||||
%ifidn __OUTPUT_FORMAT__,elf32
|
%ifidn __OUTPUT_FORMAT__,elf32
|
||||||
@@ -119,7 +130,7 @@
|
|||||||
%if ABI_IS_32BIT
|
%if ABI_IS_32BIT
|
||||||
%if CONFIG_PIC=1
|
%if CONFIG_PIC=1
|
||||||
%ifidn __OUTPUT_FORMAT__,elf32
|
%ifidn __OUTPUT_FORMAT__,elf32
|
||||||
%define GET_GOT_SAVE_ARG 1
|
%define GET_GOT_DEFINED 1
|
||||||
%define WRT_PLT wrt ..plt
|
%define WRT_PLT wrt ..plt
|
||||||
%macro GET_GOT 1
|
%macro GET_GOT 1
|
||||||
extern _GLOBAL_OFFSET_TABLE_
|
extern _GLOBAL_OFFSET_TABLE_
|
||||||
@@ -138,7 +149,7 @@
|
|||||||
%define RESTORE_GOT pop %1
|
%define RESTORE_GOT pop %1
|
||||||
%endmacro
|
%endmacro
|
||||||
%elifidn __OUTPUT_FORMAT__,macho32
|
%elifidn __OUTPUT_FORMAT__,macho32
|
||||||
%define GET_GOT_SAVE_ARG 1
|
%define GET_GOT_DEFINED 1
|
||||||
%macro GET_GOT 1
|
%macro GET_GOT 1
|
||||||
push %1
|
push %1
|
||||||
call %%get_got
|
call %%get_got
|
||||||
@@ -149,6 +160,8 @@
|
|||||||
%undef RESTORE_GOT
|
%undef RESTORE_GOT
|
||||||
%define RESTORE_GOT pop %1
|
%define RESTORE_GOT pop %1
|
||||||
%endmacro
|
%endmacro
|
||||||
|
%else
|
||||||
|
%define GET_GOT_DEFINED 0
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@@ -186,8 +199,16 @@
|
|||||||
%ifdef PIC
|
%ifdef PIC
|
||||||
default rel
|
default rel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%ifndef GET_GOT_DEFINED
|
||||||
|
%define GET_GOT_DEFINED 0
|
||||||
|
%endif
|
||||||
; Done with PIC macros
|
; Done with PIC macros
|
||||||
|
|
||||||
|
%ifdef __NASM_VER__
|
||||||
|
%use smartalign
|
||||||
|
%endif
|
||||||
|
|
||||||
; Macros to eliminate most code duplication between x86_32 and x86_64:
|
; Macros to eliminate most code duplication between x86_32 and x86_64:
|
||||||
; Currently this works only for leaf functions which load all their arguments
|
; Currently this works only for leaf functions which load all their arguments
|
||||||
; into registers at the start, and make no other use of the stack. Luckily that
|
; into registers at the start, and make no other use of the stack. Luckily that
|
||||||
@@ -235,6 +256,7 @@
|
|||||||
%define r%1w %2w
|
%define r%1w %2w
|
||||||
%define r%1b %2b
|
%define r%1b %2b
|
||||||
%define r%1h %2h
|
%define r%1h %2h
|
||||||
|
%define %2q %2
|
||||||
%if %0 == 2
|
%if %0 == 2
|
||||||
%define r%1m %2d
|
%define r%1m %2d
|
||||||
%define r%1mp %2
|
%define r%1mp %2
|
||||||
@@ -259,9 +281,9 @@
|
|||||||
%define e%1h %3
|
%define e%1h %3
|
||||||
%define r%1b %2
|
%define r%1b %2
|
||||||
%define e%1b %2
|
%define e%1b %2
|
||||||
%if ARCH_X86_64 == 0
|
%if ARCH_X86_64 == 0
|
||||||
%define r%1 e%1
|
%define r%1 e%1
|
||||||
%endif
|
%endif
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
DECLARE_REG_SIZE ax, al, ah
|
DECLARE_REG_SIZE ax, al, ah
|
||||||
@@ -371,7 +393,7 @@ DECLARE_REG_TMP_SIZE 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
|
|||||||
|
|
||||||
%macro ASSERT 1
|
%macro ASSERT 1
|
||||||
%if (%1) == 0
|
%if (%1) == 0
|
||||||
%error assert failed
|
%error assertion ``%1'' failed
|
||||||
%endif
|
%endif
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
@@ -462,8 +484,10 @@ DECLARE_REG_TMP_SIZE 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
|
|||||||
%if %1 != 0 && required_stack_alignment > STACK_ALIGNMENT
|
%if %1 != 0 && required_stack_alignment > STACK_ALIGNMENT
|
||||||
%if %1 > 0
|
%if %1 > 0
|
||||||
%assign regs_used (regs_used + 1)
|
%assign regs_used (regs_used + 1)
|
||||||
%elif ARCH_X86_64 && regs_used == num_args && num_args <= 4 + UNIX64 * 2
|
%endif
|
||||||
%warning "Stack pointer will overwrite register argument"
|
%if ARCH_X86_64 && regs_used < 5 + UNIX64 * 3
|
||||||
|
; Ensure that we don't clobber any registers containing arguments
|
||||||
|
%assign regs_used 5 + UNIX64 * 3
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@@ -577,9 +601,9 @@ DECLARE_REG 14, R15, 120
|
|||||||
%macro RET 0
|
%macro RET 0
|
||||||
WIN64_RESTORE_XMM_INTERNAL rsp
|
WIN64_RESTORE_XMM_INTERNAL rsp
|
||||||
POP_IF_USED 14, 13, 12, 11, 10, 9, 8, 7
|
POP_IF_USED 14, 13, 12, 11, 10, 9, 8, 7
|
||||||
%if mmsize == 32
|
%if mmsize == 32
|
||||||
vzeroupper
|
vzeroupper
|
||||||
%endif
|
%endif
|
||||||
AUTO_REP_RET
|
AUTO_REP_RET
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
@@ -616,17 +640,17 @@ DECLARE_REG 14, R15, 72
|
|||||||
%define has_epilogue regs_used > 9 || mmsize == 32 || stack_size > 0
|
%define has_epilogue regs_used > 9 || mmsize == 32 || stack_size > 0
|
||||||
|
|
||||||
%macro RET 0
|
%macro RET 0
|
||||||
%if stack_size_padded > 0
|
%if stack_size_padded > 0
|
||||||
%if required_stack_alignment > STACK_ALIGNMENT
|
%if required_stack_alignment > STACK_ALIGNMENT
|
||||||
mov rsp, rstkm
|
mov rsp, rstkm
|
||||||
%else
|
%else
|
||||||
add rsp, stack_size_padded
|
add rsp, stack_size_padded
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
POP_IF_USED 14, 13, 12, 11, 10, 9
|
POP_IF_USED 14, 13, 12, 11, 10, 9
|
||||||
%if mmsize == 32
|
%if mmsize == 32
|
||||||
vzeroupper
|
vzeroupper
|
||||||
%endif
|
%endif
|
||||||
AUTO_REP_RET
|
AUTO_REP_RET
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
@@ -672,29 +696,29 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
|
|||||||
%define has_epilogue regs_used > 3 || mmsize == 32 || stack_size > 0
|
%define has_epilogue regs_used > 3 || mmsize == 32 || stack_size > 0
|
||||||
|
|
||||||
%macro RET 0
|
%macro RET 0
|
||||||
%if stack_size_padded > 0
|
%if stack_size_padded > 0
|
||||||
%if required_stack_alignment > STACK_ALIGNMENT
|
%if required_stack_alignment > STACK_ALIGNMENT
|
||||||
mov rsp, rstkm
|
mov rsp, rstkm
|
||||||
%else
|
%else
|
||||||
add rsp, stack_size_padded
|
add rsp, stack_size_padded
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
POP_IF_USED 6, 5, 4, 3
|
POP_IF_USED 6, 5, 4, 3
|
||||||
%if mmsize == 32
|
%if mmsize == 32
|
||||||
vzeroupper
|
vzeroupper
|
||||||
%endif
|
%endif
|
||||||
AUTO_REP_RET
|
AUTO_REP_RET
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%endif ;======================================================================
|
%endif ;======================================================================
|
||||||
|
|
||||||
%if WIN64 == 0
|
%if WIN64 == 0
|
||||||
%macro WIN64_SPILL_XMM 1
|
%macro WIN64_SPILL_XMM 1
|
||||||
%endmacro
|
%endmacro
|
||||||
%macro WIN64_RESTORE_XMM 1
|
%macro WIN64_RESTORE_XMM 1
|
||||||
%endmacro
|
%endmacro
|
||||||
%macro WIN64_PUSH_XMM 0
|
%macro WIN64_PUSH_XMM 0
|
||||||
%endmacro
|
%endmacro
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
; On AMD cpus <=K10, an ordinary ret is slow if it immediately follows either
|
; On AMD cpus <=K10, an ordinary ret is slow if it immediately follows either
|
||||||
@@ -707,24 +731,26 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
|
|||||||
%else
|
%else
|
||||||
rep ret
|
rep ret
|
||||||
%endif
|
%endif
|
||||||
|
annotate_function_size
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%define last_branch_adr $$
|
%define last_branch_adr $$
|
||||||
%macro AUTO_REP_RET 0
|
%macro AUTO_REP_RET 0
|
||||||
%ifndef cpuflags
|
%if notcpuflag(ssse3)
|
||||||
times ((last_branch_adr-$)>>31)+1 rep ; times 1 iff $ != last_branch_adr.
|
times ((last_branch_adr-$)>>31)+1 rep ; times 1 iff $ == last_branch_adr.
|
||||||
%elif notcpuflag(ssse3)
|
|
||||||
times ((last_branch_adr-$)>>31)+1 rep
|
|
||||||
%endif
|
%endif
|
||||||
ret
|
ret
|
||||||
|
annotate_function_size
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro BRANCH_INSTR 0-*
|
%macro BRANCH_INSTR 0-*
|
||||||
%rep %0
|
%rep %0
|
||||||
%macro %1 1-2 %1
|
%macro %1 1-2 %1
|
||||||
%2 %1
|
%2 %1
|
||||||
%%branch_instr:
|
%if notcpuflag(ssse3)
|
||||||
%xdefine last_branch_adr %%branch_instr
|
%%branch_instr equ $
|
||||||
|
%xdefine last_branch_adr %%branch_instr
|
||||||
|
%endif
|
||||||
%endmacro
|
%endmacro
|
||||||
%rotate 1
|
%rotate 1
|
||||||
%endrep
|
%endrep
|
||||||
@@ -739,6 +765,7 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
|
|||||||
%elif %2
|
%elif %2
|
||||||
jmp %1
|
jmp %1
|
||||||
%endif
|
%endif
|
||||||
|
annotate_function_size
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
;=============================================================================
|
;=============================================================================
|
||||||
@@ -760,6 +787,7 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
|
|||||||
cglobal_internal 0, %1 %+ SUFFIX, %2
|
cglobal_internal 0, %1 %+ SUFFIX, %2
|
||||||
%endmacro
|
%endmacro
|
||||||
%macro cglobal_internal 2-3+
|
%macro cglobal_internal 2-3+
|
||||||
|
annotate_function_size
|
||||||
%if %1
|
%if %1
|
||||||
%xdefine %%FUNCTION_PREFIX private_prefix
|
%xdefine %%FUNCTION_PREFIX private_prefix
|
||||||
; libvpx explicitly sets visibility in shared object builds. Avoid
|
; libvpx explicitly sets visibility in shared object builds. Avoid
|
||||||
@@ -780,17 +808,10 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
|
|||||||
CAT_XDEFINE cglobaled_, %2, 1
|
CAT_XDEFINE cglobaled_, %2, 1
|
||||||
%endif
|
%endif
|
||||||
%xdefine current_function %2
|
%xdefine current_function %2
|
||||||
%ifidn __OUTPUT_FORMAT__,elf32
|
%xdefine current_function_section __SECT__
|
||||||
|
%if FORMAT_ELF
|
||||||
global %2:function %%VISIBILITY
|
global %2:function %%VISIBILITY
|
||||||
%elifidn __OUTPUT_FORMAT__,elf64
|
%elif FORMAT_MACHO
|
||||||
global %2:function %%VISIBILITY
|
|
||||||
%elifidn __OUTPUT_FORMAT__,macho32
|
|
||||||
%ifdef __NASM_VER__
|
|
||||||
global %2
|
|
||||||
%else
|
|
||||||
global %2:private_extern
|
|
||||||
%endif
|
|
||||||
%elifidn __OUTPUT_FORMAT__,macho64
|
|
||||||
%ifdef __NASM_VER__
|
%ifdef __NASM_VER__
|
||||||
global %2
|
global %2
|
||||||
%else
|
%else
|
||||||
@@ -820,16 +841,16 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
|
|||||||
|
|
||||||
; like cextern, but without the prefix
|
; like cextern, but without the prefix
|
||||||
%macro cextern_naked 1
|
%macro cextern_naked 1
|
||||||
%xdefine %1 mangle(%1)
|
%ifdef PREFIX
|
||||||
|
%xdefine %1 mangle(%1)
|
||||||
|
%endif
|
||||||
CAT_XDEFINE cglobaled_, %1, 1
|
CAT_XDEFINE cglobaled_, %1, 1
|
||||||
extern %1
|
extern %1
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro const 1-2+
|
%macro const 1-2+
|
||||||
%xdefine %1 mangle(private_prefix %+ _ %+ %1)
|
%xdefine %1 mangle(private_prefix %+ _ %+ %1)
|
||||||
%ifidn __OUTPUT_FORMAT__,elf32
|
%if FORMAT_ELF
|
||||||
global %1:data hidden
|
|
||||||
%elifidn __OUTPUT_FORMAT__,elf64
|
|
||||||
global %1:data hidden
|
global %1:data hidden
|
||||||
%else
|
%else
|
||||||
global %1
|
global %1
|
||||||
@@ -837,14 +858,29 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
|
|||||||
%1: %2
|
%1: %2
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; This is needed for ELF, otherwise the GNU linker assumes the stack is
|
; This is needed for ELF, otherwise the GNU linker assumes the stack is executable by default.
|
||||||
; executable by default.
|
%if FORMAT_ELF
|
||||||
%ifidn __OUTPUT_FORMAT__,elf32
|
[SECTION .note.GNU-stack noalloc noexec nowrite progbits]
|
||||||
SECTION .note.GNU-stack noalloc noexec nowrite progbits
|
|
||||||
%elifidn __OUTPUT_FORMAT__,elf64
|
|
||||||
SECTION .note.GNU-stack noalloc noexec nowrite progbits
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
; Tell debuggers how large the function was.
|
||||||
|
; This may be invoked multiple times per function; we rely on later instances overriding earlier ones.
|
||||||
|
; This is invoked by RET and similar macros, and also cglobal does it for the previous function,
|
||||||
|
; but if the last function in a source file doesn't use any of the standard macros for its epilogue,
|
||||||
|
; then its size might be unspecified.
|
||||||
|
%macro annotate_function_size 0
|
||||||
|
%ifdef __YASM_VER__
|
||||||
|
%ifdef current_function
|
||||||
|
%if FORMAT_ELF
|
||||||
|
current_function_section
|
||||||
|
%%ecf equ $
|
||||||
|
size current_function %%ecf - current_function
|
||||||
|
__SECT__
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
%endmacro
|
||||||
|
|
||||||
; cpuflags
|
; cpuflags
|
||||||
|
|
||||||
%assign cpuflags_mmx (1<<0)
|
%assign cpuflags_mmx (1<<0)
|
||||||
@@ -873,12 +909,9 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
|
|||||||
%assign cpuflags_bmi1 (1<<22)|cpuflags_lzcnt
|
%assign cpuflags_bmi1 (1<<22)|cpuflags_lzcnt
|
||||||
%assign cpuflags_bmi2 (1<<23)|cpuflags_bmi1
|
%assign cpuflags_bmi2 (1<<23)|cpuflags_bmi1
|
||||||
|
|
||||||
%define cpuflag(x) ((cpuflags & (cpuflags_ %+ x)) == (cpuflags_ %+ x))
|
; Returns a boolean value expressing whether or not the specified cpuflag is enabled.
|
||||||
%define notcpuflag(x) ((cpuflags & (cpuflags_ %+ x)) != (cpuflags_ %+ x))
|
%define cpuflag(x) (((((cpuflags & (cpuflags_ %+ x)) ^ (cpuflags_ %+ x)) - 1) >> 31) & 1)
|
||||||
|
%define notcpuflag(x) (cpuflag(x) ^ 1)
|
||||||
%ifdef __NASM_VER__
|
|
||||||
%use smartalign
|
|
||||||
%endif
|
|
||||||
|
|
||||||
; Takes an arbitrary number of cpuflags from the above list.
|
; Takes an arbitrary number of cpuflags from the above list.
|
||||||
; All subsequent functions (up to the next INIT_CPUFLAGS) is built for the specified cpu.
|
; All subsequent functions (up to the next INIT_CPUFLAGS) is built for the specified cpu.
|
||||||
@@ -915,12 +948,18 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifdef __NASM_VER__
|
%if ARCH_X86_64 || cpuflag(sse2)
|
||||||
ALIGNMODE k7
|
%ifdef __NASM_VER__
|
||||||
%elif ARCH_X86_64 || cpuflag(sse2)
|
ALIGNMODE k8
|
||||||
CPU amdnop
|
%else
|
||||||
|
CPU amdnop
|
||||||
|
%endif
|
||||||
%else
|
%else
|
||||||
CPU basicnop
|
%ifdef __NASM_VER__
|
||||||
|
ALIGNMODE nop
|
||||||
|
%else
|
||||||
|
CPU basicnop
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
@@ -949,14 +988,14 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
|
|||||||
%define movnta movntq
|
%define movnta movntq
|
||||||
%assign %%i 0
|
%assign %%i 0
|
||||||
%rep 8
|
%rep 8
|
||||||
CAT_XDEFINE m, %%i, mm %+ %%i
|
CAT_XDEFINE m, %%i, mm %+ %%i
|
||||||
CAT_XDEFINE nnmm, %%i, %%i
|
CAT_XDEFINE nnmm, %%i, %%i
|
||||||
%assign %%i %%i+1
|
%assign %%i %%i+1
|
||||||
%endrep
|
%endrep
|
||||||
%rep 8
|
%rep 8
|
||||||
CAT_UNDEF m, %%i
|
CAT_UNDEF m, %%i
|
||||||
CAT_UNDEF nnmm, %%i
|
CAT_UNDEF nnmm, %%i
|
||||||
%assign %%i %%i+1
|
%assign %%i %%i+1
|
||||||
%endrep
|
%endrep
|
||||||
INIT_CPUFLAGS %1
|
INIT_CPUFLAGS %1
|
||||||
%endmacro
|
%endmacro
|
||||||
@@ -967,7 +1006,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
|
|||||||
%define mmsize 16
|
%define mmsize 16
|
||||||
%define num_mmregs 8
|
%define num_mmregs 8
|
||||||
%if ARCH_X86_64
|
%if ARCH_X86_64
|
||||||
%define num_mmregs 16
|
%define num_mmregs 16
|
||||||
%endif
|
%endif
|
||||||
%define mova movdqa
|
%define mova movdqa
|
||||||
%define movu movdqu
|
%define movu movdqu
|
||||||
@@ -975,9 +1014,9 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
|
|||||||
%define movnta movntdq
|
%define movnta movntdq
|
||||||
%assign %%i 0
|
%assign %%i 0
|
||||||
%rep num_mmregs
|
%rep num_mmregs
|
||||||
CAT_XDEFINE m, %%i, xmm %+ %%i
|
CAT_XDEFINE m, %%i, xmm %+ %%i
|
||||||
CAT_XDEFINE nnxmm, %%i, %%i
|
CAT_XDEFINE nnxmm, %%i, %%i
|
||||||
%assign %%i %%i+1
|
%assign %%i %%i+1
|
||||||
%endrep
|
%endrep
|
||||||
INIT_CPUFLAGS %1
|
INIT_CPUFLAGS %1
|
||||||
%endmacro
|
%endmacro
|
||||||
@@ -988,7 +1027,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
|
|||||||
%define mmsize 32
|
%define mmsize 32
|
||||||
%define num_mmregs 8
|
%define num_mmregs 8
|
||||||
%if ARCH_X86_64
|
%if ARCH_X86_64
|
||||||
%define num_mmregs 16
|
%define num_mmregs 16
|
||||||
%endif
|
%endif
|
||||||
%define mova movdqa
|
%define mova movdqa
|
||||||
%define movu movdqu
|
%define movu movdqu
|
||||||
@@ -996,9 +1035,9 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
|
|||||||
%define movnta movntdq
|
%define movnta movntdq
|
||||||
%assign %%i 0
|
%assign %%i 0
|
||||||
%rep num_mmregs
|
%rep num_mmregs
|
||||||
CAT_XDEFINE m, %%i, ymm %+ %%i
|
CAT_XDEFINE m, %%i, ymm %+ %%i
|
||||||
CAT_XDEFINE nnymm, %%i, %%i
|
CAT_XDEFINE nnymm, %%i, %%i
|
||||||
%assign %%i %%i+1
|
%assign %%i %%i+1
|
||||||
%endrep
|
%endrep
|
||||||
INIT_CPUFLAGS %1
|
INIT_CPUFLAGS %1
|
||||||
%endmacro
|
%endmacro
|
||||||
@@ -1022,7 +1061,7 @@ INIT_XMM
|
|||||||
%assign i 0
|
%assign i 0
|
||||||
%rep 16
|
%rep 16
|
||||||
DECLARE_MMCAST i
|
DECLARE_MMCAST i
|
||||||
%assign i i+1
|
%assign i i+1
|
||||||
%endrep
|
%endrep
|
||||||
|
|
||||||
; I often want to use macros that permute their arguments. e.g. there's no
|
; I often want to use macros that permute their arguments. e.g. there's no
|
||||||
@@ -1040,23 +1079,23 @@ INIT_XMM
|
|||||||
; doesn't cost any cycles.
|
; doesn't cost any cycles.
|
||||||
|
|
||||||
%macro PERMUTE 2-* ; takes a list of pairs to swap
|
%macro PERMUTE 2-* ; takes a list of pairs to swap
|
||||||
%rep %0/2
|
%rep %0/2
|
||||||
%xdefine %%tmp%2 m%2
|
%xdefine %%tmp%2 m%2
|
||||||
%rotate 2
|
%rotate 2
|
||||||
%endrep
|
%endrep
|
||||||
%rep %0/2
|
%rep %0/2
|
||||||
%xdefine m%1 %%tmp%2
|
%xdefine m%1 %%tmp%2
|
||||||
CAT_XDEFINE nn, m%1, %1
|
CAT_XDEFINE nn, m%1, %1
|
||||||
%rotate 2
|
%rotate 2
|
||||||
%endrep
|
%endrep
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SWAP 2+ ; swaps a single chain (sometimes more concise than pairs)
|
%macro SWAP 2+ ; swaps a single chain (sometimes more concise than pairs)
|
||||||
%ifnum %1 ; SWAP 0, 1, ...
|
%ifnum %1 ; SWAP 0, 1, ...
|
||||||
SWAP_INTERNAL_NUM %1, %2
|
SWAP_INTERNAL_NUM %1, %2
|
||||||
%else ; SWAP m0, m1, ...
|
%else ; SWAP m0, m1, ...
|
||||||
SWAP_INTERNAL_NAME %1, %2
|
SWAP_INTERNAL_NAME %1, %2
|
||||||
%endif
|
%endif
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SWAP_INTERNAL_NUM 2-*
|
%macro SWAP_INTERNAL_NUM 2-*
|
||||||
@@ -1066,7 +1105,7 @@ INIT_XMM
|
|||||||
%xdefine m%2 %%tmp
|
%xdefine m%2 %%tmp
|
||||||
CAT_XDEFINE nn, m%1, %1
|
CAT_XDEFINE nn, m%1, %1
|
||||||
CAT_XDEFINE nn, m%2, %2
|
CAT_XDEFINE nn, m%2, %2
|
||||||
%rotate 1
|
%rotate 1
|
||||||
%endrep
|
%endrep
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
@@ -1074,7 +1113,7 @@ INIT_XMM
|
|||||||
%xdefine %%args nn %+ %1
|
%xdefine %%args nn %+ %1
|
||||||
%rep %0-1
|
%rep %0-1
|
||||||
%xdefine %%args %%args, nn %+ %2
|
%xdefine %%args %%args, nn %+ %2
|
||||||
%rotate 1
|
%rotate 1
|
||||||
%endrep
|
%endrep
|
||||||
SWAP_INTERNAL_NUM %%args
|
SWAP_INTERNAL_NUM %%args
|
||||||
%endmacro
|
%endmacro
|
||||||
@@ -1091,7 +1130,7 @@ INIT_XMM
|
|||||||
%assign %%i 0
|
%assign %%i 0
|
||||||
%rep num_mmregs
|
%rep num_mmregs
|
||||||
CAT_XDEFINE %%f, %%i, m %+ %%i
|
CAT_XDEFINE %%f, %%i, m %+ %%i
|
||||||
%assign %%i %%i+1
|
%assign %%i %%i+1
|
||||||
%endrep
|
%endrep
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
@@ -1101,20 +1140,20 @@ INIT_XMM
|
|||||||
%rep num_mmregs
|
%rep num_mmregs
|
||||||
CAT_XDEFINE m, %%i, %1_m %+ %%i
|
CAT_XDEFINE m, %%i, %1_m %+ %%i
|
||||||
CAT_XDEFINE nn, m %+ %%i, %%i
|
CAT_XDEFINE nn, m %+ %%i, %%i
|
||||||
%assign %%i %%i+1
|
%assign %%i %%i+1
|
||||||
%endrep
|
%endrep
|
||||||
%endif
|
%endif
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; Append cpuflags to the callee's name iff the appended name is known and the plain name isn't
|
; Append cpuflags to the callee's name iff the appended name is known and the plain name isn't
|
||||||
%macro call 1
|
%macro call 1
|
||||||
call_internal %1, %1 %+ SUFFIX
|
call_internal %1 %+ SUFFIX, %1
|
||||||
%endmacro
|
%endmacro
|
||||||
%macro call_internal 2
|
%macro call_internal 2
|
||||||
%xdefine %%i %1
|
%xdefine %%i %2
|
||||||
%ifndef cglobaled_%1
|
%ifndef cglobaled_%2
|
||||||
%ifdef cglobaled_%2
|
%ifdef cglobaled_%1
|
||||||
%xdefine %%i %2
|
%xdefine %%i %1
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
call %%i
|
call %%i
|
||||||
@@ -1157,7 +1196,7 @@ INIT_XMM
|
|||||||
%endif
|
%endif
|
||||||
CAT_XDEFINE sizeofxmm, i, 16
|
CAT_XDEFINE sizeofxmm, i, 16
|
||||||
CAT_XDEFINE sizeofymm, i, 32
|
CAT_XDEFINE sizeofymm, i, 32
|
||||||
%assign i i+1
|
%assign i i+1
|
||||||
%endrep
|
%endrep
|
||||||
%undef i
|
%undef i
|
||||||
|
|
||||||
@@ -1534,7 +1573,7 @@ AVX_INSTR pfmul, 3dnow, 1, 0, 1
|
|||||||
%else
|
%else
|
||||||
CAT_XDEFINE q, j, i
|
CAT_XDEFINE q, j, i
|
||||||
%endif
|
%endif
|
||||||
%assign i i+1
|
%assign i i+1
|
||||||
%endrep
|
%endrep
|
||||||
%undef i
|
%undef i
|
||||||
%undef j
|
%undef j
|
||||||
@@ -1557,55 +1596,54 @@ FMA_INSTR pmacsdd, pmulld, paddd ; sse4 emulation
|
|||||||
FMA_INSTR pmacsdql, pmuldq, paddq ; sse4 emulation
|
FMA_INSTR pmacsdql, pmuldq, paddq ; sse4 emulation
|
||||||
FMA_INSTR pmadcswd, pmaddwd, paddd
|
FMA_INSTR pmadcswd, pmaddwd, paddd
|
||||||
|
|
||||||
; convert FMA4 to FMA3 if possible
|
; Macros for consolidating FMA3 and FMA4 using 4-operand (dst, src1, src2, src3) syntax.
|
||||||
%macro FMA4_INSTR 4
|
; FMA3 is only possible if dst is the same as one of the src registers.
|
||||||
%macro %1 4-8 %1, %2, %3, %4
|
; Either src2 or src3 can be a memory operand.
|
||||||
%if cpuflag(fma4)
|
%macro FMA4_INSTR 2-*
|
||||||
v%5 %1, %2, %3, %4
|
%push fma4_instr
|
||||||
%elifidn %1, %2
|
%xdefine %$prefix %1
|
||||||
v%6 %1, %4, %3 ; %1 = %1 * %3 + %4
|
%rep %0 - 1
|
||||||
%elifidn %1, %3
|
%macro %$prefix%2 4-6 %$prefix, %2
|
||||||
v%7 %1, %2, %4 ; %1 = %2 * %1 + %4
|
%if notcpuflag(fma3) && notcpuflag(fma4)
|
||||||
%elifidn %1, %4
|
%error use of ``%5%6'' fma instruction in cpuname function: current_function
|
||||||
v%8 %1, %2, %3 ; %1 = %2 * %3 + %1
|
%elif cpuflag(fma4)
|
||||||
%else
|
v%5%6 %1, %2, %3, %4
|
||||||
%error fma3 emulation of ``%5 %1, %2, %3, %4'' is not supported
|
%elifidn %1, %2
|
||||||
%endif
|
; If %3 or %4 is a memory operand it needs to be encoded as the last operand.
|
||||||
%endmacro
|
%ifid %3
|
||||||
|
v%{5}213%6 %2, %3, %4
|
||||||
|
%else
|
||||||
|
v%{5}132%6 %2, %4, %3
|
||||||
|
%endif
|
||||||
|
%elifidn %1, %3
|
||||||
|
v%{5}213%6 %3, %2, %4
|
||||||
|
%elifidn %1, %4
|
||||||
|
v%{5}231%6 %4, %2, %3
|
||||||
|
%else
|
||||||
|
%error fma3 emulation of ``%5%6 %1, %2, %3, %4'' is not supported
|
||||||
|
%endif
|
||||||
|
%endmacro
|
||||||
|
%rotate 1
|
||||||
|
%endrep
|
||||||
|
%pop
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
FMA4_INSTR fmaddpd, fmadd132pd, fmadd213pd, fmadd231pd
|
FMA4_INSTR fmadd, pd, ps, sd, ss
|
||||||
FMA4_INSTR fmaddps, fmadd132ps, fmadd213ps, fmadd231ps
|
FMA4_INSTR fmaddsub, pd, ps
|
||||||
FMA4_INSTR fmaddsd, fmadd132sd, fmadd213sd, fmadd231sd
|
FMA4_INSTR fmsub, pd, ps, sd, ss
|
||||||
FMA4_INSTR fmaddss, fmadd132ss, fmadd213ss, fmadd231ss
|
FMA4_INSTR fmsubadd, pd, ps
|
||||||
|
FMA4_INSTR fnmadd, pd, ps, sd, ss
|
||||||
|
FMA4_INSTR fnmsub, pd, ps, sd, ss
|
||||||
|
|
||||||
FMA4_INSTR fmaddsubpd, fmaddsub132pd, fmaddsub213pd, fmaddsub231pd
|
; workaround: vpbroadcastq is broken in x86_32 due to a yasm bug (fixed in 1.3.0)
|
||||||
FMA4_INSTR fmaddsubps, fmaddsub132ps, fmaddsub213ps, fmaddsub231ps
|
%ifdef __YASM_VER__
|
||||||
FMA4_INSTR fmsubaddpd, fmsubadd132pd, fmsubadd213pd, fmsubadd231pd
|
%if __YASM_VERSION_ID__ < 0x01030000 && ARCH_X86_64 == 0
|
||||||
FMA4_INSTR fmsubaddps, fmsubadd132ps, fmsubadd213ps, fmsubadd231ps
|
%macro vpbroadcastq 2
|
||||||
|
%if sizeof%1 == 16
|
||||||
FMA4_INSTR fmsubpd, fmsub132pd, fmsub213pd, fmsub231pd
|
movddup %1, %2
|
||||||
FMA4_INSTR fmsubps, fmsub132ps, fmsub213ps, fmsub231ps
|
%else
|
||||||
FMA4_INSTR fmsubsd, fmsub132sd, fmsub213sd, fmsub231sd
|
vbroadcastsd %1, %2
|
||||||
FMA4_INSTR fmsubss, fmsub132ss, fmsub213ss, fmsub231ss
|
%endif
|
||||||
|
%endmacro
|
||||||
FMA4_INSTR fnmaddpd, fnmadd132pd, fnmadd213pd, fnmadd231pd
|
%endif
|
||||||
FMA4_INSTR fnmaddps, fnmadd132ps, fnmadd213ps, fnmadd231ps
|
|
||||||
FMA4_INSTR fnmaddsd, fnmadd132sd, fnmadd213sd, fnmadd231sd
|
|
||||||
FMA4_INSTR fnmaddss, fnmadd132ss, fnmadd213ss, fnmadd231ss
|
|
||||||
|
|
||||||
FMA4_INSTR fnmsubpd, fnmsub132pd, fnmsub213pd, fnmsub231pd
|
|
||||||
FMA4_INSTR fnmsubps, fnmsub132ps, fnmsub213ps, fnmsub231ps
|
|
||||||
FMA4_INSTR fnmsubsd, fnmsub132sd, fnmsub213sd, fnmsub231sd
|
|
||||||
FMA4_INSTR fnmsubss, fnmsub132ss, fnmsub213ss, fnmsub231ss
|
|
||||||
|
|
||||||
; workaround: vpbroadcastq is broken in x86_32 due to a yasm bug
|
|
||||||
%if ARCH_X86_64 == 0
|
|
||||||
%macro vpbroadcastq 2
|
|
||||||
%if sizeof%1 == 16
|
|
||||||
movddup %1, %2
|
|
||||||
%else
|
|
||||||
vbroadcastsd %1, %2
|
|
||||||
%endif
|
|
||||||
%endmacro
|
|
||||||
%endif
|
%endif
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ cat <<EOF
|
|||||||
# This file is automatically generated from the git commit history
|
# This file is automatically generated from the git commit history
|
||||||
# by tools/gen_authors.sh.
|
# by tools/gen_authors.sh.
|
||||||
|
|
||||||
$(git log --pretty=format:"%aN <%aE>" | sort | uniq)
|
$(git log --pretty=format:"%aN <%aE>" | sort | uniq | grep -v corp.google)
|
||||||
Google Inc.
|
Google Inc.
|
||||||
The Mozilla Foundation
|
The Mozilla Foundation
|
||||||
The Xiph.Org Foundation
|
The Xiph.Org Foundation
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ void vp10_foreach_transformed_block_in_plane(
|
|||||||
for (r = 0; r < max_blocks_high; r += (1 << tx_size)) {
|
for (r = 0; r < max_blocks_high; r += (1 << tx_size)) {
|
||||||
// Skip visiting the sub blocks that are wholly within the UMV.
|
// Skip visiting the sub blocks that are wholly within the UMV.
|
||||||
for (c = 0; c < max_blocks_wide; c += (1 << tx_size)) {
|
for (c = 0; c < max_blocks_wide; c += (1 << tx_size)) {
|
||||||
visit(plane, i, plane_bsize, tx_size, arg);
|
visit(plane, i, r, c, plane_bsize, tx_size, arg);
|
||||||
i += step;
|
i += step;
|
||||||
}
|
}
|
||||||
i += extra_step;
|
i += extra_step;
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ typedef struct {
|
|||||||
PREDICTION_MODE mode;
|
PREDICTION_MODE mode;
|
||||||
TX_SIZE tx_size;
|
TX_SIZE tx_size;
|
||||||
int8_t skip;
|
int8_t skip;
|
||||||
|
#if CONFIG_MISC_FIXES
|
||||||
|
int8_t has_no_coeffs;
|
||||||
|
#endif
|
||||||
int8_t segment_id;
|
int8_t segment_id;
|
||||||
int8_t seg_id_predicted; // valid only when temporal_update is enabled
|
int8_t seg_id_predicted; // valid only when temporal_update is enabled
|
||||||
|
|
||||||
@@ -79,6 +82,7 @@ typedef struct {
|
|||||||
// Only for INTER blocks
|
// Only for INTER blocks
|
||||||
INTERP_FILTER interp_filter;
|
INTERP_FILTER interp_filter;
|
||||||
MV_REFERENCE_FRAME ref_frame[2];
|
MV_REFERENCE_FRAME ref_frame[2];
|
||||||
|
TX_TYPE tx_type;
|
||||||
|
|
||||||
// TODO(slavarnway): Delete and use bmi[3].as_mv[] instead.
|
// TODO(slavarnway): Delete and use bmi[3].as_mv[] instead.
|
||||||
int_mv mv[2];
|
int_mv mv[2];
|
||||||
@@ -128,6 +132,7 @@ struct macroblockd_plane {
|
|||||||
ENTROPY_CONTEXT *above_context;
|
ENTROPY_CONTEXT *above_context;
|
||||||
ENTROPY_CONTEXT *left_context;
|
ENTROPY_CONTEXT *left_context;
|
||||||
int16_t seg_dequant[MAX_SEGMENTS][2];
|
int16_t seg_dequant[MAX_SEGMENTS][2];
|
||||||
|
uint8_t *color_index_map;
|
||||||
|
|
||||||
// number of 4x4s in current block
|
// number of 4x4s in current block
|
||||||
uint16_t n4_w, n4_h;
|
uint16_t n4_w, n4_h;
|
||||||
@@ -167,8 +172,6 @@ typedef struct macroblockd {
|
|||||||
int up_available;
|
int up_available;
|
||||||
int left_available;
|
int left_available;
|
||||||
|
|
||||||
const vpx_prob (*partition_probs)[PARTITION_TYPES - 1];
|
|
||||||
|
|
||||||
/* Distance of MB away from frame edges */
|
/* Distance of MB away from frame edges */
|
||||||
int mb_to_left_edge;
|
int mb_to_left_edge;
|
||||||
int mb_to_right_edge;
|
int mb_to_right_edge;
|
||||||
@@ -176,7 +179,6 @@ typedef struct macroblockd {
|
|||||||
int mb_to_bottom_edge;
|
int mb_to_bottom_edge;
|
||||||
|
|
||||||
FRAME_CONTEXT *fc;
|
FRAME_CONTEXT *fc;
|
||||||
int frame_parallel_decoding_mode;
|
|
||||||
|
|
||||||
/* pointers to reference frames */
|
/* pointers to reference frames */
|
||||||
RefBuffer *block_refs[2];
|
RefBuffer *block_refs[2];
|
||||||
@@ -195,7 +197,7 @@ typedef struct macroblockd {
|
|||||||
int bd;
|
int bd;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int lossless;
|
int lossless[MAX_SEGMENTS];
|
||||||
int corrupted;
|
int corrupted;
|
||||||
|
|
||||||
struct vpx_internal_error_info *error_info;
|
struct vpx_internal_error_info *error_info;
|
||||||
@@ -206,7 +208,7 @@ static INLINE BLOCK_SIZE get_subsize(BLOCK_SIZE bsize,
|
|||||||
return subsize_lookup[partition][bsize];
|
return subsize_lookup[partition][bsize];
|
||||||
}
|
}
|
||||||
|
|
||||||
static const TX_TYPE intra_mode_to_tx_type_lookup[INTRA_MODES] = {
|
static const TX_TYPE intra_mode_to_tx_type_context[INTRA_MODES] = {
|
||||||
DCT_DCT, // DC
|
DCT_DCT, // DC
|
||||||
ADST_DCT, // V
|
ADST_DCT, // V
|
||||||
DCT_ADST, // H
|
DCT_ADST, // H
|
||||||
@@ -224,11 +226,12 @@ static INLINE TX_TYPE get_tx_type(PLANE_TYPE plane_type, const MACROBLOCKD *xd,
|
|||||||
const MODE_INFO *const mi = xd->mi[0];
|
const MODE_INFO *const mi = xd->mi[0];
|
||||||
const MB_MODE_INFO *const mbmi = &mi->mbmi;
|
const MB_MODE_INFO *const mbmi = &mi->mbmi;
|
||||||
|
|
||||||
if (plane_type != PLANE_TYPE_Y || xd->lossless || is_inter_block(mbmi) ||
|
(void) block_idx;
|
||||||
|
if (plane_type != PLANE_TYPE_Y || xd->lossless[mbmi->segment_id] ||
|
||||||
mbmi->tx_size >= TX_32X32)
|
mbmi->tx_size >= TX_32X32)
|
||||||
return DCT_DCT;
|
return DCT_DCT;
|
||||||
|
|
||||||
return intra_mode_to_tx_type_lookup[get_y_mode(mi, block_idx)];
|
return mbmi->tx_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp10_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y);
|
void vp10_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y);
|
||||||
@@ -266,16 +269,8 @@ static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE bsize) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE const vpx_prob *get_y_mode_probs(const MODE_INFO *mi,
|
|
||||||
const MODE_INFO *above_mi,
|
|
||||||
const MODE_INFO *left_mi,
|
|
||||||
int block) {
|
|
||||||
const PREDICTION_MODE above = vp10_above_block_mode(mi, above_mi, block);
|
|
||||||
const PREDICTION_MODE left = vp10_left_block_mode(mi, left_mi, block);
|
|
||||||
return vp10_kf_y_mode_prob[above][left];
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef void (*foreach_transformed_block_visitor)(int plane, int block,
|
typedef void (*foreach_transformed_block_visitor)(int plane, int block,
|
||||||
|
int blk_row, int blk_col,
|
||||||
BLOCK_SIZE plane_bsize,
|
BLOCK_SIZE plane_bsize,
|
||||||
TX_SIZE tx_size,
|
TX_SIZE tx_size,
|
||||||
void *arg);
|
void *arg);
|
||||||
@@ -289,17 +284,6 @@ void vp10_foreach_transformed_block(
|
|||||||
const MACROBLOCKD* const xd, BLOCK_SIZE bsize,
|
const MACROBLOCKD* const xd, BLOCK_SIZE bsize,
|
||||||
foreach_transformed_block_visitor visit, void *arg);
|
foreach_transformed_block_visitor visit, void *arg);
|
||||||
|
|
||||||
static INLINE void txfrm_block_to_raster_xy(BLOCK_SIZE plane_bsize,
|
|
||||||
TX_SIZE tx_size, int block,
|
|
||||||
int *x, int *y) {
|
|
||||||
const int bwl = b_width_log2_lookup[plane_bsize];
|
|
||||||
const int tx_cols_log2 = bwl - tx_size;
|
|
||||||
const int tx_cols = 1 << tx_cols_log2;
|
|
||||||
const int raster_mb = block >> (tx_size << 1);
|
|
||||||
*x = (raster_mb & (tx_cols - 1)) << tx_size;
|
|
||||||
*y = (raster_mb >> tx_cols_log2) << tx_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vp10_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
|
void vp10_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
|
||||||
BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int has_eob,
|
BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int has_eob,
|
||||||
int aoff, int loff);
|
int aoff, int loff);
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ static const uint8_t num_4x4_blocks_high_lookup[BLOCK_SIZES] =
|
|||||||
// Log 2 conversion lookup tables for modeinfo width and height
|
// Log 2 conversion lookup tables for modeinfo width and height
|
||||||
static const uint8_t mi_width_log2_lookup[BLOCK_SIZES] =
|
static const uint8_t mi_width_log2_lookup[BLOCK_SIZES] =
|
||||||
{0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3};
|
{0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3};
|
||||||
|
static const uint8_t mi_height_log2_lookup[BLOCK_SIZES] =
|
||||||
|
{0, 0, 0, 0, 1, 0, 1, 2, 1, 2, 3, 2, 3};
|
||||||
static const uint8_t num_8x8_blocks_wide_lookup[BLOCK_SIZES] =
|
static const uint8_t num_8x8_blocks_wide_lookup[BLOCK_SIZES] =
|
||||||
{1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 8, 8};
|
{1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 8, 8};
|
||||||
static const uint8_t num_8x8_blocks_high_lookup[BLOCK_SIZES] =
|
static const uint8_t num_8x8_blocks_high_lookup[BLOCK_SIZES] =
|
||||||
|
|||||||
@@ -403,7 +403,6 @@ const vpx_prob vp10_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES] = {
|
|||||||
{255, 241, 243, 255, 236, 255, 252, 254},
|
{255, 241, 243, 255, 236, 255, 252, 254},
|
||||||
{255, 243, 245, 255, 237, 255, 252, 254},
|
{255, 243, 245, 255, 237, 255, 252, 254},
|
||||||
{255, 246, 247, 255, 239, 255, 253, 255},
|
{255, 246, 247, 255, 239, 255, 253, 255},
|
||||||
{255, 246, 247, 255, 239, 255, 253, 255},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const vp10_coeff_probs_model default_coef_probs_4x4[PLANE_TYPES] = {
|
static const vp10_coeff_probs_model default_coef_probs_4x4[PLANE_TYPES] = {
|
||||||
@@ -743,7 +742,9 @@ static const vp10_coeff_probs_model default_coef_probs_32x32[PLANE_TYPES] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void extend_to_full_distribution(vpx_prob *probs, vpx_prob p) {
|
static void extend_to_full_distribution(vpx_prob *probs, vpx_prob p) {
|
||||||
memcpy(probs, vp10_pareto8_full[p = 0 ? 0 : p - 1],
|
// TODO(aconverse): model[PIVOT_NODE] should never be zero.
|
||||||
|
// https://code.google.com/p/webm/issues/detail?id=1089
|
||||||
|
memcpy(probs, vp10_pareto8_full[p == 0 ? 254 : p - 1],
|
||||||
MODEL_NODES * sizeof(vpx_prob));
|
MODEL_NODES * sizeof(vpx_prob));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DIFF_UPDATE_PROB 252
|
#define DIFF_UPDATE_PROB 252
|
||||||
|
#define GROUP_DIFF_UPDATE_PROB 252
|
||||||
|
|
||||||
// Coefficient token alphabet
|
// Coefficient token alphabet
|
||||||
#define ZERO_TOKEN 0 // 0 Extra Bits 0+0
|
#define ZERO_TOKEN 0 // 0 Extra Bits 0+0
|
||||||
@@ -153,7 +154,7 @@ static INLINE const uint8_t *get_band_translate(TX_SIZE tx_size) {
|
|||||||
// 1, 3, 5, 7, ..., 253, 255
|
// 1, 3, 5, 7, ..., 253, 255
|
||||||
// In between probabilities are interpolated linearly
|
// In between probabilities are interpolated linearly
|
||||||
|
|
||||||
#define COEFF_PROB_MODELS 256
|
#define COEFF_PROB_MODELS 255
|
||||||
|
|
||||||
#define UNCONSTRAINED_NODES 3
|
#define UNCONSTRAINED_NODES 3
|
||||||
|
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ const vpx_prob vp10_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] =
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !CONFIG_MISC_FIXES
|
||||||
const vpx_prob vp10_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] = {
|
const vpx_prob vp10_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] = {
|
||||||
{ 144, 11, 54, 157, 195, 130, 46, 58, 108 }, // y = dc
|
{ 144, 11, 54, 157, 195, 130, 46, 58, 108 }, // y = dc
|
||||||
{ 118, 15, 123, 148, 131, 101, 44, 93, 131 }, // y = v
|
{ 118, 15, 123, 148, 131, 101, 44, 93, 131 }, // y = v
|
||||||
@@ -139,6 +140,7 @@ const vpx_prob vp10_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] = {
|
|||||||
{ 116, 12, 64, 120, 140, 125, 49, 115, 121 }, // y = d63
|
{ 116, 12, 64, 120, 140, 125, 49, 115, 121 }, // y = d63
|
||||||
{ 102, 19, 66, 162, 182, 122, 35, 59, 128 } // y = tm
|
{ 102, 19, 66, 162, 182, 122, 35, 59, 128 } // y = tm
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static const vpx_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = {
|
static const vpx_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = {
|
||||||
{ 65, 32, 18, 144, 162, 194, 41, 51, 98 }, // block_size < 8x8
|
{ 65, 32, 18, 144, 162, 194, 41, 51, 98 }, // block_size < 8x8
|
||||||
@@ -147,7 +149,7 @@ static const vpx_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = {
|
|||||||
{ 221, 135, 38, 194, 248, 121, 96, 85, 29 } // block_size >= 32x32
|
{ 221, 135, 38, 194, 248, 121, 96, 85, 29 } // block_size >= 32x32
|
||||||
};
|
};
|
||||||
|
|
||||||
static const vpx_prob default_if_uv_probs[INTRA_MODES][INTRA_MODES - 1] = {
|
static const vpx_prob default_uv_probs[INTRA_MODES][INTRA_MODES - 1] = {
|
||||||
{ 120, 7, 76, 176, 208, 126, 28, 54, 103 }, // y = dc
|
{ 120, 7, 76, 176, 208, 126, 28, 54, 103 }, // y = dc
|
||||||
{ 48, 12, 154, 155, 139, 90, 34, 117, 119 }, // y = v
|
{ 48, 12, 154, 155, 139, 90, 34, 117, 119 }, // y = v
|
||||||
{ 67, 6, 25, 204, 243, 158, 13, 21, 96 }, // y = h
|
{ 67, 6, 25, 204, 243, 158, 13, 21, 96 }, // y = h
|
||||||
@@ -160,6 +162,7 @@ static const vpx_prob default_if_uv_probs[INTRA_MODES][INTRA_MODES - 1] = {
|
|||||||
{ 101, 21, 107, 181, 192, 103, 19, 67, 125 } // y = tm
|
{ 101, 21, 107, 181, 192, 103, 19, 67, 125 } // y = tm
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !CONFIG_MISC_FIXES
|
||||||
const vpx_prob vp10_kf_partition_probs[PARTITION_CONTEXTS]
|
const vpx_prob vp10_kf_partition_probs[PARTITION_CONTEXTS]
|
||||||
[PARTITION_TYPES - 1] = {
|
[PARTITION_TYPES - 1] = {
|
||||||
// 8x8 -> 4x4
|
// 8x8 -> 4x4
|
||||||
@@ -183,6 +186,7 @@ const vpx_prob vp10_kf_partition_probs[PARTITION_CONTEXTS]
|
|||||||
{ 57, 15, 9 }, // l split, a not split
|
{ 57, 15, 9 }, // l split, a not split
|
||||||
{ 12, 3, 3 }, // a/l both split
|
{ 12, 3, 3 }, // a/l both split
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static const vpx_prob default_partition_probs[PARTITION_CONTEXTS]
|
static const vpx_prob default_partition_probs[PARTITION_CONTEXTS]
|
||||||
[PARTITION_TYPES - 1] = {
|
[PARTITION_TYPES - 1] = {
|
||||||
@@ -314,8 +318,36 @@ static const vpx_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
|
|||||||
{ 149, 144, },
|
{ 149, 144, },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if CONFIG_MISC_FIXES
|
||||||
|
// FIXME(someone) need real defaults here
|
||||||
|
static const struct segmentation_probs default_seg_probs = {
|
||||||
|
{ 128, 128, 128, 128, 128, 128, 128 },
|
||||||
|
{ 128, 128, 128 },
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const vpx_tree_index vp10_ext_tx_tree[TREE_SIZE(TX_TYPES)] = {
|
||||||
|
-DCT_DCT, 2,
|
||||||
|
-ADST_ADST, 4,
|
||||||
|
-ADST_DCT, -DCT_ADST
|
||||||
|
};
|
||||||
|
|
||||||
|
static const vpx_prob default_intra_ext_tx_prob[EXT_TX_SIZES]
|
||||||
|
[TX_TYPES][TX_TYPES - 1] = {
|
||||||
|
{{240, 85, 128}, {4, 1, 248}, {4, 1, 8}, {4, 248, 128}},
|
||||||
|
{{244, 85, 128}, {8, 2, 248}, {8, 2, 8}, {8, 248, 128}},
|
||||||
|
{{248, 85, 128}, {16, 4, 248}, {16, 4, 8}, {16, 248, 128}},
|
||||||
|
};
|
||||||
|
|
||||||
|
static const vpx_prob default_inter_ext_tx_prob[EXT_TX_SIZES]
|
||||||
|
[TX_TYPES - 1] = {
|
||||||
|
{160, 85, 128},
|
||||||
|
{176, 85, 128},
|
||||||
|
{192, 85, 128},
|
||||||
|
};
|
||||||
|
|
||||||
static void init_mode_probs(FRAME_CONTEXT *fc) {
|
static void init_mode_probs(FRAME_CONTEXT *fc) {
|
||||||
vp10_copy(fc->uv_mode_prob, default_if_uv_probs);
|
vp10_copy(fc->uv_mode_prob, default_uv_probs);
|
||||||
vp10_copy(fc->y_mode_prob, default_if_y_probs);
|
vp10_copy(fc->y_mode_prob, default_if_y_probs);
|
||||||
vp10_copy(fc->switchable_interp_prob, default_switchable_interp_prob);
|
vp10_copy(fc->switchable_interp_prob, default_switchable_interp_prob);
|
||||||
vp10_copy(fc->partition_prob, default_partition_probs);
|
vp10_copy(fc->partition_prob, default_partition_probs);
|
||||||
@@ -326,6 +358,12 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
|
|||||||
fc->tx_probs = default_tx_probs;
|
fc->tx_probs = default_tx_probs;
|
||||||
vp10_copy(fc->skip_probs, default_skip_probs);
|
vp10_copy(fc->skip_probs, default_skip_probs);
|
||||||
vp10_copy(fc->inter_mode_probs, default_inter_mode_probs);
|
vp10_copy(fc->inter_mode_probs, default_inter_mode_probs);
|
||||||
|
#if CONFIG_MISC_FIXES
|
||||||
|
vp10_copy(fc->seg.tree_probs, default_seg_probs.tree_probs);
|
||||||
|
vp10_copy(fc->seg.pred_probs, default_seg_probs.pred_probs);
|
||||||
|
#endif
|
||||||
|
vp10_copy(fc->intra_ext_tx_prob, default_intra_ext_tx_prob);
|
||||||
|
vp10_copy(fc->inter_ext_tx_prob, default_inter_ext_tx_prob);
|
||||||
}
|
}
|
||||||
|
|
||||||
const vpx_tree_index vp10_switchable_interp_tree
|
const vpx_tree_index vp10_switchable_interp_tree
|
||||||
@@ -334,7 +372,7 @@ const vpx_tree_index vp10_switchable_interp_tree
|
|||||||
-EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP
|
-EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP
|
||||||
};
|
};
|
||||||
|
|
||||||
void vp10_adapt_mode_probs(VP10_COMMON *cm) {
|
void vp10_adapt_inter_frame_probs(VP10_COMMON *cm) {
|
||||||
int i, j;
|
int i, j;
|
||||||
FRAME_CONTEXT *fc = cm->fc;
|
FRAME_CONTEXT *fc = cm->fc;
|
||||||
const FRAME_CONTEXT *pre_fc = &cm->frame_contexts[cm->frame_context_idx];
|
const FRAME_CONTEXT *pre_fc = &cm->frame_contexts[cm->frame_context_idx];
|
||||||
@@ -362,6 +400,7 @@ void vp10_adapt_mode_probs(VP10_COMMON *cm) {
|
|||||||
vpx_tree_merge_probs(vp10_intra_mode_tree, pre_fc->y_mode_prob[i],
|
vpx_tree_merge_probs(vp10_intra_mode_tree, pre_fc->y_mode_prob[i],
|
||||||
counts->y_mode[i], fc->y_mode_prob[i]);
|
counts->y_mode[i], fc->y_mode_prob[i]);
|
||||||
|
|
||||||
|
#if !CONFIG_MISC_FIXES
|
||||||
for (i = 0; i < INTRA_MODES; ++i)
|
for (i = 0; i < INTRA_MODES; ++i)
|
||||||
vpx_tree_merge_probs(vp10_intra_mode_tree, pre_fc->uv_mode_prob[i],
|
vpx_tree_merge_probs(vp10_intra_mode_tree, pre_fc->uv_mode_prob[i],
|
||||||
counts->uv_mode[i], fc->uv_mode_prob[i]);
|
counts->uv_mode[i], fc->uv_mode_prob[i]);
|
||||||
@@ -369,6 +408,7 @@ void vp10_adapt_mode_probs(VP10_COMMON *cm) {
|
|||||||
for (i = 0; i < PARTITION_CONTEXTS; i++)
|
for (i = 0; i < PARTITION_CONTEXTS; i++)
|
||||||
vpx_tree_merge_probs(vp10_partition_tree, pre_fc->partition_prob[i],
|
vpx_tree_merge_probs(vp10_partition_tree, pre_fc->partition_prob[i],
|
||||||
counts->partition[i], fc->partition_prob[i]);
|
counts->partition[i], fc->partition_prob[i]);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (cm->interp_filter == SWITCHABLE) {
|
if (cm->interp_filter == SWITCHABLE) {
|
||||||
for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; i++)
|
for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; i++)
|
||||||
@@ -377,6 +417,13 @@ void vp10_adapt_mode_probs(VP10_COMMON *cm) {
|
|||||||
counts->switchable_interp[i],
|
counts->switchable_interp[i],
|
||||||
fc->switchable_interp_prob[i]);
|
fc->switchable_interp_prob[i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void vp10_adapt_intra_frame_probs(VP10_COMMON *cm) {
|
||||||
|
int i;
|
||||||
|
FRAME_CONTEXT *fc = cm->fc;
|
||||||
|
const FRAME_CONTEXT *pre_fc = &cm->frame_contexts[cm->frame_context_idx];
|
||||||
|
const FRAME_COUNTS *counts = &cm->counts;
|
||||||
|
|
||||||
if (cm->tx_mode == TX_MODE_SELECT) {
|
if (cm->tx_mode == TX_MODE_SELECT) {
|
||||||
int j;
|
int j;
|
||||||
@@ -405,6 +452,43 @@ void vp10_adapt_mode_probs(VP10_COMMON *cm) {
|
|||||||
for (i = 0; i < SKIP_CONTEXTS; ++i)
|
for (i = 0; i < SKIP_CONTEXTS; ++i)
|
||||||
fc->skip_probs[i] = mode_mv_merge_probs(
|
fc->skip_probs[i] = mode_mv_merge_probs(
|
||||||
pre_fc->skip_probs[i], counts->skip[i]);
|
pre_fc->skip_probs[i], counts->skip[i]);
|
||||||
|
|
||||||
|
for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
|
||||||
|
int j;
|
||||||
|
for (j = 0; j < TX_TYPES; ++j)
|
||||||
|
vpx_tree_merge_probs(vp10_ext_tx_tree,
|
||||||
|
pre_fc->intra_ext_tx_prob[i][j],
|
||||||
|
counts->intra_ext_tx[i][j],
|
||||||
|
fc->intra_ext_tx_prob[i][j]);
|
||||||
|
}
|
||||||
|
for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
|
||||||
|
vpx_tree_merge_probs(vp10_ext_tx_tree,
|
||||||
|
pre_fc->inter_ext_tx_prob[i],
|
||||||
|
counts->inter_ext_tx[i],
|
||||||
|
fc->inter_ext_tx_prob[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if CONFIG_MISC_FIXES
|
||||||
|
if (cm->seg.temporal_update) {
|
||||||
|
for (i = 0; i < PREDICTION_PROBS; i++)
|
||||||
|
fc->seg.pred_probs[i] = mode_mv_merge_probs(pre_fc->seg.pred_probs[i],
|
||||||
|
counts->seg.pred[i]);
|
||||||
|
|
||||||
|
vpx_tree_merge_probs(vp10_segment_tree, pre_fc->seg.tree_probs,
|
||||||
|
counts->seg.tree_mispred, fc->seg.tree_probs);
|
||||||
|
} else {
|
||||||
|
vpx_tree_merge_probs(vp10_segment_tree, pre_fc->seg.tree_probs,
|
||||||
|
counts->seg.tree_total, fc->seg.tree_probs);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < INTRA_MODES; ++i)
|
||||||
|
vpx_tree_merge_probs(vp10_intra_mode_tree, pre_fc->uv_mode_prob[i],
|
||||||
|
counts->uv_mode[i], fc->uv_mode_prob[i]);
|
||||||
|
|
||||||
|
for (i = 0; i < PARTITION_CONTEXTS; i++)
|
||||||
|
vpx_tree_merge_probs(vp10_partition_tree, pre_fc->partition_prob[i],
|
||||||
|
counts->partition[i], fc->partition_prob[i]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_default_lf_deltas(struct loopfilter *lf) {
|
static void set_default_lf_deltas(struct loopfilter *lf) {
|
||||||
@@ -448,12 +532,12 @@ void vp10_setup_past_independence(VP10_COMMON *cm) {
|
|||||||
vp10_init_mv_probs(cm);
|
vp10_init_mv_probs(cm);
|
||||||
cm->fc->initialized = 1;
|
cm->fc->initialized = 1;
|
||||||
|
|
||||||
if (cm->frame_type == KEY_FRAME ||
|
if (cm->frame_type == KEY_FRAME || cm->error_resilient_mode ||
|
||||||
cm->error_resilient_mode || cm->reset_frame_context == 3) {
|
cm->reset_frame_context == RESET_FRAME_CONTEXT_ALL) {
|
||||||
// Reset all frame contexts.
|
// Reset all frame contexts.
|
||||||
for (i = 0; i < FRAME_CONTEXTS; ++i)
|
for (i = 0; i < FRAME_CONTEXTS; ++i)
|
||||||
cm->frame_contexts[i] = *cm->fc;
|
cm->frame_contexts[i] = *cm->fc;
|
||||||
} else if (cm->reset_frame_context == 2) {
|
} else if (cm->reset_frame_context == RESET_FRAME_CONTEXT_CURRENT) {
|
||||||
// Reset only the frame context specified in the frame header.
|
// Reset only the frame context specified in the frame header.
|
||||||
cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
|
cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
|
||||||
}
|
}
|
||||||
@@ -463,7 +547,5 @@ void vp10_setup_past_independence(VP10_COMMON *cm) {
|
|||||||
memset(cm->prev_mip, 0,
|
memset(cm->prev_mip, 0,
|
||||||
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->prev_mip));
|
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->prev_mip));
|
||||||
|
|
||||||
vp10_zero(cm->ref_frame_sign_bias);
|
|
||||||
|
|
||||||
cm->frame_context_idx = 0;
|
cm->frame_context_idx = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "vp10/common/entropy.h"
|
#include "vp10/common/entropy.h"
|
||||||
#include "vp10/common/entropymv.h"
|
#include "vp10/common/entropymv.h"
|
||||||
#include "vp10/common/filter.h"
|
#include "vp10/common/filter.h"
|
||||||
|
#include "vp10/common/seg_common.h"
|
||||||
#include "vpx_dsp/vpx_filter.h"
|
#include "vpx_dsp/vpx_filter.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -41,6 +42,12 @@ struct tx_counts {
|
|||||||
unsigned int tx_totals[TX_SIZES];
|
unsigned int tx_totals[TX_SIZES];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct seg_counts {
|
||||||
|
unsigned int tree_total[MAX_SEGMENTS];
|
||||||
|
unsigned int tree_mispred[MAX_SEGMENTS];
|
||||||
|
unsigned int pred[PREDICTION_PROBS][2];
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct frame_contexts {
|
typedef struct frame_contexts {
|
||||||
vpx_prob y_mode_prob[BLOCK_SIZE_GROUPS][INTRA_MODES - 1];
|
vpx_prob y_mode_prob[BLOCK_SIZE_GROUPS][INTRA_MODES - 1];
|
||||||
vpx_prob uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
|
vpx_prob uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
|
||||||
@@ -56,10 +63,16 @@ typedef struct frame_contexts {
|
|||||||
struct tx_probs tx_probs;
|
struct tx_probs tx_probs;
|
||||||
vpx_prob skip_probs[SKIP_CONTEXTS];
|
vpx_prob skip_probs[SKIP_CONTEXTS];
|
||||||
nmv_context nmvc;
|
nmv_context nmvc;
|
||||||
|
#if CONFIG_MISC_FIXES
|
||||||
|
struct segmentation_probs seg;
|
||||||
|
#endif
|
||||||
|
vpx_prob intra_ext_tx_prob[EXT_TX_SIZES][TX_TYPES][TX_TYPES - 1];
|
||||||
|
vpx_prob inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1];
|
||||||
int initialized;
|
int initialized;
|
||||||
} FRAME_CONTEXT;
|
} FRAME_CONTEXT;
|
||||||
|
|
||||||
typedef struct FRAME_COUNTS {
|
typedef struct FRAME_COUNTS {
|
||||||
|
unsigned int kf_y_mode[INTRA_MODES][INTRA_MODES][INTRA_MODES];
|
||||||
unsigned int y_mode[BLOCK_SIZE_GROUPS][INTRA_MODES];
|
unsigned int y_mode[BLOCK_SIZE_GROUPS][INTRA_MODES];
|
||||||
unsigned int uv_mode[INTRA_MODES][INTRA_MODES];
|
unsigned int uv_mode[INTRA_MODES][INTRA_MODES];
|
||||||
unsigned int partition[PARTITION_CONTEXTS][PARTITION_TYPES];
|
unsigned int partition[PARTITION_CONTEXTS][PARTITION_TYPES];
|
||||||
@@ -76,22 +89,32 @@ typedef struct FRAME_COUNTS {
|
|||||||
struct tx_counts tx;
|
struct tx_counts tx;
|
||||||
unsigned int skip[SKIP_CONTEXTS][2];
|
unsigned int skip[SKIP_CONTEXTS][2];
|
||||||
nmv_context_counts mv;
|
nmv_context_counts mv;
|
||||||
|
#if CONFIG_MISC_FIXES
|
||||||
|
struct seg_counts seg;
|
||||||
|
#endif
|
||||||
|
unsigned int intra_ext_tx[EXT_TX_SIZES][TX_TYPES][TX_TYPES];
|
||||||
|
unsigned int inter_ext_tx[EXT_TX_SIZES][TX_TYPES];
|
||||||
} FRAME_COUNTS;
|
} FRAME_COUNTS;
|
||||||
|
|
||||||
extern const vpx_prob vp10_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
|
|
||||||
extern const vpx_prob vp10_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
|
extern const vpx_prob vp10_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
|
||||||
[INTRA_MODES - 1];
|
[INTRA_MODES - 1];
|
||||||
|
#if !CONFIG_MISC_FIXES
|
||||||
|
extern const vpx_prob vp10_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1];
|
||||||
extern const vpx_prob vp10_kf_partition_probs[PARTITION_CONTEXTS]
|
extern const vpx_prob vp10_kf_partition_probs[PARTITION_CONTEXTS]
|
||||||
[PARTITION_TYPES - 1];
|
[PARTITION_TYPES - 1];
|
||||||
|
#endif
|
||||||
|
|
||||||
extern const vpx_tree_index vp10_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
|
extern const vpx_tree_index vp10_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
|
||||||
extern const vpx_tree_index vp10_inter_mode_tree[TREE_SIZE(INTER_MODES)];
|
extern const vpx_tree_index vp10_inter_mode_tree[TREE_SIZE(INTER_MODES)];
|
||||||
extern const vpx_tree_index vp10_partition_tree[TREE_SIZE(PARTITION_TYPES)];
|
extern const vpx_tree_index vp10_partition_tree[TREE_SIZE(PARTITION_TYPES)];
|
||||||
extern const vpx_tree_index vp10_switchable_interp_tree
|
extern const vpx_tree_index vp10_switchable_interp_tree
|
||||||
[TREE_SIZE(SWITCHABLE_FILTERS)];
|
[TREE_SIZE(SWITCHABLE_FILTERS)];
|
||||||
|
|
||||||
|
|
||||||
void vp10_setup_past_independence(struct VP10Common *cm);
|
void vp10_setup_past_independence(struct VP10Common *cm);
|
||||||
|
|
||||||
void vp10_adapt_mode_probs(struct VP10Common *cm);
|
void vp10_adapt_intra_frame_probs(struct VP10Common *cm);
|
||||||
|
void vp10_adapt_inter_frame_probs(struct VP10Common *cm);
|
||||||
|
|
||||||
void vp10_tx_counts_to_branch_counts_32x32(const unsigned int *tx_count_32x32p,
|
void vp10_tx_counts_to_branch_counts_32x32(const unsigned int *tx_count_32x32p,
|
||||||
unsigned int (*ct_32x32p)[2]);
|
unsigned int (*ct_32x32p)[2]);
|
||||||
@@ -100,6 +123,18 @@ void vp10_tx_counts_to_branch_counts_16x16(const unsigned int *tx_count_16x16p,
|
|||||||
void vp10_tx_counts_to_branch_counts_8x8(const unsigned int *tx_count_8x8p,
|
void vp10_tx_counts_to_branch_counts_8x8(const unsigned int *tx_count_8x8p,
|
||||||
unsigned int (*ct_8x8p)[2]);
|
unsigned int (*ct_8x8p)[2]);
|
||||||
|
|
||||||
|
extern const vpx_tree_index
|
||||||
|
vp10_ext_tx_tree[TREE_SIZE(TX_TYPES)];
|
||||||
|
|
||||||
|
static INLINE int vp10_ceil_log2(int n) {
|
||||||
|
int i = 1, p = 2;
|
||||||
|
while (p < n) {
|
||||||
|
i++;
|
||||||
|
p = p << 1;
|
||||||
|
}
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user